GME  13
CR_INSTALL_INFOW Struct Reference

This structure defines the general information used by crInstall() More...

#include <CrashRpt.h>


Detailed Description

This structure defines the general information used by crInstall()

Remarks:

CR_INSTALL_INFOW and CR_INSTALL_INFOA structures are wide-character and multi-byte character versions of CR_INSTALL_INFO. CR_INSTALL_INFO typedef defines character set independent mapping.

cb [in, required]

This must contain the size of this structure in bytes.

pszAppName [in, optional]

This is the friendly name of the client application. The application name is displayed in the Error Report dialog. If this parameter is NULL, the name of EXE file that was used to start caller process becomes the application name.

pszAppVersion [in, optional]

Should be the application version. Example: "1.0.1".

If this equals to NULL, product version is extracted from the executable file which started the caller process, and this product version is used as application version. If the executable file doesn's have a version info resource, the crInstall() function will fail.

pszEmailTo [in, optional]

This is the email address of the recipient of error reports, for example "name@example.com". If this equals to NULL, the crash report won't be sent using E-mail client.

Keep this NULL if you plan to use large error reports (more than several MB in size), because large emails may be rejected by the mail server.

To define a custom port for SMTP connection, use the following address format: "user@example.com:port", where port is the placeholder for the port number.

pszEmailSubject [in, optional]

This is the subject of the email message. If this parameter is NULL, the default subject of form '[app_name] [app_version] Error Report' is generated.

pszUrl is the URL of a server-side script that would receive crash report data via HTTP or HTTPS connection. If this parmeter is NULL, HTTP(S) connection won't be used to send crash reports. For example of a server-side script that can receive crash reports, see sending_error_reports.

HTTP(S) transport is the recommended way of sending large error reports (more than several MB in size). To define a custom port for HTTP(S) connection, use the following URL format: "http://example.com[:port]/crashrpt.php" or "https://example.com[:port]/crashrpt.php", where optional port is the placeholder for the port number.

pszCrashSenderPath [in, optional]

This is the absolute path to the directory where CrashSender.exe is located. The crash sender process is responsible for letting end user know about the crash and sending the error report. If this is NULL, it is assumed that CrashSender.exe is located in the same directory as CrashRpt.dll.

pfnCrashCallback [in, optional]

This can be a pointer to the LPGETLOGFILE() crash callback function. The crash callback function is called by CrashRpt when crash occurs and allows user to be notified. If this is NULL, crash callback function is not called.

uPriorities [in, optional]

This is an array that defines the preferred methods of sending error reports. The available methods are: HTTP (or HTTPS) connection, SMTP connection or simple MAPI (default mail client).

A priority is a non-negative integer number or special constant CR_NEGATIVE_PRIORITY. The greater positive number defines the greater priority. Specify the CR_NEGATIVE_PRIORITY to skip the given way.

The element having index CR_HTTP defines priority for using HTML connection. The element having index CR_SMTP defines priority for using SMTP connection. The element having index CR_SMAPI defines priority for using the default mail client.

The methods having greater priority will be tried first. If priorities are equal to each other, HTTP (or HTTPS) connection will be tried the first, SMTP connection will be tried the second and simple MAPI will be tried the last.

dwFlags [in, optional]

Since v1.1.2, dwFlags can be used to define behavior parameters. This can be a combination of the following values:

Use the combination of the following constants to specify what exception handlers to install:
CR_INST_ALL_EXCEPTION_HANDLERS Install all available exception handlers.
CR_INST_SEH_EXCEPTION_HANDLER Install SEH exception handler.
CR_INST_PURE_CALL_HANDLER Install pure call handler (VS .NET and later).
CR_INST_NEW_OPERATOR_ERROR_HANDLER Install new operator error handler (VS .NET and later).
CR_INST_SECURITY_ERROR_HANDLER Install security errror handler (VS .NET and later).
CR_INST_INVALID_PARAMETER_HANDLER Install invalid parameter handler (VS 2005 and later).
CR_INST_SIGABRT_HANDLER Install SIGABRT signal handler.
CR_INST_SIGINT_HANDLER Install SIGINT signal handler.
CR_INST_SIGTERM_HANDLER Install SIGTERM signal handler.
Use the combination of the following constants to define behavior parameters:
CR_INST_NO_GUI

Available since v.1.2.2 Do not show GUI.

It is not recommended to use this flag for regular GUI-based applications. Use this only for services that have no GUI.

CR_INST_HTTP_BINARY_ENCODING

