Skip to content

ClassesIssues

Rodrigo Ruz edited this page Mar 16, 2015 · 1 revision

Namespace root\CIMV2

Description

This class exposes a property and a function called Reset

Workaround

You must rename the property Reset


Description

The PrintQuality property is of uint32 type this type is mapped to a Cardinal type, however some values returned by this property are negative.

The application create a code like this.

function GetPrintQualityAsString(const APropValue:Cardinal) : string; begin Result:=''; case APropValue of -1 : Result:='Draft'; -2 : Result:='Low'; -3 : Result:='Medium'; -4 : Result:='High'; end; end;

Workaround

change the type of the APropValue to Integer

function GetPrintQualityAsString(const APropValue:Integer) : string; 

Description

This class exposes a method called GetDescriptor this methoad have two parameters called RequestLength

Workaround

you must rename the last parameter RequestLength to _RequestLength in this way

 function GetDescriptor(const RequestIndex : Word;const RequestLength : Word;const RequestType : Byte;const RequestValue : Word ; var Buffer : Byte;var _RequestLength : Word): Integer;

and change the implementation of this function in this way

//not static, OutParams>1, InParams>0 function TWin32_USBHub.GetDescriptor(const RequestIndex : Word;const RequestLength : Word;const RequestType : Byte;const RequestValue : Word ; var Buffer : Byte;var _RequestLength : Word): Integer; var //output variants helpers vBuffer : OleVariant; vRequestLength : OleVariant; begin Result := VarIntegerNull(GetInstanceOf.GetDescriptor(RequestIndex,RequestLength,RequestType,RequestValue,vBuffer,vRequestLength)); Buffer := VarByteNull(vBuffer); _RequestLength := VarWordNull(vRequestLength); end;
Clone this wiki locally