I do this frequently. Have the compiler output to the RBase directory or actually use DLLoad. If you use DLLoad you can specify the full pathname to the DLL, so it can be in an "otherworldly" location out of the normal searchpath.
The only time DLFree could have a problem is if the DLL itself is corrupting memory somehow, otherwise you should be able to DLFree it, compile a new version and call it. BTW, are you using the ChkFunc to conditionally call STDCALL so you don't call it repeatedly in the same session? ----- Original Message ----- From: "Lawrence Lustig" <[EMAIL PROTECTED]> To: "RBASE-L Mailing List" <[email protected]> Sent: Thursday, August 28, 2008 9:31 PM Subject: [RBASE-L] - DLFREE always fails (return value 0). > I'm trying to write my first R:Base specific DLL library. I'm iteratively > testing and recompiling the DLL itself. Once I STDCALL a function from the > library I don't seem to be able to free the library without exiting R:Base -- > > which means I can't replace the running copy with my newly compiled copy. > This means quiting and restarting R:Base every few minutes. > > Does anyone know the trick to getting DLFREE() to actually release the > library file? I've tried calling DELFUNC on the only function imported from > the library. > > (Note: I'm using the implied DLLOAD inherent in STDCALL, not DLLOADing the > library manually, if that makes a difference). > -- > Larry > > >

