Custom Query

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (58 - 60 of 3866)

Ticket Resolution Summary Owner Reporter
#2263 Completed Add CryptGenRandom Function to Crypt.au3 UDF AdmiralAlkex wraithdu
Description

Here's the function:

; #FUNCTION# ===================================================================
; Name...........: _Crypt_GenRandom
; Description ...: Fill a buffer with cryptographically random data.
; Syntax.........: _Crypt_GenRandom($pBuffer, $iSize)
; Parameters ....: $pBuffer - Pointer to buffer to fill with random data.
;                  $iSize - Size of the buffer pointed to by $pBuffer.
; Return values .: Success - Returns True
;                  Failure - Returns False and sets @error.
; Author ........: Erik Pilsits (wraithdu)
; Modified ......:
; Remarks .......: 
; Related .......: 
; Link ..........: @@MsdnLink@@ CryptGenRandom
; Example .......: Yes
; ==============================================================================
Func _Crypt_GenRandom($pBuffer, $iSize)
    _Crypt_Startup()
    Local $aRet = DllCall(__Crypt_DllHandle(), "bool", "CryptGenRandom", "handle", __Crypt_Context(), "dword", $iSize, "ptr", $pBuffer)
    Local $nError = @error
    _Crypt_Shutdown()
    If $nError Or (Not $aRet[0]) Then
        Return SetError(1, 0, False)
    Else
        Return True
    EndIf
EndFunc   ;==>_Crypt_GenRandom
#3054 Fixed _Crypt_GenRandom always returns False and sets @error BrewManNH wraithdu
Description

The function sets $iError = @error + 10 without checking @error. Further, I see no documentation or reason for @error + 10 at all.

Func _Crypt_GenRandom($pBuffer, $iSize)
	_Crypt_Startup()
	Local $aRet = DllCall(__Crypt_DllHandle(), "bool", "CryptGenRandom", "handle", __Crypt_Context(), "dword", $iSize, "struct*", $pBuffer)
	Local $iError = @error + 10, $iExtended = @extended
	_Crypt_Shutdown()
	If $iError Or (Not $aRet[0]) Then
		Return SetError($iError, $iExtended, False)
	Else
		Return True
	EndIf
EndFunc   ;==>_Crypt_GenRandom
#11 Rejected WinWaitActive error WaitingUserInfo wooltown
Description

The following code doesn't give an error, it just waits eternally, the ")" after "Connected" is erratic, but it is accepted by AutoIT. AutoIT should complain about it.

If WinWaitActive("MEs Connected"),"",5) Then
	Run ("pstools\pskill.exe javaw.exe","",@SW_HIDE)
EndIf
Note: See TracQuery for help on using queries.