1

I have interface in ATL project which must contains member with parameter of Scripting::IDictionary** but in MIDL file with description of my interface it's not possible because Scripting library is not presented in default library. I always have scrrun.tlb and trying to use it in MIDL but it's not work

Code is here: midl-code

shadeglare
  • 7,006
  • 7
  • 47
  • 59

1 Answers1

1

Add the following to your IDL:

importlib("scrrun.dll");

Then you can use IDictionary.

Works for me on XP and up.

Here is a snippet of some of my IDL:

import "oaidl.idl";
import "ocidl.idl";

library FooLib
{
    importlib("stdole2.tlb");
    importlib("scrrun.dll");

    [
        uuid(XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX),
        helpstring("_FooLibEvents Interface")
    ]
    dispinterface _IFooEvents
    {
        properties:
        methods:
        [id(1)] void AnEvent(IDictionary* dict);
    };
    ...
}
Rob
  • 76,700
  • 56
  • 158
  • 197
  • I'm trying but but get error MIDL2025: syntax error : expecting a type specification near "IDictionary" error MIDL2026: cannot recover from earlier syntax errors; aborting compilation. Would You show me working code? – shadeglare May 24 '10 at 06:41
  • Does it work? I can create a new ATL project form scratch if that helps. – Rob May 24 '10 at 08:05
  • Ahhh. Sadly I cannot help you with VS2010. – Rob May 24 '10 at 21:10