ATL Question:
Download Job Interview Questions and Answers PDF
What are the reasons an ATL server might fail to register?
Answer:
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.
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.
Download ATL Interview Questions And Answers
PDF