Modify ↓
Opened on Feb 9, 2012 at 3:24:11 PM
#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:2 by , on Feb 16, 2012 at 3:14:33 PM
| Milestone: | → 3.3.9.1 |
|---|---|
| Owner: | set to |
| Resolution: | → Fixed |
| Status: | new → closed |
Fixed by revision [6795] in version: 3.3.9.1
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.