// ProcessThreadID.cpp : Defines the entry point for the application.
//

#include "stdafx.h"

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
 	// TODO: Place code here.

	HANDLE hProcess=GetCurrentProcess();
	HANDLE hThread=GetCurrentThread();
	TCHAR strProcess[256];
	TCHAR strThread[256];
	wsprintf(strProcess,"%d",hProcess);
	wsprintf(strThread,"%d",hThread);

	MessageBox(NULL,strProcess,strThread,MB_OK);
//

	DWORD iProcessID=GetCurrentProcessId();
	DWORD iThreadID=GetCurrentThreadId();
	//TCHAR strProcess[256];
	//TCHAR strThread[256];
	wsprintf(strProcess,"%d",iProcessID);
	wsprintf(strThread,"%d",iThreadID);

	MessageBox(NULL,strProcess,strThread,MB_OK);
	return 0;
}