Questions tagged [midl]

MIDL (Microsoft Interface Definition Language) is a text-based interface description language by Microsoft, based on the DCE/RPC IDL which it extends for use with the Microsoft Component Object Model. Its compiler is also called MIDL.

186 questions
0
votes
1 answer

Custom media effect in Win10 Universal App

I'm developing an Universal Windows App that uses the camera and I need to create a custom effect for the camera. The app is written in C# and the effect is a C++ DLL that uses Media Foundation and an IDL to define a custom WinRT component. I…
cedrou
  • 2,780
  • 1
  • 18
  • 23
0
votes
1 answer

Microsoft MIDL does not report an error if a typedef uses an unknown type, is it a bug?

I would like to know whether I am missing something: //this is test.idl typedef foo foo_t; // end of test.idl When I compile test.idl with the following command: midl /W4 test.idl I get this output Microsoft (R) 32b/64b MIDL Compiler Version…
Alessandro Jacopson
  • 18,047
  • 15
  • 98
  • 153
0
votes
1 answer

Why do I get an extra GUID type definition when compiling and importing bits.idl?

I'm writing some .NET code against the COM BITS API. I found the bits.idl file under windows kits, and did midl bits.idl, which gave me bits.tlb. I then ran tlbimp bits.tlb and got BackgroundCopyManager.dll. Everything is as expected in this…
Jay Carlton
  • 1,118
  • 1
  • 11
  • 27
0
votes
0 answers

Function pointer typedef only allowed once in MIDL?

Here is a simple test. The function pointer type FN_t appears twice in ITest::Test & ITest::Test2. import "oaidl.idl"; import "ocidl.idl"; typedef void(* FN_t)(); [ uuid(f5d5eb17-45c7-4cce-a176-9ed2e1083d2a), object, local, …
YOUKU
  • 13
  • 4
0
votes
1 answer

[MIDL]How to use interfaces declared in c/c++ headers in idl files?

ID2D1RenderTarget is an interface defined in d2d1.h. I want to use it in my IDL interface like this: interface IXXX : IUnknown { HRESULT XXX([out, retval] ID2D1RenderTarget **_ppRT); } d2d1.idl is not included in the SDK and I can only get…
YOUKU
  • 13
  • 4
0
votes
1 answer

"version" attribute in Microsoft IDL

My question is: what is the correct usage of the version tag in an IDL file that defines COM interfaces and classes and enums? The MSN documentation of it is confusing: the first paragraph under "Remarks" seems to clearly say that the IID must be…
M.M
  • 138,810
  • 21
  • 208
  • 365
0
votes
1 answer

E_INVALIDARG exception passing a SAFEARRAY of UDT from Managed to COM

a similar problem is posted many times here but I cannot figure out why I get this COM Exception. I have an IDL file like: typedef [uuid(A6F30630-53F5-4688-829A-C084BA1C7DC0)] enum EMaskActions { .... }EMaskActions; typedef…
Barzo
  • 1,039
  • 1
  • 11
  • 37
0
votes
1 answer

Windows C - Pass pointer by reference to dynamic allocated memory of unsigned char with MIDL Protocol

I'm using MIDL protocol(RPC) and i trying to pass pointer by reference to an allocated memory of unsigned char. but only the first attribute of the array filled with the correct value. MIDL CODE: // File FPGA_RPC_MIDL.idl [ // A unique…
oshribm
  • 145
  • 1
  • 7
0
votes
2 answers

What causes name collision in an IDL file?

We have an idl file with multiple interfaces defined, two of which have someting like this: [ object, uuid(79E24BAA-DC12-4caf-91DD-2A4D47FED30A), helpstring("ISomeInterface Interface"), pointer_default(unique) ] interface…
John C
  • 611
  • 1
  • 9
  • 26
0
votes
1 answer

How to fix Typelib generated by MIDL?

I am trying to generate typelib of INetCfg interface using IDL in this page, seen below: import "netcfgx.idl"; [ uuid(d99085ff-c5d7-4a4c-a987-91a513e268a9), version(1.0), helpstring("NetCfgX 1.0 Type Library") ] library…
swdev
  • 4,997
  • 8
  • 64
  • 106
0
votes
1 answer

Convert IDL structure with conformant array to header

I need to pass via Microsoft RPC structure with conformant array. This is how I write it in IDL: struct BarStruct { byte a; int b; byte c; long lArraySize; [size_is(lArraySize)] char achArray[*]; }; Generated header: struct BarStruct { …
vico
  • 17,051
  • 45
  • 159
  • 315
0
votes
1 answer

Pass structure via Microsoft RPC

I got error while I was tying to pass structure from RPC client to server. Client calls Output3 procedure. Definition in IDL: struct BarStruct { byte a; int b; byte c; char* d; char* ddd; }; void Output3([in] handle_t hBinding, [in, out]…
vico
  • 17,051
  • 45
  • 159
  • 315
0
votes
1 answer

Purpose of CINTERFACE flag in midl generated files?

Using Microsoft's IDL compiler, if I do this: midl a.idl /iid iid.cpp I can't compile iid.cpp on MinGW because of the following warning: c:\mingw\bin\../lib/gcc/mingw32/4.6.2/../../../../include/rpcproxy.h:14:2: warning: #warning "rpcproxy type…
0xbe5077ed
  • 4,565
  • 6
  • 35
  • 77
0
votes
1 answer

Weird namespace addition when importing a typelib

I want to add a method accepting IStream* to my COM interface. Here's the idl excerpt: import "oaidl.idl"; import "ocidl.idl"; import "objidl.idl";//IStream is declared in this .idl file [ uuid(uuidhere), version(1.0) ] library MyLibrary { …
sharptooth
  • 167,383
  • 100
  • 513
  • 979
0
votes
0 answers

COM OLE_HANDLE type mismatch in generated C# interop DLL

I have inherited a Microsoft Visual C++ COM project which is a dependency of a core C# application I work with. When recompiling the project and regenerating the interop DLL (using tlbimp), several methods in my library that take in an OLE_HANDLE…
Henry Thacker
  • 63
  • 1
  • 5
1 2 3
12
13