Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Free an OCX module from memory

Posted on 1997-03-25
3
Medium Priority
?
215 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 600 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

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…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

610 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