Edit ActiveX Server Wizard — Edit ActiveX Interface Panel
Use this dialog box to edit an ActiveX interface in your server.
Each interface is identified by its name in the generated code. For each interface, LabWindows/CVI automatically generates an IID, a special GUID required by COM. For each interface, you can provide a help string, which is stored in the type library, and a help context identifier, which links to the information in the help file.
- Name—The name of your interface. The interface name must be a valid C identifier and be less than 20 ASCII characters in length.
- Interface Type—Choose from the following interface types:
- Custom Interface—These interfaces are derived directly from the IUnknown interface and contain the three IUnknown functions in addition to the user-defined methods and properties. Custom interfaces also are known as IUnknown-derived interfaces or early-bound interfaces.
- Dispinterface—These interfaces are exposed as IDispatch interfaces. IDispatch is derived from the IUnknown interface. Dispinterfaces contain the three IUnknown functions in addition to the four IDispatch functions: GetTypeInfoCount, GetTypeInfo, GetIDsOfNames, and Invoke. These interfaces do not contain additional entries for functions representing user-defined methods and properties in their v-tables. Instead, they use numbers called DISPIDs to represent the user-defined methods and properties. Dispinterface interfaces also are known as pure Dispatch, or late-bound, interfaces.
- Dual Interface—These interfaces are derived from the IDispatch interface. In addition to the IUnknown functions and the IDispatch functions, these interfaces contain additional functions in their v-tables to represent user-defined methods and properties. A dual interface can act as both a custom interface as well as a dispinterface.
- Event Interface—COM objects do not implement these interfaces but use them to send COM events. Custom,
dispinterface, and dual interface types also are known as incoming interfaces because calls come to the object
through these interfaces. Event interfaces also are known as outgoing interfaces because calls (events) go out of
the object through them.
If you select an event interface in the Edit ActiveX Object panel for an ActiveX object, then LabWindows/CVI generates helper functions for each member of the event interface, which you can call to fire the corresponding events. Sample use of these generated event wrapper functions is also generated in the header file. The members of an even interface can be methods as well as properties. Notice that event interfaces are not implemented by the ActiveX object but by the ActiveX client application that receives events from the object. If you use LabWindows/CVI to generate the ActiveX client for your ActiveX server, then you can call the generated Event Registration functions to register callback functions in the client program to be called when the ActiveX object fires the corresponding events.
- Help String—The help string for this interface. LabWindows/CVI stores the help string in your server's type library.
- Help Context—If you specified a help file for your server, enter the context ID for this interface's help information. LabWindows/CVI stores the context ID in your server's type library.
- GUID (IID)—LabWindows/CVI automatically generates an IID for your server. You can use a different GUID by entering a new IID in the string control. You must specify the IID in registry format. You can use the guidgen.exe utility from Microsoft to generate GUIDs. For more information and to obtain guidgen.exe, refer to the Microsoft Web site.
- Methods and Properties—Displays the methods and properties in this interface.
- Add Method—Adds a new method to this interface.
- Add Property—Adds a new property to this interface.
- Edit—Edits the current method or property in the list.
- Delete—Deletes the current method or property in the list.
- Move Up—Moves the current method or property up one position in the list.
- Move Down—Moves the current method or property down one position in the list.
- Import Methods—Imports ActiveX methods based on function prototypes in existing include files.
For more information, refer to the Building ActiveX Servers in LabWindows/CVI book, which describes the LabWindows/CVI ActiveX server tools and functions in more detail and contains sample code fragments and hints for server development.