multi-instance for search by sdk
Posted: Fri Aug 09, 2019 2:40 am
I startup a named instance,and how to use sdk to search by specified instance?
Everything Search Engine
https://www.voidtools.com/forum/
Code: Select all
everything_hwnd = FindWindow(EVERYTHING_IPC_WNDCLASS,0);
Code: Select all
everything_hwnd = FindWindow("EVERYTHING_TASKBAR_NOTIFICATION_(instance name)",0);
I changed the following line :void wrote: ↑Fri Aug 09, 2019 2:51 am The SDK does not support named instances, yet.
For now, you will need to re-build the SDK with your custom instance name.
You'll need to change the following line (there are 5 of them - change all of them):to:Code: Select all
everything_hwnd = FindWindow(EVERYTHING_IPC_WNDCLASS,0);
where instance name is your custom instance name.Code: Select all
everything_hwnd = FindWindow("EVERYTHING_(instance name)",0);
Check the ES source code.
ES uses the Everything IPC (which is what the Everything SDK is built on) and supports named instances with the -instance command line option.
Code: Select all
everything_hwnd = FindWindow(EVERYTHING_IPC_WNDCLASS,0);
Code: Select all
everything_hwnd = FindWindow("EVERYTHING_TASKBAR_NOTIFICATION_(instance name)",0);
Code: Select all
everything_hwnd = FindWindow("EVERYTHING_(instance name)",0);
Code: Select all
HWND es_find_ipc_window(void)
{
wchar_t window_class[ES_BUF_SIZE];
HWND hwnd;
*window_class = 0;
es_wstring_cat(window_class,EVERYTHING_IPC_WNDCLASS);
if (*es_instance)
{
es_wstring_cat(window_class,L"_(");
es_wstring_cat(window_class,es_instance);
es_wstring_cat(window_class,L")");
}
hwnd = FindWindow(window_class,0);
return hwnd;
}
Correct, does this work for you?everything_hwnd = FindWindow("EVERYTHING_TASKBAR_NOTIFICATION_(instance name)",0);