Solved

Unloading DLL's from memory

Posted on 1998-11-24
2
240 Views
Last Modified: 2013-11-20
Does anyone know how to force windows 3.1 to remove a program from memory, or is there a way to write an MFC app to display DLL's in memory and give an option to unload a given DLL?
This is all within the 3.1 environment.
Thanks.
0
Comment
Question by:Beatachon
  • 2
2 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 50 total points
Comment Utility
The quickest way is to call LoadLibrary() on the DLL to retrieve its HINSTANCE. Then call FreeLibrary() until FreeLibrary() returns FALSE. I belive in Win16, there's an API called GetModuleCount() to return the number of references on the DLL.

0
 
LVL 15

Expert Comment

by:Tommy Hui
Comment Utility
I forgot to add that if you want the list of DLLs, use ModuleFirst() and ModuleNext() in ToolHelp.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
configuration management 2 99
paragon account problem 9 96
lucky13 challenge 11 111
canBalance challenge 34 65
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now