Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
99172508
Commit
99172508
authored
Jul 14, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Jul 14, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Move some registry helper functions to registry.c.
parent
78f59dd7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
32 deletions
+32
-32
classes.c
dlls/msi/classes.c
+0
-32
msipriv.h
dlls/msi/msipriv.h
+1
-0
registry.c
dlls/msi/registry.c
+31
-0
No files found.
dlls/msi/classes.c
View file @
99172508
...
...
@@ -736,38 +736,6 @@ static void mark_mime_for_install( MSIMIME *mime )
mime
->
InstallMe
=
TRUE
;
}
LONG
msi_reg_set_val_str
(
HKEY
hkey
,
LPCWSTR
name
,
LPCWSTR
value
)
{
DWORD
len
=
value
?
(
lstrlenW
(
value
)
+
1
)
*
sizeof
(
WCHAR
)
:
0
;
return
RegSetValueExW
(
hkey
,
name
,
0
,
REG_SZ
,
(
LPBYTE
)
value
,
len
);
}
LONG
msi_reg_set_val_multi_str
(
HKEY
hkey
,
LPCWSTR
name
,
LPCWSTR
value
)
{
LPCWSTR
p
=
value
;
while
(
*
p
)
p
+=
lstrlenW
(
p
)
+
1
;
return
RegSetValueExW
(
hkey
,
name
,
0
,
REG_MULTI_SZ
,
(
LPBYTE
)
value
,
(
p
+
1
-
value
)
*
sizeof
(
WCHAR
)
);
}
LONG
msi_reg_set_val_dword
(
HKEY
hkey
,
LPCWSTR
name
,
DWORD
val
)
{
return
RegSetValueExW
(
hkey
,
name
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
DWORD
)
);
}
LONG
msi_reg_set_subkey_val
(
HKEY
hkey
,
LPCWSTR
path
,
LPCWSTR
name
,
LPCWSTR
val
)
{
HKEY
hsubkey
=
0
;
LONG
r
;
r
=
RegCreateKeyW
(
hkey
,
path
,
&
hsubkey
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
r
=
msi_reg_set_val_str
(
hsubkey
,
name
,
val
);
RegCloseKey
(
hsubkey
);
return
r
;
}
static
UINT
register_appid
(
MSIAPPID
*
appid
,
LPCWSTR
app
)
{
static
const
WCHAR
szAppID
[]
=
{
'A'
,
'p'
,
'p'
,
'I'
,
'D'
,
0
};
...
...
dlls/msi/msipriv.h
View file @
99172508
...
...
@@ -418,6 +418,7 @@ extern UINT MSIREG_OpenUserUpgradeCodesKey(LPCWSTR szProduct, HKEY* key, BOOL cr
extern
LONG
msi_reg_set_val_str
(
HKEY
hkey
,
LPCWSTR
name
,
LPCWSTR
value
);
extern
LONG
msi_reg_set_val_multi_str
(
HKEY
hkey
,
LPCWSTR
name
,
LPCWSTR
value
);
extern
LONG
msi_reg_set_val_dword
(
HKEY
hkey
,
LPCWSTR
name
,
DWORD
val
);
extern
LONG
msi_reg_set_subkey_val
(
HKEY
hkey
,
LPCWSTR
path
,
LPCWSTR
name
,
LPCWSTR
val
);
/* msi dialog interface */
typedef
UINT
(
*
msi_dialog_event_handler
)(
MSIPACKAGE
*
,
LPCWSTR
,
LPCWSTR
,
msi_dialog
*
);
...
...
dlls/msi/registry.c
View file @
99172508
...
...
@@ -305,6 +305,37 @@ BOOL encode_base85_guid( GUID *guid, LPWSTR str )
return
TRUE
;
}
LONG
msi_reg_set_val_str
(
HKEY
hkey
,
LPCWSTR
name
,
LPCWSTR
value
)
{
DWORD
len
=
value
?
(
lstrlenW
(
value
)
+
1
)
*
sizeof
(
WCHAR
)
:
0
;
return
RegSetValueExW
(
hkey
,
name
,
0
,
REG_SZ
,
(
LPBYTE
)
value
,
len
);
}
LONG
msi_reg_set_val_multi_str
(
HKEY
hkey
,
LPCWSTR
name
,
LPCWSTR
value
)
{
LPCWSTR
p
=
value
;
while
(
*
p
)
p
+=
lstrlenW
(
p
)
+
1
;
return
RegSetValueExW
(
hkey
,
name
,
0
,
REG_MULTI_SZ
,
(
LPBYTE
)
value
,
(
p
+
1
-
value
)
*
sizeof
(
WCHAR
)
);
}
LONG
msi_reg_set_val_dword
(
HKEY
hkey
,
LPCWSTR
name
,
DWORD
val
)
{
return
RegSetValueExW
(
hkey
,
name
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
DWORD
)
);
}
LONG
msi_reg_set_subkey_val
(
HKEY
hkey
,
LPCWSTR
path
,
LPCWSTR
name
,
LPCWSTR
val
)
{
HKEY
hsubkey
=
0
;
LONG
r
;
r
=
RegCreateKeyW
(
hkey
,
path
,
&
hsubkey
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
r
=
msi_reg_set_val_str
(
hsubkey
,
name
,
val
);
RegCloseKey
(
hsubkey
);
return
r
;
}
UINT
MSIREG_OpenUninstallKey
(
LPCWSTR
szProduct
,
HKEY
*
key
,
BOOL
create
)
{
...
...
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