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.