Closed Bug 289860 Opened 19 years ago Closed 16 years ago

RegSetValue() is obsolete

Categories

(Core :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1b1

People

(Reporter: bernd_mozilla, Assigned: sgautherie)

References

(Blocks 1 open bug, )

Details

Attachments

(1 obsolete file)

for my reference, this function is available on nt3.1
CTho, want to drive this in?
Attachment #180387 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #180387 - Flags: review?(timeless)
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-
Neil: do you have a url for where one could read this?
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)
Comment on attachment 180387 [details] [diff] [review]
patch (compiles, not tested)
[Moved to bug 287943]

This patch was "fixed" and included in bug 287943 ;-)
1.8 branch:
<http://mxr.mozilla.org/mozilla1.8/search?string=%5B%5EWin%5DRegSetValue%5B%5EEx%5D&regexp=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
Blocks: Win16Removal
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.
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.
mapi/old can be removed - we just use it to see how the previous mapi implementation worked, but it can be removed now.
Depends on: 227649
(In reply to comment #11)
> mapi/old can be removed

Well, I had already filed bug 289860 ;->
(In reply to comment #12)
> Well, I had already filed bug 289860 ;->

Bah: bug 227649 !
(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.
Attachment #180387 - Attachment description: patch (compiles, not tested) → patch (compiles, not tested) [Moved to bug 287943]
(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.

Attachment

General

Created:
Updated:
Size: