|
Hi Alok,
Thanks for your prompt reply. You may download it from the Microsoft website. Good luck!
Andrew
|
|
|
|
|
andrew95 wrote: You may download it from the Microsoft website. Good luck!
I awaiting same from my MSDN subscription!.. Downloading VS2005 from MS Site going to take weeks for me here in my city!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
In Solution Explorer, right click SimpleAtlCom project node->Add->Class and select ATL Simple Object under ATL.
Hope that helps.
|
|
|
|
|
Right you say!
"If it were machines, the pair_programming seem to work, but for humans it is pair_crackdown that seems to work! " - Nisamudheen
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hello,
Very good article. I want to use namespace in this com dll. How i have to do? I need to use this dll in a C# project, and i think it's better to work with namespace. Can i use namespace in c++ project or in vb project?
Thanks,
Mihai
|
|
|
|
|
MihaiChioariu wrote:
Can i use namespace in c++ project or in vb project?
I am Afraid, I Doesn't understand your problem, AFAIK The COM DLL itself create namespace to work with.!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
yes, shure i want to use namespace in Com DLL (i don't know how?), and used them in c++ and vb project (how?). using... i can't see any namespace only the dll name with using.
Thanks,
Mihai
|
|
|
|
|
MihaiChioariu wrote:
want to use namespace in Com DLL (i don't know how?), and used them in c++ and vb project (how?). using... i can't see any namespace only the dll name with using.
Yeap, The Compiler generate the namespace based on the dll name
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hello Alok,
Great article, Alok. Deserves a 5 for simplicity and a well thought-out pace of explanation.
How about a Part Two for this excellent primer ? Suggestions :
1. Demonstrate defining a generic set of interfaces via a "pure interface" ATL project, the purpose of which is to centrally maintain the definition of interfaces, structs, enums, etc which are used throughout a development team.
2. Demonstrate importing this IDL into the IDLs of implementation projects. Demonstrate the process of such implementations. This way, newbies can see that there can be multiple implementations of a generic set of interfaces.
3. Demonstrate how a client application can dynamically choose and use one or more actual implementation(s) of interfaces.
Just a few suggestions. Once again, a great article, Alok. Thanks.
Best Regards,
Bio.
|
|
|
|
|
Lim Bio Liong wrote:
Great article, Alok. Deserves a 5 for simplicity and a well thought-out pace of explanation.
Thanks Mr. Liong, It's great pleasure to hear above from you and sorry for replying late.
Lim Bio Liong wrote:
. Demonstrate defining a generic set of interfaces via a "pure interface" ATL project, the purpose of which is to centrally maintain the definition of interfaces, structs, enums, etc which are used throughout a development team.
2. Demonstrate importing this IDL into the IDLs of implementation projects. Demonstrate the process of such implementations. This way, newbies can see that there can be multiple implementations of a generic set of interfaces.
3. Demonstrate how a client application can dynamically choose and use one or more actual implementation(s) of interfaces.
Frankly Speaking Sir, I too struggling with these concepts, Could you please provide me any link in
support of this. Thanks
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hello Alok,
>> ... sorry for replying late
No problem, Alok.
>> Frankly Speaking Sir, I too struggling with these concepts, Could you please provide me any link in support of this. Thanks.
That's your good old humble nature as usual, Alok
I'll follow up with more messages expounding some of the techniques mentioned.
Best Regards,
Bio.
|
|
|
|
|
Lim Bio Liong wrote:
I'll follow up with more messages expounding some of the techniques mentioned.
Thanks, I will Wait for that
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hello Alok,
Pls email me directly :
bio_lim_2004@yahoo.com
I will need to send you some source codes along with discussions.
Best Regards,
Bio.
|
|
|
|
|
Hi alok,
I read whole article 3 times.. and my ATL funda (of how to start it with..) is now clear.. now i have started developing - writing atl code on my own.. Thaks for giving such a nice article...
Bye guru... And as you said in your biography, you are my idol;
Take care and keep smiling..
Jigar Mehta
(jigarmehta@gatescorp.com)
Software Developer
Gates Information Systems
India
|
|
|
|
|
Jigar Mehta wrote:
Thaks for giving such a nice article...
It's my great Pleasure
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
hi alok ,
I went through your article on developing COM/ATL i got some idea & i started creating a
simple Event sink for onsyncsave Exchange event.
I am getting stuck while crating COM in which i got these errors..
-------------------Configuration: exchangesink - Win32 Debug--------------------
Creating Type Library...
eE:\EXCHANGE\exchangesink\exchangesink.idl(18) : error MIDL2025 : syntax error : expecting a type
specification near "IExStoreEventInfo"
E:\EXCHANGE\exchangesink\exchangesink.idl(18) : error MIDL2026 : cannot recover from earlier
syntax errors; aborting compilation
Error executing midl.exe.
...............................................................................................
....................And My .Idl file Look Like .................................................
import "oaidl.idl";
import "ocidl.idl";
[
object,
uuid(64E6F31D-AC24-4AFF-A6AB-A6CCD315466A),
helpstring("Imysink Interface"),
pointer_default(unique)
]
interface Imysink : IUnknown
{
[helpstring("method OnSyncSave")] HRESULT OnSyncSave([in] IExStoreEventInfo *pEventInfo, [in]
BSTR bstrURLItem, [in] LONG lFlags);
[
uuid(A1B3DECB-1B49-4E7A-B39F-129BC66636D7),
version(1.0),
helpstring("exchangesink 1.0 Type Library")
]
library EXCHANGESINKLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
[
uuid(FB437D99-A76D-49EF-9D51-D1EBBAFBC08C),
helpstring("mysink Class")
]
coclass mysink
{
[default] interface Imysink;
};
};
...............................................................................................
I also Tried to import "exevtsnk.tlb" in library using importlib() but in vain..
So please help me out..
thanx in advance..
bye
<
|
|
|
|
|
manish wrote:
am getting stuck while crating COM in which i got these errors..
-------------------Configuration: exchangesink - Win32 Debug--------------------
Creating Type Library...
eE:\EXCHANGE\exchangesink\exchangesink.idl(18) : error MIDL2025 : syntax error : expecting a type
specification near "IExStoreEventInfo"
E:\EXCHANGE\exchangesink\exchangesink.idl(18) : error MIDL2026 : cannot recover from earlier
Actually at time of Compiling line
[helpstring("method OnSyncSave")] HRESULT OnSyncSave([in] IExStoreEventInfo *pEventInfo, [in] BSTR bstrURLItem, [in] LONG lFlags);
the IExStoreEventInfo is unknown to MIDL compiler!
Now to resolve this error just put Forward Declaration of
IExStoreEventInfo above interface Imysink
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
hi its me again,
thanx for your advice but a got another problem..
Now my IDL File Look Like This ....
import "oaidl.idl";
import "ocidl.idl";
cpp_quote("struct IExStoreEventInfo;")
[
uuid(A1B3DECB-1B49-4E7A-B39F-129BC66636D7),
version(1.0),
helpstring("exchangesink 1.0 Type Library")
]
library EXCHANGESINKLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
importlib("msado25.tlb");
importlib("cdoex.tlb");
importlib("exevtsnk.tlb");
[
uuid(FB437D99-A76D-49EF-9D51-D1EBBAFBC08C),
helpstring("mysink Class")
]
coclass mysink
{
[default] interface Imysink;
};
};
[
object,
uuid(64E6F31D-AC24-4AFF-A6AB-A6CCD315466A),
helpstring("Imysink Interface"),
pointer_default(unique)
]
interface Imysink : IUnknown
{
[helpstring("method OnSyncSave")] HRESULT OnSyncSave([in] IExStoreEventInfo *pEventInfo, [in] BSTR bstrURLItem, [in] LONG lFlags);
};
................
And My OUTPUT window shows this message..
E:\EXCHANGE\exchangesink\exchangesink.idl(45) : error MIDL2009 : undefined symbol : IExStoreEventInfo [ Procedure 'OnSyncSave' ]
Error executing midl.exe.
exchangesink.dll - 1 error(s), 0 warning(s)
..............
thanx..
<
|
|
|
|
|
Hi Manish,
exactly what is IExStoreEventInfo is!it it interface or something else please clear !
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
hi alok,
IExStoreEventInfo is an interface & "exevtsnk.tlb" has the reference to it.
This is a support interface that is passed to every OLE DB store event sink. It is used to retrieve event information and control the event transaction..
<
|
|
|
|
|
|
No.
you can load both .tlb & .idl file into your .idl file..
u can check in this link in msdn
ms-help://MS.MSDNQTR.2005JAN.1033/midl/midl/importlib.htm
<<
|
|
|
|
|
manish wrote:
ms-help://MS.MSDNQTR.2005JAN.1033/midl/midl/importlib.htm
Let me check! i will notify you with my finding!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
|
Could you provide me Weblink for Above!it seems that you have provided me link from local copy of MSDN!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|