DeviceCapabilities() failed

DeviceCapabilities() failed

Postby Badara Thiam » Thu Aug 28, 2008 5: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
User avatar
Badara Thiam
 
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Badara Thiam » 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
User avatar
Badara Thiam
 
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France

Postby Badara Thiam » 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
User avatar
Badara Thiam
 
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France

Postby Antonio Linares » Sun Aug 31, 2008 3: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Badara Thiam » Sun Aug 31, 2008 5:45 pm

Antonio,

Your sample return -1

Regards.
Badara Thiam
http://www.icim.fr
User avatar
Badara Thiam
 
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France

Postby Antonio Linares » Sun Aug 31, 2008 6:11 pm

Badara,

Please try this example:
Code: Select all  Expand view
#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
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Badara Thiam » Sun Aug 31, 2008 10:49 pm

Antonio,

This test (test1) return compilation errors :

Code: Select all  Expand view

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
Badara Thiam
 
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Badara Thiam » Mon Sep 01, 2008 2: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
User avatar
Badara Thiam
 
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France

Postby Antonio Linares » Mon Sep 01, 2008 2:48 pm

Badara,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 76 guests