C++ IStream,Delphi and vb is ?

DLL Edition of the F-IN-BOX
skygz
Posts: 6
Joined: Sat Aug 26, 2006 4:07 pm
Contact:

C++ IStream,Delphi and vb is ?

Postby skygz » Sun Aug 27, 2006 9:50 am

HRESULT WINAPI GlobalOnLoadExternalResourceHandler(LPCSTR lpszURL, IStream** ppStream)

C++ API

to delphi and vb API???

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Sun Aug 27, 2006 12:56 pm

IStream is defined in Delphi, see ActiveX.pas:

Code: Select all

  IStream = interface(IUnknown)
    ['{0000000C-0000-0000-C000-000000000046}']
    function Read(pv: Pointer; cb: Longint; pcbRead: PLongint): HResult;
      stdcall;
    function Write(pv: Pointer; cb: Longint; pcbWritten: PLongint): HResult;
      stdcall;
    function Seek(dlibMove: Largeint; dwOrigin: Longint;
      out libNewPosition: Largeint): HResult; stdcall;
    function SetSize(libNewSize: Largeint): HResult; stdcall;
    function CopyTo(stm: IStream; cb: Largeint; out cbRead: Largeint;
      out cbWritten: Largeint): HResult; stdcall;
    function Commit(grfCommitFlags: Longint): HResult; stdcall;
    function Revert: HResult; stdcall;
    function LockRegion(libOffset: Largeint; cb: Largeint;
      dwLockType: Longint): HResult; stdcall;
    function UnlockRegion(libOffset: Largeint; cb: Largeint;
      dwLockType: Longint): HResult; stdcall;
    function Stat(out statstg: TStatStg; grfStatFlag: Longint): HResult;
      stdcall;
    function Clone(out stm: IStream): HResult; stdcall;
  end;


This function should be something like this in Delphi:

Code: Select all

function GlobalOnLoadExternalResourceHandler(lpszURL: PAnsiChar; out pStream: IStream): HResult; stdcall;
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html


Return to “DLL Edition”

Who is online

Users browsing this forum: No registered users and 16 guests