José:

I have this code at the bottom of pcode dlls:

// this code is necessary only if using static vars!
#ifdef __HARBOUR__
#pragma BEGINDUMP

static HB_FUNC( DLL_INITSTATICS )
{
   hb_INITSTATICS();
}

#pragma ENDDUMP

Function DLLInit()
   DLL_INITSTATICS()
Return Nil
#endif

And from the main exe I call HB_LibDo( "DLLInit" )
right after you do the call to LoadLibrary().  I noticed
that if I use hb_LibLoad() instead of LoadLibrary(),
the pcode dll eventually gpf's.

Regards,

Jose F. Gimenez wrote:
> Hi,
>
> I'm testing pcode DLLs, but I've found that if I try to create a STATIC var 
> inside the DLL, it GPFs. This funcion GPFs when it's called:
>
>     FUNCTION Test()
>         STATIC x := "Hello"
>     RETURN x
>
> But this other works fine:
>
>     FUNCTION Test()
>         LOCAL x := "Hello"
>     RETURN x
>
> Is it working or it's failing? Am I missing somethnig?
>
> I'm using BCC++ 5.5
>
>
> TIA,
>
> Jose F. Gimenez 
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> xHarbour-developers mailing list
> xHarbour-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xharbour-developers
>
>   

-- 
Luis Krause Mantilla
lkrausem at shaw dot ca
luis_krause at hotmail dot com
"May the Source be with GNU"



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to