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
3d4ce5c2
Commit
3d4ce5c2
authored
Mar 10, 2005
by
Juan Lang
Committed by
Alexandre Julliard
Mar 10, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement MsiEnumRelatedProducts.
parent
b9a9de6e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
92 additions
and
4 deletions
+92
-4
msipriv.h
dlls/msi/msipriv.h
+1
-0
registry.c
dlls/msi/registry.c
+91
-4
No files found.
dlls/msi/msipriv.h
View file @
3d4ce5c2
...
@@ -364,6 +364,7 @@ extern UINT MSIREG_OpenComponents(HKEY* key);
...
@@ -364,6 +364,7 @@ extern UINT MSIREG_OpenComponents(HKEY* key);
extern
UINT
MSIREG_OpenComponentsKey
(
LPCWSTR
szComponent
,
HKEY
*
key
,
BOOL
create
);
extern
UINT
MSIREG_OpenComponentsKey
(
LPCWSTR
szComponent
,
HKEY
*
key
,
BOOL
create
);
extern
UINT
MSIREG_OpenProductsKey
(
LPCWSTR
szProduct
,
HKEY
*
key
,
BOOL
create
);
extern
UINT
MSIREG_OpenProductsKey
(
LPCWSTR
szProduct
,
HKEY
*
key
,
BOOL
create
);
extern
UINT
MSIREG_OpenUserFeaturesKey
(
LPCWSTR
szProduct
,
HKEY
*
key
,
BOOL
create
);
extern
UINT
MSIREG_OpenUserFeaturesKey
(
LPCWSTR
szProduct
,
HKEY
*
key
,
BOOL
create
);
extern
UINT
MSIREG_OpenUpgradeCodesKey
(
LPCWSTR
szProduct
,
HKEY
*
key
,
BOOL
create
);
/* msi dialog interface */
/* msi dialog interface */
typedef
VOID
(
*
msi_dialog_event_handler
)(
MSIPACKAGE
*
,
LPCWSTR
,
LPCWSTR
,
msi_dialog
*
);
typedef
VOID
(
*
msi_dialog_event_handler
)(
MSIPACKAGE
*
,
LPCWSTR
,
LPCWSTR
,
msi_dialog
*
);
...
...
dlls/msi/registry.c
View file @
3d4ce5c2
...
@@ -117,6 +117,23 @@ static const WCHAR szInstaller_Products_fmt[] = {
...
@@ -117,6 +117,23 @@ static const WCHAR szInstaller_Products_fmt[] = {
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
's'
,
'\\'
,
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
's'
,
'\\'
,
'%'
,
's'
,
0
};
'%'
,
's'
,
0
};
static
const
WCHAR
szInstaller_UpgradeCodes
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'\\'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'r'
,
'\\'
,
'U'
,
'p'
,
'g'
,
'r'
,
'a'
,
'd'
,
'e'
,
'C'
,
'o'
,
'd'
,
'e'
,
's'
,
0
};
static
const
WCHAR
szInstaller_UpgradeCodes_fmt
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'\\'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'r'
,
'\\'
,
'U'
,
'p'
,
'g'
,
'r'
,
'a'
,
'd'
,
'e'
,
'C'
,
'o'
,
'd'
,
'e'
,
's'
,
'\\'
,
'%'
,
's'
,
0
};
BOOL
unsquash_guid
(
LPCWSTR
in
,
LPWSTR
out
)
BOOL
unsquash_guid
(
LPCWSTR
in
,
LPWSTR
out
)
{
{
DWORD
i
,
n
=
0
;
DWORD
i
,
n
=
0
;
...
@@ -389,6 +406,26 @@ UINT MSIREG_OpenProductsKey(LPCWSTR szProduct, HKEY* key, BOOL create)
...
@@ -389,6 +406,26 @@ UINT MSIREG_OpenProductsKey(LPCWSTR szProduct, HKEY* key, BOOL create)
return
rc
;
return
rc
;
}
}
UINT
MSIREG_OpenUpgradeCodesKey
(
LPCWSTR
szUpgradeCode
,
HKEY
*
key
,
BOOL
create
)
{
UINT
rc
;
WCHAR
squished_pc
[
GUID_SIZE
];
WCHAR
keypath
[
0x200
];
TRACE
(
"%s
\n
"
,
debugstr_w
(
szUpgradeCode
));
squash_guid
(
szUpgradeCode
,
squished_pc
);
TRACE
(
"squished (%s)
\n
"
,
debugstr_w
(
squished_pc
));
sprintfW
(
keypath
,
szInstaller_UpgradeCodes_fmt
,
squished_pc
);
if
(
create
)
rc
=
RegCreateKeyW
(
HKEY_LOCAL_MACHINE
,
keypath
,
key
);
else
rc
=
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
keypath
,
key
);
return
rc
;
}
/*************************************************************************
/*************************************************************************
* MsiDecomposeDescriptorW [MSI.@]
* MsiDecomposeDescriptorW [MSI.@]
*
*
...
@@ -700,15 +737,65 @@ UINT WINAPI MsiEnumComponentQualifiersW( LPWSTR szComponent, DWORD iIndex,
...
@@ -700,15 +737,65 @@ UINT WINAPI MsiEnumComponentQualifiersW( LPWSTR szComponent, DWORD iIndex,
UINT
WINAPI
MsiEnumRelatedProductsW
(
LPCWSTR
szUpgradeCode
,
DWORD
dwReserved
,
UINT
WINAPI
MsiEnumRelatedProductsW
(
LPCWSTR
szUpgradeCode
,
DWORD
dwReserved
,
DWORD
iProductIndex
,
LPWSTR
lpProductBuf
)
DWORD
iProductIndex
,
LPWSTR
lpProductBuf
)
{
{
FIXME
(
"%s %lu %lu %p
\n
"
,
debugstr_w
(
szUpgradeCode
),
dwReserved
,
UINT
rc
;
HKEY
hkey
;
WCHAR
szKeyName
[
33
];
TRACE
(
"%s %lu %lu %p
\n
"
,
debugstr_w
(
szUpgradeCode
),
dwReserved
,
iProductIndex
,
lpProductBuf
);
iProductIndex
,
lpProductBuf
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
if
(
NULL
==
szUpgradeCode
)
return
ERROR_INVALID_PARAMETER
;
if
(
NULL
==
lpProductBuf
)
return
ERROR_INVALID_PARAMETER
;
rc
=
MSIREG_OpenUpgradeCodesKey
(
szUpgradeCode
,
&
hkey
,
FALSE
);
if
(
rc
!=
ERROR_SUCCESS
)
{
rc
=
ERROR_NO_MORE_ITEMS
;
goto
end
;
}
rc
=
RegEnumKeyW
(
hkey
,
iProductIndex
,
szKeyName
,
sizeof
(
szKeyName
)
/
sizeof
(
szKeyName
[
0
]));
unsquash_guid
(
szKeyName
,
lpProductBuf
);
RegCloseKey
(
hkey
);
end:
return
rc
;
}
}
UINT
WINAPI
MsiEnumRelatedProductsA
(
LPCSTR
szUpgradeCode
,
DWORD
dwReserved
,
UINT
WINAPI
MsiEnumRelatedProductsA
(
LPCSTR
szUpgradeCode
,
DWORD
dwReserved
,
DWORD
iProductIndex
,
LPSTR
lpProductBuf
)
DWORD
iProductIndex
,
LPSTR
lpProductBuf
)
{
{
FIXME
(
"%s %lu %lu %p
\n
"
,
debugstr_a
(
szUpgradeCode
),
dwReserved
,
UINT
rc
;
int
len
;
LPWSTR
szUpgradeCodeW
=
NULL
;
TRACE
(
"%s %lu %lu %p
\n
"
,
debugstr_a
(
szUpgradeCode
),
dwReserved
,
iProductIndex
,
lpProductBuf
);
iProductIndex
,
lpProductBuf
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
if
(
!
szUpgradeCode
)
return
ERROR_INVALID_PARAMETER
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szUpgradeCode
,
-
1
,
NULL
,
0
);
szUpgradeCodeW
=
(
LPWSTR
)
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
szUpgradeCodeW
)
{
WCHAR
productW
[
39
];
MultiByteToWideChar
(
CP_ACP
,
0
,
szUpgradeCode
,
-
1
,
szUpgradeCodeW
,
len
);
rc
=
MsiEnumRelatedProductsW
(
szUpgradeCodeW
,
dwReserved
,
iProductIndex
,
productW
);
if
(
rc
==
ERROR_SUCCESS
)
{
LPWSTR
ptr
;
for
(
ptr
=
productW
;
*
ptr
;
)
*
lpProductBuf
++
=
*
ptr
++
;
}
HeapFree
(
GetProcessHeap
(),
0
,
szUpgradeCodeW
);
}
else
rc
=
ERROR_OUTOFMEMORY
;
return
rc
;
}
}
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