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;
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;
ASKER
No, this doesn't work
Change
FDeviceMode: PDeviceModeA;
to
FDeviceMode: PDeviceMode;
or
FDeviceMode: PDeviceModeW;
FDeviceMode: PDeviceModeA;
to
FDeviceMode: PDeviceMode;
or
FDeviceMode: PDeviceModeW;
ASKER
pucko:
just do your changes, or your changes as well as those described above you?
just do your changes, or your changes as well as those described above you?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Replace DocumentProperties with DocumentPropertiesA and FDevice has to be PAnsiChar
2 -
Replace DeviceCapabilities with DeviceCapabilitiesA