Modify ↓
Opened 13 years ago
Closed 13 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 13 years ago by trancexx
comment:2 Changed 13 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.
Note: See
TracTickets for help on using
tickets.
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.