DeviceCapabilities() failed

Post Reply
User avatar
Badara Thiam
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France
Contact:

DeviceCapabilities() failed

Post 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,
Badara Thiam
http://www.icim.fr
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Badara,

Have you tried it this way ?

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

Antonio Linares
www.fivetechsoft.com
User avatar
Badara Thiam
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France
Contact:

Post 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.
Badara Thiam
http://www.icim.fr
User avatar
Badara Thiam
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France
Contact:

Post by Badara Thiam »

Anotonio,

Perhaps this can help to find the problem :

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

Regards.
Badara Thiam
http://www.icim.fr
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Badara,

Please try this:

MsgInfo( DeviceCapabilities( cPrinterName, DC_ORIENTATION, 0 ) )

and tell me what value you get, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Badara Thiam
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France
Contact:

Post by Badara Thiam »

Antonio,

Your sample return -1

Regards.
Badara Thiam
http://www.icim.fr
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Badara Thiam
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France
Contact:

Post 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.
Badara Thiam
http://www.icim.fr
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

What FWH version are you using ?

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

Antonio Linares
www.fivetechsoft.com
User avatar
Badara Thiam
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France
Contact:

Post 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.
Badara Thiam
http://www.icim.fr
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Badara,

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

Antonio Linares
www.fivetechsoft.com
Post Reply