Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions Source/NativeTest/NativeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,23 @@
#include "ProcMonDebugOutput.h"


int _tmain(void)
int wmain()
{
WCHAR szText[100];
wchar_t szText[100];
for (int i = 0; i < 20; i++)
{
_stprintf_s(szText,
_countof(szText),
L"ProcMon Debug Out Test # %d",
i);
swprintf_s(szText, L"ProcMon Debug Out Test # %d", i);
BOOL bRet = ProcMonDebugOutput(szText);
if (TRUE == bRet)
{
_tprintf(L"Wrote %d\n", i);
wprintf(L"Wrote %d\n", i);
}
else
{
_tprintf(L"error 0x%x\n", GetLastError());
wprintf(L"error 0x%x\n", GetLastError());
}
::Sleep(500);
}
return (0);
return 0;
}

1 change: 0 additions & 1 deletion Source/NativeTest/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "targetver.h"

#include <stdio.h>
#include <tchar.h>
#include <windows.h>


Expand Down
Binary file added Source/ProcMonDebugOutput-CPP-Review.docx
Binary file not shown.
2 changes: 1 addition & 1 deletion Source/ProcMonDebugOutput/ProcMonDebugOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace {
{
// I'm attempting the open every time because the user could start
// Process Monitor after their process.
g_hDevice = ::CreateFile(L"\\\\.\\Global\\ProcmonDebugLogger",
g_hDevice = ::CreateFile(LR"(\\.\Global\ProcmonDebugLogger)",
GENERIC_WRITE,
FILE_SHARE_WRITE,
nullptr,
Expand Down