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
0b1b703f
Commit
0b1b703f
authored
Feb 16, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Feb 16, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move product, feature and component enumeration functions to
registry.c.
parent
993fbb94
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
228 additions
and
229 deletions
+228
-229
msi.c
dlls/msi/msi.c
+0
-229
registry.c
dlls/msi/registry.c
+228
-0
No files found.
dlls/msi/msi.c
View file @
0b1b703f
...
...
@@ -970,219 +970,6 @@ UINT WINAPI MsiMessageBoxW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uT
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
UINT
WINAPI
MsiEnumProductsA
(
DWORD
index
,
LPSTR
lpguid
)
{
DWORD
r
;
WCHAR
szwGuid
[
GUID_SIZE
];
TRACE
(
"%ld %p
\n
"
,
index
,
lpguid
);
if
(
NULL
==
lpguid
)
{
return
ERROR_INVALID_PARAMETER
;
}
r
=
MsiEnumProductsW
(
index
,
szwGuid
);
if
(
r
==
ERROR_SUCCESS
)
WideCharToMultiByte
(
CP_ACP
,
0
,
szwGuid
,
-
1
,
lpguid
,
GUID_SIZE
,
NULL
,
NULL
);
return
r
;
}
UINT
WINAPI
MsiEnumProductsW
(
DWORD
index
,
LPWSTR
lpguid
)
{
HKEY
hkeyFeatures
=
0
;
DWORD
r
;
WCHAR
szKeyName
[
33
];
TRACE
(
"%ld %p
\n
"
,
index
,
lpguid
);
if
(
NULL
==
lpguid
)
return
ERROR_INVALID_PARAMETER
;
r
=
MSIREG_OpenFeatures
(
&
hkeyFeatures
);
if
(
r
!=
ERROR_SUCCESS
)
goto
end
;
r
=
RegEnumKeyW
(
hkeyFeatures
,
index
,
szKeyName
,
GUID_SIZE
);
unsquash_guid
(
szKeyName
,
lpguid
);
end:
if
(
hkeyFeatures
)
RegCloseKey
(
hkeyFeatures
);
return
r
;
}
UINT
WINAPI
MsiEnumFeaturesA
(
LPCSTR
szProduct
,
DWORD
index
,
LPSTR
szFeature
,
LPSTR
szParent
)
{
DWORD
r
;
WCHAR
szwFeature
[
GUID_SIZE
],
szwParent
[
GUID_SIZE
];
LPWSTR
szwProduct
=
NULL
;
TRACE
(
"%s %ld %p %p
\n
"
,
debugstr_a
(
szProduct
),
index
,
szFeature
,
szParent
);
if
(
szProduct
)
{
UINT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szProduct
,
-
1
,
NULL
,
0
);
szwProduct
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
if
(
szwProduct
)
MultiByteToWideChar
(
CP_ACP
,
0
,
szProduct
,
-
1
,
szwProduct
,
len
);
else
return
ERROR_FUNCTION_FAILED
;
}
r
=
MsiEnumFeaturesW
(
szwProduct
,
index
,
szwFeature
,
szwParent
);
if
(
r
==
ERROR_SUCCESS
)
{
WideCharToMultiByte
(
CP_ACP
,
0
,
szwFeature
,
-
1
,
szFeature
,
GUID_SIZE
,
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
szwParent
,
-
1
,
szParent
,
GUID_SIZE
,
NULL
,
NULL
);
}
HeapFree
(
GetProcessHeap
(),
0
,
szwProduct
);
return
r
;
}
UINT
WINAPI
MsiEnumFeaturesW
(
LPCWSTR
szProduct
,
DWORD
index
,
LPWSTR
szFeature
,
LPWSTR
szParent
)
{
HKEY
hkeyProduct
=
0
;
DWORD
r
,
sz
;
TRACE
(
"%s %ld %p %p
\n
"
,
debugstr_w
(
szProduct
),
index
,
szFeature
,
szParent
);
r
=
MSIREG_OpenFeaturesKey
(
szProduct
,
&
hkeyProduct
,
FALSE
);
if
(
r
!=
ERROR_SUCCESS
)
goto
end
;
sz
=
GUID_SIZE
;
r
=
RegEnumValueW
(
hkeyProduct
,
index
,
szFeature
,
&
sz
,
NULL
,
NULL
,
NULL
,
NULL
);
end:
if
(
hkeyProduct
)
RegCloseKey
(
hkeyProduct
);
return
r
;
}
UINT
WINAPI
MsiEnumComponentsA
(
DWORD
index
,
LPSTR
lpguid
)
{
DWORD
r
;
WCHAR
szwGuid
[
GUID_SIZE
];
TRACE
(
"%ld %p
\n
"
,
index
,
lpguid
);
r
=
MsiEnumComponentsW
(
index
,
szwGuid
);
if
(
r
==
ERROR_SUCCESS
)
WideCharToMultiByte
(
CP_ACP
,
0
,
szwGuid
,
-
1
,
lpguid
,
GUID_SIZE
,
NULL
,
NULL
);
return
r
;
}
UINT
WINAPI
MsiEnumComponentsW
(
DWORD
index
,
LPWSTR
lpguid
)
{
HKEY
hkeyComponents
=
0
;
DWORD
r
;
WCHAR
szKeyName
[
33
];
TRACE
(
"%ld %p
\n
"
,
index
,
lpguid
);
r
=
MSIREG_OpenComponents
(
&
hkeyComponents
);
if
(
r
!=
ERROR_SUCCESS
)
goto
end
;
r
=
RegEnumKeyW
(
hkeyComponents
,
index
,
szKeyName
,
GUID_SIZE
);
unsquash_guid
(
szKeyName
,
lpguid
);
end:
if
(
hkeyComponents
)
RegCloseKey
(
hkeyComponents
);
return
r
;
}
UINT
WINAPI
MsiEnumClientsA
(
LPCSTR
szComponent
,
DWORD
index
,
LPSTR
szProduct
)
{
DWORD
r
;
WCHAR
szwProduct
[
GUID_SIZE
];
LPWSTR
szwComponent
=
NULL
;
TRACE
(
"%s %ld %p
\n
"
,
debugstr_a
(
szComponent
),
index
,
szProduct
);
if
(
szComponent
)
{
UINT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szComponent
,
-
1
,
NULL
,
0
);
szwComponent
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
if
(
szwComponent
)
MultiByteToWideChar
(
CP_ACP
,
0
,
szComponent
,
-
1
,
szwComponent
,
len
);
else
return
ERROR_FUNCTION_FAILED
;
}
r
=
MsiEnumClientsW
(
szComponent
?
szwComponent
:
NULL
,
index
,
szwProduct
);
if
(
r
==
ERROR_SUCCESS
)
{
WideCharToMultiByte
(
CP_ACP
,
0
,
szwProduct
,
-
1
,
szProduct
,
GUID_SIZE
,
NULL
,
NULL
);
}
HeapFree
(
GetProcessHeap
(),
0
,
szwComponent
);
return
r
;
}
UINT
WINAPI
MsiEnumClientsW
(
LPCWSTR
szComponent
,
DWORD
index
,
LPWSTR
szProduct
)
{
HKEY
hkeyComp
=
0
;
DWORD
r
,
sz
;
WCHAR
szValName
[
GUID_SIZE
];
TRACE
(
"%s %ld %p
\n
"
,
debugstr_w
(
szComponent
),
index
,
szProduct
);
r
=
MSIREG_OpenComponentsKey
(
szComponent
,
&
hkeyComp
,
FALSE
);
if
(
r
!=
ERROR_SUCCESS
)
goto
end
;
sz
=
GUID_SIZE
;
r
=
RegEnumValueW
(
hkeyComp
,
index
,
szValName
,
&
sz
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
r
!=
ERROR_SUCCESS
)
goto
end
;
unsquash_guid
(
szValName
,
szProduct
);
end:
if
(
hkeyComp
)
RegCloseKey
(
hkeyComp
);
return
r
;
}
UINT
WINAPI
MsiEnumComponentQualifiersA
(
LPSTR
szComponent
,
DWORD
iIndex
,
LPSTR
lpQualifierBuf
,
DWORD
*
pcchQualifierBuf
,
LPSTR
lpApplicationDataBuf
,
DWORD
*
pcchApplicationDataBuf
)
{
FIXME
(
"%s %08lx %p %p %p %p
\n
"
,
debugstr_a
(
szComponent
),
iIndex
,
lpQualifierBuf
,
pcchQualifierBuf
,
lpApplicationDataBuf
,
pcchApplicationDataBuf
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
UINT
WINAPI
MsiEnumComponentQualifiersW
(
LPWSTR
szComponent
,
DWORD
iIndex
,
LPWSTR
lpQualifierBuf
,
DWORD
*
pcchQualifierBuf
,
LPWSTR
lpApplicationDataBuf
,
DWORD
*
pcchApplicationDataBuf
)
{
FIXME
(
"%s %08lx %p %p %p %p
\n
"
,
debugstr_w
(
szComponent
),
iIndex
,
lpQualifierBuf
,
pcchQualifierBuf
,
lpApplicationDataBuf
,
pcchApplicationDataBuf
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
UINT
WINAPI
MsiProvideAssemblyA
(
LPCSTR
szAssemblyName
,
LPCSTR
szAppContext
,
DWORD
dwInstallMode
,
DWORD
dwAssemblyInfo
,
LPSTR
lpPathBuf
,
DWORD
*
pcchPathBuf
)
...
...
@@ -1678,22 +1465,6 @@ BOOL WINAPI MSI_DllCanUnloadNow(void)
return
S_FALSE
;
}
UINT
WINAPI
MsiEnumRelatedProductsW
(
LPCWSTR
szUpgradeCode
,
DWORD
dwReserved
,
DWORD
iProductIndex
,
LPWSTR
lpProductBuf
)
{
FIXME
(
"%s %lu %lu %p
\n
"
,
debugstr_w
(
szUpgradeCode
),
dwReserved
,
iProductIndex
,
lpProductBuf
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
UINT
WINAPI
MsiEnumRelatedProductsA
(
LPCSTR
szUpgradeCode
,
DWORD
dwReserved
,
DWORD
iProductIndex
,
LPSTR
lpProductBuf
)
{
FIXME
(
"%s %lu %lu %p
\n
"
,
debugstr_a
(
szUpgradeCode
),
dwReserved
,
iProductIndex
,
lpProductBuf
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
UINT
WINAPI
MsiGetFeatureUsageW
(
LPCWSTR
szProduct
,
LPCWSTR
szFeature
,
DWORD
*
pdwUseCount
,
WORD
*
pwDateUsed
)
{
...
...
dlls/msi/registry.c
View file @
0b1b703f
...
...
@@ -484,3 +484,231 @@ UINT WINAPI MsiDecomposeDescriptorA( LPCSTR szDescriptor, LPSTR szProduct,
return
r
;
}
UINT
WINAPI
MsiEnumProductsA
(
DWORD
index
,
LPSTR
lpguid
)
{
DWORD
r
;
WCHAR
szwGuid
[
GUID_SIZE
];
TRACE
(
"%ld %p
\n
"
,
index
,
lpguid
);
if
(
NULL
==
lpguid
)
return
ERROR_INVALID_PARAMETER
;
r
=
MsiEnumProductsW
(
index
,
szwGuid
);
if
(
r
==
ERROR_SUCCESS
)
WideCharToMultiByte
(
CP_ACP
,
0
,
szwGuid
,
-
1
,
lpguid
,
GUID_SIZE
,
NULL
,
NULL
);
return
r
;
}
UINT
WINAPI
MsiEnumProductsW
(
DWORD
index
,
LPWSTR
lpguid
)
{
HKEY
hkeyFeatures
=
0
;
DWORD
r
;
WCHAR
szKeyName
[
33
];
TRACE
(
"%ld %p
\n
"
,
index
,
lpguid
);
if
(
NULL
==
lpguid
)
return
ERROR_INVALID_PARAMETER
;
r
=
MSIREG_OpenFeatures
(
&
hkeyFeatures
);
if
(
r
!=
ERROR_SUCCESS
)
goto
end
;
r
=
RegEnumKeyW
(
hkeyFeatures
,
index
,
szKeyName
,
GUID_SIZE
);
unsquash_guid
(
szKeyName
,
lpguid
);
end:
if
(
hkeyFeatures
)
RegCloseKey
(
hkeyFeatures
);
return
r
;
}
UINT
WINAPI
MsiEnumFeaturesA
(
LPCSTR
szProduct
,
DWORD
index
,
LPSTR
szFeature
,
LPSTR
szParent
)
{
DWORD
r
;
WCHAR
szwFeature
[
GUID_SIZE
],
szwParent
[
GUID_SIZE
];
LPWSTR
szwProduct
=
NULL
;
TRACE
(
"%s %ld %p %p
\n
"
,
debugstr_a
(
szProduct
),
index
,
szFeature
,
szParent
);
if
(
szProduct
)
{
UINT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szProduct
,
-
1
,
NULL
,
0
);
szwProduct
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
if
(
szwProduct
)
MultiByteToWideChar
(
CP_ACP
,
0
,
szProduct
,
-
1
,
szwProduct
,
len
);
else
return
ERROR_FUNCTION_FAILED
;
}
r
=
MsiEnumFeaturesW
(
szwProduct
,
index
,
szwFeature
,
szwParent
);
if
(
r
==
ERROR_SUCCESS
)
{
WideCharToMultiByte
(
CP_ACP
,
0
,
szwFeature
,
-
1
,
szFeature
,
GUID_SIZE
,
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
szwParent
,
-
1
,
szParent
,
GUID_SIZE
,
NULL
,
NULL
);
}
HeapFree
(
GetProcessHeap
(),
0
,
szwProduct
);
return
r
;
}
UINT
WINAPI
MsiEnumFeaturesW
(
LPCWSTR
szProduct
,
DWORD
index
,
LPWSTR
szFeature
,
LPWSTR
szParent
)
{
HKEY
hkeyProduct
=
0
;
DWORD
r
,
sz
;
TRACE
(
"%s %ld %p %p
\n
"
,
debugstr_w
(
szProduct
),
index
,
szFeature
,
szParent
);
r
=
MSIREG_OpenFeaturesKey
(
szProduct
,
&
hkeyProduct
,
FALSE
);
if
(
r
!=
ERROR_SUCCESS
)
goto
end
;
sz
=
GUID_SIZE
;
r
=
RegEnumValueW
(
hkeyProduct
,
index
,
szFeature
,
&
sz
,
NULL
,
NULL
,
NULL
,
NULL
);
end:
if
(
hkeyProduct
)
RegCloseKey
(
hkeyProduct
);
return
r
;
}
UINT
WINAPI
MsiEnumComponentsA
(
DWORD
index
,
LPSTR
lpguid
)
{
DWORD
r
;
WCHAR
szwGuid
[
GUID_SIZE
];
TRACE
(
"%ld %p
\n
"
,
index
,
lpguid
);
r
=
MsiEnumComponentsW
(
index
,
szwGuid
);
if
(
r
==
ERROR_SUCCESS
)
WideCharToMultiByte
(
CP_ACP
,
0
,
szwGuid
,
-
1
,
lpguid
,
GUID_SIZE
,
NULL
,
NULL
);
return
r
;
}
UINT
WINAPI
MsiEnumComponentsW
(
DWORD
index
,
LPWSTR
lpguid
)
{
HKEY
hkeyComponents
=
0
;
DWORD
r
;
WCHAR
szKeyName
[
33
];
TRACE
(
"%ld %p
\n
"
,
index
,
lpguid
);
r
=
MSIREG_OpenComponents
(
&
hkeyComponents
);
if
(
r
!=
ERROR_SUCCESS
)
goto
end
;
r
=
RegEnumKeyW
(
hkeyComponents
,
index
,
szKeyName
,
GUID_SIZE
);
unsquash_guid
(
szKeyName
,
lpguid
);
end:
if
(
hkeyComponents
)
RegCloseKey
(
hkeyComponents
);
return
r
;
}
UINT
WINAPI
MsiEnumClientsA
(
LPCSTR
szComponent
,
DWORD
index
,
LPSTR
szProduct
)
{
DWORD
r
;
WCHAR
szwProduct
[
GUID_SIZE
];
LPWSTR
szwComponent
=
NULL
;
TRACE
(
"%s %ld %p
\n
"
,
debugstr_a
(
szComponent
),
index
,
szProduct
);
if
(
szComponent
)
{
UINT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szComponent
,
-
1
,
NULL
,
0
);
szwComponent
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
if
(
szwComponent
)
MultiByteToWideChar
(
CP_ACP
,
0
,
szComponent
,
-
1
,
szwComponent
,
len
);
else
return
ERROR_FUNCTION_FAILED
;
}
r
=
MsiEnumClientsW
(
szComponent
?
szwComponent
:
NULL
,
index
,
szwProduct
);
if
(
r
==
ERROR_SUCCESS
)
{
WideCharToMultiByte
(
CP_ACP
,
0
,
szwProduct
,
-
1
,
szProduct
,
GUID_SIZE
,
NULL
,
NULL
);
}
HeapFree
(
GetProcessHeap
(),
0
,
szwComponent
);
return
r
;
}
UINT
WINAPI
MsiEnumClientsW
(
LPCWSTR
szComponent
,
DWORD
index
,
LPWSTR
szProduct
)
{
HKEY
hkeyComp
=
0
;
DWORD
r
,
sz
;
WCHAR
szValName
[
GUID_SIZE
];
TRACE
(
"%s %ld %p
\n
"
,
debugstr_w
(
szComponent
),
index
,
szProduct
);
r
=
MSIREG_OpenComponentsKey
(
szComponent
,
&
hkeyComp
,
FALSE
);
if
(
r
!=
ERROR_SUCCESS
)
goto
end
;
sz
=
GUID_SIZE
;
r
=
RegEnumValueW
(
hkeyComp
,
index
,
szValName
,
&
sz
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
r
!=
ERROR_SUCCESS
)
goto
end
;
unsquash_guid
(
szValName
,
szProduct
);
end:
if
(
hkeyComp
)
RegCloseKey
(
hkeyComp
);
return
r
;
}
UINT
WINAPI
MsiEnumComponentQualifiersA
(
LPSTR
szComponent
,
DWORD
iIndex
,
LPSTR
lpQualifierBuf
,
DWORD
*
pcchQualifierBuf
,
LPSTR
lpApplicationDataBuf
,
DWORD
*
pcchApplicationDataBuf
)
{
FIXME
(
"%s %08lx %p %p %p %p
\n
"
,
debugstr_a
(
szComponent
),
iIndex
,
lpQualifierBuf
,
pcchQualifierBuf
,
lpApplicationDataBuf
,
pcchApplicationDataBuf
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
UINT
WINAPI
MsiEnumComponentQualifiersW
(
LPWSTR
szComponent
,
DWORD
iIndex
,
LPWSTR
lpQualifierBuf
,
DWORD
*
pcchQualifierBuf
,
LPWSTR
lpApplicationDataBuf
,
DWORD
*
pcchApplicationDataBuf
)
{
FIXME
(
"%s %08lx %p %p %p %p
\n
"
,
debugstr_w
(
szComponent
),
iIndex
,
lpQualifierBuf
,
pcchQualifierBuf
,
lpApplicationDataBuf
,
pcchApplicationDataBuf
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
UINT
WINAPI
MsiEnumRelatedProductsW
(
LPCWSTR
szUpgradeCode
,
DWORD
dwReserved
,
DWORD
iProductIndex
,
LPWSTR
lpProductBuf
)
{
FIXME
(
"%s %lu %lu %p
\n
"
,
debugstr_w
(
szUpgradeCode
),
dwReserved
,
iProductIndex
,
lpProductBuf
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
UINT
WINAPI
MsiEnumRelatedProductsA
(
LPCSTR
szUpgradeCode
,
DWORD
dwReserved
,
DWORD
iProductIndex
,
LPSTR
lpProductBuf
)
{
FIXME
(
"%s %lu %lu %p
\n
"
,
debugstr_a
(
szUpgradeCode
),
dwReserved
,
iProductIndex
,
lpProductBuf
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
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