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