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)
1037 HKEY sourcekey, typekey;
1039 struct list sourcelist;
1045 TRACE(
"%s, %s, %d, %#lx, %s, %lu\n",
debugstr_w(szProduct),
debugstr_w(szUserSid), dwContext,
dwOptions,
1048 if (!szProduct || !
squash_guid( szProduct, squashed_pc ))
1051 if (!szSource || !*szSource)
1059 FIXME(
"Unhandled options MSICODE_PATCH\n");
1084 ERR(
"can't open subkey %u\n", rc);
1090 if (szSource[
lstrlenW(szSource) - 1] == *postfix)
1112 else if (dwIndex >
count || dwIndex == 0)
1167 if (szProduct) product =
strdupAtoW(szProduct);
1168 if (szUserSid) usersid =
strdupAtoW(szUserSid);
1170 if (szDiskPrompt) prompt =
strdupAtoW(szDiskPrompt);
1173 dwDiskId,
volume, prompt);
1188 const WCHAR *szDiskPrompt )
1190 HKEY sourcekey, mediakey;
1195 TRACE(
"%s, %s, %d, %#lx, %lu, %s, %s\n",
debugstr_w(szProduct),
debugstr_w(szUserSid), dwContext,
dwOptions,
1198 if (!szProduct || !
squash_guid( szProduct, squashed_pc ))
1204 if ((szVolumeLabel && !*szVolumeLabel) || (szDiskPrompt && !*szDiskPrompt))
1212 FIXME(
"Unhandled options MSICODE_PATCH\n");
#define ERROR_INVALID_PARAMETER
static const WCHAR INSTALLPROPERTY_PACKAGENAMEW[]
#define ERROR_UNKNOWN_PROPERTY
UINT WINAPI MsiSourceListAddSourceExA(LPCSTR szProduct, LPCSTR szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCSTR szSource, DWORD dwIndex)
UINT WINAPI MsiSourceListGetInfoW(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCWSTR szProperty, LPWSTR szValue, LPDWORD pcchValue)
enum tagMSIINSTALLCONTEXT MSIINSTALLCONTEXT
#define WideCharToMultiByte
#define ERROR_NO_MORE_ITEMS
static WCHAR * strdupW(const WCHAR *src)
GLdouble GLdouble GLdouble r
static const WCHAR INSTALLPROPERTY_MEDIAPACKAGEPATHW[]
__WINE_SERVER_LIST_INLINE void list_add_after(struct list *elem, struct list *to_add)
GLuint GLuint GLsizei count
struct tagMediaInfo media_info
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)
__WINE_SERVER_LIST_INLINE void list_add_head(struct list *list, struct list *elem)
static void add_source_to_list(struct list *sourcelist, media_info *info, DWORD *index)
static void msi_free(void *mem)
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
BOOL WINAPI ConvertSidToStringSidW(PSID Sid, LPWSTR *StringSid)
static const WCHAR INSTALLPROPERTY_LASTUSEDSOURCEW[]
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
UINT WINAPI MsiSourceListForceResolutionW(const WCHAR *product, const WCHAR *user, DWORD reserved)
static UINT OpenSourceKey(LPCWSTR szProduct, HKEY *key, DWORD dwOptions, MSIINSTALLCONTEXT context, BOOL create)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
UINT WINAPI MsiSourceListEnumSourcesW(const WCHAR *szProductCodeOrPatch, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex, WCHAR *szSource, DWORD *pcchSource)
#define ERROR_FUNCTION_FAILED
UINT WINAPI MsiSourceListEnumSourcesA(const char *szProductCodeOrPatch, const char *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex, char *szSource, DWORD *pcchSource)
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
static struct _test_info info[]
WINE_DEFAULT_DEBUG_CHANNEL(dbghelp)
UINT WINAPI MsiSourceListAddMediaDiskW(const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwDiskId, const WCHAR *szVolumeLabel, const WCHAR *szDiskPrompt)
UINT msi_set_last_used_source(LPCWSTR product, LPCWSTR usersid, MSIINSTALLCONTEXT context, DWORD options, LPCWSTR value)
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)
UINT WINAPI MsiSourceListAddSourceA(LPCSTR szProduct, LPCSTR szUserName, DWORD dwReserved, LPCSTR szSource)
static const WCHAR INSTALLPROPERTY_DISKPROMPTW[]
LONG msi_reg_set_val_str(HKEY hkey, LPCWSTR name, LPCWSTR value) DECLSPEC_HIDDEN
UINT MSIREG_OpenPatchesKey(LPCWSTR szPatch, HKEY *key, BOOL create) DECLSPEC_HIDDEN
UINT WINAPI MsiSourceListSetInfoA(LPCSTR szProduct, LPCSTR szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCSTR szProperty, LPCSTR szValue)
#define ERROR_UNKNOWN_PATCH
UINT MSIREG_OpenProductKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create) DECLSPEC_HIDDEN
static const WCHAR szEmpty[]
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
#define ERROR_BAD_CONFIGURATION
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
static UINT OpenMediaSubkey(HKEY rootkey, HKEY *key, BOOL create)
UINT WINAPI MsiSourceListClearAllExA(const char *szProduct, const char *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions)
#define ERROR_UNKNOWN_PRODUCT
static UINT fill_source_list(struct list *sourcelist, HKEY sourcekey, DWORD *count)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
_In_opt_ PVOID _In_ ULONG _In_ PVOID context
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)
static const WCHAR INSTALLPROPERTY_LASTUSEDTYPEW[]
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
UINT WINAPI MsiSourceListClearSourceA(const char *szProductCodeOrPatchCode, const char *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, const char *szSource)
int _cdecl swprintf(const WCHAR *,...)
static void free_source_list(struct list *sourcelist)
static UINT OpenNetworkSubkey(HKEY rootkey, HKEY *key, BOOL create)
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 MsiSourceListClearSourceW(const WCHAR *szProductCodeOrPatchCode, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCWSTR szSource)
UINT WINAPI MsiSourceListClearAllExW(const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
__WINE_SERVER_LIST_INLINE int list_empty(const struct list *list)
UINT WINAPI MsiSourceListSetInfoW(const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, const WCHAR *szProperty, const WCHAR *szValue)
#define SQUASHED_GUID_SIZE
GLsizei GLsizei GLchar * source
HLOCAL NTAPI LocalFree(HLOCAL hMem)
static BOOL squash_guid(LPCWSTR in, LPWSTR out)
UINT WINAPI MsiSourceListClearAllW(const WCHAR *szProduct, const WCHAR *szUserName, DWORD dwReserved)
UINT WINAPI MsiSourceListAddMediaDiskA(LPCSTR szProduct, LPCSTR szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwDiskId, LPCSTR szVolumeLabel, LPCSTR szDiskPrompt)
__WINE_SERVER_LIST_INLINE void list_add_before(struct list *elem, struct list *to_add)
UINT WINAPI MsiSourceListClearAllA(const char *szProduct, const char *szUserName, DWORD dwReserved)
UINT WINAPI MsiSourceListGetInfoA(LPCSTR szProduct, LPCSTR szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCSTR szProperty, LPSTR szValue, LPDWORD pcchValue)
static UINT OpenURLSubkey(HKEY rootkey, HKEY *key, BOOL create)
UINT WINAPI MsiSourceListAddSourceExW(const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, const WCHAR *szSource, DWORD dwIndex)
UINT MSIREG_OpenUserPatchesKey(LPCWSTR szPatch, HKEY *key, BOOL create) DECLSPEC_HIDDEN
UINT WINAPI MsiSourceListForceResolutionA(const char *product, const char *user, DWORD reserved)
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
GLuint GLuint GLsizei GLenum type
UINT WINAPI MsiSourceListAddSourceW(LPCWSTR szProduct, LPCWSTR szUserName, DWORD dwReserved, LPCWSTR szSource)
BOOL WINAPI LookupAccountNameW(LPCWSTR lpSystemName, LPCWSTR lpAccountName, PSID Sid, LPDWORD cbSid, LPWSTR ReferencedDomainName, LPDWORD cchReferencedDomainName, PSID_NAME_USE peUse)
static const struct access_res create[16]
void user(int argc, const char *argv[])
#define RegCloseKey(hKey)
static WCHAR * strdupAtoW(const char *str)