sleets
Joined: 29 Jun 2007 Posts: 27
|
Posted: Sat Sep 13, 2008 6:02 am Post subject: COM interface type error |
|
|
COM interface is a pointer to struct in D.
bindings.win32 use interface* as struct*;
For example:
Code: |
struct VARIANT {
union {
struct {
VARTYPE vt;
WORD wReserved1;
WORD wReserved2;
WORD wReserved3;
union {
int lVal;
LONGLONG llVal;
ubyte bVal;
short iVal;
float fltVal;
double dblVal;
VARIANT_BOOL boolVal;
SCODE scode;
CY cyVal;
DATE date;
BSTR bstrVal;
IUnknown* punkVal;
LPDISPATCH pdispVal;
SAFEARRAY* parray;
ubyte* pbVal;
short* piVal;
int* plVal;
float* pfltVal;
double* pdblVal;
VARIANT_BOOL* pboolVal;
_VARIANT_BOOL* pbool;
SCODE* pscode;
CY* pcyVal;
DATE* pdate;
BSTR* pbstrVal;
IUnknown** ppunkVal;
LPDISPATCH* ppdispVal;
SAFEARRAY** pparray;
VARIANT* pvarVal;
void* byref;
CHAR cVal;
USHORT uiVal;
ULONG ulVal;
ULONGLONG ullVal;
INT intVal;
UINT uintVal;
DECIMAL* pdecVal;
CHAR* pcVal;
USHORT* puiVal;
ULONG* pulVal;
INT* pintVal;
UINT* puintVal;
struct {
PVOID pvRecord;
IRecordInfo* pRecInfo; // shoule be LPRECORDINFO pRecInfo;
}
}
}
DECIMAL decVal;
}
}
|
|
|