|
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
|
|
|
|
|
Do u used the Code given in Sample or Created your own.
if you created Your Own code ,do you please Share that
thanks
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
ya i am sending u the code is is same what u give in example
STDMETHODIMP Csimpleobj::get_Name(BSTR *pVal)
{
// TODO: Add your implementation code here
CComBSTR bstStr(this->name);
*pVal=bstStr.Detach();
return S_OK;
}
STDMETHODIMP Csimpleobj::put_Name(BSTR newVal)
{
// TODO: Add your implementation code here
::wcstombs(this->name,newVal,99);
return S_OK;
}
STDMETHODIMP Csimpleobj::get_ATLMarks(short *pVal)
{
// TODO: Add your implementation code here
*pVal=this->ALTMarks;
return S_OK;
}
STDMETHODIMP Csimpleobj::put_ATLMarks(short newVal)
{
// TODO: Add your implementation code here
this->ALTMarks=newVal;
return S_OK;
}
STDMETHODIMP Csimpleobj::get_COMMarks(short *pVal)
{
// TODO: Add your implementation code here
*pVal=this->COMMarks;
return S_OK;
}
STDMETHODIMP Csimpleobj::put_COMMarks(short newVal)
{
// TODO: Add your implementation code here
this->COMMarks=newVal;
return S_OK;
}
STDMETHODIMP Csimpleobj::get_Total(short *pVal)
{
// TODO: Add your implementation code here
*pVal=this->m_iTotalMarks;
return S_OK;
}
STDMETHODIMP Csimpleobj::Calculate()
{
// TODO: Add your implementation code here
this->m_iTotalMarks=this->ALTMarks+this->COMMarks;
return S_OK;
}
Ankit Aneja
|
|
|
|
|
In first Post you mentioned your function of type as compiler error state
get_Name(short*); '
but here you mentioning parameter in get_name(BSTR)
I think there is Problem in Function Decalaration could you check and tell it to me.
Thanks
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
yes i first declared it short
and after that i changed it to BSTR
i think i haven't changed it, in all places
Ankit Aneja
|
|
|
|