Sync aclui, advapi32, atl, authz, kernel32, msi, oledlg, powrprof, qmgr, riched20, samlib to Wine 1.2rc5

Update some psdk Headers to get some more synched winetests build

svn path=/trunk/; revision=47930
This commit is contained in:
Daniel Reimer 2010-07-03 12:42:55 +00:00
parent c11b4add2f
commit 74b08b2f54
68 changed files with 1792 additions and 944 deletions

View file

@ -1,5 +1,3 @@
# aclui.dll exports
1 stdcall CreateSecurityPage(ptr)
2 stdcall EditSecurity(ptr ptr)
16 extern IID_ISecurityInformation
@ stdcall CreateSecurityPage(ptr)
@ stdcall EditSecurity(long ptr)
@ extern IID_ISecurityInformation

View file

@ -22,6 +22,7 @@
#include <aclapi.h>
#include <wmistr.h>
#include <evntrace.h>
#include <winsafer.h>
#include <sddl.h>
#define NTOS_MODE_USER
#include <ndk/ntndk.h>
@ -41,6 +42,10 @@
#define FN_PROGRESSA FN_PROGRESS
#endif
/* sid.c */
BOOL ADVAPI_GetComputerSid(PSID sid);
/* rpc.c */
RPC_STATUS EvtBindRpc(LPCWSTR pszMachine,

View file

@ -6,7 +6,7 @@
@ stdcall AccessCheck(ptr long long ptr ptr ptr ptr ptr)
@ stdcall AccessCheckAndAuditAlarmA(str ptr str str ptr long ptr long ptr ptr ptr)
@ stdcall AccessCheckAndAuditAlarmW(wstr ptr wstr wstr ptr long ptr long ptr ptr ptr)
@ stub AccessCheckByType #(ptr ptr long long ptr long ptr ptr ptr ptr ptr)
@ stdcall AccessCheckByType(ptr ptr long long ptr long ptr ptr ptr ptr ptr)
@ stdcall AccessCheckByTypeAndAuditAlarmA(str ptr str str ptr ptr long long long ptr long ptr long ptr ptr ptr)
@ stdcall AccessCheckByTypeAndAuditAlarmW(wstr ptr wstr wstr ptr ptr long long long ptr long ptr long ptr ptr ptr)
@ stub AccessCheckByTypeResultList
@ -67,8 +67,8 @@
@ stub ComputeAccessTokenFromCodeAuthzLevel
@ stdcall ControlService(long long ptr)
@ stdcall ControlServiceEx(ptr long long ptr)
@ stub ControlTraceA
@ stub ControlTraceW
@ stdcall ControlTraceA(double str ptr long)
@ stdcall ControlTraceW(double wstr ptr long)
@ stub ConvertAccessToSecurityDescriptorA
@ stub ConvertAccessToSecurityDescriptorW
@ stub ConvertSDToStringSDRootDomainA
@ -96,9 +96,9 @@
@ stdcall CreatePrivateObjectSecurityEx(ptr ptr ptr ptr long long ptr ptr)
@ stdcall CreatePrivateObjectSecurityWithMultipleInheritance(ptr ptr ptr ptr long long long ptr ptr)
@ stdcall CreateProcessAsUserA(long str str ptr ptr long long ptr str ptr ptr)
@ stub CreateProcessAsUserSecure
# @ stub CreateProcessAsUserSecure
@ stdcall CreateProcessAsUserW(long str str ptr ptr long long ptr str ptr ptr)
@ stub CreateProcessWithLogonW #(wstr wstr wstr long wstr wstr long ptr wstr ptr ptr)
@ stdcall CreateProcessWithLogonW(wstr wstr wstr long wstr wstr long ptr wstr ptr ptr)
@ stdcall CreateProcessWithTokenW(ptr long wstr wstr long ptr wstr ptr ptr)
@ stdcall CreateRestrictedToken(long long long ptr long ptr long ptr ptr)
@ stdcall CreateServiceA(long str str long long long long str str ptr str str str)
@ -127,8 +127,8 @@
@ stdcall CredUnmarshalCredentialA(str ptr ptr)
@ stdcall CredUnmarshalCredentialW(wstr ptr ptr)
@ stdcall CredWriteA(ptr long)
@ stdcall CredWriteDomainCredentialsA(ptr ptr long)
@ stdcall CredWriteDomainCredentialsW(ptr ptr long)
# @ stub CredWriteDomainCredentialsA
# @ stub CredWriteDomainCredentialsW
@ stdcall CredWriteW(ptr long)
@ stub CredpConvertCredential
@ stub CredpConvertTargetInfo
@ -189,6 +189,8 @@
@ stub ElfClearEventLogFileW
@ stub ElfCloseEventLog
@ stub ElfDeregisterEventSource
@ stub ElfDeregisterEventSourceW
@ stub ElfFlushEventLog
@ stub ElfNumberOfRecords
@ stub ElfOldestRecord
@ stub ElfOpenBackupEventLogA
@ -201,13 +203,14 @@
@ stub ElfRegisterEventSourceW
@ stub ElfReportEventA
@ stub ElfReportEventW
@ stub EnableTrace
@ stdcall EnableTrace(long long long ptr double)
@ stdcall EncryptFileA(str)
@ stdcall EncryptFileW(wstr)
@ stub EncryptedFileKeyInfo
@ stdcall EncryptionDisable(wstr long)
@ stdcall EnumDependentServicesA(long long ptr long ptr ptr)
@ stdcall EnumDependentServicesW(long long ptr long ptr ptr)
@ stub EnumServiceGroupA
@ stdcall EnumServiceGroupW(ptr long long ptr long ptr ptr ptr wstr)
@ stdcall EnumServicesStatusA(long long long ptr long ptr ptr ptr)
@ stdcall EnumServicesStatusExA(long long long long ptr long ptr ptr ptr str)
@ -251,6 +254,7 @@
@ stub GetLocalManagedApplications
@ stub GetManagedApplicationCategories
@ stub GetManagedApplications
@ stub GetMangledSiteSid
@ stdcall GetMultipleTrusteeA(ptr)
@ stdcall GetMultipleTrusteeOperationA(ptr)
@ stdcall GetMultipleTrusteeOperationW(ptr)
@ -299,23 +303,25 @@
@ stub I_ScIsSecurityProcess
@ stub I_ScPnPGetServiceName
@ stub I_ScSendTSMessage
@ stub I_ScSetServiceBit
@ stdcall I_ScSetServiceBitsA(ptr long long long str)
@ stdcall I_ScSetServiceBitsW(ptr long long long wstr)
@ stub IdentifyCodeAuthzLevelW
@ stdcall ImpersonateAnonymousToken(ptr)
@ stdcall ImpersonateLoggedOnUser(ptr)
@ stdcall ImpersonateNamedPipeClient(ptr)
@ stdcall ImpersonateLoggedOnUser(long)
@ stdcall ImpersonateNamedPipeClient(long)
@ stdcall ImpersonateSelf(long)
@ stdcall InitializeAcl(ptr long long)
@ stdcall InitializeSecurityDescriptor(ptr long)
@ stdcall InitializeSid(ptr ptr long)
@ stdcall InitiateSystemShutdownA(str str long long long)
@ stub InitiateSystemShutdownExA #(str str long long long long)
@ stdcall InitiateSystemShutdownExA(str str long long long long)
@ stdcall InitiateSystemShutdownExW(wstr wstr long long long long)
@ stdcall InitiateSystemShutdownW(str str long long long)
@ stub InstallApplication
@ stub IsProcessRestricted
@ stdcall IsTextUnicode(ptr long ptr) ntdll.RtlIsTextUnicode
@ stdcall IsTokenRestricted(ptr)
@ stdcall IsTokenRestricted(long)
@ stub IsTokenUntrusted
@ stdcall IsValidAcl(ptr)
@ stdcall IsValidSecurityDescriptor(ptr)
@ -385,19 +391,23 @@
@ stub LsaQuerySecurityObject
@ stdcall LsaQueryTrustedDomainInfo(ptr ptr long ptr)
@ stdcall LsaQueryTrustedDomainInfoByName(ptr ptr long ptr)
@ stdcall LsaRegisterPolicyChangeNotification(long long)
@ stdcall LsaRemoveAccountRights(ptr ptr long ptr long)
@ stub LsaRemovePrivilegesFromAccount
@ stdcall LsaRetrievePrivateData(ptr ptr ptr)
# @ stub LsaSetDomainInformationPolicy
# @ stub LsaSetForestTrustInformation
@ stdcall LsaSetInformationPolicy(long long ptr)
@ stub LsaSetForestTrustInformation
@ stub LsaSetInformationTrustedDomain
@ stub LsaSetQuotasForAccount
@ stub LsaSetSecret
@ stdcall LsaSetSecret(ptr ptr ptr)
@ stub LsaSetSecurityObject
@ stub LsaSetSystemAccessAccount
@ stdcall LsaSetTrustedDomainInfoByName(ptr ptr long ptr)
@ stdcall LsaSetTrustedDomainInformation(ptr ptr long ptr)
@ stdcall LsaStorePrivateData(ptr ptr ptr)
@ stdcall LsaUnregisterPolicyChangeNotification(long long)
@ stdcall MD4Final(ptr)
@ stdcall MD4Init(ptr)
@ stdcall MD4Update(ptr ptr long)
@ -440,8 +450,8 @@
@ stub ProcessIdleTasks
@ stub ProcessTrace
@ stub ProvAccessRightsToNTAccessMask # ?
@ stub QueryAllTracesA
@ stub QueryAllTracesW
@ stdcall QueryAllTracesA(ptr long ptr)
@ stdcall QueryAllTracesW(ptr long ptr)
@ stdcall QueryRecoveryAgentsOnEncryptedFile(wstr ptr)
@ stdcall QuerySecurityAccessMask(long ptr)
@ stdcall QueryServiceConfig2A(long long ptr long ptr)
@ -456,7 +466,7 @@
@ stub QueryTraceA
@ stub QueryTraceW
@ stdcall QueryUsersOnEncryptedFile(wstr ptr)
@ stub QueryWindows31FilesMigration #(long)
@ stdcall QueryWindows31FilesMigration(long)
@ stub ReadEncryptedFileRaw
@ stdcall ReadEventLogA(long long long ptr long ptr ptr)
@ stdcall ReadEventLogW(long long long ptr long ptr ptr)
@ -470,9 +480,9 @@
@ stdcall RegCreateKeyExW(long wstr long ptr long long ptr ptr ptr)
@ stdcall RegCreateKeyW(long wstr ptr)
@ stdcall RegDeleteKeyA(long str)
@ stdcall RegDeleteKeyExA(long str long long)
@ stdcall RegDeleteKeyExW(long wstr long long)
@ stdcall RegDeleteKeyW(long wstr)
@ stdcall RegDeleteKeyExA(ptr str long long)
@ stdcall RegDeleteKeyExW(ptr wstr long long)
@ stdcall RegDeleteKeyValueA(ptr str str)
@ stdcall RegDeleteKeyValueW(ptr wstr wstr)
@ stdcall RegDeleteTreeA(long str)
@ -514,6 +524,7 @@
@ stdcall RegQueryValueExA(long str ptr ptr ptr ptr)
@ stdcall RegQueryValueExW(long wstr ptr ptr ptr ptr)
@ stdcall RegQueryValueW(long wstr ptr ptr)
@ stub RegRemapPreDefKey
@ stdcall RegReplaceKeyA(long str str str)
@ stdcall RegReplaceKeyW(long wstr wstr wstr)
@ stdcall RegRestoreKeyA(long str long)
@ -547,9 +558,9 @@
@ stdcall RevertToSelf()
@ stub SaferCloseLevel
@ stub SaferComputeTokenFromLevel
@ stub SaferCreateLevel
@ stdcall SaferCreateLevel(long long long ptr ptr)
@ stub SaferGetLevelInformation
@ stub SaferGetPolicyInformation
@ stdcall SaferGetPolicyInformation(long long long ptr ptr ptr)
@ stub SaferIdentifyLevel
@ stub SaferRecordEventLogEntry
@ stub SaferSetLevelInformation
@ -600,11 +611,11 @@
@ stdcall StartServiceCtrlDispatcherA(ptr)
@ stdcall StartServiceCtrlDispatcherW(ptr)
@ stdcall StartServiceW(long long ptr)
@ stub StartTraceA
@ stub StartTraceW
@ stdcall StartTraceA(ptr str ptr)
@ stdcall StartTraceW(ptr wstr ptr)
@ stub StopTraceA
@ stub StopTraceW
@ stub SynchronizeWindows31FilesAndWindowsNTRegistry #(long long long long)
@ stdcall SynchronizeWindows31FilesAndWindowsNTRegistry(long long long long)
@ stdcall SystemFunction001(ptr ptr ptr)
@ stdcall SystemFunction002(ptr ptr ptr)
@ stdcall SystemFunction003(ptr ptr)
@ -615,40 +626,40 @@
@ stdcall SystemFunction008(ptr ptr ptr)
@ stdcall SystemFunction009(ptr ptr ptr)
@ stdcall SystemFunction010(ptr ptr ptr)
@ stdcall SystemFunction011(ptr ptr ptr) advapi32.SystemFunction010
@ stdcall SystemFunction011(ptr ptr ptr) SystemFunction010
@ stdcall SystemFunction012(ptr ptr ptr)
@ stdcall SystemFunction013(ptr ptr ptr)
@ stdcall SystemFunction014(ptr ptr ptr) advapi32.SystemFunction012
@ stdcall SystemFunction015(ptr ptr ptr) advapi32.SystemFunction013
@ stdcall SystemFunction016(ptr ptr ptr) advapi32.SystemFunction012
@ stdcall SystemFunction017(ptr ptr ptr) advapi32.SystemFunction013
@ stdcall SystemFunction018(ptr ptr ptr) advapi32.SystemFunction012
@ stdcall SystemFunction019(ptr ptr ptr) advapi32.SystemFunction013
@ stdcall SystemFunction020(ptr ptr ptr) advapi32.SystemFunction012
@ stdcall SystemFunction021(ptr ptr ptr) advapi32.SystemFunction013
@ stdcall SystemFunction022(ptr ptr ptr) advapi32.SystemFunction012
@ stdcall SystemFunction023(ptr ptr ptr) advapi32.SystemFunction013
@ stdcall SystemFunction014(ptr ptr ptr) SystemFunction012
@ stdcall SystemFunction015(ptr ptr ptr) SystemFunction013
@ stdcall SystemFunction016(ptr ptr ptr) SystemFunction012
@ stdcall SystemFunction017(ptr ptr ptr) SystemFunction013
@ stdcall SystemFunction018(ptr ptr ptr) SystemFunction012
@ stdcall SystemFunction019(ptr ptr ptr) SystemFunction013
@ stdcall SystemFunction020(ptr ptr ptr) SystemFunction012
@ stdcall SystemFunction021(ptr ptr ptr) SystemFunction013
@ stdcall SystemFunction022(ptr ptr ptr) SystemFunction012
@ stdcall SystemFunction023(ptr ptr ptr) SystemFunction013
@ stdcall SystemFunction024(ptr ptr ptr)
@ stdcall SystemFunction025(ptr ptr ptr)
@ stdcall SystemFunction026(ptr ptr ptr) advapi32.SystemFunction024
@ stdcall SystemFunction027(ptr ptr ptr) advapi32.SystemFunction025
@ stdcall SystemFunction026(ptr ptr ptr) SystemFunction024
@ stdcall SystemFunction027(ptr ptr ptr) SystemFunction025
@ stdcall SystemFunction028(long long)
@ stdcall SystemFunction029(long long)
@ stdcall SystemFunction030(ptr ptr)
@ stdcall SystemFunction031(ptr ptr) advapi32.SystemFunction030
@ stdcall SystemFunction031(ptr ptr) SystemFunction030
@ stdcall SystemFunction032(ptr ptr)
@ stdcall SystemFunction033(long long)
@ stdcall SystemFunction034(long long)
@ stdcall SystemFunction035(str)
@ stdcall SystemFunction036(ptr long)
@ stdcall SystemFunction040(ptr long long)
@ stdcall SystemFunction041(ptr long long)
@ stdcall SystemFunction036(ptr long) # RtlGenRandom
@ stdcall SystemFunction040(ptr long long) # RtlEncryptMemory
@ stdcall SystemFunction041(ptr long long) # RtlDecryptMemory
@ stdcall TraceEvent(double ptr)
@ stub TraceEventInstance
@ varargs TraceMessage(ptr long ptr long)
@ stub TraceMessageVa
@ stdcall TreeResetNamedSecurityInfoA(str ptr ptr ptr ptr ptr ptr long ptr ptr ptr)
@ stdcall TreeResetNamedSecurityInfoW(wstr ptr ptr ptr ptr ptr ptr long ptr ptr ptr)
@ stdcall TreeResetNamedSecurityInfoW(wstr long long ptr ptr ptr ptr long ptr long ptr)
@ stub TrusteeAccessToObjectA
@ stub TrusteeAccessToObjectW
@ stub UninstallApplication

View file

@ -14,7 +14,7 @@
*
* 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 Street, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/***********************************************************************
@ -27,6 +27,7 @@
#include <advapi32.h>
#include "crypt.h"
#include <wine/unicode.h>
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(crypt);
@ -47,10 +48,10 @@ VOID byteReverse(unsigned char *buf, unsigned longs)
} while (--longs);
}
static HWND crypt_hWindow = 0;
static HWND crypt_hWindow ;
#define CRYPT_Alloc(size) ((LPVOID)LocalAlloc(LMEM_ZEROINIT, size))
#define CRYPT_Free(buffer) (LocalFree((HLOCAL)buffer))
#define CRYPT_Alloc(size) (LocalAlloc(LMEM_ZEROINIT, size))
#define CRYPT_Free(buffer) (LocalFree(buffer))
static inline PWSTR CRYPT_GetProvKeyName(PCWSTR pProvName)
{
@ -63,11 +64,11 @@ static inline PWSTR CRYPT_GetProvKeyName(PCWSTR pProvName)
};
PWSTR keyname;
keyname = CRYPT_Alloc((wcslen(KEYSTR) + wcslen(pProvName) +1)*sizeof(WCHAR));
keyname = CRYPT_Alloc((strlenW(KEYSTR) + strlenW(pProvName) +1)*sizeof(WCHAR));
if (keyname)
{
wcscpy(keyname, KEYSTR);
wcscpy(keyname + wcslen(KEYSTR), pProvName);
strcpyW(keyname, KEYSTR);
strcpyW(keyname + strlenW(KEYSTR), pProvName);
} else
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return keyname;
@ -92,11 +93,11 @@ static inline PWSTR CRYPT_GetTypeKeyName(DWORD dwType, BOOL user)
PWSTR keyname;
PWSTR ptr;
keyname = CRYPT_Alloc( ((user ? wcslen(USERSTR) : wcslen(MACHINESTR)) +1)*sizeof(WCHAR));
keyname = CRYPT_Alloc( ((user ? strlenW(USERSTR) : strlenW(MACHINESTR)) +1)*sizeof(WCHAR));
if (keyname)
{
user ? wcscpy(keyname, USERSTR) : wcscpy(keyname, MACHINESTR);
ptr = keyname + wcslen(keyname);
user ? strcpyW(keyname, USERSTR) : strcpyW(keyname, MACHINESTR);
ptr = keyname + strlenW(keyname);
*(--ptr) = (dwType % 10) + '0';
*(--ptr) = ((dwType / 10) % 10) + '0';
*(--ptr) = (dwType / 100) + '0';
@ -110,7 +111,7 @@ static inline PWSTR CRYPT_GetTypeKeyName(DWORD dwType, BOOL user)
* str - pointer to ANSI string
* strsize - size of buffer pointed to by str or -1 if we have to do the allocation
*
* returns TRUE if unsuccessfull, FALSE otherwise.
* returns TRUE if unsuccessful, FALSE otherwise.
* if wstr is NULL, returns TRUE and sets str to NULL! Value of str should be checked after call
*/
static inline BOOL CRYPT_UnicodeToANSI(LPCWSTR wstr, LPSTR* str, int strsize)
@ -201,7 +202,7 @@ static PCRYPTPROV CRYPT_LoadProvider(PCWSTR pImage)
if ( !(provider->hModule = LoadLibraryW(pImage)) )
{
errorcode = (GetLastError() == ERROR_FILE_NOT_FOUND) ? NTE_PROV_DLL_NOT_FOUND : NTE_PROVIDER_DLL_FAIL;
FIXME("Failed to load dll %S\n", pImage);
FIXME("Failed to load dll %s\n", debugstr_w(pImage));
goto error;
}
provider->dwMagic = MAGIC_CRYPTPROV;
@ -238,8 +239,8 @@ static PCRYPTPROV CRYPT_LoadProvider(PCWSTR pImage)
* Does it need memory allocation?
*/
provider->pVTable->Version = 3;
provider->pVTable->pFuncVerifyImage = (FARPROC)CRYPT_VerifyImage;
provider->pVTable->pFuncReturnhWnd = (FARPROC)CRYPT_ReturnhWnd;
provider->pVTable->pFuncVerifyImage = CRYPT_VerifyImage;
provider->pVTable->pFuncReturnhWnd = CRYPT_ReturnhWnd;
provider->pVTable->dwProvType = 0;
provider->pVTable->pbContextInfo = NULL;
provider->pVTable->cbContextInfo = 0;
@ -262,6 +263,7 @@ error:
#undef CRYPT_GetProvFunc
#undef CRYPT_GetProvFuncOpt
static void CRYPT_CreateMachineGuid(void)
{
static const WCHAR cryptographyW[] = {
@ -282,40 +284,30 @@ static void CRYPT_CreateMachineGuid(void)
r = RegQueryValueExW(key, machineGuidW, NULL, NULL, NULL, &size);
if (r == ERROR_FILE_NOT_FOUND)
{
static const WCHAR rpcrt4[] = {
'r','p','c','r','t','4',0 };
HMODULE lib = LoadLibraryW(rpcrt4);
UUID uuid;
WCHAR buf[37];
RPC_STATUS rs;
static const WCHAR uuidFmt[] = {
'%','0','8','x','-','%','0','4','x','-',
'%','0','4','x','-','%','0','2','x',
'%','0','2','x','-','%','0','2','x',
'%','0','2','x','%','0','2','x',
'%','0','2','x','%','0','2','x',
'%','0','2','x',0 };
if (lib)
{
RPC_STATUS (RPC_ENTRY *pUuidCreate)(UUID *);
UUID uuid;
WCHAR buf[37];
RPC_STATUS rs;
static const WCHAR uuidFmt[] = {
'%','0','8','x','-','%','0','4','x','-',
'%','0','4','x','-','%','0','2','x',
'%','0','2','x','-','%','0','2','x',
'%','0','2','x','%','0','2','x',
'%','0','2','x','%','0','2','x',
'%','0','2','x',0 };
pUuidCreate = (LPVOID) GetProcAddress(lib, "UuidCreate");
rs = pUuidCreate(&uuid);
if (rs == S_OK)
{
swprintf(buf, uuidFmt,
uuid.Data1, uuid.Data2, uuid.Data3,
uuid.Data4[0], uuid.Data4[1],
uuid.Data4[2], uuid.Data4[3],
uuid.Data4[4], uuid.Data4[5],
uuid.Data4[6], uuid.Data4[7] );
RegSetValueExW(key, machineGuidW, 0, REG_SZ,
(const BYTE *)buf,
(lstrlenW(buf)+1)*sizeof(WCHAR));
}
FreeLibrary(lib);
}
rs = UuidCreate(&uuid);
if (rs == S_OK)
{
sprintfW(buf, uuidFmt,
uuid.Data1, uuid.Data2, uuid.Data3,
uuid.Data4[0], uuid.Data4[1],
uuid.Data4[2], uuid.Data4[3],
uuid.Data4[4], uuid.Data4[5],
uuid.Data4[6], uuid.Data4[7] );
RegSetValueExW(key, machineGuidW, 0, REG_SZ,
(const BYTE *)buf,
(lstrlenW(buf)+1)*sizeof(WCHAR));
}
}
RegCloseKey(key);
}
@ -349,15 +341,15 @@ BOOL WINAPI CryptAcquireContextW (HCRYPTPROV *phProv, LPCWSTR pszContainer,
static const WCHAR typeW[] = {'T','y','p','e',0};
static const WCHAR imagepathW[] = {'I','m','a','g','e',' ','P','a','t','h',0};
TRACE("(%p, %S, %S, %d, %08x)\n", phProv, pszContainer,
pszProvider, dwProvType, dwFlags);
TRACE("(%p, %s, %s, %d, %08x)\n", phProv, debugstr_w(pszContainer),
debugstr_w(pszProvider), dwProvType, dwFlags);
if (dwProvType < 1 || dwProvType > MAXPROVTYPES)
{
SetLastError(NTE_BAD_PROV_TYPE);
return FALSE;
}
if (!phProv)
{
SetLastError(ERROR_INVALID_PARAMETER);
@ -373,7 +365,7 @@ BOOL WINAPI CryptAcquireContextW (HCRYPTPROV *phProv, LPCWSTR pszContainer,
* then try the machine default CSP
*/
if ( !(keyname = CRYPT_GetTypeKeyName(dwProvType, TRUE)) ) {
WARN("No provider registered for crypto provider type %d.\n", dwProvType);
TRACE("No provider registered for crypto provider type %d.\n", dwProvType);
SetLastError(NTE_PROV_TYPE_NOT_DEF);
return FALSE;
}
@ -387,7 +379,7 @@ BOOL WINAPI CryptAcquireContextW (HCRYPTPROV *phProv, LPCWSTR pszContainer,
goto error;
}
if (RegOpenKeyW(HKEY_LOCAL_MACHINE, keyname, &key)) {
TRACE("Did not find registry entry of crypto provider for %S.\n", keyname);
TRACE("Did not find registry entry of crypto provider for %s.\n", debugstr_w(keyname));
CRYPT_Free(keyname);
RegCloseKey(key);
SetLastError(NTE_PROV_TYPE_NOT_DEF);
@ -419,12 +411,12 @@ BOOL WINAPI CryptAcquireContextW (HCRYPTPROV *phProv, LPCWSTR pszContainer,
}
RegCloseKey(key);
} else {
if ( !(provname = CRYPT_Alloc((wcslen(pszProvider) +1)*sizeof(WCHAR))) )
if ( !(provname = CRYPT_Alloc((strlenW(pszProvider) +1)*sizeof(WCHAR))) )
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
goto error;
}
wcscpy(provname, pszProvider);
strcpyW(provname, pszProvider);
}
keyname = CRYPT_GetProvKeyName(provname);
@ -593,20 +585,21 @@ BOOL WINAPI CryptAcquireContextA (HCRYPTPROV *phProv, LPCSTR pszContainer,
*/
BOOL WINAPI CryptContextAddRef (HCRYPTPROV hProv, DWORD *pdwReserved, DWORD dwFlags)
{
PCRYPTPROV pProv = (PCRYPTPROV)hProv;
PCRYPTPROV pProv = (PCRYPTPROV)hProv;
TRACE("(0x%lx, %p, %08lx)\n", hProv, pdwReserved, dwFlags);
TRACE("(0x%lx, %p, %08x)\n", hProv, pdwReserved, dwFlags);
if (!pProv)
{
SetLastError(NTE_BAD_UID);
return FALSE;
}
if (pProv->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
if (pProv->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
pProv->refcount++;
return TRUE;
@ -625,7 +618,7 @@ BOOL WINAPI CryptContextAddRef (HCRYPTPROV hProv, DWORD *pdwReserved, DWORD dwFl
* Success: TRUE
* Failure: FALSE
*/
BOOL WINAPI CryptReleaseContext (HCRYPTPROV hProv, DWORD dwFlags)
BOOL WINAPI CryptReleaseContext (HCRYPTPROV hProv, ULONG_PTR dwFlags)
{
PCRYPTPROV pProv = (PCRYPTPROV)hProv;
BOOL ret = TRUE;
@ -645,7 +638,7 @@ BOOL WINAPI CryptReleaseContext (HCRYPTPROV hProv, DWORD dwFlags)
}
pProv->refcount--;
if (pProv->refcount <= 0)
if (pProv->refcount <= 0)
{
ret = pProv->pFuncs->pCPReleaseContext(pProv->hPrivate, dwFlags);
pProv->dwMagic = 0;
@ -682,7 +675,7 @@ BOOL WINAPI CryptGenRandom (HCRYPTPROV hProv, DWORD dwLen, BYTE *pbBuffer)
{
PCRYPTPROV prov = (PCRYPTPROV)hProv;
TRACE("(0x%lx, %ld, %p)\n", hProv, dwLen, pbBuffer);
TRACE("(0x%lx, %d, %p)\n", hProv, dwLen, pbBuffer);
if (!hProv)
{
@ -725,7 +718,7 @@ BOOL WINAPI CryptCreateHash (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTKEY hKey,
PCRYPTKEY key = (PCRYPTKEY)hKey;
PCRYPTHASH hash;
TRACE("(0x%lx, 0x%x, 0x%lx, %08lx, %p)\n", hProv, Algid, hKey, dwFlags, phHash);
TRACE("(0x%lx, 0x%x, 0x%lx, %08x, %p)\n", hProv, Algid, hKey, dwFlags, phHash);
if (!prov)
{
@ -752,10 +745,10 @@ BOOL WINAPI CryptCreateHash (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTKEY hKey,
if (prov->pFuncs->pCPCreateHash(prov->hPrivate, Algid,
key ? key->hPrivate : 0, 0, &hash->hPrivate))
{
*phHash = (HCRYPTHASH)hash;
return TRUE;
}
{
*phHash = (HCRYPTHASH)hash;
return TRUE;
}
/* CSP error! */
CRYPT_Free(hash);
@ -788,7 +781,7 @@ BOOL WINAPI CryptDecrypt (HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final,
PCRYPTKEY key = (PCRYPTKEY)hKey;
PCRYPTHASH hash = (PCRYPTHASH)hHash;
TRACE("(0x%lx, 0x%lx, %d, %08lx, %p, %p)\n", hKey, hHash, Final, dwFlags, pbData, pdwDataLen);
TRACE("(0x%lx, 0x%lx, %d, %08x, %p, %p)\n", hKey, hHash, Final, dwFlags, pbData, pdwDataLen);
if (!key || !pbData || !pdwDataLen || !key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
@ -824,7 +817,7 @@ BOOL WINAPI CryptDeriveKey (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTHASH hBaseData
PCRYPTHASH hash = (PCRYPTHASH)hBaseData;
PCRYPTKEY key;
TRACE("(0x%lx, 0x%08x, 0x%lx, 0x%08lx, %p)\n", hProv, Algid, hBaseData, dwFlags, phKey);
TRACE("(0x%lx, 0x%08x, 0x%lx, 0x%08x, %p)\n", hProv, Algid, hBaseData, dwFlags, phKey);
if (!prov || !hash)
{
@ -844,10 +837,10 @@ BOOL WINAPI CryptDeriveKey (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTHASH hBaseData
key->pProvider = prov;
if (prov->pFuncs->pCPDeriveKey(prov->hPrivate, Algid, hash->hPrivate, dwFlags, &key->hPrivate))
{
*phKey = (HCRYPTKEY)key;
return TRUE;
}
{
*phKey = (HCRYPTKEY)key;
return TRUE;
}
/* CSP error! */
CRYPT_Free(key);
@ -952,7 +945,7 @@ BOOL WINAPI CryptDuplicateHash (HCRYPTHASH hHash, DWORD *pdwReserved,
PCRYPTPROV prov;
PCRYPTHASH orghash, newhash;
TRACE("(0x%lx, %p, %08ld, %p)\n", hHash, pdwReserved, dwFlags, phHash);
TRACE("(0x%lx, %p, %08x, %p)\n", hHash, pdwReserved, dwFlags, phHash);
orghash = (PCRYPTHASH)hHash;
if (!orghash || pdwReserved || !phHash || !orghash->pProvider ||
@ -1005,7 +998,7 @@ BOOL WINAPI CryptDuplicateKey (HCRYPTKEY hKey, DWORD *pdwReserved, DWORD dwFlags
PCRYPTPROV prov;
PCRYPTKEY orgkey, newkey;
TRACE("(0x%lx, %p, %08ld, %p)\n", hKey, pdwReserved, dwFlags, phKey);
TRACE("(0x%lx, %p, %08x, %p)\n", hKey, pdwReserved, dwFlags, phKey);
orgkey = (PCRYPTKEY)hKey;
if (!orgkey || pdwReserved || !phKey || !orgkey->pProvider ||
@ -1044,7 +1037,7 @@ BOOL WINAPI CryptDuplicateKey (HCRYPTKEY hKey, DWORD *pdwReserved, DWORD dwFlags
* Encrypts data.
*
* PARAMS
* hKey [I] Handle to the enryption key.
* hKey [I] Handle to the encryption key.
* hHash [I] Handle to a hash object.
* Final [I] TRUE if this is the last section to encrypt.
* dwFlags [I] Can be CRYPT_OAEP.
@ -1068,7 +1061,7 @@ BOOL WINAPI CryptEncrypt (HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final,
PCRYPTKEY key = (PCRYPTKEY)hKey;
PCRYPTHASH hash = (PCRYPTHASH)hHash;
TRACE("(0x%lx, 0x%lx, %d, %08ld, %p, %p, %ld)\n", hKey, hHash, Final, dwFlags, pbData, pdwDataLen, dwBufLen);
TRACE("(0x%lx, 0x%lx, %d, %08x, %p, %p, %d)\n", hKey, hHash, Final, dwFlags, pbData, pdwDataLen, dwBufLen);
if (!key || !pdwDataLen || !key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
@ -1107,9 +1100,17 @@ BOOL WINAPI CryptEnumProvidersW (DWORD dwIndex, DWORD *pdwReserved,
DWORD dwFlags, DWORD *pdwProvType, LPWSTR pszProvName, DWORD *pcbProvName)
{
HKEY hKey;
static const WCHAR providerW[] = {
'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\',
'C','r','y','p','t','o','g','r','a','p','h','y','\\',
'D','e','f','a','u','l','t','s','\\',
'P','r','o','v','i','d','e','r',0
};
static const WCHAR typeW[] = {'T','y','p','e',0};
TRACE("(%ld, %p, %ld, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags,
pdwProvType, pszProvName, pcbProvName);
TRACE("(%d, %p, %d, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags,
pdwProvType, pszProvName, pcbProvName);
if (pdwReserved || !pcbProvName)
{
@ -1122,9 +1123,7 @@ BOOL WINAPI CryptEnumProvidersW (DWORD dwIndex, DWORD *pdwReserved,
return FALSE;
}
if (RegOpenKeyW(HKEY_LOCAL_MACHINE,
L"Software\\Microsoft\\Cryptography\\Defaults\\Provider",
&hKey))
if (RegOpenKeyW(HKEY_LOCAL_MACHINE, providerW, &hKey))
{
SetLastError(NTE_FAIL);
return FALSE;
@ -1134,10 +1133,10 @@ BOOL WINAPI CryptEnumProvidersW (DWORD dwIndex, DWORD *pdwReserved,
{
DWORD numkeys;
WCHAR *provNameW;
RegQueryInfoKeyW(hKey, NULL, NULL, NULL, &numkeys, pcbProvName,
NULL, NULL, NULL, NULL, NULL, NULL);
if (!(provNameW = CRYPT_Alloc(*pcbProvName * sizeof(WCHAR))))
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
@ -1154,13 +1153,11 @@ BOOL WINAPI CryptEnumProvidersW (DWORD dwIndex, DWORD *pdwReserved,
SetLastError(ERROR_NO_MORE_ITEMS);
return FALSE;
}
}
else
{
} else {
DWORD size = sizeof(DWORD);
DWORD result;
HKEY subkey;
result = RegEnumKeyW(hKey, dwIndex, pszProvName, *pcbProvName / sizeof(WCHAR));
if (result)
{
@ -1169,7 +1166,7 @@ BOOL WINAPI CryptEnumProvidersW (DWORD dwIndex, DWORD *pdwReserved,
}
if (RegOpenKeyW(hKey, pszProvName, &subkey))
return FALSE;
if (RegQueryValueExW(subkey, L"Type", NULL, NULL, (BYTE*)pdwProvType, &size))
if (RegQueryValueExW(subkey, typeW, NULL, NULL, (BYTE*)pdwProvType, &size))
return FALSE;
RegCloseKey(subkey);
}
@ -1180,7 +1177,7 @@ BOOL WINAPI CryptEnumProvidersW (DWORD dwIndex, DWORD *pdwReserved,
/******************************************************************************
* CryptEnumProvidersA (ADVAPI32.@)
*
* see CryptEnumProvidersW
* See CryptEnumProvidersW.
*/
BOOL WINAPI CryptEnumProvidersA (DWORD dwIndex, DWORD *pdwReserved,
DWORD dwFlags, DWORD *pdwProvType, LPSTR pszProvName, DWORD *pcbProvName)
@ -1189,28 +1186,28 @@ BOOL WINAPI CryptEnumProvidersA (DWORD dwIndex, DWORD *pdwReserved,
DWORD bufsize;
BOOL ret; /* = FALSE; */
TRACE("(%ld, %p, %08ld, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags,
TRACE("(%d, %p, %08x, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags,
pdwProvType, pszProvName, pcbProvName);
if(!CryptEnumProvidersW(dwIndex, pdwReserved, dwFlags, pdwProvType, NULL, &bufsize))
return FALSE;
if(!CryptEnumProvidersW(dwIndex, pdwReserved, dwFlags, pdwProvType, NULL, &bufsize))
return FALSE;
if ( pszProvName && !(str = CRYPT_Alloc(bufsize)) )
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return FALSE;
}
ret = CryptEnumProvidersW(dwIndex, pdwReserved, dwFlags, pdwProvType, str, &bufsize);
if (str)
CRYPT_UnicodeToANSI(str, &pszProvName, *pcbProvName);
*pcbProvName = bufsize / sizeof(WCHAR); /* FIXME: not correct */
if (str)
CRYPT_UnicodeToANSI(str, &pszProvName, *pcbProvName);
*pcbProvName = bufsize / sizeof(WCHAR); /* FIXME: not correct */
if (str)
{
CRYPT_Free(str);
if (GetLastError() == ERROR_INSUFFICIENT_BUFFER)
{
SetLastError(ERROR_MORE_DATA);
return FALSE;
}
if (GetLastError() == ERROR_INSUFFICIENT_BUFFER)
{
SetLastError(ERROR_MORE_DATA);
return FALSE;
}
}
return ret;
}
@ -1234,7 +1231,7 @@ BOOL WINAPI CryptEnumProvidersA (DWORD dwIndex, DWORD *pdwReserved,
* Failure: FALSE
*
* NOTES
* If pszTypeName is NULL, CryptEnumProviderTypesA sets the size of the name
* If pszTypeName is NULL, CryptEnumProviderTypesW sets the size of the name
* for memory allocation purposes.
*/
BOOL WINAPI CryptEnumProviderTypesW (DWORD dwIndex, DWORD *pdwReserved,
@ -1244,8 +1241,16 @@ BOOL WINAPI CryptEnumProviderTypesW (DWORD dwIndex, DWORD *pdwReserved,
DWORD keylen, numkeys, dwType;
PWSTR keyname, ch;
DWORD result;
static const WCHAR KEYSTR[] = {
'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\',
'C','r','y','p','t','o','g','r','a','p','h','y','\\',
'D','e','f','a','u','l','t','s','\\',
'P','r','o','v','i','d','e','r',' ','T','y','p','e','s',0
};
static const WCHAR typenameW[] = {'T','y','p','e','N','a','m','e',0};
TRACE("(%ld, %p, %08ld, %p, %p, %p)\n", dwIndex, pdwReserved,
TRACE("(%d, %p, %08x, %p, %p, %p)\n", dwIndex, pdwReserved,
dwFlags, pdwProvType, pszTypeName, pcbTypeName);
if (pdwReserved || !pdwProvType || !pcbTypeName)
@ -1259,7 +1264,7 @@ BOOL WINAPI CryptEnumProviderTypesW (DWORD dwIndex, DWORD *pdwReserved,
return FALSE;
}
if (RegOpenKeyW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Cryptography\\Defaults\\Provider Types", &hKey))
if (RegOpenKeyW(HKEY_LOCAL_MACHINE, KEYSTR, &hKey))
return FALSE;
RegQueryInfoKeyW(hKey, NULL, NULL, NULL, &numkeys, &keylen, NULL, NULL, NULL, NULL, NULL, NULL);
@ -1274,20 +1279,19 @@ BOOL WINAPI CryptEnumProviderTypesW (DWORD dwIndex, DWORD *pdwReserved,
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return FALSE;
}
if ( RegEnumKeyW(hKey, dwIndex, keyname, keylen) )
{
CRYPT_Free(keyname);
if ( RegEnumKeyW(hKey, dwIndex, keyname, keylen) ) {
CRYPT_Free(keyname);
return FALSE;
}
}
RegOpenKeyW(hKey, keyname, &hSubkey);
ch = keyname + wcslen(keyname);
ch = keyname + strlenW(keyname);
/* Convert "Type 000" to 0, etc/ */
*pdwProvType = *(--ch) - '0';
*pdwProvType += (*(--ch) - '0') * 10;
*pdwProvType += (*(--ch) - '0') * 100;
CRYPT_Free(keyname);
result = RegQueryValueExW(hSubkey, L"TypeName", NULL, &dwType, (LPBYTE)pszTypeName, pcbTypeName);
result = RegQueryValueExW(hSubkey, typenameW, NULL, &dwType, (LPBYTE)pszTypeName, pcbTypeName);
if (result)
{
SetLastError(result);
@ -1302,7 +1306,7 @@ BOOL WINAPI CryptEnumProviderTypesW (DWORD dwIndex, DWORD *pdwReserved,
/******************************************************************************
* CryptEnumProviderTypesA (ADVAPI32.@)
*
* see CryptEnumProviderTypesW.
* See CryptEnumProviderTypesW.
*/
BOOL WINAPI CryptEnumProviderTypesA (DWORD dwIndex, DWORD *pdwReserved,
DWORD dwFlags, DWORD *pdwProvType, LPSTR pszTypeName, DWORD *pcbTypeName)
@ -1311,7 +1315,7 @@ BOOL WINAPI CryptEnumProviderTypesA (DWORD dwIndex, DWORD *pdwReserved,
DWORD bufsize;
BOOL ret;
TRACE("(%ld, %p, %08ld, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags,
TRACE("(%d, %p, %08x, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags,
pdwProvType, pszTypeName, pcbTypeName);
if(!CryptEnumProviderTypesW(dwIndex, pdwReserved, dwFlags, pdwProvType, NULL, &bufsize))
@ -1339,7 +1343,7 @@ BOOL WINAPI CryptEnumProviderTypesA (DWORD dwIndex, DWORD *pdwReserved,
/******************************************************************************
* CryptExportKey (ADVAPI32.@)
*
*
* Exports a cryptographic key from a CSP.
*
* PARAMS
@ -1364,7 +1368,7 @@ BOOL WINAPI CryptExportKey (HCRYPTKEY hKey, HCRYPTKEY hExpKey, DWORD dwBlobType,
PCRYPTPROV prov;
PCRYPTKEY key = (PCRYPTKEY)hKey, expkey = (PCRYPTKEY)hExpKey;
TRACE("(0x%lx, 0x%lx, %ld, %08ld, %p, %p)\n", hKey, hExpKey, dwBlobType, dwFlags, pbData, pdwDataLen);
TRACE("(0x%lx, 0x%lx, %d, %08x, %p, %p)\n", hKey, hExpKey, dwBlobType, dwFlags, pbData, pdwDataLen);
if (!key || !pdwDataLen || !key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
@ -1397,7 +1401,7 @@ BOOL WINAPI CryptGenKey (HCRYPTPROV hProv, ALG_ID Algid, DWORD dwFlags, HCRYPTKE
PCRYPTPROV prov = (PCRYPTPROV)hProv;
PCRYPTKEY key;
TRACE("(0x%lx, %d, %08ld, %p)\n", hProv, Algid, dwFlags, phKey);
TRACE("(0x%lx, %d, %08x, %p)\n", hProv, Algid, dwFlags, phKey);
if (!prov)
{
@ -1418,10 +1422,10 @@ BOOL WINAPI CryptGenKey (HCRYPTPROV hProv, ALG_ID Algid, DWORD dwFlags, HCRYPTKE
key->pProvider = prov;
if (prov->pFuncs->pCPGenKey(prov->hPrivate, Algid, dwFlags, &key->hPrivate))
{
*phKey = (HCRYPTKEY)key;
return TRUE;
}
{
*phKey = (HCRYPTKEY)key;
return TRUE;
}
/* CSP error! */
CRYPT_Free(key);
@ -1491,10 +1495,10 @@ BOOL WINAPI CryptGetDefaultProviderW (DWORD dwProvType, DWORD *pdwReserved,
SetLastError(NTE_PROV_TYPE_ENTRY_BAD);
else
SetLastError(result);
return FALSE;
}
RegCloseKey(hKey);
return TRUE;
}
@ -1560,7 +1564,7 @@ BOOL WINAPI CryptGetHashParam (HCRYPTHASH hHash, DWORD dwParam, BYTE *pbData,
PCRYPTPROV prov;
PCRYPTHASH hash = (PCRYPTHASH)hHash;
TRACE("(0x%lx, %ld, %p, %p, %08ld)\n", hHash, dwParam, pbData, pdwDataLen, dwFlags);
TRACE("(0x%lx, %d, %p, %p, %08x)\n", hHash, dwParam, pbData, pdwDataLen, dwFlags);
if (!hash || !pdwDataLen || !hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
@ -1598,7 +1602,7 @@ BOOL WINAPI CryptGetKeyParam (HCRYPTKEY hKey, DWORD dwParam, BYTE *pbData,
PCRYPTPROV prov;
PCRYPTKEY key = (PCRYPTKEY)hKey;
TRACE("(0x%lx, %ld, %p, %p, %08ld)\n", hKey, dwParam, pbData, pdwDataLen, dwFlags);
TRACE("(0x%lx, %d, %p, %p, %08x)\n", hKey, dwParam, pbData, pdwDataLen, dwFlags);
if (!key || !pdwDataLen || !key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
@ -1635,7 +1639,7 @@ BOOL WINAPI CryptGetProvParam (HCRYPTPROV hProv, DWORD dwParam, BYTE *pbData,
{
PCRYPTPROV prov = (PCRYPTPROV)hProv;
TRACE("(0x%lx, %ld, %p, %p, %08ld)\n", hProv, dwParam, pbData, pdwDataLen, dwFlags);
TRACE("(0x%lx, %d, %p, %p, %08x)\n", hProv, dwParam, pbData, pdwDataLen, dwFlags);
if (!prov || prov->dwMagic != MAGIC_CRYPTPROV)
{
@ -1665,7 +1669,7 @@ BOOL WINAPI CryptGetUserKey (HCRYPTPROV hProv, DWORD dwKeySpec, HCRYPTKEY *phUse
PCRYPTPROV prov = (PCRYPTPROV)hProv;
PCRYPTKEY key;
TRACE("(0x%lx, %ld, %p)\n", hProv, dwKeySpec, phUserKey);
TRACE("(0x%lx, %d, %p)\n", hProv, dwKeySpec, phUserKey);
if (!prov)
{
@ -1686,10 +1690,10 @@ BOOL WINAPI CryptGetUserKey (HCRYPTPROV hProv, DWORD dwKeySpec, HCRYPTKEY *phUse
key->pProvider = prov;
if (prov->pFuncs->pCPGetUserKey(prov->hPrivate, dwKeySpec, &key->hPrivate))
{
*phUserKey = (HCRYPTKEY)key;
return TRUE;
}
{
*phUserKey = (HCRYPTKEY)key;
return TRUE;
}
/* CSP Error */
CRYPT_Free(key);
@ -1717,7 +1721,7 @@ BOOL WINAPI CryptHashData (HCRYPTHASH hHash, const BYTE *pbData, DWORD dwDataLen
PCRYPTHASH hash = (PCRYPTHASH)hHash;
PCRYPTPROV prov;
TRACE("(0x%lx, %p, %ld, %08ld)\n", hHash, pbData, dwDataLen, dwFlags);
TRACE("(0x%lx, %p, %d, %08x)\n", hHash, pbData, dwDataLen, dwFlags);
if (!hash)
{
@ -1737,7 +1741,9 @@ BOOL WINAPI CryptHashData (HCRYPTHASH hHash, const BYTE *pbData, DWORD dwDataLen
/******************************************************************************
* CryptHashSessionKey (ADVAPI32.@)
*
* PARAMS
* Compute the cryptographic hash of a session key object.
*
* PARAMS
* hHash [I] Handle to the hash object.
* hKey [I] Handle to the key to be hashed.
* dwFlags [I] Can be CRYPT_LITTLE_ENDIAN.
@ -1752,7 +1758,7 @@ BOOL WINAPI CryptHashSessionKey (HCRYPTHASH hHash, HCRYPTKEY hKey, DWORD dwFlags
PCRYPTKEY key = (PCRYPTKEY)hKey;
PCRYPTPROV prov;
TRACE("(0x%lx, 0x%lx, %08ld)\n", hHash, hKey, dwFlags);
TRACE("(0x%lx, 0x%lx, %08x)\n", hHash, hKey, dwFlags);
if (!hash || !key)
{
@ -1773,6 +1779,8 @@ BOOL WINAPI CryptHashSessionKey (HCRYPTHASH hHash, HCRYPTKEY hKey, DWORD dwFlags
/******************************************************************************
* CryptImportKey (ADVAPI32.@)
*
* Transfer a cryptographic key from a key BLOB into a cryptographic service provider (CSP).
*
* PARAMS
* hProv [I] Handle of a CSP.
* pbData [I] Contains the key to be imported.
@ -1791,7 +1799,7 @@ BOOL WINAPI CryptImportKey (HCRYPTPROV hProv, CONST BYTE *pbData, DWORD dwDataLe
PCRYPTPROV prov = (PCRYPTPROV)hProv;
PCRYPTKEY pubkey = (PCRYPTKEY)hPubKey, importkey;
TRACE("(0x%lx, %p, %ld, 0x%lx, %08ld, %p)\n", hProv, pbData, dwDataLen, hPubKey, dwFlags, phKey);
TRACE("(0x%lx, %p, %d, 0x%lx, %08x, %p)\n", hProv, pbData, dwDataLen, hPubKey, dwFlags, phKey);
if (!prov || !pbData || !dwDataLen || !phKey || prov->dwMagic != MAGIC_CRYPTPROV)
{
@ -1799,7 +1807,7 @@ BOOL WINAPI CryptImportKey (HCRYPTPROV hProv, CONST BYTE *pbData, DWORD dwDataLe
return FALSE;
}
if (!(importkey = CRYPT_Alloc(sizeof(CRYPTKEY))) )
if ( !(importkey = CRYPT_Alloc(sizeof(CRYPTKEY))) )
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return FALSE;
@ -1818,14 +1826,6 @@ BOOL WINAPI CryptImportKey (HCRYPTPROV hProv, CONST BYTE *pbData, DWORD dwDataLe
}
/******************************************************************************
* CryptSignHashA
*
* Note: Since the sDesciption (string) is supposed to be NULL and
* is only retained for compatibility no string conversions are required
* and only one implementation is required for both ANSI and Unicode.
* We still need to export both:
*
* CryptSignHashA (ADVAPI32.@)
* CryptSignHashW (ADVAPI32.@)
*
* Signs data.
@ -1833,7 +1833,7 @@ BOOL WINAPI CryptImportKey (HCRYPTPROV hProv, CONST BYTE *pbData, DWORD dwDataLe
* PARAMS
* hHash [I] Handle of the hash object to be signed.
* dwKeySpec [I] Private key to use.
* sDescription [I] Must be NULL.
* sDescription [I] Should be NULL.
* dwFlags [I] CRYPT_NOHASHOID/X931_FORMAT.
* pbSignature [O] Buffer of the signature data.
* pdwSigLen [I/O] Size of the pbSignature buffer.
@ -1841,26 +1841,20 @@ BOOL WINAPI CryptImportKey (HCRYPTPROV hProv, CONST BYTE *pbData, DWORD dwDataLe
* RETURNS
* Success: TRUE
* Failure: FALSE
*
* NOTES
* Because of security flaws sDescription should not be used and should thus be
* NULL. It is supported only for compatibility with Microsoft's Cryptographic
* Providers.
*/
BOOL WINAPI CryptSignHashA (HCRYPTHASH hHash, DWORD dwKeySpec, LPCSTR sDescription,
DWORD dwFlags, BYTE *pbSignature, DWORD *pdwSigLen)
{
/* Since sDescription is ignored we dont need to convert it, we just pass null */
return CryptSignHashW(hHash, dwKeySpec, NULL, dwFlags, pbSignature, pdwSigLen);
}
BOOL WINAPI CryptSignHashW (HCRYPTHASH hHash, DWORD dwKeySpec, LPCWSTR sDescription,
DWORD dwFlags, BYTE *pbSignature, DWORD *pdwSigLen)
{
PCRYPTHASH hash = (PCRYPTHASH)hHash;
PCRYPTPROV prov;
TRACE("(0x%lx, %ld, %08ld, %p, %p)\n", hHash, dwKeySpec, dwFlags, pbSignature, pdwSigLen);
if (sDescription)
{
/* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/seccrypto/security/cryptsignhash.asp */
WARN("The sDescription parameter is not supported (and no longer used). Ignoring.\n");
}
TRACE("(0x%lx, %d, %s, %08x, %p, %p)\n",
hHash, dwKeySpec, debugstr_w(sDescription), dwFlags, pbSignature, pdwSigLen);
if (!hash)
{
@ -1874,10 +1868,30 @@ BOOL WINAPI CryptSignHashW (HCRYPTHASH hHash, DWORD dwKeySpec, LPCWSTR sDescript
}
prov = hash->pProvider;
return prov->pFuncs->pCPSignHash(prov->hPrivate, hash->hPrivate, dwKeySpec, NULL,
return prov->pFuncs->pCPSignHash(prov->hPrivate, hash->hPrivate, dwKeySpec, sDescription,
dwFlags, pbSignature, pdwSigLen);
}
/******************************************************************************
* CryptSignHashA (ADVAPI32.@)
*
* See CryptSignHashW.
*/
BOOL WINAPI CryptSignHashA (HCRYPTHASH hHash, DWORD dwKeySpec, LPCSTR sDescription,
DWORD dwFlags, BYTE *pbSignature, DWORD *pdwSigLen)
{
LPWSTR wsDescription;
BOOL result;
TRACE("(0x%lx, %d, %s, %08x, %p, %p)\n",
hHash, dwKeySpec, debugstr_a(sDescription), dwFlags, pbSignature, pdwSigLen);
CRYPT_ANSIToUnicode(sDescription, &wsDescription, -1);
result = CryptSignHashW(hHash, dwKeySpec, wsDescription, dwFlags, pbSignature, pdwSigLen);
CRYPT_Free(wsDescription);
return result;
}
/******************************************************************************
* CryptSetHashParam (ADVAPI32.@)
@ -1899,7 +1913,7 @@ BOOL WINAPI CryptSetHashParam (HCRYPTHASH hHash, DWORD dwParam, CONST BYTE *pbDa
PCRYPTPROV prov;
PCRYPTHASH hash = (PCRYPTHASH)hHash;
TRACE("(0x%lx, %ld, %p, %08ld)\n", hHash, dwParam, pbData, dwFlags);
TRACE("(0x%lx, %d, %p, %08x)\n", hHash, dwParam, pbData, dwFlags);
if (!hash || !pbData || !hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
@ -1932,7 +1946,7 @@ BOOL WINAPI CryptSetKeyParam (HCRYPTKEY hKey, DWORD dwParam, CONST BYTE *pbData,
PCRYPTPROV prov;
PCRYPTKEY key = (PCRYPTKEY)hKey;
TRACE("(0x%lx, %ld, %p, %08ld)\n", hKey, dwParam, pbData, dwFlags);
TRACE("(0x%lx, %d, %p, %08x)\n", hKey, dwParam, pbData, dwFlags);
if (!key || !pbData || !key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
@ -1960,18 +1974,18 @@ BOOL WINAPI CryptSetKeyParam (HCRYPTKEY hKey, DWORD dwParam, CONST BYTE *pbData,
*/
BOOL WINAPI CryptSetProviderA (LPCSTR pszProvName, DWORD dwProvType)
{
TRACE("(%s, %ld)\n", pszProvName, dwProvType);
TRACE("(%s, %d)\n", pszProvName, dwProvType);
return CryptSetProviderExA(pszProvName, dwProvType, NULL, CRYPT_USER_DEFAULT);
}
/******************************************************************************
* CryptSetProviderW (ADVAPI32.@)
*
* See CryptSetProviderA
* See CryptSetProviderA.
*/
BOOL WINAPI CryptSetProviderW (LPCWSTR pszProvName, DWORD dwProvType)
{
TRACE("(%S, %ld)\n", pszProvName, dwProvType);
TRACE("(%s, %d)\n", debugstr_w(pszProvName), dwProvType);
return CryptSetProviderExW(pszProvName, dwProvType, NULL, CRYPT_USER_DEFAULT);
}
@ -1996,7 +2010,7 @@ BOOL WINAPI CryptSetProviderExW (LPCWSTR pszProvName, DWORD dwProvType, DWORD *p
PWSTR keyname;
static const WCHAR nameW[] = {'N','a','m','e',0};
TRACE("(%S, %d, %p, %08x)\n", pszProvName, dwProvType, pdwReserved, dwFlags);
TRACE("(%s, %d, %p, %08x)\n", debugstr_w(pszProvName), dwProvType, pdwReserved, dwFlags);
if (!pszProvName || pdwReserved)
{
@ -2052,7 +2066,7 @@ BOOL WINAPI CryptSetProviderExW (LPCWSTR pszProvName, DWORD dwProvType, DWORD *p
CRYPT_Free(keyname);
if (RegSetValueExW(hTypeKey, nameW, 0, REG_SZ, (const BYTE *)pszProvName,
(wcslen(pszProvName) + 1)*sizeof(WCHAR)))
(strlenW(pszProvName) + 1)*sizeof(WCHAR)))
{
RegCloseKey(hTypeKey);
RegCloseKey(hProvKey);
@ -2105,7 +2119,7 @@ BOOL WINAPI CryptSetProvParam (HCRYPTPROV hProv, DWORD dwParam, CONST BYTE *pbDa
{
PCRYPTPROV prov = (PCRYPTPROV)hProv;
TRACE("(0x%lx, %ld, %p, %08ld)\n", hProv, dwParam, pbData, dwFlags);
TRACE("(0x%lx, %d, %p, %08x)\n", hProv, dwParam, pbData, dwFlags);
if (!prov)
{
@ -2139,14 +2153,6 @@ BOOL WINAPI CryptSetProvParam (HCRYPTPROV hProv, DWORD dwParam, CONST BYTE *pbDa
}
/******************************************************************************
* CryptVerifySignatureA
*
* Note: Since the sDesciption (string) is supposed to be NULL and
* is only retained for compatibility no string conversions are required
* and only one implementation is required for both ANSI and Unicode.
* We still need to export both:
*
* CryptVerifySignatureA (ADVAPI32.@)
* CryptVerifySignatureW (ADVAPI32.@)
*
* Verifies the signature of a hash object.
@ -2156,35 +2162,27 @@ BOOL WINAPI CryptSetProvParam (HCRYPTPROV hProv, DWORD dwParam, CONST BYTE *pbDa
* pbSignature [I] Signature data to verify.
* dwSigLen [I] Size of pbSignature.
* hPubKey [I] Handle to the public key to authenticate signature.
* sDescription [I] Must be set to NULL.
* sDescription [I] Should be NULL.
* dwFlags [I] See MSDN doc.
*
* RETURNS
* Success: TRUE
* Failure: FALSE
*
* NOTES
* Because of security flaws sDescription should not be used and should thus be
* NULL. It is supported only for compatibility with Microsoft's Cryptographic
* Providers.
*/
BOOL WINAPI CryptVerifySignatureA (HCRYPTHASH hHash, CONST BYTE *pbSignature, DWORD dwSigLen,
HCRYPTKEY hPubKey, LPCSTR sDescription, DWORD dwFlags)
{
TRACE("(0x%lx, %p, %ld, 0x%lx, %08ld)\n", hHash, pbSignature,
dwSigLen, hPubKey, dwFlags);
if (sDescription)
{
WARN("The sDescription parameter is not supported (and no longer used). Ignoring.\n");
}
return CryptVerifySignatureW(hHash, pbSignature, dwSigLen, hPubKey, NULL, dwFlags);
}
BOOL WINAPI CryptVerifySignatureW (HCRYPTHASH hHash, CONST BYTE *pbSignature, DWORD dwSigLen,
HCRYPTKEY hPubKey, LPCWSTR sDescription, DWORD dwFlags)
{
PCRYPTHASH hash = (PCRYPTHASH)hHash;
PCRYPTKEY key = (PCRYPTKEY)hPubKey;
PCRYPTPROV prov;
PCRYPTHASH hash = (PCRYPTHASH)hHash;
PCRYPTKEY key = (PCRYPTKEY)hPubKey;
PCRYPTPROV prov;
TRACE("(0x%lx, %p, %d, 0x%lx, %s, %08x)\n", hHash, pbSignature,
dwSigLen, hPubKey, debugstr_w(sDescription), dwFlags);
TRACE("(0x%lx, %p, %d, 0x%lx, %s, %08x)\n", hHash, pbSignature,
dwSigLen, hPubKey, debugstr_w(sDescription), dwFlags);
if (!hash || !key ||
!hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV ||
@ -2193,49 +2191,32 @@ BOOL WINAPI CryptVerifySignatureW (HCRYPTHASH hHash, CONST BYTE *pbSignature, DW
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
prov = hash->pProvider;
return prov->pFuncs->pCPVerifySignature(prov->hPrivate, hash->hPrivate, pbSignature, dwSigLen,
key->hPrivate, sDescription, dwFlags);
}
/*
These functions have nearly identical prototypes to CryptProtectMemory and CryptUnprotectMemory,
in crypt32.dll.
*/
/******************************************************************************
* SystemFunction040 (ADVAPI32.@)
*
* PARAMS:
* memory : pointer to memory to encrypt
* length : length of region to encrypt, in bytes. must be multiple of RTL_ENCRYPT_MEMORY_SIZE
* flags : RTL_ENCRYPT_OPTION_SAME_PROCESS | RTL_ENCRYPT_OPTION_CROSS_PROCESS, | RTL_ENCRYPT_OPTION_SAME_LOGON
* control whether other processes are able to decrypt the memory. The same value must be given
* when decrypting the memory.
*/
NTSTATUS WINAPI SystemFunction040(PVOID memory, ULONG length, ULONG flags) /* RtlEncryptMemory */
{
FIXME("(%p, %lx, %lx): stub [RtlEncryptMemory]\n", memory, length, flags);
return STATUS_SUCCESS;
prov = hash->pProvider;
return prov->pFuncs->pCPVerifySignature(prov->hPrivate, hash->hPrivate, pbSignature, dwSigLen,
key->hPrivate, sDescription, dwFlags);
}
/******************************************************************************
* SystemFunction041 (ADVAPI32.@)
* CryptVerifySignatureA (ADVAPI32.@)
*
* PARAMS:
* memory : pointer to memory to decrypt
* length : length of region to decrypt, in bytes. must be multiple of RTL_ENCRYPT_MEMORY_SIZE
* flags : RTL_ENCRYPT_OPTION_SAME_PROCESS | RTL_ENCRYPT_OPTION_CROSS_PROCESS, | RTL_ENCRYPT_OPTION_SAME_LOGON
* control whether other processes are able to decrypt the memory. The same value must be given
* when encrypting the memory.
* See CryptVerifySignatureW.
*/
NTSTATUS WINAPI SystemFunction041(PVOID memory, ULONG length, ULONG flags) /* RtlDecryptMemory */
BOOL WINAPI CryptVerifySignatureA (HCRYPTHASH hHash, CONST BYTE *pbSignature, DWORD dwSigLen,
HCRYPTKEY hPubKey, LPCSTR sDescription, DWORD dwFlags)
{
FIXME("(%p, %lx, %lx): stub [RtlDecryptMemory]\n", memory, length, flags);
return STATUS_SUCCESS;
}
LPWSTR wsDescription;
BOOL result;
TRACE("(0x%lx, %p, %d, 0x%lx, %s, %08x)\n", hHash, pbSignature,
dwSigLen, hPubKey, debugstr_a(sDescription), dwFlags);
CRYPT_ANSIToUnicode(sDescription, &wsDescription, -1);
result = CryptVerifySignatureW(hHash, pbSignature, dwSigLen, hPubKey, wsDescription, dwFlags);
CRYPT_Free(wsDescription);
return result;
}
/*
* @unimplemented

View file

@ -82,14 +82,12 @@ typedef struct tagCRYPTHASH
#define MAXPROVTYPES 999
extern unsigned char *CRYPT_DESkey8to7( unsigned char *dst, const unsigned char *key );
extern unsigned char *CRYPT_DEShash( unsigned char *dst, const unsigned char *key,
const unsigned char *src );
extern unsigned char *CRYPT_DESunhash( unsigned char *dst, const unsigned char *key,
const unsigned char *src );
extern VOID byteReverse(unsigned char *buf, unsigned longs);
void byteReverse(unsigned char *buf, unsigned longs);
struct ustring {
DWORD Length;
DWORD MaximumLength;

View file

@ -20,6 +20,7 @@
/* http://cryptopp.sourceforge.net/docs/ref521/arc4_8cpp-source.html */
#include <advapi32.h>
#include "crypt.h"

View file

@ -1,5 +1,6 @@
/*
* Copyright 2004 Hans Leidekker
* Copyright 2006 Mike McCormack
*
* Based on DES.c from libcifs
*
@ -17,7 +18,7 @@
*
* 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 Street, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <advapi32.h>
@ -141,11 +142,11 @@ static const unsigned char FinalPermuteMap[64] =
0, 32, 8, 40, 16, 48, 24, 56
};
#define CLRBIT(STR, IDX) ((STR)[(IDX)/8] &= ~(0x01 << (7 - ((IDX)%8))))
#define SETBIT(STR, IDX) ((STR)[(IDX)/8] |= (0x01 << (7 - ((IDX)%8))))
#define GETBIT(STR, IDX) ((((STR)[(IDX)/8]) >> (7 - ((IDX)%8))) & 0x01)
#define CLRBIT( STR, IDX ) ( (STR)[(IDX)/8] &= ~(0x01 << (7 - ((IDX)%8))) )
#define SETBIT( STR, IDX ) ( (STR)[(IDX)/8] |= (0x01 << (7 - ((IDX)%8))) )
#define GETBIT( STR, IDX ) (( ((STR)[(IDX)/8]) >> (7 - ((IDX)%8)) ) & 0x01)
static void Permute(unsigned char *dst, const unsigned char *src, const unsigned char *map, const int mapsize)
static void Permute( unsigned char *dst, const unsigned char *src, const unsigned char *map, const int mapsize )
{
int bitcount, i;
@ -156,12 +157,12 @@ static void Permute(unsigned char *dst, const unsigned char *src, const unsigned
for (i = 0; i < bitcount; i++)
{
if (GETBIT(src, map[i]))
SETBIT(dst, i);
if (GETBIT( src, map[i] ))
SETBIT( dst, i );
}
}
static void KeyShiftLeft(unsigned char *key, const int numbits)
static void KeyShiftLeft( unsigned char *key, const int numbits )
{
int i;
unsigned char keep = key[0];
@ -177,14 +178,14 @@ static void KeyShiftLeft(unsigned char *key, const int numbits)
key[j] <<= 1;
}
if (GETBIT(key, 27))
if (GETBIT( key, 27 ))
{
CLRBIT(key, 27);
SETBIT(key, 55);
CLRBIT( key, 27 );
SETBIT( key, 55 );
}
if (keep & 0x80)
SETBIT(key, 27);
SETBIT( key, 27 );
keep <<= 1;
}
@ -219,7 +220,7 @@ static void KeyShiftRight( unsigned char *key, const int numbits )
}
}
static void sbox(unsigned char *dst, const unsigned char *src)
static void sbox( unsigned char *dst, const unsigned char *src )
{
int i;
@ -233,7 +234,7 @@ static void sbox(unsigned char *dst, const unsigned char *src)
for (Snum = j = 0, bitnum = (i * 6); j < 6; j++, bitnum++)
{
Snum <<= 1;
Snum |= GETBIT(src, bitnum);
Snum |= GETBIT( src, bitnum );
}
if (0 == (i%2))
@ -243,7 +244,7 @@ static void sbox(unsigned char *dst, const unsigned char *src)
}
}
static void xor(unsigned char *dst, const unsigned char *a, const unsigned char *b, const int count)
static void xor( unsigned char *dst, const unsigned char *a, const unsigned char *b, const int count )
{
int i;
@ -251,42 +252,14 @@ static void xor(unsigned char *dst, const unsigned char *a, const unsigned char
dst[i] = a[i] ^ b[i];
}
unsigned char *CRYPT_DESkey8to7(unsigned char *dst, const unsigned char *key)
{
int i;
unsigned char tmp[7];
static const unsigned char map8to7[56] =
{
0, 1, 2, 3, 4, 5, 6,
8, 9, 10, 11, 12, 13, 14,
16, 17, 18, 19, 20, 21, 22,
24, 25, 26, 27, 28, 29, 30,
32, 33, 34, 35, 36, 37, 38,
40, 41, 42, 43, 44, 45, 46,
48, 49, 50, 51, 52, 53, 54,
56, 57, 58, 59, 60, 61, 62
};
if ((dst == NULL) || (key == NULL))
return NULL;
Permute(tmp, key, map8to7, 7);
for (i = 0; i < 7; i++)
dst[i] = tmp[i];
return dst;
}
unsigned char *CRYPT_DEShash(unsigned char *dst, const unsigned char *key, const unsigned char *src)
unsigned char *CRYPT_DEShash( unsigned char *dst, const unsigned char *key, const unsigned char *src )
{
int i;
unsigned char K[7];
unsigned char D[8];
Permute(K, key, KeyPermuteMap, 7);
Permute(D, src, InitialPermuteMap, 8);
Permute( K, key, KeyPermuteMap, 7 );
Permute( D, src, InitialPermuteMap, 8 );
for (i = 0; i < 16; i++)
{
@ -297,15 +270,15 @@ unsigned char *CRYPT_DEShash(unsigned char *dst, const unsigned char *key, const
unsigned char Rn[4];
unsigned char SubK[6];
KeyShiftLeft(K, KeyRotation[i]);
Permute(SubK, K, KeyCompression, 6);
KeyShiftLeft( K, KeyRotation[i] );
Permute( SubK, K, KeyCompression, 6 );
Permute(Rexp, R, DataExpansion, 6);
xor(Rexp, Rexp, SubK, 6);
Permute( Rexp, R, DataExpansion, 6 );
xor( Rexp, Rexp, SubK, 6 );
sbox(Rn, Rexp);
Permute(Rexp, Rn, PBox, 4);
xor(Rn, L, Rexp, 4);
sbox( Rn, Rexp );
Permute( Rexp, Rn, PBox, 4 );
xor( Rn, L, Rexp, 4 );
for (j = 0; j < 4; j++)
{
@ -314,7 +287,7 @@ unsigned char *CRYPT_DEShash(unsigned char *dst, const unsigned char *key, const
}
}
Permute(dst, D, FinalPermuteMap, 8);
Permute( dst, D, FinalPermuteMap, 8 );
return dst;
}

View file

@ -14,10 +14,10 @@
* 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 Street, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <advapi32.h>
@ -27,23 +27,23 @@
static const unsigned char CRYPT_LMhash_Magic[8] =
{ 'K', 'G', 'S', '!', '@', '#', '$', '%' };
static void CRYPT_LMhash(LPSTR dst, LPCSTR pwd, const int len)
static void CRYPT_LMhash( unsigned char *dst, const unsigned char *pwd, const int len )
{
int i, max = 14;
CHAR tmp_pwd[14] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
unsigned char tmp_pwd[14] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
max = len > max ? max : len;
for (i = 0; i < max; i++)
tmp_pwd[i] = pwd[i];
CRYPT_DEShash((PUCHAR)dst, (PUCHAR)tmp_pwd, CRYPT_LMhash_Magic);
CRYPT_DEShash((PUCHAR)&dst[8], (PUCHAR)&tmp_pwd[7], CRYPT_LMhash_Magic);
CRYPT_DEShash( dst, tmp_pwd, CRYPT_LMhash_Magic );
CRYPT_DEShash( &dst[8], &tmp_pwd[7], CRYPT_LMhash_Magic );
}
NTSTATUS WINAPI SystemFunction006(LPCSTR password, LPSTR hash)
NTSTATUS WINAPI SystemFunction006( LPCSTR password, LPSTR hash )
{
CRYPT_LMhash(hash, password, strlen(password));
CRYPT_LMhash( (unsigned char*)hash, (const unsigned char*)password, strlen(password) );
return STATUS_SUCCESS;
}

View file

@ -14,7 +14,7 @@
*
* 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 Street, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
@ -61,7 +61,7 @@
/*
* The core of the MD4 algorithm
*/
static VOID MD4Transform(unsigned int buf[4], const unsigned int in[16])
static void MD4Transform( unsigned int buf[4], const unsigned int in[16] )
{
register unsigned int a, b, c, d;
@ -131,7 +131,7 @@ static VOID MD4Transform(unsigned int buf[4], const unsigned int in[16])
* Start MD4 accumulation. Set bit count to 0 and buffer to mysterious
* initialization constants.
*/
VOID WINAPI MD4Init(MD4_CTX *ctx)
VOID WINAPI MD4Init( MD4_CTX *ctx )
{
ctx->buf[0] = 0x67452301;
ctx->buf[1] = 0xefcdab89;
@ -145,14 +145,14 @@ VOID WINAPI MD4Init(MD4_CTX *ctx)
* Update context to reflect the concatenation of another buffer full
* of bytes.
*/
VOID WINAPI MD4Update(MD4_CTX *ctx, const unsigned char *buf, unsigned int len)
VOID WINAPI MD4Update( MD4_CTX *ctx, const unsigned char *buf, unsigned int len )
{
register unsigned int t;
/* Update bitcount */
t = ctx->i[0];
if ((ctx->i[0] = t + ((unsigned int)len << 3)) < t)
if ((ctx->i[0] = t + (len << 3)) < t)
ctx->i[1]++; /* Carry from low to high */
ctx->i[1] += len >> 29;
@ -166,14 +166,14 @@ VOID WINAPI MD4Update(MD4_CTX *ctx, const unsigned char *buf, unsigned int len)
if (len < t)
{
memcpy(p, buf, len);
memcpy( p, buf, len );
return;
}
memcpy(p, buf, t);
byteReverse(ctx->in, 16);
memcpy( p, buf, t );
byteReverse( ctx->in, 16 );
MD4Transform(ctx->buf, (unsigned int *)ctx->in);
MD4Transform( ctx->buf, (unsigned int *)ctx->in );
buf += t;
len -= t;
@ -182,24 +182,24 @@ VOID WINAPI MD4Update(MD4_CTX *ctx, const unsigned char *buf, unsigned int len)
/* Process data in 64-byte chunks */
while (len >= 64)
{
memcpy(ctx->in, buf, 64);
byteReverse(ctx->in, 16);
memcpy( ctx->in, buf, 64 );
byteReverse( ctx->in, 16 );
MD4Transform(ctx->buf, (unsigned int *)ctx->in);
MD4Transform( ctx->buf, (unsigned int *)ctx->in );
buf += 64;
len -= 64;
}
/* Handle any remaining bytes of data. */
memcpy(ctx->in, buf, len);
memcpy( ctx->in, buf, len );
}
/*
* Final wrapup - pad to 64-byte boundary with the bit pattern
* Final wrapup - pad to 64-byte boundary with the bit pattern
* 1 0* (64-bit count of bits processed, MSB-first)
*/
VOID WINAPI MD4Final(MD4_CTX *ctx)
VOID WINAPI MD4Final( MD4_CTX *ctx )
{
unsigned int count;
unsigned char *p;
@ -220,19 +220,19 @@ VOID WINAPI MD4Final(MD4_CTX *ctx)
{
/* Two lots of padding: Pad the first block to 64 bytes */
memset( p, 0, count );
byteReverse(ctx->in, 16);
MD4Transform(ctx->buf, (unsigned int *)ctx->in);
byteReverse( ctx->in, 16 );
MD4Transform( ctx->buf, (unsigned int *)ctx->in );
/* Now fill the next block with 56 bytes */
memset(ctx->in, 0, 56);
memset( ctx->in, 0, 56 );
}
else
{
/* Pad block to 56 bytes */
memset(p, 0, count - 8);
memset( p, 0, count - 8 );
}
byteReverse(ctx->in, 14);
byteReverse( ctx->in, 14 );
/* Append length in bits and transform */
((unsigned int *)ctx->in)[14] = ctx->i[0];
@ -240,5 +240,5 @@ VOID WINAPI MD4Final(MD4_CTX *ctx)
MD4Transform( ctx->buf, (unsigned int *)ctx->in );
byteReverse( (unsigned char *)ctx->buf, 4 );
memcpy(ctx->digest, ctx->buf, 16);
memcpy( ctx->digest, ctx->buf, 16 );
}

View file

@ -14,7 +14,7 @@
*
* 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 Street, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
@ -63,7 +63,7 @@ typedef struct
* reflect the addition of 16 longwords of new data. MD5Update blocks
* the data and converts bytes into longwords for this routine.
*/
static void MD5Transform(unsigned int buf[4], const unsigned int in[16])
static void MD5Transform( unsigned int buf[4], const unsigned int in[16] )
{
register unsigned int a, b, c, d;
@ -150,7 +150,7 @@ static void MD5Transform(unsigned int buf[4], const unsigned int in[16])
* Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
* initialization constants.
*/
VOID WINAPI MD5Init(MD5_CTX *ctx)
VOID WINAPI MD5Init( MD5_CTX *ctx )
{
ctx->buf[0] = 0x67452301;
ctx->buf[1] = 0xefcdab89;
@ -164,14 +164,14 @@ VOID WINAPI MD5Init(MD5_CTX *ctx)
* Update context to reflect the concatenation of another buffer full
* of bytes.
*/
VOID WINAPI MD5Update(MD5_CTX *ctx, const unsigned char *buf, unsigned int len)
VOID WINAPI MD5Update( MD5_CTX *ctx, const unsigned char *buf, unsigned int len )
{
register unsigned int t;
/* Update bitcount */
t = ctx->i[0];
if ((ctx->i[0] = t + ((unsigned int)len << 3)) < t)
if ((ctx->i[0] = t + (len << 3)) < t)
ctx->i[1]++; /* Carry from low to high */
ctx->i[1] += len >> 29;
@ -185,14 +185,14 @@ VOID WINAPI MD5Update(MD5_CTX *ctx, const unsigned char *buf, unsigned int len)
if (len < t)
{
memcpy(p, buf, len);
memcpy( p, buf, len );
return;
}
memcpy(p, buf, t);
byteReverse(ctx->in, 16);
memcpy( p, buf, t );
byteReverse( ctx->in, 16 );
MD5Transform(ctx->buf, (unsigned int *)ctx->in);
MD5Transform( ctx->buf, (unsigned int *)ctx->in );
buf += t;
len -= t;
@ -201,21 +201,21 @@ VOID WINAPI MD5Update(MD5_CTX *ctx, const unsigned char *buf, unsigned int len)
/* Process data in 64-byte chunks */
while (len >= 64)
{
memcpy(ctx->in, buf, 64);
byteReverse(ctx->in, 16);
memcpy( ctx->in, buf, 64 );
byteReverse( ctx->in, 16 );
MD5Transform(ctx->buf, (unsigned int *)ctx->in);
MD5Transform( ctx->buf, (unsigned int *)ctx->in );
buf += 64;
len -= 64;
}
/* Handle any remaining bytes of data. */
memcpy(ctx->in, buf, len);
memcpy( ctx->in, buf, len );
}
/*
* Final wrapup - pad to 64-byte boundary with the bit pattern
* Final wrapup - pad to 64-byte boundary with the bit pattern
* 1 0* (64-bit count of bits processed, MSB-first)
*/
VOID WINAPI MD5Final( MD5_CTX *ctx )
@ -238,26 +238,26 @@ VOID WINAPI MD5Final( MD5_CTX *ctx )
if (count < 8)
{
/* Two lots of padding: Pad the first block to 64 bytes */
memset(p, 0, count);
byteReverse(ctx->in, 16);
MD5Transform(ctx->buf, (unsigned int *)ctx->in);
memset( p, 0, count );
byteReverse( ctx->in, 16 );
MD5Transform( ctx->buf, (unsigned int *)ctx->in );
/* Now fill the next block with 56 bytes */
memset(ctx->in, 0, 56);
memset( ctx->in, 0, 56 );
}
else
{
/* Pad block to 56 bytes */
memset(p, 0, count - 8);
memset( p, 0, count - 8 );
}
byteReverse(ctx->in, 14);
byteReverse( ctx->in, 14 );
/* Append length in bits and transform */
((unsigned int *)ctx->in)[14] = ctx->i[0];
((unsigned int *)ctx->in)[15] = ctx->i[1];
MD5Transform(ctx->buf, (unsigned int *)ctx->in);
byteReverse((unsigned char *)ctx->buf, 4);
memcpy(ctx->digest, ctx->buf, 16);
MD5Transform( ctx->buf, (unsigned int *)ctx->in );
byteReverse( (unsigned char *)ctx->buf, 4 );
memcpy( ctx->digest, ctx->buf, 16 );
}

View file

@ -14,13 +14,12 @@
*
* 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 Street, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <advapi32.h>
#include "crypt.h"
/* SHA Context Structure Declaration */
typedef struct {
@ -50,8 +49,7 @@ typedef struct {
#define R4(v,w,x,y,z,i) z+=f4(w,x,y)+blk1(i)+0xCA62C1D6+rol(v,5);w=rol(w,30);
/* Hash a single 512-bit block. This is the core of the algorithm. */
static VOID
SHA1Transform(ULONG State[5], UCHAR Buffer[64])
static void SHA1Transform(ULONG State[5], UCHAR Buffer[64])
{
ULONG a, b, c, d, e;
ULONG *Block;
@ -103,6 +101,12 @@ SHA1Transform(ULONG State[5], UCHAR Buffer[64])
* A_SHAInit [ADVAPI32.@]
*
* Initialize a SHA context structure.
*
* PARAMS
* Context [O] SHA context
*
* RETURNS
* Nothing
*/
VOID WINAPI
A_SHAInit(PSHA_CTX Context)
@ -121,9 +125,17 @@ A_SHAInit(PSHA_CTX Context)
* A_SHAUpdate [ADVAPI32.@]
*
* Update a SHA context with a hashed data from supplied buffer.
*
* PARAMS
* Context [O] SHA context
* Buffer [I] hashed data
* BufferSize [I] hashed data size
*
* RETURNS
* Nothing
*/
VOID WINAPI
A_SHAUpdate(PSHA_CTX Context, PCHAR Buffer, UINT BufferSize)
A_SHAUpdate(PSHA_CTX Context, const unsigned char *Buffer, UINT BufferSize)
{
ULONG BufferContentSize;
@ -157,12 +169,19 @@ A_SHAUpdate(PSHA_CTX Context, PCHAR Buffer, UINT BufferSize)
* A_SHAFinal [ADVAPI32.@]
*
* Finalize SHA context and return the resulting hash.
*
* PARAMS
* Context [I/O] SHA context
* Result [O] resulting hash
*
* RETURNS
* Nothing
*/
VOID WINAPI
A_SHAFinal(PSHA_CTX Context, PULONG Result)
{
INT Pad, Index;
CHAR Buffer[72];
UCHAR Buffer[72];
ULONG *Count;
ULONG BufferContentSize, LengthHi, LengthLo;

View file

@ -129,6 +129,20 @@ CreateProcessAsUserW(HANDLE hToken,
return TRUE;
}
/*
* @unimplemented
*/
BOOL WINAPI CreateProcessWithLogonW( LPCWSTR lpUsername, LPCWSTR lpDomain, LPCWSTR lpPassword, DWORD dwLogonFlags,
LPCWSTR lpApplicationName, LPWSTR lpCommandLine, DWORD dwCreationFlags, LPVOID lpEnvironment,
LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation )
{
FIXME("%s %s %s 0x%08x %s %s 0x%08x %p %s %p %p stub\n", debugstr_w(lpUsername), debugstr_w(lpDomain),
debugstr_w(lpPassword), dwLogonFlags, debugstr_w(lpApplicationName),
debugstr_w(lpCommandLine), dwCreationFlags, lpEnvironment, debugstr_w(lpCurrentDirectory),
lpStartupInfo, lpProcessInformation);
return FALSE;
}
/*
* @implemented

View file

@ -176,4 +176,16 @@ InitiateSystemShutdownExW(LPWSTR lpMachineName,
return TRUE;
}
BOOL WINAPI
InitiateSystemShutdownExA(LPSTR lpMachineName,
LPSTR lpMessage,
DWORD dwTimeout,
BOOL bForceAppsClosed,
BOOL bRebootAfterShutdown,
DWORD dwReason)
{
UNIMPLEMENTED;
return TRUE;
}
/* EOF */

View file

@ -606,4 +606,41 @@ SystemFunction036(PVOID pbBuffer, ULONG dwLen)
return TRUE;
}
/*
These functions have nearly identical prototypes to CryptProtectMemory and CryptUnprotectMemory,
in crypt32.dll.
*/
/******************************************************************************
* SystemFunction040 (ADVAPI32.@)
*
* PARAMS:
* memory : pointer to memory to encrypt
* length : length of region to encrypt, in bytes. must be multiple of RTL_ENCRYPT_MEMORY_SIZE
* flags : RTL_ENCRYPT_OPTION_SAME_PROCESS | RTL_ENCRYPT_OPTION_CROSS_PROCESS, | RTL_ENCRYPT_OPTION_SAME_LOGON
* control whether other processes are able to decrypt the memory. The same value must be given
* when decrypting the memory.
*/
NTSTATUS WINAPI SystemFunction040(PVOID memory, ULONG length, ULONG flags) /* RtlEncryptMemory */
{
//FIXME("(%p, %lx, %lx): stub [RtlEncryptMemory]\n", memory, length, flags);
return STATUS_SUCCESS;
}
/******************************************************************************
* SystemFunction041 (ADVAPI32.@)
*
* PARAMS:
* memory : pointer to memory to decrypt
* length : length of region to decrypt, in bytes. must be multiple of RTL_ENCRYPT_MEMORY_SIZE
* flags : RTL_ENCRYPT_OPTION_SAME_PROCESS | RTL_ENCRYPT_OPTION_CROSS_PROCESS, | RTL_ENCRYPT_OPTION_SAME_LOGON
* control whether other processes are able to decrypt the memory. The same value must be given
* when encrypting the memory.
*/
NTSTATUS WINAPI SystemFunction041(PVOID memory, ULONG length, ULONG flags) /* RtlDecryptMemory */
{
//FIXME("(%p, %lx, %lx): stub [RtlDecryptMemory]\n", memory, length, flags);
return STATUS_SUCCESS;
}
/* EOF */

View file

@ -3,8 +3,11 @@
*/
#include <advapi32.h>
#include <debug.h>
#include <wine/debug.h>
#include <wine/unicode.h>
WINE_DEFAULT_DEBUG_CHANNEL(advapi);
/*
* @unimplemented
*/
@ -16,7 +19,7 @@ TraceMessage(
USHORT MessageNumber,
...)
{
DPRINT1("TraceMessage()\n");
FIXME("TraceMessage()\n");
return ERROR_SUCCESS;
}
@ -26,7 +29,7 @@ GetTraceLoggerHandle(
PVOID Buffer
)
{
DPRINT1("GetTraceLoggerHandle stub()\n");
FIXME("GetTraceLoggerHandle stub()\n");
return (TRACEHANDLE)-1;
}
@ -38,7 +41,7 @@ TraceEvent(
PEVENT_TRACE_HEADER EventTrace
)
{
DPRINT1("TraceEvent stub()\n");
FIXME("TraceEvent stub()\n");
if (!SessionHandle || !EventTrace)
{
@ -61,7 +64,7 @@ GetTraceEnableFlags(
TRACEHANDLE TraceHandle
)
{
DPRINT1("GetTraceEnableFlags stub()\n");
FIXME("GetTraceEnableFlags stub()\n");
return 0xFF;
}
@ -71,7 +74,7 @@ GetTraceEnableLevel(
TRACEHANDLE TraceHandle
)
{
DPRINT1("GetTraceEnableLevel stub()\n");
FIXME("GetTraceEnableLevel stub()\n");
return 0xFF;
}
@ -81,7 +84,7 @@ UnregisterTraceGuids(
TRACEHANDLE RegistrationHandle
)
{
DPRINT1("UnregisterTraceGuids stub()\n");
FIXME("UnregisterTraceGuids stub()\n");
return ERROR_SUCCESS;
}
@ -98,7 +101,7 @@ RegisterTraceGuidsA(
PTRACEHANDLE RegistrationHandle
)
{
DPRINT1("RegisterTraceGuidsA stub()\n");
FIXME("RegisterTraceGuidsA stub()\n");
return ERROR_SUCCESS;
}
@ -115,9 +118,21 @@ RegisterTraceGuidsW(
PTRACEHANDLE RegistrationHandle
)
{
DPRINT1("RegisterTraceGuidsW stub()\n");
FIXME("RegisterTraceGuidsW stub()\n");
return ERROR_SUCCESS;
}
ULONG WINAPI StartTraceW( PTRACEHANDLE pSessionHandle, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
{
FIXME("(%p, %s, %p) stub\n", pSessionHandle, debugstr_w(SessionName), Properties);
if (pSessionHandle) *pSessionHandle = 0xcafe4242;
return ERROR_SUCCESS;
}
ULONG WINAPI StartTraceA( PTRACEHANDLE pSessionHandle, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
{
FIXME("(%p, %s, %p) stub\n", pSessionHandle, debugstr_a(SessionName), Properties);
if (pSessionHandle) *pSessionHandle = 0xcafe4242;
return ERROR_SUCCESS;
}
/* EOF */

View file

@ -1051,8 +1051,10 @@ GetEffectiveRightsFromAclW(IN PACL pacl,
IN PTRUSTEE_W pTrustee,
OUT PACCESS_MASK pAccessRights)
{
FIXME("%s() not implemented!\n", __FUNCTION__);
return ERROR_CALL_NOT_IMPLEMENTED;
FIXME("%p %p %p - stub\n", pacl, pTrustee, pAccessRights);
*pAccessRights = STANDARD_RIGHTS_ALL | SPECIFIC_RIGHTS_ALL;
return ERROR_SUCCESS;
}

View file

@ -12,6 +12,7 @@
*/
#include <advapi32.h>
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(advapi);
@ -200,7 +201,7 @@ LsaCreateTrustedDomainEx(
{
FIXME("(%p,%p,%p,0x%08x,%p) stub\n", PolicyHandle, TrustedDomainInformation, AuthenticationInformation,
DesiredAccess, TrustedDomainHandle);
return STATUS_NOT_IMPLEMENTED;
return STATUS_SUCCESS;
}
/*
@ -586,10 +587,9 @@ LsaQueryInformationPolicy(LSA_HANDLE PolicyHandle,
DWORD padding[3];
WCHAR domain[MAX_COMPUTERNAME_LENGTH + 1];
};
SID_IDENTIFIER_AUTHORITY localSidAuthority = {SECURITY_NT_AUTHORITY};
DWORD dwSize = MAX_COMPUTERNAME_LENGTH + 1;
struct di * xdi = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*xdi));
struct di * xdi = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*xdi));
xdi->info.DomainName.MaximumLength = dwSize * sizeof(WCHAR);
xdi->info.DomainName.Buffer = xdi->domain;
@ -599,10 +599,16 @@ LsaQueryInformationPolicy(LSA_HANDLE PolicyHandle,
TRACE("setting name to %s\n", debugstr_w(xdi->info.DomainName.Buffer));
xdi->info.DomainSid = &xdi->sid;
xdi->sid.Revision = SID_REVISION;
xdi->sid.SubAuthorityCount = 1;
xdi->sid.IdentifierAuthority = localSidAuthority;
xdi->sid.SubAuthority[0] = SECURITY_LOCAL_SYSTEM_RID;
/* read the computer SID from the registry */
if (!ADVAPI_GetComputerSid(&xdi->sid))
{
HeapFree(GetProcessHeap(), 0, xdi);
WARN("Computer SID not found\n");
return STATUS_UNSUCCESSFUL;
}
*Buffer = xdi;
}
@ -695,7 +701,7 @@ LsaRetrievePrivateData(
PLSA_UNICODE_STRING *PrivateData)
{
FIXME("(%p,%p,%p) stub\n", PolicyHandle, KeyName, PrivateData);
return STATUS_NOT_IMPLEMENTED;
return STATUS_OBJECT_NAME_NOT_FOUND;
}
/*
@ -709,7 +715,7 @@ LsaSetDomainInformationPolicy(
PVOID Buffer)
{
FIXME("(%p,0x%08x,%p) stub\n", PolicyHandle, InformationClass, Buffer);
return STATUS_NOT_IMPLEMENTED;
return STATUS_UNSUCCESSFUL;
}
/*
@ -726,6 +732,19 @@ LsaSetInformationPolicy(
return STATUS_UNSUCCESSFUL;
}
/*
* @unimplemented
*/
NTSTATUS WINAPI LsaSetSecret(
IN LSA_HANDLE SecretHandle,
IN PLSA_UNICODE_STRING EncryptedCurrentValue,
IN PLSA_UNICODE_STRING EncryptedOldValue)
{
FIXME("(%p,%p,%p) stub\n", SecretHandle, EncryptedCurrentValue,
EncryptedOldValue);
return STATUS_SUCCESS;
}
/*
* @unimplemented
*/
@ -757,6 +776,17 @@ LsaSetTrustedDomainInfoByName(
return STATUS_SUCCESS;
}
/*
* @unimplemented
*/
NTSTATUS WINAPI LsaRegisterPolicyChangeNotification(
POLICY_NOTIFICATION_INFORMATION_CLASS class,
HANDLE event)
{
FIXME("(%d,%p) stub\n", class, event);
return STATUS_UNSUCCESSFUL;
}
/*
* @unimplemented
*/
@ -786,6 +816,17 @@ LsaStorePrivateData(
return STATUS_OBJECT_NAME_NOT_FOUND;
}
/*
* @unimplemented
*/
NTSTATUS WINAPI LsaUnregisterPolicyChangeNotification(
POLICY_NOTIFICATION_INFORMATION_CLASS class,
HANDLE event)
{
FIXME("(%d,%p) stub\n", class, event);
return STATUS_SUCCESS;
}
/*
* @unimplemented
*/

View file

@ -1458,6 +1458,11 @@ LookupPrivilegeValueW(LPCWSTR SystemName,
SetLastError(RPC_S_SERVER_UNAVAILABLE);
return FALSE;
}
if (!PrivName)
{
SetLastError(ERROR_NO_SUCH_PRIVILEGE);
return FALSE;
}
if (NULL != SystemName && L'\0' != *SystemName)
{
@ -2486,4 +2491,54 @@ TreeResetNamedSecurityInfoA(LPSTR pObjectName,
#endif
}
/******************************************************************************
* SaferCreateLevel [ADVAPI32.@]
*/
BOOL WINAPI SaferCreateLevel(DWORD ScopeId, DWORD LevelId, DWORD OpenFlags,
SAFER_LEVEL_HANDLE* LevelHandle, LPVOID lpReserved)
{
FIXME("(%u, %x, %u, %p, %p) stub\n", ScopeId, LevelId, OpenFlags, LevelHandle, lpReserved);
return FALSE;
}
/******************************************************************************
* SaferGetPolicyInformation [ADVAPI32.@]
*/
BOOL WINAPI SaferGetPolicyInformation(DWORD scope, SAFER_POLICY_INFO_CLASS class, DWORD size,
PVOID buffer, PDWORD required, LPVOID lpReserved)
{
FIXME("(%u %u %u %p %p %p) stub\n", scope, class, size, buffer, required, lpReserved);
return FALSE;
}
/******************************************************************************
* QueryWindows31FilesMigration [ADVAPI32.@]
*
* PARAMS
* x1 []
*/
BOOL WINAPI
QueryWindows31FilesMigration( DWORD x1 )
{
FIXME("(%d):stub\n",x1);
return TRUE;
}
/******************************************************************************
* SynchronizeWindows31FilesAndWindowsNTRegistry [ADVAPI32.@]
*
* PARAMS
* x1 []
* x2 []
* x3 []
* x4 []
*/
BOOL WINAPI
SynchronizeWindows31FilesAndWindowsNTRegistry( DWORD x1, DWORD x2, DWORD x3,
DWORD x4 )
{
FIXME("(0x%08x,0x%08x,0x%08x,0x%08x):stub\n",x1,x2,x3,x4);
return TRUE;
}
/* EOF */

View file

@ -303,6 +303,68 @@ static __inline BOOL set_ntstatus( NTSTATUS status )
return !status;
}
/************************************************************
* ADVAPI_GetComputerSid
*
* Reads the computer SID from the registry.
*/
BOOL ADVAPI_GetComputerSid(PSID sid)
{
HKEY key;
LONG ret;
BOOL retval = FALSE;
static const WCHAR Account[] = { 'S','E','C','U','R','I','T','Y','\\','S','A','M','\\','D','o','m','a','i','n','s','\\','A','c','c','o','u','n','t',0 };
static const WCHAR V[] = { 'V',0 };
if ((ret = RegOpenKeyExW(HKEY_LOCAL_MACHINE, Account, 0,
KEY_READ, &key)) == ERROR_SUCCESS)
{
DWORD size = 0;
ret = RegQueryValueExW(key, V, NULL, NULL, NULL, &size);
if (ret == ERROR_MORE_DATA || ret == ERROR_SUCCESS)
{
BYTE * data = HeapAlloc(GetProcessHeap(), 0, size);
if (data)
{
if ((ret = RegQueryValueExW(key, V, NULL, NULL,
data, &size)) == ERROR_SUCCESS)
{
/* the SID is in the last 24 bytes of the binary data */
CopyMemory(sid, &data[size-24], 24);
retval = TRUE;
}
HeapFree(GetProcessHeap(), 0, data);
}
}
RegCloseKey(key);
}
if(retval == TRUE) return retval;
/* create a new random SID */
if (RegCreateKeyExW(HKEY_LOCAL_MACHINE, Account,
0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL) == ERROR_SUCCESS)
{
PSID new_sid;
SID_IDENTIFIER_AUTHORITY identifierAuthority = {SECURITY_NT_AUTHORITY};
DWORD id[3];
if (RtlGenRandom(id, sizeof(id)))
{
if (AllocateAndInitializeSid(&identifierAuthority, 4, SECURITY_NT_NON_UNIQUE, id[0], id[1], id[2], 0, 0, 0, 0, &new_sid))
{
if (RegSetValueExW(key, V, 0, REG_BINARY, new_sid, GetLengthSid(new_sid)) == ERROR_SUCCESS)
retval = CopySid(GetLengthSid(new_sid), sid, new_sid);
FreeSid(new_sid);
}
}
RegCloseKey(key);
}
return retval;
}
/* Exported functions */
/*
@ -1740,7 +1802,7 @@ IsWellKnownSid(IN PSID pSid,
{
if (WellKnownSids[i].Type == WellKnownSidType)
{
if (EqualSid(pSid, (PSID)((ULONG_PTR)&WellKnownSids[i].Sid.Revision)))
if (EqualSid(pSid, (PSID)(&WellKnownSids[i].Sid.Revision)))
return TRUE;
}
}
@ -1758,7 +1820,10 @@ ConvertStringSidToSidA(IN LPCSTR StringSid,
{
BOOL bRetVal = FALSE;
if (!StringSid || !sid)
TRACE("%s, %p\n", debugstr_a(StringSid), sid);
if (GetVersion() & 0x80000000)
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
else if (!StringSid || !sid)
SetLastError(ERROR_INVALID_PARAMETER);
else
{

View file

@ -312,6 +312,29 @@ CloseEventLog(IN HANDLE hEventLog)
return TRUE;
}
/******************************************************************************
* ControlTraceW [ADVAPI32.@]
*
* Control a givel event trace session
*
*/
ULONG WINAPI ControlTraceW( TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control )
{
FIXME("(%s, %s, %p, %d) stub\n", wine_dbgstr_longlong(hSession), debugstr_w(SessionName), Properties, control);
return ERROR_SUCCESS;
}
/******************************************************************************
* ControlTraceA [ADVAPI32.@]
*
* See ControlTraceW.
*
*/
ULONG WINAPI ControlTraceA( TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control )
{
FIXME("(%s, %s, %p, %d) stub\n", wine_dbgstr_longlong(hSession), debugstr_a(SessionName), Properties, control);
return ERROR_SUCCESS;
}
/******************************************************************************
* DeregisterEventSource [ADVAPI32.@]
@ -348,6 +371,16 @@ DeregisterEventSource(IN HANDLE hEventLog)
return TRUE;
}
/******************************************************************************
* EnableTrace [ADVAPI32.@]
*/
ULONG WINAPI EnableTrace( ULONG enable, ULONG flag, ULONG level, LPCGUID guid, TRACEHANDLE hSession )
{
FIXME("(%d, 0x%x, %d, %s, %s): stub\n", enable, flag, level,
debugstr_guid(guid), wine_dbgstr_longlong(hSession));
return ERROR_SUCCESS;
}
/******************************************************************************
* GetEventLogInformation [ADVAPI32.@]
@ -706,6 +739,32 @@ OpenEventLogW(IN LPCWSTR lpUNCServerName,
return (HANDLE)LogHandle;
}
/******************************************************************************
* QueryAllTracesW [ADVAPI32.@]
*
* Query information for started event trace sessions
*
*/
ULONG WINAPI QueryAllTracesW( PEVENT_TRACE_PROPERTIES * parray, ULONG arraycount, PULONG psessioncount )
{
FIXME("(%p, %d, %p) stub\n", parray, arraycount, psessioncount);
if (psessioncount) *psessioncount = 0;
return ERROR_SUCCESS;
}
/******************************************************************************
* QueryAllTracesA [ADVAPI32.@]
*
* See QueryAllTracesW.
*/
ULONG WINAPI QueryAllTracesA( PEVENT_TRACE_PROPERTIES * parray, ULONG arraycount, PULONG psessioncount )
{
FIXME("(%p, %d, %p) stub\n", parray, arraycount, psessioncount);
if (psessioncount) *psessioncount = 0;
return ERROR_SUCCESS;
}
/******************************************************************************
* ReadEventLogA [ADVAPI32.@]
@ -1088,3 +1147,4 @@ ReportEventW(IN HANDLE hEventLog,
return TRUE;
}

View file

@ -184,6 +184,28 @@ AccessCheck(IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
return TRUE;
}
/*
* @unimplemented
*/
BOOL WINAPI AccessCheckByType(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
PSID PrincipalSelfSid,
HANDLE ClientToken,
DWORD DesiredAccess,
POBJECT_TYPE_LIST ObjectTypeList,
DWORD ObjectTypeListLength,
PGENERIC_MAPPING GenericMapping,
PPRIVILEGE_SET PrivilegeSet,
LPDWORD PrivilegeSetLength,
LPDWORD GrantedAccess,
LPBOOL AccessStatus)
{
FIXME("stub\n");
*AccessStatus = TRUE;
return !*AccessStatus;
}
/*
* @implemented

View file

@ -18,7 +18,7 @@
23 stdcall AtlModuleUpdateRegistryFromResourceD(ptr wstr long ptr ptr)
24 stub AtlWaitWithMessageLoop
25 stub AtlSetErrorInfo
26 stub AtlCreateTargetDC
26 stdcall AtlCreateTargetDC(long ptr)
27 stdcall AtlHiMetricToPixel(ptr ptr)
28 stdcall AtlPixelToHiMetric(ptr ptr)
29 stub AtlDevModeW2A
@ -37,7 +37,7 @@
43 stdcall AtlModuleAddCreateWndData(ptr ptr ptr)
44 stdcall AtlModuleExtractCreateWndData(ptr)
45 stdcall AtlModuleRegisterWndClassInfoW(ptr ptr ptr)
46 stub AtlModuleRegisterWndClassInfoA
46 stdcall AtlModuleRegisterWndClassInfoA(ptr ptr ptr)
47 stdcall AtlAxGetControl(long ptr)
48 stdcall AtlAxGetHost(long ptr)
49 stub AtlRegisterClassCategoriesHelper

View file

@ -1150,7 +1150,7 @@ static LPDLGTEMPLATEW AX_ConvertDialogTemplate(LPCDLGTEMPLATEW src_tmpl)
tmp = src;
if (ext)
src += 11;
src += 12;
else
src += 9;
PUT_BLOCK(tmp, src-tmp);
@ -1236,7 +1236,7 @@ HWND WINAPI AtlAxCreateDialogW(HINSTANCE hInst, LPCWSTR name, HWND owner, DLGPRO
LPDLGTEMPLATEW newptr;
HWND res;
FIXME("(%p %s %p %p %lx) - not tested\n", hInst, debugstr_w(name), owner, dlgProc, param);
TRACE("(%p %s %p %p %lx)\n", hInst, debugstr_w(name), owner, dlgProc, param);
hrsrc = FindResourceW( hInst, name, (LPWSTR)RT_DIALOG );
if ( !hrsrc )

View file

@ -53,7 +53,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
return TRUE;
}
#define ATLVer1Size 100
#define ATLVer1Size FIELD_OFFSET(_ATL_MODULEW, dwAtlBuildVer)
HRESULT WINAPI AtlModuleInit(_ATL_MODULEW* pM, _ATL_OBJMAP_ENTRYW* p, HINSTANCE h)
{
@ -63,9 +63,16 @@ HRESULT WINAPI AtlModuleInit(_ATL_MODULEW* pM, _ATL_OBJMAP_ENTRYW* p, HINSTANCE
FIXME("SEMI-STUB (%p %p %p)\n",pM,p,h);
size = pM->cbSize;
if (size != sizeof(_ATL_MODULEW) && size != ATLVer1Size)
switch (size)
{
FIXME("Unknown structure version (size %i)\n",size);
case ATLVer1Size:
case sizeof(_ATL_MODULEW):
#ifdef _WIN64
case sizeof(_ATL_MODULEW) + sizeof(void *):
#endif
break;
default:
WARN("Unknown structure version (size %i)\n",size);
return E_INVALIDARG;
}
@ -265,7 +272,7 @@ HRESULT WINAPI AtlInternalQueryInterface(void* this, const _ATL_INTMAP_ENTRY* pE
else
{
TRACE("Function\n");
rc = pEntries[i].pFunc(this, iid, ppvObject,0);
rc = pEntries[i].pFunc(this, iid, ppvObject, pEntries[i].dw);
}
break;
}
@ -438,6 +445,44 @@ HRESULT WINAPI AtlModuleUnregisterServer(_ATL_MODULEW *pm, const CLSID *clsid)
return E_FAIL;
}
/***********************************************************************
* AtlModuleRegisterWndClassInfoA [ATL.@]
*
* See AtlModuleRegisterWndClassInfoW.
*/
ATOM WINAPI AtlModuleRegisterWndClassInfoA(_ATL_MODULEA *pm, _ATL_WNDCLASSINFOA *wci, WNDPROC *pProc)
{
ATOM atom;
FIXME("%p %p %p semi-stub\n", pm, wci, pProc);
atom = wci->m_atom;
if (!atom)
{
WNDCLASSEXA wc;
TRACE("wci->m_wc.lpszClassName = %s\n", wci->m_wc.lpszClassName);
if (!wci->m_wc.lpszClassName)
{
sprintf(wci->m_szAutoName, "ATL%08lx", (UINT_PTR)wci);
TRACE("auto-generated class name %s\n", wci->m_szAutoName);
wci->m_wc.lpszClassName = wci->m_szAutoName;
}
atom = GetClassInfoExA(pm->m_hInst, wci->m_wc.lpszClassName, &wc);
if (!atom)
atom = RegisterClassExA(&wci->m_wc);
wci->pWndProc = wci->m_wc.lpfnWndProc;
wci->m_atom = atom;
}
*pProc = wci->pWndProc;
TRACE("returning 0x%04x\n", atom);
return atom;
}
/***********************************************************************
* AtlModuleRegisterWndClassInfoW [ATL.@]
*
@ -471,8 +516,8 @@ ATOM WINAPI AtlModuleRegisterWndClassInfoW(_ATL_MODULEW *pm, _ATL_WNDCLASSINFOW
if (!wci->m_wc.lpszClassName)
{
static const WCHAR szFormat[] = {'A','T','L','%','0','8','x',0};
sprintfW(wci->m_szAutoName, szFormat, (UINT)(UINT_PTR)wci);
static const WCHAR szFormat[] = {'A','T','L','%','0','8','l','x',0};
sprintfW(wci->m_szAutoName, szFormat, (UINT_PTR)wci);
TRACE("auto-generated class name %s\n", debugstr_w(wci->m_szAutoName));
wci->m_wc.lpszClassName = wci->m_szAutoName;
}
@ -506,6 +551,32 @@ void WINAPI AtlPixelToHiMetric(const SIZEL* lpPix, SIZEL* lpHiMetric)
ReleaseDC( NULL, dc );
}
/***********************************************************************
* AtlCreateTargetDC [ATL.@]
*/
HDC WINAPI AtlCreateTargetDC( HDC hdc, DVTARGETDEVICE *dv )
{
static const WCHAR displayW[] = {'d','i','s','p','l','a','y',0};
const WCHAR *driver = NULL, *device = NULL, *port = NULL;
DEVMODEW *devmode = NULL;
TRACE( "(%p, %p)\n", hdc, dv );
if (dv)
{
if (dv->tdDriverNameOffset) driver = (WCHAR *)((char *)dv + dv->tdDriverNameOffset);
if (dv->tdDeviceNameOffset) device = (WCHAR *)((char *)dv + dv->tdDeviceNameOffset);
if (dv->tdPortNameOffset) port = (WCHAR *)((char *)dv + dv->tdPortNameOffset);
if (dv->tdExtDevmodeOffset) devmode = (DEVMODEW *)((char *)dv + dv->tdExtDevmodeOffset);
}
else
{
if (hdc) return hdc;
driver = displayW;
}
return CreateDCW( driver, device, port, devmode );
}
/***********************************************************************
* AtlModuleAddCreateWndData [ATL.@]
*/

View file

@ -43,7 +43,7 @@ typedef struct _ATL_WNDCLASSINFOW_TAG
WCHAR m_szAutoName[14];
} _ATL_WNDCLASSINFOW;
ATOM WINAPI AtlModuleRegisterWndClassInfoA(_ATL_MODULEW *pm, _ATL_WNDCLASSINFOA *wci, WNDPROC *pProc);
ATOM WINAPI AtlModuleRegisterWndClassInfoA(_ATL_MODULEA *pm, _ATL_WNDCLASSINFOA *wci, WNDPROC *pProc);
ATOM WINAPI AtlModuleRegisterWndClassInfoW(_ATL_MODULEW *pm, _ATL_WNDCLASSINFOW *wci, WNDPROC *pProc);
HDC WINAPI AtlCreateTargetDC(HDC hdc, DVTARGETDEVICE *ptd);

View file

@ -549,7 +549,7 @@ static HRESULT WINAPI Registrar_AddReplacement(IRegistrar *iface, LPCOLESTR Key,
new_rep = HeapAlloc(GetProcessHeap(), 0, sizeof(rep_list));
new_rep->key_len = lstrlenW(Key);
new_rep->key = HeapAlloc(GetProcessHeap(), 0, new_rep->key_len*sizeof(OLECHAR)+1);
new_rep->key = HeapAlloc(GetProcessHeap(), 0, (new_rep->key_len + 1) * sizeof(OLECHAR));
memcpy(new_rep->key, Key, (new_rep->key_len+1)*sizeof(OLECHAR));
len = lstrlenW(item)+1;

View file

@ -2,6 +2,7 @@
@ stdcall AuthzAddSidsToContext(ptr ptr long ptr long ptr)
@ stdcall AuthzCachedAccessCheck(long ptr ptr ptr ptr)
@ stdcall AuthzEnumerateSecurityEventSources(long ptr ptr ptr)
@ stub AuthzEvaluateSacl
@ stdcall AuthzFreeAuditEvent(ptr)
@ stdcall AuthzFreeContext(ptr)
@ stdcall AuthzFreeHandle(ptr)
@ -12,7 +13,7 @@
@ stdcall AuthzInitializeContextFromToken(long ptr ptr ptr long long ptr ptr)
@ stdcall AuthzInitializeObjectAccessAuditEvent(long ptr wstr wstr wstr wstr ptr long)
@ stdcall AuthzInitializeObjectAccessAuditEvent2(long ptr wstr wstr wstr wstr wstr ptr long)
@ stdcall AuthzInitializeResourceManager(long ptr ptr ptr ptr ptr)
@ stdcall AuthzInitializeResourceManager(long ptr ptr ptr wstr ptr)
@ stdcall AuthzInstallSecurityEventSource(long ptr)
@ stdcall AuthzOpenObjectAudit(long ptr ptr ptr ptr ptr long ptr)
@ stdcall AuthzRegisterSecurityEventSource(long ptr ptr)
@ -21,9 +22,11 @@
@ stdcall AuthzUninstallSecurityEventSource(long wstr)
@ stdcall AuthzUnregisterSecurityEventSource(long ptr)
@ stub AuthziAllocateAuditParams
@ stub AuthziCheckContextMembership
@ stub AuthziFreeAuditEventType
@ stub AuthziFreeAuditParams
@ stub AuthziFreeAuditQueue
@ stub AuthziGenerateAdminAlertAuditW
@ stub AuthziInitializeAuditEvent
@ stub AuthziInitializeAuditEventType
@ stub AuthziInitializeAuditParams

View file

@ -102,6 +102,12 @@ HANDLE WINAPI CreateFileW (LPCWSTR lpFileName,
PVOID EaBuffer = NULL;
ULONG EaLength = 0;
if (!lpFileName || !lpFileName[0])
{
SetLastError( ERROR_PATH_NOT_FOUND );
return INVALID_HANDLE_VALUE;
}
TRACE("CreateFileW(lpFileName %S)\n",lpFileName);
/* validate & translate the creation disposition */

View file

@ -1,3 +1,5 @@
#undef i386
@ stdcall AcquireSRWLockExclusive(ptr) ntdll.RtlAcquireSRWLockExclusive
@ stdcall AcquireSRWLockShared(ptr) ntdll.RtlAcquireSRWLockShared
@ stdcall ActivateActCtx(ptr ptr)
@ -48,7 +50,7 @@
@ stdcall CancelSynchronousIo(long)
@ stdcall CancelTimerQueueTimer(long long)
@ stdcall CancelWaitableTimer(long)
@ stdcall ChangeTimerQueueTimer(long long long long)
@ stdcall ChangeTimerQueueTimer(ptr ptr long long)
@ stdcall CheckNameLegalDOS8Dot3A(str str long long long)
@ stdcall CheckNameLegalDOS8Dot3W(wstr str long long long)
@ stdcall CheckRemoteDebuggerPresent(long ptr)
@ -85,6 +87,8 @@
@ stdcall CreateDirectoryExW(wstr wstr ptr)
@ stdcall CreateDirectoryW(wstr ptr)
@ stdcall CreateEventA(ptr long long str)
@ stdcall CreateEventExA(ptr str long long)
@ stdcall CreateEventExW(ptr wstr long long)
@ stdcall CreateEventW(ptr long long wstr)
@ stdcall CreateFiber(long ptr ptr)
@ stdcall CreateFiberEx(long long long ptr ptr)
@ -101,8 +105,10 @@
@ stub CreateKernelThread ; missing in XP SP3
@ stdcall CreateMailslotA(ptr long long ptr)
@ stdcall CreateMailslotW(ptr long long ptr)
@ stdcall CreateMemoryResourceNotification(ptr)
@ stdcall CreateMemoryResourceNotification(long)
@ stdcall CreateMutexA(ptr long str)
@ stdcall CreateMutexExA(ptr str long long)
@ stdcall CreateMutexExW(ptr wstr long long)
@ stdcall CreateMutexW(ptr long wstr)
@ stdcall CreateNamedPipeA(str long long long long long long ptr)
@ stdcall CreateNamedPipeW(wstr long long long long long long ptr)
@ -115,9 +121,9 @@
@ stdcall CreateProcessW(wstr wstr ptr ptr long long ptr wstr ptr ptr)
@ stdcall CreateRemoteThread(long ptr long ptr long long ptr)
@ stdcall CreateSemaphoreA(ptr long long str)
@ stdcall CreateSemaphoreW(ptr long long wstr)
@ stdcall CreateSemaphoreExA(ptr long long str long long)
@ stdcall CreateSemaphoreExW(ptr long long wstr long long)
@ stdcall CreateSemaphoreW(ptr long long wstr)
@ stdcall CreateSocketHandle()
@ stdcall CreateSymbolicLinkA(str str long)
@ stdcall CreateSymbolicLinkW(wstr wstr long)
@ -128,9 +134,9 @@
@ stdcall CreateToolhelp32Snapshot(long long)
@ stdcall CreateVirtualBuffer(long long long)
@ stdcall CreateWaitableTimerA(ptr long str)
@ stdcall CreateWaitableTimerExA(ptr str long long)
@ stdcall CreateWaitableTimerExW(ptr wstr long long)
@ stdcall CreateWaitableTimerW(ptr long wstr)
@ stdcall CreateWaitableTimerExA (ptr str long long)
@ stdcall CreateWaitableTimerExW (ptr wstr long long)
@ stdcall DeactivateActCtx(long ptr)
@ stdcall DebugActiveProcess(long)
@ stdcall DebugActiveProcessStop(long)
@ -299,7 +305,7 @@
@ stdcall GetConsoleAliasExesLengthA()
@ stdcall GetConsoleAliasExesLengthW()
@ stdcall GetConsoleAliasExesW(wstr long)
@ stdcall GetConsoleAliasW(wstr wstr long wstr)
@ stdcall GetConsoleAliasW(wstr ptr long wstr)
@ stdcall GetConsoleAliasesA(str long str)
@ stdcall GetConsoleAliasesLengthA(str)
@ stdcall GetConsoleAliasesLengthW(wstr)
@ -443,6 +449,7 @@
@ stdcall GetPrivateProfileStructW(wstr wstr ptr long wstr)
@ stdcall GetProcAddress(long str)
@ stdcall GetProcessAffinityMask(long ptr ptr)
@ stdcall GetProcessFlags(long)
@ stdcall GetProcessHandleCount(long ptr)
@ stdcall GetProcessHeap()
@ stdcall GetProcessHeaps(long ptr)
@ -453,7 +460,8 @@
@ stdcall GetProcessTimes(long ptr ptr ptr ptr)
@ stdcall GetProcessVersion(long)
@ stdcall GetProcessWorkingSetSize(long ptr ptr)
@ stub GetProductName ; missing in XP SP3
@ stdcall GetProductInfo(long long long long ptr)
@ stub GetProductName
@ stdcall GetProfileIntA(str str long)
@ stdcall GetProfileIntW(wstr wstr long)
@ stdcall GetProfileSectionA(str ptr long)
@ -496,6 +504,7 @@
@ stdcall GetTempPathA(long ptr)
@ stdcall GetTempPathW(long ptr)
@ stdcall GetThreadContext(long ptr)
@ stdcall GetThreadErrorMode()
@ stdcall GetThreadId(ptr)
@ stdcall GetThreadIOPendingFlag(long ptr)
@ stdcall GetThreadLocale()
@ -575,16 +584,16 @@
@ stdcall InitAtomTable(long)
@ stdcall InitializeCriticalSection(ptr)
@ stdcall InitializeCriticalSectionAndSpinCount(ptr long)
;@ stdcall InitializeCriticalSectionEx(ptr long long) ; missing in XP SP3
@ stdcall InitializeCriticalSectionEx(ptr long long)
@ stdcall InitializeSListHead(ptr) ntdll.RtlInitializeSListHead
@ stdcall InitializeSRWLock(ptr) ntdll.RtlInitializeSRWLock
@ stdcall InterlockedCompareExchange(ptr long long)
@ stdcall InterlockedCompareExchange64(ptr double double) ntdll.RtlInterlockedCompareExchange64
@ stdcall InterlockedDecrement(ptr)
@ stdcall InterlockedExchange(ptr long)
@ stdcall InterlockedExchangeAdd (ptr long )
@ stdcall -arch=i386 InterlockedCompareExchange (ptr long long)
@ stdcall -arch=i386 -ret64 InterlockedCompareExchange64(ptr double double) ntdll.RtlInterlockedCompareExchange64
@ stdcall -arch=i386 InterlockedDecrement(ptr)
@ stdcall -arch=i386 InterlockedExchange(ptr long)
@ stdcall -arch=i386 InterlockedExchangeAdd (ptr long )
@ stdcall InterlockedFlushSList(ptr) ntdll.RtlInterlockedFlushSList
@ stdcall InterlockedIncrement(ptr)
@ stdcall -arch=i386 InterlockedIncrement(ptr)
@ stdcall InterlockedPopEntrySList(ptr) ntdll.RtlInterlockedPopEntrySList
@ stdcall InterlockedPushEntrySList(ptr ptr) ntdll.RtlInterlockedPushEntrySList
@ stdcall InvalidateConsoleDIBits(long long)
@ -602,6 +611,7 @@
@ stdcall IsProcessInJob(long long ptr)
@ stdcall IsProcessorFeaturePresent(long)
@ stdcall IsSystemResumeAutomatic()
@ stdcall IsThreadAFiber()
@ stdcall IsValidCodePage(long)
@ stdcall IsValidLanguageGroup(long long)
@ stdcall IsValidLocale(long long)
@ -610,6 +620,17 @@
@ stdcall LCIDToLocaleName(long wstr long long) ; needed for wine gecko; missing in XP SP3
@ stdcall LCMapStringA(long long str long ptr long)
@ stdcall LCMapStringW(long long wstr long ptr long)
@ stdcall LZClose(long)
; @ stub LZCloseFile
@ stdcall LZCopy(long long)
; @ stub LZCreateFileW
@ stdcall LZDone()
@ stdcall LZInit(long)
@ stdcall LZOpenFileA(str ptr long)
@ stdcall LZOpenFileW(wstr ptr long)
@ stdcall LZRead(long ptr long)
@ stdcall LZSeek(long long long)
@ stdcall LZStart()
@ stdcall LeaveCriticalSection(ptr) ntdll.RtlLeaveCriticalSection
@ stdcall LoadLibraryA(str)
@ stdcall LoadLibraryExA( str long long)
@ -632,15 +653,8 @@
@ stdcall LockFile(long long long long long)
@ stdcall LockFileEx(long long long long long ptr)
@ stdcall LockResource(long)
@ stdcall LZClose(long)
@ stdcall LZCopy(long long)
@ stdcall LZDone()
@ stdcall LZInit(long)
@ stdcall LZOpenFileA(str ptr long)
@ stdcall LZOpenFileW(wstr ptr long)
@ stdcall LZRead(long str long) ;check
@ stdcall LZSeek(long long long) ;check
@ stdcall LZStart()
@ stdcall MakeCriticalSectionGlobal(ptr)
@ stdcall MapUserPhysicalPages(ptr long ptr)
@ stdcall MapUserPhysicalPagesScatter(ptr long ptr)
@ stdcall MapViewOfFile(long long long long long)
@ -702,8 +716,10 @@
@ stdcall QueryDepthSList(ptr) ntdll.RtlQueryDepthSList
@ stdcall QueryDosDeviceA(str ptr long)
@ stdcall QueryDosDeviceW(wstr ptr long)
@ stdcall QueryFullProcessImageNameA(ptr long ptr ptr)
@ stdcall QueryFullProcessImageNameW(ptr long ptr ptr)
@ stdcall QueryInformationJobObject(long long ptr long ptr)
@ stdcall QueryMemoryResourceNotification(long ptr)
@ stdcall QueryMemoryResourceNotification(ptr ptr)
@ stub QueryNumberOfEventLogRecords ; missing in XP SP3
@ stub QueryOldestEventLogRecord ; missing in XP SP3
@ stdcall QueryPerformanceCounter(ptr)
@ -740,6 +756,7 @@
@ stdcall RegisterWaitForSingleObjectEx(long ptr ptr long long)
@ stdcall RegisterWowBaseHandlers(long)
@ stdcall RegisterWowExec(long)
@ stdcall ReinitializeCriticalSection(ptr)
@ stdcall ReleaseActCtx(ptr)
@ stdcall ReleaseMutex(long)
@ stdcall ReleaseSemaphore(long long ptr)
@ -760,9 +777,9 @@
@ stdcall ResetWriteWatch(ptr long)
@ stdcall RestoreLastError(long) ntdll.RtlRestoreLastWin32Error
@ stdcall ResumeThread(long)
@ stdcall -arch=x86_64 RtlAddFunctionTable(ptr long double)
@ stdcall RtlCaptureContext(ptr) ntdll.RtlCaptureContext
@ stdcall RtlCaptureStackBackTrace(long long ptr ptr) ntdll.RtlCaptureStackBackTrace
@ cdecl -arch=x86_64 RtlAddFunctionTable(ptr long long) ntdll.RtlAddFunctionTable
@ stdcall -register RtlCaptureContext(ptr) ntdll.RtlCaptureContext
@ stdcall RtlCaptureStackBackTrace(long long ptr ptr) ntdll.RtlCaptureStackBackTrace
@ stdcall -arch=x86_64 RtlCompareMemory(ptr ptr ptr)
@ stdcall -arch=x86_64 RtlCopyMemory(ptr ptr ptr)
@ stdcall -arch=x86_64 RtlDeleteFunctionTable(ptr)
@ -797,6 +814,7 @@
@ stdcall SetComputerNameW(wstr)
@ stdcall SetConsoleActiveScreenBuffer(long)
@ stdcall SetConsoleCP(long)
@ stub SetConsoleCommandHistoryMode
@ stdcall SetConsoleCtrlHandler(ptr long)
@ stdcall SetConsoleCursor(long long)
@ stdcall SetConsoleCursorInfo(long ptr)
@ -878,6 +896,7 @@
@ stdcall SetTermsrvAppInstallMode(long)
@ stdcall SetThreadAffinityMask(long long)
@ stdcall SetThreadContext(long ptr)
@ stdcall SetThreadErrorMode(long ptr)
@ stdcall SetThreadExecutionState(long)
@ stdcall SetThreadIdealProcessor(long long)
@ stdcall SetThreadLocale(long)
@ -926,6 +945,7 @@
@ stdcall UTRegister(long str str str ptr ptr ptr)
@ stdcall UTUnRegister(long)
@ stdcall UnhandledExceptionFilter(ptr)
@ stdcall UninitializeCriticalSection(ptr)
@ stdcall UnlockFile(long long long long long)
@ stdcall UnlockFileEx(long long long long ptr)
@ stdcall UnmapViewOfFile(ptr)
@ -968,8 +988,8 @@
@ stdcall WideCharToMultiByte(long long wstr long ptr long ptr ptr)
@ stdcall WinExec(str long)
@ stdcall Wow64EnableWow64FsRedirection(long)
@ stdcall Wow64DisableWow64FsRedirection(long)
@ stdcall Wow64RevertWow64FsRedirection(long)
@ stdcall Wow64DisableWow64FsRedirection(ptr)
@ stdcall Wow64RevertWow64FsRedirection(ptr)
@ stdcall WriteConsoleA(long ptr long ptr ptr)
@ stdcall WriteConsoleInputA(long ptr long ptr)
@ stdcall WriteConsoleInputVDMA(long long long long)
@ -1028,6 +1048,3 @@
@ stdcall lstrlenA(str)
@ stdcall lstrlenW(wstr)
; Functions added in Win Vista
@ stdcall QueryFullProcessImageNameA(ptr long str ptr)
@ stdcall QueryFullProcessImageNameW(ptr long wstr ptr)

View file

@ -496,6 +496,7 @@ UINT msi_parse_patch_summary( MSISUMMARYINFO *si, MSIPATCHINFO **patch )
{
MSIPATCHINFO *pi;
UINT r = ERROR_SUCCESS;
WCHAR *p;
pi = msi_alloc_zero( sizeof(MSIPATCHINFO) );
if (!pi)
@ -508,6 +509,30 @@ UINT msi_parse_patch_summary( MSISUMMARYINFO *si, MSIPATCHINFO **patch )
return ERROR_OUTOFMEMORY;
}
p = pi->patchcode;
if (*p != '{')
{
msi_free( pi->patchcode );
msi_free( pi );
return ERROR_PATCH_PACKAGE_INVALID;
}
p = strchrW( p + 1, '}' );
if (!p)
{
msi_free( pi->patchcode );
msi_free( pi );
return ERROR_PATCH_PACKAGE_INVALID;
}
if (p[1])
{
FIXME("patch obsoletes %s\n", debugstr_w(p + 1));
p[1] = 0;
}
TRACE("patch code %s\n", debugstr_w(pi->patchcode));
pi->transforms = msi_suminfo_dup_string( si, PID_LASTAUTHOR );
if (!pi->transforms)
{
@ -978,43 +1003,6 @@ static UINT ITERATE_CreateFolders(MSIRECORD *row, LPVOID param)
return ERROR_SUCCESS;
}
/* FIXME: probably should merge this with the above function */
static UINT msi_create_directory( MSIPACKAGE* package, LPCWSTR dir )
{
UINT rc = ERROR_SUCCESS;
MSIFOLDER *folder;
LPWSTR install_path;
install_path = resolve_folder(package, dir, FALSE, FALSE, TRUE, &folder);
if (!install_path)
return ERROR_FUNCTION_FAILED;
/* create the path */
if (folder->State == 0)
{
create_full_pathW(install_path);
folder->State = 2;
}
msi_free(install_path);
return rc;
}
UINT msi_create_component_directories( MSIPACKAGE *package )
{
MSICOMPONENT *comp;
/* create all the folders required by the components are going to install */
LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
{
if (comp->ActionRequest != INSTALLSTATE_LOCAL)
continue;
msi_create_directory( package, comp->Directory );
}
return ERROR_SUCCESS;
}
static UINT ACTION_CreateFolders(MSIPACKAGE *package)
{
static const WCHAR ExecSeqQuery[] =
@ -1075,7 +1063,7 @@ static UINT ITERATE_RemoveFolders( MSIRECORD *row, LPVOID param )
TRACE("folder is %s\n", debugstr_w(full_path));
uirow = MSI_CreateRecord( 1 );
MSI_RecordSetStringW( uirow, 1, full_path );
MSI_RecordSetStringW( uirow, 1, dir );
ui_actiondata( package, szRemoveFolders, uirow );
msiobj_release( &uirow->hdr );
@ -1976,16 +1964,12 @@ static UINT ITERATE_CostFinalizeConditions(MSIRECORD *row, LPVOID param)
return ERROR_SUCCESS;
}
static LPWSTR get_disk_file_version( LPCWSTR filename )
VS_FIXEDFILEINFO *msi_get_disk_file_version( LPCWSTR filename )
{
static const WCHAR name_fmt[] =
{'%','u','.','%','u','.','%','u','.','%','u',0};
static const WCHAR name[] = {'\\',0};
VS_FIXEDFILEINFO *lpVer;
WCHAR filever[0x100];
VS_FIXEDFILEINFO *ret;
LPVOID version;
DWORD versize;
DWORD handle;
DWORD versize, handle;
UINT sz;
TRACE("%s\n", debugstr_w(filename));
@ -1995,23 +1979,32 @@ static LPWSTR get_disk_file_version( LPCWSTR filename )
return NULL;
version = msi_alloc( versize );
if (!version)
return NULL;
GetFileVersionInfoW( filename, 0, versize, version );
if (!VerQueryValueW( version, name, (LPVOID*)&lpVer, &sz ))
if (!VerQueryValueW( version, name, (LPVOID *)&ret, &sz ))
{
msi_free( version );
return NULL;
}
sprintfW( filever, name_fmt,
HIWORD(lpVer->dwFileVersionMS),
LOWORD(lpVer->dwFileVersionMS),
HIWORD(lpVer->dwFileVersionLS),
LOWORD(lpVer->dwFileVersionLS));
msi_free( version );
return ret;
}
return strdupW( filever );
int msi_compare_file_versions( VS_FIXEDFILEINFO *fi, const WCHAR *version )
{
DWORD ms, ls;
msi_parse_version_string( version, &ms, &ls );
if (fi->dwFileVersionMS > ms) return 1;
else if (fi->dwFileVersionMS < ms) return -1;
else if (fi->dwFileVersionLS > ls) return 1;
else if (fi->dwFileVersionLS < ls) return -1;
return 0;
}
static DWORD get_disk_file_size( LPCWSTR filename )
@ -2045,7 +2038,7 @@ static BOOL hash_matches( MSIFILE *file )
static UINT set_file_install_states( MSIPACKAGE *package )
{
LPWSTR file_version;
VS_FIXEDFILEINFO *file_version;
MSIFILE *file;
LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
@ -2062,18 +2055,14 @@ static UINT set_file_install_states( MSIPACKAGE *package )
/* calculate target */
p = resolve_folder(package, comp->Directory, FALSE, FALSE, TRUE, NULL);
msi_free(file->TargetPath);
TRACE("file %s is named %s\n",
debugstr_w(file->File), debugstr_w(file->FileName));
TRACE("file %s is named %s\n", debugstr_w(file->File), debugstr_w(file->FileName));
file->TargetPath = build_directory_name(2, p, file->FileName);
msi_free(p);
TRACE("file %s resolves to %s\n",
debugstr_w(file->File), debugstr_w(file->TargetPath));
TRACE("file %s resolves to %s\n", debugstr_w(file->File), debugstr_w(file->TargetPath));
if (GetFileAttributesW(file->TargetPath) == INVALID_FILE_ATTRIBUTES)
{
@ -2081,11 +2070,15 @@ static UINT set_file_install_states( MSIPACKAGE *package )
comp->Cost += file->FileSize;
continue;
}
if (file->Version && (file_version = get_disk_file_version( file->TargetPath )))
if (file->Version && (file_version = msi_get_disk_file_version( file->TargetPath )))
{
TRACE("new %s old %s\n", debugstr_w(file->Version), debugstr_w(file_version));
TRACE("new %s old %u.%u.%u.%u\n", debugstr_w(file->Version),
HIWORD(file_version->dwFileVersionMS),
LOWORD(file_version->dwFileVersionMS),
HIWORD(file_version->dwFileVersionLS),
LOWORD(file_version->dwFileVersionLS));
if (strcmpiW(file_version, file->Version) < 0)
if (msi_compare_file_versions( file_version, file->Version ) < 0)
{
file->state = msifs_overwrite;
comp->Cost += file->FileSize;
@ -4263,13 +4256,12 @@ static UINT ITERATE_SelfRegModules(MSIRECORD *row, LPVOID param)
MSIFILE *file;
DWORD len;
static const WCHAR ExeStr[] =
{'r','e','g','s','v','r','3','2','.','e','x','e',' ',' /',' s',' ','\"',0};
{'r','e','g','s','v','r','3','2','.','e','x','e',' ','\"',0};
static const WCHAR close[] = {'\"',0};
STARTUPINFOW si;
PROCESS_INFORMATION info;
BOOL brc;
MSIRECORD *uirow;
LPWSTR uipath, p;
memset(&si,0,sizeof(STARTUPINFOW));
@ -4302,14 +4294,11 @@ static UINT ITERATE_SelfRegModules(MSIRECORD *row, LPVOID param)
uirow = MSI_CreateRecord( 2 );
MSI_RecordSetStringW( uirow, 1, filename );
uipath = strdupW( file->TargetPath );
if ((p = strrchrW( uipath,'\\' ))) *p = 0;
MSI_RecordSetStringW( uirow, 2, uipath );
MSI_RecordSetStringW( uirow, 2, file->Component->Directory );
ui_actiondata( package, szSelfRegModules, uirow );
msiobj_release( &uirow->hdr );
msi_free( FullName );
msi_free( uipath );
return ERROR_SUCCESS;
}
@ -4337,7 +4326,7 @@ static UINT ACTION_SelfRegModules(MSIPACKAGE *package)
static UINT ITERATE_SelfUnregModules( MSIRECORD *row, LPVOID param )
{
static const WCHAR regsvr32[] =
{'r','e','g','s','v','r','3','2','.','e','x','e',' ','/','u',' ','/','s',' ','\"',0};
{'r','e','g','s','v','r','3','2','.','e','x','e',' ','/','u',' ','\"',0};
static const WCHAR close[] = {'\"',0};
MSIPACKAGE *package = param;
LPCWSTR filename;
@ -4348,7 +4337,6 @@ static UINT ITERATE_SelfUnregModules( MSIRECORD *row, LPVOID param )
PROCESS_INFORMATION pi;
BOOL ret;
MSIRECORD *uirow;
LPWSTR uipath, p;
memset( &si, 0, sizeof(STARTUPINFOW) );
@ -4380,14 +4368,11 @@ static UINT ITERATE_SelfUnregModules( MSIRECORD *row, LPVOID param )
uirow = MSI_CreateRecord( 2 );
MSI_RecordSetStringW( uirow, 1, filename );
uipath = strdupW( file->TargetPath );
if ((p = strrchrW( uipath,'\\' ))) *p = 0;
MSI_RecordSetStringW( uirow, 2, uipath );
MSI_RecordSetStringW( uirow, 2, file->Component->Directory );
ui_actiondata( package, szSelfUnregModules, uirow );
msiobj_release( &uirow->hdr );
msi_free( cmdline );
msi_free( uipath );
return ERROR_SUCCESS;
}
@ -5773,7 +5758,7 @@ static UINT ITERATE_InstallODBCDriver( MSIRECORD *rec, LPVOID param )
uirow = MSI_CreateRecord( 5 );
MSI_RecordSetStringW( uirow, 1, desc );
MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) );
MSI_RecordSetStringW( uirow, 3, driver_path );
MSI_RecordSetStringW( uirow, 3, driver_file->Component->Directory );
ui_actiondata( package, szInstallODBC, uirow );
msiobj_release( &uirow->hdr );
@ -5846,7 +5831,7 @@ static UINT ITERATE_InstallODBCTranslator( MSIRECORD *rec, LPVOID param )
uirow = MSI_CreateRecord( 5 );
MSI_RecordSetStringW( uirow, 1, desc );
MSI_RecordSetStringW( uirow, 2, MSI_RecordGetString(rec, 2) );
MSI_RecordSetStringW( uirow, 3, translator_path );
MSI_RecordSetStringW( uirow, 3, translator_file->Component->Directory );
ui_actiondata( package, szInstallODBC, uirow );
msiobj_release( &uirow->hdr );
@ -6919,33 +6904,33 @@ static UINT ACTION_MsiPublishAssemblies( MSIPACKAGE *package )
if (assembly->installed && !mi->is_continuous)
continue;
if (assembly->file->Sequence > mi->last_sequence || mi->is_continuous ||
(assembly->file->IsCompressed && !mi->is_extracted))
if (assembly->file->IsCompressed)
{
MSICABDATA data;
r = ready_media(package, assembly->file, mi);
if (r != ERROR_SUCCESS)
if (assembly->file->disk_id != mi->disk_id || mi->is_continuous)
{
ERR("Failed to ready media\n");
break;
}
MSICABDATA data;
data.mi = mi;
data.package = package;
data.cb = installassembly_cb;
data.user = &assemblies;
r = ready_media(package, assembly->file, mi);
if (r != ERROR_SUCCESS)
{
ERR("Failed to ready media\n");
break;
}
if (assembly->file->IsCompressed &&
!msi_cabextract(package, mi, &data))
{
ERR("Failed to extract cabinet: %s\n", debugstr_w(mi->cabinet));
r = ERROR_FUNCTION_FAILED;
break;
data.mi = mi;
data.package = package;
data.cb = installassembly_cb;
data.user = &assemblies;
if (!msi_cabextract(package, mi, &data))
{
ERR("Failed to extract cabinet: %s\n", debugstr_w(mi->cabinet));
r = ERROR_FUNCTION_FAILED;
break;
}
}
}
if (!assembly->file->IsCompressed)
else
{
LPWSTR source = resolve_file_source(package, assembly->file);

View file

@ -50,7 +50,7 @@ typedef struct tagMSISIGNATURE
LPWSTR Languages;
}MSISIGNATURE;
static void ACTION_VerStrToInteger(LPCWSTR verStr, PDWORD ms, PDWORD ls)
void msi_parse_version_string(LPCWSTR verStr, PDWORD ms, PDWORD ls)
{
const WCHAR *ptr;
int x1 = 0, x2 = 0, x3 = 0, x4 = 0;
@ -109,13 +109,13 @@ static UINT ACTION_AppSearchGetSignature(MSIPACKAGE *package, MSISIGNATURE *sig,
minVersion = msi_dup_record_field(row,3);
if (minVersion)
{
ACTION_VerStrToInteger(minVersion, &sig->MinVersionMS, &sig->MinVersionLS);
msi_parse_version_string( minVersion, &sig->MinVersionMS, &sig->MinVersionLS );
msi_free( minVersion );
}
maxVersion = msi_dup_record_field(row,4);
if (maxVersion)
{
ACTION_VerStrToInteger(maxVersion, &sig->MaxVersionMS, &sig->MaxVersionLS);
msi_parse_version_string( maxVersion, &sig->MaxVersionMS, &sig->MaxVersionLS );
msi_free( maxVersion );
}
sig->MinSize = MSI_RecordGetInteger(row,5);

View file

@ -774,7 +774,7 @@ static UINT msi_dialog_text_control( msi_dialog *dialog, MSIRECORD *rec )
{
msi_control *control;
struct msi_text_info *info;
LPCWSTR text, ptr, prop;
LPCWSTR text, ptr, prop, control_name;
LPWSTR font_name;
TRACE("%p %p\n", dialog, rec);
@ -787,6 +787,7 @@ static UINT msi_dialog_text_control( msi_dialog *dialog, MSIRECORD *rec )
if( !info )
return ERROR_SUCCESS;
control_name = MSI_RecordGetString( rec, 2 );
control->attributes = MSI_RecordGetInteger( rec, 8 );
prop = MSI_RecordGetString( rec, 9 );
control->property = msi_dialog_dup_property( dialog, prop, FALSE );
@ -805,7 +806,7 @@ static UINT msi_dialog_text_control( msi_dialog *dialog, MSIRECORD *rec )
SetPropW( control->hwnd, szButtonData, info );
ControlEvent_SubscribeToEvent( dialog->package, dialog,
szSelectionPath, control->name, szSelectionPath );
szSelectionPath, control_name, szSelectionPath );
return ERROR_SUCCESS;
}
@ -1009,6 +1010,8 @@ MSIScrollText_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
switch( msg )
{
case WM_GETDLGCODE:
return DLGC_WANTARROWS;
case WM_NCDESTROY:
msi_free( info );
RemovePropW( hWnd, szButtonData );
@ -2390,7 +2393,7 @@ done:
static UINT msi_dialog_selection_tree( msi_dialog *dialog, MSIRECORD *rec )
{
msi_control *control;
LPCWSTR prop;
LPCWSTR prop, control_name;
MSIPACKAGE *package = dialog->package;
DWORD style;
struct msi_selection_tree_info *info;
@ -2410,6 +2413,7 @@ static UINT msi_dialog_selection_tree( msi_dialog *dialog, MSIRECORD *rec )
}
control->handler = msi_dialog_seltree_handler;
control_name = MSI_RecordGetString( rec, 2 );
control->attributes = MSI_RecordGetInteger( rec, 8 );
prop = MSI_RecordGetString( rec, 9 );
control->property = msi_dialog_dup_property( dialog, prop, FALSE );
@ -2422,7 +2426,7 @@ static UINT msi_dialog_selection_tree( msi_dialog *dialog, MSIRECORD *rec )
SetPropW( control->hwnd, szButtonData, info );
ControlEvent_SubscribeToEvent( dialog->package, dialog,
szSelectionPath, control->name, szProperty );
szSelectionPath, control_name, szProperty );
/* initialize it */
msi_seltree_create_imagelist( control->hwnd );

View file

@ -50,39 +50,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
static void msi_file_update_ui( MSIPACKAGE *package, MSIFILE *f, const WCHAR *action )
{
MSIRECORD *uirow;
LPWSTR uipath, p;
/* the UI chunk */
uirow = MSI_CreateRecord( 9 );
MSI_RecordSetStringW( uirow, 1, f->FileName );
uipath = strdupW( f->TargetPath );
p = strrchrW(uipath,'\\');
if (p)
p[1]=0;
MSI_RecordSetStringW( uirow, 9, uipath);
MSI_RecordSetStringW( uirow, 9, f->Component->Directory );
MSI_RecordSetInteger( uirow, 6, f->FileSize );
ui_actiondata( package, action, uirow);
ui_actiondata( package, action, uirow );
msiobj_release( &uirow->hdr );
msi_free( uipath );
ui_progress( package, 2, f->FileSize, 0, 0);
}
/* 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);
ui_progress( package, 2, f->FileSize, 0, 0 );
}
static void schedule_install_files(MSIPACKAGE *package)
@ -174,11 +149,29 @@ static UINT copy_install_file(MSIPACKAGE *package, MSIFILE *file, LPWSTR source)
return gle;
}
static UINT msi_create_directory( MSIPACKAGE *package, const WCHAR *dir )
{
MSIFOLDER *folder;
WCHAR *install_path;
install_path = resolve_folder( package, dir, FALSE, FALSE, TRUE, &folder );
if (!install_path)
return ERROR_FUNCTION_FAILED;
if (folder->State == 0)
{
create_full_pathW( install_path );
folder->State = 2;
}
msi_free( install_path );
return ERROR_SUCCESS;
}
static BOOL installfiles_cb(MSIPACKAGE *package, LPCWSTR file, DWORD action,
LPWSTR *path, DWORD *attrs, PVOID user)
{
static MSIFILE *f = NULL;
MSIMEDIAINFO *mi = user;
UINT_PTR disk_id = (UINT_PTR)user;
if (action == MSICABEXTRACT_BEGINEXTRACT)
{
@ -189,10 +182,11 @@ static BOOL installfiles_cb(MSIPACKAGE *package, LPCWSTR file, DWORD action,
return FALSE;
}
if (f->disk_id != mi->disk_id || (f->state != msifs_missing && f->state != msifs_overwrite))
if (f->disk_id != disk_id || (f->state != msifs_missing && f->state != msifs_overwrite))
return FALSE;
msi_file_update_ui(package, f, szInstallFiles);
msi_create_directory(package, f->Component->Directory);
*path = strdupW(f->TargetPath);
*attrs = f->Attributes;
@ -224,14 +218,6 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
schedule_install_files(package);
/*
* Despite MSDN specifying that the CreateFolders action
* should be called before InstallFiles, some installers don't
* do that, and they seem to work correctly. We need to create
* directories here to make sure that the files can be copied.
*/
msi_create_component_directories( package );
mi = msi_alloc_zero( sizeof(MSIMEDIAINFO) );
LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
@ -254,7 +240,7 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
data.mi = mi;
data.package = package;
data.cb = installfiles_cb;
data.user = mi;
data.user = (PVOID)(UINT_PTR)mi->disk_id;
if (file->IsCompressed &&
!msi_cabextract(package, mi, &data))
@ -273,6 +259,8 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
debugstr_w(file->TargetPath));
msi_file_update_ui(package, file, szInstallFiles);
msi_create_directory(package, file->Component->Directory);
rc = copy_install_file(package, file, source);
if (rc != ERROR_SUCCESS)
{
@ -974,7 +962,8 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
{
MSIRECORD *uirow;
LPWSTR dir, uipath, p;
LPWSTR dir, p;
VS_FIXEDFILEINFO *ver;
if ( file->state == msifs_installed )
ERR("removing installed file %s\n", debugstr_w(file->TargetPath));
@ -983,11 +972,17 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
file->Component->Installed == INSTALLSTATE_SOURCE )
continue;
/* don't remove a file if the old file
* is strictly newer than the version to be installed
*/
if ( msi_compare_file_version( file ) < 0 )
continue;
if (file->Version)
{
ver = msi_get_disk_file_version( file->TargetPath );
if (ver && msi_compare_file_versions( ver, file->Version ) > 0)
{
TRACE("newer version detected, not removing file\n");
msi_free( ver );
continue;
}
msi_free( ver );
}
TRACE("removing %s\n", debugstr_w(file->File) );
if (!DeleteFileW( file->TargetPath ))
@ -1003,17 +998,11 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
}
file->state = msifs_missing;
/* the UI chunk */
uirow = MSI_CreateRecord( 9 );
MSI_RecordSetStringW( uirow, 1, file->FileName );
uipath = strdupW( file->TargetPath );
p = strrchrW(uipath,'\\');
if (p)
p[1]=0;
MSI_RecordSetStringW( uirow, 9, uipath);
ui_actiondata( package, szRemoveFiles, uirow);
MSI_RecordSetStringW( uirow, 9, file->Component->Directory );
ui_actiondata( package, szRemoveFiles, uirow );
msiobj_release( &uirow->hdr );
msi_free( uipath );
/* FIXME: call ui_progress here? */
}

View file

@ -41,13 +41,23 @@ LPWSTR build_icon_path(MSIPACKAGE *package, LPCWSTR icon_name )
{
LPWSTR SystemFolder, dest, FilePath;
static const WCHAR szMicrosoft[] =
{'M','i','c','r','o','s','o','f','t','\\',0};
static const WCHAR szInstaller[] =
{'M','i','c','r','o','s','o','f','t','\\',
'I','n','s','t','a','l','l','e','r','\\',0};
static const WCHAR szFolder[] =
{'I','n','s','t','a','l','l','e','r','\\',0};
static const WCHAR szADFolder[] =
{'A','p','p','D','a','t','a','F','o','l','d','e','r',0};
static const WCHAR szWFolder[] =
{'W','i','n','d','o','w','s','F','o','l','d','e','r',0};
SystemFolder = msi_dup_property( package->db, szFolder );
if(package->Context == MSIINSTALLCONTEXT_MACHINE)
SystemFolder = msi_dup_property( package->db, szWFolder );
else
{
LPWSTR ADTgt = msi_dup_property( package->db, szADFolder );
SystemFolder = build_directory_name(2, ADTgt, szMicrosoft);
msi_free(ADTgt);
}
dest = build_directory_name(3, SystemFolder, szInstaller, package->ProductCode);

View file

@ -993,13 +993,64 @@ UINT WINAPI MsiGetFeatureCostA(MSIHANDLE hInstall, LPCSTR szFeature,
return rc;
}
UINT MSI_GetFeatureCost(MSIPACKAGE *package, MSIFEATURE *feature,
MSICOSTTREE iCostTree, INSTALLSTATE iState,
LPINT piCost)
static INT feature_cost( MSIFEATURE *feature )
{
FIXME("(%s %i %i %p): not implemented yet\n",
debugstr_w(feature->Feature), iCostTree, iState, piCost);
if (piCost) *piCost = 0;
INT cost = 0;
MSICOMPONENT *comp;
LIST_FOR_EACH_ENTRY( comp, &feature->Components, MSICOMPONENT, entry )
{
cost += comp->Cost;
}
return cost;
}
UINT MSI_GetFeatureCost( MSIPACKAGE *package, MSIFEATURE *feature, MSICOSTTREE tree,
INSTALLSTATE state, LPINT cost )
{
TRACE("%s, %u, %d, %p\n", debugstr_w(feature->Feature), tree, state, cost);
*cost = 0;
switch (tree)
{
case MSICOSTTREE_CHILDREN:
{
MSIFEATURE *child;
LIST_FOR_EACH_ENTRY( child, &feature->Children, MSIFEATURE, entry )
{
if (child->ActionRequest == state)
*cost += feature_cost( child );
}
break;
}
case MSICOSTTREE_PARENTS:
{
const WCHAR *feature_parent = feature->Feature_Parent;
for (;;)
{
MSIFEATURE *parent = get_loaded_feature( package, feature_parent );
if (!parent)
break;
if (parent->ActionRequest == state)
*cost += feature_cost( parent );
feature_parent = parent->Feature_Parent;
}
break;
}
case MSICOSTTREE_SELFONLY:
if (feature->ActionRequest == state)
*cost = feature_cost( feature );
break;
default:
WARN("unhandled cost tree %u\n", tree);
break;
}
*cost /= 512;
return ERROR_SUCCESS;
}

View file

@ -629,12 +629,10 @@ static UINT msi_load_media_info(MSIPACKAGE *package, MSIFILE *file, MSIMEDIAINFO
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ', 'F','R','O','M',' ',
'`','M','e','d','i','a','`',' ','W','H','E','R','E',' ',
'`','L','a','s','t','S','e','q','u','e','n','c','e','`',' ','>','=',
' ','%','i',' ','A','N','D',' ','`','D','i','s','k','I','d','`',' ','>','=',
' ','%','i',' ','O','R','D','E','R',' ','B','Y',' ',
'`','D','i','s','k','I','d','`',0};
'`','L','a','s','t','S','e','q','u','e','n','c','e','`',' ','>','=',' ','%','i',
' ','O','R','D','E','R',' ','B','Y',' ','`','D','i','s','k','I','d','`',0};
row = MSI_QueryGetRecord(package->db, query, file->Sequence, mi->disk_id);
row = MSI_QueryGetRecord(package->db, query, file->Sequence);
if (!row)
{
TRACE("Unable to query row\n");
@ -787,13 +785,17 @@ UINT ready_media(MSIPACKAGE *package, MSIFILE *file, MSIMEDIAINFO *mi)
{
WCHAR temppath[MAX_PATH], *p;
msi_download_file(cabinet_file, temppath);
rc = msi_download_file(cabinet_file, temppath);
if (rc != ERROR_SUCCESS)
{
ERR("Failed to download %s (%u)\n", debugstr_w(cabinet_file), rc);
msi_free(cabinet_file);
return rc;
}
if ((p = strrchrW(temppath, '\\'))) *p = 0;
msi_free(mi->sourcedir);
strcpyW(mi->sourcedir, temppath);
msi_free(mi->cabinet);
strcpyW(mi->cabinet, p + 1);
mi->cabinet = strdupW(p + 1);
msi_free(cabinet_file);
return ERROR_SUCCESS;

View file

@ -299,13 +299,56 @@ done:
return r;
}
static UINT get_patch_product_codes( LPCWSTR szPatchPackage, WCHAR **product_codes )
{
MSIHANDLE patch, info = 0;
UINT r, type;
DWORD size;
static WCHAR empty[] = {0};
WCHAR *codes;
r = MsiOpenDatabaseW( szPatchPackage, MSIDBOPEN_READONLY, &patch );
if (r != ERROR_SUCCESS)
return r;
r = MsiGetSummaryInformationW( patch, NULL, 0, &info );
if (r != ERROR_SUCCESS)
goto done;
size = 0;
r = MsiSummaryInfoGetPropertyW( info, PID_TEMPLATE, &type, NULL, NULL, empty, &size );
if (r != ERROR_MORE_DATA || !size || type != VT_LPSTR)
{
ERR("Failed to read product codes from patch\n");
r = ERROR_FUNCTION_FAILED;
goto done;
}
codes = msi_alloc( ++size * sizeof(WCHAR) );
if (!codes)
{
r = ERROR_OUTOFMEMORY;
goto done;
}
r = MsiSummaryInfoGetPropertyW( info, PID_TEMPLATE, &type, NULL, NULL, codes, &size );
if (r != ERROR_SUCCESS)
msi_free( codes );
else
*product_codes = codes;
done:
MsiCloseHandle( info );
MsiCloseHandle( patch );
return r;
}
static UINT MSI_ApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szProductCode, LPCWSTR szCommandLine)
{
MSIHANDLE patch = 0, info = 0;
UINT r = ERROR_SUCCESS, type;
DWORD size = 0;
UINT r;
DWORD size;
LPCWSTR cmd_ptr = szCommandLine;
LPWSTR beg, end, cmd = NULL, codes = NULL;
LPWSTR beg, end, cmd, codes = NULL;
BOOL succeeded = FALSE;
static const WCHAR patcheq[] = {'P','A','T','C','H','=',0};
@ -314,34 +357,8 @@ static UINT MSI_ApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szProductCode, LPCWS
if (!szPatchPackage || !szPatchPackage[0])
return ERROR_INVALID_PARAMETER;
if (!szProductCode)
{
r = MsiOpenDatabaseW(szPatchPackage, MSIDBOPEN_READONLY, &patch);
if (r != ERROR_SUCCESS)
return r;
r = MsiGetSummaryInformationW(patch, NULL, 0, &info);
if (r != ERROR_SUCCESS)
goto done;
r = MsiSummaryInfoGetPropertyW(info, PID_TEMPLATE, &type, NULL, NULL, empty, &size);
if (r != ERROR_MORE_DATA || !size || type != VT_LPSTR)
{
ERR("Failed to read product codes from patch\n");
goto done;
}
codes = msi_alloc(++size * sizeof(WCHAR));
if (!codes)
{
r = ERROR_OUTOFMEMORY;
goto done;
}
r = MsiSummaryInfoGetPropertyW(info, PID_TEMPLATE, &type, NULL, NULL, codes, &size);
if (r != ERROR_SUCCESS)
goto done;
}
if (!szProductCode && (r = get_patch_product_codes( szPatchPackage, &codes )))
return r;
if (!szCommandLine)
cmd_ptr = empty;
@ -350,8 +367,8 @@ static UINT MSI_ApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szProductCode, LPCWS
cmd = msi_alloc(size * sizeof(WCHAR));
if (!cmd)
{
r = ERROR_OUTOFMEMORY;
goto done;
msi_free(codes);
return ERROR_OUTOFMEMORY;
}
lstrcpyW(cmd, cmd_ptr);
@ -380,13 +397,8 @@ static UINT MSI_ApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szProductCode, LPCWS
r = ERROR_SUCCESS;
}
done:
msi_free(cmd);
msi_free(codes);
MsiCloseHandle(info);
MsiCloseHandle(patch);
return r;
}
@ -813,7 +825,7 @@ UINT WINAPI MsiGetProductCodeA(LPCSTR szComponent, LPSTR szBuffer)
UINT r;
WCHAR szwBuffer[GUID_SIZE];
TRACE("%s %s\n",debugstr_a(szComponent), debugstr_a(szBuffer));
TRACE("%s %p\n", debugstr_a(szComponent), szBuffer);
if( szComponent )
{
@ -2148,6 +2160,9 @@ INSTALLSTATE WINAPI MsiLocateComponentA(LPCSTR szComponent, LPSTR lpPathBuf,
TRACE("%s %p %p\n", debugstr_a(szComponent), lpPathBuf, pcchBuf);
if (!szComponent || !pcchBuf)
return INSTALLSTATE_INVALIDARG;
if (MsiGetProductCodeA( szComponent, szProduct ) != ERROR_SUCCESS)
return INSTALLSTATE_UNKNOWN;
@ -2161,6 +2176,9 @@ INSTALLSTATE WINAPI MsiLocateComponentW(LPCWSTR szComponent, LPWSTR lpPathBuf,
TRACE("%s %p %p\n", debugstr_w(szComponent), lpPathBuf, pcchBuf);
if (!szComponent || !pcchBuf)
return INSTALLSTATE_INVALIDARG;
if (MsiGetProductCodeW( szComponent, szProduct ) != ERROR_SUCCESS)
return INSTALLSTATE_UNKNOWN;

View file

@ -37,7 +37,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#include "msi_Nl.rc"
#include "msi_No.rc"
#include "msi_Pl.rc"
#include "msi_Pt.rc"
#include "msi_Sv.rc"
#include "msi_Tr.rc"
#include "msi_Uk.rc"
@ -48,6 +47,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#include "msi_Fr.rc"
#include "msi_It.rc"
#include "msi_Lt.rc"
#include "msi_Pt.rc"
#include "msi_Ro.rc"
#include "msi_Ru.rc"
#include "msi_Si.rc"

View file

@ -1,7 +1,9 @@
/*
* Korean resources for MSI
*
* Copyright 2005 YunSong Hwang
* Copyright 2005 Mike McCormack
* Copyright 2010 Detlef Riekenberg
* Copyright 2010 YunSong Hwang
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -28,30 +30,30 @@ STRINGTABLE DISCARDABLE
5 "%s 경로를 찾을수 없습니다"
9 "디스크 %s 삽입"
10 "Windows Installer %s\n\n" \
"Usage:\n" \
"msiexec command {required parameter} [optional parammeter]\n\n" \
"Install a product:\n" \
"사용법:\n" \
"msiexec 명령 {필수 매개변수} [선택적 매개변수]\n\n" \
"제품 설치:\n" \
"\t/i {package|productcode} [property]\n" \
"\t/package {package|productcode} [property]\n" \
"\t/a package [property]\n" \
"Repair an installation:\n" \
"설치 복구:\n" \
"\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \
"Uninstall a product:\n" \
"제품 제거:\n" \
"\t/uninstall {package|productcode} [property]\n" \
"\t/x {package|productcode} [property]\n" \
"Advertise a product:\n" \
"제품 알리기:\n" \
"\t/j[u|m] package [/t transform] [/g languageid]\n" \
"Apply a patch:\n" \
"패치 추가:\n" \
"\t/p patchpackage [property]\n" \
"\t/p patchpackage /a package [property]\n" \
"Log and UI Modifiers for above commands:\n" \
"위의 명령어를 위한 Log 와 UI 한정자 :\n" \
"\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \
"\t/q{|n|b|r|f|n+|b+|b-}\n" \
"Register MSI Service:\n" \
"MSI 서비스 등록:\n" \
"\t/y\n" \
"Unregister MSI Service:\n" \
"MSI 서비스 등록 해제:\n" \
"\t/z\n" \
"Display this help:\n" \
"도움말 보기:\n" \
"\t/help\n" \
"\t/?\n"
11 "%s를 포함하는 폴더를 입력하세여"

View file

@ -2,7 +2,8 @@
* Portuguese resources for MSI
*
* Copyright 2005 Marcelo Duarte
* Copyright 2006 Américo José Melo
* Copyright 2006 Américo José Melo
* Copyright 2010 Gustavo Henrique Milaré
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -21,45 +22,47 @@
#include "windef.h"
#pragma code_page(65001)
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
STRINGTABLE DISCARDABLE
{
4 "The specified installation package could not be opened. Please check the file path and try again."
5 "caminho %s não encontrado"
4 "O pacote de instalação especificado não pôde ser aberto. Por favor, verifique o arquivo e tente novamente."
5 "caminho %s não encontrado"
9 "insira disco %s"
10 "Windows Installer %s\n\n" \
"Usage:\n" \
"Modo de usar:\n" \
"msiexec command {required parameter} [optional parammeter]\n\n" \
"Install a product:\n" \
"Instalar um produto:\n" \
"\t/i {package|productcode} [property]\n" \
"\t/package {package|productcode} [property]\n" \
"\t/a package [property]\n" \
"Repair an installation:\n" \
"Reparar uma instalação:\n" \
"\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \
"Uninstall a product:\n" \
"Desinstalar um produto:\n" \
"\t/uninstall {package|productcode} [property]\n" \
"\t/x {package|productcode} [property]\n" \
"Advertise a product:\n" \
"Anunciar um produto:\n" \
"\t/j[u|m] package [/t transform] [/g languageid]\n" \
"Apply a patch:\n" \
"Aplicar um patch:\n" \
"\t/p patchpackage [property]\n" \
"\t/p patchpackage /a package [property]\n" \
"Log and UI Modifiers for above commands:\n" \
"Modificadores Log e UI para os comandos acima:\n" \
"\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \
"\t/q{|n|b|r|f|n+|b+|b-}\n" \
"Register MSI Service:\n" \
"Registrar Serviço MSI:\n" \
"\t/y\n" \
"Unregister MSI Service:\n" \
"Desregistrar Serviço MSI:\n" \
"\t/z\n" \
"Display this help:\n" \
"Mostrar esta ajuda:\n" \
"\t/help\n" \
"\t/?\n"
11 "entre qual pasta contém %s"
12 "instalar fonte para característica faltando"
13 "drive de rede para característica faltando"
14 "característica de:"
15 "escolha qual pasta contém %s"
11 "entre a pasta que contém %s"
12 "faltando fonte de instalação para característica"
13 "faltando drive de rede para característica"
14 "origem da característica:"
15 "escolha a pasta que contém %s"
}
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
@ -67,7 +70,7 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
STRINGTABLE DISCARDABLE
{
4 "The specified installation package could not be opened. Please check the file path and try again."
5 "localização %s não encontrada"
5 "localização %s não encontrada"
9 "insira o disco %s"
10 "Windows Installer %s\n\n" \
"Usage:\n" \
@ -96,9 +99,9 @@ STRINGTABLE DISCARDABLE
"Display this help:\n" \
"\t/help\n" \
"\t/?\n"
11 "indique que pasta contém %s"
12 "instalar fonte para a opção em falta"
13 "controlador de rede para a opção em falta"
14 "opção de:"
15 "indique que pasta contém %s"
11 "indique que pasta contém %s"
12 "instalar fonte para a opção em falta"
13 "controlador de rede para a opção em falta"
14 "opção de:"
15 "indique que pasta contém %s"
}

View file

@ -32,6 +32,7 @@
#include "objbase.h"
#include "objidl.h"
#include "winnls.h"
#include "winver.h"
#include "wine/list.h"
#include "wine/debug.h"
@ -380,7 +381,6 @@ typedef struct tagMSIFEATURE
INSTALLSTATE Action;
struct list Children;
struct list Components;
INT Cost;
} MSIFEATURE;
typedef struct tagMSICOMPONENT
@ -811,6 +811,10 @@ 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 DWORD msi_version_str_to_dword(LPCWSTR p);
extern void msi_parse_version_string(LPCWSTR, PDWORD, PDWORD);
extern VS_FIXEDFILEINFO *msi_get_disk_file_version(LPCWSTR);
extern int msi_compare_file_versions(VS_FIXEDFILEINFO *, const WCHAR *);
extern LONG msi_reg_set_val_str( HKEY hkey, LPCWSTR name, LPCWSTR value );
extern LONG msi_reg_set_val_multi_str( HKEY hkey, LPCWSTR name, LPCWSTR value );
@ -1002,7 +1006,6 @@ extern void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature)
extern UINT register_unique_action(MSIPACKAGE *, LPCWSTR);
extern BOOL check_unique_action(const MSIPACKAGE *, LPCWSTR);
extern WCHAR* generate_error_string(MSIPACKAGE *, UINT, DWORD, ... );
extern UINT msi_create_component_directories( MSIPACKAGE *package );
extern UINT msi_set_last_used_source(LPCWSTR product, LPCWSTR usersid,
MSIINSTALLCONTEXT context, DWORD options, LPCWSTR value);
extern UINT msi_get_local_package_name(LPWSTR path, LPCWSTR suffix);

View file

@ -2742,63 +2742,72 @@ static UINT msi_table_load_transform( MSIDATABASE *db, IStorage *stg,
rec = msi_get_transform_record( tv, st, stg, &rawdata[n], bytes_per_strref );
if (rec)
{
if ( mask & 1 )
WCHAR table[32];
DWORD sz = 32;
UINT number = MSI_NULL_INTEGER;
UINT row = 0;
if (!lstrcmpW( name, szColumns ))
{
WCHAR table[32];
DWORD sz = 32;
UINT number = MSI_NULL_INTEGER;
MSI_RecordGetStringW( rec, 1, table, &sz );
number = MSI_RecordGetInteger( rec, 2 );
TRACE("inserting record\n");
if (!lstrcmpW(name, szColumns))
/*
* Native msi seems writes nul into the Number (2nd) column of
* the _Columns table, only when the columns are from a new table
*/
if ( number == MSI_NULL_INTEGER )
{
MSI_RecordGetStringW( rec, 1, table, &sz );
number = MSI_RecordGetInteger( rec, 2 );
/*
* Native msi seems writes nul into the Number (2nd) column of
* the _Columns table, only when the columns are from a new table
*/
if ( number == MSI_NULL_INTEGER )
/* reset the column number on a new table */
if (lstrcmpW( coltable, table ))
{
/* reset the column number on a new table */
if ( lstrcmpW(coltable, table) )
{
colcol = 0;
lstrcpyW( coltable, table );
}
/* fix nul column numbers */
MSI_RecordSetInteger( rec, 2, ++colcol );
colcol = 0;
lstrcpyW( coltable, table );
}
/* fix nul column numbers */
MSI_RecordSetInteger( rec, 2, ++colcol );
}
r = TABLE_insert_row( &tv->view, rec, -1, FALSE );
if (r != ERROR_SUCCESS)
WARN("insert row failed\n");
if ( number != MSI_NULL_INTEGER && !lstrcmpW(name, szColumns) )
msi_update_table_columns( db, table );
}
else
{
UINT row = 0;
r = msi_table_find_row( tv, rec, &row );
if (r != ERROR_SUCCESS)
WARN("no matching row to transform\n");
else if ( mask )
if (TRACE_ON(msidb)) dump_record( rec );
r = msi_table_find_row( tv, rec, &row );
if (r == ERROR_SUCCESS)
{
if (!mask)
{
TRACE("modifying row [%d]:\n", row);
TABLE_set_row( &tv->view, row, rec, mask );
TRACE("deleting row [%d]:\n", row);
r = TABLE_delete_row( &tv->view, row );
if (r != ERROR_SUCCESS)
WARN("failed to delete row %u\n", r);
}
else if (mask & 1)
{
TRACE("modifying full row [%d]:\n", row);
r = TABLE_set_row( &tv->view, row, rec, (1 << tv->num_cols) - 1 );
if (r != ERROR_SUCCESS)
WARN("failed to modify row %u\n", r);
}
else
{
TRACE("deleting row [%d]:\n", row);
TABLE_delete_row( &tv->view, row );
TRACE("modifying masked row [%d]:\n", row);
r = TABLE_set_row( &tv->view, row, rec, mask );
if (r != ERROR_SUCCESS)
WARN("failed to modify row %u\n", r);
}
}
if( TRACE_ON(msidb) ) dump_record( rec );
else
{
TRACE("inserting row\n");
r = TABLE_insert_row( &tv->view, rec, -1, FALSE );
if (r != ERROR_SUCCESS)
WARN("failed to insert row %u\n", r);
}
if (number != MSI_NULL_INTEGER && !lstrcmpW( name, szColumns ))
msi_update_table_columns( db, table );
msiobj_release( &rec->hdr );
}

View file

@ -397,6 +397,9 @@ static UINT WHERE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
return ERROR_OUTOFMEMORY;
wv->row_count = 0;
if (0) /* disable optimization, there's no guarantee that strings are in the string table */
{
if (wv->cond->type == EXPR_STRCMP)
{
MSIITERHANDLE handle = NULL;
@ -441,6 +444,7 @@ static UINT WHERE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
}
/* else fallback to slow case */
}
}
for( i=0; i<count; i++ )
{

View file

@ -1,5 +1,5 @@
/*
* Copyright 2006 Andras Kovacs
* Copyright 2006-2010 Andras Kovacs
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -18,40 +18,83 @@
#include "resource.h"
/* UTF-8 */
#pragma code_page(65001)
LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
UIINSERTOBJECT DIALOG DISCARDABLE 0, 0, 294, 151
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Objektum beszúrása"
CAPTION "Objektum beszúrása"
FONT 8, "MS Shell Dlg"
BEGIN
LISTBOX IDC_OBJTYPELIST,82,19,131,66,LBS_SORT |
LBS_NOINTEGRALHEIGHT | WS_VISIBLE | WS_VSCROLL |
WS_TABSTOP
LTEXT "Obktum típus:",IDC_OBJTYPELBL,82,7,53,8,WS_VISIBLE
LTEXT "Objektum típus:",IDC_OBJTYPELBL,82,7,53,8,WS_VISIBLE
DEFPUSHBUTTON "OK",IDOK,221,7,66,14
PUSHBUTTON "Mégse",IDCANCEL,221,24,66,14
GROUPBOX "Eredmény",IDC_RESULT,7,103,208,41
CONTROL "Új létrehozása",IDC_CREATENEW,"Button",BS_AUTORADIOBUTTON |
PUSHBUTTON "Mégse",IDCANCEL,221,24,66,14
GROUPBOX "Eredmény",IDC_RESULT,7,103,208,41
CONTROL "Új létrehozása",IDC_CREATENEW,"Button",BS_AUTORADIOBUTTON |
WS_GROUP,7,20,62,10
CONTROL "Vezérlõ létrehozása",IDC_CREATECONTROL,"Button",
CONTROL "Vezérlő létrehozása",IDC_CREATECONTROL,"Button",
BS_AUTORADIOBUTTON | NOT WS_VISIBLE,7,54,62,10
CONTROL "Létrehozás fájlból",IDC_CREATEFROMFILE,"Button",
CONTROL "Létrehozás fájlból",IDC_CREATEFROMFILE,"Button",
BS_AUTORADIOBUTTON,7,37,67,10
LTEXT "",IDC_RESULTDESC,49,112,159,23
PUSHBUTTON "Vezérlõ hozzá&adása...",IDC_ADDCONTROL,81,88,63,14,NOT WS_VISIBLE
CONTROL "Megjelenítés ikonként",IDC_ASICON,"Button",BS_AUTOCHECKBOX |
PUSHBUTTON "Vezérlő hozzá&adása...",IDC_ADDCONTROL,81,88,63,14,NOT WS_VISIBLE
CONTROL "Megjelenítés ikonként",IDC_ASICON,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP | NOT WS_VISIBLE,223,58,64,10
PUSHBUTTON "Tallóz...",IDC_BROWSE,83,53,50,14,NOT WS_VISIBLE
LTEXT "Fájl:",IDC_FILELBL,83,27,20,8, NOT WS_VISIBLE
PUSHBUTTON "Tallózás...",IDC_BROWSE,83,53,50,14,NOT WS_VISIBLE
LTEXT "Fájl:",IDC_FILELBL,83,27,20,8, NOT WS_VISIBLE
EDITTEXT IDC_FILE,83,37,132,13,ES_AUTOHSCROLL | NOT WS_VISIBLE
END
STRINGTABLE DISCARDABLE
{
IDS_RESULTOBJDESC "Új %s objektum behelyezése az Ön dokumentumába"
IDS_RESULTFILEOBJDESC "Kérem illesssze be a fájl tartalmát, mint objektumot a dokumentumába, azzal a programmal amivel létrehozta."
IDS_BROWSE "Tallózás"
IDS_NOTOLEMOD "A fájl úgy tûnik nem egy érvényes OLE modul. Nem tudom regisztrálni az OLE vezérlõt."
IDS_NOTOLEMODCAPTION "Vezérlõ hozzáadása"
IDS_RESULTOBJDESC "Új %s objektum behelyezése az Ön dokumentumába"
IDS_RESULTFILEOBJDESC "Kérem illesssze be a fájl tartalmát, mint objektumot a dokumentumába, azzal a programmal amivel létrehozta."
IDS_BROWSE "Tallózás"
IDS_NOTOLEMOD "A fájl úgy tűnik nem egy érvényes OLE modul. Nem tudom regisztrálni az OLE vezérlőt."
IDS_NOTOLEMODCAPTION "Vezérlő hozzáadása"
}
IDD_PASTESPECIAL4 DIALOG DISCARDABLE 3, 15, 293, 140
STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Speciális beillesztés"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Forrás:", -1, 6, 9, 30, 8, WS_VISIBLE | WS_GROUP
CONTROL "&Beillesztés", IDC_PS_PASTE, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE,
6, 38, 55, 10
CONTROL "Beillesztés &linkként", IDC_PS_PASTELINK, "Button", BS_AUTORADIOBUTTON | WS_VISIBLE,
6, 63, 55, 10
LTEXT "&Mint:", -1, 65, 25, 16, 8, WS_VISIBLE | WS_GROUP
LISTBOX IDC_PS_PASTELIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
LISTBOX IDC_PS_PASTELINKLIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
LISTBOX IDC_PS_DISPLAYLIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | WS_VISIBLE
CONTROL "OK", IDOK, "Button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE, 224, 6, 66, 14
CONTROL "Mégse", IDCANCEL, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 23, 66, 14
CONTROL "&Súgó", IDC_OLEUIHELP, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 42, 66, 14
CONTROL "Megjelenítés i&konként", IDC_PS_DISPLAYASICON, "Button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_VISIBLE, 224, 59, 66, 14
CONTROL "", IDC_PS_ICONDISPLAY, "Static", SS_ICON | WS_VISIBLE, 224, 75, 66, 44
CONTROL "&Ikon megváltoztatása...", IDC_PS_CHANGEICON, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 123, 66, 14
CONTROL "", IDC_PS_RESULTIMAGE, "Static", SS_ICON | WS_VISIBLE, 8, 101, 42, 34
CONTROL "<< eredmény szöveg jön ide >>", IDC_PS_RESULTTEXT, "Static", SS_NOPREFIX | WS_VISIBLE, 54, 100, 159, 35
CONTROL "Eredmény", -1, "Button", BS_GROUPBOX | WS_GROUP | WS_VISIBLE, 6, 90, 212, 48
CONTROL "", IDC_PS_SOURCETEXT, "Edit", ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE, 37, 9, 180, 8
END
STRINGTABLE DISCARDABLE
{
IDS_PS_PASTE_DATA "A vágólap tartalmának beillesztése az Ön dokumentumába mint: %s."
IDS_PS_PASTE_OBJECT "A vágólap tartalmának beillesztése az Ön dokumentumába, amit a következő használatával aktiválhat: %s."
IDS_PS_PASTE_OBJECT_AS_ICON "A vágólap tartalmának beillesztése az Ön dokumentumába, amit a következő használatával aktiválhat: %s. Ikonként fog megjelnni."
IDS_PS_PASTE_LINK_DATA "A vágólap tartalmának beillesztése az Ön dokumentumába mint: %s. Az adat össze van kapcsolva a forrásfájllal, így a fájl módosítása hatással lesz a dokumentumra."
IDS_PS_PASTE_LINK_OBJECT "A vágólap tartalmának képe beillesztése az Ön dokumentumába mint: %s. A kép össze van kapcsolva a forrásfájllal, így a fájl módosítása hatással lesz a dokumentumra."
IDS_PS_PASTE_LINK_OBJECT_AS_ICON "A vágólapra mutató parancsikon beillesztése az Ön dokumentumába mint: %s. A parancsikon össze van kapcsolva a forrásfájllal, így a fájl módosítása hatással lesz a dokumentumra."
IDS_PS_NON_OLE "A vágólap tartalmának beillesztése az Ön dokumentumába."
IDS_PS_UNKNOWN_TYPE "Ismeretlen típus"
IDS_PS_UNKNOWN_SRC "Ismeretlen forrás"
IDS_PS_UNKNOWN_APP "a program ami létrehozta"
}

View file

@ -19,11 +19,14 @@
#include "resource.h"
/* UTF-8 */
#pragma code_page(65001)
LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
UIINSERTOBJECT DIALOG DISCARDABLE 0, 0, 294, 151
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Insersci oggetto"
CAPTION "Inserisci oggetto"
FONT 8, "MS Shell Dlg"
BEGIN
LISTBOX IDC_OBJTYPELIST,82,19,131,66,LBS_SORT |
@ -53,6 +56,46 @@ STRINGTABLE DISCARDABLE
IDS_RESULTOBJDESC "Inserisci un nuovo oggetto %s nel documento"
IDS_RESULTFILEOBJDESC "Inserisci i contenuti del file come un oggetto nel documento in modo da poterlo attivare usando il programma che lo ha creato."
IDS_BROWSE "Esplora"
IDS_NOTOLEMOD "Il file non sembra essere un module OLE valido. Impossibile registrare il controllo OLE."
IDS_NOTOLEMOD "Il file non sembra essere un modulo OLE valido. Impossibile registrare il controllo OLE."
IDS_NOTOLEMODCAPTION "Aggiungi Controllo"
}
IDD_PASTESPECIAL4 DIALOG DISCARDABLE 3, 15, 293, 140
STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Incolla Speciale"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Sorgente:", -1, 6, 9, 30, 8, WS_VISIBLE | WS_GROUP
CONTROL "&Incolla", IDC_PS_PASTE, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE,
6, 38, 55, 10
CONTROL "Incolla &Collegamento", IDC_PS_PASTELINK, "Button", BS_AUTORADIOBUTTON | WS_VISIBLE,
6, 63, 55, 10
LTEXT "&Come:", -1, 65, 25, 16, 8, WS_VISIBLE | WS_GROUP
LISTBOX IDC_PS_PASTELIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
LISTBOX IDC_PS_PASTELINKLIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
LISTBOX IDC_PS_DISPLAYLIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | WS_VISIBLE
CONTROL "OK", IDOK, "Button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE, 224, 6, 66, 14
CONTROL "Annulla", IDCANCEL, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 23, 66, 14
CONTROL "&Aiuto", IDC_OLEUIHELP, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 42, 66, 14
CONTROL "&Mostra come icona", IDC_PS_DISPLAYASICON, "Button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_VISIBLE, 224, 59, 66, 14
CONTROL "", IDC_PS_ICONDISPLAY, "Static", SS_ICON | WS_VISIBLE, 224, 75, 66, 44
CONTROL "Cambia &icona...", IDC_PS_CHANGEICON, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 123, 66, 14
CONTROL "", IDC_PS_RESULTIMAGE, "Static", SS_ICON | WS_VISIBLE, 8, 101, 42, 34
CONTROL "<< testo qua >>", IDC_PS_RESULTTEXT, "Static", SS_NOPREFIX | WS_VISIBLE, 54, 100, 159, 35
CONTROL "Result", -1, "Button", BS_GROUPBOX | WS_GROUP | WS_VISIBLE, 6, 90, 212, 48
CONTROL "", IDC_PS_SOURCETEXT, "Edit", ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE, 37, 9, 180, 8
END
STRINGTABLE DISCARDABLE
{
IDS_PS_PASTE_DATA "Inserisce i contenuti degli appunti nel tuo documento come %s."
IDS_PS_PASTE_OBJECT "Inserisce i contenuti degli appunti nel tuo documento permettendoti di attivarlo usando %s."
IDS_PS_PASTE_OBJECT_AS_ICON "Inserisce i contenuti degli appunti nel tuo documento permettendoti di attivarlo usando %s. Sarà mostrato come un'icona."
IDS_PS_PASTE_LINK_DATA "Inserisce i contenuti degli appunti nel tuo documento come %s. I dati sono collegati al file sorgente in modo che i cambiamenti in quello si riflettano sul tuo documento."
IDS_PS_PASTE_LINK_OBJECT "Inserisce un'immagine degli appunti nel tuo documento. L'immagine è collegata al file sorgente in modo che i cambiamenti in quello si riflettano sul tuo documento."
IDS_PS_PASTE_LINK_OBJECT_AS_ICON "Inserisce una scorciatoia che punta alla locazione dei contenuti degli appunti. La scorciatoia è collegata al file sorgente in modo che i cambiamenti in quello si riflettano sul tuo documento."
IDS_PS_NON_OLE "Inserisce i contenuti degli appunti nel tuo documento."
IDS_PS_UNKNOWN_TYPE "Tipo Sconosciuto"
IDS_PS_UNKNOWN_SRC "Sorgente Sconosciuta"
IDS_PS_UNKNOWN_APP "il programma che lo ha creato"
}

View file

@ -58,3 +58,43 @@ STRINGTABLE DISCARDABLE
IDS_NOTOLEMOD "ファイルは有効なOLEモジュールではないようです。OLEコントロールを登録できません。"
IDS_NOTOLEMODCAPTION "コントロールを追加"
}
IDD_PASTESPECIAL4 DIALOG DISCARDABLE 3, 15, 293, 140
STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "形式を選択して貼り付け"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "コピー元:", -1, 6, 9, 30, 8, WS_VISIBLE | WS_GROUP
CONTROL "貼り付け(&P)", IDC_PS_PASTE, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE,
6, 38, 55, 10
CONTROL "リンク貼り付け(&L)", IDC_PS_PASTELINK, "Button", BS_AUTORADIOBUTTON | WS_VISIBLE,
6, 63, 55, 10
LTEXT "形式(&A):", -1, 65, 25, 16, 8, WS_VISIBLE | WS_GROUP
LISTBOX IDC_PS_PASTELIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
LISTBOX IDC_PS_PASTELINKLIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
LISTBOX IDC_PS_DISPLAYLIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | WS_VISIBLE
CONTROL "OK", IDOK, "Button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE, 224, 6, 66, 14
CONTROL "キャンセル", IDCANCEL, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 23, 66, 14
CONTROL "ヘルプ(&H)", IDC_OLEUIHELP, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 42, 66, 14
CONTROL "アイコンとして表示(&D)", IDC_PS_DISPLAYASICON, "Button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_VISIBLE, 224, 59, 66, 14
CONTROL "", IDC_PS_ICONDISPLAY, "Static", SS_ICON | WS_VISIBLE, 224, 75, 66, 44
CONTROL "アイコンの変更(&I)...", IDC_PS_CHANGEICON, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 123, 66, 14
CONTROL "", IDC_PS_RESULTIMAGE, "Static", SS_ICON | WS_VISIBLE, 8, 101, 42, 34
CONTROL "<< result text goes here >>", IDC_PS_RESULTTEXT, "Static", SS_NOPREFIX | WS_VISIBLE, 54, 100, 159, 35
CONTROL "結果", -1, "Button", BS_GROUPBOX | WS_GROUP | WS_VISIBLE, 6, 90, 212, 48
CONTROL "", IDC_PS_SOURCETEXT, "Edit", ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE, 37, 9, 180, 8
END
STRINGTABLE DISCARDABLE
{
IDS_PS_PASTE_DATA "クリップボードの内容を %s として、文書に挿入します。"
IDS_PS_PASTE_OBJECT "クリップボードの内容を文書に挿入します。 %s を利用して、編集できます。"
IDS_PS_PASTE_OBJECT_AS_ICON "クリップボードの内容を文書に挿入します。 %s を利用して、編集できます。アイコンとして表示されます。"
IDS_PS_PASTE_LINK_DATA "クリップボードの内容を %s として、文書に挿入します。データは元のファイルとリンクしているため、元のファイルへの変更はこの文書に反映されます。"
IDS_PS_PASTE_LINK_OBJECT "クリップボードの内容を示す絵を文書に挿入します。絵は元のファイルとリンクしているため、元のファイルへの変更はこの文書に反映されます。"
IDS_PS_PASTE_LINK_OBJECT_AS_ICON "クリップボードの内容の場所を指すショートカットを挿入します。ショートカットは元のファイルとリンクしているため、元のファイルへの変更はこの文書に反映されます。"
IDS_PS_NON_OLE "クリップボードの内容を挿入します。"
IDS_PS_UNKNOWN_TYPE "不明な形式"
IDS_PS_UNKNOWN_SRC "不明"
IDS_PS_UNKNOWN_APP "作成プログラム"
}

View file

@ -1,5 +1,6 @@
/*
* Copyright 2005,2007 YunSong Hwang
* Copyright 2003 Ulrich Czekalla for CodeWeavers
* Copyright 2005,2007,2010 YunSong Hwang
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -56,7 +57,7 @@ STRINGTABLE DISCARDABLE
IDS_NOTOLEMODCAPTION "컨트롤 더하기"
}
IDD_PASTESPECIAL4 DIALOG DISCARDABLE 3, 15, 293, 140
IDD_PASTESPECIAL4 DIALOG DISCARDABLE 3, 15, 299, 140
STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "특별하게 붙여넣기"
FONT 9, "MS Shell Dlg"
@ -66,14 +67,14 @@ BEGIN
1, 44, 55, 10
CONTROL "링크로 붙여넣기(&L)", IDC_PS_PASTELINK, "Button", BS_AUTORADIOBUTTON | WS_VISIBLE,
1, 61, 69, 10
LTEXT "다른 이름으로(&A):", -1, 67, 25, 53, 8, WS_VISIBLE | WS_GROUP
LISTBOX IDC_PS_PASTELIST, 66, 36, 150, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
LISTBOX IDC_PS_PASTELINKLIST, 66, 36, 150, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
LISTBOX IDC_PS_DISPLAYLIST, 66, 36, 150, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | WS_VISIBLE
CONTROL "확인", IDOK, "Button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE, 224, 6, 66, 14
CONTROL "취소", IDCANCEL, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 23, 66, 14
CONTROL "도움말(&H)", IDC_OLEUIHELP, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 42, 66, 14
CONTROL "아이콘으로 보기(&D)", IDC_PS_DISPLAYASICON, "Button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_VISIBLE, 224, 59, 66, 14
LTEXT "다른 이름으로(&A):", -1, 73, 25, 59, 8, WS_VISIBLE | WS_GROUP
LISTBOX IDC_PS_PASTELIST, 73, 36, 150, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
LISTBOX IDC_PS_PASTELINKLIST, 73, 36, 150, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
LISTBOX IDC_PS_DISPLAYLIST, 73, 36, 150, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | WS_VISIBLE
CONTROL "확인", IDOK, "Button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE, 226, 6, 66, 14
CONTROL "취소", IDCANCEL, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 226, 23, 66, 14
CONTROL "도움말(&H)", IDC_OLEUIHELP, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 226, 42, 66, 14
CONTROL "아이콘으로 보기(&D)", IDC_PS_DISPLAYASICON, "Button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_VISIBLE, 226, 59, 70, 14
CONTROL "", IDC_PS_ICONDISPLAY, "Static", SS_ICON | WS_VISIBLE, 224, 75, 66, 44
CONTROL "아이콘 바꾸기(&I)...", IDC_PS_CHANGEICON, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 123, 66, 14
CONTROL "", IDC_PS_RESULTIMAGE, "Static", SS_ICON | WS_VISIBLE, 8, 101, 42, 34
@ -93,5 +94,5 @@ STRINGTABLE DISCARDABLE
IDS_PS_NON_OLE "당신의 문서에 클립보드의 내용 삽입하기."
IDS_PS_UNKNOWN_TYPE "알수 없는 형식"
IDS_PS_UNKNOWN_SRC "알수 없는 원본"
IDS_PS_UNKNOWN_APP "이 프로그램은 알 수 없는 프로그램으로 만들어졌습니다"
IDS_PS_UNKNOWN_APP "내가 만든 프로그램"
}

View file

@ -22,6 +22,8 @@
LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL
#pragma code_page(65001)
UIINSERTOBJECT DIALOG DISCARDABLE 0, 0, 294, 151
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Object invoegen"
@ -36,12 +38,12 @@ BEGIN
GROUPBOX "Resultaat",IDC_RESULT,7,103,208,41
CONTROL "Nieuw",IDC_CREATENEW,"Button",BS_AUTORADIOBUTTON |
WS_GROUP,7,20,62,10
CONTROL "Creëren",IDC_CREATECONTROL,"Button",
CONTROL "Creëren",IDC_CREATECONTROL,"Button",
BS_AUTORADIOBUTTON | NOT WS_VISIBLE,7,54,62,10
CONTROL "Bestand gebruiken",IDC_CREATEFROMFILE,"Button",
BS_AUTORADIOBUTTON,7,37,67,10
LTEXT "",IDC_RESULTDESC,49,112,159,23
PUSHBUTTON "Toevoegen...",IDC_ADDCONTROL,81,88,63,14,NOT WS_VISIBLE
PUSHBUTTON "&Toevoegen...",IDC_ADDCONTROL,81,88,63,14,NOT WS_VISIBLE
CONTROL "Als pictogram weergeven",IDC_ASICON,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP | NOT WS_VISIBLE,223,58,64,10
PUSHBUTTON "Bladeren...",IDC_BROWSE,83,53,50,14,NOT WS_VISIBLE
@ -51,10 +53,10 @@ END
STRINGTABLE DISCARDABLE
{
IDS_RESULTOBJDESC "Voeg een nieuw %s object in uw document"
IDS_RESULTFILEOBJDESC "Voeg de inhoud van het bestand als object in uw document zodat u het later kunt bewerken met het programma waarmee u het heeft gemaakt."
IDS_RESULTOBJDESC "Voeg een nieuw %s object in uw document in"
IDS_RESULTFILEOBJDESC "Voeg de inhoud van het bestand als object in uw document in, zodat u het later kunt bewerken met het programma waarmee u het heeft gemaakt."
IDS_BROWSE "Bladeren"
IDS_NOTOLEMOD "Het bestand is geen geldig OLE bestand. Registratie is mislukt."
IDS_NOTOLEMOD "Het bestand is geen geldig OLE bestand. De registratie is mislukt."
IDS_NOTOLEMODCAPTION "Toevoegen"
}
@ -66,7 +68,7 @@ BEGIN
LTEXT "Bron:", -1, 6, 9, 30, 8, WS_VISIBLE | WS_GROUP
CONTROL "&Plakken", IDC_PS_PASTE, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE,
6, 38, 55, 10
CONTROL "Plakken &Verwijzing", IDC_PS_PASTELINK, "Button", BS_AUTORADIOBUTTON | WS_VISIBLE,
CONTROL "Plak &verwijzing", IDC_PS_PASTELINK, "Button", BS_AUTORADIOBUTTON | WS_VISIBLE,
6, 63, 55, 10
LTEXT "&Als:", -1, 65, 25, 16, 8, WS_VISIBLE | WS_GROUP
LISTBOX IDC_PS_PASTELIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
@ -75,25 +77,25 @@ BEGIN
CONTROL "OK", IDOK, "Button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE, 224, 6, 66, 14
CONTROL "Annuleren", IDCANCEL, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 23, 66, 14
CONTROL "&Help", IDC_OLEUIHELP, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 42, 66, 14
CONTROL "&Toon Als Icoon", IDC_PS_DISPLAYASICON, "Button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_VISIBLE, 224, 59, 66, 14
CONTROL "Als pictogram &weergeven", IDC_PS_DISPLAYASICON, "Button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_VISIBLE, 224, 59, 66, 14
CONTROL "", IDC_PS_ICONDISPLAY, "Static", SS_ICON | WS_VISIBLE, 224, 75, 66, 44
CONTROL "Verander &Icoon...", IDC_PS_CHANGEICON, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 123, 66, 14
CONTROL "Wijzig p&ictogram...", IDC_PS_CHANGEICON, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 123, 66, 14
CONTROL "", IDC_PS_RESULTIMAGE, "Static", SS_ICON | WS_VISIBLE, 8, 101, 42, 34
CONTROL "<< resultaat tekst komt hier >>", IDC_PS_RESULTTEXT, "Static", SS_NOPREFIX | WS_VISIBLE, 54, 100, 159, 35
CONTROL "<< resultaattekst komt hier >>", IDC_PS_RESULTTEXT, "Static", SS_NOPREFIX | WS_VISIBLE, 54, 100, 159, 35
CONTROL "Resultaat", -1, "Button", BS_GROUPBOX | WS_GROUP | WS_VISIBLE, 6, 90, 212, 48
CONTROL "", IDC_PS_SOURCETEXT, "Edit", ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE, 37, 9, 180, 8
END
STRINGTABLE DISCARDABLE
{
IDS_PS_PASTE_DATA "Voegt de inhoud van het clipbord in uw document als %s."
IDS_PS_PASTE_OBJECT "Voegt de inhoud van het clipbord in uw document zodat u het kan activeren met %s."
IDS_PS_PASTE_OBJECT_AS_ICON "Voegt de inhoud van het clipbord in uw document zodat u het kan activeren met %s. Het zal getoond worden als een icoon."
IDS_PS_PASTE_LINK_DATA "Voegt de inhoud van het clipbord in uw document als %s. De data is verbonden met het bron bestand zodat wijzigingen in dat bestand worden getoond in uw document."
IDS_PS_PASTE_LINK_OBJECT "Voegt een afbeelding vanuit het clipbord in uw document. De afbeelding is verbonden met het bron bestand zodat wijzigingen in dat bestand worden getoond in uw document."
IDS_PS_PASTE_LINK_OBJECT_AS_ICON "Voegt een verwijzing in die wijst naar de locatie van de inhoud van het clipbord. De verwijzing is verbonden met het bron bestand zodat wijzigingen in dat bestand worden getoond in uw document."
IDS_PS_NON_OLE "Voegt de inhoud van het clipbord in uw document."
IDS_PS_UNKNOWN_TYPE "Onbekend Type"
IDS_PS_UNKNOWN_SRC "Onbekende Bron"
IDS_PS_UNKNOWN_APP "het programma die het gecreëerd heeft"
IDS_PS_PASTE_DATA "Voegt de inhoud van het klembord in uw document in als %s."
IDS_PS_PASTE_OBJECT "Voegt de inhoud van het klembord in uw document in zodat u het kan activeren met %s."
IDS_PS_PASTE_OBJECT_AS_ICON "Voegt de inhoud van het klembord in uw document in zodat u het kan activeren met %s. Het zal getoond worden als een icoon."
IDS_PS_PASTE_LINK_DATA "Voegt de inhoud van het klembord in uw document in als %s. De data is verbonden met het bron bestand zodat wijzigingen in dat bestand worden getoond in uw document."
IDS_PS_PASTE_LINK_OBJECT "Voegt een afbeelding vanuit het klembord in uw document in. De afbeelding is verbonden met het bronbestand, zodat wijzigingen in dat bestand worden getoond in uw document."
IDS_PS_PASTE_LINK_OBJECT_AS_ICON "Voegt een verwijzing in die wijst naar de locatie van de inhoud van het klembord. De verwijzing is verbonden met het bronbestand, zodat wijzigingen in dat bestand worden getoond in uw document."
IDS_PS_NON_OLE "Voegt de inhoud van het klembord in uw document."
IDS_PS_UNKNOWN_TYPE "Onbekend type"
IDS_PS_UNKNOWN_SRC "Onbekende bron"
IDS_PS_UNKNOWN_APP "het programma die het gecreëerd heeft"
}

View file

@ -2,6 +2,7 @@
* Copyright 2004 Marcelo Duarte
* Copyright 2006 Américo José Melo
* Copyright 2009 Ricardo Filipe
* Copyright 2010 Gustavo Henrique Milaré
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -103,6 +104,37 @@ STRINGTABLE DISCARDABLE
IDS_NOTOLEMODCAPTION "Adicionar Controlo"
}
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
IDD_PASTESPECIAL4 DIALOG DISCARDABLE 3, 15, 293, 140
STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Colar Especial"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Origem:", -1, 6, 9, 30, 8, WS_VISIBLE | WS_GROUP
CONTROL "&Colar", IDC_PS_PASTE, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE,
6, 38, 55, 10
CONTROL "Colar &Link", IDC_PS_PASTELINK, "Button", BS_AUTORADIOBUTTON | WS_VISIBLE,
6, 63, 55, 10
LTEXT "&Como:", -1, 65, 25, 16, 8, WS_VISIBLE | WS_GROUP
LISTBOX IDC_PS_PASTELIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
LISTBOX IDC_PS_PASTELINKLIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
LISTBOX IDC_PS_DISPLAYLIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | WS_VISIBLE
CONTROL "OK", IDOK, "Button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE, 224, 6, 66, 14
CONTROL "Cancelar", IDCANCEL, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 23, 66, 14
CONTROL "&Ajuda", IDC_OLEUIHELP, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 42, 66, 14
CONTROL "&Mostrar como Ícone", IDC_PS_DISPLAYASICON, "Button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_VISIBLE, 224, 59, 66, 14
CONTROL "", IDC_PS_ICONDISPLAY, "Static", SS_ICON | WS_VISIBLE, 224, 75, 66, 44
CONTROL "Mudar &Ícone...", IDC_PS_CHANGEICON, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 123, 66, 14
CONTROL "", IDC_PS_RESULTIMAGE, "Static", SS_ICON | WS_VISIBLE, 8, 101, 42, 34
CONTROL "<< texto resultante fica aqui >>", IDC_PS_RESULTTEXT, "Static", SS_NOPREFIX | WS_VISIBLE, 54, 100, 159, 35
CONTROL "Resultado", -1, "Button", BS_GROUPBOX | WS_GROUP | WS_VISIBLE, 6, 90, 212, 48
CONTROL "", IDC_PS_SOURCETEXT, "Edit", ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE, 37, 9, 180, 8
END
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
IDD_PASTESPECIAL4 DIALOG DISCARDABLE 3, 15, 293, 140
STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Colar Especial"
@ -120,15 +152,34 @@ BEGIN
CONTROL "OK", IDOK, "Button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE, 224, 6, 66, 14
CONTROL "Cancelar", IDCANCEL, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 23, 66, 14
CONTROL "&Ajuda", IDC_OLEUIHELP, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 42, 66, 14
CONTROL "&Mostrar como Icone", IDC_PS_DISPLAYASICON, "Button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_VISIBLE, 224, 59, 66, 14
CONTROL "&Mostrar como Ícone", IDC_PS_DISPLAYASICON, "Button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_VISIBLE, 224, 59, 66, 14
CONTROL "", IDC_PS_ICONDISPLAY, "Static", SS_ICON | WS_VISIBLE, 224, 75, 66, 44
CONTROL "Mudar &Icone...", IDC_PS_CHANGEICON, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 123, 66, 14
CONTROL "Mudar &Ícone...", IDC_PS_CHANGEICON, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 123, 66, 14
CONTROL "", IDC_PS_RESULTIMAGE, "Static", SS_ICON | WS_VISIBLE, 8, 101, 42, 34
CONTROL "<< texto resultante fica aqui >>", IDC_PS_RESULTTEXT, "Static", SS_NOPREFIX | WS_VISIBLE, 54, 100, 159, 35
CONTROL "Resultado", -1, "Button", BS_GROUPBOX | WS_GROUP | WS_VISIBLE, 6, 90, 212, 48
CONTROL "", IDC_PS_SOURCETEXT, "Edit", ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE, 37, 9, 180, 8
END
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
STRINGTABLE DISCARDABLE
{
IDS_PS_PASTE_DATA "Insere o conteúdo da área de transferência no seu documento como %s."
IDS_PS_PASTE_OBJECT "Insere o conteúdo da área de transferência no seu documento para que seja possível ativá-lo usando %s."
IDS_PS_PASTE_OBJECT_AS_ICON "Insere o conteúdo da área de transferência no seu documento para que seja possível ativá-lo usando %s. Será mostrado como um ícone."
IDS_PS_PASTE_LINK_DATA "Insere o conteúdo da área de transferência no seu documento como %s. Os dados estão ligados ao arquivo de origem para que alterações ao arquivo se reflitam no seu documento."
IDS_PS_PASTE_LINK_OBJECT "Insere uma imagem da área de transferência no seu documento. A imagem fica ligada ao arquivo de origem para que alterações ao arquivo se reflitam no seu documento."
IDS_PS_PASTE_LINK_OBJECT_AS_ICON "Insere um atalho que aponta para a localização do conteúdo na área de transferência. O atalho fica ligado ao arquivo de origem para que alterações ao arquivo se reflitam no seu documento."
IDS_PS_NON_OLE "Insere o conteúdo da área de transferência no seu documento."
IDS_PS_UNKNOWN_TYPE "Tipo Desconhecido"
IDS_PS_UNKNOWN_SRC "Origem Desconhecida"
IDS_PS_UNKNOWN_APP "o programa que o criou"
}
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
STRINGTABLE DISCARDABLE
{
IDS_PS_PASTE_DATA "Insere o conteúdo da área de transferência no seu documento como %s."

View file

@ -0,0 +1,101 @@
/*
* Copyright 2003 Ulrich Czekalla for CodeWeavers
* Copyright 2010 Claudia Cotună
* Michael Stefaniuc
*
* 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
*/
#include "resource.h"
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
#pragma code_page(65001)
UIINSERTOBJECT DIALOG DISCARDABLE 0, 0, 314, 151
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Inserare obiect"
FONT 8, "MS Shell Dlg"
BEGIN
LISTBOX IDC_OBJTYPELIST,82,19,131,66,LBS_SORT |
LBS_NOINTEGRALHEIGHT | WS_VISIBLE | WS_VSCROLL |
WS_TABSTOP
LTEXT "Tipul obiectului:",IDC_OBJTYPELBL,82,7,53,8,WS_VISIBLE
DEFPUSHBUTTON "OK",IDOK,221,7,66,14
PUSHBUTTON "Renunță",IDCANCEL,221,24,66,14
GROUPBOX "Rezultat",IDC_RESULT,7,103,208,41
CONTROL "Creează nou",IDC_CREATENEW,"Button",BS_AUTORADIOBUTTON |
WS_GROUP,7,20,67,10
CONTROL "Creează un control",IDC_CREATECONTROL,"Button",
BS_AUTORADIOBUTTON | NOT WS_VISIBLE,7,54,74,10
CONTROL "Creează din fișier",IDC_CREATEFROMFILE,"Button",
BS_AUTORADIOBUTTON,7,37,67,10
LTEXT "",IDC_RESULTDESC,49,112,159,23
PUSHBUTTON "&Adăugă un control...",IDC_ADDCONTROL,82,88,72,14,NOT WS_VISIBLE
CONTROL "Afișează ca pictogramă",IDC_ASICON,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP | NOT WS_VISIBLE,223,58,86,10
PUSHBUTTON "Navigare...",IDC_BROWSE,83,53,50,14,NOT WS_VISIBLE
LTEXT "Fișier:",IDC_FILELBL,83,27,20,8, NOT WS_VISIBLE
EDITTEXT IDC_FILE,83,37,132,13,ES_AUTOHSCROLL | NOT WS_VISIBLE
END
STRINGTABLE DISCARDABLE
{
IDS_RESULTOBJDESC "Inserați un nou obiect %s în document"
IDS_RESULTFILEOBJDESC "Inserați conținutul fișierului ca pe un obiect în document, astfel încât să îl puteți activa utilizând programul care l-a creat."
IDS_BROWSE "Navigare"
IDS_NOTOLEMOD "Fișierul nu pare a fi un modul OLE valid. Nu se poate înregistra controlul OLE."
IDS_NOTOLEMODCAPTION "Adaugă un control"
}
IDD_PASTESPECIAL4 DIALOG DISCARDABLE 3, 15, 324, 140
STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Inserare specială"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Sursă:", -1, 6, 9, 30, 8, WS_VISIBLE | WS_GROUP
CONTROL "I&nserează", IDC_PS_PASTE, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE,
6, 38, 55, 10
CONTROL "Inserează &legătura", IDC_PS_PASTELINK, "Button", BS_AUTORADIOBUTTON | WS_VISIBLE,
6, 63, 74, 10
LTEXT "C&a:", -1, 81, 25, 16, 8, WS_VISIBLE | WS_GROUP
LISTBOX IDC_PS_PASTELIST, 81, 36, 148, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
LISTBOX IDC_PS_PASTELINKLIST, 81, 36, 148, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
LISTBOX IDC_PS_DISPLAYLIST, 81, 36, 148, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | WS_VISIBLE
CONTROL "OK", IDOK, "Button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE, 235, 6, 86, 14
CONTROL "Renunță", IDCANCEL, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 235, 23, 86, 14
CONTROL "A&jutor", IDC_OLEUIHELP, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 235, 42, 86, 14
CONTROL "A&fișează ca pictogramă", IDC_PS_DISPLAYASICON, "Button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_VISIBLE, 235, 59, 86, 14
CONTROL "", IDC_PS_ICONDISPLAY, "Static", SS_ICON | WS_VISIBLE, 235, 75, 66, 44
CONTROL "Schimbare p&ictogramă...", IDC_PS_CHANGEICON, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 235, 123, 82, 14
CONTROL "", IDC_PS_RESULTIMAGE, "Static", SS_ICON | WS_VISIBLE, 8, 101, 42, 34
CONTROL "<< textul rezultat apare aici >>", IDC_PS_RESULTTEXT, "Static", SS_NOPREFIX | WS_VISIBLE, 65, 100, 159, 35
CONTROL "Rezultat", -1, "Button", BS_GROUPBOX | WS_GROUP | WS_VISIBLE, 6, 90, 223, 48
CONTROL "", IDC_PS_SOURCETEXT, "Edit", ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE, 37, 9, 180, 8
END
STRINGTABLE DISCARDABLE
{
IDS_PS_PASTE_DATA "Inserează conținutul din clipboard în document ca %s."
IDS_PS_PASTE_OBJECT "Inserează conținutul din clipboard în document astfel încât să îl puteți activa utilizând %s."
IDS_PS_PASTE_OBJECT_AS_ICON "Inserează conținutul din clipboard în document astfel încât să îl puteți activa utilizând %s. Va fi afișat ca o pictogramă."
IDS_PS_PASTE_LINK_DATA "Inserează conținutul din clipboard în document ca %s. Datele sunt legate de fișierul sursă, astfel încât modificările aduse fișierului vor fi reflectate în document."
IDS_PS_PASTE_LINK_OBJECT "Inserează o imagine a conținutului din clipboard în document. Imaginea este legată de fișierul sursă, astfel încât modificările aduse fișierului vor fi reflectate în document."
IDS_PS_PASTE_LINK_OBJECT_AS_ICON "Inserează o scurtătură care conduce la locația conținutului din clipboard. Scurtătura este legată de fișierul sursă, astfel încât modificările aduse fișierului vor fi reflectate în document."
IDS_PS_NON_OLE "Inserează conținutul din clipboard în document."
IDS_PS_UNKNOWN_TYPE "Tip necunoscut"
IDS_PS_UNKNOWN_SRC "Sursă necunoscută"
IDS_PS_UNKNOWN_APP "programul care l-a creat"
}

View file

@ -43,7 +43,7 @@ BEGIN
BS_AUTORADIOBUTTON,7,37,67,10
LTEXT "",IDC_RESULTDESC,49,112,159,23
PUSHBUTTON "&Добавить элемент управления...",IDC_ADDCONTROL,81,88,63,14,NOT WS_VISIBLE
CONTROL "Display As Icon",IDC_ASICON,"Button",BS_AUTOCHECKBOX |
CONTROL "Показывать как значок",IDC_ASICON,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP | NOT WS_VISIBLE,223,58,64,10
PUSHBUTTON "Выбрать...",IDC_BROWSE,83,53,50,14,NOT WS_VISIBLE
LTEXT "Файл:",IDC_FILELBL,83,27,20,8, NOT WS_VISIBLE

View file

@ -1,45 +1,100 @@
/*
* PROJECT: OLE User Interface Support
* LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/win32/oledlg/oledlg_Uk.rc
* PURPOSE: Ukraianian resource file for oledlg
* TRANSLATOR: Artem Reznikov
* Copyright 2007 Artem Reznikov
*
* 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
*/
#include "resource.h"
/* UTF-8 */
#pragma code_page(65001)
LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
UIINSERTOBJECT DIALOG DISCARDABLE 0, 0, 294, 151
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Âñòàâêà îá'ºêòà"
CAPTION "Вставка об'єкта"
FONT 8, "MS Shell Dlg"
BEGIN
LISTBOX IDC_OBJTYPELIST,82,19,131,66,LBS_SORT |
LBS_NOINTEGRALHEIGHT | WS_VISIBLE | WS_VSCROLL |
WS_TABSTOP
LTEXT "Òèï îá'ºêòà:",IDC_OBJTYPELBL,82,7,53,8,WS_VISIBLE
LTEXT "Тип об'єкта:",IDC_OBJTYPELBL,82,7,53,8,WS_VISIBLE
DEFPUSHBUTTON "OK",IDOK,221,7,66,14
PUSHBUTTON "Ñêàñóâàòè",IDCANCEL,221,24,66,14
GROUPBOX "Ðåçóëüòàò",IDC_RESULT,7,103,208,41
CONTROL "Ñòâîðèòè íîâèé",IDC_CREATENEW,"Button",BS_AUTORADIOBUTTON |
PUSHBUTTON "Скасувати",IDCANCEL,221,24,66,14
GROUPBOX "Результат",IDC_RESULT,7,103,208,41
CONTROL "Створити новий",IDC_CREATENEW,"Button",BS_AUTORADIOBUTTON |
WS_GROUP,7,20,62,10
CONTROL "Ñòâîðèòè åëåìåíò óïðàâë³ííÿ",IDC_CREATECONTROL,"Button",
CONTROL "Створити елемент управління",IDC_CREATECONTROL,"Button",
BS_AUTORADIOBUTTON | NOT WS_VISIBLE,7,54,62,10
CONTROL "Ñòâîðèòè ç ôàéëà",IDC_CREATEFROMFILE,"Button",
CONTROL "Створити з файла",IDC_CREATEFROMFILE,"Button",
BS_AUTORADIOBUTTON,7,37,67,10
LTEXT "",IDC_RESULTDESC,49,112,159,23
PUSHBUTTON "&Äîäàòè åëåìåíò óïðàâë³ííÿ...",IDC_ADDCONTROL,81,88,63,14,NOT WS_VISIBLE
CONTROL "Ó âèãëÿä³ çíà÷êà",IDC_ASICON,"Button",BS_AUTOCHECKBOX |
PUSHBUTTON "&Додати елемент управління...",IDC_ADDCONTROL,81,88,63,14,NOT WS_VISIBLE
CONTROL "У вигляді значка",IDC_ASICON,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP | NOT WS_VISIBLE,223,58,64,10
PUSHBUTTON "Îãëÿä...",IDC_BROWSE,83,53,50,14,NOT WS_VISIBLE
LTEXT "Ôàéë:",IDC_FILELBL,83,27,20,8, NOT WS_VISIBLE
PUSHBUTTON "Огляд...",IDC_BROWSE,83,53,50,14,NOT WS_VISIBLE
LTEXT "Файл:",IDC_FILELBL,83,27,20,8, NOT WS_VISIBLE
EDITTEXT IDC_FILE,83,37,132,13,ES_AUTOHSCROLL | NOT WS_VISIBLE
END
STRINGTABLE DISCARDABLE
{
IDS_RESULTOBJDESC "Âñòàâêà â äîêóìåíò íîâîãî îá'ºêòà òèïó %s"
IDS_RESULTFILEOBJDESC "Âñòàâêà â äîêóìåíò âì³ñòó ôàéëà ó âèãëÿä³ îá'ºêòà, ùî àêòèâ³çóºòüñÿ çà äîïîìîãîþ ïðîãðàìè, ùî ñòâîðèëà éîãî."
IDS_BROWSE "Îãëÿä"
IDS_NOTOLEMOD "Ôàéë íå º ìîäóëåì óïðàâë³ííÿ OLE. Íå âäàºòüñÿ çàðåºñòðóâàòè åëåìåíò óïðàâë³ííÿ OLE."
IDS_NOTOLEMODCAPTION "Äîäàòè åëåìåíò óïðàâë³ííÿ"
IDS_RESULTOBJDESC "Вставка в документ нового об'єкта типу %s"
IDS_RESULTFILEOBJDESC "Вставка в документ вмісту файла у вигляді об'єкта, що активізується за допомогою програми, що створила його."
IDS_BROWSE "Огляд"
IDS_NOTOLEMOD "Файл не є модулем управління OLE. Не вдається зареєструвати елемент управління OLE."
IDS_NOTOLEMODCAPTION "Додати елемент управління"
}
IDD_PASTESPECIAL4 DIALOG DISCARDABLE 3, 15, 293, 140
STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Спеціальна вставка"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Джерело:", -1, 6, 9, 30, 8, WS_VISIBLE | WS_GROUP
CONTROL "Вст&авити", IDC_PS_PASTE, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE,
6, 38, 55, 10
CONTROL "&Зв'язати", IDC_PS_PASTELINK, "Button", BS_AUTORADIOBUTTON | WS_VISIBLE,
6, 63, 55, 10
LTEXT "&Як:", -1, 65, 25, 16, 8, WS_VISIBLE | WS_GROUP
LISTBOX IDC_PS_PASTELIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
LISTBOX IDC_PS_PASTELINKLIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | NOT WS_VISIBLE
LISTBOX IDC_PS_DISPLAYLIST, 65, 36, 153, 57, LBS_NOTIFY | LBS_USETABSTOPS | WS_VSCROLL | WS_BORDER | WS_VISIBLE
CONTROL "OK", IDOK, "Button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_GROUP | WS_VISIBLE, 224, 6, 66, 14
CONTROL "Скасувати", IDCANCEL, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 23, 66, 14
CONTROL "&Довідка", IDC_OLEUIHELP, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 42, 66, 14
CONTROL "&У вигляді значка", IDC_PS_DISPLAYASICON, "Button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_VISIBLE, 224, 59, 66, 14
CONTROL "", IDC_PS_ICONDISPLAY, "Static", SS_ICON | WS_VISIBLE, 224, 75, 66, 44
CONTROL "З&мінити значок...", IDC_PS_CHANGEICON, "Button", BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE, 224, 123, 66, 14
CONTROL "", IDC_PS_RESULTIMAGE, "Static", SS_ICON | WS_VISIBLE, 8, 101, 42, 34
CONTROL "<< result text goes here >>", IDC_PS_RESULTTEXT, "Static", SS_NOPREFIX | WS_VISIBLE, 54, 100, 159, 35
CONTROL "Результат", -1, "Button", BS_GROUPBOX | WS_GROUP | WS_VISIBLE, 6, 90, 212, 48
CONTROL "", IDC_PS_SOURCETEXT, "Edit", ES_READONLY | ES_AUTOHSCROLL | WS_VISIBLE, 37, 9, 180, 8
END
STRINGTABLE DISCARDABLE
{
IDS_PS_PASTE_DATA "Вставка до документа вмісту буфера у форматі: %s."
IDS_PS_PASTE_OBJECT "Вставка до документа вмісту буфера, що дає змогу активувати об'єкт за допомогою %s."
IDS_PS_PASTE_OBJECT_AS_ICON "Вставка до документа вмісту буфера, що дає змогу активувати об'єкт за допомогою %s. Об'єкт буде показано як значок."
IDS_PS_PASTE_LINK_DATA "Вставка до документа вмісту буфера у форматі: %s. Дані будуть зв'язані з вихідним файлом, що дасть змогу відображувати в документі внесені зміни."
IDS_PS_PASTE_LINK_OBJECT "Вставка до документа зображення вмісту буфера. Зображення буде зв'язане з вихідним файлом, що дасть змогу відображувати в документі внесені зміни."
IDS_PS_PASTE_LINK_OBJECT_AS_ICON "Вставка до документа ярлика, який указує на джерело вмісту буфера. Ярлик буде зв'язаний із вихідним файлом, що дасть змогу відображувати в документі внесені зміни."
IDS_PS_NON_OLE "Вставка вмісту буфера до документа."
IDS_PS_UNKNOWN_TYPE "Невідомий тип"
IDS_PS_UNKNOWN_SRC "Невідоме джерело"
IDS_PS_UNKNOWN_APP "програми, яка його створила"
}

View file

@ -1,65 +0,0 @@
Index: oledlg_Uk.rc
===================================================================
--- oledlg_Uk.rc (revision 25690)
+++ oledlg_Uk.rc (working copy)
@@ -0,0 +1,45 @@
+/*
+ * PROJECT: OLE User Interface Support
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: dll/win32/oledlg/oledlg_Uk.rc
+ * PURPOSE: Ukraianian resource file for oledlg
+ * TRANSLATOR: Artem Reznikov
+ */
+
+LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
+
+UIINSERTOBJECT DIALOG DISCARDABLE 0, 0, 294, 151
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Âñòàâêà îá'ºêòà"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LISTBOX IDC_OBJTYPELIST,82,19,131,66,LBS_SORT |
+ LBS_NOINTEGRALHEIGHT | WS_VISIBLE | WS_VSCROLL |
+ WS_TABSTOP
+ LTEXT "Òèï îá'ºêòà:",IDC_OBJTYPELBL,82,7,53,8,WS_VISIBLE
+ DEFPUSHBUTTON "OK",IDOK,221,7,66,14
+ PUSHBUTTON "Ñêàñóâàòè",IDCANCEL,221,24,66,14
+ GROUPBOX "Ðåçóëüòàò",IDC_RESULT,7,103,208,41
+ CONTROL "Ñòâîðèòè íîâèé",IDC_CREATENEW,"Button",BS_AUTORADIOBUTTON |
+ WS_GROUP,7,20,62,10
+ CONTROL "Ñòâîðèòè åëåìåíò óïðàâë³ííÿ",IDC_CREATECONTROL,"Button",
+ BS_AUTORADIOBUTTON | NOT WS_VISIBLE,7,54,62,10
+ CONTROL "Ñòâîðèòè ç ôàéëà",IDC_CREATEFROMFILE,"Button",
+ BS_AUTORADIOBUTTON,7,37,67,10
+ LTEXT "",IDC_RESULTDESC,49,112,159,23
+ PUSHBUTTON "&Äîäàòè åëåìåíò óïðàâë³ííÿ...",IDC_ADDCONTROL,81,88,63,14,NOT WS_VISIBLE
+ CONTROL "Ó âèãëÿä³ çíà÷êà",IDC_ASICON,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP | NOT WS_VISIBLE,223,58,64,10
+ PUSHBUTTON "Îãëÿä...",IDC_BROWSE,83,53,50,14,NOT WS_VISIBLE
+ LTEXT "Ôàéë:",IDC_FILELBL,83,27,20,8, NOT WS_VISIBLE
+ EDITTEXT IDC_FILE,83,37,132,13,ES_AUTOHSCROLL | NOT WS_VISIBLE
+END
+
+STRINGTABLE DISCARDABLE
+{
+ IDS_RESULTOBJDESC "Âñòàâêà â äîêóìåíò íîâîãî îá'ºêòà òèïó %s"
+ IDS_RESULTFILEOBJDESC "Âñòàâêà â äîêóìåíò âì³ñòó ôàéëà ó âèãëÿä³ îá'ºêòà, ùî àêòèâ³çóºòüñÿ çà äîïîìîãîþ ïðîãðàìè, ùî ñòâîðèëà éîãî."
+ IDS_BROWSE "Îãëÿä"
+ IDS_NOTOLEMOD "Ôàéë íå º ìîäóëåì óïðàâë³ííÿ OLE. Íå âäàºòüñÿ çàðåºñòðóâàòè åëåìåíò óïðàâë³ííÿ OLE."
+ IDS_NOTOLEMODCAPTION "Äîäàòè åëåìåíò óïðàâë³ííÿ"
+}
Property changes on: oledlg_Uk.rc
___________________________________________________________________
Name: svn:eol-style
+ native
Index: rsrc.rc
===================================================================
--- rsrc.rc (revision 25690)
+++ rsrc.rc (revision working copy)
@@ -48,3 +48,4 @@
#include "oledlg_Pt.rc"
#include "oledlg_Sv.rc"
#include "oledlg_Tr.rc"
+#include "oledlg_Uk.rc"

View file

@ -37,23 +37,24 @@
#include "oledlg_Da.rc"
#include "oledlg_En.rc"
#include "oledlg_Es.rc"
#include "oledlg_Hu.rc"
#include "oledlg_It.rc"
#include "oledlg_Ko.rc"
#include "oledlg_Nl.rc"
#include "oledlg_No.rc"
#include "oledlg_Pl.rc"
#include "oledlg_Sv.rc"
#include "oledlg_Tr.rc"
#include "oledlg_Uk.rc"
/* UTF-8 */
#include "oledlg_De.rc"
#include "oledlg_Fr.rc"
#include "oledlg_Hu.rc"
#include "oledlg_It.rc"
#include "oledlg_Ja.rc"
#include "oledlg_Lt.rc"
#include "oledlg_Nl.rc"
#include "oledlg_Pt.rc"
#include "oledlg_Ro.rc"
#include "oledlg_Ru.rc"
#include "oledlg_Si.rc"
#include "oledlg_Uk.rc"
#include "oledlg_Zh.rc"

View file

@ -534,6 +534,17 @@ IsPwrSuspendAllowed(VOID)
}
}
DWORD WINAPI PowerGetActiveScheme(HKEY UserRootPowerKey, GUID **polguid)
{
FIXME("(%p,%p) stub!\n", UserRootPowerKey, polguid);
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD WINAPI PowerReadDCValue(HKEY RootPowerKey, const GUID *Scheme, const GUID *SubGroup, const GUID *PowerSettings, PULONG Type, PUCHAR Buffer, DWORD *BufferSize)
{
FIXME("(%p,%s,%s,%s,%p,%p,%p) stub!\n", RootPowerKey, debugstr_guid(Scheme), debugstr_guid(SubGroup), debugstr_guid(PowerSettings), Type, Buffer, BufferSize);
return ERROR_CALL_NOT_IMPLEMENTED;
}
BOOLEAN WINAPI
ReadGlobalPwrPolicy(PGLOBAL_POWER_POLICY pGlobalPowerPolicy)

View file

@ -10,6 +10,8 @@
@ stdcall IsPwrHibernateAllowed ()
@ stdcall IsPwrShutdownAllowed ()
@ stdcall IsPwrSuspendAllowed ()
@ stdcall PowerGetActiveScheme (ptr ptr)
@ stdcall PowerReadDCValue (ptr ptr ptr ptr ptr ptr ptr)
@ stdcall ReadGlobalPwrPolicy (ptr)
@ stdcall ReadProcessorPwrScheme (long ptr)
@ stdcall ReadPwrScheme (long ptr)

View file

@ -12,5 +12,5 @@ HKCR,"AppID\BITS","AppID",,"%CLSID_BackgroundCopyQMgr%"
HKCR,"AppID\%CLSID_BackgroundCopyQMgr%","LocalService",,"BITS"
HKCR,"CLSID\%CLSID_BackgroundCopyManager%","AppID",,"%CLSID_BackgroundCopyQMgr%"
HKLM,"Software\Microsoft\Windows NT\CurrentVersion\SvcHost","netsvcs",0x00010008,"BITS"
HKLM,"Software\Microsoft\Windows NT\CurrentVersion\SvcHost","netsvcs",0x00010000,"BITS"
HKLM,"System\CurrentControlSet\Services\BITS\Parameters","ServiceDll",0x00020000,"qmgr.dll"

View file

@ -489,15 +489,14 @@ void ME_InsertOLEFromCursor(ME_TextEditor *editor, const REOBJECT* reo, int nCur
void ME_InsertEndRowFromCursor(ME_TextEditor *editor, int nCursor)
{
ME_Style *pStyle = ME_GetInsertStyle(editor, nCursor);
ME_DisplayItem *di;
WCHAR space = ' ';
/* FIXME no no no */
if (ME_IsSelection(editor))
ME_DeleteSelection(editor);
di = ME_InternalInsertTextFromCursor(editor, nCursor, &space, 1, pStyle,
MERF_ENDROW);
ME_InternalInsertTextFromCursor(editor, nCursor, &space, 1, pStyle,
MERF_ENDROW);
ME_ReleaseStyle(pStyle);
}
@ -1355,7 +1354,7 @@ static void ME_ArrowPageUp(ME_TextEditor *editor, ME_Cursor *pCursor)
} else {
ME_DisplayItem *pRun = pCursor->pRun;
ME_DisplayItem *pLast;
int x, y, ys, yd, yp, yprev;
int x, y, yd, yp;
int yOldScrollPos = editor->vert_si.nPos;
x = ME_GetXForArrow(editor, pCursor);
@ -1365,7 +1364,7 @@ static void ME_ArrowPageUp(ME_TextEditor *editor, ME_Cursor *pCursor)
p = ME_FindItemBack(pRun, diStartRowOrParagraph);
assert(p->type == diStartRow);
yp = ME_FindItemBack(p, diParagraph)->member.para.pt.y;
yprev = ys = y = yp + p->member.row.pt.y;
y = yp + p->member.row.pt.y;
ME_ScrollUp(editor, editor->sizeWindow.cy);
/* Only move the cursor by the amount scrolled. */
@ -1386,7 +1385,6 @@ static void ME_ArrowPageUp(ME_TextEditor *editor, ME_Cursor *pCursor)
if (y < yd)
break;
pLast = p;
yprev = y;
} while(1);
pCursor->pRun = ME_FindRunInRow(editor, pLast, x, &pCursor->nOffset,
@ -1416,7 +1414,7 @@ static void ME_ArrowPageDown(ME_TextEditor *editor, ME_Cursor *pCursor)
} else {
ME_DisplayItem *pRun = pCursor->pRun;
ME_DisplayItem *p;
int ys, yd, yp, yprev;
int yd, yp;
int yOldScrollPos = editor->vert_si.nPos;
if (!pCursor->nOffset && editor->bCaretAtEnd)
@ -1425,7 +1423,7 @@ static void ME_ArrowPageDown(ME_TextEditor *editor, ME_Cursor *pCursor)
p = ME_FindItemBack(pRun, diStartRowOrParagraph);
assert(p->type == diStartRow);
yp = ME_FindItemBack(p, diParagraph)->member.para.pt.y;
yprev = ys = y = yp + p->member.row.pt.y;
y = yp + p->member.row.pt.y;
/* For native richedit controls:
* v1.0 - v3.1 can only scroll down as far as the scrollbar lets us
@ -1447,7 +1445,6 @@ static void ME_ArrowPageDown(ME_TextEditor *editor, ME_Cursor *pCursor)
if (y >= yd)
break;
pLast = p;
yprev = y;
} while(1);
pCursor->pRun = ME_FindRunInRow(editor, pLast, x, &pCursor->nOffset,

View file

@ -289,7 +289,7 @@ static LRESULT ME_StreamInText(ME_TextEditor *editor, DWORD dwFormat, ME_InStrea
TRACE("%08x %p\n", dwFormat, stream);
do {
long nWideChars = 0;
LONG nWideChars = 0;
if (!stream->dwSize)
{
@ -1495,7 +1495,6 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
{
/* Delete any incomplete table row at the end of the rich text. */
int nOfs, nChars;
ME_DisplayItem *pCell;
ME_DisplayItem *para;
parser.rtfMinor = rtfRow;
@ -1515,7 +1514,6 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
assert(para->member.para.nFlags & MEPF_ROWEND);
para = para->member.para.next_para;
}
pCell = para->member.para.pCell;
editor->pCursors[1].pPara = para;
editor->pCursors[1].pRun = ME_FindItemFwd(para, diRun);
@ -3504,16 +3502,18 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
CHARFORMAT2W fmt;
HDC hDC;
BOOL bRepaint = LOWORD(lParam);
ME_Cursor start;
if (!wParam)
wParam = (WPARAM)GetStockObject(SYSTEM_FONT);
wParam = (WPARAM)GetStockObject(SYSTEM_FONT);
GetObjectW((HGDIOBJ)wParam, sizeof(LOGFONTW), &lf);
hDC = ITextHost_TxGetDC(editor->texthost);
ME_CharFormatFromLogFont(hDC, &lf, &fmt);
ME_CharFormatFromLogFont(hDC, &lf, &fmt);
ITextHost_TxReleaseDC(editor->texthost, hDC);
ME_SetCursorToStart(editor, &start);
ME_SetCharFormat(editor, &start, NULL, &fmt);
if (editor->mode & TM_RICHTEXT) {
ME_Cursor start;
ME_SetCursorToStart(editor, &start);
ME_SetCharFormat(editor, &start, NULL, &fmt);
}
ME_SetDefaultCharFormat(editor, &fmt);
ME_CommitUndo(editor);
@ -4258,34 +4258,28 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
ME_Style *style = ME_GetInsertStyle(editor, 0);
hIMC = ITextHost_TxImmGetContext(editor->texthost);
ME_DeleteSelection(editor);
ME_CommitUndo(editor);
ME_SaveTempStyle(editor);
if (lParam & GCS_RESULTSTR)
if (lParam & (GCS_RESULTSTR|GCS_COMPSTR))
{
LPWSTR lpCompStr = NULL;
DWORD dwBufLen;
DWORD dwIndex = lParam & GCS_RESULTSTR;
if (!dwIndex)
dwIndex = GCS_COMPSTR;
dwBufLen = ImmGetCompositionStringW(hIMC, GCS_RESULTSTR, NULL, 0);
dwBufLen = ImmGetCompositionStringW(hIMC, dwIndex, NULL, 0);
lpCompStr = HeapAlloc(GetProcessHeap(),0,dwBufLen + sizeof(WCHAR));
ImmGetCompositionStringW(hIMC, GCS_RESULTSTR, lpCompStr, dwBufLen);
ImmGetCompositionStringW(hIMC, dwIndex, lpCompStr, dwBufLen);
lpCompStr[dwBufLen/sizeof(WCHAR)] = 0;
ME_InsertTextFromCursor(editor,0,lpCompStr,dwBufLen/sizeof(WCHAR),style);
}
else if (lParam & GCS_COMPSTR)
{
LPWSTR lpCompStr = NULL;
DWORD dwBufLen;
HeapFree(GetProcessHeap(), 0, lpCompStr);
dwBufLen = ImmGetCompositionStringW(hIMC, GCS_COMPSTR, NULL, 0);
lpCompStr = HeapAlloc(GetProcessHeap(),0,dwBufLen + sizeof(WCHAR));
ImmGetCompositionStringW(hIMC, GCS_COMPSTR, lpCompStr, dwBufLen);
lpCompStr[dwBufLen/sizeof(WCHAR)] = 0;
ME_InsertTextFromCursor(editor,0,lpCompStr,dwBufLen/sizeof(WCHAR),style);
ME_SetSelection(editor,editor->imeStartIndex,
editor->imeStartIndex + dwBufLen/sizeof(WCHAR));
if (dwIndex == GCS_COMPSTR)
ME_SetSelection(editor,editor->imeStartIndex,
editor->imeStartIndex + dwBufLen/sizeof(WCHAR));
}
ME_ReleaseStyle(style);
ME_CommitUndo(editor);
ME_UpdateRepaint(editor);
return 0;
}

View file

@ -146,6 +146,8 @@ void ME_UpdateRepaint(ME_TextEditor *editor)
/* Ensure that the cursor is visible */
ME_EnsureVisible(editor, &editor->pCursors[0]);
ME_SendSelChange(editor);
/* send EN_CHANGE if the event mask asks for it */
if(editor->nEventMask & ENM_CHANGE)
{
@ -154,7 +156,6 @@ void ME_UpdateRepaint(ME_TextEditor *editor)
editor->nEventMask |= ENM_CHANGE;
}
ME_Repaint(editor);
ME_SendSelChange(editor);
}
void

View file

@ -1122,7 +1122,7 @@ struct _RTF_Info {
char *rtfTextBuf;
int rtfTextLen;
long rtfLineNum;
int rtfLineNum;
int rtfLinePos;

View file

@ -203,7 +203,6 @@ void ME_CommitUndo(ME_TextEditor *editor) {
}
ME_AddUndoItem(editor, diUndoEndTransaction, NULL);
ME_SendSelChange(editor);
}
/**
@ -269,7 +268,6 @@ void ME_CommitCoalescingUndo(ME_TextEditor *editor)
return;
ME_AddUndoItem(editor, diUndoPotentialEndTransaction, NULL);
ME_SendSelChange(editor);
}
static void ME_PlayUndoItem(ME_TextEditor *editor, ME_DisplayItem *pItem)

View file

@ -232,7 +232,8 @@ static ME_DisplayItem *ME_MaximizeSplit(ME_WrapContext *wc, ME_DisplayItem *p, i
}
if (piter->member.run.nFlags & MERF_ENDWHITE)
{
j = ME_ReverseFindNonWhitespaceV(piter->member.run.strText, i);
i = ME_ReverseFindNonWhitespaceV(piter->member.run.strText,
piter->member.run.strText->nLen);
pp = ME_SplitRun(wc, piter, i);
wc->pt = pp->member.run.pt;
return pp;
@ -578,14 +579,12 @@ static void ME_PrepareParagraphForWrapping(ME_Context *c, ME_DisplayItem *tp) {
}
/* join runs that can be joined, set up flags */
for (p = tp->next; p!=tp->member.para.next_para; p = p->next) {
int changed = 0;
switch(p->type) {
case diStartRow: assert(0); break; /* should have deleted it */
case diRun:
while (p->next->type == diRun) { /* FIXME */
if (ME_CanJoinRuns(&p->member.run, &p->next->member.run)) {
ME_JoinRuns(c->editor, p);
changed = 1;
}
else
break;

View file

@ -1,9 +1,9 @@
@ stub SamAddMemberToAlias
@ stub SamAddMemberToGroup
@ stub SamAddMultipleMembersToAlias
@ stub SamChangePasswordUser
@ stub SamChangePasswordUser2
@ stub SamChangePasswordUser3
@ stub SamChangePasswordUser
@ stub SamCloseHandle
@ stub SamConnect
@ stub SamConnectWithCreds
@ -42,6 +42,8 @@
@ stub SamRemoveMemberFromForeignDomain
@ stub SamRemoveMemberFromGroup
@ stub SamRemoveMultipleMembersFromAlias
@ stub SamRidToSid
@ stub SamSetInformationAlias
@ stub SamSetInformationDomain
@ stub SamSetInformationGroup
@ stub SamSetInformationUser
@ -51,8 +53,9 @@
@ stub SamTestPrivateFunctionsDomain
@ stub SamTestPrivateFunctionsUser
@ stub SamiChangeKeys
@ stub SamiChangePasswordUser
@ stub SamiChangePasswordUser2
@ stub SamiChangePasswordUser3
@ stub SamiChangePasswordUser
@ stub SamiEncryptPasswords
@ stub SamiGetBootKeyInformation
@ stub SamiLmChangePasswordUser

View file

@ -121,4 +121,6 @@
#define FUSION_E_INVALID_NAME EMAKEHR(0x1047)
#define CLDB_E_FILE_OLDVER EMAKEHR(0x1107)
#endif /* __WINE_CORERROR_H */

View file

@ -295,6 +295,7 @@
#define ERROR_ARITHMETIC_OVERFLOW 534
#define ERROR_PIPE_CONNECTED 535
#define ERROR_PIPE_LISTENING 536
#define ERROR_HANDLES_CLOSED 676
#define ERROR_EA_ACCESS_DENIED 994
#define ERROR_OPERATION_ABORTED 995
#define ERROR_IO_INCOMPLETE 996
@ -2490,6 +2491,10 @@
#define NTE_BAD_KEYSET_PARAM _HRESULT_TYPEDEF_(0x8009001FL)
#define NTE_FAIL _HRESULT_TYPEDEF_(0x80090020L)
#define NTE_SYS_ERR _HRESULT_TYPEDEF_(0x80090021L)
#define NTE_SILENT_CONTEXT _HRESULT_TYPEDEF_(0x80090022L)
#define NTE_TOKEN_KEYSET_STORAGE_FULL _HRESULT_TYPEDEF_(0x80090023L)
#define NTE_TEMPORARY_PROFILE _HRESULT_TYPEDEF_(0x80090024L)
#define NTE_FIXEDPARAMETER _HRESULT_TYPEDEF_(0x80090025L)
#define NTE_OP_OK _HRESULT_TYPEDEF_(0)
/* #define NTE_TOKEN_KEYSET_STORAGE ??? */

View file

@ -1165,6 +1165,21 @@ typedef enum {
#define PROCESSOR_PPC_603 603
#define PROCESSOR_PPC_604 604
#define PROCESSOR_PPC_620 620
#define PROCESSOR_INTEL_860 860
#define PROCESSOR_AMD_X8664 8664
#define PROCESSOR_MIPS_R2000 2000
#define PROCESSOR_MIPS_R3000 3000
#define PROCESSOR_HITACHI_SH3 10003
#define PROCESSOR_HITACHI_SH3E 10004
#define PROCESSOR_HITACHI_SH4 10005
#define PROCESSOR_MOTOROLA_821 821
#define PROCESSOR_SHx_SH3 103
#define PROCESSOR_SHx_SH4 104
#define PROCESSOR_STRONGARM 2577
#define PROCESSOR_ARM720 1824
#define PROCESSOR_ARM820 2080
#define PROCESSOR_ARM920 2336
#define PROCESSOR_ARM_7TDMI 70001
#define PROCESSOR_ARCHITECTURE_INTEL 0
#define PROCESSOR_ARCHITECTURE_MIPS 1
#define PROCESSOR_ARCHITECTURE_ALPHA 2
@ -1390,6 +1405,9 @@ typedef enum {
#define IMAGE_SUBSYSTEM_EFI_ROM 13
#define IMAGE_SUBSYSTEM_XBOX 14
#define IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE 0x0040
#define IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY 0x0080
#define IMAGE_DLLCHARACTERISTICS_NX_COMPAT 0x0100
#define IMAGE_DLLCHARACTERISTICS_NO_ISOLATION 0x0200
#define IMAGE_DLLCHARACTERISTICS_NO_SEH 0x0400
#define IMAGE_DLLCHARACTERISTICS_NO_BIND 0x0800

View file

@ -0,0 +1,60 @@
/*
* Winsafer definitions
*
* Copyright (C) 2009 Nikolay Sivov
*
* 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
*/
#ifndef __WINE_WINSAFER_H
#define __WINE_WINSAFER_H
#include <guiddef.h>
#include <wincrypt.h>
#ifdef __cplusplus
extern "C" {
#endif
DECLARE_HANDLE(SAFER_LEVEL_HANDLE);
#define SAFER_SCOPEID_MACHINE 1
#define SAFER_SCOPEID_USER 2
#define SAFER_LEVELID_DISALLOWED 0x00000
#define SAFER_LEVELID_UNTRUSTED 0x01000
#define SAFER_LEVELID_CONSTRAINED 0x10000
#define SAFER_LEVELID_NORMALUSER 0x20000
#define SAFER_LEVELID_FULLYTRUSTED 0x40000
#define SAFER_LEVEL_OPEN 1
WINADVAPI BOOL WINAPI SaferCreateLevel(DWORD,DWORD,DWORD,SAFER_LEVEL_HANDLE*,LPVOID);
typedef enum _SAFER_POLICY_INFO_CLASS {
SaferPolicyLevelList = 1,
SaferPolicyEnableTransparentEnforcement,
SaferPolicyDefaultLevel,
SaferPolicyEvaluateUserScope,
SaferPolicyScopeFlags
} SAFER_POLICY_INFO_CLASS;
WINADVAPI BOOL WINAPI SaferGetPolicyInformation(DWORD,SAFER_POLICY_INFO_CLASS,DWORD,PVOID,PDWORD,LPVOID);
#ifdef __cplusplus
}
#endif
#endif /* __WINE_WINSAFER_H */