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.
Questions tagged [midl]
186 questions
2
votes
1 answer
COM coclass implementing interface from another type library
I'm relatively new in COM, so appologies if this is a stupid question. I'm having a bunch of COM interfaces compiled into a type library A. This type library is a resource in one of the DLLs (a.dll) in my solution. In a separate type library (B)…

themik81
- 401
- 6
- 17
2
votes
1 answer
Including a C# Interface in a IDL Library
I have an interface define in C#, for example:
[ComVisible(true), Guid("E37EBA3C-FB2E-4D4A-8A90-F6FAA99E85C9")]
public interface TestClass
{
public void test_function();
}
I want to include this in a library define in IDL. I tried to achieve…

swtdrgn
- 1,154
- 4
- 17
- 49
1
vote
0 answers
How can I force MIDL to output a CLSID for an empty coclass?
I have a declaration in the library block of my project's IDL file like so:
[uuid(...), helpstring(...)]
coclass MyClass;
The only interfaces this class implements are standard Microsoft-defined interfaces (such as IPersistPropertyBag2). If I…

Peter Ruderman
- 12,241
- 1
- 36
- 58
1
vote
3 answers
Why doesn't TlbImp import this COM interface for DIA correctly into .NET?
I tried to import Microsoft's DIA SDK for use with .NET:
call "%VS90COMNTOOLS%\vsvars32.bat"
midl /I "%VSINSTALLDIR%\DIA SDK\include" "%VSINSTALLDIR%\DIA SDK\idl\dia2.idl" /tlb dia2.tlb
tlbimp dia2.tlb
Which seems to work correctly for the most…

user541686
- 205,094
- 128
- 528
- 886
1
vote
1 answer
Separate MIDL project in Visual Studio
I'm trying to make separate project for generated files from midl compiler.
I have .idl file with rpc definitions. Midl compiler generates two files. For server and for client. And I need to add symbols from generated files to other projects.
My…

userbb
- 2,148
- 5
- 30
- 53
1
vote
0 answers
How to set up a C++/WinRT class that accepts Win32 structs as method parameters
I'm creating a desktop C++/WinRT project, and I'd like to declare a runtime class, using MIDL 3.0, that accepts certain Win32 types as method parameters. For example, structs like PROPERTYKEY.
This isn't possible, however, as those aren't MIDL…
user21528254
1
vote
0 answers
“operation not supported” when invoking an RPC call on Windows 2008
The application uses Microsoft RPC for interprocess communications. The application works flawlessly on Windows Server 2003 (Server WS2003 or WS 2008 --- Client WS2003). But the application fails when the client is on Windows Server 2008.
Here is…

mistr47
- 61
- 5
1
vote
0 answers
MIDL not allowing pointers?
I am attempting create a C++ projection in C# using MIDL. According to this: https://learn.microsoft.com/en-us/windows/win32/rpc/reference-pointers MIDL allows pointers so in my .idl file I have defined as such:
namespace TestComponent {
…

Zen
- 115
- 7
1
vote
1 answer
Microsoft MIDL compiler code cannot be compiled by C++ Builder clang compiler
I have a legacy project where a MSVC-compiled Windows service accepts communications over RPC from a C++Builder-compiled Windows service. MSVC's MIDL compiler produces some C code to enable the RPC communications. I'm updating from BCB v6 to BCB…

AndyB
- 162
- 8
1
vote
3 answers
Weird IDL error after migration to VS2010
Here's a very simple IDL interface that we've used successfully under VS2008 (arguments list shortened for brevity):
interface Mailer
{
string findNode( [in] string requestedNode );
unsigned short addMessage( [in] string msg, [in] unsigned…

Serge Wautier
- 21,494
- 13
- 69
- 110
1
vote
1 answer
MIDL error when importing windows.storage.idl
I'm trying to write some MIDL in visual studio to define an interface I want to play with for some windows runtime research. The interface I want to use has some methods that take IStorageItem and IStorageFolder parameters, and I noticed these were…

Phill Jarvis
- 11
- 1
1
vote
2 answers
Why C++/WinRT requires IDL files for XAML?
For C#, XAML transpiles to .cs (*.g.cs) files and needs no IDL files.
Similarly in C++, why can't XAML be transpiled to .cpp (*.g.cpp) files? Why does it need any IDL files at all?
I don't understand.

learningXAML
- 11
- 1
1
vote
1 answer
64-bit managed process: out-of-proc 32-bit COM server non-default interfaces not available
I am migrating an Excel add-in originally written in VB6 to managed code and 64-bit Excel. The add-in interoperates with some legacy 32-bit COM DLL servers through COM surrogates, and an issue has been encountered where only methods and properties…

R.J. Dunnill
- 2,049
- 3
- 10
- 21
1
vote
0 answers
Do we have an MIDL RPC code generator for Java?
I am working on a legacy code that is written C. The application is a client-server application built using the X/Open RPC specification using IDL's to generate client/server stubs (similar to a MIDL compiler). I am looking for a method/tool to…

Karthik
- 11
- 1
1
vote
1 answer
How to compile a .dll for MSHTML v9. I'm currently getting 100s of "MIDL 2035: constant expression expected" errors
I'm a .net developer and I'm trying to compile a .tbl and .dll for MSHTML v9 for use in my .net applications.
I found the following instructions for building a MSHTML v8 .dll:
start menu -> Windows SDK 7.1 Command Prompt
cd c:\temp
midl…

MCM
- 33
- 3