Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

COM interface method!

Nad__AfNad__Af Member Posts: 22
[b][red]This message was edited by Nad__Af at 2004-6-10 23:3:55[/red][/b][hr]
[b][red]This message was edited by Nad__Af at 2004-6-10 22:56:16[/red][/b][hr]
hello:
I need help on creating a COM interface. I know that "FileDialog" is a COM Interface (resides in MSO.DLL) and its GUID is "{000C0362-0000-0000-C000-000000000046}", I also know that it has a method called "Execute."
[b]How can I invoke "Execute" in my VC++ application? [/b]

After adding FileDialog to Project from MSO.DLL type library (.tlb) I tried the following but it doesn't work.

[code]
if (FAILED(CoInitialize(NULL)))
{
AfxMessageBox ("COM Library failed");
AfxAbort();
}

m_Dlg = new FileDialog;
CLSID CLSID_Lic;
::CLSIDFromString( L"{000C0362-0000-0000-C000-000000000046}", &CLSID_Lic);

m_Dlg->CreateDispatch (CLSID_Lic); [green]//doesn't create !!!! [/green]

[/code]





Sign In or Register to comment.