|
Sorry man. It's working....
|
|
|
|
|
senproin wrote: Sorry man. It's working....
noprobs, you are always welcome
"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
|
|
|
|
|
But as you guide says, step 20, it shuldn´t create automatically the function "VOID Fire_TotalMarks(SHORT TotalMarks)..." ?
Why, in my case, it was not created.
Coping the function from your project does the work.
So for making from scratch something is missing.
I am very interested on this.
Your article is very good.
Congratulations
Miguel
|
|
|
|
|
Hello,
I was trying to implement this code in my system. But i am not able to do it. Might be silly mistakes but cant figure it out.Plewase help. I am a newbie to this field
THis is the error i am getting..
Compiling...
SimpleAtlCom.cpp
E:\VC Study Examples\COM_ATL\SimpleAtlCom\SimpleObj.h(34) : error C2065: 'IID__ISimpleObjEvents' : undeclared identifier
E:\VC Study Examples\COM_ATL\SimpleAtlCom\SimpleObj.h(34) : error C2440: 'static_cast' : cannot convert from 'class CSimpleObj *' to 'class ATL::_ICPLocator *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
E:\VC Study Examples\COM_ATL\SimpleAtlCom\SimpleObj.h(34) : fatal error C1903: unable to recover from previous error(s); stopping compilation
SimpleObj.cpp
E:\VC Study Examples\COM_ATL\SimpleAtlCom\SimpleObj.h(34) : error C2065: 'IID__ISimpleObjEvents' : undeclared identifier
E:\VC Study Examples\COM_ATL\SimpleAtlCom\SimpleObj.h(34) : error C2440: 'static_cast' : cannot convert from 'class CSimpleObj *' to 'class ATL::_ICPLocator *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
E:\VC Study Examples\COM_ATL\SimpleAtlCom\SimpleObj.h(34) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Generating Code...
Error executing cl.exe.
SimpleAtlCom.dll - 6 error(s), 0 warning(s)
Dileep
|
|
|
|
|
Dileep_kerala wrote: E:\VC Study Examples\COM_ATL\SimpleAtlCom\SimpleObj.h(34) : error C2065: 'IID__ISimpleObjEvents' : undeclared identifier
I believe you have tried above article by your own .. thats nice.. any Way just convert 'IID__ISimpleObjEvents' to 'DIID__ISimpleObjEvents' in Class Header File.
Dileep_kerala wrote: Might be silly mistakes but cant figure it out.
Hai.. No Probs Buddy...
you are always welcome
"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
|
|
|
|
|
Thank you very much for this article! You have no idea how much it helped me out.
Anyway, I ran into this problem too. Why didnt visual studio put in the correct name? And where is the definition for "DIID__ISimpleObjEvents"
thanks again
DrDataRulz.net
|
|
|
|
|
rebuild it dude..
"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
|
|
|
|
|
Hi Guys,
Could you please give me some idea on how to add an ATL control in the Visual C++ 2005 (final)? It seems that there is no "insert" menu and ATL Object Wizard in this new version visual c++. Thanks a lot!
Andrew
|
|
|
|
|
andrew95 wrote: It seems that there is no "insert" menu and ATL Object Wizard in this new version visual c++.
I still have to see/explorer the VS2005 IDE.. i havn't got the CD yet...
"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
|
|
|
|
|
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
<
|
|
|
|