DeviceCapabilities()

DeviceCapabilities()

Postby Gilbert Vaillancourt » Sun Oct 09, 2005 7:05 pm

Hi All,

I would like to understand why I cannot get anything out of DeviceCapa() function.

I absolutely need to retreive a paper type and source bin list,
but I only get weird results.

According to documentation I should be getting an array containing the names of the paper bins available for the tested printer.
(HP LaserJet 2100)

Here is a piece of code I'm using for testing with the results I get:



nValue := DeviceCapabilities(scPrntName, DC_BINNAMES, @xContainer)

if nValue > 0

MsgInfo(Str(nValue)) // Returns 15. Don't know what it means

MsgInfo(Str(Len(xContainer))) // Returns 15. Seems to be the lenght of the string

MsgInfo(ValType(xContainer)) // Returns `C` for string instead of `A`for array

MsgInfo(xContainer) // Displays `Sélection aut` instead of a full list of bin names

// The HP LaserJet 2100 I own has 3 bins on it

endif

I did another test using DC_PAPERNAMES. I also get false results.

DeviceCapabilities() returns 11
Lenght of xContainer is also 11
ValType of xCOntainer is `C`
Content of xContainer only displays (8 1. wich is only 5 characters while Lenght of xContainer reported a string of 11 char.

What am I doing wrong ?
Nedd to say that I`m testing on a station that runs on Windows 98SE french version and the printer driver are also french.
Can this be the resson ?

Regards,


Gilbert Vaillancourt
Informatique TurboLogie
(418) 845-0611
turbolog@videotron.ca
Gilbert Vaillancourt
 

Re: DeviceCapabilities()

Postby Badara Thiam » Tue Oct 25, 2005 4:00 pm

Let's down, use GetDeviceCaps() instead...
Badara Thiam
http://www.icim.fr
User avatar
Badara Thiam
 
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 19 guests