EDN Admin
Well-known member
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
re importlib("stdole2.tlb");
[
<span style="white-space
re object,
<span style="white-space
re uuid(A30FC15A-C4ED-4132-84FB-ECB5E6D07B89),
<span style="white-space
re dual,
<span style="white-space
re nonextensible,
<span style="white-space
re helpstring("ICGTEMailRecipient Interface"),
<span style="white-space
re 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
re [
<span style="white-space
re uuid(3B0F84BC-320E-4D89-8BBA-1CCC0BA28E1C),
<span style="white-space
re helpstring("CGTEMailRecipient Class")
<span style="white-space
re ]
<span style="white-space
re coclass CGTEMailRecipient
<span style="white-space
re {
<span style="white-space
re [default] interface ICGTEMailRecipient;
<span style="white-space
re };
};
View the full article
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

[
<span style="white-space

<span style="white-space

<span style="white-space

<span style="white-space

<span style="white-space

<span style="white-space

]
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

<span style="white-space

<span style="white-space

<span style="white-space

<span style="white-space

<span style="white-space

<span style="white-space

<span style="white-space

};
View the full article