   How to obtain the mem usage for a window in win32
  Hello!Inside the game I want to view the realtime memory usage. There is a function in win32 called "GetProcessMemoryInfo()" which returns the info about the memory used by a process. Now how do I obtain the process identifier if I have the handle to the window, so that I can pass this process ID to the previously mentioned function?Thanks!   
GetWindowThreadProcessId() is what you want.   