Solved

Free an OCX module from memory

Posted on 1997-03-25
3
211 Views
Last Modified: 2012-08-13
When my VB program is not closed normally, there are some OCX module are still remaining in memory which are not free from memory. So there is any tools or method to free OCX module like using WPS to free VBX module on VB3.0 environment? (This OCX module can not be seen when my program is executed, that is the OCX module there is no user interface for user like Timer object).
0
Comment
Question by:Paco Hsiao
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 5

Expert Comment

by:volking
ID: 1424741
You should NOT be trying to do this.
OCXs often interrelate to other OCXs, DLLs, etc.
Forcing an OCX to terminate can cause severe problems including registry corruption, file system corruption, memory corruption, and lots of other bad things.

I'd STRONGLY urge you to pursue the question, "Why Didn't The OCX terminate Properly?"
Meaning. "Fix the problem! . . . Don't kludge a patch that has the potential to REALLY SCREW UP THINGS!"
0
 
LVL 1

Expert Comment

by:andyb013197
ID: 1424742
Concurs with volking. Your problem is not *how* to release ocx's but *why* they are still there after the app has terminated. I would suggest lots of setting forms to nothing and object variables to nothing as a solution. I cant see a situation where a vb app will always terminate normally except with calls to api functions which cant be trapped.
0
 
LVL 1

Accepted Solution

by:
ndb earned 200 total points
ID: 1424743
You can try the API Declare Function DeleteFile Lib "kernel32" Alias "DeleteFileA" (ByVal lpFileName As String) As Long.
This removes a file from memory.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

733 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