Solved

ATL COM - How many objects

Posted on 2004-04-01
2
276 Views
Last Modified: 2013-11-25
How many ATL Simple Objects can I add to an ATL COM Project?
How many .idl files can I use?
0
Comment
Question by:mmouer
  • 2
2 Comments
 
LVL 15

Accepted Solution

by:
lakshman_ce earned 500 total points
ID: 10735592
There will be only one idl file whatever the number of ATL objects you add to your project.
For eg refer to the following contents from idl file
// ATLTest.idl : IDL source for ATLTest.dll
//

// This file will be processed by the MIDL tool to
// produce the type library (ATLTest.tlb) and marshalling code.

import "oaidl.idl";
import "ocidl.idl";
      [
            object,
            uuid(799A3100-F56B-4BB4-8849-BED7D81FDF2B),
            dual,
            helpstring("ITest1 Interface"),
            pointer_default(unique)
      ]
      interface ITest1 : IDispatch
      {
      };
      [
            object,
            uuid(4A108BA1-BE45-48DB-A552-54929A07425C),
            dual,
            helpstring("ITest2 Interface"),
            pointer_default(unique)
      ]
      interface ITest2 : IDispatch
      {
      };

[
      uuid(3E06C944-4A96-4C1E-BE0E-F0D7A9985E3F),
      version(1.0),
      helpstring("ATLTest 1.0 Type Library")
]
library ATLTESTLib
{
      importlib("stdole32.tlb");
      importlib("stdole2.tlb");

      [
            uuid(542115B7-3865-4235-A0D5-DD1C3A311740),
            helpstring("Test1 Class")
      ]
      coclass Test1
      {
            [default] interface ITest1;
      };
      [
            uuid(6047A1CB-D030-4EF3-84EE-63D277CC82B3),
            helpstring("Test2 Class")
      ]
      coclass Test2
      {
            [default] interface ITest2;
      };
};


Here Test1 and Test2 are ATL Simple objects.

-Lakshman
0
 
LVL 15

Expert Comment

by:lakshman_ce
ID: 10735649
I also don't see any limit there. I have across projects with more than 100 ATL objects.

-Lakshman
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now