diff --git a/asm/equihash/assemble.sh b/asm/equihash/Linux/assemble.sh similarity index 100% rename from asm/equihash/assemble.sh rename to asm/equihash/Linux/assemble.sh diff --git a/asm/equihash/data_blake2b.asm b/asm/equihash/Linux/data_blake2b.asm similarity index 100% rename from asm/equihash/data_blake2b.asm rename to asm/equihash/Linux/data_blake2b.asm diff --git a/asm/equihash/equihash_avx1.asm b/asm/equihash/Linux/equihash_avx1.asm similarity index 100% rename from asm/equihash/equihash_avx1.asm rename to asm/equihash/Linux/equihash_avx1.asm diff --git a/asm/equihash/equihash_avx2.asm b/asm/equihash/Linux/equihash_avx2.asm similarity index 100% rename from asm/equihash/equihash_avx2.asm rename to asm/equihash/Linux/equihash_avx2.asm diff --git a/asm/equihash/macro_blake2b_avx1.asm b/asm/equihash/Linux/macro_blake2b_avx1.asm similarity index 100% rename from asm/equihash/macro_blake2b_avx1.asm rename to asm/equihash/Linux/macro_blake2b_avx1.asm diff --git a/asm/equihash/macro_blake2b_avx2.asm b/asm/equihash/Linux/macro_blake2b_avx2.asm similarity index 100% rename from asm/equihash/macro_blake2b_avx2.asm rename to asm/equihash/Linux/macro_blake2b_avx2.asm diff --git a/asm/equihash/macro_eh.asm b/asm/equihash/Linux/macro_eh.asm similarity index 100% rename from asm/equihash/macro_eh.asm rename to asm/equihash/Linux/macro_eh.asm diff --git a/asm/equihash/params.inc b/asm/equihash/Linux/params.inc similarity index 100% rename from asm/equihash/params.inc rename to asm/equihash/Linux/params.inc diff --git a/asm/equihash/proc_ehprepare_avx1.asm b/asm/equihash/Linux/proc_ehprepare_avx1.asm similarity index 100% rename from asm/equihash/proc_ehprepare_avx1.asm rename to asm/equihash/Linux/proc_ehprepare_avx1.asm diff --git a/asm/equihash/proc_ehprepare_avx2.asm b/asm/equihash/Linux/proc_ehprepare_avx2.asm similarity index 100% rename from asm/equihash/proc_ehprepare_avx2.asm rename to asm/equihash/Linux/proc_ehprepare_avx2.asm diff --git a/asm/equihash/proc_ehsolver_avx1.asm b/asm/equihash/Linux/proc_ehsolver_avx1.asm similarity index 100% rename from asm/equihash/proc_ehsolver_avx1.asm rename to asm/equihash/Linux/proc_ehsolver_avx1.asm diff --git a/asm/equihash/proc_ehsolver_avx2.asm b/asm/equihash/Linux/proc_ehsolver_avx2.asm similarity index 100% rename from asm/equihash/proc_ehsolver_avx2.asm rename to asm/equihash/Linux/proc_ehsolver_avx2.asm diff --git a/asm/equihash/struct.inc b/asm/equihash/Linux/struct.inc similarity index 100% rename from asm/equihash/struct.inc rename to asm/equihash/Linux/struct.inc diff --git a/asm/equihash/struct_eh.inc b/asm/equihash/Linux/struct_eh.inc similarity index 100% rename from asm/equihash/struct_eh.inc rename to asm/equihash/Linux/struct_eh.inc diff --git a/asm/equihash/Windows/FASM.EXE b/asm/equihash/Windows/FASM.EXE new file mode 100644 index 0000000..3ecadc7 Binary files /dev/null and b/asm/equihash/Windows/FASM.EXE differ diff --git a/asm/equihash/Windows/INCLUDE/API/ADVAPI32.INC b/asm/equihash/Windows/INCLUDE/API/ADVAPI32.INC new file mode 100644 index 0000000..0a97a2c --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/API/ADVAPI32.INC @@ -0,0 +1,535 @@ + +; ADVAPI32 API calls + +import advapi32,\ + AbortSystemShutdownA,'AbortSystemShutdownA',\ + AbortSystemShutdownW,'AbortSystemShutdownW',\ + AccessCheck,'AccessCheck',\ + AccessCheckAndAuditAlarmA,'AccessCheckAndAuditAlarmA',\ + AccessCheckAndAuditAlarmW,'AccessCheckAndAuditAlarmW',\ + AccessCheckByType,'AccessCheckByType',\ + AccessCheckByTypeAndAuditAlarmA,'AccessCheckByTypeAndAuditAlarmA',\ + AccessCheckByTypeAndAuditAlarmW,'AccessCheckByTypeAndAuditAlarmW',\ + AccessCheckByTypeResultList,'AccessCheckByTypeResultList',\ + AccessCheckByTypeResultListAndAuditAlarmA,'AccessCheckByTypeResultListAndAuditAlarmA',\ + AccessCheckByTypeResultListAndAuditAlarmW,'AccessCheckByTypeResultListAndAuditAlarmW',\ + AddAccessAllowedAce,'AddAccessAllowedAce',\ + AddAccessAllowedAceEx,'AddAccessAllowedAceEx',\ + AddAccessAllowedObjectAce,'AddAccessAllowedObjectAce',\ + AddAccessDeniedAce,'AddAccessDeniedAce',\ + AddAccessDeniedAceEx,'AddAccessDeniedAceEx',\ + AddAccessDeniedObjectAce,'AddAccessDeniedObjectAce',\ + AddAce,'AddAce',\ + AddAuditAccessAce,'AddAuditAccessAce',\ + AddAuditAccessAceEx,'AddAuditAccessAceEx',\ + AddAuditAccessObjectAce,'AddAuditAccessObjectAce',\ + AdjustTokenGroups,'AdjustTokenGroups',\ + AdjustTokenPrivileges,'AdjustTokenPrivileges',\ + AllocateAndInitializeSid,'AllocateAndInitializeSid',\ + AllocateLocallyUniqueId,'AllocateLocallyUniqueId',\ + AreAllAccessesGranted,'AreAllAccessesGranted',\ + AreAnyAccessesGranted,'AreAnyAccessesGranted',\ + BackupEventLogA,'BackupEventLogA',\ + BackupEventLogW,'BackupEventLogW',\ + BuildExplicitAccessWithNameA,'BuildExplicitAccessWithNameA',\ + BuildExplicitAccessWithNameW,'BuildExplicitAccessWithNameW',\ + BuildImpersonateExplicitAccessWithNameA,'BuildImpersonateExplicitAccessWithNameA',\ + BuildImpersonateExplicitAccessWithNameW,'BuildImpersonateExplicitAccessWithNameW',\ + BuildImpersonateTrusteeA,'BuildImpersonateTrusteeA',\ + BuildImpersonateTrusteeW,'BuildImpersonateTrusteeW',\ + BuildSecurityDescriptorA,'BuildSecurityDescriptorA',\ + BuildSecurityDescriptorW,'BuildSecurityDescriptorW',\ + BuildTrusteeWithNameA,'BuildTrusteeWithNameA',\ + BuildTrusteeWithNameW,'BuildTrusteeWithNameW',\ + BuildTrusteeWithSidA,'BuildTrusteeWithSidA',\ + BuildTrusteeWithSidW,'BuildTrusteeWithSidW',\ + CancelOverlappedAccess,'CancelOverlappedAccess',\ + ChangeServiceConfig2A,'ChangeServiceConfig2A',\ + ChangeServiceConfig2W,'ChangeServiceConfig2W',\ + ChangeServiceConfigA,'ChangeServiceConfigA',\ + ChangeServiceConfigW,'ChangeServiceConfigW',\ + ClearEventLogA,'ClearEventLogA',\ + ClearEventLogW,'ClearEventLogW',\ + CloseEventLog,'CloseEventLog',\ + CloseRaw,'CloseRaw',\ + CloseServiceHandle,'CloseServiceHandle',\ + ControlService,'ControlService',\ + ConvertAccessToSecurityDescriptorA,'ConvertAccessToSecurityDescriptorA',\ + ConvertAccessToSecurityDescriptorW,'ConvertAccessToSecurityDescriptorW',\ + ConvertSecurityDescriptorToAccessA,'ConvertSecurityDescriptorToAccessA',\ + ConvertSecurityDescriptorToAccessW,'ConvertSecurityDescriptorToAccessW',\ + ConvertSecurityDescriptorToAccessNamedA,'ConvertSecurityDescriptorToAccessNamedA',\ + ConvertSecurityDescriptorToAccessNamedW,'ConvertSecurityDescriptorToAccessNamedW',\ + ConvertToAutoInheritPrivateObjectSecurity,'ConvertToAutoInheritPrivateObjectSecurity',\ + CopySid,'CopySid',\ + CreatePrivateObjectSecurity,'CreatePrivateObjectSecurity',\ + CreatePrivateObjectSecurityEx,'CreatePrivateObjectSecurityEx',\ + CreateProcessAsUserA,'CreateProcessAsUserA',\ + CreateProcessAsUserW,'CreateProcessAsUserW',\ + CreateRestrictedToken,'CreateRestrictedToken',\ + CreateServiceA,'CreateServiceA',\ + CreateServiceW,'CreateServiceW',\ + CryptAcquireContextA,'CryptAcquireContextA',\ + CryptAcquireContextW,'CryptAcquireContextW',\ + CryptContextAddRef,'CryptContextAddRef',\ + CryptCreateHash,'CryptCreateHash',\ + CryptDecrypt,'CryptDecrypt',\ + CryptDeriveKey,'CryptDeriveKey',\ + CryptDestroyHash,'CryptDestroyHash',\ + CryptDestroyKey,'CryptDestroyKey',\ + CryptDuplicateHash,'CryptDuplicateHash',\ + CryptDuplicateKey,'CryptDuplicateKey',\ + CryptEncrypt,'CryptEncrypt',\ + CryptEnumProviderTypesA,'CryptEnumProviderTypesA',\ + CryptEnumProviderTypesW,'CryptEnumProviderTypesW',\ + CryptEnumProvidersA,'CryptEnumProvidersA',\ + CryptEnumProvidersW,'CryptEnumProvidersW',\ + CryptExportKey,'CryptExportKey',\ + CryptGenKey,'CryptGenKey',\ + CryptGenRandom,'CryptGenRandom',\ + CryptGetDefaultProviderA,'CryptGetDefaultProviderA',\ + CryptGetDefaultProviderW,'CryptGetDefaultProviderW',\ + CryptGetHashParam,'CryptGetHashParam',\ + CryptGetKeyParam,'CryptGetKeyParam',\ + CryptGetProvParam,'CryptGetProvParam',\ + CryptGetUserKey,'CryptGetUserKey',\ + CryptHashData,'CryptHashData',\ + CryptHashSessionKey,'CryptHashSessionKey',\ + CryptImportKey,'CryptImportKey',\ + CryptReleaseContext,'CryptReleaseContext',\ + CryptSetHashParam,'CryptSetHashParam',\ + CryptSetKeyParam,'CryptSetKeyParam',\ + CryptSetProvParam,'CryptSetProvParam',\ + CryptSetProviderA,'CryptSetProviderA',\ + CryptSetProviderW,'CryptSetProviderW',\ + CryptSetProviderExA,'CryptSetProviderExA',\ + CryptSetProviderExW,'CryptSetProviderExW',\ + CryptSignHashA,'CryptSignHashA',\ + CryptSignHashW,'CryptSignHashW',\ + CryptVerifySignatureA,'CryptVerifySignatureA',\ + CryptVerifySignatureW,'CryptVerifySignatureW',\ + DecryptFileA,'DecryptFileA',\ + DecryptFileW,'DecryptFileW',\ + DeleteAce,'DeleteAce',\ + DeleteService,'DeleteService',\ + DeregisterEventSource,'DeregisterEventSource',\ + DestroyPrivateObjectSecurity,'DestroyPrivateObjectSecurity',\ + DuplicateToken,'DuplicateToken',\ + DuplicateTokenEx,'DuplicateTokenEx',\ + ElfBackupEventLogFileA,'ElfBackupEventLogFileA',\ + ElfBackupEventLogFileW,'ElfBackupEventLogFileW',\ + ElfChangeNotify,'ElfChangeNotify',\ + ElfClearEventLogFileA,'ElfClearEventLogFileA',\ + ElfClearEventLogFileW,'ElfClearEventLogFileW',\ + ElfCloseEventLog,'ElfCloseEventLog',\ + ElfDeregisterEventSource,'ElfDeregisterEventSource',\ + ElfNumberOfRecords,'ElfNumberOfRecords',\ + ElfOldestRecord,'ElfOldestRecord',\ + ElfOpenBackupEventLogA,'ElfOpenBackupEventLogA',\ + ElfOpenBackupEventLogW,'ElfOpenBackupEventLogW',\ + ElfOpenEventLogA,'ElfOpenEventLogA',\ + ElfOpenEventLogW,'ElfOpenEventLogW',\ + ElfReadEventLogA,'ElfReadEventLogA',\ + ElfReadEventLogW,'ElfReadEventLogW',\ + ElfRegisterEventSourceA,'ElfRegisterEventSourceA',\ + ElfRegisterEventSourceW,'ElfRegisterEventSourceW',\ + ElfReportEventA,'ElfReportEventA',\ + ElfReportEventW,'ElfReportEventW',\ + EncryptFileA,'EncryptFileA',\ + EncryptFileW,'EncryptFileW',\ + EnumDependentServicesA,'EnumDependentServicesA',\ + EnumDependentServicesW,'EnumDependentServicesW',\ + EnumServicesStatusA,'EnumServicesStatusA',\ + EnumServicesStatusW,'EnumServicesStatusW',\ + EqualPrefixSid,'EqualPrefixSid',\ + EqualSid,'EqualSid',\ + FindFirstFreeAce,'FindFirstFreeAce',\ + FreeSid,'FreeSid',\ + GetAccessPermissionsForObjectA,'GetAccessPermissionsForObjectA',\ + GetAccessPermissionsForObjectW,'GetAccessPermissionsForObjectW',\ + GetAce,'GetAce',\ + GetAclInformation,'GetAclInformation',\ + GetAuditedPermissionsFromAclA,'GetAuditedPermissionsFromAclA',\ + GetAuditedPermissionsFromAclW,'GetAuditedPermissionsFromAclW',\ + GetCurrentHwProfileA,'GetCurrentHwProfileA',\ + GetCurrentHwProfileW,'GetCurrentHwProfileW',\ + GetEffectiveRightsFromAclA,'GetEffectiveRightsFromAclA',\ + GetEffectiveRightsFromAclW,'GetEffectiveRightsFromAclW',\ + GetExplicitEntriesFromAclA,'GetExplicitEntriesFromAclA',\ + GetExplicitEntriesFromAclW,'GetExplicitEntriesFromAclW',\ + GetFileSecurityA,'GetFileSecurityA',\ + GetFileSecurityW,'GetFileSecurityW',\ + GetKernelObjectSecurity,'GetKernelObjectSecurity',\ + GetLengthSid,'GetLengthSid',\ + GetMultipleTrusteeA,'GetMultipleTrusteeA',\ + GetMultipleTrusteeW,'GetMultipleTrusteeW',\ + GetMultipleTrusteeOperationA,'GetMultipleTrusteeOperationA',\ + GetMultipleTrusteeOperationW,'GetMultipleTrusteeOperationW',\ + GetNamedSecurityInfoA,'GetNamedSecurityInfoA',\ + GetNamedSecurityInfoW,'GetNamedSecurityInfoW',\ + GetNamedSecurityInfoExA,'GetNamedSecurityInfoExA',\ + GetNamedSecurityInfoExW,'GetNamedSecurityInfoExW',\ + GetNumberOfEventLogRecords,'GetNumberOfEventLogRecords',\ + GetOldestEventLogRecord,'GetOldestEventLogRecord',\ + GetOverlappedAccessResults,'GetOverlappedAccessResults',\ + GetPrivateObjectSecurity,'GetPrivateObjectSecurity',\ + GetSecurityDescriptorControl,'GetSecurityDescriptorControl',\ + GetSecurityDescriptorDacl,'GetSecurityDescriptorDacl',\ + GetSecurityDescriptorGroup,'GetSecurityDescriptorGroup',\ + GetSecurityDescriptorLength,'GetSecurityDescriptorLength',\ + GetSecurityDescriptorOwner,'GetSecurityDescriptorOwner',\ + GetSecurityDescriptorSacl,'GetSecurityDescriptorSacl',\ + GetSecurityInfo,'GetSecurityInfo',\ + GetSecurityInfoExA,'GetSecurityInfoExA',\ + GetSecurityInfoExW,'GetSecurityInfoExW',\ + GetServiceDisplayNameA,'GetServiceDisplayNameA',\ + GetServiceDisplayNameW,'GetServiceDisplayNameW',\ + GetServiceKeyNameA,'GetServiceKeyNameA',\ + GetServiceKeyNameW,'GetServiceKeyNameW',\ + GetSidLengthRequiredA,'GetSidLengthRequiredA',\ + GetSidLengthRequiredW,'GetSidLengthRequiredW',\ + GetSidSubAuthority,'GetSidSubAuthority',\ + GetSidSubAuthorityCount,'GetSidSubAuthorityCount',\ + GetTokenInformation,'GetTokenInformation',\ + GetTrusteeNameA,'GetTrusteeNameA',\ + GetTrusteeNameW,'GetTrusteeNameW',\ + GetTrusteeTypeA,'GetTrusteeTypeA',\ + GetTrusteeTypeW,'GetTrusteeTypeW',\ + GetUserNameA,'GetUserNameA',\ + GetUserNameW,'GetUserNameW',\ + I_ScSetServiceBitsA,'I_ScSetServiceBitsA',\ + I_ScSetServiceBitsW,'I_ScSetServiceBitsW',\ + ImpersonateLoggedOnUser,'ImpersonateLoggedOnUser',\ + ImpersonateNamedPipeClient,'ImpersonateNamedPipeClient',\ + ImpersonateSelf,'ImpersonateSelf',\ + InitializeAcl,'InitializeAcl',\ + InitializeSecurityDescriptor,'InitializeSecurityDescriptor',\ + InitializeSid,'InitializeSid',\ + InitiateSystemShutdownA,'InitiateSystemShutdownA',\ + InitiateSystemShutdownW,'InitiateSystemShutdownW',\ + IsTextUnicode,'IsTextUnicode',\ + IsTokenRestricted,'IsTokenRestricted',\ + IsValidAcl,'IsValidAcl',\ + IsValidSecurityDescriptor,'IsValidSecurityDescriptor',\ + IsValidSid,'IsValidSid',\ + LockServiceDatabase,'LockServiceDatabase',\ + LogonUserA,'LogonUserA',\ + LogonUserW,'LogonUserW',\ + LookupAccountNameA,'LookupAccountNameA',\ + LookupAccountNameW,'LookupAccountNameW',\ + LookupAccountSidA,'LookupAccountSidA',\ + LookupAccountSidW,'LookupAccountSidW',\ + LookupPrivilegeDisplayNameA,'LookupPrivilegeDisplayNameA',\ + LookupPrivilegeDisplayNameW,'LookupPrivilegeDisplayNameW',\ + LookupPrivilegeNameA,'LookupPrivilegeNameA',\ + LookupPrivilegeNameW,'LookupPrivilegeNameW',\ + LookupPrivilegeValueA,'LookupPrivilegeValueA',\ + LookupPrivilegeValueW,'LookupPrivilegeValueW',\ + LookupSecurityDescriptorPartsA,'LookupSecurityDescriptorPartsA',\ + LookupSecurityDescriptorPartsW,'LookupSecurityDescriptorPartsW',\ + LsaAddAccountRights,'LsaAddAccountRights',\ + LsaAddPrivilegesToAccount,'LsaAddPrivilegesToAccount',\ + LsaClearAuditLog,'LsaClearAuditLog',\ + LsaClose,'LsaClose',\ + LsaCreateAccount,'LsaCreateAccount',\ + LsaCreateSecret,'LsaCreateSecret',\ + LsaCreateTrustedDomain,'LsaCreateTrustedDomain',\ + LsaCreateTrustedDomainEx,'LsaCreateTrustedDomainEx',\ + LsaDelete,'LsaDelete',\ + LsaDeleteTrustedDomain,'LsaDeleteTrustedDomain',\ + LsaEnumerateAccountRights,'LsaEnumerateAccountRights',\ + LsaEnumerateAccounts,'LsaEnumerateAccounts',\ + LsaEnumerateAccountsWithUserRight,'LsaEnumerateAccountsWithUserRight',\ + LsaEnumeratePrivileges,'LsaEnumeratePrivileges',\ + LsaEnumeratePrivilegesOfAccount,'LsaEnumeratePrivilegesOfAccount',\ + LsaEnumerateTrustedDomains,'LsaEnumerateTrustedDomains',\ + LsaEnumerateTrustedDomainsEx,'LsaEnumerateTrustedDomainsEx',\ + LsaFreeMemory,'LsaFreeMemory',\ + LsaGetQuotasForAccount,'LsaGetQuotasForAccount',\ + LsaGetSystemAccessAccount,'LsaGetSystemAccessAccount',\ + LsaGetUserName,'LsaGetUserName',\ + LsaICLookupNames,'LsaICLookupNames',\ + LsaICLookupSids,'LsaICLookupSids',\ + LsaIGetTrustedDomainAuthInfoBlobs,'LsaIGetTrustedDomainAuthInfoBlobs',\ + LsaISetTrustedDomainAuthInfoBlobs,'LsaISetTrustedDomainAuthInfoBlobs',\ + LsaLookupNames,'LsaLookupNames',\ + LsaLookupPrivilegeDisplayName,'LsaLookupPrivilegeDisplayName',\ + LsaLookupPrivilegeName,'LsaLookupPrivilegeName',\ + LsaLookupPrivilegeValue,'LsaLookupPrivilegeValue',\ + LsaLookupSids,'LsaLookupSids',\ + LsaNtStatusToWinError,'LsaNtStatusToWinError',\ + LsaOpenAccount,'LsaOpenAccount',\ + LsaOpenPolicy,'LsaOpenPolicy',\ + LsaOpenSecret,'LsaOpenSecret',\ + LsaOpenTrustedDomain,'LsaOpenTrustedDomain',\ + LsaQueryDomainInformationPolicy,'LsaQueryDomainInformationPolicy',\ + LsaQueryInfoTrustedDomain,'LsaQueryInfoTrustedDomain',\ + LsaQueryInformationPolicy,'LsaQueryInformationPolicy',\ + LsaQueryLocalInformationPolicy,'LsaQueryLocalInformationPolicy',\ + LsaQuerySecret,'LsaQuerySecret',\ + LsaQuerySecurityObject,'LsaQuerySecurityObject',\ + LsaQueryTrustedDomainInfo,'LsaQueryTrustedDomainInfo',\ + LsaQueryTrustedDomainInfoByName,'LsaQueryTrustedDomainInfoByName',\ + LsaRemoveAccountRights,'LsaRemoveAccountRights',\ + LsaRemovePrivilegesFromAccount,'LsaRemovePrivilegesFromAccount',\ + LsaRetrievePrivateData,'LsaRetrievePrivateData',\ + LsaSetDomainInformationPolicy,'LsaSetDomainInformationPolicy',\ + LsaSetInformationPolicy,'LsaSetInformationPolicy',\ + LsaSetInformationTrustedDomain,'LsaSetInformationTrustedDomain',\ + LsaSetLocalInformationPolicy,'LsaSetLocalInformationPolicy',\ + LsaSetQuotasForAccount,'LsaSetQuotasForAccount',\ + LsaSetSecret,'LsaSetSecret',\ + LsaSetSecurityObject,'LsaSetSecurityObject',\ + LsaSetSystemAccessAccount,'LsaSetSystemAccessAccount',\ + LsaSetTrustedDomainInfoByName,'LsaSetTrustedDomainInfoByName',\ + LsaSetTrustedDomainInformation,'LsaSetTrustedDomainInformation',\ + LsaStorePrivateData,'LsaStorePrivateData',\ + MakeAbsoluteSD,'MakeAbsoluteSD',\ + MakeSelfRelativeSD,'MakeSelfRelativeSD',\ + MapGenericMask,'MapGenericMask',\ + NotifyBootConfigStatus,'NotifyBootConfigStatus',\ + NotifyChangeEventLog,'NotifyChangeEventLog',\ + ObjectCloseAuditAlarmA,'ObjectCloseAuditAlarmA',\ + ObjectCloseAuditAlarmW,'ObjectCloseAuditAlarmW',\ + ObjectDeleteAuditAlarmA,'ObjectDeleteAuditAlarmA',\ + ObjectDeleteAuditAlarmW,'ObjectDeleteAuditAlarmW',\ + ObjectOpenAuditAlarmA,'ObjectOpenAuditAlarmA',\ + ObjectOpenAuditAlarmW,'ObjectOpenAuditAlarmW',\ + ObjectPrivilegeAuditAlarmA,'ObjectPrivilegeAuditAlarmA',\ + ObjectPrivilegeAuditAlarmW,'ObjectPrivilegeAuditAlarmW',\ + OpenBackupEventLogA,'OpenBackupEventLogA',\ + OpenBackupEventLogW,'OpenBackupEventLogW',\ + OpenEventLogA,'OpenEventLogA',\ + OpenEventLogW,'OpenEventLogW',\ + OpenProcessToken,'OpenProcessToken',\ + OpenRawA,'OpenRawA',\ + OpenRawW,'OpenRawW',\ + OpenSCManagerA,'OpenSCManagerA',\ + OpenSCManagerW,'OpenSCManagerW',\ + OpenServiceA,'OpenServiceA',\ + OpenServiceW,'OpenServiceW',\ + OpenThreadToken,'OpenThreadToken',\ + PrivilegeCheck,'PrivilegeCheck',\ + PrivilegedServiceAuditAlarmA,'PrivilegedServiceAuditAlarmA',\ + PrivilegedServiceAuditAlarmW,'PrivilegedServiceAuditAlarmW',\ + QueryRecoveryAgentsA,'QueryRecoveryAgentsA',\ + QueryRecoveryAgentsW,'QueryRecoveryAgentsW',\ + QueryServiceConfig2A,'QueryServiceConfig2A',\ + QueryServiceConfig2W,'QueryServiceConfig2W',\ + QueryServiceConfigA,'QueryServiceConfigA',\ + QueryServiceConfigW,'QueryServiceConfigW',\ + QueryServiceLockStatusA,'QueryServiceLockStatusA',\ + QueryServiceLockStatusW,'QueryServiceLockStatusW',\ + QueryServiceObjectSecurity,'QueryServiceObjectSecurity',\ + QueryServiceStatus,'QueryServiceStatus',\ + QueryWindows31FilesMigration,'QueryWindows31FilesMigration',\ + ReadEventLogA,'ReadEventLogA',\ + ReadEventLogW,'ReadEventLogW',\ + ReadRaw,'ReadRaw',\ + RegCloseKey,'RegCloseKey',\ + RegConnectRegistryA,'RegConnectRegistryA',\ + RegConnectRegistryW,'RegConnectRegistryW',\ + RegCreateKeyA,'RegCreateKeyA',\ + RegCreateKeyW,'RegCreateKeyW',\ + RegCreateKeyExA,'RegCreateKeyExA',\ + RegCreateKeyExW,'RegCreateKeyExW',\ + RegDeleteKeyA,'RegDeleteKeyA',\ + RegDeleteKeyW,'RegDeleteKeyW',\ + RegDeleteValueA,'RegDeleteValueA',\ + RegDeleteValueW,'RegDeleteValueW',\ + RegEnumKeyA,'RegEnumKeyA',\ + RegEnumKeyW,'RegEnumKeyW',\ + RegEnumKeyExA,'RegEnumKeyExA',\ + RegEnumKeyExW,'RegEnumKeyExW',\ + RegEnumValueA,'RegEnumValueA',\ + RegEnumValueW,'RegEnumValueW',\ + RegFlushKey,'RegFlushKey',\ + RegGetKeySecurity,'RegGetKeySecurity',\ + RegLoadKeyA,'RegLoadKeyA',\ + RegLoadKeyW,'RegLoadKeyW',\ + RegNotifyChangeKeyValue,'RegNotifyChangeKeyValue',\ + RegOpenKeyA,'RegOpenKeyA',\ + RegOpenKeyW,'RegOpenKeyW',\ + RegOpenKeyExA,'RegOpenKeyExA',\ + RegOpenKeyExW,'RegOpenKeyExW',\ + RegOverridePredefKey,'RegOverridePredefKey',\ + RegQueryInfoKeyA,'RegQueryInfoKeyA',\ + RegQueryInfoKeyW,'RegQueryInfoKeyW',\ + RegQueryMultipleValuesA,'RegQueryMultipleValuesA',\ + RegQueryMultipleValuesW,'RegQueryMultipleValuesW',\ + RegQueryValueA,'RegQueryValueA',\ + RegQueryValueW,'RegQueryValueW',\ + RegQueryValueExA,'RegQueryValueExA',\ + RegQueryValueExW,'RegQueryValueExW',\ + RegReplaceKeyA,'RegReplaceKeyA',\ + RegReplaceKeyW,'RegReplaceKeyW',\ + RegRestoreKeyA,'RegRestoreKeyA',\ + RegRestoreKeyW,'RegRestoreKeyW',\ + RegSaveKeyA,'RegSaveKeyA',\ + RegSaveKeyW,'RegSaveKeyW',\ + RegSetKeySecurity,'RegSetKeySecurity',\ + RegSetValueA,'RegSetValueA',\ + RegSetValueW,'RegSetValueW',\ + RegSetValueExA,'RegSetValueExA',\ + RegSetValueExW,'RegSetValueExW',\ + RegUnLoadKeyA,'RegUnLoadKeyA',\ + RegUnLoadKeyW,'RegUnLoadKeyW',\ + RegisterEventSourceA,'RegisterEventSourceA',\ + RegisterEventSourceW,'RegisterEventSourceW',\ + RegisterServiceCtrlHandlerA,'RegisterServiceCtrlHandlerA',\ + RegisterServiceCtrlHandlerW,'RegisterServiceCtrlHandlerW',\ + ReportEventA,'ReportEventA',\ + ReportEventW,'ReportEventW',\ + RevertToSelf,'RevertToSelf',\ + SetAclInformation,'SetAclInformation',\ + SetEntriesInAccessListA,'SetEntriesInAccessListA',\ + SetEntriesInAccessListW,'SetEntriesInAccessListW',\ + SetEntriesInAclA,'SetEntriesInAclA',\ + SetEntriesInAclW,'SetEntriesInAclW',\ + SetEntriesInAuditListA,'SetEntriesInAuditListA',\ + SetEntriesInAuditListW,'SetEntriesInAuditListW',\ + SetFileSecurityA,'SetFileSecurityA',\ + SetFileSecurityW,'SetFileSecurityW',\ + SetKernelObjectSecurity,'SetKernelObjectSecurity',\ + SetNamedSecurityInfoA,'SetNamedSecurityInfoA',\ + SetNamedSecurityInfoW,'SetNamedSecurityInfoW',\ + SetNamedSecurityInfoExA,'SetNamedSecurityInfoExA',\ + SetNamedSecurityInfoExW,'SetNamedSecurityInfoExW',\ + SetPrivateObjectSecurity,'SetPrivateObjectSecurity',\ + SetPrivateObjectSecurityEx,'SetPrivateObjectSecurityEx',\ + SetSecurityDescriptorControl,'SetSecurityDescriptorControl',\ + SetSecurityDescriptorDacl,'SetSecurityDescriptorDacl',\ + SetSecurityDescriptorGroup,'SetSecurityDescriptorGroup',\ + SetSecurityDescriptorOwner,'SetSecurityDescriptorOwner',\ + SetSecurityDescriptorSacl,'SetSecurityDescriptorSacl',\ + SetSecurityInfo,'SetSecurityInfo',\ + SetSecurityInfoExA,'SetSecurityInfoExA',\ + SetSecurityInfoExW,'SetSecurityInfoExW',\ + SetServiceBits,'SetServiceBits',\ + SetServiceObjectSecurity,'SetServiceObjectSecurity',\ + SetServiceStatus,'SetServiceStatus',\ + SetThreadToken,'SetThreadToken',\ + SetTokenInformation,'SetTokenInformation',\ + StartServiceA,'StartServiceA',\ + StartServiceW,'StartServiceW',\ + StartServiceCtrlDispatcherA,'StartServiceCtrlDispatcherA',\ + StartServiceCtrlDispatcherW,'StartServiceCtrlDispatcherW',\ + SynchronizeWindows31FilesAndWindowsNTRegistry,'SynchronizeWindows31FilesAndWindowsNTRegistry',\ + TrusteeAccessToObjectA,'TrusteeAccessToObjectA',\ + TrusteeAccessToObjectW,'TrusteeAccessToObjectW',\ + UnlockServiceDatabase,'UnlockServiceDatabase',\ + WriteRaw,'WriteRaw' + +api AbortSystemShutdown,\ + AccessCheckAndAuditAlarm,\ + AccessCheckByTypeAndAuditAlarm,\ + AccessCheckByTypeResultListAndAuditAlarm,\ + BackupEventLog,\ + BuildExplicitAccessWithName,\ + BuildImpersonateExplicitAccessWithName,\ + BuildImpersonateTrustee,\ + BuildSecurityDescriptor,\ + BuildTrusteeWithName,\ + BuildTrusteeWithSid,\ + ChangeServiceConfig2,\ + ChangeServiceConfig,\ + ClearEventLog,\ + ConvertAccessToSecurityDescriptor,\ + ConvertSecurityDescriptorToAccess,\ + ConvertSecurityDescriptorToAccessNamed,\ + CreateProcessAsUser,\ + CreateService,\ + CryptAcquireContext,\ + CryptEnumProviderTypes,\ + CryptEnumProviders,\ + CryptGetDefaultProvider,\ + CryptSetProvider,\ + CryptSetProviderEx,\ + CryptSignHash,\ + CryptVerifySignature,\ + DecryptFile,\ + ElfBackupEventLogFile,\ + ElfClearEventLogFile,\ + ElfOpenBackupEventLog,\ + ElfOpenEventLog,\ + ElfReadEventLog,\ + ElfRegisterEventSource,\ + ElfReportEvent,\ + EncryptFile,\ + EnumDependentServices,\ + EnumServicesStatus,\ + GetAccessPermissionsForObject,\ + GetAuditedPermissionsFromAcl,\ + GetCurrentHwProfile,\ + GetEffectiveRightsFromAcl,\ + GetExplicitEntriesFromAcl,\ + GetFileSecurity,\ + GetMultipleTrustee,\ + GetMultipleTrusteeOperation,\ + GetNamedSecurityInfo,\ + GetNamedSecurityInfoEx,\ + GetSecurityInfoEx,\ + GetServiceDisplayName,\ + GetServiceKeyName,\ + GetSidLengthRequired,\ + GetTrusteeName,\ + GetTrusteeType,\ + GetUserName,\ + I_ScSetServiceBits,\ + InitiateSystemShutdown,\ + LogonUser,\ + LookupAccountName,\ + LookupAccountSid,\ + LookupPrivilegeDisplayName,\ + LookupPrivilegeName,\ + LookupPrivilegeValue,\ + LookupSecurityDescriptorParts,\ + ObjectCloseAuditAlarm,\ + ObjectDeleteAuditAlarm,\ + ObjectOpenAuditAlarm,\ + ObjectPrivilegeAuditAlarm,\ + OpenBackupEventLog,\ + OpenEventLog,\ + OpenRaw,\ + OpenSCManager,\ + OpenService,\ + PrivilegedServiceAuditAlarm,\ + QueryRecoveryAgents,\ + QueryServiceConfig2,\ + QueryServiceConfig,\ + QueryServiceLockStatus,\ + ReadEventLog,\ + RegConnectRegistry,\ + RegCreateKey,\ + RegCreateKeyEx,\ + RegDeleteKey,\ + RegDeleteValue,\ + RegEnumKey,\ + RegEnumKeyEx,\ + RegEnumValue,\ + RegLoadKey,\ + RegOpenKey,\ + RegOpenKeyEx,\ + RegQueryInfoKey,\ + RegQueryMultipleValues,\ + RegQueryValue,\ + RegQueryValueEx,\ + RegReplaceKey,\ + RegRestoreKey,\ + RegSaveKey,\ + RegSetValue,\ + RegSetValueEx,\ + RegUnLoadKey,\ + RegisterEventSource,\ + RegisterServiceCtrlHandler,\ + ReportEvent,\ + SetEntriesInAccessList,\ + SetEntriesInAcl,\ + SetEntriesInAuditList,\ + SetFileSecurity,\ + SetNamedSecurityInfo,\ + SetNamedSecurityInfoEx,\ + SetSecurityInfoEx,\ + StartService,\ + StartServiceCtrlDispatcher,\ + TrusteeAccessToObject diff --git a/asm/equihash/Windows/INCLUDE/API/COMCTL32.INC b/asm/equihash/Windows/INCLUDE/API/COMCTL32.INC new file mode 100644 index 0000000..dc28c61 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/API/COMCTL32.INC @@ -0,0 +1,81 @@ + +; COMCTL32 API calls + +import comctl32,\ + CreateMappedBitmap,'CreateMappedBitmap',\ + CreatePropertySheetPageA,'CreatePropertySheetPageA',\ + CreatePropertySheetPageW,'CreatePropertySheetPageW',\ + CreateStatusWindowA,'CreateStatusWindowA',\ + CreateStatusWindowW,'CreateStatusWindowW',\ + CreateToolbar,'CreateToolbar',\ + CreateToolbarEx,'CreateToolbarEx',\ + CreateUpDownControl,'CreateUpDownControl',\ + DestroyPropertySheetPage,'DestroyPropertySheetPage',\ + DrawInsert,'DrawInsert',\ + DrawStatusTextA,'DrawStatusTextA',\ + DrawStatusTextW,'DrawStatusTextW',\ + FlatSB_EnableScrollBar,'FlatSB_EnableScrollBar',\ + FlatSB_GetScrollInfo,'FlatSB_GetScrollInfo',\ + FlatSB_GetScrollPos,'FlatSB_GetScrollPos',\ + FlatSB_GetScrollProp,'FlatSB_GetScrollProp',\ + FlatSB_GetScrollRange,'FlatSB_GetScrollRange',\ + FlatSB_SetScrollInfo,'FlatSB_SetScrollInfo',\ + FlatSB_SetScrollPos,'FlatSB_SetScrollPos',\ + FlatSB_SetScrollProp,'FlatSB_SetScrollProp',\ + FlatSB_SetScrollRange,'FlatSB_SetScrollRange',\ + FlatSB_ShowScrollBar,'FlatSB_ShowScrollBar',\ + GetEffectiveClientRect,'GetEffectiveClientRect',\ + ImageList_Add,'ImageList_Add',\ + ImageList_AddIcon,'ImageList_AddIcon',\ + ImageList_AddMasked,'ImageList_AddMasked',\ + ImageList_BeginDrag,'ImageList_BeginDrag',\ + ImageList_Copy,'ImageList_Copy',\ + ImageList_Create,'ImageList_Create',\ + ImageList_Destroy,'ImageList_Destroy',\ + ImageList_DragEnter,'ImageList_DragEnter',\ + ImageList_DragLeave,'ImageList_DragLeave',\ + ImageList_DragMove,'ImageList_DragMove',\ + ImageList_DragShowNolock,'ImageList_DragShowNolock',\ + ImageList_Draw,'ImageList_Draw',\ + ImageList_DrawEx,'ImageList_DrawEx',\ + ImageList_DrawIndirect,'ImageList_DrawIndirect',\ + ImageList_Duplicate,'ImageList_Duplicate',\ + ImageList_EndDrag,'ImageList_EndDrag',\ + ImageList_GetBkColor,'ImageList_GetBkColor',\ + ImageList_GetDragImage,'ImageList_GetDragImage',\ + ImageList_GetIcon,'ImageList_GetIcon',\ + ImageList_GetIconSize,'ImageList_GetIconSize',\ + ImageList_GetImageCount,'ImageList_GetImageCount',\ + ImageList_GetImageInfo,'ImageList_GetImageInfo',\ + ImageList_GetImageRect,'ImageList_GetImageRect',\ + ImageList_LoadImageA,'ImageList_LoadImageA',\ + ImageList_LoadImageW,'ImageList_LoadImageW',\ + ImageList_Merge,'ImageList_Merge',\ + ImageList_Read,'ImageList_Read',\ + ImageList_Remove,'ImageList_Remove',\ + ImageList_Replace,'ImageList_Replace',\ + ImageList_ReplaceIcon,'ImageList_ReplaceIcon',\ + ImageList_SetBkColor,'ImageList_SetBkColor',\ + ImageList_SetDragCursorImage,'ImageList_SetDragCursorImage',\ + ImageList_SetFilter,'ImageList_SetFilter',\ + ImageList_SetIconSize,'ImageList_SetIconSize',\ + ImageList_SetImageCount,'ImageList_SetImageCount',\ + ImageList_SetOverlayImage,'ImageList_SetOverlayImage',\ + ImageList_Write,'ImageList_Write',\ + InitCommonControls,'InitCommonControls',\ + InitCommonControlsEx,'InitCommonControlsEx',\ + InitializeFlatSB,'InitializeFlatSB',\ + LBItemFromPt,'LBItemFromPt',\ + MakeDragList,'MakeDragList',\ + MenuHelp,'MenuHelp',\ + PropertySheetA,'PropertySheetA',\ + PropertySheetW,'PropertySheetW',\ + ShowHideMenuCtl,'ShowHideMenuCtl',\ + UninitializeFlatSB,'UninitializeFlatSB',\ + _TrackMouseEvent,'_TrackMouseEvent' + +api CreatePropertySheetPage,\ + CreateStatusWindow,\ + DrawStatusText,\ + ImageList_LoadImage,\ + PropertySheet diff --git a/asm/equihash/Windows/INCLUDE/API/COMDLG32.INC b/asm/equihash/Windows/INCLUDE/API/COMDLG32.INC new file mode 100644 index 0000000..9347fbc --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/API/COMDLG32.INC @@ -0,0 +1,38 @@ + +; COMDLG32 API calls + +import comdlg32,\ + ChooseColorA,'ChooseColorA',\ + ChooseColorW,'ChooseColorW',\ + ChooseFontA,'ChooseFontA',\ + ChooseFontW,'ChooseFontW',\ + CommDlgExtendedError,'CommDlgExtendedError',\ + FindTextA,'FindTextA',\ + FindTextW,'FindTextW',\ + FormatCharDlgProc,'FormatCharDlgProc',\ + GetFileTitleA,'GetFileTitleA',\ + GetFileTitleW,'GetFileTitleW',\ + GetOpenFileNameA,'GetOpenFileNameA',\ + GetOpenFileNameW,'GetOpenFileNameW',\ + GetSaveFileNameA,'GetSaveFileNameA',\ + GetSaveFileNameW,'GetSaveFileNameW',\ + LoadAlterBitmap,'LoadAlterBitmap',\ + PageSetupDlgA,'PageSetupDlgA',\ + PageSetupDlgW,'PageSetupDlgW',\ + PrintDlgA,'PrintDlgA',\ + PrintDlgW,'PrintDlgW',\ + ReplaceTextA,'ReplaceTextA',\ + ReplaceTextW,'ReplaceTextW',\ + WantArrows,'WantArrows',\ + dwLBSubclass,'dwLBSubclass',\ + dwOKSubclass,'dwOKSubclass' + +api ChooseColor,\ + ChooseFont,\ + FindText,\ + GetFileTitle,\ + GetOpenFileName,\ + GetSaveFileName,\ + PageSetupDlg,\ + PrintDlg,\ + ReplaceText diff --git a/asm/equihash/Windows/INCLUDE/API/GDI32.INC b/asm/equihash/Windows/INCLUDE/API/GDI32.INC new file mode 100644 index 0000000..4cec631 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/API/GDI32.INC @@ -0,0 +1,419 @@ + +; GDI32 API calls + +import gdi32,\ + AbortDoc,'AbortDoc',\ + AbortPath,'AbortPath',\ + AddFontMemResourceEx,'AddFontMemResourceEx',\ + AddFontResourceA,'AddFontResourceA',\ + AddFontResourceW,'AddFontResourceW',\ + AddFontResourceExA,'AddFontResourceExA',\ + AddFontResourceExW,'AddFontResourceExW',\ + AngleArc,'AngleArc',\ + AnimatePalette,'AnimatePalette',\ + Arc,'Arc',\ + ArcTo,'ArcTo',\ + BeginPath,'BeginPath',\ + BitBlt,'BitBlt',\ + CancelDC,'CancelDC',\ + CheckColorsInGamut,'CheckColorsInGamut',\ + ChoosePixelFormat,'ChoosePixelFormat',\ + Chord,'Chord',\ + CloseEnhMetaFile,'CloseEnhMetaFile',\ + CloseFigure,'CloseFigure',\ + CloseMetaFile,'CloseMetaFile',\ + ColorCorrectPalette,'ColorCorrectPalette',\ + ColorMatchToTarget,'ColorMatchToTarget',\ + CombineRgn,'CombineRgn',\ + CombineTransform,'CombineTransform',\ + CopyEnhMetaFileA,'CopyEnhMetaFileA',\ + CopyEnhMetaFileW,'CopyEnhMetaFileW',\ + CopyMetaFileA,'CopyMetaFileA',\ + CopyMetaFileW,'CopyMetaFileW',\ + CreateBitmap,'CreateBitmap',\ + CreateBitmapIndirect,'CreateBitmapIndirect',\ + CreateBrushIndirect,'CreateBrushIndirect',\ + CreateColorSpaceA,'CreateColorSpaceA',\ + CreateColorSpaceW,'CreateColorSpaceW',\ + CreateCompatibleBitmap,'CreateCompatibleBitmap',\ + CreateCompatibleDC,'CreateCompatibleDC',\ + CreateDCA,'CreateDCA',\ + CreateDCW,'CreateDCW',\ + CreateDIBPatternBrush,'CreateDIBPatternBrush',\ + CreateDIBPatternBrushPt,'CreateDIBPatternBrushPt',\ + CreateDIBSection,'CreateDIBSection',\ + CreateDIBitmap,'CreateDIBitmap',\ + CreateDiscardableBitmap,'CreateDiscardableBitmap',\ + CreateEllipticRgn,'CreateEllipticRgn',\ + CreateEllipticRgnIndirect,'CreateEllipticRgnIndirect',\ + CreateEnhMetaFileA,'CreateEnhMetaFileA',\ + CreateEnhMetaFileW,'CreateEnhMetaFileW',\ + CreateFontA,'CreateFontA',\ + CreateFontW,'CreateFontW',\ + CreateFontIndirectA,'CreateFontIndirectA',\ + CreateFontIndirectW,'CreateFontIndirectW',\ + CreateFontIndirectExA,'CreateFontIndirectExA',\ + CreateFontIndirectExW,'CreateFontIndirectExW',\ + CreateHalftonePalette,'CreateHalftonePalette',\ + CreateHatchBrush,'CreateHatchBrush',\ + CreateICA,'CreateICA',\ + CreateICW,'CreateICW',\ + CreateMetaFileA,'CreateMetaFileA',\ + CreateMetaFileW,'CreateMetaFileW',\ + CreatePalette,'CreatePalette',\ + CreatePatternBrush,'CreatePatternBrush',\ + CreatePen,'CreatePen',\ + CreatePenIndirect,'CreatePenIndirect',\ + CreatePolyPolygonRgn,'CreatePolyPolygonRgn',\ + CreatePolygonRgn,'CreatePolygonRgn',\ + CreateRectRgn,'CreateRectRgn',\ + CreateRectRgnIndirect,'CreateRectRgnIndirect',\ + CreateRoundRectRgn,'CreateRoundRectRgn',\ + CreateScalableFontResourceA,'CreateScalableFontResourceA',\ + CreateScalableFontResourceW,'CreateScalableFontResourceW',\ + CreateSolidBrush,'CreateSolidBrush',\ + DPtoLP,'DPtoLP',\ + DeleteColorSpace,'DeleteColorSpace',\ + DeleteDC,'DeleteDC',\ + DeleteEnhMetaFile,'DeleteEnhMetaFile',\ + DeleteMetaFile,'DeleteMetaFile',\ + DeleteObject,'DeleteObject',\ + DescribePixelFormat,'DescribePixelFormat',\ + DeviceCapabilitiesExA,'DeviceCapabilitiesExA',\ + DeviceCapabilitiesExW,'DeviceCapabilitiesExW',\ + DrawEscape,'DrawEscape',\ + Ellipse,'Ellipse',\ + EnableEUDC,'EnableEUDC',\ + EndDoc,'EndDoc',\ + EndPage,'EndPage',\ + EndPath,'EndPath',\ + EnumEnhMetaFile,'EnumEnhMetaFile',\ + EnumFontFamiliesA,'EnumFontFamiliesA',\ + EnumFontFamiliesW,'EnumFontFamiliesW',\ + EnumFontFamiliesExA,'EnumFontFamiliesExA',\ + EnumFontFamiliesExW,'EnumFontFamiliesExW',\ + EnumFontsA,'EnumFontsA',\ + EnumFontsW,'EnumFontsW',\ + EnumICMProfilesA,'EnumICMProfilesA',\ + EnumICMProfilesW,'EnumICMProfilesW',\ + EnumMetaFile,'EnumMetaFile',\ + EnumObjects,'EnumObjects',\ + EqualRgn,'EqualRgn',\ + Escape,'Escape',\ + ExcludeClipRect,'ExcludeClipRect',\ + ExtCreatePen,'ExtCreatePen',\ + ExtCreateRegion,'ExtCreateRegion',\ + ExtEscape,'ExtEscape',\ + ExtFloodFill,'ExtFloodFill',\ + ExtSelectClipRgn,'ExtSelectClipRgn',\ + ExtTextOutA,'ExtTextOutA',\ + ExtTextOutW,'ExtTextOutW',\ + FillPath,'FillPath',\ + FillRgn,'FillRgn',\ + FixBrushOrgEx,'FixBrushOrgEx',\ + FlattenPath,'FlattenPath',\ + FloodFill,'FloodFill',\ + FrameRgn,'FrameRgn',\ + GdiComment,'GdiComment',\ + GdiDeleteSpoolFileHandle,'GdiDeleteSpoolFileHandle',\ + GdiEndDocEMF,'GdiEndDocEMF',\ + GdiEndPageEMF,'GdiEndPageEMF',\ + GdiFlush,'GdiFlush',\ + GdiGetBatchLimit,'GdiGetBatchLimit',\ + GdiGetDC,'GdiGetDC',\ + GdiGetDevmodeForPage,'GdiGetDevmodeForPage',\ + GdiGetPageCount,'GdiGetPageCount',\ + GdiGetPageHandle,'GdiGetPageHandle',\ + GdiGetSpoolFileHandle,'GdiGetSpoolFileHandle',\ + GdiPlayDCScript,'GdiPlayDCScript',\ + GdiPlayEMF,'GdiPlayEMF',\ + GdiPlayJournal,'GdiPlayJournal',\ + GdiPlayPageEMF,'GdiPlayPageEMF',\ + GdiPlayPrivatePageEMF,'GdiPlayPrivatePageEMF',\ + GdiPlayScript,'GdiPlayScript',\ + GdiResetDCEMF,'GdiResetDCEMF',\ + GdiSetBatchLimit,'GdiSetBatchLimit',\ + GdiStartDocEMF,'GdiStartDocEMF',\ + GdiStartPageEMF,'GdiStartPageEMF',\ + GetArcDirection,'GetArcDirection',\ + GetAspectRatioFilterEx,'GetAspectRatioFilterEx',\ + GetBitmapBits,'GetBitmapBits',\ + GetBitmapDimensionEx,'GetBitmapDimensionEx',\ + GetBkColor,'GetBkColor',\ + GetBkMode,'GetBkMode',\ + GetBoundsRect,'GetBoundsRect',\ + GetBrushOrgEx,'GetBrushOrgEx',\ + GetCharABCWidthsA,'GetCharABCWidthsA',\ + GetCharABCWidthsW,'GetCharABCWidthsW',\ + GetCharABCWidthsFloatA,'GetCharABCWidthsFloatA',\ + GetCharABCWidthsFloatW,'GetCharABCWidthsFloatW',\ + GetCharABCWidthsI,'GetCharABCWidthsI',\ + GetCharWidth32A,'GetCharWidth32A',\ + GetCharWidth32W,'GetCharWidth32W',\ + GetCharWidthA,'GetCharWidthA',\ + GetCharWidthW,'GetCharWidthW',\ + GetCharWidthFloatA,'GetCharWidthFloatA',\ + GetCharWidthFloatW,'GetCharWidthFloatW',\ + GetCharWidthI,'GetCharWidthI',\ + GetCharacterPlacementA,'GetCharacterPlacementA',\ + GetCharacterPlacementW,'GetCharacterPlacementW',\ + GetClipBox,'GetClipBox',\ + GetClipRgn,'GetClipRgn',\ + GetColorAdjustment,'GetColorAdjustment',\ + GetColorSpace,'GetColorSpace',\ + GetCurrentObject,'GetCurrentObject',\ + GetCurrentPositionEx,'GetCurrentPositionEx',\ + GetDCBrushColor,'GetDCBrushColor',\ + GetDCOrgEx,'GetDCOrgEx',\ + GetDCPenColor,'GetDCPenColor',\ + GetDIBColorTable,'GetDIBColorTable',\ + GetDIBits,'GetDIBits',\ + GetDeviceCaps,'GetDeviceCaps',\ + GetDeviceGammaRamp,'GetDeviceGammaRamp',\ + GetEnhMetaFileA,'GetEnhMetaFileA',\ + GetEnhMetaFileW,'GetEnhMetaFileW',\ + GetEnhMetaFileBits,'GetEnhMetaFileBits',\ + GetEnhMetaFileDescriptionA,'GetEnhMetaFileDescriptionA',\ + GetEnhMetaFileDescriptionW,'GetEnhMetaFileDescriptionW',\ + GetEnhMetaFileHeader,'GetEnhMetaFileHeader',\ + GetEnhMetaFilePaletteEntries,'GetEnhMetaFilePaletteEntries',\ + GetEnhMetaFilePixelFormat,'GetEnhMetaFilePixelFormat',\ + GetFontAssocStatus,'GetFontAssocStatus',\ + GetFontData,'GetFontData',\ + GetFontLanguageInfo,'GetFontLanguageInfo',\ + GetFontUnicodeRanges,'GetFontUnicodeRanges',\ + GetGlyphIndicesA,'GetGlyphIndicesA',\ + GetGlyphIndicesW,'GetGlyphIndicesW',\ + GetGlyphOutlineA,'GetGlyphOutlineA',\ + GetGlyphOutlineW,'GetGlyphOutlineW',\ + GetGraphicsMode,'GetGraphicsMode',\ + GetICMProfileA,'GetICMProfileA',\ + GetICMProfileW,'GetICMProfileW',\ + GetKerningPairsA,'GetKerningPairsA',\ + GetKerningPairsW,'GetKerningPairsW',\ + GetLogColorSpaceA,'GetLogColorSpaceA',\ + GetLogColorSpaceW,'GetLogColorSpaceW',\ + GetMapMode,'GetMapMode',\ + GetMetaFileA,'GetMetaFileA',\ + GetMetaFileW,'GetMetaFileW',\ + GetMetaFileBitsEx,'GetMetaFileBitsEx',\ + GetMetaRgn,'GetMetaRgn',\ + GetMiterLimit,'GetMiterLimit',\ + GetNearestColor,'GetNearestColor',\ + GetNearestPaletteIndex,'GetNearestPaletteIndex',\ + GetObjectA,'GetObjectA',\ + GetObjectW,'GetObjectW',\ + GetObjectType,'GetObjectType',\ + GetOutlineTextMetricsA,'GetOutlineTextMetricsA',\ + GetOutlineTextMetricsW,'GetOutlineTextMetricsW',\ + GetPaletteEntries,'GetPaletteEntries',\ + GetPath,'GetPath',\ + GetPixel,'GetPixel',\ + GetPixelFormat,'GetPixelFormat',\ + GetPolyFillMode,'GetPolyFillMode',\ + GetROP2,'GetROP2',\ + GetRandomRgn,'GetRandomRgn',\ + GetRasterizerCaps,'GetRasterizerCaps',\ + GetRegionData,'GetRegionData',\ + GetRelAbs,'GetRelAbs',\ + GetRgnBox,'GetRgnBox',\ + GetStockObject,'GetStockObject',\ + GetStretchBltMode,'GetStretchBltMode',\ + GetSystemPaletteEntries,'GetSystemPaletteEntries',\ + GetSystemPaletteUse,'GetSystemPaletteUse',\ + GetTextAlign,'GetTextAlign',\ + GetTextCharacterExtra,'GetTextCharacterExtra',\ + GetTextCharset,'GetTextCharset',\ + GetTextCharsetInfo,'GetTextCharsetInfo',\ + GetTextColor,'GetTextColor',\ + GetTextExtentExPointA,'GetTextExtentExPointA',\ + GetTextExtentExPointW,'GetTextExtentExPointW',\ + GetTextExtentExPointI,'GetTextExtentExPointI',\ + GetTextExtentPoint32A,'GetTextExtentPoint32A',\ + GetTextExtentPoint32W,'GetTextExtentPoint32W',\ + GetTextExtentPointA,'GetTextExtentPointA',\ + GetTextExtentPointW,'GetTextExtentPointW',\ + GetTextExtentPointI,'GetTextExtentPointI',\ + GetTextFaceA,'GetTextFaceA',\ + GetTextFaceW,'GetTextFaceW',\ + GetTextMetricsA,'GetTextMetricsA',\ + GetTextMetricsW,'GetTextMetricsW',\ + GetViewportExtEx,'GetViewportExtEx',\ + GetViewportOrgEx,'GetViewportOrgEx',\ + GetWinMetaFileBits,'GetWinMetaFileBits',\ + GetWindowExtEx,'GetWindowExtEx',\ + GetWindowOrgEx,'GetWindowOrgEx',\ + GetWorldTransform,'GetWorldTransform',\ + IntersectClipRect,'IntersectClipRect',\ + InvertRgn,'InvertRgn',\ + LPtoDP,'LPtoDP',\ + LineDDA,'LineDDA',\ + LineDDW,'LineDDW',\ + LineTo,'LineTo',\ + MaskBlt,'MaskBlt',\ + ModifyWorldTransform,'ModifyWorldTransform',\ + MoveToEx,'MoveToEx',\ + OffsetClipRgn,'OffsetClipRgn',\ + OffsetRgn,'OffsetRgn',\ + OffsetViewportOrgEx,'OffsetViewportOrgEx',\ + OffsetWindowOrgEx,'OffsetWindowOrgEx',\ + PaintRgn,'PaintRgn',\ + PatBlt,'PatBlt',\ + PathToRegion,'PathToRegion',\ + Pie,'Pie',\ + PlayEnhMetaFile,'PlayEnhMetaFile',\ + PlayEnhMetaFileRecord,'PlayEnhMetaFileRecord',\ + PlayMetaFile,'PlayMetaFile',\ + PlayMetaFileRecord,'PlayMetaFileRecord',\ + PlgBlt,'PlgBlt',\ + PolyBezier,'PolyBezier',\ + PolyBezierTo,'PolyBezierTo',\ + PolyDraw,'PolyDraw',\ + PolyPatBlt,'PolyPatBlt',\ + PolyPolygon,'PolyPolygon',\ + PolyPolyline,'PolyPolyline',\ + PolyTextOutA,'PolyTextOutA',\ + PolyTextOutW,'PolyTextOutW',\ + Polygon,'Polygon',\ + Polyline,'Polyline',\ + PolylineTo,'PolylineTo',\ + PtInRegion,'PtInRegion',\ + PtVisible,'PtVisible',\ + RealizePalette,'RealizePalette',\ + RectInRegion,'RectInRegion',\ + RectVisible,'RectVisible',\ + Rectangle,'Rectangle',\ + RemoveFontMemResourceEx,'RemoveFontMemResourceEx',\ + RemoveFontResourceA,'RemoveFontResourceA',\ + RemoveFontResourceW,'RemoveFontResourceW',\ + RemoveFontResourceExA,'RemoveFontResourceExA',\ + RemoveFontResourceExW,'RemoveFontResourceExW',\ + ResetDCA,'ResetDCA',\ + ResetDCW,'ResetDCW',\ + ResizePalette,'ResizePalette',\ + RestoreDC,'RestoreDC',\ + RoundRect,'RoundRect',\ + SaveDC,'SaveDC',\ + ScaleViewportExtEx,'ScaleViewportExtEx',\ + ScaleWindowExtEx,'ScaleWindowExtEx',\ + SelectBrushLocal,'SelectBrushLocal',\ + SelectClipPath,'SelectClipPath',\ + SelectClipRgn,'SelectClipRgn',\ + SelectFontLocal,'SelectFontLocal',\ + SelectObject,'SelectObject',\ + SelectPalette,'SelectPalette',\ + SetAbortProc,'SetAbortProc',\ + SetArcDirection,'SetArcDirection',\ + SetBitmapBits,'SetBitmapBits',\ + SetBitmapDimensionEx,'SetBitmapDimensionEx',\ + SetBkColor,'SetBkColor',\ + SetBkMode,'SetBkMode',\ + SetBoundsRect,'SetBoundsRect',\ + SetBrushOrgEx,'SetBrushOrgEx',\ + SetColorAdjustment,'SetColorAdjustment',\ + SetColorSpace,'SetColorSpace',\ + SetDCBrushColor,'SetDCBrushColor',\ + SetDCPenColor,'SetDCPenColor',\ + SetDIBColorTable,'SetDIBColorTable',\ + SetDIBits,'SetDIBits',\ + SetDIBitsToDevice,'SetDIBitsToDevice',\ + SetDeviceGammaRamp,'SetDeviceGammaRamp',\ + SetEnhMetaFileBits,'SetEnhMetaFileBits',\ + SetFontEnumeration,'SetFontEnumeration',\ + SetGraphicsMode,'SetGraphicsMode',\ + SetICMMode,'SetICMMode',\ + SetICMProfileA,'SetICMProfileA',\ + SetICMProfileW,'SetICMProfileW',\ + SetMagicColors,'SetMagicColors',\ + SetMapMode,'SetMapMode',\ + SetMapperFlags,'SetMapperFlags',\ + SetMetaFileBitsEx,'SetMetaFileBitsEx',\ + SetMetaRgn,'SetMetaRgn',\ + SetMiterLimit,'SetMiterLimit',\ + SetPaletteEntries,'SetPaletteEntries',\ + SetPixel,'SetPixel',\ + SetPixelFormat,'SetPixelFormat',\ + SetPixelV,'SetPixelV',\ + SetPolyFillMode,'SetPolyFillMode',\ + SetROP2,'SetROP2',\ + SetRectRgn,'SetRectRgn',\ + SetRelAbs,'SetRelAbs',\ + SetStretchBltMode,'SetStretchBltMode',\ + SetSystemPaletteUse,'SetSystemPaletteUse',\ + SetTextAlign,'SetTextAlign',\ + SetTextCharacterExtra,'SetTextCharacterExtra',\ + SetTextColor,'SetTextColor',\ + SetTextJustification,'SetTextJustification',\ + SetViewportExtEx,'SetViewportExtEx',\ + SetViewportOrgEx,'SetViewportOrgEx',\ + SetWinMetaFileBits,'SetWinMetaFileBits',\ + SetWindowExtEx,'SetWindowExtEx',\ + SetWindowOrgEx,'SetWindowOrgEx',\ + SetWorldTransform,'SetWorldTransform',\ + StartDocA,'StartDocA',\ + StartDocW,'StartDocW',\ + StartPage,'StartPage',\ + StretchBlt,'StretchBlt',\ + StretchDIBits,'StretchDIBits',\ + StrokeAndFillPath,'StrokeAndFillPath',\ + StrokePath,'StrokePath',\ + SwapBuffers,'SwapBuffers',\ + TextOutA,'TextOutA',\ + TextOutW,'TextOutW',\ + TranslateCharsetInfo,'TranslateCharsetInfo',\ + UnrealizeObject,'UnrealizeObject',\ + UpdateColors,'UpdateColors',\ + UpdateICMRegKeyA,'UpdateICMRegKeyA',\ + UpdateICMRegKeyW,'UpdateICMRegKeyW',\ + WidenPath,'WidenPath',\ + gdiPlaySpoolStream,'gdiPlaySpoolStream' + +api AddFontResource,\ + AddFontResourceEx,\ + CopyEnhMetaFile,\ + CopyMetaFile,\ + CreateColorSpace,\ + CreateDC,\ + CreateEnhMetaFile,\ + CreateFont,\ + CreateFontIndirect,\ + CreateFontIndirectEx,\ + CreateIC,\ + CreateMetaFile,\ + CreateScalableFontResource,\ + DeviceCapabilitiesEx,\ + EnumFontFamilies,\ + EnumFontFamiliesEx,\ + EnumFonts,\ + EnumICMProfiles,\ + ExtTextOut,\ + GetCharABCWidths,\ + GetCharABCWidthsFloat,\ + GetCharWidth32,\ + GetCharWidth,\ + GetCharWidthFloat,\ + GetCharacterPlacement,\ + GetEnhMetaFile,\ + GetEnhMetaFileDescription,\ + GetGlyphIndices,\ + GetGlyphOutline,\ + GetICMProfile,\ + GetKerningPairs,\ + GetLogColorSpace,\ + GetMetaFile,\ + GetObject,\ + GetOutlineTextMetrics,\ + GetTextExtentExPoint,\ + GetTextExtentPoint32,\ + GetTextExtentPoint,\ + GetTextFace,\ + GetTextMetrics,\ + LineDD,\ + PolyTextOut,\ + RemoveFontResource,\ + RemoveFontResourceEx,\ + ResetDC,\ + SetICMProfile,\ + StartDoc,\ + TextOut,\ + UpdateICMRegKey diff --git a/asm/equihash/Windows/INCLUDE/API/KERNEL32.INC b/asm/equihash/Windows/INCLUDE/API/KERNEL32.INC new file mode 100644 index 0000000..6bdd057 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/API/KERNEL32.INC @@ -0,0 +1,879 @@ + +; KERNEL32 API calls + +import kernel32,\ + AddAtomA,'AddAtomA',\ + AddAtomW,'AddAtomW',\ + AddConsoleAliasA,'AddConsoleAliasA',\ + AddConsoleAliasW,'AddConsoleAliasW',\ + AllocConsole,'AllocConsole',\ + AreFileApisANSI,'AreFileApisANSI',\ + AssignProcessToJobObject,'AssignProcessToJobObject',\ + BackupRead,'BackupRead',\ + BackupSeek,'BackupSeek',\ + BackupWrite,'BackupWrite',\ + BaseAttachCompleteThunk,'BaseAttachCompleteThunk',\ + Beep,'Beep',\ + BeginUpdateResourceA,'BeginUpdateResourceA',\ + BeginUpdateResourceW,'BeginUpdateResourceW',\ + BuildCommDCBA,'BuildCommDCBA',\ + BuildCommDCBW,'BuildCommDCBW',\ + BuildCommDCBAndTimeoutsA,'BuildCommDCBAndTimeoutsA',\ + BuildCommDCBAndTimeoutsW,'BuildCommDCBAndTimeoutsW',\ + CallNamedPipeA,'CallNamedPipeA',\ + CallNamedPipeW,'CallNamedPipeW',\ + CancelIo,'CancelIo',\ + CancelWaitableTimer,'CancelWaitableTimer',\ + ClearCommBreak,'ClearCommBreak',\ + ClearCommError,'ClearCommError',\ + CloseConsoleHandle,'CloseConsoleHandle',\ + CloseHandle,'CloseHandle',\ + CloseProfileUserMapping,'CloseProfileUserMapping',\ + CmdBatNotification,'CmdBatNotification',\ + CommConfigDialogA,'CommConfigDialogA',\ + CommConfigDialogW,'CommConfigDialogW',\ + CompareFileTime,'CompareFileTime',\ + CompareStringA,'CompareStringA',\ + CompareStringW,'CompareStringW',\ + ConnectNamedPipe,'ConnectNamedPipe',\ + ConsoleMenuControl,'ConsoleMenuControl',\ + ContinueDebugEvent,'ContinueDebugEvent',\ + ConvertDefaultLocale,'ConvertDefaultLocale',\ + ConvertThreadToFiber,'ConvertThreadToFiber',\ + CopyFileA,'CopyFileA',\ + CopyFileW,'CopyFileW',\ + CopyFileExA,'CopyFileExA',\ + CopyFileExW,'CopyFileExW',\ + CreateConsoleScreenBuffer,'CreateConsoleScreenBuffer',\ + CreateDirectoryA,'CreateDirectoryA',\ + CreateDirectoryW,'CreateDirectoryW',\ + CreateDirectoryExA,'CreateDirectoryExA',\ + CreateDirectoryExW,'CreateDirectoryExW',\ + CreateEventA,'CreateEventA',\ + CreateEventW,'CreateEventW',\ + CreateFiber,'CreateFiber',\ + CreateFileA,'CreateFileA',\ + CreateFileW,'CreateFileW',\ + CreateFileMappingA,'CreateFileMappingA',\ + CreateFileMappingW,'CreateFileMappingW',\ + CreateHardLinkA,'CreateHardLinkA',\ + CreateHardLinkW,'CreateHardLinkW',\ + CreateIoCompletionPort,'CreateIoCompletionPort',\ + CreateJobObjectA,'CreateJobObjectA',\ + CreateJobObjectW,'CreateJobObjectW',\ + CreateMailslotA,'CreateMailslotA',\ + CreateMailslotW,'CreateMailslotW',\ + CreateMutexA,'CreateMutexA',\ + CreateMutexW,'CreateMutexW',\ + CreateNamedPipeA,'CreateNamedPipeA',\ + CreateNamedPipeW,'CreateNamedPipeW',\ + CreatePipe,'CreatePipe',\ + CreateProcessA,'CreateProcessA',\ + CreateProcessW,'CreateProcessW',\ + CreateRemoteThread,'CreateRemoteThread',\ + CreateSemaphoreA,'CreateSemaphoreA',\ + CreateSemaphoreW,'CreateSemaphoreW',\ + CreateTapePartition,'CreateTapePartition',\ + CreateThread,'CreateThread',\ + CreateToolhelp32Snapshot,'CreateToolhelp32Snapshot',\ + CreateVirtualBuffer,'CreateVirtualBuffer',\ + CreateWaitableTimerA,'CreateWaitableTimerA',\ + CreateWaitableTimerW,'CreateWaitableTimerW',\ + DebugActiveProcess,'DebugActiveProcess',\ + DebugBreak,'DebugBreak',\ + DefineDosDeviceA,'DefineDosDeviceA',\ + DefineDosDeviceW,'DefineDosDeviceW',\ + DeleteAtom,'DeleteAtom',\ + DeleteCriticalSection,'DeleteCriticalSection',\ + DeleteFiber,'DeleteFiber',\ + DeleteFileA,'DeleteFileA',\ + DeleteFileW,'DeleteFileW',\ + DeviceIoControl,'DeviceIoControl',\ + DisableThreadLibraryCalls,'DisableThreadLibraryCalls',\ + DisconnectNamedPipe,'DisconnectNamedPipe',\ + DosDateTimeToFileTime,'DosDateTimeToFileTime',\ + DuplicateConsoleHandle,'DuplicateConsoleHandle',\ + DuplicateHandle,'DuplicateHandle',\ + EndUpdateResourceA,'EndUpdateResourceA',\ + EndUpdateResourceW,'EndUpdateResourceW',\ + EnterCriticalSection,'EnterCriticalSection',\ + EnumCalendarInfoA,'EnumCalendarInfoA',\ + EnumCalendarInfoW,'EnumCalendarInfoW',\ + EnumCalendarInfoExA,'EnumCalendarInfoExA',\ + EnumCalendarInfoExW,'EnumCalendarInfoExW',\ + EnumDateFormatsA,'EnumDateFormatsA',\ + EnumDateFormatsW,'EnumDateFormatsW',\ + EnumDateFormatsExA,'EnumDateFormatsExA',\ + EnumDateFormatsExW,'EnumDateFormatsExW',\ + EnumResourceLanguagesA,'EnumResourceLanguagesA',\ + EnumResourceLanguagesW,'EnumResourceLanguagesW',\ + EnumResourceNamesA,'EnumResourceNamesA',\ + EnumResourceNamesW,'EnumResourceNamesW',\ + EnumResourceTypesA,'EnumResourceTypesA',\ + EnumResourceTypesW,'EnumResourceTypesW',\ + EnumSystemCodePagesA,'EnumSystemCodePagesA',\ + EnumSystemCodePagesW,'EnumSystemCodePagesW',\ + EnumSystemLocalesA,'EnumSystemLocalesA',\ + EnumSystemLocalesW,'EnumSystemLocalesW',\ + EnumTimeFormatsA,'EnumTimeFormatsA',\ + EnumTimeFormatsW,'EnumTimeFormatsW',\ + EraseTape,'EraseTape',\ + EscapeCommFunction,'EscapeCommFunction',\ + ExitProcess,'ExitProcess',\ + ExitThread,'ExitThread',\ + ExitVDM,'ExitVDM',\ + ExpandEnvironmentStringsA,'ExpandEnvironmentStringsA',\ + ExpandEnvironmentStringsW,'ExpandEnvironmentStringsW',\ + ExpungeConsoleCommandHistoryA,'ExpungeConsoleCommandHistoryA',\ + ExpungeConsoleCommandHistoryW,'ExpungeConsoleCommandHistoryW',\ + ExtendVirtualBuffer,'ExtendVirtualBuffer',\ + FatalAppExitA,'FatalAppExitA',\ + FatalAppExitW,'FatalAppExitW',\ + FatalExit,'FatalExit',\ + FileTimeToDosDateTime,'FileTimeToDosDateTime',\ + FileTimeToLocalFileTime,'FileTimeToLocalFileTime',\ + FileTimeToSystemTime,'FileTimeToSystemTime',\ + FillConsoleOutputAttribute,'FillConsoleOutputAttribute',\ + FillConsoleOutputCharacterA,'FillConsoleOutputCharacterA',\ + FillConsoleOutputCharacterW,'FillConsoleOutputCharacterW',\ + FindAtomA,'FindAtomA',\ + FindAtomW,'FindAtomW',\ + FindClose,'FindClose',\ + FindCloseChangeNotification,'FindCloseChangeNotification',\ + FindFirstChangeNotificationA,'FindFirstChangeNotificationA',\ + FindFirstChangeNotificationW,'FindFirstChangeNotificationW',\ + FindFirstFileA,'FindFirstFileA',\ + FindFirstFileW,'FindFirstFileW',\ + FindFirstFileExA,'FindFirstFileExA',\ + FindFirstFileExW,'FindFirstFileExW',\ + FindNextChangeNotification,'FindNextChangeNotification',\ + FindNextFileA,'FindNextFileA',\ + FindNextFileW,'FindNextFileW',\ + FindResourceA,'FindResourceA',\ + FindResourceW,'FindResourceW',\ + FindResourceExA,'FindResourceExA',\ + FindResourceExW,'FindResourceExW',\ + FlushConsoleInputBuffer,'FlushConsoleInputBuffer',\ + FlushFileBuffers,'FlushFileBuffers',\ + FlushInstructionCache,'FlushInstructionCache',\ + FlushViewOfFile,'FlushViewOfFile',\ + FoldStringA,'FoldStringA',\ + FoldStringW,'FoldStringW',\ + FormatMessageA,'FormatMessageA',\ + FormatMessageW,'FormatMessageW',\ + FreeConsole,'FreeConsole',\ + FreeEnvironmentStringsA,'FreeEnvironmentStringsA',\ + FreeEnvironmentStringsW,'FreeEnvironmentStringsW',\ + FreeLibrary,'FreeLibrary',\ + FreeLibraryAndExitThread,'FreeLibraryAndExitThread',\ + FreeResource,'FreeResource',\ + FreeVirtualBuffer,'FreeVirtualBuffer',\ + GenerateConsoleCtrlEvent,'GenerateConsoleCtrlEvent',\ + GetACP,'GetACP',\ + GetAtomNameA,'GetAtomNameA',\ + GetAtomNameW,'GetAtomNameW',\ + GetBinaryTypeA,'GetBinaryTypeA',\ + GetBinaryTypeW,'GetBinaryTypeW',\ + GetCPInfo,'GetCPInfo',\ + GetCPInfoExA,'GetCPInfoExA',\ + GetCPInfoExW,'GetCPInfoExW',\ + GetCommConfig,'GetCommConfig',\ + GetCommMask,'GetCommMask',\ + GetCommModemStatus,'GetCommModemStatus',\ + GetCommProperties,'GetCommProperties',\ + GetCommState,'GetCommState',\ + GetCommTimeouts,'GetCommTimeouts',\ + GetCommandLineA,'GetCommandLineA',\ + GetCommandLineW,'GetCommandLineW',\ + GetCompressedFileSizeA,'GetCompressedFileSizeA',\ + GetCompressedFileSizeW,'GetCompressedFileSizeW',\ + GetComputerNameA,'GetComputerNameA',\ + GetComputerNameW,'GetComputerNameW',\ + GetConsoleAliasA,'GetConsoleAliasA',\ + GetConsoleAliasW,'GetConsoleAliasW',\ + GetConsoleAliasExesA,'GetConsoleAliasExesA',\ + GetConsoleAliasExesW,'GetConsoleAliasExesW',\ + GetConsoleAliasExesLengthA,'GetConsoleAliasExesLengthA',\ + GetConsoleAliasExesLengthW,'GetConsoleAliasExesLengthW',\ + GetConsoleAliasesA,'GetConsoleAliasesA',\ + GetConsoleAliasesW,'GetConsoleAliasesW',\ + GetConsoleAliasesLengthA,'GetConsoleAliasesLengthA',\ + GetConsoleAliasesLengthW,'GetConsoleAliasesLengthW',\ + GetConsoleCP,'GetConsoleCP',\ + GetConsoleCommandHistoryA,'GetConsoleCommandHistoryA',\ + GetConsoleCommandHistoryW,'GetConsoleCommandHistoryW',\ + GetConsoleCommandHistoryLengthA,'GetConsoleCommandHistoryLengthA',\ + GetConsoleCommandHistoryLengthW,'GetConsoleCommandHistoryLengthW',\ + GetConsoleCursorInfo,'GetConsoleCursorInfo',\ + GetConsoleDisplayMode,'GetConsoleDisplayMode',\ + GetConsoleFontInfo,'GetConsoleFontInfo',\ + GetConsoleFontSize,'GetConsoleFontSize',\ + GetConsoleHardwareState,'GetConsoleHardwareState',\ + GetConsoleInputExeNameA,'GetConsoleInputExeNameA',\ + GetConsoleInputExeNameW,'GetConsoleInputExeNameW',\ + GetConsoleInputWaitHandle,'GetConsoleInputWaitHandle',\ + GetConsoleKeyboardLayoutNameA,'GetConsoleKeyboardLayoutNameA',\ + GetConsoleKeyboardLayoutNameW,'GetConsoleKeyboardLayoutNameW',\ + GetConsoleMode,'GetConsoleMode',\ + GetConsoleOutputCP,'GetConsoleOutputCP',\ + GetConsoleScreenBufferInfo,'GetConsoleScreenBufferInfo',\ + GetConsoleTitleA,'GetConsoleTitleA',\ + GetConsoleTitleW,'GetConsoleTitleW',\ + GetConsoleWindow,'GetConsoleWindow',\ + GetCurrencyFormatA,'GetCurrencyFormatA',\ + GetCurrencyFormatW,'GetCurrencyFormatW',\ + GetCurrentConsoleFont,'GetCurrentConsoleFont',\ + GetCurrentDirectoryA,'GetCurrentDirectoryA',\ + GetCurrentDirectoryW,'GetCurrentDirectoryW',\ + GetCurrentProcess,'GetCurrentProcess',\ + GetCurrentProcessId,'GetCurrentProcessId',\ + GetCurrentThread,'GetCurrentThread',\ + GetCurrentThreadId,'GetCurrentThreadId',\ + GetDateFormatA,'GetDateFormatA',\ + GetDateFormatW,'GetDateFormatW',\ + GetDefaultCommConfigA,'GetDefaultCommConfigA',\ + GetDefaultCommConfigW,'GetDefaultCommConfigW',\ + GetDevicePowerState,'GetDevicePowerState',\ + GetDiskFreeSpaceA,'GetDiskFreeSpaceA',\ + GetDiskFreeSpaceW,'GetDiskFreeSpaceW',\ + GetDiskFreeSpaceExA,'GetDiskFreeSpaceExA',\ + GetDiskFreeSpaceExW,'GetDiskFreeSpaceExW',\ + GetDriveTypeA,'GetDriveTypeA',\ + GetDriveTypeW,'GetDriveTypeW',\ + GetEnvironmentStringsA,'GetEnvironmentStringsA',\ + GetEnvironmentStringsW,'GetEnvironmentStringsW',\ + GetEnvironmentVariableA,'GetEnvironmentVariableA',\ + GetEnvironmentVariableW,'GetEnvironmentVariableW',\ + GetExitCodeProcess,'GetExitCodeProcess',\ + GetExitCodeThread,'GetExitCodeThread',\ + GetFileAttributesA,'GetFileAttributesA',\ + GetFileAttributesW,'GetFileAttributesW',\ + GetFileAttributesExA,'GetFileAttributesExA',\ + GetFileAttributesExW,'GetFileAttributesExW',\ + GetFileInformationByHandle,'GetFileInformationByHandle',\ + GetFileSize,'GetFileSize',\ + GetFileTime,'GetFileTime',\ + GetFileType,'GetFileType',\ + GetFullPathNameA,'GetFullPathNameA',\ + GetFullPathNameW,'GetFullPathNameW',\ + GetHandleInformation,'GetHandleInformation',\ + GetLargestConsoleWindowSize,'GetLargestConsoleWindowSize',\ + GetLastError,'GetLastError',\ + GetLocalTime,'GetLocalTime',\ + GetLocaleInfoA,'GetLocaleInfoA',\ + GetLocaleInfoW,'GetLocaleInfoW',\ + GetLogicalDriveStringsA,'GetLogicalDriveStringsA',\ + GetLogicalDriveStringsW,'GetLogicalDriveStringsW',\ + GetLogicalDrives,'GetLogicalDrives',\ + GetLongPathNameA,'GetLongPathNameA',\ + GetLongPathNameW,'GetLongPathNameW',\ + GetMailslotInfo,'GetMailslotInfo',\ + GetModuleFileNameA,'GetModuleFileNameA',\ + GetModuleFileNameW,'GetModuleFileNameW',\ + GetModuleHandleA,'GetModuleHandleA',\ + GetModuleHandleW,'GetModuleHandleW',\ + GetNamedPipeHandleStateA,'GetNamedPipeHandleStateA',\ + GetNamedPipeHandleStateW,'GetNamedPipeHandleStateW',\ + GetNamedPipeInfo,'GetNamedPipeInfo',\ + GetNextVDMCommand,'GetNextVDMCommand',\ + GetNumberFormatA,'GetNumberFormatA',\ + GetNumberFormatW,'GetNumberFormatW',\ + GetNumberOfConsoleFonts,'GetNumberOfConsoleFonts',\ + GetNumberOfConsoleInputEvents,'GetNumberOfConsoleInputEvents',\ + GetNumberOfConsoleMouseButtons,'GetNumberOfConsoleMouseButtons',\ + GetOEMCP,'GetOEMCP',\ + GetOverlappedResult,'GetOverlappedResult',\ + GetPriorityClass,'GetPriorityClass',\ + GetPrivateProfileIntA,'GetPrivateProfileIntA',\ + GetPrivateProfileIntW,'GetPrivateProfileIntW',\ + GetPrivateProfileSectionA,'GetPrivateProfileSectionA',\ + GetPrivateProfileSectionW,'GetPrivateProfileSectionW',\ + GetPrivateProfileSectionNamesA,'GetPrivateProfileSectionNamesA',\ + GetPrivateProfileSectionNamesW,'GetPrivateProfileSectionNamesW',\ + GetPrivateProfileStringA,'GetPrivateProfileStringA',\ + GetPrivateProfileStringW,'GetPrivateProfileStringW',\ + GetPrivateProfileStructA,'GetPrivateProfileStructA',\ + GetPrivateProfileStructW,'GetPrivateProfileStructW',\ + GetProcAddress,'GetProcAddress',\ + GetProcessAffinityMask,'GetProcessAffinityMask',\ + GetProcessHeap,'GetProcessHeap',\ + GetProcessHeaps,'GetProcessHeaps',\ + GetProcessPriorityBoost,'GetProcessPriorityBoost',\ + GetProcessShutdownParameters,'GetProcessShutdownParameters',\ + GetProcessTimes,'GetProcessTimes',\ + GetProcessVersion,'GetProcessVersion',\ + GetProcessWorkingSetSize,'GetProcessWorkingSetSize',\ + GetProfileIntA,'GetProfileIntA',\ + GetProfileIntW,'GetProfileIntW',\ + GetProfileSectionA,'GetProfileSectionA',\ + GetProfileSectionW,'GetProfileSectionW',\ + GetProfileStringA,'GetProfileStringA',\ + GetProfileStringW,'GetProfileStringW',\ + GetQueuedCompletionStatus,'GetQueuedCompletionStatus',\ + GetShortPathNameA,'GetShortPathNameA',\ + GetShortPathNameW,'GetShortPathNameW',\ + GetStartupInfoA,'GetStartupInfoA',\ + GetStartupInfoW,'GetStartupInfoW',\ + GetStdHandle,'GetStdHandle',\ + GetStringTypeA,'GetStringTypeA',\ + GetStringTypeW,'GetStringTypeW',\ + GetStringTypeExA,'GetStringTypeExA',\ + GetStringTypeExW,'GetStringTypeExW',\ + GetSystemDefaultLCID,'GetSystemDefaultLCID',\ + GetSystemDefaultLangID,'GetSystemDefaultLangID',\ + GetSystemDirectoryA,'GetSystemDirectoryA',\ + GetSystemDirectoryW,'GetSystemDirectoryW',\ + GetSystemInfo,'GetSystemInfo',\ + GetSystemPowerStatus,'GetSystemPowerStatus',\ + GetSystemTime,'GetSystemTime',\ + GetSystemTimeAdjustment,'GetSystemTimeAdjustment',\ + GetSystemTimeAsFileTime,'GetSystemTimeAsFileTime',\ + GetTapeParameters,'GetTapeParameters',\ + GetTapePosition,'GetTapePosition',\ + GetTapeStatus,'GetTapeStatus',\ + GetTempFileNameA,'GetTempFileNameA',\ + GetTempFileNameW,'GetTempFileNameW',\ + GetTempPathA,'GetTempPathA',\ + GetTempPathW,'GetTempPathW',\ + GetThreadContext,'GetThreadContext',\ + GetThreadLocale,'GetThreadLocale',\ + GetThreadPriority,'GetThreadPriority',\ + GetThreadPriorityBoost,'GetThreadPriorityBoost',\ + GetThreadSelectorEntry,'GetThreadSelectorEntry',\ + GetThreadTimes,'GetThreadTimes',\ + GetTickCount,'GetTickCount',\ + GetTimeFormatA,'GetTimeFormatA',\ + GetTimeFormatW,'GetTimeFormatW',\ + GetTimeZoneInformation,'GetTimeZoneInformation',\ + GetUserDefaultLCID,'GetUserDefaultLCID',\ + GetUserDefaultLangID,'GetUserDefaultLangID',\ + GetVDMCurrentDirectories,'GetVDMCurrentDirectories',\ + GetVersion,'GetVersion',\ + GetVersionExA,'GetVersionExA',\ + GetVersionExW,'GetVersionExW',\ + GetVolumeInformationA,'GetVolumeInformationA',\ + GetVolumeInformationW,'GetVolumeInformationW',\ + GetWindowsDirectoryA,'GetWindowsDirectoryA',\ + GetWindowsDirectoryW,'GetWindowsDirectoryW',\ + GlobalAddAtomA,'GlobalAddAtomA',\ + GlobalAddAtomW,'GlobalAddAtomW',\ + GlobalAlloc,'GlobalAlloc',\ + GlobalCompact,'GlobalCompact',\ + GlobalDeleteAtom,'GlobalDeleteAtom',\ + GlobalFindAtomA,'GlobalFindAtomA',\ + GlobalFindAtomW,'GlobalFindAtomW',\ + GlobalFix,'GlobalFix',\ + GlobalFlags,'GlobalFlags',\ + GlobalFree,'GlobalFree',\ + GlobalGetAtomNameA,'GlobalGetAtomNameA',\ + GlobalGetAtomNameW,'GlobalGetAtomNameW',\ + GlobalHandle,'GlobalHandle',\ + GlobalLock,'GlobalLock',\ + GlobalMemoryStatus,'GlobalMemoryStatus',\ + GlobalMemoryStatusVlm,'GlobalMemoryStatusVlm',\ + GlobalReAlloc,'GlobalReAlloc',\ + GlobalSize,'GlobalSize',\ + GlobalUnWire,'GlobalUnWire',\ + GlobalUnfix,'GlobalUnfix',\ + GlobalUnlock,'GlobalUnlock',\ + GlobalWire,'GlobalWire',\ + Heap32First,'Heap32First',\ + Heap32ListFirst,'Heap32ListFirst',\ + Heap32ListNext,'Heap32ListNext',\ + Heap32Next,'Heap32Next',\ + HeapAlloc,'HeapAlloc',\ + HeapCompact,'HeapCompact',\ + HeapCreate,'HeapCreate',\ + HeapDestroy,'HeapDestroy',\ + HeapExtend,'HeapExtend',\ + HeapFree,'HeapFree',\ + HeapLock,'HeapLock',\ + HeapReAlloc,'HeapReAlloc',\ + HeapSize,'HeapSize',\ + HeapSummary,'HeapSummary',\ + HeapUnlock,'HeapUnlock',\ + HeapUsage,'HeapUsage',\ + HeapValidate,'HeapValidate',\ + HeapWalk,'HeapWalk',\ + InitAtomTable,'InitAtomTable',\ + InitializeCriticalSection,'InitializeCriticalSection',\ + InitializeCriticalSectionAndSpinCount,'InitializeCriticalSectionAndSpinCount',\ + InterlockedCompareExchange,'InterlockedCompareExchange',\ + InterlockedDecrement,'InterlockedDecrement',\ + InterlockedExchange,'InterlockedExchange',\ + InterlockedExchangeAdd,'InterlockedExchangeAdd',\ + InterlockedIncrement,'InterlockedIncrement',\ + InvalidateConsoleDIBits,'InvalidateConsoleDIBits',\ + IsBadCodePtr,'IsBadCodePtr',\ + IsBadHugeReadPtr,'IsBadHugeReadPtr',\ + IsBadHugeWritePtr,'IsBadHugeWritePtr',\ + IsBadReadPtr,'IsBadReadPtr',\ + IsBadStringPtrA,'IsBadStringPtrA',\ + IsBadStringPtrW,'IsBadStringPtrW',\ + IsBadWritePtr,'IsBadWritePtr',\ + IsDBCSLeadByte,'IsDBCSLeadByte',\ + IsDBCSLeadByteEx,'IsDBCSLeadByteEx',\ + IsDebuggerPresent,'IsDebuggerPresent',\ + IsProcessorFeaturePresent,'IsProcessorFeaturePresent',\ + IsValidCodePage,'IsValidCodePage',\ + IsValidLocale,'IsValidLocale',\ + LCMapStringA,'LCMapStringA',\ + LCMapStringW,'LCMapStringW',\ + LeaveCriticalSection,'LeaveCriticalSection',\ + LoadLibraryA,'LoadLibraryA',\ + LoadLibraryW,'LoadLibraryW',\ + LoadLibraryExA,'LoadLibraryExA',\ + LoadLibraryExW,'LoadLibraryExW',\ + LoadModule,'LoadModule',\ + LoadResource,'LoadResource',\ + LocalAlloc,'LocalAlloc',\ + LocalCompact,'LocalCompact',\ + LocalFileTimeToFileTime,'LocalFileTimeToFileTime',\ + LocalFlags,'LocalFlags',\ + LocalFree,'LocalFree',\ + LocalHandle,'LocalHandle',\ + LocalLock,'LocalLock',\ + LocalReAlloc,'LocalReAlloc',\ + LocalShrink,'LocalShrink',\ + LocalSize,'LocalSize',\ + LocalUnlock,'LocalUnlock',\ + LockFile,'LockFile',\ + LockFileEx,'LockFileEx',\ + LockResource,'LockResource',\ + MapViewOfFile,'MapViewOfFile',\ + MapViewOfFileEx,'MapViewOfFileEx',\ + MapViewOfFileVlm,'MapViewOfFileVlm',\ + Module32First,'Module32First',\ + Module32Next,'Module32Next',\ + MoveFileA,'MoveFileA',\ + MoveFileW,'MoveFileW',\ + MoveFileExA,'MoveFileExA',\ + MoveFileExW,'MoveFileExW',\ + MoveFileWithProgressA,'MoveFileWithProgressA',\ + MoveFileWithProgressW,'MoveFileWithProgressW',\ + MulDiv,'MulDiv',\ + MultiByteToWideChar,'MultiByteToWideChar',\ + OpenEventA,'OpenEventA',\ + OpenEventW,'OpenEventW',\ + OpenFile,'OpenFile',\ + OpenFileMappingA,'OpenFileMappingA',\ + OpenFileMappingW,'OpenFileMappingW',\ + OpenJobObjectA,'OpenJobObjectA',\ + OpenJobObjectW,'OpenJobObjectW',\ + OpenMutexA,'OpenMutexA',\ + OpenMutexW,'OpenMutexW',\ + OpenProcess,'OpenProcess',\ + OpenProfileUserMapping,'OpenProfileUserMapping',\ + OpenSemaphoreA,'OpenSemaphoreA',\ + OpenSemaphoreW,'OpenSemaphoreW',\ + OpenWaitableTimerA,'OpenWaitableTimerA',\ + OpenWaitableTimerW,'OpenWaitableTimerW',\ + OutputDebugStringA,'OutputDebugStringA',\ + OutputDebugStringW,'OutputDebugStringW',\ + PeekConsoleInputA,'PeekConsoleInputA',\ + PeekConsoleInputW,'PeekConsoleInputW',\ + PeekNamedPipe,'PeekNamedPipe',\ + PostQueuedCompletionStatus,'PostQueuedCompletionStatus',\ + PrepareTape,'PrepareTape',\ + Process32First,'Process32First',\ + Process32Next,'Process32Next',\ + PulseEvent,'PulseEvent',\ + PurgeComm,'PurgeComm',\ + QueryDosDeviceA,'QueryDosDeviceA',\ + QueryDosDeviceW,'QueryDosDeviceW',\ + QueryInformationJobObject,'QueryInformationJobObject',\ + QueryPerformanceCounter,'QueryPerformanceCounter',\ + QueryPerformanceFrequency,'QueryPerformanceFrequency',\ + QueryWin31IniFilesMappedToRegistry,'QueryWin31IniFilesMappedToRegistry',\ + QueueUserAPC,'QueueUserAPC',\ + RaiseException,'RaiseException',\ + ReadConsoleA,'ReadConsoleA',\ + ReadConsoleW,'ReadConsoleW',\ + ReadConsoleInputA,'ReadConsoleInputA',\ + ReadConsoleInputW,'ReadConsoleInputW',\ + ReadConsoleInputExA,'ReadConsoleInputExA',\ + ReadConsoleInputExW,'ReadConsoleInputExW',\ + ReadConsoleOutputA,'ReadConsoleOutputA',\ + ReadConsoleOutputW,'ReadConsoleOutputW',\ + ReadConsoleOutputAttribute,'ReadConsoleOutputAttribute',\ + ReadConsoleOutputCharacterA,'ReadConsoleOutputCharacterA',\ + ReadConsoleOutputCharacterW,'ReadConsoleOutputCharacterW',\ + ReadFile,'ReadFile',\ + ReadFileEx,'ReadFileEx',\ + ReadFileScatter,'ReadFileScatter',\ + ReadFileVlm,'ReadFileVlm',\ + ReadProcessMemory,'ReadProcessMemory',\ + ReadProcessMemoryVlm,'ReadProcessMemoryVlm',\ + RegisterConsoleVDM,'RegisterConsoleVDM',\ + RegisterWaitForInputIdle,'RegisterWaitForInputIdle',\ + RegisterWowBaseHandlers,'RegisterWowBaseHandlers',\ + RegisterWowExec,'RegisterWowExec',\ + ReleaseMutex,'ReleaseMutex',\ + ReleaseSemaphore,'ReleaseSemaphore',\ + RemoveDirectoryA,'RemoveDirectoryA',\ + RemoveDirectoryW,'RemoveDirectoryW',\ + RequestWakeupLatency,'RequestWakeupLatency',\ + ResetEvent,'ResetEvent',\ + ResumeThread,'ResumeThread',\ + RtlFillMemory,'RtlFillMemory',\ + RtlMoveMemory,'RtlMoveMemory',\ + RtlUnwind,'RtlUnwind',\ + RtlZeroMemory,'RtlZeroMemory',\ + ScrollConsoleScreenBufferA,'ScrollConsoleScreenBufferA',\ + ScrollConsoleScreenBufferW,'ScrollConsoleScreenBufferW',\ + SearchPathA,'SearchPathA',\ + SearchPathW,'SearchPathW',\ + SetCommBreak,'SetCommBreak',\ + SetCommConfig,'SetCommConfig',\ + SetCommMask,'SetCommMask',\ + SetCommState,'SetCommState',\ + SetCommTimeouts,'SetCommTimeouts',\ + SetComputerNameA,'SetComputerNameA',\ + SetComputerNameW,'SetComputerNameW',\ + SetConsoleActiveScreenBuffer,'SetConsoleActiveScreenBuffer',\ + SetConsoleCP,'SetConsoleCP',\ + SetConsoleCommandHistoryMode,'SetConsoleCommandHistoryMode',\ + SetConsoleCtrlHandler,'SetConsoleCtrlHandler',\ + SetConsoleCursor,'SetConsoleCursor',\ + SetConsoleCursorInfo,'SetConsoleCursorInfo',\ + SetConsoleCursorPosition,'SetConsoleCursorPosition',\ + SetConsoleDisplayMode,'SetConsoleDisplayMode',\ + SetConsoleFont,'SetConsoleFont',\ + SetConsoleHardwareState,'SetConsoleHardwareState',\ + SetConsoleIcon,'SetConsoleIcon',\ + SetConsoleInputExeNameA,'SetConsoleInputExeNameA',\ + SetConsoleInputExeNameW,'SetConsoleInputExeNameW',\ + SetConsoleKeyShortcuts,'SetConsoleKeyShortcuts',\ + SetConsoleMaximumWindowSize,'SetConsoleMaximumWindowSize',\ + SetConsoleMenuClose,'SetConsoleMenuClose',\ + SetConsoleMode,'SetConsoleMode',\ + SetConsoleNumberOfCommandsA,'SetConsoleNumberOfCommandsA',\ + SetConsoleNumberOfCommandsW,'SetConsoleNumberOfCommandsW',\ + SetConsoleOutputCP,'SetConsoleOutputCP',\ + SetConsolePalette,'SetConsolePalette',\ + SetConsoleScreenBufferSize,'SetConsoleScreenBufferSize',\ + SetConsoleTextAttribute,'SetConsoleTextAttribute',\ + SetConsoleTitleA,'SetConsoleTitleA',\ + SetConsoleTitleW,'SetConsoleTitleW',\ + SetConsoleWindowInfo,'SetConsoleWindowInfo',\ + SetCriticalSectionSpinCount,'SetCriticalSectionSpinCount',\ + SetCurrentDirectoryA,'SetCurrentDirectoryA',\ + SetCurrentDirectoryW,'SetCurrentDirectoryW',\ + SetDefaultCommConfigA,'SetDefaultCommConfigA',\ + SetDefaultCommConfigW,'SetDefaultCommConfigW',\ + SetEndOfFile,'SetEndOfFile',\ + SetEnvironmentVariableA,'SetEnvironmentVariableA',\ + SetEnvironmentVariableW,'SetEnvironmentVariableW',\ + SetErrorMode,'SetErrorMode',\ + SetEvent,'SetEvent',\ + SetFileApisToANSI,'SetFileApisToANSI',\ + SetFileApisToOEM,'SetFileApisToOEM',\ + SetFileAttributesA,'SetFileAttributesA',\ + SetFileAttributesW,'SetFileAttributesW',\ + SetFilePointer,'SetFilePointer',\ + SetFileTime,'SetFileTime',\ + SetHandleCount,'SetHandleCount',\ + SetHandleInformation,'SetHandleInformation',\ + SetInformationJobObject,'SetInformationJobObject',\ + SetLastConsoleEventActive,'SetLastConsoleEventActive',\ + SetLastError,'SetLastError',\ + SetLocalTime,'SetLocalTime',\ + SetLocaleInfoA,'SetLocaleInfoA',\ + SetLocaleInfoW,'SetLocaleInfoW',\ + SetMailslotInfo,'SetMailslotInfo',\ + SetNamedPipeHandleState,'SetNamedPipeHandleState',\ + SetPriorityClass,'SetPriorityClass',\ + SetProcessAffinityMask,'SetProcessAffinityMask',\ + SetProcessPriorityBoost,'SetProcessPriorityBoost',\ + SetProcessShutdownParameters,'SetProcessShutdownParameters',\ + SetProcessWorkingSetSize,'SetProcessWorkingSetSize',\ + SetStdHandle,'SetStdHandle',\ + SetSystemPowerState,'SetSystemPowerState',\ + SetSystemTime,'SetSystemTime',\ + SetSystemTimeAdjustment,'SetSystemTimeAdjustment',\ + SetTapeParameters,'SetTapeParameters',\ + SetTapePosition,'SetTapePosition',\ + SetThreadAffinityMask,'SetThreadAffinityMask',\ + SetThreadContext,'SetThreadContext',\ + SetThreadExecutionState,'SetThreadExecutionState',\ + SetThreadIdealProcessor,'SetThreadIdealProcessor',\ + SetThreadLocale,'SetThreadLocale',\ + SetThreadPriority,'SetThreadPriority',\ + SetThreadPriorityBoost,'SetThreadPriorityBoost',\ + SetTimeZoneInformation,'SetTimeZoneInformation',\ + SetUnhandledExceptionFilter,'SetUnhandledExceptionFilter',\ + SetVDMCurrentDirectories,'SetVDMCurrentDirectories',\ + SetVolumeLabelA,'SetVolumeLabelA',\ + SetVolumeLabelW,'SetVolumeLabelW',\ + SetWaitableTimer,'SetWaitableTimer',\ + SetupComm,'SetupComm',\ + ShowConsoleCursor,'ShowConsoleCursor',\ + SignalObjectAndWait,'SignalObjectAndWait',\ + SizeofResource,'SizeofResource',\ + Sleep,'Sleep',\ + SleepEx,'SleepEx',\ + SuspendThread,'SuspendThread',\ + SwitchToFiber,'SwitchToFiber',\ + SwitchToThread,'SwitchToThread',\ + SystemTimeToFileTime,'SystemTimeToFileTime',\ + SystemTimeToTzSpecificLocalTime,'SystemTimeToTzSpecificLocalTime',\ + TerminateJobObject,'TerminateJobObject',\ + TerminateProcess,'TerminateProcess',\ + TerminateThread,'TerminateThread',\ + Thread32First,'Thread32First',\ + Thread32Next,'Thread32Next',\ + TlsAlloc,'TlsAlloc',\ + TlsFree,'TlsFree',\ + TlsGetValue,'TlsGetValue',\ + TlsSetValue,'TlsSetValue',\ + Toolhelp32ReadProcessMemory,'Toolhelp32ReadProcessMemory',\ + TransactNamedPipe,'TransactNamedPipe',\ + TransmitCommChar,'TransmitCommChar',\ + TrimVirtualBuffer,'TrimVirtualBuffer',\ + TryEnterCriticalSection,'TryEnterCriticalSection',\ + UnhandledExceptionFilter,'UnhandledExceptionFilter',\ + UnlockFile,'UnlockFile',\ + UnlockFileEx,'UnlockFileEx',\ + UnmapViewOfFile,'UnmapViewOfFile',\ + UnmapViewOfFileVlm,'UnmapViewOfFileVlm',\ + UpdateResourceA,'UpdateResourceA',\ + UpdateResourceW,'UpdateResourceW',\ + VDMConsoleOperation,'VDMConsoleOperation',\ + VDMOperationStarted,'VDMOperationStarted',\ + VerLanguageNameA,'VerLanguageNameA',\ + VerLanguageNameW,'VerLanguageNameW',\ + VerifyConsoleIoHandle,'VerifyConsoleIoHandle',\ + VirtualAlloc,'VirtualAlloc',\ + VirtualAllocEx,'VirtualAllocEx',\ + VirtualAllocVlm,'VirtualAllocVlm',\ + VirtualBufferExceptionHandler,'VirtualBufferExceptionHandler',\ + VirtualFree,'VirtualFree',\ + VirtualFreeEx,'VirtualFreeEx',\ + VirtualFreeVlm,'VirtualFreeVlm',\ + VirtualLock,'VirtualLock',\ + VirtualProtect,'VirtualProtect',\ + VirtualProtectEx,'VirtualProtectEx',\ + VirtualProtectVlm,'VirtualProtectVlm',\ + VirtualQuery,'VirtualQuery',\ + VirtualQueryEx,'VirtualQueryEx',\ + VirtualQueryVlm,'VirtualQueryVlm',\ + VirtualUnlock,'VirtualUnlock',\ + WaitCommEvent,'WaitCommEvent',\ + WaitForDebugEvent,'WaitForDebugEvent',\ + WaitForMultipleObjects,'WaitForMultipleObjects',\ + WaitForMultipleObjectsEx,'WaitForMultipleObjectsEx',\ + WaitForSingleObject,'WaitForSingleObject',\ + WaitForSingleObjectEx,'WaitForSingleObjectEx',\ + WaitNamedPipeA,'WaitNamedPipeA',\ + WaitNamedPipeW,'WaitNamedPipeW',\ + WideCharToMultiByte,'WideCharToMultiByte',\ + WinExec,'WinExec',\ + WriteConsoleA,'WriteConsoleA',\ + WriteConsoleW,'WriteConsoleW',\ + WriteConsoleInputA,'WriteConsoleInputA',\ + WriteConsoleInputW,'WriteConsoleInputW',\ + WriteConsoleInputVDMA,'WriteConsoleInputVDMA',\ + WriteConsoleInputVDMW,'WriteConsoleInputVDMW',\ + WriteConsoleOutputA,'WriteConsoleOutputA',\ + WriteConsoleOutputW,'WriteConsoleOutputW',\ + WriteConsoleOutputAttribute,'WriteConsoleOutputAttribute',\ + WriteConsoleOutputCharacterA,'WriteConsoleOutputCharacterA',\ + WriteConsoleOutputCharacterW,'WriteConsoleOutputCharacterW',\ + WriteFile,'WriteFile',\ + WriteFileEx,'WriteFileEx',\ + WriteFileGather,'WriteFileGather',\ + WriteFileVlm,'WriteFileVlm',\ + WritePrivateProfileSectionA,'WritePrivateProfileSectionA',\ + WritePrivateProfileSectionW,'WritePrivateProfileSectionW',\ + WritePrivateProfileStringA,'WritePrivateProfileStringA',\ + WritePrivateProfileStringW,'WritePrivateProfileStringW',\ + WritePrivateProfileStructA,'WritePrivateProfileStructA',\ + WritePrivateProfileStructW,'WritePrivateProfileStructW',\ + WriteProcessMemory,'WriteProcessMemory',\ + WriteProcessMemoryVlm,'WriteProcessMemoryVlm',\ + WriteProfileSectionA,'WriteProfileSectionA',\ + WriteProfileSectionW,'WriteProfileSectionW',\ + WriteProfileStringA,'WriteProfileStringA',\ + WriteProfileStringW,'WriteProfileStringW',\ + WriteTapemark,'WriteTapemark',\ + _hread,'_hread',\ + _hwrite,'_hwrite',\ + _lclose,'_lclose',\ + _lcreat,'_lcreat',\ + _llseek,'_llseek',\ + _lopen,'_lopen',\ + _lread,'_lread',\ + _lwrite,'_lwrite',\ + lstrcatA,'lstrcatA',\ + lstrcatW,'lstrcatW',\ + lstrcmpA,'lstrcmpA',\ + lstrcmpW,'lstrcmpW',\ + lstrcmpiA,'lstrcmpiA',\ + lstrcmpiW,'lstrcmpiW',\ + lstrcpyA,'lstrcpyA',\ + lstrcpyW,'lstrcpyW',\ + lstrcpynA,'lstrcpynA',\ + lstrcpynW,'lstrcpynW',\ + lstrlenA,'lstrlenA',\ + lstrlenW,'lstrlenW' + +api AddAtom,\ + AddConsoleAlias,\ + BeginUpdateResource,\ + BuildCommDCB,\ + BuildCommDCBAndTimeouts,\ + CallNamedPipe,\ + CommConfigDialog,\ + CompareString,\ + CopyFile,\ + CopyFileEx,\ + CreateDirectory,\ + CreateDirectoryEx,\ + CreateEvent,\ + CreateFile,\ + CreateFileMapping,\ + CreateHardLink,\ + CreateJobObject,\ + CreateMailslot,\ + CreateMutex,\ + CreateNamedPipe,\ + CreateProcess,\ + CreateSemaphore,\ + CreateWaitableTimer,\ + DefineDosDevice,\ + DeleteFile,\ + EndUpdateResource,\ + EnumCalendarInfo,\ + EnumCalendarInfoEx,\ + EnumDateFormats,\ + EnumDateFormatsEx,\ + EnumResourceLanguages,\ + EnumResourceNames,\ + EnumResourceTypes,\ + EnumSystemCodePages,\ + EnumSystemLocales,\ + EnumTimeFormats,\ + ExpandEnvironmentStrings,\ + ExpungeConsoleCommandHistory,\ + FatalAppExit,\ + FillConsoleOutputCharacter,\ + FindAtom,\ + FindFirstChangeNotification,\ + FindFirstFile,\ + FindFirstFileEx,\ + FindNextFile,\ + FindResource,\ + FindResourceEx,\ + FoldString,\ + FormatMessage,\ + FreeEnvironmentStrings,\ + GetAtomName,\ + GetBinaryType,\ + GetCPInfoEx,\ + GetCommandLine,\ + GetCompressedFileSize,\ + GetComputerName,\ + GetConsoleAlias,\ + GetConsoleAliasExes,\ + GetConsoleAliasExesLength,\ + GetConsoleAliases,\ + GetConsoleAliasesLength,\ + GetConsoleCommandHistory,\ + GetConsoleCommandHistoryLength,\ + GetConsoleInputExeName,\ + GetConsoleKeyboardLayoutName,\ + GetConsoleTitle,\ + GetCurrencyFormat,\ + GetCurrentDirectory,\ + GetDateFormat,\ + GetDefaultCommConfig,\ + GetDiskFreeSpace,\ + GetDiskFreeSpaceEx,\ + GetDriveType,\ + GetEnvironmentStrings,\ + GetEnvironmentVariable,\ + GetFileAttributes,\ + GetFileAttributesEx,\ + GetFullPathName,\ + GetLocaleInfo,\ + GetLogicalDriveStrings,\ + GetLongPathName,\ + GetModuleFileName,\ + GetModuleHandle,\ + GetNamedPipeHandleState,\ + GetNumberFormat,\ + GetPrivateProfileInt,\ + GetPrivateProfileSection,\ + GetPrivateProfileSectionNames,\ + GetPrivateProfileString,\ + GetPrivateProfileStruct,\ + GetProfileInt,\ + GetProfileSection,\ + GetProfileString,\ + GetShortPathName,\ + GetStartupInfo,\ + GetStringType,\ + GetStringTypeEx,\ + GetSystemDirectory,\ + GetTempFileName,\ + GetTempPath,\ + GetTimeFormat,\ + GetVersionEx,\ + GetVolumeInformation,\ + GetWindowsDirectory,\ + GlobalAddAtom,\ + GlobalFindAtom,\ + GlobalGetAtomName,\ + IsBadStringPtr,\ + LCMapString,\ + LoadLibrary,\ + LoadLibraryEx,\ + MoveFile,\ + MoveFileEx,\ + MoveFileWithProgress,\ + OpenEvent,\ + OpenFileMapping,\ + OpenJobObject,\ + OpenMutex,\ + OpenSemaphore,\ + OpenWaitableTimer,\ + OutputDebugString,\ + PeekConsoleInput,\ + QueryDosDevice,\ + ReadConsole,\ + ReadConsoleInput,\ + ReadConsoleInputEx,\ + ReadConsoleOutput,\ + ReadConsoleOutputCharacter,\ + RemoveDirectory,\ + ScrollConsoleScreenBuffer,\ + SearchPath,\ + SetComputerName,\ + SetConsoleInputExeName,\ + SetConsoleNumberOfCommands,\ + SetConsoleTitle,\ + SetCurrentDirectory,\ + SetDefaultCommConfig,\ + SetEnvironmentVariable,\ + SetFileAttributes,\ + SetLocaleInfo,\ + SetVolumeLabel,\ + UpdateResource,\ + VerLanguageName,\ + WaitNamedPipe,\ + WriteConsole,\ + WriteConsoleInput,\ + WriteConsoleInputVDM,\ + WriteConsoleOutput,\ + WriteConsoleOutputCharacter,\ + WritePrivateProfileSection,\ + WritePrivateProfileString,\ + WritePrivateProfileStruct,\ + WriteProfileSection,\ + WriteProfileString,\ + lstrcat,\ + lstrcmp,\ + lstrcmpi,\ + lstrcpy,\ + lstrcpyn,\ + lstrlen diff --git a/asm/equihash/Windows/INCLUDE/API/SHELL32.INC b/asm/equihash/Windows/INCLUDE/API/SHELL32.INC new file mode 100644 index 0000000..1ca3a14 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/API/SHELL32.INC @@ -0,0 +1,167 @@ + +; SHELL32 API calls + +import shell32,\ + CheckEscapesA,'CheckEscapesA',\ + CheckEscapesW,'CheckEscapesW',\ + DoEnvironmentSubstA,'DoEnvironmentSubstA',\ + DoEnvironmentSubstW,'DoEnvironmentSubstW',\ + DragAcceptFiles,'DragAcceptFiles',\ + DragFinish,'DragFinish',\ + DragQueryFileA,'DragQueryFileA',\ + DragQueryFileW,'DragQueryFileW',\ + DragQueryPoint,'DragQueryPoint',\ + DuplicateIcon,'DuplicateIcon',\ + ExtractAssociatedIconA,'ExtractAssociatedIconA',\ + ExtractAssociatedIconW,'ExtractAssociatedIconW',\ + ExtractAssociatedIconExA,'ExtractAssociatedIconExA',\ + ExtractAssociatedIconExW,'ExtractAssociatedIconExW',\ + ExtractIconA,'ExtractIconA',\ + ExtractIconW,'ExtractIconW',\ + ExtractIconExA,'ExtractIconExA',\ + ExtractIconExW,'ExtractIconExW',\ + ExtractIconResInfoA,'ExtractIconResInfoA',\ + ExtractIconResInfoW,'ExtractIconResInfoW',\ + FindExeDlgProc,'FindExeDlgProc',\ + FindExecutableA,'FindExecutableA',\ + FindExecutableW,'FindExecutableW',\ + FreeIconList,'FreeIconList',\ + InternalExtractIconListA,'InternalExtractIconListA',\ + InternalExtractIconListW,'InternalExtractIconListW',\ + RealShellExecuteA,'RealShellExecuteA',\ + RealShellExecuteW,'RealShellExecuteW',\ + RealShellExecuteExA,'RealShellExecuteExA',\ + RealShellExecuteExW,'RealShellExecuteExW',\ + RegenerateUserEnvironment,'RegenerateUserEnvironment',\ + SHAddToRecentDocs,'SHAddToRecentDocs',\ + SHAppBarMessage,'SHAppBarMessage',\ + SHBrowseForFolderA,'SHBrowseForFolderA',\ + SHBrowseForFolderW,'SHBrowseForFolderW',\ + SHChangeNotify,'SHChangeNotify',\ + SHEmptyRecycleBinA,'SHEmptyRecycleBinA',\ + SHEmptyRecycleBinW,'SHEmptyRecycleBinW',\ + SHFileOperationA,'SHFileOperationA',\ + SHFileOperationW,'SHFileOperationW',\ + SHFormatDrive,'SHFormatDrive',\ + SHFreeNameMappings,'SHFreeNameMappings',\ + SHGetDataFromIDListA,'SHGetDataFromIDListA',\ + SHGetDataFromIDListW,'SHGetDataFromIDListW',\ + SHGetDesktopFolder,'SHGetDesktopFolder',\ + SHGetDiskFreeSpaceA,'SHGetDiskFreeSpaceA',\ + SHGetDiskFreeSpaceW,'SHGetDiskFreeSpaceW',\ + SHGetFileInfoA,'SHGetFileInfoA',\ + SHGetFileInfoW,'SHGetFileInfoW',\ + SHGetInstanceExplorer,'SHGetInstanceExplorer',\ + SHGetMalloc,'SHGetMalloc',\ + SHGetNewLinkInfo,'SHGetNewLinkInfo',\ + SHGetPathFromIDListA,'SHGetPathFromIDListA',\ + SHGetPathFromIDListW,'SHGetPathFromIDListW',\ + SHGetSettings,'SHGetSettings',\ + SHGetSpecialFolderLocation,'SHGetSpecialFolderLocation',\ + SHGetSpecialFolderPathA,'SHGetSpecialFolderPathA',\ + SHGetSpecialFolderPathW,'SHGetSpecialFolderPathW',\ + SHInvokePrinterCommandA,'SHInvokePrinterCommandA',\ + SHInvokePrinterCommandW,'SHInvokePrinterCommandW',\ + SHLoadInProc,'SHLoadInProc',\ + SHQueryRecycleBinA,'SHQueryRecycleBinA',\ + SHQueryRecycleBinW,'SHQueryRecycleBinW',\ + SHUpdateRecycleBinIcon,'SHUpdateRecycleBinIcon',\ + SheChangeDirA,'SheChangeDirA',\ + SheChangeDirW,'SheChangeDirW',\ + SheChangeDirExA,'SheChangeDirExA',\ + SheChangeDirExW,'SheChangeDirExW',\ + SheFullPathA,'SheFullPathA',\ + SheFullPathW,'SheFullPathW',\ + SheGetCurDrive,'SheGetCurDrive',\ + SheGetDirA,'SheGetDirA',\ + SheGetDirW,'SheGetDirW',\ + SheRemoveQuotesA,'SheRemoveQuotesA',\ + SheRemoveQuotesW,'SheRemoveQuotesW',\ + SheSetCurDrive,'SheSetCurDrive',\ + SheShortenPathA,'SheShortenPathA',\ + SheShortenPathW,'SheShortenPathW',\ + ShellAboutA,'ShellAboutA',\ + ShellAboutW,'ShellAboutW',\ + ShellExecuteA,'ShellExecuteA',\ + ShellExecuteW,'ShellExecuteW',\ + ShellExecuteExA,'ShellExecuteExA',\ + ShellExecuteExW,'ShellExecuteExW',\ + ShellHookProc,'ShellHookProc',\ + Shell_NotifyIconA,'Shell_NotifyIconA',\ + Shell_NotifyIconW,'Shell_NotifyIconW',\ + StrChrA,'StrChrA',\ + StrChrW,'StrChrW',\ + StrChrIA,'StrChrIA',\ + StrChrIW,'StrChrIW',\ + StrCmpNA,'StrCmpNA',\ + StrCmpNW,'StrCmpNW',\ + StrCmpNIA,'StrCmpNIA',\ + StrCmpNIW,'StrCmpNIW',\ + StrCpyNA,'StrCpyNA',\ + StrCpyNW,'StrCpyNW',\ + StrNCmpA,'StrNCmpA',\ + StrNCmpW,'StrNCmpW',\ + StrNCmpIA,'StrNCmpIA',\ + StrNCmpIW,'StrNCmpIW',\ + StrNCpyA,'StrNCpyA',\ + StrNCpyW,'StrNCpyW',\ + StrRChrA,'StrRChrA',\ + StrRChrW,'StrRChrW',\ + StrRChrIA,'StrRChrIA',\ + StrRChrIW,'StrRChrIW',\ + StrRStrA,'StrRStrA',\ + StrRStrW,'StrRStrW',\ + StrRStrIA,'StrRStrIA',\ + StrRStrIW,'StrRStrIW',\ + StrStrA,'StrStrA',\ + StrStrW,'StrStrW',\ + StrStrIA,'StrStrIA',\ + StrStrIW,'StrStrIW',\ + WOWShellExecute,'WOWShellExecute' + +api CheckEscapes,\ + DoEnvironmentSubst,\ + DragQueryFile,\ + ExtractAssociatedIcon,\ + ExtractAssociatedIconEx,\ + ExtractIcon,\ + ExtractIconEx,\ + ExtractIconResInfo,\ + FindExecutable,\ + InternalExtractIconList,\ + RealShellExecute,\ + RealShellExecuteEx,\ + SHBrowseForFolder,\ + SHEmptyRecycleBin,\ + SHFileOperation,\ + SHGetDataFromIDList,\ + SHGetDiskFreeSpace,\ + SHGetFileInfo,\ + SHGetPathFromIDList,\ + SHGetSpecialFolderPath,\ + SHInvokePrinterCommand,\ + SHQueryRecycleBin,\ + SheChangeDir,\ + SheChangeDirEx,\ + SheFullPath,\ + SheGetDir,\ + SheRemoveQuotes,\ + SheShortenPath,\ + ShellAbout,\ + ShellExecute,\ + ShellExecuteEx,\ + Shell_NotifyIcon,\ + StrChr,\ + StrChrI,\ + StrCmpN,\ + StrCmpNI,\ + StrCpyN,\ + StrNCmp,\ + StrNCmpI,\ + StrNCpy,\ + StrRChr,\ + StrRChrI,\ + StrRStr,\ + StrRStrI,\ + StrStr,\ + StrStrI diff --git a/asm/equihash/Windows/INCLUDE/API/USER32.INC b/asm/equihash/Windows/INCLUDE/API/USER32.INC new file mode 100644 index 0000000..bffafa3 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/API/USER32.INC @@ -0,0 +1,756 @@ + +; USER32 API calls + +import user32,\ + ActivateKeyboardLayout,'ActivateKeyboardLayout',\ + AdjustWindowRect,'AdjustWindowRect',\ + AdjustWindowRectEx,'AdjustWindowRectEx',\ + AnimateWindow,'AnimateWindow',\ + AnyPopup,'AnyPopup',\ + AppendMenuA,'AppendMenuA',\ + AppendMenuW,'AppendMenuW',\ + ArrangeIconicWindows,'ArrangeIconicWindows',\ + AttachThreadInput,'AttachThreadInput',\ + BeginDeferWindowPos,'BeginDeferWindowPos',\ + BeginPaint,'BeginPaint',\ + BlockInput,'BlockInput',\ + BringWindowToTop,'BringWindowToTop',\ + BroadcastSystemMessageA,'BroadcastSystemMessageA',\ + BroadcastSystemMessageW,'BroadcastSystemMessageW',\ + CallMsgFilterA,'CallMsgFilterA',\ + CallMsgFilterW,'CallMsgFilterW',\ + CallNextHookEx,'CallNextHookEx',\ + CallWindowProcA,'CallWindowProcA',\ + CallWindowProcW,'CallWindowProcW',\ + CascadeChildWindows,'CascadeChildWindows',\ + CascadeWindows,'CascadeWindows',\ + ChangeClipboardChain,'ChangeClipboardChain',\ + ChangeDisplaySettingsA,'ChangeDisplaySettingsA',\ + ChangeDisplaySettingsW,'ChangeDisplaySettingsW',\ + ChangeDisplaySettingsExA,'ChangeDisplaySettingsExA',\ + ChangeDisplaySettingsExW,'ChangeDisplaySettingsExW',\ + ChangeMenuA,'ChangeMenuA',\ + ChangeMenuW,'ChangeMenuW',\ + CharLowerA,'CharLowerA',\ + CharLowerW,'CharLowerW',\ + CharLowerBuffA,'CharLowerBuffA',\ + CharLowerBuffW,'CharLowerBuffW',\ + CharNextA,'CharNextA',\ + CharNextW,'CharNextW',\ + CharNextExA,'CharNextExA',\ + CharNextExW,'CharNextExW',\ + CharPrevA,'CharPrevA',\ + CharPrevW,'CharPrevW',\ + CharPrevExA,'CharPrevExA',\ + CharPrevExW,'CharPrevExW',\ + CharToOemA,'CharToOemA',\ + CharToOemW,'CharToOemW',\ + CharToOemBuffA,'CharToOemBuffA',\ + CharToOemBuffW,'CharToOemBuffW',\ + CharUpperA,'CharUpperA',\ + CharUpperW,'CharUpperW',\ + CharUpperBuffA,'CharUpperBuffA',\ + CharUpperBuffW,'CharUpperBuffW',\ + CheckDlgButton,'CheckDlgButton',\ + CheckMenuItem,'CheckMenuItem',\ + CheckMenuRadioItem,'CheckMenuRadioItem',\ + CheckRadioButton,'CheckRadioButton',\ + ChildWindowFromPoint,'ChildWindowFromPoint',\ + ChildWindowFromPointEx,'ChildWindowFromPointEx',\ + ClientToScreen,'ClientToScreen',\ + ClipCursor,'ClipCursor',\ + CloseClipboard,'CloseClipboard',\ + CloseDesktop,'CloseDesktop',\ + CloseWindow,'CloseWindow',\ + CloseWindowStation,'CloseWindowStation',\ + CopyAcceleratorTableA,'CopyAcceleratorTableA',\ + CopyAcceleratorTableW,'CopyAcceleratorTableW',\ + CopyIcon,'CopyIcon',\ + CopyImage,'CopyImage',\ + CopyRect,'CopyRect',\ + CountClipboardFormats,'CountClipboardFormats',\ + CreateAcceleratorTableA,'CreateAcceleratorTableA',\ + CreateAcceleratorTableW,'CreateAcceleratorTableW',\ + CreateCaret,'CreateCaret',\ + CreateCursor,'CreateCursor',\ + CreateDesktopA,'CreateDesktopA',\ + CreateDesktopW,'CreateDesktopW',\ + CreateDialogIndirectParamA,'CreateDialogIndirectParamA',\ + CreateDialogIndirectParamW,'CreateDialogIndirectParamW',\ + CreateDialogParamA,'CreateDialogParamA',\ + CreateDialogParamW,'CreateDialogParamW',\ + CreateIcon,'CreateIcon',\ + CreateIconFromResource,'CreateIconFromResource',\ + CreateIconFromResourceEx,'CreateIconFromResourceEx',\ + CreateIconIndirect,'CreateIconIndirect',\ + CreateMDIWindowA,'CreateMDIWindowA',\ + CreateMDIWindowW,'CreateMDIWindowW',\ + CreateMenu,'CreateMenu',\ + CreatePopupMenu,'CreatePopupMenu',\ + CreateWindowExA,'CreateWindowExA',\ + CreateWindowExW,'CreateWindowExW',\ + CreateWindowStationA,'CreateWindowStationA',\ + CreateWindowStationW,'CreateWindowStationW',\ + DdeAbandonTransaction,'DdeAbandonTransaction',\ + DdeAccessData,'DdeAccessData',\ + DdeAddData,'DdeAddData',\ + DdeClientTransaction,'DdeClientTransaction',\ + DdeCmpStringHandles,'DdeCmpStringHandles',\ + DdeConnect,'DdeConnect',\ + DdeConnectList,'DdeConnectList',\ + DdeCreateDataHandle,'DdeCreateDataHandle',\ + DdeCreateStringHandleA,'DdeCreateStringHandleA',\ + DdeCreateStringHandleW,'DdeCreateStringHandleW',\ + DdeDisconnect,'DdeDisconnect',\ + DdeDisconnectList,'DdeDisconnectList',\ + DdeEnableCallback,'DdeEnableCallback',\ + DdeFreeDataHandle,'DdeFreeDataHandle',\ + DdeFreeStringHandle,'DdeFreeStringHandle',\ + DdeGetData,'DdeGetData',\ + DdeGetLastError,'DdeGetLastError',\ + DdeGetQualityOfService,'DdeGetQualityOfService',\ + DdeImpersonateClient,'DdeImpersonateClient',\ + DdeInitializeA,'DdeInitializeA',\ + DdeInitializeW,'DdeInitializeW',\ + DdeKeepStringHandle,'DdeKeepStringHandle',\ + DdeNameService,'DdeNameService',\ + DdePostAdvise,'DdePostAdvise',\ + DdeQueryConvInfo,'DdeQueryConvInfo',\ + DdeQueryNextServer,'DdeQueryNextServer',\ + DdeQueryStringA,'DdeQueryStringA',\ + DdeQueryStringW,'DdeQueryStringW',\ + DdeReconnect,'DdeReconnect',\ + DdeSetQualityOfService,'DdeSetQualityOfService',\ + DdeSetUserHandle,'DdeSetUserHandle',\ + DdeUnaccessData,'DdeUnaccessData',\ + DdeUninitialize,'DdeUninitialize',\ + DefDlgProcA,'DefDlgProcA',\ + DefDlgProcW,'DefDlgProcW',\ + DefFrameProcA,'DefFrameProcA',\ + DefFrameProcW,'DefFrameProcW',\ + DefMDIChildProcA,'DefMDIChildProcA',\ + DefMDIChildProcW,'DefMDIChildProcW',\ + DefWindowProcA,'DefWindowProcA',\ + DefWindowProcW,'DefWindowProcW',\ + DeferWindowPos,'DeferWindowPos',\ + DeleteMenu,'DeleteMenu',\ + DestroyAcceleratorTable,'DestroyAcceleratorTable',\ + DestroyCaret,'DestroyCaret',\ + DestroyCursor,'DestroyCursor',\ + DestroyIcon,'DestroyIcon',\ + DestroyMenu,'DestroyMenu',\ + DestroyWindow,'DestroyWindow',\ + DialogBoxIndirectParamA,'DialogBoxIndirectParamA',\ + DialogBoxIndirectParamW,'DialogBoxIndirectParamW',\ + DialogBoxParamA,'DialogBoxParamA',\ + DialogBoxParamW,'DialogBoxParamW',\ + DispatchMessageA,'DispatchMessageA',\ + DispatchMessageW,'DispatchMessageW',\ + DlgDirListA,'DlgDirListA',\ + DlgDirListW,'DlgDirListW',\ + DlgDirListComboBoxA,'DlgDirListComboBoxA',\ + DlgDirListComboBoxW,'DlgDirListComboBoxW',\ + DlgDirSelectComboBoxExA,'DlgDirSelectComboBoxExA',\ + DlgDirSelectComboBoxExW,'DlgDirSelectComboBoxExW',\ + DlgDirSelectExA,'DlgDirSelectExA',\ + DlgDirSelectExW,'DlgDirSelectExW',\ + DragDetect,'DragDetect',\ + DragObject,'DragObject',\ + DrawAnimatedRects,'DrawAnimatedRects',\ + DrawCaption,'DrawCaption',\ + DrawEdge,'DrawEdge',\ + DrawFocusRect,'DrawFocusRect',\ + DrawFrame,'DrawFrame',\ + DrawFrameControl,'DrawFrameControl',\ + DrawIcon,'DrawIcon',\ + DrawIconEx,'DrawIconEx',\ + DrawMenuBar,'DrawMenuBar',\ + DrawStateA,'DrawStateA',\ + DrawStateW,'DrawStateW',\ + DrawTextA,'DrawTextA',\ + DrawTextW,'DrawTextW',\ + DrawTextExA,'DrawTextExA',\ + DrawTextExW,'DrawTextExW',\ + EditWndProc,'EditWndProc',\ + EmptyClipboard,'EmptyClipboard',\ + EnableMenuItem,'EnableMenuItem',\ + EnableScrollBar,'EnableScrollBar',\ + EnableWindow,'EnableWindow',\ + EndDeferWindowPos,'EndDeferWindowPos',\ + EndDialog,'EndDialog',\ + EndMenu,'EndMenu',\ + EndPaint,'EndPaint',\ + EnumChildWindows,'EnumChildWindows',\ + EnumClipboardFormats,'EnumClipboardFormats',\ + EnumDesktopWindows,'EnumDesktopWindows',\ + EnumDesktopsA,'EnumDesktopsA',\ + EnumDesktopsW,'EnumDesktopsW',\ + EnumDisplayMonitors,'EnumDisplayMonitors',\ + EnumDisplaySettingsA,'EnumDisplaySettingsA',\ + EnumDisplaySettingsW,'EnumDisplaySettingsW',\ + EnumDisplaySettingsExA,'EnumDisplaySettingsExA',\ + EnumDisplaySettingsExW,'EnumDisplaySettingsExW',\ + EnumPropsA,'EnumPropsA',\ + EnumPropsW,'EnumPropsW',\ + EnumPropsExA,'EnumPropsExA',\ + EnumPropsExW,'EnumPropsExW',\ + EnumThreadWindows,'EnumThreadWindows',\ + EnumWindowStationsA,'EnumWindowStationsA',\ + EnumWindowStationsW,'EnumWindowStationsW',\ + EnumWindows,'EnumWindows',\ + EqualRect,'EqualRect',\ + ExcludeUpdateRgn,'ExcludeUpdateRgn',\ + ExitWindowsEx,'ExitWindowsEx',\ + FillRect,'FillRect',\ + FindWindowA,'FindWindowA',\ + FindWindowW,'FindWindowW',\ + FindWindowExA,'FindWindowExA',\ + FindWindowExW,'FindWindowExW',\ + FlashWindow,'FlashWindow',\ + FrameRect,'FrameRect',\ + FreeDDElParam,'FreeDDElParam',\ + GetActiveWindow,'GetActiveWindow',\ + GetAltTabInfoA,'GetAltTabInfoA',\ + GetAltTabInfoW,'GetAltTabInfoW',\ + GetAncestor,'GetAncestor',\ + GetAsyncKeyState,'GetAsyncKeyState',\ + GetCapture,'GetCapture',\ + GetCaretBlinkTime,'GetCaretBlinkTime',\ + GetCaretPos,'GetCaretPos',\ + GetClassInfoA,'GetClassInfoA',\ + GetClassInfoW,'GetClassInfoW',\ + GetClassInfoExA,'GetClassInfoExA',\ + GetClassInfoExW,'GetClassInfoExW',\ + GetClassLongA,'GetClassLongA',\ + GetClassLongW,'GetClassLongW',\ + GetClassNameA,'GetClassNameA',\ + GetClassNameW,'GetClassNameW',\ + GetClassWord,'GetClassWord',\ + GetClientRect,'GetClientRect',\ + GetClipCursor,'GetClipCursor',\ + GetClipboardData,'GetClipboardData',\ + GetClipboardFormatNameA,'GetClipboardFormatNameA',\ + GetClipboardFormatNameW,'GetClipboardFormatNameW',\ + GetClipboardSequenceNumberA,'GetClipboardSequenceNumberA',\ + GetClipboardSequenceNumberW,'GetClipboardSequenceNumberW',\ + GetClipboardViewer,'GetClipboardViewer',\ + GetComboBoxInfo,'GetComboBoxInfo',\ + GetCursor,'GetCursor',\ + GetCursorInfo,'GetCursorInfo',\ + GetCursorPos,'GetCursorPos',\ + GetDC,'GetDC',\ + GetDCEx,'GetDCEx',\ + GetDesktopWindow,'GetDesktopWindow',\ + GetDialogBaseUnits,'GetDialogBaseUnits',\ + GetDlgCtrlID,'GetDlgCtrlID',\ + GetDlgItem,'GetDlgItem',\ + GetDlgItemInt,'GetDlgItemInt',\ + GetDlgItemTextA,'GetDlgItemTextA',\ + GetDlgItemTextW,'GetDlgItemTextW',\ + GetDoubleClickTime,'GetDoubleClickTime',\ + GetFocus,'GetFocus',\ + GetForegroundWindow,'GetForegroundWindow',\ + GetGUIThreadInfo,'GetGUIThreadInfo',\ + GetGuiResources,'GetGuiResources',\ + GetIconInfo,'GetIconInfo',\ + GetInputDesktop,'GetInputDesktop',\ + GetInputState,'GetInputState',\ + GetKBCodePage,'GetKBCodePage',\ + GetKeyNameTextA,'GetKeyNameTextA',\ + GetKeyNameTextW,'GetKeyNameTextW',\ + GetKeyState,'GetKeyState',\ + GetKeyboardLayout,'GetKeyboardLayout',\ + GetKeyboardLayoutList,'GetKeyboardLayoutList',\ + GetKeyboardLayoutNameA,'GetKeyboardLayoutNameA',\ + GetKeyboardLayoutNameW,'GetKeyboardLayoutNameW',\ + GetKeyboardState,'GetKeyboardState',\ + GetKeyboardType,'GetKeyboardType',\ + GetLastActivePopup,'GetLastActivePopup',\ + GetLastInputInfo,'GetLastInputInfo',\ + GetLayeredWindowAttributes,'GetLayeredWindowAttributes',\ + GetListBoxInfo,'GetListBoxInfo',\ + GetMenu,'GetMenu',\ + GetMenuBarInfo,'GetMenuBarInfo',\ + GetMenuCheckMarkDimensions,'GetMenuCheckMarkDimensions',\ + GetMenuContextHelpId,'GetMenuContextHelpId',\ + GetMenuDefaultItem,'GetMenuDefaultItem',\ + GetMenuInfo,'GetMenuInfo',\ + GetMenuItemCount,'GetMenuItemCount',\ + GetMenuItemID,'GetMenuItemID',\ + GetMenuItemInfoA,'GetMenuItemInfoA',\ + GetMenuItemInfoW,'GetMenuItemInfoW',\ + GetMenuItemRect,'GetMenuItemRect',\ + GetMenuState,'GetMenuState',\ + GetMenuStringA,'GetMenuStringA',\ + GetMenuStringW,'GetMenuStringW',\ + GetMessageA,'GetMessageA',\ + GetMessageW,'GetMessageW',\ + GetMessageExtraInfo,'GetMessageExtraInfo',\ + GetMessagePos,'GetMessagePos',\ + GetMessageTime,'GetMessageTime',\ + GetMonitorInfoA,'GetMonitorInfoA',\ + GetMonitorInfoW,'GetMonitorInfoW',\ + GetMouseMovePoints,'GetMouseMovePoints',\ + GetNextDlgGroupItem,'GetNextDlgGroupItem',\ + GetNextDlgTabItem,'GetNextDlgTabItem',\ + GetOpenClipboardWindow,'GetOpenClipboardWindow',\ + GetParent,'GetParent',\ + GetPriorityClipboardFormat,'GetPriorityClipboardFormat',\ + GetProcessWindowStation,'GetProcessWindowStation',\ + GetPropA,'GetPropA',\ + GetPropW,'GetPropW',\ + GetQueueStatus,'GetQueueStatus',\ + GetScrollBarInfo,'GetScrollBarInfo',\ + GetScrollInfo,'GetScrollInfo',\ + GetScrollPos,'GetScrollPos',\ + GetScrollRange,'GetScrollRange',\ + GetShellWindow,'GetShellWindow',\ + GetSubMenu,'GetSubMenu',\ + GetSysColor,'GetSysColor',\ + GetSysColorBrush,'GetSysColorBrush',\ + GetSystemMenu,'GetSystemMenu',\ + GetSystemMetrics,'GetSystemMetrics',\ + GetTabbedTextExtentA,'GetTabbedTextExtentA',\ + GetTabbedTextExtentW,'GetTabbedTextExtentW',\ + GetThreadDesktop,'GetThreadDesktop',\ + GetTitleBarInfo,'GetTitleBarInfo',\ + GetTopWindow,'GetTopWindow',\ + GetUpdateRect,'GetUpdateRect',\ + GetUpdateRgn,'GetUpdateRgn',\ + GetUserObjectInformationA,'GetUserObjectInformationA',\ + GetUserObjectInformationW,'GetUserObjectInformationW',\ + GetUserObjectSecurity,'GetUserObjectSecurity',\ + GetWindow,'GetWindow',\ + GetWindowContextHelpId,'GetWindowContextHelpId',\ + GetWindowDC,'GetWindowDC',\ + GetWindowInfo,'GetWindowInfo',\ + GetWindowLongA,'GetWindowLongA',\ + GetWindowLongW,'GetWindowLongW',\ + GetWindowLongPtrA,'GetWindowLongPtrA',\ + GetWindowLongPtrW,'GetWindowLongPtrW',\ + GetWindowModuleFileNameA,'GetWindowModuleFileNameA',\ + GetWindowModuleFileNameW,'GetWindowModuleFileNameW',\ + GetWindowPlacement,'GetWindowPlacement',\ + GetWindowRect,'GetWindowRect',\ + GetWindowRgn,'GetWindowRgn',\ + GetWindowTextA,'GetWindowTextA',\ + GetWindowTextW,'GetWindowTextW',\ + GetWindowTextLengthA,'GetWindowTextLengthA',\ + GetWindowTextLengthW,'GetWindowTextLengthW',\ + GetWindowThreadProcessId,'GetWindowThreadProcessId',\ + GetWindowWord,'GetWindowWord',\ + GrayStringA,'GrayStringA',\ + GrayStringW,'GrayStringW',\ + HideCaret,'HideCaret',\ + HiliteMenuItem,'HiliteMenuItem',\ + IMPGetIMEA,'IMPGetIMEA',\ + IMPGetIMEW,'IMPGetIMEW',\ + IMPQueryIMEA,'IMPQueryIMEA',\ + IMPQueryIMEW,'IMPQueryIMEW',\ + IMPSetIMEA,'IMPSetIMEA',\ + IMPSetIMEW,'IMPSetIMEW',\ + ImpersonateDdeClientWindow,'ImpersonateDdeClientWindow',\ + InSendMessage,'InSendMessage',\ + InSendMessageEx,'InSendMessageEx',\ + InflateRect,'InflateRect',\ + InsertMenuA,'InsertMenuA',\ + InsertMenuW,'InsertMenuW',\ + InsertMenuItemA,'InsertMenuItemA',\ + InsertMenuItemW,'InsertMenuItemW',\ + IntersectRect,'IntersectRect',\ + InvalidateRect,'InvalidateRect',\ + InvalidateRgn,'InvalidateRgn',\ + InvertRect,'InvertRect',\ + IsCharAlphaA,'IsCharAlphaA',\ + IsCharAlphaW,'IsCharAlphaW',\ + IsCharAlphaNumericA,'IsCharAlphaNumericA',\ + IsCharAlphaNumericW,'IsCharAlphaNumericW',\ + IsCharLowerA,'IsCharLowerA',\ + IsCharLowerW,'IsCharLowerW',\ + IsCharUpperA,'IsCharUpperA',\ + IsCharUpperW,'IsCharUpperW',\ + IsChild,'IsChild',\ + IsClipboardFormatAvailable,'IsClipboardFormatAvailable',\ + IsDialogMessageA,'IsDialogMessageA',\ + IsDialogMessageW,'IsDialogMessageW',\ + IsDlgButtonChecked,'IsDlgButtonChecked',\ + IsIconic,'IsIconic',\ + IsMenu,'IsMenu',\ + IsRectEmpty,'IsRectEmpty',\ + IsWindow,'IsWindow',\ + IsWindowEnabled,'IsWindowEnabled',\ + IsWindowUnicode,'IsWindowUnicode',\ + IsWindowVisible,'IsWindowVisible',\ + IsZoomed,'IsZoomed',\ + KillSystemTimer,'KillSystemTimer',\ + KillTimer,'KillTimer',\ + LoadAcceleratorsA,'LoadAcceleratorsA',\ + LoadAcceleratorsW,'LoadAcceleratorsW',\ + LoadBitmapA,'LoadBitmapA',\ + LoadBitmapW,'LoadBitmapW',\ + LoadCursorA,'LoadCursorA',\ + LoadCursorW,'LoadCursorW',\ + LoadCursorFromFileA,'LoadCursorFromFileA',\ + LoadCursorFromFileW,'LoadCursorFromFileW',\ + LoadIconA,'LoadIconA',\ + LoadIconW,'LoadIconW',\ + LoadImageA,'LoadImageA',\ + LoadImageW,'LoadImageW',\ + LoadKeyboardLayoutA,'LoadKeyboardLayoutA',\ + LoadKeyboardLayoutW,'LoadKeyboardLayoutW',\ + LoadMenuA,'LoadMenuA',\ + LoadMenuW,'LoadMenuW',\ + LoadMenuIndirectA,'LoadMenuIndirectA',\ + LoadMenuIndirectW,'LoadMenuIndirectW',\ + LoadStringA,'LoadStringA',\ + LoadStringW,'LoadStringW',\ + LockWindowUpdate,'LockWindowUpdate',\ + LockWorkStation,'LockWorkStation',\ + LookupIconIdFromDirectory,'LookupIconIdFromDirectory',\ + LookupIconIdFromDirectoryEx,'LookupIconIdFromDirectoryEx',\ + MapDialogRect,'MapDialogRect',\ + MapVirtualKeyA,'MapVirtualKeyA',\ + MapVirtualKeyW,'MapVirtualKeyW',\ + MapVirtualKeyExA,'MapVirtualKeyExA',\ + MapVirtualKeyExW,'MapVirtualKeyExW',\ + MapWindowPoints,'MapWindowPoints',\ + MenuItemFromPoint,'MenuItemFromPoint',\ + MessageBeep,'MessageBeep',\ + MessageBoxA,'MessageBoxA',\ + MessageBoxW,'MessageBoxW',\ + MessageBoxExA,'MessageBoxExA',\ + MessageBoxExW,'MessageBoxExW',\ + MessageBoxIndirectA,'MessageBoxIndirectA',\ + MessageBoxIndirectW,'MessageBoxIndirectW',\ + ModifyMenuA,'ModifyMenuA',\ + ModifyMenuW,'ModifyMenuW',\ + MonitorFromPoint,'MonitorFromPoint',\ + MonitorFromRect,'MonitorFromRect',\ + MonitorFromWindow,'MonitorFromWindow',\ + MoveWindow,'MoveWindow',\ + MsgWaitForMultipleObjects,'MsgWaitForMultipleObjects',\ + MsgWaitForMultipleObjectsEx,'MsgWaitForMultipleObjectsEx',\ + NotifyWinEvent,'NotifyWinEvent',\ + OemKeyScan,'OemKeyScan',\ + OemToCharA,'OemToCharA',\ + OemToCharW,'OemToCharW',\ + OemToCharBuffA,'OemToCharBuffA',\ + OemToCharBuffW,'OemToCharBuffW',\ + OffsetRect,'OffsetRect',\ + OpenClipboard,'OpenClipboard',\ + OpenDesktopA,'OpenDesktopA',\ + OpenDesktopW,'OpenDesktopW',\ + OpenIcon,'OpenIcon',\ + OpenInputDesktop,'OpenInputDesktop',\ + OpenWindowStationA,'OpenWindowStationA',\ + OpenWindowStationW,'OpenWindowStationW',\ + PackDDElParam,'PackDDElParam',\ + PaintDesktop,'PaintDesktop',\ + PeekMessageA,'PeekMessageA',\ + PeekMessageW,'PeekMessageW',\ + PostMessageA,'PostMessageA',\ + PostMessageW,'PostMessageW',\ + PostQuitMessage,'PostQuitMessage',\ + PostThreadMessageA,'PostThreadMessageA',\ + PostThreadMessageW,'PostThreadMessageW',\ + PtInRect,'PtInRect',\ + RealChildWindowFromPoint,'RealChildWindowFromPoint',\ + RealGetWindowClassA,'RealGetWindowClassA',\ + RealGetWindowClassW,'RealGetWindowClassW',\ + RedrawWindow,'RedrawWindow',\ + RegisterClassA,'RegisterClassA',\ + RegisterClassW,'RegisterClassW',\ + RegisterClassExA,'RegisterClassExA',\ + RegisterClassExW,'RegisterClassExW',\ + RegisterClipboardFormatA,'RegisterClipboardFormatA',\ + RegisterClipboardFormatW,'RegisterClipboardFormatW',\ + RegisterDeviceNotificationA,'RegisterDeviceNotificationA',\ + RegisterDeviceNotificationW,'RegisterDeviceNotificationW',\ + RegisterHotKey,'RegisterHotKey',\ + RegisterWindowMessageA,'RegisterWindowMessageA',\ + RegisterWindowMessageW,'RegisterWindowMessageW',\ + ReleaseCapture,'ReleaseCapture',\ + ReleaseDC,'ReleaseDC',\ + RemoveMenu,'RemoveMenu',\ + RemovePropA,'RemovePropA',\ + RemovePropW,'RemovePropW',\ + ReplyMessage,'ReplyMessage',\ + ReuseDDElParam,'ReuseDDElParam',\ + ScreenToClient,'ScreenToClient',\ + ScrollChildren,'ScrollChildren',\ + ScrollDC,'ScrollDC',\ + ScrollWindow,'ScrollWindow',\ + ScrollWindowEx,'ScrollWindowEx',\ + SendDlgItemMessageA,'SendDlgItemMessageA',\ + SendDlgItemMessageW,'SendDlgItemMessageW',\ + SendIMEMessageExA,'SendIMEMessageExA',\ + SendIMEMessageExW,'SendIMEMessageExW',\ + SendInput,'SendInput',\ + SendMessageA,'SendMessageA',\ + SendMessageW,'SendMessageW',\ + SendMessageCallbackA,'SendMessageCallbackA',\ + SendMessageCallbackW,'SendMessageCallbackW',\ + SendMessageTimeoutA,'SendMessageTimeoutA',\ + SendMessageTimeoutW,'SendMessageTimeoutW',\ + SendNotifyMessageA,'SendNotifyMessageA',\ + SendNotifyMessageW,'SendNotifyMessageW',\ + SetActiveWindow,'SetActiveWindow',\ + SetCapture,'SetCapture',\ + SetCaretBlinkTime,'SetCaretBlinkTime',\ + SetCaretPos,'SetCaretPos',\ + SetClassLongA,'SetClassLongA',\ + SetClassLongW,'SetClassLongW',\ + SetClassWord,'SetClassWord',\ + SetClipboardData,'SetClipboardData',\ + SetClipboardViewer,'SetClipboardViewer',\ + SetCursor,'SetCursor',\ + SetCursorPos,'SetCursorPos',\ + SetDebugErrorLevel,'SetDebugErrorLevel',\ + SetDeskWallpaper,'SetDeskWallpaper',\ + SetDlgItemInt,'SetDlgItemInt',\ + SetDlgItemTextA,'SetDlgItemTextA',\ + SetDlgItemTextW,'SetDlgItemTextW',\ + SetDoubleClickTime,'SetDoubleClickTime',\ + SetFocus,'SetFocus',\ + SetForegroundWindow,'SetForegroundWindow',\ + SetKeyboardState,'SetKeyboardState',\ + SetLastErrorEx,'SetLastErrorEx',\ + SetLayeredWindowAttributes,'SetLayeredWindowAttributes',\ + SetMenu,'SetMenu',\ + SetMenuContextHelpId,'SetMenuContextHelpId',\ + SetMenuDefaultItem,'SetMenuDefaultItem',\ + SetMenuInfo,'SetMenuInfo',\ + SetMenuItemBitmaps,'SetMenuItemBitmaps',\ + SetMenuItemInfoA,'SetMenuItemInfoA',\ + SetMenuItemInfoW,'SetMenuItemInfoW',\ + SetMessageExtraInfo,'SetMessageExtraInfo',\ + SetMessageQueue,'SetMessageQueue',\ + SetParent,'SetParent',\ + SetProcessWindowStation,'SetProcessWindowStation',\ + SetPropA,'SetPropA',\ + SetPropW,'SetPropW',\ + SetRect,'SetRect',\ + SetRectEmpty,'SetRectEmpty',\ + SetScrollInfo,'SetScrollInfo',\ + SetScrollPos,'SetScrollPos',\ + SetScrollRange,'SetScrollRange',\ + SetShellWindow,'SetShellWindow',\ + SetSysColors,'SetSysColors',\ + SetSystemCursor,'SetSystemCursor',\ + SetSystemMenu,'SetSystemMenu',\ + SetSystemTimer,'SetSystemTimer',\ + SetThreadDesktop,'SetThreadDesktop',\ + SetTimer,'SetTimer',\ + SetUserObjectInformationA,'SetUserObjectInformationA',\ + SetUserObjectInformationW,'SetUserObjectInformationW',\ + SetUserObjectSecurity,'SetUserObjectSecurity',\ + SetWinEventHook,'SetWinEventHook',\ + SetWindowContextHelpId,'SetWindowContextHelpId',\ + SetWindowLongA,'SetWindowLongA',\ + SetWindowLongW,'SetWindowLongW',\ + SetWindowPlacement,'SetWindowPlacement',\ + SetWindowPos,'SetWindowPos',\ + SetWindowRgn,'SetWindowRgn',\ + SetWindowTextA,'SetWindowTextA',\ + SetWindowTextW,'SetWindowTextW',\ + SetWindowWord,'SetWindowWord',\ + SetWindowsHookA,'SetWindowsHookA',\ + SetWindowsHookW,'SetWindowsHookW',\ + SetWindowsHookExA,'SetWindowsHookExA',\ + SetWindowsHookExW,'SetWindowsHookExW',\ + ShowCaret,'ShowCaret',\ + ShowCursor,'ShowCursor',\ + ShowOwnedPopups,'ShowOwnedPopups',\ + ShowScrollBar,'ShowScrollBar',\ + ShowWindow,'ShowWindow',\ + ShowWindowAsync,'ShowWindowAsync',\ + SubtractRect,'SubtractRect',\ + SwapMouseButton,'SwapMouseButton',\ + SwitchDesktop,'SwitchDesktop',\ + SystemParametersInfoA,'SystemParametersInfoA',\ + SystemParametersInfoW,'SystemParametersInfoW',\ + TabbedTextOutA,'TabbedTextOutA',\ + TabbedTextOutW,'TabbedTextOutW',\ + TileChildWindows,'TileChildWindows',\ + TileWindows,'TileWindows',\ + ToAscii,'ToAscii',\ + ToAsciiEx,'ToAsciiEx',\ + ToUnicode,'ToUnicode',\ + ToUnicodeEx,'ToUnicodeEx',\ + TrackMouseEvent,'TrackMouseEvent',\ + TrackPopupMenu,'TrackPopupMenu',\ + TrackPopupMenuEx,'TrackPopupMenuEx',\ + TranslateAcceleratorA,'TranslateAcceleratorA',\ + TranslateAcceleratorW,'TranslateAcceleratorW',\ + TranslateMDISysAccel,'TranslateMDISysAccel',\ + TranslateMessage,'TranslateMessage',\ + UnhookWinEvent,'UnhookWinEvent',\ + UnhookWindowsHook,'UnhookWindowsHook',\ + UnhookWindowsHookEx,'UnhookWindowsHookEx',\ + UnionRect,'UnionRect',\ + UnloadKeyboardLayout,'UnloadKeyboardLayout',\ + UnpackDDElParam,'UnpackDDElParam',\ + UnregisterClassA,'UnregisterClassA',\ + UnregisterClassW,'UnregisterClassW',\ + UnregisterDeviceNotification,'UnregisterDeviceNotification',\ + UnregisterHotKey,'UnregisterHotKey',\ + UpdateWindow,'UpdateWindow',\ + UserHandleGrantAccess,'UserHandleGrantAccess',\ + ValidateRect,'ValidateRect',\ + ValidateRgn,'ValidateRgn',\ + VkKeyScanA,'VkKeyScanA',\ + VkKeyScanW,'VkKeyScanW',\ + VkKeyScanExA,'VkKeyScanExA',\ + VkKeyScanExW,'VkKeyScanExW',\ + WINNLSEnableIME,'WINNLSEnableIME',\ + WINNLSGetEnableStatus,'WINNLSGetEnableStatus',\ + WINNLSGetIMEHotkey,'WINNLSGetIMEHotkey',\ + WaitForInputIdle,'WaitForInputIdle',\ + WaitMessage,'WaitMessage',\ + WinHelpA,'WinHelpA',\ + WinHelpW,'WinHelpW',\ + WindowFromDC,'WindowFromDC',\ + WindowFromPoint,'WindowFromPoint',\ + keybd_event,'keybd_event',\ + mouse_event,'mouse_event',\ + wsprintfA,'wsprintfA',\ + wsprintfW,'wsprintfW',\ + wvsprintfA,'wvsprintfA',\ + wvsprintfW,'wvsprintfW' + +api AppendMenu,\ + BroadcastSystemMessage,\ + CallMsgFilter,\ + CallWindowProc,\ + ChangeDisplaySettings,\ + ChangeDisplaySettingsEx,\ + ChangeMenu,\ + CharLower,\ + CharLowerBuff,\ + CharNext,\ + CharNextEx,\ + CharPrev,\ + CharPrevEx,\ + CharToOem,\ + CharToOemBuff,\ + CharUpper,\ + CharUpperBuff,\ + CopyAcceleratorTable,\ + CreateAcceleratorTable,\ + CreateDesktop,\ + CreateDialogIndirectParam,\ + CreateDialogParam,\ + CreateMDIWindow,\ + CreateWindowEx,\ + CreateWindowStation,\ + DdeCreateStringHandle,\ + DdeInitialize,\ + DdeQueryString,\ + DefDlgProc,\ + DefFrameProc,\ + DefMDIChildProc,\ + DefWindowProc,\ + DialogBoxIndirectParam,\ + DialogBoxParam,\ + DispatchMessage,\ + DlgDirList,\ + DlgDirListComboBox,\ + DlgDirSelectComboBoxEx,\ + DlgDirSelectEx,\ + DrawState,\ + DrawText,\ + DrawTextEx,\ + EnumDesktops,\ + EnumDisplaySettings,\ + EnumDisplaySettingsEx,\ + EnumProps,\ + EnumPropsEx,\ + EnumWindowStations,\ + FindWindow,\ + FindWindowEx,\ + GetAltTabInfo,\ + GetClassInfo,\ + GetClassInfoEx,\ + GetClassLong,\ + GetClassName,\ + GetClipboardFormatName,\ + GetClipboardSequenceNumber,\ + GetDlgItemText,\ + GetKeyNameText,\ + GetKeyboardLayoutName,\ + GetMenuItemInfo,\ + GetMenuString,\ + GetMessage,\ + GetMonitorInfo,\ + GetProp,\ + GetTabbedTextExtent,\ + GetUserObjectInformation,\ + GetWindowLong,\ + GetWindowModuleFileName,\ + GetWindowText,\ + GetWindowTextLength,\ + GrayString,\ + IMPGetIME,\ + IMPQueryIME,\ + IMPSetIME,\ + InsertMenu,\ + InsertMenuItem,\ + IsCharAlpha,\ + IsCharAlphaNumeric,\ + IsCharLower,\ + IsCharUpper,\ + IsDialogMessage,\ + LoadAccelerators,\ + LoadBitmap,\ + LoadCursor,\ + LoadCursorFromFile,\ + LoadIcon,\ + LoadImage,\ + LoadKeyboardLayout,\ + LoadMenu,\ + LoadMenuIndirect,\ + LoadString,\ + MapVirtualKey,\ + MapVirtualKeyEx,\ + MessageBox,\ + MessageBoxEx,\ + MessageBoxIndirect,\ + ModifyMenu,\ + OemToChar,\ + OemToCharBuff,\ + OpenDesktop,\ + OpenWindowStation,\ + PeekMessage,\ + PostMessage,\ + PostThreadMessage,\ + RealGetWindowClass,\ + RegisterClass,\ + RegisterClassEx,\ + RegisterClipboardFormat,\ + RegisterDeviceNotification,\ + RegisterWindowMessage,\ + RemoveProp,\ + SendDlgItemMessage,\ + SendIMEMessageEx,\ + SendMessage,\ + SendMessageCallback,\ + SendMessageTimeout,\ + SendNotifyMessage,\ + SetClassLong,\ + SetDlgItemText,\ + SetMenuItemInfo,\ + SetProp,\ + SetUserObjectInformation,\ + SetWindowLong,\ + SetWindowText,\ + SetWindowsHook,\ + SetWindowsHookEx,\ + SystemParametersInfo,\ + TabbedTextOut,\ + TranslateAccelerator,\ + UnregisterClass,\ + VkKeyScan,\ + VkKeyScanEx,\ + WinHelp,\ + wsprintf,\ + wvsprintf diff --git a/asm/equihash/Windows/INCLUDE/API/WSOCK32.INC b/asm/equihash/Windows/INCLUDE/API/WSOCK32.INC new file mode 100644 index 0000000..8b8edb6 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/API/WSOCK32.INC @@ -0,0 +1,85 @@ + +; WSOCK32 API calls + +import wsock32,\ + AcceptEx,'AcceptEx',\ + EnumProtocolsA,'EnumProtocolsA',\ + EnumProtocolsW,'EnumProtocolsW',\ + GetAcceptExSockaddrs,'GetAcceptExSockaddrs',\ + GetAddressByNameA,'GetAddressByNameA',\ + GetAddressByNameW,'GetAddressByNameW',\ + GetNameByTypeA,'GetNameByTypeA',\ + GetNameByTypeW,'GetNameByTypeW',\ + GetServiceA,'GetServiceA',\ + GetServiceW,'GetServiceW',\ + GetTypeByNameA,'GetTypeByNameA',\ + GetTypeByNameW,'GetTypeByNameW',\ + MigrateWinsockConfiguration,'MigrateWinsockConfiguration',\ + NPLoadNameSpaces,'NPLoadNameSpaces',\ + SetServiceA,'SetServiceA',\ + SetServiceW,'SetServiceW',\ + TransmitFile,'TransmitFile',\ + WEP,'WEP',\ + WSAAsyncGetHostByAddr,'WSAAsyncGetHostByAddr',\ + WSAAsyncGetHostByName,'WSAAsyncGetHostByName',\ + WSAAsyncGetProtoByName,'WSAAsyncGetProtoByName',\ + WSAAsyncGetProtoByNumber,'WSAAsyncGetProtoByNumber',\ + WSAAsyncGetServByName,'WSAAsyncGetServByName',\ + WSAAsyncGetServByPort,'WSAAsyncGetServByPort',\ + WSAAsyncSelect,'WSAAsyncSelect',\ + WSACancelAsyncRequest,'WSACancelAsyncRequest',\ + WSACancelBlockingCall,'WSACancelBlockingCall',\ + WSACleanup,'WSACleanup',\ + WSAGetLastError,'WSAGetLastError',\ + WSAIsBlocking,'WSAIsBlocking',\ + WSARecvEx,'WSARecvEx',\ + WSASetBlockingHook,'WSASetBlockingHook',\ + WSASetLastError,'WSASetLastError',\ + WSAStartup,'WSAStartup',\ + WSAUnhookBlockingHook,'WSAUnhookBlockingHook',\ + __WSAFDIsSet,'__WSAFDIsSet',\ + accept,'accept',\ + bind,'bind',\ + closesocket,'closesocket',\ + connect,'connect',\ + dn_expand,'dn_expand',\ + gethostbyaddr,'gethostbyaddr',\ + gethostbyname,'gethostbyname',\ + gethostname,'gethostname',\ + getnetbyname,'getnetbyname',\ + getpeername,'getpeername',\ + getprotobyname,'getprotobyname',\ + getprotobynumber,'getprotobynumber',\ + getservbyname,'getservbyname',\ + getservbyport,'getservbyport',\ + getsockname,'getsockname',\ + getsockopt,'getsockopt',\ + htonl,'htonl',\ + htons,'htons',\ + inet_addr,'inet_addr',\ + inet_network,'inet_network',\ + inet_ntoa,'inet_ntoa',\ + ioctlsocket,'ioctlsocket',\ + listen,'listen',\ + ntohl,'ntohl',\ + ntohs,'ntohs',\ + rcmd,'rcmd',\ + recv,'recv',\ + recvfrom,'recvfrom',\ + rexec,'rexec',\ + rresvport,'rresvport',\ + s_perror,'s_perror',\ + select,'select',\ + send,'send',\ + sendto,'sendto',\ + sethostname,'sethostname',\ + setsockopt,'setsockopt',\ + shutdown,'shutdown',\ + socket,'socket' + +api EnumProtocols,\ + GetAddressByName,\ + GetNameByType,\ + GetService,\ + GetTypeByName,\ + SetService diff --git a/asm/equihash/Windows/INCLUDE/ENCODING/UTF8.INC b/asm/equihash/Windows/INCLUDE/ENCODING/UTF8.INC new file mode 100644 index 0000000..83383ff --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/ENCODING/UTF8.INC @@ -0,0 +1,77 @@ + +; UTF-8 + +macro du [arg] + { local current,..input,char + if arg eqtype '' + virtual at 0 + ..input:: + db arg + count = $ + end virtual + current = 0 + while current < count + load char byte from ..input:current + wide = char + current = current + 1 + if char > 0C0h + if char < 0E0h + wide = char and 11111b + load char byte from ..input:current + wide = wide shl 6 + (char and 111111b) + current = current + 1 + else if char < 0F0h + wide = char and 1111b + load char byte from ..input:current + wide = wide shl 6 + (char and 111111b) + load char byte from ..input:current+1 + wide = wide shl 6 + (char and 111111b) + current = current + 2 + else if char < 0F8h + wide = char and 111b + load char byte from ..input:current + wide = wide shl 6 + (char and 111111b) + load char byte from ..input:current+1 + wide = wide shl 6 + (char and 111111b) + load char byte from ..input:current+2 + wide = wide shl 6 + (char and 111111b) + current = current + 3 + else if char < 0FCh + wide = char and 11b + load char byte from ..input:current + wide = wide shl 6 + (char and 111111b) + load char byte from ..input:current+1 + wide = wide shl 6 + (char and 111111b) + load char byte from ..input:current+2 + wide = wide shl 6 + (char and 111111b) + load char byte from ..input:current+3 + wide = wide shl 6 + (char and 111111b) + current = current + 4 + else + wide = char and 1 + load char byte from ..input:current + wide = wide shl 6 + (char and 111111b) + load char byte from ..input:current+1 + wide = wide shl 6 + (char and 111111b) + load char byte from ..input:current+2 + wide = wide shl 6 + (char and 111111b) + load char byte from ..input:current+3 + wide = wide shl 6 + (char and 111111b) + load char byte from ..input:current+4 + wide = wide shl 6 + (char and 111111b) + current = current + 5 + end if + end if + if wide < 10000h + dw wide + else + dw 0D7C0h + wide shr 10,0DC00h or (wide and 3FFh) + end if + end while + else + dw arg + end if } + +struc du [args] + { common label . word + du args } diff --git a/asm/equihash/Windows/INCLUDE/ENCODING/WIN1250.INC b/asm/equihash/Windows/INCLUDE/ENCODING/WIN1250.INC new file mode 100644 index 0000000..afd2b6d --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/ENCODING/WIN1250.INC @@ -0,0 +1,36 @@ + +; Windows 1250 + +rept 1 { local ..encoding + __encoding equ ..encoding } + +virtual at 0 + __encoding:: + times 80h dw %-1 + dw 20ACh,?,201Ah,?,201Eh,2026h,2020h,2021h,?,2030h,160h,2039h,15Ah,164h,17Dh,179h + dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,?,2122h,161h,203Ah,15Bh,165h,17Eh,17Ah + dw 0A0h,2C7h,2D8h,141h,0A4h,104h,0A6h,0A7h,0A8h,0A9h,15Eh,0ABh,0ACh,0ADh,0AEh,17Bh + dw 0B0h,0B1h,2DBh,142h,0B4h,0B5h,0B6h,0B7h,0B8h,105h,15Fh,0BBh,13Dh,2DDh,13Eh,17Ch + dw 154h,0C1h,0C2h,102h,0C4h,139h,106h,0C7h,10Ch,0C9h,118h,0CBh,11Ah,0CDh,0CEh,10Eh + dw 110h,143h,147h,0D3h,0D4h,150h,0D6h,0D7h,158h,16Eh,0DAh,170h,0DCh,0DDh,162h,0DFh + dw 155h,0E1h,0E2h,103h,0E4h,13Ah,107h,0E7h,10Dh,0E9h,119h,0EBh,11Bh,0EDh,0EEh,10Fh + dw 111h,144h,148h,0F3h,0F4h,151h,0F6h,0F7h,159h,16Fh,0FAh,171h,0FCh,0FDh,163h,2D9h +end virtual + +macro du [arg] + { local offset,char + offset = $-$$ + du arg + if arg eqtype '' + repeat ($-offset-$$)/2 + load char byte from $$+offset+(%-1)*2 + if char > 7Fh + load char word from __encoding:char*2 + store word char at $$+offset+(%-1)*2 + end if + end repeat + end if } + +struc du [args] + { common label . word + du args } diff --git a/asm/equihash/Windows/INCLUDE/ENCODING/WIN1251.INC b/asm/equihash/Windows/INCLUDE/ENCODING/WIN1251.INC new file mode 100644 index 0000000..ce6766a --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/ENCODING/WIN1251.INC @@ -0,0 +1,33 @@ + +; Windows 1251 + +rept 1 { local ..encoding + __encoding equ ..encoding } + +virtual at 0 + __encoding:: + times 80h dw %-1 + dw 401h,403h,201Ah,453h,201Eh,2026h,2020h,2021h,20ACh,2030h,409h,2039h,40Ah,40Ch,40Bh,40Fh + dw 452h,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,?,2122h,459h,203Ah,45Ah,45Ch,45Bh,45Fh + dw 0A0h,40Eh,45Eh,408h,0A4h,490h,0A6h,0A7h,401h,0A9h,404h,0ABh,0ACh,0ADh,0AEh,407h + dw 0B0h,0B1h,406h,456h,491h,0B5h,0B6h,0B7h,451h,2116h,454h,0BBh,458h,405h,455h,457h + times 40h dw 410h+%-1 +end virtual + +macro du [arg] + { local offset,char + offset = $-$$ + du arg + if arg eqtype '' + repeat ($-offset-$$)/2 + load char byte from $$+offset+(%-1)*2 + if char > 7Fh + load char word from __encoding:char*2 + store word char at $$+offset+(%-1)*2 + end if + end repeat + end if } + +struc du [args] + { common label . word + du args } diff --git a/asm/equihash/Windows/INCLUDE/ENCODING/WIN1252.INC b/asm/equihash/Windows/INCLUDE/ENCODING/WIN1252.INC new file mode 100644 index 0000000..09227f9 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/ENCODING/WIN1252.INC @@ -0,0 +1,31 @@ + +; Windows 1252 + +rept 1 { local ..encoding + __encoding equ ..encoding } + +virtual at 0 + __encoding:: + times 80h dw %-1 + dw 20ACh,?,201Ah,192h,201Eh,2026h,2020h,2021h,2C6h,2030h,160h,2039h,152h,?,17D,? + dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,2DCh,2122h,161h,203Ah,153h,?,17Eh,178h + times 60h dw 0A0h+%-1 +end virtual + +macro du [arg] + { local offset,char + offset = $-$$ + du arg + if arg eqtype '' + repeat ($-offset-$$)/2 + load char byte from $$+offset+(%-1)*2 + if char > 7Fh + load char word from __encoding:char*2 + store word char at $$+offset+(%-1)*2 + end if + end repeat + end if } + +struc du [args] + { common label . word + du args } diff --git a/asm/equihash/Windows/INCLUDE/ENCODING/WIN1253.INC b/asm/equihash/Windows/INCLUDE/ENCODING/WIN1253.INC new file mode 100644 index 0000000..8ae3c37 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/ENCODING/WIN1253.INC @@ -0,0 +1,33 @@ + +; Windows 1253 + +rept 1 { local ..encoding + __encoding equ ..encoding } + +virtual at 0 + __encoding:: + times 80h dw %-1 + dw 20ACh,?,201Ah,192h,201Eh,2026h,2020h,2021h,?,2030h,?,2039h,?,?,?,? + dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,?,2122h,?,203Ah,?,?,?,? + dw 0A0h,385h,386h,0A3h,0A4h,0A5h,0A6h,0A7h,0A8h,0A9h,?,0ABh,0ACh,0ADh,0AEh,2015h + dw 0B0h,0B1h,0B2h,0B3h,384h,0B5h,0B6h,0B7h,288h,389h,38Ah,0BBh,38Ch,0BDh,38Eh,38Fh + times 40h dw 390h+%-1 +end virtual + +macro du [arg] + { local offset,char + offset = $-$$ + du arg + if arg eqtype '' + repeat ($-offset-$$)/2 + load char byte from $$+offset+(%-1)*2 + if char > 7Fh + load char word from __encoding:char*2 + store word char at $$+offset+(%-1)*2 + end if + end repeat + end if } + +struc du [args] + { common label . word + du args } diff --git a/asm/equihash/Windows/INCLUDE/ENCODING/WIN1254.INC b/asm/equihash/Windows/INCLUDE/ENCODING/WIN1254.INC new file mode 100644 index 0000000..f4fd06c --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/ENCODING/WIN1254.INC @@ -0,0 +1,34 @@ + +; Windows 1254 + +rept 1 { local ..encoding + __encoding equ ..encoding } + +virtual at 0 + __encoding:: + times 80h dw %-1 + dw 20ACh,?,201Ah,192h,201Eh,2026h,2020h,2021h,2C6h,2030h,160h,2039h,152h,?,?,? + dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,2DCh,2122h,161h,203Ah,153h,?,?,178h + times 30h dw 0A0h+%-1 + dw 11Eh,0D1h,0D2h,0D3h,0D4h,0D5h,0D6h,0D7h,0D8h,0D9h,0DAh,0DBh,0DCh,130h,15Eh,0DFh + times 10h dw 0E0h+%-1 + dw 11Fh,0F1h,0F2h,0F3h,0F4h,0F5h,0F6h,0F7h,0F8h,0F9h,0FAh,0FBh,0FCh,131h,15Fh,0FFh +end virtual + +macro du [arg] + { local offset,char + offset = $-$$ + du arg + if arg eqtype '' + repeat ($-offset-$$)/2 + load char byte from $$+offset+(%-1)*2 + if char > 7Fh + load char word from __encoding:char*2 + store word char at $$+offset+(%-1)*2 + end if + end repeat + end if } + +struc du [args] + { common label . word + du args } diff --git a/asm/equihash/Windows/INCLUDE/ENCODING/WIN1255.INC b/asm/equihash/Windows/INCLUDE/ENCODING/WIN1255.INC new file mode 100644 index 0000000..16bcdcd --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/ENCODING/WIN1255.INC @@ -0,0 +1,36 @@ + +; Windows 1255 + +rept 1 { local ..encoding + __encoding equ ..encoding } + +virtual at 0 + __encoding:: + times 80h dw %-1 + dw 20ACh,?,201Ah,192h,201Eh,2026h,2020h,2021h,2C6h,2030h,?,2039h,?,?,?,? + dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,2DCh,2122h,?,203Ah,?,?,?,? + dw 0A0h,0A1h,0A2h,0A3h,20AAh,0A5h,0A6h,0A7h,0A8h,0A9h,0D7h,0ABh,0ACh,0ADh,0AEh,0AFh + dw 0B0h,0B1h,0B2h,0B3h,0B4h,0B5h,0B6h,0B7h,0B8h,0B9h,0F7h,0BBh,0BCh,0BDh,0BEh,0BFh + dw 5B0h,5B1h,5B2h,5B3h,5B4h,5B5h,5B6h,5B7h,5B8h,5B9h,?,5BBh,5BCh,5BDh,5BEh,5BFh + dw 5C0h,5C1h,5C2h,5C3h,5F0h,5F1h,5F2h,5F3h,5F4h,?,?,?,?,?,?,? + dw 5D0h,5D1h,5D2h,5D3h,5D4h,5D5h,5D6h,5D7h,5D8h,5D9h,5DAh,5DBh,5DCh,5DDh,5DEh,5DFh + dw 5E0h,5E1h,5E2h,5E3h,5E4h,5E5h,5E6h,5E7h,5E8h,5E9h,5EAh,?,?,200Eh,200Fh,? +end virtual + +macro du [arg] + { local offset,char + offset = $-$$ + du arg + if arg eqtype '' + repeat ($-offset-$$)/2 + load char byte from $$+offset+(%-1)*2 + if char > 7Fh + load char word from __encoding:char*2 + store word char at $$+offset+(%-1)*2 + end if + end repeat + end if } + +struc du [args] + { common label . word + du args } diff --git a/asm/equihash/Windows/INCLUDE/ENCODING/WIN1256.INC b/asm/equihash/Windows/INCLUDE/ENCODING/WIN1256.INC new file mode 100644 index 0000000..57d1738 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/ENCODING/WIN1256.INC @@ -0,0 +1,36 @@ + +; Windows 1256 + +rept 1 { local ..encoding + __encoding equ ..encoding } + +virtual at 0 + __encoding:: + times 80h dw %-1 + dw 20ACh,67Eh,201Ah,192h,201Eh,2026h,2020h,2021h,2C6h,2030h,679h,2039h,152h,686h,698h,688h + dw 6AFh,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,6A9h,2122h,691h,203Ah,153h,200Ch,200Dh,6BAh + dw 0A0h,60Ch,0A2h,0A3h,0A4h,0A5h,0A6h,0A7h,0A8h,0A9h,6BEh,0ABh,0ACh,0ADh,0AEh,0AFh + dw 0B0h,0B1h,0B2h,0B3h,0B4h,0B5h,0B6h,0B7h,0B8h,0B9h,0BAh,0BBh,0BCh,0BDh,0BEh,0BFh + dw 6C1h,621h,622h,623h,624h,625h,626h,627h,628h,629h,62Ah,62Bh,62Ch,62Dh,62Eh,62Fh + dw 630h,631h,632h,633h,634h,635h,636h,0D7h,637h,638h,639h,63Ah,640h,641h,642h,643h + dw 0E0h,644h,0E2h,645h,646h,647h,648h,0E7h,0E8h,0E9h,0EAh,0EBh,649h,64Ah,0EEh,0EFh + dw 64Bh,64Ch,64Dh,64Eh,0F4h,64Fh,650h,0F7h,651h,0F9h,652h,0FBh,0FCh,200Eh,200Fh,6D2h +end virtual + +macro du [arg] + { local offset,char + offset = $-$$ + du arg + if arg eqtype '' + repeat ($-offset-$$)/2 + load char byte from $$+offset+(%-1)*2 + if char > 7Fh + load char word from __encoding:char*2 + store word char at $$+offset+(%-1)*2 + end if + end repeat + end if } + +struc du [args] + { common label . word + du args } diff --git a/asm/equihash/Windows/INCLUDE/ENCODING/WIN1257.INC b/asm/equihash/Windows/INCLUDE/ENCODING/WIN1257.INC new file mode 100644 index 0000000..c1bc4f9 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/ENCODING/WIN1257.INC @@ -0,0 +1,36 @@ + +; Windows 1257 + +rept 1 { local ..encoding + __encoding equ ..encoding } + +virtual at 0 + __encoding:: + times 80h dw %-1 + dw 20ACh,?,201Ah,?,201Eh,2026h,2020h,2021h,?,2030h,?,2039h,?,0A8h,2C7h,0B8h + dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,?,2122h,?,203Ah,?,0AFh,2DBh,? + dw 0A0h,?,0A2h,0A3h,0A4h,?,0A6h,0A7h,0D8h,0A9h,156h,0ABh,0ACh,0ADh,0AEh,0C6h + dw 0B0h,0B1h,0B2h,0B3h,0B4h,0B5h,0B6h,0B7h,0F8h,0B9h,157h,0BBh,0BCh,0BDh,0BEh,0E6h + dw 104h,12Eh,100h,106h,0C4h,0C5h,118h,112h,10Ch,0C9h,179h,116h,122h,136h,12Ah,13Bh + dw 160h,143h,145h,0D3h,14Ch,0D5h,0D6h,0D7h,172h,141h,15Ah,16Ah,0DCh,17Bh,17Dh,0DFh + dw 105h,12Fh,101h,107h,0E4h,0E5h,119h,113h,10Dh,0E9h,17Ah,117h,123h,137h,12Bh,13Ch + dw 161h,144h,146h,0F3h,14Dh,0F5h,0F6h,0F7h,173h,142h,15Bh,16Bh,0FCh,17Ch,17Eh,2D9h +end virtual + +macro du [arg] + { local offset,char + offset = $-$$ + du arg + if arg eqtype '' + repeat ($-offset-$$)/2 + load char byte from $$+offset+(%-1)*2 + if char > 7Fh + load char word from __encoding:char*2 + store word char at $$+offset+(%-1)*2 + end if + end repeat + end if } + +struc du [args] + { common label . word + du args } diff --git a/asm/equihash/Windows/INCLUDE/ENCODING/WIN1258.INC b/asm/equihash/Windows/INCLUDE/ENCODING/WIN1258.INC new file mode 100644 index 0000000..c9fdb30 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/ENCODING/WIN1258.INC @@ -0,0 +1,36 @@ + +; Windows 1258 + +rept 1 { local ..encoding + __encoding equ ..encoding } + +virtual at 0 + __encoding:: + times 80h dw %-1 + dw 20ACh,?,201Ah,192h,201Eh,2026h,2020h,2021h,2C6h,2030h,?,2039h,152h,?,?,? + dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,2DCh,2122h,?,203Ah,153h,?,?,178h + dw 0A0h,0A1h,0A2h,0A3h,0A4h,0A5h,0A6h,0A7h,0A8h,0A9h,0AAh,0ABh,0ACh,0ADh,0AEh,0AFh + dw 0B0h,0B1h,0B2h,0B3h,0B4h,0B5h,0B6h,0B7h,0B8h,0B9h,0BAh,0BBh,0BCh,0BDh,0BEh,0BFh + dw 0C0h,0C1h,0C2h,102h,0C4h,0C5h,0C6h,0C7h,0C8h,0C9h,0CAh,0CBh,300h,0CDh,0CEh,0CFh + dw 110h,0D1h,309h,0D3h,0D4h,1A0h,0D6h,0D7h,0D8h,0D9h,0DAh,0DBh,0DCh,1AFh,303h,0DFh + dw 0E0h,0E1h,0E2h,103h,0E4h,0E5h,0E6h,0E7h,0E8h,0E9h,0EAh,0EBh,301h,0EDh,0EEh,0EFh + dw 111h,0F1h,323h,0F3h,0F4h,1A1h,0F6h,0F7h,0F8h,0F9h,0FAh,0FBh,0FCh,1B0h,20ABh,0FFh +end virtual + +macro du [arg] + { local offset,char + offset = $-$$ + du arg + if arg eqtype '' + repeat ($-offset-$$)/2 + load char byte from $$+offset+(%-1)*2 + if char > 7Fh + load char word from __encoding:char*2 + store word char at $$+offset+(%-1)*2 + end if + end repeat + end if } + +struc du [args] + { common label . word + du args } diff --git a/asm/equihash/Windows/INCLUDE/ENCODING/WIN874.INC b/asm/equihash/Windows/INCLUDE/ENCODING/WIN874.INC new file mode 100644 index 0000000..a6c5845 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/ENCODING/WIN874.INC @@ -0,0 +1,31 @@ + +; Windows 874 + +rept 1 { local ..encoding + __encoding equ ..encoding } + +virtual at 0 + __encoding:: + times 80h dw %-1 + dw 20ACh,?,?,?,?,2026h,?,?,?,?,?,?,?,?,?,? + dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,?,?,?,?,?,?,?,? + times 60h dw 0E00h+%-1 +end virtual + +macro du [arg] + { local offset,char + offset = $-$$ + du arg + if arg eqtype '' + repeat ($-offset-$$)/2 + load char byte from $$+offset+(%-1)*2 + if char > 7Fh + load char word from __encoding:char*2 + store word char at $$+offset+(%-1)*2 + end if + end repeat + end if } + +struc du [args] + { common label . word + du args } diff --git a/asm/equihash/Windows/INCLUDE/EQUATES/COMCTL32.INC b/asm/equihash/Windows/INCLUDE/EQUATES/COMCTL32.INC new file mode 100644 index 0000000..6e5deb4 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/EQUATES/COMCTL32.INC @@ -0,0 +1,1869 @@ + +; COMCTL32.DLL structures and constants + +struct PROPSHEETPAGE + dwSize dd ? + dwFlags dd ? + hInstance dd ? + pszTemplate dd ? + pszIcon dd ? + pszTitle dd ? + pfnDlgProc dd ? + lParam dd ? + pfnCallback dd ? + pcRefParent dd ? +ends + +struct PROPSHEETHEADER + dwSize dd ? + dwFlags dd ? + hwndParent dd ? + hInstance dd ? + pszIcon dd ? + pszCaption dd ? + nPages dd ? + pStartPage dd ? + ppsp dd ? + pfnCallback dd ? +ends + +struct IMAGEINFO + hbmImage dd ? + hbmMask dd ? + Unused1 dd ? + Unused2 dd ? + rcImage RECT +ends + +struct HD_ITEM + mask dd ? + cxy dd ? + pszText dd ? + hbm dd ? + cchTextMax dd ? + fmt dd ? + lParam dd ? +ends + +struct HD_LAYOUT + prc dd ? + pwpos dd ? +ends + +struct HD_HITTESTINFO + pt POINT + flags dd ? + iItem dd ? +ends + +struct HD_NOTIFY + hdr NMHDR + iItem dd ? + iButton dd ? + pitem dd ? +ends + +struct TBBUTTON + iBitmap dd ? + idCommand dd ? + fsState db ? + fsStyle db ? + dw ? + dwData dd ? + iString dd ? +ends + +struct COLORMAP + from dd ? + to dd ? +ends + +struct TBADDBITMAP + hInst dd ? + nID dd ? +ends + +struct TBSAVEPARAMS + hkr dd ? + pszSubKey dd ? + pszValueName dd ? +ends + +struct TBREPLACEBITMAP + hInstOld dd ? + nIDOld dd ? + hInstNew dd ? + nIDNew dd ? + nButtons dd ? +ends + +struct NMTOOLBAR + hdr NMHDR + iItem dd ? + tbButton TBBUTTON + cchText dd ? + pszText dd ? +ends + +struct REBARINFO + cbSize dd ? + fMask dd ? + himl dd ? +ends + +struct REBARBANDINFO + cbSize dd ? + fMask dd ? + fStyle dd ? + clrFore dd ? + clrBack dd ? + lpText dd ? + cch dd ? + iImage dd ? + hwndChild dd ? + cxMinChild dd ? + cyMinChild dd ? + cx dd ? + hbmBack dd ? + wID dd ? +ends + +struct TOOLINFO + cbSize dd ? + uFlags dd ? + hwnd dd ? + uId dd ? + rect RECT + hInst dd ? + lpszText dd ? +ends + +struct TTHITTESTINFO + hwnd dd ? + pt POINT + ti TOOLINFO +ends + +struct TOOLTIPTEXT + hdr NMHDR + lpszText dd ? + szText db 80 dup (?) + hinst dd ? + uFlags dd ? +ends + +struct UDACCEL + nSec dd ? + nInc dd ? +ends + +struct NM_UPDOWN + hdr NMHDR + iPos dd ? + iDelta dd ? +ends + +struct LV_ITEM + mask dd ? + iItem dd ? + iSubItem dd ? + state dd ? + stateMask dd ? + pszText dd ? + cchTextMax dd ? + iImage dd ? + lParam dd ? + iIndent dd ? +ends + +struct LV_FINDINFO + flags dd ? + psz dd ? + lParam dd ? + pt POINT + vkDirection dd ? +ends + +struct LV_HITTESTINFO + pt POINT + flags dd ? + iItem dd ? +ends + +struct LV_COLUMN + mask dd ? + fmt dd ? + cx dd ? + pszText dd ? + cchTextMax dd ? + iSubItem dd ? +ends + +struct NM_LISTVIEW + hdr NMHDR + iItem dd ? + iSubItem dd ? + uNewState dd ? + uOldState dd ? + uChanged dd ? + ptAction POINT + lParam dd ? +ends + +struct NM_CACHEHINT + hdr NMHDR + iFrom dd ? + iTo dd ? +ends + +struct NM_FINDITEM + hdr NMHDR + iStart dd ? + lvfi LV_FINDINFO +ends + +struct LV_DISPINFO + hdr NMHDR + item LV_ITEM +ends + +struct LV_KEYDOWN + hdr NMHDR + wVKey dw ? + flags dd ? +ends + +struct TV_ITEM + mask dd ? + hItem dd ? + state dd ? + stateMask dd ? + pszText dd ? + cchTextMax dd ? + iImage dd ? + iSelectedImage dd ? + cChildren dd ? + lParam dd ? +ends + +struct TV_INSERTSTRUCT + hParent dd ? + hInsertAfter dd ? + item TV_ITEM +ends + +struct TV_HITTESTINFO + pt POINT + flags dd ? + hItem dd ? +ends + +struct TV_SORTCB + hParent dd ? + lpfnCompare dd ? + lParam dd ? +ends + +struct NM_TREEVIEW + hdr NMHDR + action dd ? + itemOld TV_ITEM + itemNew TV_ITEM + ptDrag POINT +ends + +struct TV_DISPINFO + hdr NMHDR + item TV_ITEM +ends + +struct TV_KEYDOWN + hdr NMHDR + wVKey dw ? + flags dd ? +ends + +struct TC_ITEMHEADER + mask dd ? + lpReserved1 dd ? + lpReserved2 dd ? + pszText dd ? + cchTextMax dd ? + iImage dd ? +ends + +struct TC_ITEM + mask dd ? + lpReserved1 dd ? + lpReserved2 dd ? + pszText dd ? + cchTextMax dd ? + iImage dd ? + lParam dd ? +ends + +struct TC_HITTESTINFO + pt POINT + flags dd ? +ends + +struct TC_KEYDOWN + hdr NMHDR + wVKey dw ? + flags dd ? +ends + +struct MC_HITTESTINFO + cbSize dd ? + pt POINT + uHit dd ? + st SYSTEMTIME +ends + +struct NM_SELCHANGE + nmhdr NMHDR + stSelStart SYSTEMTIME + stSelEnd SYSTEMTIME +ends + +struct NM_DAYSTATE + nmhdr NMHDR + stStart SYSTEMTIME + cDayState dd ? + prgDayState dd ? +ends + +struct NM_DATETIMECHANGE + nmhdr NMHDR + dwFlags dd ? + st SYSTEMTIME +ends + +struct NM_DATETIMESTRING + nmhdr NMHDR + pszUserString dd ? + st SYSTEMTIME + dwFlags dd ? +ends + +struct NM_DATETIMEWMKEYDOWN + nmhdr NMHDR + nVirtKey dd ? + pszFormat dd ? + st SYSTEMTIME +ends + +struct NM_DATETIMEFORMAT + nmhdr NMHDR + pszFormat dd ? + st SYSTEMTIME + pszDisplay dd ? + szDisplay db 64 dup (?) +ends + +struct NM_DATETIMEFORMATQUERY + nmhdr NMHDR + pszFormat dd ? + szMax SIZE +ends + +struct INITCOMMONCONTROLSEX + dwSize dd ? + dwICC dd ? +ends + +; Common control window classes + +HOTKEY_CLASS equ 'msctls_hotkey32' +PROGRESS_CLASS equ 'msctls_progress32' +STATUS_CLASS equ 'msctls_statusbar32' +TRACKBAR_CLASS equ 'msctls_trackbar32' +UPDOWN_CLASS equ 'msctls_updown32' +TOOLTIPS_CLASS equ 'tooltips_class32' +ANIMATE_CLASS equ 'SysAnimate32' +HEADER_CLASS equ 'SysHeader32' +LISTVIEW_CLASS equ 'SysListView32' +TREEVIEW_CLASS equ 'SysTreeView32' +TABCONTROL_CLASS equ 'SysTabControl32' +MONTHCAL_CLASS equ 'SysMonthCal32' +DATETIMEPICK_CLASS equ 'SysDateTimePick32' +TOOLBAR_CLASS equ 'ToolbarWindow32' +REBAR_CLASS equ 'ReBarWindow32' + +; Ranges for control message IDs + +LVM_FIRST = 1000h +TV_FIRST = 1100h +HDM_FIRST = 1200h +TCM_FIRST = 1300h +MCM_FIRST = 1000h +DTM_FIRST = 1000h +CCM_FIRST = 2000h + +; Ranges for control notification IDs + +NM_FIRST = 0 +LVN_FIRST = -100 +PSN_FIRST = -200 +HDN_FIRST = -300 +TVN_FIRST = -400 +TTN_FIRST = -520 +TCN_FIRST = -550 +CDN_FIRST = -601 +TBN_FIRST = -700 +UDN_FIRST = -721 +MCN_FIRST = -750 +DTN_FIRST = -760 +CBEN_FIRST = -800 +RBN_FIRST = -831 + +; Generic notifications + +NM_OUTOFMEMORY = NM_FIRST - 1 +NM_CLICK = NM_FIRST - 2 +NM_DBLCLK = NM_FIRST - 3 +NM_RETURN = NM_FIRST - 4 +NM_RCLICK = NM_FIRST - 5 +NM_RDBLCLK = NM_FIRST - 6 +NM_SETFOCUS = NM_FIRST - 7 +NM_KILLFOCUS = NM_FIRST - 8 +NM_CUSTOMDRAW = NM_FIRST - 12 + +; Common control styles + +CCS_TOP = 01h +CCS_NOMOVEY = 02h +CCS_BOTTOM = 03h +CCS_NORESIZE = 04h +CCS_NOPARENTALIGN = 08h +CCS_ADJUSTABLE = 20h +CCS_NODIVIDER = 40h +CCS_VERT = 80h +CCS_LEFT = CCS_VERT or CCS_TOP +CCS_RIGHT = CCS_VERT or CCS_BOTTOM +CCS_NOMOVEX = CCS_VERT or CCS_NOMOVEY + +; Owner-drawn control types + +ODT_HEADER = 100 +ODT_TAB = 101 +ODT_LISTVIEW = 102 + +; InitCommonControlsEx classes + +ICC_ANIMATE_CLASS = 0080h +ICC_BAR_CLASSES = 0004h +ICC_COOL_CLASSES = 0400h +ICC_DATE_CLASSES = 0100h +ICC_HOTKEY_CLASS = 0040h +ICC_INTERNET_CLASSES = 0800h +ICC_LISTVIEW_CLASSES = 0001h +ICC_PAGESCROLLER_CLASS = 1000h +ICC_PROGRESS_CLASS = 0020h +ICC_TAB_CLASSES = 0008h +ICC_TREEVIEW_CLASSES = 0002h +ICC_UPDOWN_CLASS = 0010h +ICC_USEREX_CLASSES = 0200h +ICC_WIN95_CLASSES = 00FFh + +; Shared messages + +CCM_SETCOLORSCHEME = CCM_FIRST + 2 +CCM_GETCOLORSCHEME = CCM_FIRST + 3 +CCM_GETDROPTARGET = CCM_FIRST + 4 +CCM_SETUNICODEFORMAT = CCM_FIRST + 5 +CCM_GETUNICODEFORMAT = CCM_FIRST + 6 + +; Property sheet page flags + +PSP_DEFAULT = 0000h +PSP_DLGINDIRECT = 0001h +PSP_USEHICON = 0002h +PSP_USEICONID = 0004h +PSP_USETITLE = 0008h +PSP_HASHELP = 0020h +PSP_USEREFPARENT = 0040h +PSP_USECALLBACK = 0080h + +; Property sheet page actions + +PSPCB_RELEASE = 1 +PSPCB_CREATE = 2 + +; Property sheet header flags + +PSH_DEFAULT = 0000h +PSH_PROPTITLE = 0001h +PSH_USEHICON = 0002h +PSH_USEICONID = 0004h +PSH_PROPSHEETPAGE = 0008h +PSH_MULTILINETABS = 0010h +PSH_WIZARD = 0020h +PSH_USEPSTARTPAGE = 0040h +PSH_NOAPPLYNOW = 0080h +PSH_USECALLBACK = 0100h +PSH_HASHELP = 0200h +PSH_MODELESS = 0400h + +; Property sheet actions + +PSCB_INITIALIZED = 1 + +; Property sheet notifications + +PSN_SETACTIVE = PSN_FIRST - 0 +PSN_KILLACTIVE = PSN_FIRST - 1 +PSN_APPLY = PSN_FIRST - 2 +PSN_RESET = PSN_FIRST - 3 +PSN_HELP = PSN_FIRST - 5 +PSN_WIZBACK = PSN_FIRST - 6 +PSN_WIZNEXT = PSN_FIRST - 7 +PSN_WIZFINISH = PSN_FIRST - 8 +PSN_QUERYCANCEL = PSN_FIRST - 9 + +; Property sheet return values + +PSNRET_NOERROR = 0 +PSNRET_INVALID = 1 +PSNRET_INVALID_NOCHANGEPAGE = 2 + +; Property sheet messages + +PSM_SETCURSEL = WM_USER + 101 +PSM_REMOVEPAGE = WM_USER + 102 +PSM_ADDPAGE = WM_USER + 103 +PSM_CHANGED = WM_USER + 104 +PSM_RESTARTWINDOWS = WM_USER + 105 +PSM_REBOOTSYSTEM = WM_USER + 106 +PSM_CANCELTOCLOSE = WM_USER + 107 +PSM_QUERYSIBLINGS = WM_USER + 108 +PSM_UNCHANGED = WM_USER + 109 +PSM_APPLY = WM_USER + 110 +PSM_SETTITLE = WM_USER + 111 +PSM_SETTITLEW = WM_USER + 120 +PSM_SETWIZBUTTONS = WM_USER + 112 +PSM_PRESSBUTTON = WM_USER + 113 +PSM_SETCURSELID = WM_USER + 114 +PSM_SETFINISHTEXT = WM_USER + 115 +PSM_SETFINISHTEXTW = WM_USER + 121 +PSM_GETTABCONTROL = WM_USER + 116 +PSM_ISDIALOGMESSAGE = WM_USER + 117 + +; Property sheet buttons + +PSBTN_BACK = 0 +PSBTN_NEXT = 1 +PSBTN_FINISH = 2 +PSBTN_OK = 3 +PSBTN_APPLYNOW = 4 +PSBTN_CANCEL = 5 +PSBTN_HELP = 6 +PSWIZB_BACK = 1 +PSWIZB_NEXT = 2 +PSWIZB_FINISH = 4 +PSWIZB_DISABLEDFINISH = 8 +ID_PSRESTARTWINDOWS = 2 +ID_PSREBOOTSYSTEM = ID_PSRESTARTWINDOWS or 1 + +; Property sheet sizes + +PROP_SM_CXDLG = 212 +PROP_SM_CYDLG = 188 +PROP_MED_CXDLG = 227 +PROP_MED_CYDLG = 215 +PROP_LG_CXDLG = 252 +PROP_LG_CYDLG = 218 +WIZ_CXDLG = 276 +WIZ_CYDLG = 140 +WIZ_CXBMP = 80 +WIZ_BODYX = 92 +WIZ_BODYCX = 184 + +; Image list types + +ILC_MASK = 001h +ILC_COLOR = 0FEh +ILC_COLORDDB = 0FEh +ILC_COLOR4 = 004h +ILC_COLOR8 = 008h +ILC_COLOR16 = 010h +ILC_COLOR24 = 018h +ILC_COLOR32 = 020h +ILC_PALETTE = 800h + +; Image list color values + +CLR_NONE = 0FFFFFFFFh +CLR_DEFAULT = 0FF000000h +CLR_HILIGHT = CLR_DEFAULT + +; Image list drawing styles + +ILD_NORMAL = 0000h +ILD_TRANSPARENT = 0001h +ILD_MASK = 0010h +ILD_IMAGE = 0020h +ILD_BLEND25 = 0002h +ILD_BLEND50 = 0004h +ILD_OVERLAYMASK = 0F00h +ILD_SELECTED = ILD_BLEND50 +ILD_FOCUS = ILD_BLEND25 +ILD_BLEND = ILD_BLEND50 + +; Header control styles + +HDS_HORZ = 00h +HDS_BUTTONS = 02h +HDS_HOTTRACK = 04h +HDS_HIDDEN = 08h +HDS_DRAGDROP = 40h +HDS_FULLDRAG = 80h + +; Header control structure flags + +HDI_WIDTH = 01h +HDI_HEIGHT = HDI_WIDTH +HDI_TEXT = 02h +HDI_FORMAT = 04h +HDI_LPARAM = 08h +HDI_BITMAP = 10h + +; Header control flags + +HDF_LEFT = 0000h +HDF_RIGHT = 0001h +HDF_CENTER = 0002h +HDF_JUSTIFYMASK = 0003h +HDF_RTLREADING = 0004h +HDF_BITMAP = 2000h +HDF_STRING = 4000h +HDF_OWNERDRAW = 8000h + +; Header control messages + +HDM_GETITEMCOUNT = HDM_FIRST + 0 +HDM_INSERTITEMA = HDM_FIRST + 1 +HDM_DELETEITEM = HDM_FIRST + 2 +HDM_GETITEMA = HDM_FIRST + 3 +HDM_SETITEMA = HDM_FIRST + 4 +HDM_LAYOUT = HDM_FIRST + 5 +HDM_HITTEST = HDM_FIRST + 6 +HDM_INSERTITEMW = HDM_FIRST + 10 +HDM_GETITEMW = HDM_FIRST + 11 +HDM_SETITEMW = HDM_FIRST + 12 +HDM_INSERTITEM = HDM_INSERTITEMA +HDM_GETITEM = HDM_GETITEMA +HDM_SETITEM = HDM_SETITEMA + +; Hit test result flags + +HHT_NOWHERE = 001h +HHT_ONHEADER = 002h +HHT_ONDIVIDER = 004h +HHT_ONDIVOPEN = 008h +HHT_ABOVE = 100h +HHT_BELOW = 200h +HHT_TORIGHT = 400h +HHT_TOLEFT = 800h + +; Header control notifications + +HDN_ITEMCHANGINGA = HDN_FIRST - 0 +HDN_ITEMCHANGEDA = HDN_FIRST - 1 +HDN_ITEMCLICKA = HDN_FIRST - 2 +HDN_ITEMDBLCLICKA = HDN_FIRST - 3 +HDN_DIVIDERDBLCLICKA = HDN_FIRST - 5 +HDN_BEGINTRACKA = HDN_FIRST - 6 +HDN_ENDTRACKA = HDN_FIRST - 7 +HDN_TRACKA = HDN_FIRST - 8 +HDN_ITEMCHANGINGW = HDN_FIRST - 20 +HDN_ITEMCHANGEDW = HDN_FIRST - 21 +HDN_ITEMCLICKW = HDN_FIRST - 22 +HDN_ITEMDBLCLICKW = HDN_FIRST - 23 +HDN_DIVIDERDBLCLICKW = HDN_FIRST - 25 +HDN_BEGINTRACKW = HDN_FIRST - 26 +HDN_ENDTRACKW = HDN_FIRST - 27 +HDN_TRACKW = HDN_FIRST - 28 +HDN_ITEMCHANGING = HDN_ITEMCHANGINGA +HDN_ITEMCHANGED = HDN_ITEMCHANGEDA +HDN_ITEMCLICK = HDN_ITEMCLICKA +HDN_ITEMDBLCLICK = HDN_ITEMDBLCLICKA +HDN_DIVIDERDBLCLICK = HDN_DIVIDERDBLCLICKA +HDN_BEGINTRACK = HDN_BEGINTRACKA +HDN_ENDTRACK = HDN_ENDTRACKA +HDN_TRACK = HDN_TRACKA + +; Toolbar bitmap flags + +CMB_MASKED = 2 + +; Toolbar button states + +TBSTATE_CHECKED = 01h +TBSTATE_PRESSED = 02h +TBSTATE_ENABLED = 04h +TBSTATE_HIDDEN = 08h +TBSTATE_INDETERMINATE = 10h +TBSTATE_WRAP = 20h +TBSTATE_ELLIPSES = 40h + +; Toolbar button styles + +TBSTYLE_BUTTON = 0000h +TBSTYLE_SEP = 0001h +TBSTYLE_CHECK = 0002h +TBSTYLE_GROUP = 0004h +TBSTYLE_CHECKGROUP = TBSTYLE_GROUP or TBSTYLE_CHECK +TBSTYLE_DROPDOWN = 0008h +TBSTYLE_TOOLTIPS = 0100h +TBSTYLE_WRAPABLE = 0200h +TBSTYLE_ALTDRAG = 0400h +TBSTYLE_FLAT = 0800h +TBSTYLE_LIST = 1000h +TBSTYLE_CUSTOMERASE = 2000h +TBSTYLE_TRANSPARENT = 8000h + +; Toolbar button extended styles + +TBSTYLE_EX_DRAWDDARROWS = 0001h + +; Toolbar messages + +TB_ENABLEBUTTON = WM_USER + 1 +TB_CHECKBUTTON = WM_USER + 2 +TB_PRESSBUTTON = WM_USER + 3 +TB_HIDEBUTTON = WM_USER + 4 +TB_INDETERMINATE = WM_USER + 5 +TB_ISBUTTONENABLED = WM_USER + 9 +TB_ISBUTTONCHECKED = WM_USER + 10 +TB_ISBUTTONPRESSED = WM_USER + 11 +TB_ISBUTTONHIDDEN = WM_USER + 12 +TB_ISBUTTONINDETERMINATE = WM_USER + 13 +TB_SETSTATE = WM_USER + 17 +TB_GETSTATE = WM_USER + 18 +TB_ADDBITMAP = WM_USER + 19 +TB_ADDBUTTONS = WM_USER + 20 +TB_INSERTBUTTON = WM_USER + 21 +TB_DELETEBUTTON = WM_USER + 22 +TB_GETBUTTON = WM_USER + 23 +TB_BUTTONCOUNT = WM_USER + 24 +TB_COMMANDTOINDEX = WM_USER + 25 +TB_SAVERESTOREA = WM_USER + 26 +TB_ADDSTRINGA = WM_USER + 28 +TB_CUSTOMIZE = WM_USER + 27 +TB_GETITEMRECT = WM_USER + 29 +TB_BUTTONSTRUCTSIZE = WM_USER + 30 +TB_SETBUTTONSIZE = WM_USER + 31 +TB_SETBITMAPSIZE = WM_USER + 32 +TB_AUTOSIZE = WM_USER + 33 +TB_GETTOOLTIPS = WM_USER + 35 +TB_SETTOOLTIPS = WM_USER + 36 +TB_SETPARENT = WM_USER + 37 +TB_SETROWS = WM_USER + 39 +TB_GETROWS = WM_USER + 40 +TB_GETBITMAPFLAGS = WM_USER + 41 +TB_SETCMDID = WM_USER + 42 +TB_CHANGEBITMAP = WM_USER + 43 +TB_GETBITMAP = WM_USER + 44 +TB_GETBUTTONTEXTA = WM_USER + 45 +TB_REPLACEBITMAP = WM_USER + 46 +TB_SETINDENT = WM_USER + 47 +TB_SETIMAGELIST = WM_USER + 48 +TB_GETIMAGELIST = WM_USER + 49 +TB_LOADIMAGES = WM_USER + 50 +TB_GETRECT = WM_USER + 51 +TB_SETHOTIMAGELIST = WM_USER + 52 +TB_GETHOTIMAGELIST = WM_USER + 53 +TB_SETDISABLEDIMAGELIST = WM_USER + 54 +TB_GETDISABLEDIMAGELIST = WM_USER + 55 +TB_SETSTYLE = WM_USER + 56 +TB_GETSTYLE = WM_USER + 57 +TB_GETBUTTONSIZE = WM_USER + 58 +TB_SETBUTTONWIDTH = WM_USER + 59 +TB_SETMAXTEXTROWS = WM_USER + 60 +TB_GETTEXTROWS = WM_USER + 61 +TB_GETBUTTONTEXTW = WM_USER + 75 +TB_SAVERESTOREW = WM_USER + 76 +TB_ADDSTRINGW = WM_USER + 77 +TB_SETEXTENDEDSTYLE = WM_USER + 84 +TB_GETEXTENDEDSTYLE = WM_USER + 85 +TB_GETBUTTONTEXT = TB_GETBUTTONTEXTA +TB_SAVERESTORE = TB_SAVERESTOREA +TB_ADDSTRING = TB_ADDSTRINGA + +; System-defined button bitmaps + +HINST_COMMCTRL = -1 +IDB_STD_SMALL_COLOR = 0 +IDB_STD_LARGE_COLOR = 1 +IDB_VIEW_SMALL_COLOR = 4 +IDB_VIEW_LARGE_COLOR = 5 +IDB_HIST_SMALL_COLOR = 8 +IDB_HIST_LARGE_COLOR = 9 + +; Icon indexes for standard bitmap + +STD_CUT = 0 +STD_COPY = 1 +STD_PASTE = 2 +STD_UNDO = 3 +STD_REDOW = 4 +STD_DELETE = 5 +STD_FILENEW = 6 +STD_FILEOPEN = 7 +STD_FILESAVE = 8 +STD_PRINTPRE = 9 +STD_PROPERTIES = 10 +STD_HELP = 11 +STD_FIND = 12 +STD_REPLACE = 13 +STD_PRINT = 14 + +; Icon indexes for standard view bitmap + +VIEW_LARGEICONS = 0 +VIEW_SMALLICONS = 1 +VIEW_LIST = 2 +VIEW_DETAILS = 3 +VIEW_SORTNAME = 4 +VIEW_SORTSIZE = 5 +VIEW_SORTDATE = 6 +VIEW_SORTTYPE = 7 +VIEW_PARENTFOLDER = 8 +VIEW_NETCONNECT = 9 +VIEW_NETDISCONNECT = 10 +VIEW_NEWFOLDER = 11 + +; Icon indexes for history bitmap + +HIST_BACK = 0 +HIST_FORWARD = 1 +HIST_FAVORITES = 2 +HIST_ADDTOFAVORITES = 3 +HIST_VIEWTREE = 4 + +; Toolbar bitmap flags + +TBBF_LARGE = 1 + +; Toolbar notifications + +TBN_GETBUTTONINFOA = TBN_FIRST - 0 +TBN_BEGINDRAG = TBN_FIRST - 1 +TBN_ENDDRAG = TBN_FIRST - 2 +TBN_BEGINADJUST = TBN_FIRST - 3 +TBN_ENDADJUST = TBN_FIRST - 4 +TBN_RESET = TBN_FIRST - 5 +TBN_QUERYINSERT = TBN_FIRST - 6 +TBN_QUERYDELETE = TBN_FIRST - 7 +TBN_TOOLBARCHANGE = TBN_FIRST - 8 +TBN_CUSTHELP = TBN_FIRST - 9 +TBN_DROPDOWN = TBN_FIRST - 10 +TBN_CLOSEUP = TBN_FIRST - 11 +TBN_GETBUTTONINFOW = TBN_FIRST - 20 +TBN_GETBUTTONINFO = TBN_GETBUTTONINFOA + +; ReBar styles + +RBS_TOOLTIPS = 100h +RBS_VARHEIGHT = 200h +RBS_BANDBORDERS = 400h +RBS_FIXEDORDER = 800h +RBS_REGISTERDROP = 1000h +RBS_AUTOSIZE = 2000h +RBS_VERTICALGRIPPER = 4000h +RBS_DBLCLKTOGGLE = 8000h + +; ReBar band info structure flags + +RBBIM_STYLE = 001h +RBBIM_COLORS = 002h +RBBIM_TEXT = 004h +RBBIM_IMAGE = 008h +RBBIM_CHILD = 010h +RBBIM_CHILDSIZE = 020h +RBBIM_SIZE = 040h +RBBIM_BACKGROUND = 080h +RBBIM_ID = 100h +RBBIM_IDEALSIZE = 200h +RBBIM_LPARAM = 400h +RBBIM_HEADERSIZE = 800h + +; ReBar band styles + +RBBS_BREAK = 001h +RBBS_FIXEDSIZE = 002h +RBBS_CHILDEDGE = 004h +RBBS_HIDDEN = 008h +RBBS_NOVERT = 010h +RBBS_FIXEDBMP = 020h +RBBS_VARIABLEHEIGHT = 040h +RBBS_GRIPPERALWAYS = 080h +RBBS_NOGRIPPER = 100h + +; ReBar messages + +RB_INSERTBANDA = WM_USER + 1 +RB_DELETEBAND = WM_USER + 2 +RB_GETBARINFO = WM_USER + 3 +RB_SETBARINFO = WM_USER + 4 +RB_GETBANDINFO = WM_USER + 5 +RB_SETBANDINFOA = WM_USER + 6 +RB_SETPARENT = WM_USER + 7 +RB_INSERTBANDW = WM_USER + 10 +RB_SETBANDINFOW = WM_USER + 11 +RB_GETBANDCOUNT = WM_USER + 12 +RB_GETROWCOUNT = WM_USER + 13 +RB_GETROWHEIGHT = WM_USER + 14 +RB_IDTOINDEX = WM_USER + 16 +RB_GETTOOLTIPS = WM_USER + 17 +RB_SETTOOLTIPS = WM_USER + 18 +RB_SETBKCOLOR = WM_USER + 19 +RB_GETBKCOLOR = WM_USER + 20 +RB_SETTEXTCOLOR = WM_USER + 21 +RB_GETTEXTCOLOR = WM_USER + 22 +RB_SIZETORECT = WM_USER + 23 +RB_BEGINDRAG = WM_USER + 24 +RB_ENDDRAG = WM_USER + 25 +RB_DRAGMOVE = WM_USER + 26 +RB_GETBARHEIGHT = WM_USER + 27 +RB_GETBANDINFOW = WM_USER + 28 +RB_GETBANDINFOA = WM_USER + 29 +RB_MINIMIZEBAND = WM_USER + 30 +RB_MAXIMIZEBAND = WM_USER + 31 +RB_GETDROPTARGET = CCM_GETDROPTARGET +RB_GETBANDBORDERS = WM_USER + 34 +RB_SHOWBAND = WM_USER + 35 +RB_SETPALETTE = WM_USER + 37 +RB_GETPALETTE = WM_USER + 38 +RB_MOVEBAND = WM_USER + 39 +RB_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT +RB_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT +RB_INSERTBAND = RB_INSERTBANDA +RB_SETBANDINFO = RB_SETBANDINFOA + +; ReBar notifications + +RBN_HEIGHTCHANGE = RBN_FIRST - 0 +RBN_GETOBJECT = RBN_FIRST - 1 +RBN_LAYOUTCHANGED = RBN_FIRST - 2 +RBN_AUTOSIZE = RBN_FIRST - 3 +RBN_BEGINDRAG = RBN_FIRST - 4 +RBN_ENDDRAG = RBN_FIRST - 5 +RBN_DELETINGBAND = RBN_FIRST - 6 +RBN_DELETEDBAND = RBN_FIRST - 7 +RBN_CHILDSIZE = RBN_FIRST - 8 + +; Tooltip styles + +TTS_ALWAYSTIP = 1 +TTS_NOPREFIX = 2 + +; Tooltip flags + +TTF_IDISHWND = 01h +TTF_CENTERTIP = 02h +TTF_RTLREADING = 04h +TTF_SUBCLASS = 10h + +; Tooltip durations + +TTDT_AUTOMATIC = 0 +TTDT_RESHOW = 1 +TTDT_AUTOPOP = 2 +TTDT_INITIAL = 3 + +; Tooltip messages + +TTM_ACTIVATE = WM_USER + 1 +TTM_SETDELAYTIME = WM_USER + 3 +TTM_ADDTOOLA = WM_USER + 4 +TTM_DELTOOLA = WM_USER + 5 +TTM_NEWTOOLRECTA = WM_USER + 6 +TTM_RELAYEVENT = WM_USER + 7 +TTM_GETTOOLINFOA = WM_USER + 8 +TTM_SETTOOLINFOA = WM_USER + 9 +TTM_HITTESTA = WM_USER + 10 +TTM_GETTEXTA = WM_USER + 11 +TTM_UPDATETIPTEXTA = WM_USER + 12 +TTM_GETTOOLCOUNT = WM_USER + 13 +TTM_ENUMTOOLSA = WM_USER + 14 +TTM_GETCURRENTTOOLA = WM_USER + 15 +TTM_WINDOWFROMPOINT = WM_USER + 16 +TTM_ADDTOOLW = WM_USER + 50 +TTM_DELTOOLW = WM_USER + 51 +TTM_NEWTOOLRECTW = WM_USER + 52 +TTM_GETTOOLINFOW = WM_USER + 53 +TTM_SETTOOLINFOW = WM_USER + 54 +TTM_HITTESTW = WM_USER + 55 +TTM_GETTEXTW = WM_USER + 56 +TTM_UPDATETIPTEXTW = WM_USER + 57 +TTM_ENUMTOOLSW = WM_USER + 58 +TTM_GETCURRENTTOOLW = WM_USER + 59 +TTM_ADDTOOL = TTM_ADDTOOLA +TTM_DELTOOL = TTM_DELTOOLA +TTM_NEWTOOLRECT = TTM_NEWTOOLRECTA +TTM_GETTOOLINFO = TTM_GETTOOLINFOA +TTM_SETTOOLINFO = TTM_SETTOOLINFOA +TTM_HITTEST = TTM_HITTESTA +TTM_GETTEXT = TTM_GETTEXTA +TTM_UPDATETIPTEXT = TTM_UPDATETIPTEXTA +TTM_ENUMTOOLS = TTM_ENUMTOOLSA +TTM_GETCURRENTTOOL = TTM_GETCURRENTTOOLA + +; Tooltip notifications + +TTN_NEEDTEXTA = TTN_FIRST - 0 +TTN_SHOW = TTN_FIRST - 1 +TTN_POP = TTN_FIRST - 2 +TTN_NEEDTEXTW = TTN_FIRST - 10 +TTN_NEEDTEXT = TTN_NEEDTEXTA + +; Status bar styles + +SBARS_SIZEGRIP = 100h + +; Status bar messages + +SB_SETTEXTA = WM_USER + 1 +SB_GETTEXTA = WM_USER + 2 +SB_GETTEXTLENGTHA = WM_USER + 3 +SB_SETPARTS = WM_USER + 4 +SB_GETPARTS = WM_USER + 6 +SB_GETBORDERS = WM_USER + 7 +SB_SETMINHEIGHT = WM_USER + 8 +SB_SIMPLE = WM_USER + 9 +SB_GETRECT = WM_USER + 10 +SB_SETTEXTW = WM_USER + 11 +SB_GETTEXTW = WM_USER + 13 +SB_GETTEXTLENGTHW = WM_USER + 12 +SB_SETTEXT = SB_SETTEXTA +SB_GETTEXT = SB_GETTEXTA +SB_GETTEXTLENGTH = SB_GETTEXTLENGTHA + +; Status bar drawing types + +SBT_OWNERDRAW = 1000h +SBT_NOBORDERS = 0100h +SBT_POPOUT = 0200h +SBT_RTLREADING = 0400h + +; Trackbar styles + +TBS_AUTOTICKS = 01h +TBS_VERT = 02h +TBS_HORZ = 00h +TBS_TOP = 04h +TBS_BOTTOM = 00h +TBS_LEFT = 04h +TBS_RIGHT = 00h +TBS_BOTH = 08h +TBS_NOTICKS = 10h +TBS_ENABLESELRANGE = 20h +TBS_FIXEDLENGTH = 40h +TBS_NOTHUMB = 80h + +; Trackbar messages + +TBM_GETPOS = WM_USER + 0 +TBM_GETRANGEMIN = WM_USER + 1 +TBM_GETRANGEMAX = WM_USER + 2 +TBM_GETTIC = WM_USER + 3 +TBM_SETTIC = WM_USER + 4 +TBM_SETPOS = WM_USER + 5 +TBM_SETRANGE = WM_USER + 6 +TBM_SETRANGEMIN = WM_USER + 7 +TBM_SETRANGEMAX = WM_USER + 8 +TBM_CLEARTICS = WM_USER + 9 +TBM_SETSEL = WM_USER + 10 +TBM_SETSELSTART = WM_USER + 11 +TBM_SETSELEND = WM_USER + 12 +TBM_GETPTICS = WM_USER + 14 +TBM_GETTICPOS = WM_USER + 15 +TBM_GETNUMTICS = WM_USER + 16 +TBM_GETSELSTART = WM_USER + 17 +TBM_GETSELEND = WM_USER + 18 +TBM_CLEARSEL = WM_USER + 19 +TBM_SETTICFREQ = WM_USER + 20 +TBM_SETPAGESIZE = WM_USER + 21 +TBM_GETPAGESIZE = WM_USER + 22 +TBM_SETLINESIZE = WM_USER + 23 +TBM_GETLINESIZE = WM_USER + 24 +TBM_GETTHUMBRECT = WM_USER + 25 +TBM_GETCHANNELRECT = WM_USER + 26 +TBM_SETTHUMBLENGTH = WM_USER + 27 +TBM_GETTHUMBLENGTH = WM_USER + 28 + +; Trackbar notifications + +TB_LINEUP = 0 +TB_LINEDOWN = 1 +TB_PAGEUP = 2 +TB_PAGEDOWN = 3 +TB_THUMBPOSITION = 4 +TB_THUMBTRACK = 5 +TB_TOP = 6 +TB_BOTTOM = 7 +TB_ENDTRACK = 8 + +; Up-down control styles + +UDS_WRAP = 01h +UDS_SETBUDDYINT = 02h +UDS_ALIGNRIGHT = 04h +UDS_ALIGNLEFT = 08h +UDS_AUTOBUDDY = 10h +UDS_ARROWKEYS = 20h +UDS_HORZ = 40h +UDS_NOTHOUSANDS = 80h + +; Up-down control messages + +UDM_SETRANGE = WM_USER + 101 +UDM_GETRANGE = WM_USER + 102 +UDM_SETPOS = WM_USER + 103 +UDM_GETPOS = WM_USER + 104 +UDM_SETBUDDY = WM_USER + 105 +UDM_GETBUDDY = WM_USER + 106 +UDM_SETACCEL = WM_USER + 107 +UDM_GETACCEL = WM_USER + 108 +UDM_SETBASE = WM_USER + 109 +UDM_GETBASE = WM_USER + 110 + +; Up-down control notifications + +UDN_DELTAPOS = UDN_FIRST - 1 + +; Progress bar messages + +PBM_SETRANGE = WM_USER + 1 +PBM_SETPOS = WM_USER + 2 +PBM_DELTAPOS = WM_USER + 3 +PBM_SETSTEP = WM_USER + 4 +PBM_STEPIT = WM_USER + 5 +PBM_SETRANGE32 = WM_USER + 6 +PBM_GETRANGE = WM_USER + 7 +PBM_GETPOS = WM_USER + 8 + +; Hot-key control messages + +HKM_SETHOTKEY = WM_USER + 1 +HKM_GETHOTKEY = WM_USER + 2 +HKM_SETRULES = WM_USER + 3 + +; Hot key flags + +HOTKEYF_SHIFT = 1 +HOTKEYF_CONTROL = 2 +HOTKEYF_ALT = 4 +HOTKEYF_EXT = 8 + +; Key combination flags + +HKCOMB_NONE = 01h +HKCOMB_S = 02h +HKCOMB_C = 04h +HKCOMB_A = 08h +HKCOMB_SC = 10h +HKCOMB_SA = 20h +HKCOMB_CA = 40h +HKCOMB_SCA = 80h + +; List view styles + +LVS_ICON = 0000h +LVS_REPORT = 0001h +LVS_SMALLICON = 0002h +LVS_LIST = 0003h +LVS_TYPEMASK = 0003h +LVS_SINGLESEL = 0004h +LVS_SHOWSELALWAYS = 0008h +LVS_SORTASCENDING = 0010h +LVS_SORTDESCENDING = 0020h +LVS_SHAREIMAGELISTS = 0040h +LVS_NOLABELWRAP = 0080h +LVS_AUTOARRANGE = 0100h +LVS_EDITLABELS = 0200h +LVS_OWNERDATA = 1000h +LVS_NOSCROLL = 2000h +LVS_ALIGNTOP = 0000h +LVS_ALIGNLEFT = 0800h +LVS_OWNERDRAWFIXED = 0400h +LVS_NOCOLUMNHEADER = 4000h +LVS_NOSORTHEADER = 8000h + +; List view extended styles + +LVS_EX_GRIDLINES = 0001h +LVS_EX_SUBITEMIMAGES = 0002h +LVS_EX_CHECKBOXES = 0004h +LVS_EX_TRACKSELECT = 0008h +LVS_EX_HEADERDRAGDROP = 0010h +LVS_EX_FULLROWSELECT = 0020h +LVS_EX_ONECLICKACTIVATE = 0040h +LVS_EX_TWOCLICKACTIVATE = 0080h +LVS_EX_FLATSB = 0100h +LVS_EX_REGIONAL = 0200h +LVS_EX_INFOTIP = 0400h +LVS_EX_UNDERLINEHOT = 0800h +LVS_EX_UNDERLINECOLD = 1000h +LVS_EX_MULTIWORKAREAS = 2000h +LVS_EX_LABELTIP = 4000h + +; List view messages + +LVM_GETBKCOLOR = LVM_FIRST + 0 +LVM_SETBKCOLOR = LVM_FIRST + 1 +LVM_GETIMAGELIST = LVM_FIRST + 2 +LVM_SETIMAGELIST = LVM_FIRST + 3 +LVM_GETITEMCOUNT = LVM_FIRST + 4 +LVM_GETITEMA = LVM_FIRST + 5 +LVM_SETITEMA = LVM_FIRST + 6 +LVM_INSERTITEMA = LVM_FIRST + 7 +LVM_DELETEITEM = LVM_FIRST + 8 +LVM_DELETEALLITEMS = LVM_FIRST + 9 +LVM_GETCALLBACKMASK = LVM_FIRST + 10 +LVM_SETCALLBACKMASK = LVM_FIRST + 11 +LVM_GETNEXTITEM = LVM_FIRST + 12 +LVM_FINDITEMA = LVM_FIRST + 13 +LVM_GETITEMRECT = LVM_FIRST + 14 +LVM_SETITEMPOSITION = LVM_FIRST + 15 +LVM_GETITEMPOSITION = LVM_FIRST + 16 +LVM_GETSTRINGWIDTHA = LVM_FIRST + 17 +LVM_HITTEST = LVM_FIRST + 18 +LVM_ENSUREVISIBLE = LVM_FIRST + 19 +LVM_SCROLL = LVM_FIRST + 20 +LVM_REDRAWITEMS = LVM_FIRST + 21 +LVM_ARRANGE = LVM_FIRST + 22 +LVM_EDITLABELA = LVM_FIRST + 23 +LVM_GETEDITCONTROL = LVM_FIRST + 24 +LVM_GETCOLUMNA = LVM_FIRST + 25 +LVM_SETCOLUMNA = LVM_FIRST + 26 +LVM_INSERTCOLUMNA = LVM_FIRST + 27 +LVM_DELETECOLUMN = LVM_FIRST + 28 +LVM_GETCOLUMNWIDTH = LVM_FIRST + 29 +LVM_SETCOLUMNWIDTH = LVM_FIRST + 30 +LVM_CREATEDRAGIMAGE = LVM_FIRST + 33 +LVM_GETVIEWRECT = LVM_FIRST + 34 +LVM_GETTEXTCOLOR = LVM_FIRST + 35 +LVM_SETTEXTCOLOR = LVM_FIRST + 36 +LVM_GETTEXTBKCOLOR = LVM_FIRST + 37 +LVM_SETTEXTBKCOLOR = LVM_FIRST + 38 +LVM_GETTOPINDEX = LVM_FIRST + 39 +LVM_GETCOUNTPERPAGE = LVM_FIRST + 40 +LVM_GETORIGIN = LVM_FIRST + 41 +LVM_UPDATE = LVM_FIRST + 42 +LVM_SETITEMSTATE = LVM_FIRST + 43 +LVM_GETITEMSTATE = LVM_FIRST + 44 +LVM_GETITEMTEXTA = LVM_FIRST + 45 +LVM_SETITEMTEXTA = LVM_FIRST + 46 +LVM_SETITEMCOUNT = LVM_FIRST + 47 +LVM_SORTITEMS = LVM_FIRST + 48 +LVM_SETITEMPOSITION32 = LVM_FIRST + 49 +LVM_GETSELECTEDCOUNT = LVM_FIRST + 50 +LVM_GETITEMSPACING = LVM_FIRST + 51 +LVM_GETISEARCHSTRINGA = LVM_FIRST + 52 +LVM_SETICONSPACING = LVM_FIRST + 53 +LVM_SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 54 +LVM_GETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 55 +LVM_GETSUBITEMRECT = LVM_FIRST + 56 +LVM_SUBITEMHITTEST = LVM_FIRST + 57 +LVM_SETCOLUMNORDERARRAY = LVM_FIRST + 58 +LVM_GETCOLUMNORDERARRAY = LVM_FIRST + 59 +LVM_SETHOTITEM = LVM_FIRST + 60 +LVM_GETHOTITEM = LVM_FIRST + 61 +LVM_SETHOTCURSOR = LVM_FIRST + 62 +LVM_GETHOTCURSOR = LVM_FIRST + 63 +LVM_APPROXIMATEVIEWRECT = LVM_FIRST + 64 +LVM_SETWORKAREA = LVM_FIRST + 65 +LVM_GETITEMW = LVM_FIRST + 75 +LVM_SETITEMW = LVM_FIRST + 76 +LVM_INSERTITEMW = LVM_FIRST + 77 +LVM_FINDITEMW = LVM_FIRST + 83 +LVM_GETSTRINGWIDTHW = LVM_FIRST + 87 +LVM_GETCOLUMNW = LVM_FIRST + 95 +LVM_SETCOLUMNW = LVM_FIRST + 96 +LVM_INSERTCOLUMNW = LVM_FIRST + 97 +LVM_GETITEMTEXTW = LVM_FIRST + 115 +LVM_SETITEMTEXTW = LVM_FIRST + 116 +LVM_GETISEARCHSTRINGW = LVM_FIRST + 117 +LVM_EDITLABELW = LVM_FIRST + 118 +LVM_GETITEM = LVM_GETITEMA +LVM_SETITEM = LVM_SETITEMA +LVM_INSERTITEM = LVM_INSERTITEMA +LVM_FINDITEM = LVM_FINDITEMA +LVM_GETSTRINGWIDTH = LVM_GETSTRINGWIDTHA +LVM_GETCOLUMN = LVM_GETCOLUMNA +LVM_SETCOLUMN = LVM_SETCOLUMNA +LVM_INSERTCOLUMN = LVM_INSERTCOLUMNA +LVM_GETITEMTEXT = LVM_GETITEMTEXTA +LVM_SETITEMTEXT = LVM_SETITEMTEXTA +LVM_GETISEARCHSTRING = LVM_GETISEARCHSTRINGA +LVM_EDITLABEL = LVM_EDITLABELA + +; List view image list types + +LVSIL_NORMAL = 0 +LVSIL_SMALL = 1 +LVSIL_STATE = 2 + +; LVM_SETITEMCOUNT flags + +LVSICF_NOINVALIDATEALL = 1 +LVSICF_NOSCROLL = 2 + +; List view item structure flags + +LVIF_TEXT = 0001h +LVIF_IMAGE = 0002h +LVIF_PARAM = 0004h +LVIF_STATE = 0008h +LVIF_INDENT = 0010h +LVIF_NORECOMPUTE = 0800h +LVIF_DI_SETITEM = 1000h + +; List view item states + +LVIS_FOCUSED = 00001h +LVIS_SELECTED = 00002h +LVIS_CUT = 00004h +LVIS_DROPHILITED = 00008h +LVIS_ACTIVATING = 0020h +LVIS_OVERLAYMASK = 00F00h +LVIS_STATEIMAGEMASK = 0F000h + +; List view callback item values + +LPSTR_TEXTCALLBACK = -1 +I_IMAGECALLBACK = -1 +I_CHILDRENCALLBACK = -1 + +; List view next item relations + +LVNI_ALL = 000h +LVNI_FOCUSED = 001h +LVNI_SELECTED = 002h +LVNI_CUT = 004h +LVNI_DROPHILITED = 008h +LVNI_ABOVE = 100h +LVNI_BELOW = 200h +LVNI_TOLEFT = 400h +LVNI_TORIGHT = 800h + +; List view search types + +LVFI_PARAM = 01h +LVFI_STRING = 02h +LVFI_PARTIAL = 08h +LVFI_WRAP = 20h +LVFI_NEARESTXY = 40h + +; List view item rectangle types + +LVIR_BOUNDS = 0 +LVIR_ICON = 1 +LVIR_LABEL = 2 +LVIR_SELECTBOUNDS = 3 + +; List view hit test flags + +LVHT_NOWHERE = 01h +LVHT_ONITEMICON = 02h +LVHT_ONITEMLABEL = 04h +LVHT_ONITEMSTATEICON= 08h +LVHT_ONITEM = LVHT_ONITEMICON or LVHT_ONITEMLABEL or LVHT_ONITEMSTATEICON +LVHT_ABOVE = 08h +LVHT_BELOW = 10h +LVHT_TORIGHT = 20h +LVHT_TOLEFT = 40h + +; List view alignment values + +LVA_DEFAULT = 000h +LVA_ALIGNLEFT = 001h +LVA_ALIGNTOP = 002h +LVA_ALIGNRIGHT = 003h +LVA_ALIGNBOTTOM = 004h +LVA_SNAPTOGRID = 005h +LVA_SORTASCENDING = 100h +LVA_SORTDESCENDING = 200h + +; List view column structure flags + +LVCF_FMT = 1 +LVCF_WIDTH = 2 +LVCF_TEXT = 4 +LVCF_SUBITEM = 8 + +; List view column alignment values + +LVCFMT_LEFT = 0 +LVCFMT_RIGHT = 1 +LVCFMT_CENTER = 2 +LVCFMT_JUSTIFYMASK = 3 + +; List view column width values + +LVSCW_AUTOSIZE = -1 +LVSCW_AUTOSIZE_USEHEADER = -2 + +; List view notifications + +LVN_ITEMCHANGING = LVN_FIRST - 0 +LVN_ITEMCHANGED = LVN_FIRST - 1 +LVN_INSERTITEM = LVN_FIRST - 2 +LVN_DELETEITEM = LVN_FIRST - 3 +LVN_DELETEALLITEMS = LVN_FIRST - 4 +LVN_BEGINLABELEDITA = LVN_FIRST - 5 +LVN_ENDLABELEDITA = LVN_FIRST - 6 +LVN_COLUMNCLICK = LVN_FIRST - 8 +LVN_BEGINDRAG = LVN_FIRST - 9 +LVN_BEGINRDRAG = LVN_FIRST - 11 +LVN_ODCACHEHINT = LVN_FIRST - 13 +LVN_GETDISPINFOA = LVN_FIRST - 50 +LVN_SETDISPINFOA = LVN_FIRST - 51 +LVN_ODFINDITEMA = LVN_FIRST - 52 +LVN_KEYDOWN = LVN_FIRST - 55 +LVN_BEGINLABELEDITW = LVN_FIRST - 75 +LVN_ENDLABELEDITW = LVN_FIRST - 76 +LVN_GETDISPINFOW = LVN_FIRST - 77 +LVN_SETDISPINFOW = LVN_FIRST - 78 +LVN_ODFINDITEMW = LVN_FIRST - 79 +LVN_BEGINLABELEDIT = LVN_BEGINLABELEDITA +LVN_ENDLABELEDIT = LVN_ENDLABELEDITA +LVN_GETDISPINFO = LVN_GETDISPINFOA +LVN_SETDISPINFO = LVN_SETDISPINFOA +LVN_ODFINDITEM = LVN_ODFINDITEMA + +; Tree view styles + +TVS_HASBUTTONS = 0001h +TVS_HASLINES = 0002h +TVS_LINESATROOT = 0004h +TVS_EDITLABELS = 0008h +TVS_DISABLEDRAGDROP = 0010h +TVS_SHOWSELALWAYS = 0020h +TVS_RTLREADING = 0040h +TVS_NOTOOLTIPS = 0080h +TVS_CHECKBOXES = 0100h +TVS_TRACKSELECT = 0200h +TVS_SINGLEEXPAND = 0400h +TVS_INFOTIP = 0800h +TVS_FULLROWSELECT = 1000h +TVS_NOSCROLL = 2000h +TVS_NONEVENHEIGHT = 4000h + +; Tree view item structure flags + +TVIF_TEXT = 0001h +TVIF_IMAGE = 0002h +TVIF_PARAM = 0004h +TVIF_STATE = 0008h +TVIF_HANDLE = 0010h +TVIF_SELECTEDIMAGE = 0020h +TVIF_CHILDREN = 0040h +TVIF_DI_SETITEM = 1000h + +; Tree view item states + +TVIS_FOCUSED = 00001h +TVIS_SELECTED = 00002h +TVIS_CUT = 00004h +TVIS_DROPHILITED = 00008h +TVIS_BOLD = 00010h +TVIS_EXPANDED = 00020h +TVIS_EXPANDEDONCE = 00040h +TVIS_EXPANDPARTIAL = 00080h +TVIS_OVERLAYMASK = 00F00h +TVIS_STATEIMAGEMASK = 0F000h +TVIS_USERMASK = 0F000h + +; Tree view predefined item values + +TVI_ROOT = 0FFFF0000h +TVI_FIRST = 0FFFF0001h +TVI_LAST = 0FFFF0002h +TVI_SORT = 0FFFF0003h + +; Tree view messages + +TVM_INSERTITEMA = TV_FIRST + 0 +TVM_DELETEITEM = TV_FIRST + 1 +TVM_EXPAND = TV_FIRST + 2 +TVM_GETITEMRECT = TV_FIRST + 4 +TVM_GETCOUNT = TV_FIRST + 5 +TVM_GETINDENT = TV_FIRST + 6 +TVM_SETINDENT = TV_FIRST + 7 +TVM_GETIMAGELIST = TV_FIRST + 8 +TVM_SETIMAGELIST = TV_FIRST + 9 +TVM_GETNEXTITEM = TV_FIRST + 10 +TVM_SELECTITEM = TV_FIRST + 11 +TVM_GETITEMA = TV_FIRST + 12 +TVM_SETITEMA = TV_FIRST + 13 +TVM_EDITLABELA = TV_FIRST + 14 +TVM_GETEDITCONTROL = TV_FIRST + 15 +TVM_GETVISIBLECOUNT = TV_FIRST + 16 +TVM_HITTEST = TV_FIRST + 17 +TVM_CREATEDRAGIMAGE = TV_FIRST + 18 +TVM_SORTCHILDREN = TV_FIRST + 19 +TVM_ENSUREVISIBLE = TV_FIRST + 20 +TVM_SORTCHILDRENCB = TV_FIRST + 21 +TVM_ENDEDITLABELNOW = TV_FIRST + 22 +TVM_GETISEARCHSTRINGA = TV_FIRST + 23 +TVM_INSERTITEMW = TV_FIRST + 50 +TVM_GETITEMW = TV_FIRST + 62 +TVM_SETITEMW = TV_FIRST + 63 +TVM_GETISEARCHSTRINGW = TV_FIRST + 64 +TVM_EDITLABELW = TV_FIRST + 65 +TVM_INSERTITEM = TVM_INSERTITEMA +TVM_GETITEM = TVM_GETITEMA +TVM_SETITEM = TVM_SETITEMA +TVM_GETISEARCHSTRING = TVM_GETISEARCHSTRINGA +TVM_EDITLABEL = TVM_EDITLABELA + +; Tree view action flags + +TVE_COLLAPSE = 0001h +TVE_EXPAND = 0002h +TVE_TOGGLE = 0003h +TVE_EXPANDPARTIAL = 4000h +TVE_COLLAPSERESET = 8000h + +; Tree view image list types + +TVSIL_NORMAL = 0 +TVSIL_STATE = 2 + +; Tree view next item types + +TVGN_ROOT = 0 +TVGN_NEXT = 1 +TVGN_PREVIOUS = 2 +TVGN_PARENT = 3 +TVGN_CHILD = 4 +TVGN_FIRSTVISIBLE = 5 +TVGN_NEXTVISIBLE = 6 +TVGN_PREVIOUSVISIBLE = 7 +TVGN_DROPHILITE = 8 +TVGN_CARET = 9 + +; Tree view hit test flags + +TVHT_NOWHERE = 001h +TVHT_ONITEMICON = 002h +TVHT_ONITEMLABEL = 004h +TVHT_ONITEMINDENT = 008h +TVHT_ONITEMBUTTON = 010h +TVHT_ONITEMRIGHT = 020h +TVHT_ONITEMSTATEICON = 040h +TVHT_ONITEM = TVHT_ONITEMICON or TVHT_ONITEMLABEL or TVHT_ONITEMSTATEICON +TVHT_ABOVE = 100h +TVHT_BELOW = 200h +TVHT_TORIGHT = 400h +TVHT_TOLEFT = 800h + +; Tree view notifications + +TVN_SELCHANGINGA = TVN_FIRST - 1 +TVN_SELCHANGEDA = TVN_FIRST - 2 +TVN_GETDISPINFOA = TVN_FIRST - 3 +TVN_SETDISPINFOA = TVN_FIRST - 4 +TVN_ITEMEXPANDINGA = TVN_FIRST - 5 +TVN_ITEMEXPANDEDA = TVN_FIRST - 6 +TVN_BEGINDRAGA = TVN_FIRST - 7 +TVN_BEGINRDRAGA = TVN_FIRST - 8 +TVN_DELETEITEMA = TVN_FIRST - 9 +TVN_BEGINLABELEDITA = TVN_FIRST - 10 +TVN_ENDLABELEDITA = TVN_FIRST - 11 +TVN_KEYDOWN = TVN_FIRST - 12 +TVN_SELCHANGINGW = TVN_FIRST - 50 +TVN_SELCHANGEDW = TVN_FIRST - 51 +TVN_GETDISPINFOW = TVN_FIRST - 52 +TVN_SETDISPINFOW = TVN_FIRST - 53 +TVN_ITEMEXPANDINGW = TVN_FIRST - 54 +TVN_ITEMEXPANDEDW = TVN_FIRST - 55 +TVN_BEGINDRAGW = TVN_FIRST - 56 +TVN_BEGINRDRAGW = TVN_FIRST - 57 +TVN_DELETEITEMW = TVN_FIRST - 58 +TVN_BEGINLABELEDITW = TVN_FIRST - 59 +TVN_ENDLABELEDITW = TVN_FIRST - 60 +TVN_SELCHANGING = TVN_SELCHANGINGA +TVN_SELCHANGED = TVN_SELCHANGEDA +TVN_GETDISPINFO = TVN_GETDISPINFOA +TVN_SETDISPINFO = TVN_SETDISPINFOA +TVN_ITEMEXPANDING = TVN_ITEMEXPANDINGA +TVN_ITEMEXPANDED = TVN_ITEMEXPANDEDA +TVN_BEGINDRAG = TVN_BEGINDRAGA +TVN_BEGINRDRAG = TVN_BEGINRDRAGA +TVN_DELETEITEM = TVN_DELETEITEMA +TVN_BEGINLABELEDIT = TVN_BEGINLABELEDITA +TVN_ENDLABELEDIT = TVN_ENDLABELEDITA + +; Tree view action flags + +TVC_UNKNOWN = 0 +TVC_BYMOUSE = 1 +TVC_BYKEYBOARD = 2 + +; Tab control styles + +TCS_SCROLLOPPOSITE = 0001h +TCS_BOTTOM = 0002h +TCS_RIGHT = 0002h +TCS_FORCEICONLEFT = 0010h +TCS_FORCELABELLEFT = 0020h +TCS_HOTTRACK = 0040h +TCS_VERTICAL = 0080h +TCS_TABS = 0000h +TCS_BUTTONS = 0100h +TCS_SINGLELINE = 0000h +TCS_MULTILINE = 0200h +TCS_RIGHTJUSTIFY = 0000h +TCS_FIXEDWIDTH = 0400h +TCS_RAGGEDRIGHT = 0800h +TCS_FOCUSONBUTTONDOWN = 1000h +TCS_OWNERDRAWFIXED = 2000h +TCS_TOOLTIPS = 4000h +TCS_FOCUSNEVER = 8000h + +; Tab control messages + +TCM_GETIMAGELIST = TCM_FIRST + 2 +TCM_SETIMAGELIST = TCM_FIRST + 3 +TCM_GETITEMCOUNT = TCM_FIRST + 4 +TCM_GETITEMA = TCM_FIRST + 5 +TCM_SETITEMA = TCM_FIRST + 6 +TCM_INSERTITEMA = TCM_FIRST + 7 +TCM_DELETEITEM = TCM_FIRST + 8 +TCM_DELETEALLITEMS = TCM_FIRST + 9 +TCM_GETITEMRECT = TCM_FIRST + 10 +TCM_GETCURSEL = TCM_FIRST + 11 +TCM_SETCURSEL = TCM_FIRST + 12 +TCM_HITTEST = TCM_FIRST + 13 +TCM_SETITEMEXTRA = TCM_FIRST + 14 +TCM_ADJUSTRECT = TCM_FIRST + 40 +TCM_SETITEMSIZE = TCM_FIRST + 41 +TCM_REMOVEIMAGE = TCM_FIRST + 42 +TCM_SETPADDING = TCM_FIRST + 43 +TCM_GETROWCOUNT = TCM_FIRST + 44 +TCM_GETTOOLTIPS = TCM_FIRST + 45 +TCM_SETTOOLTIPS = TCM_FIRST + 46 +TCM_GETCURFOCUS = TCM_FIRST + 47 +TCM_SETCURFOCUS = TCM_FIRST + 48 +TCM_GETITEMW = TCM_FIRST + 60 +TCM_SETITEMW = TCM_FIRST + 61 +TCM_INSERTITEMW = TCM_FIRST + 62 +TCM_GETITEM = TCM_GETITEMA +TCM_SETITEM = TCM_SETITEMA +TCM_INSERTITEM = TCM_INSERTITEMA + +; Tab control item structure flags + +TCIF_TEXT = 1 +TCIF_IMAGE = 2 +TCIF_RTLREADING = 4 +TCIF_PARAM = 8 + +; Tab control hit test flags + +TCHT_NOWHERE = 1 +TCHT_ONITEMICON = 2 +TCHT_ONITEMLABEL = 4 +TCHT_ONITEM = TCHT_ONITEMICON or TCHT_ONITEMLABEL + +; Tab control notifications + +TCN_KEYDOWN = TCN_FIRST - 0 +TCN_SELCHANGE = TCN_FIRST - 1 +TCN_SELCHANGING = TCN_FIRST - 2 + +; Animation control styles + +ACS_CENTER = 1 +ACS_TRANSPARENT = 2 +ACS_AUTOPLAY = 4 +ACS_TIMER = 8 + +; Animation control messages + +ACM_OPENA = WM_USER + 100 +ACM_PLAY = WM_USER + 101 +ACM_STOP = WM_USER + 102 +ACM_OPENW = WM_USER + 103 +ACM_OPEN = ACM_OPENA + +; Animation control notifications + +ACN_START = 1 +ACN_STOP = 2 + +; Month calendar styles + +MCS_DAYSTATE = 1 +MCS_MULTISELECT = 2 +MCS_WEEKNUMBERS = 4 +MCS_NOTODAY_PRE_IE4 = 8 +MCS_NOTODAYCIRCLE = 8 +MCS_NOTODAY = 16 + +; Month calendar messages + +MCM_GETCURSEL = MCM_FIRST + 1 +MCM_SETCURSEL = MCM_FIRST + 2 +MCM_GETMAXSELCOUNT = MCM_FIRST + 3 +MCM_SETMAXSELCOUNT = MCM_FIRST + 4 +MCM_GETSELRANGE = MCM_FIRST + 5 +MCM_SETSELRANGE = MCM_FIRST + 6 +MCM_GETMONTHRANGE = MCM_FIRST + 7 +MCM_SETDAYSTATE = MCM_FIRST + 8 +MCM_GETMINREQRECT = MCM_FIRST + 9 +MCM_SETCOLOR = MCM_FIRST + 10 +MCM_GETCOLOR = MCM_FIRST + 11 +MCM_SETTODAY = MCM_FIRST + 12 +MCM_GETTODAY = MCM_FIRST + 13 +MCM_HITTEST = MCM_FIRST + 14 +MCM_SETFIRSTDAYOFWEEK = MCM_FIRST + 15 +MCM_GETFIRSTDAYOFWEEK = MCM_FIRST + 16 +MCM_GETRANGE = MCM_FIRST + 17 +MCM_SETRANGE = MCM_FIRST + 18 +MCM_GETMONTHDELTA = MCM_FIRST + 19 +MCM_SETMONTHDELTA = MCM_FIRST + 20 + +; Month calendar hit test flags + +MCHT_TITLE = 0010000h +MCHT_CALENDAR = 0020000h +MCHT_TODAYLINK = 0030000h +MCHT_NEXT = 1000000h +MCHT_PREV = 2000000h +MCHT_NOWHERE = 0000000h +MCHT_TITLEBK = MCHT_TITLE +MCHT_TITLEMONTH = MCHT_TITLE or 1 +MCHT_TITLEYEAR = MCHT_TITLE or 2 +MCHT_TITLEBTNNEXT = MCHT_TITLE or MCHT_NEXT or 3 +MCHT_TITLEBTNPREV = MCHT_TITLE or MCHT_PREV or 3 +MCHT_CALENDARBK = MCHT_CALENDAR +MCHT_CALENDARDATE = MCHT_CALENDAR or 1 +MCHT_CALENDARDATENEXT = MCHT_CALENDARDATE or MCHT_NEXT +MCHT_CALENDARDATEPREV = MCHT_CALENDARDATE or MCHT_PREV +MCHT_CALENDARDAY = MCHT_CALENDAR or 2 +MCHT_CALENDARWEEKNUM = MCHT_CALENDAR or 3 + +; Month calendar color codes + +MCSC_BACKGROUND = 0 +MCSC_TEXT = 1 +MCSC_TITLEBK = 2 +MCSC_TITLETEXT = 3 +MCSC_MONTHBK = 4 +MCSC_TRAILINGTEXT = 5 + +; Month calendar notifications + +MCN_SELCHANGE = MCN_FIRST + 1 +MCN_GETDAYSTATE = MCN_FIRST + 3 +MCN_SELECT = MCN_FIRST + 4 + +; Date-time pick control messages + +DTM_GETSYSTEMTIME = DTM_FIRST + 1 +DTM_SETSYSTEMTIME = DTM_FIRST + 2 +DTM_GETRANGE = DTM_FIRST + 3 +DTM_SETRANGE = DTM_FIRST + 4 +DTM_SETFORMATA = DTM_FIRST + 5 +DTM_SETMCCOLOR = DTM_FIRST + 6 +DTM_GETMCCOLOR = DTM_FIRST + 7 +DTM_GETMONTHCAL = DTM_FIRST + 8 +DTM_SETMCFONT = DTM_FIRST + 9 +DTM_GETMCFONT = DTM_FIRST + 10 +DTM_SETFORMATW = DTM_FIRST + 50 +DTM_SETFORMAT = DTM_SETFORMATA + +; Date-time pick control styles + +DTS_UPDOWN = 01h +DTS_SHOWNONE = 02h +DTS_SHORTDATEFORMAT = 00h +DTS_LONGDATEFORMAT = 04h +DTS_TIMEFORMAT = 09h +DTS_APPCANPARSE = 10h +DTS_RIGHTALIGN = 20h + +; Date-time pick control notifications + +DTN_DATETIMECHANGE = DTN_FIRST + 1 +DTN_USERSTRINGA = DTN_FIRST + 2 +DTN_WMKEYDOWNA = DTN_FIRST + 3 +DTN_FORMATA = DTN_FIRST + 4 +DTN_FORMATQUERYA = DTN_FIRST + 5 +DTN_DROPDOWN = DTN_FIRST + 6 +DTN_CLOSEUP = DTN_FIRST + 7 +DTN_USERSTRINGW = DTN_FIRST + 15 +DTN_WMKEYDOWNW = DTN_FIRST + 16 +DTN_FORMATW = DTN_FIRST + 17 +DTN_FORMATQUERYW = DTN_FIRST + 18 +DTN_USERSTRING = DTN_USERSTRINGA +DTN_WMKEYDOWN = DTN_WMKEYDOWNA +DTN_FORMAT = DTN_FORMATA +DTN_FORMATQUERY = DTN_FORMATQUERYA + +; ImageList_LoadImage types + +IMAGE_BITMAP = 0 +IMAGE_ICON = 1 +IMAGE_CURSOR = 2 +IMAGE_ENHMETAFILE = 3 + +; ImageList_LoadImage flags + +LR_DEFAULTCOLOR = 0000h +LR_MONOCHROME = 0001h +LR_COLOR = 0002h +LR_COPYRETURNORG = 0004h +LR_COPYDELETEORG = 0008h +LR_LOADFROMFILE = 0010h +LR_LOADTRANSPARENT = 0020h +LR_DEFAULTSIZE = 0040h +LR_VGACOLOR = 0080h +LR_LOADMAP3DCOLORS = 1000h +LR_CREATEDIBSECTION = 2000h +LR_COPYFROMRESOURCE = 4000h +LR_SHARED = 8000h + +; IP control messages + +IPM_CLEARADDRESS = WM_USER + 100 +IPM_SETADDRESS = WM_USER + 101 +IPM_GETADDRESS = WM_USER + 102 +IPM_SETRANGE = WM_USER + 103 +IPM_SETFOCUS = WM_USER + 104 +IPM_ISBLANK = WM_USER + 105 + +; Custom Draw flags + +CDRF_DODEFAULT = 0 +CDRF_NEWFONT = 2 +CDRF_SKIPDEFAULT = 4 +CDRF_NOTIFYPOSTPAINT = 10h +CDRF_NOTIFYITEMDRAW = 20h +CDRF_NOTIFYSUBITEMDRAW = 20h +CDRF_NOTIFYPOSTERASE = 40h +CDDS_PREPAINT = 1 +CDDS_POSTPAINT = 2 +CDDS_PREERASE = 3 +CDDS_POSTERASE = 4 +CDDS_ITEM = 10000h +CDDS_ITEMPREPAINT = CDDS_ITEM or CDDS_PREPAINT +CDDS_ITEMPOSTPAINT = CDDS_ITEM or CDDS_POSTPAINT +CDDS_ITEMPREERASE = CDDS_ITEM or CDDS_PREERASE +CDDS_ITEMPOSTERASE = CDDS_ITEM or CDDS_POSTERASE +CDDS_SUBITEM = 20000h +CDIS_SELECTED = 1 +CDIS_GRAYED = 2 +CDIS_DISABLED = 4 +CDIS_CHECKED = 8 +CDIS_FOCUS = 10h +CDIS_DEFAULT = 20h +CDIS_HOT = 40h +CDIS_MARKED = 80h +CDIS_INDETERMINATE = 100h diff --git a/asm/equihash/Windows/INCLUDE/EQUATES/COMCTL64.INC b/asm/equihash/Windows/INCLUDE/EQUATES/COMCTL64.INC new file mode 100644 index 0000000..cd6648f --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/EQUATES/COMCTL64.INC @@ -0,0 +1,1871 @@ + +; COMCTL32.DLL structures and constants + +struct PROPSHEETPAGE + dwSize dd ? + dwFlags dd ? + hInstance dq ? + pszTemplate dq ? + pszIcon dq ? + pszTitle dq ? + pfnDlgProc dq ? + lParam dd ?,? + pfnCallback dq ? + pcRefParent dq ? +ends + +struct PROPSHEETHEADER + dwSize dd ? + dwFlags dd ? + hwndParent dq ? + hInstance dq ? + pszIcon dq ? + pszCaption dq ? + nPages dd ?,? + pStartPage dq ? + ppsp dq ? + pfnCallback dq ? +ends + +struct IMAGEINFO + hbmImage dq ? + hbmMask dq ? + Unused1 dd ? + Unused2 dd ? + rcImage RECT +ends + +struct HD_ITEM + mask dd ? + cxy dd ? + pszText dq ? + hbm dq ? + cchTextMax dd ? + fmt dd ? + lParam dd ? +ends + +struct HD_LAYOUT + prc dq ? + pwpos dq ? +ends + +struct HD_HITTESTINFO + pt POINT + flags dd ? + iItem dd ? +ends + +struct HD_NOTIFY + hdr NMHDR + iItem dd ? + iButton dd ? + pitem dq ? +ends + +struct TBBUTTON + iBitmap dd ? + idCommand dd ? + fsState db ? + fsStyle db ?,6 dup ? + dwData dq ? + iString dq ? +ends + +struct COLORMAP + from dd ? + to dd ? +ends + +struct TBADDBITMAP + hInst dq ? + nID dd ?,? +ends + +struct TBSAVEPARAMS + hkr dq ? + pszSubKey dq ? + pszValueName dq ? +ends + +struct TBREPLACEBITMAP + hInstOld dq ? + nIDOld dq ? + hInstNew dq ? + nIDNew dq ? + nButtons dq ? +ends + +struct NMTOOLBAR + hdr NMHDR + iItem dd ? + tbButton TBBUTTON + cchText dd ? + pszText dq ? +ends + +struct REBARINFO + cbSize dd ? + fMask dd ? + himl dq ? +ends + +struct REBARBANDINFO + cbSize dd ? + fMask dd ? + fStyle dd ? + clrFore dd ? + clrBack dd ?,? + lpText dq ? + cch dd ? + iImage dd ? + hwndChild dd ? + cxMinChild dd ? + cyMinChild dd ? + cx dd ? + hbmBack dq ? + wID dd ? +ends + +struct TOOLINFO + cbSize dd ? + uFlags dd ? + hwnd dq ? + uId dq ? + rect RECT + hInst dq ? + lpszText dq ? + lParam dq ? + lpReserved dq ? +ends + +struct TTHITTESTINFO + hwnd dq ? + pt POINT + ti TOOLINFO +ends + +struct TOOLTIPTEXT + hdr NMHDR + lpszText dq ? + szText db 80 dup (?) + hinst dq ? + uFlags dd ? +ends + +struct UDACCEL + nSec dd ? + nInc dd ? +ends + +struct NM_UPDOWN + hdr NMHDR + iPos dd ? + iDelta dd ? +ends + +struct LV_ITEM + mask dd ? + iItem dd ? + iSubItem dd ? + state dd ? + stateMask dd ?,? + pszText dq ? + cchTextMax dd ? + iImage dd ? + lParam dd ? + iIndent dd ? +ends + +struct LV_FINDINFO + flags dd ?,? + psz dq ? + lParam dq ? + pt POINT + vkDirection dd ? +ends + +struct LV_HITTESTINFO + pt POINT + flags dd ? + iItem dd ? +ends + +struct LV_COLUMN + mask dd ? + fmt dd ? + cx dd ?,? + pszText dq ? + cchTextMax dd ? + iSubItem dd ? +ends + +struct NM_LISTVIEW + hdr NMHDR + iItem dd ? + iSubItem dd ? + uNewState dd ? + uOldState dd ? + uChanged dd ? + ptAction POINT + dd ? + lParam dq ? +ends + +struct NM_CACHEHINT + hdr NMHDR + iFrom dd ? + iTo dd ? +ends + +struct NM_FINDITEM + hdr NMHDR + iStart dd ? + lvfi LV_FINDINFO +ends + +struct LV_DISPINFO + hdr NMHDR + item LV_ITEM +ends + +struct LV_KEYDOWN + hdr NMHDR + wVKey dw ? + flags dd ? +ends + +struct TV_ITEM + mask dd ?,? + hItem dq ? + state dd ? + stateMask dd ? + pszText dq ? + cchTextMax dd ? + iImage dd ? + iSelectedImage dd ? + cChildren dd ? + lParam dd ? +ends + +struct TV_INSERTSTRUCT + hParent dq ? + hInsertAfter dq ? + item TV_ITEM +ends + +struct TV_HITTESTINFO + pt POINT + flags dd ?,? + hItem dq ? +ends + +struct TV_SORTCB + hParent dq ? + lpfnCompare dq ? + lParam dq ? +ends + +struct NM_TREEVIEW + hdr NMHDR + action dd ? + itemOld TV_ITEM + itemNew TV_ITEM + ptDrag POINT +ends + +struct TV_DISPINFO + hdr NMHDR + item TV_ITEM +ends + +struct TV_KEYDOWN + hdr NMHDR + wVKey dw ? + flags dd ? +ends + +struct TC_ITEMHEADER + mask dd ? + lpReserved1 dd ? + lpReserved2 dd ?,? + pszText dq ? + cchTextMax dd ? + iImage dd ? +ends + +struct TC_ITEM + mask dd ? + lpReserved1 dd ? + lpReserved2 dd ?,? + pszText dq ? + cchTextMax dd ? + iImage dd ? + lParam dd ? +ends + +struct TC_HITTESTINFO + pt POINT + flags dd ? +ends + +struct TC_KEYDOWN + hdr NMHDR + wVKey dw ? + flags dd ? +ends + +struct MC_HITTESTINFO + cbSize dd ? + pt POINT + uHit dd ? + st SYSTEMTIME +ends + +struct NM_SELCHANGE + nmhdr NMHDR + stSelStart SYSTEMTIME + stSelEnd SYSTEMTIME +ends + +struct NM_DAYSTATE + nmhdr NMHDR + stStart SYSTEMTIME + cDayState dd ? + prgDayState dd ? +ends + +struct NM_DATETIMECHANGE + nmhdr NMHDR + dwFlags dd ? + st SYSTEMTIME +ends + +struct NM_DATETIMESTRING + nmhdr NMHDR + pszUserString dq ? + st SYSTEMTIME + dwFlags dd ? +ends + +struct NM_DATETIMEWMKEYDOWN + nmhdr NMHDR + nVirtKey dd ?,? + pszFormat dq ? + st SYSTEMTIME +ends + +struct NM_DATETIMEFORMAT + nmhdr NMHDR + pszFormat dq ? + st SYSTEMTIME + pszDisplay dq ? + szDisplay db 64 dup (?) +ends + +struct NM_DATETIMEFORMATQUERY + nmhdr NMHDR + pszFormat dq ? + szMax SIZE +ends + +struct INITCOMMONCONTROLSEX + dwSize dd ? + dwICC dd ? +ends + +; Common control window classes + +HOTKEY_CLASS equ 'msctls_hotkey32' +PROGRESS_CLASS equ 'msctls_progress32' +STATUS_CLASS equ 'msctls_statusbar32' +TRACKBAR_CLASS equ 'msctls_trackbar32' +UPDOWN_CLASS equ 'msctls_updown32' +TOOLTIPS_CLASS equ 'tooltips_class32' +ANIMATE_CLASS equ 'SysAnimate32' +HEADER_CLASS equ 'SysHeader32' +LISTVIEW_CLASS equ 'SysListView32' +TREEVIEW_CLASS equ 'SysTreeView32' +TABCONTROL_CLASS equ 'SysTabControl32' +MONTHCAL_CLASS equ 'SysMonthCal32' +DATETIMEPICK_CLASS equ 'SysDateTimePick32' +TOOLBAR_CLASS equ 'ToolbarWindow32' +REBAR_CLASS equ 'ReBarWindow32' + +; Ranges for control message IDs + +LVM_FIRST = 1000h +TV_FIRST = 1100h +HDM_FIRST = 1200h +TCM_FIRST = 1300h +MCM_FIRST = 1000h +DTM_FIRST = 1000h +CCM_FIRST = 2000h + +; Ranges for control notification IDs + +NM_FIRST = 0 +LVN_FIRST = -100 +PSN_FIRST = -200 +HDN_FIRST = -300 +TVN_FIRST = -400 +TTN_FIRST = -520 +TCN_FIRST = -550 +CDN_FIRST = -601 +TBN_FIRST = -700 +UDN_FIRST = -721 +MCN_FIRST = -750 +DTN_FIRST = -760 +CBEN_FIRST = -800 +RBN_FIRST = -831 + +; Generic notifications + +NM_OUTOFMEMORY = NM_FIRST - 1 +NM_CLICK = NM_FIRST - 2 +NM_DBLCLK = NM_FIRST - 3 +NM_RETURN = NM_FIRST - 4 +NM_RCLICK = NM_FIRST - 5 +NM_RDBLCLK = NM_FIRST - 6 +NM_SETFOCUS = NM_FIRST - 7 +NM_KILLFOCUS = NM_FIRST - 8 +NM_CUSTOMDRAW = NM_FIRST - 12 + +; Common control styles + +CCS_TOP = 01h +CCS_NOMOVEY = 02h +CCS_BOTTOM = 03h +CCS_NORESIZE = 04h +CCS_NOPARENTALIGN = 08h +CCS_ADJUSTABLE = 20h +CCS_NODIVIDER = 40h +CCS_VERT = 80h +CCS_LEFT = CCS_VERT or CCS_TOP +CCS_RIGHT = CCS_VERT or CCS_BOTTOM +CCS_NOMOVEX = CCS_VERT or CCS_NOMOVEY + +; Owner-drawn control types + +ODT_HEADER = 100 +ODT_TAB = 101 +ODT_LISTVIEW = 102 + +; InitCommonControlsEx classes + +ICC_ANIMATE_CLASS = 0080h +ICC_BAR_CLASSES = 0004h +ICC_COOL_CLASSES = 0400h +ICC_DATE_CLASSES = 0100h +ICC_HOTKEY_CLASS = 0040h +ICC_INTERNET_CLASSES = 0800h +ICC_LISTVIEW_CLASSES = 0001h +ICC_PAGESCROLLER_CLASS = 1000h +ICC_PROGRESS_CLASS = 0020h +ICC_TAB_CLASSES = 0008h +ICC_TREEVIEW_CLASSES = 0002h +ICC_UPDOWN_CLASS = 0010h +ICC_USEREX_CLASSES = 0200h +ICC_WIN95_CLASSES = 00FFh + +; Shared messages + +CCM_SETCOLORSCHEME = CCM_FIRST + 2 +CCM_GETCOLORSCHEME = CCM_FIRST + 3 +CCM_GETDROPTARGET = CCM_FIRST + 4 +CCM_SETUNICODEFORMAT = CCM_FIRST + 5 +CCM_GETUNICODEFORMAT = CCM_FIRST + 6 + +; Property sheet page flags + +PSP_DEFAULT = 0000h +PSP_DLGINDIRECT = 0001h +PSP_USEHICON = 0002h +PSP_USEICONID = 0004h +PSP_USETITLE = 0008h +PSP_HASHELP = 0020h +PSP_USEREFPARENT = 0040h +PSP_USECALLBACK = 0080h + +; Property sheet page actions + +PSPCB_RELEASE = 1 +PSPCB_CREATE = 2 + +; Property sheet header flags + +PSH_DEFAULT = 0000h +PSH_PROPTITLE = 0001h +PSH_USEHICON = 0002h +PSH_USEICONID = 0004h +PSH_PROPSHEETPAGE = 0008h +PSH_MULTILINETABS = 0010h +PSH_WIZARD = 0020h +PSH_USEPSTARTPAGE = 0040h +PSH_NOAPPLYNOW = 0080h +PSH_USECALLBACK = 0100h +PSH_HASHELP = 0200h +PSH_MODELESS = 0400h + +; Property sheet actions + +PSCB_INITIALIZED = 1 + +; Property sheet notifications + +PSN_SETACTIVE = PSN_FIRST - 0 +PSN_KILLACTIVE = PSN_FIRST - 1 +PSN_APPLY = PSN_FIRST - 2 +PSN_RESET = PSN_FIRST - 3 +PSN_HELP = PSN_FIRST - 5 +PSN_WIZBACK = PSN_FIRST - 6 +PSN_WIZNEXT = PSN_FIRST - 7 +PSN_WIZFINISH = PSN_FIRST - 8 +PSN_QUERYCANCEL = PSN_FIRST - 9 + +; Property sheet return values + +PSNRET_NOERROR = 0 +PSNRET_INVALID = 1 +PSNRET_INVALID_NOCHANGEPAGE = 2 + +; Property sheet messages + +PSM_SETCURSEL = WM_USER + 101 +PSM_REMOVEPAGE = WM_USER + 102 +PSM_ADDPAGE = WM_USER + 103 +PSM_CHANGED = WM_USER + 104 +PSM_RESTARTWINDOWS = WM_USER + 105 +PSM_REBOOTSYSTEM = WM_USER + 106 +PSM_CANCELTOCLOSE = WM_USER + 107 +PSM_QUERYSIBLINGS = WM_USER + 108 +PSM_UNCHANGED = WM_USER + 109 +PSM_APPLY = WM_USER + 110 +PSM_SETTITLE = WM_USER + 111 +PSM_SETTITLEW = WM_USER + 120 +PSM_SETWIZBUTTONS = WM_USER + 112 +PSM_PRESSBUTTON = WM_USER + 113 +PSM_SETCURSELID = WM_USER + 114 +PSM_SETFINISHTEXT = WM_USER + 115 +PSM_SETFINISHTEXTW = WM_USER + 121 +PSM_GETTABCONTROL = WM_USER + 116 +PSM_ISDIALOGMESSAGE = WM_USER + 117 + +; Property sheet buttons + +PSBTN_BACK = 0 +PSBTN_NEXT = 1 +PSBTN_FINISH = 2 +PSBTN_OK = 3 +PSBTN_APPLYNOW = 4 +PSBTN_CANCEL = 5 +PSBTN_HELP = 6 +PSWIZB_BACK = 1 +PSWIZB_NEXT = 2 +PSWIZB_FINISH = 4 +PSWIZB_DISABLEDFINISH = 8 +ID_PSRESTARTWINDOWS = 2 +ID_PSREBOOTSYSTEM = ID_PSRESTARTWINDOWS or 1 + +; Property sheet sizes + +PROP_SM_CXDLG = 212 +PROP_SM_CYDLG = 188 +PROP_MED_CXDLG = 227 +PROP_MED_CYDLG = 215 +PROP_LG_CXDLG = 252 +PROP_LG_CYDLG = 218 +WIZ_CXDLG = 276 +WIZ_CYDLG = 140 +WIZ_CXBMP = 80 +WIZ_BODYX = 92 +WIZ_BODYCX = 184 + +; Image list types + +ILC_MASK = 001h +ILC_COLOR = 0FEh +ILC_COLORDDB = 0FEh +ILC_COLOR4 = 004h +ILC_COLOR8 = 008h +ILC_COLOR16 = 010h +ILC_COLOR24 = 018h +ILC_COLOR32 = 020h +ILC_PALETTE = 800h + +; Image list color values + +CLR_NONE = 0FFFFFFFFh +CLR_DEFAULT = 0FF000000h +CLR_HILIGHT = CLR_DEFAULT + +; Image list drawing styles + +ILD_NORMAL = 0000h +ILD_TRANSPARENT = 0001h +ILD_MASK = 0010h +ILD_IMAGE = 0020h +ILD_BLEND25 = 0002h +ILD_BLEND50 = 0004h +ILD_OVERLAYMASK = 0F00h +ILD_SELECTED = ILD_BLEND50 +ILD_FOCUS = ILD_BLEND25 +ILD_BLEND = ILD_BLEND50 + +; Header control styles + +HDS_HORZ = 00h +HDS_BUTTONS = 02h +HDS_HOTTRACK = 04h +HDS_HIDDEN = 08h +HDS_DRAGDROP = 40h +HDS_FULLDRAG = 80h + +; Header control structure flags + +HDI_WIDTH = 01h +HDI_HEIGHT = HDI_WIDTH +HDI_TEXT = 02h +HDI_FORMAT = 04h +HDI_LPARAM = 08h +HDI_BITMAP = 10h + +; Header control flags + +HDF_LEFT = 0000h +HDF_RIGHT = 0001h +HDF_CENTER = 0002h +HDF_JUSTIFYMASK = 0003h +HDF_RTLREADING = 0004h +HDF_BITMAP = 2000h +HDF_STRING = 4000h +HDF_OWNERDRAW = 8000h + +; Header control messages + +HDM_GETITEMCOUNT = HDM_FIRST + 0 +HDM_INSERTITEMA = HDM_FIRST + 1 +HDM_DELETEITEM = HDM_FIRST + 2 +HDM_GETITEMA = HDM_FIRST + 3 +HDM_SETITEMA = HDM_FIRST + 4 +HDM_LAYOUT = HDM_FIRST + 5 +HDM_HITTEST = HDM_FIRST + 6 +HDM_INSERTITEMW = HDM_FIRST + 10 +HDM_GETITEMW = HDM_FIRST + 11 +HDM_SETITEMW = HDM_FIRST + 12 +HDM_INSERTITEM = HDM_INSERTITEMA +HDM_GETITEM = HDM_GETITEMA +HDM_SETITEM = HDM_SETITEMA + +; Hit test result flags + +HHT_NOWHERE = 001h +HHT_ONHEADER = 002h +HHT_ONDIVIDER = 004h +HHT_ONDIVOPEN = 008h +HHT_ABOVE = 100h +HHT_BELOW = 200h +HHT_TORIGHT = 400h +HHT_TOLEFT = 800h + +; Header control notifications + +HDN_ITEMCHANGINGA = HDN_FIRST - 0 +HDN_ITEMCHANGEDA = HDN_FIRST - 1 +HDN_ITEMCLICKA = HDN_FIRST - 2 +HDN_ITEMDBLCLICKA = HDN_FIRST - 3 +HDN_DIVIDERDBLCLICKA = HDN_FIRST - 5 +HDN_BEGINTRACKA = HDN_FIRST - 6 +HDN_ENDTRACKA = HDN_FIRST - 7 +HDN_TRACKA = HDN_FIRST - 8 +HDN_ITEMCHANGINGW = HDN_FIRST - 20 +HDN_ITEMCHANGEDW = HDN_FIRST - 21 +HDN_ITEMCLICKW = HDN_FIRST - 22 +HDN_ITEMDBLCLICKW = HDN_FIRST - 23 +HDN_DIVIDERDBLCLICKW = HDN_FIRST - 25 +HDN_BEGINTRACKW = HDN_FIRST - 26 +HDN_ENDTRACKW = HDN_FIRST - 27 +HDN_TRACKW = HDN_FIRST - 28 +HDN_ITEMCHANGING = HDN_ITEMCHANGINGA +HDN_ITEMCHANGED = HDN_ITEMCHANGEDA +HDN_ITEMCLICK = HDN_ITEMCLICKA +HDN_ITEMDBLCLICK = HDN_ITEMDBLCLICKA +HDN_DIVIDERDBLCLICK = HDN_DIVIDERDBLCLICKA +HDN_BEGINTRACK = HDN_BEGINTRACKA +HDN_ENDTRACK = HDN_ENDTRACKA +HDN_TRACK = HDN_TRACKA + +; Toolbar bitmap flags + +CMB_MASKED = 2 + +; Toolbar button states + +TBSTATE_CHECKED = 01h +TBSTATE_PRESSED = 02h +TBSTATE_ENABLED = 04h +TBSTATE_HIDDEN = 08h +TBSTATE_INDETERMINATE = 10h +TBSTATE_WRAP = 20h +TBSTATE_ELLIPSES = 40h + +; Toolbar button styles + +TBSTYLE_BUTTON = 0000h +TBSTYLE_SEP = 0001h +TBSTYLE_CHECK = 0002h +TBSTYLE_GROUP = 0004h +TBSTYLE_CHECKGROUP = TBSTYLE_GROUP or TBSTYLE_CHECK +TBSTYLE_DROPDOWN = 0008h +TBSTYLE_TOOLTIPS = 0100h +TBSTYLE_WRAPABLE = 0200h +TBSTYLE_ALTDRAG = 0400h +TBSTYLE_FLAT = 0800h +TBSTYLE_LIST = 1000h +TBSTYLE_CUSTOMERASE = 2000h +TBSTYLE_TRANSPARENT = 8000h + +; Toolbar button extended styles + +TBSTYLE_EX_DRAWDDARROWS = 0001h + +; Toolbar messages + +TB_ENABLEBUTTON = WM_USER + 1 +TB_CHECKBUTTON = WM_USER + 2 +TB_PRESSBUTTON = WM_USER + 3 +TB_HIDEBUTTON = WM_USER + 4 +TB_INDETERMINATE = WM_USER + 5 +TB_ISBUTTONENABLED = WM_USER + 9 +TB_ISBUTTONCHECKED = WM_USER + 10 +TB_ISBUTTONPRESSED = WM_USER + 11 +TB_ISBUTTONHIDDEN = WM_USER + 12 +TB_ISBUTTONINDETERMINATE = WM_USER + 13 +TB_SETSTATE = WM_USER + 17 +TB_GETSTATE = WM_USER + 18 +TB_ADDBITMAP = WM_USER + 19 +TB_ADDBUTTONS = WM_USER + 20 +TB_INSERTBUTTON = WM_USER + 21 +TB_DELETEBUTTON = WM_USER + 22 +TB_GETBUTTON = WM_USER + 23 +TB_BUTTONCOUNT = WM_USER + 24 +TB_COMMANDTOINDEX = WM_USER + 25 +TB_SAVERESTOREA = WM_USER + 26 +TB_ADDSTRINGA = WM_USER + 28 +TB_CUSTOMIZE = WM_USER + 27 +TB_GETITEMRECT = WM_USER + 29 +TB_BUTTONSTRUCTSIZE = WM_USER + 30 +TB_SETBUTTONSIZE = WM_USER + 31 +TB_SETBITMAPSIZE = WM_USER + 32 +TB_AUTOSIZE = WM_USER + 33 +TB_GETTOOLTIPS = WM_USER + 35 +TB_SETTOOLTIPS = WM_USER + 36 +TB_SETPARENT = WM_USER + 37 +TB_SETROWS = WM_USER + 39 +TB_GETROWS = WM_USER + 40 +TB_GETBITMAPFLAGS = WM_USER + 41 +TB_SETCMDID = WM_USER + 42 +TB_CHANGEBITMAP = WM_USER + 43 +TB_GETBITMAP = WM_USER + 44 +TB_GETBUTTONTEXTA = WM_USER + 45 +TB_REPLACEBITMAP = WM_USER + 46 +TB_SETINDENT = WM_USER + 47 +TB_SETIMAGELIST = WM_USER + 48 +TB_GETIMAGELIST = WM_USER + 49 +TB_LOADIMAGES = WM_USER + 50 +TB_GETRECT = WM_USER + 51 +TB_SETHOTIMAGELIST = WM_USER + 52 +TB_GETHOTIMAGELIST = WM_USER + 53 +TB_SETDISABLEDIMAGELIST = WM_USER + 54 +TB_GETDISABLEDIMAGELIST = WM_USER + 55 +TB_SETSTYLE = WM_USER + 56 +TB_GETSTYLE = WM_USER + 57 +TB_GETBUTTONSIZE = WM_USER + 58 +TB_SETBUTTONWIDTH = WM_USER + 59 +TB_SETMAXTEXTROWS = WM_USER + 60 +TB_GETTEXTROWS = WM_USER + 61 +TB_GETBUTTONTEXTW = WM_USER + 75 +TB_SAVERESTOREW = WM_USER + 76 +TB_ADDSTRINGW = WM_USER + 77 +TB_SETEXTENDEDSTYLE = WM_USER + 84 +TB_GETEXTENDEDSTYLE = WM_USER + 85 +TB_GETBUTTONTEXT = TB_GETBUTTONTEXTA +TB_SAVERESTORE = TB_SAVERESTOREA +TB_ADDSTRING = TB_ADDSTRINGA + +; System-defined button bitmaps + +HINST_COMMCTRL = -1 +IDB_STD_SMALL_COLOR = 0 +IDB_STD_LARGE_COLOR = 1 +IDB_VIEW_SMALL_COLOR = 4 +IDB_VIEW_LARGE_COLOR = 5 +IDB_HIST_SMALL_COLOR = 8 +IDB_HIST_LARGE_COLOR = 9 + +; Icon indexes for standard bitmap + +STD_CUT = 0 +STD_COPY = 1 +STD_PASTE = 2 +STD_UNDO = 3 +STD_REDOW = 4 +STD_DELETE = 5 +STD_FILENEW = 6 +STD_FILEOPEN = 7 +STD_FILESAVE = 8 +STD_PRINTPRE = 9 +STD_PROPERTIES = 10 +STD_HELP = 11 +STD_FIND = 12 +STD_REPLACE = 13 +STD_PRINT = 14 + +; Icon indexes for standard view bitmap + +VIEW_LARGEICONS = 0 +VIEW_SMALLICONS = 1 +VIEW_LIST = 2 +VIEW_DETAILS = 3 +VIEW_SORTNAME = 4 +VIEW_SORTSIZE = 5 +VIEW_SORTDATE = 6 +VIEW_SORTTYPE = 7 +VIEW_PARENTFOLDER = 8 +VIEW_NETCONNECT = 9 +VIEW_NETDISCONNECT = 10 +VIEW_NEWFOLDER = 11 + +; Icon indexes for history bitmap + +HIST_BACK = 0 +HIST_FORWARD = 1 +HIST_FAVORITES = 2 +HIST_ADDTOFAVORITES = 3 +HIST_VIEWTREE = 4 + +; Toolbar bitmap flags + +TBBF_LARGE = 1 + +; Toolbar notifications + +TBN_GETBUTTONINFOA = TBN_FIRST - 0 +TBN_BEGINDRAG = TBN_FIRST - 1 +TBN_ENDDRAG = TBN_FIRST - 2 +TBN_BEGINADJUST = TBN_FIRST - 3 +TBN_ENDADJUST = TBN_FIRST - 4 +TBN_RESET = TBN_FIRST - 5 +TBN_QUERYINSERT = TBN_FIRST - 6 +TBN_QUERYDELETE = TBN_FIRST - 7 +TBN_TOOLBARCHANGE = TBN_FIRST - 8 +TBN_CUSTHELP = TBN_FIRST - 9 +TBN_DROPDOWN = TBN_FIRST - 10 +TBN_CLOSEUP = TBN_FIRST - 11 +TBN_GETBUTTONINFOW = TBN_FIRST - 20 +TBN_GETBUTTONINFO = TBN_GETBUTTONINFOA + +; ReBar styles + +RBS_TOOLTIPS = 100h +RBS_VARHEIGHT = 200h +RBS_BANDBORDERS = 400h +RBS_FIXEDORDER = 800h +RBS_REGISTERDROP = 1000h +RBS_AUTOSIZE = 2000h +RBS_VERTICALGRIPPER = 4000h +RBS_DBLCLKTOGGLE = 8000h + +; ReBar band info structure flags + +RBBIM_STYLE = 001h +RBBIM_COLORS = 002h +RBBIM_TEXT = 004h +RBBIM_IMAGE = 008h +RBBIM_CHILD = 010h +RBBIM_CHILDSIZE = 020h +RBBIM_SIZE = 040h +RBBIM_BACKGROUND = 080h +RBBIM_ID = 100h +RBBIM_IDEALSIZE = 200h +RBBIM_LPARAM = 400h +RBBIM_HEADERSIZE = 800h + +; ReBar band styles + +RBBS_BREAK = 001h +RBBS_FIXEDSIZE = 002h +RBBS_CHILDEDGE = 004h +RBBS_HIDDEN = 008h +RBBS_NOVERT = 010h +RBBS_FIXEDBMP = 020h +RBBS_VARIABLEHEIGHT = 040h +RBBS_GRIPPERALWAYS = 080h +RBBS_NOGRIPPER = 100h + +; ReBar messages + +RB_INSERTBANDA = WM_USER + 1 +RB_DELETEBAND = WM_USER + 2 +RB_GETBARINFO = WM_USER + 3 +RB_SETBARINFO = WM_USER + 4 +RB_GETBANDINFO = WM_USER + 5 +RB_SETBANDINFOA = WM_USER + 6 +RB_SETPARENT = WM_USER + 7 +RB_INSERTBANDW = WM_USER + 10 +RB_SETBANDINFOW = WM_USER + 11 +RB_GETBANDCOUNT = WM_USER + 12 +RB_GETROWCOUNT = WM_USER + 13 +RB_GETROWHEIGHT = WM_USER + 14 +RB_IDTOINDEX = WM_USER + 16 +RB_GETTOOLTIPS = WM_USER + 17 +RB_SETTOOLTIPS = WM_USER + 18 +RB_SETBKCOLOR = WM_USER + 19 +RB_GETBKCOLOR = WM_USER + 20 +RB_SETTEXTCOLOR = WM_USER + 21 +RB_GETTEXTCOLOR = WM_USER + 22 +RB_SIZETORECT = WM_USER + 23 +RB_BEGINDRAG = WM_USER + 24 +RB_ENDDRAG = WM_USER + 25 +RB_DRAGMOVE = WM_USER + 26 +RB_GETBARHEIGHT = WM_USER + 27 +RB_GETBANDINFOW = WM_USER + 28 +RB_GETBANDINFOA = WM_USER + 29 +RB_MINIMIZEBAND = WM_USER + 30 +RB_MAXIMIZEBAND = WM_USER + 31 +RB_GETDROPTARGET = CCM_GETDROPTARGET +RB_GETBANDBORDERS = WM_USER + 34 +RB_SHOWBAND = WM_USER + 35 +RB_SETPALETTE = WM_USER + 37 +RB_GETPALETTE = WM_USER + 38 +RB_MOVEBAND = WM_USER + 39 +RB_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT +RB_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT +RB_INSERTBAND = RB_INSERTBANDA +RB_SETBANDINFO = RB_SETBANDINFOA + +; ReBar notifications + +RBN_HEIGHTCHANGE = RBN_FIRST - 0 +RBN_GETOBJECT = RBN_FIRST - 1 +RBN_LAYOUTCHANGED = RBN_FIRST - 2 +RBN_AUTOSIZE = RBN_FIRST - 3 +RBN_BEGINDRAG = RBN_FIRST - 4 +RBN_ENDDRAG = RBN_FIRST - 5 +RBN_DELETINGBAND = RBN_FIRST - 6 +RBN_DELETEDBAND = RBN_FIRST - 7 +RBN_CHILDSIZE = RBN_FIRST - 8 + +; Tooltip styles + +TTS_ALWAYSTIP = 1 +TTS_NOPREFIX = 2 + +; Tooltip flags + +TTF_IDISHWND = 01h +TTF_CENTERTIP = 02h +TTF_RTLREADING = 04h +TTF_SUBCLASS = 10h + +; Tooltip durations + +TTDT_AUTOMATIC = 0 +TTDT_RESHOW = 1 +TTDT_AUTOPOP = 2 +TTDT_INITIAL = 3 + +; Tooltip messages + +TTM_ACTIVATE = WM_USER + 1 +TTM_SETDELAYTIME = WM_USER + 3 +TTM_ADDTOOLA = WM_USER + 4 +TTM_DELTOOLA = WM_USER + 5 +TTM_NEWTOOLRECTA = WM_USER + 6 +TTM_RELAYEVENT = WM_USER + 7 +TTM_GETTOOLINFOA = WM_USER + 8 +TTM_SETTOOLINFOA = WM_USER + 9 +TTM_HITTESTA = WM_USER + 10 +TTM_GETTEXTA = WM_USER + 11 +TTM_UPDATETIPTEXTA = WM_USER + 12 +TTM_GETTOOLCOUNT = WM_USER + 13 +TTM_ENUMTOOLSA = WM_USER + 14 +TTM_GETCURRENTTOOLA = WM_USER + 15 +TTM_WINDOWFROMPOINT = WM_USER + 16 +TTM_ADDTOOLW = WM_USER + 50 +TTM_DELTOOLW = WM_USER + 51 +TTM_NEWTOOLRECTW = WM_USER + 52 +TTM_GETTOOLINFOW = WM_USER + 53 +TTM_SETTOOLINFOW = WM_USER + 54 +TTM_HITTESTW = WM_USER + 55 +TTM_GETTEXTW = WM_USER + 56 +TTM_UPDATETIPTEXTW = WM_USER + 57 +TTM_ENUMTOOLSW = WM_USER + 58 +TTM_GETCURRENTTOOLW = WM_USER + 59 +TTM_ADDTOOL = TTM_ADDTOOLA +TTM_DELTOOL = TTM_DELTOOLA +TTM_NEWTOOLRECT = TTM_NEWTOOLRECTA +TTM_GETTOOLINFO = TTM_GETTOOLINFOA +TTM_SETTOOLINFO = TTM_SETTOOLINFOA +TTM_HITTEST = TTM_HITTESTA +TTM_GETTEXT = TTM_GETTEXTA +TTM_UPDATETIPTEXT = TTM_UPDATETIPTEXTA +TTM_ENUMTOOLS = TTM_ENUMTOOLSA +TTM_GETCURRENTTOOL = TTM_GETCURRENTTOOLA + +; Tooltip notifications + +TTN_NEEDTEXTA = TTN_FIRST - 0 +TTN_SHOW = TTN_FIRST - 1 +TTN_POP = TTN_FIRST - 2 +TTN_NEEDTEXTW = TTN_FIRST - 10 +TTN_NEEDTEXT = TTN_NEEDTEXTA + +; Status bar styles + +SBARS_SIZEGRIP = 100h + +; Status bar messages + +SB_SETTEXTA = WM_USER + 1 +SB_GETTEXTA = WM_USER + 2 +SB_GETTEXTLENGTHA = WM_USER + 3 +SB_SETPARTS = WM_USER + 4 +SB_GETPARTS = WM_USER + 6 +SB_GETBORDERS = WM_USER + 7 +SB_SETMINHEIGHT = WM_USER + 8 +SB_SIMPLE = WM_USER + 9 +SB_GETRECT = WM_USER + 10 +SB_SETTEXTW = WM_USER + 11 +SB_GETTEXTW = WM_USER + 13 +SB_GETTEXTLENGTHW = WM_USER + 12 +SB_SETTEXT = SB_SETTEXTA +SB_GETTEXT = SB_GETTEXTA +SB_GETTEXTLENGTH = SB_GETTEXTLENGTHA + +; Status bar drawing types + +SBT_OWNERDRAW = 1000h +SBT_NOBORDERS = 0100h +SBT_POPOUT = 0200h +SBT_RTLREADING = 0400h + +; Trackbar styles + +TBS_AUTOTICKS = 01h +TBS_VERT = 02h +TBS_HORZ = 00h +TBS_TOP = 04h +TBS_BOTTOM = 00h +TBS_LEFT = 04h +TBS_RIGHT = 00h +TBS_BOTH = 08h +TBS_NOTICKS = 10h +TBS_ENABLESELRANGE = 20h +TBS_FIXEDLENGTH = 40h +TBS_NOTHUMB = 80h + +; Trackbar messages + +TBM_GETPOS = WM_USER + 0 +TBM_GETRANGEMIN = WM_USER + 1 +TBM_GETRANGEMAX = WM_USER + 2 +TBM_GETTIC = WM_USER + 3 +TBM_SETTIC = WM_USER + 4 +TBM_SETPOS = WM_USER + 5 +TBM_SETRANGE = WM_USER + 6 +TBM_SETRANGEMIN = WM_USER + 7 +TBM_SETRANGEMAX = WM_USER + 8 +TBM_CLEARTICS = WM_USER + 9 +TBM_SETSEL = WM_USER + 10 +TBM_SETSELSTART = WM_USER + 11 +TBM_SETSELEND = WM_USER + 12 +TBM_GETPTICS = WM_USER + 14 +TBM_GETTICPOS = WM_USER + 15 +TBM_GETNUMTICS = WM_USER + 16 +TBM_GETSELSTART = WM_USER + 17 +TBM_GETSELEND = WM_USER + 18 +TBM_CLEARSEL = WM_USER + 19 +TBM_SETTICFREQ = WM_USER + 20 +TBM_SETPAGESIZE = WM_USER + 21 +TBM_GETPAGESIZE = WM_USER + 22 +TBM_SETLINESIZE = WM_USER + 23 +TBM_GETLINESIZE = WM_USER + 24 +TBM_GETTHUMBRECT = WM_USER + 25 +TBM_GETCHANNELRECT = WM_USER + 26 +TBM_SETTHUMBLENGTH = WM_USER + 27 +TBM_GETTHUMBLENGTH = WM_USER + 28 + +; Trackbar notifications + +TB_LINEUP = 0 +TB_LINEDOWN = 1 +TB_PAGEUP = 2 +TB_PAGEDOWN = 3 +TB_THUMBPOSITION = 4 +TB_THUMBTRACK = 5 +TB_TOP = 6 +TB_BOTTOM = 7 +TB_ENDTRACK = 8 + +; Up-down control styles + +UDS_WRAP = 01h +UDS_SETBUDDYINT = 02h +UDS_ALIGNRIGHT = 04h +UDS_ALIGNLEFT = 08h +UDS_AUTOBUDDY = 10h +UDS_ARROWKEYS = 20h +UDS_HORZ = 40h +UDS_NOTHOUSANDS = 80h + +; Up-down control messages + +UDM_SETRANGE = WM_USER + 101 +UDM_GETRANGE = WM_USER + 102 +UDM_SETPOS = WM_USER + 103 +UDM_GETPOS = WM_USER + 104 +UDM_SETBUDDY = WM_USER + 105 +UDM_GETBUDDY = WM_USER + 106 +UDM_SETACCEL = WM_USER + 107 +UDM_GETACCEL = WM_USER + 108 +UDM_SETBASE = WM_USER + 109 +UDM_GETBASE = WM_USER + 110 + +; Up-down control notifications + +UDN_DELTAPOS = UDN_FIRST - 1 + +; Progress bar messages + +PBM_SETRANGE = WM_USER + 1 +PBM_SETPOS = WM_USER + 2 +PBM_DELTAPOS = WM_USER + 3 +PBM_SETSTEP = WM_USER + 4 +PBM_STEPIT = WM_USER + 5 +PBM_SETRANGE32 = WM_USER + 6 +PBM_GETRANGE = WM_USER + 7 +PBM_GETPOS = WM_USER + 8 + +; Hot-key control messages + +HKM_SETHOTKEY = WM_USER + 1 +HKM_GETHOTKEY = WM_USER + 2 +HKM_SETRULES = WM_USER + 3 + +; Hot key flags + +HOTKEYF_SHIFT = 1 +HOTKEYF_CONTROL = 2 +HOTKEYF_ALT = 4 +HOTKEYF_EXT = 8 + +; Key combination flags + +HKCOMB_NONE = 01h +HKCOMB_S = 02h +HKCOMB_C = 04h +HKCOMB_A = 08h +HKCOMB_SC = 10h +HKCOMB_SA = 20h +HKCOMB_CA = 40h +HKCOMB_SCA = 80h + +; List view styles + +LVS_ICON = 0000h +LVS_REPORT = 0001h +LVS_SMALLICON = 0002h +LVS_LIST = 0003h +LVS_TYPEMASK = 0003h +LVS_SINGLESEL = 0004h +LVS_SHOWSELALWAYS = 0008h +LVS_SORTASCENDING = 0010h +LVS_SORTDESCENDING = 0020h +LVS_SHAREIMAGELISTS = 0040h +LVS_NOLABELWRAP = 0080h +LVS_AUTOARRANGE = 0100h +LVS_EDITLABELS = 0200h +LVS_OWNERDATA = 1000h +LVS_NOSCROLL = 2000h +LVS_ALIGNTOP = 0000h +LVS_ALIGNLEFT = 0800h +LVS_OWNERDRAWFIXED = 0400h +LVS_NOCOLUMNHEADER = 4000h +LVS_NOSORTHEADER = 8000h + +; List view extended styles + +LVS_EX_GRIDLINES = 0001h +LVS_EX_SUBITEMIMAGES = 0002h +LVS_EX_CHECKBOXES = 0004h +LVS_EX_TRACKSELECT = 0008h +LVS_EX_HEADERDRAGDROP = 0010h +LVS_EX_FULLROWSELECT = 0020h +LVS_EX_ONECLICKACTIVATE = 0040h +LVS_EX_TWOCLICKACTIVATE = 0080h +LVS_EX_FLATSB = 0100h +LVS_EX_REGIONAL = 0200h +LVS_EX_INFOTIP = 0400h +LVS_EX_UNDERLINEHOT = 0800h +LVS_EX_UNDERLINECOLD = 1000h +LVS_EX_MULTIWORKAREAS = 2000h +LVS_EX_LABELTIP = 4000h + +; List view messages + +LVM_GETBKCOLOR = LVM_FIRST + 0 +LVM_SETBKCOLOR = LVM_FIRST + 1 +LVM_GETIMAGELIST = LVM_FIRST + 2 +LVM_SETIMAGELIST = LVM_FIRST + 3 +LVM_GETITEMCOUNT = LVM_FIRST + 4 +LVM_GETITEMA = LVM_FIRST + 5 +LVM_SETITEMA = LVM_FIRST + 6 +LVM_INSERTITEMA = LVM_FIRST + 7 +LVM_DELETEITEM = LVM_FIRST + 8 +LVM_DELETEALLITEMS = LVM_FIRST + 9 +LVM_GETCALLBACKMASK = LVM_FIRST + 10 +LVM_SETCALLBACKMASK = LVM_FIRST + 11 +LVM_GETNEXTITEM = LVM_FIRST + 12 +LVM_FINDITEMA = LVM_FIRST + 13 +LVM_GETITEMRECT = LVM_FIRST + 14 +LVM_SETITEMPOSITION = LVM_FIRST + 15 +LVM_GETITEMPOSITION = LVM_FIRST + 16 +LVM_GETSTRINGWIDTHA = LVM_FIRST + 17 +LVM_HITTEST = LVM_FIRST + 18 +LVM_ENSUREVISIBLE = LVM_FIRST + 19 +LVM_SCROLL = LVM_FIRST + 20 +LVM_REDRAWITEMS = LVM_FIRST + 21 +LVM_ARRANGE = LVM_FIRST + 22 +LVM_EDITLABELA = LVM_FIRST + 23 +LVM_GETEDITCONTROL = LVM_FIRST + 24 +LVM_GETCOLUMNA = LVM_FIRST + 25 +LVM_SETCOLUMNA = LVM_FIRST + 26 +LVM_INSERTCOLUMNA = LVM_FIRST + 27 +LVM_DELETECOLUMN = LVM_FIRST + 28 +LVM_GETCOLUMNWIDTH = LVM_FIRST + 29 +LVM_SETCOLUMNWIDTH = LVM_FIRST + 30 +LVM_CREATEDRAGIMAGE = LVM_FIRST + 33 +LVM_GETVIEWRECT = LVM_FIRST + 34 +LVM_GETTEXTCOLOR = LVM_FIRST + 35 +LVM_SETTEXTCOLOR = LVM_FIRST + 36 +LVM_GETTEXTBKCOLOR = LVM_FIRST + 37 +LVM_SETTEXTBKCOLOR = LVM_FIRST + 38 +LVM_GETTOPINDEX = LVM_FIRST + 39 +LVM_GETCOUNTPERPAGE = LVM_FIRST + 40 +LVM_GETORIGIN = LVM_FIRST + 41 +LVM_UPDATE = LVM_FIRST + 42 +LVM_SETITEMSTATE = LVM_FIRST + 43 +LVM_GETITEMSTATE = LVM_FIRST + 44 +LVM_GETITEMTEXTA = LVM_FIRST + 45 +LVM_SETITEMTEXTA = LVM_FIRST + 46 +LVM_SETITEMCOUNT = LVM_FIRST + 47 +LVM_SORTITEMS = LVM_FIRST + 48 +LVM_SETITEMPOSITION32 = LVM_FIRST + 49 +LVM_GETSELECTEDCOUNT = LVM_FIRST + 50 +LVM_GETITEMSPACING = LVM_FIRST + 51 +LVM_GETISEARCHSTRINGA = LVM_FIRST + 52 +LVM_SETICONSPACING = LVM_FIRST + 53 +LVM_SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 54 +LVM_GETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 55 +LVM_GETSUBITEMRECT = LVM_FIRST + 56 +LVM_SUBITEMHITTEST = LVM_FIRST + 57 +LVM_SETCOLUMNORDERARRAY = LVM_FIRST + 58 +LVM_GETCOLUMNORDERARRAY = LVM_FIRST + 59 +LVM_SETHOTITEM = LVM_FIRST + 60 +LVM_GETHOTITEM = LVM_FIRST + 61 +LVM_SETHOTCURSOR = LVM_FIRST + 62 +LVM_GETHOTCURSOR = LVM_FIRST + 63 +LVM_APPROXIMATEVIEWRECT = LVM_FIRST + 64 +LVM_SETWORKAREA = LVM_FIRST + 65 +LVM_GETITEMW = LVM_FIRST + 75 +LVM_SETITEMW = LVM_FIRST + 76 +LVM_INSERTITEMW = LVM_FIRST + 77 +LVM_FINDITEMW = LVM_FIRST + 83 +LVM_GETSTRINGWIDTHW = LVM_FIRST + 87 +LVM_GETCOLUMNW = LVM_FIRST + 95 +LVM_SETCOLUMNW = LVM_FIRST + 96 +LVM_INSERTCOLUMNW = LVM_FIRST + 97 +LVM_GETITEMTEXTW = LVM_FIRST + 115 +LVM_SETITEMTEXTW = LVM_FIRST + 116 +LVM_GETISEARCHSTRINGW = LVM_FIRST + 117 +LVM_EDITLABELW = LVM_FIRST + 118 +LVM_GETITEM = LVM_GETITEMA +LVM_SETITEM = LVM_SETITEMA +LVM_INSERTITEM = LVM_INSERTITEMA +LVM_FINDITEM = LVM_FINDITEMA +LVM_GETSTRINGWIDTH = LVM_GETSTRINGWIDTHA +LVM_GETCOLUMN = LVM_GETCOLUMNA +LVM_SETCOLUMN = LVM_SETCOLUMNA +LVM_INSERTCOLUMN = LVM_INSERTCOLUMNA +LVM_GETITEMTEXT = LVM_GETITEMTEXTA +LVM_SETITEMTEXT = LVM_SETITEMTEXTA +LVM_GETISEARCHSTRING = LVM_GETISEARCHSTRINGA +LVM_EDITLABEL = LVM_EDITLABELA + +; List view image list types + +LVSIL_NORMAL = 0 +LVSIL_SMALL = 1 +LVSIL_STATE = 2 + +; LVM_SETITEMCOUNT flags + +LVSICF_NOINVALIDATEALL = 1 +LVSICF_NOSCROLL = 2 + +; List view item structure flags + +LVIF_TEXT = 0001h +LVIF_IMAGE = 0002h +LVIF_PARAM = 0004h +LVIF_STATE = 0008h +LVIF_INDENT = 0010h +LVIF_NORECOMPUTE = 0800h +LVIF_DI_SETITEM = 1000h + +; List view item states + +LVIS_FOCUSED = 00001h +LVIS_SELECTED = 00002h +LVIS_CUT = 00004h +LVIS_DROPHILITED = 00008h +LVIS_ACTIVATING = 0020h +LVIS_OVERLAYMASK = 00F00h +LVIS_STATEIMAGEMASK = 0F000h + +; List view callback item values + +LPSTR_TEXTCALLBACK = -1 +I_IMAGECALLBACK = -1 +I_CHILDRENCALLBACK = -1 + +; List view next item relations + +LVNI_ALL = 000h +LVNI_FOCUSED = 001h +LVNI_SELECTED = 002h +LVNI_CUT = 004h +LVNI_DROPHILITED = 008h +LVNI_ABOVE = 100h +LVNI_BELOW = 200h +LVNI_TOLEFT = 400h +LVNI_TORIGHT = 800h + +; List view search types + +LVFI_PARAM = 01h +LVFI_STRING = 02h +LVFI_PARTIAL = 08h +LVFI_WRAP = 20h +LVFI_NEARESTXY = 40h + +; List view item rectangle types + +LVIR_BOUNDS = 0 +LVIR_ICON = 1 +LVIR_LABEL = 2 +LVIR_SELECTBOUNDS = 3 + +; List view hit test flags + +LVHT_NOWHERE = 01h +LVHT_ONITEMICON = 02h +LVHT_ONITEMLABEL = 04h +LVHT_ONITEMSTATEICON= 08h +LVHT_ONITEM = LVHT_ONITEMICON or LVHT_ONITEMLABEL or LVHT_ONITEMSTATEICON +LVHT_ABOVE = 08h +LVHT_BELOW = 10h +LVHT_TORIGHT = 20h +LVHT_TOLEFT = 40h + +; List view alignment values + +LVA_DEFAULT = 000h +LVA_ALIGNLEFT = 001h +LVA_ALIGNTOP = 002h +LVA_ALIGNRIGHT = 003h +LVA_ALIGNBOTTOM = 004h +LVA_SNAPTOGRID = 005h +LVA_SORTASCENDING = 100h +LVA_SORTDESCENDING = 200h + +; List view column structure flags + +LVCF_FMT = 1 +LVCF_WIDTH = 2 +LVCF_TEXT = 4 +LVCF_SUBITEM = 8 + +; List view column alignment values + +LVCFMT_LEFT = 0 +LVCFMT_RIGHT = 1 +LVCFMT_CENTER = 2 +LVCFMT_JUSTIFYMASK = 3 + +; List view column width values + +LVSCW_AUTOSIZE = -1 +LVSCW_AUTOSIZE_USEHEADER = -2 + +; List view notifications + +LVN_ITEMCHANGING = LVN_FIRST - 0 +LVN_ITEMCHANGED = LVN_FIRST - 1 +LVN_INSERTITEM = LVN_FIRST - 2 +LVN_DELETEITEM = LVN_FIRST - 3 +LVN_DELETEALLITEMS = LVN_FIRST - 4 +LVN_BEGINLABELEDITA = LVN_FIRST - 5 +LVN_ENDLABELEDITA = LVN_FIRST - 6 +LVN_COLUMNCLICK = LVN_FIRST - 8 +LVN_BEGINDRAG = LVN_FIRST - 9 +LVN_BEGINRDRAG = LVN_FIRST - 11 +LVN_ODCACHEHINT = LVN_FIRST - 13 +LVN_GETDISPINFOA = LVN_FIRST - 50 +LVN_SETDISPINFOA = LVN_FIRST - 51 +LVN_ODFINDITEMA = LVN_FIRST - 52 +LVN_KEYDOWN = LVN_FIRST - 55 +LVN_BEGINLABELEDITW = LVN_FIRST - 75 +LVN_ENDLABELEDITW = LVN_FIRST - 76 +LVN_GETDISPINFOW = LVN_FIRST - 77 +LVN_SETDISPINFOW = LVN_FIRST - 78 +LVN_ODFINDITEMW = LVN_FIRST - 79 +LVN_BEGINLABELEDIT = LVN_BEGINLABELEDITA +LVN_ENDLABELEDIT = LVN_ENDLABELEDITA +LVN_GETDISPINFO = LVN_GETDISPINFOA +LVN_SETDISPINFO = LVN_SETDISPINFOA +LVN_ODFINDITEM = LVN_ODFINDITEMA + +; Tree view styles + +TVS_HASBUTTONS = 0001h +TVS_HASLINES = 0002h +TVS_LINESATROOT = 0004h +TVS_EDITLABELS = 0008h +TVS_DISABLEDRAGDROP = 0010h +TVS_SHOWSELALWAYS = 0020h +TVS_RTLREADING = 0040h +TVS_NOTOOLTIPS = 0080h +TVS_CHECKBOXES = 0100h +TVS_TRACKSELECT = 0200h +TVS_SINGLEEXPAND = 0400h +TVS_INFOTIP = 0800h +TVS_FULLROWSELECT = 1000h +TVS_NOSCROLL = 2000h +TVS_NONEVENHEIGHT = 4000h + +; Tree view item structure flags + +TVIF_TEXT = 0001h +TVIF_IMAGE = 0002h +TVIF_PARAM = 0004h +TVIF_STATE = 0008h +TVIF_HANDLE = 0010h +TVIF_SELECTEDIMAGE = 0020h +TVIF_CHILDREN = 0040h +TVIF_DI_SETITEM = 1000h + +; Tree view item states + +TVIS_FOCUSED = 00001h +TVIS_SELECTED = 00002h +TVIS_CUT = 00004h +TVIS_DROPHILITED = 00008h +TVIS_BOLD = 00010h +TVIS_EXPANDED = 00020h +TVIS_EXPANDEDONCE = 00040h +TVIS_EXPANDPARTIAL = 00080h +TVIS_OVERLAYMASK = 00F00h +TVIS_STATEIMAGEMASK = 0F000h +TVIS_USERMASK = 0F000h + +; Tree view predefined item values + +TVI_ROOT = 0FFFF0000h +TVI_FIRST = 0FFFF0001h +TVI_LAST = 0FFFF0002h +TVI_SORT = 0FFFF0003h + +; Tree view messages + +TVM_INSERTITEMA = TV_FIRST + 0 +TVM_DELETEITEM = TV_FIRST + 1 +TVM_EXPAND = TV_FIRST + 2 +TVM_GETITEMRECT = TV_FIRST + 4 +TVM_GETCOUNT = TV_FIRST + 5 +TVM_GETINDENT = TV_FIRST + 6 +TVM_SETINDENT = TV_FIRST + 7 +TVM_GETIMAGELIST = TV_FIRST + 8 +TVM_SETIMAGELIST = TV_FIRST + 9 +TVM_GETNEXTITEM = TV_FIRST + 10 +TVM_SELECTITEM = TV_FIRST + 11 +TVM_GETITEMA = TV_FIRST + 12 +TVM_SETITEMA = TV_FIRST + 13 +TVM_EDITLABELA = TV_FIRST + 14 +TVM_GETEDITCONTROL = TV_FIRST + 15 +TVM_GETVISIBLECOUNT = TV_FIRST + 16 +TVM_HITTEST = TV_FIRST + 17 +TVM_CREATEDRAGIMAGE = TV_FIRST + 18 +TVM_SORTCHILDREN = TV_FIRST + 19 +TVM_ENSUREVISIBLE = TV_FIRST + 20 +TVM_SORTCHILDRENCB = TV_FIRST + 21 +TVM_ENDEDITLABELNOW = TV_FIRST + 22 +TVM_GETISEARCHSTRINGA = TV_FIRST + 23 +TVM_INSERTITEMW = TV_FIRST + 50 +TVM_GETITEMW = TV_FIRST + 62 +TVM_SETITEMW = TV_FIRST + 63 +TVM_GETISEARCHSTRINGW = TV_FIRST + 64 +TVM_EDITLABELW = TV_FIRST + 65 +TVM_INSERTITEM = TVM_INSERTITEMA +TVM_GETITEM = TVM_GETITEMA +TVM_SETITEM = TVM_SETITEMA +TVM_GETISEARCHSTRING = TVM_GETISEARCHSTRINGA +TVM_EDITLABEL = TVM_EDITLABELA + +; Tree view action flags + +TVE_COLLAPSE = 0001h +TVE_EXPAND = 0002h +TVE_TOGGLE = 0003h +TVE_EXPANDPARTIAL = 4000h +TVE_COLLAPSERESET = 8000h + +; Tree view image list types + +TVSIL_NORMAL = 0 +TVSIL_STATE = 2 + +; Tree view next item types + +TVGN_ROOT = 0 +TVGN_NEXT = 1 +TVGN_PREVIOUS = 2 +TVGN_PARENT = 3 +TVGN_CHILD = 4 +TVGN_FIRSTVISIBLE = 5 +TVGN_NEXTVISIBLE = 6 +TVGN_PREVIOUSVISIBLE = 7 +TVGN_DROPHILITE = 8 +TVGN_CARET = 9 + +; Tree view hit test flags + +TVHT_NOWHERE = 001h +TVHT_ONITEMICON = 002h +TVHT_ONITEMLABEL = 004h +TVHT_ONITEMINDENT = 008h +TVHT_ONITEMBUTTON = 010h +TVHT_ONITEMRIGHT = 020h +TVHT_ONITEMSTATEICON = 040h +TVHT_ONITEM = TVHT_ONITEMICON or TVHT_ONITEMLABEL or TVHT_ONITEMSTATEICON +TVHT_ABOVE = 100h +TVHT_BELOW = 200h +TVHT_TORIGHT = 400h +TVHT_TOLEFT = 800h + +; Tree view notifications + +TVN_SELCHANGINGA = TVN_FIRST - 1 +TVN_SELCHANGEDA = TVN_FIRST - 2 +TVN_GETDISPINFOA = TVN_FIRST - 3 +TVN_SETDISPINFOA = TVN_FIRST - 4 +TVN_ITEMEXPANDINGA = TVN_FIRST - 5 +TVN_ITEMEXPANDEDA = TVN_FIRST - 6 +TVN_BEGINDRAGA = TVN_FIRST - 7 +TVN_BEGINRDRAGA = TVN_FIRST - 8 +TVN_DELETEITEMA = TVN_FIRST - 9 +TVN_BEGINLABELEDITA = TVN_FIRST - 10 +TVN_ENDLABELEDITA = TVN_FIRST - 11 +TVN_KEYDOWN = TVN_FIRST - 12 +TVN_SELCHANGINGW = TVN_FIRST - 50 +TVN_SELCHANGEDW = TVN_FIRST - 51 +TVN_GETDISPINFOW = TVN_FIRST - 52 +TVN_SETDISPINFOW = TVN_FIRST - 53 +TVN_ITEMEXPANDINGW = TVN_FIRST - 54 +TVN_ITEMEXPANDEDW = TVN_FIRST - 55 +TVN_BEGINDRAGW = TVN_FIRST - 56 +TVN_BEGINRDRAGW = TVN_FIRST - 57 +TVN_DELETEITEMW = TVN_FIRST - 58 +TVN_BEGINLABELEDITW = TVN_FIRST - 59 +TVN_ENDLABELEDITW = TVN_FIRST - 60 +TVN_SELCHANGING = TVN_SELCHANGINGA +TVN_SELCHANGED = TVN_SELCHANGEDA +TVN_GETDISPINFO = TVN_GETDISPINFOA +TVN_SETDISPINFO = TVN_SETDISPINFOA +TVN_ITEMEXPANDING = TVN_ITEMEXPANDINGA +TVN_ITEMEXPANDED = TVN_ITEMEXPANDEDA +TVN_BEGINDRAG = TVN_BEGINDRAGA +TVN_BEGINRDRAG = TVN_BEGINRDRAGA +TVN_DELETEITEM = TVN_DELETEITEMA +TVN_BEGINLABELEDIT = TVN_BEGINLABELEDITA +TVN_ENDLABELEDIT = TVN_ENDLABELEDITA + +; Tree view action flags + +TVC_UNKNOWN = 0 +TVC_BYMOUSE = 1 +TVC_BYKEYBOARD = 2 + +; Tab control styles + +TCS_SCROLLOPPOSITE = 0001h +TCS_BOTTOM = 0002h +TCS_RIGHT = 0002h +TCS_FORCEICONLEFT = 0010h +TCS_FORCELABELLEFT = 0020h +TCS_HOTTRACK = 0040h +TCS_VERTICAL = 0080h +TCS_TABS = 0000h +TCS_BUTTONS = 0100h +TCS_SINGLELINE = 0000h +TCS_MULTILINE = 0200h +TCS_RIGHTJUSTIFY = 0000h +TCS_FIXEDWIDTH = 0400h +TCS_RAGGEDRIGHT = 0800h +TCS_FOCUSONBUTTONDOWN = 1000h +TCS_OWNERDRAWFIXED = 2000h +TCS_TOOLTIPS = 4000h +TCS_FOCUSNEVER = 8000h + +; Tab control messages + +TCM_GETIMAGELIST = TCM_FIRST + 2 +TCM_SETIMAGELIST = TCM_FIRST + 3 +TCM_GETITEMCOUNT = TCM_FIRST + 4 +TCM_GETITEMA = TCM_FIRST + 5 +TCM_SETITEMA = TCM_FIRST + 6 +TCM_INSERTITEMA = TCM_FIRST + 7 +TCM_DELETEITEM = TCM_FIRST + 8 +TCM_DELETEALLITEMS = TCM_FIRST + 9 +TCM_GETITEMRECT = TCM_FIRST + 10 +TCM_GETCURSEL = TCM_FIRST + 11 +TCM_SETCURSEL = TCM_FIRST + 12 +TCM_HITTEST = TCM_FIRST + 13 +TCM_SETITEMEXTRA = TCM_FIRST + 14 +TCM_ADJUSTRECT = TCM_FIRST + 40 +TCM_SETITEMSIZE = TCM_FIRST + 41 +TCM_REMOVEIMAGE = TCM_FIRST + 42 +TCM_SETPADDING = TCM_FIRST + 43 +TCM_GETROWCOUNT = TCM_FIRST + 44 +TCM_GETTOOLTIPS = TCM_FIRST + 45 +TCM_SETTOOLTIPS = TCM_FIRST + 46 +TCM_GETCURFOCUS = TCM_FIRST + 47 +TCM_SETCURFOCUS = TCM_FIRST + 48 +TCM_GETITEMW = TCM_FIRST + 60 +TCM_SETITEMW = TCM_FIRST + 61 +TCM_INSERTITEMW = TCM_FIRST + 62 +TCM_GETITEM = TCM_GETITEMA +TCM_SETITEM = TCM_SETITEMA +TCM_INSERTITEM = TCM_INSERTITEMA + +; Tab control item structure flags + +TCIF_TEXT = 1 +TCIF_IMAGE = 2 +TCIF_RTLREADING = 4 +TCIF_PARAM = 8 + +; Tab control hit test flags + +TCHT_NOWHERE = 1 +TCHT_ONITEMICON = 2 +TCHT_ONITEMLABEL = 4 +TCHT_ONITEM = TCHT_ONITEMICON or TCHT_ONITEMLABEL + +; Tab control notifications + +TCN_KEYDOWN = TCN_FIRST - 0 +TCN_SELCHANGE = TCN_FIRST - 1 +TCN_SELCHANGING = TCN_FIRST - 2 + +; Animation control styles + +ACS_CENTER = 1 +ACS_TRANSPARENT = 2 +ACS_AUTOPLAY = 4 +ACS_TIMER = 8 + +; Animation control messages + +ACM_OPENA = WM_USER + 100 +ACM_PLAY = WM_USER + 101 +ACM_STOP = WM_USER + 102 +ACM_OPENW = WM_USER + 103 +ACM_OPEN = ACM_OPENA + +; Animation control notifications + +ACN_START = 1 +ACN_STOP = 2 + +; Month calendar styles + +MCS_DAYSTATE = 1 +MCS_MULTISELECT = 2 +MCS_WEEKNUMBERS = 4 +MCS_NOTODAY_PRE_IE4 = 8 +MCS_NOTODAYCIRCLE = 8 +MCS_NOTODAY = 16 + +; Month calendar messages + +MCM_GETCURSEL = MCM_FIRST + 1 +MCM_SETCURSEL = MCM_FIRST + 2 +MCM_GETMAXSELCOUNT = MCM_FIRST + 3 +MCM_SETMAXSELCOUNT = MCM_FIRST + 4 +MCM_GETSELRANGE = MCM_FIRST + 5 +MCM_SETSELRANGE = MCM_FIRST + 6 +MCM_GETMONTHRANGE = MCM_FIRST + 7 +MCM_SETDAYSTATE = MCM_FIRST + 8 +MCM_GETMINREQRECT = MCM_FIRST + 9 +MCM_SETCOLOR = MCM_FIRST + 10 +MCM_GETCOLOR = MCM_FIRST + 11 +MCM_SETTODAY = MCM_FIRST + 12 +MCM_GETTODAY = MCM_FIRST + 13 +MCM_HITTEST = MCM_FIRST + 14 +MCM_SETFIRSTDAYOFWEEK = MCM_FIRST + 15 +MCM_GETFIRSTDAYOFWEEK = MCM_FIRST + 16 +MCM_GETRANGE = MCM_FIRST + 17 +MCM_SETRANGE = MCM_FIRST + 18 +MCM_GETMONTHDELTA = MCM_FIRST + 19 +MCM_SETMONTHDELTA = MCM_FIRST + 20 + +; Month calendar hit test flags + +MCHT_TITLE = 0010000h +MCHT_CALENDAR = 0020000h +MCHT_TODAYLINK = 0030000h +MCHT_NEXT = 1000000h +MCHT_PREV = 2000000h +MCHT_NOWHERE = 0000000h +MCHT_TITLEBK = MCHT_TITLE +MCHT_TITLEMONTH = MCHT_TITLE or 1 +MCHT_TITLEYEAR = MCHT_TITLE or 2 +MCHT_TITLEBTNNEXT = MCHT_TITLE or MCHT_NEXT or 3 +MCHT_TITLEBTNPREV = MCHT_TITLE or MCHT_PREV or 3 +MCHT_CALENDARBK = MCHT_CALENDAR +MCHT_CALENDARDATE = MCHT_CALENDAR or 1 +MCHT_CALENDARDATENEXT = MCHT_CALENDARDATE or MCHT_NEXT +MCHT_CALENDARDATEPREV = MCHT_CALENDARDATE or MCHT_PREV +MCHT_CALENDARDAY = MCHT_CALENDAR or 2 +MCHT_CALENDARWEEKNUM = MCHT_CALENDAR or 3 + +; Month calendar color codes + +MCSC_BACKGROUND = 0 +MCSC_TEXT = 1 +MCSC_TITLEBK = 2 +MCSC_TITLETEXT = 3 +MCSC_MONTHBK = 4 +MCSC_TRAILINGTEXT = 5 + +; Month calendar notifications + +MCN_SELCHANGE = MCN_FIRST + 1 +MCN_GETDAYSTATE = MCN_FIRST + 3 +MCN_SELECT = MCN_FIRST + 4 + +; Date-time pick control messages + +DTM_GETSYSTEMTIME = DTM_FIRST + 1 +DTM_SETSYSTEMTIME = DTM_FIRST + 2 +DTM_GETRANGE = DTM_FIRST + 3 +DTM_SETRANGE = DTM_FIRST + 4 +DTM_SETFORMATA = DTM_FIRST + 5 +DTM_SETMCCOLOR = DTM_FIRST + 6 +DTM_GETMCCOLOR = DTM_FIRST + 7 +DTM_GETMONTHCAL = DTM_FIRST + 8 +DTM_SETMCFONT = DTM_FIRST + 9 +DTM_GETMCFONT = DTM_FIRST + 10 +DTM_SETFORMATW = DTM_FIRST + 50 +DTM_SETFORMAT = DTM_SETFORMATA + +; Date-time pick control styles + +DTS_UPDOWN = 01h +DTS_SHOWNONE = 02h +DTS_SHORTDATEFORMAT = 00h +DTS_LONGDATEFORMAT = 04h +DTS_TIMEFORMAT = 09h +DTS_APPCANPARSE = 10h +DTS_RIGHTALIGN = 20h + +; Date-time pick control notifications + +DTN_DATETIMECHANGE = DTN_FIRST + 1 +DTN_USERSTRINGA = DTN_FIRST + 2 +DTN_WMKEYDOWNA = DTN_FIRST + 3 +DTN_FORMATA = DTN_FIRST + 4 +DTN_FORMATQUERYA = DTN_FIRST + 5 +DTN_DROPDOWN = DTN_FIRST + 6 +DTN_CLOSEUP = DTN_FIRST + 7 +DTN_USERSTRINGW = DTN_FIRST + 15 +DTN_WMKEYDOWNW = DTN_FIRST + 16 +DTN_FORMATW = DTN_FIRST + 17 +DTN_FORMATQUERYW = DTN_FIRST + 18 +DTN_USERSTRING = DTN_USERSTRINGA +DTN_WMKEYDOWN = DTN_WMKEYDOWNA +DTN_FORMAT = DTN_FORMATA +DTN_FORMATQUERY = DTN_FORMATQUERYA + +; ImageList_LoadImage types + +IMAGE_BITMAP = 0 +IMAGE_ICON = 1 +IMAGE_CURSOR = 2 +IMAGE_ENHMETAFILE = 3 + +; ImageList_LoadImage flags + +LR_DEFAULTCOLOR = 0000h +LR_MONOCHROME = 0001h +LR_COLOR = 0002h +LR_COPYRETURNORG = 0004h +LR_COPYDELETEORG = 0008h +LR_LOADFROMFILE = 0010h +LR_LOADTRANSPARENT = 0020h +LR_DEFAULTSIZE = 0040h +LR_VGACOLOR = 0080h +LR_LOADMAP3DCOLORS = 1000h +LR_CREATEDIBSECTION = 2000h +LR_COPYFROMRESOURCE = 4000h +LR_SHARED = 8000h + +; IP control messages + +IPM_CLEARADDRESS = WM_USER + 100 +IPM_SETADDRESS = WM_USER + 101 +IPM_GETADDRESS = WM_USER + 102 +IPM_SETRANGE = WM_USER + 103 +IPM_SETFOCUS = WM_USER + 104 +IPM_ISBLANK = WM_USER + 105 + +; Custom Draw flags + +CDRF_DODEFAULT = 0 +CDRF_NEWFONT = 2 +CDRF_SKIPDEFAULT = 4 +CDRF_NOTIFYPOSTPAINT = 10h +CDRF_NOTIFYITEMDRAW = 20h +CDRF_NOTIFYSUBITEMDRAW = 20h +CDRF_NOTIFYPOSTERASE = 40h +CDDS_PREPAINT = 1 +CDDS_POSTPAINT = 2 +CDDS_PREERASE = 3 +CDDS_POSTERASE = 4 +CDDS_ITEM = 10000h +CDDS_ITEMPREPAINT = CDDS_ITEM or CDDS_PREPAINT +CDDS_ITEMPOSTPAINT = CDDS_ITEM or CDDS_POSTPAINT +CDDS_ITEMPREERASE = CDDS_ITEM or CDDS_PREERASE +CDDS_ITEMPOSTERASE = CDDS_ITEM or CDDS_POSTERASE +CDDS_SUBITEM = 20000h +CDIS_SELECTED = 1 +CDIS_GRAYED = 2 +CDIS_DISABLED = 4 +CDIS_CHECKED = 8 +CDIS_FOCUS = 10h +CDIS_DEFAULT = 20h +CDIS_HOT = 40h +CDIS_MARKED = 80h +CDIS_INDETERMINATE = 100h diff --git a/asm/equihash/Windows/INCLUDE/EQUATES/COMDLG32.INC b/asm/equihash/Windows/INCLUDE/EQUATES/COMDLG32.INC new file mode 100644 index 0000000..4b27efc --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/EQUATES/COMDLG32.INC @@ -0,0 +1,333 @@ + +; COMDLG32.DLL structures and constants + +struct OPENFILENAME + lStructSize dd ? + hwndOwner dd ? + hInstance dd ? + lpstrFilter dd ? + lpstrCustomFilter dd ? + nMaxCustFilter dd ? + nFilterIndex dd ? + lpstrFile dd ? + nMaxFile dd ? + lpstrFileTitle dd ? + nMaxFileTitle dd ? + lpstrInitialDir dd ? + lpstrTitle dd ? + Flags dd ? + nFileOffset dw ? + nFileExtension dw ? + lpstrDefExt dd ? + lCustData dd ? + lpfnHook dd ? + lpTemplateName dd ? +ends + +struct CHOOSECOLOR + lStructSize dd ? + hwndOwner dd ? + hInstance dd ? + rgbResult dd ? + lpCustColors dd ? + Flags dd ? + lCustData dd ? + lpfnHook dd ? + lpTemplateName dd ? +ends + +struct FINDREPLACE + lStructSize dd ? + hwndOwner dd ? + hInstance dd ? + Flags dd ? + lpstrFindWhat dd ? + lpstrReplaceWith dd ? + wFindWhatLen dw ? + wReplaceWithLen dw ? + lCustData dd ? + lpfnHook dd ? + lpTemplateName dd ? +ends + +struct CHOOSEFONT + lStructSize dd ? + hwndOwner dd ? + hDC dd ? + lpLogFont dd ? + iPointSize dd ? + Flags dd ? + rgbColors dd ? + lCustData dd ? + lpfnHook dd ? + lpTemplateName dd ? + hInstance dd ? + lpszStyle dd ? + nFontType dw ? + wReserved dw ? + nSizeMin dd ? + nSizeMax dd ? +ends + +struct PRINTDLG + lStructSize dd ? + hwndOwner dd ? + hDevMode dd ? + hDevNames dd ? + hDC dd ? + Flags dd ? + nFromPage dw ? + nToPage dw ? + nMinPage dw ? + nMaxPage dw ? + nCopies dw ? + hInstance dd ? + lCustData dd ? + lpfnPrintHook dd ? + lpfnSetupHook dd ? + lpPrintTemplateName dd ? + lpSetupTemplateName dd ? + hPrintTemplate dd ? + hSetupTemplate dd ? +ends + +struct DEVNAMES + wDriverOffset dw ? + wDeviceOffset dw ? + wOutputOffset dw ? + wDefault dw ? +ends + +struct PAGESETUPDLG + lStructSize dd ? + hwndOwner dd ? + hDevMode dd ? + hDevNames dd ? + Flags dd ? + ptPaperSize POINT + rtMinMargin RECT + rtMargin RECT + hInstance dd ? + lCustData dd ? + lpfnPageSetupHook dd ? + lpfnPagePaintHook dd ? + lpPageSetupTemplateName dd ? + hPageSetupTemplate dd ? +ends + +; OPENFILENAME flags + +OFN_READONLY = 000001h +OFN_OVERWRITEPROMPT = 000002h +OFN_HIDEREADONLY = 000004h +OFN_NOCHANGEDIR = 000008h +OFN_SHOWHELP = 000010h +OFN_ENABLEHOOK = 000020h +OFN_ENABLETEMPLATE = 000040h +OFN_ENABLETEMPLATEHANDLE = 000080h +OFN_NOVALIDATE = 000100h +OFN_ALLOWMULTISELECT = 000200h +OFN_EXTENSIONDIFFERENT = 000400h +OFN_PATHMUSTEXIST = 000800h +OFN_FILEMUSTEXIST = 001000h +OFN_CREATEPROMPT = 002000h +OFN_SHAREAWARE = 004000h +OFN_NOREADONLYRETURN = 008000h +OFN_NOTESTFILECREATE = 010000h +OFN_NONETWORKBUTTON = 020000h +OFN_NOLONGNAMES = 040000h +OFN_EXPLORER = 080000h +OFN_NODEREFERENCELINKS = 100000h +OFN_LONGNAMES = 200000h + +; Common dialog notifications + +CDN_FIRST = -601 +CDN_LAST = -699 +CDN_INITDONE = CDN_FIRST - 0 +CDN_SELCHANGE = CDN_FIRST - 1 +CDN_FOLDERCHANGE = CDN_FIRST - 2 +CDN_SHAREVIOLATION = CDN_FIRST - 3 +CDN_HELP = CDN_FIRST - 4 +CDN_FILEOK = CDN_FIRST - 5 +CDN_TYPECHANGE = CDN_FIRST - 6 + +; Common dialog messages + +CDM_FIRST = WM_USER + 100 +CDM_LAST = WM_USER + 200 +CDM_GETSPEC = CDM_FIRST + 0 +CDM_GETFILEPATH = CDM_FIRST + 1 +CDM_GETFOLDERPATH = CDM_FIRST + 2 +CDM_GETFOLDERIDLIST = CDM_FIRST + 3 +CDM_SETCONTROLTEXT = CDM_FIRST + 4 +CDM_HIDECONTROL = CDM_FIRST + 5 +CDM_SETDEFEXT = CDM_FIRST + 6 + +; CHOOSECOLOR flags + +CC_RGBINIT = 001h +CC_FULLOPEN = 002h +CC_PREVENTFULLOPEN = 004h +CC_SHOWHELP = 008h +CC_ENABLEHOOK = 010h +CC_ENABLETEMPLATE = 020h +CC_ENABLETEMPLATEHANDLE = 040h +CC_SOLIDCOLOR = 080h +CC_ANYCOLOR = 100h + +; FINDREPLACE flags + +FR_DOWN = 00001h +FR_WHOLEWORD = 00002h +FR_MATCHCASE = 00004h +FR_FINDNEXT = 00008h +FR_REPLACE = 00010h +FR_REPLACEALL = 00020h +FR_DIALOGTERM = 00040h +FR_SHOWHELP = 00080h +FR_ENABLEHOOK = 00100h +FR_ENABLETEMPLATE = 00200h +FR_NOUPDOWN = 00400h +FR_NOMATCHCASE = 00800h +FR_NOWHOLEWORD = 01000h +FR_ENABLETEMPLATEHANDLE = 02000h +FR_HIDEUPDOWN = 04000h +FR_HIDEMATCHCASE = 08000h +FR_HIDEWHOLEWORD = 10000h + +; CHOOSEFONT flags + +CF_SCREENFONTS = 0000001h +CF_PRINTERFONTS = 0000002h +CF_BOTH = CF_SCREENFONTS or CF_PRINTERFONTS +CF_SHOWHELP = 0000004h +CF_ENABLEHOOK = 0000008h +CF_ENABLETEMPLATE = 0000010h +CF_ENABLETEMPLATEHANDLE = 0000020h +CF_INITTOLOGFONTSTRUCT = 0000040h +CF_USESTYLE = 0000080h +CF_EFFECTS = 0000100h +CF_APPLY = 0000200h +CF_ANSIONLY = 0000400h +CF_SCRIPTSONLY = CF_ANSIONLY +CF_NOVECTORFONTS = 0000800h +CF_NOOEMFONTS = CF_NOVECTORFONTS +CF_NOSIMULATIONS = 0001000h +CF_LIMITSIZE = 0002000h +CF_FIXEDPITCHONLY = 0004000h +CF_WYSIWYG = 0008000h +CF_FORCEFONTEXIST = 0010000h +CF_SCALABLEONLY = 0020000h +CF_TTONLY = 0040000h +CF_NOFACESEL = 0080000h +CF_NOSTYLESEL = 0100000h +CF_NOSIZESEL = 0200000h +CF_SELECTSCRIPT = 0400000h +CF_NOSCRIPTSEL = 0800000h +CF_NOVERTFONTS = 1000000h + +; ChooseFont messages + +WM_CHOOSEFONT_GETLOGFONT = WM_USER + 1 +WM_CHOOSEFONT_SETLOGFONT = WM_USER + 101 +WM_CHOOSEFONT_SETFLAGS = WM_USER + 102 + +; PRINTDLG flags + +PD_ALLPAGES = 000000h +PD_SELECTION = 000001h +PD_PAGENUMS = 000002h +PD_NOSELECTION = 000004h +PD_NOPAGENUMS = 000008h +PD_COLLATE = 000010h +PD_PRINTTOFILE = 000020h +PD_PRINTSETUP = 000040h +PD_NOWARNING = 000080h +PD_RETURNDC = 000100h +PD_RETURNIC = 000200h +PD_RETURNDEFAULT = 000400h +PD_SHOWHELP = 000800h +PD_ENABLEPRINTHOOK = 001000h +PD_ENABLESETUPHOOK = 002000h +PD_ENABLEPRINTTEMPLATE = 004000h +PD_ENABLESETUPTEMPLATE = 008000h +PD_ENABLEPRINTTEMPLATEHANDLE = 010000h +PD_ENABLESETUPTEMPLATEHANDLE = 020000h +PD_USEDEVMODECOPIES = 040000h +PD_USEDEVMODECOPIESANDCOLLATE = 040000h +PD_DISABLEPRINTTOFILE = 080000h +PD_HIDEPRINTTOFILE = 100000h +PD_NONETWORKBUTTON = 200000h + +; PAGESETUPDLG flags + +PSD_DEFAULTMINMARGINS = 000000h +PSD_INWININIINTLMEASURE = 000000h +PSD_MINMARGINS = 000001h +PSD_MARGINS = 000002h +PSD_INTHOUSANDTHSOFINCHES = 000004h +PSD_INHUNDREDTHSOFMILLIMETERS = 000008h +PSD_DISABLEMARGINS = 000010h +PSD_DISABLEPRINTER = 000020h +PSD_NOWARNING = 000080h +PSD_DISABLEORIENTATION = 000100h +PSD_RETURNDEFAULT = 000400h +PSD_DISABLEPAPER = 000200h +PSD_SHOWHELP = 000800h +PSD_ENABLEPAGESETUPHOOK = 002000h +PSD_ENABLEPAGESETUPTEMPLATE = 008000h +PSD_ENABLEPAGESETUPTEMPLATEHANDLE = 020000h +PSD_ENABLEPAGEPAINTHOOK = 040000h +PSD_DISABLEPAGEPAINTING = 080000h +PSD_NONETWORKBUTTON = 200000h + +; PageSetupDlg messages + +WM_PSD_PAGESETUPDLG = WM_USER +WM_PSD_FULLPAGERECT = WM_USER + 1 +WM_PSD_MINMARGINRECT = WM_USER + 2 +WM_PSD_MARGINRECT = WM_USER + 3 +WM_PSD_GREEKTEXTRECT = WM_USER + 4 +WM_PSD_ENVSTAMPRECT = WM_USER + 5 +WM_PSD_YAFULLPAGERECT = WM_USER + 6 + +; Common dialog error codes + +CDERR_DIALOGFAILURE = 0FFFFh +CDERR_GENERALCODES = 00000h +CDERR_STRUCTSIZE = 00001h +CDERR_INITIALIZATION = 00002h +CDERR_NOTEMPLATE = 00003h +CDERR_NOHINSTANCE = 00004h +CDERR_LOADSTRFAILURE = 00005h +CDERR_FINDRESFAILURE = 00006h +CDERR_LOADRESFAILURE = 00007h +CDERR_LOCKRESFAILURE = 00008h +CDERR_MEMALLOCFAILURE = 00009h +CDERR_MEMLOCKFAILURE = 0000Ah +CDERR_NOHOOK = 0000Bh +CDERR_REGISTERMSGFAIL = 0000Ch +PDERR_PRINTERCODES = 01000h +PDERR_SETUPFAILURE = 01001h +PDERR_PARSEFAILURE = 01002h +PDERR_RETDEFFAILURE = 01003h +PDERR_LOADDRVFAILURE = 01004h +PDERR_GETDEVMODEFAIL = 01005h +PDERR_INITFAILURE = 01006h +PDERR_NODEVICES = 01007h +PDERR_NODEFAULTPRN = 01008h +PDERR_DNDMMISMATCH = 01009h +PDERR_CREATEICFAILURE = 0100Ah +PDERR_PRINTERNOTFOUND = 0100Bh +PDERR_DEFAULTDIFFERENT = 0100Ch +CFERR_CHOOSEFONTCODES = 02000h +CFERR_NOFONTS = 02001h +CFERR_MAXLESSTHANMIN = 02002h +FNERR_FILENAMECODES = 03000h +FNERR_SUBCLASSFAILURE = 03001h +FNERR_INVALIDFILENAME = 03002h +FNERR_BUFFERTOOSMALL = 03003h +FRERR_FINDREPLACECODES = 04000h +FRERR_BUFFERLENGTHZERO = 04001h +CCERR_CHOOSECOLORCODES = 05000h diff --git a/asm/equihash/Windows/INCLUDE/EQUATES/COMDLG64.INC b/asm/equihash/Windows/INCLUDE/EQUATES/COMDLG64.INC new file mode 100644 index 0000000..e9fcd54 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/EQUATES/COMDLG64.INC @@ -0,0 +1,334 @@ + +; COMDLG32.DLL structures and constants + +struct OPENFILENAME + lStructSize dd ?,? + hwndOwner dq ? + hInstance dq ? + lpstrFilter dq ? + lpstrCustomFilter dq ? + nMaxCustFilter dd ? + nFilterIndex dd ? + lpstrFile dq ? + nMaxFile dd ?,? + lpstrFileTitle dq ? + nMaxFileTitle dd ?,? + lpstrInitialDir dq ? + lpstrTitle dq ? + Flags dd ? + nFileOffset dw ? + nFileExtension dw ? + lpstrDefExt dq ? + lCustData dd ?,? + lpfnHook dq ? + lpTemplateName dq ? +ends + +struct CHOOSECOLOR + lStructSize dd ?,? + hwndOwner dq ? + hInstance dq ? + rgbResult dd ?,? + lpCustColors dq ? + Flags dd ? + lCustData dd ?,? + lpfnHook dq ? + lpTemplateName dq ? +ends + +struct FINDREPLACE + lStructSize dd ?,? + hwndOwner dq ? + hInstance dq ? + Flags dd ?,? + lpstrFindWhat dq ? + lpstrReplaceWith dq ? + wFindWhatLen dw ? + wReplaceWithLen dw ? + lCustData dd ? + lpfnHook dq ? + lpTemplateName dq ? +ends + +struct CHOOSEFONT + lStructSize dd ?,? + hwndOwner dq ? + hDC dq ? + lpLogFont dq ? + iPointSize dd ? + Flags dd ? + rgbColors dd ? + lCustData dd ? + lpfnHook dq ? + lpTemplateName dq ? + hInstance dq ? + lpszStyle dq ? + nFontType dw ? + wReserved dw ? + nSizeMin dd ? + nSizeMax dd ? +ends + +struct PRINTDLG + lStructSize dd ?,? + hwndOwner dq ? + hDevMode dq ? + hDevNames dq ? + hDC dq ? + Flags dd ? + nFromPage dw ? + nToPage dw ? + nMinPage dw ? + nMaxPage dw ? + nCopies dw ?,? + hInstance dq ? + lCustData dd ? + lpfnPrintHook dq ? + lpfnSetupHook dq ? + lpPrintTemplateName dq ? + lpSetupTemplateName dq ? + hPrintTemplate dq ? + hSetupTemplate dq ? +ends + +struct DEVNAMES + wDriverOffset dw ? + wDeviceOffset dw ? + wOutputOffset dw ? + wDefault dw ? +ends + +struct PAGESETUPDLG + lStructSize dd ?,? + hwndOwner dq ? + hDevMode dq ? + hDevNames dq ? + Flags dd ? + ptPaperSize POINT + rtMinMargin RECT + rtMargin RECT + dd ? + hInstance dq ? + lCustData dd ?,? + lpfnPageSetupHook dq ? + lpfnPagePaintHook dq ? + lpPageSetupTemplateName dq ? + hPageSetupTemplate dq ? +ends + +; OPENFILENAME flags + +OFN_READONLY = 000001h +OFN_OVERWRITEPROMPT = 000002h +OFN_HIDEREADONLY = 000004h +OFN_NOCHANGEDIR = 000008h +OFN_SHOWHELP = 000010h +OFN_ENABLEHOOK = 000020h +OFN_ENABLETEMPLATE = 000040h +OFN_ENABLETEMPLATEHANDLE = 000080h +OFN_NOVALIDATE = 000100h +OFN_ALLOWMULTISELECT = 000200h +OFN_EXTENSIONDIFFERENT = 000400h +OFN_PATHMUSTEXIST = 000800h +OFN_FILEMUSTEXIST = 001000h +OFN_CREATEPROMPT = 002000h +OFN_SHAREAWARE = 004000h +OFN_NOREADONLYRETURN = 008000h +OFN_NOTESTFILECREATE = 010000h +OFN_NONETWORKBUTTON = 020000h +OFN_NOLONGNAMES = 040000h +OFN_EXPLORER = 080000h +OFN_NODEREFERENCELINKS = 100000h +OFN_LONGNAMES = 200000h + +; Common dialog notifications + +CDN_FIRST = -601 +CDN_LAST = -699 +CDN_INITDONE = CDN_FIRST - 0 +CDN_SELCHANGE = CDN_FIRST - 1 +CDN_FOLDERCHANGE = CDN_FIRST - 2 +CDN_SHAREVIOLATION = CDN_FIRST - 3 +CDN_HELP = CDN_FIRST - 4 +CDN_FILEOK = CDN_FIRST - 5 +CDN_TYPECHANGE = CDN_FIRST - 6 + +; Common dialog messages + +CDM_FIRST = WM_USER + 100 +CDM_LAST = WM_USER + 200 +CDM_GETSPEC = CDM_FIRST + 0 +CDM_GETFILEPATH = CDM_FIRST + 1 +CDM_GETFOLDERPATH = CDM_FIRST + 2 +CDM_GETFOLDERIDLIST = CDM_FIRST + 3 +CDM_SETCONTROLTEXT = CDM_FIRST + 4 +CDM_HIDECONTROL = CDM_FIRST + 5 +CDM_SETDEFEXT = CDM_FIRST + 6 + +; CHOOSECOLOR flags + +CC_RGBINIT = 001h +CC_FULLOPEN = 002h +CC_PREVENTFULLOPEN = 004h +CC_SHOWHELP = 008h +CC_ENABLEHOOK = 010h +CC_ENABLETEMPLATE = 020h +CC_ENABLETEMPLATEHANDLE = 040h +CC_SOLIDCOLOR = 080h +CC_ANYCOLOR = 100h + +; FINDREPLACE flags + +FR_DOWN = 00001h +FR_WHOLEWORD = 00002h +FR_MATCHCASE = 00004h +FR_FINDNEXT = 00008h +FR_REPLACE = 00010h +FR_REPLACEALL = 00020h +FR_DIALOGTERM = 00040h +FR_SHOWHELP = 00080h +FR_ENABLEHOOK = 00100h +FR_ENABLETEMPLATE = 00200h +FR_NOUPDOWN = 00400h +FR_NOMATCHCASE = 00800h +FR_NOWHOLEWORD = 01000h +FR_ENABLETEMPLATEHANDLE = 02000h +FR_HIDEUPDOWN = 04000h +FR_HIDEMATCHCASE = 08000h +FR_HIDEWHOLEWORD = 10000h + +; CHOOSEFONT flags + +CF_SCREENFONTS = 0000001h +CF_PRINTERFONTS = 0000002h +CF_BOTH = CF_SCREENFONTS or CF_PRINTERFONTS +CF_SHOWHELP = 0000004h +CF_ENABLEHOOK = 0000008h +CF_ENABLETEMPLATE = 0000010h +CF_ENABLETEMPLATEHANDLE = 0000020h +CF_INITTOLOGFONTSTRUCT = 0000040h +CF_USESTYLE = 0000080h +CF_EFFECTS = 0000100h +CF_APPLY = 0000200h +CF_ANSIONLY = 0000400h +CF_SCRIPTSONLY = CF_ANSIONLY +CF_NOVECTORFONTS = 0000800h +CF_NOOEMFONTS = CF_NOVECTORFONTS +CF_NOSIMULATIONS = 0001000h +CF_LIMITSIZE = 0002000h +CF_FIXEDPITCHONLY = 0004000h +CF_WYSIWYG = 0008000h +CF_FORCEFONTEXIST = 0010000h +CF_SCALABLEONLY = 0020000h +CF_TTONLY = 0040000h +CF_NOFACESEL = 0080000h +CF_NOSTYLESEL = 0100000h +CF_NOSIZESEL = 0200000h +CF_SELECTSCRIPT = 0400000h +CF_NOSCRIPTSEL = 0800000h +CF_NOVERTFONTS = 1000000h + +; ChooseFont messages + +WM_CHOOSEFONT_GETLOGFONT = WM_USER + 1 +WM_CHOOSEFONT_SETLOGFONT = WM_USER + 101 +WM_CHOOSEFONT_SETFLAGS = WM_USER + 102 + +; PRINTDLG flags + +PD_ALLPAGES = 000000h +PD_SELECTION = 000001h +PD_PAGENUMS = 000002h +PD_NOSELECTION = 000004h +PD_NOPAGENUMS = 000008h +PD_COLLATE = 000010h +PD_PRINTTOFILE = 000020h +PD_PRINTSETUP = 000040h +PD_NOWARNING = 000080h +PD_RETURNDC = 000100h +PD_RETURNIC = 000200h +PD_RETURNDEFAULT = 000400h +PD_SHOWHELP = 000800h +PD_ENABLEPRINTHOOK = 001000h +PD_ENABLESETUPHOOK = 002000h +PD_ENABLEPRINTTEMPLATE = 004000h +PD_ENABLESETUPTEMPLATE = 008000h +PD_ENABLEPRINTTEMPLATEHANDLE = 010000h +PD_ENABLESETUPTEMPLATEHANDLE = 020000h +PD_USEDEVMODECOPIES = 040000h +PD_USEDEVMODECOPIESANDCOLLATE = 040000h +PD_DISABLEPRINTTOFILE = 080000h +PD_HIDEPRINTTOFILE = 100000h +PD_NONETWORKBUTTON = 200000h + +; PAGESETUPDLG flags + +PSD_DEFAULTMINMARGINS = 000000h +PSD_INWININIINTLMEASURE = 000000h +PSD_MINMARGINS = 000001h +PSD_MARGINS = 000002h +PSD_INTHOUSANDTHSOFINCHES = 000004h +PSD_INHUNDREDTHSOFMILLIMETERS = 000008h +PSD_DISABLEMARGINS = 000010h +PSD_DISABLEPRINTER = 000020h +PSD_NOWARNING = 000080h +PSD_DISABLEORIENTATION = 000100h +PSD_RETURNDEFAULT = 000400h +PSD_DISABLEPAPER = 000200h +PSD_SHOWHELP = 000800h +PSD_ENABLEPAGESETUPHOOK = 002000h +PSD_ENABLEPAGESETUPTEMPLATE = 008000h +PSD_ENABLEPAGESETUPTEMPLATEHANDLE = 020000h +PSD_ENABLEPAGEPAINTHOOK = 040000h +PSD_DISABLEPAGEPAINTING = 080000h +PSD_NONETWORKBUTTON = 200000h + +; PageSetupDlg messages + +WM_PSD_PAGESETUPDLG = WM_USER +WM_PSD_FULLPAGERECT = WM_USER + 1 +WM_PSD_MINMARGINRECT = WM_USER + 2 +WM_PSD_MARGINRECT = WM_USER + 3 +WM_PSD_GREEKTEXTRECT = WM_USER + 4 +WM_PSD_ENVSTAMPRECT = WM_USER + 5 +WM_PSD_YAFULLPAGERECT = WM_USER + 6 + +; Common dialog error codes + +CDERR_DIALOGFAILURE = 0FFFFh +CDERR_GENERALCODES = 00000h +CDERR_STRUCTSIZE = 00001h +CDERR_INITIALIZATION = 00002h +CDERR_NOTEMPLATE = 00003h +CDERR_NOHINSTANCE = 00004h +CDERR_LOADSTRFAILURE = 00005h +CDERR_FINDRESFAILURE = 00006h +CDERR_LOADRESFAILURE = 00007h +CDERR_LOCKRESFAILURE = 00008h +CDERR_MEMALLOCFAILURE = 00009h +CDERR_MEMLOCKFAILURE = 0000Ah +CDERR_NOHOOK = 0000Bh +CDERR_REGISTERMSGFAIL = 0000Ch +PDERR_PRINTERCODES = 01000h +PDERR_SETUPFAILURE = 01001h +PDERR_PARSEFAILURE = 01002h +PDERR_RETDEFFAILURE = 01003h +PDERR_LOADDRVFAILURE = 01004h +PDERR_GETDEVMODEFAIL = 01005h +PDERR_INITFAILURE = 01006h +PDERR_NODEVICES = 01007h +PDERR_NODEFAULTPRN = 01008h +PDERR_DNDMMISMATCH = 01009h +PDERR_CREATEICFAILURE = 0100Ah +PDERR_PRINTERNOTFOUND = 0100Bh +PDERR_DEFAULTDIFFERENT = 0100Ch +CFERR_CHOOSEFONTCODES = 02000h +CFERR_NOFONTS = 02001h +CFERR_MAXLESSTHANMIN = 02002h +FNERR_FILENAMECODES = 03000h +FNERR_SUBCLASSFAILURE = 03001h +FNERR_INVALIDFILENAME = 03002h +FNERR_BUFFERTOOSMALL = 03003h +FRERR_FINDREPLACECODES = 04000h +FRERR_BUFFERLENGTHZERO = 04001h +CCERR_CHOOSECOLORCODES = 05000h diff --git a/asm/equihash/Windows/INCLUDE/EQUATES/GDI32.INC b/asm/equihash/Windows/INCLUDE/EQUATES/GDI32.INC new file mode 100644 index 0000000..77d556f --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/EQUATES/GDI32.INC @@ -0,0 +1,480 @@ + +; GDI32.DLL structures and constants + +struct SIZE + cx dd ? + cy dd ? +ends + +struct BITMAP + bmType dd ? + bmWidth dd ? + bmHeight dd ? + bmWidthBytes dd ? + bmPlanes dw ? + bmBitsPixel dw ? + bmBits dd ? +ends + +struct BITMAPCOREHEADER + bcSize dd ? + bcWidth dw ? + bcHeight dw ? + bcPlanes dw ? + bcBitCount dw ? +ends + +struct BITMAPINFOHEADER + biSize dd ? + biWidth dd ? + biHeight dd ? + biPlanes dw ? + biBitCount dw ? + biCompression dd ? + biSizeImage dd ? + biXPelsPerMeter dd ? + biYPelsPerMeter dd ? + biClrUsed dd ? + biClrImportant dd ? +ends + +struct BITMAPFILEHEADER + bfType dw ? + bfSize dd ? + bfReserved1 dw ? + bfReserved2 dw ? + bfOffBits dd ? +ends + +struct TEXTMETRIC + tmHeight dd ? + tmAscent dd ? + tmDescent dd ? + tmInternalLeading dd ? + tmExternalLeading dd ? + tmAveCharWidth dd ? + tmMaxCharWidth dd ? + tmWeight dd ? + tmOverhang dd ? + tmDigitizedAspectX dd ? + tmDigitizedAspectY dd ? + tmFirstChar TCHAR ? + tmLastChar TCHAR ? + tmDefaultChar TCHAR ? + tmBreakChar TCHAR ? + tmItalic db ? + tmUnderlined db ? + tmStruckOut db ? + tmPitchAndFamily db ? + tmCharSet db ? +ends + +struct LOGBRUSH + lbStyle dd ? + lbColor dd ? + lbHatch dd ? +ends + +struct LOGPEN + lopnStyle dd ? + lopnWidth POINT + lopnColor dd ? +ends + +struct EXTLOGPEN + elpPenStyle dd ? + elpWidth dd ? + elpBrushStyle dd ? + elpColor dd ? + elpHatch dd ? + elpNumEntries dd ? + elpStyleEntry dd ? +ends + +struct LOGFONT + lfHeight dd ? + lfWidth dd ? + lfEscapement dd ? + lfOrientation dd ? + lfWeight dd ? + lfItalic db ? + lfUnderline db ? + lfStrikeOut db ? + lfCharSet db ? + lfOutPrecision db ? + lfClipPrecision db ? + lfQuality db ? + lfPitchAndFamily db ? + lfFaceName TCHAR 32 dup (?) +ends + +struct ENUMLOGFONT + elfLogFont LOGFONT + elfFullName TCHAR 64 dup (?) + elfStyle TCHAR 32 dup (?) +ends + +struct ENUMLOGFONTEX + elfLogFont LOGFONT + elfFullName TCHAR 64 dup (?) + elfStyle TCHAR 32 dup (?) + elfScript TCHAR 32 dup (?) +ends + +struct PIXELFORMATDESCRIPTOR + nSize dw ? + nVersion dw ? + dwFlags dd ? + iPixelType db ? + cColorBits db ? + cRedBits db ? + cRedShift db ? + cGreenBits db ? + cGreenShift db ? + cBlueBits db ? + cBlueShift db ? + cAlphaBits db ? + cAlphaShift db ? + cAccumBits db ? + cAccumRedBits db ? + cAccumGreenBits db ? + cAccumBlueBits db ? + cAccumAlphaBits db ? + cDepthBits db ? + cStencilBits db ? + cAuxBuffers db ? + iLayerType db ? + bReserved db ? + dwLayerMask dd ? + dwVisibleMask dd ? + dwDamageMask dd ? +ends + +struct TRIVERTEX + x dd ? + y dd ? + Red dw ? + Green dw ? + Blue dw ? + Alpha dw ? +ends + +; General constants + +GDI_ERROR = 0FFFFFFFFh +HGDI_ERROR = 0FFFFFFFFh + +; Binary raster operations + +R2_BLACK = 1 +R2_NOTMERGEPEN = 2 +R2_MASKNOTPEN = 3 +R2_NOTCOPYPEN = 4 +R2_MASKPENNOT = 5 +R2_NOT = 6 +R2_XORPEN = 7 +R2_NOTMASKPEN = 8 +R2_MASKPEN = 9 +R2_NOTXORPEN = 10 +R2_NOP = 11 +R2_MERGENOTPEN = 12 +R2_COPYPEN = 13 +R2_MERGEPENNOT = 14 +R2_MERGEPEN = 15 +R2_WHITE = 16 + +; Raster operations + +SRCCOPY = 00CC0020h +SRCPAINT = 00EE0086h +SRCAND = 008800C6h +SRCINVERT = 00660046h +SRCERASE = 00440328h +NOTSRCCOPY = 00330008h +NOTSRCERASE = 001100A6h +MERGECOPY = 00C000CAh +MERGEPAINT = 00BB0226h +PATCOPY = 00F00021h +PATPAINT = 00FB0A09h +PATINVERT = 005A0049h +DSTINVERT = 00550009h +BLACKNESS = 00000042h +WHITENESS = 00FF0062h + +; Region flags + +ERROR = 0 +NULLREGION = 1 +SIMPLEREGION = 2 +COMPLEXREGION = 3 + +; CombineRgn styles + +RGN_AND = 1 +RGN_OR = 2 +RGN_XOR = 3 +RGN_DIFF = 4 +RGN_COPY = 5 + +; StretchBlt modes + +BLACKONWHITE = 1 +WHITEONBLACK = 2 +COLORONCOLOR = 3 +HALFTONE = 4 +STRETCH_ANDSCANS = BLACKONWHITE +STRETCH_ORSCANS = WHITEONBLACK +STRETCH_DELETESCANS = COLORONCOLOR +STRETCH_HALFTONE = HALFTONE + +; PolyFill modes + +ALTERNATE = 1 +WINDING = 2 + +; Background modes + +TRANSPARENT = 1 +OPAQUE = 2 + +; Point types + +PT_CLOSEFIGURE = 1 +PT_LINETO = 2 +PT_BEZIERTO = 4 +PT_MOVETO = 6 + +; Mapping modes + +MM_TEXT = 1 +MM_LOMETRIC = 2 +MM_HIMETRIC = 3 +MM_LOENGLISH = 4 +MM_HIENGLISH = 5 +MM_TWIPS = 6 +MM_ISOTROPIC = 7 +MM_ANISOTROPIC = 8 + +; Coordinate modes + +ABSOLUTE = 1 +RELATIVE = 2 + +; Stock logical objects + +WHITE_BRUSH = 0 +LTGRAY_BRUSH = 1 +GRAY_BRUSH = 2 +DKGRAY_BRUSH = 3 +BLACK_BRUSH = 4 +NULL_BRUSH = 5 +HOLLOW_BRUSH = NULL_BRUSH +WHITE_PEN = 6 +BLACK_PEN = 7 +NULL_PEN = 8 +OEM_FIXED_FONT = 10 +ANSI_FIXED_FONT = 11 +ANSI_VAR_FONT = 12 +SYSTEM_FONT = 13 +DEVICE_DEFAULT_FONT = 14 +DEFAULT_PALETTE = 15 +SYSTEM_FIXED_FONT = 16 +DEFAULT_GUI_FONT = 17 + +; Brush styles + +BS_SOLID = 0 +BS_NULL = 1 +BS_HOLLOW = BS_NULL +BS_HATCHED = 2 +BS_PATTERN = 3 +BS_INDEXED = 4 +BS_DIBPATTERN = 5 +BS_DIBPATTERNPT = 6 +BS_PATTERN8X8 = 7 +BS_DIBPATTERN8X8 = 8 +BS_MONOPATTERN = 9 + +; Hatch styles + +HS_HORIZONTAL = 0 +HS_VERTICAL = 1 +HS_FDIAGONAL = 2 +HS_BDIAGONAL = 3 +HS_CROSS = 4 +HS_DIAGCROSS = 5 + +; Pen styles + +PS_SOLID = 0 +PS_DASH = 1 +PS_DOT = 2 +PS_DASHDOT = 3 +PS_DASHDOTDOT = 4 +PS_NULL = 5 +PS_INSIDEFRAME = 6 +PS_USERSTYLE = 7 +PS_ALTERNATE = 8 +PS_ENDCAP_ROUND = 0 +PS_ENDCAP_SQUARE = 100h +PS_ENDCAP_FLAT = 200h +PS_JOIN_ROUND = 0 +PS_JOIN_BEVEL = 1000h +PS_JOIN_MITER = 2000h +PS_COSMETIC = 0 +PS_GEOMETRIC = 010000h + +; Arc directions + +AD_COUNTERCLOCKWISE = 1 +AD_CLOCKWISE = 2 + +; Text alignment options + +TA_NOUPDATECP = 0 +TA_UPDATECP = 1 +TA_LEFT = 0 +TA_RIGHT = 2 +TA_CENTER = 6 +TA_TOP = 0 +TA_BOTTOM = 8 +TA_BASELINE = 24 +TA_RTLREADING = 100h +VTA_BASELINE = TA_BASELINE +VTA_LEFT = TA_BOTTOM +VTA_RIGHT = TA_TOP +VTA_CENTER = TA_CENTER +VTA_BOTTOM = TA_RIGHT +VTA_TOP = TA_LEFT + +; ExtTextOut options + +ETO_OPAQUE = 0002h +ETO_CLIPPED = 0004h +ETO_GLYPH_INDEX = 0010h +ETO_RTLREADING = 0080h +ETO_IGNORELANGUAGE = 1000h + +; Bitmap compression types + +BI_RGB = 0 +BI_RLE8 = 1 +BI_RLE4 = 2 +BI_BITFIELDS = 3 + +; tmPitchAndFamily flags + +TMPF_FIXED_PITCH = 1 +TMPF_VECTOR = 2 +TMPF_TRUETYPE = 4 +TMPF_DEVICE = 8 + +; Font output precision values + +OUT_DEFAULT_PRECIS = 0 +OUT_STRING_PRECIS = 1 +OUT_CHARACTER_PRECIS = 2 +OUT_STROKE_PRECIS = 3 +OUT_TT_PRECIS = 4 +OUT_DEVICE_PRECIS = 5 +OUT_RASTER_PRECIS = 6 +OUT_TT_ONLY_PRECIS = 7 +OUT_OUTLINE_PRECIS = 8 +OUT_SCREEN_OUTLINE_PRECIS = 9 + +; Font clipping precision values + +CLIP_DEFAULT_PRECIS = 0 +CLIP_CHARACTER_PRECIS = 1 +CLIP_STROKE_PRECIS = 2 +CLIP_LH_ANGLES = 10h +CLIP_TT_ALWAYS = 20h +CLIP_EMBEDDED = 80h + +; Font output quality values + +DEFAULT_QUALITY = 0 +DRAFT_QUALITY = 1 +PROOF_QUALITY = 2 +NONANTIALIASED_QUALITY = 3 +ANTIALIASED_QUALITY = 4 + +; Font pitch values + +DEFAULT_PITCH = 0 +FIXED_PITCH = 1 +VARIABLE_PITCH = 2 +MONO_FONT = 8 + +; Font families + +FF_DONTCARE = 00h +FF_ROMAN = 10h +FF_SWISS = 20h +FF_MODERN = 30h +FF_SCRIPT = 40h +FF_DECORATIVE = 50h + +; Font weights + +FW_DONTCARE = 0 +FW_THIN = 100 +FW_EXTRALIGHT = 200 +FW_LIGHT = 300 +FW_NORMAL = 400 +FW_MEDIUM = 500 +FW_SEMIBOLD = 600 +FW_BOLD = 700 +FW_EXTRABOLD = 800 +FW_HEAVY = 900 +FW_ULTRALIGHT = FW_EXTRALIGHT +FW_REGULAR = FW_NORMAL +FW_DEMIBOLD = FW_SEMIBOLD +FW_ULTRABOLD = FW_EXTRABOLD +FW_BLACK = FW_HEAVY + +; Character set values + +ANSI_CHARSET = 0 +DEFAULT_CHARSET = 1 +SYMBOL_CHARSET = 2 +SHIFTJIS_CHARSET = 128 +HANGEUL_CHARSET = 129 +GB2312_CHARSET = 134 +CHINESEBIG5_CHARSET = 136 +OEM_CHARSET = 255 +JOHAB_CHARSET = 130 +HEBREW_CHARSET = 177 +ARABIC_CHARSET = 178 +GREEK_CHARSET = 161 +TURKISH_CHARSET = 162 +VIETNAMESE_CHARSET = 163 +THAI_CHARSET = 222 +EASTEUROPE_CHARSET = 238 +RUSSIAN_CHARSET = 204 +MAC_CHARSET = 77 +BALTIC_CHARSET = 186 + +; Pixel format constants + +PFD_TYPE_RGBA = 0 +PFD_TYPE_COLORINDEX = 1 +PFD_MAIN_PLANE = 0 +PFD_OVERLAY_PLANE = 1 +PFD_UNDERLAY_PLANE = -1 +PFD_DOUBLEBUFFER = 1 +PFD_STEREO = 2 +PFD_DRAW_TO_WINDOW = 4 +PFD_DRAW_TO_BITMAP = 8 +PFD_SUPPORT_GDI = 10h +PFD_SUPPORT_OPENGL = 20h +PFD_GENERIC_FORMAT = 40h +PFD_NEED_PALETTE = 80h +PFD_NEED_SYSTEM_PALETTE = 100h +PFD_SWAP_EXCHANGE = 200h +PFD_SWAP_COPY = 400h +PFD_SWAP_LAYER_BUFFERS = 800h +PFD_GENERIC_ACCELERATED = 1000h +PFD_DEPTH_DONTCARE = 20000000h +PFD_DOUBLEBUFFER_DONTCARE = 40000000h +PFD_STEREO_DONTCARE = 80000000h diff --git a/asm/equihash/Windows/INCLUDE/EQUATES/GDI64.INC b/asm/equihash/Windows/INCLUDE/EQUATES/GDI64.INC new file mode 100644 index 0000000..c611284 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/EQUATES/GDI64.INC @@ -0,0 +1,480 @@ + +; GDI32.DLL structures and constants + +struct SIZE + cx dd ? + cy dd ? +ends + +struct BITMAP + bmType dd ? + bmWidth dd ? + bmHeight dd ? + bmWidthBytes dd ? + bmPlanes dw ? + bmBitsPixel dw ?,?,? + bmBits dq ? +ends + +struct BITMAPCOREHEADER + bcSize dd ? + bcWidth dw ? + bcHeight dw ? + bcPlanes dw ? + bcBitCount dw ? +ends + +struct BITMAPINFOHEADER + biSize dd ? + biWidth dd ? + biHeight dd ? + biPlanes dw ? + biBitCount dw ? + biCompression dd ? + biSizeImage dd ? + biXPelsPerMeter dd ? + biYPelsPerMeter dd ? + biClrUsed dd ? + biClrImportant dd ? +ends + +struct BITMAPFILEHEADER + bfType dw ? + bfSize dd ? + bfReserved1 dw ? + bfReserved2 dw ? + bfOffBits dd ? +ends + +struct TEXTMETRIC + tmHeight dd ? + tmAscent dd ? + tmDescent dd ? + tmInternalLeading dd ? + tmExternalLeading dd ? + tmAveCharWidth dd ? + tmMaxCharWidth dd ? + tmWeight dd ? + tmOverhang dd ? + tmDigitizedAspectX dd ? + tmDigitizedAspectY dd ? + tmFirstChar TCHAR ? + tmLastChar TCHAR ? + tmDefaultChar TCHAR ? + tmBreakChar TCHAR ? + tmItalic db ? + tmUnderlined db ? + tmStruckOut db ? + tmPitchAndFamily db ? + tmCharSet db ? +ends + +struct LOGBRUSH + lbStyle dd ? + lbColor dd ? + lbHatch dd ? +ends + +struct LOGPEN + lopnStyle dd ? + lopnWidth POINT + lopnColor dd ? +ends + +struct EXTLOGPEN + elpPenStyle dd ? + elpWidth dd ? + elpBrushStyle dd ? + elpColor dd ? + elpHatch dd ? + elpNumEntries dd ? + elpStyleEntry dd ? +ends + +struct LOGFONT + lfHeight dd ? + lfWidth dd ? + lfEscapement dd ? + lfOrientation dd ? + lfWeight dd ? + lfItalic db ? + lfUnderline db ? + lfStrikeOut db ? + lfCharSet db ? + lfOutPrecision db ? + lfClipPrecision db ? + lfQuality db ? + lfPitchAndFamily db ? + lfFaceName TCHAR 32 dup (?) +ends + +struct ENUMLOGFONT + elfLogFont LOGFONT + elfFullName TCHAR 64 dup (?) + elfStyle TCHAR 32 dup (?) +ends + +struct ENUMLOGFONTEX + elfLogFont LOGFONT + elfFullName TCHAR 64 dup (?) + elfStyle TCHAR 32 dup (?) + elfScript TCHAR 32 dup (?) +ends + +struct PIXELFORMATDESCRIPTOR + nSize dw ? + nVersion dw ? + dwFlags dd ? + iPixelType db ? + cColorBits db ? + cRedBits db ? + cRedShift db ? + cGreenBits db ? + cGreenShift db ? + cBlueBits db ? + cBlueShift db ? + cAlphaBits db ? + cAlphaShift db ? + cAccumBits db ? + cAccumRedBits db ? + cAccumGreenBits db ? + cAccumBlueBits db ? + cAccumAlphaBits db ? + cDepthBits db ? + cStencilBits db ? + cAuxBuffers db ? + iLayerType db ? + bReserved db ? + dwLayerMask dd ? + dwVisibleMask dd ? + dwDamageMask dd ? +ends + +struct TRIVERTEX + x dd ? + y dd ? + Red dw ? + Green dw ? + Blue dw ? + Alpha dw ? +ends + +; General constants + +GDI_ERROR = 0FFFFFFFFh +HGDI_ERROR = 0FFFFFFFFh + +; Binary raster operations + +R2_BLACK = 1 +R2_NOTMERGEPEN = 2 +R2_MASKNOTPEN = 3 +R2_NOTCOPYPEN = 4 +R2_MASKPENNOT = 5 +R2_NOT = 6 +R2_XORPEN = 7 +R2_NOTMASKPEN = 8 +R2_MASKPEN = 9 +R2_NOTXORPEN = 10 +R2_NOP = 11 +R2_MERGENOTPEN = 12 +R2_COPYPEN = 13 +R2_MERGEPENNOT = 14 +R2_MERGEPEN = 15 +R2_WHITE = 16 + +; Raster operations + +SRCCOPY = 00CC0020h +SRCPAINT = 00EE0086h +SRCAND = 008800C6h +SRCINVERT = 00660046h +SRCERASE = 00440328h +NOTSRCCOPY = 00330008h +NOTSRCERASE = 001100A6h +MERGECOPY = 00C000CAh +MERGEPAINT = 00BB0226h +PATCOPY = 00F00021h +PATPAINT = 00FB0A09h +PATINVERT = 005A0049h +DSTINVERT = 00550009h +BLACKNESS = 00000042h +WHITENESS = 00FF0062h + +; Region flags + +ERROR = 0 +NULLREGION = 1 +SIMPLEREGION = 2 +COMPLEXREGION = 3 + +; CombineRgn styles + +RGN_AND = 1 +RGN_OR = 2 +RGN_XOR = 3 +RGN_DIFF = 4 +RGN_COPY = 5 + +; StretchBlt modes + +BLACKONWHITE = 1 +WHITEONBLACK = 2 +COLORONCOLOR = 3 +HALFTONE = 4 +STRETCH_ANDSCANS = BLACKONWHITE +STRETCH_ORSCANS = WHITEONBLACK +STRETCH_DELETESCANS = COLORONCOLOR +STRETCH_HALFTONE = HALFTONE + +; PolyFill modes + +ALTERNATE = 1 +WINDING = 2 + +; Background modes + +TRANSPARENT = 1 +OPAQUE = 2 + +; Point types + +PT_CLOSEFIGURE = 1 +PT_LINETO = 2 +PT_BEZIERTO = 4 +PT_MOVETO = 6 + +; Mapping modes + +MM_TEXT = 1 +MM_LOMETRIC = 2 +MM_HIMETRIC = 3 +MM_LOENGLISH = 4 +MM_HIENGLISH = 5 +MM_TWIPS = 6 +MM_ISOTROPIC = 7 +MM_ANISOTROPIC = 8 + +; Coordinate modes + +ABSOLUTE = 1 +RELATIVE = 2 + +; Stock logical objects + +WHITE_BRUSH = 0 +LTGRAY_BRUSH = 1 +GRAY_BRUSH = 2 +DKGRAY_BRUSH = 3 +BLACK_BRUSH = 4 +NULL_BRUSH = 5 +HOLLOW_BRUSH = NULL_BRUSH +WHITE_PEN = 6 +BLACK_PEN = 7 +NULL_PEN = 8 +OEM_FIXED_FONT = 10 +ANSI_FIXED_FONT = 11 +ANSI_VAR_FONT = 12 +SYSTEM_FONT = 13 +DEVICE_DEFAULT_FONT = 14 +DEFAULT_PALETTE = 15 +SYSTEM_FIXED_FONT = 16 +DEFAULT_GUI_FONT = 17 + +; Brush styles + +BS_SOLID = 0 +BS_NULL = 1 +BS_HOLLOW = BS_NULL +BS_HATCHED = 2 +BS_PATTERN = 3 +BS_INDEXED = 4 +BS_DIBPATTERN = 5 +BS_DIBPATTERNPT = 6 +BS_PATTERN8X8 = 7 +BS_DIBPATTERN8X8 = 8 +BS_MONOPATTERN = 9 + +; Hatch styles + +HS_HORIZONTAL = 0 +HS_VERTICAL = 1 +HS_FDIAGONAL = 2 +HS_BDIAGONAL = 3 +HS_CROSS = 4 +HS_DIAGCROSS = 5 + +; Pen styles + +PS_SOLID = 0 +PS_DASH = 1 +PS_DOT = 2 +PS_DASHDOT = 3 +PS_DASHDOTDOT = 4 +PS_NULL = 5 +PS_INSIDEFRAME = 6 +PS_USERSTYLE = 7 +PS_ALTERNATE = 8 +PS_ENDCAP_ROUND = 0 +PS_ENDCAP_SQUARE = 100h +PS_ENDCAP_FLAT = 200h +PS_JOIN_ROUND = 0 +PS_JOIN_BEVEL = 1000h +PS_JOIN_MITER = 2000h +PS_COSMETIC = 0 +PS_GEOMETRIC = 010000h + +; Arc directions + +AD_COUNTERCLOCKWISE = 1 +AD_CLOCKWISE = 2 + +; Text alignment options + +TA_NOUPDATECP = 0 +TA_UPDATECP = 1 +TA_LEFT = 0 +TA_RIGHT = 2 +TA_CENTER = 6 +TA_TOP = 0 +TA_BOTTOM = 8 +TA_BASELINE = 24 +TA_RTLREADING = 100h +VTA_BASELINE = TA_BASELINE +VTA_LEFT = TA_BOTTOM +VTA_RIGHT = TA_TOP +VTA_CENTER = TA_CENTER +VTA_BOTTOM = TA_RIGHT +VTA_TOP = TA_LEFT + +; ExtTextOut options + +ETO_OPAQUE = 0002h +ETO_CLIPPED = 0004h +ETO_GLYPH_INDEX = 0010h +ETO_RTLREADING = 0080h +ETO_IGNORELANGUAGE = 1000h + +; Bitmap compression types + +BI_RGB = 0 +BI_RLE8 = 1 +BI_RLE4 = 2 +BI_BITFIELDS = 3 + +; tmPitchAndFamily flags + +TMPF_FIXED_PITCH = 1 +TMPF_VECTOR = 2 +TMPF_TRUETYPE = 4 +TMPF_DEVICE = 8 + +; Font output precision values + +OUT_DEFAULT_PRECIS = 0 +OUT_STRING_PRECIS = 1 +OUT_CHARACTER_PRECIS = 2 +OUT_STROKE_PRECIS = 3 +OUT_TT_PRECIS = 4 +OUT_DEVICE_PRECIS = 5 +OUT_RASTER_PRECIS = 6 +OUT_TT_ONLY_PRECIS = 7 +OUT_OUTLINE_PRECIS = 8 +OUT_SCREEN_OUTLINE_PRECIS = 9 + +; Font clipping precision values + +CLIP_DEFAULT_PRECIS = 0 +CLIP_CHARACTER_PRECIS = 1 +CLIP_STROKE_PRECIS = 2 +CLIP_LH_ANGLES = 10h +CLIP_TT_ALWAYS = 20h +CLIP_EMBEDDED = 80h + +; Font output quality values + +DEFAULT_QUALITY = 0 +DRAFT_QUALITY = 1 +PROOF_QUALITY = 2 +NONANTIALIASED_QUALITY = 3 +ANTIALIASED_QUALITY = 4 + +; Font pitch values + +DEFAULT_PITCH = 0 +FIXED_PITCH = 1 +VARIABLE_PITCH = 2 +MONO_FONT = 8 + +; Font families + +FF_DONTCARE = 00h +FF_ROMAN = 10h +FF_SWISS = 20h +FF_MODERN = 30h +FF_SCRIPT = 40h +FF_DECORATIVE = 50h + +; Font weights + +FW_DONTCARE = 0 +FW_THIN = 100 +FW_EXTRALIGHT = 200 +FW_LIGHT = 300 +FW_NORMAL = 400 +FW_MEDIUM = 500 +FW_SEMIBOLD = 600 +FW_BOLD = 700 +FW_EXTRABOLD = 800 +FW_HEAVY = 900 +FW_ULTRALIGHT = FW_EXTRALIGHT +FW_REGULAR = FW_NORMAL +FW_DEMIBOLD = FW_SEMIBOLD +FW_ULTRABOLD = FW_EXTRABOLD +FW_BLACK = FW_HEAVY + +; Character set values + +ANSI_CHARSET = 0 +DEFAULT_CHARSET = 1 +SYMBOL_CHARSET = 2 +SHIFTJIS_CHARSET = 128 +HANGEUL_CHARSET = 129 +GB2312_CHARSET = 134 +CHINESEBIG5_CHARSET = 136 +OEM_CHARSET = 255 +JOHAB_CHARSET = 130 +HEBREW_CHARSET = 177 +ARABIC_CHARSET = 178 +GREEK_CHARSET = 161 +TURKISH_CHARSET = 162 +VIETNAMESE_CHARSET = 163 +THAI_CHARSET = 222 +EASTEUROPE_CHARSET = 238 +RUSSIAN_CHARSET = 204 +MAC_CHARSET = 77 +BALTIC_CHARSET = 186 + +; Pixel format constants + +PFD_TYPE_RGBA = 0 +PFD_TYPE_COLORINDEX = 1 +PFD_MAIN_PLANE = 0 +PFD_OVERLAY_PLANE = 1 +PFD_UNDERLAY_PLANE = -1 +PFD_DOUBLEBUFFER = 1 +PFD_STEREO = 2 +PFD_DRAW_TO_WINDOW = 4 +PFD_DRAW_TO_BITMAP = 8 +PFD_SUPPORT_GDI = 10h +PFD_SUPPORT_OPENGL = 20h +PFD_GENERIC_FORMAT = 40h +PFD_NEED_PALETTE = 80h +PFD_NEED_SYSTEM_PALETTE = 100h +PFD_SWAP_EXCHANGE = 200h +PFD_SWAP_COPY = 400h +PFD_SWAP_LAYER_BUFFERS = 800h +PFD_GENERIC_ACCELERATED = 1000h +PFD_DEPTH_DONTCARE = 20000000h +PFD_DOUBLEBUFFER_DONTCARE = 40000000h +PFD_STEREO_DONTCARE = 80000000h diff --git a/asm/equihash/Windows/INCLUDE/EQUATES/KERNEL32.INC b/asm/equihash/Windows/INCLUDE/EQUATES/KERNEL32.INC new file mode 100644 index 0000000..40b3569 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/EQUATES/KERNEL32.INC @@ -0,0 +1,812 @@ + +; KERNEL32.DLL structures and constants + +struct SYSTEM_INFO + wProcessorArchitecture dw ? + wReserved dw ? + dwPageSize dd ? + lpMinimumApplicationAddress dd ? + lpMaximumApplicationAddress dd ? + dwActiveProcessorMask dd ? + dwNumberOfProcessors dd ? + dwProcessorType dd ? + dwAllocationGranularity dd ? + wProcessorLevel dw ? + wProcessorRevision dw ? +ends + +struct OSVERSIONINFO + dwOSVersionInfoSize dd ? + dwMajorVersion dd ? + dwMinorVersion dd ? + dwBuildNumber dd ? + dwPlatformId dd ? + szCSDVersion TCHAR 128 dup (?) +ends + +struct OSVERSIONINFOA + dwOSVersionInfoSize dd ? + dwMajorVersion dd ? + dwMinorVersion dd ? + dwBuildNumber dd ? + dwPlatformId dd ? + szCSDVersion db 128 dup (?) +ends + +struct OSVERSIONINFOW + dwOSVersionInfoSize dd ? + dwMajorVersion dd ? + dwMinorVersion dd ? + dwBuildNumber dd ? + dwPlatformId dd ? + szCSDVersion du 128 dup (?) +ends + +struct MEMORYSTATUS + dwLength dd ? + dwMemoryLoad dd ? + dwTotalPhys dd ? + dwAvailPhys dd ? + dwTotalPageFile dd ? + dwAvailPageFile dd ? + dwTotalVirtual dd ? + dwAvailVirtual dd ? +ends + +struct STARTUPINFO + cb dd ? + lpReserved dd ? + lpDesktop dd ? + lpTitle dd ? + dwX dd ? + dwY dd ? + dwXSize dd ? + dwYSize dd ? + dwXCountChars dd ? + dwYCountChars dd ? + dwFillAttribute dd ? + dwFlags dd ? + wShowWindow dw ? + cbReserved2 dw ? + lpReserved2 dd ? + hStdInput dd ? + hStdOutput dd ? + hStdError dd ? +ends + +struct PROCESS_INFORMATION + hProcess dd ? + hThread dd ? + dwProcessId dd ? + dwThreadId dd ? +ends + +struct FILETIME + dwLowDateTime dd ? + dwHighDateTime dd ? +ends + +struct SYSTEMTIME + wYear dw ? + wMonth dw ? + wDayOfWeek dw ? + wDay dw ? + wHour dw ? + wMinute dw ? + wSecond dw ? + wMilliseconds dw ? +ends + +struct BY_HANDLE_FILE_INFORMATION + dwFileAttributes dd ? + ftCreationTime FILETIME + ftLastAccessTime FILETIME + ftLastWriteTime FILETIME + dwVolumeSerialNumber dd ? + nFileSizeHigh dd ? + nFileSizeLow dd ? + nNumberOfLinks dd ? + nFileIndexHigh dd ? + nFileIndexLow dd ? +ends + +struct WIN32_FIND_DATA + dwFileAttributes dd ? + ftCreationTime FILETIME + ftLastAccessTime FILETIME + ftLastWriteTime FILETIME + nFileSizeHigh dd ? + nFileSizeLow dd ? + dwReserved0 dd ? + dwReserved1 dd ? + cFileName TCHAR MAX_PATH dup (?) + cAlternateFileName TCHAR 14 dup (?) +ends + +struct WIN32_FIND_DATAA + dwFileAttributes dd ? + ftCreationTime FILETIME + ftLastAccessTime FILETIME + ftLastWriteTime FILETIME + nFileSizeHigh dd ? + nFileSizeLow dd ? + dwReserved0 dd ? + dwReserved1 dd ? + cFileName db MAX_PATH dup (?) + cAlternateFileName db 14 dup (?) +ends + +struct WIN32_FIND_DATAW + dwFileAttributes dd ? + ftCreationTime FILETIME + ftLastAccessTime FILETIME + ftLastWriteTime FILETIME + nFileSizeHigh dd ? + nFileSizeLow dd ? + dwReserved0 dd ? + dwReserved1 dd ? + cFileName du MAX_PATH dup (?) + cAlternateFileName du 14 dup (?) +ends + +; General constants + +NULL = 0 +TRUE = 1 +FALSE = 0 + +; Maximum path length in characters + +MAX_PATH = 260 + +; Access rights + +DELETE_RIGHT = 00010000h +READ_CONTROL = 00020000h +WRITE_DAC = 00040000h +WRITE_OWNER = 00080000h +SYNCHRONIZE = 00100000h +STANDARD_RIGHTS_READ = READ_CONTROL +STANDARD_RIGHTS_WRITE = READ_CONTROL +STANDARD_RIGHTS_EXECUTE = READ_CONTROL +STANDARD_RIGHTS_REQUIRED = 000F0000h +STANDARD_RIGHTS_ALL = 001F0000h +SPECIFIC_RIGHTS_ALL = 0000FFFFh +ACCESS_SYSTEM_SECURITY = 01000000h +MAXIMUM_ALLOWED = 02000000h +GENERIC_READ = 80000000h +GENERIC_WRITE = 40000000h +GENERIC_EXECUTE = 20000000h +GENERIC_ALL = 10000000h +PROCESS_TERMINATE = 00000001h +PROCESS_CREATE_THREAD = 00000002h +PROCESS_VM_OPERATION = 00000008h +PROCESS_VM_READ = 00000010h +PROCESS_VM_WRITE = 00000020h +PROCESS_DUP_HANDLE = 00000040h +PROCESS_CREATE_PROCESS = 00000080h +PROCESS_SET_QUOTA = 00000100h +PROCESS_SET_INFORMATION = 00000200h +PROCESS_QUERY_INFORMATION = 00000400h +PROCESS_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or 0FFFh +FILE_SHARE_READ = 00000001h +FILE_SHARE_WRITE = 00000002h +FILE_SHARE_DELETE = 00000004h + +; CreateFile actions + +CREATE_NEW = 1 +CREATE_ALWAYS = 2 +OPEN_EXISTING = 3 +OPEN_ALWAYS = 4 +TRUNCATE_EXISTING = 5 + +; OpenFile modes + +OF_READ = 0000h +OF_WRITE = 0001h +OF_READWRITE = 0002h +OF_SHARE_COMPAT = 0000h +OF_SHARE_EXCLUSIVE = 0010h +OF_SHARE_DENY_WRITE = 0020h +OF_SHARE_DENY_READ = 0030h +OF_SHARE_DENY_NONE = 0040h +OF_PARSE = 0100h +OF_DELETE = 0200h +OF_VERIFY = 0400h +OF_CANCEL = 0800h +OF_CREATE = 1000h +OF_PROMPT = 2000h +OF_EXIST = 4000h +OF_REOPEN = 8000h + +; SetFilePointer methods + +FILE_BEGIN = 0 +FILE_CURRENT = 1 +FILE_END = 2 + +; File attributes + +FILE_ATTRIBUTE_READONLY = 001h +FILE_ATTRIBUTE_HIDDEN = 002h +FILE_ATTRIBUTE_SYSTEM = 004h +FILE_ATTRIBUTE_DIRECTORY = 010h +FILE_ATTRIBUTE_ARCHIVE = 020h +FILE_ATTRIBUTE_NORMAL = 080h +FILE_ATTRIBUTE_TEMPORARY = 100h +FILE_ATTRIBUTE_COMPRESSED = 800h + +; File flags + +FILE_FLAG_WRITE_THROUGH = 80000000h +FILE_FLAG_OVERLAPPED = 40000000h +FILE_FLAG_NO_BUFFERING = 20000000h +FILE_FLAG_RANDOM_ACCESS = 10000000h +FILE_FLAG_SEQUENTIAL_SCAN = 08000000h +FILE_FLAG_DELETE_ON_CLOSE = 04000000h +FILE_FLAG_BACKUP_SEMANTICS = 02000000h +FILE_FLAG_POSIX_SEMANTICS = 01000000h + +; Notify filters + +FILE_NOTIFY_CHANGE_FILE_NAME = 001h +FILE_NOTIFY_CHANGE_DIR_NAME = 002h +FILE_NOTIFY_CHANGE_ATTRIBUTES = 004h +FILE_NOTIFY_CHANGE_SIZE = 008h +FILE_NOTIFY_CHANGE_LAST_WRITE = 010h +FILE_NOTIFY_CHANGE_SECURITY = 100h + +; File types + +FILE_TYPE_UNKNOWN = 0 +FILE_TYPE_DISK = 1 +FILE_TYPE_CHAR = 2 +FILE_TYPE_PIPE = 3 +FILE_TYPE_REMOTE = 8000h + +; LockFileEx flags + +LOCKFILE_FAIL_IMMEDIATELY = 1 +LOCKFILE_EXCLUSIVE_LOCK = 2 + +; MoveFileEx flags + +MOVEFILE_REPLACE_EXISTING = 1 +MOVEFILE_COPY_ALLOWED = 2 +MOVEFILE_DELAY_UNTIL_REBOOT = 4 +MOVEFILE_WRITE_THROUGH = 8 + +; FindFirstFileEx flags + +FIND_FIRST_EX_CASE_SENSITIVE = 1 + +; Device handles + +INVALID_HANDLE_VALUE = -1 +STD_INPUT_HANDLE = -10 +STD_OUTPUT_HANDLE = -11 +STD_ERROR_HANDLE = -12 + +; DuplicateHandle options + +DUPLICATE_CLOSE_SOURCE = 1 +DUPLICATE_SAME_ACCESS = 2 + +; File mapping acccess rights + +SECTION_QUERY = 01h +SECTION_MAP_WRITE = 02h +SECTION_MAP_READ = 04h +SECTION_MAP_EXECUTE = 08h +SECTION_EXTEND_SIZE = 10h +SECTION_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SECTION_QUERY or SECTION_MAP_WRITE or SECTION_MAP_READ or SECTION_MAP_EXECUTE or SECTION_EXTEND_SIZE +FILE_MAP_COPY = SECTION_QUERY +FILE_MAP_WRITE = SECTION_MAP_WRITE +FILE_MAP_READ = SECTION_MAP_READ +FILE_MAP_ALL_ACCESS = SECTION_ALL_ACCESS + +; File system flags + +FILE_CASE_SENSITIVE_SEARCH = 0001h +FILE_CASE_PRESERVED_NAMES = 0002h +FILE_UNICODE_ON_DISK = 0004h +FILE_PERSISTENT_ACLS = 0008h +FILE_FILE_COMPRESSION = 0010h +FILE_VOLUME_IS_COMPRESSED = 8000h +FS_CASE_IS_PRESERVED = FILE_CASE_PRESERVED_NAMES +FS_CASE_SENSITIVE = FILE_CASE_SENSITIVE_SEARCH +FS_UNICODE_STORED_ON_DISK = FILE_UNICODE_ON_DISK +FS_PERSISTENT_ACLS = FILE_PERSISTENT_ACLS + +; Drive types + +DRIVE_UNKNOWN = 0 +DRIVE_NO_ROOT_DIR = 1 +DRIVE_REMOVABLE = 2 +DRIVE_FIXED = 3 +DRIVE_REMOTE = 4 +DRIVE_CDROM = 5 +DRIVE_RAMDISK = 6 + +; Pipe modes + +PIPE_ACCESS_INBOUND = 1 +PIPE_ACCESS_OUTBOUND = 2 +PIPE_ACCESS_DUPLEX = 3 +PIPE_CLIENT_END = 0 +PIPE_SERVER_END = 1 +PIPE_WAIT = 0 +PIPE_NOWAIT = 1 +PIPE_READMODE_BYTE = 0 +PIPE_READMODE_MESSAGE = 2 +PIPE_TYPE_BYTE = 0 +PIPE_TYPE_MESSAGE = 4 +PIPE_UNLIMITED_INSTANCES = 255 + +; Global memory flags + +GMEM_FIXED = 0000h +GMEM_MOVEABLE = 0002h +GMEM_NOCOMPACT = 0010h +GMEM_NODISCARD = 0020h +GMEM_ZEROINIT = 0040h +GMEM_MODIFY = 0080h +GMEM_DISCARDABLE = 0100h +GMEM_NOT_BANKED = 1000h +GMEM_SHARE = 2000h +GMEM_DDESHARE = 2000h +GMEM_NOTIFY = 4000h +GMEM_LOWER = GMEM_NOT_BANKED +GMEM_VALID_FLAGS = 7F72h +GMEM_INVALID_HANDLE = 8000h +GMEM_DISCARDED = 4000h +GMEM_LOCKCOUNT = 0FFh +GHND = GMEM_MOVEABLE + GMEM_ZEROINIT +GPTR = GMEM_FIXED + GMEM_ZEROINIT + +; Local memory flags + +LMEM_FIXED = 0000h +LMEM_MOVEABLE = 0002h +LMEM_NOCOMPACT = 0010h +LMEM_NODISCARD = 0020h +LMEM_ZEROINIT = 0040h +LMEM_MODIFY = 0080h +LMEM_DISCARDABLE = 0F00h +LMEM_VALID_FLAGS = 0F72h +LMEM_INVALID_HANDLE = 8000h +LHND = LMEM_MOVEABLE + LMEM_ZEROINIT +LPTR = LMEM_FIXED + LMEM_ZEROINIT +LMEM_DISCARDED = 4000h +LMEM_LOCKCOUNT = 00FFh + +; Page access flags + +PAGE_NOACCESS = 001h +PAGE_READONLY = 002h +PAGE_READWRITE = 004h +PAGE_WRITECOPY = 008h +PAGE_EXECUTE = 010h +PAGE_EXECUTE_READ = 020h +PAGE_EXECUTE_READWRITE = 040h +PAGE_EXECUTE_WRITECOPY = 080h +PAGE_GUARD = 100h +PAGE_NOCACHE = 200h + +; Memory allocation flags + +MEM_COMMIT = 001000h +MEM_RESERVE = 002000h +MEM_DECOMMIT = 004000h +MEM_RELEASE = 008000h +MEM_FREE = 010000h +MEM_PRIVATE = 020000h +MEM_MAPPED = 040000h +MEM_RESET = 080000h +MEM_TOP_DOWN = 100000h + +; Heap allocation flags + +HEAP_NO_SERIALIZE = 1 +HEAP_GENERATE_EXCEPTIONS = 4 +HEAP_ZERO_MEMORY = 8 + +; Platform identifiers + +VER_PLATFORM_WIN32s = 0 +VER_PLATFORM_WIN32_WINDOWS = 1 +VER_PLATFORM_WIN32_NT = 2 + +; GetBinaryType return values + +SCS_32BIT_BINARY = 0 +SCS_DOS_BINARY = 1 +SCS_WOW_BINARY = 2 +SCS_PIF_BINARY = 3 +SCS_POSIX_BINARY = 4 +SCS_OS216_BINARY = 5 + +; CreateProcess flags + +DEBUG_PROCESS = 001h +DEBUG_ONLY_THIS_PROCESS = 002h +CREATE_SUSPENDED = 004h +DETACHED_PROCESS = 008h +CREATE_NEW_CONSOLE = 010h +NORMAL_PRIORITY_CLASS = 020h +IDLE_PRIORITY_CLASS = 040h +HIGH_PRIORITY_CLASS = 080h +REALTIME_PRIORITY_CLASS = 100h +CREATE_NEW_PROCESS_GROUP = 200h +CREATE_SEPARATE_WOW_VDM = 800h + +; Thread priority values + +THREAD_BASE_PRIORITY_MIN = -2 +THREAD_BASE_PRIORITY_MAX = 2 +THREAD_BASE_PRIORITY_LOWRT = 15 +THREAD_BASE_PRIORITY_IDLE = -15 +THREAD_PRIORITY_LOWEST = THREAD_BASE_PRIORITY_MIN +THREAD_PRIORITY_BELOW_NORMAL = THREAD_PRIORITY_LOWEST + 1 +THREAD_PRIORITY_NORMAL = 0 +THREAD_PRIORITY_HIGHEST = THREAD_BASE_PRIORITY_MAX +THREAD_PRIORITY_ABOVE_NORMAL = THREAD_PRIORITY_HIGHEST - 1 +THREAD_PRIORITY_ERROR_RETURN = 7FFFFFFFh +THREAD_PRIORITY_TIME_CRITICAL = THREAD_BASE_PRIORITY_LOWRT +THREAD_PRIORITY_IDLE = THREAD_BASE_PRIORITY_IDLE + +; Startup flags + +STARTF_USESHOWWINDOW = 001h +STARTF_USESIZE = 002h +STARTF_USEPOSITION = 004h +STARTF_USECOUNTCHARS = 008h +STARTF_USEFILLATTRIBUTE = 010h +STARTF_RUNFULLSCREEN = 020h +STARTF_FORCEONFEEDBACK = 040h +STARTF_FORCEOFFFEEDBACK = 080h +STARTF_USESTDHANDLES = 100h + +; Shutdown flags + +SHUTDOWN_NORETRY = 1h + +; LoadLibraryEx flags + +DONT_RESOLVE_DLL_REFERENCES = 1 +LOAD_LIBRARY_AS_DATAFILE = 2 +LOAD_WITH_ALTERED_SEARCH_PATH = 8 + +; DLL entry-point calls + +DLL_PROCESS_DETACH = 0 +DLL_PROCESS_ATTACH = 1 +DLL_THREAD_ATTACH = 2 +DLL_THREAD_DETACH = 3 + +; Status codes + +STATUS_WAIT_0 = 000000000h +STATUS_ABANDONED_WAIT_0 = 000000080h +STATUS_USER_APC = 0000000C0h +STATUS_TIMEOUT = 000000102h +STATUS_PENDING = 000000103h +STATUS_DATATYPE_MISALIGNMENT = 080000002h +STATUS_BREAKPOINT = 080000003h +STATUS_SINGLE_STEP = 080000004h +STATUS_ACCESS_VIOLATION = 0C0000005h +STATUS_IN_PAGE_ERROR = 0C0000006h +STATUS_NO_MEMORY = 0C0000017h +STATUS_ILLEGAL_INSTRUCTION = 0C000001Dh +STATUS_NONCONTINUABLE_EXCEPTION = 0C0000025h +STATUS_INVALID_DISPOSITION = 0C0000026h +STATUS_ARRAY_BOUNDS_EXCEEDED = 0C000008Ch +STATUS_FLOAT_DENORMAL_OPERAND = 0C000008Dh +STATUS_FLOAT_DIVIDE_BY_ZERO = 0C000008Eh +STATUS_FLOAT_INEXACT_RESULT = 0C000008Fh +STATUS_FLOAT_INVALID_OPERATION = 0C0000090h +STATUS_FLOAT_OVERFLOW = 0C0000091h +STATUS_FLOAT_STACK_CHECK = 0C0000092h +STATUS_FLOAT_UNDERFLOW = 0C0000093h +STATUS_INTEGER_DIVIDE_BY_ZERO = 0C0000094h +STATUS_INTEGER_OVERFLOW = 0C0000095h +STATUS_PRIVILEGED_INSTRUCTION = 0C0000096h +STATUS_STACK_OVERFLOW = 0C00000FDh +STATUS_CONTROL_C_EXIT = 0C000013Ah +WAIT_FAILED = -1 +WAIT_OBJECT_0 = STATUS_WAIT_0 +WAIT_ABANDONED = STATUS_ABANDONED_WAIT_0 +WAIT_ABANDONED_0 = STATUS_ABANDONED_WAIT_0 +WAIT_TIMEOUT = STATUS_TIMEOUT +WAIT_IO_COMPLETION = STATUS_USER_APC +STILL_ACTIVE = STATUS_PENDING + +; Exception codes + +EXCEPTION_CONTINUABLE = 0 +EXCEPTION_NONCONTINUABLE = 1 +EXCEPTION_ACCESS_VIOLATION = STATUS_ACCESS_VIOLATION +EXCEPTION_DATATYPE_MISALIGNMENT = STATUS_DATATYPE_MISALIGNMENT +EXCEPTION_BREAKPOINT = STATUS_BREAKPOINT +EXCEPTION_SINGLE_STEP = STATUS_SINGLE_STEP +EXCEPTION_ARRAY_BOUNDS_EXCEEDED = STATUS_ARRAY_BOUNDS_EXCEEDED +EXCEPTION_FLT_DENORMAL_OPERAND = STATUS_FLOAT_DENORMAL_OPERAND +EXCEPTION_FLT_DIVIDE_BY_ZERO = STATUS_FLOAT_DIVIDE_BY_ZERO +EXCEPTION_FLT_INEXACT_RESULT = STATUS_FLOAT_INEXACT_RESULT +EXCEPTION_FLT_INVALID_OPERATION = STATUS_FLOAT_INVALID_OPERATION +EXCEPTION_FLT_OVERFLOW = STATUS_FLOAT_OVERFLOW +EXCEPTION_FLT_STACK_CHECK = STATUS_FLOAT_STACK_CHECK +EXCEPTION_FLT_UNDERFLOW = STATUS_FLOAT_UNDERFLOW +EXCEPTION_INT_DIVIDE_BY_ZERO = STATUS_INTEGER_DIVIDE_BY_ZERO +EXCEPTION_INT_OVERFLOW = STATUS_INTEGER_OVERFLOW +EXCEPTION_ILLEGAL_INSTRUCTION = STATUS_ILLEGAL_INSTRUCTION +EXCEPTION_PRIV_INSTRUCTION = STATUS_PRIVILEGED_INSTRUCTION +EXCEPTION_IN_PAGE_ERROR = STATUS_IN_PAGE_ERROR + +; Registry options + +REG_OPTION_RESERVED = 0 +REG_OPTION_NON_VOLATILE = 0 +REG_OPTION_VOLATILE = 1 +REG_OPTION_CREATE_LINK = 2 +REG_OPTION_BACKUP_RESTORE = 4 +REG_CREATED_NEW_KEY = 1 +REG_OPENED_EXISTING_KEY = 2 +REG_WHOLE_HIVE_VOLATILE = 1 +REG_REFRESH_HIVE = 2 +REG_NOTIFY_CHANGE_NAME = 1 +REG_NOTIFY_CHANGE_ATTRIBUTES = 2 +REG_NOTIFY_CHANGE_LAST_SET = 4 +REG_NOTIFY_CHANGE_SECURITY = 8 +REG_LEGAL_CHANGE_FILTER = REG_NOTIFY_CHANGE_NAME or REG_NOTIFY_CHANGE_ATTRIBUTES or REG_NOTIFY_CHANGE_LAST_SET or REG_NOTIFY_CHANGE_SECURITY +REG_LEGAL_OPTION = REG_OPTION_RESERVED or REG_OPTION_NON_VOLATILE or REG_OPTION_VOLATILE or REG_OPTION_CREATE_LINK or REG_OPTION_BACKUP_RESTORE +REG_NONE = 0 +REG_SZ = 1 +REG_EXPAND_SZ = 2 +REG_BINARY = 3 +REG_DWORD = 4 +REG_DWORD_LITTLE_ENDIAN = 4 +REG_DWORD_BIG_ENDIAN = 5 +REG_LINK = 6 +REG_MULTI_SZ = 7 +REG_RESOURCE_LIST = 8 +REG_FULL_RESOURCE_DESCRIPTOR = 9 +REG_RESOURCE_REQUIREMENTS_LIST = 10 + +; Registry access modes + +KEY_QUERY_VALUE = 1 +KEY_SET_VALUE = 2 +KEY_CREATE_SUB_KEY = 4 +KEY_ENUMERATE_SUB_KEYS = 8 +KEY_NOTIFY = 10h +KEY_CREATE_LINK = 20h +KEY_READ = STANDARD_RIGHTS_READ or KEY_QUERY_VALUE or KEY_ENUMERATE_SUB_KEYS or KEY_NOTIFY and not SYNCHRONIZE +KEY_WRITE = STANDARD_RIGHTS_WRITE or KEY_SET_VALUE or KEY_CREATE_SUB_KEY and not SYNCHRONIZE +KEY_EXECUTE = KEY_READ +KEY_ALL_ACCESS = STANDARD_RIGHTS_ALL or KEY_QUERY_VALUE or KEY_SET_VALUE or KEY_CREATE_SUB_KEY or KEY_ENUMERATE_SUB_KEYS or KEY_NOTIFY or KEY_CREATE_LINK and not SYNCHRONIZE + +; Predefined registry keys + +HKEY_CLASSES_ROOT = 80000000h +HKEY_CURRENT_USER = 80000001h +HKEY_LOCAL_MACHINE = 80000002h +HKEY_USERS = 80000003h +HKEY_PERFORMANCE_DATA = 80000004h +HKEY_CURRENT_CONFIG = 80000005h +HKEY_DYN_DATA = 80000006h + +; FormatMessage flags + +FORMAT_MESSAGE_ALLOCATE_BUFFER = 0100h +FORMAT_MESSAGE_IGNORE_INSERTS = 0200h +FORMAT_MESSAGE_FROM_STRING = 0400h +FORMAT_MESSAGE_FROM_HMODULE = 0800h +FORMAT_MESSAGE_FROM_SYSTEM = 1000h +FORMAT_MESSAGE_ARGUMENT_ARRAY = 2000h +FORMAT_MESSAGE_MAX_WIDTH_MASK = 00FFh + +; Language identifiers + +LANG_NEUTRAL = 00h +LANG_BULGARIAN = 02h +LANG_CHINESE = 04h +LANG_CROATIAN = 1Ah +LANG_CZECH = 05h +LANG_DANISH = 06h +LANG_DUTCH = 13h +LANG_ENGLISH = 09h +LANG_FINNISH = 0Bh +LANG_FRENCH = 0Ch +LANG_GERMAN = 07h +LANG_GREEK = 08h +LANG_HUNGARIAN = 0Eh +LANG_ICELANDIC = 0Fh +LANG_ITALIAN = 10h +LANG_JAPANESE = 11h +LANG_KOREAN = 12h +LANG_NORWEGIAN = 14h +LANG_POLISH = 15h +LANG_PORTUGUESE = 16h +LANG_ROMANIAN = 18h +LANG_RUSSIAN = 19h +LANG_SLOVAK = 1Bh +LANG_SLOVENIAN = 24h +LANG_SPANISH = 0Ah +LANG_SWEDISH = 1Dh +LANG_THAI = 1Eh +LANG_TURKISH = 1Fh + +; Sublanguage identifiers + +SUBLANG_NEUTRAL = 00h shl 10 +SUBLANG_DEFAULT = 01h shl 10 +SUBLANG_SYS_DEFAULT = 02h shl 10 +SUBLANG_CHINESE_TRADITIONAL = 01h shl 10 +SUBLANG_CHINESE_SIMPLIFIED = 02h shl 10 +SUBLANG_CHINESE_HONGKONG = 03h shl 10 +SUBLANG_CHINESE_SINGAPORE = 04h shl 10 +SUBLANG_DUTCH = 01h shl 10 +SUBLANG_DUTCH_BELGIAN = 02h shl 10 +SUBLANG_ENGLISH_US = 01h shl 10 +SUBLANG_ENGLISH_UK = 02h shl 10 +SUBLANG_ENGLISH_AUS = 03h shl 10 +SUBLANG_ENGLISH_CAN = 04h shl 10 +SUBLANG_ENGLISH_NZ = 05h shl 10 +SUBLANG_ENGLISH_EIRE = 06h shl 10 +SUBLANG_FRENCH = 01h shl 10 +SUBLANG_FRENCH_BELGIAN = 02h shl 10 +SUBLANG_FRENCH_CANADIAN = 03h shl 10 +SUBLANG_FRENCH_SWISS = 04h shl 10 +SUBLANG_GERMAN = 01h shl 10 +SUBLANG_GERMAN_SWISS = 02h shl 10 +SUBLANG_GERMAN_AUSTRIAN = 03h shl 10 +SUBLANG_ITALIAN = 01h shl 10 +SUBLANG_ITALIAN_SWISS = 02h shl 10 +SUBLANG_NORWEGIAN_BOKMAL = 01h shl 10 +SUBLANG_NORWEGIAN_NYNORSK = 02h shl 10 +SUBLANG_PORTUGUESE = 02h shl 10 +SUBLANG_PORTUGUESE_BRAZILIAN = 01h shl 10 +SUBLANG_SPANISH = 01h shl 10 +SUBLANG_SPANISH_MEXICAN = 02h shl 10 +SUBLANG_SPANISH_MODERN = 03h shl 10 + +; Sorting identifiers + +SORT_DEFAULT = 0 shl 16 +SORT_JAPANESE_XJIS = 0 shl 16 +SORT_JAPANESE_UNICODE = 1 shl 16 +SORT_CHINESE_BIG5 = 0 shl 16 +SORT_CHINESE_PRCP = 0 shl 16 +SORT_CHINESE_UNICODE = 1 shl 16 +SORT_CHINESE_PRC = 2 shl 16 +SORT_CHINESE_BOPOMOFO = 3 shl 16 +SORT_KOREAN_KSC = 0 shl 16 +SORT_KOREAN_UNICODE = 1 shl 16 +SORT_GERMAN_PHONE_BOOK = 1 shl 16 +SORT_HUNGARIAN_DEFAULT = 0 shl 16 +SORT_HUNGARIAN_TECHNICAL = 1 shl 16 + +; Code pages + +CP_ACP = 0 ; default to ANSI code page +CP_OEMCP = 1 ; default to OEM code page +CP_MACCP = 2 ; default to MAC code page +CP_THREAD_ACP = 3 ; current thread's ANSI code page +CP_SYMBOL = 42 ; SYMBOL translations +CP_UTF7 = 65000 ; UTF-7 translation +CP_UTF8 = 65001 ; UTF-8 translation + +; Resource types + +RT_CURSOR = 1 +RT_BITMAP = 2 +RT_ICON = 3 +RT_MENU = 4 +RT_DIALOG = 5 +RT_STRING = 6 +RT_FONTDIR = 7 +RT_FONT = 8 +RT_ACCELERATOR = 9 +RT_RCDATA = 10 +RT_MESSAGETABLE = 11 +RT_GROUP_CURSOR = 12 +RT_GROUP_ICON = 14 +RT_VERSION = 16 +RT_DLGINCLUDE = 17 +RT_PLUGPLAY = 19 +RT_VXD = 20 +RT_ANICURSOR = 21 +RT_ANIICON = 22 +RT_HTML = 23 +RT_MANIFEST = 24 + +; Clipboard formats + +CF_TEXT = 001h +CF_BITMAP = 002h +CF_METAFILEPICT = 003h +CF_SYLK = 004h +CF_DIF = 005h +CF_TIFF = 006h +CF_OEMTEXT = 007h +CF_DIB = 008h +CF_PALETTE = 009h +CF_PENDATA = 00Ah +CF_RIFF = 00Bh +CF_WAVE = 00Ch +CF_UNICODETEXT = 00Dh +CF_ENHMETAFILE = 00Eh +CF_HDROP = 00Fh +CF_LOCALE = 010h +CF_OWNERDISPLAY = 080h +CF_DSPTEXT = 081h +CF_DSPBITMAP = 082h +CF_DSPMETAFILEPICT = 083h +CF_DSPENHMETAFILE = 08Eh +CF_PRIVATEFIRST = 200h +CF_PRIVATELAST = 2FFh +CF_GDIOBJFIRST = 300h +CF_GDIOBJLAST = 3FFh + +; OS types for version info + +VOS_UNKNOWN = 00000000h +VOS_DOS = 00010000h +VOS_OS216 = 00020000h +VOS_OS232 = 00030000h +VOS_NT = 00040000h +VOS__BASE = 00000000h +VOS__WINDOWS16 = 00000001h +VOS__PM16 = 00000002h +VOS__PM32 = 00000003h +VOS__WINDOWS32 = 00000004h +VOS_DOS_WINDOWS16 = 00010001h +VOS_DOS_WINDOWS32 = 00010004h +VOS_OS216_PM16 = 00020002h +VOS_OS232_PM32 = 00030003h +VOS_NT_WINDOWS32 = 00040004h + +; File types for version info + +VFT_UNKNOWN = 00000000h +VFT_APP = 00000001h +VFT_DLL = 00000002h +VFT_DRV = 00000003h +VFT_FONT = 00000004h +VFT_VXD = 00000005h +VFT_STATIC_LIB = 00000007h + +; File subtypes for version info + +VFT2_UNKNOWN = 00000000h +VFT2_DRV_PRINTER = 00000001h +VFT2_DRV_KEYBOARD = 00000002h +VFT2_DRV_LANGUAGE = 00000003h +VFT2_DRV_DISPLAY = 00000004h +VFT2_DRV_MOUSE = 00000005h +VFT2_DRV_NETWORK = 00000006h +VFT2_DRV_SYSTEM = 00000007h +VFT2_DRV_INSTALLABLE = 00000008h +VFT2_DRV_SOUND = 00000009h +VFT2_DRV_COMM = 0000000Ah +VFT2_DRV_INPUTMETHOD = 0000000Bh +VFT2_DRV_VERSIONED_PRINTER = 0000000Ch +VFT2_FONT_RASTER = 00000001h +VFT2_FONT_VECTOR = 00000002h +VFT2_FONT_TRUETYPE = 00000003h + +; Console control signals + +CTRL_C_EVENT = 0 +CTRL_BREAK_EVENT = 1 +CTRL_CLOSE_EVENT = 2 +CTRL_LOGOFF_EVENT = 5 +CTRL_SHUTDOWN_EVENT = 6 + +; Standard file handles + +STD_INPUT_HANDLE = 0FFFFFFF6h +STD_OUTPUT_HANDLE = 0FFFFFFF5h +STD_ERROR_HANDLE = 0FFFFFFF4h diff --git a/asm/equihash/Windows/INCLUDE/EQUATES/KERNEL64.INC b/asm/equihash/Windows/INCLUDE/EQUATES/KERNEL64.INC new file mode 100644 index 0000000..a0e228b --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/EQUATES/KERNEL64.INC @@ -0,0 +1,806 @@ + +; KERNEL32.DLL structures and constants + +struct SYSTEM_INFO + wProcessorArchitecture dw ? + wReserved dw ? + dwPageSize dd ? + lpMinimumApplicationAddress dq ? + lpMaximumApplicationAddress dq ? + dwActiveProcessorMask dq ? + dwNumberOfProcessors dd ? + dwProcessorType dd ? + dwAllocationGranularity dd ? + wProcessorLevel dw ? + wProcessorRevision dw ? +ends + +struct OSVERSIONINFO + dwOSVersionInfoSize dd ? + dwMajorVersion dd ? + dwMinorVersion dd ? + dwBuildNumber dd ? + dwPlatformId dd ? + szCSDVersion TCHAR 128 dup (?) +ends + +struct OSVERSIONINFOA + dwOSVersionInfoSize dd ? + dwMajorVersion dd ? + dwMinorVersion dd ? + dwBuildNumber dd ? + dwPlatformId dd ? + szCSDVersion db 128 dup (?) +ends + +struct OSVERSIONINFOW + dwOSVersionInfoSize dd ? + dwMajorVersion dd ? + dwMinorVersion dd ? + dwBuildNumber dd ? + dwPlatformId dd ? + szCSDVersion du 128 dup (?) +ends + +struct MEMORYSTATUS + dwLength dd ? + dwMemoryLoad dd ? + dwTotalPhys dq ? + dwAvailPhys dq ? + dwTotalPageFile dq ? + dwAvailPageFile dq ? + dwTotalVirtual dq ? + dwAvailVirtual dq ? +ends + +struct STARTUPINFO + cb dd ?,? + lpReserved dq ? + lpDesktop dq ? + lpTitle dq ? + dwX dd ? + dwY dd ? + dwXSize dd ? + dwYSize dd ? + dwXCountChars dd ? + dwYCountChars dd ? + dwFillAttribute dd ? + dwFlags dd ? + wShowWindow dw ? + cbReserved2 dw ?,?,? + lpReserved2 dq ? + hStdInput dq ? + hStdOutput dq ? + hStdError dq ? +ends + +struct PROCESS_INFORMATION + hProcess dq ? + hThread dq ? + dwProcessId dd ? + dwThreadId dd ? +ends + +struct FILETIME + dwLowDateTime dd ? + dwHighDateTime dd ? +ends + +struct SYSTEMTIME + wYear dw ? + wMonth dw ? + wDayOfWeek dw ? + wDay dw ? + wHour dw ? + wMinute dw ? + wSecond dw ? + wMilliseconds dw ? +ends + +struct BY_HANDLE_FILE_INFORMATION + dwFileAttributes dd ? + ftCreationTime FILETIME + ftLastAccessTime FILETIME + ftLastWriteTime FILETIME + dwVolumeSerialNumber dd ? + nFileSizeHigh dd ? + nFileSizeLow dd ? + nNumberOfLinks dd ? + nFileIndexHigh dd ? + nFileIndexLow dd ? +ends + +struct WIN32_FIND_DATA + dwFileAttributes dd ? + ftCreationTime FILETIME + ftLastAccessTime FILETIME + ftLastWriteTime FILETIME + nFileSizeHigh dd ? + nFileSizeLow dd ? + dwReserved0 dd ? + dwReserved1 dd ? + cFileName TCHAR MAX_PATH dup (?) + cAlternateFileName TCHAR 14 dup (?) +ends + +struct WIN32_FIND_DATAA + dwFileAttributes dd ? + ftCreationTime FILETIME + ftLastAccessTime FILETIME + ftLastWriteTime FILETIME + nFileSizeHigh dd ? + nFileSizeLow dd ? + dwReserved0 dd ? + dwReserved1 dd ? + cFileName db MAX_PATH dup (?) + cAlternateFileName db 14 dup (?) +ends + +struct WIN32_FIND_DATAW + dwFileAttributes dd ? + ftCreationTime FILETIME + ftLastAccessTime FILETIME + ftLastWriteTime FILETIME + nFileSizeHigh dd ? + nFileSizeLow dd ? + dwReserved0 dd ? + dwReserved1 dd ? + cFileName du MAX_PATH dup (?) + cAlternateFileName du 14 dup (?) +ends + +; General constants + +NULL = 0 +TRUE = 1 +FALSE = 0 + +; Maximum path length in characters + +MAX_PATH = 260 + +; Access rights + +DELETE_RIGHT = 00010000h +READ_CONTROL = 00020000h +WRITE_DAC = 00040000h +WRITE_OWNER = 00080000h +SYNCHRONIZE = 00100000h +STANDARD_RIGHTS_READ = READ_CONTROL +STANDARD_RIGHTS_WRITE = READ_CONTROL +STANDARD_RIGHTS_EXECUTE = READ_CONTROL +STANDARD_RIGHTS_REQUIRED = 000F0000h +STANDARD_RIGHTS_ALL = 001F0000h +SPECIFIC_RIGHTS_ALL = 0000FFFFh +ACCESS_SYSTEM_SECURITY = 01000000h +MAXIMUM_ALLOWED = 02000000h +GENERIC_READ = 80000000h +GENERIC_WRITE = 40000000h +GENERIC_EXECUTE = 20000000h +GENERIC_ALL = 10000000h +PROCESS_TERMINATE = 00000001h +PROCESS_CREATE_THREAD = 00000002h +PROCESS_VM_OPERATION = 00000008h +PROCESS_VM_READ = 00000010h +PROCESS_VM_WRITE = 00000020h +PROCESS_DUP_HANDLE = 00000040h +PROCESS_CREATE_PROCESS = 00000080h +PROCESS_SET_QUOTA = 00000100h +PROCESS_SET_INFORMATION = 00000200h +PROCESS_QUERY_INFORMATION = 00000400h +PROCESS_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or 0FFFh +FILE_SHARE_READ = 00000001h +FILE_SHARE_WRITE = 00000002h +FILE_SHARE_DELETE = 00000004h + +; CreateFile actions + +CREATE_NEW = 1 +CREATE_ALWAYS = 2 +OPEN_EXISTING = 3 +OPEN_ALWAYS = 4 +TRUNCATE_EXISTING = 5 + +; OpenFile modes + +OF_READ = 0000h +OF_WRITE = 0001h +OF_READWRITE = 0002h +OF_SHARE_COMPAT = 0000h +OF_SHARE_EXCLUSIVE = 0010h +OF_SHARE_DENY_WRITE = 0020h +OF_SHARE_DENY_READ = 0030h +OF_SHARE_DENY_NONE = 0040h +OF_PARSE = 0100h +OF_DELETE = 0200h +OF_VERIFY = 0400h +OF_CANCEL = 0800h +OF_CREATE = 1000h +OF_PROMPT = 2000h +OF_EXIST = 4000h +OF_REOPEN = 8000h + +; SetFilePointer methods + +FILE_BEGIN = 0 +FILE_CURRENT = 1 +FILE_END = 2 + +; File attributes + +FILE_ATTRIBUTE_READONLY = 001h +FILE_ATTRIBUTE_HIDDEN = 002h +FILE_ATTRIBUTE_SYSTEM = 004h +FILE_ATTRIBUTE_DIRECTORY = 010h +FILE_ATTRIBUTE_ARCHIVE = 020h +FILE_ATTRIBUTE_NORMAL = 080h +FILE_ATTRIBUTE_TEMPORARY = 100h +FILE_ATTRIBUTE_COMPRESSED = 800h + +; File flags + +FILE_FLAG_WRITE_THROUGH = 80000000h +FILE_FLAG_OVERLAPPED = 40000000h +FILE_FLAG_NO_BUFFERING = 20000000h +FILE_FLAG_RANDOM_ACCESS = 10000000h +FILE_FLAG_SEQUENTIAL_SCAN = 08000000h +FILE_FLAG_DELETE_ON_CLOSE = 04000000h +FILE_FLAG_BACKUP_SEMANTICS = 02000000h +FILE_FLAG_POSIX_SEMANTICS = 01000000h + +; Notify filters + +FILE_NOTIFY_CHANGE_FILE_NAME = 001h +FILE_NOTIFY_CHANGE_DIR_NAME = 002h +FILE_NOTIFY_CHANGE_ATTRIBUTES = 004h +FILE_NOTIFY_CHANGE_SIZE = 008h +FILE_NOTIFY_CHANGE_LAST_WRITE = 010h +FILE_NOTIFY_CHANGE_SECURITY = 100h + +; File types + +FILE_TYPE_UNKNOWN = 0 +FILE_TYPE_DISK = 1 +FILE_TYPE_CHAR = 2 +FILE_TYPE_PIPE = 3 +FILE_TYPE_REMOTE = 8000h + +; LockFileEx flags + +LOCKFILE_FAIL_IMMEDIATELY = 1 +LOCKFILE_EXCLUSIVE_LOCK = 2 + +; MoveFileEx flags + +MOVEFILE_REPLACE_EXISTING = 1 +MOVEFILE_COPY_ALLOWED = 2 +MOVEFILE_DELAY_UNTIL_REBOOT = 4 +MOVEFILE_WRITE_THROUGH = 8 + +; FindFirstFileEx flags + +FIND_FIRST_EX_CASE_SENSITIVE = 1 + +; Device handles + +INVALID_HANDLE_VALUE = -1 +STD_INPUT_HANDLE = -10 +STD_OUTPUT_HANDLE = -11 +STD_ERROR_HANDLE = -12 + +; DuplicateHandle options + +DUPLICATE_CLOSE_SOURCE = 1 +DUPLICATE_SAME_ACCESS = 2 + +; File mapping acccess rights + +SECTION_QUERY = 01h +SECTION_MAP_WRITE = 02h +SECTION_MAP_READ = 04h +SECTION_MAP_EXECUTE = 08h +SECTION_EXTEND_SIZE = 10h +SECTION_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SECTION_QUERY or SECTION_MAP_WRITE or SECTION_MAP_READ or SECTION_MAP_EXECUTE or SECTION_EXTEND_SIZE +FILE_MAP_COPY = SECTION_QUERY +FILE_MAP_WRITE = SECTION_MAP_WRITE +FILE_MAP_READ = SECTION_MAP_READ +FILE_MAP_ALL_ACCESS = SECTION_ALL_ACCESS + +; File system flags + +FILE_CASE_SENSITIVE_SEARCH = 0001h +FILE_CASE_PRESERVED_NAMES = 0002h +FILE_UNICODE_ON_DISK = 0004h +FILE_PERSISTENT_ACLS = 0008h +FILE_FILE_COMPRESSION = 0010h +FILE_VOLUME_IS_COMPRESSED = 8000h +FS_CASE_IS_PRESERVED = FILE_CASE_PRESERVED_NAMES +FS_CASE_SENSITIVE = FILE_CASE_SENSITIVE_SEARCH +FS_UNICODE_STORED_ON_DISK = FILE_UNICODE_ON_DISK +FS_PERSISTENT_ACLS = FILE_PERSISTENT_ACLS + +; Drive types + +DRIVE_UNKNOWN = 0 +DRIVE_NO_ROOT_DIR = 1 +DRIVE_REMOVABLE = 2 +DRIVE_FIXED = 3 +DRIVE_REMOTE = 4 +DRIVE_CDROM = 5 +DRIVE_RAMDISK = 6 + +; Pipe modes + +PIPE_ACCESS_INBOUND = 1 +PIPE_ACCESS_OUTBOUND = 2 +PIPE_ACCESS_DUPLEX = 3 +PIPE_CLIENT_END = 0 +PIPE_SERVER_END = 1 +PIPE_WAIT = 0 +PIPE_NOWAIT = 1 +PIPE_READMODE_BYTE = 0 +PIPE_READMODE_MESSAGE = 2 +PIPE_TYPE_BYTE = 0 +PIPE_TYPE_MESSAGE = 4 +PIPE_UNLIMITED_INSTANCES = 255 + +; Global memory flags + +GMEM_FIXED = 0000h +GMEM_MOVEABLE = 0002h +GMEM_NOCOMPACT = 0010h +GMEM_NODISCARD = 0020h +GMEM_ZEROINIT = 0040h +GMEM_MODIFY = 0080h +GMEM_DISCARDABLE = 0100h +GMEM_NOT_BANKED = 1000h +GMEM_SHARE = 2000h +GMEM_DDESHARE = 2000h +GMEM_NOTIFY = 4000h +GMEM_LOWER = GMEM_NOT_BANKED +GMEM_VALID_FLAGS = 7F72h +GMEM_INVALID_HANDLE = 8000h +GMEM_DISCARDED = 4000h +GMEM_LOCKCOUNT = 0FFh +GHND = GMEM_MOVEABLE + GMEM_ZEROINIT +GPTR = GMEM_FIXED + GMEM_ZEROINIT + +; Local memory flags + +LMEM_FIXED = 0000h +LMEM_MOVEABLE = 0002h +LMEM_NOCOMPACT = 0010h +LMEM_NODISCARD = 0020h +LMEM_ZEROINIT = 0040h +LMEM_MODIFY = 0080h +LMEM_DISCARDABLE = 0F00h +LMEM_VALID_FLAGS = 0F72h +LMEM_INVALID_HANDLE = 8000h +LHND = LMEM_MOVEABLE + LMEM_ZEROINIT +LPTR = LMEM_FIXED + LMEM_ZEROINIT +LMEM_DISCARDED = 4000h +LMEM_LOCKCOUNT = 00FFh + +; Page access flags + +PAGE_NOACCESS = 001h +PAGE_READONLY = 002h +PAGE_READWRITE = 004h +PAGE_WRITECOPY = 008h +PAGE_EXECUTE = 010h +PAGE_EXECUTE_READ = 020h +PAGE_EXECUTE_READWRITE = 040h +PAGE_EXECUTE_WRITECOPY = 080h +PAGE_GUARD = 100h +PAGE_NOCACHE = 200h + +; Memory allocation flags + +MEM_COMMIT = 001000h +MEM_RESERVE = 002000h +MEM_DECOMMIT = 004000h +MEM_RELEASE = 008000h +MEM_FREE = 010000h +MEM_PRIVATE = 020000h +MEM_MAPPED = 040000h +MEM_RESET = 080000h +MEM_TOP_DOWN = 100000h + +; Heap allocation flags + +HEAP_NO_SERIALIZE = 1 +HEAP_GENERATE_EXCEPTIONS = 4 +HEAP_ZERO_MEMORY = 8 + +; Platform identifiers + +VER_PLATFORM_WIN32s = 0 +VER_PLATFORM_WIN32_WINDOWS = 1 +VER_PLATFORM_WIN32_NT = 2 + +; GetBinaryType return values + +SCS_32BIT_BINARY = 0 +SCS_DOS_BINARY = 1 +SCS_WOW_BINARY = 2 +SCS_PIF_BINARY = 3 +SCS_POSIX_BINARY = 4 +SCS_OS216_BINARY = 5 + +; CreateProcess flags + +DEBUG_PROCESS = 001h +DEBUG_ONLY_THIS_PROCESS = 002h +CREATE_SUSPENDED = 004h +DETACHED_PROCESS = 008h +CREATE_NEW_CONSOLE = 010h +NORMAL_PRIORITY_CLASS = 020h +IDLE_PRIORITY_CLASS = 040h +HIGH_PRIORITY_CLASS = 080h +REALTIME_PRIORITY_CLASS = 100h +CREATE_NEW_PROCESS_GROUP = 200h +CREATE_SEPARATE_WOW_VDM = 800h + +; Thread priority values + +THREAD_BASE_PRIORITY_MIN = -2 +THREAD_BASE_PRIORITY_MAX = 2 +THREAD_BASE_PRIORITY_LOWRT = 15 +THREAD_BASE_PRIORITY_IDLE = -15 +THREAD_PRIORITY_LOWEST = THREAD_BASE_PRIORITY_MIN +THREAD_PRIORITY_BELOW_NORMAL = THREAD_PRIORITY_LOWEST + 1 +THREAD_PRIORITY_NORMAL = 0 +THREAD_PRIORITY_HIGHEST = THREAD_BASE_PRIORITY_MAX +THREAD_PRIORITY_ABOVE_NORMAL = THREAD_PRIORITY_HIGHEST - 1 +THREAD_PRIORITY_ERROR_RETURN = 7FFFFFFFh +THREAD_PRIORITY_TIME_CRITICAL = THREAD_BASE_PRIORITY_LOWRT +THREAD_PRIORITY_IDLE = THREAD_BASE_PRIORITY_IDLE + +; Startup flags + +STARTF_USESHOWWINDOW = 001h +STARTF_USESIZE = 002h +STARTF_USEPOSITION = 004h +STARTF_USECOUNTCHARS = 008h +STARTF_USEFILLATTRIBUTE = 010h +STARTF_RUNFULLSCREEN = 020h +STARTF_FORCEONFEEDBACK = 040h +STARTF_FORCEOFFFEEDBACK = 080h +STARTF_USESTDHANDLES = 100h + +; Shutdown flags + +SHUTDOWN_NORETRY = 1h + +; LoadLibraryEx flags + +DONT_RESOLVE_DLL_REFERENCES = 1 +LOAD_LIBRARY_AS_DATAFILE = 2 +LOAD_WITH_ALTERED_SEARCH_PATH = 8 + +; DLL entry-point calls + +DLL_PROCESS_DETACH = 0 +DLL_PROCESS_ATTACH = 1 +DLL_THREAD_ATTACH = 2 +DLL_THREAD_DETACH = 3 + +; Status codes + +STATUS_WAIT_0 = 000000000h +STATUS_ABANDONED_WAIT_0 = 000000080h +STATUS_USER_APC = 0000000C0h +STATUS_TIMEOUT = 000000102h +STATUS_PENDING = 000000103h +STATUS_DATATYPE_MISALIGNMENT = 080000002h +STATUS_BREAKPOINT = 080000003h +STATUS_SINGLE_STEP = 080000004h +STATUS_ACCESS_VIOLATION = 0C0000005h +STATUS_IN_PAGE_ERROR = 0C0000006h +STATUS_NO_MEMORY = 0C0000017h +STATUS_ILLEGAL_INSTRUCTION = 0C000001Dh +STATUS_NONCONTINUABLE_EXCEPTION = 0C0000025h +STATUS_INVALID_DISPOSITION = 0C0000026h +STATUS_ARRAY_BOUNDS_EXCEEDED = 0C000008Ch +STATUS_FLOAT_DENORMAL_OPERAND = 0C000008Dh +STATUS_FLOAT_DIVIDE_BY_ZERO = 0C000008Eh +STATUS_FLOAT_INEXACT_RESULT = 0C000008Fh +STATUS_FLOAT_INVALID_OPERATION = 0C0000090h +STATUS_FLOAT_OVERFLOW = 0C0000091h +STATUS_FLOAT_STACK_CHECK = 0C0000092h +STATUS_FLOAT_UNDERFLOW = 0C0000093h +STATUS_INTEGER_DIVIDE_BY_ZERO = 0C0000094h +STATUS_INTEGER_OVERFLOW = 0C0000095h +STATUS_PRIVILEGED_INSTRUCTION = 0C0000096h +STATUS_STACK_OVERFLOW = 0C00000FDh +STATUS_CONTROL_C_EXIT = 0C000013Ah +WAIT_FAILED = -1 +WAIT_OBJECT_0 = STATUS_WAIT_0 +WAIT_ABANDONED = STATUS_ABANDONED_WAIT_0 +WAIT_ABANDONED_0 = STATUS_ABANDONED_WAIT_0 +WAIT_TIMEOUT = STATUS_TIMEOUT +WAIT_IO_COMPLETION = STATUS_USER_APC +STILL_ACTIVE = STATUS_PENDING + +; Exception codes + +EXCEPTION_CONTINUABLE = 0 +EXCEPTION_NONCONTINUABLE = 1 +EXCEPTION_ACCESS_VIOLATION = STATUS_ACCESS_VIOLATION +EXCEPTION_DATATYPE_MISALIGNMENT = STATUS_DATATYPE_MISALIGNMENT +EXCEPTION_BREAKPOINT = STATUS_BREAKPOINT +EXCEPTION_SINGLE_STEP = STATUS_SINGLE_STEP +EXCEPTION_ARRAY_BOUNDS_EXCEEDED = STATUS_ARRAY_BOUNDS_EXCEEDED +EXCEPTION_FLT_DENORMAL_OPERAND = STATUS_FLOAT_DENORMAL_OPERAND +EXCEPTION_FLT_DIVIDE_BY_ZERO = STATUS_FLOAT_DIVIDE_BY_ZERO +EXCEPTION_FLT_INEXACT_RESULT = STATUS_FLOAT_INEXACT_RESULT +EXCEPTION_FLT_INVALID_OPERATION = STATUS_FLOAT_INVALID_OPERATION +EXCEPTION_FLT_OVERFLOW = STATUS_FLOAT_OVERFLOW +EXCEPTION_FLT_STACK_CHECK = STATUS_FLOAT_STACK_CHECK +EXCEPTION_FLT_UNDERFLOW = STATUS_FLOAT_UNDERFLOW +EXCEPTION_INT_DIVIDE_BY_ZERO = STATUS_INTEGER_DIVIDE_BY_ZERO +EXCEPTION_INT_OVERFLOW = STATUS_INTEGER_OVERFLOW +EXCEPTION_ILLEGAL_INSTRUCTION = STATUS_ILLEGAL_INSTRUCTION +EXCEPTION_PRIV_INSTRUCTION = STATUS_PRIVILEGED_INSTRUCTION +EXCEPTION_IN_PAGE_ERROR = STATUS_IN_PAGE_ERROR + +; Registry options + +REG_OPTION_RESERVED = 0 +REG_OPTION_NON_VOLATILE = 0 +REG_OPTION_VOLATILE = 1 +REG_OPTION_CREATE_LINK = 2 +REG_OPTION_BACKUP_RESTORE = 4 +REG_CREATED_NEW_KEY = 1 +REG_OPENED_EXISTING_KEY = 2 +REG_WHOLE_HIVE_VOLATILE = 1 +REG_REFRESH_HIVE = 2 +REG_NOTIFY_CHANGE_NAME = 1 +REG_NOTIFY_CHANGE_ATTRIBUTES = 2 +REG_NOTIFY_CHANGE_LAST_SET = 4 +REG_NOTIFY_CHANGE_SECURITY = 8 +REG_LEGAL_CHANGE_FILTER = REG_NOTIFY_CHANGE_NAME or REG_NOTIFY_CHANGE_ATTRIBUTES or REG_NOTIFY_CHANGE_LAST_SET or REG_NOTIFY_CHANGE_SECURITY +REG_LEGAL_OPTION = REG_OPTION_RESERVED or REG_OPTION_NON_VOLATILE or REG_OPTION_VOLATILE or REG_OPTION_CREATE_LINK or REG_OPTION_BACKUP_RESTORE +REG_NONE = 0 +REG_SZ = 1 +REG_EXPAND_SZ = 2 +REG_BINARY = 3 +REG_DWORD = 4 +REG_DWORD_LITTLE_ENDIAN = 4 +REG_DWORD_BIG_ENDIAN = 5 +REG_LINK = 6 +REG_MULTI_SZ = 7 +REG_RESOURCE_LIST = 8 +REG_FULL_RESOURCE_DESCRIPTOR = 9 +REG_RESOURCE_REQUIREMENTS_LIST = 10 + +; Registry access modes + +KEY_QUERY_VALUE = 1 +KEY_SET_VALUE = 2 +KEY_CREATE_SUB_KEY = 4 +KEY_ENUMERATE_SUB_KEYS = 8 +KEY_NOTIFY = 10h +KEY_CREATE_LINK = 20h +KEY_READ = STANDARD_RIGHTS_READ or KEY_QUERY_VALUE or KEY_ENUMERATE_SUB_KEYS or KEY_NOTIFY and not SYNCHRONIZE +KEY_WRITE = STANDARD_RIGHTS_WRITE or KEY_SET_VALUE or KEY_CREATE_SUB_KEY and not SYNCHRONIZE +KEY_EXECUTE = KEY_READ +KEY_ALL_ACCESS = STANDARD_RIGHTS_ALL or KEY_QUERY_VALUE or KEY_SET_VALUE or KEY_CREATE_SUB_KEY or KEY_ENUMERATE_SUB_KEYS or KEY_NOTIFY or KEY_CREATE_LINK and not SYNCHRONIZE + +; Predefined registry keys + +HKEY_CLASSES_ROOT = 80000000h +HKEY_CURRENT_USER = 80000001h +HKEY_LOCAL_MACHINE = 80000002h +HKEY_USERS = 80000003h +HKEY_PERFORMANCE_DATA = 80000004h +HKEY_CURRENT_CONFIG = 80000005h +HKEY_DYN_DATA = 80000006h + +; FormatMessage flags + +FORMAT_MESSAGE_ALLOCATE_BUFFER = 0100h +FORMAT_MESSAGE_IGNORE_INSERTS = 0200h +FORMAT_MESSAGE_FROM_STRING = 0400h +FORMAT_MESSAGE_FROM_HMODULE = 0800h +FORMAT_MESSAGE_FROM_SYSTEM = 1000h +FORMAT_MESSAGE_ARGUMENT_ARRAY = 2000h +FORMAT_MESSAGE_MAX_WIDTH_MASK = 00FFh + +; Language identifiers + +LANG_NEUTRAL = 00h +LANG_BULGARIAN = 02h +LANG_CHINESE = 04h +LANG_CROATIAN = 1Ah +LANG_CZECH = 05h +LANG_DANISH = 06h +LANG_DUTCH = 13h +LANG_ENGLISH = 09h +LANG_FINNISH = 0Bh +LANG_FRENCH = 0Ch +LANG_GERMAN = 07h +LANG_GREEK = 08h +LANG_HUNGARIAN = 0Eh +LANG_ICELANDIC = 0Fh +LANG_ITALIAN = 10h +LANG_JAPANESE = 11h +LANG_KOREAN = 12h +LANG_NORWEGIAN = 14h +LANG_POLISH = 15h +LANG_PORTUGUESE = 16h +LANG_ROMANIAN = 18h +LANG_RUSSIAN = 19h +LANG_SLOVAK = 1Bh +LANG_SLOVENIAN = 24h +LANG_SPANISH = 0Ah +LANG_SWEDISH = 1Dh +LANG_THAI = 1Eh +LANG_TURKISH = 1Fh + +; Sublanguage identifiers + +SUBLANG_NEUTRAL = 00h shl 10 +SUBLANG_DEFAULT = 01h shl 10 +SUBLANG_SYS_DEFAULT = 02h shl 10 +SUBLANG_CHINESE_TRADITIONAL = 01h shl 10 +SUBLANG_CHINESE_SIMPLIFIED = 02h shl 10 +SUBLANG_CHINESE_HONGKONG = 03h shl 10 +SUBLANG_CHINESE_SINGAPORE = 04h shl 10 +SUBLANG_DUTCH = 01h shl 10 +SUBLANG_DUTCH_BELGIAN = 02h shl 10 +SUBLANG_ENGLISH_US = 01h shl 10 +SUBLANG_ENGLISH_UK = 02h shl 10 +SUBLANG_ENGLISH_AUS = 03h shl 10 +SUBLANG_ENGLISH_CAN = 04h shl 10 +SUBLANG_ENGLISH_NZ = 05h shl 10 +SUBLANG_ENGLISH_EIRE = 06h shl 10 +SUBLANG_FRENCH = 01h shl 10 +SUBLANG_FRENCH_BELGIAN = 02h shl 10 +SUBLANG_FRENCH_CANADIAN = 03h shl 10 +SUBLANG_FRENCH_SWISS = 04h shl 10 +SUBLANG_GERMAN = 01h shl 10 +SUBLANG_GERMAN_SWISS = 02h shl 10 +SUBLANG_GERMAN_AUSTRIAN = 03h shl 10 +SUBLANG_ITALIAN = 01h shl 10 +SUBLANG_ITALIAN_SWISS = 02h shl 10 +SUBLANG_NORWEGIAN_BOKMAL = 01h shl 10 +SUBLANG_NORWEGIAN_NYNORSK = 02h shl 10 +SUBLANG_PORTUGUESE = 02h shl 10 +SUBLANG_PORTUGUESE_BRAZILIAN = 01h shl 10 +SUBLANG_SPANISH = 01h shl 10 +SUBLANG_SPANISH_MEXICAN = 02h shl 10 +SUBLANG_SPANISH_MODERN = 03h shl 10 + +; Sorting identifiers + +SORT_DEFAULT = 0 shl 16 +SORT_JAPANESE_XJIS = 0 shl 16 +SORT_JAPANESE_UNICODE = 1 shl 16 +SORT_CHINESE_BIG5 = 0 shl 16 +SORT_CHINESE_PRCP = 0 shl 16 +SORT_CHINESE_UNICODE = 1 shl 16 +SORT_CHINESE_PRC = 2 shl 16 +SORT_CHINESE_BOPOMOFO = 3 shl 16 +SORT_KOREAN_KSC = 0 shl 16 +SORT_KOREAN_UNICODE = 1 shl 16 +SORT_GERMAN_PHONE_BOOK = 1 shl 16 +SORT_HUNGARIAN_DEFAULT = 0 shl 16 +SORT_HUNGARIAN_TECHNICAL = 1 shl 16 + +; Code pages + +CP_ACP = 0 ; default to ANSI code page +CP_OEMCP = 1 ; default to OEM code page +CP_MACCP = 2 ; default to MAC code page +CP_THREAD_ACP = 3 ; current thread's ANSI code page +CP_SYMBOL = 42 ; SYMBOL translations +CP_UTF7 = 65000 ; UTF-7 translation +CP_UTF8 = 65001 ; UTF-8 translation + +; Resource types + +RT_CURSOR = 1 +RT_BITMAP = 2 +RT_ICON = 3 +RT_MENU = 4 +RT_DIALOG = 5 +RT_STRING = 6 +RT_FONTDIR = 7 +RT_FONT = 8 +RT_ACCELERATOR = 9 +RT_RCDATA = 10 +RT_MESSAGETABLE = 11 +RT_GROUP_CURSOR = 12 +RT_GROUP_ICON = 14 +RT_VERSION = 16 +RT_DLGINCLUDE = 17 +RT_PLUGPLAY = 19 +RT_VXD = 20 +RT_ANICURSOR = 21 +RT_ANIICON = 22 +RT_HTML = 23 +RT_MANIFEST = 24 + +; Clipboard formats + +CF_TEXT = 001h +CF_BITMAP = 002h +CF_METAFILEPICT = 003h +CF_SYLK = 004h +CF_DIF = 005h +CF_TIFF = 006h +CF_OEMTEXT = 007h +CF_DIB = 008h +CF_PALETTE = 009h +CF_PENDATA = 00Ah +CF_RIFF = 00Bh +CF_WAVE = 00Ch +CF_UNICODETEXT = 00Dh +CF_ENHMETAFILE = 00Eh +CF_HDROP = 00Fh +CF_LOCALE = 010h +CF_OWNERDISPLAY = 080h +CF_DSPTEXT = 081h +CF_DSPBITMAP = 082h +CF_DSPMETAFILEPICT = 083h +CF_DSPENHMETAFILE = 08Eh +CF_PRIVATEFIRST = 200h +CF_PRIVATELAST = 2FFh +CF_GDIOBJFIRST = 300h +CF_GDIOBJLAST = 3FFh + +; OS types for version info + +VOS_UNKNOWN = 00000000h +VOS_DOS = 00010000h +VOS_OS216 = 00020000h +VOS_OS232 = 00030000h +VOS_NT = 00040000h +VOS__BASE = 00000000h +VOS__WINDOWS16 = 00000001h +VOS__PM16 = 00000002h +VOS__PM32 = 00000003h +VOS__WINDOWS32 = 00000004h +VOS_DOS_WINDOWS16 = 00010001h +VOS_DOS_WINDOWS32 = 00010004h +VOS_OS216_PM16 = 00020002h +VOS_OS232_PM32 = 00030003h +VOS_NT_WINDOWS32 = 00040004h + +; File types for version info + +VFT_UNKNOWN = 00000000h +VFT_APP = 00000001h +VFT_DLL = 00000002h +VFT_DRV = 00000003h +VFT_FONT = 00000004h +VFT_VXD = 00000005h +VFT_STATIC_LIB = 00000007h + +; File subtypes for version info + +VFT2_UNKNOWN = 00000000h +VFT2_DRV_PRINTER = 00000001h +VFT2_DRV_KEYBOARD = 00000002h +VFT2_DRV_LANGUAGE = 00000003h +VFT2_DRV_DISPLAY = 00000004h +VFT2_DRV_MOUSE = 00000005h +VFT2_DRV_NETWORK = 00000006h +VFT2_DRV_SYSTEM = 00000007h +VFT2_DRV_INSTALLABLE = 00000008h +VFT2_DRV_SOUND = 00000009h +VFT2_DRV_COMM = 0000000Ah +VFT2_DRV_INPUTMETHOD = 0000000Bh +VFT2_DRV_VERSIONED_PRINTER = 0000000Ch +VFT2_FONT_RASTER = 00000001h +VFT2_FONT_VECTOR = 00000002h +VFT2_FONT_TRUETYPE = 00000003h + +; Console control signals + +CTRL_C_EVENT = 0 +CTRL_BREAK_EVENT = 1 +CTRL_CLOSE_EVENT = 2 +CTRL_LOGOFF_EVENT = 5 +CTRL_SHUTDOWN_EVENT = 6 diff --git a/asm/equihash/Windows/INCLUDE/EQUATES/SHELL32.INC b/asm/equihash/Windows/INCLUDE/EQUATES/SHELL32.INC new file mode 100644 index 0000000..aa2b0ad --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/EQUATES/SHELL32.INC @@ -0,0 +1,128 @@ + +; SHELL32.DLL structures and constants + +struct NOTIFYICONDATA + cbSize dd ? + hWnd dd ? + uID dd ? + uFlags dd ? + uCallbackMessage dd ? + hIcon dd ? + szTip TCHAR 64 dup (?) +ends + +struct NOTIFYICONDATAA + cbSize dd ? + hWnd dd ? + uID dd ? + uFlags dd ? + uCallbackMessage dd ? + hIcon dd ? + szTip db 64 dup (?) +ends + +struct NOTIFYICONDATAW + cbSize dd ? + hWnd dd ? + uID dd ? + uFlags dd ? + uCallbackMessage dd ? + hIcon dd ? + szTip du 64 dup (?) +ends + +struct BROWSEINFO + hwndOwner dd ? + pidlRoot dd ? + pszDisplayName dd ? + lpszTitle dd ? + ulFlags dd ? + lpfn dd ? + lParam dd ? + iImage dd ? +ends + +; Taskbar icon messages + +NIM_ADD = 0 +NIM_MODIFY = 1 +NIM_DELETE = 2 +NIM_SETFOCUS = 3 +NIM_SETVERSION = 4 + +; Taskbar icon flags + +NIF_MESSAGE = 01h +NIF_ICON = 02h +NIF_TIP = 04h +NIF_STATE = 08h +NIF_INFO = 10h +NIF_GUID = 20h + +; Constant Special Item ID List + +CSIDL_DESKTOP = 0x0000 +CSIDL_INTERNET = 0x0001 +CSIDL_PROGRAMS = 0x0002 +CSIDL_CONTROLS = 0x0003 +CSIDL_PRINTERS = 0x0004 +CSIDL_PERSONAL = 0x0005 +CSIDL_FAVORITES = 0x0006 +CSIDL_STARTUP = 0x0007 +CSIDL_RECENT = 0x0008 +CSIDL_SENDTO = 0x0009 +CSIDL_BITBUCKET = 0x000A +CSIDL_STARTMENU = 0x000B +CSIDL_MYDOCUMENTS = 0x000C +CSIDL_MYMUSIC = 0x000D +CSIDL_MYVIDEO = 0x000E +CSIDL_DESKTOPDIRECTORY = 0x0010 +CSIDL_DRIVES = 0x0011 +CSIDL_NETWORK = 0x0012 +CSIDL_NETHOOD = 0x0013 +CSIDL_FONTS = 0x0014 +CSIDL_TEMPLATES = 0x0015 +CSIDL_COMMON_STARTMENU = 0x0016 +CSIDL_COMMON_PROGRAMS = 0x0017 +CSIDL_COMMON_STARTUP = 0x0018 +CSIDL_COMMON_DESKTOPDIRECTORY = 0x0019 +CSIDL_APPDATA = 0x001A +CSIDL_PRINTHOOD = 0x001B +CSIDL_LOCAL_APPDATA = 0x001C +CSIDL_ALTSTARTUP = 0x001D +CSIDL_COMMON_ALTSTARTUP = 0x001E +CSIDL_COMMON_FAVORITES = 0x001F +CSIDL_INTERNET_CACHE = 0x0020 +CSIDL_COOKIES = 0x0021 +CSIDL_HISTORY = 0x0022 +CSIDL_COMMON_APPDATA = 0x0023 +CSIDL_WINDOWS = 0x0024 +CSIDL_SYSTEM = 0x0025 +CSIDL_PROGRAM_FILES = 0x0026 +CSIDL_MYPICTURES = 0x0027 +CSIDL_PROFILE = 0x0028 +CSIDL_SYSTEMX86 = 0x0029 +CSIDL_PROGRAM_FILESX86 = 0x002A +CSIDL_PROGRAM_FILES_COMMON = 0x002B +CSIDL_PROGRAM_FILES_COMMONX86 = 0x002C +CSIDL_COMMON_TEMPLATES = 0x002D +CSIDL_COMMON_DOCUMENTS = 0x002E +CSIDL_COMMON_ADMINTOOLS = 0x002F +CSIDL_ADMINTOOLS = 0x0030 +CSIDL_CONNECTIONS = 0x0031 +CSIDL_COMMON_MUSIC = 0x0035 +CSIDL_COMMON_PICTURES = 0x0036 +CSIDL_COMMON_VIDEO = 0x0037 +CSIDL_RESOURCES = 0x0038 +CSIDL_RESOURCES_LOCALIZED = 0x0039 +CSIDL_COMMON_OEM_LINKS = 0x003A +CSIDL_CDBURN_AREA = 0x003B +CSIDL_COMPUTERSNEARME = 0x003D +CSIDL_PROFILES = 0x003E +CSIDL_FOLDER_MASK = 0x00FF +CSIDL_FLAG_PER_USER_INIT = 0x0800 +CSIDL_FLAG_NO_ALIAS = 0x1000 +CSIDL_FLAG_DONT_VERIFY = 0x4000 +CSIDL_FLAG_CREATE = 0x8000 +CSIDL_FLAG_MASK = 0xFF00 + \ No newline at end of file diff --git a/asm/equihash/Windows/INCLUDE/EQUATES/SHELL64.INC b/asm/equihash/Windows/INCLUDE/EQUATES/SHELL64.INC new file mode 100644 index 0000000..79d47fb --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/EQUATES/SHELL64.INC @@ -0,0 +1,127 @@ + +; SHELL32.DLL structures and constants + +struct NOTIFYICONDATA + cbSize dd ?,? + hWnd dq ? + uID dd ? + uFlags dd ? + uCallbackMessage dd ?,? + hIcon dq ? + szTip TCHAR 64 dup (?) +ends + +struct NOTIFYICONDATAA + cbSize dd ?,? + hWnd dq ? + uID dd ? + uFlags dd ? + uCallbackMessage dd ?,? + hIcon dq ? + szTip db 64 dup (?) +ends + +struct NOTIFYICONDATAW + cbSize dd ?,? + hWnd dq ? + uID dd ? + uFlags dd ? + uCallbackMessage dd ?,? + hIcon dq ? + szTip du 64 dup (?) +ends + +struct BROWSEINFO + hwndOwner dq ? + pidlRoot dq ? + pszDisplayName dq ? + lpszTitle dq ? + ulFlags dd ?,? + lpfn dq ? + lParam dq ? + iImage dq ? +ends + +; Taskbar icon messages + +NIM_ADD = 0 +NIM_MODIFY = 1 +NIM_DELETE = 2 +NIM_SETFOCUS = 3 +NIM_SETVERSION = 4 + +; Taskbar icon flags + +NIF_MESSAGE = 01h +NIF_ICON = 02h +NIF_TIP = 04h +NIF_STATE = 08h +NIF_INFO = 10h +NIF_GUID = 20h + +; Constant Special Item ID List + +CSIDL_DESKTOP = 0x0000 +CSIDL_INTERNET = 0x0001 +CSIDL_PROGRAMS = 0x0002 +CSIDL_CONTROLS = 0x0003 +CSIDL_PRINTERS = 0x0004 +CSIDL_PERSONAL = 0x0005 +CSIDL_FAVORITES = 0x0006 +CSIDL_STARTUP = 0x0007 +CSIDL_RECENT = 0x0008 +CSIDL_SENDTO = 0x0009 +CSIDL_BITBUCKET = 0x000A +CSIDL_STARTMENU = 0x000B +CSIDL_MYDOCUMENTS = 0x000C +CSIDL_MYMUSIC = 0x000D +CSIDL_MYVIDEO = 0x000E +CSIDL_DESKTOPDIRECTORY = 0x0010 +CSIDL_DRIVES = 0x0011 +CSIDL_NETWORK = 0x0012 +CSIDL_NETHOOD = 0x0013 +CSIDL_FONTS = 0x0014 +CSIDL_TEMPLATES = 0x0015 +CSIDL_COMMON_STARTMENU = 0x0016 +CSIDL_COMMON_PROGRAMS = 0x0017 +CSIDL_COMMON_STARTUP = 0x0018 +CSIDL_COMMON_DESKTOPDIRECTORY = 0x0019 +CSIDL_APPDATA = 0x001A +CSIDL_PRINTHOOD = 0x001B +CSIDL_LOCAL_APPDATA = 0x001C +CSIDL_ALTSTARTUP = 0x001D +CSIDL_COMMON_ALTSTARTUP = 0x001E +CSIDL_COMMON_FAVORITES = 0x001F +CSIDL_INTERNET_CACHE = 0x0020 +CSIDL_COOKIES = 0x0021 +CSIDL_HISTORY = 0x0022 +CSIDL_COMMON_APPDATA = 0x0023 +CSIDL_WINDOWS = 0x0024 +CSIDL_SYSTEM = 0x0025 +CSIDL_PROGRAM_FILES = 0x0026 +CSIDL_MYPICTURES = 0x0027 +CSIDL_PROFILE = 0x0028 +CSIDL_SYSTEMX86 = 0x0029 +CSIDL_PROGRAM_FILESX86 = 0x002A +CSIDL_PROGRAM_FILES_COMMON = 0x002B +CSIDL_PROGRAM_FILES_COMMONX86 = 0x002C +CSIDL_COMMON_TEMPLATES = 0x002D +CSIDL_COMMON_DOCUMENTS = 0x002E +CSIDL_COMMON_ADMINTOOLS = 0x002F +CSIDL_ADMINTOOLS = 0x0030 +CSIDL_CONNECTIONS = 0x0031 +CSIDL_COMMON_MUSIC = 0x0035 +CSIDL_COMMON_PICTURES = 0x0036 +CSIDL_COMMON_VIDEO = 0x0037 +CSIDL_RESOURCES = 0x0038 +CSIDL_RESOURCES_LOCALIZED = 0x0039 +CSIDL_COMMON_OEM_LINKS = 0x003A +CSIDL_CDBURN_AREA = 0x003B +CSIDL_COMPUTERSNEARME = 0x003D +CSIDL_PROFILES = 0x003E +CSIDL_FOLDER_MASK = 0x00FF +CSIDL_FLAG_PER_USER_INIT = 0x0800 +CSIDL_FLAG_NO_ALIAS = 0x1000 +CSIDL_FLAG_DONT_VERIFY = 0x4000 +CSIDL_FLAG_CREATE = 0x8000 +CSIDL_FLAG_MASK = 0xFF00 diff --git a/asm/equihash/Windows/INCLUDE/EQUATES/USER32.INC b/asm/equihash/Windows/INCLUDE/EQUATES/USER32.INC new file mode 100644 index 0000000..b30caf1 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/EQUATES/USER32.INC @@ -0,0 +1,1933 @@ + +; USER32.DLL structures and constants + +struct POINT + x dd ? + y dd ? +ends + +struct POINTS + x dw ? + y dw ? +ends + +struct RECT + left dd ? + top dd ? + right dd ? + bottom dd ? +ends + +struct WNDCLASS + style dd ? + lpfnWndProc dd ? + cbClsExtra dd ? + cbWndExtra dd ? + hInstance dd ? + hIcon dd ? + hCursor dd ? + hbrBackground dd ? + lpszMenuName dd ? + lpszClassName dd ? +ends + +struct WNDCLASSEX + cbSize dd ? + style dd ? + lpfnWndProc dd ? + cbClsExtra dd ? + cbWndExtra dd ? + hInstance dd ? + hIcon dd ? + hCursor dd ? + hbrBackground dd ? + lpszMenuName dd ? + lpszClassName dd ? + hIconSm dd ? +ends + +struct CREATESTRUCT + lpCreateParams dd ? + hInstance dd ? + hMenu dd ? + hwndParent dd ? + cy dd ? + cx dd ? + y dd ? + x dd ? + style dd ? + lpszName dd ? + lpszClass dd ? + dwExStyle dd ? +ends + +struct CLIENTCREATESTRUCT + hWindowMenu dd ? + idFirstChild dd ? +ends + +struct MDICREATESTRUCT + szClass dd ? + szTitle dd ? + hOwner dd ? + x dd ? + y dd ? + cx dd ? + cy dd ? + style dd ? + lParam dd ? +ends + +struct SCROLLINFO + cbSize dd ? + fMask dd ? + nMin dd ? + nMax dd ? + nPage dd ? + nPos dd ? + nTrackPos dd ? +ends + +struct MSG + hwnd dd ? + message dd ? + wParam dd ? + lParam dd ? + time dd ? + pt POINT +ends + +struct MINMAXINFO + ptReserved POINT + ptMaxSize POINT + ptMaxPosition POINT + ptMinTrackSize POINT + ptMaxTrackSize POINT +ends + +struct WINDOWPLACEMENT + length dd ? + flags dd ? + showCmd dd ? + ptMinPosition POINT + ptMaxPosition POINT + rcNormalPosition RECT +ends + +struct WINDOWPOS + hwnd dd ? + hwndInsertAfter dd ? + x dd ? + y dd ? + cx dd ? + cy dd ? + flags dd ? +ends + +struct NMHDR + hwndFrom dd ? + idFrom dd ? + code dd ? +ends + +struct COPYDATASTRUCT + dwData dd ? + cbData dd ? + lpData dd ? +ends + +struct ACCEL + fVirt dw ? + key dw ? + cmd dw ? +ends + +struct PAINTSTRUCT + hdc dd ? + fErase dd ? + rcPaint RECT + fRestore dd ? + fIncUpdate dd ? + rgbReserved db 32 dup (?) +ends + +struct DRAWTEXTPARAMS + cbSize dd ? + iTabLength dd ? + iLeftMargin dd ? + iRightMargin dd ? + uiLengthDrawn dd ? +ends + +struct DRAWITEMSTRUCT + CtlType dd ? + CtlID dd ? + itemID dd ? + itemAction dd ? + itemState dd ? + hwndItem dd ? + hDC dd ? + rcItem RECT + itemData dd ? +ends + +struct MENUITEMINFO + cbSize dd ? + fMask dd ? + fType dd ? + fState dd ? + wID dd ? + hSubMenu dd ? + hbmpChecked dd ? + hbmpUnchecked dd ? + dwItemData dd ? + dwTypeData dd ? + cch dd ? +ends + +struct MEASUREITEMSTRUCT + CtlType dd ? + CtlID dd ? + itemID dd ? + itemWidth dd ? + itemHeight dd ? + itemData dd ? +ends + +struct MSGBOXPARAMS + cbSize dd ? + hwndOwner dd ? + hInstance dd ? + lpszText dd ? + lpszCaption dd ? + dwStyle dd ? + lpszIcon dd ? + dwContextHelpId dd ? + lpfnMsgBoxCallback dd ? + dwLanguageId dd ? +ends + +struct GESTURECONFIG + dwID dd ? + dwWant dd ? + dwBlock dd ? +ends + +struct GESTUREINFO + cbSize dd ? + dwFlags dd ? + dwID dd ? + hwndTarget dd ? + ptsLocation POINTS + dwInstanceID dd ? + dwSequenceID dd ?,? + ullArguments dq ? + cbExtraArgs dd ?,? +ends + +; MessageBox type flags + +MB_OK = 000000h +MB_OKCANCEL = 000001h +MB_ABORTRETRYIGNORE = 000002h +MB_YESNOCANCEL = 000003h +MB_YESNO = 000004h +MB_RETRYCANCEL = 000005h +MB_ICONHAND = 000010h +MB_ICONQUESTION = 000020h +MB_ICONEXCLAMATION = 000030h +MB_ICONASTERISK = 000040h +MB_USERICON = 000080h +MB_ICONWARNING = MB_ICONEXCLAMATION +MB_ICONERROR = MB_ICONHAND +MB_ICONINFORMATION = MB_ICONASTERISK +MB_ICONSTOP = MB_ICONHAND +MB_DEFBUTTON1 = 000000h +MB_DEFBUTTON2 = 000100h +MB_DEFBUTTON3 = 000200h +MB_DEFBUTTON4 = 000300h +MB_APPLMODAL = 000000h +MB_SYSTEMMODAL = 001000h +MB_TASKMODAL = 002000h +MB_HELP = 004000h +MB_NOFOCUS = 008000h +MB_SETFOREGROUND = 010000h +MB_DEFAULT_DESKTOP_ONLY = 020000h +MB_TOPMOST = 040000h +MB_RIGHT = 080000h +MB_RTLREADING = 100000h +MB_SERVICE_NOTIFICATION = 200000h + +; Conventional dialog box and message box command IDs + +IDOK = 1 +IDCANCEL = 2 +IDABORT = 3 +IDRETRY = 4 +IDIGNORE = 5 +IDYES = 6 +IDNO = 7 +IDCLOSE = 8 +IDHELP = 9 + +; Class styles + +CS_VREDRAW = 00001h +CS_HREDRAW = 00002h +CS_KEYCVTWINDOW = 00004h +CS_DBLCLKS = 00008h +CS_OWNDC = 00020h +CS_CLASSDC = 00040h +CS_PARENTDC = 00080h +CS_NOKEYCVT = 00100h +CS_SAVEBITS = 00800h +CS_NOCLOSE = 00200h +CS_BYTEALIGNCLIENT = 01000h +CS_BYTEALIGNWINDOW = 02000h +CS_PUBLICCLASS = 04000h +CS_GLOBALCLASS = CS_PUBLICCLASS +CS_IME = 10000h + +; Windows styles + +WS_OVERLAPPED = 000000000h +WS_ICONICPOPUP = 0C0000000h +WS_POPUP = 080000000h +WS_CHILD = 040000000h +WS_MINIMIZE = 020000000h +WS_VISIBLE = 010000000h +WS_DISABLED = 008000000h +WS_CLIPSIBLINGS = 004000000h +WS_CLIPCHILDREN = 002000000h +WS_MAXIMIZE = 001000000h +WS_CAPTION = 000C00000h +WS_BORDER = 000800000h +WS_DLGFRAME = 000400000h +WS_VSCROLL = 000200000h +WS_HSCROLL = 000100000h +WS_SYSMENU = 000080000h +WS_THICKFRAME = 000040000h +WS_HREDRAW = 000020000h +WS_VREDRAW = 000010000h +WS_GROUP = 000020000h +WS_TABSTOP = 000010000h +WS_MINIMIZEBOX = 000020000h +WS_MAXIMIZEBOX = 000010000h + +; Common Window Styles + +WS_OVERLAPPEDWINDOW = WS_OVERLAPPED or WS_CAPTION or WS_SYSMENU or WS_THICKFRAME or WS_MINIMIZEBOX or WS_MAXIMIZEBOX +WS_POPUPWINDOW = WS_POPUP or WS_BORDER or WS_SYSMENU +WS_CHILDWINDOW = WS_CHILD +WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW +WS_TILED = WS_OVERLAPPED +WS_ICONIC = WS_MINIMIZE +WS_SIZEBOX = WS_THICKFRAME + +; Extended Window Styles + +WS_EX_DLGMODALFRAME = 00001h +WS_EX_DRAGOBJECT = 00002h +WS_EX_NOPARENTNOTIFY = 00004h +WS_EX_TOPMOST = 00008h +WS_EX_ACCEPTFILES = 00010h +WS_EX_TRANSPARENT = 00020h +WS_EX_MDICHILD = 00040h +WS_EX_TOOLWINDOW = 00080h +WS_EX_WINDOWEDGE = 00100h +WS_EX_CLIENTEDGE = 00200h +WS_EX_CONTEXTHELP = 00400h +WS_EX_RIGHT = 01000h +WS_EX_LEFT = 00000h +WS_EX_RTLREADING = 02000h +WS_EX_LTRREADING = 00000h +WS_EX_LEFTSCROLLBAR = 04000h +WS_EX_RIGHTSCROLLBAR = 00000h +WS_EX_CONTROLPARENT = 10000h +WS_EX_STATICEDGE = 20000h +WS_EX_APPWINDOW = 40000h +WS_EX_LAYERED = 80000h +WS_EX_OVERLAPPEDWINDOW = WS_EX_WINDOWEDGE or WS_EX_CLIENTEDGE +WS_EX_PALETTEWINDOW = WS_EX_WINDOWEDGE or WS_EX_TOOLWINDOW or WS_EX_TOPMOST + +; MDI client style bits + +MDIS_ALLCHILDSTYLES = 1 + +; Special CreateWindow position value + +CW_USEDEFAULT = 80000000h + +; Predefined window handle + +HWND_DESKTOP = 0 + +; ShowWindow commands + +SW_HIDE = 0 +SW_SHOWNORMAL = 1 +SW_NORMAL = 1 +SW_SHOWMINIMIZED = 2 +SW_SHOWMAXIMIZED = 3 +SW_MAXIMIZE = 3 +SW_SHOWNOACTIVATE = 4 +SW_SHOW = 5 +SW_MINIMIZE = 6 +SW_SHOWMINNOACTIVE = 7 +SW_SHOWNA = 8 +SW_RESTORE = 9 +SW_SHOWDEFAULT = 10 + +; SetWindowPos flags + +SWP_NOSIZE = 0001h +SWP_NOMOVE = 0002h +SWP_NOZORDER = 0004h +SWP_NOREDRAW = 0008h +SWP_NOACTIVATE = 0010h +SWP_DRAWFRAME = 0020h +SWP_SHOWWINDOW = 0040h +SWP_HIDEWINDOW = 0080h +SWP_NOCOPYBITS = 0100h +SWP_NOREPOSITION = 0200h +SWP_DEFERERASE = 2000h +SWP_ASYNCWINDOWPOS = 4000h + +; SetWindowPos special handle values + +HWND_TOP = 0 +HWND_BOTTOM = 1 +HWND_TOPMOST = -1 +HWND_NOTOPMOST = -2 + +; GetWindow flags + +GW_HWNDFIRST = 0 +GW_HWNDLAST = 1 +GW_HWNDNEXT = 2 +GW_HWNDPREV = 3 +GW_OWNER = 4 +GW_CHILD = 5 + +; RedrawWindow flags + +RDW_INVALIDATE = 0001h +RDW_INTERNALPAINT = 0002h +RDW_ERASE = 0004h +RDW_VALIDATE = 0008h +RDW_NOINTERNALPAINT = 0010h +RDW_NOERASE = 0020h +RDW_NOCHILDREN = 0040h +RDW_ALLCHILDREN = 0080h +RDW_UPDATENOW = 0100h +RDW_ERASENOW = 0200h +RDW_FRAME = 0400h +RDW_NOFRAME = 0800h + +; PeekMessage Options + +PM_NOREMOVE = 0000h +PM_REMOVE = 0001h +PM_NOYIELD = 0002h + +; Window state messages + +WM_STATE = 0000h +WM_NULL = 0000h +WM_CREATE = 0001h +WM_DESTROY = 0002h +WM_MOVE = 0003h +WM_SIZE = 0005h +WM_ACTIVATE = 0006h +WM_SETFOCUS = 0007h +WM_KILLFOCUS = 0008h +WM_ENABLE = 000Ah +WM_SETREDRAW = 000Bh +WM_SETTEXT = 000Ch +WM_GETTEXT = 000Dh +WM_GETTEXTLENGTH = 000Eh +WM_PAINT = 000Fh +WM_CLOSE = 0010h +WM_QUERYENDSESSION = 0011h +WM_QUIT = 0012h +WM_QUERYOPEN = 0013h +WM_ERASEBKGND = 0014h +WM_SYSCOLORCHANGE = 0015h +WM_ENDSESSION = 0016h +WM_SYSTEMERROR = 0017h +WM_SHOWWINDOW = 0018h +WM_CTLCOLOR = 0019h +WM_WININICHANGE = 001Ah +WM_DEVMODECHANGE = 001Bh +WM_ACTIVATEAPP = 001Ch +WM_FONTCHANGE = 001Dh +WM_TIMECHANGE = 001Eh +WM_CANCELMODE = 001Fh +WM_SETCURSOR = 0020h +WM_MOUSEACTIVATE = 0021h +WM_CHILDACTIVATE = 0022h +WM_QUEUESYNC = 0023h +WM_GETMINMAXINFO = 0024h +WM_PAINTICON = 0026h +WM_ICONERASEBKGND = 0027h +WM_NEXTDLGCTL = 0028h +WM_SPOOLERSTATUS = 002Ah +WM_DRAWITEM = 002Bh +WM_MEASUREITEM = 002Ch +WM_DELETEITEM = 002Dh +WM_VKEYTOITEM = 002Eh +WM_CHARTOITEM = 002Fh +WM_SETFONT = 0030h +WM_GETFONT = 0031h +WM_SETHOTKEY = 0032h +WM_QUERYDRAGICON = 0037h +WM_COMPAREITEM = 0039h +WM_COMPACTING = 0041h +WM_COMMNOTIFY = 0044h +WM_WINDOWPOSCHANGING = 0046h +WM_WINDOWPOSCHANGED = 0047h +WM_POWER = 0048h +WM_COPYDATA = 004Ah +WM_CANCELJOURNAL = 004Bh +WM_NOTIFY = 004Eh +WM_INPUTLANGCHANGEREQUEST = 0050h +WM_INPUTLANGCHANGE = 0051h +WM_TCARD = 0052h +WM_HELP = 0053h +WM_USERCHANGED = 0054h +WM_NOTIFYFORMAT = 0055h +WM_CONTEXTMENU = 007Bh +WM_STYLECHANGING = 007Ch +WM_STYLECHANGED = 007Dh +WM_DISPLAYCHANGE = 007Eh +WM_GETICON = 007Fh +WM_SETICON = 0080h +WM_NCCREATE = 0081h +WM_NCDESTROY = 0082h +WM_NCCALCSIZE = 0083h +WM_NCHITTEST = 0084h +WM_NCPAINT = 0085h +WM_NCACTIVATE = 0086h +WM_GETDLGCODE = 0087h +WM_NCMOUSEMOVE = 00A0h +WM_NCLBUTTONDOWN = 00A1h +WM_NCLBUTTONUP = 00A2h +WM_NCLBUTTONDBLCLK = 00A3h +WM_NCRBUTTONDOWN = 00A4h +WM_NCRBUTTONUP = 00A5h +WM_NCRBUTTONDBLCLK = 00A6h +WM_NCMBUTTONDOWN = 00A7h +WM_NCMBUTTONUP = 00A8h +WM_NCMBUTTONDBLCLK = 00A9h +WM_KEYFIRST = 0100h +WM_KEYDOWN = 0100h +WM_KEYUP = 0101h +WM_CHAR = 0102h +WM_DEADCHAR = 0103h +WM_SYSKEYDOWN = 0104h +WM_SYSKEYUP = 0105h +WM_SYSCHAR = 0106h +WM_SYSDEADCHAR = 0107h +WM_KEYLAST = 0108h +WM_INITDIALOG = 0110h +WM_COMMAND = 0111h +WM_SYSCOMMAND = 0112h +WM_TIMER = 0113h +WM_HSCROLL = 0114h +WM_VSCROLL = 0115h +WM_INITMENU = 0116h +WM_INITMENUPOPUP = 0117h +WM_GESTURE = 0119h +WM_GESTURENOTIFY = 011Ah +WM_MENUSELECT = 011Fh +WM_MENUCHAR = 0120h +WM_ENTERIDLE = 0121h +WM_MENURBUTTONUP = 0122h +WM_MENUDRAG = 0123h +WM_MENUGETOBJECT = 0124h +WM_UNINITMENUPOPUP = 0125h +WM_MENUCOMMAND = 0126h +WM_CTLCOLORMSGBOX = 0132h +WM_CTLCOLOREDIT = 0133h +WM_CTLCOLORLISTBOX = 0134h +WM_CTLCOLORBTN = 0135h +WM_CTLCOLORDLG = 0136h +WM_CTLCOLORSCROLLBAR = 0137h +WM_CTLCOLORSTATIC = 0138h +WM_MOUSEFIRST = 0200h +WM_MOUSEMOVE = 0200h +WM_LBUTTONDOWN = 0201h +WM_LBUTTONUP = 0202h +WM_LBUTTONDBLCLK = 0203h +WM_RBUTTONDOWN = 0204h +WM_RBUTTONUP = 0205h +WM_RBUTTONDBLCLK = 0206h +WM_MBUTTONDOWN = 0207h +WM_MBUTTONUP = 0208h +WM_MBUTTONDBLCLK = 0209h +WM_MOUSEWHEEL = 020Ah +WM_MOUSELAST = 020Ah +WM_PARENTNOTIFY = 0210h +WM_ENTERMENULOOP = 0211h +WM_EXITMENULOOP = 0212h +WM_NEXTMENU = 0213h +WM_SIZING = 0214h +WM_CAPTURECHANGED = 0215h +WM_MOVING = 0216h +WM_POWERBROADCAST = 0218h +WM_DEVICECHANGE = 0219h +WM_MDICREATE = 0220h +WM_MDIDESTROY = 0221h +WM_MDIACTIVATE = 0222h +WM_MDIRESTORE = 0223h +WM_MDINEXT = 0224h +WM_MDIMAXIMIZE = 0225h +WM_MDITILE = 0226h +WM_MDICASCADE = 0227h +WM_MDIICONARRANGE = 0228h +WM_MDIGETACTIVE = 0229h +WM_MDISETMENU = 0230h +WM_ENTERSIZEMOVE = 0231h +WM_EXITSIZEMOVE = 0232h +WM_DROPFILES = 0233h +WM_MDIREFRESHMENU = 0234h +WM_IME_SETCONTEXT = 0281h +WM_IME_NOTIFY = 0282h +WM_IME_CONTROL = 0283h +WM_IME_COMPOSITIONFULL = 0284h +WM_IME_SELECT = 0285h +WM_IME_CHAR = 0286h +WM_IME_KEYDOWN = 0290h +WM_IME_KEYUP = 0291h +WM_MOUSEHOVER = 02A1h +WM_MOUSELEAVE = 02A3h +WM_CUT = 0300h +WM_COPY = 0301h +WM_PASTE = 0302h +WM_CLEAR = 0303h +WM_UNDO = 0304h +WM_RENDERFORMAT = 0305h +WM_RENDERALLFORMATS = 0306h +WM_DESTROYCLIPBOARD = 0307h +WM_DRAWCLIPBOARD = 0308h +WM_PAINTCLIPBOARD = 0309h +WM_VSCROLLCLIPBOARD = 030Ah +WM_SIZECLIPBOARD = 030Bh +WM_ASKCBFORMATNAME = 030Ch +WM_CHANGECBCHAIN = 030Dh +WM_HSCROLLCLIPBOARD = 030Eh +WM_QUERYNEWPALETTE = 030Fh +WM_PALETTEISCHANGING = 0310h +WM_PALETTECHANGED = 0311h +WM_HOTKEY = 0312h +WM_PRINT = 0317h +WM_PRINTCLIENT = 0318h +WM_HANDHELDFIRST = 0358h +WM_HANDHELDLAST = 035Fh +WM_AFXFIRST = 0360h +WM_AFXLAST = 037Fh +WM_PENWINFIRST = 0380h +WM_PENWINLAST = 038Fh +WM_COALESCE_FIRST = 0390h +WM_COALESCE_LAST = 039Fh +WM_USER = 0400h + +; WM_SIZE commands + +SIZE_RESTORED = 0 +SIZE_MINIMIZED = 1 +SIZE_MAXIMIZED = 2 +SIZE_MAXSHOW = 3 +SIZE_MAXHIDE = 4 + +; WM_ACTIVATE states + +WA_INACTIVE = 0 +WA_ACTIVE = 1 +WA_CLICKACTIVE = 2 + +; WM_SHOWWINDOW identifiers + +SW_PARENTCLOSING = 1 +SW_OTHERZOOM = 2 +SW_PARENTOPENING = 3 +SW_OTHERUNZOOM = 4 + +; WM_MOUSEACTIVATE return codes + +MA_ACTIVATE = 1 +MA_ACTIVATEANDEAT = 2 +MA_NOACTIVATE = 3 +MA_NOACTIVATEANDEAT = 4 + +; WM_MDITILE flags + +MDITILE_VERTICAL = 0 +MDITILE_HORIZONTAL = 1 +MDITILE_SKIPDISABLED = 2 + +; WM_NOTIFY codes + +NM_OUTOFMEMORY = -1 +NM_CLICK = -2 +NM_DBLCLICK = -3 +NM_RETURN = -4 +NM_RCLICK = -5 +NM_RDBLCLK = -6 +NM_SETFOCUS = -7 +NM_KILLFOCUS = -8 + +; WM_SETICON types + +ICON_SMALL = 0 +ICON_BIG = 1 + +; WM_HOTKEY commands + +HOTKEYF_SHIFT = 01h +HOTKEYF_CONTROL = 02h +HOTKEYF_ALT = 04h +HOTKEYF_EXT = 08h + +; Keystroke flags + +KF_EXTENDED = 0100h +KF_DLGMODE = 0800h +KF_MENUMODE = 1000h +KF_ALTDOWN = 2000h +KF_REPEAT = 4000h +KF_UP = 8000h + +; Key state masks for mouse messages + +MK_LBUTTON = 01h +MK_RBUTTON = 02h +MK_SHIFT = 04h +MK_CONTROL = 08h +MK_MBUTTON = 10h + +; WM_SIZING codes + +WMSZ_LEFT = 1 +WMSZ_RIGHT = 2 +WMSZ_TOP = 3 +WMSZ_TOPLEFT = 4 +WMSZ_TOPRIGHT = 5 +WMSZ_BOTTOM = 6 +WMSZ_BOTTOMLEFT = 7 +WMSZ_BOTTOMRIGHT = 8 + +; WM_HOTKEY modifiers + +MOD_ALT = 1 +MOD_CONTROL = 2 +MOD_SHIFT = 4 +MOD_WIN = 8 + +; WM_PRINT flags + +PRF_CHECKVISIBLE = 01h +PRF_NONCLIENT = 02h +PRF_CLIENT = 04h +PRF_ERASEBKGND = 08h +PRF_CHILDREN = 10h +PRF_OWNED = 20h + +; Virtual key codes + +VK_LBUTTON = 001h +VK_CANCEL = 003h +VK_RBUTTON = 002h +VK_MBUTTON = 004h +VK_BACK = 008h +VK_TAB = 009h +VK_CLEAR = 00Ch +VK_RETURN = 00Dh +VK_SHIFT = 010h +VK_CONTROL = 011h +VK_MENU = 012h +VK_PAUSE = 013h +VK_CAPITAL = 014h +VK_ESCAPE = 01Bh +VK_SPACE = 020h +VK_PRIOR = 021h +VK_PGUP = 021h +VK_PGDN = 022h +VK_NEXT = 022h +VK_END = 023h +VK_HOME = 024h +VK_LEFT = 025h +VK_UP = 026h +VK_RIGHT = 027h +VK_DOWN = 028h +VK_SELECT = 029h +VK_PRINT = 02Ah +VK_EXECUTE = 02Bh +VK_SNAPSHOT = 02Ch +VK_INSERT = 02Dh +VK_DELETE = 02Eh +VK_HELP = 02Fh +VK_LWIN = 05Bh +VK_RWIN = 05Ch +VK_APPS = 05Dh +VK_NUMPAD0 = 060h +VK_NUMPAD1 = 061h +VK_NUMPAD2 = 062h +VK_NUMPAD3 = 063h +VK_NUMPAD4 = 064h +VK_NUMPAD5 = 065h +VK_NUMPAD6 = 066h +VK_NUMPAD7 = 067h +VK_NUMPAD8 = 068h +VK_NUMPAD9 = 069h +VK_MULTIPLY = 06Ah +VK_ADD = 06Bh +VK_SEPARATOR = 06Ch +VK_SUBTRACT = 06Dh +VK_DECIMAL = 06Eh +VK_DIVIDE = 06Fh +VK_F1 = 070h +VK_F2 = 071h +VK_F3 = 072h +VK_F4 = 073h +VK_F5 = 074h +VK_F6 = 075h +VK_F7 = 076h +VK_F8 = 077h +VK_F9 = 078h +VK_F10 = 079h +VK_F11 = 07Ah +VK_F12 = 07Bh +VK_F13 = 07Ch +VK_F14 = 07Dh +VK_F15 = 07Eh +VK_F16 = 07Fh +VK_F17 = 080h +VK_F18 = 081h +VK_F19 = 082h +VK_F20 = 083h +VK_F21 = 084h +VK_F22 = 085h +VK_F23 = 086h +VK_F24 = 087h +VK_NUMLOCK = 090h +VK_SCROLL = 091h +VK_LSHIFT = 0A0h +VK_RSHIFT = 0A1h +VK_LCONTROL = 0A2h +VK_RCONTROL = 0A3h +VK_LMENU = 0A4h +VK_RMENU = 0A5h +VK_ATTN = 0F6h +VK_CRSEL = 0F7h +VK_EXSEL = 0F8h +VK_EREOF = 0F9h +VK_PLAY = 0FAh +VK_ZOOM = 0FBh +VK_NONAME = 0FCh +VK_PA1 = 0FDh +VK_OEM_CLEAR = 0FEh + +; Accelerator flags + +FVIRTKEY = 01h +FNOINVERT = 02h +FSHIFT = 04h +FCONTROL = 08h +FALT = 10h + +; GetClassLong offsets + +GCL_MENUNAME = -8 +GCL_HBRBACKGROUND = -10 +GCL_HCURSOR = -12 +GCL_HICON = -14 +GCL_HMODULE = -16 +GCL_CBWNDEXTRA = -18 +GCL_CBCLSEXTRA = -20 +GCL_WNDPROC = -24 +GCL_STYLE = -26 +GCW_ATOM = -32 +GCL_HICONSM = -34 + +; WNDCLASS parameters + +DLGWINDOWEXTRA = 30 + +; GetWindowLong offsets + +GWL_WNDPROC = -4 +GWL_HINSTANCE = -6 +GWL_HWNDPARENT = -8 +GWL_STYLE = -16 +GWL_EXSTYLE = -20 +GWL_USERDATA = -21 +GWL_ID = -12 +DWL_MSGRESULT = 0 +DWL_DLGPROC = 4 +DWL_USER = 8 + +; GetSystemMetrics codes + +SM_CXSCREEN = 0 +SM_CYSCREEN = 1 +SM_CXVSCROLL = 2 +SM_CYHSCROLL = 3 +SM_CYCAPTION = 4 +SM_CXBORDER = 5 +SM_CYBORDER = 6 +SM_CXDLGFRAME = 7 +SM_CYDLGFRAME = 8 +SM_CYVTHUMB = 9 +SM_CXHTHUMB = 10 +SM_CXICON = 11 +SM_CYICON = 12 +SM_CXCURSOR = 13 +SM_CYCURSOR = 14 +SM_CYMENU = 15 +SM_CXFULLSCREEN = 16 +SM_CYFULLSCREEN = 17 +SM_CYKANJIWINDOW = 18 +SM_MOUSEPRESENT = 19 +SM_CYVSCROLL = 20 +SM_CXHSCROLL = 21 +SM_DEBUG = 22 +SM_SWAPBUTTON = 23 +SM_RESERVED1 = 24 +SM_RESERVED2 = 25 +SM_RESERVED3 = 26 +SM_RESERVED4 = 27 +SM_CXMIN = 28 +SM_CYMIN = 29 +SM_CXSIZE = 30 +SM_CYSIZE = 31 +SM_CXFRAME = 32 +SM_CYFRAME = 33 +SM_CXMINTRACK = 34 +SM_CYMINTRACK = 35 +SM_CXDOUBLECLK = 36 +SM_CYDOUBLECLK = 37 +SM_CXICONSPACING = 38 +SM_CYICONSPACING = 39 +SM_MENUDROPALIGNMENT = 40 +SM_PENWINDOWS = 41 +SM_DBCSENABLED = 42 +SM_CMOUSEBUTTONS = 43 +SM_CXFIXEDFRAME = SM_CXDLGFRAME +SM_CYFIXEDFRAME = SM_CYDLGFRAME +SM_CXSIZEFRAME = SM_CXFRAME +SM_CYSIZEFRAME = SM_CYFRAME +SM_SECURE = 44 +SM_CXEDGE = 45 +SM_CYEDGE = 46 +SM_CXMINSPACING = 47 +SM_CYMINSPACING = 48 +SM_CXSMICON = 49 +SM_CYSMICON = 50 +SM_CYSMCAPTION = 51 +SM_CXSMSIZE = 52 +SM_CYSMSIZE = 53 +SM_CXMENUSIZE = 54 +SM_CYMENUSIZE = 55 +SM_ARRANGE = 56 +SM_CXMINIMIZED = 57 +SM_CYMINIMIZED = 58 +SM_CXMAXTRACK = 59 +SM_CYMAXTRACK = 60 +SM_CXMAXIMIZED = 61 +SM_CYMAXIMIZED = 62 +SM_NETWORK = 63 +SM_CLEANBOOT = 67 +SM_CXDRAG = 68 +SM_CYDRAG = 69 +SM_SHOWSOUNDS = 70 +SM_CXMENUCHECK = 71 +SM_CYMENUCHECK = 72 +SM_SLOWMACHINE = 73 +SM_MIDEASTENABLED = 74 +SM_MOUSEWHEELPRESENT = 75 +SM_CMETRICS = 76 + +; Predefined cursor identifiers + +IDC_ARROW = 32512 +IDC_IBEAM = 32513 +IDC_WAIT = 32514 +IDC_CROSS = 32515 +IDC_UPARROW = 32516 +IDC_SIZE = 32640 +IDC_ICON = 32641 +IDC_SIZENWSE = 32642 +IDC_SIZENESW = 32643 +IDC_SIZEWE = 32644 +IDC_SIZENS = 32645 +IDC_NO = 32648 +IDC_HAND = 32649 +IDC_APPSTARTING = 32650 +IDC_HELP = 32651 + +; Predefined icon identifiers + +IDI_APPLICATION = 32512 +IDI_HAND = 32513 +IDI_QUESTION = 32514 +IDI_EXCLAMATION = 32515 +IDI_ASTERISK = 32516 +IDI_WINLOGO = 32517 + +; System colors + +COLOR_SCROLLBAR = 0 +COLOR_BACKGROUND = 1 +COLOR_ACTIVECAPTION = 2 +COLOR_INACTIVECAPTION = 3 +COLOR_MENU = 4 +COLOR_WINDOW = 5 +COLOR_WINDOWFRAME = 6 +COLOR_MENUTEXT = 7 +COLOR_WINDOWTEXT = 8 +COLOR_CAPTIONTEXT = 9 +COLOR_ACTIVEBORDER = 10 +COLOR_INACTIVEBORDER = 11 +COLOR_APPWORKSPACE = 12 +COLOR_HIGHLIGHT = 13 +COLOR_HIGHLIGHTTEXT = 14 +COLOR_BTNFACE = 15 +COLOR_BTNSHADOW = 16 +COLOR_GRAYTEXT = 17 +COLOR_BTNTEXT = 18 +COLOR_INACTIVECAPTIONTEXT = 19 +COLOR_BTNHIGHLIGHT = 20 +COLOR_3DDKSHADOW = 21 +COLOR_3DLIGHT = 22 +COLOR_INFOTEXT = 23 +COLOR_INFOBK = 24 +COLOR_HOTLIGHT = 26 +COLOR_GRADIENTACTIVECAPTION = 27 +COLOR_GRADIENTINACTIVECAPTION = 28 + +; Button messages + +BM_GETCHECK = 00F0h +BM_SETCHECK = 00F1h +BM_GETSTATE = 00F2h +BM_SETSTATE = 00F3h +BM_SETSTYLE = 00F4h +BM_CLICK = 00F5h +BM_GETIMAGE = 00F6h +BM_SETIMAGE = 00F7h + +; Button notifications + +BN_CLICKED = 0 +BN_PAINT = 1 +BN_HILITE = 2 +BN_UNHILITE = 3 +BN_DISABLE = 4 +BN_DOUBLECLICKED = 5 +BN_SETFOCUS = 6 +BN_KILLFOCUS = 7 +BN_PUSHED = BN_HILITE +BN_UNPUSHED = BN_UNHILITE +BN_DBLCLK = BN_DOUBLECLICKED + +; Button styles + +BS_PUSHBUTTON = 0000h +BS_DEFPUSHBUTTON = 0001h +BS_CHECKBOX = 0002h +BS_AUTOCHECKBOX = 0003h +BS_RADIOBUTTON = 0004h +BS_3STATE = 0005h +BS_AUTO3STATE = 0006h +BS_GROUPBOX = 0007h +BS_USERBUTTON = 0008h +BS_AUTORADIOBUTTON = 0009h +BS_OWNERDRAW = 000Bh +BS_TEXT = 0000h +BS_LEFTTEXT = 0020h +BS_RIGHTBUTTON = BS_LEFTTEXT +BS_ICON = 0040h +BS_BITMAP = 0080h +BS_LEFT = 0100h +BS_RIGHT = 0200h +BS_CENTER = 0300h +BS_TOP = 0400h +BS_BOTTOM = 0800h +BS_VCENTER = 0C00h +BS_PUSHLIKE = 1000h +BS_MULTILINE = 2000h +BS_NOTIFY = 4000h +BS_FLAT = 8000h + +; Button states + +BST_UNCHECKED = 0 +BST_CHECKED = 1 +BST_INDETERMINATE = 2 +BST_PUSHED = 4 +BST_FOCUS = 8 + +; List box messages + +LB_ADDSTRING = 0180h +LB_INSERTSTRING = 0181h +LB_DELETESTRING = 0182h +LB_SELITEMRANGEEX = 0183h +LB_RESETCONTENT = 0184h +LB_SETSEL = 0185h +LB_SETCURSEL = 0186h +LB_GETSEL = 0187h +LB_GETCURSEL = 0188h +LB_GETTEXT = 0189h +LB_GETTEXTLEN = 018Ah +LB_GETCOUNT = 018Bh +LB_SELECTSTRING = 018Ch +LB_DIR = 018Dh +LB_GETTOPINDEX = 018Eh +LB_FINDSTRING = 018Fh +LB_GETSELCOUNT = 0190h +LB_GETSELITEMS = 0191h +LB_SETTABSTOPS = 0192h +LB_GETHORIZONTALEXTENT = 0193h +LB_SETHORIZONTALEXTENT = 0194h +LB_SETCOLUMNWIDTH = 0195h +LB_ADDFILE = 0196h +LB_SETTOPINDEX = 0197h +LB_GETITEMRECT = 0198h +LB_GETITEMDATA = 0199h +LB_SETITEMDATA = 019Ah +LB_SELITEMRANGE = 019Bh +LB_SETANCHORINDEX = 019Ch +LB_GETANCHORINDEX = 019Dh +LB_SETCARETINDEX = 019Eh +LB_GETCARETINDEX = 019Fh +LB_SETITEMHEIGHT = 01A0h +LB_GETITEMHEIGHT = 01A1h +LB_FINDSTRINGEXACT = 01A2h +LB_SETLOCALE = 01A5h +LB_GETLOCALE = 01A6h +LB_SETCOUNT = 01A7h +LB_INITSTORAGE = 01A8h +LB_ITEMFROMPOINT = 01A9h + +; List box notifications + +LBN_ERRSPACE = -2 +LBN_SELCHANGE = 1 +LBN_DBLCLK = 2 +LBN_SELCANCEL = 3 +LBN_SETFOCUS = 4 +LBN_KILLFOCUS = 5 + +; List box styles + +LBS_NOTIFY = 0001h +LBS_SORT = 0002h +LBS_NOREDRAW = 0004h +LBS_MULTIPLESEL = 0008h +LBS_OWNERDRAWFIXED = 0010h +LBS_OWNERDRAWVARIABLE = 0020h +LBS_HASSTRINGS = 0040h +LBS_USETABSTOPS = 0080h +LBS_NOINTEGRALHEIGHT = 0100h +LBS_MULTICOLUMN = 0200h +LBS_WANTKEYBOARDINPUT = 0400h +LBS_EXTENDEDSEL = 0800h +LBS_DISABLENOSCROLL = 1000h +LBS_NODATA = 2000h +LBS_NOSEL = 4000h +LBS_STANDARD = LBS_NOTIFY or LBS_SORT or WS_VSCROLL or WS_BORDER + +; List box return values + +LB_OKAY = 0 +LB_ERR = -1 +LB_ERRSPACE = -2 + +; Combo box messages + +CB_GETEDITSEL = 0140h +CB_LIMITTEXT = 0141h +CB_SETEDITSEL = 0142h +CB_ADDSTRING = 0143h +CB_DELETESTRING = 0144h +CB_DIR = 0145h +CB_GETCOUNT = 0146h +CB_GETCURSEL = 0147h +CB_GETLBTEXT = 0148h +CB_GETLBTEXTLEN = 0149h +CB_INSERTSTRING = 014Ah +CB_RESETCONTENT = 014Bh +CB_FINDSTRING = 014Ch +CB_SELECTSTRING = 014Dh +CB_SETCURSEL = 014Eh +CB_SHOWDROPDOWN = 014Fh +CB_GETITEMDATA = 0150h +CB_SETITEMDATA = 0151h +CB_GETDROPPEDCONTROLRECT = 0152h +CB_SETITEMHEIGHT = 0153h +CB_GETITEMHEIGHT = 0154h +CB_SETEXTENDEDUI = 0155h +CB_GETEXTENDEDUI = 0156h +CB_GETDROPPEDSTATE = 0157h +CB_FINDSTRINGEXACT = 0158h +CB_SETLOCALE = 0159h +CB_GETLOCALE = 015Ah +CB_GETTOPINDEX = 015Bh +CB_SETTOPINDEX = 015Ch +CB_GETHORIZONTALEXTENT = 015Dh +CB_SETHORIZONTALEXTENT = 015Eh +CB_GETDROPPEDWIDTH = 015Fh +CB_SETDROPPEDWIDTH = 0160h +CB_INITSTORAGE = 0161h + +; Combo box notifications + +CBN_ERRSPACE = -1 +CBN_SELCHANGE = 1 +CBN_DBLCLK = 2 +CBN_SETFOCUS = 3 +CBN_KILLFOCUS = 4 +CBN_EDITCHANGE = 5 +CBN_EDITUPDATE = 6 +CBN_DROPDOWN = 7 +CBN_CLOSEUP = 8 +CBN_SELENDOK = 9 +CBN_SELENDCANCEL = 10 + +; Combo box styles + +CBS_SIMPLE = 0001h +CBS_DROPDOWN = 0002h +CBS_DROPDOWNLIST = 0003h +CBS_OWNERDRAWFIXED = 0010h +CBS_OWNERDRAWVARIABLE = 0020h +CBS_AUTOHSCROLL = 0040h +CBS_OEMCONVERT = 0080h +CBS_SORT = 0100h +CBS_HASSTRINGS = 0200h +CBS_NOINTEGRALHEIGHT = 0400h +CBS_DISABLENOSCROLL = 0800h +CBS_UPPERCASE = 2000h +CBS_LOWERCASE = 4000h + +; Combo box return values + +CB_OKAY = 0 +CB_ERR = -1 +CB_ERRSPACE = -2 + +; Edit control messages + +EM_GETSEL = 00B0h +EM_SETSEL = 00B1h +EM_GETRECT = 00B2h +EM_SETRECT = 00B3h +EM_SETRECTNP = 00B4h +EM_SCROLL = 00B5h +EM_LINESCROLL = 00B6h +EM_SCROLLCARET = 00B7h +EM_GETMODIFY = 00B8h +EM_SETMODIFY = 00B9h +EM_GETLINECOUNT = 00BAh +EM_LINEINDEX = 00BBh +EM_SETHANDLE = 00BCh +EM_GETHANDLE = 00BDh +EM_GETTHUMB = 00BEh +EM_LINELENGTH = 00C1h +EM_REPLACESEL = 00C2h +EM_GETLINE = 00C4h +EM_LIMITTEXT = 00C5h +EM_CANUNDO = 00C6h +EM_UNDO = 00C7h +EM_FMTLINES = 00C8h +EM_LINEFROMCHAR = 00C9h +EM_SETTABSTOPS = 00CBh +EM_SETPASSWORDCHAR = 00CCh +EM_EMPTYUNDOBUFFER = 00CDh +EM_GETFIRSTVISIBLELINE = 00CEh +EM_SETREADONLY = 00CFh +EM_SETWORDBREAKPROC = 00D0h +EM_GETWORDBREAKPROC = 00D1h +EM_GETPASSWORDCHAR = 00D2h +EM_SETMARGINS = 00D3h +EM_GETMARGINS = 00D4h +EM_SETLIMITTEXT = EM_LIMITTEXT +EM_GETLIMITTEXT = 00D5h +EM_POSFROMCHAR = 00D6h +EM_CHARFROMPOS = 00D7h + +; Edit control EM_SETMARGIN parameters + +EC_LEFTMARGIN = 1 +EC_RIGHTMARGIN = 2 +EC_USEFONTINFO = 0FFFFh + +; Edit control notifications + +EN_SETFOCUS = 0100h +EN_KILLFOCUS = 0200h +EN_CHANGE = 0300h +EN_UPDATE = 0400h +EN_ERRSPACE = 0500h +EN_MAXTEXT = 0501h +EN_HSCROLL = 0601h +EN_VSCROLL = 0602h + +; Edit control styles + +ES_LEFT = 0000h +ES_CENTER = 0001h +ES_RIGHT = 0002h +ES_MULTILINE = 0004h +ES_UPPERCASE = 0008h +ES_LOWERCASE = 0010h +ES_PASSWORD = 0020h +ES_AUTOVSCROLL = 0040h +ES_AUTOHSCROLL = 0080h +ES_NOHIDESEL = 0100h +ES_OEMCONVERT = 0400h +ES_READONLY = 0800h +ES_WANTRETURN = 1000h +ES_NUMBER = 2000h + +; Static window messages + +STM_SETICON = 0170h +STM_GETICON = 0171h +STM_SETIMAGE = 0172h +STM_GETIMAGE = 0173h + +; Static window notifications + +STN_CLICKED = 0 +STN_DBLCLK = 1 +STN_ENABLE = 2 +STN_DISABLE = 3 + +; Static window styles + +SS_LEFT = 0000h +SS_CENTER = 0001h +SS_RIGHT = 0002h +SS_ICON = 0003h +SS_BLACKRECT = 0004h +SS_GRAYRECT = 0005h +SS_WHITERECT = 0006h +SS_BLACKFRAME = 0007h +SS_GRAYFRAME = 0008h +SS_WHITEFRAME = 0009h +SS_USERITEM = 000Ah +SS_SIMPLE = 000Bh +SS_LEFTNOWORDWRAP = 000Ch +SS_BITMAP = 000Eh +SS_OWNERDRAW = 000Dh +SS_ENHMETAFILE = 000Fh +SS_ETCHEDHORZ = 0010h +SS_ETCHEDVERT = 0011h +SS_ETCHEDFRAME = 0012h +SS_TYPEMASK = 001Fh +SS_NOPREFIX = 0080h +SS_NOTIFY = 0100h +SS_CENTERIMAGE = 0200h +SS_RIGHTJUST = 0400h +SS_REALSIZEIMAGE = 0800h +SS_SUNKEN = 1000h + +; Scroll bar constants + +SB_HORZ = 0 +SB_VERT = 1 +SB_CTL = 2 +SB_BOTH = 3 + +; Scroll bar messages + +SBM_SETPOS = 00E0h +SBM_GETPOS = 00E1h +SBM_SETRANGE = 00E2h +SBM_SETRANGEREDRAW = 00E6h +SBM_GETRANGE = 00E3h +SBM_ENABLE_ARROWS = 00E4h +SBM_SETSCROLLINFO = 00E9h +SBM_GETSCROLLINFO = 00EAh + +; Scroll bar commands + +SB_LINEUP = 0 +SB_LINELEFT = 0 +SB_LINEDOWN = 1 +SB_LINERIGHT = 1 +SB_PAGEUP = 2 +SB_PAGELEFT = 2 +SB_PAGEDOWN = 3 +SB_PAGERIGHT = 3 +SB_THUMBPOSITION = 4 +SB_THUMBTRACK = 5 +SB_TOP = 6 +SB_LEFT = 6 +SB_BOTTOM = 7 +SB_RIGHT = 7 +SB_ENDSCROLL = 8 + +; Scroll bar styles + +SBS_HORZ = 0000h +SBS_VERT = 0001h +SBS_TOPALIGN = 0002h +SBS_LEFTALIGN = 0002h +SBS_BOTTOMALIGN = 0004h +SBS_RIGHTALIGN = 0004h +SBS_SIZEBOXTOPLEFTALIGN = 0002h +SBS_SIZEBOXBOTTOMRIGHTALIGN = 0004h +SBS_SIZEBOX = 0008h +SBS_SIZEGRIP = 0010h + +; Scroll bar info flags + +SIF_RANGE = 0001h +SIF_PAGE = 0002h +SIF_POS = 0004h +SIF_DISABLENOSCROLL = 0008h +SIF_TRACKPOS = 0010h +SIF_ALL = SIF_RANGE or SIF_PAGE or SIF_POS or SIF_TRACKPOS + +; Dialog styles + +DS_ABSALIGN = 0001h +DS_SYSMODAL = 0002h +DS_3DLOOK = 0004h +DS_FIXEDSYS = 0008h +DS_NOFAILCREATE = 0010h +DS_LOCALEDIT = 0020h +DS_SETFONT = 0040h +DS_MODALFRAME = 0080h +DS_NOIDLEMSG = 0100h +DS_SETFOREGROUND = 0200h +DS_CONTROL = 0400h +DS_CENTER = 0800h +DS_CENTERMOUSE = 1000h +DS_CONTEXTHELP = 2000h + +; Dialog codes + +DLGC_WANTARROWS = 0001h +DLGC_WANTTAB = 0002h +DLGC_WANTALLKEYS = 0004h +DLGC_WANTMESSAGE = 0004h +DLGC_HASSETSEL = 0008h +DLGC_DEFPUSHBUTTON = 0010h +DLGC_UNDEFPUSHBUTTON = 0020h +DLGC_RADIOBUTTON = 0040h +DLGC_WANTCHARS = 0080h +DLGC_STATIC = 0100h +DLGC_BUTTON = 2000h + +; Menu flags + +MF_INSERT = 0000h +MF_CHANGE = 0080h +MF_APPEND = 0100h +MF_DELETE = 0200h +MF_REMOVE = 1000h +MF_BYCOMMAND = 0000h +MF_BYPOSITION = 0400h +MF_SEPARATOR = 0800h +MF_UNCHECKED = 0000h +MF_ENABLED = 0000h +MF_GRAYED = 0001h +MF_DISABLED = 0002h +MF_CHECKED = 0008h +MF_USECHECKBITMAPS = 0200h +MF_STRING = 0000h +MF_BITMAP = 0004h +MF_OWNERDRAW = 0100h +MF_POPUP = 0010h +MF_MENUBARBREAK = 0020h +MF_MENUBREAK = 0040h +MF_UNHILITE = 0000h +MF_HILITE = 0080h +MF_DEFAULT = 1000h +MF_SYSMENU = 2000h +MF_HELP = 4000h +MF_RIGHTJUSTIFY = 4000h +MF_MOUSESELECT = 8000h +MF_END = 0080h +MFT_STRING = MF_STRING +MFT_BITMAP = MF_BITMAP +MFT_MENUBARBREAK = MF_MENUBARBREAK +MFT_MENUBREAK = MF_MENUBREAK +MFT_OWNERDRAW = MF_OWNERDRAW +MFT_RADIOCHECK = 0200h +MFT_SEPARATOR = MF_SEPARATOR +MFT_RIGHTORDER = 2000h +MFT_RIGHTJUSTIFY = MF_RIGHTJUSTIFY +MFS_GRAYED = 0003h +MFS_DISABLED = MFS_GRAYED +MFS_CHECKED = MF_CHECKED +MFS_HILITE = MF_HILITE +MFS_ENABLED = MF_ENABLED +MFS_UNCHECKED = MF_UNCHECKED +MFS_UNHILITE = MF_UNHILITE +MFS_DEFAULT = MF_DEFAULT +MFR_POPUP = 0001h +MFR_END = MF_END + +; System menu command values + +SC_SIZE = 61440 +SC_MOVE = 61456 +SC_MINIMIZE = 61472 +SC_MAXIMIZE = 61488 +SC_NEXTWINDOW = 61504 +SC_PREVWINDOW = 61520 +SC_CLOSE = 61536 +SC_VSCROLL = 61552 +SC_HSCROLL = 61568 +SC_MOUSEMENU = 61584 +SC_KEYMENU = 61696 +SC_ARRANGE = 61712 +SC_RESTORE = 61728 +SC_TASKLIST = 61744 +SC_SCREENSAVE = 61760 +SC_HOTKEY = 61776 +SC_DEFAULT = 61792 +SC_MONITORPOWER = 61808 +SC_CONTEXTHELP = 61824 +SC_SEPARATOR = 61455 + +; Border types + +BDR_RAISEDOUTER = 01h +BDR_SUNKENOUTER = 02h +BDR_RAISEDINNER = 04h +BDR_SUNKENINNER = 08h +BDR_OUTER = 03h +BDR_INNER = 0Ch +BDR_RAISED = 05h +BDR_SUNKEN = 0Ah +EDGE_RAISED = BDR_RAISEDOUTER or BDR_RAISEDINNER +EDGE_SUNKEN = BDR_SUNKENOUTER or BDR_SUNKENINNER +EDGE_ETCHED = BDR_SUNKENOUTER or BDR_RAISEDINNER +EDGE_BUMP = BDR_RAISEDOUTER or BDR_SUNKENINNER + +; Border flags + +BF_LEFT = 0001h +BF_TOP = 0002h +BF_RIGHT = 0004h +BF_BOTTOM = 0008h +BF_TOPLEFT = BF_TOP or BF_LEFT +BF_TOPRIGHT = BF_TOP or BF_RIGHT +BF_BOTTOMLEFT = BF_BOTTOM or BF_LEFT +BF_BOTTOMRIGHT = BF_BOTTOM or BF_RIGHT +BF_RECT = BF_LEFT or BF_TOP or BF_RIGHT or BF_BOTTOM +BF_DIAGONAL = 0010h +BF_DIAGONAL_ENDTOPRIGHT = BF_DIAGONAL or BF_TOP or BF_RIGHT +BF_DIAGONAL_ENDTOPLEFT = BF_DIAGONAL or BF_TOP or BF_LEFT +BF_DIAGONAL_ENDBOTTOMLEFT = BF_DIAGONAL or BF_BOTTOM or BF_LEFT +BF_DIAGONAL_ENDBOTTOMRIGHT = BF_DIAGONAL or BF_BOTTOM or BF_RIGHT +BF_MIDDLE = 0800h +BF_SOFT = 1000h +BF_ADJUST = 2000h +BF_FLAT = 4000h +BF_MONO = 8000h + +; Frame control types + +DFC_CAPTION = 1 +DFC_MENU = 2 +DFC_SCROLL = 3 +DFC_BUTTON = 4 +DFC_POPUPMENU = 5 + +; Frame control states + +DFCS_CAPTIONCLOSE = 0000h +DFCS_CAPTIONMIN = 0001h +DFCS_CAPTIONMAX = 0002h +DFCS_CAPTIONRESTORE = 0003h +DFCS_CAPTIONHELP = 0004h +DFCS_MENUARROW = 0000h +DFCS_MENUCHECK = 0001h +DFCS_MENUBULLET = 0002h +DFCS_MENUARROWRIGHT = 0004h +DFCS_SCROLLUP = 0000h +DFCS_SCROLLDOWN = 0001h +DFCS_SCROLLLEFT = 0002h +DFCS_SCROLLRIGHT = 0003h +DFCS_SCROLLCOMBOBOX = 0005h +DFCS_SCROLLSIZEGRIP = 0008h +DFCS_SCROLLSIZEGRIPRIGHT = 0010h +DFCS_BUTTONCHECK = 0000h +DFCS_BUTTONRADIOIMAGE = 0001h +DFCS_BUTTONRADIOMASK = 0002h +DFCS_BUTTONRADIO = 0004h +DFCS_BUTTON3STATE = 0008h +DFCS_BUTTONPUSH = 0010h +DFCS_INACTIVE = 0100h +DFCS_PUSHED = 0200h +DFCS_CHECKED = 0400h +DFCS_TRANSPARENT = 0800h +DFCS_HOT = 1000h +DFCS_ADJUSTRECT = 2000h +DFCS_FLAT = 4000h +DFCS_MONO = 8000h + +; DrawCaption flags + +DC_ACTIVE = 01h +DC_SMALLCAP = 02h +DC_ICON = 04h +DC_TEXT = 08h +DC_INBUTTON = 10h + +; DrawIconEx options + +DI_MASK = 1 +DI_IMAGE = 2 +DI_NORMAL = 3 +DI_COMPAT = 4 +DI_DEFAULTSIZE = 8 + +; DrawText parameters + +DT_TOP = 00000h +DT_LEFT = 00000h +DT_CENTER = 00001h +DT_RIGHT = 00002h +DT_VCENTER = 00004h +DT_BOTTOM = 00008h +DT_WORDBREAK = 00010h +DT_SINGLELINE = 00020h +DT_EXPANDTABS = 00040h +DT_TABSTOP = 00080h +DT_NOCLIP = 00100h +DT_EXTERNALLEADING = 00200h +DT_CALCRECT = 00400h +DT_NOPREFIX = 00800h +DT_INTERNAL = 01000h +DT_EDITCONTROL = 02000h +DT_PATH_ELLIPSIS = 04000h +DT_END_ELLIPSIS = 08000h +DT_MODIFYSTRING = 10000h +DT_RTLREADING = 20000h +DT_WORD_ELLIPSIS = 40000h + +; GetDCEx flags + +DCX_WINDOW = 000001h +DCX_CACHE = 000002h +DCX_NORESETATTRS = 000004h +DCX_CLIPCHILDREN = 000008h +DCX_CLIPSIBLINGS = 000010h +DCX_PARENTCLIP = 000020h +DCX_EXCLUDERGN = 000040h +DCX_INTERSECTRGN = 000080h +DCX_EXCLUDEUPDATE = 000100h +DCX_INTERSECTUPDATE = 000200h +DCX_LOCKWINDOWUPDATE = 000400h +DCX_VALIDATE = 200000h + +; SetWindowsHook codes + +WH_MSGFILTER = -1 +WH_JOURNALRECORD = 0 +WH_JOURNALPLAYBACK = 1 +WH_KEYBOARD = 2 +WH_GETMESSAGE = 3 +WH_CALLWNDPROC = 4 +WH_CBT = 5 +WH_SYSMSGFILTER = 6 +WH_MOUSE = 7 +WH_HARDWARE = 8 +WH_DEBUG = 9 +WH_SHELL = 10 +WH_FOREGROUNDIDLE = 11 +WH_CALLWNDPROCRET = 12 +WH_KEYBOARD_LL = 13 +WH_MOUSE_LL = 14 + +; Hook codes + +HC_ACTION = 0 +HC_GETNEXT = 1 +HC_SKIP = 2 +HC_NOREMOVE = 3 +HC_SYSMODALON = 4 +HC_SYSMODALOFF = 5 + +; CBT hook codes + +HCBT_MOVESIZE = 0 +HCBT_MINMAX = 1 +HCBT_QS = 2 +HCBT_CREATEWND = 3 +HCBT_DESTROYWND = 4 +HCBT_ACTIVATE = 5 +HCBT_CLICKSKIPPED = 6 +HCBT_KEYSKIPPED = 7 +HCBT_SYSCOMMAND = 8 +HCBT_SETFOCUS = 9 + +; ExitWindowsEx flags + +EWX_LOGOFF = 0 +EWX_SHUTDOWN = 1 +EWX_REBOOT = 2 +EWX_FORCE = 4 +EWX_POWEROFF = 8 + +; WinHelp commands + +HELP_CONTEXT = 001h +HELP_QUIT = 002h +HELP_INDEX = 003h +HELP_CONTENTS = 003h +HELP_HELPONHELP = 004h +HELP_SETINDEX = 005h +HELP_SETCONTENTS = 005h +HELP_CONTEXTPOPUP = 008h +HELP_FORCEFILE = 009h +HELP_CONTEXTMENU = 00Ah +HELP_FINDER = 00Bh +HELP_WM_HELP = 00Ch +HELP_SETPOPUP_POS = 00Dh +HELP_KEY = 101h +HELP_COMMAND = 102h +HELP_PARTIALKEY = 105h +HELP_MULTIKEY = 201h +HELP_SETWINPOS = 203h + +; keybd_event flags + +KEYEVENTF_EXTENDEDKEY = 1h +KEYEVENTF_KEYUP = 2h + +; mouse_event flags + +MOUSEEVENTF_MOVE = 0001h +MOUSEEVENTF_LEFTDOWN = 0002h +MOUSEEVENTF_LEFTUP = 0004h +MOUSEEVENTF_RIGHTDOWN = 0008h +MOUSEEVENTF_RIGHTUP = 0010h +MOUSEEVENTF_MIDDLEDOWN = 0020h +MOUSEEVENTF_MIDDLEUP = 0040h +MOUSEEVENTF_WHEEL = 0800h +MOUSEEVENTF_ABSOLUTE = 8000h + +; TrackPopupMenu flags + +TPM_LEFTBUTTON = 0000h +TPM_RIGHTBUTTON = 0002h +TPM_LEFTALIGN = 0000h +TPM_CENTERALIGN = 0004h +TPM_RIGHTALIGN = 0008h +TPM_TOPALIGN = 0000h +TPM_VCENTERALIGN = 0010h +TPM_BOTTOMALIGN = 0020h +TPM_HORIZONTAL = 0000h +TPM_VERTICAL = 0040h +TPM_NONOTIFY = 0080h +TPM_RETURNCMD = 0100h +TPM_RECURSE = 0001h +TPM_HORPOSANIMATION = 0400h +TPM_HORNEGANIMATION = 0800h +TPM_VERPOSANIMATION = 1000h +TPM_VERNEGANIMATION = 2000h +TPM_NOANIMATION = 4000h +TPM_LAYOUTRTL = 8000h + +; Menu item info mask values + +MIIM_STATE = 001h +MIIM_ID = 002h +MIIM_SUBMENU = 004h +MIIM_CHECKMARKS = 008h +MIIM_TYPE = 010h +MIIM_DATA = 020h +MIIM_STRING = 040h +MIIM_BITMAP = 080h +MIIM_FTYPE = 100h + +; DRAWITEMSTRUCT control types + +ODT_MENU = 1 +ODT_LISTBOX = 2 +ODT_COMBOBOX = 3 +ODT_BUTTON = 4 +ODT_STATIC = 5 + +; DRAWITEMSTRUCT actions + +ODA_DRAWENTIRE = 1 +ODA_SELECT = 2 +ODA_FOCUS = 4 + +; DRAWITEMSTRUCT states + +ODS_SELECTED = 0001h +ODS_GRAYED = 0002h +ODS_DISABLED = 0004h +ODS_CHECKED = 0008h +ODS_FOCUS = 0010h +ODS_DEFAULT = 0020h +ODS_COMBOBOXEDIT = 1000h +ODS_HOTLIGHT = 0040h +ODS_INACTIVE = 0080h + +; WINDOWPLACEMENT flags + +WPF_SETMINPOSITION = 1 +WPF_RESTORETOMAXIMIZED = 2 + +; Layered window attributes + +LWA_COLORKEY = 1 +LWA_ALPHA = 2 + +; UpdateLayeredWindow flags + +ULW_COLORKEY = 1 +ULW_ALPHA = 2 +ULW_OPAQUE = 4 + +; SystemParametersInfo parameters + +SPI_GETACCESSTIMEOUT = 60 +SPI_GETANIMATION = 72 +SPI_GETBEEP = 1 +SPI_GETBORDER = 5 +SPI_GETDEFAULTINPUTLANG = 89 +SPI_GETDRAGFULLWINDOWS = 38 +SPI_GETFASTTASKSWITCH = 35 +SPI_GETFILTERKEYS = 50 +SPI_GETFONTSMOOTHING = 74 +SPI_GETGRIDGRANULARITY = 18 +SPI_GETHIGHCONTRAST = 66 +SPI_GETICONMETRICS = 45 +SPI_GETICONTITLELOGFONT = 31 +SPI_GETICONTITLEWRAP = 25 +SPI_GETKEYBOARDDELAY = 22 +SPI_GETKEYBOARDPREF = 68 +SPI_GETKEYBOARDSPEED = 10 +SPI_GETLOWPOWERACTIVE = 83 +SPI_GETLOWPOWERTIMEOUT = 79 +SPI_GETMENUDROPALIGNMENT = 27 +SPI_GETMINIMIZEDMETRICS = 43 +SPI_GETMOUSE = 3 +SPI_GETMOUSEKEYS = 54 +SPI_GETMOUSETRAILS = 94 +SPI_GETNONCLIENTMETRICS = 41 +SPI_GETPOWEROFFACTIVE = 84 +SPI_GETPOWEROFFTIMEOUT = 80 +SPI_GETSCREENREADER = 70 +SPI_GETSCREENSAVEACTIVE = 16 +SPI_GETSCREENSAVETIMEOUT = 14 +SPI_GETSERIALKEYS = 62 +SPI_GETSHOWSOUNDS = 56 +SPI_GETSOUNDSENTRY = 64 +SPI_GETSTICKYKEYS = 58 +SPI_GETTOGGLEKEYS = 52 +SPI_GETWINDOWSEXTENSION = 92 +SPI_GETWORKAREA = 48 +SPI_ICONHORIZONTALSPACING = 13 +SPI_ICONVERTICALSPACING = 24 +SPI_LANGDRIVER = 12 +SPI_SCREENSAVERRUNNING = 97 +SPI_SETACCESSTIMEOUT = 61 +SPI_SETANIMATION = 73 +SPI_SETBEEP = 2 +SPI_SETBORDER = 6 +SPI_SETDEFAULTINPUTLANG = 90 +SPI_SETDESKPATTERN = 21 +SPI_SETDESKWALLPAPER = 20 +SPI_SETDOUBLECLICKTIME = 32 +SPI_SETDOUBLECLKHEIGHT = 30 +SPI_SETDOUBLECLKWIDTH = 29 +SPI_SETDRAGFULLWINDOWS = 37 +SPI_SETDRAGHEIGHT = 77 +SPI_SETDRAGWIDTH = 76 +SPI_SETFASTTASKSWITCH = 36 +SPI_SETFILTERKEYS = 51 +SPI_SETFONTSMOOTHING = 75 +SPI_SETGRIDGRANULARITY = 19 +SPI_SETHANDHELD = 78 +SPI_SETHIGHCONTRAST = 67 +SPI_SETICONMETRICS = 46 +SPI_SETICONTITLELOGFONT = 34 +SPI_SETICONTITLEWRAP = 26 +SPI_SETKEYBOARDDELAY = 23 +SPI_SETKEYBOARDPREF = 69 +SPI_SETKEYBOARDSPEED = 11 +SPI_SETLANGTOGGLE = 91 +SPI_SETLOWPOWERACTIVE = 85 +SPI_SETLOWPOWERTIMEOUT = 81 +SPI_SETMENUDROPALIGNMENT = 28 +SPI_SETMINIMIZEDMETRICS = 44 +SPI_SETMOUSE = 4 +SPI_SETMOUSEBUTTONSWAP = 33 +SPI_SETMOUSEKEYS = 55 +SPI_SETMOUSETRAILS = 93 +SPI_SETNONCLIENTMETRICS = 42 +SPI_SETPENWINDOWS = 49 +SPI_SETPOWEROFFACTIVE = 86 +SPI_SETPOWEROFFTIMEOUT = 82 +SPI_SETSCREENREADER = 71 +SPI_SETSCREENSAVEACTIVE = 17 +SPI_SETSCREENSAVERRUNNING = 97 +SPI_SETSCREENSAVETIMEOUT = 15 +SPI_SETSERIALKEYS = 63 +SPI_SETSHOWSOUNDS = 57 +SPI_SETSOUNDSENTRY = 65 +SPI_SETSTICKYKEYS = 59 +SPI_SETTOGGLEKEYS = 53 +SPI_SETWORKAREA = 47 + +; SystemParametersInfo flags + +SPIF_UPDATEINIFILE = 1 +SPIF_SENDWININICHANGE = 2 + +; Gesture Information Flags + +GF_BEGIN = 1 +GF_INERTIA = 2 +GF_END = 4 + +; Gesture IDs + +GID_BEGIN = 1 +GID_END = 2 +GID_ZOOM = 3 +GID_PAN = 4 +GID_ROTATE = 5 +GID_TWOFINGERTAP = 6 +GID_PRESSANDTAP = 7 +GID_ROLLOVER = GID_PRESSANDTAP + +; Zoom Gesture Confiration Flags + +GC_ZOOM = 0x00000001 + +; Pan Gesture Configuration Flags + +GC_PAN = 0x00000001 +GC_PAN_WITH_SINGLE_FINGER_VERTICALLY = 0x00000002 +GC_PAN_WITH_SINGLE_FINGER_HORIZONTALLY = 0x00000004 +GC_PAN_WITH_GUTTER = 0x00000008 +GC_PAN_WITH_INERTIA = 0x00000010 + +; Rotate Gesture Configuration Flags + +GC_ROTATE = 0x00000001 + +; Two finger tap configuration flags + +GC_TWOFINGERTAP = 0x00000001 + +; Press and tap Configuration Flags + +GC_PRESSANDTAP = 0x00000001 +GC_ROLLOVER = GC_PRESSANDTAP diff --git a/asm/equihash/Windows/INCLUDE/EQUATES/USER64.INC b/asm/equihash/Windows/INCLUDE/EQUATES/USER64.INC new file mode 100644 index 0000000..67a09d1 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/EQUATES/USER64.INC @@ -0,0 +1,1935 @@ + +; USER32.DLL structures and constants + +struct POINT + x dd ? + y dd ? +ends + +struct POINTS + x dw ? + y dw ? +ends + +struct RECT + left dd ? + top dd ? + right dd ? + bottom dd ? +ends + +struct WNDCLASS + style dd ?,? + lpfnWndProc dq ? + cbClsExtra dd ? + cbWndExtra dd ? + hInstance dq ? + hIcon dq ? + hCursor dq ? + hbrBackground dq ? + lpszMenuName dq ? + lpszClassName dq ? +ends + +struct WNDCLASSEX + cbSize dd ? + style dd ? + lpfnWndProc dq ? + cbClsExtra dd ? + cbWndExtra dd ? + hInstance dq ? + hIcon dq ? + hCursor dq ? + hbrBackground dq ? + lpszMenuName dq ? + lpszClassName dq ? + hIconSm dq ? +ends + +struct CREATESTRUCT + lpCreateParams dq ? + hInstance dq ? + hMenu dq ? + hwndParent dq ? + cy dd ? + cx dd ? + y dd ? + x dd ? + style dd ?,? + lpszName dq ? + lpszClass dq ? + dwExStyle dd ?,? +ends + +struct CLIENTCREATESTRUCT + hWindowMenu dq ? + idFirstChild dd ? +ends + +struct MDICREATESTRUCT + szClass dq ? + szTitle dq ? + hOwner dq ? + x dd ? + y dd ? + cx dd ? + cy dd ? + style dd ? + lParam dd ? +ends + +struct SCROLLINFO + cbSize dd ? + fMask dd ? + nMin dd ? + nMax dd ? + nPage dd ? + nPos dd ? + nTrackPos dd ? +ends + +struct MSG + hwnd dq ? + message dd ?,? + wParam dq ? + lParam dq ? + time dd ? + pt POINT + dd ? +ends + +struct MINMAXINFO + ptReserved POINT + ptMaxSize POINT + ptMaxPosition POINT + ptMinTrackSize POINT + ptMaxTrackSize POINT +ends + +struct WINDOWPLACEMENT + length dd ? + flags dd ? + showCmd dd ? + ptMinPosition POINT + ptMaxPosition POINT + rcNormalPosition RECT +ends + +struct WINDOWPOS + hwnd dq ? + hwndInsertAfter dq ? + x dd ? + y dd ? + cx dd ? + cy dd ? + flags dd ? +ends + +struct NMHDR + hwndFrom dq ? + idFrom dq ? + code dd ?,? +ends + +struct COPYDATASTRUCT + dwData dq ? + cbData dd ? + lpData dq ? +ends + +struct ACCEL + fVirt dw ? + key dw ? + cmd dw ? +ends + +struct PAINTSTRUCT + hdc dq ? + fErase dd ? + rcPaint RECT + fRestore dd ? + fIncUpdate dd ? + rgbReserved db 36 dup (?) +ends + +struct DRAWTEXTPARAMS + cbSize dd ? + iTabLength dd ? + iLeftMargin dd ? + iRightMargin dd ? + uiLengthDrawn dd ?,? +ends + +struct DRAWITEMSTRUCT + CtlType dd ? + CtlID dd ? + itemID dd ? + itemAction dd ? + itemState dd ?,? + hwndItem dq ? + hDC dq ? + rcItem RECT + itemData dd ?,? +ends + +struct MENUITEMINFO + cbSize dd ? + fMask dd ? + fType dd ? + fState dd ? + wID dd ?,? + hSubMenu dq ? + hbmpChecked dq ? + hbmpUnchecked dq ? + dwItemData dq ? + dwTypeData dq ? + cch dd ?,? + hbmpItem dq ? +ends + +struct MEASUREITEMSTRUCT + CtlType dd ? + CtlID dd ? + itemID dd ? + itemWidth dd ? + itemHeight dd ? + itemData dq ? +ends + +struct MSGBOXPARAMS + cbSize dd ?,? + hwndOwner dq ? + hInstance dq ? + lpszText dd ? + lpszCaption dd ? + dwStyle dd ?,? + lpszIcon dq ? + dwContextHelpId dd ?,? + lpfnMsgBoxCallback dq ? + dwLanguageId dd ?,? +ends + +struct GESTURECONFIG + dwID dd ? + dwWant dd ? + dwBlock dd ? +ends + +struct GESTUREINFO + cbSize dd ? + dwFlags dd ? + dwID dd ? + hwndTarget dd ? + ptsLocation POINTS + dwInstanceID dd ? + dwSequenceID dd ?,? + ullArguments dq ? + cbExtraArgs dd ?,? +ends + +; MessageBox type flags + +MB_OK = 000000h +MB_OKCANCEL = 000001h +MB_ABORTRETRYIGNORE = 000002h +MB_YESNOCANCEL = 000003h +MB_YESNO = 000004h +MB_RETRYCANCEL = 000005h +MB_ICONHAND = 000010h +MB_ICONQUESTION = 000020h +MB_ICONEXCLAMATION = 000030h +MB_ICONASTERISK = 000040h +MB_USERICON = 000080h +MB_ICONWARNING = MB_ICONEXCLAMATION +MB_ICONERROR = MB_ICONHAND +MB_ICONINFORMATION = MB_ICONASTERISK +MB_ICONSTOP = MB_ICONHAND +MB_DEFBUTTON1 = 000000h +MB_DEFBUTTON2 = 000100h +MB_DEFBUTTON3 = 000200h +MB_DEFBUTTON4 = 000300h +MB_APPLMODAL = 000000h +MB_SYSTEMMODAL = 001000h +MB_TASKMODAL = 002000h +MB_HELP = 004000h +MB_NOFOCUS = 008000h +MB_SETFOREGROUND = 010000h +MB_DEFAULT_DESKTOP_ONLY = 020000h +MB_TOPMOST = 040000h +MB_RIGHT = 080000h +MB_RTLREADING = 100000h +MB_SERVICE_NOTIFICATION = 200000h + +; Conventional dialog box and message box command IDs + +IDOK = 1 +IDCANCEL = 2 +IDABORT = 3 +IDRETRY = 4 +IDIGNORE = 5 +IDYES = 6 +IDNO = 7 +IDCLOSE = 8 +IDHELP = 9 + +; Class styles + +CS_VREDRAW = 00001h +CS_HREDRAW = 00002h +CS_KEYCVTWINDOW = 00004h +CS_DBLCLKS = 00008h +CS_OWNDC = 00020h +CS_CLASSDC = 00040h +CS_PARENTDC = 00080h +CS_NOKEYCVT = 00100h +CS_SAVEBITS = 00800h +CS_NOCLOSE = 00200h +CS_BYTEALIGNCLIENT = 01000h +CS_BYTEALIGNWINDOW = 02000h +CS_PUBLICCLASS = 04000h +CS_GLOBALCLASS = CS_PUBLICCLASS +CS_IME = 10000h + +; Windows styles + +WS_OVERLAPPED = 000000000h +WS_ICONICPOPUP = 0C0000000h +WS_POPUP = 080000000h +WS_CHILD = 040000000h +WS_MINIMIZE = 020000000h +WS_VISIBLE = 010000000h +WS_DISABLED = 008000000h +WS_CLIPSIBLINGS = 004000000h +WS_CLIPCHILDREN = 002000000h +WS_MAXIMIZE = 001000000h +WS_CAPTION = 000C00000h +WS_BORDER = 000800000h +WS_DLGFRAME = 000400000h +WS_VSCROLL = 000200000h +WS_HSCROLL = 000100000h +WS_SYSMENU = 000080000h +WS_THICKFRAME = 000040000h +WS_HREDRAW = 000020000h +WS_VREDRAW = 000010000h +WS_GROUP = 000020000h +WS_TABSTOP = 000010000h +WS_MINIMIZEBOX = 000020000h +WS_MAXIMIZEBOX = 000010000h + +; Common Window Styles + +WS_OVERLAPPEDWINDOW = WS_OVERLAPPED or WS_CAPTION or WS_SYSMENU or WS_THICKFRAME or WS_MINIMIZEBOX or WS_MAXIMIZEBOX +WS_POPUPWINDOW = WS_POPUP or WS_BORDER or WS_SYSMENU +WS_CHILDWINDOW = WS_CHILD +WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW +WS_TILED = WS_OVERLAPPED +WS_ICONIC = WS_MINIMIZE +WS_SIZEBOX = WS_THICKFRAME + +; Extended Window Styles + +WS_EX_DLGMODALFRAME = 00001h +WS_EX_DRAGOBJECT = 00002h +WS_EX_NOPARENTNOTIFY = 00004h +WS_EX_TOPMOST = 00008h +WS_EX_ACCEPTFILES = 00010h +WS_EX_TRANSPARENT = 00020h +WS_EX_MDICHILD = 00040h +WS_EX_TOOLWINDOW = 00080h +WS_EX_WINDOWEDGE = 00100h +WS_EX_CLIENTEDGE = 00200h +WS_EX_CONTEXTHELP = 00400h +WS_EX_RIGHT = 01000h +WS_EX_LEFT = 00000h +WS_EX_RTLREADING = 02000h +WS_EX_LTRREADING = 00000h +WS_EX_LEFTSCROLLBAR = 04000h +WS_EX_RIGHTSCROLLBAR = 00000h +WS_EX_CONTROLPARENT = 10000h +WS_EX_STATICEDGE = 20000h +WS_EX_APPWINDOW = 40000h +WS_EX_LAYERED = 80000h +WS_EX_OVERLAPPEDWINDOW = WS_EX_WINDOWEDGE or WS_EX_CLIENTEDGE +WS_EX_PALETTEWINDOW = WS_EX_WINDOWEDGE or WS_EX_TOOLWINDOW or WS_EX_TOPMOST + +; MDI client style bits + +MDIS_ALLCHILDSTYLES = 1 + +; Special CreateWindow position value + +CW_USEDEFAULT = 80000000h + +; Predefined window handle + +HWND_DESKTOP = 0 + +; ShowWindow commands + +SW_HIDE = 0 +SW_SHOWNORMAL = 1 +SW_NORMAL = 1 +SW_SHOWMINIMIZED = 2 +SW_SHOWMAXIMIZED = 3 +SW_MAXIMIZE = 3 +SW_SHOWNOACTIVATE = 4 +SW_SHOW = 5 +SW_MINIMIZE = 6 +SW_SHOWMINNOACTIVE = 7 +SW_SHOWNA = 8 +SW_RESTORE = 9 +SW_SHOWDEFAULT = 10 + +; SetWindowPos flags + +SWP_NOSIZE = 0001h +SWP_NOMOVE = 0002h +SWP_NOZORDER = 0004h +SWP_NOREDRAW = 0008h +SWP_NOACTIVATE = 0010h +SWP_DRAWFRAME = 0020h +SWP_SHOWWINDOW = 0040h +SWP_HIDEWINDOW = 0080h +SWP_NOCOPYBITS = 0100h +SWP_NOREPOSITION = 0200h +SWP_DEFERERASE = 2000h +SWP_ASYNCWINDOWPOS = 4000h + +; SetWindowPos special handle values + +HWND_TOP = 0 +HWND_BOTTOM = 1 +HWND_TOPMOST = -1 +HWND_NOTOPMOST = -2 + +; GetWindow flags + +GW_HWNDFIRST = 0 +GW_HWNDLAST = 1 +GW_HWNDNEXT = 2 +GW_HWNDPREV = 3 +GW_OWNER = 4 +GW_CHILD = 5 + +; RedrawWindow flags + +RDW_INVALIDATE = 0001h +RDW_INTERNALPAINT = 0002h +RDW_ERASE = 0004h +RDW_VALIDATE = 0008h +RDW_NOINTERNALPAINT = 0010h +RDW_NOERASE = 0020h +RDW_NOCHILDREN = 0040h +RDW_ALLCHILDREN = 0080h +RDW_UPDATENOW = 0100h +RDW_ERASENOW = 0200h +RDW_FRAME = 0400h +RDW_NOFRAME = 0800h + +; PeekMessage Options + +PM_NOREMOVE = 0000h +PM_REMOVE = 0001h +PM_NOYIELD = 0002h + +; Window state messages + +WM_STATE = 0000h +WM_NULL = 0000h +WM_CREATE = 0001h +WM_DESTROY = 0002h +WM_MOVE = 0003h +WM_SIZE = 0005h +WM_ACTIVATE = 0006h +WM_SETFOCUS = 0007h +WM_KILLFOCUS = 0008h +WM_ENABLE = 000Ah +WM_SETREDRAW = 000Bh +WM_SETTEXT = 000Ch +WM_GETTEXT = 000Dh +WM_GETTEXTLENGTH = 000Eh +WM_PAINT = 000Fh +WM_CLOSE = 0010h +WM_QUERYENDSESSION = 0011h +WM_QUIT = 0012h +WM_QUERYOPEN = 0013h +WM_ERASEBKGND = 0014h +WM_SYSCOLORCHANGE = 0015h +WM_ENDSESSION = 0016h +WM_SYSTEMERROR = 0017h +WM_SHOWWINDOW = 0018h +WM_CTLCOLOR = 0019h +WM_WININICHANGE = 001Ah +WM_DEVMODECHANGE = 001Bh +WM_ACTIVATEAPP = 001Ch +WM_FONTCHANGE = 001Dh +WM_TIMECHANGE = 001Eh +WM_CANCELMODE = 001Fh +WM_SETCURSOR = 0020h +WM_MOUSEACTIVATE = 0021h +WM_CHILDACTIVATE = 0022h +WM_QUEUESYNC = 0023h +WM_GETMINMAXINFO = 0024h +WM_PAINTICON = 0026h +WM_ICONERASEBKGND = 0027h +WM_NEXTDLGCTL = 0028h +WM_SPOOLERSTATUS = 002Ah +WM_DRAWITEM = 002Bh +WM_MEASUREITEM = 002Ch +WM_DELETEITEM = 002Dh +WM_VKEYTOITEM = 002Eh +WM_CHARTOITEM = 002Fh +WM_SETFONT = 0030h +WM_GETFONT = 0031h +WM_SETHOTKEY = 0032h +WM_QUERYDRAGICON = 0037h +WM_COMPAREITEM = 0039h +WM_COMPACTING = 0041h +WM_COMMNOTIFY = 0044h +WM_WINDOWPOSCHANGING = 0046h +WM_WINDOWPOSCHANGED = 0047h +WM_POWER = 0048h +WM_COPYDATA = 004Ah +WM_CANCELJOURNAL = 004Bh +WM_NOTIFY = 004Eh +WM_INPUTLANGCHANGEREQUEST = 0050h +WM_INPUTLANGCHANGE = 0051h +WM_TCARD = 0052h +WM_HELP = 0053h +WM_USERCHANGED = 0054h +WM_NOTIFYFORMAT = 0055h +WM_CONTEXTMENU = 007Bh +WM_STYLECHANGING = 007Ch +WM_STYLECHANGED = 007Dh +WM_DISPLAYCHANGE = 007Eh +WM_GETICON = 007Fh +WM_SETICON = 0080h +WM_NCCREATE = 0081h +WM_NCDESTROY = 0082h +WM_NCCALCSIZE = 0083h +WM_NCHITTEST = 0084h +WM_NCPAINT = 0085h +WM_NCACTIVATE = 0086h +WM_GETDLGCODE = 0087h +WM_NCMOUSEMOVE = 00A0h +WM_NCLBUTTONDOWN = 00A1h +WM_NCLBUTTONUP = 00A2h +WM_NCLBUTTONDBLCLK = 00A3h +WM_NCRBUTTONDOWN = 00A4h +WM_NCRBUTTONUP = 00A5h +WM_NCRBUTTONDBLCLK = 00A6h +WM_NCMBUTTONDOWN = 00A7h +WM_NCMBUTTONUP = 00A8h +WM_NCMBUTTONDBLCLK = 00A9h +WM_KEYFIRST = 0100h +WM_KEYDOWN = 0100h +WM_KEYUP = 0101h +WM_CHAR = 0102h +WM_DEADCHAR = 0103h +WM_SYSKEYDOWN = 0104h +WM_SYSKEYUP = 0105h +WM_SYSCHAR = 0106h +WM_SYSDEADCHAR = 0107h +WM_KEYLAST = 0108h +WM_INITDIALOG = 0110h +WM_COMMAND = 0111h +WM_SYSCOMMAND = 0112h +WM_TIMER = 0113h +WM_HSCROLL = 0114h +WM_VSCROLL = 0115h +WM_INITMENU = 0116h +WM_INITMENUPOPUP = 0117h +WM_GESTURE = 0119h +WM_GESTURENOTIFY = 011Ah +WM_MENUSELECT = 011Fh +WM_MENUCHAR = 0120h +WM_ENTERIDLE = 0121h +WM_MENURBUTTONUP = 0122h +WM_MENUDRAG = 0123h +WM_MENUGETOBJECT = 0124h +WM_UNINITMENUPOPUP = 0125h +WM_MENUCOMMAND = 0126h +WM_CTLCOLORMSGBOX = 0132h +WM_CTLCOLOREDIT = 0133h +WM_CTLCOLORLISTBOX = 0134h +WM_CTLCOLORBTN = 0135h +WM_CTLCOLORDLG = 0136h +WM_CTLCOLORSCROLLBAR = 0137h +WM_CTLCOLORSTATIC = 0138h +WM_MOUSEFIRST = 0200h +WM_MOUSEMOVE = 0200h +WM_LBUTTONDOWN = 0201h +WM_LBUTTONUP = 0202h +WM_LBUTTONDBLCLK = 0203h +WM_RBUTTONDOWN = 0204h +WM_RBUTTONUP = 0205h +WM_RBUTTONDBLCLK = 0206h +WM_MBUTTONDOWN = 0207h +WM_MBUTTONUP = 0208h +WM_MBUTTONDBLCLK = 0209h +WM_MOUSEWHEEL = 020Ah +WM_MOUSELAST = 020Ah +WM_PARENTNOTIFY = 0210h +WM_ENTERMENULOOP = 0211h +WM_EXITMENULOOP = 0212h +WM_NEXTMENU = 0213h +WM_SIZING = 0214h +WM_CAPTURECHANGED = 0215h +WM_MOVING = 0216h +WM_POWERBROADCAST = 0218h +WM_DEVICECHANGE = 0219h +WM_MDICREATE = 0220h +WM_MDIDESTROY = 0221h +WM_MDIACTIVATE = 0222h +WM_MDIRESTORE = 0223h +WM_MDINEXT = 0224h +WM_MDIMAXIMIZE = 0225h +WM_MDITILE = 0226h +WM_MDICASCADE = 0227h +WM_MDIICONARRANGE = 0228h +WM_MDIGETACTIVE = 0229h +WM_MDISETMENU = 0230h +WM_ENTERSIZEMOVE = 0231h +WM_EXITSIZEMOVE = 0232h +WM_DROPFILES = 0233h +WM_MDIREFRESHMENU = 0234h +WM_IME_SETCONTEXT = 0281h +WM_IME_NOTIFY = 0282h +WM_IME_CONTROL = 0283h +WM_IME_COMPOSITIONFULL = 0284h +WM_IME_SELECT = 0285h +WM_IME_CHAR = 0286h +WM_IME_KEYDOWN = 0290h +WM_IME_KEYUP = 0291h +WM_MOUSEHOVER = 02A1h +WM_MOUSELEAVE = 02A3h +WM_CUT = 0300h +WM_COPY = 0301h +WM_PASTE = 0302h +WM_CLEAR = 0303h +WM_UNDO = 0304h +WM_RENDERFORMAT = 0305h +WM_RENDERALLFORMATS = 0306h +WM_DESTROYCLIPBOARD = 0307h +WM_DRAWCLIPBOARD = 0308h +WM_PAINTCLIPBOARD = 0309h +WM_VSCROLLCLIPBOARD = 030Ah +WM_SIZECLIPBOARD = 030Bh +WM_ASKCBFORMATNAME = 030Ch +WM_CHANGECBCHAIN = 030Dh +WM_HSCROLLCLIPBOARD = 030Eh +WM_QUERYNEWPALETTE = 030Fh +WM_PALETTEISCHANGING = 0310h +WM_PALETTECHANGED = 0311h +WM_HOTKEY = 0312h +WM_PRINT = 0317h +WM_PRINTCLIENT = 0318h +WM_HANDHELDFIRST = 0358h +WM_HANDHELDLAST = 035Fh +WM_AFXFIRST = 0360h +WM_AFXLAST = 037Fh +WM_PENWINFIRST = 0380h +WM_PENWINLAST = 038Fh +WM_COALESCE_FIRST = 0390h +WM_COALESCE_LAST = 039Fh +WM_USER = 0400h + +; WM_SIZE commands + +SIZE_RESTORED = 0 +SIZE_MINIMIZED = 1 +SIZE_MAXIMIZED = 2 +SIZE_MAXSHOW = 3 +SIZE_MAXHIDE = 4 + +; WM_ACTIVATE states + +WA_INACTIVE = 0 +WA_ACTIVE = 1 +WA_CLICKACTIVE = 2 + +; WM_SHOWWINDOW identifiers + +SW_PARENTCLOSING = 1 +SW_OTHERZOOM = 2 +SW_PARENTOPENING = 3 +SW_OTHERUNZOOM = 4 + +; WM_MOUSEACTIVATE return codes + +MA_ACTIVATE = 1 +MA_ACTIVATEANDEAT = 2 +MA_NOACTIVATE = 3 +MA_NOACTIVATEANDEAT = 4 + +; WM_MDITILE flags + +MDITILE_VERTICAL = 0 +MDITILE_HORIZONTAL = 1 +MDITILE_SKIPDISABLED = 2 + +; WM_NOTIFY codes + +NM_OUTOFMEMORY = -1 +NM_CLICK = -2 +NM_DBLCLICK = -3 +NM_RETURN = -4 +NM_RCLICK = -5 +NM_RDBLCLK = -6 +NM_SETFOCUS = -7 +NM_KILLFOCUS = -8 + +; WM_SETICON types + +ICON_SMALL = 0 +ICON_BIG = 1 + +; WM_HOTKEY commands + +HOTKEYF_SHIFT = 01h +HOTKEYF_CONTROL = 02h +HOTKEYF_ALT = 04h +HOTKEYF_EXT = 08h + +; Keystroke flags + +KF_EXTENDED = 0100h +KF_DLGMODE = 0800h +KF_MENUMODE = 1000h +KF_ALTDOWN = 2000h +KF_REPEAT = 4000h +KF_UP = 8000h + +; Key state masks for mouse messages + +MK_LBUTTON = 01h +MK_RBUTTON = 02h +MK_SHIFT = 04h +MK_CONTROL = 08h +MK_MBUTTON = 10h + +; WM_SIZING codes + +WMSZ_LEFT = 1 +WMSZ_RIGHT = 2 +WMSZ_TOP = 3 +WMSZ_TOPLEFT = 4 +WMSZ_TOPRIGHT = 5 +WMSZ_BOTTOM = 6 +WMSZ_BOTTOMLEFT = 7 +WMSZ_BOTTOMRIGHT = 8 + +; WM_HOTKEY modifiers + +MOD_ALT = 1 +MOD_CONTROL = 2 +MOD_SHIFT = 4 +MOD_WIN = 8 + +; WM_PRINT flags + +PRF_CHECKVISIBLE = 01h +PRF_NONCLIENT = 02h +PRF_CLIENT = 04h +PRF_ERASEBKGND = 08h +PRF_CHILDREN = 10h +PRF_OWNED = 20h + +; Virtual key codes + +VK_LBUTTON = 001h +VK_CANCEL = 003h +VK_RBUTTON = 002h +VK_MBUTTON = 004h +VK_BACK = 008h +VK_TAB = 009h +VK_CLEAR = 00Ch +VK_RETURN = 00Dh +VK_SHIFT = 010h +VK_CONTROL = 011h +VK_MENU = 012h +VK_PAUSE = 013h +VK_CAPITAL = 014h +VK_ESCAPE = 01Bh +VK_SPACE = 020h +VK_PRIOR = 021h +VK_PGUP = 021h +VK_PGDN = 022h +VK_NEXT = 022h +VK_END = 023h +VK_HOME = 024h +VK_LEFT = 025h +VK_UP = 026h +VK_RIGHT = 027h +VK_DOWN = 028h +VK_SELECT = 029h +VK_PRINT = 02Ah +VK_EXECUTE = 02Bh +VK_SNAPSHOT = 02Ch +VK_INSERT = 02Dh +VK_DELETE = 02Eh +VK_HELP = 02Fh +VK_LWIN = 05Bh +VK_RWIN = 05Ch +VK_APPS = 05Dh +VK_NUMPAD0 = 060h +VK_NUMPAD1 = 061h +VK_NUMPAD2 = 062h +VK_NUMPAD3 = 063h +VK_NUMPAD4 = 064h +VK_NUMPAD5 = 065h +VK_NUMPAD6 = 066h +VK_NUMPAD7 = 067h +VK_NUMPAD8 = 068h +VK_NUMPAD9 = 069h +VK_MULTIPLY = 06Ah +VK_ADD = 06Bh +VK_SEPARATOR = 06Ch +VK_SUBTRACT = 06Dh +VK_DECIMAL = 06Eh +VK_DIVIDE = 06Fh +VK_F1 = 070h +VK_F2 = 071h +VK_F3 = 072h +VK_F4 = 073h +VK_F5 = 074h +VK_F6 = 075h +VK_F7 = 076h +VK_F8 = 077h +VK_F9 = 078h +VK_F10 = 079h +VK_F11 = 07Ah +VK_F12 = 07Bh +VK_F13 = 07Ch +VK_F14 = 07Dh +VK_F15 = 07Eh +VK_F16 = 07Fh +VK_F17 = 080h +VK_F18 = 081h +VK_F19 = 082h +VK_F20 = 083h +VK_F21 = 084h +VK_F22 = 085h +VK_F23 = 086h +VK_F24 = 087h +VK_NUMLOCK = 090h +VK_SCROLL = 091h +VK_LSHIFT = 0A0h +VK_RSHIFT = 0A1h +VK_LCONTROL = 0A2h +VK_RCONTROL = 0A3h +VK_LMENU = 0A4h +VK_RMENU = 0A5h +VK_ATTN = 0F6h +VK_CRSEL = 0F7h +VK_EXSEL = 0F8h +VK_EREOF = 0F9h +VK_PLAY = 0FAh +VK_ZOOM = 0FBh +VK_NONAME = 0FCh +VK_PA1 = 0FDh +VK_OEM_CLEAR = 0FEh + +; Accelerator flags + +FVIRTKEY = 01h +FNOINVERT = 02h +FSHIFT = 04h +FCONTROL = 08h +FALT = 10h + +; GetClassLong offsets + +GCL_MENUNAME = -8 +GCL_HBRBACKGROUND = -10 +GCL_HCURSOR = -12 +GCL_HICON = -14 +GCL_HMODULE = -16 +GCL_CBWNDEXTRA = -18 +GCL_CBCLSEXTRA = -20 +GCL_WNDPROC = -24 +GCL_STYLE = -26 +GCW_ATOM = -32 +GCL_HICONSM = -34 + +; WNDCLASS parameters + +DLGWINDOWEXTRA = 30 + +; GetWindowLong offsets + +GWLP_WNDPROC = -4 +GWLP_HINSTANCE = -6 +GWLP_HWNDPARENT = -8 +GWLP_ID = -12 +GWLP_STYLE = -16 +GWLP_EXSTYLE = -20 +GWLP_USERDATA = -21 +DWLP_MSGRESULT = 0 +DWLP_DLGPROC = 8 +DWLP_USER = 16 + +; GetSystemMetrics codes + +SM_CXSCREEN = 0 +SM_CYSCREEN = 1 +SM_CXVSCROLL = 2 +SM_CYHSCROLL = 3 +SM_CYCAPTION = 4 +SM_CXBORDER = 5 +SM_CYBORDER = 6 +SM_CXDLGFRAME = 7 +SM_CYDLGFRAME = 8 +SM_CYVTHUMB = 9 +SM_CXHTHUMB = 10 +SM_CXICON = 11 +SM_CYICON = 12 +SM_CXCURSOR = 13 +SM_CYCURSOR = 14 +SM_CYMENU = 15 +SM_CXFULLSCREEN = 16 +SM_CYFULLSCREEN = 17 +SM_CYKANJIWINDOW = 18 +SM_MOUSEPRESENT = 19 +SM_CYVSCROLL = 20 +SM_CXHSCROLL = 21 +SM_DEBUG = 22 +SM_SWAPBUTTON = 23 +SM_RESERVED1 = 24 +SM_RESERVED2 = 25 +SM_RESERVED3 = 26 +SM_RESERVED4 = 27 +SM_CXMIN = 28 +SM_CYMIN = 29 +SM_CXSIZE = 30 +SM_CYSIZE = 31 +SM_CXFRAME = 32 +SM_CYFRAME = 33 +SM_CXMINTRACK = 34 +SM_CYMINTRACK = 35 +SM_CXDOUBLECLK = 36 +SM_CYDOUBLECLK = 37 +SM_CXICONSPACING = 38 +SM_CYICONSPACING = 39 +SM_MENUDROPALIGNMENT = 40 +SM_PENWINDOWS = 41 +SM_DBCSENABLED = 42 +SM_CMOUSEBUTTONS = 43 +SM_CXFIXEDFRAME = SM_CXDLGFRAME +SM_CYFIXEDFRAME = SM_CYDLGFRAME +SM_CXSIZEFRAME = SM_CXFRAME +SM_CYSIZEFRAME = SM_CYFRAME +SM_SECURE = 44 +SM_CXEDGE = 45 +SM_CYEDGE = 46 +SM_CXMINSPACING = 47 +SM_CYMINSPACING = 48 +SM_CXSMICON = 49 +SM_CYSMICON = 50 +SM_CYSMCAPTION = 51 +SM_CXSMSIZE = 52 +SM_CYSMSIZE = 53 +SM_CXMENUSIZE = 54 +SM_CYMENUSIZE = 55 +SM_ARRANGE = 56 +SM_CXMINIMIZED = 57 +SM_CYMINIMIZED = 58 +SM_CXMAXTRACK = 59 +SM_CYMAXTRACK = 60 +SM_CXMAXIMIZED = 61 +SM_CYMAXIMIZED = 62 +SM_NETWORK = 63 +SM_CLEANBOOT = 67 +SM_CXDRAG = 68 +SM_CYDRAG = 69 +SM_SHOWSOUNDS = 70 +SM_CXMENUCHECK = 71 +SM_CYMENUCHECK = 72 +SM_SLOWMACHINE = 73 +SM_MIDEASTENABLED = 74 +SM_MOUSEWHEELPRESENT = 75 +SM_CMETRICS = 76 + +; Predefined cursor identifiers + +IDC_ARROW = 32512 +IDC_IBEAM = 32513 +IDC_WAIT = 32514 +IDC_CROSS = 32515 +IDC_UPARROW = 32516 +IDC_SIZE = 32640 +IDC_ICON = 32641 +IDC_SIZENWSE = 32642 +IDC_SIZENESW = 32643 +IDC_SIZEWE = 32644 +IDC_SIZENS = 32645 +IDC_NO = 32648 +IDC_HAND = 32649 +IDC_APPSTARTING = 32650 +IDC_HELP = 32651 + +; Predefined icon identifiers + +IDI_APPLICATION = 32512 +IDI_HAND = 32513 +IDI_QUESTION = 32514 +IDI_EXCLAMATION = 32515 +IDI_ASTERISK = 32516 +IDI_WINLOGO = 32517 + +; System colors + +COLOR_SCROLLBAR = 0 +COLOR_BACKGROUND = 1 +COLOR_ACTIVECAPTION = 2 +COLOR_INACTIVECAPTION = 3 +COLOR_MENU = 4 +COLOR_WINDOW = 5 +COLOR_WINDOWFRAME = 6 +COLOR_MENUTEXT = 7 +COLOR_WINDOWTEXT = 8 +COLOR_CAPTIONTEXT = 9 +COLOR_ACTIVEBORDER = 10 +COLOR_INACTIVEBORDER = 11 +COLOR_APPWORKSPACE = 12 +COLOR_HIGHLIGHT = 13 +COLOR_HIGHLIGHTTEXT = 14 +COLOR_BTNFACE = 15 +COLOR_BTNSHADOW = 16 +COLOR_GRAYTEXT = 17 +COLOR_BTNTEXT = 18 +COLOR_INACTIVECAPTIONTEXT = 19 +COLOR_BTNHIGHLIGHT = 20 +COLOR_3DDKSHADOW = 21 +COLOR_3DLIGHT = 22 +COLOR_INFOTEXT = 23 +COLOR_INFOBK = 24 +COLOR_HOTLIGHT = 26 +COLOR_GRADIENTACTIVECAPTION = 27 +COLOR_GRADIENTINACTIVECAPTION = 28 + +; Button messages + +BM_GETCHECK = 00F0h +BM_SETCHECK = 00F1h +BM_GETSTATE = 00F2h +BM_SETSTATE = 00F3h +BM_SETSTYLE = 00F4h +BM_CLICK = 00F5h +BM_GETIMAGE = 00F6h +BM_SETIMAGE = 00F7h + +; Button notifications + +BN_CLICKED = 0 +BN_PAINT = 1 +BN_HILITE = 2 +BN_UNHILITE = 3 +BN_DISABLE = 4 +BN_DOUBLECLICKED = 5 +BN_SETFOCUS = 6 +BN_KILLFOCUS = 7 +BN_PUSHED = BN_HILITE +BN_UNPUSHED = BN_UNHILITE +BN_DBLCLK = BN_DOUBLECLICKED + +; Button styles + +BS_PUSHBUTTON = 0000h +BS_DEFPUSHBUTTON = 0001h +BS_CHECKBOX = 0002h +BS_AUTOCHECKBOX = 0003h +BS_RADIOBUTTON = 0004h +BS_3STATE = 0005h +BS_AUTO3STATE = 0006h +BS_GROUPBOX = 0007h +BS_USERBUTTON = 0008h +BS_AUTORADIOBUTTON = 0009h +BS_OWNERDRAW = 000Bh +BS_TEXT = 0000h +BS_LEFTTEXT = 0020h +BS_RIGHTBUTTON = BS_LEFTTEXT +BS_ICON = 0040h +BS_BITMAP = 0080h +BS_LEFT = 0100h +BS_RIGHT = 0200h +BS_CENTER = 0300h +BS_TOP = 0400h +BS_BOTTOM = 0800h +BS_VCENTER = 0C00h +BS_PUSHLIKE = 1000h +BS_MULTILINE = 2000h +BS_NOTIFY = 4000h +BS_FLAT = 8000h + +; Button states + +BST_UNCHECKED = 0 +BST_CHECKED = 1 +BST_INDETERMINATE = 2 +BST_PUSHED = 4 +BST_FOCUS = 8 + +; List box messages + +LB_ADDSTRING = 0180h +LB_INSERTSTRING = 0181h +LB_DELETESTRING = 0182h +LB_SELITEMRANGEEX = 0183h +LB_RESETCONTENT = 0184h +LB_SETSEL = 0185h +LB_SETCURSEL = 0186h +LB_GETSEL = 0187h +LB_GETCURSEL = 0188h +LB_GETTEXT = 0189h +LB_GETTEXTLEN = 018Ah +LB_GETCOUNT = 018Bh +LB_SELECTSTRING = 018Ch +LB_DIR = 018Dh +LB_GETTOPINDEX = 018Eh +LB_FINDSTRING = 018Fh +LB_GETSELCOUNT = 0190h +LB_GETSELITEMS = 0191h +LB_SETTABSTOPS = 0192h +LB_GETHORIZONTALEXTENT = 0193h +LB_SETHORIZONTALEXTENT = 0194h +LB_SETCOLUMNWIDTH = 0195h +LB_ADDFILE = 0196h +LB_SETTOPINDEX = 0197h +LB_GETITEMRECT = 0198h +LB_GETITEMDATA = 0199h +LB_SETITEMDATA = 019Ah +LB_SELITEMRANGE = 019Bh +LB_SETANCHORINDEX = 019Ch +LB_GETANCHORINDEX = 019Dh +LB_SETCARETINDEX = 019Eh +LB_GETCARETINDEX = 019Fh +LB_SETITEMHEIGHT = 01A0h +LB_GETITEMHEIGHT = 01A1h +LB_FINDSTRINGEXACT = 01A2h +LB_SETLOCALE = 01A5h +LB_GETLOCALE = 01A6h +LB_SETCOUNT = 01A7h +LB_INITSTORAGE = 01A8h +LB_ITEMFROMPOINT = 01A9h + +; List box notifications + +LBN_ERRSPACE = -2 +LBN_SELCHANGE = 1 +LBN_DBLCLK = 2 +LBN_SELCANCEL = 3 +LBN_SETFOCUS = 4 +LBN_KILLFOCUS = 5 + +; List box styles + +LBS_NOTIFY = 0001h +LBS_SORT = 0002h +LBS_NOREDRAW = 0004h +LBS_MULTIPLESEL = 0008h +LBS_OWNERDRAWFIXED = 0010h +LBS_OWNERDRAWVARIABLE = 0020h +LBS_HASSTRINGS = 0040h +LBS_USETABSTOPS = 0080h +LBS_NOINTEGRALHEIGHT = 0100h +LBS_MULTICOLUMN = 0200h +LBS_WANTKEYBOARDINPUT = 0400h +LBS_EXTENDEDSEL = 0800h +LBS_DISABLENOSCROLL = 1000h +LBS_NODATA = 2000h +LBS_NOSEL = 4000h +LBS_STANDARD = LBS_NOTIFY or LBS_SORT or WS_VSCROLL or WS_BORDER + +; List box return values + +LB_OKAY = 0 +LB_ERR = -1 +LB_ERRSPACE = -2 + +; Combo box messages + +CB_GETEDITSEL = 0140h +CB_LIMITTEXT = 0141h +CB_SETEDITSEL = 0142h +CB_ADDSTRING = 0143h +CB_DELETESTRING = 0144h +CB_DIR = 0145h +CB_GETCOUNT = 0146h +CB_GETCURSEL = 0147h +CB_GETLBTEXT = 0148h +CB_GETLBTEXTLEN = 0149h +CB_INSERTSTRING = 014Ah +CB_RESETCONTENT = 014Bh +CB_FINDSTRING = 014Ch +CB_SELECTSTRING = 014Dh +CB_SETCURSEL = 014Eh +CB_SHOWDROPDOWN = 014Fh +CB_GETITEMDATA = 0150h +CB_SETITEMDATA = 0151h +CB_GETDROPPEDCONTROLRECT = 0152h +CB_SETITEMHEIGHT = 0153h +CB_GETITEMHEIGHT = 0154h +CB_SETEXTENDEDUI = 0155h +CB_GETEXTENDEDUI = 0156h +CB_GETDROPPEDSTATE = 0157h +CB_FINDSTRINGEXACT = 0158h +CB_SETLOCALE = 0159h +CB_GETLOCALE = 015Ah +CB_GETTOPINDEX = 015Bh +CB_SETTOPINDEX = 015Ch +CB_GETHORIZONTALEXTENT = 015Dh +CB_SETHORIZONTALEXTENT = 015Eh +CB_GETDROPPEDWIDTH = 015Fh +CB_SETDROPPEDWIDTH = 0160h +CB_INITSTORAGE = 0161h + +; Combo box notifications + +CBN_ERRSPACE = -1 +CBN_SELCHANGE = 1 +CBN_DBLCLK = 2 +CBN_SETFOCUS = 3 +CBN_KILLFOCUS = 4 +CBN_EDITCHANGE = 5 +CBN_EDITUPDATE = 6 +CBN_DROPDOWN = 7 +CBN_CLOSEUP = 8 +CBN_SELENDOK = 9 +CBN_SELENDCANCEL = 10 + +; Combo box styles + +CBS_SIMPLE = 0001h +CBS_DROPDOWN = 0002h +CBS_DROPDOWNLIST = 0003h +CBS_OWNERDRAWFIXED = 0010h +CBS_OWNERDRAWVARIABLE = 0020h +CBS_AUTOHSCROLL = 0040h +CBS_OEMCONVERT = 0080h +CBS_SORT = 0100h +CBS_HASSTRINGS = 0200h +CBS_NOINTEGRALHEIGHT = 0400h +CBS_DISABLENOSCROLL = 0800h +CBS_UPPERCASE = 2000h +CBS_LOWERCASE = 4000h + +; Combo box return values + +CB_OKAY = 0 +CB_ERR = -1 +CB_ERRSPACE = -2 + +; Edit control messages + +EM_GETSEL = 00B0h +EM_SETSEL = 00B1h +EM_GETRECT = 00B2h +EM_SETRECT = 00B3h +EM_SETRECTNP = 00B4h +EM_SCROLL = 00B5h +EM_LINESCROLL = 00B6h +EM_SCROLLCARET = 00B7h +EM_GETMODIFY = 00B8h +EM_SETMODIFY = 00B9h +EM_GETLINECOUNT = 00BAh +EM_LINEINDEX = 00BBh +EM_SETHANDLE = 00BCh +EM_GETHANDLE = 00BDh +EM_GETTHUMB = 00BEh +EM_LINELENGTH = 00C1h +EM_REPLACESEL = 00C2h +EM_GETLINE = 00C4h +EM_LIMITTEXT = 00C5h +EM_CANUNDO = 00C6h +EM_UNDO = 00C7h +EM_FMTLINES = 00C8h +EM_LINEFROMCHAR = 00C9h +EM_SETTABSTOPS = 00CBh +EM_SETPASSWORDCHAR = 00CCh +EM_EMPTYUNDOBUFFER = 00CDh +EM_GETFIRSTVISIBLELINE = 00CEh +EM_SETREADONLY = 00CFh +EM_SETWORDBREAKPROC = 00D0h +EM_GETWORDBREAKPROC = 00D1h +EM_GETPASSWORDCHAR = 00D2h +EM_SETMARGINS = 00D3h +EM_GETMARGINS = 00D4h +EM_SETLIMITTEXT = EM_LIMITTEXT +EM_GETLIMITTEXT = 00D5h +EM_POSFROMCHAR = 00D6h +EM_CHARFROMPOS = 00D7h + +; Edit control EM_SETMARGIN parameters + +EC_LEFTMARGIN = 1 +EC_RIGHTMARGIN = 2 +EC_USEFONTINFO = 0FFFFh + +; Edit control notifications + +EN_SETFOCUS = 0100h +EN_KILLFOCUS = 0200h +EN_CHANGE = 0300h +EN_UPDATE = 0400h +EN_ERRSPACE = 0500h +EN_MAXTEXT = 0501h +EN_HSCROLL = 0601h +EN_VSCROLL = 0602h + +; Edit control styles + +ES_LEFT = 0000h +ES_CENTER = 0001h +ES_RIGHT = 0002h +ES_MULTILINE = 0004h +ES_UPPERCASE = 0008h +ES_LOWERCASE = 0010h +ES_PASSWORD = 0020h +ES_AUTOVSCROLL = 0040h +ES_AUTOHSCROLL = 0080h +ES_NOHIDESEL = 0100h +ES_OEMCONVERT = 0400h +ES_READONLY = 0800h +ES_WANTRETURN = 1000h +ES_NUMBER = 2000h + +; Static window messages + +STM_SETICON = 0170h +STM_GETICON = 0171h +STM_SETIMAGE = 0172h +STM_GETIMAGE = 0173h + +; Static window notifications + +STN_CLICKED = 0 +STN_DBLCLK = 1 +STN_ENABLE = 2 +STN_DISABLE = 3 + +; Static window styles + +SS_LEFT = 0000h +SS_CENTER = 0001h +SS_RIGHT = 0002h +SS_ICON = 0003h +SS_BLACKRECT = 0004h +SS_GRAYRECT = 0005h +SS_WHITERECT = 0006h +SS_BLACKFRAME = 0007h +SS_GRAYFRAME = 0008h +SS_WHITEFRAME = 0009h +SS_USERITEM = 000Ah +SS_SIMPLE = 000Bh +SS_LEFTNOWORDWRAP = 000Ch +SS_BITMAP = 000Eh +SS_OWNERDRAW = 000Dh +SS_ENHMETAFILE = 000Fh +SS_ETCHEDHORZ = 0010h +SS_ETCHEDVERT = 0011h +SS_ETCHEDFRAME = 0012h +SS_TYPEMASK = 001Fh +SS_NOPREFIX = 0080h +SS_NOTIFY = 0100h +SS_CENTERIMAGE = 0200h +SS_RIGHTJUST = 0400h +SS_REALSIZEIMAGE = 0800h +SS_SUNKEN = 1000h + +; Scroll bar constants + +SB_HORZ = 0 +SB_VERT = 1 +SB_CTL = 2 +SB_BOTH = 3 + +; Scroll bar messages + +SBM_SETPOS = 00E0h +SBM_GETPOS = 00E1h +SBM_SETRANGE = 00E2h +SBM_SETRANGEREDRAW = 00E6h +SBM_GETRANGE = 00E3h +SBM_ENABLE_ARROWS = 00E4h +SBM_SETSCROLLINFO = 00E9h +SBM_GETSCROLLINFO = 00EAh + +; Scroll bar commands + +SB_LINEUP = 0 +SB_LINELEFT = 0 +SB_LINEDOWN = 1 +SB_LINERIGHT = 1 +SB_PAGEUP = 2 +SB_PAGELEFT = 2 +SB_PAGEDOWN = 3 +SB_PAGERIGHT = 3 +SB_THUMBPOSITION = 4 +SB_THUMBTRACK = 5 +SB_TOP = 6 +SB_LEFT = 6 +SB_BOTTOM = 7 +SB_RIGHT = 7 +SB_ENDSCROLL = 8 + +; Scroll bar styles + +SBS_HORZ = 0000h +SBS_VERT = 0001h +SBS_TOPALIGN = 0002h +SBS_LEFTALIGN = 0002h +SBS_BOTTOMALIGN = 0004h +SBS_RIGHTALIGN = 0004h +SBS_SIZEBOXTOPLEFTALIGN = 0002h +SBS_SIZEBOXBOTTOMRIGHTALIGN = 0004h +SBS_SIZEBOX = 0008h +SBS_SIZEGRIP = 0010h + +; Scroll bar info flags + +SIF_RANGE = 0001h +SIF_PAGE = 0002h +SIF_POS = 0004h +SIF_DISABLENOSCROLL = 0008h +SIF_TRACKPOS = 0010h +SIF_ALL = SIF_RANGE or SIF_PAGE or SIF_POS or SIF_TRACKPOS + +; Dialog styles + +DS_ABSALIGN = 0001h +DS_SYSMODAL = 0002h +DS_3DLOOK = 0004h +DS_FIXEDSYS = 0008h +DS_NOFAILCREATE = 0010h +DS_LOCALEDIT = 0020h +DS_SETFONT = 0040h +DS_MODALFRAME = 0080h +DS_NOIDLEMSG = 0100h +DS_SETFOREGROUND = 0200h +DS_CONTROL = 0400h +DS_CENTER = 0800h +DS_CENTERMOUSE = 1000h +DS_CONTEXTHELP = 2000h + +; Dialog codes + +DLGC_WANTARROWS = 0001h +DLGC_WANTTAB = 0002h +DLGC_WANTALLKEYS = 0004h +DLGC_WANTMESSAGE = 0004h +DLGC_HASSETSEL = 0008h +DLGC_DEFPUSHBUTTON = 0010h +DLGC_UNDEFPUSHBUTTON = 0020h +DLGC_RADIOBUTTON = 0040h +DLGC_WANTCHARS = 0080h +DLGC_STATIC = 0100h +DLGC_BUTTON = 2000h + +; Menu flags + +MF_INSERT = 0000h +MF_CHANGE = 0080h +MF_APPEND = 0100h +MF_DELETE = 0200h +MF_REMOVE = 1000h +MF_BYCOMMAND = 0000h +MF_BYPOSITION = 0400h +MF_SEPARATOR = 0800h +MF_UNCHECKED = 0000h +MF_ENABLED = 0000h +MF_GRAYED = 0001h +MF_DISABLED = 0002h +MF_CHECKED = 0008h +MF_USECHECKBITMAPS = 0200h +MF_STRING = 0000h +MF_BITMAP = 0004h +MF_OWNERDRAW = 0100h +MF_POPUP = 0010h +MF_MENUBARBREAK = 0020h +MF_MENUBREAK = 0040h +MF_UNHILITE = 0000h +MF_HILITE = 0080h +MF_DEFAULT = 1000h +MF_SYSMENU = 2000h +MF_HELP = 4000h +MF_RIGHTJUSTIFY = 4000h +MF_MOUSESELECT = 8000h +MF_END = 0080h +MFT_STRING = MF_STRING +MFT_BITMAP = MF_BITMAP +MFT_MENUBARBREAK = MF_MENUBARBREAK +MFT_MENUBREAK = MF_MENUBREAK +MFT_OWNERDRAW = MF_OWNERDRAW +MFT_RADIOCHECK = 0200h +MFT_SEPARATOR = MF_SEPARATOR +MFT_RIGHTORDER = 2000h +MFT_RIGHTJUSTIFY = MF_RIGHTJUSTIFY +MFS_GRAYED = 0003h +MFS_DISABLED = MFS_GRAYED +MFS_CHECKED = MF_CHECKED +MFS_HILITE = MF_HILITE +MFS_ENABLED = MF_ENABLED +MFS_UNCHECKED = MF_UNCHECKED +MFS_UNHILITE = MF_UNHILITE +MFS_DEFAULT = MF_DEFAULT +MFR_POPUP = 0001h +MFR_END = MF_END + +; System menu command values + +SC_SIZE = 61440 +SC_MOVE = 61456 +SC_MINIMIZE = 61472 +SC_MAXIMIZE = 61488 +SC_NEXTWINDOW = 61504 +SC_PREVWINDOW = 61520 +SC_CLOSE = 61536 +SC_VSCROLL = 61552 +SC_HSCROLL = 61568 +SC_MOUSEMENU = 61584 +SC_KEYMENU = 61696 +SC_ARRANGE = 61712 +SC_RESTORE = 61728 +SC_TASKLIST = 61744 +SC_SCREENSAVE = 61760 +SC_HOTKEY = 61776 +SC_DEFAULT = 61792 +SC_MONITORPOWER = 61808 +SC_CONTEXTHELP = 61824 +SC_SEPARATOR = 61455 + +; Border types + +BDR_RAISEDOUTER = 01h +BDR_SUNKENOUTER = 02h +BDR_RAISEDINNER = 04h +BDR_SUNKENINNER = 08h +BDR_OUTER = 03h +BDR_INNER = 0Ch +BDR_RAISED = 05h +BDR_SUNKEN = 0Ah +EDGE_RAISED = BDR_RAISEDOUTER or BDR_RAISEDINNER +EDGE_SUNKEN = BDR_SUNKENOUTER or BDR_SUNKENINNER +EDGE_ETCHED = BDR_SUNKENOUTER or BDR_RAISEDINNER +EDGE_BUMP = BDR_RAISEDOUTER or BDR_SUNKENINNER + +; Border flags + +BF_LEFT = 0001h +BF_TOP = 0002h +BF_RIGHT = 0004h +BF_BOTTOM = 0008h +BF_TOPLEFT = BF_TOP or BF_LEFT +BF_TOPRIGHT = BF_TOP or BF_RIGHT +BF_BOTTOMLEFT = BF_BOTTOM or BF_LEFT +BF_BOTTOMRIGHT = BF_BOTTOM or BF_RIGHT +BF_RECT = BF_LEFT or BF_TOP or BF_RIGHT or BF_BOTTOM +BF_DIAGONAL = 0010h +BF_DIAGONAL_ENDTOPRIGHT = BF_DIAGONAL or BF_TOP or BF_RIGHT +BF_DIAGONAL_ENDTOPLEFT = BF_DIAGONAL or BF_TOP or BF_LEFT +BF_DIAGONAL_ENDBOTTOMLEFT = BF_DIAGONAL or BF_BOTTOM or BF_LEFT +BF_DIAGONAL_ENDBOTTOMRIGHT = BF_DIAGONAL or BF_BOTTOM or BF_RIGHT +BF_MIDDLE = 0800h +BF_SOFT = 1000h +BF_ADJUST = 2000h +BF_FLAT = 4000h +BF_MONO = 8000h + +; Frame control types + +DFC_CAPTION = 1 +DFC_MENU = 2 +DFC_SCROLL = 3 +DFC_BUTTON = 4 +DFC_POPUPMENU = 5 + +; Frame control states + +DFCS_CAPTIONCLOSE = 0000h +DFCS_CAPTIONMIN = 0001h +DFCS_CAPTIONMAX = 0002h +DFCS_CAPTIONRESTORE = 0003h +DFCS_CAPTIONHELP = 0004h +DFCS_MENUARROW = 0000h +DFCS_MENUCHECK = 0001h +DFCS_MENUBULLET = 0002h +DFCS_MENUARROWRIGHT = 0004h +DFCS_SCROLLUP = 0000h +DFCS_SCROLLDOWN = 0001h +DFCS_SCROLLLEFT = 0002h +DFCS_SCROLLRIGHT = 0003h +DFCS_SCROLLCOMBOBOX = 0005h +DFCS_SCROLLSIZEGRIP = 0008h +DFCS_SCROLLSIZEGRIPRIGHT = 0010h +DFCS_BUTTONCHECK = 0000h +DFCS_BUTTONRADIOIMAGE = 0001h +DFCS_BUTTONRADIOMASK = 0002h +DFCS_BUTTONRADIO = 0004h +DFCS_BUTTON3STATE = 0008h +DFCS_BUTTONPUSH = 0010h +DFCS_INACTIVE = 0100h +DFCS_PUSHED = 0200h +DFCS_CHECKED = 0400h +DFCS_TRANSPARENT = 0800h +DFCS_HOT = 1000h +DFCS_ADJUSTRECT = 2000h +DFCS_FLAT = 4000h +DFCS_MONO = 8000h + +; DrawCaption flags + +DC_ACTIVE = 01h +DC_SMALLCAP = 02h +DC_ICON = 04h +DC_TEXT = 08h +DC_INBUTTON = 10h + +; DrawIconEx options + +DI_MASK = 1 +DI_IMAGE = 2 +DI_NORMAL = 3 +DI_COMPAT = 4 +DI_DEFAULTSIZE = 8 + +; DrawText parameters + +DT_TOP = 00000h +DT_LEFT = 00000h +DT_CENTER = 00001h +DT_RIGHT = 00002h +DT_VCENTER = 00004h +DT_BOTTOM = 00008h +DT_WORDBREAK = 00010h +DT_SINGLELINE = 00020h +DT_EXPANDTABS = 00040h +DT_TABSTOP = 00080h +DT_NOCLIP = 00100h +DT_EXTERNALLEADING = 00200h +DT_CALCRECT = 00400h +DT_NOPREFIX = 00800h +DT_INTERNAL = 01000h +DT_EDITCONTROL = 02000h +DT_PATH_ELLIPSIS = 04000h +DT_END_ELLIPSIS = 08000h +DT_MODIFYSTRING = 10000h +DT_RTLREADING = 20000h +DT_WORD_ELLIPSIS = 40000h + +; GetDCEx flags + +DCX_WINDOW = 000001h +DCX_CACHE = 000002h +DCX_NORESETATTRS = 000004h +DCX_CLIPCHILDREN = 000008h +DCX_CLIPSIBLINGS = 000010h +DCX_PARENTCLIP = 000020h +DCX_EXCLUDERGN = 000040h +DCX_INTERSECTRGN = 000080h +DCX_EXCLUDEUPDATE = 000100h +DCX_INTERSECTUPDATE = 000200h +DCX_LOCKWINDOWUPDATE = 000400h +DCX_VALIDATE = 200000h + +; SetWindowsHook codes + +WH_MSGFILTER = -1 +WH_JOURNALRECORD = 0 +WH_JOURNALPLAYBACK = 1 +WH_KEYBOARD = 2 +WH_GETMESSAGE = 3 +WH_CALLWNDPROC = 4 +WH_CBT = 5 +WH_SYSMSGFILTER = 6 +WH_MOUSE = 7 +WH_HARDWARE = 8 +WH_DEBUG = 9 +WH_SHELL = 10 +WH_FOREGROUNDIDLE = 11 +WH_CALLWNDPROCRET = 12 +WH_KEYBOARD_LL = 13 +WH_MOUSE_LL = 14 + +; Hook codes + +HC_ACTION = 0 +HC_GETNEXT = 1 +HC_SKIP = 2 +HC_NOREMOVE = 3 +HC_SYSMODALON = 4 +HC_SYSMODALOFF = 5 + +; CBT hook codes + +HCBT_MOVESIZE = 0 +HCBT_MINMAX = 1 +HCBT_QS = 2 +HCBT_CREATEWND = 3 +HCBT_DESTROYWND = 4 +HCBT_ACTIVATE = 5 +HCBT_CLICKSKIPPED = 6 +HCBT_KEYSKIPPED = 7 +HCBT_SYSCOMMAND = 8 +HCBT_SETFOCUS = 9 + +; ExitWindowsEx flags + +EWX_LOGOFF = 0 +EWX_SHUTDOWN = 1 +EWX_REBOOT = 2 +EWX_FORCE = 4 +EWX_POWEROFF = 8 + +; WinHelp commands + +HELP_CONTEXT = 001h +HELP_QUIT = 002h +HELP_INDEX = 003h +HELP_CONTENTS = 003h +HELP_HELPONHELP = 004h +HELP_SETINDEX = 005h +HELP_SETCONTENTS = 005h +HELP_CONTEXTPOPUP = 008h +HELP_FORCEFILE = 009h +HELP_CONTEXTMENU = 00Ah +HELP_FINDER = 00Bh +HELP_WM_HELP = 00Ch +HELP_SETPOPUP_POS = 00Dh +HELP_KEY = 101h +HELP_COMMAND = 102h +HELP_PARTIALKEY = 105h +HELP_MULTIKEY = 201h +HELP_SETWINPOS = 203h + +; keybd_event flags + +KEYEVENTF_EXTENDEDKEY = 1h +KEYEVENTF_KEYUP = 2h + +; mouse_event flags + +MOUSEEVENTF_MOVE = 0001h +MOUSEEVENTF_LEFTDOWN = 0002h +MOUSEEVENTF_LEFTUP = 0004h +MOUSEEVENTF_RIGHTDOWN = 0008h +MOUSEEVENTF_RIGHTUP = 0010h +MOUSEEVENTF_MIDDLEDOWN = 0020h +MOUSEEVENTF_MIDDLEUP = 0040h +MOUSEEVENTF_WHEEL = 0800h +MOUSEEVENTF_ABSOLUTE = 8000h + +; TrackPopupMenu flags + +TPM_LEFTBUTTON = 0000h +TPM_RIGHTBUTTON = 0002h +TPM_LEFTALIGN = 0000h +TPM_CENTERALIGN = 0004h +TPM_RIGHTALIGN = 0008h +TPM_TOPALIGN = 0000h +TPM_VCENTERALIGN = 0010h +TPM_BOTTOMALIGN = 0020h +TPM_HORIZONTAL = 0000h +TPM_VERTICAL = 0040h +TPM_NONOTIFY = 0080h +TPM_RETURNCMD = 0100h +TPM_RECURSE = 0001h +TPM_HORPOSANIMATION = 0400h +TPM_HORNEGANIMATION = 0800h +TPM_VERPOSANIMATION = 1000h +TPM_VERNEGANIMATION = 2000h +TPM_NOANIMATION = 4000h +TPM_LAYOUTRTL = 8000h + +; Menu item info mask values + +MIIM_STATE = 001h +MIIM_ID = 002h +MIIM_SUBMENU = 004h +MIIM_CHECKMARKS = 008h +MIIM_TYPE = 010h +MIIM_DATA = 020h +MIIM_STRING = 040h +MIIM_BITMAP = 080h +MIIM_FTYPE = 100h + +; DRAWITEMSTRUCT control types + +ODT_MENU = 1 +ODT_LISTBOX = 2 +ODT_COMBOBOX = 3 +ODT_BUTTON = 4 +ODT_STATIC = 5 + +; DRAWITEMSTRUCT actions + +ODA_DRAWENTIRE = 1 +ODA_SELECT = 2 +ODA_FOCUS = 4 + +; DRAWITEMSTRUCT states + +ODS_SELECTED = 0001h +ODS_GRAYED = 0002h +ODS_DISABLED = 0004h +ODS_CHECKED = 0008h +ODS_FOCUS = 0010h +ODS_DEFAULT = 0020h +ODS_COMBOBOXEDIT = 1000h +ODS_HOTLIGHT = 0040h +ODS_INACTIVE = 0080h + +; WINDOWPLACEMENT flags + +WPF_SETMINPOSITION = 1 +WPF_RESTORETOMAXIMIZED = 2 + +; Layered window attributes + +LWA_COLORKEY = 1 +LWA_ALPHA = 2 + +; UpdateLayeredWindow flags + +ULW_COLORKEY = 1 +ULW_ALPHA = 2 +ULW_OPAQUE = 4 + +; SystemParametersInfo parameters + +SPI_GETACCESSTIMEOUT = 60 +SPI_GETANIMATION = 72 +SPI_GETBEEP = 1 +SPI_GETBORDER = 5 +SPI_GETDEFAULTINPUTLANG = 89 +SPI_GETDRAGFULLWINDOWS = 38 +SPI_GETFASTTASKSWITCH = 35 +SPI_GETFILTERKEYS = 50 +SPI_GETFONTSMOOTHING = 74 +SPI_GETGRIDGRANULARITY = 18 +SPI_GETHIGHCONTRAST = 66 +SPI_GETICONMETRICS = 45 +SPI_GETICONTITLELOGFONT = 31 +SPI_GETICONTITLEWRAP = 25 +SPI_GETKEYBOARDDELAY = 22 +SPI_GETKEYBOARDPREF = 68 +SPI_GETKEYBOARDSPEED = 10 +SPI_GETLOWPOWERACTIVE = 83 +SPI_GETLOWPOWERTIMEOUT = 79 +SPI_GETMENUDROPALIGNMENT = 27 +SPI_GETMINIMIZEDMETRICS = 43 +SPI_GETMOUSE = 3 +SPI_GETMOUSEKEYS = 54 +SPI_GETMOUSETRAILS = 94 +SPI_GETNONCLIENTMETRICS = 41 +SPI_GETPOWEROFFACTIVE = 84 +SPI_GETPOWEROFFTIMEOUT = 80 +SPI_GETSCREENREADER = 70 +SPI_GETSCREENSAVEACTIVE = 16 +SPI_GETSCREENSAVETIMEOUT = 14 +SPI_GETSERIALKEYS = 62 +SPI_GETSHOWSOUNDS = 56 +SPI_GETSOUNDSENTRY = 64 +SPI_GETSTICKYKEYS = 58 +SPI_GETTOGGLEKEYS = 52 +SPI_GETWINDOWSEXTENSION = 92 +SPI_GETWORKAREA = 48 +SPI_ICONHORIZONTALSPACING = 13 +SPI_ICONVERTICALSPACING = 24 +SPI_LANGDRIVER = 12 +SPI_SCREENSAVERRUNNING = 97 +SPI_SETACCESSTIMEOUT = 61 +SPI_SETANIMATION = 73 +SPI_SETBEEP = 2 +SPI_SETBORDER = 6 +SPI_SETDEFAULTINPUTLANG = 90 +SPI_SETDESKPATTERN = 21 +SPI_SETDESKWALLPAPER = 20 +SPI_SETDOUBLECLICKTIME = 32 +SPI_SETDOUBLECLKHEIGHT = 30 +SPI_SETDOUBLECLKWIDTH = 29 +SPI_SETDRAGFULLWINDOWS = 37 +SPI_SETDRAGHEIGHT = 77 +SPI_SETDRAGWIDTH = 76 +SPI_SETFASTTASKSWITCH = 36 +SPI_SETFILTERKEYS = 51 +SPI_SETFONTSMOOTHING = 75 +SPI_SETGRIDGRANULARITY = 19 +SPI_SETHANDHELD = 78 +SPI_SETHIGHCONTRAST = 67 +SPI_SETICONMETRICS = 46 +SPI_SETICONTITLELOGFONT = 34 +SPI_SETICONTITLEWRAP = 26 +SPI_SETKEYBOARDDELAY = 23 +SPI_SETKEYBOARDPREF = 69 +SPI_SETKEYBOARDSPEED = 11 +SPI_SETLANGTOGGLE = 91 +SPI_SETLOWPOWERACTIVE = 85 +SPI_SETLOWPOWERTIMEOUT = 81 +SPI_SETMENUDROPALIGNMENT = 28 +SPI_SETMINIMIZEDMETRICS = 44 +SPI_SETMOUSE = 4 +SPI_SETMOUSEBUTTONSWAP = 33 +SPI_SETMOUSEKEYS = 55 +SPI_SETMOUSETRAILS = 93 +SPI_SETNONCLIENTMETRICS = 42 +SPI_SETPENWINDOWS = 49 +SPI_SETPOWEROFFACTIVE = 86 +SPI_SETPOWEROFFTIMEOUT = 82 +SPI_SETSCREENREADER = 71 +SPI_SETSCREENSAVEACTIVE = 17 +SPI_SETSCREENSAVERRUNNING = 97 +SPI_SETSCREENSAVETIMEOUT = 15 +SPI_SETSERIALKEYS = 63 +SPI_SETSHOWSOUNDS = 57 +SPI_SETSOUNDSENTRY = 65 +SPI_SETSTICKYKEYS = 59 +SPI_SETTOGGLEKEYS = 53 +SPI_SETWORKAREA = 47 + +; SystemParametersInfo flags + +SPIF_UPDATEINIFILE = 1 +SPIF_SENDWININICHANGE = 2 + +; Gesture Information Flags + +GF_BEGIN = 1 +GF_INERTIA = 2 +GF_END = 4 + +; Gesture IDs + +GID_BEGIN = 1 +GID_END = 2 +GID_ZOOM = 3 +GID_PAN = 4 +GID_ROTATE = 5 +GID_TWOFINGERTAP = 6 +GID_PRESSANDTAP = 7 +GID_ROLLOVER = GID_PRESSANDTAP + +; Zoom Gesture Confiration Flags + +GC_ZOOM = 0x00000001 + +; Pan Gesture Configuration Flags + +GC_PAN = 0x00000001 +GC_PAN_WITH_SINGLE_FINGER_VERTICALLY = 0x00000002 +GC_PAN_WITH_SINGLE_FINGER_HORIZONTALLY = 0x00000004 +GC_PAN_WITH_GUTTER = 0x00000008 +GC_PAN_WITH_INERTIA = 0x00000010 + +; Rotate Gesture Configuration Flags + +GC_ROTATE = 0x00000001 + +; Two finger tap configuration flags + +GC_TWOFINGERTAP = 0x00000001 + +; Press and tap Configuration Flags + +GC_PRESSANDTAP = 0x00000001 +GC_ROLLOVER = GC_PRESSANDTAP diff --git a/asm/equihash/Windows/INCLUDE/EQUATES/WSOCK32.INC b/asm/equihash/Windows/INCLUDE/EQUATES/WSOCK32.INC new file mode 100644 index 0000000..4b16b8e --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/EQUATES/WSOCK32.INC @@ -0,0 +1,124 @@ + +; WSOCK32.DLL structures and constants + +struct WSADATA + wVersion dw ? + wHighVersion dw ? + szDescription db 256+1 dup (?) + szSystemStatus db 128+1 dup (?) + iMaxSockets dw ? + iMaxUdpDg dw ? + _padding_ db 2 dup (?) + lpVendorInfo dd ? +ends + +struct hostent + h_name dd ? + h_aliases dd ? + h_addrtype dw ? + h_length dw ? + h_addr_list dd ? +ends + +struct sockaddr_in + sin_family dw ? + sin_port dw ? + sin_addr dd ? + sin_zero db 8 dup (?) +ends + +struct sockaddr + sa_family dw ? + sa_data db 14 dup (?) +ends + +; Socket types + +SOCK_STREAM = 1 +SOCK_DGRAM = 2 +SOCK_RAW = 3 +SOCK_RDM = 4 +SOCK_SEQPACKET = 5 + +; Address formats + +AF_UNSPEC = 0 +AF_UNIX = 1 +AF_INET = 2 +AF_IMPLINK = 3 +AF_PUP = 4 +AF_CHAOS = 5 +AF_NS = 6 +AF_IPX = 6 +AF_ISO = 7 +AF_OSI = AF_ISO +AF_ECMA = 8 +AF_DATAKIT = 9 +AF_CCITT = 10 +AF_SNA = 11 +AF_DECnet = 12 +AF_DLI = 13 +AF_LAT = 14 +AF_HYLINK = 15 +AF_APPLETALK = 16 +AF_NETBIOS = 17 + +; Protocol formats + +PF_UNSPEC = 0 +PF_UNIX = 1 +PF_INET = 2 +PF_IMPLINK = 3 +PF_PUP = 4 +PF_CHAOS = 5 +PF_NS = 6 +PF_IPX = 6 +PF_ISO = 7 +PF_OSI = PF_ISO +PF_ECMA = 8 +PF_DATAKIT = 9 +PF_CCITT = 10 +PF_SNA = 11 +PF_DECnet = 12 +PF_DLI = 13 +PF_LAT = 14 +PF_HYLINK = 15 +PF_APPLETALK = 16 +PF_NETBIOS = 17 + +; IP Ports + +IPPORT_ECHO = 7 +IPPORT_DISCARD = 9 +IPPORT_SYSTAT = 11 +IPPORT_DAYTIME = 13 +IPPORT_NETSTAT = 15 +IPPORT_FTP = 21 +IPPORT_TELNET = 23 +IPPORT_SMTP = 25 +IPPORT_TIMESERVER = 37 +IPPORT_NAMESERVER = 42 +IPPORT_WHOIS = 43 +IPPORT_MTP = 57 +IPPORT_TFTP = 69 +IPPORT_RJE = 77 +IPPORT_FINGER = 79 +IPPORT_TTYLINK = 87 +IPPORT_SUPDUP = 95 +IPPORT_EXECSERVER = 512 +IPPORT_LOGINSERVER = 513 +IPPORT_CMDSERVER = 514 +IPPORT_EFSSERVER = 520 +IPPORT_BIFFUDP = 512 +IPPORT_WHOSERVER = 513 +IPPORT_ROUTESERVER = 520 +IPPORT_RESERVED = 1024 + +; Notifications + +FD_READ = 01h +FD_WRITE = 02h +FD_OOB = 04h +FD_ACCEPT = 08h +FD_CONNECT = 10h +FD_CLOSE = 20h diff --git a/asm/equihash/Windows/INCLUDE/MACRO/COM32.INC b/asm/equihash/Windows/INCLUDE/MACRO/COM32.INC new file mode 100644 index 0000000..55a26c6 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/MACRO/COM32.INC @@ -0,0 +1,53 @@ + +; Macroinstructions for interfacing the COM (Component Object Model) classes + +macro cominvk object,proc,[arg] + { common + if ~ arg eq + reverse + pushd arg + common + end if + assert defined object#.com.object ; must be a COM object + mov eax,[object] + push eax + mov eax,[eax] + call [eax+object#.#proc] } + +macro comcall handle,interface,proc,[arg] + { common + if ~ arg eq + reverse + pushd arg + common + end if + assert defined interface#.com.interface ; must be a COM interface + if handle eqtype eax | handle eqtype 0 + push handle + local ..handle + label ..handle at handle + mov eax,[..handle] + else + mov eax,handle + push eax + mov eax,[eax] + end if + call [eax+interface#.#proc] } + +macro interface name,[proc] + { common + struc name \{ + match , @struct \\{ define field@struct .,name, \\} + match no, @struct \\{ . dd ? + virtual at 0 + forward + .#proc dd ? + common + .\#\\.com.object = name#.com.interface + end virtual \\} \} + virtual at 0 + forward + name#.#proc dd ? + common + name#.com.interface = $ shr 2 + end virtual } diff --git a/asm/equihash/Windows/INCLUDE/MACRO/COM64.INC b/asm/equihash/Windows/INCLUDE/MACRO/COM64.INC new file mode 100644 index 0000000..5719446 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/MACRO/COM64.INC @@ -0,0 +1,47 @@ + +; Macroinstructions for interfacing the COM (Component Object Model) classes + +macro cominvk object,proc,[arg] + { common + assert defined object#.com.object ; must be a COM object + macro call dummy + \{ mov rax,[object] + mov rax,[rax] + call [rax+object#.#proc] \} + fastcall ,[object],arg + purge call } + +macro comcall handle,interface,proc,[arg] + { common + assert defined interface#.com.interface ; must be a COM interface + macro call dummy + \{ if handle eqtype rax | handle eqtype 0 + local ..handle + label ..handle at handle + mov rax,[..handle] + else + mov rax,handle + mov rax,[rax] + end if + call [rax+interface#.#proc] \} + fastcall ,handle,arg + purge call } + +macro interface name,[proc] + { common + struc name \{ + match , @struct \\{ define field@struct .,name, \\} + match no, @struct \\{ . dq ? + virtual at 0 + forward + .#proc dq ? + common + .\#\\.com.object = name#.com.interface + end virtual \\} \} + virtual at 0 + forward + name#.#proc dq ? + common + name#.com.interface = $ shr 3 + end virtual } + diff --git a/asm/equihash/Windows/INCLUDE/MACRO/EXPORT.INC b/asm/equihash/Windows/INCLUDE/MACRO/EXPORT.INC new file mode 100644 index 0000000..c0fa1c1 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/MACRO/EXPORT.INC @@ -0,0 +1,66 @@ + +; Macroinstruction for making export section + +macro export dllname,[label,string] + { common + local module,addresses,names,ordinal,count + count = 0 + forward + count = count+1 + common + dd 0,0,0,RVA module,1 + dd count,count,RVA addresses,RVA names,RVA ordinal + addresses: + forward + dd RVA label + common + names: + forward + local name + dd RVA name + common + ordinal: count = 0 + forward + dw count + count = count+1 + common + module db dllname,0 + forward + name db string,0 + common + local x,y,z,str1,str2,v1,v2 + x = count shr 1 + while x > 0 + y = x + while y < count + z = y + while z-x >= 0 + load v1 dword from names+z*4 + str1=($-RVA $)+v1 + load v2 dword from names+(z-x)*4 + str2=($-RVA $)+v2 + while v1 > 0 + load v1 from str1+%-1 + load v2 from str2+%-1 + if v1 <> v2 + break + end if + end while + if v1 +lt equ < + +macro PARSECOND parsed,cond +{ + define parsed + define neg@cond + define status@cond + define nest@cond + irps symb,cond + \{ + define symb@cond symb + match >,symb + \\{ + define symb@cond gt + \\} + match <,symb + \\{ + define symb@cond lt + \\} + current@cond equ status@cond + match ,current@cond + \\{ + match ~,symb + \\\{ + neg@cond equ neg@cond ~ + match ~~,neg@cond + \\\\{ + define neg@cond + \\\\} + define symb@cond + \\\} + match (,symb + \\\{ + parsed equ parsed neg@cond,< + define nest@cond + + define symb@cond + define neg@cond + \\\} + match any,symb@cond + \\\{ + parsed equ parsed neg@cond,symb@cond + define status@cond + + \\\} + \\} + match status,current@cond + \\{ + match &,symb + \\\{ + parsed equ parsed,&, + define status@cond + define symb@cond + define neg@cond + \\\} + match |,symb + \\\{ + parsed equ parsed,|, + define status@cond + define symb@cond + define neg@cond + \\\} + match (,symb + \\\{ + define nest@cond ( + \\\} + match ),symb + \\\{ + match +,nest@cond + \\\\{ + parsed equ parsed> + define symb@cond + \\\\} + restore nest@cond + \\\} + match any,symb@cond + \\\{ + parsed equ parsed symb@cond + \\\} + \\} + \} +} + +macro define_JNCONDEXPR +{ + macro JNCONDEXPR elabel,[mod,cond,op] + \{ + \common + \local ..t,..f + define t@cond ..t + define f@cond ..f + \forward + match ,op + \\{ + match ,mod \\\{ JNCONDEL elabel, \\\} + match ~,mod \\\{ JCONDEL elabel, \\\} + \\} + match &:flabel:tlabel, op:f@cond:t@cond + \\{ + match ,mod \\\{ JNCONDEL flabel, \\\} + match ~,mod \\\{ JCONDEL flabel, \\\} + tlabel: + \\local ..tnew + restore t@cond + define t@cond ..tnew + \\} + match |:flabel:tlabel, op:f@cond:t@cond + \\{ + match ,mod \\\{ JCONDEL tlabel, \\\} + match ~,mod \\\{ JNCONDEL tlabel, \\\} + flabel: + \\local ..fnew + restore f@cond + define f@cond ..fnew + \\} + \common + label f@cond at elabel + t@cond: + restore t@cond + restore f@cond + \} +} + +macro define_JCONDEXPR +{ + macro JCONDEXPR elabel,[mod,cond,op] + \{ + \common + \local ..t,..f + define t@cond ..t + define f@cond ..f + \forward + match ,op + \\{ + match ,mod \\\{ JCONDEL elabel, \\\} + match ~,mod \\\{ JNCONDEL elabel, \\\} + \\} + match |:flabel:tlabel, op:f@cond:t@cond + \\{ + match ,mod \\\{ JCONDEL flabel, \\\} + match ~,mod \\\{ JNCONDEL flabel, \\\} + tlabel: + \\local ..tnew + restore t@cond + define t@cond ..tnew + \\} + match &:flabel:tlabel, op:f@cond:t@cond + \\{ + match ,mod \\\{ JNCONDEL tlabel, \\\} + match ~,mod \\\{ JCONDEL tlabel, \\\} + flabel: + \\local ..fnew + restore f@cond + define f@cond ..fnew + \\} + \common + label f@cond at elabel + t@cond: + restore t@cond + restore f@cond + \} +} + +macro define_JNCONDEL +{ + macro JNCONDEL label,cond + \{ + \local COND + match car=,cdr,:cond + \\{ + define_JNCONDEXPR + define_JCONDEXPR + define_JCONDEL + define_JNCONDEL + JNCONDEXPR label,cond + purge JNCONDEXPR,JCONDEXPR,JCONDEL,JNCONDEL + define COND + \\} + match c,cond ; replace gt and lt + \\{ + match =COND =signed v1>==v2, COND c + \\\{ + cmp v1,v2 + jl label + define COND + \\\} + match =COND =signed v1<==v2, COND c + \\\{ + cmp v1,v2 + jg label + define COND + \\\} + match =COND v1>==v2, COND c + \\\{ + cmp v1,v2 + jb label + define COND + \\\} + match =COND v1<==v2, COND c + \\\{ + cmp v1,v2 + ja label + define COND + \\\} + match =COND v1==v2, COND c + \\\{ + cmp v1,v2 + jne label + define COND + \\\} + match =COND v1<>v2, COND c + \\\{ + cmp v1,v2 + je label + define COND + \\\} + match =COND =signed v1>v2, COND c + \\\{ + cmp v1,v2 + jle label + define COND + \\\} + match =COND =signed v1v2, COND c + \\\{ + cmp v1,v2 + jbe label + define COND + \\\} + match =COND v1==v2, COND c + \\\{ + cmp v1,v2 + jge label + define COND + \\\} + match =COND =signed v1<==v2, COND c + \\\{ + cmp v1,v2 + jle label + define COND + \\\} + match =COND v1>==v2, COND c + \\\{ + cmp v1,v2 + jae label + define COND + \\\} + match =COND v1<==v2, COND c + \\\{ + cmp v1,v2 + jbe label + define COND + \\\} + match =COND v1==v2, COND c + \\\{ + cmp v1,v2 + je label + define COND + \\\} + match =COND v1<>v2, COND c + \\\{ + cmp v1,v2 + jne label + define COND + \\\} + match =COND =signed v1>v2, COND c + \\\{ + cmp v1,v2 + jg label + define COND + \\\} + match =COND =signed v1v2, COND c + \\\{ + cmp v1,v2 + ja label + define COND + \\\} + match =COND v1 name#.lookup + name#.redundant = 0 + dd 0 + else + name#.redundant = 1 + end if + name#.address: + forward + if used label + if string eqtype '' + label dd RVA _label + else + label dd 80000000h + string + end if + end if + common + if ~ name#.redundant + dd 0 + end if + forward + if used label & string eqtype '' + _label dw 0 + db string,0 + rb RVA $ and 1 + end if + common + end if } + +macro api [name] {} diff --git a/asm/equihash/Windows/INCLUDE/MACRO/IMPORT64.INC b/asm/equihash/Windows/INCLUDE/MACRO/IMPORT64.INC new file mode 100644 index 0000000..b03da5b --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/MACRO/IMPORT64.INC @@ -0,0 +1,68 @@ + +; Macroinstructions for making import section (64-bit) + +macro library [name,string] + { common + import.data: + forward + local _label + if defined name#.redundant + if ~ name#.redundant + dd RVA name#.lookup,0,0,RVA _label,RVA name#.address + end if + end if + name#.referred = 1 + common + dd 0,0,0,0,0 + forward + if defined name#.redundant + if ~ name#.redundant + _label db string,0 + rb RVA $ and 1 + end if + end if } + +macro import name,[label,string] + { common + rb (- rva $) and 7 + if defined name#.referred + name#.lookup: + forward + if used label + if string eqtype '' + local _label + dq RVA _label + else + dq 8000000000000000h + string + end if + end if + common + if $ > name#.lookup + name#.redundant = 0 + dq 0 + else + name#.redundant = 1 + end if + name#.address: + forward + if used label + if string eqtype '' + label dq RVA _label + else + label dq 8000000000000000h + string + end if + end if + common + if ~ name#.redundant + dq 0 + end if + forward + if used label & string eqtype '' + _label dw 0 + db string,0 + rb RVA $ and 1 + end if + common + end if } + +macro api [name] {} diff --git a/asm/equihash/Windows/INCLUDE/MACRO/MASM.INC b/asm/equihash/Windows/INCLUDE/MACRO/MASM.INC new file mode 100644 index 0000000..b6ffe9a --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/MACRO/MASM.INC @@ -0,0 +1,66 @@ + +; Simulate MASM's syntax + +struc struct + { struct . + name@struct equ . } + +struc ends + { match =.,name@struct \{ ends \} } + +struc proc [params] + { common define@proc ., + name@proc equ . } + +struc endp + { match =.,name@proc \{ endp \} } + +macro option setting + { match =prologue:macro, setting \{ prologue@proc equ macro \} + match =epilogue:macro, setting \{ epilogue@proc equ macro \} } + +macro none procname,flag,parmbytes,localbytes,reglist { } + +macro assume params + { + local expr + define expr params + match reg:struct, expr + \{ + match assumed, reg\#@assumed \\{ irp name, assumed \\\{ restore name \\\} \\} + macro label . \\{ local def + define def . + match =reg =at label, def \\\{ define def \\\} + match name at,def \\\{ def@assumed reg,name,label at + define def \\\} + match name,def \\\{ def@assumed reg,.,: \\\} \\} + struc db [val] \\{ \common def@assumed reg,., \\} + struc dw [val] \\{ \common def@assumed reg,., \\} + struc dp [val] \\{ \common def@assumed reg,., \\} + struc dd [val] \\{ \common def@assumed reg,.,
\\} + struc dt [val] \\{ \common def@assumed reg,.,
\\} + struc dq [val] \\{ \common def@assumed reg,., \\} + struc rb cnt \\{ def@assumed reg,.,rb cnt \\} + struc rw cnt \\{ def@assumed reg,.,rw cnt \\} + struc rp cnt \\{ def@assumed reg,.,rp cnt \\} + struc rd cnt \\{ def@assumed reg,.,rd cnt \\} + struc rt cnt \\{ def@assumed reg,.,rt cnt \\} + struc rq cnt \\{ def@assumed reg,.,rq cnt \\} + reg\#@assumed equ + virtual at reg + reg struct + end virtual + purge label + restruc db,dw,dp,dd,dt,dq + restruc rb,rw,rp,rd,rt,rq \} } + +macro def@assumed reg,name,def + { match vars, reg#@assumed \{ reg#@assumed equ reg#@assumed, \} + reg#@assumed equ reg#@assumed name + local ..label + name equ ..label + ..label def } + +struc label type { label . type } + +struc none { label . } diff --git a/asm/equihash/Windows/INCLUDE/MACRO/PROC32.INC b/asm/equihash/Windows/INCLUDE/MACRO/PROC32.INC new file mode 100644 index 0000000..f936d98 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/MACRO/PROC32.INC @@ -0,0 +1,301 @@ + +; Macroinstructions for defining and calling procedures + +macro stdcall proc,[arg] ; directly call STDCALL procedure + { common + if ~ arg eq + reverse + pushd arg + common + end if + call proc } + +macro invoke proc,[arg] ; indirectly call STDCALL procedure + { common + if ~ arg eq + reverse + pushd arg + common + end if + call [proc] } + +macro ccall proc,[arg] ; directly call CDECL procedure + { common + size@ccall = 0 + if ~ arg eq + reverse + pushd arg + size@ccall = size@ccall+4 + common + end if + call proc + if size@ccall + add esp,size@ccall + end if } + +macro cinvoke proc,[arg] ; indirectly call CDECL procedure + { common + size@ccall = 0 + if ~ arg eq + reverse + pushd arg + size@ccall = size@ccall+4 + common + end if + call [proc] + if size@ccall + add esp,size@ccall + end if } + +macro proc [args] ; define procedure + { common + match name params, args> + \{ define@proc name, \{ prologue name,flag,parmbytes,localbytes,reglist \} + virtual at parmbase@proc + match =,args, params \{ defargs@proc args \} + match =args@proc args, args@proc params \{ defargs@proc args \} + parmbytes = $-(parmbase@proc) + end virtual + name # % = parmbytes/4 + all@vars equ + current = 0 + macro locals + \{ virtual at localbase@proc+current + macro label def \\{ match . type,def> \\\{ deflocal@proc .,label, \\\{ epilogue name,flag,parmbytes,localbytes,reglist \\\} \\} \} + macro finish@proc + \{ localbytes = current + match close:reglist, close@proc: \\{ close name,flag,parmbytes,localbytes,reglist \\} + end if \} } + +macro defargs@proc [arg] + { common + if ~ arg eq + forward + local ..arg,current@arg + match argname:type, arg + \{ current@arg equ argname + label ..arg type + argname equ ..arg + if qqword eq type + dd ?,?,?,?,?,?,?,? + else if dqword eq type + dd ?,?,?,? + else if tbyte eq type + dd ?,?,? + else if qword eq type | pword eq type + dd ?,? + else + dd ? + end if \} + match =current@arg,current@arg + \{ current@arg equ arg + arg equ ..arg + ..arg dd ? \} + common + args@proc equ current@arg + forward + restore current@arg + common + end if } + +macro deflocal@proc name,def,[val] { name def val } + +macro deflocal@proc name,def,[val] + { common + match vars, all@vars \{ all@vars equ all@vars, \} + all@vars equ all@vars name + forward + local ..var,..tmp + ..var def val + match =?, val \{ ..tmp equ \} + match any =?, val \{ ..tmp equ \} + match any (=?), val \{ ..tmp equ \} + match =label, def \{ ..tmp equ \} + match tmp : value, ..tmp : val + \{ tmp: end virtual + initlocal@proc ..var,def value + virtual at tmp\} + common + match first rest, ..var, \{ name equ first \} } + +struc label type { label . type } + +macro initlocal@proc name,def + { virtual at name + def + size@initlocal = $ - name + end virtual + position@initlocal = 0 + while size@initlocal > position@initlocal + virtual at name + def + if size@initlocal - position@initlocal < 2 + current@initlocal = 1 + load byte@initlocal byte from name+position@initlocal + else if size@initlocal - position@initlocal < 4 + current@initlocal = 2 + load word@initlocal word from name+position@initlocal + else + current@initlocal = 4 + load dword@initlocal dword from name+position@initlocal + end if + end virtual + if current@initlocal = 1 + mov byte [name+position@initlocal],byte@initlocal + else if current@initlocal = 2 + mov word [name+position@initlocal],word@initlocal + else + mov dword [name+position@initlocal],dword@initlocal + end if + position@initlocal = position@initlocal + current@initlocal + end while } + +macro endp + { purge ret,locals,endl + finish@proc + purge finish@proc + restore regs@proc + match all,args@proc \{ restore all \} + restore args@proc + match all,all@vars \{ restore all \} } + +macro local [var] + { common + locals + forward done@local equ + match varname[count]:vartype, var + \{ match =BYTE, vartype \\{ varname rb count + restore done@local \\} + match =WORD, vartype \\{ varname rw count + restore done@local \\} + match =DWORD, vartype \\{ varname rd count + restore done@local \\} + match =PWORD, vartype \\{ varname rp count + restore done@local \\} + match =QWORD, vartype \\{ varname rq count + restore done@local \\} + match =TBYTE, vartype \\{ varname rt count + restore done@local \\} + match =DQWORD, vartype \\{ label varname dqword + rq count*2 + restore done@local \\} + match =QQWORD, vartype \\{ label varname qqword + rq count*4 + restore done@local \\} + match =XWORD, vartype \\{ label varname xword + rq count*2 + restore done@local \\} + match =YWORD, vartype \\{ label varname yword + rq count*4 + restore done@local \\} + match , done@local \\{ virtual + varname vartype + end virtual + rb count*sizeof.\#vartype + restore done@local \\} \} + match :varname:vartype, done@local:var + \{ match =BYTE, vartype \\{ varname db ? + restore done@local \\} + match =WORD, vartype \\{ varname dw ? + restore done@local \\} + match =DWORD, vartype \\{ varname dd ? + restore done@local \\} + match =PWORD, vartype \\{ varname dp ? + restore done@local \\} + match =QWORD, vartype \\{ varname dq ? + restore done@local \\} + match =TBYTE, vartype \\{ varname dt ? + restore done@local \\} + match =DQWORD, vartype \\{ label varname dqword + dq ?,? + restore done@local \\} + match =QQWORD, vartype \\{ label varname qqword + dq ?,?,?,? + restore done@local \\} + match =XWORD, vartype \\{ label varname xword + dq ?,? + restore done@local \\} + match =YWORD, vartype \\{ label varname yword + dq ?,?,?,? + restore done@local \\} + match , done@local \\{ varname vartype + restore done@local \\} \} + match ,done@local + \{ var + restore done@local \} + common + endl } diff --git a/asm/equihash/Windows/INCLUDE/MACRO/PROC64.INC b/asm/equihash/Windows/INCLUDE/MACRO/PROC64.INC new file mode 100644 index 0000000..68b78ed --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/MACRO/PROC64.INC @@ -0,0 +1,618 @@ + +; Macroinstructions for defining and calling procedures (x64 version) + +macro invoke proc,[arg] + { common fastcall [proc],arg } + +macro fastcall proc,[arg] + { common local stackspace,argscount,counter + if argscount < 4 + stackspace = 4*8 + else if argscount and 1 + stackspace = (argscount+1)*8 + else + stackspace = argscount*8 + end if + counter = 0 + if stackspace + if defined current@frame + if current@frame + virtual + origin = $ + inc param + load opcode byte from origin + if opcode = 67h | opcode = 41h + load opcode byte from origin+1 + end if + if opcode and 0F8h = 48h + size@param = 8 + else if opcode = 66h + size@param = 2 + else if opcode = 0FFh + size@param = 4 + else + size@param = 1 + end if + end virtual + end if + if counter = 1 + if type@param eq float + if ~ param eq xmm0 + if size@param = 4 + if param eqtype byte 0 | param eqtype byte 0f + mov eax,param + movd xmm0,eax + else + movd xmm0,param + end if + else + if param eqtype 0 | param eqtype 0f | param eqtype byte 0 | param eqtype byte 0f + mov rax,param + movq xmm0,rax + else + movq xmm0,param + end if + end if + end if + if vararg@fastcall & ~ param eq rcx + movq rcx,xmm0 + end if + else if type@param eq addr + if ~ param eq rcx + lea rcx,[param] + end if + else if size@param = 8 + if ~ param eq rcx + mov rcx,param + end if + else if size@param = 4 + if ~ param eq ecx + mov ecx,param + end if + else if size@param = 2 + if ~ param eq cx + mov cx,param + end if + else if size@param = 1 + if ~ param eq cl + mov cl,param + end if + end if + else if counter = 2 + if type@param eq float + if ~ param eq xmm1 + if size@param = 4 + if param eqtype byte 0 | param eqtype byte 0f + mov eax,param + movd xmm1,eax + else + movd xmm1,param + end if + else + if param eqtype 0 | param eqtype 0f | param eqtype byte 0 | param eqtype byte 0f + mov rax,param + movq xmm1,rax + else + movq xmm1,param + end if + end if + end if + if vararg@fastcall & ~ param eq rdx + movq rdx,xmm1 + end if + else if type@param eq addr + if ~ param eq rdx + lea rdx,[param] + end if + else if size@param = 8 + if ~ param eq rdx + mov rdx,param + end if + else if size@param = 4 + if ~ param eq edx + mov edx,param + end if + else if size@param = 2 + if ~ param eq dx + mov dx,param + end if + else if size@param = 1 + if ~ param eq dl + mov dl,param + end if + end if + else if counter = 3 + if type@param eq float + if ~ param eq xmm2 + if size@param = 4 + if param eqtype byte 0 | param eqtype byte 0f + mov eax,param + movd xmm2,eax + else + movd xmm2,param + end if + else + if param eqtype 0 | param eqtype 0f | param eqtype byte 0 | param eqtype byte 0f + mov rax,param + movq xmm2,rax + else + movq xmm2,param + end if + end if + end if + if vararg@fastcall & ~ param eq r8 + movq r8,xmm2 + end if + else if type@param eq addr + if ~ param eq r8 + lea r8,[param] + end if + else if size@param = 8 + if ~ param eq r8 + mov r8,param + end if + else if size@param = 4 + if ~ param eq r8d + mov r8d,param + end if + else if size@param = 2 + if ~ param eq r8w + mov r8w,param + end if + else if size@param = 1 + if ~ param eq r8b + mov r8b,param + end if + end if + else if counter = 4 + if type@param eq float + if ~ param eq xmm3 + if size@param = 4 + if param eqtype byte 0 | param eqtype byte 0f + mov eax,param + movd xmm3,eax + else + movd xmm3,param + end if + else + if param eqtype 0 | param eqtype 0f | param eqtype byte 0 | param eqtype byte 0f + mov rax,param + movq xmm3,rax + else + movq xmm3,param + end if + end if + end if + if vararg@fastcall & ~ param eq r9 + movq r9,xmm3 + end if + else if type@param eq addr + if ~ param eq r9 + lea r9,[param] + end if + else if size@param = 8 + if ~ param eq r9 + mov r9,param + end if + else if size@param = 4 + if ~ param eq r9d + mov r9d,param + end if + else if size@param = 2 + if ~ param eq r9w + mov r9w,param + end if + else if size@param = 1 + if ~ param eq r9b + mov r9b,param + end if + end if + else + if type@param eq addr + lea rax,[param] + mov [rsp+(counter-1)*8],rax + else if param eqtype [0] | param eqtype byte [0] + if size@param = 8 + mov rax,param + mov [rsp+(counter-1)*8],rax + else if size@param = 4 + mov eax,param + mov [rsp+(counter-1)*8],eax + else if size@param = 2 + mov ax,param + mov [rsp+(counter-1)*8],ax + else + mov al,param + mov [rsp+(counter-1)*8],al + end if + else if size@param = 8 + virtual + origin = $ + mov rax,param + load opcode byte from origin+1 + end virtual + if opcode = 0B8h + mov rax,param + mov [rsp+(counter-1)*8],rax + else + mov qword [rsp+(counter-1)*8],param + end if + else if param in + movq [rsp+(counter-1)*8],param + else + mov [rsp+(counter-1)*8],param + end if + end if \} + common + argscount = counter + call proc + if stackspace & ~defined current@frame + add rsp,stackspace + end if } + +macro proc [args] + { common + match name params, args> + \{ define@proc name, \{ prologue name,flag,parmbytes,localbytes,reglist \} + virtual at parmbase@proc + match =,args, params \{ defargs@proc args \} + match =args@proc args, args@proc params \{ defargs@proc args \} + parmbytes = $-(parmbase@proc) + end virtual + name # % = parmbytes/8 + all@vars equ + current = 0 + macro locals + \{ virtual at localbase@proc+current + macro label def \\{ match . type,def> \\\{ deflocal@proc .,label, \\\{ epilogue name,flag,parmbytes,localbytes,reglist \\\} \\} \} + macro finish@proc + \{ localbytes = current + match close:reglist, close@proc: \\{ close name,flag,parmbytes,localbytes,reglist \\} + end if \} } + +macro defargs@proc [arg] + { common + if ~ arg eq + forward + local ..arg,current@arg + match argname:type, arg + \{ current@arg equ argname + label ..arg type + argname equ ..arg + if qqword eq type + dq ?,?,?,? + else if dqword eq type + dq ?,? + else if tbyte eq type + dq ?,? + else + dq ? + end if \} + match =current@arg,current@arg + \{ current@arg equ arg + arg equ ..arg + ..arg dq ? \} + common + args@proc equ current@arg + forward + restore current@arg + common + end if } + +macro deflocal@proc name,def,[val] { name def val } + +macro deflocal@proc name,def,[val] + { common + match vars, all@vars \{ all@vars equ all@vars, \} + all@vars equ all@vars name + forward + local ..var,..tmp + ..var def val + match =?, val \{ ..tmp equ \} + match any =?, val \{ ..tmp equ \} + match any (=?), val \{ ..tmp equ \} + match =label, def \{ ..tmp equ \} + match tmp : value, ..tmp : val + \{ tmp: end virtual + initlocal@proc ..var,def value + virtual at tmp\} + common + match first rest, ..var, \{ name equ first \} } + +struc label type { label . type } + +macro initlocal@proc name,def + { virtual at name + def + size@initlocal = $ - name + end virtual + position@initlocal = 0 + while size@initlocal > position@initlocal + virtual at name + def + if size@initlocal - position@initlocal < 2 + current@initlocal = 1 + load byte@initlocal byte from name+position@initlocal + else if size@initlocal - position@initlocal < 4 + current@initlocal = 2 + load word@initlocal word from name+position@initlocal + else if size@initlocal - position@initlocal < 8 + current@initlocal = 4 + load dword@initlocal dword from name+position@initlocal + else + load qword@initlocal qword from name+position@initlocal + if ( qword@initlocal > 0 & qword@initlocal < 80000000h ) | ( qword@initlocal < 0 & qword@initlocal >= -80000000h ) + current@initlocal = 8 + else + current@initlocal = 4 + dword@initlocal = qword@initlocal and 0FFFFFFFFh + end if + end if + end virtual + if current@initlocal = 1 + mov byte [name+position@initlocal],byte@initlocal + else if current@initlocal = 2 + mov word [name+position@initlocal],word@initlocal + else if current@initlocal = 4 + mov dword [name+position@initlocal],dword@initlocal + else + mov qword [name+position@initlocal],qword@initlocal + end if + position@initlocal = position@initlocal + current@initlocal + end while } + +macro endp + { purge ret,locals,endl + finish@proc + purge finish@proc + restore regs@proc + match all,args@proc \{ restore all \} + restore args@proc + match all,all@vars \{ restore all \} } + +macro local [var] + { common + locals + forward done@local equ + match varname[count]:vartype, var + \{ match =BYTE, vartype \\{ varname rb count + restore done@local \\} + match =WORD, vartype \\{ varname rw count + restore done@local \\} + match =DWORD, vartype \\{ varname rd count + restore done@local \\} + match =PWORD, vartype \\{ varname rp count + restore done@local \\} + match =QWORD, vartype \\{ varname rq count + restore done@local \\} + match =TBYTE, vartype \\{ varname rt count + restore done@local \\} + match =DQWORD, vartype \\{ label varname dqword + rq count*2 + restore done@local \\} + match =QQWORD, vartype \\{ label varname qqword + rq count*4 + restore done@local \\} + match =XWORD, vartype \\{ label varname xword + rq count*2 + restore done@local \\} + match =YWORD, vartype \\{ label varname yword + rq count*4 + restore done@local \\} + match , done@local \\{ virtual + varname vartype + end virtual + rb count*sizeof.\#vartype + restore done@local \\} \} + match :varname:vartype, done@local:var + \{ match =BYTE, vartype \\{ varname db ? + restore done@local \\} + match =WORD, vartype \\{ varname dw ? + restore done@local \\} + match =DWORD, vartype \\{ varname dd ? + restore done@local \\} + match =PWORD, vartype \\{ varname dp ? + restore done@local \\} + match =QWORD, vartype \\{ varname dq ? + restore done@local \\} + match =TBYTE, vartype \\{ varname dt ? + restore done@local \\} + match =DQWORD, vartype \\{ label varname dqword + dq ?,? + restore done@local \\} + match =QQWORD, vartype \\{ label varname qqword + dq ?,?,?,? + restore done@local \\} + match =XWORD, vartype \\{ label varname xword + dq ?,? + restore done@local \\} + match =YWORD, vartype \\{ label varname yword + dq ?,?,?,? + restore done@local \\} + match , done@local \\{ varname vartype + restore done@local \\} \} + match ,done@local + \{ var + restore done@local \} + common + endl } + +macro frame + { local size,current + if size + sub rsp,size + end if + current = 0 + current@frame equ current + size@frame equ size } + +macro endf + { size@frame = current@frame + if size@frame + add rsp,size@frame + end if + restore size@frame,current@frame } + +macro static_rsp_prologue procname,flag,parmbytes,localbytes,reglist + { local counter,loc,frame,current + counter = 0 + irps reg, reglist \{ push reg + counter = counter+1 \} + loc = (localbytes+7) and (not 7) + if frame & (counter+loc shr 3+1) and 1 + loc = loc + 8 + end if + framebytes@proc equ frame+loc + if framebytes@proc + sub rsp,framebytes@proc + end if + localbase@proc equ rsp+frame + regsbase@proc equ rsp+frame+loc + parmbase@proc equ rsp+frame+loc+counter*8+8 + current = 0 + current@frame equ current + size@frame equ frame } + +macro static_rsp_epilogue procname,flag,parmbytes,localbytes,reglist + { if framebytes@proc + add rsp,framebytes@proc + end if + irps reg, reglist \{ reverse pop reg \} + retn } + +macro static_rsp_close procname,flag,parmbytes,localbytes,reglist + { size@frame = current@frame + restore size@frame,current@frame } + +stdcall fix fastcall + +macro cinvoke proc,[arg] + { common ccall [proc],arg } + +macro ccall proc,[arg] + { common vararg@fastcall = 1 + fastcall proc,arg + vararg@fastcall = 0 } + +vararg@fastcall = 0 \ No newline at end of file diff --git a/asm/equihash/Windows/INCLUDE/MACRO/RESOURCE.INC b/asm/equihash/Windows/INCLUDE/MACRO/RESOURCE.INC new file mode 100644 index 0000000..920754b --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/MACRO/RESOURCE.INC @@ -0,0 +1,334 @@ + +; Macroinstructions for making resource section + +macro directory [type,label] + { common + local max,count + count = 0 + max = 0 + forward + count = count + 1 + if type > max + max = type + end if + common + root@resource dd 0,%t,0,count shl 16 + repeat max + forward + if % = type + dd type,80000000h+label-root@resource + end if + common + end repeat } + +macro resource dir,[id,lang,label] + { common + dir: + local min,max,count,current + forward + min = id + max = id + common + count = 0 + forward + count = count + 1 + if id < min + min = id + else if id > max + max = id + end if + common + dd 0,%t,0,count shl 16 + repeat max-min+1 + current = $ + forward + if min+%-1 = id + if current = $ + dd id,80000000h+label#.directory-root@resource + end if + end if + common + end repeat + repeat max-min+1 + current = $ + forward + if min+%-1 = id + if current = $ + label#.directory dd 0,%t,0,10000h,lang,label-root@resource + count = 1 + else + dd lang,label-root@resource + count = count + 1 + end if + end if + label#.resid = id + common + local x,y,z,v1,v2 + if count > 1 + store word count at current+0Eh + x = count shr 1 + while x > 0 + y = x + while y < count + z = y + while z-x >= 0 + load v1 dword from current+10h+z*8 + load v2 dword from current+10h+(z-x)*8 + if v1 0 + dw 0FFFFh + end if + du menu+0,0,title,0 + if fontname eq + du 8,'MS Sans Serif',0 + else + du fontsize+0,fontname,0 + end if + align 4 + dialog_size equ size = $ - data + dialog_items equ items = dialog_items_counter + dialog_items_counter = 0 } + +macro dialogitem class,title,id,x,y,cx,cy,style,exstyle + { dd style or WS_CHILD,exstyle +0 + dw x,y,cx,cy,id + if class eq 'BUTTON' + dw 0FFFFh,80h + else if class eq 'EDIT' + dw 0FFFFh,81h + else if class eq 'STATIC' + dw 0FFFFh,82h + else if class eq 'LISTBOX' + dw 0FFFFh,83h + else if class eq 'SCROLLBAR' + dw 0FFFFh,84h + else if class eq 'COMBOBOX' + dw 0FFFFh,85h + else + du class,0 + end if + if title eqtype 0 + dw 0FFFFh,title + else + du title,0 + end if + dw 0 + align 4 + dialog_items_counter = dialog_items_counter + 1 } + +macro enddialog + { dialog_items + dialog_size } + +macro accelerator label,[fvirt,key,cmd] + { common + local data,size + label dd RVA data,size,0,0 + data: + accel_count = 0 + forward + accel_count = accel_count + 1 + common + size = accel_count * 8 + forward + accel_count = accel_count - 1 + if accel_count = 0 + dw fvirt or 80h,key + else + dw fvirt,key + end if + dd cmd } + +macro versioninfo label,fileos,filetype,filesubtype,lang,cp,[name,value] + { common + local data,size,vivalue,visize + label dd RVA data,size,0,0 + data dw size,visize,0 + du 'VS_VERSION_INFO',0,0 + vivalue dd 0FEEF04BDh,00010000h + local version,count,shift,char,filever,productver + filever = 0 + productver = 0 + forward + if name eq 'FileVersion' | name eq 'ProductVersion' + virtual at 0 + db value + count = $ + version = 0 + shift = 16 + repeat count + load char from %-1 + if char='.' + if shift mod 32 + shift = shift-16 + else + shift = shift+32+16 + end if + else + version = (version and not (0FFFFh shl shift)) or ((version shr shift and 0FFFFh)*10+char-'0') shl shift + end if + end repeat + end virtual + if name eq 'FileVersion' + filever = version + else if name eq 'ProductVersion' + productver = version + end if + end if + common + dq filever,productver + dd 0,0,fileos,filetype+0,filesubtype+0,0,0 + visize = $ - vivalue + local sfi_data,sfi_size + sfi_data dd sfi_size + du 1,'StringFileInfo',0 + local str_data,str_size + str_data dd str_size + du 1,'040904E4',0 + forward + local vs_data,vs_size,value_data,value_size + align 4 + vs_data dw vs_size,value_size/2 + du 1,name,0 + align 4 + value_data du value,0 + value_size = $ - value_data + vs_size = $ - vs_data + common + align 4 + str_size = $ - str_data + sfi_size = $ - sfi_data + local vfi_data,vfi_size,var_data,var_size + vfi_data dd vfi_size + du 1,'VarFileInfo',0,0 + var_data dw var_size,4 + du 0,'Translation',0,0 + dw lang,cp+0 + var_size = $ - var_data + vfi_size = $ - vfi_data + size = $ - data } + +macro resdata label +{ local data,size + label dd RVA data,size,0,0 + data = $ + ressize equ size = $ - data } + +macro endres +{ ressize + align 4 } diff --git a/asm/equihash/Windows/INCLUDE/MACRO/STRUCT.INC b/asm/equihash/Windows/INCLUDE/MACRO/STRUCT.INC new file mode 100644 index 0000000..0db41d9 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/MACRO/STRUCT.INC @@ -0,0 +1,221 @@ + +; Macroinstructions for defining data structures + +macro struct name + { virtual at 0 + define @struct + field@struct equ name + match child parent, name \{ restore field@struct + field@struct equ child,fields@\#parent \} + sub@struct equ + struc db [val] \{ \common define field@struct .,db, \} + struc dw [val] \{ \common define field@struct .,dw, \} + struc du [val] \{ \common define field@struct .,du, \} + struc dd [val] \{ \common define field@struct .,dd, \} + struc dp [val] \{ \common define field@struct .,dp, \} + struc dq [val] \{ \common define field@struct .,dq, \} + struc dt [val] \{ \common define field@struct .,dt, \} + struc rb count \{ define field@struct .,db,count dup (?) \} + struc rw count \{ define field@struct .,dw,count dup (?) \} + struc rd count \{ define field@struct .,dd,count dup (?) \} + struc rp count \{ define field@struct .,dp,count dup (?) \} + struc rq count \{ define field@struct .,dq,count dup (?) \} + struc rt count \{ define field@struct .,dt,count dup (?) \} + macro db [val] \{ \common \local anonymous + define field@struct anonymous,db, \} + macro dw [val] \{ \common \local anonymous + define field@struct anonymous,dw, \} + macro du [val] \{ \common \local anonymous + define field@struct anonymous,du, \} + macro dd [val] \{ \common \local anonymous + define field@struct anonymous,dd, \} + macro dp [val] \{ \common \local anonymous + define field@struct anonymous,dp, \} + macro dq [val] \{ \common \local anonymous + define field@struct anonymous,dq, \} + macro dt [val] \{ \common \local anonymous + define field@struct anonymous,dt, \} + macro rb count \{ \local anonymous + define field@struct anonymous,db,count dup (?) \} + macro rw count \{ \local anonymous + define field@struct anonymous,dw,count dup (?) \} + macro rd count \{ \local anonymous + define field@struct anonymous,dd,count dup (?) \} + macro rp count \{ \local anonymous + define field@struct anonymous,dp,count dup (?) \} + macro rq count \{ \local anonymous + define field@struct anonymous,dq,count dup (?) \} + macro rt count \{ \local anonymous + define field@struct anonymous,dt,count dup (?) \} + macro union \{ field@struct equ ,union,< + sub@struct equ union \} + macro struct \{ field@struct equ ,substruct,< + sub@struct equ substruct \} } + +macro ends + { match , sub@struct \{ restruc db,dw,du,dd,dp,dq,dt + restruc rb,rw,rd,rp,rq,rt + purge db,dw,du,dd,dp,dq,dt + purge rb,rw,rd,rp,rq,rt + purge union,struct + irpv fields,field@struct \\{ restore field@struct + \\common define fields@struct fields \\} + match name tail,fields@struct, \\{ if $ + display 'Error: definition of ',\\`name,' contains illegal instructions.',0Dh,0Ah + err + end if \\} + match name=,fields,fields@struct \\{ restore @struct + make@struct name,fields + define fields@\\#name fields \\} + end virtual \} + match any, sub@struct \{ tmp@struct equ field@struct + restore field@struct + field@struct equ tmp@struct> \} + restore sub@struct } + +macro make@struct name,[field,type,def] + { common + local define + define equ name + forward + local sub + match , field \{ make@substruct type,name,sub def + define equ define,.,sub, \} + match any, field \{ define equ define,.#field,type, \} + common + match fields, define \{ define@struct fields \} } + +macro define@struct name,[field,type,def] + { common + virtual + db `name + load initial@struct byte from 0 + if initial@struct = '.' + display 'Error: name of structure should not begin with a dot.',0Dh,0Ah + err + end if + end virtual + local list + list equ + forward + if ~ field eq . + name#field type def + sizeof.#name#field = $ - name#field + else + label name#.#type + rb sizeof.#type + end if + local value + match any, list \{ list equ list, \} + list equ list + common + sizeof.#name = $ + restruc name + match values, list \{ + struc name value \\{ \\local \\..base + match , @struct \\\{ define field@struct .,name, \\\} + match no, @struct \\\{ label \\..base + forward + match , value \\\\{ field type def \\\\} + match any, value \\\\{ field type value + if ~ field eq . + rb sizeof.#name#field - ($-field) + end if \\\\} + common label . at \\..base \\\} + \\} + macro name value \\{ + match , @struct \\\{ \\\local anonymous + define field@struct anonymous,name, \\\} + match no, @struct \\\{ + forward + match , value \\\\{ type def \\\\} + match any, value \\\\{ \\\\local ..field + ..field = $ + type value + if ~ field eq . + rb sizeof.#name#field - ($-..field) + end if \\\\} + common \\\} \\} \} } + +macro enable@substruct + { macro make@substruct substruct,parent,name,[field,type,def] + \{ \common + \local define + define equ parent,name + \forward + \local sub + match , field \\{ match any, type \\\{ enable@substruct + make@substruct type,parent,sub def + purge make@substruct + define equ define,.,sub, \\\} \\} + match any, field \\{ define equ define,.\#field,type, \\} + \common + match fields, define \\{ define@\#substruct fields \\} \} } + +enable@substruct + +macro define@union parent,name,[field,type,def] + { common + virtual at parent#.#name + forward + if ~ field eq . + virtual at parent#.#name + parent#field type def + sizeof.#parent#field = $ - parent#field + end virtual + if sizeof.#parent#field > $ - parent#.#name + rb sizeof.#parent#field - ($ - parent#.#name) + end if + else + virtual at parent#.#name + label parent#.#type + type def + end virtual + label name#.#type at parent#.#name + if sizeof.#type > $ - parent#.#name + rb sizeof.#type - ($ - parent#.#name) + end if + end if + common + sizeof.#name = $ - parent#.#name + end virtual + struc name [value] \{ \common + label .\#name + last@union equ + forward + match any, last@union \\{ virtual at .\#name + field type def + end virtual \\} + match , last@union \\{ match , value \\\{ field type def \\\} + match any, value \\\{ field type value \\\} \\} + last@union equ field + common rb sizeof.#name - ($ - .\#name) \} + macro name [value] \{ \common \local ..anonymous + ..anonymous name value \} } + +macro define@substruct parent,name,[field,type,def] + { common + virtual at parent#.#name + forward + local value + if ~ field eq . + parent#field type def + sizeof.#parent#field = $ - parent#field + else + label parent#.#type + rb sizeof.#type + end if + common + sizeof.#name = $ - parent#.#name + end virtual + struc name value \{ + label .\#name + forward + match , value \\{ field type def \\} + match any, value \\{ field type value + if ~ field eq . + rb sizeof.#parent#field - ($-field) + end if \\} + common \} + macro name value \{ \local ..anonymous + ..anonymous name \} } diff --git a/asm/equihash/Windows/INCLUDE/PCOUNT/ADVAPI32.INC b/asm/equihash/Windows/INCLUDE/PCOUNT/ADVAPI32.INC new file mode 100644 index 0000000..311655e --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/PCOUNT/ADVAPI32.INC @@ -0,0 +1,340 @@ + +; ADVAPI32 API calls parameters' count + +AbortSystemShutdown% = 1 +AccessCheck% = 8 +AccessCheckAndAuditAlarm% = 11 +AccessCheckByType% = 11 +AccessCheckByTypeAndAuditAlarm% = 16 +AccessCheckByTypeResultList% = 11 +AccessCheckByTypeResultListAndAuditAlarm% = 16 +AddAccessAllowedAce% = 4 +AddAccessAllowedAceEx% = 5 +AddAccessAllowedObjectAce% = 7 +AddAccessDeniedAce% = 4 +AddAccessDeniedAceEx% = 5 +AddAccessDeniedObjectAce% = 7 +AddAce% = 5 +AddAuditAccessAce% = 6 +AddAuditAccessAceEx% = 7 +AddAuditAccessObjectAce% = 9 +AdjustTokenGroups% = 6 +AdjustTokenPrivileges% = 6 +AllocateAndInitializeSid% = 11 +AllocateLocallyUniqueId% = 1 +AreAllAccessesGranted% = 2 +AreAnyAccessesGranted% = 2 +BackupEventLog% = 2 +BuildExplicitAccessWithName% = 5 +BuildImpersonateExplicitAccessWithName% = 6 +BuildImpersonateTrustee% = 2 +BuildSecurityDescriptor% = 9 +BuildTrusteeWithName% = 2 +BuildTrusteeWithSid% = 2 +CancelOverlappedAccess% = 1 +ChangeServiceConfig2% = 3 +ChangeServiceConfig% = 11 +ClearEventLog% = 2 +CloseEventLog% = 1 +CloseRaw% = 1 +CloseServiceHandle% = 1 +ControlService% = 3 +ConvertAccessToSecurityDescriptor% = 5 +ConvertSecurityDescriptorToAccess% = 7 +ConvertSecurityDescriptorToAccessNamed% = 7 +ConvertToAutoInheritPrivateObjectSecurity% = 6 +CopySid% = 3 +CreatePrivateObjectSecurity% = 6 +CreatePrivateObjectSecurityEx% = 8 +CreateProcessAsUser% = 11 +CreateRestrictedToken% = 9 +CreateService% = 13 +CryptAcquireContext% = 5 +CryptContextAddRef% = 3 +CryptCreateHash% = 5 +CryptDecrypt% = 6 +CryptDeriveKey% = 5 +CryptDestroyHash% = 1 +CryptDestroyKey% = 1 +CryptDuplicateHash% = 4 +CryptDuplicateKey% = 4 +CryptEncrypt% = 7 +CryptEnumProviderTypes% = 6 +CryptEnumProviders% = 6 +CryptExportKey% = 6 +CryptGenKey% = 4 +CryptGenRandom% = 3 +CryptGetDefaultProvider% = 5 +CryptGetHashParam% = 5 +CryptGetKeyParam% = 5 +CryptGetProvParam% = 5 +CryptGetUserKey% = 3 +CryptHashData% = 4 +CryptHashSessionKey% = 3 +CryptImportKey% = 6 +CryptReleaseContext% = 2 +CryptSetHashParam% = 4 +CryptSetKeyParam% = 4 +CryptSetProvParam% = 4 +CryptSetProvider% = 2 +CryptSetProviderEx% = 4 +CryptSignHash% = 6 +CryptVerifySignature% = 6 +DecryptFile% = 2 +DeleteAce% = 2 +DeleteService% = 1 +DeregisterEventSource% = 1 +DestroyPrivateObjectSecurity% = 1 +DuplicateToken% = 3 +DuplicateTokenEx% = 6 +ElfBackupEventLogFile% = 2 +ElfChangeNotify% = 2 +ElfClearEventLogFile% = 2 +ElfCloseEventLog% = 1 +ElfDeregisterEventSource% = 1 +ElfNumberOfRecords% = 2 +ElfOldestRecord% = 2 +ElfOpenBackupEventLog% = 3 +ElfOpenEventLog% = 3 +ElfReadEventLog% = 7 +ElfRegisterEventSource% = 3 +ElfReportEvent% = 12 +EncryptFile% = 1 +EnumDependentServices% = 6 +EnumServicesStatus% = 8 +EqualPrefixSid% = 2 +EqualSid% = 2 +FindFirstFreeAce% = 2 +FreeSid% = 1 +GetAccessPermissionsForObject% = 9 +GetAce% = 3 +GetAclInformation% = 4 +GetAuditedPermissionsFromAcl% = 4 +GetCurrentHwProfile% = 1 +GetEffectiveRightsFromAcl% = 3 +GetExplicitEntriesFromAcl% = 3 +GetFileSecurity% = 5 +GetKernelObjectSecurity% = 5 +GetLengthSid% = 1 +GetMultipleTrustee% = 1 +GetMultipleTrusteeOperation% = 1 +GetNamedSecurityInfo% = 8 +GetNamedSecurityInfoEx% = 9 +GetNumberOfEventLogRecords% = 2 +GetOldestEventLogRecord% = 2 +GetOverlappedAccessResults% = 4 +GetPrivateObjectSecurity% = 5 +GetSecurityDescriptorControl% = 3 +GetSecurityDescriptorDacl% = 4 +GetSecurityDescriptorGroup% = 3 +GetSecurityDescriptorLength% = 1 +GetSecurityDescriptorOwner% = 3 +GetSecurityDescriptorSacl% = 4 +GetSecurityInfo% = 8 +GetSecurityInfoEx% = 9 +GetServiceDisplayName% = 4 +GetServiceKeyName% = 4 +GetSidLengthRequired% = 1 +GetSidSubAuthority% = 2 +GetSidSubAuthorityCount% = 1 +GetTokenInformation% = 5 +GetTrusteeName% = 1 +GetTrusteeType% = 1 +GetUserName% = 2 +I_ScSetServiceBits% = 5 +ImpersonateLoggedOnUser% = 1 +ImpersonateNamedPipeClient% = 1 +ImpersonateSelf% = 1 +InitializeAcl% = 3 +InitializeSecurityDescriptor% = 2 +InitializeSid% = 3 +InitiateSystemShutdown% = 5 +IsTextUnicode% = 3 +IsTokenRestricted% = 1 +IsValidAcl% = 1 +IsValidSecurityDescriptor% = 1 +IsValidSid% = 1 +LockServiceDatabase% = 1 +LogonUser% = 6 +LookupAccountName% = 7 +LookupAccountSid% = 7 +LookupPrivilegeDisplayName% = 5 +LookupPrivilegeName% = 4 +LookupPrivilegeValue% = 3 +LookupSecurityDescriptorParts% = 7 +LsaAddAccountRights% = 4 +LsaAddPrivilegesToAccount% = 2 +LsaClearAuditLog% = 1 +LsaClose% = 1 +LsaCreateAccount% = 4 +LsaCreateSecret% = 4 +LsaCreateTrustedDomain% = 4 +LsaCreateTrustedDomainEx% = 5 +LsaDelete% = 1 +LsaDeleteTrustedDomain% = 2 +LsaEnumerateAccountRights% = 4 +LsaEnumerateAccounts% = 5 +LsaEnumerateAccountsWithUserRight% = 4 +LsaEnumeratePrivileges% = 5 +LsaEnumeratePrivilegesOfAccount% = 2 +LsaEnumerateTrustedDomains% = 5 +LsaEnumerateTrustedDomainsEx% = 6 +LsaFreeMemory% = 1 +LsaGetQuotasForAccount% = 2 +LsaGetSystemAccessAccount% = 2 +LsaGetUserName% = 2 +LsaICLookupNames% = 7 +LsaICLookupSids% = 7 +LsaIGetTrustedDomainAuthInfoBlobs% = 4 +LsaISetTrustedDomainAuthInfoBlobs% = 4 +LsaLookupNames% = 5 +LsaLookupPrivilegeDisplayName% = 4 +LsaLookupPrivilegeName% = 3 +LsaLookupPrivilegeValue% = 3 +LsaLookupSids% = 5 +LsaNtStatusToWinError% = 1 +LsaOpenAccount% = 4 +LsaOpenPolicy% = 4 +LsaOpenSecret% = 4 +LsaOpenTrustedDomain% = 4 +LsaQueryDomainInformationPolicy% = 3 +LsaQueryInfoTrustedDomain% = 3 +LsaQueryInformationPolicy% = 3 +LsaQueryLocalInformationPolicy% = 3 +LsaQuerySecret% = 5 +LsaQuerySecurityObject% = 3 +LsaQueryTrustedDomainInfo% = 4 +LsaQueryTrustedDomainInfoByName% = 4 +LsaRemoveAccountRights% = 5 +LsaRemovePrivilegesFromAccount% = 3 +LsaRetrievePrivateData% = 3 +LsaSetDomainInformationPolicy% = 3 +LsaSetInformationPolicy% = 3 +LsaSetInformationTrustedDomain% = 3 +LsaSetLocalInformationPolicy% = 3 +LsaSetQuotasForAccount% = 2 +LsaSetSecret% = 3 +LsaSetSecurityObject% = 3 +LsaSetSystemAccessAccount% = 2 +LsaSetTrustedDomainInfoByName% = 4 +LsaSetTrustedDomainInformation% = 4 +LsaStorePrivateData% = 3 +MakeAbsoluteSD% = 11 +MakeSelfRelativeSD% = 3 +MapGenericMask% = 2 +NotifyBootConfigStatus% = 1 +NotifyChangeEventLog% = 2 +ObjectCloseAuditAlarm% = 3 +ObjectDeleteAuditAlarm% = 3 +ObjectOpenAuditAlarm% = 12 +ObjectPrivilegeAuditAlarm% = 6 +OpenBackupEventLog% = 2 +OpenEventLog% = 2 +OpenProcessToken% = 3 +OpenRaw% = 3 +OpenSCManager% = 3 +OpenService% = 3 +OpenThreadToken% = 4 +PrivilegeCheck% = 3 +PrivilegedServiceAuditAlarm% = 5 +QueryRecoveryAgents% = 3 +QueryServiceConfig2% = 5 +QueryServiceConfig% = 4 +QueryServiceLockStatus% = 4 +QueryServiceObjectSecurity% = 5 +QueryServiceStatus% = 2 +QueryWindows31FilesMigration% = 1 +ReadEventLog% = 7 +ReadRaw% = 3 +RegCloseKey% = 1 +RegConnectRegistry% = 3 +RegCreateKey% = 3 +RegCreateKeyEx% = 9 +RegDeleteKey% = 2 +RegDeleteValue% = 2 +RegEnumKey% = 4 +RegEnumKeyEx% = 8 +RegEnumValue% = 8 +RegFlushKey% = 1 +RegGetKeySecurity% = 4 +RegLoadKey% = 3 +RegNotifyChangeKeyValue% = 5 +RegOpenKey% = 3 +RegOpenKeyEx% = 5 +RegOverridePredefKey% = 2 +RegQueryInfoKey% = 12 +RegQueryMultipleValues% = 5 +RegQueryValue% = 4 +RegQueryValueEx% = 6 +RegReplaceKey% = 4 +RegRestoreKey% = 3 +RegSaveKey% = 3 +RegSetKeySecurity% = 3 +RegSetValue% = 5 +RegSetValueEx% = 6 +RegUnLoadKey% = 2 +RegisterEventSource% = 2 +RegisterServiceCtrlHandler% = 2 +ReportEvent% = 9 +RevertToSelf% = 0 +SetAclInformation% = 4 +SetEntriesInAccessList% = 6 +SetEntriesInAcl% = 4 +SetEntriesInAuditList% = 6 +SetFileSecurity% = 3 +SetKernelObjectSecurity% = 3 +SetNamedSecurityInfo% = 7 +SetNamedSecurityInfoEx% = 9 +SetPrivateObjectSecurity% = 5 +SetPrivateObjectSecurityEx% = 6 +SetSecurityDescriptorControl% = 3 +SetSecurityDescriptorDacl% = 4 +SetSecurityDescriptorGroup% = 3 +SetSecurityDescriptorOwner% = 3 +SetSecurityDescriptorSacl% = 4 +SetSecurityInfo% = 7 +SetSecurityInfoEx% = 9 +SetServiceBits% = 4 +SetServiceObjectSecurity% = 3 +SetServiceStatus% = 2 +SetThreadToken% = 2 +SetTokenInformation% = 4 +StartService% = 3 +StartServiceCtrlDispatcher% = 1 +SynchronizeWindows31FilesAndWindowsNTRegistry% = 4 +SystemFunction001% = 3 +SystemFunction002% = 3 +SystemFunction003% = 2 +SystemFunction004% = 3 +SystemFunction005% = 3 +SystemFunction006% = 2 +SystemFunction007% = 2 +SystemFunction008% = 3 +SystemFunction009% = 3 +SystemFunction010% = 3 +SystemFunction011% = 3 +SystemFunction012% = 3 +SystemFunction013% = 3 +SystemFunction014% = 3 +SystemFunction015% = 3 +SystemFunction016% = 3 +SystemFunction017% = 3 +SystemFunction018% = 3 +SystemFunction019% = 3 +SystemFunction020% = 3 +SystemFunction021% = 3 +SystemFunction022% = 3 +SystemFunction023% = 3 +SystemFunction024% = 3 +SystemFunction025% = 3 +SystemFunction026% = 3 +SystemFunction027% = 3 +SystemFunction028% = 2 +SystemFunction029% = 2 +SystemFunction030% = 2 +SystemFunction031% = 2 +SystemFunction032% = 2 +SystemFunction033% = 2 +TrusteeAccessToObject% = 6 +UnlockServiceDatabase% = 1 +WriteRaw% = 3 diff --git a/asm/equihash/Windows/INCLUDE/PCOUNT/COMCTL32.INC b/asm/equihash/Windows/INCLUDE/PCOUNT/COMCTL32.INC new file mode 100644 index 0000000..adf4032 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/PCOUNT/COMCTL32.INC @@ -0,0 +1,69 @@ + +; COMCTL32 API calls parameters' count + +CreateMappedBitmap% = 5 +CreatePropertySheetPage% = 1 +CreateStatusWindow% = 4 +CreateToolbar% = 8 +CreateToolbarEx% = 13 +CreateUpDownControl% = 12 +DestroyPropertySheetPage% = 1 +DrawInsert% = 3 +DrawStatusText% = 4 +FlatSB_EnableScrollBar% = 3 +FlatSB_GetScrollInfo% = 3 +FlatSB_GetScrollPos% = 2 +FlatSB_GetScrollProp% = 3 +FlatSB_GetScrollRange% = 4 +FlatSB_SetScrollInfo% = 4 +FlatSB_SetScrollPos% = 4 +FlatSB_SetScrollProp% = 4 +FlatSB_SetScrollRange% = 5 +FlatSB_ShowScrollBar% = 3 +GetEffectiveClientRect% = 3 +ImageList_Add% = 3 +ImageList_AddIcon% = 2 +ImageList_AddMasked% = 3 +ImageList_BeginDrag% = 4 +ImageList_Copy% = 5 +ImageList_Create% = 5 +ImageList_Destroy% = 1 +ImageList_DragEnter% = 3 +ImageList_DragLeave% = 1 +ImageList_DragMove% = 2 +ImageList_DragShowNolock% = 1 +ImageList_Draw% = 6 +ImageList_DrawEx% = 10 +ImageList_DrawIndirect% = 1 +ImageList_Duplicate% = 1 +ImageList_EndDrag% = 0 +ImageList_GetBkColor% = 1 +ImageList_GetDragImage% = 2 +ImageList_GetIcon% = 3 +ImageList_GetIconSize% = 3 +ImageList_GetImageCount% = 1 +ImageList_GetImageInfo% = 3 +ImageList_GetImageRect% = 3 +ImageList_LoadImage% = 7 +ImageList_Merge% = 6 +ImageList_Read% = 1 +ImageList_Remove% = 2 +ImageList_Replace% = 4 +ImageList_ReplaceIcon% = 3 +ImageList_SetBkColor% = 2 +ImageList_SetDragCursorImage% = 4 +ImageList_SetFilter% = 3 +ImageList_SetIconSize% = 3 +ImageList_SetImageCount% = 2 +ImageList_SetOverlayImage% = 3 +ImageList_Write% = 2 +InitCommonControls% = 0 +InitCommonControlsEx% = 1 +InitializeFlatSB% = 1 +LBItemFromPt% = 4 +MakeDragList% = 1 +MenuHelp% = 7 +PropertySheet% = 1 +ShowHideMenuCtl% = 3 +UninitializeFlatSB% = 1 +_TrackMouseEvent% = 1 diff --git a/asm/equihash/Windows/INCLUDE/PCOUNT/COMDLG32.INC b/asm/equihash/Windows/INCLUDE/PCOUNT/COMDLG32.INC new file mode 100644 index 0000000..3417a8c --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/PCOUNT/COMDLG32.INC @@ -0,0 +1,18 @@ + +; COMDLG32 API calls parameters' count + +ChooseColor% = 1 +ChooseFont% = 1 +CommDlgExtendedError% = 0 +FindText% = 1 +FormatCharDlgProc% = 4 +GetFileTitle% = 3 +GetOpenFileName% = 1 +GetSaveFileName% = 1 +LoadAlterBitmap% = 3 +PageSetupDlg% = 1 +PrintDlg% = 1 +ReplaceText% = 1 +WantArrows% = 4 +dwLBSubclass% = 4 +dwOKSubclass% = 4 diff --git a/asm/equihash/Windows/INCLUDE/PCOUNT/GDI32.INC b/asm/equihash/Windows/INCLUDE/PCOUNT/GDI32.INC new file mode 100644 index 0000000..6d5c76b --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/PCOUNT/GDI32.INC @@ -0,0 +1,319 @@ + +; GDI32 API calls parameters' count + +AbortDoc% = 1 +AbortPath% = 1 +AddFontMemResourceEx% = 4 +AddFontResource% = 1 +AddFontResourceEx% = 3 +AngleArc% = 6 +AnimatePalette% = 4 +Arc% = 9 +ArcTo% = 9 +BeginPath% = 1 +BitBlt% = 9 +CancelDC% = 1 +CheckColorsInGamut% = 4 +ChoosePixelFormat% = 2 +Chord% = 9 +CloseEnhMetaFile% = 1 +CloseFigure% = 1 +CloseMetaFile% = 1 +ColorCorrectPalette% = 4 +ColorMatchToTarget% = 3 +CombineRgn% = 4 +CombineTransform% = 3 +CopyEnhMetaFile% = 2 +CopyMetaFile% = 2 +CreateBitmap% = 5 +CreateBitmapIndirect% = 1 +CreateBrushIndirect% = 1 +CreateColorSpace% = 1 +CreateCompatibleBitmap% = 3 +CreateCompatibleDC% = 1 +CreateDC% = 4 +CreateDIBPatternBrush% = 2 +CreateDIBPatternBrushPt% = 2 +CreateDIBSection% = 6 +CreateDIBitmap% = 6 +CreateDiscardableBitmap% = 3 +CreateEllipticRgn% = 4 +CreateEllipticRgnIndirect% = 1 +CreateEnhMetaFile% = 4 +CreateFont% = 14 +CreateFontIndirect% = 1 +CreateFontIndirectEx% = 1 +CreateHalftonePalette% = 1 +CreateHatchBrush% = 2 +CreateIC% = 4 +CreateMetaFile% = 1 +CreatePalette% = 1 +CreatePatternBrush% = 1 +CreatePen% = 3 +CreatePenIndirect% = 1 +CreatePolyPolygonRgn% = 4 +CreatePolygonRgn% = 3 +CreateRectRgn% = 4 +CreateRectRgnIndirect% = 1 +CreateRoundRectRgn% = 6 +CreateScalableFontResource% = 4 +CreateSolidBrush% = 1 +DPtoLP% = 3 +DeleteColorSpace% = 1 +DeleteDC% = 1 +DeleteEnhMetaFile% = 1 +DeleteMetaFile% = 1 +DeleteObject% = 1 +DescribePixelFormat% = 4 +DeviceCapabilitiesEx% = 6 +DrawEscape% = 4 +Ellipse% = 5 +EnableEUDC% = 1 +EndDoc% = 1 +EndPage% = 1 +EndPath% = 1 +EnumEnhMetaFile% = 5 +EnumFontFamilies% = 4 +EnumFontFamiliesEx% = 5 +EnumFonts% = 4 +EnumICMProfiles% = 3 +EnumMetaFile% = 4 +EnumObjects% = 4 +EqualRgn% = 2 +Escape% = 5 +ExcludeClipRect% = 5 +ExtCreatePen% = 5 +ExtCreateRegion% = 3 +ExtEscape% = 6 +ExtFloodFill% = 5 +ExtSelectClipRgn% = 3 +ExtTextOut% = 8 +FillPath% = 1 +FillRgn% = 3 +FixBrushOrgEx% = 4 +FlattenPath% = 1 +FloodFill% = 4 +FrameRgn% = 5 +GdiComment% = 3 +GdiDeleteSpoolFileHandle% = 1 +GdiEndDocEMF% = 1 +GdiEndPageEMF% = 2 +GdiFlush% = 0 +GdiGetBatchLimit% = 0 +GdiGetDC% = 1 +GdiGetDevmodeForPage% = 4 +GdiGetPageCount% = 1 +GdiGetPageHandle% = 3 +GdiGetSpoolFileHandle% = 3 +GdiPlayDCScript% = 6 +GdiPlayEMF% = 5 +GdiPlayJournal% = 5 +GdiPlayPageEMF% = 4 +GdiPlayPrivatePageEMF% = 3 +GdiPlayScript% = 7 +GdiResetDCEMF% = 2 +GdiSetBatchLimit% = 1 +GdiStartDocEMF% = 2 +GdiStartPageEMF% = 1 +GetArcDirection% = 1 +GetAspectRatioFilterEx% = 2 +GetBitmapBits% = 3 +GetBitmapDimensionEx% = 2 +GetBkColor% = 1 +GetBkMode% = 1 +GetBoundsRect% = 3 +GetBrushOrgEx% = 2 +GetCharABCWidths% = 4 +GetCharABCWidthsFloat% = 4 +GetCharABCWidthsI% = 5 +GetCharWidth32% = 4 +GetCharWidth% = 4 +GetCharWidthFloat% = 4 +GetCharWidthI% = 5 +GetCharacterPlacement% = 6 +GetClipBox% = 2 +GetClipRgn% = 2 +GetColorAdjustment% = 2 +GetColorSpace% = 1 +GetCurrentObject% = 2 +GetCurrentPositionEx% = 2 +GetDCBrushColor% = 1 +GetDCOrgEx% = 2 +GetDCPenColor% = 1 +GetDIBColorTable% = 4 +GetDIBits% = 7 +GetDeviceCaps% = 2 +GetDeviceGammaRamp% = 2 +GetEnhMetaFile% = 1 +GetEnhMetaFileBits% = 3 +GetEnhMetaFileDescription% = 3 +GetEnhMetaFileHeader% = 3 +GetEnhMetaFilePaletteEntries% = 3 +GetEnhMetaFilePixelFormat% = 3 +GetFontAssocStatus% = 1 +GetFontData% = 5 +GetFontLanguageInfo% = 1 +GetFontUnicodeRanges% = 2 +GetGlyphIndices% = 5 +GetGlyphOutline% = 7 +GetGraphicsMode% = 1 +GetICMProfile% = 3 +GetKerningPairs% = 3 +GetLogColorSpace% = 3 +GetMapMode% = 1 +GetMetaFile% = 1 +GetMetaFileBitsEx% = 3 +GetMetaRgn% = 2 +GetMiterLimit% = 2 +GetNearestColor% = 2 +GetNearestPaletteIndex% = 2 +GetObject% = 3 +GetObjectType% = 1 +GetOutlineTextMetrics% = 3 +GetPaletteEntries% = 4 +GetPath% = 4 +GetPixel% = 3 +GetPixelFormat% = 1 +GetPolyFillMode% = 1 +GetROP2% = 1 +GetRandomRgn% = 3 +GetRasterizerCaps% = 2 +GetRegionData% = 3 +GetRelAbs% = 2 +GetRgnBox% = 2 +GetStockObject% = 1 +GetStretchBltMode% = 1 +GetSystemPaletteEntries% = 4 +GetSystemPaletteUse% = 1 +GetTextAlign% = 1 +GetTextCharacterExtra% = 1 +GetTextCharset% = 1 +GetTextCharsetInfo% = 3 +GetTextColor% = 1 +GetTextExtentExPoint% = 7 +GetTextExtentExPointI% = 7 +GetTextExtentPoint32% = 4 +GetTextExtentPoint% = 4 +GetTextExtentPointI% = 4 +GetTextFace% = 3 +GetTextMetrics% = 2 +GetViewportExtEx% = 2 +GetViewportOrgEx% = 2 +GetWinMetaFileBits% = 5 +GetWindowExtEx% = 2 +GetWindowOrgEx% = 2 +GetWorldTransform% = 2 +IntersectClipRect% = 5 +InvertRgn% = 2 +LPtoDP% = 3 +LineDD% = 6 +LineTo% = 3 +MaskBlt% = 12 +ModifyWorldTransform% = 3 +MoveToEx% = 4 +OffsetClipRgn% = 3 +OffsetRgn% = 3 +OffsetViewportOrgEx% = 4 +OffsetWindowOrgEx% = 4 +PaintRgn% = 2 +PatBlt% = 6 +PathToRegion% = 1 +Pie% = 9 +PlayEnhMetaFile% = 3 +PlayEnhMetaFileRecord% = 4 +PlayMetaFile% = 2 +PlayMetaFileRecord% = 4 +PlgBlt% = 10 +PolyBezier% = 3 +PolyBezierTo% = 3 +PolyDraw% = 4 +PolyPatBlt% = 5 +PolyPolygon% = 4 +PolyPolyline% = 4 +PolyTextOut% = 3 +Polygon% = 3 +Polyline% = 3 +PolylineTo% = 3 +PtInRegion% = 3 +PtVisible% = 3 +RealizePalette% = 1 +RectInRegion% = 2 +RectVisible% = 2 +Rectangle% = 5 +RemoveFontMemResourceEx% = 1 +RemoveFontResource% = 1 +RemoveFontResourceEx% = 3 +ResetDC% = 2 +ResizePalette% = 2 +RestoreDC% = 2 +RoundRect% = 7 +SaveDC% = 1 +ScaleViewportExtEx% = 6 +ScaleWindowExtEx% = 6 +SelectBrushLocal% = 2 +SelectClipPath% = 2 +SelectClipRgn% = 2 +SelectFontLocal% = 2 +SelectObject% = 2 +SelectPalette% = 3 +SetAbortProc% = 2 +SetArcDirection% = 2 +SetBitmapBits% = 3 +SetBitmapDimensionEx% = 4 +SetBkColor% = 2 +SetBkMode% = 2 +SetBoundsRect% = 3 +SetBrushOrgEx% = 4 +SetColorAdjustment% = 2 +SetColorSpace% = 2 +SetDCBrushColor% = 2 +SetDCPenColor% = 2 +SetDIBColorTable% = 4 +SetDIBits% = 7 +SetDIBitsToDevice% = 12 +SetDeviceGammaRamp% = 2 +SetEnhMetaFileBits% = 2 +SetFontEnumeration% = 1 +SetGraphicsMode% = 2 +SetICMMode% = 2 +SetICMProfile% = 2 +SetMagicColors% = 3 +SetMapMode% = 2 +SetMapperFlags% = 2 +SetMetaFileBitsEx% = 2 +SetMetaRgn% = 1 +SetMiterLimit% = 3 +SetPaletteEntries% = 4 +SetPixel% = 4 +SetPixelFormat% = 3 +SetPixelV% = 4 +SetPolyFillMode% = 2 +SetROP2% = 2 +SetRectRgn% = 5 +SetRelAbs% = 2 +SetStretchBltMode% = 2 +SetSystemPaletteUse% = 2 +SetTextAlign% = 2 +SetTextCharacterExtra% = 2 +SetTextColor% = 2 +SetTextJustification% = 3 +SetViewportExtEx% = 4 +SetViewportOrgEx% = 4 +SetWinMetaFileBits% = 4 +SetWindowExtEx% = 4 +SetWindowOrgEx% = 4 +SetWorldTransform% = 2 +StartDoc% = 2 +StartPage% = 1 +StretchBlt% = 11 +StretchDIBits% = 13 +StrokeAndFillPath% = 1 +StrokePath% = 1 +SwapBuffers% = 1 +TextOut% = 5 +TranslateCharsetInfo% = 3 +UnrealizeObject% = 1 +UpdateColors% = 1 +UpdateICMRegKey% = 4 +WidenPath% = 1 +gdiPlaySpoolStream% = 6 diff --git a/asm/equihash/Windows/INCLUDE/PCOUNT/KERNEL32.INC b/asm/equihash/Windows/INCLUDE/PCOUNT/KERNEL32.INC new file mode 100644 index 0000000..e7fec6f --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/PCOUNT/KERNEL32.INC @@ -0,0 +1,557 @@ + +; KERNEL32 API calls parameters' count + +AddAtom% = 1 +AddConsoleAlias% = 3 +AllocConsole% = 0 +AreFileApisANSI% = 0 +AssignProcessToJobObject% = 2 +BackupRead% = 7 +BackupSeek% = 6 +BackupWrite% = 7 +BaseAttachCompleteThunk% = 0 +Beep% = 2 +BeginUpdateResource% = 2 +BuildCommDCB% = 2 +BuildCommDCBAndTimeouts% = 3 +CallNamedPipe% = 7 +CancelIo% = 1 +CancelWaitableTimer% = 1 +ClearCommBreak% = 1 +ClearCommError% = 3 +CloseConsoleHandle% = 1 +CloseHandle% = 1 +CloseProfileUserMapping% = 0 +CmdBatNotification% = 1 +CommConfigDialog% = 3 +CompareFileTime% = 2 +CompareString% = 6 +ConnectNamedPipe% = 2 +ConsoleMenuControl% = 3 +ContinueDebugEvent% = 3 +ConvertDefaultLocale% = 1 +ConvertThreadToFiber% = 1 +CopyFile% = 3 +CopyFileEx% = 6 +CreateConsoleScreenBuffer% = 5 +CreateDirectory% = 2 +CreateDirectoryEx% = 3 +CreateEvent% = 4 +CreateFiber% = 3 +CreateFile% = 7 +CreateFileMapping% = 6 +CreateHardLink% = 3 +CreateIoCompletionPort% = 4 +CreateJobObject% = 2 +CreateMailslot% = 4 +CreateMutex% = 3 +CreateNamedPipe% = 8 +CreatePipe% = 4 +CreateProcess% = 10 +CreateRemoteThread% = 7 +CreateSemaphore% = 4 +CreateTapePartition% = 4 +CreateThread% = 6 +CreateToolhelp32Snapshot% = 2 +CreateVirtualBuffer% = 3 +CreateWaitableTimer% = 3 +DebugActiveProcess% = 1 +DebugBreak% = 0 +DefineDosDevice% = 3 +DeleteAtom% = 1 +DeleteCriticalSection% = 1 +DeleteFiber% = 1 +DeleteFile% = 1 +DeviceIoControl% = 8 +DisableThreadLibraryCalls% = 1 +DisconnectNamedPipe% = 1 +DosDateTimeToFileTime% = 3 +DuplicateConsoleHandle% = 4 +DuplicateHandle% = 7 +EndUpdateResource% = 2 +EnterCriticalSection% = 1 +EnumCalendarInfo% = 4 +EnumCalendarInfoEx% = 4 +EnumDateFormats% = 3 +EnumDateFormatsEx% = 3 +EnumResourceLanguages% = 5 +EnumResourceNames% = 4 +EnumResourceTypes% = 3 +EnumSystemCodePages% = 2 +EnumSystemLocales% = 2 +EnumTimeFormats% = 3 +EraseTape% = 3 +EscapeCommFunction% = 2 +ExitProcess% = 1 +ExitThread% = 1 +ExitVDM% = 2 +ExpandEnvironmentStrings% = 3 +ExpungeConsoleCommandHistory% = 1 +ExtendVirtualBuffer% = 2 +FatalAppExit% = 2 +FatalExit% = 1 +FileTimeToDosDateTime% = 3 +FileTimeToLocalFileTime% = 2 +FileTimeToSystemTime% = 2 +FillConsoleOutputAttribute% = 5 +FillConsoleOutputCharacter% = 5 +FindAtom% = 1 +FindClose% = 1 +FindCloseChangeNotification% = 1 +FindFirstChangeNotification% = 3 +FindFirstFile% = 2 +FindFirstFileEx% = 6 +FindNextChangeNotification% = 1 +FindNextFile% = 2 +FindResource% = 3 +FindResourceEx% = 4 +FlushConsoleInputBuffer% = 1 +FlushFileBuffers% = 1 +FlushInstructionCache% = 3 +FlushViewOfFile% = 2 +FoldString% = 5 +FormatMessage% = 7 +FreeConsole% = 0 +FreeEnvironmentStrings% = 1 +FreeLibrary% = 1 +FreeLibraryAndExitThread% = 2 +FreeResource% = 1 +FreeVirtualBuffer% = 1 +GenerateConsoleCtrlEvent% = 2 +GetACP% = 0 +GetAtomName% = 3 +GetBinaryType% = 2 +GetCPInfo% = 2 +GetCPInfoEx% = 3 +GetCommConfig% = 3 +GetCommMask% = 2 +GetCommModemStatus% = 2 +GetCommProperties% = 2 +GetCommState% = 2 +GetCommTimeouts% = 2 +GetCommandLine% = 0 +GetCompressedFileSize% = 2 +GetComputerName% = 2 +GetConsoleAlias% = 4 +GetConsoleAliasExes% = 2 +GetConsoleAliasExesLength% = 0 +GetConsoleAliases% = 3 +GetConsoleAliasesLength% = 1 +GetConsoleCP% = 0 +GetConsoleCommandHistory% = 3 +GetConsoleCommandHistoryLength% = 1 +GetConsoleCursorInfo% = 2 +GetConsoleDisplayMode% = 1 +GetConsoleFontInfo% = 4 +GetConsoleFontSize% = 2 +GetConsoleHardwareState% = 3 +GetConsoleInputExeName% = 2 +GetConsoleInputWaitHandle% = 0 +GetConsoleKeyboardLayoutName% = 1 +GetConsoleMode% = 2 +GetConsoleOutputCP% = 0 +GetConsoleScreenBufferInfo% = 2 +GetConsoleTitle% = 2 +GetConsoleWindow% = 0 +GetCurrencyFormat% = 6 +GetCurrentConsoleFont% = 3 +GetCurrentDirectory% = 2 +GetCurrentProcess% = 0 +GetCurrentProcessId% = 0 +GetCurrentThread% = 0 +GetCurrentThreadId% = 0 +GetDateFormat% = 6 +GetDefaultCommConfig% = 3 +GetDevicePowerState% = 1 +GetDiskFreeSpace% = 5 +GetDiskFreeSpaceEx% = 4 +GetDriveType% = 1 +GetEnvironmentStrings% = 0 +GetEnvironmentVariable% = 3 +GetExitCodeProcess% = 2 +GetExitCodeThread% = 2 +GetFileAttributes% = 1 +GetFileAttributesEx% = 3 +GetFileInformationByHandle% = 2 +GetFileSize% = 2 +GetFileTime% = 4 +GetFileType% = 1 +GetFullPathName% = 4 +GetHandleInformation% = 2 +GetLargestConsoleWindowSize% = 1 +GetLastError% = 0 +GetLocalTime% = 1 +GetLocaleInfo% = 4 +GetLogicalDriveStrings% = 2 +GetLogicalDrives% = 0 +GetLongPathName% = 3 +GetMailslotInfo% = 5 +GetModuleFileName% = 3 +GetModuleHandle% = 1 +GetNamedPipeHandleState% = 7 +GetNamedPipeInfo% = 5 +GetNextVDMCommand% = 1 +GetNumberFormat% = 6 +GetNumberOfConsoleFonts% = 0 +GetNumberOfConsoleInputEvents% = 2 +GetNumberOfConsoleMouseButtons% = 1 +GetOEMCP% = 0 +GetOverlappedResult% = 4 +GetPriorityClass% = 1 +GetPrivateProfileInt% = 4 +GetPrivateProfileSection% = 4 +GetPrivateProfileSectionNames% = 3 +GetPrivateProfileString% = 6 +GetPrivateProfileStruct% = 5 +GetProcAddress% = 2 +GetProcessAffinityMask% = 3 +GetProcessHeap% = 0 +GetProcessHeaps% = 2 +GetProcessPriorityBoost% = 2 +GetProcessShutdownParameters% = 2 +GetProcessTimes% = 5 +GetProcessVersion% = 1 +GetProcessWorkingSetSize% = 3 +GetProfileInt% = 3 +GetProfileSection% = 3 +GetProfileString% = 5 +GetQueuedCompletionStatus% = 5 +GetShortPathName% = 3 +GetStartupInfo% = 1 +GetStdHandle% = 1 +GetStringType% = 5 +GetStringTypeEx% = 5 +GetSystemDefaultLCID% = 0 +GetSystemDefaultLangID% = 0 +GetSystemDirectory% = 2 +GetSystemInfo% = 1 +GetSystemPowerStatus% = 1 +GetSystemTime% = 1 +GetSystemTimeAdjustment% = 3 +GetSystemTimeAsFileTime% = 1 +GetTapeParameters% = 4 +GetTapePosition% = 5 +GetTapeStatus% = 1 +GetTempFileName% = 4 +GetTempPath% = 2 +GetThreadContext% = 2 +GetThreadLocale% = 0 +GetThreadPriority% = 1 +GetThreadPriorityBoost% = 2 +GetThreadSelectorEntry% = 3 +GetThreadTimes% = 5 +GetTickCount% = 0 +GetTimeFormat% = 6 +GetTimeZoneInformation% = 1 +GetUserDefaultLCID% = 0 +GetUserDefaultLangID% = 0 +GetVDMCurrentDirectories% = 2 +GetVersion% = 0 +GetVersionEx% = 1 +GetVolumeInformation% = 8 +GetWindowsDirectory% = 2 +GlobalAddAtom% = 1 +GlobalAlloc% = 2 +GlobalCompact% = 1 +GlobalDeleteAtom% = 1 +GlobalFindAtom% = 1 +GlobalFix% = 1 +GlobalFlags% = 1 +GlobalFree% = 1 +GlobalGetAtomName% = 3 +GlobalHandle% = 1 +GlobalLock% = 1 +GlobalMemoryStatus% = 1 +GlobalMemoryStatusVlm% = 1 +GlobalReAlloc% = 3 +GlobalSize% = 1 +GlobalUnWire% = 1 +GlobalUnfix% = 1 +GlobalUnlock% = 1 +GlobalWire% = 1 +Heap32First% = 3 +Heap32ListFirst% = 2 +Heap32ListNext% = 2 +Heap32Next% = 1 +HeapAlloc% = 3 +HeapCompact% = 2 +HeapCreate% = 3 +HeapDestroy% = 1 +HeapExtend% = 4 +HeapFree% = 3 +HeapLock% = 1 +HeapReAlloc% = 4 +HeapSize% = 3 +HeapSummary% = 3 +HeapUnlock% = 1 +HeapUsage% = 5 +HeapValidate% = 3 +HeapWalk% = 2 +InitAtomTable% = 1 +InitializeCriticalSection% = 1 +InitializeCriticalSectionAndSpinCount% = 2 +InterlockedCompareExchange% = 3 +InterlockedDecrement% = 1 +InterlockedExchange% = 2 +InterlockedExchangeAdd% = 2 +InterlockedIncrement% = 1 +InvalidateConsoleDIBits% = 2 +IsBadCodePtr% = 1 +IsBadHugeReadPtr% = 2 +IsBadHugeWritePtr% = 2 +IsBadReadPtr% = 2 +IsBadStringPtr% = 2 +IsBadWritePtr% = 2 +IsDBCSLeadByte% = 1 +IsDBCSLeadByteEx% = 2 +IsDebuggerPresent% = 0 +IsProcessorFeaturePresent% = 1 +IsValidCodePage% = 1 +IsValidLocale% = 2 +LCMapString% = 6 +LeaveCriticalSection% = 1 +LoadLibrary% = 1 +LoadLibraryEx% = 3 +LoadModule% = 2 +LoadResource% = 2 +LocalAlloc% = 2 +LocalCompact% = 1 +LocalFileTimeToFileTime% = 2 +LocalFlags% = 1 +LocalFree% = 1 +LocalHandle% = 1 +LocalLock% = 1 +LocalReAlloc% = 3 +LocalShrink% = 2 +LocalSize% = 1 +LocalUnlock% = 1 +LockFile% = 5 +LockFileEx% = 6 +LockResource% = 1 +MapViewOfFile% = 5 +MapViewOfFileEx% = 6 +MapViewOfFileVlm% = 7 +Module32First% = 2 +Module32Next% = 2 +MoveFile% = 2 +MoveFileEx% = 3 +MoveFileWithProgress% = 5 +MulDiv% = 3 +MultiByteToWideChar% = 6 +OpenEvent% = 3 +OpenFile% = 3 +OpenFileMapping% = 3 +OpenJobObject% = 3 +OpenMutex% = 3 +OpenProcess% = 3 +OpenProfileUserMapping% = 0 +OpenSemaphore% = 3 +OpenWaitableTimer% = 3 +OutputDebugString% = 1 +PeekConsoleInput% = 4 +PeekNamedPipe% = 6 +PostQueuedCompletionStatus% = 4 +PrepareTape% = 3 +Process32First% = 2 +Process32Next% = 2 +PulseEvent% = 1 +PurgeComm% = 2 +QueryDosDevice% = 3 +QueryInformationJobObject% = 5 +QueryPerformanceCounter% = 1 +QueryPerformanceFrequency% = 1 +QueryWin31IniFilesMappedToRegistry% = 4 +QueueUserAPC% = 3 +RaiseException% = 4 +ReadConsole% = 5 +ReadConsoleInput% = 4 +ReadConsoleInputEx% = 5 +ReadConsoleOutput% = 5 +ReadConsoleOutputAttribute% = 5 +ReadConsoleOutputCharacter% = 5 +ReadFile% = 5 +ReadFileEx% = 5 +ReadFileScatter% = 5 +ReadFileVlm% = 5 +ReadProcessMemory% = 5 +ReadProcessMemoryVlm% = 5 +RegisterConsoleVDM% = 11 +RegisterWaitForInputIdle% = 1 +RegisterWowBaseHandlers% = 1 +RegisterWowExec% = 1 +ReleaseMutex% = 1 +ReleaseSemaphore% = 3 +RemoveDirectory% = 1 +RequestWakeupLatency% = 1 +ResetEvent% = 1 +ResumeThread% = 1 +RtlFillMemory% = 3 +RtlMoveMemory% = 3 +RtlUnwind% = 4 +RtlZeroMemory% = 2 +ScrollConsoleScreenBuffer% = 5 +SearchPath% = 6 +SetCommBreak% = 1 +SetCommConfig% = 3 +SetCommMask% = 2 +SetCommState% = 2 +SetCommTimeouts% = 2 +SetComputerName% = 1 +SetConsoleActiveScreenBuffer% = 1 +SetConsoleCP% = 1 +SetConsoleCommandHistoryMode% = 1 +SetConsoleCtrlHandler% = 2 +SetConsoleCursor% = 2 +SetConsoleCursorInfo% = 2 +SetConsoleCursorPosition% = 2 +SetConsoleDisplayMode% = 3 +SetConsoleFont% = 2 +SetConsoleHardwareState% = 3 +SetConsoleIcon% = 1 +SetConsoleInputExeName% = 1 +SetConsoleKeyShortcuts% = 4 +SetConsoleMaximumWindowSize% = 2 +SetConsoleMenuClose% = 1 +SetConsoleMode% = 2 +SetConsoleNumberOfCommands% = 2 +SetConsoleOutputCP% = 1 +SetConsolePalette% = 3 +SetConsoleScreenBufferSize% = 2 +SetConsoleTextAttribute% = 2 +SetConsoleTitle% = 1 +SetConsoleWindowInfo% = 3 +SetCriticalSectionSpinCount% = 2 +SetCurrentDirectory% = 1 +SetDefaultCommConfig% = 3 +SetEndOfFile% = 1 +SetEnvironmentVariable% = 2 +SetErrorMode% = 1 +SetEvent% = 1 +SetFileApisToANSI% = 0 +SetFileApisToOEM% = 0 +SetFileAttributes% = 2 +SetFilePointer% = 4 +SetFileTime% = 4 +SetHandleCount% = 1 +SetHandleInformation% = 3 +SetInformationJobObject% = 4 +SetLastConsoleEventActive% = 0 +SetLastError% = 1 +SetLocalTime% = 1 +SetLocaleInfo% = 3 +SetMailslotInfo% = 2 +SetNamedPipeHandleState% = 4 +SetPriorityClass% = 2 +SetProcessAffinityMask% = 2 +SetProcessPriorityBoost% = 2 +SetProcessShutdownParameters% = 2 +SetProcessWorkingSetSize% = 3 +SetStdHandle% = 2 +SetSystemPowerState% = 2 +SetSystemTime% = 1 +SetSystemTimeAdjustment% = 2 +SetTapeParameters% = 3 +SetTapePosition% = 6 +SetThreadAffinityMask% = 2 +SetThreadContext% = 2 +SetThreadExecutionState% = 1 +SetThreadIdealProcessor% = 2 +SetThreadLocale% = 1 +SetThreadPriority% = 2 +SetThreadPriorityBoost% = 2 +SetTimeZoneInformation% = 1 +SetUnhandledExceptionFilter% = 1 +SetVDMCurrentDirectories% = 2 +SetVolumeLabel% = 2 +SetWaitableTimer% = 6 +SetupComm% = 3 +ShowConsoleCursor% = 2 +SignalObjectAndWait% = 4 +SizeofResource% = 2 +Sleep% = 1 +SleepEx% = 2 +SuspendThread% = 1 +SwitchToFiber% = 1 +SwitchToThread% = 0 +SystemTimeToFileTime% = 2 +SystemTimeToTzSpecificLocalTime% = 3 +TerminateJobObject% = 2 +TerminateProcess% = 2 +TerminateThread% = 2 +Thread32First% = 2 +Thread32Next% = 2 +TlsAlloc% = 0 +TlsFree% = 1 +TlsGetValue% = 1 +TlsSetValue% = 2 +Toolhelp32ReadProcessMemory% = 5 +TransactNamedPipe% = 7 +TransmitCommChar% = 2 +TrimVirtualBuffer% = 1 +TryEnterCriticalSection% = 1 +UnhandledExceptionFilter% = 1 +UnlockFile% = 5 +UnlockFileEx% = 5 +UnmapViewOfFile% = 1 +UnmapViewOfFileVlm% = 1 +UpdateResource% = 6 +VDMConsoleOperation% = 2 +VDMOperationStarted% = 1 +VerLanguageName% = 3 +VerifyConsoleIoHandle% = 1 +VirtualAlloc% = 4 +VirtualAllocEx% = 5 +VirtualAllocVlm% = 6 +VirtualBufferExceptionHandler% = 3 +VirtualFree% = 3 +VirtualFreeEx% = 4 +VirtualFreeVlm% = 5 +VirtualLock% = 2 +VirtualProtect% = 4 +VirtualProtectEx% = 5 +VirtualProtectVlm% = 6 +VirtualQuery% = 3 +VirtualQueryEx% = 4 +VirtualQueryVlm% = 4 +VirtualUnlock% = 2 +WaitCommEvent% = 3 +WaitForDebugEvent% = 2 +WaitForMultipleObjects% = 4 +WaitForMultipleObjectsEx% = 5 +WaitForSingleObject% = 2 +WaitForSingleObjectEx% = 3 +WaitNamedPipe% = 2 +WideCharToMultiByte% = 8 +WinExec% = 2 +WriteConsole% = 5 +WriteConsoleInput% = 4 +WriteConsoleInputVDM% = 4 +WriteConsoleOutput% = 5 +WriteConsoleOutputAttribute% = 5 +WriteConsoleOutputCharacter% = 5 +WriteFile% = 5 +WriteFileEx% = 5 +WriteFileGather% = 5 +WriteFileVlm% = 5 +WritePrivateProfileSection% = 3 +WritePrivateProfileString% = 4 +WritePrivateProfileStruct% = 5 +WriteProcessMemory% = 5 +WriteProcessMemoryVlm% = 5 +WriteProfileSection% = 2 +WriteProfileString% = 3 +WriteTapemark% = 4 +_hread% = 3 +_hwrite% = 3 +_lclose% = 1 +_lcreat% = 2 +_llseek% = 3 +_lopen% = 2 +_lread% = 3 +_lwrite% = 3 +lstrcat% = 2 +lstrcmp% = 2 +lstrcmpi% = 2 +lstrcpy% = 2 +lstrcpyn% = 3 +lstrlen% = 1 diff --git a/asm/equihash/Windows/INCLUDE/PCOUNT/SHELL32.INC b/asm/equihash/Windows/INCLUDE/PCOUNT/SHELL32.INC new file mode 100644 index 0000000..1d0528d --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/PCOUNT/SHELL32.INC @@ -0,0 +1,73 @@ + +; SHELL32 API calls parameters' count + +CheckEscapes% = 2 +DoEnvironmentSubst% = 2 +DragAcceptFiles% = 2 +DragFinish% = 1 +DragQueryFile% = 4 +DragQueryPoint% = 2 +DuplicateIcon% = 2 +ExtractAssociatedIcon% = 3 +ExtractAssociatedIconEx% = 4 +ExtractIcon% = 3 +ExtractIconEx% = 5 +ExtractIconResInfo% = 5 +FindExeDlgProc% = 4 +FindExecutable% = 3 +FreeIconList% = 2 +InternalExtractIconList% = 3 +RealShellExecute% = 10 +RealShellExecuteEx% = 11 +RegenerateUserEnvironment% = 2 +SHAddToRecentDocs% = 2 +SHAppBarMessage% = 2 +SHBrowseForFolder% = 1 +SHChangeNotify% = 4 +SHEmptyRecycleBin% = 3 +SHFileOperation% = 1 +SHFormatDrive% = 4 +SHFreeNameMappings% = 1 +SHGetDataFromIDList% = 5 +SHGetDesktopFolder% = 1 +SHGetDiskFreeSpace% = 4 +SHGetFileInfo% = 5 +SHGetInstanceExplorer% = 1 +SHGetMalloc% = 1 +SHGetNewLinkInfo% = 5 +SHGetPathFromIDList% = 2 +SHGetSettings% = 2 +SHGetSpecialFolderLocation% = 3 +SHGetSpecialFolderPath% = 4 +SHInvokePrinterCommand% = 5 +SHLoadInProc% = 1 +SHQueryRecycleBin% = 2 +SHUpdateRecycleBinIcon% = 0 +SheChangeDir% = 1 +SheChangeDirEx% = 1 +SheFullPath% = 3 +SheGetCurDrive% = 0 +SheGetDir% = 2 +SheRemoveQuotes% = 1 +SheSetCurDrive% = 1 +SheShortenPath% = 2 +ShellAbout% = 4 +ShellExecute% = 6 +ShellExecuteEx% = 1 +ShellHookProc% = 3 +Shell_NotifyIcon% = 2 +StrChr% = 2 +StrChrI% = 2 +StrCmpN% = 3 +StrCmpNI% = 3 +StrCpyN% = 3 +StrNCmp% = 3 +StrNCmpI% = 3 +StrNCpy% = 3 +StrRChr% = 3 +StrRChrI% = 3 +StrRStr% = 3 +StrRStrI% = 3 +StrStr% = 2 +StrStrI% = 2 +WOWShellExecute% = 7 diff --git a/asm/equihash/Windows/INCLUDE/PCOUNT/USER32.INC b/asm/equihash/Windows/INCLUDE/PCOUNT/USER32.INC new file mode 100644 index 0000000..fc4ce05 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/PCOUNT/USER32.INC @@ -0,0 +1,477 @@ + +; USER32 API calls parameters' count + +ActivateKeyboardLayout% = 2 +AdjustWindowRect% = 3 +AdjustWindowRectEx% = 4 +AnimateWindow% = 3 +AnyPopup% = 0 +AppendMenu% = 4 +ArrangeIconicWindows% = 1 +AttachThreadInput% = 3 +BeginDeferWindowPos% = 1 +BeginPaint% = 2 +BlockInput% = 1 +BringWindowToTop% = 1 +BroadcastSystemMessage% = 5 +CallMsgFilter% = 2 +CallNextHookEx% = 4 +CallWindowProc% = 5 +CascadeChildWindows% = 2 +CascadeWindows% = 5 +ChangeClipboardChain% = 2 +ChangeDisplaySettings% = 2 +ChangeDisplaySettingsEx% = 5 +ChangeMenu% = 5 +CharLower% = 1 +CharLowerBuff% = 2 +CharNext% = 1 +CharNextEx% = 3 +CharPrev% = 2 +CharPrevEx% = 4 +CharToOem% = 2 +CharToOemBuff% = 3 +CharUpper% = 1 +CharUpperBuff% = 2 +CheckDlgButton% = 3 +CheckMenuItem% = 3 +CheckMenuRadioItem% = 5 +CheckRadioButton% = 4 +ChildWindowFromPoint% = 3 +ChildWindowFromPointEx% = 4 +ClientToScreen% = 2 +ClipCursor% = 1 +CloseClipboard% = 0 +CloseDesktop% = 1 +CloseWindow% = 1 +CloseWindowStation% = 1 +CopyAcceleratorTable% = 3 +CopyIcon% = 1 +CopyImage% = 5 +CopyRect% = 2 +CountClipboardFormats% = 0 +CreateAcceleratorTable% = 2 +CreateCaret% = 4 +CreateCursor% = 7 +CreateDesktop% = 6 +CreateDialogIndirectParam% = 5 +CreateDialogParam% = 5 +CreateIcon% = 7 +CreateIconFromResource% = 4 +CreateIconFromResourceEx% = 7 +CreateIconIndirect% = 1 +CreateMDIWindow% = 10 +CreateMenu% = 0 +CreatePopupMenu% = 0 +CreateWindowEx% = 12 +CreateWindowStation% = 4 +DdeAbandonTransaction% = 3 +DdeAccessData% = 2 +DdeAddData% = 4 +DdeClientTransaction% = 8 +DdeCmpStringHandles% = 2 +DdeConnect% = 4 +DdeConnectList% = 5 +DdeCreateDataHandle% = 7 +DdeCreateStringHandle% = 3 +DdeDisconnect% = 1 +DdeDisconnectList% = 1 +DdeEnableCallback% = 3 +DdeFreeDataHandle% = 1 +DdeFreeStringHandle% = 2 +DdeGetData% = 4 +DdeGetLastError% = 1 +DdeGetQualityOfService% = 3 +DdeImpersonateClient% = 1 +DdeInitialize% = 4 +DdeKeepStringHandle% = 2 +DdeNameService% = 4 +DdePostAdvise% = 3 +DdeQueryConvInfo% = 3 +DdeQueryNextServer% = 2 +DdeQueryString% = 5 +DdeReconnect% = 1 +DdeSetQualityOfService% = 3 +DdeSetUserHandle% = 3 +DdeUnaccessData% = 1 +DdeUninitialize% = 1 +DefDlgProc% = 4 +DefFrameProc% = 5 +DefMDIChildProc% = 4 +DefWindowProc% = 4 +DeferWindowPos% = 8 +DeleteMenu% = 3 +DestroyAcceleratorTable% = 1 +DestroyCaret% = 0 +DestroyCursor% = 1 +DestroyIcon% = 1 +DestroyMenu% = 1 +DestroyWindow% = 1 +DialogBoxIndirectParam% = 5 +DialogBoxParam% = 5 +DispatchMessage% = 1 +DlgDirList% = 5 +DlgDirListComboBox% = 5 +DlgDirSelectComboBoxEx% = 4 +DlgDirSelectEx% = 4 +DragDetect% = 3 +DragObject% = 5 +DrawAnimatedRects% = 4 +DrawCaption% = 4 +DrawEdge% = 4 +DrawFocusRect% = 2 +DrawFrame% = 4 +DrawFrameControl% = 4 +DrawIcon% = 4 +DrawIconEx% = 9 +DrawMenuBar% = 1 +DrawState% = 10 +DrawText% = 5 +DrawTextEx% = 6 +EditWndProc% = 4 +EmptyClipboard% = 0 +EnableMenuItem% = 3 +EnableScrollBar% = 3 +EnableWindow% = 2 +EndDeferWindowPos% = 1 +EndDialog% = 2 +EndMenu% = 0 +EndPaint% = 2 +EnumChildWindows% = 3 +EnumClipboardFormats% = 1 +EnumDesktopWindows% = 3 +EnumDesktops% = 3 +EnumDisplayMonitors% = 4 +EnumDisplaySettings% = 3 +EnumDisplaySettingsEx% = 4 +EnumProps% = 2 +EnumPropsEx% = 3 +EnumThreadWindows% = 3 +EnumWindowStations% = 2 +EnumWindows% = 2 +EqualRect% = 2 +ExcludeUpdateRgn% = 2 +ExitWindowsEx% = 2 +FillRect% = 3 +FindWindow% = 2 +FindWindowEx% = 4 +FlashWindow% = 2 +FrameRect% = 3 +FreeDDElParam% = 2 +GetActiveWindow% = 0 +GetAltTabInfo% = 5 +GetAncestor% = 2 +GetAsyncKeyState% = 1 +GetCapture% = 0 +GetCaretBlinkTime% = 0 +GetCaretPos% = 1 +GetClassInfo% = 3 +GetClassInfoEx% = 3 +GetClassLong% = 2 +GetClassName% = 3 +GetClassWord% = 2 +GetClientRect% = 2 +GetClipCursor% = 1 +GetClipboardData% = 1 +GetClipboardFormatName% = 3 +GetClipboardSequenceNumber% = 0 +GetClipboardViewer% = 0 +GetComboBoxInfo% = 2 +GetCursor% = 0 +GetCursorInfo% = 1 +GetCursorPos% = 1 +GetDC% = 1 +GetDCEx% = 3 +GetDesktopWindow% = 0 +GetDialogBaseUnits% = 0 +GetDlgCtrlID% = 1 +GetDlgItem% = 2 +GetDlgItemInt% = 4 +GetDlgItemText% = 4 +GetDoubleClickTime% = 0 +GetFocus% = 0 +GetForegroundWindow% = 0 +GetGUIThreadInfo% = 2 +GetGuiResources% = 2 +GetIconInfo% = 2 +GetInputDesktop% = 0 +GetInputState% = 0 +GetKBCodePage% = 0 +GetKeyNameText% = 3 +GetKeyState% = 1 +GetKeyboardLayout% = 1 +GetKeyboardLayoutList% = 2 +GetKeyboardLayoutName% = 1 +GetKeyboardState% = 1 +GetKeyboardType% = 1 +GetLastActivePopup% = 1 +GetLastInputInfo% = 1 +GetListBoxInfo% = 1 +GetMenu% = 1 +GetMenuBarInfo% = 4 +GetMenuCheckMarkDimensions% = 0 +GetMenuContextHelpId% = 1 +GetMenuDefaultItem% = 3 +GetMenuInfo% = 2 +GetMenuItemCount% = 1 +GetMenuItemID% = 2 +GetMenuItemInfo% = 4 +GetMenuItemRect% = 4 +GetMenuState% = 3 +GetMenuString% = 5 +GetMessage% = 4 +GetMessageExtraInfo% = 0 +GetMessagePos% = 0 +GetMessageTime% = 0 +GetMonitorInfo% = 2 +GetMouseMovePoints% = 5 +GetNextDlgGroupItem% = 3 +GetNextDlgTabItem% = 3 +GetOpenClipboardWindow% = 0 +GetParent% = 1 +GetPriorityClipboardFormat% = 2 +GetProcessWindowStation% = 0 +GetProp% = 2 +GetQueueStatus% = 1 +GetScrollBarInfo% = 3 +GetScrollInfo% = 3 +GetScrollPos% = 2 +GetScrollRange% = 4 +GetShellWindow% = 0 +GetSubMenu% = 2 +GetSysColor% = 1 +GetSysColorBrush% = 1 +GetSystemMenu% = 2 +GetSystemMetrics% = 1 +GetTabbedTextExtent% = 5 +GetThreadDesktop% = 1 +GetTitleBarInfo% = 2 +GetTopWindow% = 1 +GetUpdateRect% = 3 +GetUpdateRgn% = 3 +GetUserObjectInformation% = 5 +GetUserObjectSecurity% = 5 +GetWindow% = 2 +GetWindowContextHelpId% = 1 +GetWindowDC% = 1 +GetWindowInfo% = 2 +GetWindowLong% = 2 +GetWindowModuleFileName% = 3 +GetWindowPlacement% = 2 +GetWindowRect% = 2 +GetWindowRgn% = 2 +GetWindowText% = 3 +GetWindowTextLength% = 1 +GetWindowThreadProcessId% = 2 +GetWindowWord% = 2 +GrayString% = 9 +HideCaret% = 1 +HiliteMenuItem% = 4 +IMPGetIME% = 2 +IMPQueryIME% = 1 +IMPSetIME% = 2 +ImpersonateDdeClientWindow% = 2 +InSendMessage% = 0 +InSendMessageEx% = 1 +InflateRect% = 3 +InsertMenu% = 5 +InsertMenuItem% = 4 +IntersectRect% = 3 +InvalidateRect% = 3 +InvalidateRgn% = 3 +InvertRect% = 2 +IsCharAlpha% = 1 +IsCharAlphaNumeric% = 1 +IsCharLower% = 1 +IsCharUpper% = 1 +IsChild% = 2 +IsClipboardFormatAvailable% = 1 +IsDialogMessage% = 2 +IsDlgButtonChecked% = 2 +IsIconic% = 1 +IsMenu% = 1 +IsRectEmpty% = 1 +IsWindow% = 1 +IsWindowEnabled% = 1 +IsWindowUnicode% = 1 +IsWindowVisible% = 1 +IsZoomed% = 1 +KillSystemTimer% = 2 +KillTimer% = 2 +LoadAccelerators% = 2 +LoadBitmap% = 2 +LoadCursor% = 2 +LoadCursorFromFile% = 1 +LoadIcon% = 2 +LoadImage% = 6 +LoadKeyboardLayout% = 2 +LoadMenu% = 2 +LoadMenuIndirect% = 1 +LoadString% = 4 +LockWindowUpdate% = 1 +LockWorkStation% = 0 +LookupIconIdFromDirectory% = 2 +LookupIconIdFromDirectoryEx% = 5 +MapDialogRect% = 2 +MapVirtualKey% = 2 +MapVirtualKeyEx% = 3 +MapWindowPoints% = 4 +MenuItemFromPoint% = 4 +MessageBeep% = 1 +MessageBox% = 4 +MessageBoxEx% = 5 +MessageBoxIndirect% = 1 +ModifyMenu% = 5 +MonitorFromPoint% = 3 +MonitorFromRect% = 2 +MonitorFromWindow% = 2 +MoveWindow% = 6 +MsgWaitForMultipleObjects% = 5 +MsgWaitForMultipleObjectsEx% = 5 +NotifyWinEvent% = 4 +OemKeyScan% = 1 +OemToChar% = 2 +OemToCharBuff% = 3 +OffsetRect% = 3 +OpenClipboard% = 1 +OpenDesktop% = 4 +OpenIcon% = 1 +OpenInputDesktop% = 3 +OpenWindowStation% = 3 +PackDDElParam% = 3 +PaintDesktop% = 1 +PeekMessage% = 5 +PostMessage% = 4 +PostQuitMessage% = 1 +PostThreadMessage% = 4 +PtInRect% = 3 +RealChildWindowFromPoint% = 3 +RealGetWindowClass% = 3 +RedrawWindow% = 4 +RegisterClass% = 1 +RegisterClassEx% = 1 +RegisterClipboardFormat% = 1 +RegisterDeviceNotification% = 3 +RegisterHotKey% = 4 +RegisterWindowMessage% = 1 +ReleaseCapture% = 0 +ReleaseDC% = 2 +RemoveMenu% = 3 +RemoveProp% = 2 +ReplyMessage% = 1 +ReuseDDElParam% = 5 +ScreenToClient% = 2 +ScrollChildren% = 3 +ScrollDC% = 7 +ScrollWindow% = 5 +ScrollWindowEx% = 8 +SendDlgItemMessage% = 5 +SendIMEMessageEx% = 2 +SendInput% = 3 +SendMessage% = 4 +SendMessageCallback% = 6 +SendMessageTimeout% = 7 +SendNotifyMessage% = 4 +SetActiveWindow% = 1 +SetCapture% = 1 +SetCaretBlinkTime% = 1 +SetCaretPos% = 2 +SetClassLong% = 3 +SetClassWord% = 3 +SetClipboardData% = 2 +SetClipboardViewer% = 1 +SetCursor% = 1 +SetCursorPos% = 2 +SetDebugErrorLevel% = 1 +SetDeskWallpaper% = 1 +SetDlgItemInt% = 4 +SetDlgItemText% = 3 +SetDoubleClickTime% = 1 +SetFocus% = 1 +SetForegroundWindow% = 1 +SetKeyboardState% = 1 +SetLastErrorEx% = 2 +SetMenu% = 2 +SetMenuContextHelpId% = 2 +SetMenuDefaultItem% = 3 +SetMenuInfo% = 2 +SetMenuItemBitmaps% = 5 +SetMenuItemInfo% = 4 +SetMessageExtraInfo% = 1 +SetMessageQueue% = 1 +SetParent% = 2 +SetProcessWindowStation% = 1 +SetProp% = 3 +SetRect% = 5 +SetRectEmpty% = 1 +SetScrollInfo% = 4 +SetScrollPos% = 4 +SetScrollRange% = 5 +SetShellWindow% = 1 +SetSysColors% = 3 +SetSystemCursor% = 2 +SetSystemMenu% = 2 +SetSystemTimer% = 4 +SetThreadDesktop% = 1 +SetTimer% = 4 +SetUserObjectInformation% = 4 +SetUserObjectSecurity% = 3 +SetWinEventHook% = 7 +SetWindowContextHelpId% = 2 +SetWindowLong% = 3 +SetWindowPlacement% = 2 +SetWindowPos% = 7 +SetWindowRgn% = 3 +SetWindowText% = 2 +SetWindowWord% = 3 +SetWindowsHook% = 2 +SetWindowsHookEx% = 4 +ShowCaret% = 1 +ShowCursor% = 1 +ShowOwnedPopups% = 2 +ShowScrollBar% = 3 +ShowWindow% = 2 +ShowWindowAsync% = 2 +SubtractRect% = 3 +SwapMouseButton% = 1 +SwitchDesktop% = 1 +SystemParametersInfo% = 4 +TabbedTextOut% = 8 +TileChildWindows% = 2 +TileWindows% = 5 +ToAscii% = 5 +ToAsciiEx% = 6 +ToUnicode% = 6 +ToUnicodeEx% = 7 +TrackMouseEvent% = 1 +TrackPopupMenu% = 7 +TrackPopupMenuEx% = 6 +TranslateAccelerator% = 3 +TranslateMDISysAccel% = 2 +TranslateMessage% = 1 +UnhookWinEvent% = 1 +UnhookWindowsHook% = 2 +UnhookWindowsHookEx% = 1 +UnionRect% = 3 +UnloadKeyboardLayout% = 1 +UnpackDDElParam% = 4 +UnregisterClass% = 2 +UnregisterDeviceNotification% = 1 +UnregisterHotKey% = 2 +UpdateWindow% = 1 +UserHandleGrantAccess% = 2 +ValidateRect% = 2 +ValidateRgn% = 2 +VkKeyScan% = 1 +VkKeyScanEx% = 2 +WINNLSEnableIME% = 2 +WINNLSGetEnableStatus% = 1 +WINNLSGetIMEHotkey% = 1 +WaitForInputIdle% = 2 +WaitMessage% = 0 +WinHelp% = 4 +WindowFromDC% = 1 +WindowFromPoint% = 2 +keybd_event% = 4 +mouse_event% = 5 +wvsprintf% = 3 diff --git a/asm/equihash/Windows/INCLUDE/PCOUNT/WSOCK32.INC b/asm/equihash/Windows/INCLUDE/PCOUNT/WSOCK32.INC new file mode 100644 index 0000000..ea401d3 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/PCOUNT/WSOCK32.INC @@ -0,0 +1,70 @@ + +; WSOCK32 API calls parameters' count + +AcceptEx% = 8 +EnumProtocols% = 3 +GetAcceptExSockaddrs% = 8 +GetAddressByName% = 10 +GetNameByType% = 3 +GetService% = 7 +GetTypeByName% = 2 +MigrateWinsockConfiguration% = 3 +NPLoadNameSpaces% = 3 +SetService% = 6 +TransmitFile% = 7 +WEP% = 0 +WSAAsyncGetHostByAddr% = 7 +WSAAsyncGetHostByName% = 5 +WSAAsyncGetProtoByName% = 5 +WSAAsyncGetProtoByNumber% = 5 +WSAAsyncGetServByName% = 6 +WSAAsyncGetServByPort% = 6 +WSACancelAsyncRequest% = 4 +WSACancelBlockingCall% = 0 +WSACleanup% = 0 +WSAGetLastError% = 0 +WSAIsBlocking% = 0 +WSARecvEx% = 4 +WSASetBlockingHook% = 1 +WSASetLastError% = 1 +WSAStartup% = 2 +WSAUnhookBlockingHook% = 0 +__WSAFDIsSet% = 2 +accept% = 3 +bind% = 3 +closesocket% = 1 +connect% = 3 +dn_expand% = 5 +gethostbyaddr% = 3 +gethostbyname% = 1 +gethostname% = 2 +getnetbyname% = 1 +getpeername% = 3 +getprotobyname% = 1 +getprotobynumber% = 1 +getservbyname% = 2 +getservbyport% = 2 +getsockname% = 3 +getsockopt% = 5 +htonl% = 1 +htons% = 1 +inet_addr% = 1 +inet_network% = 1 +inet_ntoa% = 1 +ioctlsocket% = 3 +listen% = 2 +ntohl% = 1 +ntohs% = 1 +rcmd% = 6 +recv% = 4 +recvfrom% = 6 +rexec% = 6 +rresvport% = 1 +s_perror% = 2 +select% = 5 +send% = 4 +sendto% = 6 +sethostname% = 2 +setsockopt% = 5 +shutdown% = 2 +socket% = 3 diff --git a/asm/equihash/Windows/INCLUDE/WIN32A.INC b/asm/equihash/Windows/INCLUDE/WIN32A.INC new file mode 100644 index 0000000..f3520de --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/WIN32A.INC @@ -0,0 +1,25 @@ + +; Win32 programming headers (ASCII) + +include 'macro/struct.inc' +include 'macro/proc32.inc' +include 'macro/com32.inc' +include 'macro/import32.inc' +include 'macro/export.inc' +include 'macro/resource.inc' + +struc TCHAR [val] { common match any, val \{ . db val \} + match , val \{ . db ? \} } +sizeof.TCHAR = 1 + +include 'equates/kernel32.inc' +include 'equates/user32.inc' +include 'equates/gdi32.inc' +include 'equates/comctl32.inc' +include 'equates/comdlg32.inc' +include 'equates/shell32.inc' +include 'equates/wsock32.inc' + +macro api [name] { if used name + label name dword at name#A + end if } diff --git a/asm/equihash/Windows/INCLUDE/WIN32AX.INC b/asm/equihash/Windows/INCLUDE/WIN32AX.INC new file mode 100644 index 0000000..2d24315 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/WIN32AX.INC @@ -0,0 +1,172 @@ + +; Extended Win32 programming headers (ASCII) + +include 'win32a.inc' + +include 'macro/if.inc' + +macro allow_nesting +{ macro pushd value + \{ match ,value \\{ + pushx equ \\} + match =pushx =invoke proc,pushx value \\{ + allow_nesting + invoke proc + purge pushd,invoke,stdcall,cinvoke,ccall + push eax + pushx equ \\} + match =pushx =stdcall proc,pushx value \\{ + allow_nesting + stdcall proc + purge pushd,invoke,stdcall,cinvoke,ccall + push eax + pushx equ \\} + match =pushx =cinvoke proc,pushx value \\{ + allow_nesting + cinvoke proc + purge pushd,invoke,stdcall,cinvoke,ccall + push eax + pushx equ \\} + match =pushx =ccall proc,pushx value \\{ + allow_nesting + ccall proc + purge pushd,invoke,stdcall,cinvoke,ccall + push eax + pushx equ \\} + match =pushx,pushx \\{ + pushd + pushx equ \\} + restore pushx \} + macro invoke proc,[arg] + \{ \reverse pushd + \common call [proc] \} + macro stdcall proc,[arg] + \{ \reverse pushd + \common call proc \} + macro cinvoke proc,[arg] + \{ \common \local size + size = 0 + if ~ arg eq + \reverse pushd + size = size+4 + match =double any,arg \\{ size = size+4 \\} + \common end if + call [proc] + if size + add esp,size + end if \} + macro ccall proc,[arg] + \{ \common \local size + size = 0 + if ~ arg eq + \reverse pushd + size = size+4 + match =double any,arg \\{ size = size+4 \\} + \common end if + call proc + if size + add esp,size + end if \} } + +macro pushd value +{ match first=,more, value \{ \local ..continue + call ..continue + db value,0 + ..continue: + pushd equ \} + match pushd =addr var,pushd value \{ \local ..opcode,..address + if +var relativeto 0 | +var relativeto $ + push var + else + lea edx,[var] + push edx + end if + pushd equ \} + match pushd =double [var],pushd value \{ + push dword [var+4] + push dword [var] + pushd equ \} + match pushd =double =ptr var,pushd value \{ + push dword [var+4] + push dword [var] + pushd equ \} + match pushd =double num,pushd value \{ \local ..high,..low + virtual at 0 + dq num + load ..low dword from 0 + load ..high dword from 4 + end virtual + push ..high + push ..low + pushd equ \} + match pushd,pushd \{ \local ..continue + if value eqtype '' + call ..continue + db value,0 + ..continue: + else + push value + end if + pushd equ \} + restore pushd } + +allow_nesting + +macro import lib,[functions] +{ common macro import_#lib \{ import lib,functions \} } + +macro api [functions] +{ common macro all_api \{ all_api + api functions \} } +macro all_api {} + +include 'api/kernel32.inc' +include 'api/user32.inc' +include 'api/gdi32.inc' +include 'api/advapi32.inc' +include 'api/comctl32.inc' +include 'api/comdlg32.inc' +include 'api/shell32.inc' +include 'api/wsock32.inc' + +purge import,api + +macro .data { section '.data' data readable writeable } + +macro .code { section '.text' code readable executable } + +macro .end label +{ + entry label + + section '.idata' import data readable writeable + + library kernel32,'KERNEL32.DLL',\ + user32,'USER32.DLL',\ + gdi32,'GDI32.DLL',\ + advapi32,'ADVAPI32.DLL',\ + comctl32,'COMCTL32.DLL',\ + comdlg32,'COMDLG32.DLL',\ + shell32,'SHELL32.DLL',\ + wsock32,'WSOCK32.DLL' + + import_kernel32 + import_user32 + import_gdi32 + import_advapi32 + import_comctl32 + import_comdlg32 + import_shell32 + import_wsock32 + + all_api +} + +virtual at 0 + xchg eax,eax + detected_16bit = $-1 +end virtual + +if detected_16bit + format PE GUI 4.0 +end if diff --git a/asm/equihash/Windows/INCLUDE/WIN32AXP.INC b/asm/equihash/Windows/INCLUDE/WIN32AXP.INC new file mode 100644 index 0000000..13c6a9e --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/WIN32AXP.INC @@ -0,0 +1,199 @@ + +; Extended Win32 programming headers with parameters count checking (ASCII) + +include 'win32a.inc' + +include 'macro/if.inc' + +macro allow_nesting +{ macro pushd value + \{ match ,value \\{ + pushx equ \\} + match =pushx =invoke proc,pushx value \\{ + allow_nesting + invoke proc + purge pushd,invoke,stdcall,cinvoke,ccall + push eax + pushx equ \\} + match =pushx =stdcall proc,pushx value \\{ + allow_nesting + stdcall proc + purge pushd,invoke,stdcall,cinvoke,ccall + push eax + pushx equ \\} + match =pushx =cinvoke proc,pushx value \\{ + allow_nesting + cinvoke proc + purge pushd,invoke,stdcall,cinvoke,ccall + push eax + pushx equ \\} + match =pushx =ccall proc,pushx value \\{ + allow_nesting + ccall proc + purge pushd,invoke,stdcall,cinvoke,ccall + push eax + pushx equ \\} + match =pushx,pushx \\{ + pushd + pushx equ \\} + restore pushx \} + macro invoke proc,[arg] + \{ \common count@stdcall = 0 + if ~ arg eq + \forward count@stdcall = count@stdcall+1 + match =double value, arg \\{ count@stdcall = count@stdcall+1 \\} + \common end if + if proc eqtype 0 & defined proc \# % & count@stdcall <> proc \# % + display "Error: invalid count of parameters for ",\`proc,".",0Dh,0Ah + assert 0 + end if + \reverse pushd + \common call [proc] \} + macro stdcall proc,[arg] + \{ \common count@stdcall = 0 + if ~ arg eq + \forward count@stdcall = count@stdcall+1 + match =double value, arg \\{ count@stdcall = count@stdcall+1 \\} + \common end if + if proc eqtype 0 & defined proc \# % & count@stdcall <> proc \# % + display "Error: invalid count of parameters for ",\`proc,".",0Dh,0Ah + assert 0 + end if + \reverse pushd + \common call proc \} + macro cinvoke proc,[arg] + \{ \common \local size + size = 0 + if ~ arg eq + \reverse pushd + size = size+4 + match =double any,arg \\{ size = size+4 \\} + \common end if + call [proc] + if size + add esp,size + end if \} + macro ccall proc,[arg] + \{ \common \local size + size = 0 + if ~ arg eq + \reverse pushd + size = size+4 + match =double any,arg \\{ size = size+4 \\} + \common end if + call proc + if size + add esp,size + end if \} } + +macro pushd value +{ match first=,more, value \{ \local ..continue + call ..continue + db value,0 + ..continue: + pushd equ \} + match pushd =addr var,pushd value \{ \local ..opcode,..address + if +var relativeto 0 | +var relativeto $ + push var + else + lea edx,[var] + push edx + end if + pushd equ \} + match pushd =double [var],pushd value \{ + push dword [var+4] + push dword [var] + pushd equ \} + match pushd =double =ptr var,pushd value \{ + push dword [var+4] + push dword [var] + pushd equ \} + match pushd =double num,pushd value \{ \local ..high,..low + virtual at 0 + dq num + load ..low dword from 0 + load ..high dword from 4 + end virtual + push ..high + push ..low + pushd equ \} + match pushd,pushd \{ \local ..continue + if value eqtype '' + call ..continue + db value,0 + ..continue: + else + push value + end if + pushd equ \} + restore pushd } + +allow_nesting + +include 'pcount/kernel32.inc' +include 'pcount/user32.inc' +include 'pcount/gdi32.inc' +include 'pcount/advapi32.inc' +include 'pcount/comctl32.inc' +include 'pcount/comdlg32.inc' +include 'pcount/shell32.inc' +include 'pcount/wsock32.inc' + +macro import lib,[functions] +{ common macro import_#lib \{ import lib,functions \} } + +macro api [functions] +{ common macro all_api \{ all_api + api functions \} } +macro all_api {} + +include 'api/kernel32.inc' +include 'api/user32.inc' +include 'api/gdi32.inc' +include 'api/advapi32.inc' +include 'api/comctl32.inc' +include 'api/comdlg32.inc' +include 'api/shell32.inc' +include 'api/wsock32.inc' + +purge import,api + +macro .data { section '.data' data readable writeable } + +macro .code { section '.text' code readable executable } + +macro .end label +{ + entry label + + section '.idata' import data readable writeable + + library kernel32,'KERNEL32.DLL',\ + user32,'USER32.DLL',\ + gdi32,'GDI32.DLL',\ + advapi32,'ADVAPI32.DLL',\ + comctl32,'COMCTL32.DLL',\ + comdlg32,'COMDLG32.DLL',\ + shell32,'SHELL32.DLL',\ + wsock32,'WSOCK32.DLL' + + import_kernel32 + import_user32 + import_gdi32 + import_advapi32 + import_comctl32 + import_comdlg32 + import_shell32 + import_wsock32 + + all_api +} + +virtual at 0 + xchg eax,eax + detected_16bit = $-1 +end virtual + +if detected_16bit + format PE GUI 4.0 +end if diff --git a/asm/equihash/Windows/INCLUDE/WIN32W.INC b/asm/equihash/Windows/INCLUDE/WIN32W.INC new file mode 100644 index 0000000..99e8679 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/WIN32W.INC @@ -0,0 +1,25 @@ + +; Win32 programming headers (WideChar) + +include 'macro/struct.inc' +include 'macro/proc32.inc' +include 'macro/com32.inc' +include 'macro/import32.inc' +include 'macro/export.inc' +include 'macro/resource.inc' + +struc TCHAR [val] { common match any, val \{ . du val \} + match , val \{ . du ? \} } +sizeof.TCHAR = 2 + +include 'equates/kernel32.inc' +include 'equates/user32.inc' +include 'equates/gdi32.inc' +include 'equates/comctl32.inc' +include 'equates/comdlg32.inc' +include 'equates/shell32.inc' +include 'equates/wsock32.inc' + +macro api [name] { if used name + label name dword at name#W + end if } diff --git a/asm/equihash/Windows/INCLUDE/WIN32WX.INC b/asm/equihash/Windows/INCLUDE/WIN32WX.INC new file mode 100644 index 0000000..4f7e50e --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/WIN32WX.INC @@ -0,0 +1,174 @@ + +; Extended Win32 programming headers (WideChar) + +include 'win32w.inc' + +include 'macro/if.inc' + +macro allow_nesting +{ macro pushd value + \{ match ,value \\{ + pushx equ \\} + match =pushx =invoke proc,pushx value \\{ + allow_nesting + invoke proc + purge pushd,invoke,stdcall,cinvoke,ccall + push eax + pushx equ \\} + match =pushx =stdcall proc,pushx value \\{ + allow_nesting + stdcall proc + purge pushd,invoke,stdcall,cinvoke,ccall + push eax + pushx equ \\} + match =pushx =cinvoke proc,pushx value \\{ + allow_nesting + cinvoke proc + purge pushd,invoke,stdcall,cinvoke,ccall + push eax + pushx equ \\} + match =pushx =ccall proc,pushx value \\{ + allow_nesting + ccall proc + purge pushd,invoke,stdcall,cinvoke,ccall + push eax + pushx equ \\} + match =pushx,pushx \\{ + pushd + pushx equ \\} + restore pushx \} + macro invoke proc,[arg] + \{ \reverse pushd + \common call [proc] \} + macro stdcall proc,[arg] + \{ \reverse pushd + \common call proc \} + macro cinvoke proc,[arg] + \{ \common \local size + size = 0 + if ~ arg eq + \reverse pushd + size = size+4 + match =double any,arg \\{ size = size+4 \\} + \common end if + call [proc] + if size + add esp,size + end if \} + macro ccall proc,[arg] + \{ \common \local size + size = 0 + if ~ arg eq + \reverse pushd + size = size+4 + match =double any,arg \\{ size = size+4 \\} + \common end if + call proc + if size + add esp,size + end if \} } + +macro pushd value +{ match first=,more, value \{ \local ..continue + times 1 - (rva $ and 1) nop + call ..continue + du value,0 + ..continue: + pushd equ \} + match pushd =addr var,pushd value \{ \local ..opcode,..address + if +var relativeto 0 | +var relativeto $ + push var + else + lea edx,[var] + push edx + end if + pushd equ \} + match pushd =double [var],pushd value \{ + push dword [var+4] + push dword [var] + pushd equ \} + match pushd =double =ptr var,pushd value \{ + push dword [var+4] + push dword [var] + pushd equ \} + match pushd =double num,pushd value \{ \local ..high,..low + virtual at 0 + dq num + load ..low dword from 0 + load ..high dword from 4 + end virtual + push ..high + push ..low + pushd equ \} + match pushd,pushd \{ \local ..continue + if value eqtype '' + times 1 - (rva $ and 1) nop + call ..continue + du value,0 + ..continue: + else + push value + end if + pushd equ \} + restore pushd } + +allow_nesting + +macro import lib,[functions] +{ common macro import_#lib \{ import lib,functions \} } + +macro api [functions] +{ common macro all_api \{ all_api + api functions \} } +macro all_api {} + +include 'api/kernel32.inc' +include 'api/user32.inc' +include 'api/gdi32.inc' +include 'api/advapi32.inc' +include 'api/comctl32.inc' +include 'api/comdlg32.inc' +include 'api/shell32.inc' +include 'api/wsock32.inc' + +purge import,api + +macro .data { section '.data' data readable writeable } + +macro .code { section '.text' code readable executable } + +macro .end label +{ + entry label + + section '.idata' import data readable writeable + + library kernel32,'KERNEL32.DLL',\ + user32,'USER32.DLL',\ + gdi32,'GDI32.DLL',\ + advapi32,'ADVAPI32.DLL',\ + comctl32,'COMCTL32.DLL',\ + comdlg32,'COMDLG32.DLL',\ + shell32,'SHELL32.DLL',\ + wsock32,'WSOCK32.DLL' + + import_kernel32 + import_user32 + import_gdi32 + import_advapi32 + import_comctl32 + import_comdlg32 + import_shell32 + import_wsock32 + + all_api +} + +virtual at 0 + xchg eax,eax + detected_16bit = $-1 +end virtual + +if detected_16bit + format PE GUI 4.0 +end if diff --git a/asm/equihash/Windows/INCLUDE/WIN32WXP.INC b/asm/equihash/Windows/INCLUDE/WIN32WXP.INC new file mode 100644 index 0000000..177fb80 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/WIN32WXP.INC @@ -0,0 +1,201 @@ + +; Extended Win32 programming headers with parameters count checking (WideChar) + +include 'win32w.inc' + +include 'macro/if.inc' + +macro allow_nesting +{ macro pushd value + \{ match ,value \\{ + pushx equ \\} + match =pushx =invoke proc,pushx value \\{ + allow_nesting + invoke proc + purge pushd,invoke,stdcall,cinvoke,ccall + push eax + pushx equ \\} + match =pushx =stdcall proc,pushx value \\{ + allow_nesting + stdcall proc + purge pushd,invoke,stdcall,cinvoke,ccall + push eax + pushx equ \\} + match =pushx =cinvoke proc,pushx value \\{ + allow_nesting + cinvoke proc + purge pushd,invoke,stdcall,cinvoke,ccall + push eax + pushx equ \\} + match =pushx =ccall proc,pushx value \\{ + allow_nesting + ccall proc + purge pushd,invoke,stdcall,cinvoke,ccall + push eax + pushx equ \\} + match =pushx,pushx \\{ + pushd + pushx equ \\} + restore pushx \} + macro invoke proc,[arg] + \{ \common count@stdcall = 0 + if ~ arg eq + \forward count@stdcall = count@stdcall+1 + match =double value, arg \\{ count@stdcall = count@stdcall+1 \\} + \common end if + if proc eqtype 0 & defined proc \# % & count@stdcall <> proc \# % + display "Error: invalid count of parameters for ",\`proc,".",0Dh,0Ah + assert 0 + end if + \reverse pushd + \common call [proc] \} + macro stdcall proc,[arg] + \{ \common count@stdcall = 0 + if ~ arg eq + \forward count@stdcall = count@stdcall+1 + match =double value, arg \\{ count@stdcall = count@stdcall+1 \\} + \common end if + if proc eqtype 0 & defined proc \# % & count@stdcall <> proc \# % + display "Error: invalid count of parameters for ",\`proc,".",0Dh,0Ah + assert 0 + end if + \reverse pushd + \common call proc \} + macro cinvoke proc,[arg] + \{ \common \local size + size = 0 + if ~ arg eq + \reverse pushd + size = size+4 + match =double any,arg \\{ size = size+4 \\} + \common end if + call [proc] + if size + add esp,size + end if \} + macro ccall proc,[arg] + \{ \common \local size + size = 0 + if ~ arg eq + \reverse pushd + size = size+4 + match =double any,arg \\{ size = size+4 \\} + \common end if + call proc + if size + add esp,size + end if \} } + +macro pushd value +{ match first=,more, value \{ \local ..continue + times 1 - (rva $ and 1) nop + call ..continue + du value,0 + ..continue: + pushd equ \} + match pushd =addr var,pushd value \{ \local ..opcode,..address + if +var relativeto 0 | +var relativeto $ + push var + else + lea edx,[var] + push edx + end if + pushd equ \} + match pushd =double [var],pushd value \{ + push dword [var+4] + push dword [var] + pushd equ \} + match pushd =double =ptr var,pushd value \{ + push dword [var+4] + push dword [var] + pushd equ \} + match pushd =double num,pushd value \{ \local ..high,..low + virtual at 0 + dq num + load ..low dword from 0 + load ..high dword from 4 + end virtual + push ..high + push ..low + pushd equ \} + match pushd,pushd \{ \local ..continue + if value eqtype '' + times 1 - (rva $ and 1) nop + call ..continue + du value,0 + ..continue: + else + push value + end if + pushd equ \} + restore pushd } + +allow_nesting + +include 'pcount/kernel32.inc' +include 'pcount/user32.inc' +include 'pcount/gdi32.inc' +include 'pcount/advapi32.inc' +include 'pcount/comctl32.inc' +include 'pcount/comdlg32.inc' +include 'pcount/shell32.inc' +include 'pcount/wsock32.inc' + +macro import lib,[functions] +{ common macro import_#lib \{ import lib,functions \} } + +macro api [functions] +{ common macro all_api \{ all_api + api functions \} } +macro all_api {} + +include 'api/kernel32.inc' +include 'api/user32.inc' +include 'api/gdi32.inc' +include 'api/advapi32.inc' +include 'api/comctl32.inc' +include 'api/comdlg32.inc' +include 'api/shell32.inc' +include 'api/wsock32.inc' + +purge import,api + +macro .data { section '.data' data readable writeable } + +macro .code { section '.text' code readable executable } + +macro .end label +{ + entry label + + section '.idata' import data readable writeable + + library kernel32,'KERNEL32.DLL',\ + user32,'USER32.DLL',\ + gdi32,'GDI32.DLL',\ + advapi32,'ADVAPI32.DLL',\ + comctl32,'COMCTL32.DLL',\ + comdlg32,'COMDLG32.DLL',\ + shell32,'SHELL32.DLL',\ + wsock32,'WSOCK32.DLL' + + import_kernel32 + import_user32 + import_gdi32 + import_advapi32 + import_comctl32 + import_comdlg32 + import_shell32 + import_wsock32 + + all_api +} + +virtual at 0 + xchg eax,eax + detected_16bit = $-1 +end virtual + +if detected_16bit + format PE GUI 4.0 +end if diff --git a/asm/equihash/Windows/INCLUDE/WIN64A.INC b/asm/equihash/Windows/INCLUDE/WIN64A.INC new file mode 100644 index 0000000..51da7fc --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/WIN64A.INC @@ -0,0 +1,25 @@ + +; Win64 programming headers (ASCII) + +include 'macro/struct.inc' +include 'macro/proc64.inc' +include 'macro/com64.inc' +include 'macro/import64.inc' +include 'macro/export.inc' +include 'macro/resource.inc' + +struc TCHAR [val] { common match any, val \{ . db val \} + match , val \{ . db ? \} } +sizeof.TCHAR = 1 + +include 'equates/kernel64.inc' +include 'equates/user64.inc' +include 'equates/gdi64.inc' +include 'equates/comctl64.inc' +include 'equates/comdlg64.inc' +include 'equates/shell64.inc' + +macro api [name] { if used name + label name qword at name#A + end if } + diff --git a/asm/equihash/Windows/INCLUDE/WIN64AX.INC b/asm/equihash/Windows/INCLUDE/WIN64AX.INC new file mode 100644 index 0000000..cbc21a5 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/WIN64AX.INC @@ -0,0 +1,205 @@ + +; Extended Win64 programming headers (ASCII) + +include 'win64a.inc' + +include 'macro/if.inc' + +macro allow_nesting +{ macro invoke proc,[arg] + \{ \common fastcall [proc],arg \} + macro fastcall proc,[arg] + \{ \common \local list,counter,flags,outer_frame,nested_frame,..close_nest + match =current@frame,current@frame \\{ + frame + define outer_frame \\} + define counter + define list + flags = 0 + \forward \local param,nested,isfloat,..next + match any,counter \\{ list equ list, \\} + counter equ counter+1 + define param arg + define nested + isfloat = 0 + match =invoke statement,param \\{ + nested equ param + define param \\} + match =fastcall statement,param \\{ + nested equ param + define param \\} + match =float =invoke statement,param \\{ + define nested invoke statement + define param + isfloat = 1 \\} + match =float =fastcall statement,param \\{ + define nested fastcall statement + define param + isfloat = 1 \\} + match statement,nested \\{ + match =nested_frame,nested_frame \\\{ + frame + define nested_frame \\\} + allow_nesting + statement + purge invoke_fastcall + if counter > 4 + if isfloat + movq [rsp+size@frame+(counter-1)*8],xmm0 + else + mov [rsp+size@frame+(counter-1)*8],rax + end if + else + flags = flags or 1 shl (counter-1) + if isfloat + flags = flags or 1 shl (4+counter-1) + end if + if ..close_nest > ..next + if float + movq [rsp+size@frame+(counter-1)*8],xmm0 + else + mov [rsp+size@frame+(counter-1)*8],rax + end if + else + flags = flags or 1 shl (8+counter-1) + end if + end if + ..next: \\} + list equ list + \common ..close_nest: + match ,nested_frame \\{ endf \\} + if flags and 1 + if flags and 1 shl 4 + if ~ flags and 1 shl 8 + movq xmm0,[rsp] + end if + else + if flags and 1 shl 8 + mov rcx,rax + else + mov rcx,[rsp] + end if + end if + end if + if flags and 1 shl 1 + if flags and 1 shl (4+1) + if flags and 1 shl (8+1) + movq xmm1,xmm0 + else + movq xmm1,[rsp+8] + end if + else + if flags and 1 shl (8+1) + mov rdx,rax + else + mov rdx,[rsp+8] + end if + end if + end if + if flags and 1 shl 2 + if flags and 1 shl (4+2) + if flags and 1 shl (8+2) + movq xmm2,xmm0 + else + movq xmm2,[rsp+2*8] + end if + else + if flags and 1 shl (8+2) + mov r8,rax + else + mov r8,[rsp+2*8] + end if + end if + end if + if flags and 1 shl 3 + if flags and 1 shl (4+3) + if flags and 1 shl (8+3) + movq xmm3,xmm0 + else + movq xmm3,[rsp+3*8] + end if + else + if flags and 1 shl (8+3) + mov r9,rax + else + mov r9,[rsp+3*8] + end if + end if + end if + match args,list \\{ fastcall proc,args \\} + match ,list \\{ fastcall proc \\} + match ,outer_frame \\{ endf \\} \} } + +allow_nesting + +macro import lib,[functions] +{ common macro import_#lib \{ import lib,functions \} } + +macro api [functions] +{ common macro all_api \{ all_api + api functions \} } +macro all_api {} + +include 'api/kernel32.inc' +include 'api/user32.inc' +include 'api/gdi32.inc' +include 'api/advapi32.inc' +include 'api/comctl32.inc' +include 'api/comdlg32.inc' +include 'api/shell32.inc' +include 'api/wsock32.inc' + +purge import,api + +macro .data { section '.data' data readable writeable } + +macro .code { + section '.text' code readable executable + entry $ + sub rsp,8 + local main,code + entry equ main + if main <> code + jmp main + end if + code: } + +macro .end value +{ + label entry at value + + section '.idata' import data readable writeable + + library kernel32,'KERNEL32.DLL',\ + user32,'USER32.DLL',\ + gdi32,'GDI32.DLL',\ + advapi32,'ADVAPI32.DLL',\ + comctl32,'COMCTL32.DLL',\ + comdlg32,'COMDLG32.DLL',\ + shell32,'SHELL32.DLL',\ + wsock32,'WSOCK32.DLL' + + import_kernel32 + import_user32 + import_gdi32 + import_advapi32 + import_comctl32 + import_comdlg32 + import_shell32 + import_wsock32 + + all_api +} + +virtual at 0 + inc ax + if $=1 + detected_16bit = 1 + else + detected_16bit = 0 + end if +end virtual + +if detected_16bit + format PE64 GUI 5.0 +end if diff --git a/asm/equihash/Windows/INCLUDE/WIN64AXP.INC b/asm/equihash/Windows/INCLUDE/WIN64AXP.INC new file mode 100644 index 0000000..caa3e2b --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/WIN64AXP.INC @@ -0,0 +1,221 @@ + +; Extended Win64 programming headers with parameters count checking (ASCII) + +include 'win64a.inc' + +include 'macro/if.inc' + +macro allow_nesting +{ macro invoke proc,[arg] + \{ \common fastcall [proc],arg \} + macro fastcall proc,[arg] + \{ \common \local list,counter,flags,outer_frame,nested_frame,..close_nest + match =current@frame,current@frame \\{ + frame + define outer_frame \\} + define counter + define list + flags = 0 + \forward \local param,nested,isfloat,..next + match any,counter \\{ list equ list, \\} + counter equ counter+1 + define param arg + define nested + isfloat = 0 + match =invoke statement,param \\{ + nested equ param + define param \\} + match =fastcall statement,param \\{ + nested equ param + define param \\} + match =float =invoke statement,param \\{ + define nested invoke statement + define param + isfloat = 1 \\} + match =float =fastcall statement,param \\{ + define nested fastcall statement + define param + isfloat = 1 \\} + match statement,nested \\{ + match =nested_frame,nested_frame \\\{ + frame + define nested_frame \\\} + allow_nesting + statement + purge invoke_fastcall + if counter > 4 + if isfloat + movq [rsp+size@frame+(counter-1)*8],xmm0 + else + mov [rsp+size@frame+(counter-1)*8],rax + end if + else + flags = flags or 1 shl (counter-1) + if isfloat + flags = flags or 1 shl (4+counter-1) + end if + if ..close_nest > ..next + if float + movq [rsp+size@frame+(counter-1)*8],xmm0 + else + mov [rsp+size@frame+(counter-1)*8],rax + end if + else + flags = flags or 1 shl (8+counter-1) + end if + end if + ..next: \\} + match any,param \\{ list equ list \\} + \common ..close_nest: + match ,nested_frame \\{ endf \\} + if flags and 1 + if flags and 1 shl 4 + if ~ flags and 1 shl 8 + movq xmm0,[rsp] + end if + else + if flags and 1 shl 8 + mov rcx,rax + else + mov rcx,[rsp] + end if + end if + end if + if flags and 1 shl 1 + if flags and 1 shl (4+1) + if flags and 1 shl (8+1) + movq xmm1,xmm0 + else + movq xmm1,[rsp+8] + end if + else + if flags and 1 shl (8+1) + mov rdx,rax + else + mov rdx,[rsp+8] + end if + end if + end if + if flags and 1 shl 2 + if flags and 1 shl (4+2) + if flags and 1 shl (8+2) + movq xmm2,xmm0 + else + movq xmm2,[rsp+2*8] + end if + else + if flags and 1 shl (8+2) + mov r8,rax + else + mov r8,[rsp+2*8] + end if + end if + end if + if flags and 1 shl 3 + if flags and 1 shl (4+3) + if flags and 1 shl (8+3) + movq xmm3,xmm0 + else + movq xmm3,[rsp+3*8] + end if + else + if flags and 1 shl (8+3) + mov r9,rax + else + mov r9,[rsp+3*8] + end if + end if + end if + match args,list \\{ fastcall proc,args \\} + match ,list \\{ fastcall proc + define counter 0 \\} + match ,outer_frame \\{ endf \\} + proc@paramcheck equ proc + match [name],proc \\{ define proc@paramcheck name \\} + match name,proc@paramcheck \\{ if name eqtype 0 & defined name \\# % & counter <> name \\# % + display "Error: invalid count of parameters for ",\\`name,".",0Dh,0Ah + assert 0 + end if \\} \} } + +allow_nesting + +include 'pcount/kernel32.inc' +include 'pcount/user32.inc' +include 'pcount/gdi32.inc' +include 'pcount/advapi32.inc' +include 'pcount/comctl32.inc' +include 'pcount/comdlg32.inc' +include 'pcount/shell32.inc' +include 'pcount/wsock32.inc' + +macro import lib,[functions] +{ common macro import_#lib \{ import lib,functions \} } + +macro api [functions] +{ common macro all_api \{ all_api + api functions \} } +macro all_api {} + +include 'api/kernel32.inc' +include 'api/user32.inc' +include 'api/gdi32.inc' +include 'api/advapi32.inc' +include 'api/comctl32.inc' +include 'api/comdlg32.inc' +include 'api/shell32.inc' +include 'api/wsock32.inc' + +purge import,api + +macro .data { section '.data' data readable writeable } + +macro .code { + section '.text' code readable executable + entry $ + sub rsp,8 + local main,code + entry equ main + if main <> code + jmp main + end if + code: } + +macro .end value +{ + label entry at value + + section '.idata' import data readable writeable + + library kernel32,'KERNEL32.DLL',\ + user32,'USER32.DLL',\ + gdi32,'GDI32.DLL',\ + advapi32,'ADVAPI32.DLL',\ + comctl32,'COMCTL32.DLL',\ + comdlg32,'COMDLG32.DLL',\ + shell32,'SHELL32.DLL',\ + wsock32,'WSOCK32.DLL' + + import_kernel32 + import_user32 + import_gdi32 + import_advapi32 + import_comctl32 + import_comdlg32 + import_shell32 + import_wsock32 + + all_api +} + +virtual at 0 + inc ax + if $=1 + detected_16bit = 1 + else + detected_16bit = 0 + end if +end virtual + +if detected_16bit + format PE64 GUI 5.0 +end if diff --git a/asm/equihash/Windows/INCLUDE/WIN64W.INC b/asm/equihash/Windows/INCLUDE/WIN64W.INC new file mode 100644 index 0000000..5f444b6 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/WIN64W.INC @@ -0,0 +1,24 @@ + +; Win64 programming headers (WideChar) + +include 'macro/struct.inc' +include 'macro/proc64.inc' +include 'macro/com64.inc' +include 'macro/import64.inc' +include 'macro/export.inc' +include 'macro/resource.inc' + +struc TCHAR [val] { common match any, val \{ . du val \} + match , val \{ . du ? \} } +sizeof.TCHAR = 2 + +include 'equates/kernel64.inc' +include 'equates/user64.inc' +include 'equates/gdi64.inc' +include 'equates/comctl64.inc' +include 'equates/comdlg64.inc' +include 'equates/shell64.inc' + +macro api [name] { if used name + label name qword at name#W + end if } \ No newline at end of file diff --git a/asm/equihash/Windows/INCLUDE/WIN64WX.INC b/asm/equihash/Windows/INCLUDE/WIN64WX.INC new file mode 100644 index 0000000..0aaeb31 --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/WIN64WX.INC @@ -0,0 +1,204 @@ + +; Extended Win64 programming headers (WideChar) + +include 'win64w.inc' + +include 'macro/if.inc' + +macro allow_nesting +{ macro invoke proc,[arg] + \{ \common fastcall [proc],arg \} + macro fastcall proc,[arg] + \{ \common \local list,counter,flags,outer_frame,nested_frame,..close_nest + match =current@frame,current@frame \\{ + frame + define outer_frame \\} + define counter + define list + flags = 0 + \forward \local param,nested,isfloat,..next + match any,counter \\{ list equ list, \\} + counter equ counter+1 + define param arg + define nested + isfloat = 0 + match =invoke statement,param \\{ + nested equ param + define param \\} + match =fastcall statement,param \\{ + nested equ param + define param \\} + match =float =invoke statement,param \\{ + define nested invoke statement + define param + isfloat = 1 \\} + match =float =fastcall statement,param \\{ + define nested fastcall statement + define param + isfloat = 1 \\} + match statement,nested \\{ + match =nested_frame,nested_frame \\\{ + frame + define nested_frame \\\} + allow_nesting + statement + purge invoke_fastcall + if counter > 4 + if isfloat + movq [rsp+size@frame+(counter-1)*8],xmm0 + else + mov [rsp+size@frame+(counter-1)*8],rax + end if + else + flags = flags or 1 shl (counter-1) + if isfloat + flags = flags or 1 shl (4+counter-1) + end if + if ..close_nest > ..next + if float + movq [rsp+size@frame+(counter-1)*8],xmm0 + else + mov [rsp+size@frame+(counter-1)*8],rax + end if + else + flags = flags or 1 shl (8+counter-1) + end if + end if + ..next: \\} + list equ list + \common ..close_nest: + match ,nested_frame \\{ endf \\} + if flags and 1 + if flags and 1 shl 4 + if ~ flags and 1 shl 8 + movq xmm0,[rsp] + end if + else + if flags and 1 shl 8 + mov rcx,rax + else + mov rcx,[rsp] + end if + end if + end if + if flags and 1 shl 1 + if flags and 1 shl (4+1) + if flags and 1 shl (8+1) + movq xmm1,xmm0 + else + movq xmm1,[rsp+8] + end if + else + if flags and 1 shl (8+1) + mov rdx,rax + else + mov rdx,[rsp+8] + end if + end if + end if + if flags and 1 shl 2 + if flags and 1 shl (4+2) + if flags and 1 shl (8+2) + movq xmm2,xmm0 + else + movq xmm2,[rsp+2*8] + end if + else + if flags and 1 shl (8+2) + mov r8,rax + else + mov r8,[rsp+2*8] + end if + end if + end if + if flags and 1 shl 3 + if flags and 1 shl (4+3) + if flags and 1 shl (8+3) + movq xmm3,xmm0 + else + movq xmm3,[rsp+3*8] + end if + else + if flags and 1 shl (8+3) + mov r9,rax + else + mov r9,[rsp+3*8] + end if + end if + end if + match args,list \\{ fastcall proc,args \\} + match ,list \\{ fastcall proc \\} + match ,outer_frame \\{ endf \\} \} } + +allow_nesting + +macro import lib,[functions] +{ common macro import_#lib \{ import lib,functions \} } + +macro api [functions] +{ common macro all_api \{ all_api + api functions \} } +macro all_api {} + +include 'api/kernel32.inc' +include 'api/user32.inc' +include 'api/gdi32.inc' +include 'api/advapi32.inc' +include 'api/comctl32.inc' +include 'api/comdlg32.inc' +include 'api/shell32.inc' +include 'api/wsock32.inc' + +purge import,api + +macro .data { section '.data' data readable writeable } +macro .code { + section '.text' code readable executable + entry $ + sub rsp,8 + local main,code + entry equ main + if main <> code + jmp main + end if + code: } + +macro .end value +{ + label entry at value + + section '.idata' import data readable writeable + + library kernel32,'KERNEL32.DLL',\ + user32,'USER32.DLL',\ + gdi32,'GDI32.DLL',\ + advapi32,'ADVAPI32.DLL',\ + comctl32,'COMCTL32.DLL',\ + comdlg32,'COMDLG32.DLL',\ + shell32,'SHELL32.DLL',\ + wsock32,'WSOCK32.DLL' + + import_kernel32 + import_user32 + import_gdi32 + import_advapi32 + import_comctl32 + import_comdlg32 + import_shell32 + import_wsock32 + + all_api +} + +virtual at 0 + inc ax + if $=1 + detected_16bit = 1 + else + detected_16bit = 0 + end if +end virtual + +if detected_16bit + format PE64 GUI 5.0 +end if diff --git a/asm/equihash/Windows/INCLUDE/WIN64WXP.INC b/asm/equihash/Windows/INCLUDE/WIN64WXP.INC new file mode 100644 index 0000000..144caae --- /dev/null +++ b/asm/equihash/Windows/INCLUDE/WIN64WXP.INC @@ -0,0 +1,221 @@ + +; Extended Win64 programming headers with parameters count checking (WideChar) + +include 'win64w.inc' + +include 'macro/if.inc' + +macro allow_nesting +{ macro invoke proc,[arg] + \{ \common fastcall [proc],arg \} + macro fastcall proc,[arg] + \{ \common \local list,counter,flags,outer_frame,nested_frame,..close_nest + match =current@frame,current@frame \\{ + frame + define outer_frame \\} + define counter + define list + flags = 0 + \forward \local param,nested,isfloat,..next + match any,counter \\{ list equ list, \\} + counter equ counter+1 + define param arg + define nested + isfloat = 0 + match =invoke statement,param \\{ + nested equ param + define param \\} + match =fastcall statement,param \\{ + nested equ param + define param \\} + match =float =invoke statement,param \\{ + define nested invoke statement + define param + isfloat = 1 \\} + match =float =fastcall statement,param \\{ + define nested fastcall statement + define param + isfloat = 1 \\} + match statement,nested \\{ + match =nested_frame,nested_frame \\\{ + frame + define nested_frame \\\} + allow_nesting + statement + purge invoke_fastcall + if counter > 4 + if isfloat + movq [rsp+size@frame+(counter-1)*8],xmm0 + else + mov [rsp+size@frame+(counter-1)*8],rax + end if + else + flags = flags or 1 shl (counter-1) + if isfloat + flags = flags or 1 shl (4+counter-1) + end if + if ..close_nest > ..next + if float + movq [rsp+size@frame+(counter-1)*8],xmm0 + else + mov [rsp+size@frame+(counter-1)*8],rax + end if + else + flags = flags or 1 shl (8+counter-1) + end if + end if + ..next: \\} + match any,param \\{ list equ list \\} + \common ..close_nest: + match ,nested_frame \\{ endf \\} + if flags and 1 + if flags and 1 shl 4 + if ~ flags and 1 shl 8 + movq xmm0,[rsp] + end if + else + if flags and 1 shl 8 + mov rcx,rax + else + mov rcx,[rsp] + end if + end if + end if + if flags and 1 shl 1 + if flags and 1 shl (4+1) + if flags and 1 shl (8+1) + movq xmm1,xmm0 + else + movq xmm1,[rsp+8] + end if + else + if flags and 1 shl (8+1) + mov rdx,rax + else + mov rdx,[rsp+8] + end if + end if + end if + if flags and 1 shl 2 + if flags and 1 shl (4+2) + if flags and 1 shl (8+2) + movq xmm2,xmm0 + else + movq xmm2,[rsp+2*8] + end if + else + if flags and 1 shl (8+2) + mov r8,rax + else + mov r8,[rsp+2*8] + end if + end if + end if + if flags and 1 shl 3 + if flags and 1 shl (4+3) + if flags and 1 shl (8+3) + movq xmm3,xmm0 + else + movq xmm3,[rsp+3*8] + end if + else + if flags and 1 shl (8+3) + mov r9,rax + else + mov r9,[rsp+3*8] + end if + end if + end if + match args,list \\{ fastcall proc,args \\} + match ,list \\{ fastcall proc + define counter 0 \\} + match ,outer_frame \\{ endf \\} + proc@paramcheck equ proc + match [name],proc \\{ define proc@paramcheck name \\} + match name,proc@paramcheck \\{ if name eqtype 0 & defined name \\# % & counter <> name \\# % + display "Error: invalid count of parameters for ",\\`name,".",0Dh,0Ah + assert 0 + end if \\} \} } + +allow_nesting + +include 'pcount/kernel32.inc' +include 'pcount/user32.inc' +include 'pcount/gdi32.inc' +include 'pcount/advapi32.inc' +include 'pcount/comctl32.inc' +include 'pcount/comdlg32.inc' +include 'pcount/shell32.inc' +include 'pcount/wsock32.inc' + +macro import lib,[functions] +{ common macro import_#lib \{ import lib,functions \} } + +macro api [functions] +{ common macro all_api \{ all_api + api functions \} } +macro all_api {} + +include 'api/kernel32.inc' +include 'api/user32.inc' +include 'api/gdi32.inc' +include 'api/advapi32.inc' +include 'api/comctl32.inc' +include 'api/comdlg32.inc' +include 'api/shell32.inc' +include 'api/wsock32.inc' + +purge import,api + +macro .data { section '.data' data readable writeable } + +macro .code { + section '.text' code readable executable + entry $ + sub rsp,8 + local main,code + entry equ main + if main <> code + jmp main + end if + code: } + +macro .end value +{ + label entry at value + + section '.idata' import data readable writeable + + library kernel32,'KERNEL32.DLL',\ + user32,'USER32.DLL',\ + gdi32,'GDI32.DLL',\ + advapi32,'ADVAPI32.DLL',\ + comctl32,'COMCTL32.DLL',\ + comdlg32,'COMDLG32.DLL',\ + shell32,'SHELL32.DLL',\ + wsock32,'WSOCK32.DLL' + + import_kernel32 + import_user32 + import_gdi32 + import_advapi32 + import_comctl32 + import_comdlg32 + import_shell32 + import_wsock32 + + all_api +} + +virtual at 0 + inc ax + if $=1 + detected_16bit = 1 + else + detected_16bit = 0 + end if +end virtual + +if detected_16bit + format PE64 GUI 5.0 +end if diff --git a/asm/equihash/Windows/README.txt b/asm/equihash/Windows/README.txt deleted file mode 100755 index 1ff71c9..0000000 --- a/asm/equihash/Windows/README.txt +++ /dev/null @@ -1 +0,0 @@ -size of context (EH struct size): 178033152 bytes \ No newline at end of file diff --git a/asm/equihash/Windows/data_blake2b.asm b/asm/equihash/Windows/data_blake2b.asm old mode 100755 new mode 100644 index 5c595e6..9c9fc3e --- a/asm/equihash/Windows/data_blake2b.asm +++ b/asm/equihash/Windows/data_blake2b.asm @@ -3,7 +3,7 @@ xshufb_ror16 db 2,3,4,5,6,7,0,1, 10,11,12,13,14,15,8,9 xshufb_bswap8 db 7,6,5,4,3,2,1,0, 15,14,13,12,11,10,9,8 xctrinc dd 0,2, 0,2 -align 32 +; align 32 iv dq 0x6a09e667f3bcc908, 0xbb67ae8584caa73b dq 0x3c6ef372fe94f82b, 0xa54ff53a5f1d36f1 dq 0x510e527fade682d1, 0x9b05688c2b3e6c1f @@ -20,7 +20,7 @@ dq 0x1f83d9abfb41bd6b, 0x5be0cd19137e2179 iv4xor144 dq 0x510e527fade682d1 xor 144, 0x9b05688c2b3e6c1f iv6inverted dq 0xe07c265404be4294, 0x5be0cd19137e2179 -align 32 +; align 32 yctrinit dd 0,0, 0,1, 0,2, 0,3 yctrinc dd 0,4, 0,4, 0,4, 0,4 diff --git a/asm/equihash/Windows/equihash.sln b/asm/equihash/Windows/equihash.sln new file mode 100644 index 0000000..c95fda5 --- /dev/null +++ b/asm/equihash/Windows/equihash.sln @@ -0,0 +1,48 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2036 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test\test.vcxproj", "{6FF7D209-05A3-4550-93CC-211D33503719}" + ProjectSection(ProjectDependencies) = postProject + {299E011B-5242-4EDA-B2F2-73C9B48F12FD} = {299E011B-5242-4EDA-B2F2-73C9B48F12FD} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libequihash", "libequihash\libequihash.vcxproj", "{299E011B-5242-4EDA-B2F2-73C9B48F12FD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseSlow|Win32 = ReleaseSlow|Win32 + ReleaseSlow|x64 = ReleaseSlow|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6FF7D209-05A3-4550-93CC-211D33503719}.Debug|Win32.ActiveCfg = Debug|x64 + {6FF7D209-05A3-4550-93CC-211D33503719}.Debug|x64.ActiveCfg = Debug|x64 + {6FF7D209-05A3-4550-93CC-211D33503719}.Debug|x64.Build.0 = Debug|x64 + {6FF7D209-05A3-4550-93CC-211D33503719}.Release|Win32.ActiveCfg = Release|x64 + {6FF7D209-05A3-4550-93CC-211D33503719}.Release|x64.ActiveCfg = Release|x64 + {6FF7D209-05A3-4550-93CC-211D33503719}.Release|x64.Build.0 = Release|x64 + {6FF7D209-05A3-4550-93CC-211D33503719}.ReleaseSlow|Win32.ActiveCfg = Release|x64 + {6FF7D209-05A3-4550-93CC-211D33503719}.ReleaseSlow|x64.ActiveCfg = Release|x64 + {6FF7D209-05A3-4550-93CC-211D33503719}.ReleaseSlow|x64.Build.0 = Release|x64 + {299E011B-5242-4EDA-B2F2-73C9B48F12FD}.Debug|Win32.ActiveCfg = Debug|x64 + {299E011B-5242-4EDA-B2F2-73C9B48F12FD}.Debug|x64.ActiveCfg = Debug|x64 + {299E011B-5242-4EDA-B2F2-73C9B48F12FD}.Debug|x64.Build.0 = Debug|x64 + {299E011B-5242-4EDA-B2F2-73C9B48F12FD}.Release|Win32.ActiveCfg = Release|x64 + {299E011B-5242-4EDA-B2F2-73C9B48F12FD}.Release|x64.ActiveCfg = Release|x64 + {299E011B-5242-4EDA-B2F2-73C9B48F12FD}.Release|x64.Build.0 = Release|x64 + {299E011B-5242-4EDA-B2F2-73C9B48F12FD}.ReleaseSlow|Win32.ActiveCfg = Release|x64 + {299E011B-5242-4EDA-B2F2-73C9B48F12FD}.ReleaseSlow|x64.ActiveCfg = Release|x64 + {299E011B-5242-4EDA-B2F2-73C9B48F12FD}.ReleaseSlow|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F18874B2-97A8-47EB-82F4-5E6B4C0FDE75} + EndGlobalSection +EndGlobal diff --git a/asm/equihash/Windows/equihash_avx1.asm b/asm/equihash/Windows/equihash_avx1.asm new file mode 100644 index 0000000..ccf6a4e --- /dev/null +++ b/asm/equihash/Windows/equihash_avx1.asm @@ -0,0 +1,38 @@ +format MS64 COFF +; format PE64 console DLL +; entry DllEntryPoint + +public _ProcEhPrepare as 'EhPrepare' +public _ProcEhSolver as 'EhSolver' + +include 'INCLUDE\win64a.inc' +include 'params.inc' +include 'struct_eh.inc' +include 'macro_eh.asm' + +section '.text' code readable executable align 64 + +; proc DllEntryPoint hinstDLL,fdwReason,lpvReserved +; mov eax,TRUE +; ret +; endp + +include "proc_ehprepare_avx1.asm" +include "proc_ehsolver_avx1.asm" + +section '.data' data readable writeable align 64 + +include "data_blake2b.asm" + +; section '.edata' export data readable + +; export 'xenoncat_AVX.dll',\ +; _ProcEhPrepare,'EhPrepare',\ +; _ProcEhSolver,'EhSolver' + +; section '.reloc' fixups data readable discardable + +; if $=$$ +; dd 0,8 ; if there are no fixups, generate dummy entry +; end if + diff --git a/asm/equihash/Windows/equihash_avx1.obj b/asm/equihash/Windows/equihash_avx1.obj new file mode 100644 index 0000000..854d80b Binary files /dev/null and b/asm/equihash/Windows/equihash_avx1.obj differ diff --git a/asm/equihash/Windows/equihash_avx2.asm b/asm/equihash/Windows/equihash_avx2.asm new file mode 100644 index 0000000..456ed6f --- /dev/null +++ b/asm/equihash/Windows/equihash_avx2.asm @@ -0,0 +1,38 @@ +format MS64 COFF +; format PE64 console DLL +; entry DllEntryPoint + +public _ProcEhPrepare as 'EhPrepare' +public _ProcEhSolver as 'EhSolver' + +include 'INCLUDE\win64a.inc' +include 'params.inc' +include 'struct_eh.inc' +include 'macro_eh.asm' + +section '.text' code readable executable align 64 + +; proc DllEntryPoint hinstDLL,fdwReason,lpvReserved +; mov eax,TRUE +; ret +; endp + +include "proc_ehprepare_avx2.asm" +include "proc_ehsolver_avx2.asm" + +section '.data' data readable writeable align 64 + +include "data_blake2b.asm" + +; section '.edata' export data readable + +; export 'xenoncat_AVX2.dll',\ +; _ProcEhPrepare,'EhPrepare',\ +; _ProcEhSolver,'EhSolver' + +; section '.reloc' fixups data readable discardable + +; if $=$$ +; dd 0,8 ; if there are no fixups, generate dummy entry +; end if + diff --git a/asm/equihash/Windows/equihash_avx2.obj b/asm/equihash/Windows/equihash_avx2.obj new file mode 100644 index 0000000..4750264 Binary files /dev/null and b/asm/equihash/Windows/equihash_avx2.obj differ diff --git a/asm/equihash/Windows/macro_blake2b_avx1.asm b/asm/equihash/Windows/macro_blake2b_avx1.asm old mode 100755 new mode 100644 diff --git a/asm/equihash/Windows/macro_blake2b_avx2.asm b/asm/equihash/Windows/macro_blake2b_avx2.asm old mode 100755 new mode 100644 diff --git a/asm/equihash/Windows/macro_eh.asm b/asm/equihash/Windows/macro_eh.asm old mode 100755 new mode 100644 diff --git a/asm/equihash/Windows/makeclean.bat b/asm/equihash/Windows/makeclean.bat new file mode 100644 index 0000000..7b77333 --- /dev/null +++ b/asm/equihash/Windows/makeclean.bat @@ -0,0 +1,2 @@ +del equihash_avx1.obj +del equihash_avx2.obj diff --git a/asm/equihash/Windows/makeobj.bat b/asm/equihash/Windows/makeobj.bat new file mode 100644 index 0000000..b83405b --- /dev/null +++ b/asm/equihash/Windows/makeobj.bat @@ -0,0 +1,2 @@ +fasm.exe equihash_avx1.asm equihash_avx1.obj +fasm.exe equihash_avx2.asm equihash_avx2.obj diff --git a/asm/equihash/Windows/makeobj2.bat b/asm/equihash/Windows/makeobj2.bat new file mode 100644 index 0000000..11a32a9 --- /dev/null +++ b/asm/equihash/Windows/makeobj2.bat @@ -0,0 +1,2 @@ +fasmw.exe equihash_avx1.asm equihash_avx1.obj +fasmw.exe equihash_avx2.asm equihash_avx2.obj diff --git a/asm/equihash/Windows/out.bin b/asm/equihash/Windows/out.bin deleted file mode 100755 index 0ed4a14..0000000 Binary files a/asm/equihash/Windows/out.bin and /dev/null differ diff --git a/asm/equihash/Windows/params.inc b/asm/equihash/Windows/params.inc old mode 100755 new mode 100644 diff --git a/asm/equihash/Windows/proc_ehprepare_avx1.asm b/asm/equihash/Windows/proc_ehprepare_avx1.asm old mode 100755 new mode 100644 index cb567d9..92562e8 --- a/asm/equihash/Windows/proc_ehprepare_avx1.asm +++ b/asm/equihash/Windows/proc_ehprepare_avx1.asm @@ -20,7 +20,9 @@ vmovdqa xmm6, xword [iv4xor128] vmovdqa xmm7, xword [iv4xor128+0x10] mov r8, rsp -mov r9d, blake2sigma +; mov r9d, blake2sigma +lea r9, [blake2sigma] +lea r11, [blake2sigma+160] call _ProcBlakeMsgSched call _ProcBlakeRound add r8, 0x80 @@ -33,7 +35,8 @@ _LoopEhPrepare1: call _ProcBlakeMsgSched call _ProcBlakeRound add r9, 16 -cmp r9, blake2sigma+160 +; cmp r9, blake2sigma+160 +cmp r9, r11 jb _LoopEhPrepare1 mov r8, rsp call _ProcBlakeRound diff --git a/asm/equihash/Windows/proc_ehprepare_avx2.asm b/asm/equihash/Windows/proc_ehprepare_avx2.asm old mode 100755 new mode 100644 index 6b1dfa7..9be178e --- a/asm/equihash/Windows/proc_ehprepare_avx2.asm +++ b/asm/equihash/Windows/proc_ehprepare_avx2.asm @@ -11,7 +11,9 @@ vmovdqa ymm2, yword [iv] vmovdqa ymm3, yword [iv4xor128] mov r8, rsp -mov r9d, blake2sigma +; mov r9d, blake2sigma +lea r9, [blake2sigma] +lea r11, [blake2sigma+160] call _ProcBlakeMsgSched call _ProcBlakeRound add r8, 0x80 @@ -24,7 +26,8 @@ _LoopEhPrepare1: call _ProcBlakeMsgSched call _ProcBlakeRound add r9, 16 -cmp r9, blake2sigma+160 +; cmp r9, blake2sigma+160 +cmp r9, r11 jb _LoopEhPrepare1 mov r8, rsp call _ProcBlakeRound diff --git a/asm/equihash/Windows/proc_ehsolver_avx1.asm b/asm/equihash/Windows/proc_ehsolver_avx1.asm old mode 100755 new mode 100644 diff --git a/asm/equihash/Windows/proc_ehsolver_avx2.asm b/asm/equihash/Windows/proc_ehsolver_avx2.asm old mode 100755 new mode 100644 diff --git a/asm/equihash/Windows/q.bat b/asm/equihash/Windows/q.bat deleted file mode 100755 index a67bd58..0000000 --- a/asm/equihash/Windows/q.bat +++ /dev/null @@ -1 +0,0 @@ -\fasm\fasm.exe test_avx1.asm \ No newline at end of file diff --git a/asm/equihash/Windows/quickbench_avx1.asm b/asm/equihash/Windows/quickbench_avx1.asm deleted file mode 100755 index c4f7e4f..0000000 --- a/asm/equihash/Windows/quickbench_avx1.asm +++ /dev/null @@ -1,211 +0,0 @@ -format PE64 console 5.0 -entry start -MEM_LARGE_PAGES = 20000000h - -include 'win64a.inc' -include 'params.inc' -include 'struct_eh.inc' -include 'macro_eh.asm' - -section '.text' code readable executable - -start: -mov eax, esp -cmp rax, rsp -jne _Exit - -sub esp, 0x108 -and esp, -32 -frame - -call [GetCurrentThread] -mov rcx, rax -mov edx, 1 -call [SetThreadAffinityMask] - -call [GetCurrentProcess] -mov rcx, rax -mov edx, 0x28 ;TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY -lea r8d, [rsp+0x50] -call [OpenProcessToken] - -xor ecx, ecx -mov edx, szSeLMP -lea r8d, [rsp+0x60] -call [LookupPrivilegeValue] - -mov dword [rsp+0x5C], 1 -mov dword [rsp+0x68], 2 ;SE_PRIVILEGE_ENABLED -mov rcx, [rsp+0x50] ;TokenHandle -xor edx, edx ;DisableAllPrivileges -lea r8d, [rsp+0x5C] ;NewState -xor r9d, r9d ;BufferLength -xor eax, eax -mov qword [rsp+0x20], rax ;PreviousState -mov qword [rsp+0x28], rax ;ReturnLength -call [AdjustTokenPrivileges] - -xor ecx, ecx -mov edx, (sizeof.EH+0x1fffff) and -0x200000 -mov r8d, MEM_RESERVE + MEM_COMMIT + MEM_LARGE_PAGES -mov r9d, PAGE_READWRITE -call [VirtualAlloc] -test rax, rax -jnz _MemAllocOK - -mov ecx, szLargePageFailed -call [puts] - -xor ecx, ecx -mov edx, sizeof.EH -mov r8d, MEM_RESERVE + MEM_COMMIT -mov r9d, PAGE_READWRITE -call [VirtualAlloc] -test rax, rax -jnz _MemAllocOK - -mov ecx, szMemAllocFailed -call [puts] -jmp _Exit - -_MemAllocOK: -mov [hMem1], rax - -lea rcx, [rsp+0x78] -call [QueryPerformanceFrequency] -mov ecx, fmtqpcfreq -mov rdx, [rsp+0x78] -call [printf] - -mov rcx, [hMem1] -mov edx, t1 -call _ProcEhPrepare - -lea rcx, [rsp+0x80] -call [QueryPerformanceCounter] -mov rcx, [hMem1] -xor edx, edx -call _ProcEhSolver ;Warm up run -mov ebx, eax -lea rcx, [rsp+0x90] -call [QueryPerformanceCounter] -mov rax, [rsp+0x90] -sub rax, [rsp+0x80] -imul rax, rax, 1000 -xor edx, edx -mov rcx, [rsp+0x78] -div rcx -mov ecx, fmtWarmupTime -mov edx, eax -mov r8d, ebx -call [printf] - -START_NONCE = 58 ;arbritary number to get 19 solutions in 10 iterations (to match 1.88 solutions per run) -END_NONCE = 68 -mov dword [rsp+0x50], START_NONCE -xor eax, eax -mov [rsp+0x54], eax ;accumulate solutions -mov [rsp+0x58], rax ;accumulate delta QPC - -_LoopNonce1: -lea rcx, [rsp+0x80] -call [QueryPerformanceCounter] - -mov rcx, [hMem1] -mov edx, [rsp+0x50] -call _ProcEhSolver -add [rsp+0x54], eax -mov ebx, eax - -lea rcx, [rsp+0x90] -call [QueryPerformanceCounter] -mov rax, [rsp+0x90] -sub rax, [rsp+0x80] -add [rsp+0x58], rax -imul rax, rax, 1000 -xor edx, edx -mov rcx, [rsp+0x78] -div rcx -mov ecx, fmtTime -mov edx, eax -mov r8d, ebx -call [printf] - -mov eax, [rsp+0x50] -add eax, 1 -mov [rsp+0x50], eax -cmp eax, END_NONCE -jb _LoopNonce1 - -mov rax, [rsp+0x58] -imul rax, rax, 1000 -xor edx, edx -mov rcx, [rsp+0x78] -imul rcx, rcx, END_NONCE-START_NONCE -div rcx -mov edx, eax -mov ecx, fmtAvgTime -call [printf] - -_Panic: -mov rcx, [hMem1] -xor edx, edx -mov r8d, MEM_RELEASE ;0x8000 -call [VirtualFree] - -_Exit: -xor ecx, ecx -call [ExitProcess] - -align 64 -include "proc_ehprepare_avx1.asm" -include "proc_ehsolver_avx1.asm" - -endf - -section '.data' data readable writeable -fmtdn db "%d", 0Dh, 0Ah, 0 -fmtds db "%d ", 0 -fmtxn db "%x", 0Dh, 0Ah, 0 -fmtllxn db "%016llx", 0Dh, 0Ah, 0 -fmtqpcfreq db "QueryPerformanceCounter frequency: %lld Hz", 0Dh, 0Ah, 0 -fmtrdtscmeasured db "Measured rdtsc frequency: %lld Hz", 0Dh, 0Ah, 0 -fmttimingblake db "BLAKE2b rdtsc: %lld", 0Dh, 0Ah, 0 -fmttimingstage db "Stage %d, Output pairs %d, rdtsc: %lld %lld %lld %lld", 0Dh, 0Ah, 0 -fmtsolution1 db "Number of solutions before duplicate removal: %d", 0Dh, 0Ah, 0 -fmttimingremdup db "Duplicate removal and tree expand rdtsc: %lld", 0Dh, 0Ah, 0 -fmtsolution2 db "Solutions found: %d", 0Dh, 0Ah, 0 -fmtWarmupTime db "(Warm up) Time: %u ms, solutions: %u", 0Dh, 0Ah, 0 -fmtTime db "Time: %u ms, solutions: %u", 0Dh, 0Ah, 0 -fmtAvgTime db "Average time: %d ms", 0D, 0Ah, 0 -szRunning db "Running solver...", 0 -szSeLMP db "SeLockMemoryPrivilege",0 -szLargePageFailed db "Failed to allocate Large Page, performance may be affected", 0 -szMemAllocFailed db "Failed to allocate memory", 0 -szoutfile db "out.bin", 0 - -align 64 -include "data_blake2b.asm" - -align 64 -t1 file "t2.bin" - -align 64 -hMem1 rq 1 - -align 64 -buf0 rb 512 - -section '.idata' import data readable writeable -library kernel32,'kernel32.dll',\ - user32,'user32.dll',\ - msvcrt,'msvcrt.dll',\ - advapi32,'advapi32.dll' - -include 'api\kernel32.inc' -include 'api\user32.inc' -include 'api\advapi32.inc' - -import msvcrt,\ - printf,'printf',\ - puts,'puts' diff --git a/asm/equihash/Windows/quickbench_avx1.exe b/asm/equihash/Windows/quickbench_avx1.exe deleted file mode 100755 index bf68e35..0000000 Binary files a/asm/equihash/Windows/quickbench_avx1.exe and /dev/null differ diff --git a/asm/equihash/Windows/quickbench_avx2.asm b/asm/equihash/Windows/quickbench_avx2.asm deleted file mode 100755 index 25b18cc..0000000 --- a/asm/equihash/Windows/quickbench_avx2.asm +++ /dev/null @@ -1,211 +0,0 @@ -format PE64 console 5.0 -entry start -MEM_LARGE_PAGES = 20000000h - -include 'win64a.inc' -include 'params.inc' -include 'struct_eh.inc' -include 'macro_eh.asm' - -section '.text' code readable executable - -start: -mov eax, esp -cmp rax, rsp -jne _Exit - -sub esp, 0x108 -and esp, -32 -frame - -call [GetCurrentThread] -mov rcx, rax -mov edx, 1 -call [SetThreadAffinityMask] - -call [GetCurrentProcess] -mov rcx, rax -mov edx, 0x28 ;TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY -lea r8d, [rsp+0x50] -call [OpenProcessToken] - -xor ecx, ecx -mov edx, szSeLMP -lea r8d, [rsp+0x60] -call [LookupPrivilegeValue] - -mov dword [rsp+0x5C], 1 -mov dword [rsp+0x68], 2 ;SE_PRIVILEGE_ENABLED -mov rcx, [rsp+0x50] ;TokenHandle -xor edx, edx ;DisableAllPrivileges -lea r8d, [rsp+0x5C] ;NewState -xor r9d, r9d ;BufferLength -xor eax, eax -mov qword [rsp+0x20], rax ;PreviousState -mov qword [rsp+0x28], rax ;ReturnLength -call [AdjustTokenPrivileges] - -xor ecx, ecx -mov edx, (sizeof.EH+0x1fffff) and -0x200000 -mov r8d, MEM_RESERVE + MEM_COMMIT + MEM_LARGE_PAGES -mov r9d, PAGE_READWRITE -call [VirtualAlloc] -test rax, rax -jnz _MemAllocOK - -mov ecx, szLargePageFailed -call [puts] - -xor ecx, ecx -mov edx, sizeof.EH -mov r8d, MEM_RESERVE + MEM_COMMIT -mov r9d, PAGE_READWRITE -call [VirtualAlloc] -test rax, rax -jnz _MemAllocOK - -mov ecx, szMemAllocFailed -call [puts] -jmp _Exit - -_MemAllocOK: -mov [hMem1], rax - -lea rcx, [rsp+0x78] -call [QueryPerformanceFrequency] -mov ecx, fmtqpcfreq -mov rdx, [rsp+0x78] -call [printf] - -mov rcx, [hMem1] -mov edx, t1 -call _ProcEhPrepare - -lea rcx, [rsp+0x80] -call [QueryPerformanceCounter] -mov rcx, [hMem1] -xor edx, edx -call _ProcEhSolver ;Warm up run -mov ebx, eax -lea rcx, [rsp+0x90] -call [QueryPerformanceCounter] -mov rax, [rsp+0x90] -sub rax, [rsp+0x80] -imul rax, rax, 1000 -xor edx, edx -mov rcx, [rsp+0x78] -div rcx -mov ecx, fmtWarmupTime -mov edx, eax -mov r8d, ebx -call [printf] - -START_NONCE = 58 ;arbritary number to get 19 solutions in 10 iterations (to match 1.88 solutions per run) -END_NONCE = 68 -mov dword [rsp+0x50], START_NONCE -xor eax, eax -mov [rsp+0x54], eax ;accumulate solutions -mov [rsp+0x58], rax ;accumulate delta QPC - -_LoopNonce1: -lea rcx, [rsp+0x80] -call [QueryPerformanceCounter] - -mov rcx, [hMem1] -mov edx, [rsp+0x50] -call _ProcEhSolver -add [rsp+0x54], eax -mov ebx, eax - -lea rcx, [rsp+0x90] -call [QueryPerformanceCounter] -mov rax, [rsp+0x90] -sub rax, [rsp+0x80] -add [rsp+0x58], rax -imul rax, rax, 1000 -xor edx, edx -mov rcx, [rsp+0x78] -div rcx -mov ecx, fmtTime -mov edx, eax -mov r8d, ebx -call [printf] - -mov eax, [rsp+0x50] -add eax, 1 -mov [rsp+0x50], eax -cmp eax, END_NONCE -jb _LoopNonce1 - -mov rax, [rsp+0x58] -imul rax, rax, 1000 -xor edx, edx -mov rcx, [rsp+0x78] -imul rcx, rcx, END_NONCE-START_NONCE -div rcx -mov edx, eax -mov ecx, fmtAvgTime -call [printf] - -_Panic: -mov rcx, [hMem1] -xor edx, edx -mov r8d, MEM_RELEASE ;0x8000 -call [VirtualFree] - -_Exit: -xor ecx, ecx -call [ExitProcess] - -align 64 -include "proc_ehprepare_avx2.asm" -include "proc_ehsolver_avx2.asm" - -endf - -section '.data' data readable writeable -fmtdn db "%d", 0Dh, 0Ah, 0 -fmtds db "%d ", 0 -fmtxn db "%x", 0Dh, 0Ah, 0 -fmtllxn db "%016llx", 0Dh, 0Ah, 0 -fmtqpcfreq db "QueryPerformanceCounter frequency: %lld Hz", 0Dh, 0Ah, 0 -fmtrdtscmeasured db "Measured rdtsc frequency: %lld Hz", 0Dh, 0Ah, 0 -fmttimingblake db "BLAKE2b rdtsc: %lld", 0Dh, 0Ah, 0 -fmttimingstage db "Stage %d, Output pairs %d, rdtsc: %lld %lld %lld %lld", 0Dh, 0Ah, 0 -fmtsolution1 db "Number of solutions before duplicate removal: %d", 0Dh, 0Ah, 0 -fmttimingremdup db "Duplicate removal and tree expand rdtsc: %lld", 0Dh, 0Ah, 0 -fmtsolution2 db "Solutions found: %d", 0Dh, 0Ah, 0 -fmtWarmupTime db "(Warm up) Time: %u ms, solutions: %u", 0Dh, 0Ah, 0 -fmtTime db "Time: %u ms, solutions: %u", 0Dh, 0Ah, 0 -fmtAvgTime db "Average time: %d ms", 0D, 0Ah, 0 -szRunning db "Running solver...", 0 -szSeLMP db "SeLockMemoryPrivilege",0 -szLargePageFailed db "Failed to allocate Large Page, performance may be affected", 0 -szMemAllocFailed db "Failed to allocate memory", 0 -szoutfile db "out.bin", 0 - -align 64 -include "data_blake2b.asm" - -align 64 -t1 file "t2.bin" - -align 64 -hMem1 rq 1 - -align 64 -buf0 rb 512 - -section '.idata' import data readable writeable -library kernel32,'kernel32.dll',\ - user32,'user32.dll',\ - msvcrt,'msvcrt.dll',\ - advapi32,'advapi32.dll' - -include 'api\kernel32.inc' -include 'api\user32.inc' -include 'api\advapi32.inc' - -import msvcrt,\ - printf,'printf',\ - puts,'puts' diff --git a/asm/equihash/Windows/quickbench_avx2.exe b/asm/equihash/Windows/quickbench_avx2.exe deleted file mode 100755 index 8ef9d3c..0000000 Binary files a/asm/equihash/Windows/quickbench_avx2.exe and /dev/null differ diff --git a/asm/equihash/Windows/struct_eh.inc b/asm/equihash/Windows/struct_eh.inc old mode 100755 new mode 100644 diff --git a/asm/equihash/Windows/t2.bin b/asm/equihash/Windows/t2.bin deleted file mode 100755 index 432b9ab..0000000 Binary files a/asm/equihash/Windows/t2.bin and /dev/null differ diff --git a/asm/equihash/Windows/test_avx1.asm b/asm/equihash/Windows/test_avx1.asm deleted file mode 100755 index fccdd97..0000000 --- a/asm/equihash/Windows/test_avx1.asm +++ /dev/null @@ -1,267 +0,0 @@ -format PE64 console 5.0 -entry start -MEM_LARGE_PAGES = 20000000h - -include 'win64a.inc' -include 'params.inc' -include 'struct_eh.inc' -include 'macro_eh.asm' - -section '.text' code readable executable - -start: -mov eax, esp -cmp rax, rsp -jne _Exit - -sub esp, 0x108 -and esp, -32 -frame - -call [GetCurrentThread] -mov rcx, rax -mov edx, 1 -call [SetThreadAffinityMask] - -call [GetCurrentProcess] -mov rcx, rax -mov edx, 0x28 ;TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY -lea r8d, [rsp+0x50] -call [OpenProcessToken] - -xor ecx, ecx -mov edx, szSeLMP -lea r8d, [rsp+0x60] -call [LookupPrivilegeValue] - -mov dword [rsp+0x5C], 1 -mov dword [rsp+0x68], 2 ;SE_PRIVILEGE_ENABLED -mov rcx, [rsp+0x50] ;TokenHandle -xor edx, edx ;DisableAllPrivileges -lea r8d, [rsp+0x5C] ;NewState -xor r9d, r9d ;BufferLength -xor eax, eax -mov qword [rsp+0x20], rax ;PreviousState -mov qword [rsp+0x28], rax ;ReturnLength -call [AdjustTokenPrivileges] - -xor ecx, ecx -mov edx, (sizeof.EH+0x1fffff) and -0x200000 -mov r8d, MEM_RESERVE + MEM_COMMIT + MEM_LARGE_PAGES -mov r9d, PAGE_READWRITE -call [VirtualAlloc] -test rax, rax -jnz _MemAllocOK - -mov ecx, szLargePageFailed -call [puts] - -xor ecx, ecx -mov edx, sizeof.EH -mov r8d, MEM_RESERVE + MEM_COMMIT -mov r9d, PAGE_READWRITE -call [VirtualAlloc] -test rax, rax -jnz _MemAllocOK - -mov ecx, szMemAllocFailed -call [puts] -jmp _Exit - -_MemAllocOK: -mov [hMem1], rax - -mov rdi, [hMem1] -lea rsi, [rdi+sizeof.EH] -xor eax, eax -_LoopPrimePageTable: -mov [rdi], eax -add rdi, 4096 -cmp rdi, rsi -jb _LoopPrimePageTable - -lea rcx, [rsp+0x78] -call [QueryPerformanceFrequency] -mov ecx, fmtqpcfreq -mov rdx, [rsp+0x78] -call [printf] - -mov ecx, szRunning -call [puts] - -lea rcx, [rsp+0x80] -call [QueryPerformanceCounter] -rdtsc -shl rdx, 32 -or rax, rdx -mov [rsp+0x88], rax - -mov rcx, [hMem1] -mov edx, t1 -call _ProcEhPrepare - -mov rcx, [hMem1] -mov edx, dword [t1+136] - ;add edx, 17 -call _ProcEhSolver -mov ebx, eax - -lea rcx, [rsp+0x90] -call [QueryPerformanceCounter] -rdtsc -shl rdx, 32 -or rax, rdx -mov [rsp+0x98], rax -; -mov rbp, [hMem1] -mov ecx, fmttimingblake -mov rdx, [rbp+EH.debug+8] -sub rdx, [rbp+EH.debug] -call [printf] - -if 1 -lea rsi, [rbp+EH.debug+16] -mov r12, [rbp+EH.debug+8] -mov edi, 1 -_LoopPrintStageTiming: -mov r9, [rsi] -mov rax, r12 -mov r12, r9 -sub r9, rax -mov r8d, [rsi+8] -mov ecx, fmttimingstage -mov edx, edi -call [printf] -add rsi, 16 -add edi, 1 -cmp edi, 10 -jb _LoopPrintStageTiming -end if - -mov ecx, fmtsolution1 -mov edx, dword [rbp+EH.bucket0ptr] -call [printf] - -mov ecx, fmttimingremdup -mov rdx, [rsi] -sub rdx, r12 -call [printf] - -mov ecx, fmtsolution2 -mov edx, ebx -call [printf] - -; -mov rax, [rsp+0x78] -xor edx, edx -mov ecx, 1000 -div rcx -mov [rsp+0x70], rax -mov rax, [rsp+0x90] -sub rax, [rsp+0x80] -jz _DeltaTimeZero -mov [rsp+0x20], rax -xor edx, edx -div qword [rsp+0x70] -mov rdx, rax -mov ecx, fmtTime -call [printf] - -;rdtsc*qpf/qpc -mov rax, [rsp+0x98] -sub rax, [rsp+0x88] -mul qword [rsp+0x78] -div qword [rsp+0x20] -mov ecx, fmtrdtscmeasured -mov rdx, rax -call [printf] - -_DeltaTimeZero: -mov rbp, [hMem1] - -if 1 -mov rbp, [hMem1] -mov ecx, szoutfile ;lpFileName -mov edx, GENERIC_WRITE ;dwDesiredAccess -mov r8d, 3 ;dwShareMode -xor r9d, r9d ;lpSecurityAttributes -mov eax, CREATE_ALWAYS -mov [rsp+0x20], rax ;dwCreationDisposition -xor eax, eax -mov [rsp+0x28], rax ;dwFlagsAndAttributes -mov [rsp+0x30], rax ;hTemplateFile -call [CreateFile] -mov [rsp+0x30], rax -mov rcx, [rsp+0x30] ;hFile -;mov rdx, [hMem1] ;lpBuffer -lea rdx, [rbp+EH.hashtab+1344*2] -;lea rdx, [rbp+EH.hashtab] - -mov r8d, 1344 ;nNumberOfBytesToWrite -;mov r8d, 1344*4 -lea r9d, [rsp+0x38] ;lpNumberOfBytesWritten -xor eax, eax -mov [rsp+0x20], rax ;lpOverlapped -call [WriteFile] -mov rcx, [rsp+0x30] ;hFile -call [CloseHandle] -end if - -mov rcx, [hMem1] -xor edx, edx -mov r8d, MEM_RELEASE ;0x8000 -call [VirtualFree] - -_Exit: -xor ecx, ecx -call [ExitProcess] - -align 64 -include "proc_ehprepare_avx1.asm" -include "proc_ehsolver_avx1.asm" - -endf - -section '.data' data readable writeable -fmtdn db "%d", 0Dh, 0Ah, 0 -fmtxn db "%x", 0Dh, 0Ah, 0 -fmtllxn db "%016llx", 0Dh, 0Ah, 0 -fmtqpcfreq db "QueryPerformanceCounter frequency: %lld Hz", 0Dh, 0Ah, 0 -fmtrdtscmeasured db "Measured rdtsc frequency: %lld Hz", 0Dh, 0Ah, 0 -fmttimingblake db "BLAKE2b rdtsc: %lld", 0Dh, 0Ah, 0 -fmttimingstage db "Stage %d, Output pairs %d, rdtsc: %lld", 0Dh, 0Ah, 0 -fmtsolution1 db "Number of solutions before duplicate removal: %d", 0Dh, 0Ah, 0 -fmttimingremdup db "Duplicate removal and tree expand rdtsc: %lld", 0Dh, 0Ah, 0 -fmtsolution2 db "Solutions found: %d", 0Dh, 0Ah, 0 -fmtTime db "Time: %d ms", 0Dh, 0Ah, 0 -szRunning db "Running solver...", 0 -szSeLMP db "SeLockMemoryPrivilege",0 -szLargePageFailed db "Failed to allocate Large Page, performance may be affected", 0 -szMemAllocFailed db "Failed to allocate memory", 0 -szoutfile db "out.bin", 0 - -align 64 -include "data_blake2b.asm" - -align 64 -t1 file "t2.bin" - -align 64 -hMem1 rq 1 - -align 64 -buf0 rb 512 - -section '.idata' import data readable writeable -library kernel32,'kernel32.dll',\ - user32,'user32.dll',\ - msvcrt,'msvcrt.dll',\ - advapi32,'advapi32.dll' - -include 'api\kernel32.inc' -include 'api\user32.inc' -include 'api\advapi32.inc' - -import msvcrt,\ - printf,'printf',\ - puts,'puts' diff --git a/asm/equihash/Windows/test_avx1.exe b/asm/equihash/Windows/test_avx1.exe deleted file mode 100755 index c27301a..0000000 Binary files a/asm/equihash/Windows/test_avx1.exe and /dev/null differ diff --git a/asm/equihash/Windows/test_avx2.asm b/asm/equihash/Windows/test_avx2.asm deleted file mode 100755 index 4d87d81..0000000 --- a/asm/equihash/Windows/test_avx2.asm +++ /dev/null @@ -1,267 +0,0 @@ -format PE64 console 5.0 -entry start -MEM_LARGE_PAGES = 20000000h - -include 'win64a.inc' -include 'params.inc' -include 'struct_eh.inc' -include 'macro_eh.asm' - -section '.text' code readable executable - -start: -mov eax, esp -cmp rax, rsp -jne _Exit - -sub esp, 0x108 -and esp, -32 -frame - -call [GetCurrentThread] -mov rcx, rax -mov edx, 1 -call [SetThreadAffinityMask] - -call [GetCurrentProcess] -mov rcx, rax -mov edx, 0x28 ;TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY -lea r8d, [rsp+0x50] -call [OpenProcessToken] - -xor ecx, ecx -mov edx, szSeLMP -lea r8d, [rsp+0x60] -call [LookupPrivilegeValue] - -mov dword [rsp+0x5C], 1 -mov dword [rsp+0x68], 2 ;SE_PRIVILEGE_ENABLED -mov rcx, [rsp+0x50] ;TokenHandle -xor edx, edx ;DisableAllPrivileges -lea r8d, [rsp+0x5C] ;NewState -xor r9d, r9d ;BufferLength -xor eax, eax -mov qword [rsp+0x20], rax ;PreviousState -mov qword [rsp+0x28], rax ;ReturnLength -call [AdjustTokenPrivileges] - -xor ecx, ecx -mov edx, (sizeof.EH+0x1fffff) and -0x200000 -mov r8d, MEM_RESERVE + MEM_COMMIT + MEM_LARGE_PAGES -mov r9d, PAGE_READWRITE -call [VirtualAlloc] -test rax, rax -jnz _MemAllocOK - -mov ecx, szLargePageFailed -call [puts] - -xor ecx, ecx -mov edx, sizeof.EH -mov r8d, MEM_RESERVE + MEM_COMMIT -mov r9d, PAGE_READWRITE -call [VirtualAlloc] -test rax, rax -jnz _MemAllocOK - -mov ecx, szMemAllocFailed -call [puts] -jmp _Exit - -_MemAllocOK: -mov [hMem1], rax - -mov rdi, [hMem1] -lea rsi, [rdi+sizeof.EH] -xor eax, eax -_LoopPrimePageTable: -mov [rdi], eax -add rdi, 4096 -cmp rdi, rsi -jb _LoopPrimePageTable - -lea rcx, [rsp+0x78] -call [QueryPerformanceFrequency] -mov ecx, fmtqpcfreq -mov rdx, [rsp+0x78] -call [printf] - -mov ecx, szRunning -call [puts] - -lea rcx, [rsp+0x80] -call [QueryPerformanceCounter] -rdtsc -shl rdx, 32 -or rax, rdx -mov [rsp+0x88], rax - -mov rcx, [hMem1] -mov edx, t1 -call _ProcEhPrepare - -mov rcx, [hMem1] -mov edx, dword [t1+136] - ;add edx, 17 -call _ProcEhSolver -mov ebx, eax - -lea rcx, [rsp+0x90] -call [QueryPerformanceCounter] -rdtsc -shl rdx, 32 -or rax, rdx -mov [rsp+0x98], rax -; -mov rbp, [hMem1] -mov ecx, fmttimingblake -mov rdx, [rbp+EH.debug+8] -sub rdx, [rbp+EH.debug] -call [printf] - -if 1 -lea rsi, [rbp+EH.debug+16] -mov r12, [rbp+EH.debug+8] -mov edi, 1 -_LoopPrintStageTiming: -mov r9, [rsi] -mov rax, r12 -mov r12, r9 -sub r9, rax -mov r8d, [rsi+8] -mov ecx, fmttimingstage -mov edx, edi -call [printf] -add rsi, 16 -add edi, 1 -cmp edi, 10 -jb _LoopPrintStageTiming -end if - -mov ecx, fmtsolution1 -mov edx, dword [rbp+EH.bucket0ptr] -call [printf] - -mov ecx, fmttimingremdup -mov rdx, [rsi] -sub rdx, r12 -call [printf] - -mov ecx, fmtsolution2 -mov edx, ebx -call [printf] - -; -mov rax, [rsp+0x78] -xor edx, edx -mov ecx, 1000 -div rcx -mov [rsp+0x70], rax -mov rax, [rsp+0x90] -sub rax, [rsp+0x80] -jz _DeltaTimeZero -mov [rsp+0x20], rax -xor edx, edx -div qword [rsp+0x70] -mov rdx, rax -mov ecx, fmtTime -call [printf] - -;rdtsc*qpf/qpc -mov rax, [rsp+0x98] -sub rax, [rsp+0x88] -mul qword [rsp+0x78] -div qword [rsp+0x20] -mov ecx, fmtrdtscmeasured -mov rdx, rax -call [printf] - -_DeltaTimeZero: -mov rbp, [hMem1] - -if 1 -mov rbp, [hMem1] -mov ecx, szoutfile ;lpFileName -mov edx, GENERIC_WRITE ;dwDesiredAccess -mov r8d, 3 ;dwShareMode -xor r9d, r9d ;lpSecurityAttributes -mov eax, CREATE_ALWAYS -mov [rsp+0x20], rax ;dwCreationDisposition -xor eax, eax -mov [rsp+0x28], rax ;dwFlagsAndAttributes -mov [rsp+0x30], rax ;hTemplateFile -call [CreateFile] -mov [rsp+0x30], rax -mov rcx, [rsp+0x30] ;hFile -;mov rdx, [hMem1] ;lpBuffer -lea rdx, [rbp+EH.hashtab+1344*2] -;lea rdx, [rbp+EH.hashtab] - -mov r8d, 1344 ;nNumberOfBytesToWrite -;mov r8d, 1344*4 -lea r9d, [rsp+0x38] ;lpNumberOfBytesWritten -xor eax, eax -mov [rsp+0x20], rax ;lpOverlapped -call [WriteFile] -mov rcx, [rsp+0x30] ;hFile -call [CloseHandle] -end if - -mov rcx, [hMem1] -xor edx, edx -mov r8d, MEM_RELEASE ;0x8000 -call [VirtualFree] - -_Exit: -xor ecx, ecx -call [ExitProcess] - -align 64 -include "proc_ehprepare_avx2.asm" -include "proc_ehsolver_avx2.asm" - -endf - -section '.data' data readable writeable -fmtdn db "%d", 0Dh, 0Ah, 0 -fmtxn db "%x", 0Dh, 0Ah, 0 -fmtllxn db "%016llx", 0Dh, 0Ah, 0 -fmtqpcfreq db "QueryPerformanceCounter frequency: %lld Hz", 0Dh, 0Ah, 0 -fmtrdtscmeasured db "Measured rdtsc frequency: %lld Hz", 0Dh, 0Ah, 0 -fmttimingblake db "BLAKE2b rdtsc: %lld", 0Dh, 0Ah, 0 -fmttimingstage db "Stage %d, Output pairs %d, rdtsc: %lld", 0Dh, 0Ah, 0 -fmtsolution1 db "Number of solutions before duplicate removal: %d", 0Dh, 0Ah, 0 -fmttimingremdup db "Duplicate removal and tree expand rdtsc: %lld", 0Dh, 0Ah, 0 -fmtsolution2 db "Solutions found: %d", 0Dh, 0Ah, 0 -fmtTime db "Time: %d ms", 0Dh, 0Ah, 0 -szRunning db "Running solver...", 0 -szSeLMP db "SeLockMemoryPrivilege",0 -szLargePageFailed db "Failed to allocate Large Page, performance may be affected", 0 -szMemAllocFailed db "Failed to allocate memory", 0 -szoutfile db "out.bin", 0 - -align 64 -include "data_blake2b.asm" - -align 64 -t1 file "t2.bin" - -align 64 -hMem1 rq 1 - -align 64 -buf0 rb 512 - -section '.idata' import data readable writeable -library kernel32,'kernel32.dll',\ - user32,'user32.dll',\ - msvcrt,'msvcrt.dll',\ - advapi32,'advapi32.dll' - -include 'api\kernel32.inc' -include 'api\user32.inc' -include 'api\advapi32.inc' - -import msvcrt,\ - printf,'printf',\ - puts,'puts' diff --git a/asm/equihash/Windows/test_avx2.exe b/asm/equihash/Windows/test_avx2.exe deleted file mode 100755 index c0c0d9b..0000000 Binary files a/asm/equihash/Windows/test_avx2.exe and /dev/null differ diff --git a/c/cl.clean.bat b/c/cl.clean.bat new file mode 100644 index 0000000..ae7e83b --- /dev/null +++ b/c/cl.clean.bat @@ -0,0 +1,6 @@ +del *.obj +del *.manifest +del *.ilk +del *.pdb +del *.exe +del *.dll diff --git a/c/cl.dll.Windows.x64.debug.bat b/c/cl.dll.Windows.x64.debug.bat new file mode 100644 index 0000000..86b1456 --- /dev/null +++ b/c/cl.dll.Windows.x64.debug.bat @@ -0,0 +1,9 @@ +mkdir output +cl /w /c /Zi /MTd /EHsc /D "WIN32" /D "_DEBUG" /I "include/" ./include/crypto/blake2b.c +cl /w /c /Zi /MTd /EHsc /D "WIN32" /D "_DEBUG" /I "include/" ./include/utility.cpp +cl /w /c /Zi /MTd /EHsc /D "WIN32" /D "_DEBUG" /I "include/" ./include/uint256.cpp +cl /w /c /Zi /MTd /EHsc /D "WIN32" /D "_DEBUG" /I "include/" ./include/utilstrencodings.cpp +cl /w /c /Zi /MTd /EHsc /D "WIN32" /D "_DEBUG" /I "include/" ./include/arith_uint256.cpp +cl /w /c /Zi /MTd /EHsc /D "WIN32" /D "_DEBUG" /I "include/" ./miner.cpp + +link /DLL /OUT:"output/miner.x64.debug.dll" /NXCOMPAT /DYNAMICBASE /DEBUG /MACHINE:X64 /INCREMENTAL /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ERRORREPORT:PROMPT /NOLOGO /TLBID:1 miner.obj blake2b.obj utility.obj uint256.obj utilstrencodings.obj arith_uint256.obj ../asm/equihash/Windows/equihash_avx2.obj diff --git a/c/cl.dll.Windows.x64.release.bat b/c/cl.dll.Windows.x64.release.bat new file mode 100644 index 0000000..ca8f85a --- /dev/null +++ b/c/cl.dll.Windows.x64.release.bat @@ -0,0 +1,9 @@ +mkdir output +cl /w /c /MT /EHsc /D "WIN32" /I "include/" ./include/crypto/blake2b.c +cl /w /c /MT /EHsc /D "WIN32" /I "include/" ./include/utility.cpp +cl /w /c /MT /EHsc /D "WIN32" /I "include/" ./include/uint256.cpp +cl /w /c /MT /EHsc /D "WIN32" /I "include/" ./include/utilstrencodings.cpp +cl /w /c /MT /EHsc /D "WIN32" /I "include/" ./include/arith_uint256.cpp +cl /w /c /MT /EHsc /D "WIN32" /I "include/" ./miner.cpp + +link /DLL /OUT:"output/miner.x64.release.dll" /NXCOMPAT /DYNAMICBASE /DEBUG /MACHINE:X64 /INCREMENTAL /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ERRORREPORT:PROMPT /NOLOGO /TLBID:1 miner.obj blake2b.obj utility.obj uint256.obj utilstrencodings.obj arith_uint256.obj ../asm/equihash/Windows/equihash_avx2.obj diff --git a/c/cl.ex.Windows.x64.debug.bat b/c/cl.ex.Windows.x64.debug.bat new file mode 100644 index 0000000..cd01ee5 --- /dev/null +++ b/c/cl.ex.Windows.x64.debug.bat @@ -0,0 +1,11 @@ +mkdir output +cl /w /c /Zi /MTd /D "_DEBUG" /I "include/" ./include/crypto/blake2b.c +cl /w /c /Zi /MTd /D "_DEBUG" /I "include/" ./include/utility.cpp +cl /w /c /Zi /MTd /D "_DEBUG" /I "include/" ./include/uint256.cpp +cl /w /c /Zi /MTd /D "_DEBUG" /I "include/" ./include/utilstrencodings.cpp +cl /w /c /Zi /MTd /EHsc /D "WIN32" /D "_DEBUG" /I "include/" ./include/arith_uint256.cpp +cl /w /c /Zi /MTd /EHsc /D "WIN32" /D "_DEBUG" /I "include/" ./miner.cpp + +link miner.obj blake2b.obj utility.obj uint256.obj utilstrencodings.obj arith_uint256.obj ../asm/equihash/Windows/equihash_avx2.obj + +link /OUT:"output/miner.x64.debug.exe" /NXCOMPAT /DYNAMICBASE /DEBUG /MACHINE:X64 /INCREMENTAL /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ERRORREPORT:PROMPT /NOLOGO /TLBID:1 miner.obj blake2b.obj utility.obj uint256.obj utilstrencodings.obj arith_uint256.obj ../asm/equihash/Windows/equihash_avx2.obj diff --git a/c/cl.ex.Windows.x64.release.bat b/c/cl.ex.Windows.x64.release.bat new file mode 100644 index 0000000..af9c468 --- /dev/null +++ b/c/cl.ex.Windows.x64.release.bat @@ -0,0 +1,10 @@ +mkdir output +cl /w /c /MTd /D "_DEBUG" /I "include/" ./include/crypto/blake2b.c +cl /w /c /MTd /D "_DEBUG" /I "include/" ./include/utility.cpp +cl /w /c /MTd /D "_DEBUG" /I "include/" ./include/uint256.cpp +cl /w /c /MTd /D "_DEBUG" /I "include/" ./include/utilstrencodings.cpp +cl /w /c /MTd /EHsc /D "WIN32" /D "_DEBUG" /I "include/" ./include/arith_uint256.cpp +cl /w /c /MTd /EHsc /D "WIN32" /D "_DEBUG" /I "include/" ./miner.cpp + + +link /OUT:"output/miner.x64.release.exe" /NXCOMPAT /DYNAMICBASE /DEBUG /MACHINE:X64 /INCREMENTAL /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ERRORREPORT:PROMPT /NOLOGO /TLBID:1 miner.obj blake2b.obj utility.obj uint256.obj utilstrencodings.obj arith_uint256.obj ../asm/equihash/Windows/equihash_avx2.obj diff --git a/c/include/bitcoin-crypto-common.h b/c/include/bitcoin-crypto-common.h index a2f5666..bb6aadd 100755 --- a/c/include/bitcoin-crypto-common.h +++ b/c/include/bitcoin-crypto-common.h @@ -18,7 +18,20 @@ #if defined(NDEBUG) -# error "Zcash cannot be compiled without assertions." + # error "Zcash cannot be compiled without assertions." +#endif + +#ifdef WIN32 + #define le16toh(x) (x) + #define le32toh(x) (x) + #define le64toh(x) (x) + #define htole16(x) (x) + #define htole32(x) (x) + #define htole64(x) (x) + #define be32toh(x) (x) + #define be64toh(x) (x) + #define htobe32(x) (x) + #define htobe64(x) (x) #endif diff --git a/c/include/crypto/oaes_lib.h b/c/include/crypto/oaes_lib.h index a22bbf4..07d14c0 100755 --- a/c/include/crypto/oaes_lib.h +++ b/c/include/crypto/oaes_lib.h @@ -37,7 +37,7 @@ extern "C" { #endif -#ifdef _WIN32 +#ifdef WIN32 # ifdef OAES_SHARED # ifdef oaes_lib_EXPORTS # define OAES_API __declspec(dllexport) diff --git a/c/include/sodium.h b/c/include/sodium.h new file mode 100644 index 0000000..e7b1af4 --- /dev/null +++ b/c/include/sodium.h @@ -0,0 +1,70 @@ + +#ifndef sodium_H +#define sodium_H + +#include "sodium/version.h" + +#include "sodium/core.h" +#include "sodium/crypto_aead_aes256gcm.h" +#include "sodium/crypto_aead_chacha20poly1305.h" +#include "sodium/crypto_aead_xchacha20poly1305.h" +#include "sodium/crypto_auth.h" +#include "sodium/crypto_auth_hmacsha256.h" +#include "sodium/crypto_auth_hmacsha512.h" +#include "sodium/crypto_auth_hmacsha512256.h" +#include "sodium/crypto_box.h" +#include "sodium/crypto_box_curve25519xsalsa20poly1305.h" +#include "sodium/crypto_core_hsalsa20.h" +#include "sodium/crypto_core_hchacha20.h" +#include "sodium/crypto_core_salsa20.h" +#include "sodium/crypto_core_salsa2012.h" +#include "sodium/crypto_core_salsa208.h" +#include "sodium/crypto_generichash.h" +#include "sodium/crypto_generichash_blake2b.h" +#include "sodium/crypto_hash.h" +#include "sodium/crypto_hash_sha256.h" +#include "sodium/crypto_hash_sha512.h" +#include "sodium/crypto_kdf.h" +#include "sodium/crypto_kdf_blake2b.h" +#include "sodium/crypto_kx.h" +#include "sodium/crypto_onetimeauth.h" +#include "sodium/crypto_onetimeauth_poly1305.h" +#include "sodium/crypto_pwhash.h" +#include "sodium/crypto_pwhash_argon2i.h" +#include "sodium/crypto_scalarmult.h" +#include "sodium/crypto_scalarmult_curve25519.h" +#include "sodium/crypto_secretbox.h" +#include "sodium/crypto_secretbox_xsalsa20poly1305.h" +#include "sodium/crypto_secretstream_xchacha20poly1305.h" +#include "sodium/crypto_shorthash.h" +#include "sodium/crypto_shorthash_siphash24.h" +#include "sodium/crypto_sign.h" +#include "sodium/crypto_sign_ed25519.h" +#include "sodium/crypto_stream.h" +#include "sodium/crypto_stream_chacha20.h" +#include "sodium/crypto_stream_salsa20.h" +#include "sodium/crypto_stream_xsalsa20.h" +#include "sodium/crypto_verify_16.h" +#include "sodium/crypto_verify_32.h" +#include "sodium/crypto_verify_64.h" +#include "sodium/randombytes.h" +#ifdef __native_client__ +# include "sodium/randombytes_nativeclient.h" +#endif +#include "sodium/randombytes_salsa20_random.h" +#include "sodium/randombytes_sysrandom.h" +#include "sodium/runtime.h" +#include "sodium/utils.h" + +#ifndef SODIUM_LIBRARY_MINIMAL +# include "sodium/crypto_box_curve25519xchacha20poly1305.h" +# include "sodium/crypto_core_ed25519.h" +# include "sodium/crypto_scalarmult_ed25519.h" +# include "sodium/crypto_secretbox_xchacha20poly1305.h" +# include "sodium/crypto_pwhash_scryptsalsa208sha256.h" +# include "sodium/crypto_stream_salsa2012.h" +# include "sodium/crypto_stream_salsa208.h" +# include "sodium/crypto_stream_xchacha20.h" +#endif + +#endif diff --git a/c/include/sodium/core.h b/c/include/sodium/core.h new file mode 100644 index 0000000..dd088d2 --- /dev/null +++ b/c/include/sodium/core.h @@ -0,0 +1,28 @@ + +#ifndef sodium_core_H +#define sodium_core_H + +#include "export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +SODIUM_EXPORT +int sodium_init(void) + __attribute__ ((warn_unused_result)); + +/* ---- */ + +SODIUM_EXPORT +int sodium_set_misuse_handler(void (*handler)(void)); + +SODIUM_EXPORT +void sodium_misuse(void) + __attribute__ ((noreturn)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_aead_aes256gcm.h b/c/include/sodium/crypto_aead_aes256gcm.h new file mode 100644 index 0000000..46a3800 --- /dev/null +++ b/c/include/sodium/crypto_aead_aes256gcm.h @@ -0,0 +1,171 @@ +#ifndef crypto_aead_aes256gcm_H +#define crypto_aead_aes256gcm_H + +/* + * WARNING: Despite being the most popular AEAD construction due to its + * use in TLS, safely using AES-GCM in a different context is tricky. + * + * No more than ~ 350 GB of input data should be encrypted with a given key. + * This is for ~ 16 KB messages -- Actual figures vary according to + * message sizes. + * + * In addition, nonces are short and repeated nonces would totally destroy + * the security of this scheme. + * + * Nonces should thus come from atomic counters, which can be difficult to + * set up in a distributed environment. + * + * Unless you absolutely need AES-GCM, use crypto_aead_xchacha20poly1305_ietf_*() + * instead. It doesn't have any of these limitations. + * Or, if you don't need to authenticate additional data, just stick to + * crypto_secretbox(). + */ + +#include +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +SODIUM_EXPORT +int crypto_aead_aes256gcm_is_available(void); + +#define crypto_aead_aes256gcm_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_aead_aes256gcm_keybytes(void); + +#define crypto_aead_aes256gcm_NSECBYTES 0U +SODIUM_EXPORT +size_t crypto_aead_aes256gcm_nsecbytes(void); + +#define crypto_aead_aes256gcm_NPUBBYTES 12U +SODIUM_EXPORT +size_t crypto_aead_aes256gcm_npubbytes(void); + +#define crypto_aead_aes256gcm_ABYTES 16U +SODIUM_EXPORT +size_t crypto_aead_aes256gcm_abytes(void); + +#define crypto_aead_aes256gcm_MESSAGEBYTES_MAX \ + SODIUM_MIN(SODIUM_SIZE_MAX - crypto_aead_aes256gcm_ABYTES, \ + (16ULL * ((1ULL << 32) - 2ULL)) - crypto_aead_aes256gcm_ABYTES) +SODIUM_EXPORT +size_t crypto_aead_aes256gcm_messagebytes_max(void); + +typedef CRYPTO_ALIGN(16) unsigned char crypto_aead_aes256gcm_state[512]; + +SODIUM_EXPORT +size_t crypto_aead_aes256gcm_statebytes(void); + +SODIUM_EXPORT +int crypto_aead_aes256gcm_encrypt(unsigned char *c, + unsigned long long *clen_p, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *nsec, + const unsigned char *npub, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_aead_aes256gcm_decrypt(unsigned char *m, + unsigned long long *mlen_p, + unsigned char *nsec, + const unsigned char *c, + unsigned long long clen, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *npub, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_aead_aes256gcm_encrypt_detached(unsigned char *c, + unsigned char *mac, + unsigned long long *maclen_p, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *nsec, + const unsigned char *npub, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_aead_aes256gcm_decrypt_detached(unsigned char *m, + unsigned char *nsec, + const unsigned char *c, + unsigned long long clen, + const unsigned char *mac, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *npub, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +/* -- Precomputation interface -- */ + +SODIUM_EXPORT +int crypto_aead_aes256gcm_beforenm(crypto_aead_aes256gcm_state *ctx_, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_aead_aes256gcm_encrypt_afternm(unsigned char *c, + unsigned long long *clen_p, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *nsec, + const unsigned char *npub, + const crypto_aead_aes256gcm_state *ctx_); + +SODIUM_EXPORT +int crypto_aead_aes256gcm_decrypt_afternm(unsigned char *m, + unsigned long long *mlen_p, + unsigned char *nsec, + const unsigned char *c, + unsigned long long clen, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *npub, + const crypto_aead_aes256gcm_state *ctx_) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_aead_aes256gcm_encrypt_detached_afternm(unsigned char *c, + unsigned char *mac, + unsigned long long *maclen_p, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *nsec, + const unsigned char *npub, + const crypto_aead_aes256gcm_state *ctx_); + +SODIUM_EXPORT +int crypto_aead_aes256gcm_decrypt_detached_afternm(unsigned char *m, + unsigned char *nsec, + const unsigned char *c, + unsigned long long clen, + const unsigned char *mac, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *npub, + const crypto_aead_aes256gcm_state *ctx_) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +void crypto_aead_aes256gcm_keygen(unsigned char k[crypto_aead_aes256gcm_KEYBYTES]); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_aead_chacha20poly1305.h b/c/include/sodium/crypto_aead_chacha20poly1305.h new file mode 100644 index 0000000..a575ec7 --- /dev/null +++ b/c/include/sodium/crypto_aead_chacha20poly1305.h @@ -0,0 +1,174 @@ +#ifndef crypto_aead_chacha20poly1305_H +#define crypto_aead_chacha20poly1305_H + +#include +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +/* -- IETF ChaCha20-Poly1305 construction with a 96-bit nonce and a 32-bit internal counter -- */ + +#define crypto_aead_chacha20poly1305_ietf_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_aead_chacha20poly1305_ietf_keybytes(void); + +#define crypto_aead_chacha20poly1305_ietf_NSECBYTES 0U +SODIUM_EXPORT +size_t crypto_aead_chacha20poly1305_ietf_nsecbytes(void); + +#define crypto_aead_chacha20poly1305_ietf_NPUBBYTES 12U + +SODIUM_EXPORT +size_t crypto_aead_chacha20poly1305_ietf_npubbytes(void); + +#define crypto_aead_chacha20poly1305_ietf_ABYTES 16U +SODIUM_EXPORT +size_t crypto_aead_chacha20poly1305_ietf_abytes(void); + +#define crypto_aead_chacha20poly1305_ietf_MESSAGEBYTES_MAX \ + SODIUM_MIN(SODIUM_SIZE_MAX - crypto_aead_chacha20poly1305_ietf_ABYTES, \ + (64ULL * (1ULL << 32) - 64ULL) - crypto_aead_chacha20poly1305_ietf_ABYTES) +SODIUM_EXPORT +size_t crypto_aead_chacha20poly1305_ietf_messagebytes_max(void); + +SODIUM_EXPORT +int crypto_aead_chacha20poly1305_ietf_encrypt(unsigned char *c, + unsigned long long *clen_p, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *nsec, + const unsigned char *npub, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_aead_chacha20poly1305_ietf_decrypt(unsigned char *m, + unsigned long long *mlen_p, + unsigned char *nsec, + const unsigned char *c, + unsigned long long clen, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *npub, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_aead_chacha20poly1305_ietf_encrypt_detached(unsigned char *c, + unsigned char *mac, + unsigned long long *maclen_p, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *nsec, + const unsigned char *npub, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_aead_chacha20poly1305_ietf_decrypt_detached(unsigned char *m, + unsigned char *nsec, + const unsigned char *c, + unsigned long long clen, + const unsigned char *mac, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *npub, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +void crypto_aead_chacha20poly1305_ietf_keygen(unsigned char k[crypto_aead_chacha20poly1305_ietf_KEYBYTES]); + +/* -- Original ChaCha20-Poly1305 construction with a 64-bit nonce and a 64-bit internal counter -- */ + +#define crypto_aead_chacha20poly1305_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_aead_chacha20poly1305_keybytes(void); + +#define crypto_aead_chacha20poly1305_NSECBYTES 0U +SODIUM_EXPORT +size_t crypto_aead_chacha20poly1305_nsecbytes(void); + +#define crypto_aead_chacha20poly1305_NPUBBYTES 8U +SODIUM_EXPORT +size_t crypto_aead_chacha20poly1305_npubbytes(void); + +#define crypto_aead_chacha20poly1305_ABYTES 16U +SODIUM_EXPORT +size_t crypto_aead_chacha20poly1305_abytes(void); + +#define crypto_aead_chacha20poly1305_MESSAGEBYTES_MAX \ + (SODIUM_SIZE_MAX - crypto_aead_chacha20poly1305_ABYTES) +SODIUM_EXPORT +size_t crypto_aead_chacha20poly1305_messagebytes_max(void); + +SODIUM_EXPORT +int crypto_aead_chacha20poly1305_encrypt(unsigned char *c, + unsigned long long *clen_p, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *nsec, + const unsigned char *npub, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_aead_chacha20poly1305_decrypt(unsigned char *m, + unsigned long long *mlen_p, + unsigned char *nsec, + const unsigned char *c, + unsigned long long clen, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *npub, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_aead_chacha20poly1305_encrypt_detached(unsigned char *c, + unsigned char *mac, + unsigned long long *maclen_p, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *nsec, + const unsigned char *npub, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_aead_chacha20poly1305_decrypt_detached(unsigned char *m, + unsigned char *nsec, + const unsigned char *c, + unsigned long long clen, + const unsigned char *mac, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *npub, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +void crypto_aead_chacha20poly1305_keygen(unsigned char k[crypto_aead_chacha20poly1305_KEYBYTES]); + +/* Aliases */ + +#define crypto_aead_chacha20poly1305_IETF_KEYBYTES crypto_aead_chacha20poly1305_ietf_KEYBYTES +#define crypto_aead_chacha20poly1305_IETF_NSECBYTES crypto_aead_chacha20poly1305_ietf_NSECBYTES +#define crypto_aead_chacha20poly1305_IETF_NPUBBYTES crypto_aead_chacha20poly1305_ietf_NPUBBYTES +#define crypto_aead_chacha20poly1305_IETF_ABYTES crypto_aead_chacha20poly1305_ietf_ABYTES +#define crypto_aead_chacha20poly1305_IETF_MESSAGEBYTES_MAX crypto_aead_chacha20poly1305_ietf_MESSAGEBYTES_MAX + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_aead_xchacha20poly1305.h b/c/include/sodium/crypto_aead_xchacha20poly1305.h new file mode 100644 index 0000000..99692aa --- /dev/null +++ b/c/include/sodium/crypto_aead_xchacha20poly1305.h @@ -0,0 +1,97 @@ +#ifndef crypto_aead_xchacha20poly1305_H +#define crypto_aead_xchacha20poly1305_H + +#include +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_aead_xchacha20poly1305_ietf_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_aead_xchacha20poly1305_ietf_keybytes(void); + +#define crypto_aead_xchacha20poly1305_ietf_NSECBYTES 0U +SODIUM_EXPORT +size_t crypto_aead_xchacha20poly1305_ietf_nsecbytes(void); + +#define crypto_aead_xchacha20poly1305_ietf_NPUBBYTES 24U +SODIUM_EXPORT +size_t crypto_aead_xchacha20poly1305_ietf_npubbytes(void); + +#define crypto_aead_xchacha20poly1305_ietf_ABYTES 16U +SODIUM_EXPORT +size_t crypto_aead_xchacha20poly1305_ietf_abytes(void); + +#define crypto_aead_xchacha20poly1305_ietf_MESSAGEBYTES_MAX \ + (SODIUM_SIZE_MAX - crypto_aead_xchacha20poly1305_ietf_ABYTES) +SODIUM_EXPORT +size_t crypto_aead_xchacha20poly1305_ietf_messagebytes_max(void); + +SODIUM_EXPORT +int crypto_aead_xchacha20poly1305_ietf_encrypt(unsigned char *c, + unsigned long long *clen_p, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *nsec, + const unsigned char *npub, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_aead_xchacha20poly1305_ietf_decrypt(unsigned char *m, + unsigned long long *mlen_p, + unsigned char *nsec, + const unsigned char *c, + unsigned long long clen, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *npub, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_aead_xchacha20poly1305_ietf_encrypt_detached(unsigned char *c, + unsigned char *mac, + unsigned long long *maclen_p, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *nsec, + const unsigned char *npub, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_aead_xchacha20poly1305_ietf_decrypt_detached(unsigned char *m, + unsigned char *nsec, + const unsigned char *c, + unsigned long long clen, + const unsigned char *mac, + const unsigned char *ad, + unsigned long long adlen, + const unsigned char *npub, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +void crypto_aead_xchacha20poly1305_ietf_keygen(unsigned char k[crypto_aead_xchacha20poly1305_ietf_KEYBYTES]); + +/* Aliases */ + +#define crypto_aead_xchacha20poly1305_IETF_KEYBYTES crypto_aead_xchacha20poly1305_ietf_KEYBYTES +#define crypto_aead_xchacha20poly1305_IETF_NSECBYTES crypto_aead_xchacha20poly1305_ietf_NSECBYTES +#define crypto_aead_xchacha20poly1305_IETF_NPUBBYTES crypto_aead_xchacha20poly1305_ietf_NPUBBYTES +#define crypto_aead_xchacha20poly1305_IETF_ABYTES crypto_aead_xchacha20poly1305_ietf_ABYTES +#define crypto_aead_xchacha20poly1305_IETF_MESSAGEBYTES_MAX crypto_aead_xchacha20poly1305_ietf_MESSAGEBYTES_MAX + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_auth.h b/c/include/sodium/crypto_auth.h new file mode 100644 index 0000000..7174e7b --- /dev/null +++ b/c/include/sodium/crypto_auth.h @@ -0,0 +1,44 @@ +#ifndef crypto_auth_H +#define crypto_auth_H + +#include + +#include "crypto_auth_hmacsha512256.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_auth_BYTES crypto_auth_hmacsha512256_BYTES +SODIUM_EXPORT +size_t crypto_auth_bytes(void); + +#define crypto_auth_KEYBYTES crypto_auth_hmacsha512256_KEYBYTES +SODIUM_EXPORT +size_t crypto_auth_keybytes(void); + +#define crypto_auth_PRIMITIVE "hmacsha512256" +SODIUM_EXPORT +const char *crypto_auth_primitive(void); + +SODIUM_EXPORT +int crypto_auth(unsigned char *out, const unsigned char *in, + unsigned long long inlen, const unsigned char *k); + +SODIUM_EXPORT +int crypto_auth_verify(const unsigned char *h, const unsigned char *in, + unsigned long long inlen, const unsigned char *k) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +void crypto_auth_keygen(unsigned char k[crypto_auth_KEYBYTES]); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_auth_hmacsha256.h b/c/include/sodium/crypto_auth_hmacsha256.h new file mode 100644 index 0000000..deec526 --- /dev/null +++ b/c/include/sodium/crypto_auth_hmacsha256.h @@ -0,0 +1,68 @@ +#ifndef crypto_auth_hmacsha256_H +#define crypto_auth_hmacsha256_H + +#include +#include "crypto_hash_sha256.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_auth_hmacsha256_BYTES 32U +SODIUM_EXPORT +size_t crypto_auth_hmacsha256_bytes(void); + +#define crypto_auth_hmacsha256_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_auth_hmacsha256_keybytes(void); + +SODIUM_EXPORT +int crypto_auth_hmacsha256(unsigned char *out, + const unsigned char *in, + unsigned long long inlen, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_auth_hmacsha256_verify(const unsigned char *h, + const unsigned char *in, + unsigned long long inlen, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +/* ------------------------------------------------------------------------- */ + +typedef struct crypto_auth_hmacsha256_state { + crypto_hash_sha256_state ictx; + crypto_hash_sha256_state octx; +} crypto_auth_hmacsha256_state; + +SODIUM_EXPORT +size_t crypto_auth_hmacsha256_statebytes(void); + +SODIUM_EXPORT +int crypto_auth_hmacsha256_init(crypto_auth_hmacsha256_state *state, + const unsigned char *key, + size_t keylen); + +SODIUM_EXPORT +int crypto_auth_hmacsha256_update(crypto_auth_hmacsha256_state *state, + const unsigned char *in, + unsigned long long inlen); + +SODIUM_EXPORT +int crypto_auth_hmacsha256_final(crypto_auth_hmacsha256_state *state, + unsigned char *out); + + +SODIUM_EXPORT +void crypto_auth_hmacsha256_keygen(unsigned char k[crypto_auth_hmacsha256_KEYBYTES]); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_auth_hmacsha512.h b/c/include/sodium/crypto_auth_hmacsha512.h new file mode 100644 index 0000000..77a55fb --- /dev/null +++ b/c/include/sodium/crypto_auth_hmacsha512.h @@ -0,0 +1,67 @@ +#ifndef crypto_auth_hmacsha512_H +#define crypto_auth_hmacsha512_H + +#include +#include "crypto_hash_sha512.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_auth_hmacsha512_BYTES 64U +SODIUM_EXPORT +size_t crypto_auth_hmacsha512_bytes(void); + +#define crypto_auth_hmacsha512_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_auth_hmacsha512_keybytes(void); + +SODIUM_EXPORT +int crypto_auth_hmacsha512(unsigned char *out, + const unsigned char *in, + unsigned long long inlen, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_auth_hmacsha512_verify(const unsigned char *h, + const unsigned char *in, + unsigned long long inlen, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +/* ------------------------------------------------------------------------- */ + +typedef struct crypto_auth_hmacsha512_state { + crypto_hash_sha512_state ictx; + crypto_hash_sha512_state octx; +} crypto_auth_hmacsha512_state; + +SODIUM_EXPORT +size_t crypto_auth_hmacsha512_statebytes(void); + +SODIUM_EXPORT +int crypto_auth_hmacsha512_init(crypto_auth_hmacsha512_state *state, + const unsigned char *key, + size_t keylen); + +SODIUM_EXPORT +int crypto_auth_hmacsha512_update(crypto_auth_hmacsha512_state *state, + const unsigned char *in, + unsigned long long inlen); + +SODIUM_EXPORT +int crypto_auth_hmacsha512_final(crypto_auth_hmacsha512_state *state, + unsigned char *out); + +SODIUM_EXPORT +void crypto_auth_hmacsha512_keygen(unsigned char k[crypto_auth_hmacsha512_KEYBYTES]); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_auth_hmacsha512256.h b/c/include/sodium/crypto_auth_hmacsha512256.h new file mode 100644 index 0000000..4842f3d --- /dev/null +++ b/c/include/sodium/crypto_auth_hmacsha512256.h @@ -0,0 +1,62 @@ +#ifndef crypto_auth_hmacsha512256_H +#define crypto_auth_hmacsha512256_H + +#include +#include "crypto_auth_hmacsha512.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_auth_hmacsha512256_BYTES 32U +SODIUM_EXPORT +size_t crypto_auth_hmacsha512256_bytes(void); + +#define crypto_auth_hmacsha512256_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_auth_hmacsha512256_keybytes(void); + +SODIUM_EXPORT +int crypto_auth_hmacsha512256(unsigned char *out, const unsigned char *in, + unsigned long long inlen,const unsigned char *k); + +SODIUM_EXPORT +int crypto_auth_hmacsha512256_verify(const unsigned char *h, + const unsigned char *in, + unsigned long long inlen, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +/* ------------------------------------------------------------------------- */ + +typedef crypto_auth_hmacsha512_state crypto_auth_hmacsha512256_state; + +SODIUM_EXPORT +size_t crypto_auth_hmacsha512256_statebytes(void); + +SODIUM_EXPORT +int crypto_auth_hmacsha512256_init(crypto_auth_hmacsha512256_state *state, + const unsigned char *key, + size_t keylen); + +SODIUM_EXPORT +int crypto_auth_hmacsha512256_update(crypto_auth_hmacsha512256_state *state, + const unsigned char *in, + unsigned long long inlen); + +SODIUM_EXPORT +int crypto_auth_hmacsha512256_final(crypto_auth_hmacsha512256_state *state, + unsigned char *out); + +SODIUM_EXPORT +void crypto_auth_hmacsha512256_keygen(unsigned char k[crypto_auth_hmacsha512256_KEYBYTES]); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_box.h b/c/include/sodium/crypto_box.h new file mode 100644 index 0000000..99ee19a --- /dev/null +++ b/c/include/sodium/crypto_box.h @@ -0,0 +1,173 @@ +#ifndef crypto_box_H +#define crypto_box_H + +/* + * THREAD SAFETY: crypto_box_keypair() is thread-safe, + * provided that sodium_init() was called before. + * + * Other functions are always thread-safe. + */ + +#include + +#include "crypto_box_curve25519xsalsa20poly1305.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_box_SEEDBYTES crypto_box_curve25519xsalsa20poly1305_SEEDBYTES +SODIUM_EXPORT +size_t crypto_box_seedbytes(void); + +#define crypto_box_PUBLICKEYBYTES crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES +SODIUM_EXPORT +size_t crypto_box_publickeybytes(void); + +#define crypto_box_SECRETKEYBYTES crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES +SODIUM_EXPORT +size_t crypto_box_secretkeybytes(void); + +#define crypto_box_NONCEBYTES crypto_box_curve25519xsalsa20poly1305_NONCEBYTES +SODIUM_EXPORT +size_t crypto_box_noncebytes(void); + +#define crypto_box_MACBYTES crypto_box_curve25519xsalsa20poly1305_MACBYTES +SODIUM_EXPORT +size_t crypto_box_macbytes(void); + +#define crypto_box_MESSAGEBYTES_MAX crypto_box_curve25519xsalsa20poly1305_MESSAGEBYTES_MAX +SODIUM_EXPORT +size_t crypto_box_messagebytes_max(void); + +#define crypto_box_PRIMITIVE "curve25519xsalsa20poly1305" +SODIUM_EXPORT +const char *crypto_box_primitive(void); + +SODIUM_EXPORT +int crypto_box_seed_keypair(unsigned char *pk, unsigned char *sk, + const unsigned char *seed); + +SODIUM_EXPORT +int crypto_box_keypair(unsigned char *pk, unsigned char *sk); + +SODIUM_EXPORT +int crypto_box_easy(unsigned char *c, const unsigned char *m, + unsigned long long mlen, const unsigned char *n, + const unsigned char *pk, const unsigned char *sk) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_box_open_easy(unsigned char *m, const unsigned char *c, + unsigned long long clen, const unsigned char *n, + const unsigned char *pk, const unsigned char *sk) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_box_detached(unsigned char *c, unsigned char *mac, + const unsigned char *m, unsigned long long mlen, + const unsigned char *n, const unsigned char *pk, + const unsigned char *sk) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_box_open_detached(unsigned char *m, const unsigned char *c, + const unsigned char *mac, + unsigned long long clen, + const unsigned char *n, + const unsigned char *pk, + const unsigned char *sk) + __attribute__ ((warn_unused_result)); + +/* -- Precomputation interface -- */ + +#define crypto_box_BEFORENMBYTES crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES +SODIUM_EXPORT +size_t crypto_box_beforenmbytes(void); + +SODIUM_EXPORT +int crypto_box_beforenm(unsigned char *k, const unsigned char *pk, + const unsigned char *sk) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_box_easy_afternm(unsigned char *c, const unsigned char *m, + unsigned long long mlen, const unsigned char *n, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_box_open_easy_afternm(unsigned char *m, const unsigned char *c, + unsigned long long clen, const unsigned char *n, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_box_detached_afternm(unsigned char *c, unsigned char *mac, + const unsigned char *m, unsigned long long mlen, + const unsigned char *n, const unsigned char *k); + +SODIUM_EXPORT +int crypto_box_open_detached_afternm(unsigned char *m, const unsigned char *c, + const unsigned char *mac, + unsigned long long clen, const unsigned char *n, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +/* -- Ephemeral SK interface -- */ + +#define crypto_box_SEALBYTES (crypto_box_PUBLICKEYBYTES + crypto_box_MACBYTES) +SODIUM_EXPORT +size_t crypto_box_sealbytes(void); + +SODIUM_EXPORT +int crypto_box_seal(unsigned char *c, const unsigned char *m, + unsigned long long mlen, const unsigned char *pk); + +SODIUM_EXPORT +int crypto_box_seal_open(unsigned char *m, const unsigned char *c, + unsigned long long clen, + const unsigned char *pk, const unsigned char *sk) + __attribute__ ((warn_unused_result)); + +/* -- NaCl compatibility interface ; Requires padding -- */ + +#define crypto_box_ZEROBYTES crypto_box_curve25519xsalsa20poly1305_ZEROBYTES +SODIUM_EXPORT +size_t crypto_box_zerobytes(void); + +#define crypto_box_BOXZEROBYTES crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES +SODIUM_EXPORT +size_t crypto_box_boxzerobytes(void); + +SODIUM_EXPORT +int crypto_box(unsigned char *c, const unsigned char *m, + unsigned long long mlen, const unsigned char *n, + const unsigned char *pk, const unsigned char *sk) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_box_open(unsigned char *m, const unsigned char *c, + unsigned long long clen, const unsigned char *n, + const unsigned char *pk, const unsigned char *sk) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_box_afternm(unsigned char *c, const unsigned char *m, + unsigned long long mlen, const unsigned char *n, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_box_open_afternm(unsigned char *m, const unsigned char *c, + unsigned long long clen, const unsigned char *n, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_box_curve25519xchacha20poly1305.h b/c/include/sodium/crypto_box_curve25519xchacha20poly1305.h new file mode 100644 index 0000000..c1cf756 --- /dev/null +++ b/c/include/sodium/crypto_box_curve25519xchacha20poly1305.h @@ -0,0 +1,159 @@ + +#ifndef crypto_box_curve25519xchacha20poly1305_H +#define crypto_box_curve25519xchacha20poly1305_H + +#include +#include "crypto_stream_xchacha20.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_box_curve25519xchacha20poly1305_SEEDBYTES 32U +SODIUM_EXPORT +size_t crypto_box_curve25519xchacha20poly1305_seedbytes(void); + +#define crypto_box_curve25519xchacha20poly1305_PUBLICKEYBYTES 32U +SODIUM_EXPORT +size_t crypto_box_curve25519xchacha20poly1305_publickeybytes(void); + +#define crypto_box_curve25519xchacha20poly1305_SECRETKEYBYTES 32U +SODIUM_EXPORT +size_t crypto_box_curve25519xchacha20poly1305_secretkeybytes(void); + +#define crypto_box_curve25519xchacha20poly1305_BEFORENMBYTES 32U +SODIUM_EXPORT +size_t crypto_box_curve25519xchacha20poly1305_beforenmbytes(void); + +#define crypto_box_curve25519xchacha20poly1305_NONCEBYTES 24U +SODIUM_EXPORT +size_t crypto_box_curve25519xchacha20poly1305_noncebytes(void); + +#define crypto_box_curve25519xchacha20poly1305_MACBYTES 16U +SODIUM_EXPORT +size_t crypto_box_curve25519xchacha20poly1305_macbytes(void); + +#define crypto_box_curve25519xchacha20poly1305_MESSAGEBYTES_MAX \ + (crypto_stream_xchacha20_MESSAGEBYTES_MAX - crypto_box_curve25519xchacha20poly1305_MACBYTES) +SODIUM_EXPORT +size_t crypto_box_curve25519xchacha20poly1305_messagebytes_max(void); + +SODIUM_EXPORT +int crypto_box_curve25519xchacha20poly1305_seed_keypair(unsigned char *pk, + unsigned char *sk, + const unsigned char *seed); + +SODIUM_EXPORT +int crypto_box_curve25519xchacha20poly1305_keypair(unsigned char *pk, + unsigned char *sk); + +SODIUM_EXPORT +int crypto_box_curve25519xchacha20poly1305_easy(unsigned char *c, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *n, + const unsigned char *pk, + const unsigned char *sk) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_box_curve25519xchacha20poly1305_open_easy(unsigned char *m, + const unsigned char *c, + unsigned long long clen, + const unsigned char *n, + const unsigned char *pk, + const unsigned char *sk) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_box_curve25519xchacha20poly1305_detached(unsigned char *c, + unsigned char *mac, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *n, + const unsigned char *pk, + const unsigned char *sk) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_box_curve25519xchacha20poly1305_open_detached(unsigned char *m, + const unsigned char *c, + const unsigned char *mac, + unsigned long long clen, + const unsigned char *n, + const unsigned char *pk, + const unsigned char *sk) + __attribute__ ((warn_unused_result)); + +/* -- Precomputation interface -- */ + +SODIUM_EXPORT +int crypto_box_curve25519xchacha20poly1305_beforenm(unsigned char *k, + const unsigned char *pk, + const unsigned char *sk) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_box_curve25519xchacha20poly1305_easy_afternm(unsigned char *c, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *n, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_box_curve25519xchacha20poly1305_open_easy_afternm(unsigned char *m, + const unsigned char *c, + unsigned long long clen, + const unsigned char *n, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_box_curve25519xchacha20poly1305_detached_afternm(unsigned char *c, + unsigned char *mac, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *n, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_box_curve25519xchacha20poly1305_open_detached_afternm(unsigned char *m, + const unsigned char *c, + const unsigned char *mac, + unsigned long long clen, + const unsigned char *n, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +/* -- Ephemeral SK interface -- */ + +#define crypto_box_curve25519xchacha20poly1305_SEALBYTES \ + (crypto_box_curve25519xchacha20poly1305_PUBLICKEYBYTES + \ + crypto_box_curve25519xchacha20poly1305_MACBYTES) + +SODIUM_EXPORT +size_t crypto_box_curve25519xchacha20poly1305_sealbytes(void); + +SODIUM_EXPORT +int crypto_box_curve25519xchacha20poly1305_seal(unsigned char *c, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *pk); + +SODIUM_EXPORT +int crypto_box_curve25519xchacha20poly1305_seal_open(unsigned char *m, + const unsigned char *c, + unsigned long long clen, + const unsigned char *pk, + const unsigned char *sk) + __attribute__ ((warn_unused_result)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_box_curve25519xsalsa20poly1305.h b/c/include/sodium/crypto_box_curve25519xsalsa20poly1305.h new file mode 100644 index 0000000..c5b15f4 --- /dev/null +++ b/c/include/sodium/crypto_box_curve25519xsalsa20poly1305.h @@ -0,0 +1,109 @@ +#ifndef crypto_box_curve25519xsalsa20poly1305_H +#define crypto_box_curve25519xsalsa20poly1305_H + +#include +#include "crypto_stream_xsalsa20.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_box_curve25519xsalsa20poly1305_SEEDBYTES 32U +SODIUM_EXPORT +size_t crypto_box_curve25519xsalsa20poly1305_seedbytes(void); + +#define crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES 32U +SODIUM_EXPORT +size_t crypto_box_curve25519xsalsa20poly1305_publickeybytes(void); + +#define crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES 32U +SODIUM_EXPORT +size_t crypto_box_curve25519xsalsa20poly1305_secretkeybytes(void); + +#define crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES 32U +SODIUM_EXPORT +size_t crypto_box_curve25519xsalsa20poly1305_beforenmbytes(void); + +#define crypto_box_curve25519xsalsa20poly1305_NONCEBYTES 24U +SODIUM_EXPORT +size_t crypto_box_curve25519xsalsa20poly1305_noncebytes(void); + +#define crypto_box_curve25519xsalsa20poly1305_MACBYTES 16U +SODIUM_EXPORT +size_t crypto_box_curve25519xsalsa20poly1305_macbytes(void); + +/* Only for the libsodium API - The NaCl compatibility API would require BOXZEROBYTES extra bytes */ +#define crypto_box_curve25519xsalsa20poly1305_MESSAGEBYTES_MAX \ + (crypto_stream_xsalsa20_MESSAGEBYTES_MAX - crypto_box_curve25519xsalsa20poly1305_MACBYTES) +SODIUM_EXPORT +size_t crypto_box_curve25519xsalsa20poly1305_messagebytes_max(void); + +SODIUM_EXPORT +int crypto_box_curve25519xsalsa20poly1305_seed_keypair(unsigned char *pk, + unsigned char *sk, + const unsigned char *seed); + +SODIUM_EXPORT +int crypto_box_curve25519xsalsa20poly1305_keypair(unsigned char *pk, + unsigned char *sk); + +SODIUM_EXPORT +int crypto_box_curve25519xsalsa20poly1305_beforenm(unsigned char *k, + const unsigned char *pk, + const unsigned char *sk) + __attribute__ ((warn_unused_result)); + +/* -- NaCl compatibility interface ; Requires padding -- */ + +#define crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES 16U +SODIUM_EXPORT +size_t crypto_box_curve25519xsalsa20poly1305_boxzerobytes(void); + +#define crypto_box_curve25519xsalsa20poly1305_ZEROBYTES \ + (crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES + \ + crypto_box_curve25519xsalsa20poly1305_MACBYTES) +SODIUM_EXPORT +size_t crypto_box_curve25519xsalsa20poly1305_zerobytes(void); + +SODIUM_EXPORT +int crypto_box_curve25519xsalsa20poly1305(unsigned char *c, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *n, + const unsigned char *pk, + const unsigned char *sk) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_box_curve25519xsalsa20poly1305_open(unsigned char *m, + const unsigned char *c, + unsigned long long clen, + const unsigned char *n, + const unsigned char *pk, + const unsigned char *sk) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_box_curve25519xsalsa20poly1305_afternm(unsigned char *c, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *n, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_box_curve25519xsalsa20poly1305_open_afternm(unsigned char *m, + const unsigned char *c, + unsigned long long clen, + const unsigned char *n, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_core_ed25519.h b/c/include/sodium/crypto_core_ed25519.h new file mode 100644 index 0000000..1536294 --- /dev/null +++ b/c/include/sodium/crypto_core_ed25519.h @@ -0,0 +1,37 @@ +#ifndef crypto_core_ed25519_H +#define crypto_core_ed25519_H + +#include +#include "export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define crypto_core_ed25519_BYTES 32 +SODIUM_EXPORT +size_t crypto_core_ed25519_bytes(void); + +#define crypto_core_ed25519_UNIFORMBYTES 32 +SODIUM_EXPORT +size_t crypto_core_ed25519_uniformbytes(void); + +SODIUM_EXPORT +int crypto_core_ed25519_is_valid_point(const unsigned char *p); + +SODIUM_EXPORT +int crypto_core_ed25519_add(unsigned char *r, + const unsigned char *p, const unsigned char *q); + +SODIUM_EXPORT +int crypto_core_ed25519_sub(unsigned char *r, + const unsigned char *p, const unsigned char *q); + +SODIUM_EXPORT +int crypto_core_ed25519_from_uniform(unsigned char *p, const unsigned char *r); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_core_hchacha20.h b/c/include/sodium/crypto_core_hchacha20.h new file mode 100644 index 0000000..05e5670 --- /dev/null +++ b/c/include/sodium/crypto_core_hchacha20.h @@ -0,0 +1,35 @@ +#ifndef crypto_core_hchacha20_H +#define crypto_core_hchacha20_H + +#include +#include "export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define crypto_core_hchacha20_OUTPUTBYTES 32U +SODIUM_EXPORT +size_t crypto_core_hchacha20_outputbytes(void); + +#define crypto_core_hchacha20_INPUTBYTES 16U +SODIUM_EXPORT +size_t crypto_core_hchacha20_inputbytes(void); + +#define crypto_core_hchacha20_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_core_hchacha20_keybytes(void); + +#define crypto_core_hchacha20_CONSTBYTES 16U +SODIUM_EXPORT +size_t crypto_core_hchacha20_constbytes(void); + +SODIUM_EXPORT +int crypto_core_hchacha20(unsigned char *out, const unsigned char *in, + const unsigned char *k, const unsigned char *c); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_core_hsalsa20.h b/c/include/sodium/crypto_core_hsalsa20.h new file mode 100644 index 0000000..82e475b --- /dev/null +++ b/c/include/sodium/crypto_core_hsalsa20.h @@ -0,0 +1,35 @@ +#ifndef crypto_core_hsalsa20_H +#define crypto_core_hsalsa20_H + +#include +#include "export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define crypto_core_hsalsa20_OUTPUTBYTES 32U +SODIUM_EXPORT +size_t crypto_core_hsalsa20_outputbytes(void); + +#define crypto_core_hsalsa20_INPUTBYTES 16U +SODIUM_EXPORT +size_t crypto_core_hsalsa20_inputbytes(void); + +#define crypto_core_hsalsa20_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_core_hsalsa20_keybytes(void); + +#define crypto_core_hsalsa20_CONSTBYTES 16U +SODIUM_EXPORT +size_t crypto_core_hsalsa20_constbytes(void); + +SODIUM_EXPORT +int crypto_core_hsalsa20(unsigned char *out, const unsigned char *in, + const unsigned char *k, const unsigned char *c); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_core_salsa20.h b/c/include/sodium/crypto_core_salsa20.h new file mode 100644 index 0000000..160cc56 --- /dev/null +++ b/c/include/sodium/crypto_core_salsa20.h @@ -0,0 +1,35 @@ +#ifndef crypto_core_salsa20_H +#define crypto_core_salsa20_H + +#include +#include "export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define crypto_core_salsa20_OUTPUTBYTES 64U +SODIUM_EXPORT +size_t crypto_core_salsa20_outputbytes(void); + +#define crypto_core_salsa20_INPUTBYTES 16U +SODIUM_EXPORT +size_t crypto_core_salsa20_inputbytes(void); + +#define crypto_core_salsa20_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_core_salsa20_keybytes(void); + +#define crypto_core_salsa20_CONSTBYTES 16U +SODIUM_EXPORT +size_t crypto_core_salsa20_constbytes(void); + +SODIUM_EXPORT +int crypto_core_salsa20(unsigned char *out, const unsigned char *in, + const unsigned char *k, const unsigned char *c); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_core_salsa2012.h b/c/include/sodium/crypto_core_salsa2012.h new file mode 100644 index 0000000..bdd5f9f --- /dev/null +++ b/c/include/sodium/crypto_core_salsa2012.h @@ -0,0 +1,35 @@ +#ifndef crypto_core_salsa2012_H +#define crypto_core_salsa2012_H + +#include +#include "export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define crypto_core_salsa2012_OUTPUTBYTES 64U +SODIUM_EXPORT +size_t crypto_core_salsa2012_outputbytes(void); + +#define crypto_core_salsa2012_INPUTBYTES 16U +SODIUM_EXPORT +size_t crypto_core_salsa2012_inputbytes(void); + +#define crypto_core_salsa2012_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_core_salsa2012_keybytes(void); + +#define crypto_core_salsa2012_CONSTBYTES 16U +SODIUM_EXPORT +size_t crypto_core_salsa2012_constbytes(void); + +SODIUM_EXPORT +int crypto_core_salsa2012(unsigned char *out, const unsigned char *in, + const unsigned char *k, const unsigned char *c); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_core_salsa208.h b/c/include/sodium/crypto_core_salsa208.h new file mode 100644 index 0000000..876bda8 --- /dev/null +++ b/c/include/sodium/crypto_core_salsa208.h @@ -0,0 +1,39 @@ +#ifndef crypto_core_salsa208_H +#define crypto_core_salsa208_H + +#include +#include "export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define crypto_core_salsa208_OUTPUTBYTES 64U +SODIUM_EXPORT +size_t crypto_core_salsa208_outputbytes(void) + __attribute__ ((deprecated)); + +#define crypto_core_salsa208_INPUTBYTES 16U +SODIUM_EXPORT +size_t crypto_core_salsa208_inputbytes(void) + __attribute__ ((deprecated)); + +#define crypto_core_salsa208_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_core_salsa208_keybytes(void) + __attribute__ ((deprecated)); + +#define crypto_core_salsa208_CONSTBYTES 16U +SODIUM_EXPORT +size_t crypto_core_salsa208_constbytes(void) + __attribute__ ((deprecated)); + +SODIUM_EXPORT +int crypto_core_salsa208(unsigned char *out, const unsigned char *in, + const unsigned char *k, const unsigned char *c); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_generichash.h b/c/include/sodium/crypto_generichash.h new file mode 100644 index 0000000..2398fb9 --- /dev/null +++ b/c/include/sodium/crypto_generichash.h @@ -0,0 +1,75 @@ +#ifndef crypto_generichash_H +#define crypto_generichash_H + +#include + +#include "crypto_generichash_blake2b.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_generichash_BYTES_MIN crypto_generichash_blake2b_BYTES_MIN +SODIUM_EXPORT +size_t crypto_generichash_bytes_min(void); + +#define crypto_generichash_BYTES_MAX crypto_generichash_blake2b_BYTES_MAX +SODIUM_EXPORT +size_t crypto_generichash_bytes_max(void); + +#define crypto_generichash_BYTES crypto_generichash_blake2b_BYTES +SODIUM_EXPORT +size_t crypto_generichash_bytes(void); + +#define crypto_generichash_KEYBYTES_MIN crypto_generichash_blake2b_KEYBYTES_MIN +SODIUM_EXPORT +size_t crypto_generichash_keybytes_min(void); + +#define crypto_generichash_KEYBYTES_MAX crypto_generichash_blake2b_KEYBYTES_MAX +SODIUM_EXPORT +size_t crypto_generichash_keybytes_max(void); + +#define crypto_generichash_KEYBYTES crypto_generichash_blake2b_KEYBYTES +SODIUM_EXPORT +size_t crypto_generichash_keybytes(void); + +#define crypto_generichash_PRIMITIVE "blake2b" +SODIUM_EXPORT +const char *crypto_generichash_primitive(void); + +typedef crypto_generichash_blake2b_state crypto_generichash_state; + +SODIUM_EXPORT +size_t crypto_generichash_statebytes(void); + +SODIUM_EXPORT +int crypto_generichash(unsigned char *out, size_t outlen, + const unsigned char *in, unsigned long long inlen, + const unsigned char *key, size_t keylen); + +SODIUM_EXPORT +int crypto_generichash_init(crypto_generichash_state *state, + const unsigned char *key, + const size_t keylen, const size_t outlen); + +SODIUM_EXPORT +int crypto_generichash_update(crypto_generichash_state *state, + const unsigned char *in, + unsigned long long inlen); + +SODIUM_EXPORT +int crypto_generichash_final(crypto_generichash_state *state, + unsigned char *out, const size_t outlen); + +SODIUM_EXPORT +void crypto_generichash_keygen(unsigned char k[crypto_generichash_KEYBYTES]); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_generichash_blake2b.h b/c/include/sodium/crypto_generichash_blake2b.h new file mode 100644 index 0000000..9326a04 --- /dev/null +++ b/c/include/sodium/crypto_generichash_blake2b.h @@ -0,0 +1,117 @@ +#ifndef crypto_generichash_blake2b_H +#define crypto_generichash_blake2b_H + +#include +#include +#include + +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#if defined(__IBMC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) +# pragma pack(1) +#else +# pragma pack(push, 1) +#endif + +typedef struct CRYPTO_ALIGN(64) crypto_generichash_blake2b_state { + uint64_t h[8]; + uint64_t t[2]; + uint64_t f[2]; + uint8_t buf[2 * 128]; + size_t buflen; + uint8_t last_node; +} crypto_generichash_blake2b_state; + +#if defined(__IBMC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) +# pragma pack() +#else +# pragma pack(pop) +#endif + +#define crypto_generichash_blake2b_BYTES_MIN 16U +SODIUM_EXPORT +size_t crypto_generichash_blake2b_bytes_min(void); + +#define crypto_generichash_blake2b_BYTES_MAX 64U +SODIUM_EXPORT +size_t crypto_generichash_blake2b_bytes_max(void); + +#define crypto_generichash_blake2b_BYTES 32U +SODIUM_EXPORT +size_t crypto_generichash_blake2b_bytes(void); + +#define crypto_generichash_blake2b_KEYBYTES_MIN 16U +SODIUM_EXPORT +size_t crypto_generichash_blake2b_keybytes_min(void); + +#define crypto_generichash_blake2b_KEYBYTES_MAX 64U +SODIUM_EXPORT +size_t crypto_generichash_blake2b_keybytes_max(void); + +#define crypto_generichash_blake2b_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_generichash_blake2b_keybytes(void); + +#define crypto_generichash_blake2b_SALTBYTES 16U +SODIUM_EXPORT +size_t crypto_generichash_blake2b_saltbytes(void); + +#define crypto_generichash_blake2b_PERSONALBYTES 16U +SODIUM_EXPORT +size_t crypto_generichash_blake2b_personalbytes(void); + +SODIUM_EXPORT +size_t crypto_generichash_blake2b_statebytes(void); + +SODIUM_EXPORT +int crypto_generichash_blake2b(unsigned char *out, size_t outlen, + const unsigned char *in, + unsigned long long inlen, + const unsigned char *key, size_t keylen); + +SODIUM_EXPORT +int crypto_generichash_blake2b_salt_personal(unsigned char *out, size_t outlen, + const unsigned char *in, + unsigned long long inlen, + const unsigned char *key, + size_t keylen, + const unsigned char *salt, + const unsigned char *personal); + +SODIUM_EXPORT +int crypto_generichash_blake2b_init(crypto_generichash_blake2b_state *state, + const unsigned char *key, + const size_t keylen, const size_t outlen); + +SODIUM_EXPORT +int crypto_generichash_blake2b_init_salt_personal(crypto_generichash_blake2b_state *state, + const unsigned char *key, + const size_t keylen, const size_t outlen, + const unsigned char *salt, + const unsigned char *personal); + +SODIUM_EXPORT +int crypto_generichash_blake2b_update(crypto_generichash_blake2b_state *state, + const unsigned char *in, + unsigned long long inlen); + +SODIUM_EXPORT +int crypto_generichash_blake2b_final(crypto_generichash_blake2b_state *state, + unsigned char *out, + const size_t outlen); + +SODIUM_EXPORT +void crypto_generichash_blake2b_keygen(unsigned char k[crypto_generichash_blake2b_KEYBYTES]); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_hash.h b/c/include/sodium/crypto_hash.h new file mode 100644 index 0000000..302ed5c --- /dev/null +++ b/c/include/sodium/crypto_hash.h @@ -0,0 +1,40 @@ +#ifndef crypto_hash_H +#define crypto_hash_H + +/* + * WARNING: Unless you absolutely need to use SHA512 for interoperatibility, + * purposes, you might want to consider crypto_generichash() instead. + * Unlike SHA512, crypto_generichash() is not vulnerable to length + * extension attacks. + */ + +#include + +#include "crypto_hash_sha512.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_hash_BYTES crypto_hash_sha512_BYTES +SODIUM_EXPORT +size_t crypto_hash_bytes(void); + +SODIUM_EXPORT +int crypto_hash(unsigned char *out, const unsigned char *in, + unsigned long long inlen); + +#define crypto_hash_PRIMITIVE "sha512" +SODIUM_EXPORT +const char *crypto_hash_primitive(void) + __attribute__ ((warn_unused_result)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_hash_sha256.h b/c/include/sodium/crypto_hash_sha256.h new file mode 100644 index 0000000..f64d16e --- /dev/null +++ b/c/include/sodium/crypto_hash_sha256.h @@ -0,0 +1,57 @@ +#ifndef crypto_hash_sha256_H +#define crypto_hash_sha256_H + +/* + * WARNING: Unless you absolutely need to use SHA256 for interoperatibility, + * purposes, you might want to consider crypto_generichash() instead. + * Unlike SHA256, crypto_generichash() is not vulnerable to length + * extension attacks. + */ + +#include +#include +#include + +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +typedef struct crypto_hash_sha256_state { + uint32_t state[8]; + uint64_t count; + uint8_t buf[64]; +} crypto_hash_sha256_state; + +SODIUM_EXPORT +size_t crypto_hash_sha256_statebytes(void); + +#define crypto_hash_sha256_BYTES 32U +SODIUM_EXPORT +size_t crypto_hash_sha256_bytes(void); + +SODIUM_EXPORT +int crypto_hash_sha256(unsigned char *out, const unsigned char *in, + unsigned long long inlen); + +SODIUM_EXPORT +int crypto_hash_sha256_init(crypto_hash_sha256_state *state); + +SODIUM_EXPORT +int crypto_hash_sha256_update(crypto_hash_sha256_state *state, + const unsigned char *in, + unsigned long long inlen); + +SODIUM_EXPORT +int crypto_hash_sha256_final(crypto_hash_sha256_state *state, + unsigned char *out); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_hash_sha512.h b/c/include/sodium/crypto_hash_sha512.h new file mode 100644 index 0000000..6b0330f --- /dev/null +++ b/c/include/sodium/crypto_hash_sha512.h @@ -0,0 +1,57 @@ +#ifndef crypto_hash_sha512_H +#define crypto_hash_sha512_H + +/* + * WARNING: Unless you absolutely need to use SHA512 for interoperatibility, + * purposes, you might want to consider crypto_generichash() instead. + * Unlike SHA512, crypto_generichash() is not vulnerable to length + * extension attacks. + */ + +#include +#include +#include + +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +typedef struct crypto_hash_sha512_state { + uint64_t state[8]; + uint64_t count[2]; + uint8_t buf[128]; +} crypto_hash_sha512_state; + +SODIUM_EXPORT +size_t crypto_hash_sha512_statebytes(void); + +#define crypto_hash_sha512_BYTES 64U +SODIUM_EXPORT +size_t crypto_hash_sha512_bytes(void); + +SODIUM_EXPORT +int crypto_hash_sha512(unsigned char *out, const unsigned char *in, + unsigned long long inlen); + +SODIUM_EXPORT +int crypto_hash_sha512_init(crypto_hash_sha512_state *state); + +SODIUM_EXPORT +int crypto_hash_sha512_update(crypto_hash_sha512_state *state, + const unsigned char *in, + unsigned long long inlen); + +SODIUM_EXPORT +int crypto_hash_sha512_final(crypto_hash_sha512_state *state, + unsigned char *out); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_kdf.h b/c/include/sodium/crypto_kdf.h new file mode 100644 index 0000000..52e496a --- /dev/null +++ b/c/include/sodium/crypto_kdf.h @@ -0,0 +1,51 @@ +#ifndef crypto_kdf_H +#define crypto_kdf_H + +#include +#include + +#include "crypto_kdf_blake2b.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_kdf_BYTES_MIN crypto_kdf_blake2b_BYTES_MIN +SODIUM_EXPORT +size_t crypto_kdf_bytes_min(void); + +#define crypto_kdf_BYTES_MAX crypto_kdf_blake2b_BYTES_MAX +SODIUM_EXPORT +size_t crypto_kdf_bytes_max(void); + +#define crypto_kdf_CONTEXTBYTES crypto_kdf_blake2b_CONTEXTBYTES +SODIUM_EXPORT +size_t crypto_kdf_contextbytes(void); + +#define crypto_kdf_KEYBYTES crypto_kdf_blake2b_KEYBYTES +SODIUM_EXPORT +size_t crypto_kdf_keybytes(void); + +#define crypto_kdf_PRIMITIVE "blake2b" +SODIUM_EXPORT +const char *crypto_kdf_primitive(void) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_kdf_derive_from_key(unsigned char *subkey, size_t subkey_len, + uint64_t subkey_id, + const char ctx[crypto_kdf_CONTEXTBYTES], + const unsigned char key[crypto_kdf_KEYBYTES]); + +SODIUM_EXPORT +void crypto_kdf_keygen(unsigned char k[crypto_kdf_KEYBYTES]); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_kdf_blake2b.h b/c/include/sodium/crypto_kdf_blake2b.h new file mode 100644 index 0000000..5480ebe --- /dev/null +++ b/c/include/sodium/crypto_kdf_blake2b.h @@ -0,0 +1,42 @@ +#ifndef crypto_kdf_blake2b_H +#define crypto_kdf_blake2b_H + +#include +#include + +#include "crypto_kdf_blake2b.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_kdf_blake2b_BYTES_MIN 16 +SODIUM_EXPORT +size_t crypto_kdf_blake2b_bytes_min(void); + +#define crypto_kdf_blake2b_BYTES_MAX 64 +SODIUM_EXPORT +size_t crypto_kdf_blake2b_bytes_max(void); + +#define crypto_kdf_blake2b_CONTEXTBYTES 8 +SODIUM_EXPORT +size_t crypto_kdf_blake2b_contextbytes(void); + +#define crypto_kdf_blake2b_KEYBYTES 32 +SODIUM_EXPORT +size_t crypto_kdf_blake2b_keybytes(void); + +SODIUM_EXPORT +int crypto_kdf_blake2b_derive_from_key(unsigned char *subkey, size_t subkey_len, + uint64_t subkey_id, + const char ctx[crypto_kdf_blake2b_CONTEXTBYTES], + const unsigned char key[crypto_kdf_blake2b_KEYBYTES]); +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_kx.h b/c/include/sodium/crypto_kx.h new file mode 100644 index 0000000..d1fce90 --- /dev/null +++ b/c/include/sodium/crypto_kx.h @@ -0,0 +1,64 @@ +#ifndef crypto_kx_H +#define crypto_kx_H + +#include + +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_kx_PUBLICKEYBYTES 32 +SODIUM_EXPORT +size_t crypto_kx_publickeybytes(void); + +#define crypto_kx_SECRETKEYBYTES 32 +SODIUM_EXPORT +size_t crypto_kx_secretkeybytes(void); + +#define crypto_kx_SEEDBYTES 32 +SODIUM_EXPORT +size_t crypto_kx_seedbytes(void); + +#define crypto_kx_SESSIONKEYBYTES 32 +SODIUM_EXPORT +size_t crypto_kx_sessionkeybytes(void); + +#define crypto_kx_PRIMITIVE "x25519blake2b" +SODIUM_EXPORT +const char *crypto_kx_primitive(void); + +SODIUM_EXPORT +int crypto_kx_seed_keypair(unsigned char pk[crypto_kx_PUBLICKEYBYTES], + unsigned char sk[crypto_kx_SECRETKEYBYTES], + const unsigned char seed[crypto_kx_SEEDBYTES]); + +SODIUM_EXPORT +int crypto_kx_keypair(unsigned char pk[crypto_kx_PUBLICKEYBYTES], + unsigned char sk[crypto_kx_SECRETKEYBYTES]); + +SODIUM_EXPORT +int crypto_kx_client_session_keys(unsigned char rx[crypto_kx_SESSIONKEYBYTES], + unsigned char tx[crypto_kx_SESSIONKEYBYTES], + const unsigned char client_pk[crypto_kx_PUBLICKEYBYTES], + const unsigned char client_sk[crypto_kx_SECRETKEYBYTES], + const unsigned char server_pk[crypto_kx_PUBLICKEYBYTES]) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_kx_server_session_keys(unsigned char rx[crypto_kx_SESSIONKEYBYTES], + unsigned char tx[crypto_kx_SESSIONKEYBYTES], + const unsigned char server_pk[crypto_kx_PUBLICKEYBYTES], + const unsigned char server_sk[crypto_kx_SECRETKEYBYTES], + const unsigned char client_pk[crypto_kx_PUBLICKEYBYTES]) + __attribute__ ((warn_unused_result)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_onetimeauth.h b/c/include/sodium/crypto_onetimeauth.h new file mode 100644 index 0000000..5951c5b --- /dev/null +++ b/c/include/sodium/crypto_onetimeauth.h @@ -0,0 +1,62 @@ +#ifndef crypto_onetimeauth_H +#define crypto_onetimeauth_H + +#include + +#include "crypto_onetimeauth_poly1305.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +typedef crypto_onetimeauth_poly1305_state crypto_onetimeauth_state; + +SODIUM_EXPORT +size_t crypto_onetimeauth_statebytes(void); + +#define crypto_onetimeauth_BYTES crypto_onetimeauth_poly1305_BYTES +SODIUM_EXPORT +size_t crypto_onetimeauth_bytes(void); + +#define crypto_onetimeauth_KEYBYTES crypto_onetimeauth_poly1305_KEYBYTES +SODIUM_EXPORT +size_t crypto_onetimeauth_keybytes(void); + +#define crypto_onetimeauth_PRIMITIVE "poly1305" +SODIUM_EXPORT +const char *crypto_onetimeauth_primitive(void); + +SODIUM_EXPORT +int crypto_onetimeauth(unsigned char *out, const unsigned char *in, + unsigned long long inlen, const unsigned char *k); + +SODIUM_EXPORT +int crypto_onetimeauth_verify(const unsigned char *h, const unsigned char *in, + unsigned long long inlen, const unsigned char *k) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_onetimeauth_init(crypto_onetimeauth_state *state, + const unsigned char *key); + +SODIUM_EXPORT +int crypto_onetimeauth_update(crypto_onetimeauth_state *state, + const unsigned char *in, + unsigned long long inlen); + +SODIUM_EXPORT +int crypto_onetimeauth_final(crypto_onetimeauth_state *state, + unsigned char *out); + +SODIUM_EXPORT +void crypto_onetimeauth_keygen(unsigned char k[crypto_onetimeauth_KEYBYTES]); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_onetimeauth_poly1305.h b/c/include/sodium/crypto_onetimeauth_poly1305.h new file mode 100644 index 0000000..4b89c4f --- /dev/null +++ b/c/include/sodium/crypto_onetimeauth_poly1305.h @@ -0,0 +1,67 @@ +#ifndef crypto_onetimeauth_poly1305_H +#define crypto_onetimeauth_poly1305_H + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#include +#include +#include + +#include + +#include "export.h" + +typedef struct CRYPTO_ALIGN(16) crypto_onetimeauth_poly1305_state { + unsigned char opaque[256]; +} crypto_onetimeauth_poly1305_state; + +SODIUM_EXPORT +size_t crypto_onetimeauth_poly1305_statebytes(void); + +#define crypto_onetimeauth_poly1305_BYTES 16U +SODIUM_EXPORT +size_t crypto_onetimeauth_poly1305_bytes(void); + +#define crypto_onetimeauth_poly1305_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_onetimeauth_poly1305_keybytes(void); + +SODIUM_EXPORT +int crypto_onetimeauth_poly1305(unsigned char *out, + const unsigned char *in, + unsigned long long inlen, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_onetimeauth_poly1305_verify(const unsigned char *h, + const unsigned char *in, + unsigned long long inlen, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_onetimeauth_poly1305_init(crypto_onetimeauth_poly1305_state *state, + const unsigned char *key); + +SODIUM_EXPORT +int crypto_onetimeauth_poly1305_update(crypto_onetimeauth_poly1305_state *state, + const unsigned char *in, + unsigned long long inlen); + +SODIUM_EXPORT +int crypto_onetimeauth_poly1305_final(crypto_onetimeauth_poly1305_state *state, + unsigned char *out); + +SODIUM_EXPORT +void crypto_onetimeauth_poly1305_keygen(unsigned char k[crypto_onetimeauth_poly1305_KEYBYTES]); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_pwhash.h b/c/include/sodium/crypto_pwhash.h new file mode 100644 index 0000000..2c76461 --- /dev/null +++ b/c/include/sodium/crypto_pwhash.h @@ -0,0 +1,147 @@ +#ifndef crypto_pwhash_H +#define crypto_pwhash_H + +#include + +#include "crypto_pwhash_argon2i.h" +#include "crypto_pwhash_argon2id.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_pwhash_ALG_ARGON2I13 crypto_pwhash_argon2i_ALG_ARGON2I13 +SODIUM_EXPORT +int crypto_pwhash_alg_argon2i13(void); + +#define crypto_pwhash_ALG_ARGON2ID13 crypto_pwhash_argon2id_ALG_ARGON2ID13 +SODIUM_EXPORT +int crypto_pwhash_alg_argon2id13(void); + +#define crypto_pwhash_ALG_DEFAULT crypto_pwhash_ALG_ARGON2ID13 +SODIUM_EXPORT +int crypto_pwhash_alg_default(void); + +#define crypto_pwhash_BYTES_MIN crypto_pwhash_argon2id_BYTES_MIN +SODIUM_EXPORT +size_t crypto_pwhash_bytes_min(void); + +#define crypto_pwhash_BYTES_MAX crypto_pwhash_argon2id_BYTES_MAX +SODIUM_EXPORT +size_t crypto_pwhash_bytes_max(void); + +#define crypto_pwhash_PASSWD_MIN crypto_pwhash_argon2id_PASSWD_MIN +SODIUM_EXPORT +size_t crypto_pwhash_passwd_min(void); + +#define crypto_pwhash_PASSWD_MAX crypto_pwhash_argon2id_PASSWD_MAX +SODIUM_EXPORT +size_t crypto_pwhash_passwd_max(void); + +#define crypto_pwhash_SALTBYTES crypto_pwhash_argon2id_SALTBYTES +SODIUM_EXPORT +size_t crypto_pwhash_saltbytes(void); + +#define crypto_pwhash_STRBYTES crypto_pwhash_argon2id_STRBYTES +SODIUM_EXPORT +size_t crypto_pwhash_strbytes(void); + +#define crypto_pwhash_STRPREFIX crypto_pwhash_argon2id_STRPREFIX +SODIUM_EXPORT +const char *crypto_pwhash_strprefix(void); + +#define crypto_pwhash_OPSLIMIT_MIN crypto_pwhash_argon2id_OPSLIMIT_MIN +SODIUM_EXPORT +size_t crypto_pwhash_opslimit_min(void); + +#define crypto_pwhash_OPSLIMIT_MAX crypto_pwhash_argon2id_OPSLIMIT_MAX +SODIUM_EXPORT +size_t crypto_pwhash_opslimit_max(void); + +#define crypto_pwhash_MEMLIMIT_MIN crypto_pwhash_argon2id_MEMLIMIT_MIN +SODIUM_EXPORT +size_t crypto_pwhash_memlimit_min(void); + +#define crypto_pwhash_MEMLIMIT_MAX crypto_pwhash_argon2id_MEMLIMIT_MAX +SODIUM_EXPORT +size_t crypto_pwhash_memlimit_max(void); + +#define crypto_pwhash_OPSLIMIT_INTERACTIVE crypto_pwhash_argon2id_OPSLIMIT_INTERACTIVE +SODIUM_EXPORT +size_t crypto_pwhash_opslimit_interactive(void); + +#define crypto_pwhash_MEMLIMIT_INTERACTIVE crypto_pwhash_argon2id_MEMLIMIT_INTERACTIVE +SODIUM_EXPORT +size_t crypto_pwhash_memlimit_interactive(void); + +#define crypto_pwhash_OPSLIMIT_MODERATE crypto_pwhash_argon2id_OPSLIMIT_MODERATE +SODIUM_EXPORT +size_t crypto_pwhash_opslimit_moderate(void); + +#define crypto_pwhash_MEMLIMIT_MODERATE crypto_pwhash_argon2id_MEMLIMIT_MODERATE +SODIUM_EXPORT +size_t crypto_pwhash_memlimit_moderate(void); + +#define crypto_pwhash_OPSLIMIT_SENSITIVE crypto_pwhash_argon2id_OPSLIMIT_SENSITIVE +SODIUM_EXPORT +size_t crypto_pwhash_opslimit_sensitive(void); + +#define crypto_pwhash_MEMLIMIT_SENSITIVE crypto_pwhash_argon2id_MEMLIMIT_SENSITIVE +SODIUM_EXPORT +size_t crypto_pwhash_memlimit_sensitive(void); + +/* + * With this function, do not forget to store all parameters, including the + * algorithm identifier in order to produce deterministic output. + * The crypto_pwhash_* definitions, including crypto_pwhash_ALG_DEFAULT, + * may change. + */ +SODIUM_EXPORT +int crypto_pwhash(unsigned char * const out, unsigned long long outlen, + const char * const passwd, unsigned long long passwdlen, + const unsigned char * const salt, + unsigned long long opslimit, size_t memlimit, int alg) + __attribute__ ((warn_unused_result)); + +/* + * The output string already includes all the required parameters, including + * the algorithm identifier. The string is all that has to be stored in + * order to verify a password. + */ +SODIUM_EXPORT +int crypto_pwhash_str(char out[crypto_pwhash_STRBYTES], + const char * const passwd, unsigned long long passwdlen, + unsigned long long opslimit, size_t memlimit) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_pwhash_str_alg(char out[crypto_pwhash_STRBYTES], + const char * const passwd, unsigned long long passwdlen, + unsigned long long opslimit, size_t memlimit, int alg) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_pwhash_str_verify(const char str[crypto_pwhash_STRBYTES], + const char * const passwd, + unsigned long long passwdlen) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_pwhash_str_needs_rehash(const char str[crypto_pwhash_STRBYTES], + unsigned long long opslimit, size_t memlimit) + __attribute__ ((warn_unused_result)); + +#define crypto_pwhash_PRIMITIVE "argon2i" +SODIUM_EXPORT +const char *crypto_pwhash_primitive(void) + __attribute__ ((warn_unused_result)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_pwhash_argon2i.h b/c/include/sodium/crypto_pwhash_argon2i.h new file mode 100644 index 0000000..8e4c1c3 --- /dev/null +++ b/c/include/sodium/crypto_pwhash_argon2i.h @@ -0,0 +1,122 @@ +#ifndef crypto_pwhash_argon2i_H +#define crypto_pwhash_argon2i_H + +#include +#include +#include + +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_pwhash_argon2i_ALG_ARGON2I13 1 +SODIUM_EXPORT +int crypto_pwhash_argon2i_alg_argon2i13(void); + +#define crypto_pwhash_argon2i_BYTES_MIN 16U +SODIUM_EXPORT +size_t crypto_pwhash_argon2i_bytes_min(void); + +#define crypto_pwhash_argon2i_BYTES_MAX SODIUM_MIN(SODIUM_SIZE_MAX, 4294967295U) +SODIUM_EXPORT +size_t crypto_pwhash_argon2i_bytes_max(void); + +#define crypto_pwhash_argon2i_PASSWD_MIN 0U +SODIUM_EXPORT +size_t crypto_pwhash_argon2i_passwd_min(void); + +#define crypto_pwhash_argon2i_PASSWD_MAX 4294967295U +SODIUM_EXPORT +size_t crypto_pwhash_argon2i_passwd_max(void); + +#define crypto_pwhash_argon2i_SALTBYTES 16U +SODIUM_EXPORT +size_t crypto_pwhash_argon2i_saltbytes(void); + +#define crypto_pwhash_argon2i_STRBYTES 128U +SODIUM_EXPORT +size_t crypto_pwhash_argon2i_strbytes(void); + +#define crypto_pwhash_argon2i_STRPREFIX "$argon2i$" +SODIUM_EXPORT +const char *crypto_pwhash_argon2i_strprefix(void); + +#define crypto_pwhash_argon2i_OPSLIMIT_MIN 3U +SODIUM_EXPORT +size_t crypto_pwhash_argon2i_opslimit_min(void); + +#define crypto_pwhash_argon2i_OPSLIMIT_MAX 4294967295U +SODIUM_EXPORT +size_t crypto_pwhash_argon2i_opslimit_max(void); + +#define crypto_pwhash_argon2i_MEMLIMIT_MIN 8192U +SODIUM_EXPORT +size_t crypto_pwhash_argon2i_memlimit_min(void); + +#define crypto_pwhash_argon2i_MEMLIMIT_MAX \ + ((SIZE_MAX >= 4398046510080U) ? 4398046510080U : (SIZE_MAX >= 2147483648U) ? 2147483648U : 32768U) +SODIUM_EXPORT +size_t crypto_pwhash_argon2i_memlimit_max(void); + +#define crypto_pwhash_argon2i_OPSLIMIT_INTERACTIVE 4U +SODIUM_EXPORT +size_t crypto_pwhash_argon2i_opslimit_interactive(void); + +#define crypto_pwhash_argon2i_MEMLIMIT_INTERACTIVE 33554432U +SODIUM_EXPORT +size_t crypto_pwhash_argon2i_memlimit_interactive(void); + +#define crypto_pwhash_argon2i_OPSLIMIT_MODERATE 6U +SODIUM_EXPORT +size_t crypto_pwhash_argon2i_opslimit_moderate(void); + +#define crypto_pwhash_argon2i_MEMLIMIT_MODERATE 134217728U +SODIUM_EXPORT +size_t crypto_pwhash_argon2i_memlimit_moderate(void); + +#define crypto_pwhash_argon2i_OPSLIMIT_SENSITIVE 8U +SODIUM_EXPORT +size_t crypto_pwhash_argon2i_opslimit_sensitive(void); + +#define crypto_pwhash_argon2i_MEMLIMIT_SENSITIVE 536870912U +SODIUM_EXPORT +size_t crypto_pwhash_argon2i_memlimit_sensitive(void); + +SODIUM_EXPORT +int crypto_pwhash_argon2i(unsigned char * const out, + unsigned long long outlen, + const char * const passwd, + unsigned long long passwdlen, + const unsigned char * const salt, + unsigned long long opslimit, size_t memlimit, + int alg) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_pwhash_argon2i_str(char out[crypto_pwhash_argon2i_STRBYTES], + const char * const passwd, + unsigned long long passwdlen, + unsigned long long opslimit, size_t memlimit) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_pwhash_argon2i_str_verify(const char str[crypto_pwhash_argon2i_STRBYTES], + const char * const passwd, + unsigned long long passwdlen) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_pwhash_argon2i_str_needs_rehash(const char str[crypto_pwhash_argon2i_STRBYTES], + unsigned long long opslimit, size_t memlimit) + __attribute__ ((warn_unused_result)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_pwhash_argon2id.h b/c/include/sodium/crypto_pwhash_argon2id.h new file mode 100644 index 0000000..51b17aa --- /dev/null +++ b/c/include/sodium/crypto_pwhash_argon2id.h @@ -0,0 +1,122 @@ +#ifndef crypto_pwhash_argon2id_H +#define crypto_pwhash_argon2id_H + +#include +#include +#include + +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_pwhash_argon2id_ALG_ARGON2ID13 2 +SODIUM_EXPORT +int crypto_pwhash_argon2id_alg_argon2id13(void); + +#define crypto_pwhash_argon2id_BYTES_MIN 16U +SODIUM_EXPORT +size_t crypto_pwhash_argon2id_bytes_min(void); + +#define crypto_pwhash_argon2id_BYTES_MAX SODIUM_MIN(SODIUM_SIZE_MAX, 4294967295U) +SODIUM_EXPORT +size_t crypto_pwhash_argon2id_bytes_max(void); + +#define crypto_pwhash_argon2id_PASSWD_MIN 0U +SODIUM_EXPORT +size_t crypto_pwhash_argon2id_passwd_min(void); + +#define crypto_pwhash_argon2id_PASSWD_MAX 4294967295U +SODIUM_EXPORT +size_t crypto_pwhash_argon2id_passwd_max(void); + +#define crypto_pwhash_argon2id_SALTBYTES 16U +SODIUM_EXPORT +size_t crypto_pwhash_argon2id_saltbytes(void); + +#define crypto_pwhash_argon2id_STRBYTES 128U +SODIUM_EXPORT +size_t crypto_pwhash_argon2id_strbytes(void); + +#define crypto_pwhash_argon2id_STRPREFIX "$argon2id$" +SODIUM_EXPORT +const char *crypto_pwhash_argon2id_strprefix(void); + +#define crypto_pwhash_argon2id_OPSLIMIT_MIN 1U +SODIUM_EXPORT +size_t crypto_pwhash_argon2id_opslimit_min(void); + +#define crypto_pwhash_argon2id_OPSLIMIT_MAX 4294967295U +SODIUM_EXPORT +size_t crypto_pwhash_argon2id_opslimit_max(void); + +#define crypto_pwhash_argon2id_MEMLIMIT_MIN 8192U +SODIUM_EXPORT +size_t crypto_pwhash_argon2id_memlimit_min(void); + +#define crypto_pwhash_argon2id_MEMLIMIT_MAX \ + ((SIZE_MAX >= 4398046510080U) ? 4398046510080U : (SIZE_MAX >= 2147483648U) ? 2147483648U : 32768U) +SODIUM_EXPORT +size_t crypto_pwhash_argon2id_memlimit_max(void); + +#define crypto_pwhash_argon2id_OPSLIMIT_INTERACTIVE 2U +SODIUM_EXPORT +size_t crypto_pwhash_argon2id_opslimit_interactive(void); + +#define crypto_pwhash_argon2id_MEMLIMIT_INTERACTIVE 67108864U +SODIUM_EXPORT +size_t crypto_pwhash_argon2id_memlimit_interactive(void); + +#define crypto_pwhash_argon2id_OPSLIMIT_MODERATE 3U +SODIUM_EXPORT +size_t crypto_pwhash_argon2id_opslimit_moderate(void); + +#define crypto_pwhash_argon2id_MEMLIMIT_MODERATE 268435456U +SODIUM_EXPORT +size_t crypto_pwhash_argon2id_memlimit_moderate(void); + +#define crypto_pwhash_argon2id_OPSLIMIT_SENSITIVE 4U +SODIUM_EXPORT +size_t crypto_pwhash_argon2id_opslimit_sensitive(void); + +#define crypto_pwhash_argon2id_MEMLIMIT_SENSITIVE 1073741824U +SODIUM_EXPORT +size_t crypto_pwhash_argon2id_memlimit_sensitive(void); + +SODIUM_EXPORT +int crypto_pwhash_argon2id(unsigned char * const out, + unsigned long long outlen, + const char * const passwd, + unsigned long long passwdlen, + const unsigned char * const salt, + unsigned long long opslimit, size_t memlimit, + int alg) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_pwhash_argon2id_str(char out[crypto_pwhash_argon2id_STRBYTES], + const char * const passwd, + unsigned long long passwdlen, + unsigned long long opslimit, size_t memlimit) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_pwhash_argon2id_str_verify(const char str[crypto_pwhash_argon2id_STRBYTES], + const char * const passwd, + unsigned long long passwdlen) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_pwhash_argon2id_str_needs_rehash(const char str[crypto_pwhash_argon2id_STRBYTES], + unsigned long long opslimit, size_t memlimit) + __attribute__ ((warn_unused_result)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_pwhash_scryptsalsa208sha256.h b/c/include/sodium/crypto_pwhash_scryptsalsa208sha256.h new file mode 100644 index 0000000..951b87b --- /dev/null +++ b/c/include/sodium/crypto_pwhash_scryptsalsa208sha256.h @@ -0,0 +1,120 @@ +#ifndef crypto_pwhash_scryptsalsa208sha256_H +#define crypto_pwhash_scryptsalsa208sha256_H + +#include +#include +#include + +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_pwhash_scryptsalsa208sha256_BYTES_MIN 16U +SODIUM_EXPORT +size_t crypto_pwhash_scryptsalsa208sha256_bytes_min(void); + +#define crypto_pwhash_scryptsalsa208sha256_BYTES_MAX \ + SODIUM_MIN(SODIUM_SIZE_MAX, 0x1fffffffe0ULL) +SODIUM_EXPORT +size_t crypto_pwhash_scryptsalsa208sha256_bytes_max(void); + +#define crypto_pwhash_scryptsalsa208sha256_PASSWD_MIN 0U +SODIUM_EXPORT +size_t crypto_pwhash_scryptsalsa208sha256_passwd_min(void); + +#define crypto_pwhash_scryptsalsa208sha256_PASSWD_MAX SODIUM_SIZE_MAX +SODIUM_EXPORT +size_t crypto_pwhash_scryptsalsa208sha256_passwd_max(void); + +#define crypto_pwhash_scryptsalsa208sha256_SALTBYTES 32U +SODIUM_EXPORT +size_t crypto_pwhash_scryptsalsa208sha256_saltbytes(void); + +#define crypto_pwhash_scryptsalsa208sha256_STRBYTES 102U +SODIUM_EXPORT +size_t crypto_pwhash_scryptsalsa208sha256_strbytes(void); + +#define crypto_pwhash_scryptsalsa208sha256_STRPREFIX "$7$" +SODIUM_EXPORT +const char *crypto_pwhash_scryptsalsa208sha256_strprefix(void); + +#define crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MIN 32768U +SODIUM_EXPORT +size_t crypto_pwhash_scryptsalsa208sha256_opslimit_min(void); + +#define crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MAX 4294967295U +SODIUM_EXPORT +size_t crypto_pwhash_scryptsalsa208sha256_opslimit_max(void); + +#define crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MIN 16777216U +SODIUM_EXPORT +size_t crypto_pwhash_scryptsalsa208sha256_memlimit_min(void); + +#define crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MAX \ + SODIUM_MIN(SIZE_MAX, 68719476736ULL) +SODIUM_EXPORT +size_t crypto_pwhash_scryptsalsa208sha256_memlimit_max(void); + +#define crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE 524288U +SODIUM_EXPORT +size_t crypto_pwhash_scryptsalsa208sha256_opslimit_interactive(void); + +#define crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE 16777216U +SODIUM_EXPORT +size_t crypto_pwhash_scryptsalsa208sha256_memlimit_interactive(void); + +#define crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_SENSITIVE 33554432U +SODIUM_EXPORT +size_t crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive(void); + +#define crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_SENSITIVE 1073741824U +SODIUM_EXPORT +size_t crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive(void); + +SODIUM_EXPORT +int crypto_pwhash_scryptsalsa208sha256(unsigned char * const out, + unsigned long long outlen, + const char * const passwd, + unsigned long long passwdlen, + const unsigned char * const salt, + unsigned long long opslimit, + size_t memlimit) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_pwhash_scryptsalsa208sha256_str(char out[crypto_pwhash_scryptsalsa208sha256_STRBYTES], + const char * const passwd, + unsigned long long passwdlen, + unsigned long long opslimit, + size_t memlimit) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_pwhash_scryptsalsa208sha256_str_verify(const char str[crypto_pwhash_scryptsalsa208sha256_STRBYTES], + const char * const passwd, + unsigned long long passwdlen) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_pwhash_scryptsalsa208sha256_ll(const uint8_t * passwd, size_t passwdlen, + const uint8_t * salt, size_t saltlen, + uint64_t N, uint32_t r, uint32_t p, + uint8_t * buf, size_t buflen) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_pwhash_scryptsalsa208sha256_str_needs_rehash(const char str[crypto_pwhash_scryptsalsa208sha256_STRBYTES], + unsigned long long opslimit, + size_t memlimit) + __attribute__ ((warn_unused_result)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_scalarmult.h b/c/include/sodium/crypto_scalarmult.h new file mode 100644 index 0000000..f7fa6f8 --- /dev/null +++ b/c/include/sodium/crypto_scalarmult.h @@ -0,0 +1,45 @@ +#ifndef crypto_scalarmult_H +#define crypto_scalarmult_H + +#include + +#include "crypto_scalarmult_curve25519.h" +#include "export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define crypto_scalarmult_BYTES crypto_scalarmult_curve25519_BYTES +SODIUM_EXPORT +size_t crypto_scalarmult_bytes(void); + +#define crypto_scalarmult_SCALARBYTES crypto_scalarmult_curve25519_SCALARBYTES +SODIUM_EXPORT +size_t crypto_scalarmult_scalarbytes(void); + +#define crypto_scalarmult_PRIMITIVE "curve25519" +SODIUM_EXPORT +const char *crypto_scalarmult_primitive(void); + +SODIUM_EXPORT +int crypto_scalarmult_base(unsigned char *q, const unsigned char *n); + +/* + * NOTE: Do not use the result of this function directly. + * + * Hash the result with the public keys in order to compute a shared + * secret key: H(q || client_pk || server_pk) + * + * Or unless this is not an option, use the crypto_kx() API instead. + */ +SODIUM_EXPORT +int crypto_scalarmult(unsigned char *q, const unsigned char *n, + const unsigned char *p) + __attribute__ ((warn_unused_result)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_scalarmult_curve25519.h b/c/include/sodium/crypto_scalarmult_curve25519.h new file mode 100644 index 0000000..ae85ead --- /dev/null +++ b/c/include/sodium/crypto_scalarmult_curve25519.h @@ -0,0 +1,40 @@ +#ifndef crypto_scalarmult_curve25519_H +#define crypto_scalarmult_curve25519_H + +#include + +#include "export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define crypto_scalarmult_curve25519_BYTES 32U +SODIUM_EXPORT +size_t crypto_scalarmult_curve25519_bytes(void); + +#define crypto_scalarmult_curve25519_SCALARBYTES 32U +SODIUM_EXPORT +size_t crypto_scalarmult_curve25519_scalarbytes(void); + +/* + * NOTE: Do not use the result of this function directly. + * + * Hash the result with the public keys in order to compute a shared + * secret key: H(q || client_pk || server_pk) + * + * Or unless this is not an option, use the crypto_kx() API instead. + */ +SODIUM_EXPORT +int crypto_scalarmult_curve25519(unsigned char *q, const unsigned char *n, + const unsigned char *p) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_scalarmult_curve25519_base(unsigned char *q, const unsigned char *n); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_scalarmult_ed25519.h b/c/include/sodium/crypto_scalarmult_ed25519.h new file mode 100644 index 0000000..3d51235 --- /dev/null +++ b/c/include/sodium/crypto_scalarmult_ed25519.h @@ -0,0 +1,41 @@ + +#ifndef crypto_scalarmult_ed25519_H +#define crypto_scalarmult_ed25519_H + +#include + +#include "export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define crypto_scalarmult_ed25519_BYTES 32U +SODIUM_EXPORT +size_t crypto_scalarmult_ed25519_bytes(void); + +#define crypto_scalarmult_ed25519_SCALARBYTES 32U +SODIUM_EXPORT +size_t crypto_scalarmult_ed25519_scalarbytes(void); + +/* + * NOTE: Do not use the result of this function directly. + * + * Hash the result with the public keys in order to compute a shared + * secret key: H(q || client_pk || server_pk) + * + * Or unless this is not an option, use the crypto_kx() API instead. + */ +SODIUM_EXPORT +int crypto_scalarmult_ed25519(unsigned char *q, const unsigned char *n, + const unsigned char *p) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_scalarmult_ed25519_base(unsigned char *q, const unsigned char *n); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_secretbox.h b/c/include/sodium/crypto_secretbox.h new file mode 100644 index 0000000..55e94a0 --- /dev/null +++ b/c/include/sodium/crypto_secretbox.h @@ -0,0 +1,91 @@ +#ifndef crypto_secretbox_H +#define crypto_secretbox_H + +#include + +#include "crypto_secretbox_xsalsa20poly1305.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_secretbox_KEYBYTES crypto_secretbox_xsalsa20poly1305_KEYBYTES +SODIUM_EXPORT +size_t crypto_secretbox_keybytes(void); + +#define crypto_secretbox_NONCEBYTES crypto_secretbox_xsalsa20poly1305_NONCEBYTES +SODIUM_EXPORT +size_t crypto_secretbox_noncebytes(void); + +#define crypto_secretbox_MACBYTES crypto_secretbox_xsalsa20poly1305_MACBYTES +SODIUM_EXPORT +size_t crypto_secretbox_macbytes(void); + +#define crypto_secretbox_PRIMITIVE "xsalsa20poly1305" +SODIUM_EXPORT +const char *crypto_secretbox_primitive(void); + +#define crypto_secretbox_MESSAGEBYTES_MAX crypto_secretbox_xsalsa20poly1305_MESSAGEBYTES_MAX +SODIUM_EXPORT +size_t crypto_secretbox_messagebytes_max(void); + +SODIUM_EXPORT +int crypto_secretbox_easy(unsigned char *c, const unsigned char *m, + unsigned long long mlen, const unsigned char *n, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_secretbox_open_easy(unsigned char *m, const unsigned char *c, + unsigned long long clen, const unsigned char *n, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_secretbox_detached(unsigned char *c, unsigned char *mac, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *n, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_secretbox_open_detached(unsigned char *m, + const unsigned char *c, + const unsigned char *mac, + unsigned long long clen, + const unsigned char *n, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +void crypto_secretbox_keygen(unsigned char k[crypto_secretbox_KEYBYTES]); + +/* -- NaCl compatibility interface ; Requires padding -- */ + +#define crypto_secretbox_ZEROBYTES crypto_secretbox_xsalsa20poly1305_ZEROBYTES +SODIUM_EXPORT +size_t crypto_secretbox_zerobytes(void); + +#define crypto_secretbox_BOXZEROBYTES crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES +SODIUM_EXPORT +size_t crypto_secretbox_boxzerobytes(void); + +SODIUM_EXPORT +int crypto_secretbox(unsigned char *c, const unsigned char *m, + unsigned long long mlen, const unsigned char *n, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_secretbox_open(unsigned char *m, const unsigned char *c, + unsigned long long clen, const unsigned char *n, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_secretbox_xchacha20poly1305.h b/c/include/sodium/crypto_secretbox_xchacha20poly1305.h new file mode 100644 index 0000000..2919da1 --- /dev/null +++ b/c/include/sodium/crypto_secretbox_xchacha20poly1305.h @@ -0,0 +1,68 @@ +#ifndef crypto_secretbox_xchacha20poly1305_H +#define crypto_secretbox_xchacha20poly1305_H + +#include +#include "crypto_stream_xchacha20.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_secretbox_xchacha20poly1305_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_secretbox_xchacha20poly1305_keybytes(void); + +#define crypto_secretbox_xchacha20poly1305_NONCEBYTES 24U +SODIUM_EXPORT +size_t crypto_secretbox_xchacha20poly1305_noncebytes(void); + +#define crypto_secretbox_xchacha20poly1305_MACBYTES 16U +SODIUM_EXPORT +size_t crypto_secretbox_xchacha20poly1305_macbytes(void); + +#define crypto_secretbox_xchacha20poly1305_MESSAGEBYTES_MAX \ + (crypto_stream_xchacha20_MESSAGEBYTES_MAX - crypto_secretbox_xchacha20poly1305_MACBYTES) +SODIUM_EXPORT +size_t crypto_secretbox_xchacha20poly1305_messagebytes_max(void); + +SODIUM_EXPORT +int crypto_secretbox_xchacha20poly1305_easy(unsigned char *c, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *n, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_secretbox_xchacha20poly1305_open_easy(unsigned char *m, + const unsigned char *c, + unsigned long long clen, + const unsigned char *n, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_secretbox_xchacha20poly1305_detached(unsigned char *c, + unsigned char *mac, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *n, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_secretbox_xchacha20poly1305_open_detached(unsigned char *m, + const unsigned char *c, + const unsigned char *mac, + unsigned long long clen, + const unsigned char *n, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_secretbox_xsalsa20poly1305.h b/c/include/sodium/crypto_secretbox_xsalsa20poly1305.h new file mode 100644 index 0000000..4b8c7c8 --- /dev/null +++ b/c/include/sodium/crypto_secretbox_xsalsa20poly1305.h @@ -0,0 +1,67 @@ +#ifndef crypto_secretbox_xsalsa20poly1305_H +#define crypto_secretbox_xsalsa20poly1305_H + +#include +#include "crypto_stream_xsalsa20.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_secretbox_xsalsa20poly1305_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_secretbox_xsalsa20poly1305_keybytes(void); + +#define crypto_secretbox_xsalsa20poly1305_NONCEBYTES 24U +SODIUM_EXPORT +size_t crypto_secretbox_xsalsa20poly1305_noncebytes(void); + +#define crypto_secretbox_xsalsa20poly1305_MACBYTES 16U +SODIUM_EXPORT +size_t crypto_secretbox_xsalsa20poly1305_macbytes(void); + +/* Only for the libsodium API - The NaCl compatibility API would require BOXZEROBYTES extra bytes */ +#define crypto_secretbox_xsalsa20poly1305_MESSAGEBYTES_MAX \ + (crypto_stream_xsalsa20_MESSAGEBYTES_MAX - crypto_secretbox_xsalsa20poly1305_MACBYTES) +SODIUM_EXPORT +size_t crypto_secretbox_xsalsa20poly1305_messagebytes_max(void); + +SODIUM_EXPORT +int crypto_secretbox_xsalsa20poly1305(unsigned char *c, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *n, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_secretbox_xsalsa20poly1305_open(unsigned char *m, + const unsigned char *c, + unsigned long long clen, + const unsigned char *n, + const unsigned char *k) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +void crypto_secretbox_xsalsa20poly1305_keygen(unsigned char k[crypto_secretbox_xsalsa20poly1305_KEYBYTES]); + +/* -- NaCl compatibility interface ; Requires padding -- */ + +#define crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES 16U +SODIUM_EXPORT +size_t crypto_secretbox_xsalsa20poly1305_boxzerobytes(void); + +#define crypto_secretbox_xsalsa20poly1305_ZEROBYTES \ + (crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES + \ + crypto_secretbox_xsalsa20poly1305_MACBYTES) +SODIUM_EXPORT +size_t crypto_secretbox_xsalsa20poly1305_zerobytes(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_secretstream_xchacha20poly1305.h b/c/include/sodium/crypto_secretstream_xchacha20poly1305.h new file mode 100644 index 0000000..7d3fa2a --- /dev/null +++ b/c/include/sodium/crypto_secretstream_xchacha20poly1305.h @@ -0,0 +1,102 @@ +#ifndef crypto_secretstream_xchacha20poly1305_H +#define crypto_secretstream_xchacha20poly1305_H + +#include + +#include "crypto_aead_xchacha20poly1305.h" +#include "crypto_stream_chacha20.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_secretstream_xchacha20poly1305_ABYTES \ + (1U + crypto_aead_xchacha20poly1305_ietf_ABYTES) +SODIUM_EXPORT +size_t crypto_secretstream_xchacha20poly1305_abytes(void); + +#define crypto_secretstream_xchacha20poly1305_HEADERBYTES \ + crypto_aead_xchacha20poly1305_ietf_NPUBBYTES +SODIUM_EXPORT +size_t crypto_secretstream_xchacha20poly1305_headerbytes(void); + +#define crypto_secretstream_xchacha20poly1305_KEYBYTES \ + crypto_aead_xchacha20poly1305_ietf_KEYBYTES +SODIUM_EXPORT +size_t crypto_secretstream_xchacha20poly1305_keybytes(void); + +#define crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX \ + SODIUM_MIN(SODIUM_SIZE_MAX, ((1ULL << 32) - 2ULL) * 64ULL) +SODIUM_EXPORT +size_t crypto_secretstream_xchacha20poly1305_messagebytes_max(void); + +#define crypto_secretstream_xchacha20poly1305_TAG_MESSAGE 0x00 +SODIUM_EXPORT +unsigned char crypto_secretstream_xchacha20poly1305_tag_message(void); + +#define crypto_secretstream_xchacha20poly1305_TAG_PUSH 0x01 +SODIUM_EXPORT +unsigned char crypto_secretstream_xchacha20poly1305_tag_push(void); + +#define crypto_secretstream_xchacha20poly1305_TAG_REKEY 0x02 +SODIUM_EXPORT +unsigned char crypto_secretstream_xchacha20poly1305_tag_rekey(void); + +#define crypto_secretstream_xchacha20poly1305_TAG_FINAL \ + (crypto_secretstream_xchacha20poly1305_TAG_PUSH | \ + crypto_secretstream_xchacha20poly1305_TAG_REKEY) +SODIUM_EXPORT +unsigned char crypto_secretstream_xchacha20poly1305_tag_final(void); + +typedef struct crypto_secretstream_xchacha20poly1305_state { + unsigned char k[crypto_stream_chacha20_ietf_KEYBYTES]; + unsigned char nonce[crypto_stream_chacha20_ietf_NONCEBYTES]; + unsigned char _pad[8]; +} crypto_secretstream_xchacha20poly1305_state; + +SODIUM_EXPORT +size_t crypto_secretstream_xchacha20poly1305_statebytes(void); + +SODIUM_EXPORT +void crypto_secretstream_xchacha20poly1305_keygen + (unsigned char k[crypto_secretstream_xchacha20poly1305_KEYBYTES]); + +SODIUM_EXPORT +int crypto_secretstream_xchacha20poly1305_init_push + (crypto_secretstream_xchacha20poly1305_state *state, + unsigned char header[crypto_secretstream_xchacha20poly1305_HEADERBYTES], + const unsigned char k[crypto_secretstream_xchacha20poly1305_KEYBYTES]); + +SODIUM_EXPORT +int crypto_secretstream_xchacha20poly1305_push + (crypto_secretstream_xchacha20poly1305_state *state, + unsigned char *c, unsigned long long *clen_p, + const unsigned char *m, unsigned long long mlen, + const unsigned char *ad, unsigned long long adlen, unsigned char tag); + +SODIUM_EXPORT +int crypto_secretstream_xchacha20poly1305_init_pull + (crypto_secretstream_xchacha20poly1305_state *state, + const unsigned char header[crypto_secretstream_xchacha20poly1305_HEADERBYTES], + const unsigned char k[crypto_secretstream_xchacha20poly1305_KEYBYTES]); + +SODIUM_EXPORT +int crypto_secretstream_xchacha20poly1305_pull + (crypto_secretstream_xchacha20poly1305_state *state, + unsigned char *m, unsigned long long *mlen_p, unsigned char *tag_p, + const unsigned char *c, unsigned long long clen, + const unsigned char *ad, unsigned long long adlen); + +SODIUM_EXPORT +void crypto_secretstream_xchacha20poly1305_rekey + (crypto_secretstream_xchacha20poly1305_state *state); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_shorthash.h b/c/include/sodium/crypto_shorthash.h new file mode 100644 index 0000000..a498808 --- /dev/null +++ b/c/include/sodium/crypto_shorthash.h @@ -0,0 +1,39 @@ +#ifndef crypto_shorthash_H +#define crypto_shorthash_H + +#include + +#include "crypto_shorthash_siphash24.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_shorthash_BYTES crypto_shorthash_siphash24_BYTES +SODIUM_EXPORT +size_t crypto_shorthash_bytes(void); + +#define crypto_shorthash_KEYBYTES crypto_shorthash_siphash24_KEYBYTES +SODIUM_EXPORT +size_t crypto_shorthash_keybytes(void); + +#define crypto_shorthash_PRIMITIVE "siphash24" +SODIUM_EXPORT +const char *crypto_shorthash_primitive(void); + +SODIUM_EXPORT +int crypto_shorthash(unsigned char *out, const unsigned char *in, + unsigned long long inlen, const unsigned char *k); + +SODIUM_EXPORT +void crypto_shorthash_keygen(unsigned char k[crypto_shorthash_KEYBYTES]); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_shorthash_siphash24.h b/c/include/sodium/crypto_shorthash_siphash24.h new file mode 100644 index 0000000..745ed48 --- /dev/null +++ b/c/include/sodium/crypto_shorthash_siphash24.h @@ -0,0 +1,48 @@ +#ifndef crypto_shorthash_siphash24_H +#define crypto_shorthash_siphash24_H + +#include +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +/* -- 64-bit output -- */ + +#define crypto_shorthash_siphash24_BYTES 8U +SODIUM_EXPORT +size_t crypto_shorthash_siphash24_bytes(void); + +#define crypto_shorthash_siphash24_KEYBYTES 16U +SODIUM_EXPORT +size_t crypto_shorthash_siphash24_keybytes(void); + +SODIUM_EXPORT +int crypto_shorthash_siphash24(unsigned char *out, const unsigned char *in, + unsigned long long inlen, const unsigned char *k); + +#ifndef SODIUM_LIBRARY_MINIMAL +/* -- 128-bit output -- */ + +#define crypto_shorthash_siphashx24_BYTES 16U +SODIUM_EXPORT +size_t crypto_shorthash_siphashx24_bytes(void); + +#define crypto_shorthash_siphashx24_KEYBYTES 16U +SODIUM_EXPORT +size_t crypto_shorthash_siphashx24_keybytes(void); + +SODIUM_EXPORT +int crypto_shorthash_siphashx24(unsigned char *out, const unsigned char *in, + unsigned long long inlen, const unsigned char *k); +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_sign.h b/c/include/sodium/crypto_sign.h new file mode 100644 index 0000000..85aff0c --- /dev/null +++ b/c/include/sodium/crypto_sign.h @@ -0,0 +1,103 @@ +#ifndef crypto_sign_H +#define crypto_sign_H + +/* + * THREAD SAFETY: crypto_sign_keypair() is thread-safe, + * provided that sodium_init() was called before. + * + * Other functions, including crypto_sign_seed_keypair() are always thread-safe. + */ + +#include + +#include "crypto_sign_ed25519.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +typedef crypto_sign_ed25519ph_state crypto_sign_state; + +SODIUM_EXPORT +size_t crypto_sign_statebytes(void); + +#define crypto_sign_BYTES crypto_sign_ed25519_BYTES +SODIUM_EXPORT +size_t crypto_sign_bytes(void); + +#define crypto_sign_SEEDBYTES crypto_sign_ed25519_SEEDBYTES +SODIUM_EXPORT +size_t crypto_sign_seedbytes(void); + +#define crypto_sign_PUBLICKEYBYTES crypto_sign_ed25519_PUBLICKEYBYTES +SODIUM_EXPORT +size_t crypto_sign_publickeybytes(void); + +#define crypto_sign_SECRETKEYBYTES crypto_sign_ed25519_SECRETKEYBYTES +SODIUM_EXPORT +size_t crypto_sign_secretkeybytes(void); + +#define crypto_sign_MESSAGEBYTES_MAX crypto_sign_ed25519_MESSAGEBYTES_MAX +SODIUM_EXPORT +size_t crypto_sign_messagebytes_max(void); + +#define crypto_sign_PRIMITIVE "ed25519" +SODIUM_EXPORT +const char *crypto_sign_primitive(void); + +SODIUM_EXPORT +int crypto_sign_seed_keypair(unsigned char *pk, unsigned char *sk, + const unsigned char *seed); + +SODIUM_EXPORT +int crypto_sign_keypair(unsigned char *pk, unsigned char *sk); + +SODIUM_EXPORT +int crypto_sign(unsigned char *sm, unsigned long long *smlen_p, + const unsigned char *m, unsigned long long mlen, + const unsigned char *sk); + +SODIUM_EXPORT +int crypto_sign_open(unsigned char *m, unsigned long long *mlen_p, + const unsigned char *sm, unsigned long long smlen, + const unsigned char *pk) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_sign_detached(unsigned char *sig, unsigned long long *siglen_p, + const unsigned char *m, unsigned long long mlen, + const unsigned char *sk); + +SODIUM_EXPORT +int crypto_sign_verify_detached(const unsigned char *sig, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *pk) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_sign_init(crypto_sign_state *state); + +SODIUM_EXPORT +int crypto_sign_update(crypto_sign_state *state, + const unsigned char *m, unsigned long long mlen); + +SODIUM_EXPORT +int crypto_sign_final_create(crypto_sign_state *state, unsigned char *sig, + unsigned long long *siglen_p, + const unsigned char *sk); + +SODIUM_EXPORT +int crypto_sign_final_verify(crypto_sign_state *state, unsigned char *sig, + const unsigned char *pk) + __attribute__ ((warn_unused_result)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_sign_ed25519.h b/c/include/sodium/crypto_sign_ed25519.h new file mode 100644 index 0000000..38d2b9d --- /dev/null +++ b/c/include/sodium/crypto_sign_ed25519.h @@ -0,0 +1,114 @@ +#ifndef crypto_sign_ed25519_H +#define crypto_sign_ed25519_H + +#include +#include "crypto_hash_sha512.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +typedef struct crypto_sign_ed25519ph_state { + crypto_hash_sha512_state hs; +} crypto_sign_ed25519ph_state; + +SODIUM_EXPORT +size_t crypto_sign_ed25519ph_statebytes(void); + +#define crypto_sign_ed25519_BYTES 64U +SODIUM_EXPORT +size_t crypto_sign_ed25519_bytes(void); + +#define crypto_sign_ed25519_SEEDBYTES 32U +SODIUM_EXPORT +size_t crypto_sign_ed25519_seedbytes(void); + +#define crypto_sign_ed25519_PUBLICKEYBYTES 32U +SODIUM_EXPORT +size_t crypto_sign_ed25519_publickeybytes(void); + +#define crypto_sign_ed25519_SECRETKEYBYTES (32U + 32U) +SODIUM_EXPORT +size_t crypto_sign_ed25519_secretkeybytes(void); + +#define crypto_sign_ed25519_MESSAGEBYTES_MAX (SODIUM_SIZE_MAX - crypto_sign_ed25519_BYTES) +SODIUM_EXPORT +size_t crypto_sign_ed25519_messagebytes_max(void); + +SODIUM_EXPORT +int crypto_sign_ed25519(unsigned char *sm, unsigned long long *smlen_p, + const unsigned char *m, unsigned long long mlen, + const unsigned char *sk); + +SODIUM_EXPORT +int crypto_sign_ed25519_open(unsigned char *m, unsigned long long *mlen_p, + const unsigned char *sm, unsigned long long smlen, + const unsigned char *pk) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_sign_ed25519_detached(unsigned char *sig, + unsigned long long *siglen_p, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *sk); + +SODIUM_EXPORT +int crypto_sign_ed25519_verify_detached(const unsigned char *sig, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *pk) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_sign_ed25519_keypair(unsigned char *pk, unsigned char *sk); + +SODIUM_EXPORT +int crypto_sign_ed25519_seed_keypair(unsigned char *pk, unsigned char *sk, + const unsigned char *seed); + +SODIUM_EXPORT +int crypto_sign_ed25519_pk_to_curve25519(unsigned char *curve25519_pk, + const unsigned char *ed25519_pk) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int crypto_sign_ed25519_sk_to_curve25519(unsigned char *curve25519_sk, + const unsigned char *ed25519_sk); + +SODIUM_EXPORT +int crypto_sign_ed25519_sk_to_seed(unsigned char *seed, + const unsigned char *sk); + +SODIUM_EXPORT +int crypto_sign_ed25519_sk_to_pk(unsigned char *pk, const unsigned char *sk); + +SODIUM_EXPORT +int crypto_sign_ed25519ph_init(crypto_sign_ed25519ph_state *state); + +SODIUM_EXPORT +int crypto_sign_ed25519ph_update(crypto_sign_ed25519ph_state *state, + const unsigned char *m, + unsigned long long mlen); + +SODIUM_EXPORT +int crypto_sign_ed25519ph_final_create(crypto_sign_ed25519ph_state *state, + unsigned char *sig, + unsigned long long *siglen_p, + const unsigned char *sk); + +SODIUM_EXPORT +int crypto_sign_ed25519ph_final_verify(crypto_sign_ed25519ph_state *state, + unsigned char *sig, + const unsigned char *pk) + __attribute__ ((warn_unused_result)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_sign_edwards25519sha512batch.h b/c/include/sodium/crypto_sign_edwards25519sha512batch.h new file mode 100644 index 0000000..4bb9192 --- /dev/null +++ b/c/include/sodium/crypto_sign_edwards25519sha512batch.h @@ -0,0 +1,55 @@ +#ifndef crypto_sign_edwards25519sha512batch_H +#define crypto_sign_edwards25519sha512batch_H + +/* + * WARNING: This construction was a prototype, which should not be used + * any more in new projects. + * + * crypto_sign_edwards25519sha512batch is provided for applications + * initially built with NaCl, but as recommended by the author of this + * construction, new applications should use ed25519 instead. + * + * In Sodium, you should use the high-level crypto_sign_*() functions instead. + */ + +#include +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_sign_edwards25519sha512batch_BYTES 64U +#define crypto_sign_edwards25519sha512batch_PUBLICKEYBYTES 32U +#define crypto_sign_edwards25519sha512batch_SECRETKEYBYTES (32U + 32U) +#define crypto_sign_edwards25519sha512batch_MESSAGEBYTES_MAX (SODIUM_SIZE_MAX - crypto_sign_edwards25519sha512batch_BYTES) + +SODIUM_EXPORT +int crypto_sign_edwards25519sha512batch(unsigned char *sm, + unsigned long long *smlen_p, + const unsigned char *m, + unsigned long long mlen, + const unsigned char *sk) + __attribute__ ((deprecated)); + +SODIUM_EXPORT +int crypto_sign_edwards25519sha512batch_open(unsigned char *m, + unsigned long long *mlen_p, + const unsigned char *sm, + unsigned long long smlen, + const unsigned char *pk) + __attribute__ ((deprecated)); + +SODIUM_EXPORT +int crypto_sign_edwards25519sha512batch_keypair(unsigned char *pk, + unsigned char *sk) + __attribute__ ((deprecated)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_stream.h b/c/include/sodium/crypto_stream.h new file mode 100644 index 0000000..d288f0b --- /dev/null +++ b/c/include/sodium/crypto_stream.h @@ -0,0 +1,56 @@ +#ifndef crypto_stream_H +#define crypto_stream_H + +/* + * WARNING: This is just a stream cipher. It is NOT authenticated encryption. + * While it provides some protection against eavesdropping, it does NOT + * provide any security against active attacks. + * Unless you know what you're doing, what you are looking for is probably + * the crypto_box functions. + */ + +#include + +#include "crypto_stream_xsalsa20.h" +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_stream_KEYBYTES crypto_stream_xsalsa20_KEYBYTES +SODIUM_EXPORT +size_t crypto_stream_keybytes(void); + +#define crypto_stream_NONCEBYTES crypto_stream_xsalsa20_NONCEBYTES +SODIUM_EXPORT +size_t crypto_stream_noncebytes(void); + +#define crypto_stream_MESSAGEBYTES_MAX crypto_stream_xsalsa20_MESSAGEBYTES_MAX +SODIUM_EXPORT +size_t crypto_stream_messagebytes_max(void); + +#define crypto_stream_PRIMITIVE "xsalsa20" +SODIUM_EXPORT +const char *crypto_stream_primitive(void); + +SODIUM_EXPORT +int crypto_stream(unsigned char *c, unsigned long long clen, + const unsigned char *n, const unsigned char *k); + +SODIUM_EXPORT +int crypto_stream_xor(unsigned char *c, const unsigned char *m, + unsigned long long mlen, const unsigned char *n, + const unsigned char *k); + +SODIUM_EXPORT +void crypto_stream_keygen(unsigned char k[crypto_stream_KEYBYTES]); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_stream_chacha20.h b/c/include/sodium/crypto_stream_chacha20.h new file mode 100644 index 0000000..d3e2b23 --- /dev/null +++ b/c/include/sodium/crypto_stream_chacha20.h @@ -0,0 +1,98 @@ +#ifndef crypto_stream_chacha20_H +#define crypto_stream_chacha20_H + +/* + * WARNING: This is just a stream cipher. It is NOT authenticated encryption. + * While it provides some protection against eavesdropping, it does NOT + * provide any security against active attacks. + * Unless you know what you're doing, what you are looking for is probably + * the crypto_box functions. + */ + +#include +#include +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_stream_chacha20_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_stream_chacha20_keybytes(void); + +#define crypto_stream_chacha20_NONCEBYTES 8U +SODIUM_EXPORT +size_t crypto_stream_chacha20_noncebytes(void); + +#define crypto_stream_chacha20_MESSAGEBYTES_MAX SODIUM_SIZE_MAX +SODIUM_EXPORT +size_t crypto_stream_chacha20_messagebytes_max(void); + +/* ChaCha20 with a 64-bit nonce and a 64-bit counter, as originally designed */ + +SODIUM_EXPORT +int crypto_stream_chacha20(unsigned char *c, unsigned long long clen, + const unsigned char *n, const unsigned char *k); + +SODIUM_EXPORT +int crypto_stream_chacha20_xor(unsigned char *c, const unsigned char *m, + unsigned long long mlen, const unsigned char *n, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_stream_chacha20_xor_ic(unsigned char *c, const unsigned char *m, + unsigned long long mlen, + const unsigned char *n, uint64_t ic, + const unsigned char *k); + +SODIUM_EXPORT +void crypto_stream_chacha20_keygen(unsigned char k[crypto_stream_chacha20_KEYBYTES]); + +/* ChaCha20 with a 96-bit nonce and a 32-bit counter (IETF) */ + +#define crypto_stream_chacha20_ietf_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_stream_chacha20_ietf_keybytes(void); + +#define crypto_stream_chacha20_ietf_NONCEBYTES 12U +SODIUM_EXPORT +size_t crypto_stream_chacha20_ietf_noncebytes(void); + +#define crypto_stream_chacha20_ietf_MESSAGEBYTES_MAX \ + SODIUM_MIN(SODIUM_SIZE_MAX, 64ULL * (1ULL << 32)) +SODIUM_EXPORT +size_t crypto_stream_chacha20_ietf_messagebytes_max(void); + +SODIUM_EXPORT +int crypto_stream_chacha20_ietf(unsigned char *c, unsigned long long clen, + const unsigned char *n, const unsigned char *k); + +SODIUM_EXPORT +int crypto_stream_chacha20_ietf_xor(unsigned char *c, const unsigned char *m, + unsigned long long mlen, const unsigned char *n, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_stream_chacha20_ietf_xor_ic(unsigned char *c, const unsigned char *m, + unsigned long long mlen, + const unsigned char *n, uint32_t ic, + const unsigned char *k); + +SODIUM_EXPORT +void crypto_stream_chacha20_ietf_keygen(unsigned char k[crypto_stream_chacha20_ietf_KEYBYTES]); + +/* Aliases */ + +#define crypto_stream_chacha20_IETF_KEYBYTES crypto_stream_chacha20_ietf_KEYBYTES +#define crypto_stream_chacha20_IETF_NONCEBYTES crypto_stream_chacha20_ietf_NONCEBYTES +#define crypto_stream_chacha20_IETF_MESSAGEBYTES_MAX crypto_stream_chacha20_ietf_MESSAGEBYTES_MAX + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_stream_salsa20.h b/c/include/sodium/crypto_stream_salsa20.h new file mode 100644 index 0000000..0c7688c --- /dev/null +++ b/c/include/sodium/crypto_stream_salsa20.h @@ -0,0 +1,57 @@ +#ifndef crypto_stream_salsa20_H +#define crypto_stream_salsa20_H + +/* + * WARNING: This is just a stream cipher. It is NOT authenticated encryption. + * While it provides some protection against eavesdropping, it does NOT + * provide any security against active attacks. + * Unless you know what you're doing, what you are looking for is probably + * the crypto_box functions. + */ + +#include +#include +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_stream_salsa20_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_stream_salsa20_keybytes(void); + +#define crypto_stream_salsa20_NONCEBYTES 8U +SODIUM_EXPORT +size_t crypto_stream_salsa20_noncebytes(void); + +#define crypto_stream_salsa20_MESSAGEBYTES_MAX SODIUM_SIZE_MAX +SODIUM_EXPORT +size_t crypto_stream_salsa20_messagebytes_max(void); + +SODIUM_EXPORT +int crypto_stream_salsa20(unsigned char *c, unsigned long long clen, + const unsigned char *n, const unsigned char *k); + +SODIUM_EXPORT +int crypto_stream_salsa20_xor(unsigned char *c, const unsigned char *m, + unsigned long long mlen, const unsigned char *n, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_stream_salsa20_xor_ic(unsigned char *c, const unsigned char *m, + unsigned long long mlen, + const unsigned char *n, uint64_t ic, + const unsigned char *k); + +SODIUM_EXPORT +void crypto_stream_salsa20_keygen(unsigned char k[crypto_stream_salsa20_KEYBYTES]); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_stream_salsa2012.h b/c/include/sodium/crypto_stream_salsa2012.h new file mode 100644 index 0000000..c93d1c8 --- /dev/null +++ b/c/include/sodium/crypto_stream_salsa2012.h @@ -0,0 +1,50 @@ +#ifndef crypto_stream_salsa2012_H +#define crypto_stream_salsa2012_H + +/* + * WARNING: This is just a stream cipher. It is NOT authenticated encryption. + * While it provides some protection against eavesdropping, it does NOT + * provide any security against active attacks. + * Unless you know what you're doing, what you are looking for is probably + * the crypto_box functions. + */ + +#include +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_stream_salsa2012_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_stream_salsa2012_keybytes(void); + +#define crypto_stream_salsa2012_NONCEBYTES 8U +SODIUM_EXPORT +size_t crypto_stream_salsa2012_noncebytes(void); + +#define crypto_stream_salsa2012_MESSAGEBYTES_MAX SODIUM_SIZE_MAX +SODIUM_EXPORT +size_t crypto_stream_salsa2012_messagebytes_max(void); + +SODIUM_EXPORT +int crypto_stream_salsa2012(unsigned char *c, unsigned long long clen, + const unsigned char *n, const unsigned char *k); + +SODIUM_EXPORT +int crypto_stream_salsa2012_xor(unsigned char *c, const unsigned char *m, + unsigned long long mlen, const unsigned char *n, + const unsigned char *k); + +SODIUM_EXPORT +void crypto_stream_salsa2012_keygen(unsigned char k[crypto_stream_salsa2012_KEYBYTES]); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_stream_salsa208.h b/c/include/sodium/crypto_stream_salsa208.h new file mode 100644 index 0000000..653f650 --- /dev/null +++ b/c/include/sodium/crypto_stream_salsa208.h @@ -0,0 +1,56 @@ +#ifndef crypto_stream_salsa208_H +#define crypto_stream_salsa208_H + +/* + * WARNING: This is just a stream cipher. It is NOT authenticated encryption. + * While it provides some protection against eavesdropping, it does NOT + * provide any security against active attacks. + * Unless you know what you're doing, what you are looking for is probably + * the crypto_box functions. + */ + +#include +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_stream_salsa208_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_stream_salsa208_keybytes(void) + __attribute__ ((deprecated)); + +#define crypto_stream_salsa208_NONCEBYTES 8U +SODIUM_EXPORT +size_t crypto_stream_salsa208_noncebytes(void) + __attribute__ ((deprecated)); + +#define crypto_stream_salsa208_MESSAGEBYTES_MAX SODIUM_SIZE_MAX + SODIUM_EXPORT +size_t crypto_stream_salsa208_messagebytes_max(void) + __attribute__ ((deprecated)); + +SODIUM_EXPORT +int crypto_stream_salsa208(unsigned char *c, unsigned long long clen, + const unsigned char *n, const unsigned char *k) + __attribute__ ((deprecated)); + +SODIUM_EXPORT +int crypto_stream_salsa208_xor(unsigned char *c, const unsigned char *m, + unsigned long long mlen, const unsigned char *n, + const unsigned char *k) + __attribute__ ((deprecated)); + +SODIUM_EXPORT +void crypto_stream_salsa208_keygen(unsigned char k[crypto_stream_salsa208_KEYBYTES]) + __attribute__ ((deprecated)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_stream_xchacha20.h b/c/include/sodium/crypto_stream_xchacha20.h new file mode 100644 index 0000000..cf0407f --- /dev/null +++ b/c/include/sodium/crypto_stream_xchacha20.h @@ -0,0 +1,57 @@ +#ifndef crypto_stream_xchacha20_H +#define crypto_stream_xchacha20_H + +/* + * WARNING: This is just a stream cipher. It is NOT authenticated encryption. + * While it provides some protection against eavesdropping, it does NOT + * provide any security against active attacks. + * Unless you know what you're doing, what you are looking for is probably + * the crypto_box functions. + */ + +#include +#include +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_stream_xchacha20_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_stream_xchacha20_keybytes(void); + +#define crypto_stream_xchacha20_NONCEBYTES 24U +SODIUM_EXPORT +size_t crypto_stream_xchacha20_noncebytes(void); + +#define crypto_stream_xchacha20_MESSAGEBYTES_MAX SODIUM_SIZE_MAX +SODIUM_EXPORT +size_t crypto_stream_xchacha20_messagebytes_max(void); + +SODIUM_EXPORT +int crypto_stream_xchacha20(unsigned char *c, unsigned long long clen, + const unsigned char *n, const unsigned char *k); + +SODIUM_EXPORT +int crypto_stream_xchacha20_xor(unsigned char *c, const unsigned char *m, + unsigned long long mlen, const unsigned char *n, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_stream_xchacha20_xor_ic(unsigned char *c, const unsigned char *m, + unsigned long long mlen, + const unsigned char *n, uint64_t ic, + const unsigned char *k); + +SODIUM_EXPORT +void crypto_stream_xchacha20_keygen(unsigned char k[crypto_stream_xchacha20_KEYBYTES]); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_stream_xsalsa20.h b/c/include/sodium/crypto_stream_xsalsa20.h new file mode 100644 index 0000000..cb4c44a --- /dev/null +++ b/c/include/sodium/crypto_stream_xsalsa20.h @@ -0,0 +1,57 @@ +#ifndef crypto_stream_xsalsa20_H +#define crypto_stream_xsalsa20_H + +/* + * WARNING: This is just a stream cipher. It is NOT authenticated encryption. + * While it provides some protection against eavesdropping, it does NOT + * provide any security against active attacks. + * Unless you know what you're doing, what you are looking for is probably + * the crypto_box functions. + */ + +#include +#include +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +#define crypto_stream_xsalsa20_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_stream_xsalsa20_keybytes(void); + +#define crypto_stream_xsalsa20_NONCEBYTES 24U +SODIUM_EXPORT +size_t crypto_stream_xsalsa20_noncebytes(void); + +#define crypto_stream_xsalsa20_MESSAGEBYTES_MAX SODIUM_SIZE_MAX +SODIUM_EXPORT +size_t crypto_stream_xsalsa20_messagebytes_max(void); + +SODIUM_EXPORT +int crypto_stream_xsalsa20(unsigned char *c, unsigned long long clen, + const unsigned char *n, const unsigned char *k); + +SODIUM_EXPORT +int crypto_stream_xsalsa20_xor(unsigned char *c, const unsigned char *m, + unsigned long long mlen, const unsigned char *n, + const unsigned char *k); + +SODIUM_EXPORT +int crypto_stream_xsalsa20_xor_ic(unsigned char *c, const unsigned char *m, + unsigned long long mlen, + const unsigned char *n, uint64_t ic, + const unsigned char *k); + +SODIUM_EXPORT +void crypto_stream_xsalsa20_keygen(unsigned char k[crypto_stream_xsalsa20_KEYBYTES]); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_verify_16.h b/c/include/sodium/crypto_verify_16.h new file mode 100644 index 0000000..5e9eeab --- /dev/null +++ b/c/include/sodium/crypto_verify_16.h @@ -0,0 +1,23 @@ +#ifndef crypto_verify_16_H +#define crypto_verify_16_H + +#include +#include "export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define crypto_verify_16_BYTES 16U +SODIUM_EXPORT +size_t crypto_verify_16_bytes(void); + +SODIUM_EXPORT +int crypto_verify_16(const unsigned char *x, const unsigned char *y) + __attribute__ ((warn_unused_result)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_verify_32.h b/c/include/sodium/crypto_verify_32.h new file mode 100644 index 0000000..281b5a1 --- /dev/null +++ b/c/include/sodium/crypto_verify_32.h @@ -0,0 +1,23 @@ +#ifndef crypto_verify_32_H +#define crypto_verify_32_H + +#include +#include "export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define crypto_verify_32_BYTES 32U +SODIUM_EXPORT +size_t crypto_verify_32_bytes(void); + +SODIUM_EXPORT +int crypto_verify_32(const unsigned char *x, const unsigned char *y) + __attribute__ ((warn_unused_result)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/crypto_verify_64.h b/c/include/sodium/crypto_verify_64.h new file mode 100644 index 0000000..0dc7c30 --- /dev/null +++ b/c/include/sodium/crypto_verify_64.h @@ -0,0 +1,23 @@ +#ifndef crypto_verify_64_H +#define crypto_verify_64_H + +#include +#include "export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define crypto_verify_64_BYTES 64U +SODIUM_EXPORT +size_t crypto_verify_64_bytes(void); + +SODIUM_EXPORT +int crypto_verify_64(const unsigned char *x, const unsigned char *y) + __attribute__ ((warn_unused_result)); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/export.h b/c/include/sodium/export.h new file mode 100644 index 0000000..0f624ae --- /dev/null +++ b/c/include/sodium/export.h @@ -0,0 +1,53 @@ + +#ifndef sodium_export_H +#define sodium_export_H + +#ifndef __GNUC__ +# ifdef __attribute__ +# undef __attribute__ +# endif +# define __attribute__(a) +#endif + +#ifdef SODIUM_STATIC +# define SODIUM_EXPORT +# define SODIUM_EXPORT_WEAK +#else +# if defined(_MSC_VER) +# ifdef SODIUM_DLL_EXPORT +# define SODIUM_EXPORT __declspec(dllexport) +# else +# define SODIUM_EXPORT __declspec(dllimport) +# endif +# else +# if defined(__SUNPRO_C) +# ifndef __GNU_C__ +# define SODIUM_EXPORT __attribute__ (visibility(__global)) +# else +# define SODIUM_EXPORT __attribute__ __global +# endif +# elif defined(_MSG_VER) +# define SODIUM_EXPORT extern __declspec(dllexport) +# else +# define SODIUM_EXPORT __attribute__ ((visibility ("default"))) +# endif +# endif +# if defined(__ELF__) && !defined(SODIUM_DISABLE_WEAK_FUNCTIONS) +# define SODIUM_EXPORT_WEAK SODIUM_EXPORT __attribute__((weak)) +# else +# define SODIUM_EXPORT_WEAK SODIUM_EXPORT +# endif +#endif + +#ifndef CRYPTO_ALIGN +# if defined(__INTEL_COMPILER) || defined(_MSC_VER) +# define CRYPTO_ALIGN(x) __declspec(align(x)) +# else +# define CRYPTO_ALIGN(x) __attribute__ ((aligned(x))) +# endif +#endif + +#define SODIUM_MIN(A, B) ((A) < (B) ? (A) : (B)) +#define SODIUM_SIZE_MAX SODIUM_MIN(UINT64_MAX, SIZE_MAX) + +#endif diff --git a/c/include/sodium/randombytes.h b/c/include/sodium/randombytes.h new file mode 100644 index 0000000..d19f684 --- /dev/null +++ b/c/include/sodium/randombytes.h @@ -0,0 +1,68 @@ + +#ifndef randombytes_H +#define randombytes_H + +#include +#include + +#include + +#include "export.h" + +#ifdef __cplusplus +# ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +extern "C" { +#endif + +typedef struct randombytes_implementation { + const char *(*implementation_name)(void); /* required */ + uint32_t (*random)(void); /* required */ + void (*stir)(void); /* optional */ + uint32_t (*uniform)(const uint32_t upper_bound); /* optional, a default implementation will be used if NULL */ + void (*buf)(void * const buf, const size_t size); /* required */ + int (*close)(void); /* optional */ +} randombytes_implementation; + +#define randombytes_BYTES_MAX SODIUM_MIN(SODIUM_SIZE_MAX, 0xffffffffUL) + +#define randombytes_SEEDBYTES 32U +SODIUM_EXPORT +size_t randombytes_seedbytes(void); + +SODIUM_EXPORT +void randombytes_buf(void * const buf, const size_t size); + +SODIUM_EXPORT +void randombytes_buf_deterministic(void * const buf, const size_t size, + const unsigned char seed[randombytes_SEEDBYTES]); + +SODIUM_EXPORT +uint32_t randombytes_random(void); + +SODIUM_EXPORT +uint32_t randombytes_uniform(const uint32_t upper_bound); + +SODIUM_EXPORT +void randombytes_stir(void); + +SODIUM_EXPORT +int randombytes_close(void); + +SODIUM_EXPORT +int randombytes_set_implementation(randombytes_implementation *impl); + +SODIUM_EXPORT +const char *randombytes_implementation_name(void); + +/* -- NaCl compatibility interface -- */ + +SODIUM_EXPORT +void randombytes(unsigned char * const buf, const unsigned long long buf_len); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/randombytes_salsa20_random.h b/c/include/sodium/randombytes_salsa20_random.h new file mode 100644 index 0000000..4deae15 --- /dev/null +++ b/c/include/sodium/randombytes_salsa20_random.h @@ -0,0 +1,19 @@ + +#ifndef randombytes_salsa20_random_H +#define randombytes_salsa20_random_H + +#include "export.h" +#include "randombytes.h" + +#ifdef __cplusplus +extern "C" { +#endif + +SODIUM_EXPORT +extern struct randombytes_implementation randombytes_salsa20_implementation; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/randombytes_sysrandom.h b/c/include/sodium/randombytes_sysrandom.h new file mode 100644 index 0000000..9e27b67 --- /dev/null +++ b/c/include/sodium/randombytes_sysrandom.h @@ -0,0 +1,19 @@ + +#ifndef randombytes_sysrandom_H +#define randombytes_sysrandom_H + +#include "export.h" +#include "randombytes.h" + +#ifdef __cplusplus +extern "C" { +#endif + +SODIUM_EXPORT +extern struct randombytes_implementation randombytes_sysrandom_implementation; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/runtime.h b/c/include/sodium/runtime.h new file mode 100644 index 0000000..7f15d58 --- /dev/null +++ b/c/include/sodium/runtime.h @@ -0,0 +1,52 @@ + +#ifndef sodium_runtime_H +#define sodium_runtime_H + +#include "export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +SODIUM_EXPORT_WEAK +int sodium_runtime_has_neon(void); + +SODIUM_EXPORT_WEAK +int sodium_runtime_has_sse2(void); + +SODIUM_EXPORT_WEAK +int sodium_runtime_has_sse3(void); + +SODIUM_EXPORT_WEAK +int sodium_runtime_has_ssse3(void); + +SODIUM_EXPORT_WEAK +int sodium_runtime_has_sse41(void); + +SODIUM_EXPORT_WEAK +int sodium_runtime_has_avx(void); + +SODIUM_EXPORT_WEAK +int sodium_runtime_has_avx2(void); + +SODIUM_EXPORT_WEAK +int sodium_runtime_has_avx512f(void); + +SODIUM_EXPORT_WEAK +int sodium_runtime_has_pclmul(void); + +SODIUM_EXPORT_WEAK +int sodium_runtime_has_aesni(void); + +SODIUM_EXPORT_WEAK +int sodium_runtime_has_rdrand(void); + +/* ------------------------------------------------------------------------- */ + +int _sodium_runtime_get_cpu_features(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/utils.h b/c/include/sodium/utils.h new file mode 100644 index 0000000..46eb331 --- /dev/null +++ b/c/include/sodium/utils.h @@ -0,0 +1,170 @@ + +#ifndef sodium_utils_H +#define sodium_utils_H + +#include + +#include "export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef SODIUM_C99 +# if defined(__cplusplus) || !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L +# define SODIUM_C99(X) +# else +# define SODIUM_C99(X) X +# endif +#endif + +SODIUM_EXPORT +void sodium_memzero(void * const pnt, const size_t len); + +SODIUM_EXPORT +void sodium_stackzero(const size_t len); + +/* + * WARNING: sodium_memcmp() must be used to verify if two secret keys + * are equal, in constant time. + * It returns 0 if the keys are equal, and -1 if they differ. + * This function is not designed for lexicographical comparisons. + */ +SODIUM_EXPORT +int sodium_memcmp(const void * const b1_, const void * const b2_, size_t len) + __attribute__ ((warn_unused_result)); + +/* + * sodium_compare() returns -1 if b1_ < b2_, 1 if b1_ > b2_ and 0 if b1_ == b2_ + * It is suitable for lexicographical comparisons, or to compare nonces + * and counters stored in little-endian format. + * However, it is slower than sodium_memcmp(). + */ +SODIUM_EXPORT +int sodium_compare(const unsigned char *b1_, const unsigned char *b2_, + size_t len) + __attribute__ ((warn_unused_result)); + +SODIUM_EXPORT +int sodium_is_zero(const unsigned char *n, const size_t nlen); + +SODIUM_EXPORT +void sodium_increment(unsigned char *n, const size_t nlen); + +SODIUM_EXPORT +void sodium_add(unsigned char *a, const unsigned char *b, const size_t len); + +SODIUM_EXPORT +char *sodium_bin2hex(char * const hex, const size_t hex_maxlen, + const unsigned char * const bin, const size_t bin_len); + +SODIUM_EXPORT +int sodium_hex2bin(unsigned char * const bin, const size_t bin_maxlen, + const char * const hex, const size_t hex_len, + const char * const ignore, size_t * const bin_len, + const char ** const hex_end); + +#define sodium_base64_VARIANT_ORIGINAL 1 +#define sodium_base64_VARIANT_ORIGINAL_NO_PADDING 3 +#define sodium_base64_VARIANT_URLSAFE 5 +#define sodium_base64_VARIANT_URLSAFE_NO_PADDING 7 + +/* + * Computes the required length to encode BIN_LEN bytes as a base64 string + * using the given variant. The computed length includes a trailing \0. + */ +#define sodium_base64_ENCODED_LEN(BIN_LEN, VARIANT) \ + (((BIN_LEN) / 3U) * 4U + \ + ((((BIN_LEN) - ((BIN_LEN) / 3U) * 3U) | (((BIN_LEN) - ((BIN_LEN) / 3U) * 3U) >> 1)) & 1U) * \ + (4U - (~((((VARIANT) & 2U) >> 1) - 1U) & (3U - ((BIN_LEN) - ((BIN_LEN) / 3U) * 3U)))) + 1U) + +SODIUM_EXPORT +size_t sodium_base64_encoded_len(const size_t bin_len, const int variant); + +SODIUM_EXPORT +char *sodium_bin2base64(char * const b64, const size_t b64_maxlen, + const unsigned char * const bin, const size_t bin_len, + const int variant); + +SODIUM_EXPORT +int sodium_base642bin(unsigned char * const bin, const size_t bin_maxlen, + const char * const b64, const size_t b64_len, + const char * const ignore, size_t * const bin_len, + const char ** const b64_end, const int variant); + +SODIUM_EXPORT +int sodium_mlock(void * const addr, const size_t len); + +SODIUM_EXPORT +int sodium_munlock(void * const addr, const size_t len); + +/* WARNING: sodium_malloc() and sodium_allocarray() are not general-purpose + * allocation functions. + * + * They return a pointer to a region filled with 0xd0 bytes, immediately + * followed by a guard page. + * As a result, accessing a single byte after the requested allocation size + * will intentionally trigger a segmentation fault. + * + * A canary and an additional guard page placed before the beginning of the + * region may also kill the process if a buffer underflow is detected. + * + * The memory layout is: + * [unprotected region size (read only)][guard page (no access)][unprotected pages (read/write)][guard page (no access)] + * With the layout of the unprotected pages being: + * [optional padding][16-bytes canary][user region] + * + * However: + * - These functions are significantly slower than standard functions + * - Each allocation requires 3 or 4 additional pages + * - The returned address will not be aligned if the allocation size is not + * a multiple of the required alignment. For this reason, these functions + * are designed to store data, such as secret keys and messages. + * + * sodium_malloc() can be used to allocate any libsodium data structure. + * + * The crypto_generichash_state structure is packed and its length is + * either 357 or 361 bytes. For this reason, when using sodium_malloc() to + * allocate a crypto_generichash_state structure, padding must be added in + * order to ensure proper alignment. crypto_generichash_statebytes() + * returns the rounded up structure size, and should be prefered to sizeof(): + * state = sodium_malloc(crypto_generichash_statebytes()); + */ + +SODIUM_EXPORT +void *sodium_malloc(const size_t size) + __attribute__ ((malloc)); + +SODIUM_EXPORT +void *sodium_allocarray(size_t count, size_t size) + __attribute__ ((malloc)); + +SODIUM_EXPORT +void sodium_free(void *ptr); + +SODIUM_EXPORT +int sodium_mprotect_noaccess(void *ptr); + +SODIUM_EXPORT +int sodium_mprotect_readonly(void *ptr); + +SODIUM_EXPORT +int sodium_mprotect_readwrite(void *ptr); + +SODIUM_EXPORT +int sodium_pad(size_t *padded_buflen_p, unsigned char *buf, + size_t unpadded_buflen, size_t blocksize, size_t max_buflen); + +SODIUM_EXPORT +int sodium_unpad(size_t *unpadded_buflen_p, const unsigned char *buf, + size_t padded_buflen, size_t blocksize); + +/* -------- */ + +int _sodium_alloc_init(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/include/sodium/version.h b/c/include/sodium/version.h new file mode 100644 index 0000000..e6af10b --- /dev/null +++ b/c/include/sodium/version.h @@ -0,0 +1,33 @@ + +#ifndef sodium_version_H +#define sodium_version_H + +#include "export.h" + +#define SODIUM_VERSION_STRING "1.0.16" + +#define SODIUM_LIBRARY_VERSION_MAJOR 10 +#define SODIUM_LIBRARY_VERSION_MINOR 1 + + +#ifdef __cplusplus +extern "C" { +#endif + +SODIUM_EXPORT +const char *sodium_version_string(void); + +SODIUM_EXPORT +int sodium_library_version_major(void); + +SODIUM_EXPORT +int sodium_library_version_minor(void); + +SODIUM_EXPORT +int sodium_library_minimal(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/c/miner.cpp b/c/miner.cpp index 15cb860..1995758 100755 --- a/c/miner.cpp +++ b/c/miner.cpp @@ -24,7 +24,11 @@ #include "miner.h" - +#ifdef WIN32 + #ifndef strncasecmp + #define strncasecmp strnicmp + #endif +#endif @@ -36,20 +40,27 @@ int main( void ) { uint8_t utInputHeader[ 140 ]; - arith_uint256 bn256Difficulty = UintToArith256( uint256S( "007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" ) ); - uint32_t uDifficulty = bn256Difficulty.GetCompact(); + arith_uint256 bn256DifficultyDefault = UintToArith256( uint256S( TRUSTNOTE_MINER_POW_LIMIT ) ); + arith_uint256 bn256DifficultyMax = UintToArith256( uint256S( TRUSTNOTE_MINER_POW_MAX ) ); + arith_uint256 bn256DifficultyMin = UintToArith256( uint256S( TRUSTNOTE_MINER_POW_MIN ) ); + + uint32_t uDifficulty = bn256DifficultyDefault.GetCompact(); uint32_t uNonceStart = 0; - uint32_t uCalcTimes = 30000; + uint32_t uCalcTimes = 30000; uint32_t uNonce; char szHexHash[ 64 ]; int nCheckPoW; #ifdef _DEBUG - printf( "### : default difficulty : %u\n", uDifficulty ); + printf( "))) : difficulty def : %u\n", bn256DifficultyDefault.GetCompact() ); + printf( "))) : difficulty max : %u\n", bn256DifficultyMax.GetCompact() ); + printf( "))) : difficulty min : %u\n", bn256DifficultyMin.GetCompact() ); #endif // ... - uint32_t uNewDifficulty1 = calculateNextDifficulty( 536936447, 348 * 17, 17 * 2.5 * 60 ); + uint32_t uNewDifficulty1 = calculateNextDifficulty( 528482303, 3194, 2400 ); + uNewDifficulty1 = calculateNextDifficulty( 528482303, 2294, 2400 ); + uNewDifficulty1 = calculateNextDifficulty( 528482303, 1194, 2400 ); uint32_t uNewDifficulty2 = calculateNextDifficulty( uDifficulty, 30000, 15000 ); uint32_t uNewDifficulty3 = calculateNextDifficulty( uDifficulty, 10000, 15000 ); uint32_t uNewDifficulty4 = calculateNextDifficulty( uDifficulty, 40000, 15000 ); @@ -59,16 +70,19 @@ int main( void ) uint32_t uNewDifficulty8 = calculateNextDifficulty( uDifficulty, 80000, 15000 ); uint32_t uNewDifficulty9 = calculateNextDifficulty( uDifficulty, 90000, 15000 ); - #ifdef _DEBUG printf( "### : will start mining with difficulty : %u\n", uDifficulty ); #endif // ... memset( utInputHeader, 0, sizeof( utInputHeader ) ); - startMining( utInputHeader, uDifficulty, uNonceStart, uCalcTimes, &uNonce, szHexHash, sizeof( szHexHash ) ); + for ( int i = 0; i < 140; i ++ ) + { + utInputHeader[ i ] = i; + } + int nCallStartMining = startMining( utInputHeader, uDifficulty, uNonceStart, uCalcTimes, &uNonce, szHexHash, sizeof( szHexHash ) ); #ifdef _DEBUG - printf( "### : %u\t : %.*s\n", uNonce, 64, szHexHash ); + printf( "### nCallStartMining : %d, nonce : %u\t, hex : %.*s\n", nCallStartMining, uNonce, 64, szHexHash ); #endif // ... @@ -98,7 +112,7 @@ int main( void ) * @param {uint32_t} uHashHexLength * @return {uint32_t} */ -int startMining( +EXPORT_API int startMining( const uint8_t * pcutInputHeader, const uint32_t uDifficulty, const uint32_t uNonceStart, @@ -133,7 +147,7 @@ int startMining( // ... void * pvContextAlloc = malloc( TRUSTNOTE_MINER_CONTEXT_SIZE + 4096 ); - void * pvContext = (void*)( ( (long)pvContextAlloc + 4095 ) & -4096 ); + void * pvContext = (void*)( ( (long long)pvContextAlloc + 4095 ) & -4096 ); void * pvContextEnd = (char*)pvContext + TRUSTNOTE_MINER_CONTEXT_SIZE; // ... @@ -145,11 +159,22 @@ int startMining( : ( UINT32_MAX - uNonceStart - 1 ); for ( ; uNonce < nNonceEnd; uNonce ++ ) { + #ifdef _DEBUG + printf( "Mining Nonce: %u\n", uNonce ); + #endif // // calculate ... // EhPrepare( pvContext, (void *)pcutInputHeader ); - int32_t nSolutionCount = std::min( 3, EhSolver( pvContext, uNonce ) ); + #ifdef _DEBUG + printf( "Mining EhPrepare done\n" ); + #endif + + int32_t nSolutionCount = EhSolver( pvContext, uNonce ); + #ifdef _DEBUG + printf( "Mining EhSolver, nSolutionCount : %d\n", nSolutionCount ); + #endif + nSolutionCount = std::min( 3, nSolutionCount ); for ( int n = 0; n < nSolutionCount; n ++ ) { @@ -206,7 +231,7 @@ int startMining( * stop mining * @return {int} */ -int stopMining() +EXPORT_API int stopMining() { return 0; } @@ -222,7 +247,7 @@ int stopMining() * @return {int} * 0 - okay */ -int checkProofOfWork( +EXPORT_API int checkProofOfWork( const uint8_t * pcutInputHeader, const uint32_t uDifficulty, const uint32_t uNonce, @@ -303,7 +328,7 @@ int checkProofOfWork( * @param {const char *} pcszDifficultyHex "00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" * @return {uint32_t} */ -uint32_t difficulty256HexToUInt32( const char * pcszDifficultyHex ) +EXPORT_API uint32_t difficulty256HexToUInt32( const char * pcszDifficultyHex ) { if ( NULL == pcszDifficultyHex ) { @@ -337,7 +362,7 @@ uint32_t difficulty256HexToUInt32( const char * pcszDifficultyHex ) * @param {const char *} pcszHashHex * @return {uint32_t} */ -int filterDifficulty( +EXPORT_API int filterDifficulty( const uint32_t uDifficulty, const char * pcszHashHex ) { @@ -362,21 +387,18 @@ int filterDifficulty( memcpy( szHashHexCalc, pcszHashHex, 64 ); szHashHexCalc[ 64 ] = 0; - uint256 un256PowLimit = uint256S( TRUSTNOTE_MINER_POW_LIMIT ); - uint256 un256Hash = uint256S( szHashHexCalc ); - // ... bnTarget.SetCompact( uDifficulty, & fNegative, & fOverflow ); // check range - if ( fNegative || 0 == bnTarget || fOverflow || bnTarget > UintToArith256( un256PowLimit ) ) + if ( fNegative || 0 == bnTarget || fOverflow || bnTarget > UintToArith256( uint256S( TRUSTNOTE_MINER_POW_LIMIT ) ) ) { // printf("nBits below minimum work.\n"); return -10; } // check proof of work matches claimed amount - if ( UintToArith256( un256Hash ) > bnTarget ) + if ( UintToArith256( uint256S( szHashHexCalc ) ) > bnTarget ) { // printf("hash doesn't match nBits.\n"); return -20; @@ -394,7 +416,7 @@ int filterDifficulty( * @param {uint32_t} uTimeStandard * @return {uint32_t} */ -uint32_t calculateNextDifficulty( +EXPORT_API uint32_t calculateNextDifficulty( const uint32_t uPreviousAverageDifficulty, const uint32_t uTimeUsed, const uint32_t uTimeStandard ) @@ -404,20 +426,27 @@ uint32_t calculateNextDifficulty( // ... const arith_uint256 bnPowMaxUInt256 = UintToArith256( uint256S( TRUSTNOTE_MINER_POW_MAX ) ); const arith_uint256 bnPowLimitUInt256 = UintToArith256( uint256S( TRUSTNOTE_MINER_POW_LIMIT ) ); - int64_t n64ActualTimeSpan; + + // 3/4 uTimeStandard + 1/4 uTimeUsed + int64_t n64ActualTimeSpan = ( uTimeStandard * 3 + uTimeUsed ) / 4; int64_t n64MinActualTimeSpan = ( uTimeStandard * ( 100 - 16 ) ) / 100; int64_t n64MaxActualTimeSpan = ( uTimeStandard * ( 100 + 32 ) ) / 100; + // ... + //assert( bnPowMaxUInt256 / bnPowLimitUInt256 >= consensus.nPowAveragingWindow ); + #ifdef _DEBUG + printf( "### uPreviousAverageDifficulty\t: %u\n", uPreviousAverageDifficulty ); + printf( "### uTimeUsed\t: %u\n", uTimeUsed ); + printf( "### uTimeStandard\t: %u\n", uTimeStandard ); + printf( "### bnPowMaxUInt256\t: %u\n", bnPowMaxUInt256.GetCompact() ); printf( "### bnPowLimitUInt256\t: %u\n", bnPowLimitUInt256.GetCompact() ); - #endif - // ... - //assert( bnPowMaxUInt256 / bnPowLimitUInt256 >= consensus.nPowAveragingWindow ); - - // 3/4 uTimeStandard + 1/4 uTimeUsed - n64ActualTimeSpan = ( uTimeStandard * 3 + uTimeUsed ) / 4; + printf( "### n64ActualTimeSpan\t: %u\n", n64ActualTimeSpan ); + printf( "### n64MinActualTimeSpan\t: %u\n", n64MinActualTimeSpan ); + printf( "### n64MaxActualTimeSpan\t: %u\n", n64MaxActualTimeSpan ); + #endif if ( n64ActualTimeSpan < n64MinActualTimeSpan ) { @@ -447,7 +476,6 @@ uint32_t calculateNextDifficulty( #ifdef _DEBUG printf( "*** before\t\t: %u\n", bnNewUInt256.GetCompact() ); - printf( "*** n64ActualTimeSpan\t: %lld\n", n64ActualTimeSpan ); #endif // ... @@ -455,7 +483,8 @@ uint32_t calculateNextDifficulty( bnNewUInt256 *= n64ActualTimeSpan; #ifdef _DEBUG - printf( "*** after\t\t: %u\n", bnNewUInt256.GetCompact() ); + printf( "*** after\t\t: %u [ ( %u / %u ) * %u ]\n", bnNewUInt256.GetCompact(), + uPreviousAverageDifficulty, uTimeStandard, n64ActualTimeSpan ); #endif // @@ -463,6 +492,9 @@ uint32_t calculateNextDifficulty( // if ( bnNewUInt256 > bnPowLimitUInt256 ) { + #ifdef _DEBUG + printf( "*** bnNewUInt256(%u) > bnPowLimitUInt256(%u)\n", bnNewUInt256.GetCompact(), bnPowLimitUInt256.GetCompact() ); + #endif bnNewUInt256 = bnPowLimitUInt256; } diff --git a/c/miner.h b/c/miner.h index 35b42c9..f4a47fb 100755 --- a/c/miner.h +++ b/c/miner.h @@ -20,15 +20,23 @@ extern "C" { #define OUT #endif +#ifdef WIN32 + #define EXPORT_API __declspec(dllexport) +#else + #define EXPORT_API +#endif + + + /** * constants */ -#define TRUSTNOTE_MINER_CONTEXT_SIZE 178033152 -#define TRUSTNOTE_MINER_POW_MAX "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" -#define TRUSTNOTE_MINER_POW_MIN "0000000000000000000000000000000000000000000000000000000000000000" -#define TRUSTNOTE_MINER_POW_LIMIT "007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" - +#define TRUSTNOTE_MINER_CONTEXT_SIZE 178033152 +#define TRUSTNOTE_MINER_POW_MAX "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" +#define TRUSTNOTE_MINER_POW_MIN "0000000000000000000000000000000000000000000000000000000000000000" +#define TRUSTNOTE_MINER_POW_LIMIT "007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" +//#define TRUSTNOTE_MINER_DIFFICULTY_START 0x1f07ffff // = 520617983 @@ -46,7 +54,7 @@ extern "C" { * @param {uint32_t} uHashHexLength * @return {int} */ -int startMining( +EXPORT_API int startMining( const uint8_t * pcutInputHeader, const uint32_t uDifficulty, const uint32_t uNonceStart, @@ -60,7 +68,7 @@ int startMining( * stop mining * @return {int} */ -int stopMining(); +EXPORT_API int stopMining(); /** @@ -73,7 +81,7 @@ int stopMining(); * @return {int} * 0 - okay */ -int checkProofOfWork( +EXPORT_API int checkProofOfWork( const uint8_t * pcutInputHeader, const uint32_t uDifficulty, const uint32_t uNonce, @@ -86,7 +94,7 @@ int checkProofOfWork( * @param {const char *} pcszDifficultyHex "00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" * @return {uint32_t} */ -uint32_t difficulty256HexToUInt32( const char * pcszDifficultyHex ); +EXPORT_API uint32_t difficulty256HexToUInt32( const char * pcszDifficultyHex ); @@ -98,7 +106,7 @@ uint32_t difficulty256HexToUInt32( const char * pcszDifficultyHex ); * @return {int} * 0 - matched */ -int filterDifficulty( +EXPORT_API int filterDifficulty( const uint32_t uDifficulty, const char * pcszHashHex ); @@ -112,7 +120,7 @@ int filterDifficulty( * @param {uint32_t} uTimeStandard * @return {uint32_t} */ -uint32_t calculateNextDifficulty( +EXPORT_API uint32_t calculateNextDifficulty( const uint32_t uPreviousDifficulty, const uint32_t uTimeUsed, const uint32_t uTimeStandard ); diff --git a/c/tests/cl/cltest.cpp b/c/tests/cl/cltest.cpp new file mode 100644 index 0000000..235ee8c --- /dev/null +++ b/c/tests/cl/cltest.cpp @@ -0,0 +1,11 @@ +/*the first C++ program*/ +#include +using namespace std; + + +int main() +{ + cout<<"Hello world!"< params.MaxActualTimespan() ) + if ( nActualTimespan > uMax ) { - printf( "pow, nActualTimespan = %d set as max\n", params.MaxActualTimespan() ); - nActualTimespan = params.MaxActualTimespan(); + printf( "pow, nActualTimespan = %d set as max\n", uMax ); + nActualTimespan = uMax; } printf( "pow, nActualTimespan = %d after bounds\n", nActualTimespan ); // Retarget const arith_uint256 bnPowLimit = UintToArith256( params.powLimit ); arith_uint256 bnNew{ bnAvg }; + + printf( "pow, retarget before = %d\n", bnNew.GetCompact() ); + bnNew /= uTimeStandard; bnNew *= nActualTimespan; + printf( "pow, retarget after = %d\n", bnNew.GetCompact() ); + if ( bnNew > bnPowLimit ) { // it is too easy, set to limit difficulty diff --git a/c/tests/zcash_difficulty/difficulty.o b/c/tests/zcash_difficulty/difficulty.o deleted file mode 100644 index 58a9e3c..0000000 Binary files a/c/tests/zcash_difficulty/difficulty.o and /dev/null differ diff --git a/c/tests/zcash_difficulty/output/difficulty b/c/tests/zcash_difficulty/output/difficulty deleted file mode 100755 index 4ee9ab7..0000000 Binary files a/c/tests/zcash_difficulty/output/difficulty and /dev/null differ diff --git a/c/tests/zcash_difficulty/uint256.o b/c/tests/zcash_difficulty/uint256.o deleted file mode 100644 index a95d2f1..0000000 Binary files a/c/tests/zcash_difficulty/uint256.o and /dev/null differ diff --git a/c/tests/zcash_difficulty/utilstrencodings.o b/c/tests/zcash_difficulty/utilstrencodings.o deleted file mode 100644 index 4e093ac..0000000 Binary files a/c/tests/zcash_difficulty/utilstrencodings.o and /dev/null differ diff --git a/js/CTrustMinerLibrary.js b/js/CTrustMinerLibrary.js index c90d08d..de968bc 100755 --- a/js/CTrustMinerLibrary.js +++ b/js/CTrustMinerLibrary.js @@ -273,6 +273,14 @@ class CTrustMinerLibrary } break; + case 'win32' : + sRet = `${ __dirname }/../lib/Windows/miner.x64.debug.dll`; + if ( ! _fs.existsSync( sRet ) ) + { + sRet = null; + } + break; + default: break; } diff --git a/lib/Windows/miner.x64.debug.dll b/lib/Windows/miner.x64.debug.dll new file mode 100644 index 0000000..f35be3b Binary files /dev/null and b/lib/Windows/miner.x64.debug.dll differ diff --git a/lib/Windows/miner.x64.release.dll b/lib/Windows/miner.x64.release.dll new file mode 100644 index 0000000..a5d1e57 Binary files /dev/null and b/lib/Windows/miner.x64.release.dll differ diff --git a/package-lock.json b/package-lock.json index e76167d..b360fa2 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "trustnote-pow-miner", - "version": "1.0.10", + "version": "1.0.11", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -27,13 +27,13 @@ "resolved": "http://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", "requires": { - "duplexer": "0.1.1", - "from": "0.1.7", - "map-stream": "0.1.0", + "duplexer": "~0.1.1", + "from": "~0", + "map-stream": "~0.1.0", "pause-stream": "0.0.11", - "split": "0.3.3", - "stream-combiner": "0.0.4", - "through": "2.3.8" + "split": "0.3", + "stream-combiner": "~0.0.4", + "through": "~2.3.1" } }, "ffi": { @@ -41,11 +41,11 @@ "resolved": "https://registry.npmjs.org/ffi/-/ffi-2.2.0.tgz", "integrity": "sha1-vxiwRmain3EiftVoldVDCvRwQvo=", "requires": { - "bindings": "1.2.1", - "debug": "2.6.9", - "nan": "2.11.0", - "ref": "1.3.5", - "ref-struct": "1.1.0" + "bindings": "~1.2.0", + "debug": "2", + "nan": "2", + "ref": "1", + "ref-struct": "1" } }, "from": { @@ -73,7 +73,7 @@ "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", "requires": { - "through": "2.3.8" + "through": "~2.3" } }, "ref": { @@ -81,9 +81,9 @@ "resolved": "https://registry.npmjs.org/ref/-/ref-1.3.5.tgz", "integrity": "sha512-2cBCniTtxcGUjDpvFfVpw323a83/0RLSGJJY5l5lcomZWhYpU2cuLdsvYqMixvsdLJ9+sTdzEkju8J8ZHDM2nA==", "requires": { - "bindings": "1.2.1", - "debug": "2.6.9", - "nan": "2.11.0" + "bindings": "1", + "debug": "2", + "nan": "2" } }, "ref-struct": { @@ -91,8 +91,8 @@ "resolved": "https://registry.npmjs.org/ref-struct/-/ref-struct-1.1.0.tgz", "integrity": "sha1-XV7mWtQc78Olxf60BYcmHkee3BM=", "requires": { - "debug": "2.6.9", - "ref": "1.3.5" + "debug": "2", + "ref": "1" } }, "split": { @@ -100,7 +100,7 @@ "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", "requires": { - "through": "2.3.8" + "through": "2" } }, "stream-combiner": { @@ -108,7 +108,7 @@ "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", "requires": { - "duplexer": "0.1.1" + "duplexer": "~0.1.1" } }, "through": { diff --git a/tests/test_children.js b/tests/Linux/test_children.js old mode 100755 new mode 100644 similarity index 80% rename from tests/test_children.js rename to tests/Linux/test_children.js index dd076dc..c4e5587 --- a/tests/test_children.js +++ b/tests/Linux/test_children.js @@ -1,5 +1,5 @@ const _child_process = require( 'child_process' ); -const _children = require( '../js/children.js' ); +const _children = require( '../../js/children.js' ); const child = _child_process.exec( "node -e 'while (true);'", function (){} ); diff --git a/tests/test_miner_difficulty.js b/tests/Linux/test_miner_difficulty.js old mode 100755 new mode 100644 similarity index 80% rename from tests/test_miner_difficulty.js rename to tests/Linux/test_miner_difficulty.js index 3db00ee..be6b32d --- a/tests/test_miner_difficulty.js +++ b/tests/Linux/test_miner_difficulty.js @@ -1,4 +1,4 @@ -const _miner = require( '../js/index.js' ); +const _miner = require( '../../js/index.js' ); diff --git a/tests/test_miner_start.js b/tests/Linux/test_miner_start.js old mode 100755 new mode 100644 similarity index 96% rename from tests/test_miner_start.js rename to tests/Linux/test_miner_start.js index 01c0a3b..7bf93d0 --- a/tests/test_miner_start.js +++ b/tests/Linux/test_miner_start.js @@ -1,4 +1,4 @@ -const _miner = require( '../js/index.js' ); +const _miner = require( '../../js/index.js' ); diff --git a/tests/test_miner_stop.js b/tests/Linux/test_miner_stop.js old mode 100755 new mode 100644 similarity index 67% rename from tests/test_miner_stop.js rename to tests/Linux/test_miner_stop.js index fc27869..09c0ba1 --- a/tests/test_miner_stop.js +++ b/tests/Linux/test_miner_stop.js @@ -1,4 +1,4 @@ -const _miner = require( '../js/miner.js' ); +const _miner = require( '../../js/miner.js' ); diff --git a/tests/test_raw.js b/tests/Linux/test_raw.js old mode 100755 new mode 100644 similarity index 100% rename from tests/test_raw.js rename to tests/Linux/test_raw.js diff --git a/tests/Windows/miner.x64.debug.dll b/tests/Windows/miner.x64.debug.dll new file mode 100644 index 0000000..c260ab8 Binary files /dev/null and b/tests/Windows/miner.x64.debug.dll differ diff --git a/tests/Windows/test_children.js b/tests/Windows/test_children.js new file mode 100644 index 0000000..c4e5587 --- /dev/null +++ b/tests/Windows/test_children.js @@ -0,0 +1,9 @@ +const _child_process = require( 'child_process' ); +const _children = require( '../../js/children.js' ); + + +const child = _child_process.exec( "node -e 'while (true);'", function (){} ); +_children( process.pid, function( err, arrChildren ) +{ + console.log( err, arrChildren ); +}); \ No newline at end of file diff --git a/tests/Windows/test_miner_difficulty.js b/tests/Windows/test_miner_difficulty.js new file mode 100644 index 0000000..be6b32d --- /dev/null +++ b/tests/Windows/test_miner_difficulty.js @@ -0,0 +1,10 @@ +const _miner = require( '../../js/index.js' ); + + + + +/** + * stop + */ +let nDifficulty = _miner.difficulty256HexToUInt32( "00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" ); +console.log( `nDifficulty value : ${ nDifficulty }` ); diff --git a/tests/Windows/test_miner_start.js b/tests/Windows/test_miner_start.js new file mode 100644 index 0000000..7bf93d0 --- /dev/null +++ b/tests/Windows/test_miner_start.js @@ -0,0 +1,58 @@ +const _miner = require( '../../js/index.js' ); + + + + +/** + * start here + */ +let _oOptions = + { + bufInputHeader : new Buffer( 140 ), + difficulty : _miner.difficulty256HexToUInt32( "00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" ), + calcTimes : 30, + maxLoop : 1000000, + }; + +_miner.startMining( _oOptions, function( err, oData ) +{ + if ( null === err ) + { + if ( oData ) + { + // + // check proof of work + // + _miner.checkProofOfWork( _oOptions.bufInputHeader, _oOptions.difficulty, oData.nonce, oData.hashHex, ( err, oResult ) => + { + console.log( `checkProofOfWork 1, err : ${ err }, oResult : `, oResult ); + }); + _miner.checkProofOfWork( _oOptions.bufInputHeader, _oOptions.difficulty, 11111, oData.hashHex, ( err, oResult ) => + { + console.log( `checkProofOfWork 2, err : ${ err }, oResult : `, oResult ); + }); + _miner.checkProofOfWork( _oOptions.bufInputHeader, _oOptions.difficulty, oData.nonce, '111111', ( err, oResult ) => + { + console.log( `checkProofOfWork 3, err : ${ err }, oResult : `, oResult ); + }); + + + if ( oData.win ) + { + console.log( `WINNER WINNER, CHICKEN DINNER!`, oData ); + } + else if ( oData.gameOver ) + { + console.log( `GAME OVER!` ); + } + } + else + { + console.log( `INVALID DATA!` ); + } + } + else + { + console.log( `OCCURRED ERROR : `, err ); + } +}); diff --git a/tests/Windows/test_miner_stop.js b/tests/Windows/test_miner_stop.js new file mode 100644 index 0000000..09c0ba1 --- /dev/null +++ b/tests/Windows/test_miner_stop.js @@ -0,0 +1,10 @@ +const _miner = require( '../../js/miner.js' ); + + + + +/** + * stop + */ +_miner.stop(); +console.log( `The KILL signals were sent to all workers.` ); diff --git a/tests/Windows/test_raw.js b/tests/Windows/test_raw.js new file mode 100644 index 0000000..c48047c --- /dev/null +++ b/tests/Windows/test_raw.js @@ -0,0 +1,100 @@ +const _ref = require( 'ref' ); +const _ffi = require( 'ffi' ); + +let _objMinerLibrary = null; + + +_objMinerLibrary = _ffi.Library +( + `${ __dirname }/miner.x64.debug.dll`, + { + 'startMining' : [ 'int', [ 'pointer', 'uint', 'uint', 'uint', _ref.refType('uint'), 'char *', 'uint' ] ], + 'checkProofOfWork' : [ 'int', [ 'pointer', 'uint', 'uint', 'pointer' ] ], + 'calculateNextDifficulty' : [ 'uint', [ 'uint', 'uint', 'uint' ] ], + } +); + +let uOutMemNonce = _ref.alloc( _ref.types.uint ); +let uActualNonce = null; + +let bufInputHeader = new Buffer( 140 ); +let uDifficulty = 536936447; +let bufHashHex = new Buffer( 64 ); +let sActualHashHex = null; + +let nCallStartMining = null; +let nCallCheckProofOfWork = null; + + +// +// int startMining +// ( +// uint8_t * pcutInputHeader, +// uint32_t uDifficulty, +// uint32_t uNonceStart, +// uint32_t uCalcTimes, +// OUT uint32_t * puNonce, +// OUT char * pszHashHex, +// uint32_t uHashHexLength +// ) +// +nCallStartMining = _objMinerLibrary.startMining( bufInputHeader, uDifficulty, 0, 0, uOutMemNonce, bufHashHex, bufHashHex.length ); +uActualNonce = uOutMemNonce.deref(); +sActualHashHex = bufHashHex.toString(); + +console.log( `startMining return ${ nCallStartMining }, nonce : ${ uActualNonce }, hash : ${ sActualHashHex }` ); + + +// +// int checkProofOfWork +// ( +// uint8_t * pcutInputHeader, +// uint32_t uDifficulty, +// uint32_t uNonce, +// const char * pcszHashHex +// ) +// +nCallCheckProofOfWork = _objMinerLibrary.checkProofOfWork( bufInputHeader, uDifficulty, uActualNonce, Buffer.from( sActualHashHex, 'ascii' ) ); + + + +console.log( `checkProofOfWork return ${ nCallCheckProofOfWork }` ); + + + +// +// uint32_t calculateNextDifficulty +// ( +// uint32_t uPreviousDifficulty, +// uint32_t uTimeUsed, +// uint32_t uTimeStandard +// ); +// +let arrDifficultyInputs = + [ + [ uDifficulty, 15000, 15000, 0 ], + [ uDifficulty, 10000, 15000, 0 ], + [ uDifficulty, 19000, 15000, 0 ], + [ uDifficulty, 30000, 15000, 0 ], + [ uDifficulty, 5000, 15000, 0 ], + ]; +for ( let i = 0; i < arrDifficultyInputs.length; i ++ ) +{ + arrDifficultyInputs[ i ][ 3 ] = _objMinerLibrary.calculateNextDifficulty + ( + arrDifficultyInputs[ i ][ 0 ], + arrDifficultyInputs[ i ][ 1 ], + arrDifficultyInputs[ i ][ 2 ] + ); +} + +console.log( `result of calculateNextDifficulty : \n`, arrDifficultyInputs ); + + + + + + + + +