Trying to create simple COM library using ATL in Visual Studio 2012. I do:
New ATL Project
Welcome to the ATL Project Wizard
Next
Application Settings - no change (DLL)
Next
Finish
Got a lot of files:
Trying to understand where to add simple function that can be called by COM user. I found only one place where I can add function using wizard:
But I see that something is missing there regarding parameters selection like in,out,retval.
And I was hoping that after adding new function at least IDL file will be updated too, but this not happened.
What is the way of creating simple COM class using ATL from Visual C++ from VS2012 ?
Add a new class
Fill in fields
After this step
SomeObject.h
,SomeObject.cpp
files will be created and added to your solution, theISomeObject
interface declaration will be added to the.idl
file.Go to Class View (the combination ctrl+shift+C by default), select
ISomeObject
, add a new methodFill in fields
After this step the
someMethod
will be added to.idl
file,.h
file and.cpp
file. All you have to do - is to write an implementation ofsomeMethod
in.cpp
file.