FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for CA-Clipper DeviceCapabilities()
Posts: 155
Joined: Tue Dec 30, 2008 03:07 AM
DeviceCapabilities()
Posted: Sun Oct 09, 2005 07: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

Posts: 160
Joined: Tue Oct 18, 2005 10:21 AM
Re: DeviceCapabilities()
Posted: Tue Oct 25, 2005 04:00 PM

Let's down, use GetDeviceCaps() instead...

Badara Thiam
http://www.icim.fr

Continue the discussion