DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C++ (http://www.daniweb.com/forums/forum8.html)
-   -   DLL that returns a pointer (http://www.daniweb.com/forums/thread45921.html)

bibo1978 May 20th, 2006 5:18 am
DLL that returns a pointer
 
I want to write a c++ code that generates a DLL, the purpose of the exported Function is to do some processing on data on the memory, the main problem here is that I want my code to return also a memory pointer, yet I don't know exactly how to do it can anyone help

Ancient Dragon May 20th, 2006 6:57 am
Re: DLL that returns a pointer
 
See any of these google articles. Many of them are for VB, but you can just ignore that part and read about how to write the dll.

One important point: memory cannot be allocated in a dll and deallocate it in the calling application. Special non-ansi-standard functions such as GlobalAlloc() and GlobalFree() can be used, not neither new or malloc().


All times are GMT -4. The time now is 7:51 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC