Modify

Opened 7 years ago

Closed 7 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 Changed 7 years ago by trancexx

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 Changed 7 years ago by guinness

  • Milestone set to 3.3.9.1
  • Owner set to guinness
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [6795] in version: 3.3.9.1

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain guinness.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.