fgokey / crashrpt

Automatically exported from code.google.com/p/crashrpt
0 stars 0 forks source link

can't make the crashreporter installed #233

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I use CrashRpt in two of my projects, one works great, but another does not 
work. The code is placed at the header of function _tWinMain, looks like:

int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
                     _In_opt_ HINSTANCE hPrevInstance,
                     _In_ LPTSTR    lpCmdLine,
                     _In_ int       nCmdShow)
{
    CR_INSTALL_INFO info = {0};
    info.cb = sizeof(CR_INSTALL_INFO);  
    info.pszUrl = Settings::CrashReporterURL;                    

    info.dwFlags |= CR_INST_ALL_POSSIBLE_HANDLERS | CR_INST_SHOW_ADDITIONAL_INFO_FIELDS; 

    info.pszPrivacyPolicyURL = Settings::PolicyURL;
    info.pszAppName = Settings::ProductName; // Define application name.
    info.pszAppVersion = Settings::ProductVersion; // Define application version.

    int nResult = crInstall(&info);
    if(nResult!=0)
    {
        TCHAR buff[256];
        crGetLastErrorMsg(buff, 256);
        MessageBox(NULL, buff, _T("crInstall error"), MB_OK);
    }

///....
}

crInstall fails every time, and the error message is "pInfo is NULL or 
pInfo->cb member is not valid.".  My project is using UNICODE

What version of CrashRpt are you using?
1402
What is your version of Visual Studio?
vs2012
What is your version of Windows operating system?
win7 64bit 7600
Please provide any additional information below.

Original issue reported on code.google.com by acs...@gmail.com on 12 Jan 2014 at 4:28

GoogleCodeExporter commented 9 years ago
solved by specify structure alignment

Original comment by acs...@gmail.com on 12 Jan 2014 at 5:36

GoogleCodeExporter commented 9 years ago

Original comment by zexspect...@gmail.com on 13 Apr 2014 at 8:25