SpaceControl DLL
Version 2.8.9
API documentation for the SpaceControl 3D input devices
|
These functions could not meaningful be sorted into the other sections. More...
Functions | |
ScStatus | scIsProcessRunning (char *processName, bool *isRunningP) |
Checks if the process with the given name is running or not. More... | |
ScStatus | scSetCurrentUserRegValue (char *keyP, char *nameP, char *valueP) |
Sets a new string value into the Windows registry under the base key HKEY_CURRENT_USER. More... | |
ScStatus | scQueryCurrentUserRegValue (char *keyP, char *nameP, int len, char *valueP) |
Queries a string value from the Windows registry under the base key HKEY_CURRENT_USER. More... | |
ScStatus | scDelCurrentUserRegValue (char *keyP, char *nameP) |
Deletes a string value in the Windows registry under the base key HKEY_CURRENT_USER. More... | |
ScStatus | scGetDllLogPars (char logFile[gMaxFileNameLen], int *maxSizeP, bool *isLogToFileP, bool *isLogToCnslP, bool *isWrnP, bool *isCrtP, bool *isTrcP, bool *isDcmP, bool *isIcmP, bool *isInfP, bool *isDbgP, bool *isTmpP, char exclFileToLog[gMaxFileNameLen]) |
Retrieves the logging parameters and filenames actually used by the internal DLL functions. More... | |
ScStatus | scSetDllLogPars (char logFile[gMaxFileNameLen], int maxSize, bool isLogToFile, bool isLogToCnsl, bool isWrn, bool isCrt, bool isTrc, bool isDcm, bool isIcm, bool isInf, bool isDbg, bool isTmp, char exclFileToLog[gMaxFileNameLen]) |
Sets the logging parameters actually used by the internal DLL functions. More... | |
These functions could not meaningful be sorted into the other sections.
ScStatus scDelCurrentUserRegValue | ( | char * | keyP, |
char * | nameP | ||
) |
Deletes a string value in the Windows registry under the base key HKEY_CURRENT_USER.
The following example deletes the entry "sc_daemon.exe" in "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run" making the sc_daemon.exe not autostart any longer.
This function does nothing used under Linux and returns SC_REGISTRY_ERROR.
Example:
keyP | path to the requested registry key (without "HKEY_CURRENT_USER") |
nameP | name of the registry entry to be deleted |
References SC_OK, and SC_REGISTRY_ERROR.
ScStatus scGetDllLogPars | ( | char | logFile[gMaxFileNameLen], |
int * | maxSizeP, | ||
bool * | isLogToFileP, | ||
bool * | isLogToCnslP, | ||
bool * | isWrnP, | ||
bool * | isCrtP, | ||
bool * | isTrcP, | ||
bool * | isDcmP, | ||
bool * | isIcmP, | ||
bool * | isInfP, | ||
bool * | isDbgP, | ||
bool * | isTmpP, | ||
char | exclFileToLog[gMaxFileNameLen] | ||
) |
Retrieves the logging parameters and filenames actually used by the internal DLL functions.
The Daemon and the API are using the same routines and have the same initializing logging parameters at program start but are executing in there own address space and have there own copies of all variables.
Example:
logFile | pointer to a string containing the log file's name and path |
maxSizeP | max. size of the log file in kB before it is renamed to *.bak |
isLogToFileP | if true logging is directed into a log file |
isLogToCnslP | if true logging is directed to the console |
isWrnP | if true warnings are logged |
isCrtP | if true creation and destruction of objects are logged |
isTrcP | if true trace messages are logged |
isDcmP | if true communication between driver and device is logged |
isIcmP | if true driver internal communication is logged |
isInfP | if true information messages are logged |
isDbgP | if true debug messages are logged |
isTmpP | if true data of temporal interest is logged |
exclFileToLogP | pointer to a string containing a file's name and path, which will be exclusively logged |
References SC_OK.
ScStatus scIsProcessRunning | ( | char * | processName, |
bool * | isRunningP | ||
) |
Checks if the process with the given name is running or not.
Example:
isRunningP | pointer to the result |
References SC_OK.
ScStatus scQueryCurrentUserRegValue | ( | char * | keyP, |
char * | nameP, | ||
int | len, | ||
char * | valueP | ||
) |
Queries a string value from the Windows registry under the base key HKEY_CURRENT_USER.
If the entry is not there the function returns SC_REGISTRY_ERROR.
The following example queries the entry "sc_daemon.exe" under the key "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run".
This function does nothing used under Linux and returns SC_REGISTRY_ERROR.
Example:
keyP | path to the requested registry key (without "HKEY_CURRENT_USER") |
nameP | name of the registry entry to be created or modified |
len | expected size of the return value (max. 256) |
valueP | value of the entry to be queried |
References SC_OK, and SC_REGISTRY_ERROR.
ScStatus scSetCurrentUserRegValue | ( | char * | keyP, |
char * | nameP, | ||
char * | valueP | ||
) |
Sets a new string value into the Windows registry under the base key HKEY_CURRENT_USER.
The following example sets the entry "sc_daemon.exe" into "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run" making the sc_daemon.exe autostarting.
This function does nothing used under Linux and returns SC_REGISTRY_ERROR.
Example:
keyP | path to the requested registry key (without "HKEY_CURRENT_USER") |
nameP | name of the registry entry to be created or modified |
valueP | value of the entry to be created or modified |
References SC_OK, and SC_REGISTRY_ERROR.
ScStatus scSetDllLogPars | ( | char | logFile[gMaxFileNameLen], |
int | maxSize, | ||
bool | isLogToFile, | ||
bool | isLogToCnsl, | ||
bool | isWrn, | ||
bool | isCrt, | ||
bool | isTrc, | ||
bool | isDcm, | ||
bool | isIcm, | ||
bool | isInf, | ||
bool | isDbg, | ||
bool | isTmp, | ||
char | exclFileToLog[gMaxFileNameLen] | ||
) |
Sets the logging parameters actually used by the internal DLL functions.
The Daemon and the DLL are using the same routines and have the same initializing logging parameters at program start but are executing in there own address space and have there own copies of all variables. Therefore you can set the DLL's logging parameters separately here. As in the daemon's configuration file you can provide the parameter logFile with a full path or with a pure file name. In the latter case the log file will be written in your home directory into the folder "SpaceController".
With the parameter exclFileToLog you can specify a source code file. If you do so only the output of this file will be logged, all other logging will be suppressed. To log all files set this parameter to "" as shown in the example.
Attention: This function has to be called after scConnect() because the logging parameters are reinitialized there with those out of the configuration file daemon.ini.
Example:
logFile | character string containing the log file's name and path |
maxSize | max. size of the log file in kB before it is renamed to *.bak |
isLogToFile | if true logging is directed into a log file |
isLogToCnsl | if true logging is directed to the console |
isWrn | if true warnings are logged |
isCrt | if true creation and destruction of objects are logged |
isTrc | if true trace messages are logged |
isDcm | if true communication between driver and device is logged |
isIcm | if true driver internal communication is logged |
isInf | if true information messages are logged |
isDbg | if true debug messages are logged |
isTmp | if true data of temporal interest is logged |
exclFileToLog | character string containing a file's name and path, which will be exclusively logged |
References SC_OK.
Copyright (c) SpaceControl GmbH & Co. KG, Am Technologiepark 10, D-82229 Seefeld |