English 中文(简体)
how to pass a windows structure to a method defined in an interface of an IDL file?
原标题:
  • 时间:2010-02-12 09:25:11
  •  标签:
  • idl

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 Advance.

最佳回答

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.

问题回答

暂无回答




相关问题
How to let idlj compile idl files in ant

I ve no idea how to compile my idl files with the sun-idl compiler (idlj) with the help of ant? Does anyone have an idea?

Struct inheritance in MIDL

I am trying to inherit from and extend a structure defined in MIDL. I used the same syntax as for interface inheritance i.e typedef struct stDBIBinVarDataEx { float x; } MYSTRUCT ; struct ...

multiple Thrift services on one transport

Just seeking confirmation here : apache Thrift protocol does not seem to support running multiple services on one transport endpoint ? ( a socket, file, whatever ) I cant seem to figure out how to do ...

ctags generator for CORBA IDL?

I work in a multi-language environment and use Vim + ctags for navigating the code. However we also use CORBA and exuberant ctags does not parse IDL files. Does anyone know of a ctags compatible ...

Properly extending a COM interface (IDL)

I am working with some legacy c++ code and I need to extend an interface. The current interfaces are for example: [ object, uuid(guid), version(1.0), dual, nonextensible, oleautomation ] ...

Notepad++ IDL Syntax Highlighting? [closed]

I was about to create a user-defined language file for Notepad++ to syntax-highlight IDL (Interactive Data Language). But before I went and spent the time creating one, I wanted to check with the &...

热门标签