PDA

Click to See Complete Forum and Search --> : registration


sebs
Oct 2nd, 2000, 11:48 AM
how can i register dll and ocx in vc++

Vlatko
Oct 2nd, 2000, 12:09 PM
Use the Tools->Register Control option

sebs
Oct 2nd, 2000, 12:12 PM
i mean at run time !(sorry)

parksie
Oct 2nd, 2000, 12:52 PM
You need to use the LoadLibrary function. Code similar to this should be used: (warning...this will probably not compile):

HMODULE hDLL = LoadLibrary("file.ocx")
*(STDAPI)(void) hDLLProc = GetProcAddress(hDLL, "DllRegisterServer");
if(hDLLProc)
(*hDLLProc)();
FreeLibrary(hDLL);

I'm not too sure about the function pointer definition, though. Does anyone else have the exact details?