All pastes #286671 Raw Edit

Mine

public c v1 · immutable
#286671 ·published 2006-12-20 21:14 UTC
rendered paste body
#include <stdio.h>#include <windows.h>HWND hwnd_winamp;int FindWinamp();void main() {	int test, intLen;	LPSTR strTitle;	test = FindWinamp();	if (test == 1) {		intLen = GetWindowTextLength(hwnd_winamp);		strTitle = new char[intLen+1];		GetWindowText(hwnd_winamp, strTitle, intLen+1);		printf("%s\n", strTitle);	} else {		printf("Did not find Winamp window.\n");	}}int FindWinamp() {	hwnd_winamp = FindWindow("Winamp v1.x", 0);    if (hwnd_winamp != NULL) {        return 1;    } else {        return 0;    }}