CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 19

Threaded View

  1. #10
    Join Date
    May 2002
    Posts
    1,798

    Re: How to call a C++ dll function at runtime ?

    OK. I get the point. I have abandoned the idea of exporting class members and have began to experiment with writing simple C language DLL exports. I have attached a small demo that shows how to use runtime dynamic dll linking to export functions that return integers, doubles, and double pointers. But the pointers present a problem that Paul helped me to solve some time ago. Namely, once memory is allocated in the dll space, how does one deallocate that memory. With static linking and using class member exports, one could take advantage of the class destructor to free allocated memory and thus avoid memory leaks. But I cannot figure out how to do memory cleanup using only C. Note that the attached demo works but with considerable memory leak.
    Attached Files Attached Files
    mpliam

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured