The reason for this is I will be accessing a printer with multi-stationary
types loaded and I want to be able to select the correct stationary for
different printed reports.
I was going to use the above function to determine the paper options, it is
declared in the Windows.pas source file as:
function DeviceCapabilitiesEx(pDriverName, pDeviceName, pPort: PChar;
iIndex: Integer; pOutput: PChar; DevMode: PDeviceMode): Integer; stdcall;
I tried to run an application using this function but the following error
occurred :
Unable to get entry point in gdi32.DLL.
I checked the Delphi source and 'Quick Viewed' the DLL and noticed that
Delphi was declaring an external function 'DeviceCapabilitiesA' from
gdi32.DLL, whereas the DLL itself was exporting the function name as
'DeviceCapabilitiesExA'.
So I've had to re-declare the function local to my application.
Is this a known problem?
interface
{$IFDEF Win32}
function DeviceCapabilitiesA(pDevice, pPort: PAnsiChar; fwCapability: Word;
pOutput: PAnsiChar; DevMode: PDeviceModeA): Integer; stdcall;
function DeviceCapabilitiesW(pDevice, pPort: PWideChar; fwCapability: Word;
pOutput: PWideChar; DevMode: PDeviceModeW): Integer; stdcall;
function DeviceCapabilities(pDevice, pPort: PChar; fwCapability: Word;
pOutput: PChar; DevMode: PDeviceMode): Integer; stdcall;
{$ENDIF}
implementation
{$IFDEF Win32}
function DeviceCapabilitiesA; external winspl name 'DeviceCapabilitiesA';
function DeviceCapabilitiesW; external winspl name 'DeviceCapabilitiesW';
function DeviceCapabilities; external winspl name 'DeviceCapabilitiesA';
{$ENDIF}
Best Regards,
Jason
Peter Below (TeamB) 10011...@compuserve.com)