|
-
December 3rd, 1999, 06:11 PM
#1
Converting from IStorage to IDispatch
I am trying to pass an OLE object through an OCX. I am fairly new to COM, and I am having trouble with converting from C++ to VB. With c++ I return an IStorage object (as an IUnknown* in a Variant) then create the ole object based on the IStorage that has the bytes of the OLE object. I use OleLoad, OleCreate, IAdviseSunk, IClientSite... in order to create the object and it works fine. The problem is in VB I believe that the OLE objects are built on IDispatch and I can't see how to convert from IStorage or IStream to IDispatch, Any hints. I can't just QueryInterface for IDispatch from the IStorage or the IOleObject.
What is the storage that OleObjects in VB are built on?
-
January 26th, 2000, 02:21 PM
#2
Re: Converting from IStorage to IDispatch
In case anyone is interested.
You can create a container in the OCX code and call OleRun(IOleObject*). Then call QueryInterface for the IDispatch from the IOleObject. The key to automation is having the application server running.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|