Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ATL COM - How many objects

Posted on 2004-04-01
2
Medium Priority
?
287 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 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

773 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