PowerBuilder Forum

Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: IStream
rob


Newbie

Status: Offline
Posts: 1
Date:
IStream


How can I use an IStream C++ interface from PB? 

I'm trying to use a C++ COM DLL which provides a Load function taking IStream as parameter. I'm trying to get the stream from a Database OLE object and then pass it to the function, but the OLE stream seems not being recognized:

ole_Stream = CREATE OLEObject

 

ole_Stream.ConnectToNewObject( "ADODB.Stream" )

ole_Stream.Open()

ole_Stream.Type = 1

....

ole_DLL.Load( ole_Stream )         

this fails, because ole_Stream here seems not compatible with IStream.

 

The method declaration in the C++ DLL is:

STDMETHODIMP ThirdPartyDLL::Load(IStream * pStm)

(the parameter is a pointer to an IStream object)

It works perfectly in VisualBasic.

 



__________________
Page 1 of 1  sorted by
Quick Reply

Please log in to post quick replies.

Tweet this page Post to Digg Post to Del.icio.us


Create your own FREE Forum
Report Abuse
Powered by ActiveBoard