Link to home
Start Free TrialLog in
Avatar of DelphiRulez
DelphiRulez

asked on

Converting Delphi 5 code to Delphi 2010 Code Part III ?

I am converting Delphi 5 code over to Delphi 2010 code.


Question 1:

I get the following error:

There is no overloaded version of 'DocumentProperties' that can be called with these arguments

on this call:

ExtDevCode := DocumentProperties (0, DrvHandle, FDevice,
                                      FDeviceMode^, FDeviceMode^,
                                      DM_IN_BUFFER or DM_UPDATE);

:

DrvHandle:    THandle;
FDevice:     PChar;
FDeviceMode: PDeviceModeA;


Question 2:


I get the following error:


Incompatible types: 'PDeviceModeW' and 'PDeviceModeA' (PDiviceModeA from windows.pas)

on the following call:

FNumBins := DeviceCapabilities (FDevice, FPort, DC_Bins,
                                     nil, FDeviceMode);


    FDeviceMode: PDeviceModeA;
Avatar of Freddy1990
Freddy1990
Flag of Belgium image

1 -
Replace DocumentProperties with DocumentPropertiesA and FDevice has to be PAnsiChar

2 -
Replace DeviceCapabilities with DeviceCapabilitiesA
Avatar of DelphiRulez
DelphiRulez

ASKER

No, this doesn't work
Change
FDeviceMode: PDeviceModeA;

to

FDeviceMode: PDeviceMode;
or
FDeviceMode: PDeviceModeW;




pucko:

just do your changes, or your changes as well as those described above you?
ASKER CERTIFIED SOLUTION
Avatar of pucko
pucko

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial