mirror of
https://github.com/reactos/reactos.git
synced 2025-05-21 18:16:07 +00:00
[EVENTVWR]
-Fix use of unitialized handle for the waiting dialog. -Allocate the size of one event for each event, not the amount of all events. svn path=/trunk/; revision=64520
This commit is contained in:
parent
6acee80eb2
commit
38258d656e
1 changed files with 4 additions and 3 deletions
|
@ -520,7 +520,7 @@ BOOL
|
||||||
QueryEventMessages(LPWSTR lpMachineName,
|
QueryEventMessages(LPWSTR lpMachineName,
|
||||||
LPWSTR lpLogName)
|
LPWSTR lpLogName)
|
||||||
{
|
{
|
||||||
HWND hwndDlg;
|
HWND hwndDlg=0;
|
||||||
HANDLE hEventLog;
|
HANDLE hEventLog;
|
||||||
EVENTLOGRECORD *pevlr;
|
EVENTLOGRECORD *pevlr;
|
||||||
DWORD dwRead, dwNeeded, dwThisRecord, dwTotalRecords = 0, dwCurrentRecord = 0, dwRecordsToRead = 0, dwFlags, dwMaxLength;
|
DWORD dwRead, dwNeeded, dwThisRecord, dwTotalRecords = 0, dwCurrentRecord = 0, dwRecordsToRead = 0, dwFlags, dwMaxLength;
|
||||||
|
@ -599,7 +599,7 @@ QueryEventMessages(LPWSTR lpMachineName,
|
||||||
|
|
||||||
while (dwCurrentRecord < dwTotalRecords)
|
while (dwCurrentRecord < dwTotalRecords)
|
||||||
{
|
{
|
||||||
pevlr = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD) * dwTotalRecords);
|
pevlr = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD));
|
||||||
g_RecordPtrs[dwCurrentRecord] = pevlr;
|
g_RecordPtrs[dwCurrentRecord] = pevlr;
|
||||||
|
|
||||||
bResult = ReadEventLog(hEventLog, // Event log handle
|
bResult = ReadEventLog(hEventLog, // Event log handle
|
||||||
|
@ -713,7 +713,8 @@ QueryEventMessages(LPWSTR lpMachineName,
|
||||||
}
|
}
|
||||||
|
|
||||||
// All events loaded
|
// All events loaded
|
||||||
EndDialog(hwndDlg, 0);
|
if(hwndDlg)
|
||||||
|
EndDialog(hwndDlg, 0);
|
||||||
|
|
||||||
StringCchPrintfExW(szWindowTitle,
|
StringCchPrintfExW(szWindowTitle,
|
||||||
sizeof(szWindowTitle) / sizeof(WCHAR),
|
sizeof(szWindowTitle) / sizeof(WCHAR),
|
||||||
|
|
Loading…
Reference in a new issue