Sign in to follow this  
Followers 0
XTensionX

DllCall

4 posts in this topic

hey, im trying to make this work with all windows type

DllCall("user32.dll", "long", "GetWindowLong", "hwnd", $hwnd, "int", -8)

I tried working around with it but no hope ;)

Here is what i got so far

$hnd = WinGetHandle("Example")
$check = "GetWindowLong"
If @AutoItX64 Then $check = "GetWindowLongPtr"

DllCall("user32.dll", "long", $check, "hwnd", $hwnd, "int", -8)

There seems to be something wrong with my script but I cant seem to find what it is

Hope someone could help me with this :huh2:

Share this post


Link to post
Share on other sites



$hnd <> $hwnd

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

From standard WinAPI UDF

Func _WinAPI_GetWindowLong($hWnd, $iIndex)
    Local $sFuncName = "GetWindowLongW"
    If @AutoItX64 Then  $sFuncName = "GetWindowLongPtrW"
    Local $aResult = DllCall("user32.dll", "long_ptr", $sFuncName, "hwnd", $hWnd, "int", $iIndex)
    If @error Then Return SetError(@error, @extended, 0)
    Return $aResult[0]
EndFunc   ;==>_WinAPI_GetWindowLong

Share this post


Link to post
Share on other sites

Thanks for reply guys :huh2:

$hnd <> $hwnd

Br,

UEZ

Sorry was my bad :/, i rewritten the code and left a letter :S

From standard WinAPI UDF

Func _WinAPI_GetWindowLong($hWnd, $iIndex)
    Local $sFuncName = "GetWindowLongW"
    If @AutoItX64 Then  $sFuncName = "GetWindowLongPtrW"
    Local $aResult = DllCall("user32.dll", "long_ptr", $sFuncName, "hwnd", $hWnd, "int", $iIndex)
    If @error Then Return SetError(@error, @extended, 0)
    Return $aResult[0]
EndFunc   ;==>_WinAPI_GetWindowLong

Thanks got what i wanted ;)

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  
Followers 0