Windows C++ / OutputDebugString

Author Thomas Roccia (fr0gger)
Platform Windows
Language C++
Technique OutputDebugString

Code

#include <stdio.h>
#include <Windows.h>

int main()
{
	SetLastError(0);
	
        // Send string to the debugger
	OutputDebugStringA("Hello friend");

	if (GetLastError() != 0)
	{
		printf("Debugger detected!!\n");
	}
        system("pause");
	return 0;
}

Created

September 17, 2020

Last Revised

April 22, 2024