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



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

Answer / 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

More ATL Interview Questions

sap hana online training in USA UK CANADA INDIA AUSTRALIA

1 Answers   SAP Labs,


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

0 Answers  


How to Implement static object hierarchies in ATL ?

0 Answers  


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

0 Answers  


How to Reuse interface implementation in source in ATL projects ?

1 Answers   Syntel,






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

0 Answers  


how to create SDK based ATL ? how to create SDK based COM?

1 Answers   TCS,


Which ATL Classes Facilitate ActiveX Control Containment?

1 Answers  


What Is the ATL Control-Hosting API?

2 Answers  


what is proces ?

5 Answers   OfficeNet,


What are the known problems with the ATL 2.0 Object Wizard?

1 Answers  


What problems might be encountered when using _ATL_MIN_CRT? What causes the linker error that _main is unresolved during Release builds?

2 Answers  


Categories