How to add ATL object map in simple Win32 Application
-
Hi! I am starting from ground up. I am with simple Win32 Application and I want add ATL functionality in it by fooling wizard. I planned: 1)a cpp file that has the same name as the project . 2)an ATL object map (the map can be empty, but it must be present). 3)an IDL file with the same name as the project and this file must have a Library block. Need feedback on 2 and 3.
-
Hi! I am starting from ground up. I am with simple Win32 Application and I want add ATL functionality in it by fooling wizard. I planned: 1)a cpp file that has the same name as the project . 2)an ATL object map (the map can be empty, but it must be present). 3)an IDL file with the same name as the project and this file must have a Library block. Need feedback on 2 and 3.
What kind of feedback? That's how to fool the wizard. The easiest way to get examples of (2) and (3) if that's what you need is to run the VC++ AppWizard and select ATL. That will generate you the appropriate files, and you can cut and paste from there. I've done this before, and it works. Steve S
-
What kind of feedback? That's how to fool the wizard. The easiest way to get examples of (2) and (3) if that's what you need is to run the VC++ AppWizard and select ATL. That will generate you the appropriate files, and you can cut and paste from there. I've done this before, and it works. Steve S
Problem with (3) is with the entire IDL file.As it should not compile. So What modifications should I do in the project settings when I add it to the project. And working on Ur copy paste tip. What should be the type (EXE or DLL )of ATL WORKSPACE. Thanx for all that feedback. And feedback always for learning.
-
Problem with (3) is with the entire IDL file.As it should not compile. So What modifications should I do in the project settings when I add it to the project. And working on Ur copy paste tip. What should be the type (EXE or DLL )of ATL WORKSPACE. Thanx for all that feedback. And feedback always for learning.
The IDL file can be as simple as this; import "oaidl.idl"; import "ocidl.idl"; [ uuid(FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF), version(1.0), helpstring("myapp library") ] library MyApp { importlib("stdole32.tlb"); importlib("stdole2.tlb"); }; You don't even need to use a different UUID, since you're not going to be registering it. Your 'dummy' can be either, I tend to use DLL out of habit, since I write in-proc servers quite often :) Steve S