Migration to 32 bits

Migration to 32 bits

Postby Greg Gammon » Wed Jun 21, 2006 5:51 pm

I am just now getting back into updating programs that I have been using now for 5-6 years. Im on FiveWin 2.0/clipper and am wondering about any advantage to moving to Harbour 32 bits. How transportable is the code...will I have to do much in the way of re-writing code? Thanks in advance!
User avatar
Greg Gammon
 
Posts: 105
Joined: Fri Jun 09, 2006 3:27 pm
Location: Bryan, Texas

Postby Antonio Linares » Wed Jun 21, 2006 11:06 pm

Greg,

You can port your FW+Clipper applications to 32 bits FWH+Harbour/xharbour ones, in record time. The compatibility level is very high, almost 100%, except for some operations that may not be allowed by the operating system (low level interrupts, VBXs management, etc). You can have your apps in 32 bits in one or two weeks.

32 bits applications provide a much better integration with Windows XP and next Windows Vista too. There are no memory limitations, so applications are more stable. Better integration with Windows drivers (printers and other devices).
regards, saludos

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

thanks

Postby Greg Gammon » Wed Jun 21, 2006 11:35 pm

Antonio....thanks for the info.

Im having a particular problem with printing forms to different printers in our network from certain Win98 machines. Reading some other threads it appears there are growing compatibility issues with print drivers so I assume to correct these issues I really need to move quickly to 32bits??

To make the jump, please outline exactly what I need to purchase to make the transition. Thanks again!
User avatar
Greg Gammon
 
Posts: 105
Joined: Fri Jun 09, 2006 3:27 pm
Location: Bryan, Texas

Postby Antonio Linares » Thu Jun 22, 2006 7:07 am

Greg,

Yes, there are some printers drivers that just properly work when used from a 32 bits application.

The product you need is FWH (FiveWin for Harbour). You may order it from https://secure.fivetechsoft.com/english/purchase.html

You get all you need for a real quick move to 32 bits.
regards, saludos

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

Postby Badara Thiam » Mon Jun 26, 2006 7:07 am

Antonio,

Can you give me a sample of printer driver who need 32 bits
applications to work properly, because i have found not any.

Thanks,
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 Jun 26, 2006 8:36 am

Badara,

We can't tell you right now an exact printer model, but we have been reported through several years about printers that were not properly working under 16 bits, most of them USB printers.
regards, saludos

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

Postby Greg Gammon » Mon Jun 26, 2006 1:59 pm

The particular issue I have found with my 16bits application is this...
First, the setup - We select two different printers to print to for different size forms we produce and this is done in the program setup and stored so that you automatically print to the correct printer when you select a certain form.
This all works well on our XP and 2000 machines, but in 95 and 98, it will cause the program to crash (GPF) when printing to any printer OTHER than the windows default printer.

I assume this will be a moot point as I migrate on to 32bits. BTW Antonio, I got FHW installed and re-compiled my program on the 1st run!!! That NEVER happens...laugh. I have found just a few run-time bugs to fix but overall it seems like it will be a simple migration. Kudos!

Greg
User avatar
Greg Gammon
 
Posts: 105
Joined: Fri Jun 09, 2006 3:27 pm
Location: Bryan, Texas

Postby Antonio Linares » Mon Jun 26, 2006 11:29 pm

Greg,

Glad to know you are moving forward :)
regards, saludos

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

Postby Badara Thiam » Tue Jun 27, 2006 8:19 am

Antonio Linares wrote:Badara,

We can't tell you right now an exact printer model, but we have been reported through several years about printers that were not properly working under 16 bits, most of them USB printers.


Antonio,

My users and me have no problem with USB printers, with Fivewin 16 bits for Windows like with pure Clipper DOS via PageScript.

The Fivewin print system need to upgrade to work fine, much functions
called are obsoletes and some functions causes GPF. I think you could
see here the reals problems found several years ago, not in the 16 bits applications. 16 bits is not the cause of this, i verify that alls the days !

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 » Wed Jun 28, 2006 10:27 am

Badara,

> The Fivewin print system need to upgrade to work fine,

We appreciate if you share such upgrade details with us. Thanks,
regards, saludos

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

Postby Badara Thiam » Thu Jun 29, 2006 8:19 am

Antonio,

Here is a part of Fivewin 2.5 PRINTER.PRG file, the method New() :

