Everything 1.5 SDK

Discussion related to "Everything" 1.5 Alpha.
Post Reply
void
Developer
Posts: 16901
Joined: Fri Oct 16, 2009 11:31 pm

Everything 1.5 SDK

Post by void »

The Everything SDK for Everything 1.5

Download
Example Usage



The Everything 1.5 SDK is version 3 of the Everything SDK.
Version 2 is for Everything 1.4.
version 1 is for Everything 1.3.

Previous versions are compatible with Everything 1.5.

The Everything 1.5 SDK now uses named pipes.
Pipe connections can be kept open if you wish to monitor result list changes.

Everything hosts 8 pipe servers by default.
pipe servers are recreated as soon as a client connects.
Note: it's possible for 8 clients to connect at the same time and the 9th client will fail before a new pipe server is created.

TODO:
build dll
include old SDKs in SDK3.



Download

Everything-SDK3.zip



Example Usage
#include "Everything3.h"

void simple_example(void)
{
	_everything3_client_t *client;

	// connect to Everything..	
	client = Everything3_ConnectW(L"1.5a");
	if (client)
	{
		EVERYTHING3_SEARCH_STATE *search_state;

		// Connected..
		
		// Create an empty search state.
		search_state = Everything3_CreateSearchState();
		if (search_state)
		{
			EVERYTHING3_RESULT_LIST *result_list;

			// Set the search text.
			Everything3_SetSearchTextW(search_state,L"ABC 123");
			
			// Execute the search.
			result_list = Everything3_Search(client,search_state);
			if (result_list)
			{
				SIZE_T viewport_count;
				SIZE_T result_index;
				
				// Search successful.

				// Get the number of results.
				viewport_count = Everything3_GetResultListViewportCount(result_list);
				
				// loop through the results.
				for(result_index=0;result_index<viewport_count;result_index++)
				{
					wchar_t filename[MAX_PATH];

					// Get the filename
					Everything3_GetResultFullPathNameW(result_list,result_index,filename,MAX_PATH);
					
					// Display the filename.
					printf("%S\n",filename);
				}
				
				// Destroy the result list.
				Everything3_DestroyResultList(result_list);
			}

			// Destroy the search state.
			Everything3_DestroySearchState(search_state);
		}
		
		// Disconnect and free the client.
		Everything3_DestroyClient(client);
	}
}
Post Reply