LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX server is reentrant

I have difficulties with my ActiveX server. It's functionality is not important. I chose the option Non-reentrant execution in Vi-properties/Execution and I compiled the server. Then I created client application which calls server. It works very well on local computer. Client application starts server and it starts it only once - it means, I see in the task manager only one instance of the server. This is correct. When call the server from remote computer it creates also only one instance of server. Still correct.  But when I call it from both of them, I see two processes in the task manager. Both of them were started with the same user and have the same pathway. Why it does not share one instance of my server? How should I change vi-properties of the server to have only one process? 

0 Kudos
Message 1 of 3
(2,110 Views)

Without seeing your code I can only guess at what is happening.  Each executable will have it's own address space and not be aware of any other executable so reentrancy is not relevant if you are running to different executables or two instances of the same executable on two different machines.  If all you do in you application is START a server then the behavior you're seeing is correct, each executable will start it's own ActiveX server.  You need to check to see if an instance of the ActiveX server is running and use it if it is.  Only start the server if you can't find one running.

 

Kelly Bersch
Certified LabVIEW Developer
Kudos are always welcome
Message 2 of 3
(2,074 Views)

Thank you for an answer,

So it means, it has nothing to do with re-entrance and I need to open the server in other way. But how to do it? I thought that “Automation Open” function cares about it. In the Help is:

If open new instance is TRUE, LabVIEW creates a new instance of the Automation Refnum. If FALSE (default), LabVIEW tries to connect to an instance of the refnum that is already open. If the attempt is unsuccessful, LabVIEW opens a new instance.

Any Idea? Thanks a lot.

Download All
0 Kudos
Message 3 of 3
(2,059 Views)