├── .editorconfig ├── .gitattributes ├── .github ├── FUNDING.yml └── dependabot.yml ├── .gitignore ├── .vscode ├── extensions.json └── settings.json ├── .vsconfig ├── CODE-OF-CONDUCT.md ├── CONTRIBUTING.md ├── CONTRIBUTORS.md ├── Directory.Build.props ├── Directory.Build.rsp ├── Directory.Build.targets ├── LICENSE ├── PInvoke.sln ├── PInvoke.sln.DotSettings ├── README.md ├── azure-pipelines.yml ├── azure-pipelines ├── Get-ArtifactsStagingDirectory.ps1 ├── Get-CodeCovTool.ps1 ├── Get-NuGetTool.ps1 ├── Get-ProcDump.ps1 ├── Get-SymbolFiles.ps1 ├── Get-TempToolsPath.ps1 ├── Get-nbgv.ps1 ├── Get-pandoc.ps1 ├── Merge-CodeCoverage.ps1 ├── SignClient.json ├── artifacts │ ├── Variables.ps1 │ ├── _all.ps1 │ ├── _pipelines.ps1 │ ├── _stage_all.ps1 │ ├── build_logs.ps1 │ ├── coverageResults.ps1 │ ├── deployables.ps1 │ ├── pinvoke_coverage_report.ps1 │ ├── pinvoke_method_coverage.ps1 │ ├── projectAssetsJson.ps1 │ ├── symbols.ps1 │ ├── testResults.ps1 │ └── test_symbols.ps1 ├── build.yml ├── dotnet.yml ├── install-dependencies.yml ├── justnugetorg.nuget.config ├── publish-CodeCov.ps1 ├── publish-codecoverage.yml ├── publish-deployables.yml ├── publish-symbols.yml ├── release.yml ├── signfiles.txt ├── test.runsettings └── variables │ ├── DotNetSdkVersion.ps1 │ ├── _all.ps1 │ └── _pipelines.ps1 ├── build.cmd ├── build.ps1 ├── doc └── NuGetPackageRestoreOption.png ├── global.json ├── init.cmd ├── init.ps1 ├── lib ├── cordebug.tlb ├── metahost.tlb └── mscoree.tlb ├── nuget.config ├── src ├── .editorconfig ├── AdvApi32 │ ├── AdvApi32+ALG_ID.cs │ ├── AdvApi32+CryptAcquireContextFlags.cs │ ├── AdvApi32+CryptCreateHashFlags.cs │ ├── AdvApi32+CryptGetHashParamFlags.cs │ ├── AdvApi32+CryptGetProvParamQuery.cs │ ├── AdvApi32+CryptHashDataFlags.cs │ ├── AdvApi32+CryptSetProvParamQuery.cs │ ├── AdvApi32+ENUM_SERVICE_STATUS.cs │ ├── AdvApi32+ProviderType.cs │ ├── AdvApi32+RegNotifyFilter.cs │ ├── AdvApi32+RegOpenKeyOptions.cs │ ├── AdvApi32+SC_ACTION.cs │ ├── AdvApi32+SC_ACTION_TYPE.cs │ ├── AdvApi32+SC_STATUS_TYPE.cs │ ├── AdvApi32+SECURITY_INFORMATION.cs │ ├── AdvApi32+SERVICE_FAILURE_ACTIONS.cs │ ├── AdvApi32+SERVICE_STATUS.cs │ ├── AdvApi32+SERVICE_STATUS_PROCESS.cs │ ├── AdvApi32+SERVICE_STATUS_PROCESS_Flags.cs │ ├── AdvApi32+SERVICE_TRIGGER_SPECIFIC_DATA_ITEM.cs │ ├── AdvApi32+SE_OBJECT_TYPE.cs │ ├── AdvApi32+SafeCryptographicProviderHandle.cs │ ├── AdvApi32+SafeHashHandle.cs │ ├── AdvApi32+SafeServiceHandle.cs │ ├── AdvApi32+ServiceAccess.cs │ ├── AdvApi32+ServiceControl.cs │ ├── AdvApi32+ServiceDelayedAutoStartInfo.cs │ ├── AdvApi32+ServiceDescription.cs │ ├── AdvApi32+ServiceErrorControl.cs │ ├── AdvApi32+ServiceInfoLevel.cs │ ├── AdvApi32+ServiceLaunchProtected.cs │ ├── AdvApi32+ServiceLaunchProtectedInfo.cs │ ├── AdvApi32+ServiceManagerAccess.cs │ ├── AdvApi32+ServicePreferredNodeInfo.cs │ ├── AdvApi32+ServicePreshutdownInfo.cs │ ├── AdvApi32+ServiceRequiredPrivilegesInfo.cs │ ├── AdvApi32+ServiceSidInfo.cs │ ├── AdvApi32+ServiceSidType.cs │ ├── AdvApi32+ServiceStartType.cs │ ├── AdvApi32+ServiceState.cs │ ├── AdvApi32+ServiceStateQuery.cs │ ├── AdvApi32+ServiceTrigger.cs │ ├── AdvApi32+ServiceTriggerAction.cs │ ├── AdvApi32+ServiceTriggerDataType.cs │ ├── AdvApi32+ServiceTriggerInfo.cs │ ├── AdvApi32+ServiceTriggerType.cs │ ├── AdvApi32+ServiceType.cs │ ├── AdvApi32+TOKEN_ELEVATION_TYPE.cs │ ├── AdvApi32+TOKEN_INFORMATION_CLASS.cs │ ├── AdvApi32+TOKEN_TYPE.cs │ ├── AdvApi32+TokenAccessRights.cs │ ├── AdvApi32.Helpers.cs │ ├── AdvApi32.RegistryAccessRights.cs │ ├── AdvApi32.ReservedKeyHandles.cs │ ├── AdvApi32.cs │ ├── AdvApi32.csproj │ ├── AdvApi32.exports.txt │ ├── PublicAPI.Shipped.txt │ ├── PublicAPI.Unshipped.txt │ └── SafeRegistryHandle.cs ├── AssemblyInfo.cs ├── BCrypt │ ├── BCrypt+AlgorithmIdentifiers.cs │ ├── BCrypt+AlgorithmOperations.cs │ ├── BCrypt+AsymmetricKeyBlobTypes.cs │ ├── BCrypt+AuthModeFlags.cs │ ├── BCrypt+BCRYPT_ALGORITHM_IDENTIFIER.cs │ ├── BCrypt+BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO.cs │ ├── BCrypt+BCRYPT_AUTH_TAG_LENGTHS_STRUCT.cs │ ├── BCrypt+BCRYPT_DH_KEY_BLOB.cs │ ├── BCrypt+BCRYPT_DSA_KEY_BLOB.cs │ ├── BCrypt+BCRYPT_DSA_KEY_BLOB_V2.cs │ ├── BCrypt+BCRYPT_ECCKEY_BLOB.cs │ ├── BCrypt+BCRYPT_KEY_BLOB.cs │ ├── BCrypt+BCRYPT_KEY_DATA_BLOB_HEADER.cs │ ├── BCrypt+BCRYPT_KEY_LENGTHS_STRUCT.cs │ ├── BCrypt+BCRYPT_MULTI_HASH_OPERATION.cs │ ├── BCrypt+BCRYPT_MULTI_OPERATION_TYPE.cs │ ├── BCrypt+BCRYPT_OAEP_PADDING_INFO.cs │ ├── BCrypt+BCRYPT_PKCS1_PADDING_INFO.cs │ ├── BCrypt+BCRYPT_PSS_PADDING_INFO.cs │ ├── BCrypt+BCRYPT_RSAKEY_BLOB.cs │ ├── BCrypt+BCryptBuffer.cs │ ├── BCrypt+BCryptBufferDesc.cs │ ├── BCrypt+BCryptCloseAlgorithmProviderFlags.cs │ ├── BCrypt+BCryptCreateHashFlags.cs │ ├── BCrypt+BCryptDeriveKeyFlags.cs │ ├── BCrypt+BCryptEncryptFlags.cs │ ├── BCrypt+BCryptEnumAlgorithmsFlags.cs │ ├── BCrypt+BCryptExportKeyFlags.cs │ ├── BCrypt+BCryptFinalizeKeyPairFlags.cs │ ├── BCrypt+BCryptFinishHashFlags.cs │ ├── BCrypt+BCryptGenRandomFlags.cs │ ├── BCrypt+BCryptGenerateKeyPairFlags.cs │ ├── BCrypt+BCryptGenerateSymmetricKeyFlags.cs │ ├── BCrypt+BCryptGetPropertyFlags.cs │ ├── BCrypt+BCryptHashDataFlags.cs │ ├── BCrypt+BCryptImportKeyFlags.cs │ ├── BCrypt+BCryptImportKeyPairFlags.cs │ ├── BCrypt+BCryptKeyDerivationFlags.cs │ ├── BCrypt+BCryptOpenAlgorithmProviderFlags.cs │ ├── BCrypt+BCryptSecretAgreementFlags.cs │ ├── BCrypt+BCryptSetPropertyFlags.cs │ ├── BCrypt+BCryptSignHashFlags.cs │ ├── BCrypt+BufferType.cs │ ├── BCrypt+ChainingModes.cs │ ├── BCrypt+DSAFIPSVERSION_ENUM.cs │ ├── BCrypt+EccKeyBlob.cs │ ├── BCrypt+EccKeyBlobMagicNumbers.cs │ ├── BCrypt+HASHALGORITHM_ENUM.cs │ ├── BCrypt+HashOperationType.cs │ ├── BCrypt+InterfaceIdentifiers.cs │ ├── BCrypt+KeyDerivationFunctions.cs │ ├── BCrypt+MultiOperationType.cs │ ├── BCrypt+PaddingSchemes.cs │ ├── BCrypt+PropertyNames.cs │ ├── BCrypt+SafeAlgorithmHandle.cs │ ├── BCrypt+SafeHashHandle.cs │ ├── BCrypt+SafeKeyHandle.cs │ ├── BCrypt+SafeSecretHandle.cs │ ├── BCrypt+SymmetricKeyBlobTypes.cs │ ├── BCrypt.Helpers.cs │ ├── BCrypt.cs │ ├── BCrypt.csproj │ ├── BCrypt.exports.txt │ ├── PublicAPI.Shipped.txt │ ├── PublicAPI.Unshipped.txt │ └── storebanned │ │ ├── BCrypt+ConfigurationTable.cs │ │ └── BCrypt.cs ├── Cabinet │ ├── Cabinet+CpuType.cs │ ├── Cabinet+ERF.cs │ ├── Cabinet+FdiError.cs │ ├── Cabinet+FdiHandle.cs │ ├── Cabinet+NOTIFICATION.cs │ ├── Cabinet+NOTIFICATIONTYPE.cs │ ├── Cabinet.cs │ ├── Cabinet.csproj │ ├── PublicAPI.Shipped.txt │ ├── PublicAPI.Unshipped.txt │ └── cabinet.exports.txt ├── CfgMgr32 │ ├── CfgMgr32+CM_NOTIFY_EVENT_DATA.cs │ ├── CfgMgr32+CM_NOTIFY_FILTER.cs │ ├── CfgMgr32+CM_NOTIFY_FILTER_ACTION.cs │ ├── CfgMgr32+CM_NOTIFY_FILTER_FLAG.cs │ ├── CfgMgr32+CM_NOTIFY_FILTER_TYPE.cs │ ├── CfgMgr32+CONFIGRET.cs │ ├── CfgMgr32+SafeNotificationHandle.cs │ ├── CfgMgr32.cs │ ├── CfgMgr32.csproj │ ├── PublicAPI.Shipped.txt │ ├── PublicAPI.Unshipped.txt │ └── cfgmgr32.exports.txt ├── CodeGeneration │ ├── BindingRedirects.cs │ ├── CodeGeneration.csproj │ ├── IGenerator.cs │ ├── ModuleInitializerAttribute.cs │ ├── OfferFriendlyOverloadsGenerator.cs │ ├── OfferIntPtrPropertyAccessorsGenerator.cs │ ├── SourceGenerator.cs │ └── TransformationContext.cs ├── CodeGenerationAttributes │ ├── CodeGenerationAttributes.csproj │ ├── FriendlyAttribute.cs │ ├── FriendlyFlags.cs │ ├── NoFriendlyOverloadsAttribute.cs │ ├── OfferFriendlyOverloadsAttribute.cs │ └── OfferIntPtrPropertyAccessorsAttribute.cs ├── Crypt32 │ ├── Crypt32+CERT_PROP_ID.cs │ ├── Crypt32+CRYPT_DATA_BLOB.cs │ ├── Crypt32+CRYPT_KEY_PROV_INFO.cs │ ├── Crypt32+CRYPT_PROV_TYPE.cs │ ├── Crypt32+CertCloseStoreFlags.cs │ ├── Crypt32+CryptAcquireCertificatePrivateKeyFlags.cs │ ├── Crypt32+PFXImportCertStoreFlags.cs │ ├── Crypt32+SafeCertStoreHandle.cs │ ├── Crypt32.Helpers.cs │ ├── Crypt32.cs │ ├── Crypt32.csproj │ ├── Crypt32.exports.txt │ ├── PublicAPI.Shipped.txt │ ├── PublicAPI.Unshipped.txt │ └── storebanned │ │ ├── Crypt32.Helpers.cs │ │ └── Crypt32.cs ├── DbgHelp │ ├── DbgHelp+Characteristics.cs │ ├── DbgHelp+LOADED_IMAGE.cs │ ├── DbgHelp.Helpers.cs │ ├── DbgHelp.cs │ ├── DbgHelp.csproj │ ├── DbgHelp.exports.txt │ ├── PublicAPI.Shipped.txt │ └── PublicAPI.Unshipped.txt ├── Directory.Build.props ├── Directory.Build.targets ├── DwmApi │ ├── DWM_BLURBEHINDFlags.cs │ ├── DwmApi+DWMWINDOWATTRIBUTE.cs │ ├── DwmApi+DWM_BLURBEHIND.cs │ ├── DwmApi+DwmEnableCompositionFlags.cs │ ├── DwmApi.Helpers.cs │ ├── DwmApi.cs │ ├── DwmApi.csproj │ ├── DwmApi.exports.txt │ ├── PublicAPI.Shipped.txt │ └── PublicAPI.Unshipped.txt ├── Fusion │ ├── Fusion+AssemblyCacheInstallFlags.cs │ ├── Fusion+AssemblyInfoFlags.cs │ ├── Fusion+FUSION_INSTALL_REFERENCE.cs │ ├── Fusion+FusionInstallReferenceFlags.cs │ ├── Fusion+IAssemblyCache.cs │ ├── Fusion+IAssemblyCacheItem.cs │ ├── Fusion+QueryAssemblyInfoFlags.cs │ ├── Fusion.Helpers.cs │ ├── Fusion.cs │ ├── Fusion.csproj │ ├── MSCorEE+ASSEMBLY_INFO.cs │ ├── MSCorEE+UninstallAssemblyFlags.cs │ ├── MSCorEE+UninstallDisposition.cs │ ├── PublicAPI.Shipped.txt │ ├── PublicAPI.Unshipped.txt │ └── fusion.exports.txt ├── Gdi32 │ ├── Gdi32+DeviceCap.cs │ ├── Gdi32+StockObject.cs │ ├── Gdi32.Helpers.cs │ ├── Gdi32.cs │ ├── Gdi32.csproj │ ├── Gdi32.exports.txt │ ├── PublicAPI.Shipped.txt │ └── PublicAPI.Unshipped.txt ├── Hid │ ├── Hid+HiddAttributes.cs │ ├── Hid+HidpCaps.cs │ ├── Hid+SafePreparsedDataHandle.cs │ ├── Hid.Helpers.cs │ ├── Hid.cs │ ├── Hid.csproj │ ├── Hid.exports.txt │ ├── PublicAPI.Shipped.txt │ └── PublicAPI.Unshipped.txt ├── IPHlpApi │ ├── IPHLPAPI.exports.txt │ ├── IPHlpApi+MIB_TCPROW_OWNER_PID.cs │ ├── IPHlpApi+MIB_TCPTABLE_OWNER_PID.cs │ ├── IPHlpApi+TCP_TABLE_CLASS.cs │ ├── IPHlpApi.cs │ ├── IPHlpApi.csproj │ ├── PublicAPI.Shipped.txt │ └── PublicAPI.Unshipped.txt ├── ImageHlp │ ├── ImageHlp.Helpers.cs │ ├── ImageHlp.cs │ ├── ImageHlp.csproj │ ├── ImageHlp.exports.txt │ ├── PublicAPI.Shipped.txt │ └── PublicAPI.Unshipped.txt ├── Kernel32 │ ├── Kernel32+ACCESS_MASK.cs │ ├── Kernel32+APP_MEMORY_INFORMATION.cs │ ├── Kernel32+CreateFileFlags.cs │ ├── Kernel32+CreateProcessFlags.cs │ ├── Kernel32+CreationDisposition.cs │ ├── Kernel32+ErrorModes.cs │ ├── Kernel32+FILETIME.cs │ ├── Kernel32+FINDEX_INFO_LEVELS.cs │ ├── Kernel32+FINDEX_SEARCH_OPS.cs │ ├── Kernel32+FileAccess.cs │ ├── Kernel32+FileAttribute.cs │ ├── Kernel32+FileShare.cs │ ├── Kernel32+FileSystemFlags.cs │ ├── Kernel32+FindFirstFileExFlags.cs │ ├── Kernel32+FormatMessageFlags.cs │ ├── Kernel32+HandleFlags.cs │ ├── Kernel32+MEMORY_PRIORITY_INFORMATION.cs │ ├── Kernel32+MemoryPriority.cs │ ├── Kernel32+OSPlatformId.cs │ ├── Kernel32+OSVERSIONINFO.cs │ ├── Kernel32+OSVERSIONINFOEX.cs │ ├── Kernel32+OS_TYPE.cs │ ├── Kernel32+OVERLAPPED.cs │ ├── Kernel32+PROCESSOR_NUMBER.cs │ ├── Kernel32+PROCESS_INFORMATION_CLASS.cs │ ├── Kernel32+PROCESS_LEAP_SECOND_INFO.cs │ ├── Kernel32+PROCESS_MEMORY_EXHAUSTION_INFO.cs │ ├── Kernel32+PROCESS_MEMORY_EXHAUSTION_TYPE.cs │ ├── Kernel32+PROCESS_POWER_THROTTLING_STATE.cs │ ├── Kernel32+PROCESS_PROTECTION_LEVEL_INFORMATION.cs │ ├── Kernel32+PRODUCT_SUITE.cs │ ├── Kernel32+ProcessAccess.cs │ ├── Kernel32+ProcessLeapSecondInfoFlags.cs │ ├── Kernel32+ProcessPriorityClass.cs │ ├── Kernel32+ProcessProtectionLevel.cs │ ├── Kernel32+ProcessorArchitecture.cs │ ├── Kernel32+ProcessorPowerThrottlingFlags.cs │ ├── Kernel32+ProcessorType.cs │ ├── Kernel32+SECURITY_ATTRIBUTES.cs │ ├── Kernel32+SECURITY_DESCRIPTOR.cs │ ├── Kernel32+SECURITY_IMPERSONATION_LEVEL.cs │ ├── Kernel32+SYSTEMTIME.cs │ ├── Kernel32+SYSTEM_INFO.cs │ ├── Kernel32+SafeFindFilesHandle.cs │ ├── Kernel32+SafeLibraryHandle.cs │ ├── Kernel32+SafeObjectHandle.cs │ ├── Kernel32+ThreadAccess.cs │ ├── Kernel32+VER_CONDITION.cs │ ├── Kernel32+VER_MASK.cs │ ├── Kernel32+WIN32_FIND_DATA.cs │ ├── Kernel32+WaitForSingleObjectResult.cs │ ├── Kernel32.Helpers.cs │ ├── Kernel32.cs │ ├── Kernel32.csproj │ ├── Kernel32.exports.txt │ ├── Kernel32Extensions.cs │ ├── NTStatusException.cs │ ├── PublicAPI.Shipped.txt │ ├── PublicAPI.Unshipped.txt │ ├── SafeWaitHandle.cs │ ├── Win32Exception.cs │ └── storebanned │ │ ├── Kernel32+ACL.cs │ │ ├── Kernel32+CHAR_INFO.cs │ │ ├── Kernel32+CHAR_INFO_ENCODING.cs │ │ ├── Kernel32+CONSOLE_READCONSOLE_CONTROL.cs │ │ ├── Kernel32+CONSOLE_SCREEN_BUFFER_INFO.cs │ │ ├── Kernel32+CONSOLE_SELECTION_INFO.cs │ │ ├── Kernel32+CharacterAttributesFlags.cs │ │ ├── Kernel32+ConsoleBufferModes.cs │ │ ├── Kernel32+ConsoleDisplayMode.cs │ │ ├── Kernel32+ConsoleScreenBufferFlag.cs │ │ ├── Kernel32+ConsoleSelectionFlags.cs │ │ ├── Kernel32+ControlKeyStates.cs │ │ ├── Kernel32+ControlType.cs │ │ ├── Kernel32+CreatePseudoConsoleFlags.cs │ │ ├── Kernel32+CreateThreadFlags.cs │ │ ├── Kernel32+CreateToolhelp32SnapshotFlags.cs │ │ ├── Kernel32+DISK_GEOMETRY.cs │ │ ├── Kernel32+DeviceIOControlOverlapped.cs │ │ ├── Kernel32+ExecutionState.cs │ │ ├── Kernel32+FILE_ZERO_DATA_INFORMATION.cs │ │ ├── Kernel32+FOCUS_EVENT_RECORD.cs │ │ ├── Kernel32+GRPICONDIR.cs │ │ ├── Kernel32+GRPICONDIRENTRY.cs │ │ ├── Kernel32+GetModuleHandleExFlags.cs │ │ ├── Kernel32+GlobalAllocFlags.cs │ │ ├── Kernel32+GlobalReAllocFlags.cs │ │ ├── Kernel32+HeapAllocFlags.cs │ │ ├── Kernel32+HeapFreeFlags.cs │ │ ├── Kernel32+HeapReAllocFlags.cs │ │ ├── Kernel32+ICONDIR.cs │ │ ├── Kernel32+ICONDIRENTRY.cs │ │ ├── Kernel32+INPUT_EVENT_RECORD.cs │ │ ├── Kernel32+INPUT_RECORD.cs │ │ ├── Kernel32+IO_COUNTERS.cs │ │ ├── Kernel32+InputEventTypeFlag.cs │ │ ├── Kernel32+JOBOBJECT_BASIC_LIMIT_INFORMATION.cs │ │ ├── Kernel32+JOBOBJECT_CPU_RATE_CONTROL_FLAGS.cs │ │ ├── Kernel32+JOBOBJECT_CPU_RATE_CONTROL_INFORMATION.cs │ │ ├── Kernel32+JOBOBJECT_EXTENDED_LIMIT_INFORMATION.cs │ │ ├── Kernel32+JOB_OBJECT_LIMIT_FLAGS.cs │ │ ├── Kernel32+JobObjectInfoClass.cs │ │ ├── Kernel32+KEY_EVENT_RECORD.cs │ │ ├── Kernel32+LANGID.cs │ │ ├── Kernel32+LoadLibraryExFlags.cs │ │ ├── Kernel32+LocalAllocFlags.cs │ │ ├── Kernel32+LocalReAllocFlags.cs │ │ ├── Kernel32+MEDIA_TYPE.cs │ │ ├── Kernel32+MENU_EVENT_RECORD.cs │ │ ├── Kernel32+MODULEENTRY32.cs │ │ ├── Kernel32+MOUSE_EVENT_RECORD.cs │ │ ├── Kernel32+MouseButtonStates.cs │ │ ├── Kernel32+MouseEvents.cs │ │ ├── Kernel32+NamedPipeInfoFlags.cs │ │ ├── Kernel32+PROCESSENTRY32.cs │ │ ├── Kernel32+PROCESS_INFORMATION.cs │ │ ├── Kernel32+PROC_THREAD_ATTRIBUTE_LIST.cs │ │ ├── Kernel32+PipeAccessMode.cs │ │ ├── Kernel32+PipeMode.cs │ │ ├── Kernel32+ProcessShutdownFlags.cs │ │ ├── Kernel32+QueryFullProcessImageNameFlags.cs │ │ ├── Kernel32+ResourceTypes.cs │ │ ├── Kernel32+STARTUPINFOEX.cs │ │ ├── Kernel32+SafePseudoConsoleHandle.cs │ │ ├── Kernel32+StartupInfo.cs │ │ ├── Kernel32+StartupInfoFlags.cs │ │ ├── Kernel32+StdHandle.cs │ │ ├── Kernel32+WINDOW_BUFFER_SIZE_RECORD.cs │ │ ├── Kernel32.Helpers.cs │ │ ├── Kernel32.cs │ │ └── Kernel32Extensions.cs ├── MSCorEE │ ├── IEnumUnknownExtensions.cs │ ├── MSCorEE.Helpers.cs │ ├── MSCorEE.cs │ ├── MSCorEE.csproj │ ├── MSCorEE.exports.txt │ ├── PublicAPI.Shipped.txt │ └── PublicAPI.Unshipped.txt ├── Magnification │ ├── Magnification+MAGCOLOREFFECT.cs │ ├── Magnification+MAGTRANSFORM.cs │ ├── Magnification.Helpers.cs │ ├── Magnification.cs │ ├── Magnification.csproj │ ├── Magnification.exports.txt │ ├── PublicAPI.Shipped.txt │ └── PublicAPI.Unshipped.txt ├── Msi │ ├── Msi+MSIINSTALLCONTEXT.cs │ ├── Msi.Helpers.cs │ ├── Msi.cs │ ├── Msi.csproj │ ├── Msi.exports.txt │ ├── PublicAPI.Shipped.txt │ └── PublicAPI.Unshipped.txt ├── NCrypt │ ├── NCrypt+AlgorithmOperations.cs │ ├── NCrypt+AsymmetricKeyBlobTypes.cs │ ├── NCrypt+BufferType.cs │ ├── NCrypt+InterfaceIdentifiers.cs │ ├── NCrypt+KeyStoragePropertyIdentifiers.cs │ ├── NCrypt+KeyStoragePropertyValues.cs │ ├── NCrypt+KeyStorageProviders.cs │ ├── NCrypt+LegacyKeySpec.cs │ ├── NCrypt+NCRYPT_KEY_BLOB_HEADER.cs │ ├── NCrypt+NCRYPT_SUPPORTED_LENGTHS.cs │ ├── NCrypt+NCryptAlgorithmName.cs │ ├── NCrypt+NCryptBuffer.cs │ ├── NCrypt+NCryptBufferDesc.cs │ ├── NCrypt+NCryptCreatePersistedKeyFlags.cs │ ├── NCrypt+NCryptDeleteKeyFlags.cs │ ├── NCrypt+NCryptDeriveKeyFlags.cs │ ├── NCrypt+NCryptEncryptFlags.cs │ ├── NCrypt+NCryptEnumAlgorithmsFlags.cs │ ├── NCrypt+NCryptEnumKeysFlags.cs │ ├── NCrypt+NCryptExportKeyFlags.cs │ ├── NCrypt+NCryptFinalizeKeyFlags.cs │ ├── NCrypt+NCryptGetPropertyFlags.cs │ ├── NCrypt+NCryptIsAlgSupportedFlags.cs │ ├── NCrypt+NCryptKeyDerivationFlags.cs │ ├── NCrypt+NCryptKeyName.cs │ ├── NCrypt+NCryptOpenKeyFlags.cs │ ├── NCrypt+NCryptOpenStorageProviderFlags.cs │ ├── NCrypt+NCryptSecretAgreementFlags.cs │ ├── NCrypt+NCryptSetPropertyFlags.cs │ ├── NCrypt+NCryptSignHashFlags.cs │ ├── NCrypt+SECURITY_STATUS.cs │ ├── NCrypt+SafeKeyHandle.cs │ ├── NCrypt+SafeProviderHandle.cs │ ├── NCrypt+SafeSecretHandle.cs │ ├── NCrypt+SymmetricKeyBlobTypes.cs │ ├── NCrypt.Helpers.cs │ ├── NCrypt.cs │ ├── NCrypt.csproj │ ├── NCrypt.exports.txt │ ├── NCryptExtensions.cs │ ├── PublicAPI.Shipped.txt │ ├── PublicAPI.Unshipped.txt │ ├── SecurityStatusException.cs │ └── storebanned │ │ ├── NCrypt+NCryptEnumStorageProvidersFlags.cs │ │ ├── NCrypt+NCryptProviderName.cs │ │ └── NCrypt.cs ├── NTDll │ ├── NTDll+OBJECT_ATTRIBUTES.cs │ ├── NTDll+PROCESSINFOCLASS.cs │ ├── NTDll+PROCESS_BASIC_INFORMATION.cs │ ├── NTDll+SafeNTObjectHandle.cs │ ├── NTDll+UNICODE_STRING.cs │ ├── NTDll.Helpers.cs │ ├── NTDll.cs │ ├── NTDll.csproj │ ├── NTDll.exports.txt │ ├── PublicAPI.Shipped.txt │ └── PublicAPI.Unshipped.txt ├── NetApi32 │ ├── NetApi32+NetUserEnumFilter.cs │ ├── NetApi32+NetUserEnumLevel.cs │ ├── NetApi32+USER_INFO_0.cs │ ├── NetApi32+USER_INFO_1.cs │ ├── NetApi32.cs │ ├── NetApi32.csproj │ ├── NetApi32.exports.txt │ ├── PublicAPI.Shipped.txt │ └── PublicAPI.Unshipped.txt ├── NewDev │ ├── NewDev+InstallDeviceFlags.cs │ ├── NewDev+InstallFlags.cs │ ├── NewDev.cs │ ├── NewDev.csproj │ ├── PublicAPI.Shipped.txt │ ├── PublicAPI.Unshipped.txt │ └── newdev.exports.txt ├── Ole32 │ ├── Ole32.Helpers.cs │ ├── Ole32.cs │ ├── Ole32.csproj │ ├── Ole32.exports.txt │ ├── PublicAPI.Shipped.txt │ └── PublicAPI.Unshipped.txt ├── PInvoke.Extra.targets ├── Psapi │ ├── Psapi+ENUMPROCESSMODULESFLAGS.cs │ ├── Psapi+MODULEINFO.cs │ ├── Psapi.cs │ ├── Psapi.csproj │ ├── Psapi.exports.txt │ ├── PublicAPI.Shipped.txt │ └── PublicAPI.Unshipped.txt ├── SHCore │ ├── PublicAPI.Shipped.txt │ ├── PublicAPI.Unshipped.txt │ ├── SHCore.cs │ ├── SHCore.csproj │ └── SHCore.exports.txt ├── SetupApi │ ├── PublicAPI.Shipped.txt │ ├── PublicAPI.Unshipped.txt │ ├── SetupApi+DEVPROPKEY.cs │ ├── SetupApi+DevInstallFlags.cs │ ├── SetupApi+DevInstallFlagsEx.cs │ ├── SetupApi+DeviceInterfaceDataFlags.cs │ ├── SetupApi+DeviceSetupClass.cs │ ├── SetupApi+DriverType.cs │ ├── SetupApi+GetClassDevsFlags.cs │ ├── SetupApi+SP_DEVICE_INTERFACE_DATA.cs │ ├── SetupApi+SP_DEVICE_INTERFACE_DETAIL_DATA.cs │ ├── SetupApi+SP_DEVINFO_DATA.cs │ ├── SetupApi+SP_DEVINSTALL_PARAMS.cs │ ├── SetupApi+SP_DRVINFO_DATA.cs │ ├── SetupApi+SP_DRVINFO_DETAIL_DATA.cs │ ├── SetupApi+SafeDeviceInfoSetHandle.cs │ ├── SetupApi+SetupDiGetDevicePropertyFlags.cs │ ├── SetupApi+SetupDiOpenDeviceInfoFlags.cs │ ├── SetupApi.Helpers.cs │ ├── SetupApi.cs │ ├── SetupApi.csproj │ └── SetupApi.exports.txt ├── Shell32 │ ├── PublicAPI.Shipped.txt │ ├── PublicAPI.Unshipped.txt │ ├── Shell32.Helpers.cs │ ├── Shell32.cs │ ├── Shell32.csproj │ ├── Shell32.exports.txt │ └── storebanned │ │ ├── Shell32+CSIDL.cs │ │ ├── Shell32+ITEMIDLIST.cs │ │ ├── Shell32+KNOWNFOLDERID.cs │ │ ├── Shell32+KNOWN_FOLDER_FLAG.cs │ │ ├── Shell32+SHGetFolderPathFlags.cs │ │ ├── Shell32+SHITEMID.cs │ │ ├── Shell32.Helpers.cs │ │ └── Shell32.cs ├── User32 │ ├── PublicAPI.Shipped.txt │ ├── PublicAPI.Unshipped.txt │ ├── User32+CHANGEFILTERSTRUCT.cs │ ├── User32+CURSORINFO.cs │ ├── User32+CURSORINFOFlags.cs │ ├── User32+CWPRETSTRUCT.cs │ ├── User32+CWPSTRUCT.cs │ ├── User32+ChildWindowFromPointExFlags.cs │ ├── User32+ClassStyles.cs │ ├── User32+Cursors.cs │ ├── User32+DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS.cs │ ├── User32+DIALOG_DPI_CHANGE_BEHAVIORS.cs │ ├── User32+DISPLAYCONFIG_2dREGION.cs │ ├── User32+DISPLAYCONFIG_ADDITIONAL_SIGNAL_INFO.cs │ ├── User32+DISPLAYCONFIG_DESKTOP_IMAGE_INFO.cs │ ├── User32+DISPLAYCONFIG_MODE_INFO.cs │ ├── User32+DISPLAYCONFIG_MODE_INFO_TYPE.cs │ ├── User32+DISPLAYCONFIG_PATH_INFO.cs │ ├── User32+DISPLAYCONFIG_PATH_SOURCE_INFO.cs │ ├── User32+DISPLAYCONFIG_PATH_TARGET_INFO.cs │ ├── User32+DISPLAYCONFIG_PIXELFORMAT.cs │ ├── User32+DISPLAYCONFIG_RATIONAL.cs │ ├── User32+DISPLAYCONFIG_ROTATION.cs │ ├── User32+DISPLAYCONFIG_SCALING.cs │ ├── User32+DISPLAYCONFIG_SCANLINE_ORDERING.cs │ ├── User32+DISPLAYCONFIG_SOURCE_MODE.cs │ ├── User32+DISPLAYCONFIG_TARGET_MODE.cs │ ├── User32+DISPLAYCONFIG_TOPOLOGY_ID.cs │ ├── User32+DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY.cs │ ├── User32+DISPLAYCONFIG_VIDEO_SIGNAL_INFO.cs │ ├── User32+DISPLAYCONFIG__TARGET_MODE_INFO.cs │ ├── User32+DLGITEMTEMPLATE.cs │ ├── User32+DLGTEMPLATE.cs │ ├── User32+DPI_AWARENESS.cs │ ├── User32+DPI_HOSTING_BEHAVIOR.cs │ ├── User32+DRAWTEXTPARAMS.cs │ ├── User32+DesktopCreationFlags.cs │ ├── User32+DeviceContextValues.cs │ ├── User32+EnumDisplayDevicesFlags.cs │ ├── User32+EnumDisplaySettingsExFlags.cs │ ├── User32+FLASHWINFO.cs │ ├── User32+FlashWindowFlags.cs │ ├── User32+GetAncestorFlags.cs │ ├── User32+GetMenuDefaultItemFlags.cs │ ├── User32+GetMenuStateFlags.cs │ ├── User32+GetNextWindowCommands.cs │ ├── User32+GetWindowCommands.cs │ ├── User32+HARDWAREINPUT.cs │ ├── User32+HELPINFO.cs │ ├── User32+ICONINFO.cs │ ├── User32+INPUT.cs │ ├── User32+Icons.cs │ ├── User32+ImageType.cs │ ├── User32+InputType.cs │ ├── User32+KEYBDINPUT.cs │ ├── User32+KEYEVENTF.cs │ ├── User32+LASTINPUTINFO.cs │ ├── User32+LUID.cs │ ├── User32+LoadImageFlags.cs │ ├── User32+LookupIconIdFromDirectoryExFlags.cs │ ├── User32+MENUBARINFO.cs │ ├── User32+MENUINFO.cs │ ├── User32+MENUITEMINFO.cs │ ├── User32+MONITORINFO.cs │ ├── User32+MONITORINFOEX.cs │ ├── User32+MONITORINFO_Flags.cs │ ├── User32+MOUSEEVENTF.cs │ ├── User32+MOUSEINPUT.cs │ ├── User32+MSG.cs │ ├── User32+MSGBOXPARAMS.cs │ ├── User32+MapVirtualKeyTranslation.cs │ ├── User32+MenuInfoMask.cs │ ├── User32+MenuInfoStyle.cs │ ├── User32+MenuItemFlags.cs │ ├── User32+MenuItemState.cs │ ├── User32+MenuItemType.cs │ ├── User32+MenuMembersMask.cs │ ├── User32+MenuObject.cs │ ├── User32+MesageBoxOptions.cs │ ├── User32+MessageBeepType.cs │ ├── User32+MessageBoxResult.cs │ ├── User32+MonitorOptions.cs │ ├── User32+MsgWaitForMultipleObjectsExFlags.cs │ ├── User32+ObjectIinformationFlag.cs │ ├── User32+PAINTSTRUCT.cs │ ├── User32+PeekMessageParams.cs │ ├── User32+PeekMessageRemoveFlags.cs │ ├── User32+PrintWindowFlags.cs │ ├── User32+QueueStatusFlags.cs │ ├── User32+SafeCursorHandle.cs │ ├── User32+SafeDCHandle.cs │ ├── User32+SafeDesktopHandle.cs │ ├── User32+SafeEventHookHandle.cs │ ├── User32+SafeHookHandle.cs │ ├── User32+SafeWindowStationHandle.cs │ ├── User32+ScanCode.cs │ ├── User32+SendMessageTimeoutFlags.cs │ ├── User32+SetWindowLongFlags.cs │ ├── User32+SetWindowPosFlags.cs │ ├── User32+SpecialWindowHandles.cs │ ├── User32+SysCommands.cs │ ├── User32+SystemMetric.cs │ ├── User32+SystemParametersInfoAction.cs │ ├── User32+SystemParametersInfoFlags.cs │ ├── User32+TextFormats.cs │ ├── User32+USEROBJECTFLAGS.cs │ ├── User32+UserObjectFlagsEnum.cs │ ├── User32+VirtualKey.cs │ ├── User32+WINDOWINFO.cs │ ├── User32+WINDOWPLACEMENT.cs │ ├── User32+WINMAXINFO.cs │ ├── User32+WNDCLASS.cs │ ├── User32+WNDCLASSEX.cs │ ├── User32+WakeMask.cs │ ├── User32+WindowLongIndexFlags.cs │ ├── User32+WindowMessage.cs │ ├── User32+WindowPlacementFlags.cs │ ├── User32+WindowShowStyle.cs │ ├── User32+WindowStationCreationFlags.cs │ ├── User32+WindowStyles+ButtonWindowStyles.cs │ ├── User32+WindowStyles+ComboBoxWindowStyles.cs │ ├── User32+WindowStyles+DialogWindowStyles.cs │ ├── User32+WindowStyles+EditControlWindowStyles.cs │ ├── User32+WindowStyles+ListBoxWindowStyles.cs │ ├── User32+WindowStyles+ProgressBarWindowStyles.cs │ ├── User32+WindowStyles+ScrollBarWindowStyles.cs │ ├── User32+WindowStyles+StaticControlWindowStyles.cs │ ├── User32+WindowStyles.cs │ ├── User32+WindowStylesEx.cs │ ├── User32+WindowsEventHookFlags.cs │ ├── User32+WindowsEventHookType.cs │ ├── User32+WindowsHookType.cs │ ├── User32+mouse_eventFlags.cs │ ├── User32.Helpers.cs │ ├── User32.cs │ ├── User32.csproj │ └── User32.exports.txt ├── Userenv │ ├── PublicAPI.Shipped.txt │ ├── PublicAPI.Unshipped.txt │ ├── Userenv.Helpers.cs │ ├── Userenv.cs │ ├── Userenv.csproj │ └── Userenv.exports.txt ├── UxTheme │ ├── PublicAPI.Shipped.txt │ ├── PublicAPI.Unshipped.txt │ ├── UxTheme+MARGINS.cs │ ├── UxTheme+SafeThemeHandle.cs │ ├── UxTheme.Helpers.cs │ ├── UxTheme.cs │ ├── UxTheme.csproj │ └── UxTheme.exports.txt ├── Win32 │ └── Win32.csproj ├── WinUsb │ ├── PublicAPI.Shipped.txt │ ├── PublicAPI.Unshipped.txt │ ├── WinUsb+SafeUsbHandle.cs │ ├── WinUsb+USBD_PIPE_TYPE.cs │ ├── WinUsb+WINUSB_PIPE_INFORMATION.cs │ ├── WinUsb+WinUsbOverlapped.cs │ ├── WinUsb.Helpers.cs │ ├── WinUsb.cs │ ├── WinUsb.csproj │ └── winusb.exports.txt ├── Windows.Core │ ├── ApiSets.cs │ ├── COORD.cs │ ├── Constants.cs │ ├── DEVMODE.cs │ ├── DISPLAY_DEVICE+DisplayDeviceFlags.cs │ ├── DISPLAY_DEVICE.cs │ ├── HResult+Code.cs │ ├── HResult+FacilityCode.cs │ ├── HResult+SeverityCode.cs │ ├── HResult.cs │ ├── IMAGE_DATA_DIRECTORY.cs │ ├── IMAGE_FILE_HEADER+CharacteristicsType.cs │ ├── IMAGE_FILE_HEADER+MachineType.cs │ ├── IMAGE_FILE_HEADER.cs │ ├── IMAGE_NT_HEADERS.cs │ ├── IMAGE_OPTIONAL_HEADER+DllCharacteristicsType.cs │ ├── IMAGE_OPTIONAL_HEADER+MagicType.cs │ ├── IMAGE_OPTIONAL_HEADER+SubsystemType.cs │ ├── IMAGE_OPTIONAL_HEADER.cs │ ├── IMAGE_OPTIONAL_HEADER_DIRECTORIES.cs │ ├── IMAGE_SECTION_HEADER+CharacteristicsType.cs │ ├── IMAGE_SECTION_HEADER.cs │ ├── LIST_ENTRY.cs │ ├── NTStatus+Code.cs │ ├── NTStatus+FacilityCode.cs │ ├── NTStatus+SeverityCode.cs │ ├── NTStatus.cs │ ├── PInvokeExtensions.cs │ ├── POINT.cs │ ├── PublicAPI.Shipped.txt │ ├── PublicAPI.Unshipped.txt │ ├── RECT.cs │ ├── SMALL_RECT.cs │ ├── SafeHandleZeroOrMinusOneIsInvalid.cs │ ├── Win32ErrorCode.cs │ └── Windows.Core.csproj ├── Windows.ShellScalingApi │ ├── PublicAPI.Shipped.txt │ ├── PublicAPI.Unshipped.txt │ ├── ShellScalingApi.cs │ ├── ShellScallingApi+DEVICE_SCALE_FACTOR.cs │ ├── ShellScallingApi+MONITOR_DPI_TYPE.cs │ ├── ShellScallingApi+PROCESS_DPI_AWARENESS.cs │ ├── ShellScallingApi+SHELL_UI_COMPONENT.cs │ └── Windows.ShellScalingApi.csproj └── WtsApi32 │ ├── PublicAPI.Shipped.txt │ ├── PublicAPI.Unshipped.txt │ ├── WtsApi32+SafeTerminalServerHandle.cs │ ├── WtsApi32+WTS_CONNECTSTATE_CLASS.cs │ ├── WtsApi32+WTS_SESSION_INFO.cs │ ├── WtsApi32.cs │ ├── WtsApi32.csproj │ └── WtsApi32.exports.txt ├── strongname.snk ├── stylecop.json ├── templates ├── AddNewCoreLibrary.ps1 ├── AddNewLibrary.ps1 ├── CreateExportsTxtFile.ps1 ├── LIBNAME.Tests │ ├── LIBNAME.Tests.csproj │ └── LIBNAMEFacts.cs ├── LIBNAME │ ├── LIBNAME.Helpers.cs │ ├── LIBNAME.cs │ ├── LIBNAME.csproj │ ├── PublicAPI.Shipped.txt │ └── PublicAPI.Unshipped.txt └── Replace-Placeholders.ps1 ├── test ├── .editorconfig ├── AdvApi32.Tests │ ├── AdvApi32.Tests.csproj │ └── AdvApi32Facts.cs ├── BCrypt.Tests │ ├── BCrypt.Tests.csproj │ └── BCryptFacts.cs ├── Cabinet.Tests │ ├── Cabinet.Tests.csproj │ ├── CabinetFacts.cs │ ├── app.config │ └── demo.CAB ├── CfgMgr32.Tests │ ├── CfgMgr32.Tests.csproj │ └── CfgMgr32Facts.cs ├── Crypt32.Tests │ ├── Crypt32.Tests.csproj │ ├── Crypt32Facts.cs │ └── protectedPair.pfx ├── DbgHelp.Tests │ ├── DbgHelp.Tests.csproj │ └── DbgHelpFacts.cs ├── Directory.Build.props ├── Directory.Build.targets ├── DwmApi.Tests │ ├── DwmApi.Tests.csproj │ └── DwmApiFacts.cs ├── Fusion.Tests │ ├── Fusion.Tests.csproj │ └── FusionFacts.cs ├── Hid.Tests │ ├── Hid.Tests.csproj │ └── HidFacts.cs ├── IPHlpApi.Tests │ ├── IPHlpApi.Tests.csproj │ └── IPHlpApiFacts.cs ├── ImageHlp.Tests │ ├── ImageHlp.Tests.csproj │ └── ImageHlpFacts.cs ├── Kernel32.Tests │ ├── Kernel32.Tests.csproj │ ├── Kernel32ExtensionsFacts.cs │ ├── Kernel32Facts.cs │ ├── NTStatusExceptionFacts.cs │ ├── UseCultureAttribute.cs │ ├── Win32ExceptionFacts.cs │ └── storebanned │ │ ├── IgnoreOnOsVersionUnderFactAttribute.cs │ │ ├── Kernel32ExtensionsFacts.cs │ │ └── Kernel32Facts.cs ├── MSCorEE.Tests │ ├── Keys │ │ ├── keypair.snk │ │ └── public.snk │ ├── MSCorEE.Tests.csproj │ └── MSCorEEFacts.cs ├── Magnification.Tests │ ├── Magnification.Tests.csproj │ └── MagnificationFacts.cs ├── Msi.Tests │ ├── Msi.Tests.csproj │ └── MsiFacts.cs ├── NCrypt.Tests │ ├── NCrypt.Tests.csproj │ ├── NCryptExtensionsFacts.cs │ ├── NCryptFacts.cs │ └── SecurityStatusExceptionFacts.cs ├── NTDll.Tests │ ├── NTDll.Tests.csproj │ └── NTDllFacts.cs ├── NetApi32.Tests │ ├── NetApi32.Tests.csproj │ └── NetApi32Facts.cs ├── NewDev.Tests │ ├── NewDev.Tests.csproj │ └── NewDevFacts.cs ├── Ole32.Tests │ ├── Ole32.Tests.csproj │ └── Ole32Facts.cs ├── Psapi.Tests │ ├── Psapi.Tests.csproj │ └── PsapiFacts.cs ├── SHCore.Tests │ ├── SHCore.Tests.csproj │ └── SHCoreFacts.cs ├── SetupApi.Tests │ ├── SP_DEVINFO_DATAFacts.cs │ ├── SP_DEVINSTALL_PARAMSFacts.cs │ ├── SP_DRVINFO_DATAFacts.cs │ ├── SP_DRVINFO_DETAIL_DATAFacts.cs │ ├── SetupApi.Tests.csproj │ └── SetupApiFacts.cs ├── Shell32.Tests │ ├── Shell32.Tests.csproj │ └── Shell32Facts.cs ├── User32.Tests │ ├── User32.Tests.csproj │ ├── User32Facts+EnumDisplaySettingsFacts.cs │ ├── User32Facts+HwndSubClass.cs │ ├── User32Facts+WindowMessage.cs │ └── User32Facts.cs ├── Userenv.Tests │ ├── Userenv.Tests.csproj │ └── UserenvFacts.cs ├── UxTheme.Tests │ ├── UxTheme.Tests.csproj │ └── UxThemeFacts.cs ├── WinUsb.Tests │ ├── WinUsb.Tests.csproj │ └── WinUsbFacts.cs ├── Windows.Core.Tests │ ├── HResultFacts.cs │ ├── NTStatusFacts.cs │ ├── PInvokeExtensionsFacts.cs │ └── Windows.Core.Tests.csproj └── WtsApi32.Tests │ ├── WtsApi32.Tests.csproj │ └── WtsApi32Facts.cs ├── tools ├── Check-DotNetRuntime.ps1 ├── Check-DotNetSdk.ps1 ├── Create-PInvokeTxtFile.ps1 ├── Get-CoverageReport.ps1 ├── Get-Shield.ps1 ├── Get-Shields.ps1 ├── Install-DotNetSdk.ps1 ├── Install-NuGetCredProvider.ps1 ├── PromoteUnshippedAPIs.ps1 └── Set-EnvVars.ps1 └── version.json /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: aarnott 2 | custom: https://keybase.io/aarnott 3 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Please see the documentation for all configuration options: 2 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 3 | 4 | version: 2 5 | updates: 6 | - package-ecosystem: nuget 7 | directory: / 8 | schedule: 9 | interval: monthly 10 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. 3 | // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp 4 | // List of extensions which should be recommended for users of this workspace. 5 | "recommendations": [ 6 | "ms-azure-devops.azure-pipelines", 7 | "ms-dotnettools.csharp", 8 | "k--kato.docomment", 9 | "editorconfig.editorconfig", 10 | "pflannery.vscode-versionlens", 11 | "davidanson.vscode-markdownlint", 12 | "dotjoshjohnson.xml", 13 | "ms-vscode-remote.remote-containers", 14 | "ms-azuretools.vscode-docker" 15 | ], 16 | // List of extensions recommended by VS Code that should not be recommended for users of this workspace. 17 | "unwantedRecommendations": [] 18 | } 19 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.trimTrailingWhitespace": true, 3 | "files.insertFinalNewline": true, 4 | "files.trimFinalNewlines": true, 5 | "omnisharp.enableEditorConfigSupport": true, 6 | "omnisharp.enableImportCompletion": true, 7 | "omnisharp.enableRoslynAnalyzers": true 8 | } 9 | -------------------------------------------------------------------------------- /.vsconfig: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "components": [ 4 | "Microsoft.Net.Component.4.7.2.SDK", 5 | "Microsoft.Net.Component.4.7.2.TargetingPack", 6 | "Microsoft.NetCore.Component.SDK", 7 | "Microsoft.VisualStudio.Component.Windows10SDK.18362", 8 | "Microsoft.VisualStudio.Workload.ManagedDesktop", 9 | "Microsoft.VisualStudio.Workload.Universal", 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /CODE-OF-CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | This project has adopted the code of conduct defined by the Contributor Covenant 4 | to clarify expected behavior in our community. 5 | 6 | For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct). 7 | -------------------------------------------------------------------------------- /CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | # Contributors 2 | 3 | Contributors to the P/Invoke library can be authoritatively enumerated 4 | by reviewing git history. 5 | 6 | A list of contributors sharing a copyright interest are listed below: 7 | 8 | | Name | Email | Link | 9 | | ---- | ----- | ---- | 10 | | Andrew Arnott | andrewarnott@gmail.com | http://github.com/aarnott 11 | | Mathias Lykkegaard Lorenzen | mathias.lorenzen@live.com | https://github.com/ffMathy 12 | | Julien Roncaglia | julien@roncaglia.fr | https://github.com/vbfox 13 | -------------------------------------------------------------------------------- /Directory.Build.rsp: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------ 2 | # This file contains command-line options that MSBuild will process as part of 3 | # every build, unless the "/noautoresponse" switch is specified. 4 | # 5 | # MSBuild processes the options in this file first, before processing the 6 | # options on the command line. As a result, options on the command line can 7 | # override the options in this file. However, depending on the options being 8 | # set, the overriding can also result in conflicts. 9 | # 10 | # NOTE: The "/noautoresponse" switch cannot be specified in this file, nor in 11 | # any response file that is referenced by this file. 12 | #------------------------------------------------------------------------------ 13 | /nr:false 14 | /m 15 | /verbosity:minimal 16 | /clp:Summary;ForceNoAlign 17 | -------------------------------------------------------------------------------- /azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | trigger: 2 | batch: true 3 | branches: 4 | include: 5 | - main 6 | - 'validate/*' 7 | paths: 8 | exclude: 9 | - doc/ 10 | - '*.md' 11 | - .vscode/ 12 | - .github/ 13 | - azure-pipelines/release.yml 14 | 15 | parameters: 16 | - name: RunTests 17 | displayName: Run tests 18 | type: boolean 19 | default: true 20 | 21 | variables: 22 | TreatWarningsAsErrors: true 23 | DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true 24 | BuildConfiguration: Release 25 | codecov_token: 4dc9e7e2-6b01-4932-a180-847b52b43d35 # Get a new one from https://codecov.io/ 26 | ci_feed: https://pkgs.dev.azure.com/andrewarnott/OSS/_packaging/PublicCI/nuget/v3/index.json 27 | NUGET_PACKAGES: $(Agent.TempDirectory)/.nuget/packages/ 28 | GeneratePInvokesTxt: true 29 | 30 | jobs: 31 | - template: azure-pipelines/build.yml 32 | parameters: 33 | RunTests: ${{ parameters.RunTests }} 34 | -------------------------------------------------------------------------------- /azure-pipelines/Get-ArtifactsStagingDirectory.ps1: -------------------------------------------------------------------------------- 1 | Param( 2 | [switch]$CleanIfLocal 3 | ) 4 | if ($env:BUILD_ARTIFACTSTAGINGDIRECTORY) { 5 | $ArtifactStagingFolder = $env:BUILD_ARTIFACTSTAGINGDIRECTORY 6 | } elseif ($env:RUNNER_TEMP) { 7 | $ArtifactStagingFolder = "$env:RUNNER_TEMP\_artifacts" 8 | } else { 9 | $ArtifactStagingFolder = [System.IO.Path]::GetFullPath("$PSScriptRoot/../obj/_artifacts") 10 | if ($CleanIfLocal -and (Test-Path $ArtifactStagingFolder)) { 11 | Remove-Item $ArtifactStagingFolder -Recurse -Force 12 | } 13 | } 14 | 15 | $ArtifactStagingFolder 16 | -------------------------------------------------------------------------------- /azure-pipelines/Get-NuGetTool.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Downloads the NuGet.exe tool and returns the path to it. 4 | .PARAMETER NuGetVersion 5 | The version of the NuGet tool to acquire. 6 | #> 7 | Param( 8 | [Parameter()] 9 | [string]$NuGetVersion='5.2.0' 10 | ) 11 | 12 | $toolsPath = & "$PSScriptRoot\Get-TempToolsPath.ps1" 13 | $binaryToolsPath = Join-Path $toolsPath $NuGetVersion 14 | if (!(Test-Path $binaryToolsPath)) { $null = mkdir $binaryToolsPath } 15 | $nugetPath = Join-Path $binaryToolsPath nuget.exe 16 | 17 | if (!(Test-Path $nugetPath)) { 18 | Write-Host "Downloading nuget.exe $NuGetVersion..." -ForegroundColor Yellow 19 | (New-Object System.Net.WebClient).DownloadFile("https://dist.nuget.org/win-x86-commandline/v$NuGetVersion/NuGet.exe", $nugetPath) 20 | } 21 | 22 | return (Resolve-Path $nugetPath).Path 23 | -------------------------------------------------------------------------------- /azure-pipelines/Get-ProcDump.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Downloads 32-bit and 64-bit procdump executables and returns the path to where they were installed. 4 | #> 5 | $version = '0.0.1' 6 | $baseDir = "$PSScriptRoot\..\obj\tools" 7 | $procDumpToolPath = "$baseDir\procdump.$version\bin" 8 | if (-not (Test-Path $procDumpToolPath)) { 9 | if (-not (Test-Path $baseDir)) { New-Item -Type Directory -Path $baseDir | Out-Null } 10 | $baseDir = (Resolve-Path $baseDir).Path # Normalize it 11 | & (& $PSScriptRoot\Get-NuGetTool.ps1) install procdump -version $version -PackageSaveMode nuspec -OutputDirectory $baseDir -Source https://api.nuget.org/v3/index.json | Out-Null 12 | } 13 | 14 | (Resolve-Path $procDumpToolPath).Path 15 | -------------------------------------------------------------------------------- /azure-pipelines/Get-TempToolsPath.ps1: -------------------------------------------------------------------------------- 1 | if ($env:AGENT_TEMPDIRECTORY) { 2 | $path = "$env:AGENT_TEMPDIRECTORY\$env:BUILD_BUILDID" 3 | } elseif ($env:localappdata) { 4 | $path = "$env:localappdata\gitrepos\tools" 5 | } else { 6 | $path = "$PSScriptRoot\..\obj\tools" 7 | } 8 | 9 | if (!(Test-Path $path)) { 10 | New-Item -ItemType Directory -Path $Path | Out-Null 11 | } 12 | 13 | (Resolve-Path $path).Path 14 | -------------------------------------------------------------------------------- /azure-pipelines/Get-nbgv.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the path to the nbgv CLI tool, installing it if necessary. 4 | #> 5 | Param( 6 | ) 7 | 8 | $existingTool = Get-Command "nbgv" -ErrorAction SilentlyContinue 9 | if ($existingTool) { 10 | return $existingTool.Path 11 | } 12 | 13 | $toolInstallDir = & "$PSScriptRoot/Get-TempToolsPath.ps1" 14 | 15 | $toolPath = "$toolInstallDir/nbgv" 16 | if (!(Test-Path $toolInstallDir)) { New-Item -Path $toolInstallDir -ItemType Directory | Out-Null } 17 | 18 | if (!(Get-Command $toolPath -ErrorAction SilentlyContinue)) { 19 | Write-Host "Installing nbgv to $toolInstallDir" 20 | dotnet tool install --tool-path "$toolInstallDir" nbgv --configfile "$PSScriptRoot/justnugetorg.nuget.config" | Out-Null 21 | } 22 | 23 | # Normalize the path on the way out. 24 | return (Get-Command $toolPath).Path 25 | -------------------------------------------------------------------------------- /azure-pipelines/Get-pandoc.ps1: -------------------------------------------------------------------------------- 1 | $nuget = & "$PSScriptRoot\Get-NuGetTool.ps1" 2 | $PandocVersion = "2.1.0" 3 | $PandocExePath = "$PSScriptRoot\..\packages\Pandoc.Windows.$PandocVersion\tools\Pandoc\pandoc.exe" 4 | if (!(Test-Path $PandocExePath)) { 5 | & $nuget install Pandoc.Windows -version $PandocVersion -Source https://api.nuget.org/v3/index.json | Out-Null 6 | } 7 | 8 | Resolve-Path "$PSScriptRoot\..\packages\Pandoc.Windows.$PandocVersion\tools\Pandoc\pandoc.exe" 9 | -------------------------------------------------------------------------------- /azure-pipelines/SignClient.json: -------------------------------------------------------------------------------- 1 | { 2 | "SignClient": { 3 | "AzureAd": { 4 | "AADInstance": "https://login.microsoftonline.com/", 5 | "ClientId": "c248d68a-ba6f-4aa9-8a68-71fe872063f8", 6 | "TenantId": "16076fdc-fcc1-4a15-b1ca-32c9a255900e" 7 | }, 8 | "Service": { 9 | "Url": "https://codesign.dotnetfoundation.org/", 10 | "ResourceId": "https://SignService/3c30251f-36f3-490b-a955-520addb85001" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /azure-pipelines/artifacts/build_logs.ps1: -------------------------------------------------------------------------------- 1 | $ArtifactStagingFolder = & "$PSScriptRoot/../Get-ArtifactsStagingDirectory.ps1" 2 | 3 | if (!(Test-Path $ArtifactStagingFolder/build_logs)) { return } 4 | 5 | @{ 6 | "$ArtifactStagingFolder/build_logs" = (Get-ChildItem -Recurse "$ArtifactStagingFolder/build_logs") 7 | } 8 | -------------------------------------------------------------------------------- /azure-pipelines/artifacts/coverageResults.ps1: -------------------------------------------------------------------------------- 1 | $RepoRoot = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\..") 2 | 3 | $coverageFiles = @(Get-ChildItem "$RepoRoot/test/*.cobertura.xml" -Recurse | Where {$_.FullName -notlike "*/In/*" -and $_.FullName -notlike "*\In\*" }) 4 | 5 | # Prepare code coverage reports for merging on another machine 6 | if ($env:SYSTEM_DEFAULTWORKINGDIRECTORY) { 7 | Write-Host "Substituting $env:SYSTEM_DEFAULTWORKINGDIRECTORY with `"{reporoot}`"" 8 | $coverageFiles |% { 9 | $content = Get-Content -Path $_ |% { $_ -Replace [regex]::Escape($env:SYSTEM_DEFAULTWORKINGDIRECTORY), "{reporoot}" } 10 | Set-Content -Path $_ -Value $content -Encoding UTF8 11 | } 12 | } else { 13 | Write-Warning "coverageResults: Azure Pipelines not detected. Machine-neutral token replacement skipped." 14 | } 15 | 16 | if (!((Test-Path $RepoRoot\bin) -and (Test-Path $RepoRoot\obj))) { return } 17 | 18 | @{ 19 | $RepoRoot = ( 20 | $coverageFiles + 21 | (Get-ChildItem "$RepoRoot\obj\*.cs" -Recurse) 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /azure-pipelines/artifacts/deployables.ps1: -------------------------------------------------------------------------------- 1 | $RepoRoot = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\..") 2 | $BuildConfiguration = $env:BUILDCONFIGURATION 3 | if (!$BuildConfiguration) { 4 | $BuildConfiguration = 'Debug' 5 | } 6 | 7 | $PackagesRoot = "$RepoRoot/bin/$BuildConfiguration/Packages" 8 | 9 | if (!(Test-Path $PackagesRoot)) { return } 10 | 11 | @{ 12 | "$PackagesRoot" = (Get-ChildItem $PackagesRoot -Recurse) 13 | } 14 | -------------------------------------------------------------------------------- /azure-pipelines/artifacts/pinvoke_coverage_report.ps1: -------------------------------------------------------------------------------- 1 | $RepoRoot = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\..") 2 | $BuildConfiguration = $env:BUILDCONFIGURATION 3 | if (!$BuildConfiguration) { 4 | $BuildConfiguration = 'Debug' 5 | } 6 | 7 | $binRoot = "$RepoRoot\bin\$BuildConfiguration" 8 | 9 | & "$PSScriptRoot\..\..\tools\Get-CoverageReport.ps1" -NoBuild -Configuration $env:configuration -OutFile "$binRoot\coverage.md" 10 | 11 | & (& "$PSScriptRoot\..\Get-pandoc.ps1") -f markdown -t html "$binRoot\coverage.md" -o "$binRoot\coverage.html" 12 | 13 | @{ 14 | $binRoot = Get-ChildItem "$binRoot\coverage.html","$binRoot\coverage.md"; 15 | } 16 | -------------------------------------------------------------------------------- /azure-pipelines/artifacts/pinvoke_method_coverage.ps1: -------------------------------------------------------------------------------- 1 | $RepoRoot = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\..") 2 | $BuildConfiguration = $env:BUILDCONFIGURATION 3 | if (!$BuildConfiguration) { 4 | $BuildConfiguration = 'Debug' 5 | } 6 | 7 | $binRoot = "$RepoRoot\bin\$BuildConfiguration\net45" 8 | if (Test-Path $binRoot) { 9 | $pinvokes = Get-ChildItem "$binRoot\*.pinvokes.txt","$binRoot\*.exports.txt" -rec |? { $_.directory -notmatch 'tests' } 10 | 11 | @{ 12 | "$binRoot" = $pinvokes 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /azure-pipelines/artifacts/projectAssetsJson.ps1: -------------------------------------------------------------------------------- 1 | $ObjRoot = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\..\obj") 2 | 3 | if (!(Test-Path $ObjRoot)) { return } 4 | 5 | @{ 6 | "$ObjRoot" = ( 7 | (Get-ChildItem "$ObjRoot\project.assets.json" -Recurse) 8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /azure-pipelines/artifacts/symbols.ps1: -------------------------------------------------------------------------------- 1 | $BinPath = [System.IO.Path]::GetFullPath("$PSScriptRoot/../../bin") 2 | if (!(Test-Path $BinPath)) { return } 3 | $symbolfiles = & "$PSScriptRoot/../Get-SymbolFiles.ps1" -Path $BinPath | Get-Unique 4 | 5 | @{ 6 | "$BinPath" = $SymbolFiles; 7 | } 8 | -------------------------------------------------------------------------------- /azure-pipelines/artifacts/testResults.ps1: -------------------------------------------------------------------------------- 1 | [CmdletBinding()] 2 | Param( 3 | ) 4 | 5 | $result = @{} 6 | 7 | $testRoot = Resolve-Path "$PSScriptRoot\..\..\test" 8 | $result[$testRoot] = (Get-ChildItem "$testRoot\TestResults" -Recurse -Directory | Get-ChildItem -Recurse -File) 9 | 10 | $testlogsPath = "$env:BUILD_ARTIFACTSTAGINGDIRECTORY\test_logs" 11 | if (Test-Path $testlogsPath) { 12 | $result[$testlogsPath] = Get-ChildItem "$testlogsPath\*"; 13 | } 14 | 15 | $result 16 | -------------------------------------------------------------------------------- /azure-pipelines/artifacts/test_symbols.ps1: -------------------------------------------------------------------------------- 1 | $BinPath = [System.IO.Path]::GetFullPath("$PSScriptRoot/../../bin") 2 | if (!(Test-Path $BinPath)) { return } 3 | $symbolfiles = & "$PSScriptRoot/../Get-SymbolFiles.ps1" -Path $BinPath -Tests | Get-Unique 4 | 5 | @{ 6 | "$BinPath" = $SymbolFiles; 7 | } 8 | -------------------------------------------------------------------------------- /azure-pipelines/build.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | - name: windowsPool 3 | type: object 4 | default: 5 | vmImage: windows-2022 6 | - name: RunTests 7 | type: boolean 8 | default: true 9 | 10 | jobs: 11 | - job: Windows 12 | pool: ${{ parameters.windowsPool }} 13 | variables: 14 | - group: pinvoke code signing 15 | steps: 16 | - checkout: self 17 | fetchDepth: 0 # avoid shallow clone so nbgv can do its work. 18 | clean: true 19 | - template: install-dependencies.yml 20 | 21 | - powershell: '& (./azure-pipelines/Get-nbgv.ps1) cloud -c' 22 | displayName: ⚙ Set build number 23 | 24 | - template: dotnet.yml 25 | parameters: 26 | RunTests: ${{ parameters.RunTests }} 27 | 28 | - template: publish-symbols.yml 29 | - template: publish-deployables.yml 30 | -------------------------------------------------------------------------------- /azure-pipelines/install-dependencies.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | initArgs: 3 | 4 | steps: 5 | 6 | - task: NuGetAuthenticate@1 7 | displayName: 🔏 Authenticate NuGet feeds 8 | inputs: 9 | forceReinstallCredentialProvider: true 10 | 11 | - powershell: | 12 | $AccessToken = '$(System.AccessToken)' # Avoid specifying the access token directly on the init.ps1 command line to avoid it showing up in errors 13 | .\init.ps1 -AccessToken $AccessToken ${{ parameters['initArgs'] }} -UpgradePrerequisites -NoNuGetCredProvider 14 | dotnet --info 15 | 16 | # Print mono version if it is present. 17 | if (Get-Command mono -ErrorAction SilentlyContinue) { 18 | mono --version 19 | } 20 | displayName: ⚙ Install prerequisites 21 | 22 | - powershell: azure-pipelines/variables/_pipelines.ps1 23 | failOnStderr: true 24 | displayName: ⚙ Set pipeline variables based on source 25 | name: SetPipelineVariables 26 | -------------------------------------------------------------------------------- /azure-pipelines/justnugetorg.nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /azure-pipelines/publish-CodeCov.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Uploads code coverage to codecov.io 4 | .PARAMETER CodeCovToken 5 | Code coverage token to use 6 | .PARAMETER PathToCodeCoverage 7 | Path to root of code coverage files 8 | .PARAMETER Name 9 | Name to upload with codecoverge 10 | .PARAMETER Flags 11 | Flags to upload with codecoverge 12 | #> 13 | [CmdletBinding()] 14 | Param ( 15 | [Parameter(Mandatory=$true)] 16 | [string]$CodeCovToken, 17 | [Parameter(Mandatory=$true)] 18 | [string]$PathToCodeCoverage, 19 | [string]$Name, 20 | [string]$Flags 21 | ) 22 | 23 | $RepoRoot = (Resolve-Path "$PSScriptRoot/..").Path 24 | 25 | Get-ChildItem -Recurse -Path $PathToCodeCoverage -Filter "*.cobertura.xml" | % { 26 | $relativeFilePath = Resolve-Path -relative $_.FullName 27 | 28 | Write-Host "Uploading: $relativeFilePath" -ForegroundColor Yellow 29 | & (& "$PSScriptRoot/Get-CodeCovTool.ps1") -t $CodeCovToken -f $relativeFilePath -R $RepoRoot -F $Flags -n $Name 30 | } 31 | -------------------------------------------------------------------------------- /azure-pipelines/publish-codecoverage.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - download: current 3 | artifact: coverageResults-Windows 4 | displayName: 🔻 Download Windows code coverage results 5 | continueOnError: true 6 | - powershell: azure-pipelines/Merge-CodeCoverage.ps1 -Path '$(Pipeline.Workspace)' -OutputFile coveragereport/merged.cobertura.xml -Format Cobertura -Verbose 7 | displayName: ⚙ Merge coverage 8 | - task: PublishCodeCoverageResults@1 9 | displayName: 📢 Publish code coverage results to Azure DevOps 10 | inputs: 11 | codeCoverageTool: cobertura 12 | summaryFileLocation: coveragereport/merged.cobertura.xml 13 | failIfCoverageEmpty: true 14 | -------------------------------------------------------------------------------- /azure-pipelines/publish-deployables.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: 3 | - powershell: dotnet nuget push "$(Resolve-Path '$(Build.ArtifactStagingDirectory)\deployables-Windows\')*.nupkg" -s $(ci_feed) -k azdo --skip-duplicate 4 | displayName: 📦 Push packages to CI feed 5 | condition: and(succeeded(), ne(variables['ci_feed'], '')) 6 | -------------------------------------------------------------------------------- /azure-pipelines/publish-symbols.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - task: PublishSymbols@2 3 | inputs: 4 | SymbolsFolder: $(Build.ArtifactStagingDirectory)/symbols-$(Agent.JobName) 5 | SearchPattern: '**/*.pdb' 6 | IndexSources: false 7 | SymbolServerType: TeamServices 8 | displayName: 📢 Publish symbols 9 | 10 | - task: PublishSymbols@2 11 | inputs: 12 | SymbolsFolder: $(Build.ArtifactStagingDirectory)/test_symbols-$(Agent.JobName) 13 | SearchPattern: '**/*.pdb' 14 | IndexSources: false 15 | SymbolServerType: TeamServices 16 | displayName: 📢 Publish test symbols 17 | -------------------------------------------------------------------------------- /azure-pipelines/signfiles.txt: -------------------------------------------------------------------------------- 1 | **/PInvoke.*.dll 2 | -------------------------------------------------------------------------------- /azure-pipelines/variables/DotNetSdkVersion.ps1: -------------------------------------------------------------------------------- 1 | $globalJson = Get-Content -Path "$PSScriptRoot\..\..\global.json" | ConvertFrom-Json 2 | $globalJson.sdk.version 3 | -------------------------------------------------------------------------------- /azure-pipelines/variables/_all.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | 3 | <# 4 | .SYNOPSIS 5 | This script returns a hashtable of build variables that should be set 6 | at the start of a build or release definition's execution. 7 | #> 8 | 9 | [CmdletBinding(SupportsShouldProcess = $true)] 10 | param ( 11 | ) 12 | 13 | $vars = @{} 14 | 15 | Get-ChildItem "$PSScriptRoot\*.ps1" -Exclude "_*" |% { 16 | Write-Host "Computing $($_.BaseName) variable" 17 | $vars[$_.BaseName] = & $_ 18 | } 19 | 20 | $vars 21 | -------------------------------------------------------------------------------- /build.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | SETLOCAL 3 | set PS1UnderCmd=1 4 | 5 | :: Get the datetime in a format that can go in a filename. 6 | set _my_datetime=%date%_%time% 7 | set _my_datetime=%_my_datetime: =_% 8 | set _my_datetime=%_my_datetime::=% 9 | set _my_datetime=%_my_datetime:/=_% 10 | set _my_datetime=%_my_datetime:.=_% 11 | set CmdEnvScriptPath=%temp%\envvarscript_%_my_datetime%.cmd 12 | 13 | powershell.exe -NoProfile -NoLogo -ExecutionPolicy bypass -Command "try { & '%~dpn0.ps1' %*; exit $LASTEXITCODE } catch { write-host $_; exit 1 }" 14 | 15 | :: Set environment variables in the parent cmd.exe process. 16 | IF EXIST "%CmdEnvScriptPath%" ( 17 | ENDLOCAL 18 | CALL "%CmdEnvScriptPath%" 19 | DEL "%CmdEnvScriptPath%" 20 | ) 21 | -------------------------------------------------------------------------------- /doc/NuGetPackageRestoreOption.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/doc/NuGetPackageRestoreOption.png -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "6.0.401", 4 | "rollForward": "patch", 5 | "allowPrerelease": false 6 | }, 7 | "msbuild-sdks": { 8 | "MSBuild.Sdk.Extras": "3.0.44" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /init.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | SETLOCAL 3 | set PS1UnderCmd=1 4 | 5 | :: Get the datetime in a format that can go in a filename. 6 | set _my_datetime=%date%_%time% 7 | set _my_datetime=%_my_datetime: =_% 8 | set _my_datetime=%_my_datetime::=% 9 | set _my_datetime=%_my_datetime:/=_% 10 | set _my_datetime=%_my_datetime:.=_% 11 | set CmdEnvScriptPath=%temp%\envvarscript_%_my_datetime%.cmd 12 | 13 | powershell.exe -NoProfile -NoLogo -ExecutionPolicy bypass -Command "try { & '%~dpn0.ps1' %*; exit $LASTEXITCODE } catch { write-host $_; exit 1 }" 14 | 15 | :: Set environment variables in the parent cmd.exe process. 16 | IF EXIST "%CmdEnvScriptPath%" ( 17 | ENDLOCAL 18 | CALL "%CmdEnvScriptPath%" 19 | DEL "%CmdEnvScriptPath%" 20 | ) 21 | -------------------------------------------------------------------------------- /lib/cordebug.tlb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/lib/cordebug.tlb -------------------------------------------------------------------------------- /lib/metahost.tlb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/lib/metahost.tlb -------------------------------------------------------------------------------- /lib/mscoree.tlb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/lib/mscoree.tlb -------------------------------------------------------------------------------- /nuget.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cs] 2 | dotnet_diagnostic.SA1307.severity = none 3 | dotnet_diagnostic.SA1310.severity = none 4 | dotnet_diagnostic.SA1313.severity = none 5 | dotnet_diagnostic.SA1600.severity = silent 6 | dotnet_diagnostic.SA1602.severity = silent 7 | dotnet_diagnostic.SA1629.severity = silent # info 8 | dotnet_diagnostic.SA1649.severity = silent # info 9 | -------------------------------------------------------------------------------- /src/AdvApi32/AdvApi32+CryptCreateHashFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class AdvApi32 12 | { 13 | /// 14 | /// Flags for the method. 15 | /// 16 | [Flags] 17 | public enum CryptCreateHashFlags : uint 18 | { 19 | /// 20 | /// No flags. 21 | /// 22 | None = 0x0, 23 | 24 | /// 25 | /// This flag is not used. 26 | /// 27 | CRYPT_SECRETDIGEST = 0x1, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/AdvApi32/AdvApi32+RegOpenKeyOptions.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public static partial class AdvApi32 12 | { 13 | /// 14 | /// Specifies the option to apply when opening the key in . 15 | /// 16 | [Flags] 17 | public enum RegOpenKeyOptions 18 | { 19 | /// 20 | /// No option specified 21 | /// 22 | None = 0, 23 | 24 | /// 25 | /// The key is a symbolic link. Registry symbolic links should only be used when absolutely necessary. 26 | /// 27 | REG_OPTION_OPEN_LINK = 0x00000008, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/AdvApi32/AdvApi32+SC_STATUS_TYPE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class AdvApi32 10 | { 11 | /// 12 | /// Specifies the information level for the method. 13 | /// 14 | public enum SC_STATUS_TYPE 15 | { 16 | /// 17 | /// Retrieves the service status information. 18 | /// 19 | SC_STATUS_PROCESS_INFO = 0, 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/AdvApi32/AdvApi32+ServiceDelayedAutoStartInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System.Runtime.InteropServices; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public static partial class AdvApi32 12 | { 13 | /// 14 | /// Contains the delayed auto-start setting of an auto-start service. 15 | /// 16 | public struct ServiceDelayedAutoStartInfo 17 | { 18 | /// 19 | /// If this member is TRUE, the service is started after other auto-start services are started plus a short delay. 20 | /// Otherwise, the service is started during system boot. 21 | /// This setting is ignored unless the service is an auto-start service. 22 | /// 23 | public bool fDelayedAutostart; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/AdvApi32/AdvApi32+ServiceDescription.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System.Runtime.InteropServices; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public static partial class AdvApi32 12 | { 13 | /// 14 | /// Contains a service description. 15 | /// 16 | public struct ServiceDescription 17 | { 18 | /// 19 | /// The description of the service. If this member is NULL, the description remains unchanged. 20 | /// If this value is an empty string (""), the current description is deleted. 21 | /// The service description must not exceed the size of a registry value of type REG_SZ. 22 | /// 23 | [MarshalAs(UnmanagedType.LPWStr)] 24 | public string lpDescription; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/AdvApi32/AdvApi32+ServiceLaunchProtected.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public static partial class AdvApi32 10 | { 11 | /// 12 | /// The protection type of the service. 13 | /// 14 | public enum ServiceLaunchProtected 15 | { 16 | SERVICE_LAUNCH_PROTECTED_NONE = 0, 17 | SERVICE_LAUNCH_PROTECTED_WINDOWS = 1, 18 | SERVICE_LAUNCH_PROTECTED_WINDOWS_LIGHT = 2, 19 | SERVICE_LAUNCH_PROTECTED_ANTIMALWARE_LIGHT = 3, 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/AdvApi32/AdvApi32+ServiceLaunchProtectedInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System.Runtime.InteropServices; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public static partial class AdvApi32 12 | { 13 | /// 14 | /// Indicates a service protection type. 15 | /// 16 | public struct ServiceLaunchProtectedInfo 17 | { 18 | /// 19 | /// The protection type of the service. 20 | /// 21 | public ServiceLaunchProtected dwPreshutdownTimeout; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/AdvApi32/AdvApi32+ServicePreferredNodeInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System.Runtime.InteropServices; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public static partial class AdvApi32 12 | { 13 | /// 14 | /// Represents the preferred node on which to run a service. 15 | /// 16 | public struct ServicePreferredNodeInfo 17 | { 18 | /// 19 | /// The node number of the preferred node. 20 | /// 21 | public uint usPreferredNode; 22 | 23 | /// 24 | /// If this member is TRUE, the preferred node setting is deleted. 25 | /// 26 | public bool fDelete; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/AdvApi32/AdvApi32+ServicePreshutdownInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System.Runtime.InteropServices; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public static partial class AdvApi32 12 | { 13 | /// 14 | /// Contains preshutdown settings. 15 | /// 16 | public struct ServicePreshutdownInfo 17 | { 18 | /// 19 | /// The time-out value, in milliseconds. 20 | /// 21 | public int dwPreshutdownTimeout; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/AdvApi32/AdvApi32+ServiceSidInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System.Runtime.InteropServices; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public static partial class AdvApi32 12 | { 13 | /// 14 | /// Represents a service security identifier (SID). 15 | /// 16 | public struct ServiceSidInfo 17 | { 18 | /// 19 | /// The service SID type. 20 | /// 21 | public ServiceSidType dwServiceSidType; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/AdvApi32/AdvApi32+ServiceTriggerAction.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public static partial class AdvApi32 10 | { 11 | public enum ServiceTriggerAction 12 | { 13 | /// 14 | /// Start the service when the specified trigger event occurs. 15 | /// 16 | SERVICE_TRIGGER_ACTION_SERVICE_START = 1, 17 | 18 | /// 19 | /// Stop the service when the specified trigger event occurs. 20 | /// 21 | SERVICE_TRIGGER_ACTION_SERVICE_STOP = 2, 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/AdvApi32/AdvApi32.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/AdvApi32/SafeRegistryHandle.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | #if WINDOWS8 || WINDOWS_UWP 5 | 6 | namespace Microsoft.Win32.SafeHandles 7 | { 8 | using System; 9 | using PInvoke; 10 | using static PInvoke.AdvApi32; 11 | 12 | // This must have no more than the public API that is exposed by net40 13 | // because on that platform we type forward to it. 14 | public sealed class SafeRegistryHandle : SafeHandleZeroOrMinusOneIsInvalid 15 | { 16 | public SafeRegistryHandle(IntPtr preexistingHandle, bool ownsHandle) 17 | : base(ownsHandle) 18 | { 19 | this.SetHandle(preexistingHandle); 20 | } 21 | 22 | internal SafeRegistryHandle() 23 | : base(true) 24 | { 25 | } 26 | 27 | protected override bool ReleaseHandle() 28 | { 29 | return RegCloseKey(this.handle) == Win32ErrorCode.ERROR_SUCCESS; 30 | } 31 | } 32 | } 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | #if NETFRAMEWORK || NETSTANDARD 5 | 6 | using System.Runtime.InteropServices; 7 | 8 | [module: DefaultCharSet(CharSet.Unicode)] 9 | 10 | #if NET45_ORLATER || NETSTANDARD 11 | 12 | [assembly: DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)] 13 | 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+BCRYPT_KEY_BLOB.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System.Runtime.InteropServices; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class BCrypt 12 | { 13 | /// 14 | /// Represents a key blob header that identifies a key blob format for transporting keys. 15 | /// The base structure for all CNG key BLOBs. All CNG key BLOBs are based on this structure. For example, the structure is based on this structure. 16 | /// 17 | public struct BCRYPT_KEY_BLOB 18 | { 19 | /// 20 | /// Specifies the type of key this BLOB represents. The possible values for this member depend on the type of BLOB this structure represents. 21 | /// 22 | public uint dwMagic; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+BCRYPT_MULTI_OPERATION_TYPE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public static partial class BCrypt 10 | { 11 | /// 12 | /// Enum to specify type of multi-operation is passed to . 13 | /// 14 | public enum BCRYPT_MULTI_OPERATION_TYPE 15 | { 16 | /// 17 | /// Structure type is 18 | /// 19 | BCRYPT_OPERATION_TYPE_HASH = 1, 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+BCryptCloseAlgorithmProviderFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class BCrypt 12 | { 13 | [Flags] 14 | public enum BCryptCloseAlgorithmProviderFlags 15 | { 16 | None = 0x0, 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+BCryptDeriveKeyFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class BCrypt 12 | { 13 | [Flags] 14 | public enum BCryptDeriveKeyFlags 15 | { 16 | /// 17 | /// No flags. 18 | /// 19 | None = 0x0, 20 | 21 | /// 22 | /// Causes the secret agreement to serve also 23 | /// as the HMAC key. If this flag is used, the KDF_HMAC_KEY parameter should 24 | /// NOT be specified. 25 | /// 26 | KDF_USE_SECRET_AS_HMAC_KEY_FLAG = 0x1, 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+BCryptEnumAlgorithmsFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class BCrypt 12 | { 13 | /// 14 | /// Flags that can be passed to the method. 15 | /// 16 | [Flags] 17 | public enum BCryptEnumAlgorithmsFlags 18 | { 19 | /// 20 | /// No flags. 21 | /// 22 | None = 0x0, 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+BCryptExportKeyFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class BCrypt 12 | { 13 | [Flags] 14 | public enum BCryptExportKeyFlags 15 | { 16 | None = 0x0, 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+BCryptFinalizeKeyPairFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class BCrypt 12 | { 13 | [Flags] 14 | public enum BCryptFinalizeKeyPairFlags 15 | { 16 | None = 0x0, 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+BCryptFinishHashFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class BCrypt 12 | { 13 | /// 14 | /// Flags that can be passed to the method. 15 | /// 16 | [Flags] 17 | public enum BCryptFinishHashFlags 18 | { 19 | None = 0x0, 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+BCryptGenerateKeyPairFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class BCrypt 12 | { 13 | [Flags] 14 | public enum BCryptGenerateKeyPairFlags 15 | { 16 | None = 0x0, 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+BCryptGenerateSymmetricKeyFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class BCrypt 12 | { 13 | /// 14 | /// Flags that may be passed to the method. 15 | /// 16 | [Flags] 17 | public enum BCryptGenerateSymmetricKeyFlags 18 | { 19 | None = 0x0, 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+BCryptGetPropertyFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class BCrypt 12 | { 13 | [Flags] 14 | public enum BCryptGetPropertyFlags 15 | { 16 | None = 0x0, 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+BCryptHashDataFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class BCrypt 12 | { 13 | /// 14 | /// Flags that can be passed to the method. 15 | /// 16 | [Flags] 17 | public enum BCryptHashDataFlags 18 | { 19 | None = 0x0, 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+BCryptImportKeyFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class BCrypt 12 | { 13 | [Flags] 14 | public enum BCryptImportKeyFlags 15 | { 16 | None = 0x0, 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+BCryptImportKeyPairFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class BCrypt 12 | { 13 | [Flags] 14 | public enum BCryptImportKeyPairFlags 15 | { 16 | None = 0x0, 17 | 18 | /// 19 | /// Do not validate the public portion of the key pair. 20 | /// 21 | BCRYPT_NO_KEY_VALIDATION = 0x00000008, 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+BCryptSecretAgreementFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class BCrypt 12 | { 13 | [Flags] 14 | public enum BCryptSecretAgreementFlags 15 | { 16 | None = 0x0, 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+BCryptSetPropertyFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class BCrypt 12 | { 13 | [Flags] 14 | public enum BCryptSetPropertyFlags 15 | { 16 | None = 0x0, 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+DSAFIPSVERSION_ENUM.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class BCrypt 10 | { 11 | public enum DSAFIPSVERSION_ENUM 12 | { 13 | DSA_FIPS186_2 = 0, 14 | DSA_FIPS186_3 = 1, 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+HASHALGORITHM_ENUM.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class BCrypt 10 | { 11 | public enum HASHALGORITHM_ENUM 12 | { 13 | DSA_HASH_ALGORITHM_SHA1 = 0, 14 | DSA_HASH_ALGORITHM_SHA256 = 1, 15 | DSA_HASH_ALGORITHM_SHA512 = 2, 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+HashOperationType.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public static partial class BCrypt 10 | { 11 | public enum HashOperationType 12 | { 13 | /// 14 | /// Equivalent to calling the function. 15 | /// 16 | BCRYPT_HASH_OPERATION_HASH_DATA = 1, 17 | 18 | /// 19 | /// Equivalent to calling the function. 20 | /// 21 | BCRYPT_HASH_OPERATION_FINISH_HASH = 2, 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt+MultiOperationType.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public static partial class BCrypt 10 | { 11 | public enum MultiOperationType 12 | { 13 | BCRYPT_OPERATION_TYPE_HASH = 1, // structure type is BCRYPT_MULTI_HASH_OPERATION 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/BCrypt/BCrypt.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | $(NoWarn);RS0026;RS0027 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/BCrypt/storebanned/BCrypt+ConfigurationTable.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class BCrypt 10 | { 11 | /// 12 | /// Possible values for the . 13 | /// 14 | public enum ConfigurationTable 15 | { 16 | /// 17 | /// The context exists in the local-machine configuration table. 18 | /// 19 | CRYPT_LOCAL, 20 | 21 | /// 22 | /// This value is not available for use. 23 | /// 24 | CRYPT_DOMAIN, 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Cabinet/Cabinet+FdiHandle.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using Microsoft.Win32.SafeHandles; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class Cabinet 12 | { 13 | /// 14 | /// Represents a handle used by the FDI API. 15 | /// 16 | public class FdiHandle : SafeHandleZeroOrMinusOneIsInvalid 17 | { 18 | /// 19 | /// Initializes a new instance of the class. 20 | /// 21 | public FdiHandle() 22 | : base(true) 23 | { 24 | } 25 | 26 | /// 27 | protected override bool ReleaseHandle() 28 | { 29 | return Cabinet.FDIDestroy(this.handle); 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Cabinet/Cabinet.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/Cabinet/PublicAPI.Shipped.txt: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /src/Cabinet/cabinet.exports.txt: -------------------------------------------------------------------------------- 1 | CloseCompressor 2 | CloseDecompressor 3 | Compress 4 | CreateCompressor 5 | CreateDecompressor 6 | Decompress 7 | DeleteExtractedFiles 8 | DllGetVersion 9 | Extract 10 | FCIAddFile 11 | FCICreate 12 | FCIDestroy 13 | FCIFlushCabinet 14 | FCIFlushFolder 15 | FDICopy 16 | FDICreate 17 | FDIDestroy 18 | FDIIsCabinet 19 | FDITruncateCabinet 20 | GetDllVersion 21 | QueryCompressorInformation 22 | QueryDecompressorInformation 23 | ResetCompressor 24 | ResetDecompressor 25 | SetCompressorInformation 26 | SetDecompressorInformation 27 | -------------------------------------------------------------------------------- /src/CfgMgr32/CfgMgr32.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/CfgMgr32/PublicAPI.Shipped.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/src/CfgMgr32/PublicAPI.Shipped.txt -------------------------------------------------------------------------------- /src/CodeGeneration/CodeGeneration.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | netstandard2.0 4 | PInvoke 5 | enable 6 | 7 | 8 | 9 | 10 | 11 | all 12 | runtime; build; native; contentfiles; analyzers; buildtransitive 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/CodeGeneration/IGenerator.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke; 5 | 6 | using System.Threading; 7 | using Microsoft.CodeAnalysis; 8 | using Microsoft.CodeAnalysis.CSharp.Syntax; 9 | 10 | internal interface IGenerator 11 | { 12 | SyntaxList Generate(TransformationContext context, CancellationToken cancellationToken); 13 | } 14 | -------------------------------------------------------------------------------- /src/CodeGeneration/ModuleInitializerAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace System.Runtime.CompilerServices 5 | { 6 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] 7 | internal sealed class ModuleInitializerAttribute : Attribute 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/CodeGeneration/TransformationContext.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke; 5 | 6 | using Microsoft.CodeAnalysis; 7 | using Microsoft.CodeAnalysis.CSharp.Syntax; 8 | 9 | internal struct TransformationContext 10 | { 11 | internal TypeDeclarationSyntax ProcessingNode { get; set; } 12 | 13 | internal Compilation Compilation { get; set; } 14 | } 15 | -------------------------------------------------------------------------------- /src/CodeGenerationAttributes/CodeGenerationAttributes.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net45;netstandard2.0 4 | CodeGenerationAttributes 5 | enable 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/CodeGenerationAttributes/NoFriendlyOverloadsAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke; 5 | 6 | using System; 7 | using System.Diagnostics; 8 | 9 | /// 10 | /// Decorated on a method to suppress automatic generation of friendly overloads. 11 | /// 12 | [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)] 13 | [Conditional("CodeGeneration")] 14 | public sealed class NoFriendlyOverloadsAttribute : Attribute 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /src/CodeGenerationAttributes/OfferFriendlyOverloadsAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke; 5 | 6 | using System; 7 | using System.Diagnostics; 8 | 9 | /// 10 | /// Causes generation of an overload of the method that accepts 11 | /// parameters instead of native pointers. 12 | /// 13 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] 14 | [Conditional("CodeGeneration")] 15 | public class OfferFriendlyOverloadsAttribute : Attribute 16 | { 17 | } 18 | -------------------------------------------------------------------------------- /src/CodeGenerationAttributes/OfferIntPtrPropertyAccessorsAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke; 5 | 6 | using System; 7 | using System.Diagnostics; 8 | 9 | /// 10 | /// Causes generation of property accessors that expose native pointer fields 11 | /// as properties. 12 | /// 13 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true)] 14 | [Conditional("CodeGeneration")] 15 | public class OfferIntPtrPropertyAccessorsAttribute : Attribute 16 | { 17 | } 18 | -------------------------------------------------------------------------------- /src/Crypt32/Crypt32+CRYPT_DATA_BLOB.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class Crypt32 10 | { 11 | /// 12 | /// A structure that contains an arbitrary array of bytes. The structure definition includes aliases appropriate to the various functions that use it. 13 | /// 14 | [OfferIntPtrPropertyAccessors] 15 | public unsafe partial struct CRYPT_DATA_BLOB 16 | { 17 | /// 18 | /// A DWORD variable that contains the count, in bytes, of data. 19 | /// 20 | public int cbData; 21 | 22 | /// 23 | /// A pointer to the data buffer. 24 | /// 25 | public byte* pbData; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Crypt32/Crypt32.Helpers.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Methods and nested types that are not strictly P/Invokes but provide 11 | /// a slightly higher level of functionality to ease calling into native code. 12 | /// 13 | public static partial class Crypt32 14 | { 15 | // This is where you define methods that assist in calling P/Invoke methods. 16 | // For example, if a P/Invoke method requires allocating unmanaged memory 17 | // and freeing it up after the call, a helper method in this file would 18 | // make "P/Invoking" for most callers much easier and is a welcome addition. 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Crypt32/Crypt32.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Crypt32/PublicAPI.Unshipped.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/src/Crypt32/PublicAPI.Unshipped.txt -------------------------------------------------------------------------------- /src/Crypt32/storebanned/Crypt32.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Exported functions from the Crypt32.dll Windows library 11 | /// that are available to Desktop apps only. 12 | /// 13 | public static partial class Crypt32 14 | { 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/DbgHelp/DbgHelp+Characteristics.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public static partial class DbgHelp 10 | { 11 | /// 12 | /// Describes a native binary image. 13 | /// 14 | public enum Characteristics : uint 15 | { 16 | // TODO: fill this in. 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/DbgHelp/DbgHelp.Helpers.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Methods and nested types that are not strictly P/Invokes but provide 11 | /// a slightly higher level of functionality to ease calling into native code. 12 | /// 13 | public static partial class DbgHelp 14 | { 15 | // This is where you define methods that assist in calling P/Invoke methods. 16 | // For example, if a P/Invoke method requires allocating unmanaged memory 17 | // and freeing it up after the call, a helper method in this file would 18 | // make "P/Invoking" for most callers much easier and is a welcome addition. 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/DbgHelp/DbgHelp.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Exported functions from the DbgHelp.dll Windows library 11 | /// that are available to Desktop and Store apps. 12 | /// 13 | [OfferFriendlyOverloads] 14 | public static partial class DbgHelp 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/DbgHelp/DbgHelp.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/DbgHelp/PublicAPI.Unshipped.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/src/DbgHelp/PublicAPI.Unshipped.txt -------------------------------------------------------------------------------- /src/Directory.Build.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/DwmApi/DwmApi+DwmEnableCompositionFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class DwmApi 10 | { 11 | /// 12 | /// Flags that may be passed to the function. 13 | /// 14 | public enum DwmEnableCompositionFlags : uint 15 | { 16 | /// 17 | /// Disables composition. 18 | /// 19 | DWM_EC_DISABLECOMPOSITION = 0, 20 | 21 | /// 22 | /// Enables DWM composition. 23 | /// 24 | DWM_EC_ENABLECOMPOSITION = 1, 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/DwmApi/DwmApi.Helpers.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Methods and nested types that are not strictly P/Invokes but provide 11 | /// a slightly higher level of functionality to ease calling into native code. 12 | /// 13 | public static partial class DwmApi 14 | { 15 | // This is where you define methods that assist in calling P/Invoke methods. 16 | // For example, if a P/Invoke method requires allocating unmanaged memory 17 | // and freeing it up after the call, a helper method in this file would 18 | // make "P/Invoking" for most callers much easier and is a welcome addition. 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/DwmApi/DwmApi.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/DwmApi/PublicAPI.Unshipped.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/src/DwmApi/PublicAPI.Unshipped.txt -------------------------------------------------------------------------------- /src/Fusion/Fusion+AssemblyCacheInstallFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class Fusion 12 | { 13 | [Flags] 14 | public enum AssemblyCacheInstallFlags 15 | { 16 | None = 0x0, 17 | IASSEMBLYCACHE_INSTALL_FLAG_REFRESH = 0x1, 18 | IASSEMBLYCACHE_INSTALL_FLAG_FORCE_REFRESH = 0x2, 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Fusion/Fusion+FusionInstallReferenceFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class Fusion 12 | { 13 | /// 14 | /// Flags that may be specified by . 15 | /// 16 | [Flags] 17 | public enum FusionInstallReferenceFlags 18 | { 19 | /// 20 | /// No flags. 21 | /// 22 | None = 0x0, 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Fusion/Fusion.Helpers.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Methods and nested types that are not strictly P/Invokes but provide 11 | /// a slightly higher level of functionality to ease calling into native code. 12 | /// 13 | public static partial class Fusion 14 | { 15 | // This is where you define methods that assist in calling P/Invoke methods. 16 | // For example, if a P/Invoke method requires allocating unmanaged memory 17 | // and freeing it up after the call, a helper method in this file would 18 | // make "P/Invoking" for most callers much easier and is a welcome addition. 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Fusion/Fusion.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | false 13 | true 14 | 15 | 16 | false 17 | true 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Fusion/MSCorEE+UninstallAssemblyFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class Fusion 12 | { 13 | [Flags] 14 | public enum UninstallAssemblyFlags 15 | { 16 | None = 0x0, 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Fusion/MSCorEE+UninstallDisposition.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class Fusion 10 | { 11 | /// 12 | /// Enumerates values that may be returned by the function. 13 | /// 14 | public enum UninstallDisposition 15 | { 16 | IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED = 1, 17 | IASSEMBLYCACHE_UNINSTALL_DISPOSITION_STILL_IN_USE = 2, 18 | IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED = 3, 19 | IASSEMBLYCACHE_UNINSTALL_DISPOSITION_DELETE_PENDING = 4, 20 | IASSEMBLYCACHE_UNINSTALL_DISPOSITION_HAS_INSTALL_REFERENCES = 5, 21 | IASSEMBLYCACHE_UNINSTALL_DISPOSITION_REFERENCE_NOT_FOUND = 6, 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Fusion/PublicAPI.Unshipped.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/src/Fusion/PublicAPI.Unshipped.txt -------------------------------------------------------------------------------- /src/Fusion/fusion.exports.txt: -------------------------------------------------------------------------------- 1 | ClearDownloadCache 2 | CopyPDBs 3 | CreateApplicationContext 4 | CreateAssemblyCache 5 | CreateAssemblyEnum 6 | CreateAssemblyNameObject 7 | CreateHistoryReader 8 | CreateInstallReferenceEnum 9 | GetCachePath 10 | GetHistoryFileDirectory 11 | InitializeFusion 12 | InstallCustomModule 13 | LookupHistoryAssembly 14 | NukeDownloadedCache 15 | PreBindAssembly 16 | PreBindAssemblyEx 17 | SetMSIHandleForLogging 18 | -------------------------------------------------------------------------------- /src/Gdi32/Gdi32.Helpers.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Methods and nested types that are not strictly P/Invokes but provide 11 | /// a slightly higher level of functionality to ease calling into native code. 12 | /// 13 | public static partial class Gdi32 14 | { 15 | // This is where you define methods that assist in calling P/Invoke methods. 16 | // For example, if a P/Invoke method requires allocating unmanaged memory 17 | // and freeing it up after the call, a helper method in this file would 18 | // make "P/Invoking" for most callers much easier and is a welcome addition. 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Gdi32/Gdi32.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Gdi32/PublicAPI.Unshipped.txt: -------------------------------------------------------------------------------- 1 | static extern PInvoke.Gdi32.BitBlt(PInvoke.User32.SafeDCHandle hObject, int nXDest, int nYDest, int nWidth, int nHeight, PInvoke.User32.SafeDCHandle hObjectSource, int nXSrc, int nYSrc, int dwRop) -> bool -------------------------------------------------------------------------------- /src/Hid/Hid.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/Hid/PublicAPI.Unshipped.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/src/Hid/PublicAPI.Unshipped.txt -------------------------------------------------------------------------------- /src/IPHlpApi/IPHlpApi+MIB_TCPTABLE_OWNER_PID.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System.Runtime.InteropServices; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public static partial class IPHlpApi 12 | { 13 | /// 14 | /// The MIB_TCPTABLE_OWNER_PID structure contains a table of process IDs (PIDs) and the 15 | /// IP v4 TCP links that are context bound to these PIDs. 16 | /// 17 | /// 18 | public struct MIB_TCPTABLE_OWNER_PID 19 | { 20 | /// 21 | /// The number of elements in the table. 22 | /// 23 | public uint dwNumEntries; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/IPHlpApi/IPHlpApi.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformSpecificFrameworks);netstandard2.0 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/IPHlpApi/PublicAPI.Shipped.txt: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /src/ImageHlp/ImageHlp.Helpers.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Methods and nested types that are not strictly P/Invokes but provide 11 | /// a slightly higher level of functionality to ease calling into native code. 12 | /// 13 | public static partial class ImageHlp 14 | { 15 | // This is where you define methods that assist in calling P/Invoke methods. 16 | // For example, if a P/Invoke method requires allocating unmanaged memory 17 | // and freeing it up after the call, a helper method in this file would 18 | // make "P/Invoking" for most callers much easier and is a welcome addition. 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/ImageHlp/ImageHlp.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/ImageHlp/PublicAPI.Shipped.txt: -------------------------------------------------------------------------------- 1 | PInvoke.ImageHlp 2 | static extern PInvoke.ImageHlp.MapAndLoad(string ImageName, string DllPath, out PInvoke.DbgHelp.LOADED_IMAGE LoadedImage, bool DotDll, bool ReadOnly) -> bool 3 | static extern PInvoke.ImageHlp.UnMapAndLoad(ref PInvoke.DbgHelp.LOADED_IMAGE LoadedImage) -> bool -------------------------------------------------------------------------------- /src/ImageHlp/PublicAPI.Unshipped.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/src/ImageHlp/PublicAPI.Unshipped.txt -------------------------------------------------------------------------------- /src/Kernel32/Kernel32+FINDEX_INFO_LEVELS.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class Kernel32 10 | { 11 | public enum FINDEX_INFO_LEVELS 12 | { 13 | FindExInfoStandard, 14 | FindExInfoMaxInfoLevel, 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Kernel32/Kernel32+FINDEX_SEARCH_OPS.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class Kernel32 10 | { 11 | public enum FINDEX_SEARCH_OPS 12 | { 13 | FindExSearchNameMatch, 14 | FindExSearchLimitToDirectories, 15 | FindExSearchLimitToDevices, 16 | FindExSearchMaxSearchOp, 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Kernel32/Kernel32+MEMORY_PRIORITY_INFORMATION.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class Kernel32 10 | { 11 | /// 12 | /// Specifies the memory priority for a thread or process. 13 | /// This structure is used by the GetProcessInformation, SetProcessInformation, GetThreadInformation, and SetThreadInformation 14 | /// functions. 15 | /// 16 | public struct MEMORY_PRIORITY_INFORMATION 17 | { 18 | /// 19 | /// The memory priority for the thread or process. 20 | /// 21 | public MemoryPriority MemoryPriority; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Kernel32/Kernel32+PROCESSOR_NUMBER.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class Kernel32 10 | { 11 | /// 12 | /// Represents a logical processor in a processor group. 13 | /// 14 | public struct PROCESSOR_NUMBER 15 | { 16 | /// 17 | /// The processor group to which the logical processor is assigned. 18 | /// 19 | public ushort Group; 20 | 21 | /// 22 | /// The number of the logical processor relative to the group. 23 | /// 24 | public byte Number; 25 | 26 | /// 27 | /// This parameter is reserved. 28 | /// 29 | public byte Reserved; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Kernel32/Kernel32+PROCESS_LEAP_SECOND_INFO.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class Kernel32 10 | { 11 | /// 12 | /// Specifies how the system handles positive leap seconds. 13 | /// 14 | public struct PROCESS_LEAP_SECOND_INFO 15 | { 16 | /// 17 | /// Flag specifying how the system handles leap seconds. 18 | /// 19 | public ProcessLeapSecondInfoFlags Flags; 20 | 21 | /// 22 | /// Reserved for future use. 23 | /// 24 | public uint Reserved; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Kernel32/Kernel32+PROCESS_PROTECTION_LEVEL_INFORMATION.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class Kernel32 10 | { 11 | /// 12 | /// Specifies whether Protected Process Light (PPL) is enabled. 13 | /// 14 | public struct PROCESS_PROTECTION_LEVEL_INFORMATION 15 | { 16 | /// 17 | /// Process protection level. 18 | /// 19 | public ProcessProtectionLevel ProtectionLevel; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Kernel32/Kernel32+ProcessorType.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class Kernel32 12 | { 13 | public enum ProcessorType 14 | { 15 | PROCESSOR_INTEL_386 = 386, 16 | PROCESSOR_INTEL_486 = 486, 17 | PROCESSOR_INTEL_PENTIUM = 586, 18 | PROCESSOR_INTEL_IA64 = 2200, 19 | PROCESSOR_AMD_X8664 = 8664, 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Kernel32/Kernel32+SECURITY_DESCRIPTOR.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class Kernel32 13 | { 14 | public struct SECURITY_DESCRIPTOR 15 | { 16 | public byte Revision; 17 | public byte Sbz1; 18 | public ushort Control; 19 | public IntPtr Owner; 20 | public IntPtr Group; 21 | public IntPtr Sacl; 22 | public IntPtr Dacl; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Kernel32/Kernel32.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks);net46 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Kernel32/SafeWaitHandle.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | #if WINDOWS8 || WINDOWS_UWP 5 | 6 | namespace Microsoft.Win32.SafeHandles 7 | { 8 | using System; 9 | 10 | public sealed class SafeWaitHandle : SafeHandleZeroOrMinusOneIsInvalid 11 | { 12 | public SafeWaitHandle(IntPtr existingHandle, bool ownsHandle) 13 | : base(ownsHandle) 14 | { 15 | this.SetHandle(existingHandle); 16 | } 17 | 18 | protected override bool ReleaseHandle() 19 | { 20 | return PInvoke.Kernel32.CloseHandle(this.handle); 21 | } 22 | } 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /src/Kernel32/storebanned/Kernel32+ACL.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System.Runtime.InteropServices; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class Kernel32 12 | { 13 | public struct ACL 14 | { 15 | public byte AclRevision; 16 | public byte Sbz1; 17 | public ushort AclSize; 18 | public ushort AceCount; 19 | public ushort Sbz2; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Kernel32/storebanned/Kernel32+ConsoleDisplayMode.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class Kernel32 12 | { 13 | /// 14 | /// Designates the console display mode on the functions. 15 | /// 16 | public enum ConsoleDisplayMode 17 | { 18 | /// 19 | /// Text is displayed in full-screen mode. 20 | /// 21 | CONSOLE_FULLSCREEN_MODE = 1, 22 | 23 | /// 24 | /// Text is displayed in a console window. 25 | /// 26 | CONSOLE_WINDOWED_MODE = 2, 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Kernel32/storebanned/Kernel32+FILE_ZERO_DATA_INFORMATION.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class Kernel32 12 | { 13 | /// 14 | /// Contains a range of a file to set to zeros. This structure is used by the FSCTL_SET_ZERO_DATA control code. 15 | /// 16 | public struct FILE_ZERO_DATA_INFORMATION 17 | { 18 | /// 19 | /// The file offset of the start of the range to set to zeros, in bytes. 20 | /// 21 | public long FileOffset; 22 | 23 | /// 24 | /// The byte offset of the first byte beyond the last zeroed byte. 25 | /// 26 | public long BeyondFinalZero; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Kernel32/storebanned/Kernel32+FOCUS_EVENT_RECORD.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class Kernel32 13 | { 14 | /// 15 | /// Describes a focus event in a console structure. 16 | /// 17 | /// 18 | /// These events are used internally and should be ignored. 19 | /// 20 | public struct FOCUS_EVENT_RECORD 21 | { 22 | /// 23 | /// Reserved. 24 | /// 25 | [MarshalAs(UnmanagedType.Bool)] 26 | public bool bSetFocus; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Kernel32/storebanned/Kernel32+MENU_EVENT_RECORD.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class Kernel32 13 | { 14 | /// 15 | /// Describes a menu event in a console structure. 16 | /// 17 | /// 18 | /// These events are used internally and should be ignored. 19 | /// 20 | public struct MENU_EVENT_RECORD 21 | { 22 | /// 23 | /// Reserved. 24 | /// 25 | public uint dwCommandId; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Kernel32/storebanned/Kernel32+PROC_THREAD_ATTRIBUTE_LIST.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class Kernel32 10 | { 11 | /// 12 | /// An empty struct. 13 | /// 14 | public struct PROC_THREAD_ATTRIBUTE_LIST 15 | { 16 | // This struct intentionally left blank. It has no fields, per the processthreadsapi.h file. 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Kernel32/storebanned/Kernel32+ProcessShutdownFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class Kernel32 12 | { 13 | /// 14 | /// Values that are passed to the flag. 15 | /// 16 | public enum ProcessShutdownFlags 17 | { 18 | None = 0, 19 | 20 | /// 21 | /// The system terminates the process without displaying a retry dialog box for the user. 22 | /// 23 | SHUTDOWN_NORETRY = 1, 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Kernel32/storebanned/Kernel32+QueryFullProcessImageNameFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class Kernel32 12 | { 13 | [Flags] 14 | public enum QueryFullProcessImageNameFlags 15 | { 16 | /// 17 | /// The name should use the Win32 path format. 18 | /// 19 | None = 0, 20 | 21 | /// 22 | /// The name should use the native system path format. 23 | /// 24 | PROCESS_NAME_NATIVE = 0x00000001, 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Kernel32/storebanned/Kernel32+WINDOW_BUFFER_SIZE_RECORD.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class Kernel32 13 | { 14 | /// 15 | /// Describes a change in the size of the screen buffer in a console structure. 16 | /// 17 | public struct WINDOW_BUFFER_SIZE_RECORD 18 | { 19 | /// 20 | /// A structure that contains the size of the console screen buffer, in character cell columns and rows. 21 | /// 22 | public COORD dwSize; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/MSCorEE/MSCorEE.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | false 14 | true 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/MSCorEE/PublicAPI.Unshipped.txt: -------------------------------------------------------------------------------- 1 | static PInvoke.MSCorEE.GetFileVersion(string szFileName, System.Span szBuffer, out int dwLength) -> PInvoke.HResult 2 | static PInvoke.MSCorEE.GetVersionFromProcess(System.Runtime.InteropServices.SafeHandle hProcess, System.Span pVersion, out int dwLength) -> PInvoke.HResult 3 | static PInvoke.MSCorEE.StrongNameFreeBuffer(System.Span pbMemory) -> int 4 | static PInvoke.MSCorEE.StrongNameGetPublicKey(string szKeyContainer, System.ReadOnlySpan pbKeyBlob, out System.IntPtr ppbPublicKeyBlob, out int pcbPublicKeyBlob) -> int 5 | static PInvoke.MSCorEE.StrongNameGetPublicKey(string szKeyContainer, System.ReadOnlySpan pbKeyBlob, out byte* ppbPublicKeyBlob, out int pcbPublicKeyBlob) -> int 6 | static PInvoke.MSCorEE.StrongNameTokenFromPublicKey(System.ReadOnlySpan pbPublicKeyBlob, out System.IntPtr ppbStrongNameToken, out int pcbStrongNameToken) -> int 7 | static PInvoke.MSCorEE.StrongNameTokenFromPublicKey(System.ReadOnlySpan pbPublicKeyBlob, out byte* ppbStrongNameToken, out int pcbStrongNameToken) -> int -------------------------------------------------------------------------------- /src/Magnification/Magnification.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/Magnification/Magnification.exports.txt: -------------------------------------------------------------------------------- 1 | MagGetColorEffect 2 | MagGetFullscreenColorEffect 3 | MagGetFullscreenTransform 4 | MagGetImageScalingCallback 5 | MagGetInputTransform 6 | MagGetWindowFilterList 7 | MagGetWindowSource 8 | MagGetWindowTransform 9 | MagInitialize 10 | MagSetColorEffect 11 | MagSetFullscreenColorEffect 12 | MagSetFullscreenTransform 13 | MagSetImageScalingCallback 14 | MagSetInputTransform 15 | MagSetWindowFilterList 16 | MagSetWindowSource 17 | MagSetWindowTransform 18 | MagShowSystemCursor 19 | MagUninitialize 20 | -------------------------------------------------------------------------------- /src/Magnification/PublicAPI.Unshipped.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/src/Magnification/PublicAPI.Unshipped.txt -------------------------------------------------------------------------------- /src/Msi/Msi.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Msi/PublicAPI.Unshipped.txt: -------------------------------------------------------------------------------- 1 | static PInvoke.Msi.MsiEnumProductsEx(string szProductCode, string szUserSid, PInvoke.Msi.MSIINSTALLCONTEXT dwContext, int dwIndex, System.Span szInstalledProductCode, ref PInvoke.Msi.MSIINSTALLCONTEXT? pdwInstalledContext, System.Span szSid, ref int? pcchSid) -> PInvoke.Win32ErrorCode -------------------------------------------------------------------------------- /src/NCrypt/NCrypt+KeyStorageProviders.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class NCrypt 10 | { 11 | public static class KeyStorageProviders 12 | { 13 | /// 14 | /// Identifies the software key storage provider that is provided by Microsoft. 15 | /// 16 | public const string MS_KEY_STORAGE_PROVIDER = "Microsoft Software Key Storage Provider"; 17 | 18 | /// 19 | /// Identifies the smart card key storage provider that is provided by Microsoft. 20 | /// 21 | public const string MS_SMART_CARD_KEY_STORAGE_PROVIDER = "Microsoft Smart Card Key Storage Provider"; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/NCrypt/NCrypt+LegacyKeySpec.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class NCrypt 10 | { 11 | /// 12 | /// A legacy identifier that specifies the type of key. 13 | /// 14 | public enum LegacyKeySpec 15 | { 16 | /// 17 | /// None of the other types. 18 | /// 19 | None = 0x0, 20 | 21 | /// 22 | /// The key is a key exchange key. 23 | /// 24 | AT_KEYEXCHANGE, 25 | 26 | /// 27 | /// The key is a signature key. 28 | /// 29 | AT_SIGNATURE, 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/NCrypt/NCrypt+NCryptEnumKeysFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class NCrypt 12 | { 13 | /// 14 | /// The flags that may be passed to the method. 15 | /// 16 | [Flags] 17 | public enum NCryptEnumKeysFlags : uint 18 | { 19 | /// 20 | /// No flags. 21 | /// 22 | None = 0x0, 23 | 24 | NCRYPT_MACHINE_KEY_FLAG = 0x00000020, 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/NCrypt/NCrypt+NCryptOpenStorageProviderFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class NCrypt 12 | { 13 | /// 14 | /// Flags that may be passed to the function. 15 | /// 16 | [Flags] 17 | public enum NCryptOpenStorageProviderFlags 18 | { 19 | /// 20 | /// No flags. 21 | /// 22 | None = 0x0, 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/NCrypt/NCrypt+SymmetricKeyBlobTypes.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class NCrypt 10 | { 11 | /// 12 | /// Identifies the blob types of symmetric keys. 13 | /// 14 | public class SymmetricKeyBlobTypes : BCrypt.SymmetricKeyBlobTypes 15 | { 16 | /// 17 | /// Initializes a new instance of the class. 18 | /// 19 | /// 20 | /// Suppresses generation of a public default constructor. 21 | /// 22 | protected SymmetricKeyBlobTypes() 23 | { 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/NCrypt/NCrypt.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | $(NoWarn);RS0026;RS0027 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/NTDll/NTDll.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/NetApi32/NetApi32.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/NewDev/NewDev.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/NewDev/PublicAPI.Shipped.txt: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /src/NewDev/newdev.exports.txt: -------------------------------------------------------------------------------- 1 | CheckDriverSoftwareDependenciesSatisfied 2 | DeviceInternetSettingUiW 3 | DiInstallDevice 4 | DiInstallDriver 5 | DiRollbackDriver 6 | DiShowUpdateDevice 7 | DiShowUpdateDriver 8 | DiUninstallDevice 9 | DiUninstallDriver 10 | GetInternetPolicies 11 | InstallLegacyDeviceDriver 12 | InstallNewDevice 13 | InstallSelectedDriver 14 | InstallWindowsUpdateDriver 15 | InstallWindowsUpdateDriverEx 16 | InstallWindowsUpdateDrivers 17 | pDiDoDeviceInstallAsAdmin 18 | pDiDoNullDriverInstall 19 | pDiRunFinishInstallOperations 20 | QueryWindowsUpdateDriverStatus 21 | SetDriverPackageRestorePoint 22 | SetInternetPolicies 23 | UpdateDriverForPlugAndPlayDevices 24 | -------------------------------------------------------------------------------- /src/Ole32/Ole32.Helpers.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Methods and nested types that are not strictly P/Invokes but provide 11 | /// a slightly higher level of functionality to ease calling into native code. 12 | /// 13 | public static partial class Ole32 14 | { 15 | // This is where you define methods that assist in calling P/Invoke methods. 16 | // For example, if a P/Invoke method requires allocating unmanaged memory 17 | // and freeing it up after the call, a helper method in this file would 18 | // make "P/Invoking" for most callers much easier and is a welcome addition. 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Ole32/Ole32.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Ole32/PublicAPI.Shipped.txt: -------------------------------------------------------------------------------- 1 | PInvoke.Ole32 2 | static extern PInvoke.Ole32.CoEnableCallCancellation(void* pReserved) -> PInvoke.HResult 3 | static extern PInvoke.Ole32.CoDisableCallCancellation(void* pReserved) -> PInvoke.HResult 4 | static PInvoke.Ole32.CoEnableCallCancellation(System.IntPtr pReserved) -> PInvoke.HResult 5 | static PInvoke.Ole32.CoDisableCallCancellation(System.IntPtr pReserved) -> PInvoke.HResult 6 | static extern PInvoke.Ole32.CoCancelCall(int dwThreadId, int ulTimeout) -> PInvoke.HResult 7 | -------------------------------------------------------------------------------- /src/Ole32/PublicAPI.Unshipped.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/src/Ole32/PublicAPI.Unshipped.txt -------------------------------------------------------------------------------- /src/Psapi/Psapi+ENUMPROCESSMODULESFLAGS.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class Psapi 10 | { 11 | /// 12 | /// An enumeration determining whether to enumerate 32-bit, 64-bit or both even both architectured modules on EnumProcessModulesEx function. 13 | /// 14 | public enum EnumProcessModulesFlags : uint 15 | { 16 | LIST_MODULES_DEFAULT, 17 | LIST_MODULES_32BIT, 18 | LIST_MODULES_64BIT, 19 | LIST_MODULES_ALL, 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Psapi/Psapi.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/Psapi/Psapi.exports.txt: -------------------------------------------------------------------------------- 1 | EmptyWorkingSet 2 | EnumDeviceDrivers 3 | EnumPageFiles 4 | EnumProcesses 5 | EnumProcessModules 6 | EnumProcessModulesEx 7 | GetDeviceDriverBaseName 8 | GetDeviceDriverFileName 9 | GetMappedFileName 10 | GetModuleBaseName 11 | GetModuleFileNameEx 12 | GetModuleInformation 13 | GetPerformanceInfo 14 | GetProcessImageFileName 15 | GetProcessMemoryInfo 16 | GetWsChanges 17 | GetWsChangesEx 18 | InitializeProcessForWsWatch 19 | QueryWorkingSet 20 | QueryWorkingSetEx 21 | -------------------------------------------------------------------------------- /src/Psapi/PublicAPI.Unshipped.txt: -------------------------------------------------------------------------------- 1 | static PInvoke.Psapi.EnumProcessModulesEx(System.IntPtr hProcess, System.Span lphModule, int cb, out int lpcbNeeded, PInvoke.Psapi.EnumProcessModulesFlags dwFilterFlag) -> bool 2 | static PInvoke.Psapi.GetModuleFileNameEx(System.IntPtr hProcess, System.IntPtr hModule, System.Span lpFilename) -> int -------------------------------------------------------------------------------- /src/SHCore/PublicAPI.Shipped.txt: -------------------------------------------------------------------------------- 1 | PInvoke.SHCore 2 | static extern PInvoke.SHCore.GetDpiForMonitor(System.IntPtr hmonitor, PInvoke.MONITOR_DPI_TYPE dpiType, out int dpiX, out int dpiY) -> PInvoke.HResult 3 | static extern PInvoke.SHCore.GetDpiForShellUIComponent(PInvoke.SHELL_UI_COMPONENT component) -> int 4 | static extern PInvoke.SHCore.GetProcessDpiAwareness(System.IntPtr hprocess, out PInvoke.PROCESS_DPI_AWARENESS value) -> PInvoke.HResult 5 | static extern PInvoke.SHCore.SetProcessDpiAwareness(PInvoke.PROCESS_DPI_AWARENESS value) -> PInvoke.HResult 6 | -------------------------------------------------------------------------------- /src/SHCore/PublicAPI.Unshipped.txt: -------------------------------------------------------------------------------- 1 | static extern PInvoke.SHCore.GetScaleFactorForMonitor(System.IntPtr hMon, out PInvoke.DEVICE_SCALE_FACTOR pScale) -> PInvoke.HResult 2 | static extern PInvoke.SHCore.RegisterScaleChangeEvent(System.IntPtr hEvent, out System.IntPtr pdwCookie) -> PInvoke.HResult 3 | static extern PInvoke.SHCore.UnregisterScaleChangeEvent(System.IntPtr dwCookie) -> PInvoke.HResult -------------------------------------------------------------------------------- /src/SHCore/SHCore.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/SetupApi/SetupApi+SetupDiGetDevicePropertyFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class SetupApi 12 | { 13 | /// 14 | /// Flags for the method. 15 | /// 16 | [Flags] 17 | public enum SetupDiGetDevicePropertyFlags 18 | { 19 | /// 20 | /// No flags. 21 | /// 22 | None = 0, 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/SetupApi/SetupApi.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Shell32/PublicAPI.Unshipped.txt: -------------------------------------------------------------------------------- 1 | static PInvoke.Shell32.CommandLineToArgvW_IntPtr(string lpCmdLine, out int pNumArgs) -> System.IntPtr 2 | static PInvoke.Shell32.SHGetFolderPath(System.IntPtr hwndOwner, PInvoke.Shell32.CSIDL nFolder, System.IntPtr hToken, PInvoke.Shell32.SHGetFolderPathFlags dwFlags, System.Span pszPath) -> PInvoke.HResult 3 | static PInvoke.Shell32.SHGetPathFromIDList(PInvoke.Shell32.ITEMIDLIST* pidl, System.Span pszPath) -> bool 4 | static PInvoke.Shell32.SHGetPathFromIDList(System.IntPtr pidl, System.Span pszPath) -> bool 5 | static extern PInvoke.Shell32.CommandLineToArgvW(string lpCmdLine, out int pNumArgs) -> char** -------------------------------------------------------------------------------- /src/Shell32/Shell32.Helpers.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Methods and nested types that are not strictly P/Invokes but provide 8 | /// a slightly higher level of functionality to ease calling into native code. 9 | /// 10 | public static partial class Shell32 11 | { 12 | // This is where you define methods that assist in calling P/Invoke methods. 13 | // For example, if a P/Invoke method requires allocating unmanaged memory 14 | // and freeing it up after the call, a helper method in this file would 15 | // make "P/Invoking" for most callers much easier and is a welcome addition. 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Shell32/Shell32.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Exported functions from the Shell32.dll Windows library 8 | /// that are available to Desktop and Store apps. 9 | /// 10 | [OfferFriendlyOverloads] 11 | public static partial class Shell32 12 | { 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Shell32/Shell32.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/User32/User32+CURSORINFOFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public static partial class User32 10 | { 11 | /// 12 | /// Flags for the field. 13 | /// 14 | public enum CURSORINFOFlags 15 | { 16 | /// The cursor is hidden. 17 | CURSOR_HIDDEN = 0, 18 | 19 | /// The cursor is showing. 20 | CURSOR_SHOWING = 1, 21 | 22 | /// 23 | /// Windows 8: The cursor is suppressed. This flag indicates that the system is not drawing the cursor because the user is providing input through touch or pen instead of the mouse. 24 | /// 25 | CURSOR_SUPPRESSED = 2, 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/User32/User32+DISPLAYCONFIG_2dREGION.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class User32 13 | { 14 | public struct DISPLAYCONFIG_2DREGION 15 | { 16 | public uint cx; 17 | 18 | public uint cy; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/User32/User32+DISPLAYCONFIG_DESKTOP_IMAGE_INFO.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class User32 13 | { 14 | public struct DISPLAYCONFIG_DESKTOP_IMAGE_INFO 15 | { 16 | public POINT PathSourceSize; 17 | 18 | public RECT DesktopImageRegion; 19 | 20 | public RECT DesktopImageClip; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/User32/User32+DISPLAYCONFIG_MODE_INFO_TYPE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class User32 13 | { 14 | public enum DISPLAYCONFIG_MODE_INFO_TYPE 15 | { 16 | DISPLAYCONFIG_MODE_INFO_TYPE_SOURCE = 1, 17 | 18 | DISPLAYCONFIG_MODE_INFO_TYPE_TARGET = 2, 19 | 20 | DISPLAYCONFIG_MODE_INFO_TYPE_DESKTOP_IMAGE = 3, 21 | 22 | DISPLAYCONFIG_MODE_INFO_TYPE_FORCE_UINT32 = -1, 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/User32/User32+DISPLAYCONFIG_PATH_INFO.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class User32 13 | { 14 | public struct DISPLAYCONFIG_PATH_INFO 15 | { 16 | public DISPLAYCONFIG_PATH_SOURCE_INFO sourceInfo; 17 | 18 | public DISPLAYCONFIG_PATH_TARGET_INFO targetInfo; 19 | 20 | public uint flags; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/User32/User32+DISPLAYCONFIG_PIXELFORMAT.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class User32 13 | { 14 | public enum DISPLAYCONFIG_PIXELFORMAT 15 | { 16 | DISPLAYCONFIG_PIXELFORMAT_8BPP = 1, 17 | 18 | DISPLAYCONFIG_PIXELFORMAT_16BPP = 2, 19 | 20 | DISPLAYCONFIG_PIXELFORMAT_24BPP = 3, 21 | 22 | DISPLAYCONFIG_PIXELFORMAT_32BPP = 4, 23 | 24 | DISPLAYCONFIG_PIXELFORMAT_NONGDI = 5, 25 | 26 | DISPLAYCONFIG_PIXELFORMAT_FORCE_UINT32 = -1, 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/User32/User32+DISPLAYCONFIG_RATIONAL.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class User32 13 | { 14 | public struct DISPLAYCONFIG_RATIONAL 15 | { 16 | public uint Numerator; 17 | 18 | public uint Denominator; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/User32/User32+DISPLAYCONFIG_ROTATION.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class User32 13 | { 14 | public enum DISPLAYCONFIG_ROTATION 15 | { 16 | DISPLAYCONFIG_ROTATION_IDENTITY = 1, 17 | 18 | DISPLAYCONFIG_ROTATION_ROTATE90 = 2, 19 | 20 | DISPLAYCONFIG_ROTATION_ROTATE180 = 3, 21 | 22 | DISPLAYCONFIG_ROTATION_ROTATE270 = 4, 23 | 24 | DISPLAYCONFIG_ROTATION_FORCE_UINT32 = -1, 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/User32/User32+DISPLAYCONFIG_SCALING.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class User32 13 | { 14 | public enum DISPLAYCONFIG_SCALING 15 | { 16 | DISPLAYCONFIG_SCALING_IDENTITY = 1, 17 | 18 | DISPLAYCONFIG_SCALING_CENTERED = 2, 19 | 20 | DISPLAYCONFIG_SCALING_STRETCHED = 3, 21 | 22 | DISPLAYCONFIG_SCALING_ASPECTRATIOCENTEREDMAX = 4, 23 | 24 | DISPLAYCONFIG_SCALING_CUSTOM = 5, 25 | 26 | DISPLAYCONFIG_SCALING_PREFERRED = 128, 27 | 28 | DISPLAYCONFIG_SCALING_FORCE_UINT32 = -1, 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/User32/User32+DISPLAYCONFIG_SCANLINE_ORDERING.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class User32 13 | { 14 | public enum DISPLAYCONFIG_SCANLINE_ORDERING 15 | { 16 | DISPLAYCONFIG_SCANLINE_ORDERING_UNSPECIFIED = 0, 17 | 18 | DISPLAYCONFIG_SCANLINE_ORDERING_PROGRESSIVE = 1, 19 | 20 | DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED = 2, 21 | 22 | DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED_UPPERFIELDFIRST = DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED, 23 | 24 | DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED_LOWERFIELDFIRST = 3, 25 | 26 | DISPLAYCONFIG_SCANLINE_ORDERING_FORCE_UINT32 = -1, 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/User32/User32+DISPLAYCONFIG_SOURCE_MODE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class User32 13 | { 14 | public struct DISPLAYCONFIG_SOURCE_MODE 15 | { 16 | public uint width; 17 | 18 | public uint height; 19 | 20 | public DISPLAYCONFIG_PIXELFORMAT pixelFormat; 21 | 22 | public POINT position; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/User32/User32+DISPLAYCONFIG_TARGET_MODE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class User32 13 | { 14 | public struct DISPLAYCONFIG_TARGET_MODE 15 | { 16 | public DISPLAYCONFIG_VIDEO_SIGNAL_INFO targetVideoSignalInfo; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/User32/User32+DISPLAYCONFIG_TOPOLOGY_ID.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class User32 13 | { 14 | public enum DISPLAYCONFIG_TOPOLOGY_ID 15 | { 16 | DISPLAYCONFIG_TOPOLOGY_INTERNAL = 1, 17 | 18 | DISPLAYCONFIG_TOPOLOGY_CLONE = 2, 19 | 20 | DISPLAYCONFIG_TOPOLOGY_EXTEND = 4, 21 | 22 | DISPLAYCONFIG_TOPOLOGY_EXTERNAL = 8, 23 | 24 | DISPLAYCONFIG_TOPOLOGY_FORCE_UINT32 = -1, 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/User32/User32+DISPLAYCONFIG__TARGET_MODE_INFO.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class User32 13 | { 14 | public struct DISPLAYCONFIG_TARGET_MODE_INFO 15 | { 16 | private uint bitvector; 17 | 18 | public uint DesktopModeInfoIdx 19 | { 20 | get { return this.bitvector & 0xFFFF; } 21 | set { this.bitvector = value | this.bitvector; } 22 | } 23 | 24 | public uint TargetModeInfoIdx 25 | { 26 | get { return (this.bitvector & 0xFFFF0000) / 0x10000; } 27 | set { this.bitvector = (value * 0x10000) | this.bitvector; } 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/User32/User32+DesktopCreationFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class User32 10 | { 11 | /// 12 | /// Controls the access of other processes to the created desktop. 13 | /// 14 | public enum DesktopCreationFlags : uint 15 | { 16 | None = 0x0000, 17 | 18 | /// 19 | /// Enables processes running in other accounts on the desktop to set hooks in this process 20 | /// 21 | DF_ALLOWOTHERACCOUNTHOOK = 0x0001, 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/User32/User32+EnumDisplayDevicesFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class User32 10 | { 11 | public enum EnumDisplayDevicesFlags : uint 12 | { 13 | EDD_GET_DEVICE_INTERFACE_NAME = 0x00000001, 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/User32/User32+GetAncestorFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class User32 10 | { 11 | /// The ancestor to be retrieved by . 12 | public enum GetAncestorFlags 13 | { 14 | /// Retrieves the parent window. This does not include the owner, as it does with the GetParent function. 15 | GA_PARENT = 1, 16 | 17 | /// Retrieves the root window by walking the chain of parent windows. 18 | GA_ROOT = 2, 19 | 20 | /// Retrieves the owned root window by walking the chain of parent and owner windows returned by GetParent. 21 | GA_ROOTOWNER = 3, 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/User32/User32+GetNextWindowCommands.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class User32 10 | { 11 | /// The commands that can be used as arguments to . 12 | public enum GetNextWindowCommands 13 | { 14 | /// Returns a handle to the window below the given window. 15 | GW_HWNDNEXT = GetWindowCommands.GW_HWNDNEXT, 16 | 17 | /// Returns a handle to the window above the given window. 18 | GW_HWNDPREV = GetWindowCommands.GW_HWNDPREV, 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/User32/User32+HELPINFO.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class User32 13 | { 14 | public struct HELPINFO 15 | { 16 | public int cbSize; 17 | public int iContextType; 18 | public int iCtrlId; 19 | public IntPtr hItemHandle; 20 | public uint dwContextId; 21 | public POINT MousePos; 22 | 23 | public static unsafe HELPINFO Create() => new HELPINFO { cbSize = sizeof(HELPINFO) }; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/User32/User32+ImageType.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public static partial class User32 10 | { 11 | /// 12 | /// Represents various image types. 13 | /// 14 | public enum ImageType : uint 15 | { 16 | /// 17 | /// Loads a bitmap. 18 | /// 19 | IMAGE_BITMAP = 0, 20 | 21 | /// 22 | /// Loads an icon. 23 | /// 24 | IMAGE_ICON = 1, 25 | 26 | /// 27 | /// Loads a cursor. 28 | /// 29 | IMAGE_CURSOR = 2, 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/User32/User32+LASTINPUTINFO.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/src/User32/User32+LASTINPUTINFO.cs -------------------------------------------------------------------------------- /src/User32/User32+LUID.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class User32 13 | { 14 | public struct LUID 15 | { 16 | public uint LowPart; 17 | 18 | public int HighPart; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/User32/User32+LookupIconIdFromDirectoryExFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class User32 12 | { 13 | /// 14 | /// Flags for the method. 15 | /// 16 | [Flags] 17 | public enum LookupIconIdFromDirectoryExFlags 18 | { 19 | /// 20 | /// Uses the default color format. 21 | /// 22 | LR_DEFAULTCOLOR = 0x0, 23 | 24 | /// 25 | /// Creates a monochrome icon or cursor. 26 | /// 27 | LR_MONOCHROME = 0x00000001, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/User32/User32+MONITORINFO_Flags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class User32 12 | { 13 | /// 14 | /// Flags that may be defined on the field. 15 | /// 16 | [Flags] 17 | public enum MONITORINFO_Flags 18 | { 19 | /// 20 | /// No flags. 21 | /// 22 | None = 0x0, 23 | 24 | /// 25 | /// This is the primary display monitor. 26 | /// 27 | MONITORINFOF_PRIMARY = 0x1, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/User32/User32+MonitorOptions.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class User32 10 | { 11 | public enum MonitorOptions : uint 12 | { 13 | MONITOR_DEFAULTTONULL = 0x00000000, 14 | MONITOR_DEFAULTTOPRIMARY = 0x00000001, 15 | MONITOR_DEFAULTTONEAREST = 0x00000002, 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/User32/User32+PrintWindowFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Diagnostics.CodeAnalysis; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class User32 13 | { 14 | [SuppressMessage("ReSharper", "InconsistentNaming", Justification = "Original API names are used for consistency")] 15 | public enum PrintWindowFlags : uint 16 | { 17 | /// 18 | /// Default option. The entire window is copied to hdcBlt. 19 | /// 20 | PW_FULLWINDOW = 0x0000, 21 | 22 | /// 23 | /// Only the client area of the window is copied to hdcBlt. 24 | /// 25 | /// By default, the entire window is copied. 26 | PW_CLIENTONLY = 0x0001, 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/User32/User32+UserObjectFlagsEnum.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class User32 10 | { 11 | /// 12 | /// Flags indicating user object specific characteristics. 13 | /// 14 | public enum UserObjectFlagsEnum : uint 15 | { 16 | None = 0, 17 | 18 | /// 19 | /// For window stations, indicates that the window station has visible display surfaces 20 | /// 21 | WSF_VISIBLE = 0x0001, 22 | 23 | /// 24 | /// For desktops, indicates that the desktop allows processes running in other accounts on the desktop to set hooks in this process. 25 | /// 26 | DF_ALLOWOTHERACCOUNTHOOK = 0x0001, 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/User32/User32+WINDOWINFO.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System.Runtime.InteropServices; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class User32 12 | { 13 | public struct WINDOWINFO 14 | { 15 | public uint cbSize; 16 | public RECT rcWindow; 17 | public RECT rcClient; 18 | public uint dwStyle; 19 | public uint dwExStyle; 20 | public uint dwWindowStatus; 21 | public uint cxWindowBorders; 22 | public uint cyWindowBorders; 23 | public ushort atomWindowType; 24 | public ushort wCreatorVersion; 25 | 26 | public static unsafe WINDOWINFO Create() => new WINDOWINFO { cbSize = (uint)sizeof(WINDOWINFO) }; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/User32/User32+WINMAXINFO.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System.Runtime.InteropServices; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class User32 12 | { 13 | public struct MINMAXINFO 14 | { 15 | public POINT ptReserved; 16 | public POINT ptMaxSize; 17 | public POINT ptMaxPosition; 18 | public POINT ptMinTrackSize; 19 | public POINT ptMaxTrackSize; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/User32/User32+WNDCLASS.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Contains the nested type. 11 | /// 12 | public partial class User32 13 | { 14 | public unsafe struct WNDCLASS 15 | { 16 | public ClassStyles style; 17 | 18 | [MarshalAs(UnmanagedType.FunctionPtr)] 19 | public WndProc lpfnWndProc; 20 | 21 | public int cbClsExtra; 22 | 23 | public int cbWndExtra; 24 | 25 | public IntPtr hInstance; 26 | 27 | public IntPtr hIcon; 28 | 29 | public IntPtr hCursor; 30 | 31 | public IntPtr hbrBackground; 32 | 33 | public char* lpszMenuName; 34 | 35 | public char* lpszClassName; 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/User32/User32+WindowLongIndexFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial class User32 12 | { 13 | [Flags] 14 | public enum WindowLongIndexFlags : int 15 | { 16 | GWL_EXSTYLE = -20, 17 | GWLP_HINSTANCE = -6, 18 | GWLP_HWNDPARENT = -8, 19 | GWL_ID = -12, 20 | GWLP_ID = GWL_ID, 21 | GWL_STYLE = -16, 22 | GWL_USERDATA = -21, 23 | GWLP_USERDATA = GWL_USERDATA, 24 | GWL_WNDPROC = -4, 25 | GWLP_WNDPROC = GWL_WNDPROC, 26 | DWLP_USER = 0x8, 27 | DWLP_MSGRESULT = 0x0, 28 | DWLP_DLGPROC = 0x4, 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/User32/User32+WindowStationCreationFlags.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial class User32 10 | { 11 | /// 12 | /// Controls the behaviour of when a window station with the desired name already exists. 13 | /// 14 | public enum WindowStationCreationFlags : uint 15 | { 16 | None = 0x0000, 17 | 18 | /// 19 | /// Enables processes running in other accounts on the desktop to set hooks in this process 20 | /// 21 | CWF_CREATE_ONLY = 0x0001, 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/User32/User32.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Userenv/PublicAPI.Shipped.txt: -------------------------------------------------------------------------------- 1 | PInvoke.Userenv 2 | static PInvoke.Userenv.CreateEnvironmentBlock(out System.IntPtr lpEnvironment, PInvoke.Kernel32.SafeObjectHandle hToken, bool bInherit) -> bool 3 | static PInvoke.Userenv.DestroyEnvironmentBlock(System.IntPtr lpEnvironment) -> bool 4 | static extern PInvoke.Userenv.CreateEnvironmentBlock(out char* lpEnvironment, PInvoke.Kernel32.SafeObjectHandle hToken, bool bInherit) -> bool 5 | static extern PInvoke.Userenv.DestroyEnvironmentBlock(char* lpEnvironment) -> bool -------------------------------------------------------------------------------- /src/Userenv/PublicAPI.Unshipped.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/src/Userenv/PublicAPI.Unshipped.txt -------------------------------------------------------------------------------- /src/Userenv/Userenv.Helpers.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Methods and nested types that are not strictly P/Invokes but provide 11 | /// a slightly higher level of functionality to ease calling into native code. 12 | /// 13 | public static partial class Userenv 14 | { 15 | // This is where you define methods that assist in calling P/Invoke methods. 16 | // For example, if a P/Invoke method requires allocating unmanaged memory 17 | // and freeing it up after the call, a helper method in this file would 18 | // make "P/Invoking" for most callers much easier and is a welcome addition. 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Userenv/Userenv.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/UxTheme/PublicAPI.Unshipped.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/src/UxTheme/PublicAPI.Unshipped.txt -------------------------------------------------------------------------------- /src/UxTheme/UxTheme.Helpers.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Methods and nested types that are not strictly P/Invokes but provide 11 | /// a slightly higher level of functionality to ease calling into native code. 12 | /// 13 | public static partial class UxTheme 14 | { 15 | // This is where you define methods that assist in calling P/Invoke methods. 16 | // For example, if a P/Invoke method requires allocating unmanaged memory 17 | // and freeing it up after the call, a helper method in this file would 18 | // make "P/Invoking" for most callers much easier and is a welcome addition. 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/UxTheme/UxTheme.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/WinUsb/PublicAPI.Shipped.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/src/WinUsb/PublicAPI.Shipped.txt -------------------------------------------------------------------------------- /src/WinUsb/WinUsb.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformSpecificFrameworks);netstandard2.0 4 | true 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/WinUsb/winusb.exports.txt: -------------------------------------------------------------------------------- 1 | WinUsb_AbortPipe 2 | WinUsb_AbortPipeAsync 3 | WinUsb_ControlTransfer 4 | WinUsb_FlushPipe 5 | WinUsb_Free 6 | WinUsb_GetAdjustedFrameNumber 7 | WinUsb_GetAssociatedInterface 8 | WinUsb_GetCurrentAlternateSetting 9 | WinUsb_GetCurrentFrameNumber 10 | WinUsb_GetCurrentFrameNumberAndQpc 11 | WinUsb_GetDescriptor 12 | WinUsb_GetOverlappedResult 13 | WinUsb_GetPipePolicy 14 | WinUsb_GetPowerPolicy 15 | WinUsb_Initialize 16 | WinUsb_ParseConfigurationDescriptor 17 | WinUsb_ParseDescriptors 18 | WinUsb_QueryDeviceInformation 19 | WinUsb_QueryInterfaceSettings 20 | WinUsb_QueryPipe 21 | WinUsb_QueryPipeEx 22 | WinUsb_ReadIsochPipe 23 | WinUsb_ReadIsochPipeAsap 24 | WinUsb_ReadPipe 25 | WinUsb_RegisterIsochBuffer 26 | WinUsb_ResetPipe 27 | WinUsb_ResetPipeAsync 28 | WinUsb_SetCurrentAlternateSetting 29 | WinUsb_SetCurrentAlternateSettingAsync 30 | WinUsb_SetPipePolicy 31 | WinUsb_SetPowerPolicy 32 | WinUsb_StartTrackingForTimeSync 33 | WinUsb_StopTrackingForTimeSync 34 | WinUsb_UnregisterIsochBuffer 35 | WinUsb_WriteIsochPipe 36 | WinUsb_WriteIsochPipeAsap 37 | WinUsb_WritePipe 38 | -------------------------------------------------------------------------------- /src/Windows.Core/COORD.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System.Runtime.InteropServices; 7 | 8 | /// 9 | /// The COORD structure defines the X- and Y- coordinates of a point. 10 | /// 11 | public struct COORD 12 | { 13 | /// 14 | /// The x-coordinate of the point. 15 | /// 16 | public short X; 17 | 18 | /// 19 | /// The x-coordinate of the point. 20 | /// 21 | public short Y; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Windows.Core/Constants.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Constants defined by common C or Windows headers. 8 | /// 9 | public static partial class Constants 10 | { 11 | /// 12 | /// An infinite timeout. 13 | /// 14 | public const int INFINITE = -1; 15 | 16 | public const int IMAGE_NUMBEROF_DIRECTORY_ENTRIES = 16; 17 | 18 | public const int IMAGE_SIZEOF_SHORT_NAME = 8; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Windows.Core/HResult+SeverityCode.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// The nested type. 8 | /// 9 | public partial struct HResult 10 | { 11 | /// 12 | /// HRESULT severity codes defined by winerror.h. 13 | /// 14 | public enum SeverityCode : uint 15 | { 16 | Success = 0, 17 | Fail = 1, 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Windows.Core/IMAGE_DATA_DIRECTORY.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Represents the data directory. 8 | /// 9 | /// 10 | /// See remarks on MSDN: https://msdn.microsoft.com/en-us/library/windows/desktop/ms680305(v=vs.85).aspx. 11 | /// 12 | public struct IMAGE_DATA_DIRECTORY 13 | { 14 | /// 15 | /// The relative virtual address of the table. 16 | /// 17 | public uint VirtualAddress; 18 | 19 | /// 20 | /// The size of the table, in bytes. 21 | /// 22 | public uint Size; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Windows.Core/IMAGE_FILE_HEADER+MachineType.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public partial struct IMAGE_FILE_HEADER 10 | { 11 | /// 12 | /// Describes the expected values of the field. 13 | /// 14 | public enum MachineType : ushort 15 | { 16 | /// 17 | /// x86 18 | /// 19 | IMAGE_FILE_MACHINE_I386 = 0x014c, 20 | 21 | /// 22 | /// Intel Itanium 23 | /// 24 | IMAGE_FILE_MACHINE_IA64 = 0x0200, 25 | 26 | /// 27 | /// x64 28 | /// 29 | IMAGE_FILE_MACHINE_AMD64 = 0x8664, 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Windows.Core/IMAGE_NT_HEADERS.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System.Runtime.InteropServices; 7 | 8 | /// 9 | /// Represents the PE header format. 10 | /// 11 | public struct IMAGE_NT_HEADERS 12 | { 13 | /// 14 | /// A 4-byte signature identifying the file as a PE image. The bytes are "PE\0\0". 15 | /// 16 | public uint Signature; 17 | 18 | /// 19 | /// An structure that specifies the file header. 20 | /// 21 | public IMAGE_FILE_HEADER FileHeader; 22 | 23 | /// 24 | /// An structure that specifies the optional file header. 25 | /// 26 | public IMAGE_OPTIONAL_HEADER OptionalHeader; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Windows.Core/IMAGE_SECTION_HEADER+CharacteristicsType.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | 8 | /// 9 | /// Contains the nested type. 10 | /// 11 | public partial struct IMAGE_SECTION_HEADER 12 | { 13 | /// 14 | /// Enumerates the values that may be expected in the field. 15 | /// 16 | [Flags] 17 | public enum CharacteristicsType 18 | { 19 | // TODO 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Windows.Core/LIST_ENTRY.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System.Runtime.InteropServices; 7 | 8 | /// 9 | /// Describes a link in a doubly-linked list. 10 | /// 11 | [OfferIntPtrPropertyAccessors] 12 | public unsafe partial struct LIST_ENTRY 13 | { 14 | public LIST_ENTRY* Flink; 15 | public LIST_ENTRY* Blink; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Windows.Core/NTStatus+SeverityCode.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// The nested type. 8 | /// 9 | public partial struct NTSTATUS 10 | { 11 | /// 12 | /// The severity codes. 13 | /// 14 | public enum SeverityCode : uint 15 | { 16 | STATUS_SEVERITY_SUCCESS = 0x0, 17 | STATUS_SEVERITY_INFORMATIONAL = 0x1u, 18 | STATUS_SEVERITY_WARNING = 0x2u, 19 | STATUS_SEVERITY_ERROR = 0x3u, 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Windows.Core/POINT.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System.Runtime.InteropServices; 7 | 8 | /// 9 | /// The POINT structure defines the x- and y- coordinates of a point. 10 | /// 11 | public struct POINT 12 | { 13 | /// 14 | /// The x-coordinate of the point. 15 | /// 16 | public int x; 17 | 18 | /// 19 | /// The x-coordinate of the point. 20 | /// 21 | public int y; 22 | 23 | #if !UAP10_0 24 | public static implicit operator System.Drawing.Point(POINT point) => new System.Drawing.Point(point.x, point.y); 25 | 26 | public static implicit operator POINT(System.Drawing.Point point) => new POINT { x = point.X, y = point.Y }; 27 | #endif 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Windows.Core/SafeHandleZeroOrMinusOneIsInvalid.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | // We must type forward so that folks who compiled against our netstandard1.x library 5 | // can still run when linking against a more recent library at runtime. 6 | using System.Runtime.CompilerServices; 7 | using Microsoft.Win32.SafeHandles; 8 | 9 | [assembly: TypeForwardedTo(typeof(SafeHandleZeroOrMinusOneIsInvalid))] 10 | -------------------------------------------------------------------------------- /src/Windows.Core/Windows.Core.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | P/Invoke types for common Windows APIs. 5 | P/Invoke types for common Windows APIs. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/Windows.ShellScalingApi/PublicAPI.Shipped.txt: -------------------------------------------------------------------------------- 1 | PInvoke.MONITOR_DPI_TYPE 2 | PInvoke.MONITOR_DPI_TYPE.MDT_ANGULAR_DPI = 1 -> PInvoke.MONITOR_DPI_TYPE 3 | PInvoke.MONITOR_DPI_TYPE.MDT_DEFAULT = 0 -> PInvoke.MONITOR_DPI_TYPE 4 | PInvoke.MONITOR_DPI_TYPE.MDT_EFFECTIVE_DPI = 0 -> PInvoke.MONITOR_DPI_TYPE 5 | PInvoke.MONITOR_DPI_TYPE.MDT_RAW_DPI = 2 -> PInvoke.MONITOR_DPI_TYPE 6 | PInvoke.PROCESS_DPI_AWARENESS 7 | PInvoke.PROCESS_DPI_AWARENESS.PROCESS_DPI_UNAWARE = 0 -> PInvoke.PROCESS_DPI_AWARENESS 8 | PInvoke.PROCESS_DPI_AWARENESS.PROCESS_PER_MONITOR_DPI_AWARE = 2 -> PInvoke.PROCESS_DPI_AWARENESS 9 | PInvoke.PROCESS_DPI_AWARENESS.PROCESS_SYSTEM_DPI_AWARE = 1 -> PInvoke.PROCESS_DPI_AWARENESS 10 | PInvoke.SHELL_UI_COMPONENT 11 | PInvoke.SHELL_UI_COMPONENT.SHELL_UI_COMPONENT_DESKBAND = 2 -> PInvoke.SHELL_UI_COMPONENT 12 | PInvoke.SHELL_UI_COMPONENT.SHELL_UI_COMPONENT_NOTIFICATIONAREA = 1 -> PInvoke.SHELL_UI_COMPONENT 13 | PInvoke.SHELL_UI_COMPONENT.SHELL_UI_COMPONENT_TASKBARS = 0 -> PInvoke.SHELL_UI_COMPONENT 14 | PInvoke.ShellScalingApi 15 | PInvoke.ShellScalingApi.ShellScalingApi() -> void -------------------------------------------------------------------------------- /src/Windows.ShellScalingApi/ShellScalingApi.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Exported functions from the ShellScalingApi.h header. 8 | /// 9 | [OfferFriendlyOverloads] 10 | public partial class ShellScalingApi 11 | { 12 | // SHCore functions are defined in the SHCore library. 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Windows.ShellScalingApi/ShellScallingApi+SHELL_UI_COMPONENT.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Identifies the type of UI component that is needed in the shell. 11 | /// 12 | public enum SHELL_UI_COMPONENT 13 | { 14 | /// 15 | /// This UI component is a taskbar icon 16 | /// 17 | SHELL_UI_COMPONENT_TASKBARS = 0, 18 | 19 | /// 20 | /// This UI component is an icon in the notification area 21 | /// 22 | SHELL_UI_COMPONENT_NOTIFICATIONAREA = 1, 23 | 24 | /// 25 | /// This UI component is a deskband icon 26 | /// 27 | SHELL_UI_COMPONENT_DESKBAND = 2, 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Windows.ShellScalingApi/Windows.ShellScalingApi.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/WtsApi32/PublicAPI.Unshipped.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/src/WtsApi32/PublicAPI.Unshipped.txt -------------------------------------------------------------------------------- /src/WtsApi32/WtsApi32+WTS_CONNECTSTATE_CLASS.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | /// 7 | /// Contains the nested type. 8 | /// 9 | public static partial class WtsApi32 10 | { 11 | /// 12 | /// Specifies the connection state of a Remote Desktop Services session. 13 | /// 14 | public enum WTS_CONNECTSTATE_CLASS 15 | { 16 | WTSActive, 17 | WTSConnected, 18 | WTSConnectQuery, 19 | WTSShadow, 20 | WTSDisconnected, 21 | WTSIdle, 22 | WTSListen, 23 | WTSReset, 24 | WTSDown, 25 | WTSInit, 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/WtsApi32/WtsApi32.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | true 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /strongname.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/strongname.snk -------------------------------------------------------------------------------- /stylecop.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", 3 | "settings": { 4 | "documentationRules": { 5 | "companyName": "Andrew Arnott", 6 | "xmlHeader": false, 7 | "copyrightText": "Copyright © .NET Foundation and Contributors. All rights reserved.\nLicensed under the {licenseName} license. See {licenseFile} file in the project root for full license information.", 8 | "variables": { 9 | "licenseName": "MIT", 10 | "licenseFile": "LICENSE" 11 | } 12 | }, 13 | "orderingRules": { 14 | "usingDirectivesPlacement": "insideNamespace" 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /templates/LIBNAME.Tests/LIBNAME.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /templates/LIBNAME.Tests/LIBNAMEFacts.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System; 5 | using PInvoke; 6 | using Xunit; 7 | using static PInvoke.LIBNAME; 8 | 9 | public class LIBNAMEFacts 10 | { 11 | [Fact(Skip = "No tests yet")] 12 | public void NoTests() 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /templates/LIBNAME/LIBNAME.Helpers.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Methods and nested types that are not strictly P/Invokes but provide 11 | /// a slightly higher level of functionality to ease calling into native code. 12 | /// 13 | public static partial class LIBNAME 14 | { 15 | // This is where you define methods that assist in calling P/Invoke methods. 16 | // For example, if a P/Invoke method requires allocating unmanaged memory 17 | // and freeing it up after the call, a helper method in this file would 18 | // make "P/Invoking" for most callers much easier and is a welcome addition. 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /templates/LIBNAME/LIBNAME.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | namespace PInvoke 5 | { 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | /// 10 | /// Exported functions from the LIBNAME.dll Windows library 11 | /// that are available to Desktop and Store apps. 12 | /// 13 | [OfferFriendlyOverloads] 14 | public static partial class LIBNAME 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /templates/LIBNAME/LIBNAME.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | $(PlatformAndPortableFrameworks) 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /templates/LIBNAME/PublicAPI.Shipped.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/templates/LIBNAME/PublicAPI.Shipped.txt -------------------------------------------------------------------------------- /templates/LIBNAME/PublicAPI.Unshipped.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/templates/LIBNAME/PublicAPI.Unshipped.txt -------------------------------------------------------------------------------- /test/AdvApi32.Tests/AdvApi32.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/BCrypt.Tests/BCrypt.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/Cabinet.Tests/Cabinet.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472;netcoreapp3.1 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | PreserveNewest 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /test/Cabinet.Tests/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/Cabinet.Tests/demo.CAB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/test/Cabinet.Tests/demo.CAB -------------------------------------------------------------------------------- /test/CfgMgr32.Tests/CfgMgr32.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/Crypt32.Tests/Crypt32.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /test/Crypt32.Tests/protectedPair.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/test/Crypt32.Tests/protectedPair.pfx -------------------------------------------------------------------------------- /test/DbgHelp.Tests/DbgHelp.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/DbgHelp.Tests/DbgHelpFacts.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System; 5 | using PInvoke; 6 | using Xunit; 7 | using static PInvoke.DbgHelp; 8 | 9 | public class DbgHelpFacts 10 | { 11 | [Fact] 12 | public void IntPtrGeneration() 13 | { 14 | LOADED_IMAGE image = default(LOADED_IMAGE); 15 | image.FileHeader_IntPtr = IntPtr.Zero; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | 5 | 6 | 7 | 8 | 9 | $(RepoRootPath)bin\$(Configuration)\tests\$(MSBuildProjectName)\ 10 | false 11 | true 12 | false 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /test/Directory.Build.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/DwmApi.Tests/DwmApi.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/Fusion.Tests/Fusion.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/Hid.Tests/Hid.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/IPHlpApi.Tests/IPHlpApi.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/ImageHlp.Tests/ImageHlp.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/ImageHlp.Tests/ImageHlpFacts.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System; 5 | using PInvoke; 6 | using Xunit; 7 | using static PInvoke.DbgHelp; 8 | using static PInvoke.ImageHlp; 9 | 10 | public class ImageHlpFacts 11 | { 12 | [Fact] 13 | [Trait("skiponcloud", "true")] 14 | [Trait("TestCategory", "FailsInCloudTest")] 15 | public void MapAndLoadTest() 16 | { 17 | Assert.True(MapAndLoad("kernel32.dll", null, out LOADED_IMAGE imageData, true, true)); 18 | try 19 | { 20 | Assert.True(imageData.fReadOnly); 21 | Assert.Contains("kernel32", imageData.ModuleName, StringComparison.OrdinalIgnoreCase); 22 | } 23 | finally 24 | { 25 | Assert.True(UnMapAndLoad(ref imageData)); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /test/Kernel32.Tests/Kernel32.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472;netcoreapp3.1 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/MSCorEE.Tests/Keys/keypair.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/test/MSCorEE.Tests/Keys/keypair.snk -------------------------------------------------------------------------------- /test/MSCorEE.Tests/Keys/public.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/pinvoke/d974353ca67c4b8e6009096bd3ab7e6f284ed11d/test/MSCorEE.Tests/Keys/public.snk -------------------------------------------------------------------------------- /test/MSCorEE.Tests/MSCorEE.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | true 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | false 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /test/Magnification.Tests/Magnification.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/Msi.Tests/Msi.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/NCrypt.Tests/NCrypt.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | 10 | UseCultureAttribute.cs 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/NTDll.Tests/NTDll.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/NetApi32.Tests/NetApi32.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/NetApi32.Tests/NetApi32Facts.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System; 5 | using PInvoke; 6 | using Xunit; 7 | using static PInvoke.NetApi32; 8 | 9 | public class NetApi32Facts 10 | { 11 | [Fact(Skip = "No tests yet")] 12 | public void NoTests() 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/NewDev.Tests/NewDev.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/NewDev.Tests/NewDevFacts.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using Xunit; 5 | 6 | public class NewDevFacts 7 | { 8 | [Fact(Skip = "No tests yet")] 9 | public void NoTests() 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/Ole32.Tests/Ole32.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/Ole32.Tests/Ole32Facts.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System; 5 | using PInvoke; 6 | using Xunit; 7 | using static PInvoke.Ole32; 8 | 9 | public class Ole32Facts 10 | { 11 | [Fact(Skip = "No tests yet")] 12 | public void NoTests() 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/Psapi.Tests/Psapi.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/Psapi.Tests/PsapiFacts.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System; 5 | using Xunit; 6 | using static PInvoke.Kernel32; 7 | using static PInvoke.Psapi; 8 | 9 | public class PsapiFacts 10 | { 11 | [Fact] 12 | public void EmptyWorkingSet_Run() 13 | { 14 | using (SafeObjectHandle pid = GetCurrentProcess()) 15 | { 16 | Assert.True(EmptyWorkingSet(pid)); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /test/SHCore.Tests/SHCore.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/SHCore.Tests/SHCoreFacts.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System; 5 | using PInvoke; 6 | using Xunit; 7 | using static PInvoke.SHCore; 8 | 9 | public class SHCoreFacts 10 | { 11 | [Fact(Skip = "No tests yet")] 12 | public void NoTests() 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/SetupApi.Tests/SP_DEVINFO_DATAFacts.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System; 5 | using PInvoke; 6 | using Xunit; 7 | 8 | public class SP_DEVINFO_DATAFacts 9 | { 10 | [Fact] 11 | public void Size_Test() 12 | { 13 | var value = SetupApi.SP_DEVINFO_DATA.Create(); 14 | 15 | if (Environment.Is64BitProcess) 16 | { 17 | Assert.Equal(0x20, value.Size); 18 | } 19 | else 20 | { 21 | Assert.Equal(0x1c, value.Size); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /test/SetupApi.Tests/SP_DEVINSTALL_PARAMSFacts.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System; 5 | using PInvoke; 6 | using Xunit; 7 | 8 | public class SP_DEVINSTALL_PARAMSFacts 9 | { 10 | [Fact] 11 | public void Size_Test() 12 | { 13 | var value = SetupApi.SP_DEVINSTALL_PARAMS.Create(); 14 | 15 | if (Environment.Is64BitProcess) 16 | { 17 | Assert.Equal(0x248, value.cbSize); 18 | } 19 | else 20 | { 21 | Assert.Equal(0x22c, value.cbSize); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /test/SetupApi.Tests/SP_DRVINFO_DATAFacts.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System; 5 | using PInvoke; 6 | using Xunit; 7 | 8 | public class SP_DRVINFO_DATAFacts 9 | { 10 | [Fact] 11 | public void Size_Test() 12 | { 13 | var value = SetupApi.SP_DRVINFO_DATA.Create(); 14 | 15 | if (Environment.Is64BitProcess) 16 | { 17 | Assert.Equal(0x620, value.cbSize); 18 | } 19 | else 20 | { 21 | Assert.Equal(0x61c, value.cbSize); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /test/SetupApi.Tests/SetupApi.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/Shell32.Tests/Shell32.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/User32.Tests/User32.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/Userenv.Tests/Userenv.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/UxTheme.Tests/UxTheme.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/UxTheme.Tests/UxThemeFacts.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System; 5 | using PInvoke; 6 | using Xunit; 7 | using static PInvoke.UxTheme; 8 | 9 | public class UxThemeFacts 10 | { 11 | [Fact(Skip = "No tests yet")] 12 | public void NoTests() 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/WinUsb.Tests/WinUsb.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/Windows.Core.Tests/PInvokeExtensionsFacts.cs: -------------------------------------------------------------------------------- 1 | // Copyright © .NET Foundation and Contributors. All rights reserved. 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 | 4 | using System; 5 | using System.Runtime.InteropServices; 6 | using PInvoke; 7 | using Xunit; 8 | 9 | public class PInvokeExtensionsFacts 10 | { 11 | [Fact] 12 | public void ToHResult_FromNTStatus() 13 | { 14 | NTSTATUS duplicate = NTSTATUS.Code.STATUS_DUPLICATE_OBJECTID; 15 | Assert.Equal(0xD000022A, duplicate.ToHResult()); 16 | } 17 | 18 | [Fact] 19 | public void ToHResult_FromWin32ErrorCode() 20 | { 21 | Assert.Equal(0x80071392, Win32ErrorCode.ERROR_OBJECT_ALREADY_EXISTS.ToHResult()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /test/Windows.Core.Tests/Windows.Core.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/WtsApi32.Tests/WtsApi32.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tools/Check-DotNetSdk.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Checks whether the .NET Core SDK required by this repo is installed. 4 | #> 5 | [CmdletBinding()] 6 | Param ( 7 | ) 8 | 9 | $dotnet = Get-Command dotnet -ErrorAction SilentlyContinue 10 | if (!$dotnet) { 11 | # Nothing is installed. 12 | Write-Output $false 13 | exit 1 14 | } 15 | 16 | # We need to set the current directory so dotnet considers the SDK required by our global.json file. 17 | Push-Location "$PSScriptRoot\.." 18 | try { 19 | dotnet -h 2>&1 | Out-Null 20 | if (($LASTEXITCODE -eq 129) -or # On Linux 21 | ($LASTEXITCODE -eq -2147450751) # On Windows 22 | ) { 23 | # These exit codes indicate no matching SDK exists. 24 | Write-Output $false 25 | exit 2 26 | } 27 | 28 | # The required SDK is already installed! 29 | Write-Output $true 30 | exit 0 31 | } catch { 32 | # I don't know why, but on some build agents (e.g. MicroBuild), an exception is thrown from the `dotnet` invocation when a match is not found. 33 | Write-Output $false 34 | exit 3 35 | } finally { 36 | Pop-Location 37 | } 38 | -------------------------------------------------------------------------------- /tools/Get-Shields.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Gets the shields for all libraries. 4 | 5 | .PARAMETER Directory 6 | The directory to search for the exports and pinvokes files (e.g. bin\debug). 7 | #> 8 | Param( 9 | [Parameter(Mandatory=$true,Position=0)] 10 | [string]$Directory 11 | ) 12 | 13 | $Shields = @() 14 | $pinvokeFiles = Get-ChildItem -Path "$Directory\*.pinvokes.txt" -Recurse 15 | $pinvokeFiles |% { 16 | $null = $_.Name -Match "(?\w+)\.pinvokes.txt" 17 | $Library = $Matches.Library 18 | $ExportsPath = Join-Path $_.Directory "$Library.exports.txt" 19 | if (Test-Path $ExportsPath) { 20 | $Shields += & "$PSScriptRoot\Get-Shield.ps1" -Directory $_.Directory -Library $Library 21 | } 22 | } 23 | 24 | $Shields | Sort-Object Subject 25 | -------------------------------------------------------------------------------- /tools/PromoteUnshippedAPIs.ps1: -------------------------------------------------------------------------------- 1 | Get-ChildItem "$PSScriptRoot\..\src\PublicAPI.Unshipped.txt" -Recurse |% { 2 | $unshippedAPIs = @(Get-Content -Path $_) 3 | if ($unshippedAPIs.Length -gt 0) { 4 | $LibName = Split-Path (Split-Path $_) -Leaf 5 | Write-Host "Promoting $($unshippedAPIs.Length) APIs from $LibName" 6 | Set-Content -Path $_ -Value @() 7 | $ShippedApiPath = Join-Path (Split-Path $_) PublicAPI.Shipped.txt 8 | $shippedAPIs = @(Get-Content -Path $ShippedApiPath) 9 | Set-Content -Path $ShippedApiPath -Value ($shippedAPIs + $unshippedAPIs) 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /version.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", 3 | "version": "0.7", 4 | "publicReleaseRefSpec": [ 5 | "^refs/heads/main$", // we release out of main 6 | "^refs/tags/v\\d+\\.\\d+" // we also release tags starting with vN.N 7 | ], 8 | "cloudBuild": { 9 | "setVersionVariables": false 10 | } 11 | } 12 | --------------------------------------------------------------------------------