COM without access to typelib?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

COM without access to typelib?

Nick Payne-3
I've been playing around with the IMAPI cd burning interface in WinXP. I can
get it working in a C++ program, but the typelib doesn't seem to be
available for Dolphin to work with. IMAPI.EXE, which is the service, doesn't
contain the COM interface (even the OLEVIEW.EXE from the MS Platform SDK
can't find it, so I'm damned if I know where it is hidden), and if I attempt
to use the Prog Id to create an instance by evaluating

tlb := (IDispatch createObject: 'IMAPI.MSDiscRecorderObj.1') typeInfo
typeLib

it churns away for a while and I then get a walkback stack saying 'No such
interface supported', the failure being on the call to
IClassFactory>>CreateInstance:riid:ppvObject:

I've never tried using COM from Dolphin before. Any suggestions on where to
go from here?

Nick


Reply | Threaded
Open this post in threaded view
|

Re: COM without access to typelib?

Blair McGlashan
"Nick Payne" <[hidden email]> wrote in message
news:[hidden email]...
> I've been playing around with the IMAPI cd burning interface in WinXP. I
can
> get it working in a C++ program, but the typelib doesn't seem to be
> available for Dolphin to work with. IMAPI.EXE, which is the service,
doesn't
> contain the COM interface (even the OLEVIEW.EXE from the MS Platform SDK
> can't find it, so I'm damned if I know where it is hidden), and if I
attempt

> to use the Prog Id to create an instance by evaluating
>
> tlb := (IDispatch createObject: 'IMAPI.MSDiscRecorderObj.1') typeInfo
> typeLib
>
> it churns away for a while and I then get a walkback stack saying 'No such
> interface supported', the failure being on the call to
> IClassFactory>>CreateInstance:riid:ppvObject:
>
> I've never tried using COM from Dolphin before. Any suggestions on where
to
> go from here?

I wish I could help, but it seems that MS have chosen to supply neither the
IDL nor a typelib for IMAPI. This is despite the fact that the platform SDK
documentation
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/hardware/i
mapi_7a3t.asp) mentions the use of the "smart points from an import" (which
refers to the VC++ type library import capability). This is all the more
annoying when one looks at the imapi.h header file in the Platform SDK and
sees that it has been written by MIDL from imapi.idl.

If you can beg/borrow/steal imapi.idl from somewhere, then a typelib that
Dolphin can use can be generated from it using the command line that appears
in imapi.h, probably "midl /Oicf imapi.idl"

Failing that you have two options:
1) Construct it all by hand - this is possible, but tediout and error prone.
Nevertheless this is the way we originally defined all the COM interfaces
and structures for Direct-X 3.
2) Construct IDL from the .h. This is not as hard as it sounds, since IDL is
essentially C syntax with extra attributes - see
http://www.object-arts.com/wiki/html/Dolphin/CreatingTLBfromaCheaderFile.htm

Regards

Blair