private GetModuleHandle ( string lpModuleName ) : |
||
lpModuleName | string | |
Результат |
public WinEventHook(WinEventDelegate handler, WinEvent eventMin, WinEvent eventMax, string xllPath) { // Note : could we use another handle than one of an xll ? // Thus we could avoid carrying the xll path. // The events are still hooked after the xll has been unloaded. var xllModuleHandle = Win32Helper.GetModuleHandle(xllPath); var excelProcessId = Win32Helper.GetExcelProcessId(); _procDelegate = handler; _hWinEventHook = SetWinEventHook(eventMin, eventMax, xllModuleHandle, handler, excelProcessId, 0, SetWinEventHookFlags.WINEVENT_INCONTEXT); }