|Download Help (Windows Only)|
NISysCfgStatus NISysCfgInitializeSession( const char targetName, const char username, const char password, NISysCfgLocale language, NISysCfgBool forcePropertyRefresh, unsigned int connectTimeoutMsec, NISysCfgEnumExpertHandle * expertEnumHandle, NISysCfgSessionHandle * sessionHandle );
Initializes a system configuration session with a specific system. You must use this function to obtain a handle for a specified target that can be used in other System Configuration functions.
This function communicates to the device at the specified address. If the device is no longer online, but it has previously been discovered in Measurement & Automation Explorer (MAX), this function succeeds, allowing you to retrieve cached information about the device. To determine if a Real-Time target is online, use the NISysCfgGetSystemProperty function to return System Status.
|targetName||const char ||Specifies the IP address (ex. "220.127.116.11" ), MAC address (ex. "00:80:12:34:56:AB" ), or DNS name (ex. "myhost" ) of the target on a local or Real-Time system. The target defaults to the local system. Values such as a NULL pointer, an empty string, and the strings localhost or 127.0.0.1 also mean the local system.|
|username||const char ||Specifies the username for the system you are initializing. Leave this parameter NULL if your target is running LabWindows/CVI 2009 Real-Time Module or earlier or if you are connecting to the local system.|
|password||const char ||Specifies the password for the system you are initializing. Leave this parameter NULL if no password has been set or if you are connecting to the local system.|
Specifies the language.
|forcePropertyRefresh||NISysCfgBool||Forces properties to be refreshed every time they are read by default. If FALSE, properties are queried once and cached in memory, which can optimize performance.|
|connectTimeoutMsec||unsigned int||Specifies the time, in milliseconds, that the function waits before the operation times out. When the operation succeeds, the session handle that is returned is set to the default NISYSCFG_REMOTE_DEFAULT_TIMEOUT_MSEC, which is defined as 300000 (5 minutes) in nisyscfg.h. Call NISysCfgSetRemoteTimeout to change the default connection timeout for subsequent operations.|
|expertEnumHandle||NISysCfgEnumExpertHandle *||A handle to NI products and drivers on the system that can interact with the System Configuration functions.
Call NISysCfgNextExpertInfo to obtain information about each expert.
When it is no longer needed, this handle must be discarded using NISysCfgCloseHandle. This parameter can be NULL if you do not need this information.
|sessionHandle||NISysCfgSessionHandle *||Returns a handle for the system configuration session for the system.
When it is no longer needed, this handle must be discarded using NISysCfgCloseHandle.
|returnValue||NISysCfgStatus||The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error. Refer to Status Codes or nisyscfg_errors.h for details regarding error codes.|