Page 1 of 1

DeviceCapabilities() failed

Posted: Thu Aug 28, 2008 5:00 pm
by Badara Thiam
Hello,

I just try to use DeviceCapabilities() with FWH and Harbour,
but failed. Who know how use it please ?
The manual not help me.

Regards,

Posted: Sun Aug 31, 2008 12:09 am
by Antonio Linares
Badara,

Have you tried it this way ?

DeviceCapabilities( <cDevice>, <nCapability>, <@cBuffer> ) --> <nRetCode>

Posted: Sun Aug 31, 2008 11:31 am
by Badara Thiam
Antonio,

I have tried this but DeviceCapabilities() return -1
Here i put the printer name in cDevice.

When i put the driver print file name instead,
DeviceCapabilities() return 0, but before
i have the message "Could not load driver".

In my tests, the nCapability is DC_ORIENTATION
and cBuffer is an empty string ("") before to call DeviceCapabilities()

Regards.

Posted: Sun Aug 31, 2008 12:45 pm
by Badara Thiam
Anotonio,

Perhaps this can help to find the problem :

- PrnPortrait() don't work
- PrnLandscape() don't work

Regards.

Posted: Sun Aug 31, 2008 3:14 pm
by Antonio Linares
Badara,

Please try this:

MsgInfo( DeviceCapabilities( cPrinterName, DC_ORIENTATION, 0 ) )

and tell me what value you get, thanks

Posted: Sun Aug 31, 2008 5:45 pm
by Badara Thiam
Antonio,

Your sample return -1

Regards.

Posted: Sun Aug 31, 2008 6:11 pm
by Antonio Linares
Badara,

Please try this example:

Code: Select all

#include "FiveWin.ch"

function Main()

   local oPrn

   PRINT oPrn NAME "Continuing testing..."
      oPrn:SetLandscape()
      PAGE
         oPrn:Say( 20, 20, "This is a test in Landscape" )
      ENDPAGE
   ENDPRINT

   PRINT oPrn NAME "Continuing testing..."
      oPrn:SetPortrait()
      PAGE
         oPrn:Say( 20, 20, "This is a test in Portrait" )
      ENDPAGE
   ENDPRINT

return nil

Posted: Sun Aug 31, 2008 10:49 pm
by Badara Thiam
Antonio,

This test (test1) return compilation errors :

Code: Select all


D:\PROGS\OBJ32\SOURCE.P(9) Error E0030  Syntax error: "syntax error at 'OPRN'"

D:\PROGS\OBJ32\SOURCE.P(11) Error E0020  Incomplete statement or unbalanced delimiters

D:\PROGS\OBJ32\SOURCE.P(13) Error E0020  Incomplete statement or unbalanced delimiters

D:\PROGS\OBJ32\SOURCE.P(14) Error E0020  Incomplete statement or unbalanced delimiters

D:\PROGS\OBJ32\SOURCE.P(16) Error E0030  Syntax error: "syntax error at 'OPRN'"

D:\PROGS\OBJ32\SOURCE.P(18) Error E0020  Incomplete statement or unbalanced delimiters

D:\PROGS\OBJ32\SOURCE.P(20) Error E0020  Incomplete statement or unbalanced delimiters

D:\PROGS\OBJ32\SOURCE.P(21) Error E0020  Incomplete statement or unbalanced delimiters

Regards.

Posted: Sun Aug 31, 2008 10:56 pm
by Antonio Linares
What FWH version are you using ?

Please compile your PRG using /P and post here the resulting PPO file, thanks

Posted: Mon Sep 01, 2008 2:04 pm
by Badara Thiam
Antonio,

Today i have not the same compilation errors.
Yesterday i have validate my window at microsoft,
and have download the file DEVCAP.EXE who
permit ehanced acces (microsoft site say that).
After (always yesterday) i stop my pc, then re-run,
and nothing was different. Today i want do test again,
and i have different result. No changes between the 2 tests...

I seek know to see what changes and why changes.
I answer you soon because i must to go back
to the city now.

My version of FWH is 8.6.

Regards.

Posted: Mon Sep 01, 2008 2:48 pm
by Antonio Linares
Badara,

Ok, I wait for your feedback, thanks :-)