Closed
Bug 289860
Opened 20 years ago
Closed 16 years ago
RegSetValue() is obsolete
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b1
People
(Reporter: bernd_mozilla, Assigned: sgautherie)
References
(Blocks 1 open bug, )
Details
Attachments
(1 obsolete file)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/regsetvalue.asp
this function should be replaced by RegSetValueEx as we do in many other places:
http://lxr.mozilla.org/seamonkey/search?string=RegSetValueEx%28
Comment 3•20 years ago
|
||
CTho, want to drive this in?
Assignee: jag → cst
Attachment #180387 -
Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #180387 -
Flags: review?(timeless)
Whiteboard: [cst: r? sr?]
Comment 4•20 years ago
|
||
Comment on attachment 180387 [details] [diff] [review]
patch (compiles, not tested)
[Moved to bug 287943]
The documentation for RegSetValueEx says that it only emulates RegSetValue if
the value name is null.
Attachment #180387 -
Flags: superreview?(neil.parkwaycc.co.uk) → superreview-
Comment 6•20 years ago
|
||
I originally read that in the WIN32SDK.HLP file, but the current documentation
phrases it differently:
RegSetValue:
LPCSTR lpSubKey:
... The function sets the default value of the specified subkey. If this
parameter is NULL or points to an empty string, the function sets the default
value of the key identified by hKey.
RegSetValueEx:
LPCSTR lpValueName:
... If lpValueName is NULL or an empty string, "", the function sets the type
and data for the key's unnamed or default value.
Thus the two functions are only interchangeable if the value is NULL or "".
Whiteboard: [cst: r? sr?] → [cst: patch is wrong]
Attachment #180387 -
Attachment is obsolete: true
Attachment #180387 -
Flags: review?(timeless)
Assignee: cst → jag
Assignee | ||
Comment 7•17 years ago
|
||
Comment on attachment 180387 [details] [diff] [review]
patch (compiles, not tested)
[Moved to bug 287943]
This patch was "fixed" and included in bug 287943 ;-)
Assignee | ||
Comment 8•17 years ago
|
||
1.8 branch:
<http://mxr.mozilla.org/mozilla1.8/search?string=%5B%5EWin%5DRegSetValue%5B%5EEx%5D®exp=on&case=on&filter=%5E%5B%5E%5C0%5D*%24&tree=mozilla1.8>
{{
/mailnews/mapi/old/mapi32/xpapi.cpp
* line 154 -- BOOL retVal = (RegSetValue(hKey, pKey, REG_SZ, pStr, lstrlen(pStr) + 1) == ERROR_SUCCESS);
}}
1.9 trunk has another one:
{{
/modules/softupdt/src/nsWinReg.cpp
* line 247 -- result = RegSetValue( HKEY_CLASSES_ROOT, subkey, REG_SZ, value, length );
}}
Assignee: jag → nobody
Component: XP Apps → General
Depends on: 287943
Product: Mozilla Application Suite → Core
QA Contact: general
Whiteboard: [cst: patch is wrong]
Version: unspecified → Trunk
Assignee | ||
Updated•17 years ago
|
Blocks: Win16Removal
Assignee | ||
Comment 9•17 years ago
|
||
Peter,
<http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/modules/softupdt/src/nsWinReg.cpp&rev=1.5&mark=247#227>
I was going to (try and) remove all the |#ifdef WIN32| from the file.
But I noticed (and was puzzled by) the few |#if defined (WIN32) || defined (XP_OS2)|.
Could you check whether we want +/- of these ?
(and possibly submit a patch ?)
Thanks.
Assignee | ||
Comment 10•17 years ago
|
||
David,
<http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/mailnews/mapi/old/mapi32/xpapi.cpp&rev=1.3&mark=154#142>
Does this file need to be fixed,
or should the </mailnews/mapi/old/*/*> directories be removed ?
(on 1.8 branch, and 1.9 trunk)
Thanks.
Comment 11•17 years ago
|
||
mapi/old can be removed - we just use it to see how the previous mapi implementation worked, but it can be removed now.
Assignee | ||
Comment 12•17 years ago
|
||
Assignee | ||
Comment 13•17 years ago
|
||
Comment 14•17 years ago
|
||
(In reply to comment #9)
> <http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/modules/softupdt/src/nsWinReg.cpp&rev=1.5&mark=247#227>
>
> I was going to (try and) remove all the |#ifdef WIN32| from the file.
> But I noticed (and was puzzled by) the few |#if defined (WIN32) || defined
> (XP_OS2)|.
>
> Could you check whether we want +/- of these ?
> (and possibly submit a patch ?)
Can anyone explain to me when and how that code is actually used? OS/2 contains a subset of the Win32 API dating back to 10 years or more, so if used that code will probably still be working on OS/2.
Assignee | ||
Updated•16 years ago
|
Attachment #180387 -
Attachment description: patch (compiles, not tested) → patch (compiles, not tested)
[Moved to bug 287943]
Assignee | ||
Comment 15•16 years ago
|
||
(In reply to comment #8)
> /mailnews/mapi/old/mapi32/xpapi.cpp
This file was removed by bug 227649.
> /modules/softupdt/src/nsWinReg.cpp
This (directory and) file exists in cvs but not in Hg.
R.Fixed
Assignee: nobody → sgautherie.bz
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b1
You need to log in
before you can comment on or make changes to this bug.
Description
•