Certified for Vista. Test Case 32.

Hello ,

I've WER implementation from the Winqal Web site ( https://winqual.microsoft.com/help/default.htm#obtaining_a_verisign_class_3_digital_id.htm Developers Guide to WER ) employed in my MFC application, which is working perfectly on XP, but doesn't work at all on Vista.

From previous publications I understood, the way to get it working on Vista is the new API only ( http://msdn2.microsoft.com/en-us/library/ms681656.aspx ), which "... has been VASTLY improved ...", but I didn't found any useful example how to embedd this new API in real MFC application.

Current code looks like this:

#include "Werapi.h"

static LONG WINAPI ExceptionFilter( struct _EXCEPTION_POINTERS * pExceptionPointers )

{

LONG lRet = EXCEPTION_CONTINUE_SEARCH;

HREPORT hReportHandle;

PCWSTR pwzEventType = L"THE APPLICATION CRUSH";//the name of the event.

PWER_SUBMIT_RESULT pSubmitResult;

if(SUCCEEDED(WerReportCreate(

pwzEventType, //in

WerReportCritical, //in

0, //in

&hReportHandle //out

)))

{

if(hReportHandle){

if(SUCCEEDED(WerReportSubmit(

hReportHandle,

WerConsentNotAsked,

WER_SUBMIT_NO_QUEUE | WER_SUBMIT_OUTOFPROCESS,

pSubmitResult)))

{

lRet = EXCEPTION_EXECUTE_HANDLER;

}

WerReportCloseHandle(hReportHandle);

}

}

return lRet ;

}

....

BOOL CTestApp::InitInstance()

{

//WER

SetUnhandledExceptionFilter(ExceptionFilter);

.....

}

During the testing, I've got first dialog:

"Test has stopped working.

A problem caused the program to stop working correctly.

Windows will close program and notify you if a solution is available."

After I've clicked "Close", program was closed with no WER dialog.

In the log I've got just one information message with SOURCE - Windows Error Reporting.

Could you please explane to me how to fix my implementation for Vista to pass the test.

Thanks.

Oleg.



Answer this question

Certified for Vista. Test Case 32.

  • Kevin Southern

    Oliver,

    Thanks for the prompt reply, but even after cleaning the history it's not working.

    I can't see WER dialog. There is another dialog whith two buttons - "Debug" and "Close".

    But if I check the WER history, there is an entry "Report Sent".

    Generally I'm looking for the piece of code which will invoke the WER dialog.

    Could you suggest something

    Thanks.


  • Michael Ruminer

    Hi Oliver,

    To be able to pass the TC32 with MS testing autority I've to have it implemented in my C++ MFC(MDI) application, but your C# code would be halpefull. Could you e-mail your C# code to me pls

    Thanks.


  • ncazanav

    Try this:

    go to the control pannel to manage WER reports. Clear the history and restart the machine. I believe that after so may logs then WER doesn't try to send the same report over and over. I believe this is to prevent a denial of service attack.

    Please post back and let me know if that worked for you. This worked for me at one point so I think that was the solution.

  • JohnGalt

    No special code is necessary but a statement is made to the effect that in some cases you might need to add a remote thread which is you case your ok. Just look for the messages in the event log. 



  • foomunchoo

    False, you do not have to do ANYTHING for passing TC32. Just make sure you do not catch exceptions derived from SystemExceptions, or if you do so, make sure you rethrow them (with throw;)
  • sticksnap

    For passing test case 32, you do need to code anything ! Just make sure your application only handle exceptions that are known and expected.

    On crash of my app, WER does not display the "Send Information" button, but I passed this test case.

    Read carefully the test case, you are only asked to have the Application Error (Error) and WER Report (Info) in EventViewer. Nothing else.


  • Mike Stall - MSFT

    Thanks Julien,
    You've partialy resolved my doubts. I've those two messages in application log, it means more likely I'll pass the test.
    But if you look in "Certified for Vista Test Cases" document for the test case 32 there is a clear instruction about the verification:
    1. All of the application's executables above; when injected Access Violation (AV)
    resulted in the application crashing and must display the WER (Windows Error
    Reporting) dialog message in order to pass this test case. This means that the
    application AV failure properly allowed Windows Error Reporting to report this crash.

  • Markus Fritz

    Oliver,

    There is obviously a bug in Windows Vista. With some projects, WER does not send data, but in the "Problem Reports and Solutions" status is "Report Sent".

    I have tried several time to clear the problem history and to reboot, but it does not help.

    I think you should escalate the problem to Vista Support Team.


  • stswordman

    Did you want WER code that is managed (C# or VB.net)

    I have code in both that calls WER and sends a report. However it's supose to also send useful information with the report. Although is sends a report it doesn't have any useful information attached like the heap or my custom log file. I'm not sure why it doesn't completely work, but it would be a good start for you. Let me know if you're interested in it.

  • cwest

    The dialog box you have with "Close" button and maybe "Debug" button, is a WER Dialog box. It just has not the "Send" button for an unknown reason.

    With my certified app, I did not have to do anything special for WER, only make sure that catched exceptions are rethrown.

    It would be unfair to fail this test case for this reason, because I am pretty sure the bug is on Windows Vista side.


  • MadMojo1

    Hi Oliver,

    To be able to pass the TC32 on WER with MS testing authority your C# code would be helpful. Could you please e-mail your C# code to me.

    Thanks.



  • Certified for Vista. Test Case 32.