FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour DeviceCapabilities() failed
Posts: 160
Joined: Tue Oct 18, 2005 10:21 AM
DeviceCapabilities() failed
Posted: Thu Aug 28, 2008 05:00 PM

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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
DeviceCapabilities() failed
Posted: Sun Aug 31, 2008 12:09 AM

Badara,

Have you tried it this way ?

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 160
Joined: Tue Oct 18, 2005 10:21 AM
DeviceCapabilities() failed
Posted: Sun Aug 31, 2008 11:31 AM

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
Posts: 160
Joined: Tue Oct 18, 2005 10:21 AM
DeviceCapabilities() failed
Posted: Sun Aug 31, 2008 12:45 PM

Anotonio,

Perhaps this can help to find the problem :

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

Regards.

Badara Thiam
http://www.icim.fr
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
DeviceCapabilities() failed
Posted: Sun Aug 31, 2008 03:14 PM

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
Posts: 160
Joined: Tue Oct 18, 2005 10:21 AM
DeviceCapabilities() failed
Posted: Sun Aug 31, 2008 05:45 PM

Antonio,

Your sample return -1

Regards.

Badara Thiam
http://www.icim.fr
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
DeviceCapabilities() failed
Posted: Sun Aug 31, 2008 06:11 PM
Badara,

Please try this example:
#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
Posts: 160
Joined: Tue Oct 18, 2005 10:21 AM
DeviceCapabilities() failed
Posted: Sun Aug 31, 2008 10:49 PM
Antonio,

This test (test1) return compilation errors :

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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
DeviceCapabilities() failed
Posted: Sun Aug 31, 2008 10:56 PM

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
Posts: 160
Joined: Tue Oct 18, 2005 10:21 AM
DeviceCapabilities() failed
Posted: Mon Sep 01, 2008 02:04 PM

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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
DeviceCapabilities() failed
Posted: Mon Sep 01, 2008 02:48 PM

Badara,

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

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion