BCB in code registration control

zhaozj2021-02-16  80

Registration in your code: void __fastcall tiehookform :: onregisterreg () {

// ActiveX control path and file name LPCTSTR pszDllName = "IEEventHookPrj.dll"; // load ActiveX controls HINSTANCE hLib = LoadLibrary (pszDllName); if (hLib <(HINSTANCE) HINSTANCE_ERROR) {ShowMessage ( "Could not load Dll files! "); return;} // obtain registration function DllRegisterServer address FARPROC lpDllEntryPoint; lpDllEntryPoint = GetProcAddress (hLib, (" DllRegisterServer ")); // call registration function DllRegisterServer if (lpDllEntryPoint = NULL) {if (FAILED ((* lpDllEntryPoint! ) ()) {ShowMessage ("call DllRegisterServer failed!"); FreeLibrary (HLIB); Return;} // showMessage ("Register Success");} Else ShowMessage ("call DLLREGISTERSERVER Failed!");}

转载请注明原文地址:https://www.9cbs.com/read-16960.html

New Post(0)