Error when creating a second instance of a COM control

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
LVL 20
TheAvengerAsked:
Who is Participating?
 
fds_fatboyConnect With a Mentor Commented:
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
 
KarcOriginCommented:
What is your OS and which service pack you have installed?


0
 
TheAvengerAuthor Commented:
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 Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
TheAvengerAuthor Commented:
@EDDYKT: Unfortunately not
0
 
EDDYKTCommented:
What do you do inside your COM object? Database accessing?


Is your COM object ocx or dll?
0
 
TheAvengerAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.