MIDL2025 error with CDO.DLL

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Im trying to use an enumeration from CDO.DLL in my idl and cant get it to compile. I used ProcessMonitor and verified that CDO.DLL is being accessed during the compilation with no pathing issues.


1>.CGTSDK.idl(23) : error MIDL2025 : syntax error : expecting a type specification near "CdoRecipientType"
1>.CGTSDK.idl(23) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation



import "oaidl.idl";
import "ocidl.idl";


library GTSDKLib
{
importlib("CDO.DLL");
<span style="white-space:pre importlib("stdole2.tlb");

[
<span style="white-space:pre object,
<span style="white-space:pre uuid(A30FC15A-C4ED-4132-84FB-ECB5E6D07B89),
<span style="white-space:pre dual,
<span style="white-space:pre nonextensible,
<span style="white-space:pre helpstring("ICGTEMailRecipient Interface"),
<span style="white-space:pre pointer_default(unique)
]
interface ICGTEMailRecipient : IDispatch{
[propget, id(1), helpstring("property RecipientType")] HRESULT RecipientType([out, retval] CdoRecipientType* pVal);
[propput, id(1), helpstring("property RecipientType")] HRESULT RecipientType([in] CdoRecipientType newVal);
[propget, id(2), helpstring("property Recipient")] HRESULT Recipient([out, retval] BSTR* pVal);
[propput, id(2), helpstring("property Recipient")] HRESULT Recipient([in] BSTR newVal);
};


<span style="white-space:pre [
<span style="white-space:pre uuid(3B0F84BC-320E-4D89-8BBA-1CCC0BA28E1C),
<span style="white-space:pre helpstring("CGTEMailRecipient Class")
<span style="white-space:pre ]
<span style="white-space:pre coclass CGTEMailRecipient
<span style="white-space:pre {
<span style="white-space:pre [default] interface ICGTEMailRecipient;
<span style="white-space:pre };
};




View the full article
 
Back
Top