Xbase++ to harbour / HMG Question

Discuss anything else that does not suite other forums.

Moderator: Rathinagiri

User avatar
apais
Posts: 440
Joined: Fri Aug 01, 2008 6:03 pm
DBs Used: DBF
Location: uruguay
Contact:

Re: Xbase++ to harbour / HMG Question

Post by apais »

You a wrongly asuming Harbour uses only 1 core on Mt.
Angel Pais
Web Apps consultant/architect/developer.
HW_apache (webserver modules) co-developer.
HbTron (Html GUI for harbour desktop hybrid apps) co-developer.
https://www.hbtron.com
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Xbase++ to harbour / HMG Question

Post by AUGE_OHR »

apais wrote: Sun Sep 01, 2019 10:19 pm You a wrongly asuming Harbour uses only 1 core on Mt.
i recognize it when work with harbour / HMG and mt=yes that not only 1 Core is work like in Xbase++ :o
is mt=yes "safe" ?

---

under Xbase++ every Thread use same CPU Core and have a own Workspace. how about harbour / HMG :?:
have fun
Jimmy
User avatar
apais
Posts: 440
Joined: Fri Aug 01, 2008 6:03 pm
DBs Used: DBF
Location: uruguay
Contact:

Re: Xbase++ to harbour / HMG Question

Post by apais »

Harbour manages it by iself. It also has it's own workspace.
I myself helped Przemek ( harbour core developper ) to do cross tests against xbase++ and it also went fine.
Angel Pais
Web Apps consultant/architect/developer.
HW_apache (webserver modules) co-developer.
HbTron (Html GUI for harbour desktop hybrid apps) co-developer.
https://www.hbtron.com
User avatar
apais
Posts: 440
Joined: Fri Aug 01, 2008 6:03 pm
DBs Used: DBF
Location: uruguay
Contact:

Re: Xbase++ to harbour / HMG Question

Post by apais »

The only thing harbour doesn't have are sync methods (mutually exclusive among instances).
Angel Pais
Web Apps consultant/architect/developer.
HW_apache (webserver modules) co-developer.
HbTron (Html GUI for harbour desktop hybrid apps) co-developer.
https://www.hbtron.com
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Xbase++ to harbour / HMG Question

Post by AUGE_OHR »

apais wrote: Tue Sep 03, 2019 2:04 pm Harbour manages it by iself. It also has it's own workspace.
Ah ... thx for Information
apais wrote:I myself helped Przemek ( harbour core developper ) to do cross tests against xbase++ and it also went fine.
so you are Xbase++ User ?
have fun
Jimmy
User avatar
apais
Posts: 440
Joined: Fri Aug 01, 2008 6:03 pm
DBs Used: DBF
Location: uruguay
Contact:

Re: Xbase++ to harbour / HMG Question

Post by apais »

Yes I was.
Angel Pais
Web Apps consultant/architect/developer.
HW_apache (webserver modules) co-developer.
HbTron (Html GUI for harbour desktop hybrid apps) co-developer.
https://www.hbtron.com
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Xbase++ to harbour / HMG Question

Post by AUGE_OHR »

CLASS Object as Parameter :?:

hi,

i use own CLASS Object as Parameter but under harbour in Function CreatePGTable( oServer, ... ) VALTYPE() is NIL :o

Code: Select all

Function Main(...)
Local oServer
   oServer := PGSql():new()
   IF oServer:connect( cConnect )
      ? "Main ", VALTYPE(oServer)
      ? "connect to "+cServer+" Port: "+cPort+" DB: "+cDataBase+" User "+cUser
      CreatePGTable( oServer, ... )

FUNCTION CreatePGTable( oServer, ... )
   ? "CreatePGTable ", VALTYPE(oServer) // -> NIL ?
Result Output
Main O
connect to 'localhost' Port: 5432 DB: mdidemo User postgres
CreatePGTable U
---

now have use PRIVATE and not as Parameter and it work :!:
is this "by harbour Design" with CLASS Object :?: ... or is it my Xbase++ CLASS Style ... :roll:

Code: Select all

#include "hbclass.ch"

   oServer := PGSql():new()
   IF oServer:connect( cConnect )
      ...
      

CLASS PGSql
EXPORTED:
   VAR connID READONLY
   ...
   METHOD init
   METHOD connect
   ... 
ENDCLASS

METHOD PGSql:init()
   ::connID := 0
   ::lError := .F.
   ::cError := ""
   ::Schema := "public"
return self

METHOD PGSql:connect( cConnString )
   local lOk

   ::connID := PQconnectdb(cConnString)
   if !( lOk := (PQstatus(::connID) == 0) )
      ::connID := 0
   endif
return lOk
...
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Xbase++ to harbour / HMG Question

Post by AUGE_OHR »

hi,

i'm search for a Function like PeekStr() by ot4xb***

***LIB for Xbase++ by Pablo Botella Navarro https://www.xbwin.com/
Retrieve one or more substrings from the memory buffer pointed by <pMem> starting at position <nShift>.

Syntax:

Code: Select all

PeekStr(<pMem>,[[@]<nShift>],<nSize>) -> <cStr>
PeekStr(<pMem>,[[@]<nShift>],-1) -> <cStr>
PeekStr(<pMem>,[[@]<nShift>],@<cStr>) -> <nSize>
PeekStr(<pMem>,[[@]<nShift>],[@]<aSizes>) -> <aStr>
Parameters:

<pMem>
Base pointer to the memory buffer.

<nShift>
Zero based starting position within <pMem>. If this parameter is passed by reference will be increased with the number of bytes retrieved, to reuse it in subsequent calls of Peek...() functions.

<nSize>
Number of bytes to retrieve. If <nSize> == -1 a NULL terminated string is assumed and PeekStr() will retrieve the bytes up to the first NULL character.

Note: Using the -1 param with non NULL terminated string can result in a internal exception.

<cStr>
Character variable to fill with Len(<cStr>) bytes if provided by reference.

<aSizes>
Array with the number of bytes to retrieve per element. If an element of <aSizes> contains a character value will be take the size of the provided string element.
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Xbase++ to harbour / HMG Question

Post by AUGE_OHR »

AUGE_OHR wrote: Sun Sep 01, 2019 4:45 am what is used in harbour / HMG for
PeekWord(<pMem>,[[@]<nShift>]) -> <nWord>
PeekWord(<pMem>,[[@]<nShift>], <nItems>) -> <aWords>

Retrieve the value of one or more WORDs from the memory buffer pointed by <pMem> starting at the position <nShift>.
here Solution
HB_DLL6432.ZIP
(747 Bytes) Downloaded 183 times
it detect if DLL / EXE is for 32 Bit or 64 Bit
have fun
Jimmy
Post Reply