[Harbour] Re: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-28 Thread Shum
Hi Teo, Many thanks again! Shum -- View this message in context: http://n2.nabble.com/Ask-Str2Poniter-and-Pointer2Str-function-pair-tp4803834p4812543.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attac

Re: [Harbour] Re: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-28 Thread Teo Fonrouge
Hello Shum, On Mar 28, 2010, at 1:23 AM, Teo Fonrouge wrote: > Hello Shum, > > On Mar 27, 2010, at 11:05 PM, Shum wrote: > >> >> Hi Teo, >> >>> HB_FUNC( POINTER2STRING ) >>> { >>> PHB_ITEM p = hb_param( 1, HB_IT_POINTER ); >>> PHB_ITEM n = hb_param( 2, HB_IT_NUMERIC ); >>> >>> if

Re: [Harbour] Re: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-28 Thread Teo Fonrouge
Hello Shum, On Mar 27, 2010, at 11:05 PM, Shum wrote: > > Hi Teo, > >> HB_FUNC( POINTER2STRING ) >> { >> PHB_ITEM p = hb_param( 1, HB_IT_POINTER ); >> PHB_ITEM n = hb_param( 2, HB_IT_NUMERIC ); >> >> if( p && n ) >> { >> PHB_ITEM s = hb_itemNew( NULL ); >>

Re: [Harbour] Re: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-28 Thread Viktor Szakáts
> Now only lack of: [...] > 2.) Some windows dlls call function (need tobe re-write under Harbour syntx) Harbour is supposed to have Xbase++ .dll handling syntax, so it would be interesting to see what needs to be rewritten still. Can you describe the details? Brgds, Viktor ___

[Harbour] Re: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-27 Thread Pritpal Bedi
Shum wrote: > > Without hbxbp (which depends on hbqt), it seems the only GUI (some syntx) > and greate for the Xbase++ to Harbour convertion. > It is _not_ the only GUI for Xbase++ to Harbour conversion. The other, but Windows only, implementation exists in Harbour under the name of GTWVG, th

[Harbour] Re: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-27 Thread Shum
Hi Teo, >HB_FUNC( POINTER2STRING ) >{ > PHB_ITEM p = hb_param( 1, HB_IT_POINTER ); > PHB_ITEM n = hb_param( 2, HB_IT_NUMERIC ); > > if( p && n ) > { > PHB_ITEM s = hb_itemNew( NULL ); > hb_itemPutCL( s, hb_itemGetPtr( p ), hb_itemGetNI( n ) ); >

[Harbour] Re: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-27 Thread Shum
Hi All, >1.) DBPosition() (which exist in Xbase++ but not in Harbour) function Should be DBGoPosition() ... Please add this function DBGoPosition() into Harbour for Xbase++ compitable Thanks ! Shum -- View this message in context: http://n2.nabble.com/Ask-Str2Poniter-and-Pointer2Str-fu

[Harbour] Re: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-27 Thread Shum
Hi Pritpal Bedi, Without hbxbp (which depends on hbqt), it seems the only GUI (some syntx) and greate for the Xbase++ to Harbour convertion. For my Application (one source code for POS, Account, Payroll ...) with following dlls: mybas1, mybas2, myinit, myweb0, mygui0, myinet, myxlnk ... (conver

[Harbour] Re: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-27 Thread Pritpal Bedi
Shum wrote: > > Now I am converting my All systems (POS, Account, Payroll...) into > Harbour dueto Harbour is MultiPalform and more powerful ... and free . > > During Xbase++ to Harbour converting, I found that Harbour can help me > find out some mistake ... > those Xbase++ just let it p

[Harbour] Re: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-27 Thread Shum
Hi Angel, > work for the metro of Hong Kong and needs to interface xbase programs with > ticket spending machines. The project has been end-up already. Now I am converting my All systems (POS, Account, Payroll...) into Harbour dueto Harbour is MultiPalform and more powerful ... and free ...

[Harbour] Re: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-27 Thread Angel Pais
That's right. One way of handle structures in Xbase++ is treat them as a string. BAP is a kind of translation lib to manage structures without having to use C. Mr Shum is a gentelman and a very good programmer who work for the metro of Hong Kong and needs to interface xbase programs with ticket

[Harbour] RE: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-27 Thread Pritpal Bedi
tfonrouge wrote: > > I'm still curios for knowing why do you need to pass/recover > pointers to strings. :) > If I am not mistaken, it has been a long time since I wrote something in Xbase++, that this compiler had no direct interface with BAP library and there had been no way to pass structu

[Harbour] RE: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-27 Thread Pritpal Bedi
Shum wrote: > > I just use the function during Xbase++ to Harbour converting ... > After that, I will re-think and re-write those part > Keep notes of all the facts you considered while porting from Xbase++ to Harbour, every detail if possible. It will help others during the same exerc

Re: [Harbour] RE: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-27 Thread Teo Fonrouge
Hello Shum, On Mar 27, 2010, at 11:05 AM, Shum wrote: > > > Hi Teo, > > > >> Please take in mind the Viktor's advice. It's very dangerous to deal with >> pointers at prg Harbour level, you can easily break things badly. > > I just use the function during Xbase++ to Harbour converting ... >

[Harbour] RE: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-27 Thread Shum
Hi Teo, >Please take in mind the Viktor's advice. It's very dangerous to deal with >pointers at prg Harbour level, you can easily break things badly. I just use the function during Xbase++ to Harbour converting ... After that, I will re-think and re-write those part Thanks ! Shum

Re: [Harbour] Re: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-27 Thread Teo Fonrouge
Hello Shum, On Mar 27, 2010, at 9:16 AM, Shum wrote: > > Hi Teo, > > I am converting my Xbase++ application into Harbour... > > Within my Xbase++ Application, I use BAP lib which are function for calling > C function within Xbase++ > and it has a function called Stringof() same as Pointer2Str(

[Harbour] Re: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-27 Thread Shum
Hi Petr, Yes, I find it and I will try it Thanks Shum -- View this message in context: http://n2.nabble.com/Ask-Str2Poniter-and-Pointer2Str-function-pair-tp4803834p4809635.html Sent from the harbour-devel mailing list archive at Nabble.com. ___

[Harbour] Re: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-27 Thread Shum
Hi Teo, I am converting my Xbase++ application into Harbour... Within my Xbase++ Application, I use BAP lib which are function for calling C function within Xbase++ and it has a function called Stringof() same as Pointer2Str() Without the Stringof() or similiar function I had to do mu

Re: [Harbour] Re: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-27 Thread Viktor Szakáts
My suggestion is not use such function at all. Brgds, Viktor On 2010 Mar 27, at 12:57, Shum wrote: > > Hi Viktor, > > I often ask some function which I need here dueto I am not a C programer, > I cannot write C (low level) function for myseft within harbour as I like. > > However, I follow

[Harbour] Re: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-27 Thread Shum
Hi Viktor, I often ask some function which I need here dueto I am not a C programer, I cannot write C (low level) function for myseft within harbour as I like. However, I follow the C and Harbour style ... and try to write the StrngOf(nPtr) function aas follow: Please point me if it is correct

Re: [Harbour] Re: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-27 Thread Viktor Szakáts
Hi, Harbour is a high level language, so it will never support such concepts are direct pointer / buffer manipulation. It's also not safe, not portable and can easily cause GPF in various different ways. If these are not important factors for you, you can create such functions in C. Brgds,

[Harbour] Re: Ask Str2Poniter() and Pointer2Str() function pair ....

2010-03-26 Thread Shum
hi All, I can find hb_ItemGetCPtr(..) in C level function call However, I cannot call the hb_ItemGetCPtr() directly within prg level Hope somebody can point me in the right direction to call the C Level function within harbour ... Thanks inadvanced ! Shum -- View this message in co