mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 09:26:15 +02:00
* make istream signedness equal to MSDN and modern delphi. Denis Kozlov,
mantis #31473 git-svn-id: trunk@35542 -
This commit is contained in:
parent
910c05f942
commit
6166215174
@ -1077,14 +1077,14 @@ 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: LargeUint; dwOrigin: Longint; out libNewPosition: LargeUint): HResult; virtual; stdcall;
|
function Seek(dlibMove: LargeInt; dwOrigin: DWORD; out libNewPosition: LargeUint): HResult; virtual; stdcall;
|
||||||
function SetSize(libNewSize: 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 CopyTo(stm: IStream; cb: LargeUint; out cbRead: LargeUint; out cbWritten: LargeUint): HResult; virtual; stdcall;
|
||||||
function Commit(grfCommitFlags: Longint): HResult; virtual; stdcall;
|
function Commit(grfCommitFlags: DWORD): HResult; virtual; stdcall;
|
||||||
function Revert: HResult; virtual; stdcall;
|
function Revert: HResult; virtual; stdcall;
|
||||||
function LockRegion(libOffset: LargeUint; cb: LargeUint; dwLockType: Longint): HResult; virtual; stdcall;
|
function LockRegion(libOffset: LargeUint; cb: LargeUint; dwLockType: DWORD): HResult; virtual; stdcall;
|
||||||
function UnlockRegion(libOffset: LargeUint; cb: LargeUint; dwLockType: Longint): HResult; virtual; stdcall;
|
function UnlockRegion(libOffset: LargeUint; cb: LargeUint; dwLockType: DWORD): HResult; virtual; stdcall;
|
||||||
function Stat(out statstg: TStatStg; grfStatFlag: Longint): HResult; virtual; stdcall;
|
function Stat(out statstg: TStatStg; grfStatFlag: DWORD): 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;
|
||||||
property StreamOwnership: TStreamOwnership read FOwnership write FOwnership;
|
property StreamOwnership: TStreamOwnership read FOwnership write FOwnership;
|
||||||
|
@ -1038,7 +1038,7 @@ begin
|
|||||||
Result := S_OK;
|
Result := S_OK;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TStreamAdapter.Seek(dlibMove: LargeUint; dwOrigin: Longint; out libNewPosition: LargeUint): HResult; stdcall;
|
function TStreamAdapter.Seek(dlibMove: LargeInt; dwOrigin: DWORD; out libNewPosition: LargeUint): HResult; stdcall;
|
||||||
var
|
var
|
||||||
newpos: QWord;
|
newpos: QWord;
|
||||||
begin
|
begin
|
||||||
@ -1118,7 +1118,7 @@ begin
|
|||||||
Result := S_OK;
|
Result := S_OK;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TStreamAdapter.Commit(grfCommitFlags: Longint): HResult; stdcall;
|
function TStreamAdapter.Commit(grfCommitFlags: DWORD): HResult; stdcall;
|
||||||
begin
|
begin
|
||||||
if m_bReverted then
|
if m_bReverted then
|
||||||
Result := STG_E_REVERTED
|
Result := STG_E_REVERTED
|
||||||
@ -1133,19 +1133,19 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TStreamAdapter.LockRegion(libOffset: LargeUint; cb: LargeUint; dwLockType: Longint): HResult; stdcall;
|
function TStreamAdapter.LockRegion(libOffset: LargeUint; cb: LargeUint; dwLockType: DWORD): HResult; stdcall;
|
||||||
begin
|
begin
|
||||||
Result := STG_E_INVALIDFUNCTION;
|
Result := STG_E_INVALIDFUNCTION;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TStreamAdapter.UnlockRegion(libOffset: LargeUint; cb: LargeUint; dwLockType: Longint): HResult; stdcall;
|
function TStreamAdapter.UnlockRegion(libOffset: LargeUint; cb: LargeUint; dwLockType: DWORD): HResult; stdcall;
|
||||||
begin
|
begin
|
||||||
Result := STG_E_INVALIDFUNCTION;
|
Result := STG_E_INVALIDFUNCTION;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TStreamAdapter.Stat(out statstg: TStatStg; grfStatFlag: Longint): HResult; stdcall;
|
function TStreamAdapter.Stat(out statstg: TStatStg; grfStatFlag: DWORD): HResult; stdcall;
|
||||||
begin
|
begin
|
||||||
if m_bReverted then
|
if m_bReverted then
|
||||||
begin
|
begin
|
||||||
|
@ -307,14 +307,14 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
IStream = interface(ISequentialStream) ['{0000000C-0000-0000-C000-000000000046}']
|
IStream = interface(ISequentialStream) ['{0000000C-0000-0000-C000-000000000046}']
|
||||||
function Seek(dlibMove : LargeUInt; dwOrigin : Longint; out libNewPosition : LargeUInt) : HResult;stdcall;
|
function Seek(dlibMove : LargeInt; dwOrigin : DWORD; out libNewPosition : LargeUInt) : HResult;stdcall;
|
||||||
function SetSize(libNewSize : LargeUInt) : HRESULT;stdcall;
|
function SetSize(libNewSize : LargeUInt) : HRESULT;stdcall;
|
||||||
function CopyTo(stm: IStream;cb : LargeUInt;out cbRead : LargeUInt; out cbWritten : LargeUInt) : HRESULT;stdcall;
|
function CopyTo(stm: IStream;cb : LargeUInt;out cbRead : LargeUInt; out cbWritten : LargeUInt) : HRESULT;stdcall;
|
||||||
function Commit(grfCommitFlags : Longint) : HRESULT;stdcall;
|
function Commit(grfCommitFlags : DWORD) : HRESULT;stdcall;
|
||||||
function Revert : HRESULT;stdcall;
|
function Revert : HRESULT;stdcall;
|
||||||
function LockRegion(libOffset : LargeUInt;cb : LargeUInt; dwLockType : Longint) : HRESULT;stdcall;
|
function LockRegion(libOffset : LargeUInt;cb : LargeUInt; dwLockType : DWORD) : HRESULT;stdcall;
|
||||||
function UnlockRegion(libOffset : LargeUInt;cb : LargeUInt; dwLockType : Longint) : HRESULT;stdcall;
|
function UnlockRegion(libOffset : LargeUInt;cb : LargeUInt; dwLockType : DWORD) : HRESULT;stdcall;
|
||||||
Function Stat(out statstg : TStatStg;grfStatFlag : Longint) : HRESULT;stdcall;
|
Function Stat(out statstg : TStatStg;grfStatFlag : DWORD) : 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