Board index » delphi » API Call - DeviceCapabilies() Does Not Work - Delphi Bug ??

API Call - DeviceCapabilies() Does Not Work - Delphi Bug ??

I am attempting to use DeviceCapabilities API call with Delphi 2, but get a
run-time error message in the Delphi IDE of :-

"Unable to create process"

 . . . and in Windows 95 of :-

"The file MyFile.exe is linked to missing export GDI32.dll:DeviceCapabilitiesA"

 . . . and . . .

"A device attached to the system is not functioning".

Looking in Windows .PAS the declaration is :-

function DeviceCapabilities; external gdi32 name 'DeviceCapabilitiesA';

(gdi32 := 'gdi32.dll' in Windows.PAS)

. . . but looking in gdi32.dll (128Kb 11 Nov 1995) with QuickView shows only
entries of :-

DeviceCapabilitiesEx
DeviceCapabilitiesExA
DeviceCapabilitiesExW

 . .  in the Export Table.

Is this a bug in Delphi and should I declare :-

function DeviceCapabilities; external gdi32 name 'DeviceCapabilitiesExA';

 . .  in my program to overwrite WindowsPAS declaration, or does
DeviceCapabilitiesExA have different parameters and functionality from
DeviceCapabilitiesA (I cannot see a reference to it in my copy of Win32.hlp)

Thanks for any helpful comments.

Alan Lloyd
alangll...@aol.com

 

Re:API Call - DeviceCapabilies() Does Not Work - Delphi Bug ??


It is in unit WINSPOOL

 - Erling G

Re:API Call - DeviceCapabilies() Does Not Work - Delphi Bug ??


In article <35f0018...@d2o202.telia.com>, "Erling  Grape" <gr...@nl.telia.no>
writes:

Quote
>It is in unit WINSPOOL

Thanks,
but it's not in my Delphi 2 WinSpool.PAS (25/09/97 49Kb), nor in Delphi 3.0
WinSpool.PAS where the call is also to DeviceCapabilitiesA, NOT
DeviceCapabilitiesExA.

Alan Lloyd
alangll...@aol.com

Re:API Call - DeviceCapabilies() Does Not Work - Delphi Bug ??


I have not checked where it is, but if you include Winspool in your uses
statement I think it will work. It does for me (I am using Delphi 3.

Quote
AlanGLLoyd wrote in message

<1998090419184300.PAA05...@ladder01.news.aol.com>...
Quote
>In article <35f0018...@d2o202.telia.com>, "Erling  Grape"

<gr...@nl.telia.no>
Quote
>writes:

>>It is in unit WINSPOOL

>Thanks,
>but it's not in my Delphi 2 WinSpool.PAS (25/09/97 49Kb), nor in Delphi 3.0
>WinSpool.PAS where the call is also to DeviceCapabilitiesA, NOT
>DeviceCapabilitiesExA.

>Alan Lloyd
>alangll...@aol.com

Re:API Call - DeviceCapabilies() Does Not Work - Delphi Bug ??


Alan,

DeviceCapabilitiesExA, along with DeviceCapabilitiesEx, declared in Windows.pas
as alias for DeviceCapabilitiesA in D3

Charles Johnson

Other Threads