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
0 answers

MIDL passing by reference

Backstory: I'm working on bridging a 64 bit process to a 32 bit DLL using a COM object. Why? Good question. It's not currently feasible to recompile all the x86 source to x64, unless there's absolutely no way around it...enter IPC. I know it's not…
P-Squiddy
  • 65
  • 1
  • 13
0
votes
1 answer

Use Windows::Foundation namespace interfaces in midl

I want to use interfaces defined in Windows::Foundation in my midl file. For that I wrote following sample code, but it gives compile error: Error MIDL2011 unresolved type declaration : IStringable [ Parameter 'param2' of Procedure…
miradham
  • 2,285
  • 16
  • 26
0
votes
1 answer

Remote Procedure Call and MIDL: How to implement function with [out] attribute?

I'm writing server and client using Interface Definition Language and Remote Procedure Call in C++. I can send data from client to server with [in] attribute. Now I want server to send data back to client. But I failed receiving correct data. I…
tianhuaf
  • 7
  • 5
0
votes
1 answer

Remote Procedure Call (RPC) in C++: Can multiple Clients listen to one server when endpoint is hard coded?

I'm writing a simple server-client using MIDL and RPC to allow file transferring. It works when endpoint is hard coded as follow: server side status = RpcServerUseProtseqEp( reinterpret_cast("ncacn_ip_tcp"), …
tianhuaf
  • 7
  • 5
0
votes
2 answers

No type definitions in pre-defined IDL FILE

Firstly, Using plain C++, without ATL, MFC attempting to use COM Object interface. Using oleview (OLE/COM Object viewer) - used to engineer the IDL code. At this stage, using MIDL Compiler, now I'm having trouble trying to produce the…
Aaron
  • 2,823
  • 9
  • 44
  • 57
0
votes
1 answer

MIDL import keyword generates to much compiler output

Each import in .idl file generate following output: 64 bit Processing file.idl Because of that I have two pages of output for every idl file processed. Is there any way to reduce this flood? Ideal for me is that same what c++ compiler do - only one…
Beetle
  • 179
  • 3
  • 10
0
votes
1 answer

Accessing an ITypeInfo that references an ITypeInfo from an importlib-ed unregistered type library causes TYPE_E_CANTLOADLIBRARY error

I am using the Automation API from .NET (System.Runtime.InteropServices.ComTypes) to inspect a type library Bar.tlb that I generated myself (see below). This type library declares an interface IBar which inherits from interface IFoo which is defined…
stakx - no longer contributing
  • 83,039
  • 20
  • 168
  • 268
0
votes
0 answers

How to reference an external typelib from an interface defined for proxy/stub generation

I have an interface IFoo that references the Office typelib MSO.DLL. I want the proxy/stub code (dlldata.c) to be generated for my interfaces when my IDL is compiled. As I understand it, in order for midl.exe to produce the proxy/stub code, the…
Michael Gunter
  • 12,528
  • 1
  • 24
  • 58
0
votes
2 answers

Are Visual Studio 6 typelibs handled differently in Visual Studio 2008 under Vista and 7?

I have written a standard DLL in Visual Studio 6 C++. I have also written a typelib to go with it so that it can be used directly in VB6 rather than via Declare. It works fine in VB6 under Windows XP. What doesn't work is when I take the DLL and…
bugmagnet
  • 7,631
  • 8
  • 69
  • 131
0
votes
0 answers

REGDB_E_CLASSNOTREG in COM Tutorial (Pluralsight)

I'm trying to teach myself the fundamentals of COM, and to that end I'm following along with Kenny Kerr's "The Essentials of COM" course on Pluralsight. I'm currently stuck in the "Remoting" section of part 2, specifically the video titled "Demo:…
Jakotheshadows
  • 1,485
  • 2
  • 13
  • 24
0
votes
1 answer

Can an existing plain C++ class implement IDL interface without turning into a COM class?

I have a COM object, CProvider, implemented using ATL. This class encloses another class, CProviderInfo, and maintains a static vector of objects of this inner class type. Here's how it looks like: //------------- //…
Ahmed A.Hamid
  • 258
  • 1
  • 2
  • 12
0
votes
0 answers

MIDL error MIDL2337: unsatisfied forward declaration : _Bool

How can trying to build a COM in Visual studio2015 with the following code. MIDL: error MIDL2337: unsatisfied forward declaration: _Bool Error of me will fail out. import "oaidl.idl"; import "ocidl.idl"; #include #include…
tome119
  • 33
  • 6
0
votes
1 answer

SAFEARRAY type not known when compiling using MIDL

My ODL file looks like this: import "oaidl.idl"; import "ocidl.idl"; [oleautomation, uuid(/* redacted */)] interface ISomething : IUnknown { HRESULT DoSomething( [in]BSTR User, [in]VARIANT Object, [in]SAFEARRAY Array …
Mr. Boy
  • 60,845
  • 93
  • 320
  • 589
0
votes
1 answer

Managing definitions in a COM type library with a lot of IDL interfaces

I'm creating a COM type library with over one hundred interfaces. Defining all of the interfaces and coclasses in a single library is unreasonable... the IDL file becomes thousands of lines long! So I'm trying the idea of putting each interface in…
sourcenouveau
  • 29,356
  • 35
  • 146
  • 243
0
votes
1 answer

C++/CX factory class to provide overloaded constructors with same number of arguments

I am new to C++/CX, IDL and WRL, and ran into a problem I am not sure if there is error in my code or it is the limitation of the design. I have an IDL that defines an IInspectable interface and its runtimeclass, along with a factory class that can…
DiamRem
  • 604
  • 1
  • 4
  • 9