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

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 struct2 : MYSTRUCT { float y; }; but the compiler…
sreyas
  • 133
  • 1
  • 8
3
votes
1 answer

midl error MIDL2379

We have a c++ library and we are auto generating COM interface for that library. so I auto generated the IDL file and everything was working fine. But over time when more interface were added to COM, We started getting the error 1> Total Format…
Naveen
  • 31
  • 3
3
votes
2 answers

MIDL marshaling array of structures using size_is in unmanaged c++

I’m trying to retrieve an array of structures through a COM interface. It works when the number of structures is 1. When the number of structures is greater than 1, only the first structure is marshaled correctly. The remaining structures in the…
Ken
  • 427
  • 4
  • 20
3
votes
2 answers

How to force MIDL compiler to use "C++ mode" instead of "C mode" in Visual Studio 2010?

My problem is simple, but I don't know how to resolve it: I have a Visual Studio 2010 project with idl files for generating COM type library. This project was originally created by VC++ 6.0. The VC 6.0 could compile this project without any error.…
user2218825
2
votes
2 answers

VB6's Boolean data type equivalent in MIDL

Which MIDL data type is equal to the VB6's Boolean type?
ezpresso
  • 7,896
  • 13
  • 62
  • 94
2
votes
2 answers

How do I write a COM dll?

To better myself I am attempting to make my dll's COM compliant, I thought I'd just need to extend/implement a few interfaces and job done but now I am at a cross roads, 1) Should I learn MIDL? 2) Should I install the ATL (I am running…
John
  • 6,433
  • 7
  • 47
  • 82
2
votes
0 answers

What is the difference between new and old type library (TLB) format?

I just cannot find any explanation about the difference between new TLB file format and old TLB file format. This option is available for Visual Studio C++ projects, under Midl compiler options. In the project file (.vcxproj), the option looks like…
sɐunıɔןɐqɐp
  • 3,332
  • 15
  • 36
  • 40
2
votes
0 answers

Can you change the output directory for C++ WinRT generated headers?

Is there a way to change the output directory for the files generated by the midl stuff in C++ WinRT projects (The default seems to be ${ProjectDir}\Generated Files)? The reason I'm asking is because I have a solution with many WinRT components and…
monoceres
  • 4,722
  • 4
  • 38
  • 63
2
votes
0 answers

How to get the DisplayName of the package in C++/WinRT?

i would like to get the DisplayName of the package in C++/WinRT. As describe in this C# example:
2
votes
0 answers

MIDL unresolved type declaration: IAsyncOperation

In my C++/WinRT project I use below MIDL code to declare an asynchronous method returning a Windows::Foundation::IInspectable object. namespace myproject { [default_interface] runtimeclass FileRetriever { FileRetriever(); …
Thomas Flinkow
  • 4,845
  • 5
  • 29
  • 65
2
votes
1 answer

Get IDL code from TypeLibrary programmatically

I am writing code to perform the following steps; Register a .net .dll and generate a .tlb using regasm.exe Register a .net .dll and generate a .tlb using regasm.exe Generate the IDL code from the typeLibrary and store it in a file. Edit the IDL…
Jambobond
  • 619
  • 3
  • 12
  • 23
2
votes
1 answer

Implementing ABI::Windows::Foundation::Collections::IVector gives - Error C2338 This interface instance has not been specialized by MIDL

I'm trying to implement IVector in a win32 app. Compiler always gives me this MIDL assert error which I can not get rid of. Here is sample class - #include #include #include #include…
2
votes
1 answer

How to use the TemplatePart attribute on a custom control?

I started developing a UWP XAML custom control using the new C++/WinRT language projection. I got the basic structure right, but I'm stuck when it comes to defining the TemplatePartAttribute attribute. In C#, and even C++/CX, this is pretty much…
Florian S.
  • 206
  • 1
  • 5
2
votes
1 answer

Why does UDT / struct with missing type information cause silent launch failure in vb6?

Consider this registered type library in a DLL: [uuid(…), version(1.0)] library structLib { importlib("stdole2.tlb"); [uuid(…)] typedef struct MyStruct { BSTR m_sStr; } MyStruct; }; In vb6 I can reference this type…
Aurora
  • 1,334
  • 8
  • 21
2
votes
1 answer

Are aggregated objects forced to be an IUnknown reference?

I am trying to implement shared logic using COM aggregation with ATL. I've defined a base class, called CameraBase, that is only available through aggregation. Therefor I've added the aggregateable annotation to it's coclass-declaration. [ …
Carsten
  • 11,287
  • 7
  • 39
  • 62
1 2
3
12 13