Available since v.1.2.2 This affects the way of sending reports over HTTP. By specifying this flag, you enable usage of multi-part HTTP uploads with binary encoding instead of the legacy way (Base64-encoded form data).

It is recommended to always specify this flag, because it is more suitable for large error reports. The legacy way is supported for backwards compatibility and not recommended to use. For additional information, see sending_error_reports.

CR_INST_DONT_SEND_REPORT Available since v.1.2.2 This parameter means 'do not send error report immediately on crash, just save it locally'. Use this if you have direct access to the machine where crash happens and do not need to send report over the Internet. You can use this in couple with CR_INST_STORE_ZIP_ARCHIVES flag to store zipped error reports along with uncompressed error report files.
CR_INST_APP_RESTART Available since v.1.2.4 This parameter allows to automatically restart the application on crash. The command line for the application is taken from pszRestartCmdLine parameter. To avoid cyclic restarts of an application which crashes on startup, the application is restarted only if at least 60 seconds elapsed since its start.
CR_INST_NO_MINIDUMP

Available since v.1.2.4 Specify this parameter if you want minidump file not to be included into crash report. The default behavior is to include the minidump file.

CR_INST_SEND_QUEUED_REPORTS

Available since v.1.2.5 Specify this parameter to send all queued reports. Those report files are by default stored in LOCAL_APPDATA%\CrashRpt\UnsentCrashReports\AppName_AppVersion% folder. If this is specified, CrashRpt checks if it's time to remind user about recent errors in the application and offers to send all queued error reports.

CR_INST_STORE_ZIP_ARCHIVES

Available since v.1.2.7 This parameter can be used in couple with CR_INST_DONT_SEND_REPORT flag to store not only uncompressed error report files, but also ZIP archives. By default (if this flag omitted) CrashRpt stores all error report files in uncompressed state.

pszPrivacyPolicyURL [in, optional]

Since v1.1.2, this defines the URL for the Privacy Policy hyperlink of the Error Report dialog. If this parameter is NULL, the link is not displayed. For information on the Privacy Policy, see error_report.

pszDebugHelpDLL [in, optional]

Since v1.2.1, this parameter defines the location of the dbghelp.dll to load. If this parameter is NULL, the dbghelp.dll is searched using the default search sequence.

uMiniDumpType [in, optional]

Since v.1.2.1, this parameter defines the minidump type. For the list of available minidump types, see the documentation for the MiniDumpWriteDump() function in MSDN.

It is recommended to set this parameter with zero (equivalent of MiniDumpNormal constant). Other values may increase the minidump size significantly. If you plan to use values other than zero, also specify the CR_INST_HTTP_BINARY_ENCODING flag for dwFlags parameter.

pszErrorReportSaveDir [in, optional]

Since v.1.2.2, this parameter defines the directory where to save the error reports. If this is NULL, the default directory is used (%LOCAL_APP_DATA%\CrashRpt\UnsentCrashReports\%AppName%_%AppVersion%).

pszRestartCmdLine [in, optional]

Since v.1.2.4, parameter defines the string that specifies the command-line arguments for the application when it is restarted (when using CR_INST_APP_RESTART flag). Do not include the name of the executable in the command line; it is added automatically. This parameter can be NULL.

pszLangFilePath [in, optional]

Since v.1.2.4, this parameter defines the absolute path (including file name) for language file. If this is NULL, the lang file is assumed to be located in the same dir as CrashSender.exe file and have the name crashrpt_lang.ini.

pszEmailText [in, optional]

Since v.1.2.4, this parameter defines the custom E-mail text that is used when deliverying error report as E-mail. If this is NULL, the default E-mail text is used. It is recommended to set this parameter with NULL.

pszSmtpProxy [in, optional]

Since v.1.2.4, this parameter defines the network address and port formatted as "IP:port" to use as SMTP proxy. Example: "192.168.1.1:2525". If this is NULL, the SMTP server address is resolved using the MX record of sender's or recipient's mailbox. You should typically set this parameter with NULL, except in the case when your software is a server and custom SMTP configuration is required.

pszCustomSenderIcon [in, optional]

Since v.1.2.8, this parameter can be used to define a custom icon for Error Report dialog. The value of this parameter should be absolute address to the image containing the icon resource, followed by resource identifier separated by comma. You can set this parameter with NULL to use the default icon.

The resource identifier is a zero-based index of the icon to retrieve. For example, if this value is 0, the first icon in the specified file is used. If the identifier is a negative number not equal to -1, the icon in the specified file whose resource identifier is equal to the absolute value of the resource identifier is used. Example: "D:\MyApp\Resources.dll, -128".


The documentation for this struct was generated from the following file: