Register COM server

xiaoxiao2021-03-06  38

BOOL RegisterDLL (LPCTSTR lpszDLLPath) {BOOL bRet; HMODULE hDLL = LoadLibrary (lpszDLLPath); if (hDLL == NULL) return FALSE; FARPROC pfn = GetProcAddress (hDLL, "DllRegisterServer"); if (! Pfn = NULL) {HRESULT hr = PFN (); bret = succeededed (hr);} freeelibrary (hdll); return bret;}

Code Description: lpszdllPath: The DLL file to register. Return Value: Returns true if registration is successful, otherwise returns false.

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

New Post(0)