I am writing an Win32 C++ service for interfacing an bio-metric device. The SDK provided by the manufacturer uses MFC. I have no experience or knowledge regarding MFC.
Platform : Windows 10
Architecture : x64
Toolchain : MSVC 2017
DWORD SGFPM_EnableAutoOnEvent (HSGFPM hFpm, BOOL enable, HWND hwnd, void* reserved)
Parameters
pFPM
The handle of the SGFPM object
enable
TRUE: enables Auto-On
FALSE: disables Auto-On
hwnd
Window handle to receive Auto-On message
reserved Not used
The third parameter requires Window handle to receive Auto-On message. The sample application is an MFC based GUI application and not a service.
My question is what should be the value for third parameter. In Linux we fill a NULL value but I don't know what should I enter in my case.
hwnd
(think of it as an identifier for the operating system) of the window you want to receive your message in. How do you find that value? No idea.. if it's another application you might use FindWindow or if it's part of the same project you could use MFC's provided GetSafeHwnd with the MFC-managed window – Marco A.