146 DWORD *pdwDiskId,
char *szVolumeLabel,
DWORD *pcchVolumeLabel,
147 char *szDiskPrompt,
DWORD *pcchDiskPrompt )
152 TRACE(
"%s, %s, %d, %#lx, %lu, %p, %p, %p, %p, %p\n",
debugstr_a(szProductCodeOrPatchCode),
153 debugstr_a(szUserSid), dwContext,
dwOptions, dwIndex, pdwDiskId, szVolumeLabel, pcchVolumeLabel,
154 szDiskPrompt, pcchDiskPrompt );
156 if (szDiskPrompt && !pcchDiskPrompt)
159 if (szProductCodeOrPatchCode) product =
strdupAtoW(szProductCodeOrPatchCode);
160 if (szUserSid) usersid =
strdupAtoW(szUserSid);
171 if (prompt) *prompt =
'\0';
173 dwIndex, pdwDiskId,
volume, pcchVolumeLabel,
174 prompt, pcchDiskPrompt);
178 if (szVolumeLabel && pcchVolumeLabel)
211 TRACE(
"%s, %s, %d, %#lx, %lu, %p, %p, %p, %p\n",
debugstr_w(szProductCodeOrPatchCode),
213 szDiskPrompt, pcchDiskPrompt );
215 if (!szProductCodeOrPatchCode || !
squash_guid( szProductCodeOrPatchCode, squashed_pc ))
224 if (szDiskPrompt && !pcchDiskPrompt)
230 if (dwIndex !=
index)
286 if (
size >= *pcchVolumeLabel)
288 else if (szVolumeLabel)
291 *pcchVolumeLabel =
size;
308 if (
size >= *pcchDiskPrompt)
310 else if (szDiskPrompt)
313 *pcchDiskPrompt =
size;
338 TRACE(
"%s, %s, %d, %#lx, %lu, %p, %p)\n",
debugstr_a(szProductCodeOrPatch),
debugstr_a(szUserSid), dwContext,
339 dwOptions, dwIndex, szSource, pcchSource );
344 if (szSource && !pcchSource)
347 if (dwIndex !=
index)
350 if (szProductCodeOrPatch) product =
strdupAtoW(szProductCodeOrPatch);
351 if (szUserSid) usersid =
strdupAtoW(szUserSid);
372 if (pcchSource && *pcchSource >=
len)
378 *pcchSource =
len - 1;
387 if (szSource || !pcchSource)
index++;
389 else if (dwIndex >
index)
408 TRACE(
"%s, %s, %d, %#lx, %lu, %p, %p\n",
debugstr_w(szProductCodeOrPatch),
debugstr_w(szUserSid), dwContext,
409 dwOptions, dwIndex, szSource, pcchSource );
414 if (!szProductCodeOrPatch || !
squash_guid( szProductCodeOrPatch, squashed_pc ))
417 if (szSource && !pcchSource)
429 if (dwIndex !=
index)
459 if (szSource || !pcchSource)
index++;
461 else if (dwIndex >
index)
482 if (szValue && !pcchValue)
485 if (szProduct) product =
strdupAtoW(szProduct);
486 if (szUserSid) usersid =
strdupAtoW(szUserSid);
487 if (szProperty)
property =
strdupAtoW(szProperty);
505 if (*pcchValue >=
len)
510 *pcchValue =
len - 1;
535 if (!szProduct || !
squash_guid( szProduct, squashed_pc ))
538 if (szValue && !pcchValue)
567 szProperty =
L"MediaPackage";
631 *pcchValue = *pcchValue *
sizeof(
WCHAR);
633 (
LPBYTE)szValue, pcchValue);
642 *pcchValue = (*pcchValue - 1) /
sizeof(
WCHAR);
644 szValue[*pcchValue] =
'\0';
670 if (szProduct) product =
strdupAtoW(szProduct);
671 if (szUserSid) usersid =
strdupAtoW(szUserSid);
672 if (szProperty)
property =
strdupAtoW(szProperty);
756 TRACE(
"%s, %s, %d, %#lx, %s, %s\n",
debugstr_w(szProduct),
debugstr_w(szUserSid), dwContext,
dwOptions,
759 if (!szProduct || !
squash_guid( szProduct, squashed_pc ))
773 FIXME(
"Unhandled options MSICODE_PATCH\n");
777 property = szProperty;
779 property =
L"MediaPackage";
839 if (!szSource || !*szSource)
845 if (!szProduct || !
squash_guid( szProduct, squashed_pc ))
848 if (!szUserName || !*szUserName)
1036 HKEY sourcekey, typekey;
1038 struct list sourcelist;
1044 TRACE(
"%s, %s, %d, %#lx, %s, %lu\n",
debugstr_w(szProduct),
debugstr_w(szUserSid), dwContext,
dwOptions,
1047 if (!szProduct || !
squash_guid( szProduct, squashed_pc ))
1050 if (!szSource || !*szSource)
1058 FIXME(
"Unhandled options MSICODE_PATCH\n");
1083 ERR(
"can't open subkey %u\n", rc);
1089 if (szSource[
lstrlenW(szSource) - 1] == *postfix)
1111 else if (dwIndex >
count || dwIndex == 0)
1166 if (szProduct) product =
strdupAtoW(szProduct);
1167 if (szUserSid) usersid =
strdupAtoW(szUserSid);
1169 if (szDiskPrompt) prompt =
strdupAtoW(szDiskPrompt);
1172 dwDiskId,
volume, prompt);
1187 const WCHAR *szDiskPrompt )
1189 HKEY sourcekey, mediakey;
1194 TRACE(
"%s, %s, %d, %#lx, %lu, %s, %s\n",
debugstr_w(szProduct),
debugstr_w(szUserSid), dwContext,
dwOptions,
1197 if (!szProduct || !
squash_guid( szProduct, squashed_pc ))
1203 if ((szVolumeLabel && !*szVolumeLabel) || (szDiskPrompt && !*szDiskPrompt))
1211 FIXME(
"Unhandled options MSICODE_PATCH\n");
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void user(int argc, const char *argv[])
static void list_remove(struct list_entry *entry)
static int list_empty(struct list_entry *head)
static void list_add_head(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
#define RegCloseKey(hKey)
static const WCHAR szEmpty[]
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
LONG WINAPI RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
BOOL WINAPI LookupAccountNameW(LPCWSTR lpSystemName, LPCWSTR lpAccountName, PSID Sid, LPDWORD cbSid, LPWSTR ReferencedDomainName, LPDWORD cchReferencedDomainName, PSID_NAME_USE peUse)
BOOL WINAPI ConvertSidToStringSidW(PSID Sid, LPWSTR *StringSid)
static WCHAR * strdupAtoW(const char *str)
#define ERROR_INVALID_PARAMETER
#define ERROR_NO_MORE_ITEMS
#define WideCharToMultiByte
static UINT OpenURLSubkey(HKEY rootkey, HKEY *key, BOOL create)
UINT WINAPI MsiSourceListClearSourceA(const char *szProductCodeOrPatchCode, const char *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, const char *szSource)
UINT WINAPI MsiSourceListEnumSourcesA(const char *szProductCodeOrPatch, const char *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex, char *szSource, DWORD *pcchSource)
UINT msi_set_last_used_source(LPCWSTR product, LPCWSTR usersid, MSIINSTALLCONTEXT context, DWORD options, LPCWSTR value)
UINT WINAPI MsiSourceListEnumMediaDisksA(const char *szProductCodeOrPatchCode, const char *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex, DWORD *pdwDiskId, char *szVolumeLabel, DWORD *pcchVolumeLabel, char *szDiskPrompt, DWORD *pcchDiskPrompt)
UINT WINAPI MsiSourceListSetInfoW(const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, const WCHAR *szProperty, const WCHAR *szValue)
UINT WINAPI MsiSourceListClearAllA(const char *szProduct, const char *szUserName, DWORD dwReserved)
UINT WINAPI MsiSourceListAddMediaDiskW(const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwDiskId, const WCHAR *szVolumeLabel, const WCHAR *szDiskPrompt)
UINT WINAPI MsiSourceListEnumMediaDisksW(const WCHAR *szProductCodeOrPatchCode, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex, DWORD *pdwDiskId, WCHAR *szVolumeLabel, DWORD *pcchVolumeLabel, WCHAR *szDiskPrompt, DWORD *pcchDiskPrompt)
UINT WINAPI MsiSourceListAddSourceExA(LPCSTR szProduct, LPCSTR szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCSTR szSource, DWORD dwIndex)
static void add_source_to_list(struct list *sourcelist, struct media_info *info, DWORD *index)
UINT WINAPI MsiSourceListForceResolutionW(const WCHAR *product, const WCHAR *user, DWORD reserved)
UINT WINAPI MsiSourceListAddSourceExW(const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, const WCHAR *szSource, DWORD dwIndex)
static UINT fill_source_list(struct list *sourcelist, HKEY sourcekey, DWORD *count)
UINT WINAPI MsiSourceListSetInfoA(LPCSTR szProduct, LPCSTR szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCSTR szProperty, LPCSTR szValue)
UINT WINAPI MsiSourceListClearAllW(const WCHAR *szProduct, const WCHAR *szUserName, DWORD dwReserved)
UINT WINAPI MsiSourceListClearAllExW(const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions)
UINT WINAPI MsiSourceListGetInfoW(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCWSTR szProperty, LPWSTR szValue, LPDWORD pcchValue)
UINT WINAPI MsiSourceListAddSourceW(LPCWSTR szProduct, LPCWSTR szUserName, DWORD dwReserved, LPCWSTR szSource)
UINT WINAPI MsiSourceListAddMediaDiskA(LPCSTR szProduct, LPCSTR szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwDiskId, LPCSTR szVolumeLabel, LPCSTR szDiskPrompt)
UINT WINAPI MsiSourceListAddSourceA(LPCSTR szProduct, LPCSTR szUserName, DWORD dwReserved, LPCSTR szSource)
UINT WINAPI MsiSourceListClearSourceW(const WCHAR *szProductCodeOrPatchCode, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCWSTR szSource)
static UINT OpenMediaSubkey(HKEY rootkey, HKEY *key, BOOL create)
static UINT OpenSourceKey(LPCWSTR szProduct, HKEY *key, DWORD dwOptions, MSIINSTALLCONTEXT context, BOOL create)
static void free_source_list(struct list *sourcelist)
UINT WINAPI MsiSourceListForceResolutionA(const char *product, const char *user, DWORD reserved)
UINT WINAPI MsiSourceListClearAllExA(const char *szProduct, const char *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions)
static UINT OpenNetworkSubkey(HKEY rootkey, HKEY *key, BOOL create)
UINT WINAPI MsiSourceListEnumSourcesW(const WCHAR *szProductCodeOrPatch, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex, WCHAR *szSource, DWORD *pcchSource)
UINT WINAPI MsiSourceListGetInfoA(LPCSTR szProduct, LPCSTR szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCSTR szProperty, LPSTR szValue, LPDWORD pcchValue)
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
HLOCAL NTAPI LocalFree(HLOCAL hMem)
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
static const struct access_res create[16]
static const WCHAR INSTALLPROPERTY_PACKAGENAMEW[]
static const WCHAR INSTALLPROPERTY_LASTUSEDTYPEW[]
static const WCHAR INSTALLPROPERTY_MEDIAPACKAGEPATHW[]
enum tagMSIINSTALLCONTEXT MSIINSTALLCONTEXT
static const WCHAR INSTALLPROPERTY_DISKPROMPTW[]
static const WCHAR INSTALLPROPERTY_LASTUSEDSOURCEW[]
@ MSIINSTALLCONTEXT_MACHINE
@ MSIINSTALLCONTEXT_USERUNMANAGED
@ MSIINSTALLCONTEXT_USERMANAGED
UINT MSIREG_OpenProductKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create)
BOOL squash_guid(LPCWSTR in, LPWSTR out)
UINT MSIREG_OpenUserPatchesKey(LPCWSTR szPatch, HKEY *key, BOOL create)
UINT MSIREG_OpenPatchesKey(LPCWSTR szPatch, HKEY *key, BOOL create)
LONG msi_reg_set_val_str(HKEY hkey, LPCWSTR name, LPCWSTR value)
#define SQUASHED_GUID_SIZE
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_Check_return_ _CRTIMP wchar_t *__cdecl wcsdup(_In_z_ const wchar_t *_Str)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
__WINE_SERVER_LIST_INLINE void list_add_before(struct list *elem, struct list *to_add)
__WINE_SERVER_LIST_INLINE void list_add_after(struct list *elem, struct list *to_add)
#define ERROR_UNKNOWN_PRODUCT
#define ERROR_UNKNOWN_PATCH
#define ERROR_FUNCTION_FAILED
#define ERROR_UNKNOWN_PROPERTY
#define ERROR_BAD_CONFIGURATION