CmReadProfilingEntry
Description
CmReadProfilingEntry allows to read profiling entries and other information of an installed CodeMeter runtime. Currently, it returns the actual value of a profiling entry as string.
|
Triple Mode Redundancy-related information (TMR)
|
Syntax
CmReadProfilingEntry( HCMSysEntry hcmse, CMULONG flCtrl, const char * pszEntryName, char * pszValue, CMUINT cbValue )
Parameter
hcmse contains a handle opened by CmAccess / CmAccess2. It has to be a handle on the local system of any type (e.g. Subsystem Access).
If an access is directed to a remote CodeMeter server, 0 is returned and CmGetLastErrorCode() will return CMERROR_WRONG_HANDLE_TYPE (115).
flCtrl is currently reserved for future extensions and is to be set to a value of 0.
pszEntryName contains the pointer to the name of the profiling entry as ASCII string, e.g. "ExePath".
For available profiling entries see CodeMeter.ini or Server.ini. The table below shows you where to find the respective files.
Operating System |
Configuration File |
|---|---|
Windows |
%Program Files%\CodeMeter\Runtime\bin\CodeMeter.ini |
macOS |
\Library\Preferences\com.wibu.CodeMeter.Server.ini |
Linux |
\etc\wibu\CodeMeter/Server.ini |
|
Path specifications Parameter not located in the group [General] require the EntryName separated by a backslash "\". e.g. [HTTP] RemoteRead=1 requires the string "HTTP\RemoteRead" Parameter locating in the group [General] are not allowed to have the EntryName as string name separated by a backslash "\". e.g. [General] Logging=0 requires the string "Logging". If specifying a non-existing value or an invalid path, 0 is returned and CmGetLastErrorCode() will return CMERROR_INVALID_PARAMETER (105). |
pszValue contains the pointer to an output buffer receiving the value of the profiling entry.
Return
Returns the number of stored bytes in the output buffer including the terminating NULL. If an error occurred, the return value is 0.
If pszValue does not contain enough memory, the number of bytes will be returned. In this case, the return value is larger than the cbValue parameter and error code CMERROR_BUFFER_OVERFLOW is set.
Numerical profiling values are also returned as string.
Notes
CmReadProfilingEntry is supported since CodeMeter Version 5.20.
Syntax
public bool CmReadProfilingEntry(HCMSysEntry hcmse, uint Ctrl, string EntryName, out string Value)
Parameter
hcmse contains a handle opened by CmAccess / CmAccess2. It has to be a handle on the local system of any type (e.g. Subsystem Access).
If an access is directed to a remote CodeMeter server, 0 is returned and CmGetLastErrorCode() will return CMERROR_WRONG_HANDLE_TYPE (115).
Ctrl is currently reserved for future extensions and is to be set to a value of 0.
EntryName contains the pointer to the name of the profiling entry as ASCII string, e.g. "ExePath".
For available profiling entries see CodeMeter.ini or Server.ini. The table below shows you where to find the respective files.
Operating System |
Configuration File |
|---|---|
Windows |
%Program Files%\CodeMeter\Runtime\bin\CodeMeter.ini |
macOS |
\Library\Preferences\com.wibu.CodeMeter.Server.ini |
Linux |
\etc\wibu\CodeMeter/Server.ini |
|
Path specifications Parameter not located in the group [General] require the EntryName separated by a backslash "\". e.g. [HTTP] RemoteRead=1 requires the string "HTTP\RemoteRead" Parameter locating in the group [General] are not allowed to have the EntryName as string name separated by a backslash "\". e.g. [General] Logging=0 requires the string "Logging". If specifying a non-existing value or an invalid path, 0 is returned and CmGetLastErrorCode() will return CMERROR_INVALID_PARAMETER (105). |
Value contains the pointer to an output buffer receiving the value of the profiling entry.
Return
Returns the number of stored bytes in the output buffer including the terminating NULL. If an error occurred, the return value is 0.
If Value does not contain enough memory, the number of bytes will be returned. In this case, the return value is larger than theValue parameter and error code CMERROR_BUFFER_OVERFLOW is set.
Numerical profiling values are also returned as string.
Notes
CmReadProfilingEntry is supported since CodeMeter Version 5.20.
Syntax
import cmapi
handle.CmReadProfilingEntry(pszEntryName: str) -> str
throws CodeMeterApiFailedException()
Parameter
handle is the handle opened by CmAccess2. It has to be a handle on the local system of any type (e.g. Subsystem Access).
If an access is directed to a remote CodeMeter server, 0 is returned and CmGetLastErrorCode() will return cmapi.CMERROR_WRONG_HANDLE_TYPE (115).
flCtrl is currently reserved for future extensions and is to be set to a value of 0.
pszEntryName contains the pointer to the name of the profiling entry as ASCII string, e.g. "ExePath".
For available profiling entries see CodeMeter.ini or Server.ini. The table below shows you where to find the respective files.
Operating System |
Configuration File |
|---|---|
Windows |
%Program Files%\CodeMeter\Runtime\bin\CodeMeter.ini |
macOS |
\Library\Preferences\com.wibu.CodeMeter.Server.ini |
Linux |
\etc\wibu\CodeMeter/Server.ini |
|
Path specifications Parameter not located in the group [General] require the EntryName separated by a backslash "\". e.g. [HTTP] RemoteRead=1 requires the string "HTTP\RemoteRead" Parameter locating in the group [General] are not allowed to have the EntryName as string name separated by a backslash "\". e.g. [General] Logging=0 requires the string "Logging". If specifying a non-existing value or an invalid path, 0 is returned and CmGetLastErrorCode() will return cmapi.CMERROR_INVALID_PARAMETER (105). |
pszValue contains the pointer to an output buffer receiving the value of the profiling entry.
Return
Returns the value of the entry in form of a "str" object. If an error occurred, an exception is thrown.
Numerical profiling values are also returned as string.
Notes
CmReadProfilingEntry is supported since CodeMeter Version 5.20.