tags:

views:

39

answers:

1

Hello. 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

+1  A: 

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
I'm trying but but geterror 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?
MaxFX
Thank's for help.
MaxFX
Does it work? I can create a new ATL project form scratch if that helps.
Rob
Yes, it works in VS08 but doesn't works in VS2010.
MaxFX
Ahhh. Sadly I cannot help you with VS2010.
Rob