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