LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I make an ActiveX Server with a User Interface for it's objects?

Hello,
I'm trying to use CVI to build an ActiveX Server that creates a simple object that has a LabWindows UIR for a User Interface.
I've used the wizard to create the server with methods and properties for setting and accessing the UIR indicators and controls, but I don't understand where in the generated code to load the panel and process user events.
Do I use the object callback CA_SERVER_EVENT_OBJECT_CREATE event to load the panel for each object that is created?
How can I call "RunUserInterface" to process UIR events without causing the code to hang? Is there a way to call "ProcessSystemEvents" continuously while the object exists?

Thanks for your help,
Jim Polstra
0 Kudos
Message 1 of 3
(2,601 Views)
There are a couple of examples that are included with CVI that demonstrate how to use CVI as an activex server. Open up help(F1), then under the Contents tab, go to Example Programs >> Communications >> ActiveX Examples >> Servers.

Also, under ..\Measurement Studio\CVI\bin folder, you will find a pdf called buildingactivexservers.pdf, which provides a detailed description of the activex servers created with CVI.

I hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 3
(2,601 Views)
I did read the pdf and look at the examples before I posted my question. I guess I wasn't specific enough.
I'm trying to build an Apartment Threaded dll ActiveX Server with a user interface, and there is no example of a dll server with a UI. Is there an example somewhere that I'm missing?
The pdf mentions that this type of server is best for a dll with a UI, but does not answer my questions about how and when to load the UI, and how to process UI events during the lifetime of the object, after it is created and dllMain returns.
Can you give me some tips on how to go about this?

Jim
0 Kudos
Message 3 of 3
(2,601 Views)