ESDi
Hotkey messages
Use the WIN32 API calls PostMessage and SendMessage to control aspects of ESDi -
(example in C progamming language)
PostMessage(HWND_BROADCAST, WM_HOTKEY, ?, 0);
Where ? = 100 for transmit, 101 for halt transmit and 0 to 9 inclusive to select a 'hotkey transmit to'.
Note: The above is a simple example. There could be unpredicable results on a system which is running many applications. An application should use a Win32 API function like FindWindow to get ESDi's handle. This handle should be used instead of HWND_BROADCAST. FYI: ClassName parameter for the FindWindow function will be ESDi v?.?? - where ?.?? will be the version you are running.
Is ESDi running?
While ESDi is running a mutex exists - "ESDi_mut".
HANDLE h;
DWORD dw;
h=CreateMutex(NULL, TRUE, TEXT("ESDi_mut"));
dw=GetLastError();
if (dw==ERROR_ALREADY_EXISTS) {
//ESDi is currently running..
} else {
ReleaseMutex(h);
//ESDi not running.. (You may wish to start ESDi using CreateProcess)
}