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
4
votes
1 answer

How do I invoke the MIDL compiler to generate a .TLB file (type library) from an .IDL file?

I am struggling with something seemingly super-simple: I'd like to use the MIDL compiler to generate a type library (.tlb file) from a .idl file. However, I just can't get MIDL to generate a .tlb file. This is my Foo.idl: import…
stakx - no longer contributing
  • 83,039
  • 20
  • 168
  • 268
4
votes
2 answers

MIDL compile error: enum with "cy"

I have a simple IDL file which contains only one enum. One of the identifiers is cy. [ uuid(2642345F-F2AB-3600-8926-26E823800902), version(1.0), ] library MyLib { typedef[ uuid(a0b0aa7b-345f-4b3a-b88f-d6cdd048e205) ] enum Codes { …
athena
  • 5,579
  • 8
  • 30
  • 31
4
votes
1 answer

MIDL changes the Interface name

I have a COM dll , which is consumed by .NET applications using COM Inter-op. In one of the CoClasses , there is an Interface called IT6TrackData and it has one get property called TrackData From the IDL file: Interface IT6TrackData { [propget,…
user2101801
  • 719
  • 2
  • 8
  • 20
4
votes
1 answer

Midl compiler error: 2214

I've some problem with a project (an OCX): when I try to compile in release mode compilation stops with this message: "1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(1178,5): error MSB6006: "midl.exe"…
user3395535
4
votes
3 answers

How to produce both x86 and x64 code using MIDL?

How can I generate the code for both x86 and x64 using MIDL? I've created an IDL file in Visual Studio 2010, and when I compile the product as in x86 mode and afterwards in x64 I've got to "touch" the IDL file so it will regenerate the code relevant…
Dig
  • 3,850
  • 3
  • 27
  • 33
3
votes
3 answers

MIDL CoClass derived from Interface defined in the same file

Why can't I define an Interface in an idl file and then have a CoClass derive it in a library block within the same file when I am deriving said Interface from an Interface that I have defined in another Proxy Server project? [ object, …
user358186
3
votes
1 answer

Is there a way with MIDL to turn off C-style headers generation?

I have a simple .IDL file (iface.idl) which describes an IUnknown based interface: import "unknwn.idl"; [ uuid(80DFDD28-F033-431e-B027-CDD2078FC78A) ] interface ISunPathCalc : IUnknown { HRESULT Square([in, out] long * pVal); HRESULT…
ezpresso
  • 7,896
  • 13
  • 62
  • 94
3
votes
1 answer

How to use midlrt.exe to compile .idl to .winmd?

Background: I need to build a Windows Runtime Component as part of a system that's set up to use CMake to generate its build system. As a preparatory step I'm trying to build it on the command line. Starting with a bare-bones .idl file…
IInspectable
  • 46,945
  • 8
  • 85
  • 181
3
votes
1 answer

How to get the Interface ID (IID, i.e. the GUID) of an interface when importing a WinRT winmd?

Short version How to you get the interface identifier (IID) for an interface from a *.winmd file when using IMetadataImport? e.g. Windows.Globalization.ICalendar: {CA30221D-86D9-40FB-A26B-D44EB7CF08EA} Longer Version A good example is…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
3
votes
0 answers

Creating an IDL file from a DLL

I'm working on a VB6 graphical interface that make use of a DLL generated from a C code that makes use of __declspec(thread) variables. The problem is that because of a known limitation, it is not possible to dynamically link this dll in the VB6…
Beppe
  • 381
  • 2
  • 7
  • 15
3
votes
1 answer

What is a composable runtime class?

I'm experimenting with creating a simple xaml appilcation using C++/WinRT. I come from a WPF background where it is pretty common to have a base class that implements INotifyPropertyChanged and have other classes inherit from it. When I try to do…
Elad Maimoni
  • 3,703
  • 3
  • 20
  • 37
3
votes
3 answers

Any way to resolve C4772 errors without having to register DLLs?

I am maintaining a VS2010 project which has a number of cross-referenced COM libraries. I am trying to configure the project in such a way that it is buildable from a random workstation which has VS2010 installed. The workstation could be both 32…
galets
  • 17,802
  • 19
  • 72
  • 101
3
votes
1 answer

Issues Using Midl to create a .tlb from .idl "expecting a type specification"

I have been having a prolonged encounter with the beast known as COM Interop... I am currently trying to generate a .tlb from a .idl file generated by the OLE/COM Object Viewer. However when trying to run Midl.exe to compile it I get an…
Jambobond
  • 619
  • 3
  • 12
  • 23
3
votes
1 answer

Missing 'ammintrin.h' when compiling Hadoop on Windows?

UPDATE-2 I have updated the Windows SDK compilers and now have reduced the errors to 2. c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\intrin.h(26): fatal error C1083: Cannot open include file: 'ammintrin.h': No such file or…
A j
  • 1,069
  • 2
  • 16
  • 29
3
votes
1 answer

midl cannot find C preprocessor cl.exe

I am trying to compile my arith.idl file with midl. I am running windows 7 pro. Here is the command I launch in a powershell prompt: PS> 'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\midl.exe' .\arith.idl Microsoft (R) 32b/64b MIDL…
philippe
  • 2,949
  • 4
  • 20
  • 34
1
2
3
12 13