Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
48b3eee1
Commit
48b3eee1
authored
Aug 22, 2000
by
Mark Hammond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Registered modules could only exist in HKEY_LOCAL_MACHINE - now HKEY_CURRENT_USER can override.
parent
79f1c177
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
PC/import_nt.c
PC/import_nt.c
+12
-3
No files found.
PC/import_nt.c
View file @
48b3eee1
...
...
@@ -34,7 +34,7 @@ FILE *PyWin_FindRegisteredModule(const char *moduleName,
#endif
struct
filedescr
*
fdp
=
NULL
;
FILE
*
fp
;
HKEY
keyBase
=
HKEY_
LOCAL_MACHINE
;
HKEY
keyBase
=
HKEY_
CURRENT_USER
;
int
modNameSize
;
long
regStat
;
...
...
@@ -56,8 +56,17 @@ FILE *PyWin_FindRegisteredModule(const char *moduleName,
modNameSize
=
pathLen
;
regStat
=
RegQueryValue
(
keyBase
,
moduleKey
,
pathBuf
,
&
modNameSize
);
if
(
regStat
!=
ERROR_SUCCESS
)
{
/* No user setting - lookup in machine settings */
keyBase
=
HKEY_LOCAL_MACHINE
;
/* be anal - failure may have reset size param */
modNameSize
=
pathLen
;
regStat
=
RegQueryValue
(
keyBase
,
moduleKey
,
pathBuf
,
&
modNameSize
);
if
(
regStat
!=
ERROR_SUCCESS
)
return
NULL
;
}
/* use the file extension to locate the type entry. */
for
(
fdp
=
_PyImport_Filetab
;
fdp
->
suffix
!=
NULL
;
fdp
++
)
{
size_t
extLen
=
strlen
(
fdp
->
suffix
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment