Here is a test IDL file:
import "unknwn.idl";
[uuid(f531223f-43bb-49d4-80fc-30ceb5f4f990)]
coclass test
{
interface Itest;
}
[uuid(deb8730f-f811-4cb3-bd8f-b1601926bd48)]
interface Itest : IUnknown
{
HRESULT function(int var);
};
When I run midl test.idl
command it does not add the CLSID in test.h
header file. But WIDL from mingw-w64 (derived from wine project) adds CLSID and IID both in header file.
After using library attribute as this:
import "unknwn.idl";
[uuid(82c87f04-887a-41b2-9c2d-0f3a6a973efd)]
library testLib
{
[uuid(f531223f-43bb-49d4-80fc-30ceb5f4f990)]
coclass test
{
interface Itest;
}
};
[uuid(deb8730f-f811-4cb3-bd8f-b1601926bd48)]
interface Itest : IUnknown
{
HRESULT function(int var);
};
Those GUIDs are embraced in C++ and EXTERN_C. And mentioned in separate C file but not in the header file.
How can I do the same with MIDL? Or am I doing anything wrong in IDL file?