mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 13:39:36 +02:00
* Fix bug ID #29155, wrong declaration of ISTream.
git-svn-id: trunk@32820 -
This commit is contained in:
parent
b1ee3dd5e5
commit
6b3b3d5c0c
@ -276,16 +276,16 @@ type
|
||||
|
||||
IStream = interface(ISequentialStream)
|
||||
['{0000000C-0000-0000-C000-000000000046}']
|
||||
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 Seek(dlibMove: qword; dwOrigin: Longint;
|
||||
out libNewPosition: qword): HRESULT; stdcall;
|
||||
function SetSize(libNewSize: qword): HRESULT; stdcall;
|
||||
function CopyTo(stm: IStream; cb: qword; out cbRead: qword;
|
||||
out cbWritten: qword): HRESULT; stdcall;
|
||||
function Commit(grfCommitFlags: Longint): HRESULT; stdcall;
|
||||
function Revert: HRESULT; stdcall;
|
||||
function LockRegion(libOffset: Largeint; cb: Largeint;
|
||||
function LockRegion(libOffset: qword; cb: qword;
|
||||
dwLockType: Longint): HRESULT; stdcall;
|
||||
function UnlockRegion(libOffset: Largeint; cb: Largeint;
|
||||
function UnlockRegion(libOffset: qword; cb: qword;
|
||||
dwLockType: Longint): HRESULT; stdcall;
|
||||
function Stat(out statstg: TStatStg; grfStatFlag: Longint): HRESULT; stdcall;
|
||||
function Clone(out stm: IStream): HRESULT; stdcall;
|
||||
|
@ -1055,13 +1055,13 @@ type
|
||||
destructor Destroy; override;
|
||||
function Read(pv: Pointer; cb: DWORD; pcbRead: PDWORD): HResult; virtual; stdcall;
|
||||
function Write(pv: Pointer; cb: DWORD; pcbWritten: PDWORD): HResult; virtual; stdcall;
|
||||
function Seek(dlibMove: Largeint; dwOrigin: Longint; out libNewPosition: Largeint): HResult; virtual; stdcall;
|
||||
function SetSize(libNewSize: Largeint): HResult; virtual; stdcall;
|
||||
function CopyTo(stm: IStream; cb: Largeint; out cbRead: Largeint; out cbWritten: Largeint): HResult; virtual; stdcall;
|
||||
function Seek(dlibMove: LargeUint; dwOrigin: Longint; out libNewPosition: LargeUint): HResult; virtual; stdcall;
|
||||
function SetSize(libNewSize: LargeUint): HResult; virtual; stdcall;
|
||||
function CopyTo(stm: IStream; cb: LargeUint; out cbRead: LargeUint; out cbWritten: LargeUint): HResult; virtual; stdcall;
|
||||
function Commit(grfCommitFlags: Longint): HResult; virtual; stdcall;
|
||||
function Revert: HResult; virtual; stdcall;
|
||||
function LockRegion(libOffset: Largeint; cb: Largeint; dwLockType: Longint): HResult; virtual; stdcall;
|
||||
function UnlockRegion(libOffset: Largeint; cb: Largeint; dwLockType: Longint): HResult; virtual; stdcall;
|
||||
function LockRegion(libOffset: LargeUint; cb: LargeUint; dwLockType: Longint): HResult; virtual; stdcall;
|
||||
function UnlockRegion(libOffset: LargeUint; cb: LargeUint; dwLockType: Longint): HResult; virtual; stdcall;
|
||||
function Stat(out statstg: TStatStg; grfStatFlag: Longint): HResult; virtual; stdcall;
|
||||
function Clone(out stm: IStream): HResult; virtual; stdcall;
|
||||
property Stream: TStream read FStream;
|
||||
|
@ -1034,9 +1034,9 @@ begin
|
||||
Result := S_OK;
|
||||
end;
|
||||
|
||||
function TStreamAdapter.Seek(dlibMove: Largeint; dwOrigin: Longint; out libNewPosition: Largeint): HResult; stdcall;
|
||||
function TStreamAdapter.Seek(dlibMove: LargeUint; dwOrigin: Longint; out libNewPosition: LargeUint): HResult; stdcall;
|
||||
var
|
||||
newpos: Int64;
|
||||
newpos: QWord;
|
||||
begin
|
||||
if m_bReverted then
|
||||
begin
|
||||
@ -1058,7 +1058,7 @@ begin
|
||||
Result := S_OK;
|
||||
end;
|
||||
|
||||
function TStreamAdapter.SetSize(libNewSize: Largeint): HResult; stdcall;
|
||||
function TStreamAdapter.SetSize(libNewSize: LargeUint): HResult; stdcall;
|
||||
begin
|
||||
if m_bReverted then
|
||||
begin
|
||||
@ -1080,7 +1080,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
function TStreamAdapter.CopyTo(stm: IStream; cb: Largeint; out cbRead: Largeint; out cbWritten: Largeint): HResult; stdcall;
|
||||
function TStreamAdapter.CopyTo(stm: IStream; cb: LargeUint; out cbRead: LargeUint; out cbWritten: Largeuint): HResult; stdcall;
|
||||
var
|
||||
sz: dword;
|
||||
buffer : array[0..1023] of byte;
|
||||
@ -1129,13 +1129,13 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
function TStreamAdapter.LockRegion(libOffset: Largeint; cb: Largeint; dwLockType: Longint): HResult; stdcall;
|
||||
function TStreamAdapter.LockRegion(libOffset: LargeUint; cb: LargeUint; dwLockType: Longint): HResult; stdcall;
|
||||
begin
|
||||
Result := STG_E_INVALIDFUNCTION;
|
||||
end;
|
||||
|
||||
|
||||
function TStreamAdapter.UnlockRegion(libOffset: Largeint; cb: Largeint; dwLockType: Longint): HResult; stdcall;
|
||||
function TStreamAdapter.UnlockRegion(libOffset: LargeUint; cb: LargeUint; dwLockType: Longint): HResult; stdcall;
|
||||
begin
|
||||
Result := STG_E_INVALIDFUNCTION;
|
||||
end;
|
||||
@ -1190,9 +1190,9 @@ begin
|
||||
Check(FStream.Read(@Buffer, Count, @Result));
|
||||
end;
|
||||
|
||||
function TProxyStream. Seek(const Offset: int64; Origin: TSeekOrigin): int64;
|
||||
function TProxyStream.Seek(const Offset: int64; Origin: TSeekOrigin): int64;
|
||||
begin
|
||||
Check(FStream.Seek(Offset, ord(Origin), result));
|
||||
Check(FStream.Seek(Offset, ord(Origin), QWord(result)));
|
||||
end;
|
||||
|
||||
function TProxyStream.Write(const Buffer; Count: Longint): Longint;
|
||||
|
@ -299,17 +299,13 @@ type
|
||||
end;
|
||||
|
||||
IStream = interface(ISequentialStream) ['{0000000C-0000-0000-C000-000000000046}']
|
||||
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 Seek(dlibMove : LargeUInt; dwOrigin : Longint; out libNewPosition : LargeUInt) : HResult;stdcall;
|
||||
function SetSize(libNewSize : LargeUInt) : HRESULT;stdcall;
|
||||
function CopyTo(stm: IStream;cb : LargeUInt;out cbRead : LargeUInt; out cbWritten : LargeUInt) : 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 LockRegion(libOffset : LargeUInt;cb : LargeUInt; dwLockType : Longint) : HRESULT;stdcall;
|
||||
function UnlockRegion(libOffset : LargeUInt;cb : LargeUInt; dwLockType : Longint) : HRESULT;stdcall;
|
||||
Function Stat(out statstg : TStatStg;grfStatFlag : Longint) : HRESULT;stdcall;
|
||||
function Clone(out stm : IStream) : HRESULT;stdcall;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user