Solved

ATL COM - How many objects

Posted on 2004-04-01
2
275 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

759 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

21 Experts available now in Live!

Get 1:1 Help Now