What are the reasons an ATL server might fail to register?

Answer Posted / abhijit sukale

The following are the top three reasons an ATL server might
fail to register: 1. You built your project with
_WIN32_WINNT=0x400 (the default), and you are not running
the ATL server under Windows NT 4.0 or you do not have an
up-to-date version of Oleaut32.dll. To solve this problem,
run "DUMPBIN /EXPORTS OLEAUT32.DLL" and search for
UnregisterTypelib. If it is not there, then your server
cannot run. Remove this #define statement from Stdafx.h if
you want to run the ATL server under Windows 95 or older
versions of Windows NT. Alternatively, you can use
LoadLibrary and GetProcAddress so that you can run
optimally under both Windows 95 and Windows NT 4.0. The
Oleaut32.dll that ships with the Internet Explorer 3.x is
up-to-date.
2. You built your project as MinSize and Atl.dll is not
properly installed on the system. The correct version of
Atl.dll must be copied and registered by Regsvr32. There
are Windows NT and Windows 95 versions of Atl.dll. The
Windows 95 version runs under Windows NT. However, since it
does not use the UNICODE APIs, it is slightly less
efficient. Unless you build your project as MinDependency,
you will need to install the correct version of Atl.dll and
run Regsvr32 on it before you install your server.
3. You built your project as UNICODE, and you cannot run it
under Windows 95.
The following are the steps to troubleshoot: 1. For a DLL
server, run Regsvr32 in the debugger. Open the Project
Settings dialog box and click the Debug tab. In the
Executable for debug session text box, enter the full path
to Regsvr32.exe, such as C:\Sharedide\Bin\Regsvr32.exe. In
the Program arguments text box, specify the full path to
your DLL, such as C:\Myprojects\MyFolder\Debug\MyFile.dll.
Set a breakpoint at DllRegisterServer and start stepping.
2. For an EXE server, run it in the debugger and
specify /REGSVR as its command-line argument.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What changes does a control need to run in the Visual Basic 5.0 Control Creation Edition?

1618


Why is the put_Font or putref_Font method not called when an ActiveX control's Font property is changed by the ActiveX Control Pad?

2009


How to Use structs in Automation-compatible interfaces?

2532


How to Obtain data from the client via an outgoing event dispinterface in ATL ?

2651


Does ATL require an application server to operate?

2038






How to Implement static object hierarchies in ATL ?

3050


what type of questions are asked in the test of pcs and what type of questoins are asked by interviewer in pcs interview.

2277


What changes does a control need to run in an MFC 4.2b container?

1850


Will ATL create all of the topological relationships within the topology layer?

1713


How to get the tag to work with an ATL control?

1692


why we write function's implementation in .h file while developing the Web application through VC++?

2387