Re: [Harbour] NULL prg pointer

2007-12-06 Thread Mindaugas Kavaliauskas
Przemyslaw Czerpak wrote: I can do it in C, so I've wrote a EMPTYPTR() function with hb_retptr( NULL ); but I'm asking about compiler based 0p0 (just like 0d0 or 0t0 for empty date or timestamp) solution. Does such solution exist? No. We can add literal pointer representation but I'd not li

Re: [Harbour] NULL prg pointer

2007-12-05 Thread Przemyslaw Czerpak
On Wed, 05 Dec 2007, Mindaugas Kavaliauskas wrote: > I can do it in C, so I've wrote a EMPTYPTR() function with >hb_retptr( NULL ); > but I'm asking about compiler based 0p0 (just like 0d0 or 0t0 for empty > date or timestamp) solution. Does such solution exist? No. We can add literal pointer

Re: [Harbour] NULL prg pointer

2007-12-05 Thread Mindaugas Kavaliauskas
Petr Chornyj wrote: one more question. I'm changing Win32 API handlers and memory pointers from numeric to pointer type. How can I assign empty pointer to variable? HWND hwnd = (HWND) hb_parnl( 1 ); I was using this approach since 1998, and I'm moving to: HWND hwnd = hb_parptr( 1 );

Re: [Harbour] NULL prg pointer

2007-12-05 Thread Mindaugas Kavaliauskas
Chen Kedem wrote: C level function: hb_retptr( NULL ); Well, this function return pointer to a null item, but it is probably not empty (a new item is allocated every time). So I leave it to someone which know something about this, to answer :) Hi, this function return "NULL .prg level poin

Re: [Harbour] NULL prg pointer

2007-12-05 Thread Mindaugas Kavaliauskas
How can I assign empty pointer to variable? C level function: hb_retptr( NULL ); Hi, I can do it in C, so I've wrote a EMPTYPTR() function with hb_retptr( NULL ); but I'm asking about compiler based 0p0 (just like 0d0 or 0t0 for empty date or timestamp) solution. Does such solution exist

Re: [Harbour] NULL prg pointer

2007-12-05 Thread Petr Chornyj
Mindaugas Kavaliauskas wrote: > > Hi, > > one more question. I'm changing Win32 API handlers and memory pointers > from numeric to pointer type. How can I assign empty pointer to variable? > F.e. I'm use this code LOCAL dc := _GetDC( hwnd) If hb_IsPointer( dc ) .. dc := NIL endif

Re: [Harbour] NULL prg pointer

2007-12-05 Thread Chen Kedem
I wrote: > C level function: hb_retptr( NULL ); Well, this function return pointer to a null item, but it is probably not empty (a new item is allocated every time). So I leave it to someone which know something about this, to answer :) Chen. ***

[Harbour] NULL prg pointer

2007-12-05 Thread Chen Kedem
Mindaugas, > How can I assign empty pointer to variable? C level function: hb_retptr( NULL ); Don't know about PRG level, but since pointers are usually not created on the PRG level it is reasonable. Chen. ***

[Harbour] NULL prg pointer

2007-12-05 Thread Mindaugas Kavaliauskas
Hi, one more question. I'm changing Win32 API handlers and memory pointers from numeric to pointer type. How can I assign empty pointer to variable? Best regards, Mindaugas ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-p