Download Sapera
Transcript
You can obtain an associated description string by calling the function CorManGetStatusText, which returns a string including a description of the status code. CORSTATUS status; char szText[256]; // Status code // Status text // Call an API function status = CorXXX(...); // Get the associated text string CorManGetStatusText(status, szText, sizeof(szText), NULL, 0); You can also obtain more detailed information by calling the function CorManGetStatusTextEx, which returns a string for each field of the status code. CORSTATUS status; char id[128], info[128], level[64], module[64]; // Call an API function status = CorXXX(...); // Get the associated text strings CorManGetStatusTextEx(status, id, sizeof(id), info, sizeof(info), level, sizeof(level), module, sizeof(module)); Monitoring Sapera Errors The logview.exe utility program included with Sapera provides an easy way to view status code returned by API functions. logview.exe is a simple Windows program that includes a list box that stores the status code description strings as soon as they are logged in the API. Options allow you to modify the different fields for display. It is recommended to start LogView before starting your application and then let it run so it can be referred to any time a detailed error description is required. However, errors are also stored by a lowlevel service (running in the background), even if LogView is not running. Therefore, it is possible to run it only when a problem occurs while running your application. Sapera User's Manual Introducing the Sapera API • 39