Hi all,
In my program i want to detect all active processes(games) in memory which uses directdraw..
I have procedure to get th32ProcessID (from PROCESSENTRY32) for active processes but what to do next ?
In my program i want to detect all active processes(games) in memory which uses directdraw..
I have procedure to get th32ProcessID (from PROCESSENTRY32) for active processes but what to do next ?
Gee, I'm not so good with COM, and I guess that's where this question belongs.
DirectX is a COM object, and it increments an internal instance counter for each interface that you instantiate, but I'm not sure that Windows operating system keeps any information on what processes are accessing what com objects.
I think that's why m$ stress so often that it's up to the programmer to release anything that's instanced through com.
DirectX is a COM object, and it increments an internal instance counter for each interface that you instantiate, but I'm not sure that Windows operating system keeps any information on what processes are accessing what com objects.
I think that's why m$ stress so often that it's up to the programmer to release anything that's instanced through com.
Or you could just enumerate the DLL's that a process uses and check for:
ddraw.dll
dplayxy.dll
dsouns.dll
dinput.dll
Besides i am pretty sure that when a DX program finishes all its alocated objects are properly released by the OS.
After all you call a function inside OS when calling DIrectdraw and OS can keep records of all data objects alocated by an application. ;)
ddraw.dll
dplayxy.dll
dsouns.dll
dinput.dll
Besides i am pretty sure that when a DX program finishes all its alocated objects are properly released by the OS.
After all you call a function inside OS when calling DIrectdraw and OS can keep records of all data objects alocated by an application. ;)