ATL ATL

  Home  Computer Programming  ATL ATL


“ATL frequently Asked Questions in various Active Template Library (ATL) job Interviews by interviewer. Get preparation of ATL job interview”



27 ATL ATL Questions And Answers

2⟩ What is proces?

In Windows, Thread is an unit of execution.Process is the

environment in which thread executes.Scheduler, schedules

the Threads not the process.

In Unix variants,Thread is treated as light weight process.

Scheduler, schedules the process not threads.

 219 views

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

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:SharedideBinRegsvr32.exe. In

the Program arguments text box, specify the full path to

your DLL, such as C:MyprojectsMyFolderDebugMyFile.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.

 193 views

12⟩ How to Implement multiple dual interfaces?

We can implement a dual interface using the IDispatchImpl

class, which provides a default implementation of the

IDispatch methods in a dual interface. For more information

To use this class:

Define your dual interface in a type library.

Derive your class from a specialization of IDispatchImpl

(pass information about the interface and type library as

the template arguments).

Add an entry (or entries) to the COM map to expose the dual

interface through QueryInterface.

Implement the vtable part of the interface in your class.

Ensure that the type library containing the interface

definition is available to your objects at run time.

 198 views

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

The ATL 2.0 Object Wizard might not be present in the

Component Gallery. The ATL 2.0 Object Wizard is not

installed by the main ATL 2.0 setup program (Atlinst.exe).

It requires a separate setup program. You need to download

and run the ATL 2.0 Object Wizard Technology Preview

(Objinst.exe) from the ATL Web page. There is a separate

ZIP file for Windows NT 3.51.

The ATL 2.0 Object Wizard may crash if an older version of

Oleaut32.dll is installed on the system. Make sure the

version of Oleaut32.dll is at least 2.20.4049. The latest

version is available for download at the Internet Explorer

3.x Web site. If this does not fix the problem, then

install Service Pack 2 for Windows NT 4.0.

 183 views

14⟩ What is class description of CAxWindow?

Wraps an "AtlAxWin80" window, providing methods for

creating the window, creating a control and/or attaching a

control to the window, and retrieving interface pointers on

the host object.

 215 views

17⟩ What is class description of CAxWindow2T?

Wraps an "AtlAxWinLic80" window, providing methods for

creating the window, creating a control and/or attaching a

licensed control to the window, and retrieving interface

pointers on the host object.

 215 views

20⟩ What Is the ATL Control-Hosting API?

ATL's control-hosting API is the set of functions that

allows any window to act as an ActiveX control container.

These functions can be statically or dynamically linked

into your project since they are available as source code

and exposed by ATL80.dll. The control-hosting functions are

listed in the table below.

 197 views