Solved

Error when creating a second instance of a COM control

Posted on 2004-09-21
7
288 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 250 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month8 days, 11 hours left to enroll

617 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