|
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
|
|
|
|
|
yup ..here is the link...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/midl/midl/importlib.asp
<
|
|
|
|
|
hi alok,,
I just solved my problem ..
Infact I started with the wrong step..
I got it solved From this very USEFUL Link...
http://support.microsoft.com/default.aspx?scid=kb;en-us;288156
i was not aware of step NO. 3,4,5 in the above LinK..
Guess what i just created the event sync to respond on a message arrival in Exchange Store....
Thank you For Giving Suggestion & your time..
Bye
<
|
|
|
|
|
Yeah Sure! thanks for informing about that link!
"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,
I have got linking error when trying to build the SimpleAtlCom dll project
downloaded from this web page.
No modification to the source code have been done.
I'm using VC 6++ running on XP SP2.
The linking error are as follows:
Configuration: SimpleAtlCom - Win32 Unicode Release MinDependency--------------------
Linking...
Creating library ReleaseUMinDependency/SimpleAtlCom.lib and object ReleaseUMinDependency/SimpleAtlCom.exp
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
ReleaseUMinDependency/SimpleAtlCom.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
SimpleAtlCom.dll - 2 error(s), 0 warning(s)
Any help is appreciated.
Noam1
|
|
|
|
|
Actually the cause of linking error is Symbol _ATL_MIN_CRT ,which is defined in Win32 ReleaseUMinDependency configuartion.
you have many option to remove this linking error,i am stating some of them
- remove the symbol
_ATL_MIN_CRT from PROJECT|Setting|C/C++|Preprocessor Definations
- or build you DLL in Release Min Size or MinDependency ,as i already have removed that symbol.
|
|
|
|
|
hi alok i was trying to make simpleatlcom.dll with ur exemple
i get following errors are these due to some settings which i have not done
help me
thanks in advance
: error C2511: 'get_Name' : overloaded member function 'long (unsigned short ** )' not found in 'Csimpleobj'
c:\program files\microsoft visual studio\myprojects\simpleatlcom\simpleobj.h(10) : see declaration of 'Csimpleobj'
C:\Program Files\Microsoft Visual Studio\MyProjects\simpleatlcom\simpleobj.cpp(20) : error C2511: 'put_Name' : overloaded member function 'long (unsigned short *)' not found in 'Csimpleobj'
c:\program files\microsoft visual studio\myprojects\simpleatlcom\simpleobj.h(10) : see declaration of 'Csimpleobj'
Generating Code...
Ankit Aneja
|
|
|
|