Click to See Complete Forum and Search --> : Not getting registered


Samantha
June 17th, 1999, 02:05 AM
I created a ActiveX control and trying to register it on a system which only have win 95 .....no MS Visual Studio installed ..
It is not getting registered.....Unload library fail is coming......can somebody help...pls

thanks guys...

Jörg Eckart
June 17th, 1999, 02:41 AM
Hi,

use regsvr32 on the command line to register your control.

Greetings, Jörg

Samantha
June 17th, 1999, 06:24 AM
Thanku Jorg.....
But even that i tried ...it is giving LoadLibrary failed...what will be the reason......
pls...it is urgent.....

samantha

Safai Ma
June 17th, 1999, 10:43 AM
As you had said in your previous post, you don't have DevStudio installed, which means it probably don't have all the required libraries installed (MFC42.DLL and MSVCRT.DLL if you are using MFC) installed. To solve your problem, copy all the required DLLs to that system or statically link all the required libraries.

-Safai

BrianOG
June 17th, 1999, 10:50 AM
There is a program shipped with VC 6 calles depends.exe (in the Visual Studio\Common\Tools) directory. You can use this to see all the dlls that your ocx depends on. And then you must install them on the destination computer (but dont overwrite newer versions on the destination computer.)

John Holifield
June 17th, 1999, 10:51 AM
Run this test program in Debug mode to find out why your dll is failing. It will probably give you a message box that a DLL isn't in the path. Then you can copy the DLL and party on!


#include <windows.h>

void main()
{

HANDLE h = ::LoadLibrary("C:\\Temp\\MyDLL.Dll");

LPVOID lpMsgBuf;
::FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
GetLastError(),
MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT),
(LPTSTR) &lpMsgBuf,
0,
NULL );

::MessageBox( NULL, (const char*)lpMsgBuf, "GetLastError", MB_OK | MB_ICONINFORMATION );
::LocalFree( lpMsgBuf );

if( h )
::FreeLibrary(h);

}

June 17th, 1999, 04:03 PM
If you are using mfc then you have to ship mfc dlls with your control. Get from redist directory of visual studio or VC. There are redistributable dlls. You have to ship mfc42.dll, msvcrt.dll ( mfc42d.dll if debug mode ) and make sure your dlls are same version as VC you are using.