patch : lack of some function in activex and comobj problem being compiled for wince
Original Reporter info from Mantis: roozbeh
-
Reporter name: roozbeh gholizadeh
Original Reporter info from Mantis: roozbeh
- Reporter name: roozbeh gholizadeh
Description:
succed and failed functions in activex.
comobj has problems with being compiled in wince.
Additional information:
also i needed a unit which was in delphi,named axctrls.pas
the most important part of it,is tolestream.
maybe it should also be added to activex.pp
it looks like this
type
TOleStream = class(TStream)
private
FStream: IStream;
protected
function GetIStream: IStream;
public
constructor Create(const Stream: IStream);
function Read(var Buffer; Count: Longint): Longint; override;
function Write(const Buffer; Count: Longint): Longint; override;
function Seek(Offset: Longint; Origin: Word): Longint; override;
end;
implementation
{ TOleStream }
constructor TOleStream.Create(const Stream: IStream);
begin
FStream := Stream;
end;
function TOleStream.Read(var Buffer; Count: Longint): Longint;
begin
OleCheck(FStream.Read(@Buffer, Count, @Result));
end;
function TOleStream.Seek(Offset: Longint; Origin: Word): Longint;
var
Pos: Large_Integer;
Ofs : Large_Integer;
begin
ofs.QuadPart := Offset;
OleCheck(FStream.Seek(Ofs, Origin, Pos));
Result := Longint(Pos.QuadPart);
end;
function TOleStream.Write(const Buffer; Count: Longint): Longint;
begin
OleCheck(FStream.Write(@Buffer, Count, @Result));
end;
function TOleStream.GetIStream: IStream;
begin
Result := FStream;
end;
Mantis conversion info:
- Mantis ID: 8376
- Version: 2.2.0
- Fixed in version: 2.4.2
- Fixed in revision: 14669 (#8885f124)