Custom Query (3927 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (400 - 402 of 3927)

Ticket Resolution Summary Owner Reporter
#1297 Fixed wrong $bPasswordHash in the example of _Crypt_HashData-documentation, crypt.au3? Valik skyteddy <rainer@…>
Description

Hello,

the $bPasswordHash in the example of the _Crypt_HashData-documentation from crypt.au3 is not correct.

The right one is 0xCE950A8D7D367B5CE038E636893B49DC, or may you change the "Yellow fruit that is popular among monkeys" to the string which fits to the given $bPasswordHash :-)

Or may I don't understand the example?

Many thanks! R@iner

#1299 Fixed AU3Check: #include with Single-Quote character, File not found. Valik anonymous
Description

AU3Check (1.54.14.0) versus (1.54.19.0) AU3Check (1.54.19.0) can't find #include files with single-quote characters. like: #include 'debug.au3'

#1300 Fixed DllCall() unloads the loaded module Valik trancexx
Description

There is a possible situation with freeing loaded modules that are not initially loaded (load-time dynamic linking). Modules loaded only by call to LoadLibrary function -DllCall(), are unloaded unintentionally (user perspective) in some situations. Script demonstrates this behavior:

Global $hWINHTTP = DllOpen("winhttp.dll") ; for example
ConsoleWrite("Internal handle of the module: ")
ConsoleWrite($hWINHTTP & @CRLF)


ConsoleWrite("Real handle of the module: ")
ConsoleWrite(_GetModuleHandle("winhttp.dll") & @CRLF)


; Calling the 'wrong' function will unload the module. Why?
DllCall($hWINHTTP, "none", "Blahblah") ; There is no "Blahblah" function exported from winhttp.dll

; But there is no change with internal handle. That's ok for now.
ConsoleWrite("Internal handle of the module: ")
ConsoleWrite($hWINHTTP & @CRLF)

; Get real handle again. This time it will fail because AutoIt called FreeLibrary internally already.
ConsoleWrite("Real handle of the module: ")
ConsoleWrite(_GetModuleHandle("winhttp.dll") & @CRLF) ; will cause error because the module is unloaded

; Check internal handle again:
ConsoleWrite("Internal handle of the module: ")
ConsoleWrite($hWINHTTP & @CRLF)


; DllOpen again to check internal count of handles. This should be 1 because the module is unloaded by AutoIt internally, but it's 2 in this case.
$hWINHTTP = DllOpen("winhttp.dll")
ConsoleWrite("Internal handle after reopening the module: ")
ConsoleWrite($hWINHTTP & @CRLF) ; it's increased by one, like there were no unloading happening



Func _GetModuleHandle($sModule)

	Local $aCall = DllCall("kernel32.dll", "ptr", "GetModuleHandleW", "wstr", $sModule)

	If @error Or Not $aCall[0] Then
		Return SetError(1, 0, -1) ; just to show error
	EndIf

	Return $aCall[0]

EndFunc   ;==>_GetModuleHandle

This is bad because effectively it disables us from declaring dll handles on global scope (as constant even more):

; Load module and get handle
Global Const $hWINHTTP = DllOpen("winhttp.dll")

; Unload it unintentionally
DllCall($hWINHTTP, "none", "Blahblah") ; comment this line out for script to work properly

; Call some function from that dll
Global $aCall = DllCall($hWINHTTP, "int", "WinHttpCheckPlatform") ; http://msdn.microsoft.com/en-us/library/aa384089(VS.85).aspx

ConsoleWrite("! WinHttpCheckPlatform @error = " & @error & @CRLF) ; will be 3
ConsoleWrite("WinHttpCheckPlatform return value = " & $aCall[0] & @CRLF)

It's clearly intentional, therefore it's not a bug, but still it would be nice if someone could share some light on the matter. Is declaring dll handles on global scope ok, or is it more proper to open handle prior actual call (and close it afterwards), or maybe to call by string and DllOpen() it once at top of the script if necessary, or whatever?

Thanks in advance.

Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.