Code: Select all  Expand view
METHOD New( cDocument, lUser, lMeta, cModel, lModal ) CLASS TPrinter

   local aOffset
   local cPrinter

   DEFAULT cDocument := "FiveWin Report" ,;
           lUser     := .f.              ,;
           lMeta     := .f.              ,;
           lModal    := .f.

   if lUser
      ::hDC := GetPrintDC( GetActiveWindow() )
      if ::hDC != 0
         cModel := ::GetModel()+","+::GetDriver()+","+::GetPort()
      endif
   elseif cModel == NIL
      ::hDC  := GetPrintDefault( GetActiveWindow() )
      if ::hDC != 0
         cModel := ::GetModel()+","+::GetDriver()+","+::GetPort()
      endif
   else
      cPrinter := GetProfString( "windows", "device" , "" )
      WriteProfString( "windows", "device", cModel )
      SysRefresh()
      PrinterInit()
      ::hDC := GetPrintDefault( GetActiveWindow() )
      SysRefresh()
      WriteProfString( "windows", "device", cPrinter  )
   endif

   if ::hDC != 0
      aOffset    := PrnOffset( ::hDC )
      ::nXOffset := aOffset[1]
      ::nYOffset := aOffset[2]
      ::nOrient  := ::GetOrientation()
   elseif ComDlgXErr() != 0
      MsgStop( "There are no printers installed!"  + CRLF + ;
               "Please exit this application and install a printer." )
      ::nXOffset := 0
      ::nYOffset := 0
   endif

   ::cDocument  := cDocument
   ::cModel     := cModel
   ::nPage      := 0
   ::nPad       := 0
   ::lMeta      := lMeta
   ::lStarted   := .F.
   ::lModified  := .F.
   ::lPrvModal  := lModal

   if !lMeta
      ::hDcOut := ::hDC
   else
      ::aMeta  := {}
      ::cDir   := GetEnv("TEMP")

      if empty(::cDir)
         ::cDir := GetEnv("TMP")
      endif

      if Right( ::cDir, 1 ) == "\"
         ::cDir = SubStr( ::cDir, 1, Len( ::cDir ) - 1 )
      endif

      if !empty(::cDir)
         if !lIsDir(::cDir)
            ::cDir := GetWinDir()
         endif
      else
         ::cDir := GetWinDir()
      endif

   endif

return Self

//----------------------------------------------------------------------------//





I never use GetPrintDC().
Below is my method New() for class TPrinter() :


Code: Select all  Expand view
METHOD New( cDocument, lUser, lMeta, cModel, lModal) CLASS TPrinter

   local aOffset
   local cPrinter
   LOCAL cPortDrv

   DEFAULT cDocument := "Impression ICIM" ,;
           lUser := .f. , ;
           lMeta := .f. , ;
           lModal := .f.


   IF cModel = NIL
     cModel := WinDefPrn()
   ENDIF
   cPortDrv := WinGetPrnP(cModel)
   cModel := cModel + "," + cPortDrv
   SysRefresh()


   ::hDC := CreateDC( TOKEN(cModel,",",2), ;
   TOKEN(cModel,",",1), TOKEN(cModel,",",3))
   SysRefresh()

   if ::hDC != 0
      aOffset    := PrnOffset( ::hDC )
      ::nXOffset := aOffset[1]
      ::nYOffset := aOffset[2]
      ::nOrient  := ::GetOrientation()
   elseif ComDlgXErr() != 0
      MsgStop( OemToAnsi("Aucune imprimante n'est installée ou accessible actuellement...") )
      ::nXOffset := 0
      ::nYOffset := 0
   endif

   ::cDocument  := cDocument
   ::cModel     := cModel
   ::nPage      := 0
   ::nPad       := 0
   ::lMeta      := lMeta
   ::lStarted   := .F.
   ::lModified  := .F.
   ::lPrvModal  := lModal

   if !lMeta
      ::hDcOut := ::hDC
   else
      ::aMeta  := {}
      ::cDir   := GetEnv("TEMP")

      if empty(::cDir)
         ::cDir := GetEnv("TMP")
      endif

      if Right( ::cDir, 1 ) == "\"
         ::cDir = LEFT( ::cDir, LEN( ::cDir ) - 1 )
      endif

      if !empty(::cDir)
         if !lIsDir(::cDir)
            ::cDir := GetWinDir()
         endif
      else
         ::cDir := GetWinDir()
      endif

   endif

return Self





See my last contributions to find source code of WinDefPrn()
and WinGetPrnP().

I suggest to delete all calls of theses functions :

PrinterInit(), GetModel(), GetDriver(), GetPort(), GetPrintDefault()
All functions who call theses functions need to be rewritted,
or rewritte theses functions.

Delete also all read-write in .ini files to manage printers.
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 » Fri Jun 30, 2006 7:04 am

Badara,

Thanks,
regards, saludos

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


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 5 guests