Open_HM_ExtAPI()
Opens HyperMesh session and returns pointer to API object.
Syntax
HM_ExtAPI* Open_HM_ExtAPI(
int* err_code,
int nargs,
void** args
);
Type
HyperMesh Ext API
Description
The function Open_HM_ExtAPI() must be called prior to using HyperMesh API. The function locates existing HyperMesh installation and loads HyperMesh DLL that provides API functionality that can be accessed by using the pointer to API object returned from the call to the Open_HM_ExtAPI() function. To terminate HyperMesh session and optionally unload HyperMesh DLL call the function Close_HM_ExtAPI().
If the function succeeds, the pointer to the API object instantiated in HyperMesh DLL is returned.
If the function fails, the return value is NULL. Check the value returned in the variable pointed by err_code to get more information about the error.
In case the second call to the function Open_HM_ExtAPI() is made without prior call to Close_HM_ExtAPI() function the return value is the same pointer to the API object that was returned during the first call. However, in this case ERR_XAPI_ALREADYOPEN is set in err_code variable as the error value.
Requires including hm_extapi.h, hm_extapi.dll and hm_extapi.lib.
Inputs
- err_code
- [in] - Pointer to integer variable. If not NULL then when function returns the variable will contain error status value, which can have following values.
- nargs
- [in] - Number of additional arguments. Currently not used. Set to zero.
- args
- [in] - Additional arguments. Currently not used. Set to NULL.
Errors
None.