Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Error when creating a second instance of a COM control

Posted on 2004-09-21
7
Medium Priority
?
289 Views
Last Modified: 2013-11-26
Hi Experts,

I am developing a small COM control using Visual Basic 6.0. Everything works fine with the control until I try to make two simultaneously running instances of it. The first instance is created without any problems, however the second does give the following error:

Not enough storage is aviable to complete this operation

I have enough RAM and hard drive space available. I tried the same control with ASP and with a small Delphi application and I get the same error.

I suppose my control is somehow configured to run only a single instance, but I don't know how to control this. Can someone help?

Thanks!
TheAvenger
0
Comment
Question by:TheAvenger
[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
7 Comments
 
LVL 10

Accepted Solution

by:
fds_fatboy earned 1000 total points
ID: 12110719
As a first guess:

Do you have any
        global variables?
        module level or static variables held in standard (not class) modules?
If so, be aware that all these variables will be shared between ALL instances of your control running. This can give unexpected results. If you have, you are almost certainly better off replacing them with other options - ask me if you need to know.

Otherwise - please post some code to let us see what is happening.
0
 
LVL 5

Expert Comment

by:KarcOrigin
ID: 12110740
What is your OS and which service pack you have installed?


0
 
LVL 20

Author Comment

by:TheAvenger
ID: 12110793
The OS is Windows XP, SP 1 and SP2 (two machines).

I have some global variables. I will try to move them in a class and come back with a post after it.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 26

Expert Comment

by:EDDYKT
ID: 12111130
0
 
LVL 20

Author Comment

by:TheAvenger
ID: 12111357
@EDDYKT: Unfortunately not
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 12111540
What do you do inside your COM object? Database accessing?


Is your COM object ocx or dll?
0
 
LVL 20

Author Comment

by:TheAvenger
ID: 12112824
It was a problem with the log I was using - it was using a file and probably locked it. I now use the Event Log of NT and it works just fine.
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

705 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