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
14
votes
3 answers

How can I get MIDL to search additional include directories for qualified paths

Update: Just over six months after opening a support call to Microsoft it has been rejected, they claim it is not a bug (since the documentation doesn't explicitly say that the behaviour seen isn't the correct one). They rejected the DCR saying that…
Motti
  • 110,860
  • 49
  • 189
  • 262
13
votes
3 answers

How to read a winmd (WinRT metadata file)?

A WinMD is a binary medadata file, that contains everything you need to learn about namespaces, types, classes, methods, parameters available in a native WinRT dll. From Windows Runtime design: The Windows Runtime is exposed using API metadata…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
13
votes
2 answers

Upgrading VS2017 from 15.4.1 to 15.5.1 resulted in build error

I'm programming with the following tools/versions: Windows 10 / VS2017 Professional / C++ After I upgraded to 15.5.1 I got the following error: MIDL2338: switches are contradictory - no_robust vs. - target The Microsoft compiler error description…
trishm
  • 133
  • 1
  • 7
8
votes
1 answer

How do I create a module defined function in a COM Type Library

The VBE7.dll type library used by VBA, has the following MIDL for the Conversion module: [ dllname("VBE7.DLL"), uuid(36785f40-2bcc-1069-82d6-00dd010edfaa), helpcontext(0x000f6ebe) ] module Conversion { [helpcontext(0x000f6ea2)] BSTR…
ThunderFrame
  • 9,352
  • 2
  • 29
  • 60
5
votes
2 answers

Invoke MIDL compiler from CMAKE

I am going to use MIDL compiler with CMAKE but unable to invoke MIDL compiler from CmakeList That is command which I use to achieve my goal add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/IFace.h ${CMAKE_CURRENT_BINARY_DIR}/GUIDS.c…
definename
  • 193
  • 1
  • 12
5
votes
1 answer

Importing interfaces in IDL from an external type library

I have two type libraries with COM interfaces that I wrote using ATL and Microsoft's IDL. I would like an interface in one library to inherit from an interface in the other. Essentially, I would like to do the same thing that Steven described at How…
sourcenouveau
  • 29,356
  • 35
  • 146
  • 243
5
votes
1 answer

Consecutive interface function IDs

I have a COM object interface in midl like interface InterfaceName : IDispatch { [id(1)] HRESULT FunA(...); [id(2)] HRESULT FunB(...); [id(3)] HRESULT FunC(...); } Are the ids required to be consecutive? Or can I define it like interface…
chrizke
  • 458
  • 3
  • 10
5
votes
2 answers

MIDL generates the same file for /env win32 and /env win64

In Visual Studio, when you compile foo.idl, MIDL generates the proxy information in foo_p.c. Unfortunately, for Win32 and x64 files, it uses the same filename. For Win32, the file starts with: #if !defined(_M_IA64) && !defined(_M_AMD64) For x64,…
Roger Lipscombe
  • 89,048
  • 55
  • 235
  • 380
5
votes
1 answer

What do you do when MIDL can't create a tlb?

I am attempting to create a C# inproc server for sbtsv.idl (it is included with the Windows 8 SDK). Almost every instructions I find tell you to use MIDL to create a .tlb file then tlbimport to create the proxy dll. However, if the IDL does not…
Scott Chamberlain
  • 124,994
  • 33
  • 282
  • 431
5
votes
1 answer

Getting IDL (for TLB) from a COM+ dll when it is not provided

I have a .dll that contains some directshow filters (COM) with specific/custom interfaces to query. Most 3rd party directshow components contain embedded .tlb files that can be used for cross-enviroment communication (C# typelib import). I would…
Paul Knopf
  • 9,568
  • 23
  • 77
  • 142
5
votes
2 answers

Any sense in marking an IUnknown-derived interface as dual in IDL?

Reviewing our code I've found a curious definition in one of .idl files: [ object, uuid(uuidhere), dual, nonextensible, oleautomation, hidden ] interface IOurInterface : IUnknown { //methods here }; How can an interface…
sharptooth
  • 167,383
  • 100
  • 513
  • 979
5
votes
2 answers

MIDL changes case of identifier when compiling IDL file

I've got a snippet of IDL that looks like this: [ object, uuid(...), pointer_default(unique) ] interface IVirtualMachine { /* ... */ } [ object, uuid(...), pointer_default(unique) ] interface IVirtualServer : IUnknown { HRESULT…
Roger Lipscombe
  • 89,048
  • 55
  • 235
  • 380
4
votes
2 answers

What is stdole2.tlb

stdole32.tlb contains all base type definitions, and every lib must import it, if we use MIDL. But when I created ATL DLL project, lib file looks like that import "oaidl.idl"; import "ocidl.idl"; [ uuid(4CA3ADAD-AE53-4D80-AF26-176BAF8223B1), …
Alecs
  • 2,256
  • 8
  • 32
  • 45
4
votes
1 answer

VS2008 C++ compiler keeps asking to build the project

Possible Duplicate: Visual studio keeps building everything I have a project that includes an idl file that generates a .c file that is included in another file of the same project. I build this project and all is fine, I then try to run the…
4
votes
0 answers

Syntax error while converting IDL to C header

I am trying to get C header files for COM interfaces using OLE/COM object viewer. I have tries to save type library as header file in object viewer, however, after a cmd window flashes, nothing happens. I have tried to save it as IDL file and…
yasar
  • 13,158
  • 28
  • 95
  • 160
1
2 3
12 13