Jump to content
Sign in to follow this  
gil900

how can i check if some process start using dx9/dx10/dx11/ogl and more?

Recommended Posts

gil900

EDIT:

No matter ..
I decided not to ask it.

Delete the thread please.

Edited by gil900

Share this post


Link to post
Share on other sites
FireFox

Hi,

I will nonetheless answer to your question: list the modules and check the directx dll name which will tell you the directx version.

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
gil900

Hi,

I will nonetheless answer to your question: list the modules and check the directx dll name which will tell you the directx version.

Br, FireFox.

 

i need to do a check on running process to know if this process using dx9/dx10/dx11/ogl.

checking the dll name in the "app" folder (If there is such dll file) Indeed tell me the directx version which used by the app.

but in the "app" folder not every exe file using dx / ogl. i need to know which exe file in the "app" folder using dx9/dx10/dx11/ogl.

OR

i need to know what is the main exe file of the "app" folder.

 

If you know how to do it, Can you give example code?

Edited by gil900

Share this post


Link to post
Share on other sites
FireFox

Something like this:

#include <WinAPIEx.au3>
 
Local $aSupportedModules[5][2] = _
        [["d3d9.dll", "Direct3D9"], _
        ["d3d10.dll", "Direct3D10"], _
        ["d3d10_1.dll", "Direct3D10_1"], _
        ["d3d11.dll", "Direct3D11"], _
        ["d3d11_1.dll", "Direct3D11_1"]]
 
; I have a window named test with some D3D.
Local $iPID = WinGetProcess("test")
If $iPID = 0 Then Exit 1
 
Local $aModules = _WinAPI_EnumProcessModules($iPID)
 
For $i = 2 To $aModules[0][0] ;skip the own proc
    For $i2 = 0 To UBound($aSupportedModules, 1) -1
        If StringRegExpReplace($aModules[$i][1], "^.*\\", "") = $aSupportedModules[$i2][0] Then
            ConsoleWrite("module found: " & $aSupportedModules[$i2][1] & @CrLf)
            ExitLoop 2
        EndIf
    Next
Next

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
gil900

 

Something like this:

#include <WinAPIEx.au3>
 
Local $aSupportedModules[5][2] = _
        [["d3d9.dll", "Direct3D9"], _
        ["d3d10.dll", "Direct3D10"], _
        ["d3d10_1.dll", "Direct3D10_1"], _
        ["d3d11.dll", "Direct3D11"], _
        ["d3d11_1.dll", "Direct3D11_1"]]
 
; I have a window named test with some D3D.
Local $iPID = WinGetProcess("test")
If $iPID = 0 Then Exit 1
 
Local $aModules = _WinAPI_EnumProcessModules($iPID)
 
For $i = 2 To $aModules[0][0] ;skip the own proc
    For $i2 = 0 To UBound($aSupportedModules, 1) -1
        If StringRegExpReplace($aModules[$i][1], "^.*\\", "") = $aSupportedModules[$i2][0] Then
            ConsoleWrite("module found: " & $aSupportedModules[$i2][1] & @CrLf)
            ExitLoop 2
        EndIf
    Next
Next

 

I always knew this forum have geniuses people :)

but it is not working :(

>"D:\Portable Programs\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "D:\?????\DATA\Desktop\test3.au3"    
D:\???????\DATA\Desktop\test3.au3 (16) : ==> Subscript used with non-Array variable.:
For $i = 2 To $aModules[0][0]
For $i = 2 To $aModules^ ERROR
>Exit code: 1    Time: 0.614

Maybe you missed something?

EDIT:

now it is working!

just changed the $iPID = WinGetProcess("test") to

$iPID = <the pid number>

 

Your example is very help a lot!!

It saved me develop a very complicated detection option which does not always work.

It saved me several days of developing

You deserve a donation!

Edited by gil900

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×