If I want to pass a structure defined in windows.h to one of method of a given interface then how can i do that in an IDL?
Suppose the structure be SECURITY_DESCRIPTOR which is Declared in Winnt.h; include Windows.h and my interface be
interface dummy { [helpstring("method ManageSecurity")]HRESULT ManageSecurity([in]SECURITY_DESCRIPTOR secDesc); }
Thanks in Ad开发者_StackOverflow社区vance.
I've ripped the following from one of our IDL files, you just need to do the same sort of thing.
typedef [helpstring ("64 bit large integer")] struct {
long dwLowDateTime;
long dwHighDateTime;
} FILETIME;
typedef [helpstring("WIN32_FIND_DATA structure")] struct {
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD dwReserved0;
DWORD dwReserved1;
unsigned char cFileName[_MAX_PATH];
unsigned char cAlternateFileName[ 14 ];
} WIN32_FIND_DATA;
You will just have to redefine the structures you need yourself in the same way.
精彩评论