Modify ↓
Opened on Feb 6, 2011 at 6:21:36 PM
Closed on May 22, 2011 at 11:51:03 PM
Last modified on Jul 1, 2011 at 6:39:17 PM
#1874 closed Feature Request (Rejected)
Registry functions should return more meanginful values
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | Severity: | None | |
| Keywords: | regread, regwrite, regenumkey, regenumvalue | Cc: |
Description
Along with @error, @extended should tell the reason why the error occured e.g. for RegRead
Failure: Returns "" and sets the @error flag: 1 if unable to open requested key @extended is set to 1 key does not exist 2 read/write permission error 2 if unable to open requested main key 3 if unable to remote connect to the registry -1 if unable to open requested value @extended is set to 1 value does not exist 2 value is empty -2 if value type not supported @extended is set to type of the value $REG_... .
This kind of function could be more usable
Func RegExists($sKey, $sValue = "") Local $iReturn = RegRead($sKey, $sValue) If @error = 1 And @extended = 1 then Return SetError(0, 1, 0) ;key doesn't exist If @error = -1 And @extended = 1 then Return SetError(0, 2, 0) ; value doesnt exist If @error = -1 And @extended = 2 Return 1 ; empty values are fine with us If @error <> 0 And Return SetError(@error, @extended, $iReturn) ; an error occured Return 1 ; the key exists EndFunc
Attachments (0)
Change History (3)
comment:1 by , on Feb 6, 2011 at 8:00:02 PM
| Version: | 3.3.6.1 |
|---|
comment:2 by , on May 22, 2011 at 11:51:03 PM
| Resolution: | → Rejected |
|---|---|
| Status: | new → closed |
comment:3 by , on Jul 1, 2011 at 6:39:17 PM
I see this was rejected... Can explain why it was rejected?
Note:
See TracTickets
for help on using tickets.

Automatic ticket cleanup.