mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 15:33:07 +00:00
Autosyncing with Wine HEAD
svn path=/trunk/; revision=34375
This commit is contained in:
parent
1ac1523c04
commit
5d786c8989
24 changed files with 994 additions and 508 deletions
File diff suppressed because it is too large
Load diff
|
@ -405,7 +405,7 @@ static HRESULT WINAPI AutomationObject_Invoke(
|
||||||
(hr == DISP_E_PARAMNOTFOUND ||
|
(hr == DISP_E_PARAMNOTFOUND ||
|
||||||
hr == DISP_E_EXCEPTION)) {
|
hr == DISP_E_EXCEPTION)) {
|
||||||
static const WCHAR szComma[] = { ',',0 };
|
static const WCHAR szComma[] = { ',',0 };
|
||||||
static WCHAR szExceptionSource[] = {'M','s','i',' ','A','P','I',' ','E','r','r','o','r',0};
|
static const WCHAR szExceptionSource[] = {'M','s','i',' ','A','P','I',' ','E','r','r','o','r',0};
|
||||||
WCHAR szExceptionDescription[MAX_PATH];
|
WCHAR szExceptionDescription[MAX_PATH];
|
||||||
BSTR bstrParamNames[MAX_FUNC_PARAMS];
|
BSTR bstrParamNames[MAX_FUNC_PARAMS];
|
||||||
unsigned namesNo, i;
|
unsigned namesNo, i;
|
||||||
|
|
|
@ -83,7 +83,7 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
|
||||||
WCHAR path[MAX_PATH];
|
WCHAR path[MAX_PATH];
|
||||||
|
|
||||||
static const WCHAR backslash[] = {'\\',0};
|
static const WCHAR backslash[] = {'\\',0};
|
||||||
static WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
|
static const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
|
||||||
|
|
||||||
TRACE("%s %s\n",debugstr_w(szDBPath),debugstr_w(szPersist) );
|
TRACE("%s %s\n",debugstr_w(szDBPath),debugstr_w(szPersist) );
|
||||||
|
|
||||||
|
|
|
@ -459,24 +459,22 @@ done:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static VOID set_file_source(MSIPACKAGE* package, MSIFILE* file, LPCWSTR path)
|
/* compares the version of a file read from the filesystem and
|
||||||
|
* the version specified in the File table
|
||||||
|
*/
|
||||||
|
static int msi_compare_file_version(MSIFILE *file)
|
||||||
{
|
{
|
||||||
if (!file->IsCompressed)
|
WCHAR version[MAX_PATH];
|
||||||
{
|
DWORD size;
|
||||||
LPWSTR p, path;
|
UINT r;
|
||||||
p = resolve_folder(package, file->Component->Directory, TRUE, FALSE, TRUE, NULL);
|
|
||||||
path = build_directory_name(2, p, file->ShortName);
|
size = MAX_PATH;
|
||||||
if (file->LongName &&
|
version[0] = '\0';
|
||||||
INVALID_FILE_ATTRIBUTES == GetFileAttributesW( path ))
|
r = MsiGetFileVersionW(file->TargetPath, version, &size, NULL, NULL);
|
||||||
{
|
if (r != ERROR_SUCCESS)
|
||||||
msi_free(path);
|
return 0;
|
||||||
path = build_directory_name(2, p, file->LongName);
|
|
||||||
}
|
return lstrcmpW(version, file->Version);
|
||||||
file->SourcePath = path;
|
|
||||||
msi_free(p);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
file->SourcePath = build_directory_name(2, path, file->File);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void msi_free_media_info( MSIMEDIAINFO *mi )
|
void msi_free_media_info( MSIMEDIAINFO *mi )
|
||||||
|
@ -564,10 +562,9 @@ UINT msi_load_media_info(MSIPACKAGE *package, MSIFILE *file, MSIMEDIAINFO *mi)
|
||||||
options |= MSISOURCETYPE_NETWORK;
|
options |= MSISOURCETYPE_NETWORK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mi->type == DRIVE_CDROM || mi->type == DRIVE_REMOVABLE)
|
msi_package_add_media_disk(package, package->Context,
|
||||||
msi_package_add_media_disk(package, package->Context,
|
MSICODE_PRODUCT, mi->disk_id,
|
||||||
MSICODE_PRODUCT, mi->disk_id,
|
mi->volume_label, mi->disk_prompt);
|
||||||
mi->volume_label, mi->disk_prompt);
|
|
||||||
|
|
||||||
msi_package_add_info(package, package->Context,
|
msi_package_add_info(package, package->Context,
|
||||||
options, INSTALLPROPERTY_LASTUSEDSOURCEW, source);
|
options, INSTALLPROPERTY_LASTUSEDSOURCEW, source);
|
||||||
|
@ -577,7 +574,7 @@ UINT msi_load_media_info(MSIPACKAGE *package, MSIFILE *file, MSIMEDIAINFO *mi)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: search NETWORK and URL sources as well */
|
/* FIXME: search NETWORK and URL sources as well */
|
||||||
static UINT find_published_source(MSIPACKAGE *package, MSIMEDIAINFO *mi)
|
UINT find_published_source(MSIPACKAGE *package, MSIMEDIAINFO *mi)
|
||||||
{
|
{
|
||||||
WCHAR source[MAX_PATH];
|
WCHAR source[MAX_PATH];
|
||||||
WCHAR volume[MAX_PATH];
|
WCHAR volume[MAX_PATH];
|
||||||
|
@ -586,6 +583,7 @@ static UINT find_published_source(MSIPACKAGE *package, MSIMEDIAINFO *mi)
|
||||||
DWORD index, size, id;
|
DWORD index, size, id;
|
||||||
UINT r;
|
UINT r;
|
||||||
|
|
||||||
|
size = MAX_PATH;
|
||||||
r = MsiSourceListGetInfoW(package->ProductCode, NULL,
|
r = MsiSourceListGetInfoW(package->ProductCode, NULL,
|
||||||
package->Context, MSICODE_PRODUCT,
|
package->Context, MSICODE_PRODUCT,
|
||||||
INSTALLPROPERTY_LASTUSEDSOURCEW, source, &size);
|
INSTALLPROPERTY_LASTUSEDSOURCEW, source, &size);
|
||||||
|
@ -822,6 +820,13 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (MsiGetFileVersionW(file->TargetPath, NULL, NULL, NULL, NULL) == ERROR_SUCCESS &&
|
||||||
|
msi_compare_file_version(file) >= 0)
|
||||||
|
{
|
||||||
|
TRACE("Destination file version greater, not overwriting\n");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (file->Sequence > mi->last_sequence || mi->is_continuous ||
|
if (file->Sequence > mi->last_sequence || mi->is_continuous ||
|
||||||
(file->IsCompressed && !mi->is_extracted))
|
(file->IsCompressed && !mi->is_extracted))
|
||||||
{
|
{
|
||||||
|
@ -846,13 +851,11 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set_file_source(package, file, mi->source);
|
|
||||||
|
|
||||||
TRACE("file paths %s to %s\n",debugstr_w(file->SourcePath),
|
|
||||||
debugstr_w(file->TargetPath));
|
|
||||||
|
|
||||||
if (!file->IsCompressed)
|
if (!file->IsCompressed)
|
||||||
{
|
{
|
||||||
|
TRACE("file paths %s to %s\n", debugstr_w(file->SourcePath),
|
||||||
|
debugstr_w(file->TargetPath));
|
||||||
|
|
||||||
msi_file_update_ui(package, file, szInstallFiles);
|
msi_file_update_ui(package, file, szInstallFiles);
|
||||||
rc = copy_install_file(file);
|
rc = copy_install_file(file);
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
|
@ -994,24 +997,6 @@ UINT ACTION_DuplicateFiles(MSIPACKAGE *package)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* compares the version of a file read from the filesystem and
|
|
||||||
* the version specified in the File table
|
|
||||||
*/
|
|
||||||
static int msi_compare_file_version( MSIFILE *file )
|
|
||||||
{
|
|
||||||
WCHAR version[MAX_PATH];
|
|
||||||
DWORD size;
|
|
||||||
UINT r;
|
|
||||||
|
|
||||||
size = MAX_PATH;
|
|
||||||
version[0] = '\0';
|
|
||||||
r = MsiGetFileVersionW( file->TargetPath, version, &size, NULL, NULL );
|
|
||||||
if ( r != ERROR_SUCCESS )
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return lstrcmpW( version, file->Version );
|
|
||||||
}
|
|
||||||
|
|
||||||
UINT ACTION_RemoveFiles( MSIPACKAGE *package )
|
UINT ACTION_RemoveFiles( MSIPACKAGE *package )
|
||||||
{
|
{
|
||||||
MSIFILE *file;
|
MSIFILE *file;
|
||||||
|
|
|
@ -921,6 +921,8 @@ void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature)
|
||||||
ComponentList *clist;
|
ComponentList *clist;
|
||||||
MSIFEATURE *f;
|
MSIFEATURE *f;
|
||||||
|
|
||||||
|
component->hasLocalFeature = FALSE;
|
||||||
|
|
||||||
msi_component_set_state( component, newstate );
|
msi_component_set_state( component, newstate );
|
||||||
|
|
||||||
/*if any other feature wants is local we need to set it local*/
|
/*if any other feature wants is local we need to set it local*/
|
||||||
|
@ -939,6 +941,7 @@ void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature)
|
||||||
f->ActionRequest == INSTALLSTATE_SOURCE) )
|
f->ActionRequest == INSTALLSTATE_SOURCE) )
|
||||||
{
|
{
|
||||||
TRACE("Saved by %s\n", debugstr_w(f->Feature));
|
TRACE("Saved by %s\n", debugstr_w(f->Feature));
|
||||||
|
component->hasLocalFeature = TRUE;
|
||||||
|
|
||||||
if (component->Attributes & msidbComponentAttributesOptional)
|
if (component->Attributes & msidbComponentAttributesOptional)
|
||||||
{
|
{
|
||||||
|
@ -1160,6 +1163,16 @@ UINT msi_extract_file(MSIPACKAGE *package, MSIFILE *file, LPWSTR destdir)
|
||||||
if (r != ERROR_SUCCESS)
|
if (r != ERROR_SUCCESS)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
if (GetFileAttributesW(mi->source) == INVALID_FILE_ATTRIBUTES)
|
||||||
|
{
|
||||||
|
r = find_published_source(package, mi);
|
||||||
|
if (r != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
ERR("Cabinet not found: %s\n", debugstr_w(mi->source));
|
||||||
|
return ERROR_INSTALL_FAILURE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
data.package = package;
|
data.package = package;
|
||||||
data.mi = mi;
|
data.mi = mi;
|
||||||
data.file = file;
|
data.file = file;
|
||||||
|
|
|
@ -1812,6 +1812,7 @@ INSTALLSTATE WINAPI MsiQueryFeatureStateW(LPCWSTR szProduct, LPCWSTR szFeature)
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
INSTALLSTATE r;
|
INSTALLSTATE r;
|
||||||
BOOL missing = FALSE;
|
BOOL missing = FALSE;
|
||||||
|
BOOL machine = FALSE;
|
||||||
|
|
||||||
TRACE("%s %s\n", debugstr_w(szProduct), debugstr_w(szFeature));
|
TRACE("%s %s\n", debugstr_w(szProduct), debugstr_w(szFeature));
|
||||||
|
|
||||||
|
@ -1821,10 +1822,15 @@ INSTALLSTATE WINAPI MsiQueryFeatureStateW(LPCWSTR szProduct, LPCWSTR szFeature)
|
||||||
if (!squash_guid( szProduct, squishProduct ))
|
if (!squash_guid( szProduct, squishProduct ))
|
||||||
return INSTALLSTATE_INVALIDARG;
|
return INSTALLSTATE_INVALIDARG;
|
||||||
|
|
||||||
/* check that it's installed at all */
|
if (MSIREG_OpenManagedFeaturesKey(szProduct, &hkey, FALSE) != ERROR_SUCCESS &&
|
||||||
rc = MSIREG_OpenUserFeaturesKey(szProduct, &hkey, FALSE);
|
MSIREG_OpenUserFeaturesKey(szProduct, &hkey, FALSE) != ERROR_SUCCESS)
|
||||||
if (rc != ERROR_SUCCESS)
|
{
|
||||||
return INSTALLSTATE_UNKNOWN;
|
rc = MSIREG_OpenLocalClassesFeaturesKey(szProduct, &hkey, FALSE);
|
||||||
|
if (rc != ERROR_SUCCESS)
|
||||||
|
return INSTALLSTATE_UNKNOWN;
|
||||||
|
|
||||||
|
machine = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
parent_feature = msi_reg_get_val_str( hkey, szFeature );
|
parent_feature = msi_reg_get_val_str( hkey, szFeature );
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
|
@ -1837,8 +1843,11 @@ INSTALLSTATE WINAPI MsiQueryFeatureStateW(LPCWSTR szProduct, LPCWSTR szFeature)
|
||||||
if (r == INSTALLSTATE_ABSENT)
|
if (r == INSTALLSTATE_ABSENT)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
/* now check if it's complete or advertised */
|
if (machine)
|
||||||
rc = MSIREG_OpenUserDataFeaturesKey(szProduct, &hkey, FALSE);
|
rc = MSIREG_OpenLocalUserDataFeaturesKey(szProduct, &hkey, FALSE);
|
||||||
|
else
|
||||||
|
rc = MSIREG_OpenUserDataFeaturesKey(szProduct, &hkey, FALSE);
|
||||||
|
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
return INSTALLSTATE_ADVERTISED;
|
return INSTALLSTATE_ADVERTISED;
|
||||||
|
|
||||||
|
@ -1862,7 +1871,12 @@ INSTALLSTATE WINAPI MsiQueryFeatureStateW(LPCWSTR szProduct, LPCWSTR szFeature)
|
||||||
}
|
}
|
||||||
|
|
||||||
StringFromGUID2(&guid, comp, GUID_SIZE);
|
StringFromGUID2(&guid, comp, GUID_SIZE);
|
||||||
rc = MSIREG_OpenUserDataComponentKey(comp, &hkey, FALSE);
|
|
||||||
|
if (machine)
|
||||||
|
rc = MSIREG_OpenLocalUserDataComponentKey(comp, &hkey, FALSE);
|
||||||
|
else
|
||||||
|
rc = MSIREG_OpenUserDataComponentKey(comp, &hkey, FALSE);
|
||||||
|
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
msi_free(components);
|
msi_free(components);
|
||||||
|
@ -2281,57 +2295,93 @@ static USERINFOSTATE WINAPI MSI_GetUserInfo(LPCWSTR szProduct,
|
||||||
awstring *lpOrgNameBuf, LPDWORD pcchOrgNameBuf,
|
awstring *lpOrgNameBuf, LPDWORD pcchOrgNameBuf,
|
||||||
awstring *lpSerialBuf, LPDWORD pcchSerialBuf)
|
awstring *lpSerialBuf, LPDWORD pcchSerialBuf)
|
||||||
{
|
{
|
||||||
HKEY hkey;
|
WCHAR squished_pc[SQUISH_GUID_SIZE];
|
||||||
LPWSTR user, org, serial;
|
LPWSTR user, org, serial;
|
||||||
UINT r;
|
|
||||||
USERINFOSTATE state;
|
USERINFOSTATE state;
|
||||||
|
HKEY hkey, props;
|
||||||
|
LPCWSTR orgptr;
|
||||||
|
UINT r;
|
||||||
|
|
||||||
TRACE("%s %p %p %p %p %p %p\n",debugstr_w(szProduct), lpUserNameBuf,
|
static const WCHAR szEmpty[] = {0};
|
||||||
|
|
||||||
|
TRACE("%s %p %p %p %p %p %p\n", debugstr_w(szProduct), lpUserNameBuf,
|
||||||
pcchUserNameBuf, lpOrgNameBuf, pcchOrgNameBuf, lpSerialBuf,
|
pcchUserNameBuf, lpOrgNameBuf, pcchOrgNameBuf, lpSerialBuf,
|
||||||
pcchSerialBuf);
|
pcchSerialBuf);
|
||||||
|
|
||||||
if (!szProduct)
|
if (!szProduct || !squash_guid(szProduct, squished_pc))
|
||||||
return USERINFOSTATE_INVALIDARG;
|
return USERINFOSTATE_INVALIDARG;
|
||||||
|
|
||||||
r = MSIREG_OpenUninstallKey(szProduct, &hkey, FALSE);
|
if (MSIREG_OpenLocalManagedProductKey(szProduct, &hkey, FALSE) != ERROR_SUCCESS &&
|
||||||
if (r != ERROR_SUCCESS)
|
MSIREG_OpenUserProductsKey(szProduct, &hkey, FALSE) != ERROR_SUCCESS &&
|
||||||
|
MSIREG_OpenLocalClassesProductKey(szProduct, &hkey, FALSE) != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
return USERINFOSTATE_UNKNOWN;
|
return USERINFOSTATE_UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
user = msi_reg_get_val_str( hkey, INSTALLPROPERTY_REGOWNERW );
|
if (MSIREG_OpenCurrentUserInstallProps(szProduct, &props, FALSE) != ERROR_SUCCESS &&
|
||||||
org = msi_reg_get_val_str( hkey, INSTALLPROPERTY_REGCOMPANYW );
|
MSIREG_OpenLocalSystemInstallProps(szProduct, &props, FALSE) != ERROR_SUCCESS)
|
||||||
serial = msi_reg_get_val_str( hkey, INSTALLPROPERTY_PRODUCTIDW );
|
{
|
||||||
|
RegCloseKey(hkey);
|
||||||
|
return USERINFOSTATE_ABSENT;
|
||||||
|
}
|
||||||
|
|
||||||
|
user = msi_reg_get_val_str(props, INSTALLPROPERTY_REGOWNERW);
|
||||||
|
org = msi_reg_get_val_str(props, INSTALLPROPERTY_REGCOMPANYW);
|
||||||
|
serial = msi_reg_get_val_str(props, INSTALLPROPERTY_PRODUCTIDW);
|
||||||
|
state = USERINFOSTATE_ABSENT;
|
||||||
|
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
|
RegCloseKey(props);
|
||||||
|
|
||||||
state = USERINFOSTATE_PRESENT;
|
if (user && serial)
|
||||||
|
state = USERINFOSTATE_PRESENT;
|
||||||
|
|
||||||
if (user)
|
if (pcchUserNameBuf)
|
||||||
{
|
{
|
||||||
r = msi_strcpy_to_awstring( user, lpUserNameBuf, pcchUserNameBuf );
|
if (lpUserNameBuf && !user)
|
||||||
|
{
|
||||||
|
(*pcchUserNameBuf)--;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
r = msi_strcpy_to_awstring(user, lpUserNameBuf, pcchUserNameBuf);
|
||||||
|
if (r == ERROR_MORE_DATA)
|
||||||
|
{
|
||||||
|
state = USERINFOSTATE_MOREDATA;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pcchOrgNameBuf)
|
||||||
|
{
|
||||||
|
orgptr = org;
|
||||||
|
if (!orgptr) orgptr = szEmpty;
|
||||||
|
|
||||||
|
r = msi_strcpy_to_awstring(orgptr, lpOrgNameBuf, pcchOrgNameBuf);
|
||||||
|
if (r == ERROR_MORE_DATA)
|
||||||
|
{
|
||||||
|
state = USERINFOSTATE_MOREDATA;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pcchSerialBuf)
|
||||||
|
{
|
||||||
|
if (!serial)
|
||||||
|
{
|
||||||
|
(*pcchSerialBuf)--;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
r = msi_strcpy_to_awstring(serial, lpSerialBuf, pcchSerialBuf);
|
||||||
if (r == ERROR_MORE_DATA)
|
if (r == ERROR_MORE_DATA)
|
||||||
state = USERINFOSTATE_MOREDATA;
|
state = USERINFOSTATE_MOREDATA;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
state = USERINFOSTATE_ABSENT;
|
|
||||||
if (org)
|
|
||||||
{
|
|
||||||
r = msi_strcpy_to_awstring( org, lpOrgNameBuf, pcchOrgNameBuf );
|
|
||||||
if (r == ERROR_MORE_DATA && state == USERINFOSTATE_PRESENT)
|
|
||||||
state = USERINFOSTATE_MOREDATA;
|
|
||||||
}
|
|
||||||
/* msdn states: The user information is considered to be present even in the absence of a company name. */
|
|
||||||
if (serial)
|
|
||||||
{
|
|
||||||
r = msi_strcpy_to_awstring( serial, lpSerialBuf, pcchSerialBuf );
|
|
||||||
if (r == ERROR_MORE_DATA && state == USERINFOSTATE_PRESENT)
|
|
||||||
state = USERINFOSTATE_MOREDATA;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
state = USERINFOSTATE_ABSENT;
|
|
||||||
|
|
||||||
msi_free( user );
|
done:
|
||||||
msi_free( org );
|
msi_free(user);
|
||||||
msi_free( serial );
|
msi_free(org);
|
||||||
|
msi_free(serial);
|
||||||
|
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
@ -2346,6 +2396,11 @@ USERINFOSTATE WINAPI MsiGetUserInfoW(LPCWSTR szProduct,
|
||||||
{
|
{
|
||||||
awstring user, org, serial;
|
awstring user, org, serial;
|
||||||
|
|
||||||
|
if ((lpUserNameBuf && !pcchUserNameBuf) ||
|
||||||
|
(lpOrgNameBuf && !pcchOrgNameBuf) ||
|
||||||
|
(lpSerialBuf && !pcchSerialBuf))
|
||||||
|
return USERINFOSTATE_INVALIDARG;
|
||||||
|
|
||||||
user.unicode = TRUE;
|
user.unicode = TRUE;
|
||||||
user.str.w = lpUserNameBuf;
|
user.str.w = lpUserNameBuf;
|
||||||
org.unicode = TRUE;
|
org.unicode = TRUE;
|
||||||
|
@ -2367,6 +2422,11 @@ USERINFOSTATE WINAPI MsiGetUserInfoA(LPCSTR szProduct,
|
||||||
LPWSTR prod;
|
LPWSTR prod;
|
||||||
UINT r;
|
UINT r;
|
||||||
|
|
||||||
|
if ((lpUserNameBuf && !pcchUserNameBuf) ||
|
||||||
|
(lpOrgNameBuf && !pcchOrgNameBuf) ||
|
||||||
|
(lpSerialBuf && !pcchSerialBuf))
|
||||||
|
return USERINFOSTATE_INVALIDARG;
|
||||||
|
|
||||||
prod = strdupAtoW( szProduct );
|
prod = strdupAtoW( szProduct );
|
||||||
if (szProduct && !prod)
|
if (szProduct && !prod)
|
||||||
return ERROR_OUTOFMEMORY;
|
return ERROR_OUTOFMEMORY;
|
||||||
|
|
|
@ -187,8 +187,8 @@
|
||||||
191 stub MsiInvalidateFeatureCache
|
191 stub MsiInvalidateFeatureCache
|
||||||
192 stdcall MsiUseFeatureExA(str str long long)
|
192 stdcall MsiUseFeatureExA(str str long long)
|
||||||
193 stdcall MsiUseFeatureExW(wstr wstr long long)
|
193 stdcall MsiUseFeatureExW(wstr wstr long long)
|
||||||
194 stdcall MsiGetFileVersionA(str str ptr str ptr)
|
194 stdcall MsiGetFileVersionA(str ptr ptr ptr ptr)
|
||||||
195 stdcall MsiGetFileVersionW(wstr wstr ptr wstr ptr)
|
195 stdcall MsiGetFileVersionW(wstr ptr ptr ptr ptr)
|
||||||
196 stdcall MsiLoadStringA(long long long long long)
|
196 stdcall MsiLoadStringA(long long long long long)
|
||||||
197 stdcall MsiLoadStringW(long long long long long)
|
197 stdcall MsiLoadStringW(long long long long long)
|
||||||
198 stdcall MsiMessageBoxA(long long long long long long)
|
198 stdcall MsiMessageBoxA(long long long long long long)
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
|
LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
{
|
{
|
||||||
|
|
|
@ -767,12 +767,13 @@ extern UINT MSIREG_OpenUserProductsKey(LPCWSTR szProduct, HKEY* key, BOOL create
|
||||||
extern UINT MSIREG_OpenUserPatchesKey(LPCWSTR szPatch, HKEY* key, BOOL create);
|
extern UINT MSIREG_OpenUserPatchesKey(LPCWSTR szPatch, HKEY* key, BOOL create);
|
||||||
extern UINT MSIREG_OpenFeaturesKey(LPCWSTR szProduct, HKEY* key, BOOL create);
|
extern UINT MSIREG_OpenFeaturesKey(LPCWSTR szProduct, HKEY* key, BOOL create);
|
||||||
extern UINT MSIREG_OpenUserDataFeaturesKey(LPCWSTR szProduct, HKEY *key, BOOL create);
|
extern UINT MSIREG_OpenUserDataFeaturesKey(LPCWSTR szProduct, HKEY *key, BOOL create);
|
||||||
extern UINT MSIREG_OpenComponents(HKEY* key);
|
|
||||||
extern UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY* key, BOOL create);
|
extern UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY* key, BOOL create);
|
||||||
|
extern UINT MSIREG_OpenLocalUserDataComponentKey(LPCWSTR szComponent, HKEY *key, BOOL create);
|
||||||
extern UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, HKEY *key, BOOL create);
|
extern UINT MSIREG_OpenUserDataComponentKey(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_OpenPatchesKey(LPCWSTR szPatch, HKEY* key, BOOL create);
|
extern UINT MSIREG_OpenPatchesKey(LPCWSTR szPatch, HKEY* key, BOOL create);
|
||||||
extern UINT MSIREG_OpenUserDataProductKey(LPCWSTR szProduct, HKEY* key, BOOL create);
|
extern UINT MSIREG_OpenUserDataProductKey(LPCWSTR szProduct, HKEY* key, BOOL create);
|
||||||
|
extern UINT MSIREG_OpenLocalUserDataProductKey(LPCWSTR szProduct, HKEY* key, BOOL create);
|
||||||
extern UINT MSIREG_OpenCurrentUserInstallProps(LPCWSTR szProduct, HKEY* key, BOOL create);
|
extern UINT MSIREG_OpenCurrentUserInstallProps(LPCWSTR szProduct, HKEY* key, BOOL create);
|
||||||
extern UINT MSIREG_OpenLocalSystemInstallProps(LPCWSTR szProduct, HKEY* key, BOOL create);
|
extern UINT MSIREG_OpenLocalSystemInstallProps(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);
|
||||||
|
@ -785,9 +786,15 @@ extern UINT MSIREG_DeleteUserDataProductKey(LPCWSTR szProduct);
|
||||||
extern UINT MSIREG_OpenLocalSystemProductKey(LPCWSTR szProductCode, HKEY *key, BOOL create);
|
extern UINT MSIREG_OpenLocalSystemProductKey(LPCWSTR szProductCode, HKEY *key, BOOL create);
|
||||||
extern UINT MSIREG_OpenLocalSystemComponentKey(LPCWSTR szComponent, HKEY *key, BOOL create);
|
extern UINT MSIREG_OpenLocalSystemComponentKey(LPCWSTR szComponent, HKEY *key, BOOL create);
|
||||||
extern UINT MSIREG_OpenLocalClassesProductKey(LPCWSTR szProductCode, HKEY *key, BOOL create);
|
extern UINT MSIREG_OpenLocalClassesProductKey(LPCWSTR szProductCode, HKEY *key, BOOL create);
|
||||||
|
extern UINT MSIREG_OpenLocalClassesFeaturesKey(LPCWSTR szProductCode, HKEY *key, BOOL create);
|
||||||
extern UINT MSIREG_OpenLocalManagedProductKey(LPCWSTR szProductCode, HKEY *key, BOOL create);
|
extern UINT MSIREG_OpenLocalManagedProductKey(LPCWSTR szProductCode, HKEY *key, BOOL create);
|
||||||
|
extern UINT MSIREG_OpenManagedFeaturesKey(LPCWSTR szProductCode, HKEY *key, BOOL create);
|
||||||
|
extern UINT MSIREG_OpenLocalUserDataFeaturesKey(LPCWSTR szProduct, HKEY *key, BOOL create);
|
||||||
extern UINT MSIREG_DeleteUserFeaturesKey(LPCWSTR szProduct);
|
extern UINT MSIREG_DeleteUserFeaturesKey(LPCWSTR szProduct);
|
||||||
|
extern UINT MSIREG_DeleteLocalUserDataComponentKey(LPCWSTR szComponent);
|
||||||
extern UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent);
|
extern UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent);
|
||||||
|
extern UINT MSIREG_DeleteUserUpgradeCodesKey(LPCWSTR szUpgradeCode);
|
||||||
|
extern UINT MSIREG_OpenClassesUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY* key, BOOL create);
|
||||||
|
|
||||||
extern LPWSTR msi_reg_get_val_str( HKEY hkey, LPCWSTR name );
|
extern LPWSTR msi_reg_get_val_str( HKEY hkey, LPCWSTR name );
|
||||||
extern BOOL msi_reg_get_val_dword( HKEY hkey, LPCWSTR name, DWORD *val);
|
extern BOOL msi_reg_get_val_dword( HKEY hkey, LPCWSTR name, DWORD *val);
|
||||||
|
@ -908,6 +915,7 @@ extern UINT msi_load_media_info(MSIPACKAGE *package, MSIFILE *file, MSIMEDIAINFO
|
||||||
extern void msi_free_media_info(MSIMEDIAINFO *mi);
|
extern void msi_free_media_info(MSIMEDIAINFO *mi);
|
||||||
extern BOOL msi_cabextract(MSIPACKAGE* package, MSIMEDIAINFO *mi, PFNFDINOTIFY notify, LPVOID data);
|
extern BOOL msi_cabextract(MSIPACKAGE* package, MSIMEDIAINFO *mi, PFNFDINOTIFY notify, LPVOID data);
|
||||||
extern UINT msi_extract_file(MSIPACKAGE *package, MSIFILE *file, LPWSTR destdir);
|
extern UINT msi_extract_file(MSIPACKAGE *package, MSIFILE *file, LPWSTR destdir);
|
||||||
|
extern UINT find_published_source(MSIPACKAGE *package, MSIMEDIAINFO *mi);
|
||||||
|
|
||||||
/* control event stuff */
|
/* control event stuff */
|
||||||
extern VOID ControlEvent_FireSubscribedEvent(MSIPACKAGE *package, LPCWSTR event,
|
extern VOID ControlEvent_FireSubscribedEvent(MSIPACKAGE *package, LPCWSTR event,
|
||||||
|
|
|
@ -760,30 +760,6 @@ static UINT msi_load_admin_properties(MSIPACKAGE *package)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT msi_set_context(MSIPACKAGE *package)
|
|
||||||
{
|
|
||||||
WCHAR val[10];
|
|
||||||
DWORD sz = 10;
|
|
||||||
DWORD num;
|
|
||||||
UINT r;
|
|
||||||
|
|
||||||
static const WCHAR szOne[] = {'1',0};
|
|
||||||
static const WCHAR szAllUsers[] = {'A','L','L','U','S','E','R','S',0};
|
|
||||||
|
|
||||||
package->Context = MSIINSTALLCONTEXT_USERUNMANAGED;
|
|
||||||
|
|
||||||
r = MSI_GetPropertyW(package, szAllUsers, val, &sz);
|
|
||||||
if (r == ERROR_SUCCESS)
|
|
||||||
{
|
|
||||||
num = atolW(val);
|
|
||||||
if (num == 1 || num == 2)
|
|
||||||
package->Context = MSIINSTALLCONTEXT_MACHINE;
|
|
||||||
}
|
|
||||||
|
|
||||||
MSI_SetPropertyW(package, szAllUsers, szOne);
|
|
||||||
return ERROR_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
|
MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
|
||||||
{
|
{
|
||||||
static const WCHAR szLevel[] = { 'U','I','L','e','v','e','l',0 };
|
static const WCHAR szLevel[] = { 'U','I','L','e','v','e','l',0 };
|
||||||
|
@ -823,8 +799,6 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
|
||||||
|
|
||||||
if (package->WordCount & MSIWORDCOUNT_ADMINISTRATIVE)
|
if (package->WordCount & MSIWORDCOUNT_ADMINISTRATIVE)
|
||||||
msi_load_admin_properties( package );
|
msi_load_admin_properties( package );
|
||||||
|
|
||||||
msi_set_context( package );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return package;
|
return package;
|
||||||
|
|
|
@ -204,6 +204,12 @@ static const WCHAR szInstaller_LocalClassesProd_fmt[] = {
|
||||||
'I','n','s','t','a','l','l','e','r','\\',
|
'I','n','s','t','a','l','l','e','r','\\',
|
||||||
'P','r','o','d','u','c','t','s','\\','%','s',0};
|
'P','r','o','d','u','c','t','s','\\','%','s',0};
|
||||||
|
|
||||||
|
static const WCHAR szInstaller_LocalClassesFeat_fmt[] = {
|
||||||
|
'S','o','f','t','w','a','r','e','\\',
|
||||||
|
'C','l','a','s','s','e','s','\\',
|
||||||
|
'I','n','s','t','a','l','l','e','r','\\',
|
||||||
|
'F','e','a','t','u','r','e','s','\\','%','s',0};
|
||||||
|
|
||||||
static const WCHAR szInstaller_LocalManagedProd_fmt[] = {
|
static const WCHAR szInstaller_LocalManagedProd_fmt[] = {
|
||||||
'S','o','f','t','w','a','r','e','\\',
|
'S','o','f','t','w','a','r','e','\\',
|
||||||
'M','i','c','r','o','s','o','f','t','\\',
|
'M','i','c','r','o','s','o','f','t','\\',
|
||||||
|
@ -214,6 +220,23 @@ static const WCHAR szInstaller_LocalManagedProd_fmt[] = {
|
||||||
'I','n','s','t','a','l','l','e','r','\\',
|
'I','n','s','t','a','l','l','e','r','\\',
|
||||||
'P','r','o','d','u','c','t','s','\\','%','s',0};
|
'P','r','o','d','u','c','t','s','\\','%','s',0};
|
||||||
|
|
||||||
|
static const WCHAR szInstaller_LocalManagedFeat_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','\\',
|
||||||
|
'M','a','n','a','g','e','d','\\','%','s','\\',
|
||||||
|
'I','n','s','t','a','l','l','e','r','\\',
|
||||||
|
'F','e','a','t','u','r','e','s','\\','%','s',0};
|
||||||
|
|
||||||
|
static const WCHAR szInstaller_ClassesUpgrade_fmt[] = {
|
||||||
|
'I','n','s','t','a','l','l','e','r','\\',
|
||||||
|
'U','p','g','r','a','d','e','C','o','d','e','s','\\',
|
||||||
|
'%','s',0};
|
||||||
|
|
||||||
|
static const WCHAR localsid[] = {'S','-','1','-','5','-','1','8',0};
|
||||||
|
|
||||||
BOOL unsquash_guid(LPCWSTR in, LPWSTR out)
|
BOOL unsquash_guid(LPCWSTR in, LPWSTR out)
|
||||||
{
|
{
|
||||||
DWORD i,n=0;
|
DWORD i,n=0;
|
||||||
|
@ -645,9 +668,22 @@ UINT MSIREG_OpenUserDataFeaturesKey(LPCWSTR szProduct, HKEY *key, BOOL create)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT MSIREG_OpenComponents(HKEY* key)
|
UINT MSIREG_OpenLocalUserDataFeaturesKey(LPCWSTR szProduct, HKEY *key, BOOL create)
|
||||||
{
|
{
|
||||||
return RegCreateKeyW(HKEY_LOCAL_MACHINE,szInstaller_Components,key);
|
WCHAR squished_pc[GUID_SIZE];
|
||||||
|
WCHAR keypath[0x200];
|
||||||
|
|
||||||
|
TRACE("%s\n", debugstr_w(szProduct));
|
||||||
|
if (!squash_guid(szProduct, squished_pc))
|
||||||
|
return ERROR_FUNCTION_FAILED;
|
||||||
|
TRACE("squished (%s)\n", debugstr_w(squished_pc));
|
||||||
|
|
||||||
|
sprintfW(keypath, szUserDataFeatures_fmt, localsid, squished_pc);
|
||||||
|
|
||||||
|
if (create)
|
||||||
|
return RegCreateKeyW(HKEY_LOCAL_MACHINE, keypath, key);
|
||||||
|
|
||||||
|
return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY* key, BOOL create)
|
UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY* key, BOOL create)
|
||||||
|
@ -671,6 +707,38 @@ UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY* key, BOOL create)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UINT MSIREG_OpenLocalUserDataComponentKey(LPCWSTR szComponent, HKEY *key, BOOL create)
|
||||||
|
{
|
||||||
|
WCHAR comp[GUID_SIZE];
|
||||||
|
WCHAR keypath[0x200];
|
||||||
|
|
||||||
|
TRACE("%s\n", debugstr_w(szComponent));
|
||||||
|
if (!squash_guid(szComponent, comp))
|
||||||
|
return ERROR_FUNCTION_FAILED;
|
||||||
|
TRACE("squished (%s)\n", debugstr_w(comp));
|
||||||
|
|
||||||
|
sprintfW(keypath, szUserDataComp_fmt, localsid, comp);
|
||||||
|
|
||||||
|
if (create)
|
||||||
|
return RegCreateKeyW(HKEY_LOCAL_MACHINE, keypath, key);
|
||||||
|
|
||||||
|
return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key);
|
||||||
|
}
|
||||||
|
|
||||||
|
UINT MSIREG_DeleteLocalUserDataComponentKey(LPCWSTR szComponent)
|
||||||
|
{
|
||||||
|
WCHAR comp[GUID_SIZE];
|
||||||
|
WCHAR keypath[0x200];
|
||||||
|
|
||||||
|
TRACE("%s\n", debugstr_w(szComponent));
|
||||||
|
if (!squash_guid(szComponent, comp))
|
||||||
|
return ERROR_FUNCTION_FAILED;
|
||||||
|
TRACE("squished (%s)\n", debugstr_w(comp));
|
||||||
|
|
||||||
|
sprintfW(keypath, szUserDataComp_fmt, localsid, comp);
|
||||||
|
return RegDeleteTreeW(HKEY_LOCAL_MACHINE, keypath);
|
||||||
|
}
|
||||||
|
|
||||||
UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, HKEY *key, BOOL create)
|
UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, HKEY *key, BOOL create)
|
||||||
{
|
{
|
||||||
UINT rc;
|
UINT rc;
|
||||||
|
@ -756,6 +824,24 @@ UINT MSIREG_OpenUserDataProductKey(LPCWSTR szProduct, HKEY *key, BOOL create)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UINT MSIREG_OpenLocalUserDataProductKey(LPCWSTR szProduct, HKEY *key, BOOL create)
|
||||||
|
{
|
||||||
|
WCHAR squished_pc[GUID_SIZE];
|
||||||
|
WCHAR keypath[0x200];
|
||||||
|
|
||||||
|
TRACE("%s\n", debugstr_w(szProduct));
|
||||||
|
if (!squash_guid(szProduct, squished_pc))
|
||||||
|
return ERROR_FUNCTION_FAILED;
|
||||||
|
TRACE("squished (%s)\n", debugstr_w(squished_pc));
|
||||||
|
|
||||||
|
sprintfW(keypath, szUserDataProd_fmt, localsid, squished_pc);
|
||||||
|
|
||||||
|
if (create)
|
||||||
|
return RegCreateKeyW(HKEY_LOCAL_MACHINE, keypath, key);
|
||||||
|
|
||||||
|
return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key);
|
||||||
|
}
|
||||||
|
|
||||||
static UINT MSIREG_OpenInstallProps(LPCWSTR szProduct, LPCWSTR szUserSID,
|
static UINT MSIREG_OpenInstallProps(LPCWSTR szProduct, LPCWSTR szUserSID,
|
||||||
HKEY *key, BOOL create)
|
HKEY *key, BOOL create)
|
||||||
{
|
{
|
||||||
|
@ -800,8 +886,6 @@ UINT MSIREG_OpenCurrentUserInstallProps(LPCWSTR szProduct, HKEY *key,
|
||||||
UINT MSIREG_OpenLocalSystemInstallProps(LPCWSTR szProduct, HKEY *key,
|
UINT MSIREG_OpenLocalSystemInstallProps(LPCWSTR szProduct, HKEY *key,
|
||||||
BOOL create)
|
BOOL create)
|
||||||
{
|
{
|
||||||
static const WCHAR localsid[] = {'S','-','1','-','5','-','1','8',0};
|
|
||||||
|
|
||||||
return MSIREG_OpenInstallProps(szProduct, localsid, key, create);
|
return MSIREG_OpenInstallProps(szProduct, localsid, key, create);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -929,6 +1013,21 @@ UINT MSIREG_OpenUserUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY* key, BOOL creat
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UINT MSIREG_DeleteUserUpgradeCodesKey(LPCWSTR szUpgradeCode)
|
||||||
|
{
|
||||||
|
WCHAR squished_pc[GUID_SIZE];
|
||||||
|
WCHAR keypath[0x200];
|
||||||
|
|
||||||
|
TRACE("%s\n",debugstr_w(szUpgradeCode));
|
||||||
|
if (!squash_guid(szUpgradeCode,squished_pc))
|
||||||
|
return ERROR_FUNCTION_FAILED;
|
||||||
|
TRACE("squished (%s)\n", debugstr_w(squished_pc));
|
||||||
|
|
||||||
|
sprintfW(keypath,szInstaller_UserUpgradeCodes_fmt,squished_pc);
|
||||||
|
|
||||||
|
return RegDeleteTreeW(HKEY_CURRENT_USER, keypath);
|
||||||
|
}
|
||||||
|
|
||||||
UINT MSIREG_OpenLocalSystemProductKey(LPCWSTR szProductCode, HKEY *key, BOOL create)
|
UINT MSIREG_OpenLocalSystemProductKey(LPCWSTR szProductCode, HKEY *key, BOOL create)
|
||||||
{
|
{
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
WCHAR squished_pc[GUID_SIZE];
|
||||||
|
@ -989,6 +1088,26 @@ UINT MSIREG_OpenLocalClassesProductKey(LPCWSTR szProductCode, HKEY *key, BOOL cr
|
||||||
return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key);
|
return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UINT MSIREG_OpenLocalClassesFeaturesKey(LPCWSTR szProductCode, HKEY *key, BOOL create)
|
||||||
|
{
|
||||||
|
WCHAR squished_pc[GUID_SIZE];
|
||||||
|
WCHAR keypath[0x200];
|
||||||
|
|
||||||
|
TRACE("%s\n", debugstr_w(szProductCode));
|
||||||
|
|
||||||
|
if (!squash_guid(szProductCode, squished_pc))
|
||||||
|
return ERROR_FUNCTION_FAILED;
|
||||||
|
|
||||||
|
TRACE("squished (%s)\n", debugstr_w(squished_pc));
|
||||||
|
|
||||||
|
sprintfW(keypath, szInstaller_LocalClassesFeat_fmt, squished_pc);
|
||||||
|
|
||||||
|
if (create)
|
||||||
|
return RegCreateKeyW(HKEY_LOCAL_MACHINE, keypath, key);
|
||||||
|
|
||||||
|
return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key);
|
||||||
|
}
|
||||||
|
|
||||||
UINT MSIREG_OpenLocalManagedProductKey(LPCWSTR szProductCode, HKEY *key, BOOL create)
|
UINT MSIREG_OpenLocalManagedProductKey(LPCWSTR szProductCode, HKEY *key, BOOL create)
|
||||||
{
|
{
|
||||||
WCHAR squished_pc[GUID_SIZE];
|
WCHAR squished_pc[GUID_SIZE];
|
||||||
|
@ -1019,6 +1138,54 @@ UINT MSIREG_OpenLocalManagedProductKey(LPCWSTR szProductCode, HKEY *key, BOOL cr
|
||||||
return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key);
|
return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UINT MSIREG_OpenManagedFeaturesKey(LPCWSTR szProductCode, HKEY *key, BOOL create)
|
||||||
|
{
|
||||||
|
WCHAR squished_pc[GUID_SIZE];
|
||||||
|
WCHAR keypath[0x200];
|
||||||
|
LPWSTR usersid;
|
||||||
|
UINT r;
|
||||||
|
|
||||||
|
TRACE("%s\n", debugstr_w(szProductCode));
|
||||||
|
|
||||||
|
if (!squash_guid(szProductCode, squished_pc))
|
||||||
|
return ERROR_FUNCTION_FAILED;
|
||||||
|
|
||||||
|
TRACE("squished (%s)\n", debugstr_w(squished_pc));
|
||||||
|
|
||||||
|
r = get_user_sid(&usersid);
|
||||||
|
if (r != ERROR_SUCCESS || !usersid)
|
||||||
|
{
|
||||||
|
ERR("Failed to retrieve user SID: %d\n", r);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
sprintfW(keypath, szInstaller_LocalManagedFeat_fmt, usersid, squished_pc);
|
||||||
|
LocalFree(usersid);
|
||||||
|
|
||||||
|
if (create)
|
||||||
|
return RegCreateKeyW(HKEY_LOCAL_MACHINE, keypath, key);
|
||||||
|
|
||||||
|
return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key);
|
||||||
|
}
|
||||||
|
|
||||||
|
UINT MSIREG_OpenClassesUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY* key, BOOL create)
|
||||||
|
{
|
||||||
|
WCHAR squished_pc[GUID_SIZE];
|
||||||
|
WCHAR keypath[0x200];
|
||||||
|
|
||||||
|
TRACE("%s\n", debugstr_w(szUpgradeCode));
|
||||||
|
if (!squash_guid(szUpgradeCode, squished_pc))
|
||||||
|
return ERROR_FUNCTION_FAILED;
|
||||||
|
TRACE("squished (%s)\n", debugstr_w(squished_pc));
|
||||||
|
|
||||||
|
sprintfW(keypath, szInstaller_ClassesUpgrade_fmt, squished_pc);
|
||||||
|
|
||||||
|
if (create)
|
||||||
|
return RegCreateKeyW(HKEY_CLASSES_ROOT, keypath, key);
|
||||||
|
|
||||||
|
return RegOpenKeyW(HKEY_CLASSES_ROOT, keypath, key);
|
||||||
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* MsiDecomposeDescriptorW [MSI.@]
|
* MsiDecomposeDescriptorW [MSI.@]
|
||||||
*
|
*
|
||||||
|
@ -1240,7 +1407,7 @@ UINT WINAPI MsiEnumComponentsW(DWORD index, LPWSTR lpguid)
|
||||||
|
|
||||||
TRACE("%d %p\n", index, lpguid);
|
TRACE("%d %p\n", index, lpguid);
|
||||||
|
|
||||||
r = MSIREG_OpenComponents(&hkeyComponents);
|
r = RegCreateKeyW(HKEY_LOCAL_MACHINE, szInstaller_Components, &hkeyComponents);
|
||||||
if( r != ERROR_SUCCESS )
|
if( r != ERROR_SUCCESS )
|
||||||
return ERROR_NO_MORE_ITEMS;
|
return ERROR_NO_MORE_ITEMS;
|
||||||
|
|
||||||
|
|
|
@ -304,15 +304,14 @@ UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode,
|
||||||
|
|
||||||
if (pcchDiskPrompt)
|
if (pcchDiskPrompt)
|
||||||
{
|
{
|
||||||
data = ptr;
|
if (!*ptr)
|
||||||
if (!*data)
|
ptr++;
|
||||||
data++;
|
|
||||||
|
|
||||||
size = lstrlenW(data);
|
size = lstrlenW(ptr);
|
||||||
if (size >= *pcchDiskPrompt)
|
if (size >= *pcchDiskPrompt)
|
||||||
r = ERROR_MORE_DATA;
|
r = ERROR_MORE_DATA;
|
||||||
else if (szDiskPrompt)
|
else if (szDiskPrompt)
|
||||||
lstrcpyW(szDiskPrompt, data);
|
lstrcpyW(szDiskPrompt, ptr);
|
||||||
|
|
||||||
*pcchDiskPrompt = size;
|
*pcchDiskPrompt = size;
|
||||||
}
|
}
|
||||||
|
|
|
@ -458,7 +458,6 @@ HPALETTE VFWAPI DrawDibGetPalette(HDRAWDIB hdd)
|
||||||
UINT VFWAPI DrawDibRealize(HDRAWDIB hdd, HDC hdc, BOOL fBackground)
|
UINT VFWAPI DrawDibRealize(HDRAWDIB hdd, HDC hdc, BOOL fBackground)
|
||||||
{
|
{
|
||||||
WINE_HDD *whdd;
|
WINE_HDD *whdd;
|
||||||
HPALETTE oldPal;
|
|
||||||
UINT ret = 0;
|
UINT ret = 0;
|
||||||
|
|
||||||
FIXME("(%p, %p, %d), stub\n", hdd, hdc, fBackground);
|
FIXME("(%p, %p, %d), stub\n", hdd, hdc, fBackground);
|
||||||
|
@ -475,7 +474,7 @@ UINT VFWAPI DrawDibRealize(HDRAWDIB hdd, HDC hdc, BOOL fBackground)
|
||||||
if (!whdd->hpal)
|
if (!whdd->hpal)
|
||||||
whdd->hpal = CreateHalftonePalette(hdc);
|
whdd->hpal = CreateHalftonePalette(hdc);
|
||||||
|
|
||||||
oldPal = SelectPalette(hdc, whdd->hpal, fBackground);
|
SelectPalette(hdc, whdd->hpal, fBackground);
|
||||||
ret = RealizePalette(hdc);
|
ret = RealizePalette(hdc);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
|
53
reactos/dll/win32/msvfw32/msvfw32_Da.rc
Normal file
53
reactos/dll/win32/msvfw32/msvfw32_Da.rc
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
/*
|
||||||
|
* Danish language support
|
||||||
|
*
|
||||||
|
* Copyright (C) 2008 Jens Albretsen <jens@albretsen.dk>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
LANGUAGE LANG_DANISH, SUBLANG_DEFAULT
|
||||||
|
|
||||||
|
ICM_CHOOSE_COMPRESSOR DIALOG DISCARDABLE 36, 24, 187, 95
|
||||||
|
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||||
|
CAPTION "Video komprimering"
|
||||||
|
FONT 8, "MS Shell Dlg"
|
||||||
|
{
|
||||||
|
DEFPUSHBUTTON "OK",IDOK,129,2,49,14
|
||||||
|
PUSHBUTTON "Annuller",IDCANCEL,129,18,49,14
|
||||||
|
|
||||||
|
LTEXT "&Komprimerer:",-1,9,6,105,8
|
||||||
|
COMBOBOX 880,9,16,111,67,CBS_DROPDOWNLIST|WS_VSCROLL|WS_TABSTOP
|
||||||
|
|
||||||
|
PUSHBUTTON "&Opsætning...",882,129,36,49,14
|
||||||
|
PUSHBUTTON "O&m...",883,129,52,49,14
|
||||||
|
|
||||||
|
SCROLLBAR 884,9,44,111,9,WS_TABSTOP
|
||||||
|
|
||||||
|
LTEXT "Komprimeringskvalite&t:",886,9,34,80,8
|
||||||
|
|
||||||
|
CONTROL "Keyframe for hvert",887,"Button",BS_AUTOCHECKBOX|WS_TABSTOP,9,60,66,12
|
||||||
|
EDITTEXT 888,78,60,22,12
|
||||||
|
LTEXT "billede",889,103,62,26,10
|
||||||
|
|
||||||
|
CONTROL "&Datahastighed",894,"Button",BS_AUTOCHECKBOX|WS_TABSTOP,9,76,66,12
|
||||||
|
EDITTEXT 895,78,76,22,12
|
||||||
|
LTEXT "KB/s",896,102,78,26,10
|
||||||
|
}
|
||||||
|
|
||||||
|
STRINGTABLE DISCARDABLE
|
||||||
|
{
|
||||||
|
IDS_FULLFRAMES "Fulde billeder (ukomprimeret)"
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2007 Luis Carlos Busquets Pérez
|
* Copyright 2007 Luis Carlos Busquets Pérez
|
||||||
|
* Copyright 2008 José Manuel Ferrer Ortiz
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -36,11 +37,11 @@ FONT 8, "MS Shell Dlg"
|
||||||
|
|
||||||
LTEXT "C&alidad de compresión:",886,9,34,80,8
|
LTEXT "C&alidad de compresión:",886,9,34,80,8
|
||||||
|
|
||||||
CONTROL "C&uadro clave cada",887,"Botón",BS_AUTOCHECKBOX|WS_TABSTOP,9,60,66,12
|
CONTROL "C&uadro clave cada",887,"Button",BS_AUTOCHECKBOX|WS_TABSTOP,9,60,66,12
|
||||||
EDITTEXT 888,78,60,22,12
|
EDITTEXT 888,78,60,22,12
|
||||||
LTEXT "cuadros",889,103,62,26,10
|
LTEXT "cuadros",889,103,62,26,10
|
||||||
|
|
||||||
CONTROL "&Velocidad de datos",894,"Botón",BS_AUTOCHECKBOX|WS_TABSTOP,9,76,66,12
|
CONTROL "&Tasa de datos",894,"Button",BS_AUTOCHECKBOX|WS_TABSTOP,9,76,66,12
|
||||||
EDITTEXT 895,78,76,22,12
|
EDITTEXT 895,78,76,22,12
|
||||||
LTEXT "KB/s",896,102,78,26,10
|
LTEXT "KB/s",896,102,78,26,10
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,8 +29,8 @@ FONT 8, "MS Shell Dlg"
|
||||||
LTEXT "&Komprimerer:",-1,9,6,105,8
|
LTEXT "&Komprimerer:",-1,9,6,105,8
|
||||||
COMBOBOX 880,9,16,111,67,CBS_DROPDOWNLIST|WS_VSCROLL|WS_TABSTOP
|
COMBOBOX 880,9,16,111,67,CBS_DROPDOWNLIST|WS_VSCROLL|WS_TABSTOP
|
||||||
|
|
||||||
PUSHBUTTON "&Oppsett . . .",882,129,36,49,14
|
PUSHBUTTON "&Oppsett...",882,129,36,49,14
|
||||||
PUSHBUTTON "O&m . . .",883,129,52,49,14
|
PUSHBUTTON "O&m...",883,129,52,49,14
|
||||||
|
|
||||||
SCROLLBAR 884,9,44,111,9,WS_TABSTOP
|
SCROLLBAR 884,9,44,111,9,WS_TABSTOP
|
||||||
|
|
||||||
|
|
51
reactos/dll/win32/msvfw32/msvfw32_Ru.rc
Normal file
51
reactos/dll/win32/msvfw32/msvfw32_Ru.rc
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2008 Vitaliy Margolen
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
||||||
|
|
||||||
|
ICM_CHOOSE_COMPRESSOR DIALOG DISCARDABLE 36, 24, 187, 95
|
||||||
|
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||||
|
CAPTION "Ñæàòèå âèäåî"
|
||||||
|
FONT 8, "MS Shell Dlg"
|
||||||
|
{
|
||||||
|
DEFPUSHBUTTON "OK",IDOK,129,2,49,14
|
||||||
|
PUSHBUTTON "Îòìåíà",IDCANCEL,129,18,49,14
|
||||||
|
|
||||||
|
LTEXT "&Àëãîðèòì ñæàòèÿ:",-1,9,6,105,8
|
||||||
|
COMBOBOX 880,9,16,111,67,CBS_DROPDOWNLIST|WS_VSCROLL|WS_TABSTOP
|
||||||
|
|
||||||
|
PUSHBUTTON "&Íàñòðîéêè...",882,129,36,49,14
|
||||||
|
PUSHBUTTON "&Èíôîðìàöèÿ...",883,129,52,49,14
|
||||||
|
|
||||||
|
SCROLLBAR 884,9,44,111,9,WS_TABSTOP
|
||||||
|
|
||||||
|
LTEXT "&Êà÷åñòâî ñæàòèÿ:",886,9,34,80,8
|
||||||
|
|
||||||
|
CONTROL "Êë&þ÷åâîé êàäð êàæäûå",887,"Button",BS_AUTOCHECKBOX|WS_TABSTOP,9,60,66,12
|
||||||
|
EDITTEXT 888,78,60,22,12
|
||||||
|
LTEXT "êàäðîâ",889,103,62,26,10
|
||||||
|
|
||||||
|
CONTROL "&Ïîòîê äàííûõ",894,"Button",BS_AUTOCHECKBOX|WS_TABSTOP,9,76,66,12
|
||||||
|
EDITTEXT 895,78,76,22,12
|
||||||
|
LTEXT "ÊÁ/ñåê",896,102,78,26,10
|
||||||
|
}
|
||||||
|
|
||||||
|
STRINGTABLE DISCARDABLE
|
||||||
|
{
|
||||||
|
IDS_FULLFRAMES "Êàäðû öåëèêîì (Áåç êîìïðåññèè)"
|
||||||
|
}
|
55
reactos/dll/win32/msvfw32/msvfw32_Si.rc
Normal file
55
reactos/dll/win32/msvfw32/msvfw32_Si.rc
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2008 Rok Mandeljc
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma code_page(65001)
|
||||||
|
|
||||||
|
LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT
|
||||||
|
|
||||||
|
ICM_CHOOSE_COMPRESSOR DIALOG DISCARDABLE 36, 24, 187, 95
|
||||||
|
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||||
|
CAPTION "Stiskanje videa"
|
||||||
|
FONT 8, "MS Shell Dlg"
|
||||||
|
{
|
||||||
|
DEFPUSHBUTTON "V redu",IDOK,129,2,49,14
|
||||||
|
PUSHBUTTON "Prekliči",IDCANCEL,129,18,49,14
|
||||||
|
|
||||||
|
LTEXT "&Kodek za stiskanje:",-1,9,6,105,8
|
||||||
|
COMBOBOX 880,9,16,111,67,CBS_DROPDOWNLIST|WS_VSCROLL|WS_TABSTOP
|
||||||
|
|
||||||
|
PUSHBUTTON "&Nastavitve ...",882,129,36,49,14
|
||||||
|
PUSHBUTTON "&O ...",883,129,52,49,14
|
||||||
|
|
||||||
|
SCROLLBAR 884,9,44,111,9,WS_TABSTOP
|
||||||
|
|
||||||
|
LTEXT "Kakovost &stiskanja:",886,9,34,80,8
|
||||||
|
|
||||||
|
CONTROL "&Ključna slika na vsakih",887,"Button",BS_AUTOCHECKBOX|WS_TABSTOP,9,60,66,12
|
||||||
|
EDITTEXT 888,78,60,22,12
|
||||||
|
LTEXT "slik",889,103,62,26,10
|
||||||
|
|
||||||
|
CONTROL "&Pretok podatkov",894,"Button",BS_AUTOCHECKBOX|WS_TABSTOP,9,76,66,12
|
||||||
|
EDITTEXT 895,78,76,22,12
|
||||||
|
LTEXT "kb/s",896,102,78,26,10
|
||||||
|
}
|
||||||
|
|
||||||
|
STRINGTABLE DISCARDABLE
|
||||||
|
{
|
||||||
|
IDS_FULLFRAMES "Polne slike (nestisnjeno)"
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma code_page(default)
|
|
@ -16,7 +16,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
|
LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
|
||||||
|
|
||||||
ICM_CHOOSE_COMPRESSOR DIALOG DISCARDABLE 36, 24, 187, 95
|
ICM_CHOOSE_COMPRESSOR DIALOG DISCARDABLE 36, 24, 187, 95
|
||||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "msvideo_private.h"
|
#include "msvideo_private.h"
|
||||||
|
|
||||||
|
#include "msvfw32_Da.rc"
|
||||||
#include "msvfw32_De.rc"
|
#include "msvfw32_De.rc"
|
||||||
#include "msvfw32_En.rc"
|
#include "msvfw32_En.rc"
|
||||||
#include "msvfw32_Es.rc"
|
#include "msvfw32_Es.rc"
|
||||||
|
@ -29,5 +30,7 @@
|
||||||
#include "msvfw32_Nl.rc"
|
#include "msvfw32_Nl.rc"
|
||||||
#include "msvfw32_No.rc"
|
#include "msvfw32_No.rc"
|
||||||
#include "msvfw32_Pl.rc"
|
#include "msvfw32_Pl.rc"
|
||||||
|
#include "msvfw32_Ru.rc"
|
||||||
|
#include "msvfw32_Si.rc"
|
||||||
#include "msvfw32_Sv.rc"
|
#include "msvfw32_Sv.rc"
|
||||||
#include "msvfw32_Tr.rc"
|
#include "msvfw32_Tr.rc"
|
||||||
|
|
|
@ -105,6 +105,34 @@ static struct sam_user* NETAPI_FindUser(LPCWSTR UserName)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static BOOL NETAPI_IsCurrentUser(LPCWSTR username)
|
||||||
|
{
|
||||||
|
LPWSTR curr_user = NULL;
|
||||||
|
DWORD dwSize;
|
||||||
|
BOOL ret = FALSE;
|
||||||
|
|
||||||
|
dwSize = LM20_UNLEN+1;
|
||||||
|
curr_user = HeapAlloc(GetProcessHeap(), 0, dwSize);
|
||||||
|
if(!curr_user)
|
||||||
|
{
|
||||||
|
ERR("Failed to allocate memory for user name.\n");
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
if(!GetUserNameW(curr_user, &dwSize))
|
||||||
|
{
|
||||||
|
ERR("Failed to get current user's user name.\n");
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
if (!lstrcmpW(curr_user, username))
|
||||||
|
{
|
||||||
|
ret = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
end:
|
||||||
|
HeapFree(GetProcessHeap(), 0, curr_user);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/************************************************************
|
/************************************************************
|
||||||
* NetUserAdd (NETAPI32.@)
|
* NetUserAdd (NETAPI32.@)
|
||||||
*/
|
*/
|
||||||
|
@ -226,7 +254,7 @@ NetUserGetInfo(LPCWSTR servername, LPCWSTR username, DWORD level,
|
||||||
return NERR_InvalidComputer;
|
return NERR_InvalidComputer;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!NETAPI_FindUser(username))
|
if(!NETAPI_FindUser(username) && !NETAPI_IsCurrentUser(username))
|
||||||
{
|
{
|
||||||
TRACE("User %s is unknown.\n", debugstr_w(username));
|
TRACE("User %s is unknown.\n", debugstr_w(username));
|
||||||
return NERR_UserNotFound;
|
return NERR_UserNotFound;
|
||||||
|
|
|
@ -77,7 +77,7 @@ VOID WINAPI DsRoleFreeMemory(PVOID Buffer)
|
||||||
* DsRoleGetPrimaryDomainInformation (NETAPI32.@)
|
* DsRoleGetPrimaryDomainInformation (NETAPI32.@)
|
||||||
*
|
*
|
||||||
* PARAMS
|
* PARAMS
|
||||||
* lpServer [I] Pointer to UNICODE string with Computername
|
* lpServer [I] Pointer to UNICODE string with ComputerName
|
||||||
* InfoLevel [I] Type of data to retrieve
|
* InfoLevel [I] Type of data to retrieve
|
||||||
* Buffer [O] Pointer to to the requested data
|
* Buffer [O] Pointer to to the requested data
|
||||||
*
|
*
|
||||||
|
@ -99,6 +99,7 @@ DWORD WINAPI DsRoleGetPrimaryDomainInformation(
|
||||||
if (!Buffer) return ERROR_INVALID_PARAMETER;
|
if (!Buffer) return ERROR_INVALID_PARAMETER;
|
||||||
if ((InfoLevel < DsRolePrimaryDomainInfoBasic) || (InfoLevel > DsRoleOperationState)) return ERROR_INVALID_PARAMETER;
|
if ((InfoLevel < DsRolePrimaryDomainInfoBasic) || (InfoLevel > DsRoleOperationState)) return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
|
*Buffer = NULL;
|
||||||
switch (InfoLevel)
|
switch (InfoLevel)
|
||||||
{
|
{
|
||||||
case DsRolePrimaryDomainInfoBasic:
|
case DsRolePrimaryDomainInfoBasic:
|
||||||
|
|
|
@ -45,7 +45,7 @@ typedef struct _NBNameCacheEntry
|
||||||
|
|
||||||
/* Functions that create, manipulate, and destroy a name cache. Thread-safe,
|
/* Functions that create, manipulate, and destroy a name cache. Thread-safe,
|
||||||
* with the exception of NBNameCacheDestroy--ensure that no other threads are
|
* with the exception of NBNameCacheDestroy--ensure that no other threads are
|
||||||
* manipulating the cache before destoying it.
|
* manipulating the cache before destroying it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Allocates a new name cache from heap, and sets the expire time on new
|
/* Allocates a new name cache from heap, and sets the expire time on new
|
||||||
|
|
|
@ -103,7 +103,7 @@ static void wprint_mac(WCHAR* buffer, int len, const MIB_IFROW *ifRow)
|
||||||
|
|
||||||
/* Theoretically this could be too short, except that MS defines
|
/* Theoretically this could be too short, except that MS defines
|
||||||
* MAX_ADAPTER_NAME as 128, and MAX_INTERFACE_NAME_LEN as 256, and both
|
* MAX_ADAPTER_NAME as 128, and MAX_INTERFACE_NAME_LEN as 256, and both
|
||||||
* represent a count of WCHARs, so even with an extroardinarily long header
|
* represent a count of WCHARs, so even with an extraordinarily long header
|
||||||
* this will be plenty
|
* this will be plenty
|
||||||
*/
|
*/
|
||||||
#define MAX_TRANSPORT_NAME MAX_INTERFACE_NAME_LEN
|
#define MAX_TRANSPORT_NAME MAX_INTERFACE_NAME_LEN
|
||||||
|
@ -348,7 +348,6 @@ NET_API_STATUS WINAPI NetWkstaUserGetInfo(LMSTR reserved, DWORD level,
|
||||||
{
|
{
|
||||||
PWKSTA_USER_INFO_1 ui;
|
PWKSTA_USER_INFO_1 ui;
|
||||||
PWKSTA_USER_INFO_0 ui0;
|
PWKSTA_USER_INFO_0 ui0;
|
||||||
DWORD dwSize;
|
|
||||||
LSA_OBJECT_ATTRIBUTES ObjectAttributes;
|
LSA_OBJECT_ATTRIBUTES ObjectAttributes;
|
||||||
LSA_HANDLE PolicyHandle;
|
LSA_HANDLE PolicyHandle;
|
||||||
PPOLICY_ACCOUNT_DOMAIN_INFO DomainInfo;
|
PPOLICY_ACCOUNT_DOMAIN_INFO DomainInfo;
|
||||||
|
@ -405,7 +404,6 @@ NET_API_STATUS WINAPI NetWkstaUserGetInfo(LMSTR reserved, DWORD level,
|
||||||
oth_domains_sz * sizeof(WCHAR));
|
oth_domains_sz * sizeof(WCHAR));
|
||||||
|
|
||||||
/* get data */
|
/* get data */
|
||||||
dwSize = username_sz;
|
|
||||||
lstrcpyW(ui->wkui1_username, ui0->wkui0_username);
|
lstrcpyW(ui->wkui1_username, ui0->wkui0_username);
|
||||||
NetApiBufferFree(ui0);
|
NetApiBufferFree(ui0);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue