Everything 1.5 SDK

Discussion related to "Everything" 1.5 Alpha.
Post Reply
void
Developer
Posts: 17069
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 (but unlikely) for 8 clients to connect at the same time and the 9th client will fail before a new pipe server is created.

To set the number of IPC pipe servers:
  • In Everything 1.5, from the Tools menu, click Options.
  • Click the Advanced tab on the left.
  • To the right of Show settings containing, search for:
    menu
  • Select: ipc_pipe_count
  • Set the value to: 8
    (where 8 is the number of IPC pipe servers)
  • Click OK.
TODO:
build dll
include old SDKs in SDK3.



Download

Everything-SDK3.zip



Example Usage
#include "Everything3.h"

void simple_example(void)
{
	EVERYTHING3_CLIENT *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);
	}
}
void
Developer
Posts: 17069
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything 1.5 SDK

Post by void »

Everything 1.5.0.1388a adds the following API calls:
EVERYTHING3_USERAPI EVERYTHING3_BOOL EVERYTHING3_API Everything3_GetFileAttributesExW(EVERYTHING3_CLIENT *client,const EVERYTHING3_WCHAR *lpFilename,WIN32_FIND_DATAW *pfd);
EVERYTHING3_USERAPI EVERYTHING3_BOOL EVERYTHING3_API Everything3_GetFileAttributesExA(EVERYTHING3_CLIENT *client,const EVERYTHING3_CHAR *lpFilename,WIN32_FIND_DATAA *pfd);
EVERYTHING3_USERAPI EVERYTHING3_DWORD EVERYTHING3_API Everything3_GetFileAttributesUTF8(EVERYTHING3_CLIENT *client,const EVERYTHING3_UTF8 *lpFilename);
EVERYTHING3_USERAPI EVERYTHING3_DWORD EVERYTHING3_API Everything3_GetFileAttributesW(EVERYTHING3_CLIENT *client,const EVERYTHING3_WCHAR *lpFilename);
EVERYTHING3_USERAPI EVERYTHING3_DWORD EVERYTHING3_API Everything3_GetFileAttributesA(EVERYTHING3_CLIENT *client,const EVERYTHING3_CHAR *lpFilename);
Post Reply