Modify

Opened 14 years ago

Closed 14 years ago

#2132 closed Bug (Fixed)

_WinAPI_GetModuleHandle incorrect param handling

Reported by: wraithdu Owned by: guinness
Milestone: 3.3.9.1 Component: Standard UDFs
Version: 3.3.9.0 Severity: None
Keywords: winapi getmodulehandle Cc:

Description

The doc says to pass 0 for the current process handle. This code expects an empty string instead:

Func _WinAPI_GetModuleHandle($sModuleName)
	Local $sModuleNameType = "wstr"
	If $sModuleName = "" Then
		$sModuleName = 0
		$sModuleNameType = "ptr"
	EndIf

Either the code or doc should be fixed (MSDN says to use NULL, so I vote for sticking with the doc and fixing the code).

Attachments (0)

Change History (2)

comment:1 by trancexx, 14 years ago

Correct would be to pass Null keyword. Documentation should be updated to say that.
These workarounds were necessity before Null was introduced to AutoIt. They are more like burden now.

comment:2 by guinness, 14 years ago

Milestone: 3.3.9.1
Owner: set to guinness
Resolution: Fixed
Status: newclosed

Fixed by revision [6795] in version: 3.3.9.1

Modify Ticket

Action
as closed The owner will remain guinness.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.