//! NOTE: this file is autogenerated, DO NOT MODIFY
//--------------------------------------------------------------------------------
// Section: Constants (1298)
//--------------------------------------------------------------------------------
pub const ISSP_LEVEL = @as(u32, 32);
pub const ISSP_MODE = @as(u32, 1);
pub const SECPKG_FLAG_INTEGRITY = @as(u32, 1);
pub const SECPKG_FLAG_PRIVACY = @as(u32, 2);
pub const SECPKG_FLAG_TOKEN_ONLY = @as(u32, 4);
pub const SECPKG_FLAG_DATAGRAM = @as(u32, 8);
pub const SECPKG_FLAG_CONNECTION = @as(u32, 16);
pub const SECPKG_FLAG_MULTI_REQUIRED = @as(u32, 32);
pub const SECPKG_FLAG_CLIENT_ONLY = @as(u32, 64);
pub const SECPKG_FLAG_EXTENDED_ERROR = @as(u32, 128);
pub const SECPKG_FLAG_IMPERSONATION = @as(u32, 256);
pub const SECPKG_FLAG_ACCEPT_WIN32_NAME = @as(u32, 512);
pub const SECPKG_FLAG_STREAM = @as(u32, 1024);
pub const SECPKG_FLAG_NEGOTIABLE = @as(u32, 2048);
pub const SECPKG_FLAG_GSS_COMPATIBLE = @as(u32, 4096);
pub const SECPKG_FLAG_LOGON = @as(u32, 8192);
pub const SECPKG_FLAG_ASCII_BUFFERS = @as(u32, 16384);
pub const SECPKG_FLAG_FRAGMENT = @as(u32, 32768);
pub const SECPKG_FLAG_MUTUAL_AUTH = @as(u32, 65536);
pub const SECPKG_FLAG_DELEGATION = @as(u32, 131072);
pub const SECPKG_FLAG_READONLY_WITH_CHECKSUM = @as(u32, 262144);
pub const SECPKG_FLAG_RESTRICTED_TOKENS = @as(u32, 524288);
pub const SECPKG_FLAG_NEGO_EXTENDER = @as(u32, 1048576);
pub const SECPKG_FLAG_NEGOTIABLE2 = @as(u32, 2097152);
pub const SECPKG_FLAG_APPCONTAINER_PASSTHROUGH = @as(u32, 4194304);
pub const SECPKG_FLAG_APPCONTAINER_CHECKS = @as(u32, 8388608);
pub const SECPKG_FLAG_CREDENTIAL_ISOLATION_ENABLED = @as(u32, 16777216);
pub const SECPKG_FLAG_APPLY_LOOPBACK = @as(u32, 33554432);
pub const SECPKG_ID_NONE = @as(u32, 65535);
pub const SECPKG_CALLFLAGS_APPCONTAINER = @as(u32, 1);
pub const SECPKG_CALLFLAGS_APPCONTAINER_AUTHCAPABLE = @as(u32, 2);
pub const SECPKG_CALLFLAGS_FORCE_SUPPLIED = @as(u32, 4);
pub const SECPKG_CALLFLAGS_APPCONTAINER_UPNCAPABLE = @as(u32, 8);
pub const SECBUFFER_VERSION = @as(u32, 0);
pub const SECBUFFER_EMPTY = @as(u32, 0);
pub const SECBUFFER_DATA = @as(u32, 1);
pub const SECBUFFER_TOKEN = @as(u32, 2);
pub const SECBUFFER_PKG_PARAMS = @as(u32, 3);
pub const SECBUFFER_MISSING = @as(u32, 4);
pub const SECBUFFER_EXTRA = @as(u32, 5);
pub const SECBUFFER_STREAM_TRAILER = @as(u32, 6);
pub const SECBUFFER_STREAM_HEADER = @as(u32, 7);
pub const SECBUFFER_NEGOTIATION_INFO = @as(u32, 8);
pub const SECBUFFER_PADDING = @as(u32, 9);
pub const SECBUFFER_STREAM = @as(u32, 10);
pub const SECBUFFER_MECHLIST = @as(u32, 11);
pub const SECBUFFER_MECHLIST_SIGNATURE = @as(u32, 12);
pub const SECBUFFER_TARGET = @as(u32, 13);
pub const SECBUFFER_CHANNEL_BINDINGS = @as(u32, 14);
pub const SECBUFFER_CHANGE_PASS_RESPONSE = @as(u32, 15);
pub const SECBUFFER_TARGET_HOST = @as(u32, 16);
pub const SECBUFFER_ALERT = @as(u32, 17);
pub const SECBUFFER_APPLICATION_PROTOCOLS = @as(u32, 18);
pub const SECBUFFER_SRTP_PROTECTION_PROFILES = @as(u32, 19);
pub const SECBUFFER_SRTP_MASTER_KEY_IDENTIFIER = @as(u32, 20);
pub const SECBUFFER_TOKEN_BINDING = @as(u32, 21);
pub const SECBUFFER_PRESHARED_KEY = @as(u32, 22);
pub const SECBUFFER_PRESHARED_KEY_IDENTITY = @as(u32, 23);
pub const SECBUFFER_DTLS_MTU = @as(u32, 24);
pub const SECBUFFER_SEND_GENERIC_TLS_EXTENSION = @as(u32, 25);
pub const SECBUFFER_SUBSCRIBE_GENERIC_TLS_EXTENSION = @as(u32, 26);
pub const SECBUFFER_FLAGS = @as(u32, 27);
pub const SECBUFFER_TRAFFIC_SECRETS = @as(u32, 28);
pub const SECBUFFER_ATTRMASK = @as(u32, 4026531840);
pub const SECBUFFER_READONLY = @as(u32, 2147483648);
pub const SECBUFFER_READONLY_WITH_CHECKSUM = @as(u32, 268435456);
pub const SECBUFFER_RESERVED = @as(u32, 1610612736);
pub const SZ_ALG_MAX_SIZE = @as(u32, 64);
pub const SECURITY_NATIVE_DREP = @as(u32, 16);
pub const SECURITY_NETWORK_DREP = @as(u32, 0);
pub const SECPKG_CRED_BOTH = @as(u32, 3);
pub const SECPKG_CRED_DEFAULT = @as(u32, 4);
pub const SECPKG_CRED_RESERVED = @as(u32, 4026531840);
pub const SECPKG_CRED_AUTOLOGON_RESTRICTED = @as(u32, 16);
pub const SECPKG_CRED_PROCESS_POLICY_ONLY = @as(u32, 32);
pub const ISC_REQ_DELEGATE = @as(u32, 1);
pub const ISC_REQ_MUTUAL_AUTH = @as(u32, 2);
pub const ISC_REQ_REPLAY_DETECT = @as(u32, 4);
pub const ISC_REQ_SEQUENCE_DETECT = @as(u32, 8);
pub const ISC_REQ_CONFIDENTIALITY = @as(u32, 16);
pub const ISC_REQ_USE_SESSION_KEY = @as(u32, 32);
pub const ISC_REQ_PROMPT_FOR_CREDS = @as(u32, 64);
pub const ISC_REQ_USE_SUPPLIED_CREDS = @as(u32, 128);
pub const ISC_REQ_ALLOCATE_MEMORY = @as(u32, 256);
pub const ISC_REQ_USE_DCE_STYLE = @as(u32, 512);
pub const ISC_REQ_DATAGRAM = @as(u32, 1024);
pub const ISC_REQ_CONNECTION = @as(u32, 2048);
pub const ISC_REQ_CALL_LEVEL = @as(u32, 4096);
pub const ISC_REQ_FRAGMENT_SUPPLIED = @as(u32, 8192);
pub const ISC_REQ_EXTENDED_ERROR = @as(u32, 16384);
pub const ISC_REQ_STREAM = @as(u32, 32768);
pub const ISC_REQ_INTEGRITY = @as(u32, 65536);
pub const ISC_REQ_IDENTIFY = @as(u32, 131072);
pub const ISC_REQ_NULL_SESSION = @as(u32, 262144);
pub const ISC_REQ_MANUAL_CRED_VALIDATION = @as(u32, 524288);
pub const ISC_REQ_RESERVED1 = @as(u32, 1048576);
pub const ISC_REQ_FRAGMENT_TO_FIT = @as(u32, 2097152);
pub const ISC_REQ_FORWARD_CREDENTIALS = @as(u32, 4194304);
pub const ISC_REQ_NO_INTEGRITY = @as(u32, 8388608);
pub const ISC_REQ_USE_HTTP_STYLE = @as(u32, 16777216);
pub const ISC_REQ_UNVERIFIED_TARGET_NAME = @as(u32, 536870912);
pub const ISC_REQ_CONFIDENTIALITY_ONLY = @as(u32, 1073741824);
pub const ISC_REQ_MESSAGES = @as(u64, 4294967296);
pub const ISC_REQ_DEFERRED_CRED_VALIDATION = @as(u64, 8589934592);
pub const ISC_RET_DELEGATE = @as(u32, 1);
pub const ISC_RET_MUTUAL_AUTH = @as(u32, 2);
pub const ISC_RET_REPLAY_DETECT = @as(u32, 4);
pub const ISC_RET_SEQUENCE_DETECT = @as(u32, 8);
pub const ISC_RET_CONFIDENTIALITY = @as(u32, 16);
pub const ISC_RET_USE_SESSION_KEY = @as(u32, 32);
pub const ISC_RET_USED_COLLECTED_CREDS = @as(u32, 64);
pub const ISC_RET_USED_SUPPLIED_CREDS = @as(u32, 128);
pub const ISC_RET_ALLOCATED_MEMORY = @as(u32, 256);
pub const ISC_RET_USED_DCE_STYLE = @as(u32, 512);
pub const ISC_RET_DATAGRAM = @as(u32, 1024);
pub const ISC_RET_CONNECTION = @as(u32, 2048);
pub const ISC_RET_INTERMEDIATE_RETURN = @as(u32, 4096);
pub const ISC_RET_CALL_LEVEL = @as(u32, 8192);
pub const ISC_RET_EXTENDED_ERROR = @as(u32, 16384);
pub const ISC_RET_STREAM = @as(u32, 32768);
pub const ISC_RET_INTEGRITY = @as(u32, 65536);
pub const ISC_RET_IDENTIFY = @as(u32, 131072);
pub const ISC_RET_NULL_SESSION = @as(u32, 262144);
pub const ISC_RET_MANUAL_CRED_VALIDATION = @as(u32, 524288);
pub const ISC_RET_RESERVED1 = @as(u32, 1048576);
pub const ISC_RET_FRAGMENT_ONLY = @as(u32, 2097152);
pub const ISC_RET_FORWARD_CREDENTIALS = @as(u32, 4194304);
pub const ISC_RET_USED_HTTP_STYLE = @as(u32, 16777216);
pub const ISC_RET_NO_ADDITIONAL_TOKEN = @as(u32, 33554432);
pub const ISC_RET_REAUTHENTICATION = @as(u32, 134217728);
pub const ISC_RET_CONFIDENTIALITY_ONLY = @as(u32, 1073741824);
pub const ISC_RET_MESSAGES = @as(u64, 4294967296);
pub const ISC_RET_DEFERRED_CRED_VALIDATION = @as(u64, 8589934592);
pub const ASC_REQ_MUTUAL_AUTH = @as(u32, 2);
pub const ASC_REQ_CONFIDENTIALITY = @as(u32, 16);
pub const ASC_REQ_USE_SESSION_KEY = @as(u32, 32);
pub const ASC_REQ_SESSION_TICKET = @as(u32, 64);
pub const ASC_REQ_USE_DCE_STYLE = @as(u32, 512);
pub const ASC_REQ_DATAGRAM = @as(u32, 1024);
pub const ASC_REQ_CALL_LEVEL = @as(u32, 4096);
pub const ASC_REQ_FRAGMENT_SUPPLIED = @as(u32, 8192);
pub const ASC_REQ_INTEGRITY = @as(u32, 131072);
pub const ASC_REQ_LICENSING = @as(u32, 262144);
pub const ASC_REQ_IDENTIFY = @as(u32, 524288);
pub const ASC_REQ_ALLOW_NULL_SESSION = @as(u32, 1048576);
pub const ASC_REQ_ALLOW_NON_USER_LOGONS = @as(u32, 2097152);
pub const ASC_REQ_ALLOW_CONTEXT_REPLAY = @as(u32, 4194304);
pub const ASC_REQ_FRAGMENT_TO_FIT = @as(u32, 8388608);
pub const ASC_REQ_NO_TOKEN = @as(u32, 16777216);
pub const ASC_REQ_PROXY_BINDINGS = @as(u32, 67108864);
pub const ASC_REQ_ALLOW_MISSING_BINDINGS = @as(u32, 268435456);
pub const ASC_REQ_MESSAGES = @as(u64, 4294967296);
pub const ASC_RET_DELEGATE = @as(u32, 1);
pub const ASC_RET_MUTUAL_AUTH = @as(u32, 2);
pub const ASC_RET_REPLAY_DETECT = @as(u32, 4);
pub const ASC_RET_SEQUENCE_DETECT = @as(u32, 8);
pub const ASC_RET_CONFIDENTIALITY = @as(u32, 16);
pub const ASC_RET_USE_SESSION_KEY = @as(u32, 32);
pub const ASC_RET_SESSION_TICKET = @as(u32, 64);
pub const ASC_RET_ALLOCATED_MEMORY = @as(u32, 256);
pub const ASC_RET_USED_DCE_STYLE = @as(u32, 512);
pub const ASC_RET_DATAGRAM = @as(u32, 1024);
pub const ASC_RET_CONNECTION = @as(u32, 2048);
pub const ASC_RET_CALL_LEVEL = @as(u32, 8192);
pub const ASC_RET_THIRD_LEG_FAILED = @as(u32, 16384);
pub const ASC_RET_EXTENDED_ERROR = @as(u32, 32768);
pub const ASC_RET_STREAM = @as(u32, 65536);
pub const ASC_RET_INTEGRITY = @as(u32, 131072);
pub const ASC_RET_LICENSING = @as(u32, 262144);
pub const ASC_RET_IDENTIFY = @as(u32, 524288);
pub const ASC_RET_NULL_SESSION = @as(u32, 1048576);
pub const ASC_RET_ALLOW_NON_USER_LOGONS = @as(u32, 2097152);
pub const ASC_RET_ALLOW_CONTEXT_REPLAY = @as(u32, 4194304);
pub const ASC_RET_FRAGMENT_ONLY = @as(u32, 8388608);
pub const ASC_RET_NO_TOKEN = @as(u32, 16777216);
pub const ASC_RET_NO_ADDITIONAL_TOKEN = @as(u32, 33554432);
pub const ASC_RET_MESSAGES = @as(u64, 4294967296);
pub const SECPKG_CRED_ATTR_NAMES = @as(u32, 1);
pub const SECPKG_CRED_ATTR_SSI_PROVIDER = @as(u32, 2);
pub const SECPKG_CRED_ATTR_KDC_PROXY_SETTINGS = @as(u32, 3);
pub const SECPKG_CRED_ATTR_CERT = @as(u32, 4);
pub const SECPKG_CRED_ATTR_PAC_BYPASS = @as(u32, 5);
pub const KDC_PROXY_SETTINGS_V1 = @as(u32, 1);
pub const KDC_PROXY_SETTINGS_FLAGS_FORCEPROXY = @as(u32, 1);
pub const SECPKG_ATTR_PROTO_INFO = @as(u32, 7);
pub const SECPKG_ATTR_USER_FLAGS = @as(u32, 11);
pub const SECPKG_ATTR_USE_VALIDATED = @as(u32, 15);
pub const SECPKG_ATTR_CREDENTIAL_NAME = @as(u32, 16);
pub const SECPKG_ATTR_TARGET = @as(u32, 19);
pub const SECPKG_ATTR_AUTHENTICATION_ID = @as(u32, 20);
pub const SECPKG_ATTR_LOGOFF_TIME = @as(u32, 21);
pub const SECPKG_ATTR_NEGO_KEYS = @as(u32, 22);
pub const SECPKG_ATTR_PROMPTING_NEEDED = @as(u32, 24);
pub const SECPKG_ATTR_NEGO_PKG_INFO = @as(u32, 31);
pub const SECPKG_ATTR_NEGO_STATUS = @as(u32, 32);
pub const SECPKG_ATTR_CONTEXT_DELETED = @as(u32, 33);
pub const SECPKG_ATTR_APPLICATION_PROTOCOL = @as(u32, 35);
pub const SECPKG_ATTR_NEGOTIATED_TLS_EXTENSIONS = @as(u32, 36);
pub const SECPKG_ATTR_IS_LOOPBACK = @as(u32, 37);
pub const SECPKG_ATTR_NEGO_INFO_FLAG_NO_KERBEROS = @as(u32, 1);
pub const SECPKG_ATTR_NEGO_INFO_FLAG_NO_NTLM = @as(u32, 2);
pub const SECPKG_NEGOTIATION_COMPLETE = @as(u32, 0);
pub const SECPKG_NEGOTIATION_OPTIMISTIC = @as(u32, 1);
pub const SECPKG_NEGOTIATION_IN_PROGRESS = @as(u32, 2);
pub const SECPKG_NEGOTIATION_DIRECT = @as(u32, 3);
pub const SECPKG_NEGOTIATION_TRY_MULTICRED = @as(u32, 4);
pub const MAX_PROTOCOL_ID_SIZE = @as(u32, 255);
pub const SECQOP_WRAP_NO_ENCRYPT = @as(u32, 2147483649);
pub const SECQOP_WRAP_OOB_DATA = @as(u32, 1073741824);
pub const SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION = @as(u32, 1);
pub const SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_2 = @as(u32, 2);
pub const SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_3 = @as(u32, 3);
pub const SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_4 = @as(u32, 4);
pub const SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_5 = @as(u32, 5);
pub const SASL_OPTION_SEND_SIZE = @as(u32, 1);
pub const SASL_OPTION_RECV_SIZE = @as(u32, 2);
pub const SASL_OPTION_AUTHZ_STRING = @as(u32, 3);
pub const SASL_OPTION_AUTHZ_PROCESSING = @as(u32, 4);
pub const SEC_WINNT_AUTH_IDENTITY_VERSION_2 = @as(u32, 513);
pub const SEC_WINNT_AUTH_IDENTITY_VERSION = @as(u32, 512);
pub const SEC_WINNT_AUTH_IDENTITY_FLAGS_PROCESS_ENCRYPTED = @as(u32, 16);
pub const SEC_WINNT_AUTH_IDENTITY_FLAGS_SYSTEM_PROTECTED = @as(u32, 32);
pub const SEC_WINNT_AUTH_IDENTITY_FLAGS_USER_PROTECTED = @as(u32, 64);
pub const SEC_WINNT_AUTH_IDENTITY_FLAGS_SYSTEM_ENCRYPTED = @as(u32, 128);
pub const SEC_WINNT_AUTH_IDENTITY_FLAGS_RESERVED = @as(u32, 65536);
pub const SEC_WINNT_AUTH_IDENTITY_FLAGS_NULL_USER = @as(u32, 131072);
pub const SEC_WINNT_AUTH_IDENTITY_FLAGS_NULL_DOMAIN = @as(u32, 262144);
pub const SEC_WINNT_AUTH_IDENTITY_FLAGS_ID_PROVIDER = @as(u32, 524288);
pub const SEC_WINNT_AUTH_IDENTITY_FLAGS_SSPIPFC_USE_MASK = @as(u32, 4278190080);
pub const SEC_WINNT_AUTH_IDENTITY_FLAGS_SSPIPFC_CREDPROV_DO_NOT_SAVE = @as(u32, 2147483648);
pub const SEC_WINNT_AUTH_IDENTITY_FLAGS_SSPIPFC_SAVE_CRED_BY_CALLER = @as(u32, 2147483648);
pub const SEC_WINNT_AUTH_IDENTITY_FLAGS_SSPIPFC_SAVE_CRED_CHECKED = @as(u32, 1073741824);
pub const SEC_WINNT_AUTH_IDENTITY_FLAGS_SSPIPFC_NO_CHECKBOX = @as(u32, 536870912);
pub const SEC_WINNT_AUTH_IDENTITY_FLAGS_SSPIPFC_CREDPROV_DO_NOT_LOAD = @as(u32, 268435456);
pub const SSPIPFC_CREDPROV_DO_NOT_SAVE = @as(u32, 1);
pub const SSPIPFC_SAVE_CRED_BY_CALLER = @as(u32, 1);
pub const SSPIPFC_NO_CHECKBOX = @as(u32, 2);
pub const SSPIPFC_CREDPROV_DO_NOT_LOAD = @as(u32, 4);
pub const SSPIPFC_USE_CREDUIBROKER = @as(u32, 8);
pub const NGC_DATA_FLAG_KERB_CERTIFICATE_LOGON_FLAG_CHECK_DUPLICATES = @as(u32, 1);
pub const NGC_DATA_FLAG_KERB_CERTIFICATE_LOGON_FLAG_USE_CERTIFICATE_INFO = @as(u32, 2);
pub const NGC_DATA_FLAG_IS_SMARTCARD_DATA = @as(u32, 4);
pub const NGC_DATA_FLAG_IS_CLOUD_TRUST_CRED = @as(u32, 8);
pub const SEC_WINNT_AUTH_IDENTITY_ENCRYPT_SAME_LOGON = @as(u32, 1);
pub const SEC_WINNT_AUTH_IDENTITY_ENCRYPT_SAME_PROCESS = @as(u32, 2);
pub const SEC_WINNT_AUTH_IDENTITY_ENCRYPT_FOR_SYSTEM = @as(u32, 4);
pub const SEC_WINNT_AUTH_IDENTITY_MARSHALLED = @as(u32, 4);
pub const SEC_WINNT_AUTH_IDENTITY_ONLY = @as(u32, 8);
pub const SECPKG_OPTIONS_PERMANENT = @as(u32, 1);
pub const LOOKUP_VIEW_LOCAL_INFORMATION = @as(u32, 1);
pub const LOOKUP_TRANSLATE_NAMES = @as(u32, 2048);
pub const SECPKG_ATTR_ISSUER_LIST = @as(u32, 80);
pub const SECPKG_ATTR_REMOTE_CRED = @as(u32, 81);
pub const SECPKG_ATTR_SUPPORTED_ALGS = @as(u32, 86);
pub const SECPKG_ATTR_CIPHER_STRENGTHS = @as(u32, 87);
pub const SECPKG_ATTR_SUPPORTED_PROTOCOLS = @as(u32, 88);
pub const SECPKG_ATTR_MAPPED_CRED_ATTR = @as(u32, 92);
pub const SECPKG_ATTR_REMOTE_CERTIFICATES = @as(u32, 95);
pub const SECPKG_ATTR_CLIENT_CERT_POLICY = @as(u32, 96);
pub const SECPKG_ATTR_CC_POLICY_RESULT = @as(u32, 97);
pub const SECPKG_ATTR_USE_NCRYPT = @as(u32, 98);
pub const SECPKG_ATTR_LOCAL_CERT_INFO = @as(u32, 99);
pub const SECPKG_ATTR_CIPHER_INFO = @as(u32, 100);
pub const SECPKG_ATTR_REMOTE_CERT_CHAIN = @as(u32, 103);
pub const SECPKG_ATTR_UI_INFO = @as(u32, 104);
pub const SECPKG_ATTR_KEYING_MATERIAL = @as(u32, 107);
pub const SECPKG_ATTR_SRTP_PARAMETERS = @as(u32, 108);
pub const SECPKG_ATTR_TOKEN_BINDING = @as(u32, 109);
pub const SECPKG_ATTR_CONNECTION_INFO_EX = @as(u32, 110);
pub const SECPKG_ATTR_KEYING_MATERIAL_TOKEN_BINDING = @as(u32, 111);
pub const SECPKG_ATTR_KEYING_MATERIAL_INPROC = @as(u32, 112);
pub const SECPKG_ATTR_CERT_CHECK_RESULT = @as(u32, 113);
pub const SECPKG_ATTR_CERT_CHECK_RESULT_INPROC = @as(u32, 114);
pub const SECPKG_ATTR_SESSION_TICKET_KEYS = @as(u32, 115);
pub const SESSION_TICKET_INFO_V0 = @as(u32, 0);
pub const SESSION_TICKET_INFO_VERSION = @as(u32, 0);
pub const LSA_MODE_PASSWORD_PROTECTED = @as(i32, 1);
pub const LSA_MODE_INDIVIDUAL_ACCOUNTS = @as(i32, 2);
pub const LSA_MODE_MANDATORY_ACCESS = @as(i32, 4);
pub const LSA_MODE_LOG_FULL = @as(i32, 8);
pub const LSA_MAXIMUM_SID_COUNT = @as(i32, 256);
pub const LSA_MAXIMUM_ENUMERATION_LENGTH = @as(u32, 32000);
pub const LSA_CALL_LICENSE_SERVER = @as(u32, 2147483648);
pub const SE_ADT_OBJECT_ONLY = @as(u32, 1);
pub const SE_MAX_AUDIT_PARAMETERS = @as(u32, 32);
pub const SE_MAX_GENERIC_AUDIT_PARAMETERS = @as(u32, 28);
pub const SE_ADT_PARAMETERS_SELF_RELATIVE = @as(u32, 1);
pub const SE_ADT_PARAMETERS_SEND_TO_LSA = @as(u32, 2);
pub const SE_ADT_PARAMETER_EXTENSIBLE_AUDIT = @as(u32, 4);
pub const SE_ADT_PARAMETER_GENERIC_AUDIT = @as(u32, 8);
pub const SE_ADT_PARAMETER_WRITE_SYNCHRONOUS = @as(u32, 16);
pub const SE_ADT_POLICY_AUDIT_EVENT_TYPE_EX_BEGIN = @as(u32, 100);
pub const POLICY_AUDIT_EVENT_UNCHANGED = @as(i32, 0);
pub const POLICY_AUDIT_EVENT_SUCCESS = @as(i32, 1);
pub const POLICY_AUDIT_EVENT_FAILURE = @as(i32, 2);
pub const POLICY_AUDIT_EVENT_NONE = @as(i32, 4);
pub const POLICY_VIEW_LOCAL_INFORMATION = @as(i32, 1);
pub const POLICY_VIEW_AUDIT_INFORMATION = @as(i32, 2);
pub const POLICY_GET_PRIVATE_INFORMATION = @as(i32, 4);
pub const POLICY_TRUST_ADMIN = @as(i32, 8);
pub const POLICY_CREATE_ACCOUNT = @as(i32, 16);
pub const POLICY_CREATE_SECRET = @as(i32, 32);
pub const POLICY_CREATE_PRIVILEGE = @as(i32, 64);
pub const POLICY_SET_DEFAULT_QUOTA_LIMITS = @as(i32, 128);
pub const POLICY_SET_AUDIT_REQUIREMENTS = @as(i32, 256);
pub const POLICY_AUDIT_LOG_ADMIN = @as(i32, 512);
pub const POLICY_SERVER_ADMIN = @as(i32, 1024);
pub const POLICY_LOOKUP_NAMES = @as(i32, 2048);
pub const POLICY_NOTIFICATION = @as(i32, 4096);
pub const LSA_LOOKUP_ISOLATED_AS_LOCAL = @as(u32, 2147483648);
pub const LSA_LOOKUP_DISALLOW_CONNECTED_ACCOUNT_INTERNET_SID = @as(u32, 2147483648);
pub const LSA_LOOKUP_PREFER_INTERNET_NAMES = @as(u32, 1073741824);
pub const PER_USER_POLICY_UNCHANGED = @as(u32, 0);
pub const PER_USER_AUDIT_SUCCESS_INCLUDE = @as(u32, 1);
pub const PER_USER_AUDIT_SUCCESS_EXCLUDE = @as(u32, 2);
pub const PER_USER_AUDIT_FAILURE_INCLUDE = @as(u32, 4);
pub const PER_USER_AUDIT_FAILURE_EXCLUDE = @as(u32, 8);
pub const PER_USER_AUDIT_NONE = @as(u32, 16);
pub const POLICY_QOS_SCHANNEL_REQUIRED = @as(u32, 1);
pub const POLICY_QOS_OUTBOUND_INTEGRITY = @as(u32, 2);
pub const POLICY_QOS_OUTBOUND_CONFIDENTIALITY = @as(u32, 4);
pub const POLICY_QOS_INBOUND_INTEGRITY = @as(u32, 8);
pub const POLICY_QOS_INBOUND_CONFIDENTIALITY = @as(u32, 16);
pub const POLICY_QOS_ALLOW_LOCAL_ROOT_CERT_STORE = @as(u32, 32);
pub const POLICY_QOS_RAS_SERVER_ALLOWED = @as(u32, 64);
pub const POLICY_QOS_DHCP_SERVER_ALLOWED = @as(u32, 128);
pub const POLICY_KERBEROS_VALIDATE_CLIENT = @as(u32, 128);
pub const ACCOUNT_VIEW = @as(i32, 1);
pub const ACCOUNT_ADJUST_PRIVILEGES = @as(i32, 2);
pub const ACCOUNT_ADJUST_QUOTAS = @as(i32, 4);
pub const ACCOUNT_ADJUST_SYSTEM_ACCESS = @as(i32, 8);
pub const TRUSTED_QUERY_DOMAIN_NAME = @as(i32, 1);
pub const TRUSTED_QUERY_CONTROLLERS = @as(i32, 2);
pub const TRUSTED_SET_CONTROLLERS = @as(i32, 4);
pub const TRUSTED_QUERY_POSIX = @as(i32, 8);
pub const TRUSTED_SET_POSIX = @as(i32, 16);
pub const TRUSTED_SET_AUTH = @as(i32, 32);
pub const TRUSTED_QUERY_AUTH = @as(i32, 64);
pub const TRUST_ATTRIBUTE_TREE_PARENT = @as(u32, 4194304);
pub const TRUST_ATTRIBUTE_TREE_ROOT = @as(u32, 8388608);
pub const TRUST_ATTRIBUTES_VALID = @as(u32, 4278386687);
pub const TRUST_ATTRIBUTE_QUARANTINED_DOMAIN = @as(u32, 4);
pub const TRUST_ATTRIBUTE_TRUST_USES_RC4_ENCRYPTION = @as(u32, 128);
pub const TRUST_ATTRIBUTE_TRUST_USES_AES_KEYS = @as(u32, 256);
pub const TRUST_ATTRIBUTE_CROSS_ORGANIZATION_NO_TGT_DELEGATION = @as(u32, 512);
pub const TRUST_ATTRIBUTE_PIM_TRUST = @as(u32, 1024);
pub const TRUST_ATTRIBUTE_CROSS_ORGANIZATION_ENABLE_TGT_DELEGATION = @as(u32, 2048);
pub const TRUST_ATTRIBUTES_USER = @as(u32, 4278190080);
pub const LSA_FOREST_TRUST_RECORD_TYPE_UNRECOGNIZED = @as(u32, 2147483648);
pub const LSA_FTRECORD_DISABLED_REASONS = @as(i32, 65535);
pub const LSA_TLN_DISABLED_NEW = @as(i32, 1);
pub const LSA_TLN_DISABLED_ADMIN = @as(i32, 2);
pub const LSA_TLN_DISABLED_CONFLICT = @as(i32, 4);
pub const LSA_SID_DISABLED_ADMIN = @as(i32, 1);
pub const LSA_SID_DISABLED_CONFLICT = @as(i32, 2);
pub const LSA_NB_DISABLED_ADMIN = @as(i32, 4);
pub const LSA_NB_DISABLED_CONFLICT = @as(i32, 8);
pub const MAX_RECORDS_IN_FOREST_TRUST_INFO = @as(u32, 4000);
pub const SECRET_SET_VALUE = @as(i32, 1);
pub const SECRET_QUERY_VALUE = @as(i32, 2);
pub const LSA_GLOBAL_SECRET_PREFIX_LENGTH = @as(u32, 2);
pub const LSA_LOCAL_SECRET_PREFIX_LENGTH = @as(u32, 2);
pub const LSA_SECRET_MAXIMUM_COUNT = @as(i32, 4096);
pub const LSA_SECRET_MAXIMUM_LENGTH = @as(i32, 512);
pub const MAXIMUM_CAPES_PER_CAP = @as(u32, 127);
pub const CENTRAL_ACCESS_POLICY_OWNER_RIGHTS_PRESENT_FLAG = @as(u32, 1);
pub const CENTRAL_ACCESS_POLICY_STAGED_OWNER_RIGHTS_PRESENT_FLAG = @as(u32, 256);
pub const CENTRAL_ACCESS_POLICY_STAGED_FLAG = @as(u32, 65536);
pub const LSASETCAPS_RELOAD_FLAG = @as(u32, 1);
pub const LSASETCAPS_VALID_FLAG_MASK = @as(u32, 1);
pub const NEGOTIATE_MAX_PREFIX = @as(u32, 32);
pub const NEGOTIATE_ALLOW_NTLM = @as(u32, 268435456);
pub const NEGOTIATE_NEG_NTLM = @as(u32, 536870912);
pub const MAX_USER_RECORDS = @as(u32, 1000);
pub const Audit_System_SecurityStateChange = Guid.initString("0cce9210-69ae-11d9-bed3-505054503030");
pub const Audit_System_SecuritySubsystemExtension = Guid.initString("0cce9211-69ae-11d9-bed3-505054503030");
pub const Audit_System_Integrity = Guid.initString("0cce9212-69ae-11d9-bed3-505054503030");
pub const Audit_System_IPSecDriverEvents = Guid.initString("0cce9213-69ae-11d9-bed3-505054503030");
pub const Audit_System_Others = Guid.initString("0cce9214-69ae-11d9-bed3-505054503030");
pub const Audit_Logon_Logon = Guid.initString("0cce9215-69ae-11d9-bed3-505054503030");
pub const Audit_Logon_Logoff = Guid.initString("0cce9216-69ae-11d9-bed3-505054503030");
pub const Audit_Logon_AccountLockout = Guid.initString("0cce9217-69ae-11d9-bed3-505054503030");
pub const Audit_Logon_IPSecMainMode = Guid.initString("0cce9218-69ae-11d9-bed3-505054503030");
pub const Audit_Logon_IPSecQuickMode = Guid.initString("0cce9219-69ae-11d9-bed3-505054503030");
pub const Audit_Logon_IPSecUserMode = Guid.initString("0cce921a-69ae-11d9-bed3-505054503030");
pub const Audit_Logon_SpecialLogon = Guid.initString("0cce921b-69ae-11d9-bed3-505054503030");
pub const Audit_Logon_Others = Guid.initString("0cce921c-69ae-11d9-bed3-505054503030");
pub const Audit_ObjectAccess_FileSystem = Guid.initString("0cce921d-69ae-11d9-bed3-505054503030");
pub const Audit_ObjectAccess_Registry = Guid.initString("0cce921e-69ae-11d9-bed3-505054503030");
pub const Audit_ObjectAccess_Kernel = Guid.initString("0cce921f-69ae-11d9-bed3-505054503030");
pub const Audit_ObjectAccess_Sam = Guid.initString("0cce9220-69ae-11d9-bed3-505054503030");
pub const Audit_ObjectAccess_CertificationServices = Guid.initString("0cce9221-69ae-11d9-bed3-505054503030");
pub const Audit_ObjectAccess_ApplicationGenerated = Guid.initString("0cce9222-69ae-11d9-bed3-505054503030");
pub const Audit_ObjectAccess_Handle = Guid.initString("0cce9223-69ae-11d9-bed3-505054503030");
pub const Audit_ObjectAccess_Share = Guid.initString("0cce9224-69ae-11d9-bed3-505054503030");
pub const Audit_ObjectAccess_FirewallPacketDrops = Guid.initString("0cce9225-69ae-11d9-bed3-505054503030");
pub const Audit_ObjectAccess_FirewallConnection = Guid.initString("0cce9226-69ae-11d9-bed3-505054503030");
pub const Audit_ObjectAccess_Other = Guid.initString("0cce9227-69ae-11d9-bed3-505054503030");
pub const Audit_PrivilegeUse_Sensitive = Guid.initString("0cce9228-69ae-11d9-bed3-505054503030");
pub const Audit_PrivilegeUse_NonSensitive = Guid.initString("0cce9229-69ae-11d9-bed3-505054503030");
pub const Audit_PrivilegeUse_Others = Guid.initString("0cce922a-69ae-11d9-bed3-505054503030");
pub const Audit_DetailedTracking_ProcessCreation = Guid.initString("0cce922b-69ae-11d9-bed3-505054503030");
pub const Audit_DetailedTracking_ProcessTermination = Guid.initString("0cce922c-69ae-11d9-bed3-505054503030");
pub const Audit_DetailedTracking_DpapiActivity = Guid.initString("0cce922d-69ae-11d9-bed3-505054503030");
pub const Audit_DetailedTracking_RpcCall = Guid.initString("0cce922e-69ae-11d9-bed3-505054503030");
pub const Audit_PolicyChange_AuditPolicy = Guid.initString("0cce922f-69ae-11d9-bed3-505054503030");
pub const Audit_PolicyChange_AuthenticationPolicy = Guid.initString("0cce9230-69ae-11d9-bed3-505054503030");
pub const Audit_PolicyChange_AuthorizationPolicy = Guid.initString("0cce9231-69ae-11d9-bed3-505054503030");
pub const Audit_PolicyChange_MpsscvRulePolicy = Guid.initString("0cce9232-69ae-11d9-bed3-505054503030");
pub const Audit_PolicyChange_WfpIPSecPolicy = Guid.initString("0cce9233-69ae-11d9-bed3-505054503030");
pub const Audit_PolicyChange_Others = Guid.initString("0cce9234-69ae-11d9-bed3-505054503030");
pub const Audit_AccountManagement_UserAccount = Guid.initString("0cce9235-69ae-11d9-bed3-505054503030");
pub const Audit_AccountManagement_ComputerAccount = Guid.initString("0cce9236-69ae-11d9-bed3-505054503030");
pub const Audit_AccountManagement_SecurityGroup = Guid.initString("0cce9237-69ae-11d9-bed3-505054503030");
pub const Audit_AccountManagement_DistributionGroup = Guid.initString("0cce9238-69ae-11d9-bed3-505054503030");
pub const Audit_AccountManagement_ApplicationGroup = Guid.initString("0cce9239-69ae-11d9-bed3-505054503030");
pub const Audit_AccountManagement_Others = Guid.initString("0cce923a-69ae-11d9-bed3-505054503030");
pub const Audit_DSAccess_DSAccess = Guid.initString("0cce923b-69ae-11d9-bed3-505054503030");
pub const Audit_DsAccess_AdAuditChanges = Guid.initString("0cce923c-69ae-11d9-bed3-505054503030");
pub const Audit_Ds_Replication = Guid.initString("0cce923d-69ae-11d9-bed3-505054503030");
pub const Audit_Ds_DetailedReplication = Guid.initString("0cce923e-69ae-11d9-bed3-505054503030");
pub const Audit_AccountLogon_CredentialValidation = Guid.initString("0cce923f-69ae-11d9-bed3-505054503030");
pub const Audit_AccountLogon_Kerberos = Guid.initString("0cce9240-69ae-11d9-bed3-505054503030");
pub const Audit_AccountLogon_Others = Guid.initString("0cce9241-69ae-11d9-bed3-505054503030");
pub const Audit_AccountLogon_KerbCredentialValidation = Guid.initString("0cce9242-69ae-11d9-bed3-505054503030");
pub const Audit_Logon_NPS = Guid.initString("0cce9243-69ae-11d9-bed3-505054503030");
pub const Audit_ObjectAccess_DetailedFileShare = Guid.initString("0cce9244-69ae-11d9-bed3-505054503030");
pub const Audit_ObjectAccess_RemovableStorage = Guid.initString("0cce9245-69ae-11d9-bed3-505054503030");
pub const Audit_ObjectAccess_CbacStaging = Guid.initString("0cce9246-69ae-11d9-bed3-505054503030");
pub const Audit_Logon_Claims = Guid.initString("0cce9247-69ae-11d9-bed3-505054503030");
pub const Audit_DetailedTracking_PnpActivity = Guid.initString("0cce9248-69ae-11d9-bed3-505054503030");
pub const Audit_Logon_Groups = Guid.initString("0cce9249-69ae-11d9-bed3-505054503030");
pub const Audit_DetailedTracking_TokenRightAdjusted = Guid.initString("0cce924a-69ae-11d9-bed3-505054503030");
pub const Audit_System = Guid.initString("69979848-797a-11d9-bed3-505054503030");
pub const Audit_Logon = Guid.initString("69979849-797a-11d9-bed3-505054503030");
pub const Audit_ObjectAccess = Guid.initString("6997984a-797a-11d9-bed3-505054503030");
pub const Audit_PrivilegeUse = Guid.initString("6997984b-797a-11d9-bed3-505054503030");
pub const Audit_DetailedTracking = Guid.initString("6997984c-797a-11d9-bed3-505054503030");
pub const Audit_PolicyChange = Guid.initString("6997984d-797a-11d9-bed3-505054503030");
pub const Audit_AccountManagement = Guid.initString("6997984e-797a-11d9-bed3-505054503030");
pub const Audit_DirectoryServiceAccess = Guid.initString("6997984f-797a-11d9-bed3-505054503030");
pub const Audit_AccountLogon = Guid.initString("69979850-797a-11d9-bed3-505054503030");
pub const DOMAIN_NO_LM_OWF_CHANGE = @as(i32, 64);
pub const MSV1_0_CHALLENGE_LENGTH = @as(u32, 8);
pub const MSV1_0_USER_SESSION_KEY_LENGTH = @as(u32, 16);
pub const MSV1_0_LANMAN_SESSION_KEY_LENGTH = @as(u32, 8);
pub const MSV1_0_USE_CLIENT_CHALLENGE = @as(u32, 128);
pub const MSV1_0_DISABLE_PERSONAL_FALLBACK = @as(u32, 4096);
pub const MSV1_0_ALLOW_FORCE_GUEST = @as(u32, 8192);
pub const MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED = @as(u32, 16384);
pub const MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY = @as(u32, 32768);
pub const MSV1_0_SUBAUTHENTICATION_DLL_EX = @as(u32, 1048576);
pub const MSV1_0_ALLOW_MSVCHAPV2 = @as(u32, 65536);
pub const MSV1_0_S4U2SELF = @as(u32, 131072);
pub const MSV1_0_CHECK_LOGONHOURS_FOR_S4U = @as(u32, 262144);
pub const MSV1_0_INTERNET_DOMAIN = @as(u32, 524288);
pub const MSV1_0_SUBAUTHENTICATION_DLL = @as(u32, 4278190080);
pub const MSV1_0_SUBAUTHENTICATION_DLL_SHIFT = @as(u32, 24);
pub const MSV1_0_MNS_LOGON = @as(u32, 16777216);
pub const MSV1_0_SUBAUTHENTICATION_DLL_RAS = @as(u32, 2);
pub const MSV1_0_SUBAUTHENTICATION_DLL_IIS = @as(u32, 132);
pub const MSV1_0_S4U_LOGON_FLAG_CHECK_LOGONHOURS = @as(u32, 2);
pub const LOGON_NTLMV2_ENABLED = @as(u32, 256);
pub const LOGON_NT_V2 = @as(u32, 2048);
pub const LOGON_LM_V2 = @as(u32, 4096);
pub const LOGON_NTLM_V2 = @as(u32, 8192);
pub const LOGON_OPTIMIZED = @as(u32, 16384);
pub const LOGON_WINLOGON = @as(u32, 32768);
pub const LOGON_PKINIT = @as(u32, 65536);
pub const LOGON_NO_OPTIMIZED = @as(u32, 131072);
pub const LOGON_NO_ELEVATION = @as(u32, 262144);
pub const LOGON_MANAGED_SERVICE = @as(u32, 524288);
pub const MSV1_0_SUBAUTHENTICATION_FLAGS = @as(u32, 4278190080);
pub const LOGON_GRACE_LOGON = @as(u32, 16777216);
pub const MSV1_0_OWF_PASSWORD_LENGTH = @as(u32, 16);
pub const MSV1_0_SHA_PASSWORD_LENGTH = @as(u32, 20);
pub const MSV1_0_CREDENTIAL_KEY_LENGTH = @as(u32, 20);
pub const MSV1_0_CRED_REMOVED = @as(u32, 4);
pub const MSV1_0_CRED_CREDKEY_PRESENT = @as(u32, 8);
pub const MSV1_0_CRED_SHA_PRESENT = @as(u32, 16);
pub const MSV1_0_CRED_VERSION_V2 = @as(u32, 2);
pub const MSV1_0_CRED_VERSION_V3 = @as(u32, 4);
pub const MSV1_0_CRED_VERSION_IUM = @as(u32, 4294901761);
pub const MSV1_0_CRED_VERSION_REMOTE = @as(u32, 4294901762);
pub const MSV1_0_CRED_VERSION_ARSO = @as(u32, 4294901763);
pub const MSV1_0_CRED_VERSION_RESERVED_1 = @as(u32, 4294967294);
pub const MSV1_0_CRED_VERSION_INVALID = @as(u32, 4294967295);
pub const MSV1_0_NTLM3_RESPONSE_LENGTH = @as(u32, 16);
pub const MSV1_0_NTLM3_OWF_LENGTH = @as(u32, 16);
pub const MSV1_0_MAX_NTLM3_LIFE = @as(u32, 1800);
pub const MSV1_0_MAX_AVL_SIZE = @as(u32, 64000);
pub const MSV1_0_AV_FLAG_FORCE_GUEST = @as(u32, 1);
pub const MSV1_0_AV_FLAG_MIC_HANDSHAKE_MESSAGES = @as(u32, 2);
pub const MSV1_0_AV_FLAG_UNVERIFIED_TARGET = @as(u32, 4);
pub const RTL_ENCRYPT_MEMORY_SIZE = @as(u32, 8);
pub const RTL_ENCRYPT_OPTION_CROSS_PROCESS = @as(u32, 1);
pub const RTL_ENCRYPT_OPTION_SAME_LOGON = @as(u32, 2);
pub const RTL_ENCRYPT_OPTION_FOR_SYSTEM = @as(u32, 4);
pub const KERBEROS_VERSION = @as(u32, 5);
pub const KERBEROS_REVISION = @as(u32, 6);
pub const KERB_ETYPE_AES128_CTS_HMAC_SHA1_96 = @as(u32, 17);
pub const KERB_ETYPE_AES256_CTS_HMAC_SHA1_96 = @as(u32, 18);
pub const KERB_ETYPE_RC4_PLAIN2 = @as(i32, -129);
pub const KERB_ETYPE_RC4_LM = @as(i32, -130);
pub const KERB_ETYPE_RC4_SHA = @as(i32, -131);
pub const KERB_ETYPE_DES_PLAIN = @as(i32, -132);
pub const KERB_ETYPE_RC4_HMAC_OLD = @as(i32, -133);
pub const KERB_ETYPE_RC4_PLAIN_OLD = @as(i32, -134);
pub const KERB_ETYPE_RC4_HMAC_OLD_EXP = @as(i32, -135);
pub const KERB_ETYPE_RC4_PLAIN_OLD_EXP = @as(i32, -136);
pub const KERB_ETYPE_RC4_PLAIN = @as(i32, -140);
pub const KERB_ETYPE_RC4_PLAIN_EXP = @as(i32, -141);
pub const KERB_ETYPE_AES128_CTS_HMAC_SHA1_96_PLAIN = @as(i32, -148);
pub const KERB_ETYPE_AES256_CTS_HMAC_SHA1_96_PLAIN = @as(i32, -149);
pub const KERB_ETYPE_DSA_SHA1_CMS = @as(u32, 9);
pub const KERB_ETYPE_RSA_MD5_CMS = @as(u32, 10);
pub const KERB_ETYPE_RSA_SHA1_CMS = @as(u32, 11);
pub const KERB_ETYPE_RC2_CBC_ENV = @as(u32, 12);
pub const KERB_ETYPE_RSA_ENV = @as(u32, 13);
pub const KERB_ETYPE_RSA_ES_OEAP_ENV = @as(u32, 14);
pub const KERB_ETYPE_DES_EDE3_CBC_ENV = @as(u32, 15);
pub const KERB_ETYPE_DSA_SIGN = @as(u32, 8);
pub const KERB_ETYPE_RSA_PRIV = @as(u32, 9);
pub const KERB_ETYPE_RSA_PUB = @as(u32, 10);
pub const KERB_ETYPE_RSA_PUB_MD5 = @as(u32, 11);
pub const KERB_ETYPE_RSA_PUB_SHA1 = @as(u32, 12);
pub const KERB_ETYPE_PKCS7_PUB = @as(u32, 13);
pub const KERB_ETYPE_DES3_CBC_MD5 = @as(u32, 5);
pub const KERB_ETYPE_DES3_CBC_SHA1 = @as(u32, 7);
pub const KERB_ETYPE_DES3_CBC_SHA1_KD = @as(u32, 16);
pub const KERB_ETYPE_DES_CBC_MD5_NT = @as(u32, 20);
pub const KERB_ETYPE_RC4_HMAC_NT_EXP = @as(u32, 24);
pub const KERB_CHECKSUM_NONE = @as(u32, 0);
pub const KERB_CHECKSUM_CRC32 = @as(u32, 1);
pub const KERB_CHECKSUM_MD4 = @as(u32, 2);
pub const KERB_CHECKSUM_KRB_DES_MAC = @as(u32, 4);
pub const KERB_CHECKSUM_KRB_DES_MAC_K = @as(u32, 5);
pub const KERB_CHECKSUM_MD5 = @as(u32, 7);
pub const KERB_CHECKSUM_MD5_DES = @as(u32, 8);
pub const KERB_CHECKSUM_SHA1_NEW = @as(u32, 14);
pub const KERB_CHECKSUM_HMAC_SHA1_96_AES128 = @as(u32, 15);
pub const KERB_CHECKSUM_HMAC_SHA1_96_AES256 = @as(u32, 16);
pub const KERB_CHECKSUM_LM = @as(i32, -130);
pub const KERB_CHECKSUM_SHA1 = @as(i32, -131);
pub const KERB_CHECKSUM_REAL_CRC32 = @as(i32, -132);
pub const KERB_CHECKSUM_DES_MAC = @as(i32, -133);
pub const KERB_CHECKSUM_DES_MAC_MD5 = @as(i32, -134);
pub const KERB_CHECKSUM_MD25 = @as(i32, -135);
pub const KERB_CHECKSUM_RC4_MD5 = @as(i32, -136);
pub const KERB_CHECKSUM_MD5_HMAC = @as(i32, -137);
pub const KERB_CHECKSUM_HMAC_MD5 = @as(i32, -138);
pub const KERB_CHECKSUM_HMAC_SHA1_96_AES128_Ki = @as(i32, -150);
pub const KERB_CHECKSUM_HMAC_SHA1_96_AES256_Ki = @as(i32, -151);
pub const AUTH_REQ_ALLOW_FORWARDABLE = @as(u32, 1);
pub const AUTH_REQ_ALLOW_PROXIABLE = @as(u32, 2);
pub const AUTH_REQ_ALLOW_POSTDATE = @as(u32, 4);
pub const AUTH_REQ_ALLOW_RENEWABLE = @as(u32, 8);
pub const AUTH_REQ_ALLOW_NOADDRESS = @as(u32, 16);
pub const AUTH_REQ_ALLOW_ENC_TKT_IN_SKEY = @as(u32, 32);
pub const AUTH_REQ_ALLOW_VALIDATE = @as(u32, 64);
pub const AUTH_REQ_VALIDATE_CLIENT = @as(u32, 128);
pub const AUTH_REQ_OK_AS_DELEGATE = @as(u32, 256);
pub const AUTH_REQ_PREAUTH_REQUIRED = @as(u32, 512);
pub const AUTH_REQ_TRANSITIVE_TRUST = @as(u32, 1024);
pub const AUTH_REQ_ALLOW_S4U_DELEGATE = @as(u32, 2048);
pub const KERB_TICKET_FLAGS_name_canonicalize = @as(u32, 65536);
pub const KERB_TICKET_FLAGS_cname_in_pa_data = @as(u32, 262144);
pub const KERB_TICKET_FLAGS_enc_pa_rep = @as(u32, 65536);
pub const KRB_NT_UNKNOWN = @as(u32, 0);
pub const KRB_NT_PRINCIPAL = @as(u32, 1);
pub const KRB_NT_PRINCIPAL_AND_ID = @as(i32, -131);
pub const KRB_NT_SRV_INST = @as(u32, 2);
pub const KRB_NT_SRV_INST_AND_ID = @as(i32, -132);
pub const KRB_NT_SRV_HST = @as(u32, 3);
pub const KRB_NT_SRV_XHST = @as(u32, 4);
pub const KRB_NT_UID = @as(u32, 5);
pub const KRB_NT_ENTERPRISE_PRINCIPAL = @as(u32, 10);
pub const KRB_NT_WELLKNOWN = @as(u32, 11);
pub const KRB_NT_ENT_PRINCIPAL_AND_ID = @as(i32, -130);
pub const KRB_NT_MS_PRINCIPAL = @as(i32, -128);
pub const KRB_NT_MS_PRINCIPAL_AND_ID = @as(i32, -129);
pub const KRB_NT_MS_BRANCH_ID = @as(i32, -133);
pub const KRB_NT_X500_PRINCIPAL = @as(u32, 6);
pub const KERB_WRAP_NO_ENCRYPT = @as(u32, 2147483649);
pub const KERB_CERTIFICATE_LOGON_FLAG_CHECK_DUPLICATES = @as(u32, 1);
pub const KERB_CERTIFICATE_LOGON_FLAG_USE_CERTIFICATE_INFO = @as(u32, 2);
pub const KERB_CERTIFICATE_S4U_LOGON_FLAG_CHECK_DUPLICATES = @as(u32, 1);
pub const KERB_CERTIFICATE_S4U_LOGON_FLAG_CHECK_LOGONHOURS = @as(u32, 2);
pub const KERB_CERTIFICATE_S4U_LOGON_FLAG_FAIL_IF_NT_AUTH_POLICY_REQUIRED = @as(u32, 4);
pub const KERB_CERTIFICATE_S4U_LOGON_FLAG_IDENTIFY = @as(u32, 8);
pub const KERB_LOGON_FLAG_ALLOW_EXPIRED_TICKET = @as(u32, 1);
pub const KERB_LOGON_FLAG_REDIRECTED = @as(u32, 2);
pub const KERB_S4U_LOGON_FLAG_CHECK_LOGONHOURS = @as(u32, 2);
pub const KERB_S4U_LOGON_FLAG_IDENTIFY = @as(u32, 8);
pub const KERB_USE_DEFAULT_TICKET_FLAGS = @as(u32, 0);
pub const KERB_RETRIEVE_TICKET_DEFAULT = @as(u32, 0);
pub const KERB_RETRIEVE_TICKET_DONT_USE_CACHE = @as(u32, 1);
pub const KERB_RETRIEVE_TICKET_USE_CACHE_ONLY = @as(u32, 2);
pub const KERB_RETRIEVE_TICKET_USE_CREDHANDLE = @as(u32, 4);
pub const KERB_RETRIEVE_TICKET_AS_KERB_CRED = @as(u32, 8);
pub const KERB_RETRIEVE_TICKET_WITH_SEC_CRED = @as(u32, 16);
pub const KERB_RETRIEVE_TICKET_CACHE_TICKET = @as(u32, 32);
pub const KERB_RETRIEVE_TICKET_MAX_LIFETIME = @as(u32, 64);
pub const KERB_ETYPE_DEFAULT = @as(u32, 0);
pub const KERB_PURGE_ALL_TICKETS = @as(u32, 1);
pub const KERB_S4U2PROXY_CACHE_ENTRY_INFO_FLAG_NEGATIVE = @as(u32, 1);
pub const KERB_S4U2PROXY_CRED_FLAG_NEGATIVE = @as(u32, 1);
pub const KERB_REFRESH_POLICY_KERBEROS = @as(u32, 1);
pub const KERB_REFRESH_POLICY_KDC = @as(u32, 2);
pub const KERB_CLOUD_KERBEROS_DEBUG_DATA_VERSION = @as(u32, 0);
pub const DS_UNKNOWN_ADDRESS_TYPE = @as(u32, 0);
pub const KERB_SETPASS_USE_LOGONID = @as(u32, 1);
pub const KERB_SETPASS_USE_CREDHANDLE = @as(u32, 2);
pub const KERB_DECRYPT_FLAG_DEFAULT_KEY = @as(u32, 1);
pub const KERB_REFRESH_SCCRED_RELEASE = @as(u32, 0);
pub const KERB_REFRESH_SCCRED_GETTGT = @as(u32, 1);
pub const KERB_TRANSFER_CRED_WITH_TICKETS = @as(u32, 1);
pub const KERB_TRANSFER_CRED_CLEANUP_CREDENTIALS = @as(u32, 2);
pub const KERB_QUERY_DOMAIN_EXTENDED_POLICIES_RESPONSE_FLAG_DAC_DISABLED = @as(u32, 1);
pub const AUDIT_SET_SYSTEM_POLICY = @as(u32, 1);
pub const AUDIT_QUERY_SYSTEM_POLICY = @as(u32, 2);
pub const AUDIT_SET_USER_POLICY = @as(u32, 4);
pub const AUDIT_QUERY_USER_POLICY = @as(u32, 8);
pub const AUDIT_ENUMERATE_USERS = @as(u32, 16);
pub const AUDIT_SET_MISC_POLICY = @as(u32, 32);
pub const AUDIT_QUERY_MISC_POLICY = @as(u32, 64);
pub const SECPKG_CLIENT_PROCESS_TERMINATED = @as(u32, 1);
pub const SECPKG_CLIENT_THREAD_TERMINATED = @as(u32, 2);
pub const SECPKG_CALL_KERNEL_MODE = @as(u32, 1);
pub const SECPKG_CALL_ANSI = @as(u32, 2);
pub const SECPKG_CALL_URGENT = @as(u32, 4);
pub const SECPKG_CALL_RECURSIVE = @as(u32, 8);
pub const SECPKG_CALL_IN_PROC = @as(u32, 16);
pub const SECPKG_CALL_CLEANUP = @as(u32, 32);
pub const SECPKG_CALL_WOWCLIENT = @as(u32, 64);
pub const SECPKG_CALL_THREAD_TERM = @as(u32, 128);
pub const SECPKG_CALL_PROCESS_TERM = @as(u32, 256);
pub const SECPKG_CALL_IS_TCB = @as(u32, 512);
pub const SECPKG_CALL_NETWORK_ONLY = @as(u32, 1024);
pub const SECPKG_CALL_WINLOGON = @as(u32, 2048);
pub const SECPKG_CALL_ASYNC_UPDATE = @as(u32, 4096);
pub const SECPKG_CALL_SYSTEM_PROC = @as(u32, 8192);
pub const SECPKG_CALL_NEGO = @as(u32, 16384);
pub const SECPKG_CALL_NEGO_EXTENDER = @as(u32, 32768);
pub const SECPKG_CALL_BUFFER_MARSHAL = @as(u32, 65536);
pub const SECPKG_CALL_UNLOCK = @as(u32, 131072);
pub const SECPKG_CALL_CLOUDAP_CONNECT = @as(u32, 262144);
pub const SECPKG_CALL_WOWX86 = @as(u32, 64);
pub const SECPKG_CALL_WOWA32 = @as(u32, 262144);
pub const SECPKG_CREDENTIAL_VERSION = @as(u32, 201);
pub const SECPKG_CREDENTIAL_FLAGS_CALLER_HAS_TCB = @as(u32, 1);
pub const SECPKG_CREDENTIAL_FLAGS_CREDMAN_CRED = @as(u32, 2);
pub const SECPKG_SURROGATE_LOGON_VERSION_1 = @as(u32, 1);
pub const SECBUFFER_UNMAPPED = @as(u32, 1073741824);
pub const SECBUFFER_KERNEL_MAP = @as(u32, 536870912);
pub const PRIMARY_CRED_CLEAR_PASSWORD = @as(u32, 1);
pub const PRIMARY_CRED_OWF_PASSWORD = @as(u32, 2);
pub const PRIMARY_CRED_UPDATE = @as(u32, 4);
pub const PRIMARY_CRED_CACHED_LOGON = @as(u32, 8);
pub const PRIMARY_CRED_LOGON_NO_TCB = @as(u32, 16);
pub const PRIMARY_CRED_LOGON_LUA = @as(u32, 32);
pub const PRIMARY_CRED_INTERACTIVE_SMARTCARD_LOGON = @as(u32, 64);
pub const PRIMARY_CRED_REFRESH_NEEDED = @as(u32, 128);
pub const PRIMARY_CRED_INTERNET_USER = @as(u32, 256);
pub const PRIMARY_CRED_AUTH_ID = @as(u32, 512);
pub const PRIMARY_CRED_DO_NOT_SPLIT = @as(u32, 1024);
pub const PRIMARY_CRED_PROTECTED_USER = @as(u32, 2048);
pub const PRIMARY_CRED_EX = @as(u32, 4096);
pub const PRIMARY_CRED_TRANSFER = @as(u32, 8192);
pub const PRIMARY_CRED_RESTRICTED_TS = @as(u32, 16384);
pub const PRIMARY_CRED_PACKED_CREDS = @as(u32, 32768);
pub const PRIMARY_CRED_ENTERPRISE_INTERNET_USER = @as(u32, 65536);
pub const PRIMARY_CRED_ENCRYPTED_CREDGUARD_PASSWORD = @as(u32, 131072);
pub const PRIMARY_CRED_CACHED_INTERACTIVE_LOGON = @as(u32, 262144);
pub const PRIMARY_CRED_INTERACTIVE_NGC_LOGON = @as(u32, 524288);
pub const PRIMARY_CRED_INTERACTIVE_FIDO_LOGON = @as(u32, 1048576);
pub const PRIMARY_CRED_ARSO_LOGON = @as(u32, 2097152);
pub const PRIMARY_CRED_SUPPLEMENTAL = @as(u32, 4194304);
pub const PRIMARY_CRED_LOGON_PACKAGE_SHIFT = @as(u32, 24);
pub const PRIMARY_CRED_PACKAGE_MASK = @as(u32, 4278190080);
pub const SECPKG_PRIMARY_CRED_EX_FLAGS_EX_DELEGATION_TOKEN = @as(u32, 1);
pub const MAX_CRED_SIZE = @as(u32, 1024);
pub const SECPKG_STATE_ENCRYPTION_PERMITTED = @as(u32, 1);
pub const SECPKG_STATE_STRONG_ENCRYPTION_PERMITTED = @as(u32, 2);
pub const SECPKG_STATE_DOMAIN_CONTROLLER = @as(u32, 4);
pub const SECPKG_STATE_WORKSTATION = @as(u32, 8);
pub const SECPKG_STATE_STANDALONE = @as(u32, 16);
pub const SECPKG_STATE_CRED_ISOLATION_ENABLED = @as(u32, 32);
pub const SECPKG_STATE_RESERVED_1 = @as(u32, 2147483648);
pub const SECPKG_MAX_OID_LENGTH = @as(u32, 32);
pub const SECPKG_ATTR_SASL_CONTEXT = @as(u32, 65536);
pub const SECPKG_ATTR_THUNK_ALL = @as(u32, 65536);
pub const UNDERSTANDS_LONG_NAMES = @as(u32, 1);
pub const NO_LONG_NAMES = @as(u32, 2);
pub const SECPKG_CALL_PACKAGE_TRANSFER_CRED_REQUEST_FLAG_OPTIMISTIC_LOGON = @as(u32, 1);
pub const SECPKG_CALL_PACKAGE_TRANSFER_CRED_REQUEST_FLAG_CLEANUP_CREDENTIALS = @as(u32, 2);
pub const SECPKG_CALL_PACKAGE_TRANSFER_CRED_REQUEST_FLAG_TO_SSO_SESSION = @as(u32, 4);
pub const NOTIFIER_FLAG_NEW_THREAD = @as(u32, 1);
pub const NOTIFIER_FLAG_ONE_SHOT = @as(u32, 2);
pub const NOTIFIER_FLAG_SECONDS = @as(u32, 2147483648);
pub const NOTIFIER_TYPE_INTERVAL = @as(u32, 1);
pub const NOTIFIER_TYPE_HANDLE_WAIT = @as(u32, 2);
pub const NOTIFIER_TYPE_STATE_CHANGE = @as(u32, 3);
pub const NOTIFIER_TYPE_NOTIFY_EVENT = @as(u32, 4);
pub const NOTIFIER_TYPE_IMMEDIATE = @as(u32, 16);
pub const NOTIFY_CLASS_PACKAGE_CHANGE = @as(u32, 1);
pub const NOTIFY_CLASS_ROLE_CHANGE = @as(u32, 2);
pub const NOTIFY_CLASS_DOMAIN_CHANGE = @as(u32, 3);
pub const NOTIFY_CLASS_REGISTRY_CHANGE = @as(u32, 4);
pub const LSA_QUERY_CLIENT_PRELOGON_SESSION_ID = @as(u32, 1);
pub const CREDP_FLAGS_IN_PROCESS = @as(u32, 1);
pub const CREDP_FLAGS_USE_MIDL_HEAP = @as(u32, 2);
pub const CREDP_FLAGS_DONT_CACHE_TI = @as(u32, 4);
pub const CREDP_FLAGS_CLEAR_PASSWORD = @as(u32, 8);
pub const CREDP_FLAGS_USER_ENCRYPTED_PASSWORD = @as(u32, 16);
pub const CREDP_FLAGS_TRUSTED_CALLER = @as(u32, 32);
pub const CREDP_FLAGS_VALIDATE_PROXY_TARGET = @as(u32, 64);
pub const CRED_MARSHALED_TI_SIZE_SIZE = @as(u32, 12);
pub const SECPKG_UNICODE_ATTRIBUTE = @as(u32, 2147483648);
pub const SECPKG_ANSI_ATTRIBUTE = @as(u32, 0);
pub const SECPKG_CREDENTIAL_ATTRIBUTE = @as(u32, 0);
pub const SECPKG_INTERFACE_VERSION = @as(u32, 65536);
pub const SECPKG_INTERFACE_VERSION_2 = @as(u32, 131072);
pub const SECPKG_INTERFACE_VERSION_3 = @as(u32, 262144);
pub const SECPKG_INTERFACE_VERSION_4 = @as(u32, 524288);
pub const SECPKG_INTERFACE_VERSION_5 = @as(u32, 1048576);
pub const SECPKG_INTERFACE_VERSION_6 = @as(u32, 2097152);
pub const SECPKG_INTERFACE_VERSION_7 = @as(u32, 4194304);
pub const SECPKG_INTERFACE_VERSION_8 = @as(u32, 8388608);
pub const SECPKG_INTERFACE_VERSION_9 = @as(u32, 16777216);
pub const SECPKG_INTERFACE_VERSION_10 = @as(u32, 33554432);
pub const UNISP_RPC_ID = @as(u32, 14);
pub const RCRED_STATUS_NOCRED = @as(u32, 0);
pub const RCRED_CRED_EXISTS = @as(u32, 1);
pub const RCRED_STATUS_UNKNOWN_ISSUER = @as(u32, 2);
pub const LCRED_STATUS_NOCRED = @as(u32, 0);
pub const LCRED_CRED_EXISTS = @as(u32, 1);
pub const LCRED_STATUS_UNKNOWN_ISSUER = @as(u32, 2);
pub const SECPKGCONTEXT_CONNECTION_INFO_EX_V1 = @as(u32, 1);
pub const SECPKGCONTEXT_CIPHERINFO_V1 = @as(u32, 1);
pub const SSL_SESSION_RECONNECT = @as(u32, 1);
pub const KERN_CONTEXT_CERT_INFO_V1 = @as(u32, 0);
pub const ENABLE_TLS_CLIENT_EARLY_START = @as(u32, 1);
pub const SCH_CRED_V1 = @as(u32, 1);
pub const SCH_CRED_V2 = @as(u32, 2);
pub const SCH_CRED_VERSION = @as(u32, 2);
pub const SCH_CRED_V3 = @as(u32, 3);
pub const SCHANNEL_CRED_VERSION = @as(u32, 4);
pub const SCH_CREDENTIALS_VERSION = @as(u32, 5);
pub const TLS_PARAMS_OPTIONAL = @as(u32, 1);
pub const SCH_CRED_MAX_SUPPORTED_PARAMETERS = @as(u32, 16);
pub const SCH_CRED_MAX_SUPPORTED_ALPN_IDS = @as(u32, 16);
pub const SCH_CRED_MAX_SUPPORTED_CRYPTO_SETTINGS = @as(u32, 16);
pub const SCH_CRED_MAX_SUPPORTED_CHAINING_MODES = @as(u32, 16);
pub const SCH_MAX_EXT_SUBSCRIPTIONS = @as(u32, 2);
pub const SCH_CRED_FORMAT_CERT_CONTEXT = @as(u32, 0);
pub const SCH_CRED_FORMAT_CERT_HASH = @as(u32, 1);
pub const SCH_CRED_FORMAT_CERT_HASH_STORE = @as(u32, 2);
pub const SCH_CRED_MAX_STORE_NAME_SIZE = @as(u32, 128);
pub const SCH_CRED_MAX_SUPPORTED_ALGS = @as(u32, 256);
pub const SCH_CRED_MAX_SUPPORTED_CERTS = @as(u32, 100);
pub const SCH_MACHINE_CERT_HASH = @as(u32, 1);
pub const SCH_CRED_DISABLE_RECONNECTS = @as(u32, 128);
pub const SCH_CRED_RESTRICTED_ROOTS = @as(u32, 8192);
pub const SCH_CRED_REVOCATION_CHECK_CACHE_ONLY = @as(u32, 16384);
pub const SCH_CRED_CACHE_ONLY_URL_RETRIEVAL = @as(u32, 32768);
pub const SCH_CRED_MEMORY_STORE_CERT = @as(u32, 65536);
pub const SCH_CRED_SNI_CREDENTIAL = @as(u32, 524288);
pub const SCH_CRED_SNI_ENABLE_OCSP = @as(u32, 1048576);
pub const SCH_USE_DTLS_ONLY = @as(u32, 16777216);
pub const SCH_ALLOW_NULL_ENCRYPTION = @as(u32, 33554432);
pub const SCH_CRED_DEFERRED_CRED_VALIDATION = @as(u32, 67108864);
pub const SCHANNEL_RENEGOTIATE = @as(u32, 0);
pub const SCHANNEL_SHUTDOWN = @as(u32, 1);
pub const SCHANNEL_ALERT = @as(u32, 2);
pub const SCHANNEL_SESSION = @as(u32, 3);
pub const TLS1_ALERT_CLOSE_NOTIFY = @as(u32, 0);
pub const TLS1_ALERT_UNEXPECTED_MESSAGE = @as(u32, 10);
pub const TLS1_ALERT_BAD_RECORD_MAC = @as(u32, 20);
pub const TLS1_ALERT_DECRYPTION_FAILED = @as(u32, 21);
pub const TLS1_ALERT_RECORD_OVERFLOW = @as(u32, 22);
pub const TLS1_ALERT_DECOMPRESSION_FAIL = @as(u32, 30);
pub const TLS1_ALERT_HANDSHAKE_FAILURE = @as(u32, 40);
pub const TLS1_ALERT_BAD_CERTIFICATE = @as(u32, 42);
pub const TLS1_ALERT_UNSUPPORTED_CERT = @as(u32, 43);
pub const TLS1_ALERT_CERTIFICATE_REVOKED = @as(u32, 44);
pub const TLS1_ALERT_CERTIFICATE_EXPIRED = @as(u32, 45);
pub const TLS1_ALERT_CERTIFICATE_UNKNOWN = @as(u32, 46);
pub const TLS1_ALERT_ILLEGAL_PARAMETER = @as(u32, 47);
pub const TLS1_ALERT_UNKNOWN_CA = @as(u32, 48);
pub const TLS1_ALERT_ACCESS_DENIED = @as(u32, 49);
pub const TLS1_ALERT_DECODE_ERROR = @as(u32, 50);
pub const TLS1_ALERT_DECRYPT_ERROR = @as(u32, 51);
pub const TLS1_ALERT_EXPORT_RESTRICTION = @as(u32, 60);
pub const TLS1_ALERT_PROTOCOL_VERSION = @as(u32, 70);
pub const TLS1_ALERT_INSUFFIENT_SECURITY = @as(u32, 71);
pub const TLS1_ALERT_INTERNAL_ERROR = @as(u32, 80);
pub const TLS1_ALERT_USER_CANCELED = @as(u32, 90);
pub const TLS1_ALERT_NO_RENEGOTIATION = @as(u32, 100);
pub const TLS1_ALERT_UNSUPPORTED_EXT = @as(u32, 110);
pub const TLS1_ALERT_UNKNOWN_PSK_IDENTITY = @as(u32, 115);
pub const TLS1_ALERT_NO_APP_PROTOCOL = @as(u32, 120);
pub const SP_PROT_PCT1_SERVER = @as(u32, 1);
pub const SP_PROT_PCT1_CLIENT = @as(u32, 2);
pub const SP_PROT_SSL2_SERVER = @as(u32, 4);
pub const SP_PROT_SSL2_CLIENT = @as(u32, 8);
pub const SP_PROT_SSL3_SERVER = @as(u32, 16);
pub const SP_PROT_SSL3_CLIENT = @as(u32, 32);
pub const SP_PROT_TLS1_SERVER = @as(u32, 64);
pub const SP_PROT_TLS1_CLIENT = @as(u32, 128);
pub const SP_PROT_UNI_SERVER = @as(u32, 1073741824);
pub const SP_PROT_UNI_CLIENT = @as(u32, 2147483648);
pub const SP_PROT_ALL = @as(u32, 4294967295);
pub const SP_PROT_NONE = @as(u32, 0);
pub const SP_PROT_TLS1_0_SERVER = @as(u32, 64);
pub const SP_PROT_TLS1_0_CLIENT = @as(u32, 128);
pub const SP_PROT_TLS1_1_SERVER = @as(u32, 256);
pub const SP_PROT_TLS1_1_CLIENT = @as(u32, 512);
pub const SP_PROT_TLS1_2_SERVER = @as(u32, 1024);
pub const SP_PROT_TLS1_2_CLIENT = @as(u32, 2048);
pub const SP_PROT_TLS1_3_SERVER = @as(u32, 4096);
pub const SP_PROT_TLS1_3_CLIENT = @as(u32, 8192);
pub const SP_PROT_DTLS_SERVER = @as(u32, 65536);
pub const SP_PROT_DTLS_CLIENT = @as(u32, 131072);
pub const SP_PROT_DTLS1_0_SERVER = @as(u32, 65536);
pub const SP_PROT_DTLS1_0_CLIENT = @as(u32, 131072);
pub const SP_PROT_DTLS1_2_SERVER = @as(u32, 262144);
pub const SP_PROT_DTLS1_2_CLIENT = @as(u32, 524288);
pub const SP_PROT_TLS1_3PLUS_SERVER = @as(u32, 4096);
pub const SP_PROT_TLS1_3PLUS_CLIENT = @as(u32, 8192);
pub const SCHANNEL_SECRET_TYPE_CAPI = @as(u32, 1);
pub const SCHANNEL_SECRET_PRIVKEY = @as(u32, 2);
pub const SCH_CRED_X509_CERTCHAIN = @as(u32, 1);
pub const SCH_CRED_X509_CAPI = @as(u32, 2);
pub const SCH_CRED_CERT_CONTEXT = @as(u32, 3);
pub const SL_SYSTEM_STATE_REBOOT_POLICY_FOUND = @as(u32, 1);
pub const SL_SYSTEM_STATE_TAMPERED = @as(u32, 2);
pub const SL_REARM_REBOOT_REQUIRED = @as(u32, 1);
pub const SPP_MIGRATION_GATHER_MIGRATABLE_APPS = @as(u32, 1);
pub const SPP_MIGRATION_GATHER_ACTIVATED_WINDOWS_STATE = @as(u32, 2);
pub const SPP_MIGRATION_GATHER_ALL = @as(u32, 4294967295);
pub const USER_ACCOUNT_DISABLED = @as(u32, 1);
pub const USER_HOME_DIRECTORY_REQUIRED = @as(u32, 2);
pub const USER_PASSWORD_NOT_REQUIRED = @as(u32, 4);
pub const USER_TEMP_DUPLICATE_ACCOUNT = @as(u32, 8);
pub const USER_NORMAL_ACCOUNT = @as(u32, 16);
pub const USER_MNS_LOGON_ACCOUNT = @as(u32, 32);
pub const USER_INTERDOMAIN_TRUST_ACCOUNT = @as(u32, 64);
pub const USER_WORKSTATION_TRUST_ACCOUNT = @as(u32, 128);
pub const USER_SERVER_TRUST_ACCOUNT = @as(u32, 256);
pub const USER_DONT_EXPIRE_PASSWORD = @as(u32, 512);
pub const USER_ACCOUNT_AUTO_LOCKED = @as(u32, 1024);
pub const USER_ENCRYPTED_TEXT_PASSWORD_ALLOWED = @as(u32, 2048);
pub const USER_SMARTCARD_REQUIRED = @as(u32, 4096);
pub const USER_TRUSTED_FOR_DELEGATION = @as(u32, 8192);
pub const USER_NOT_DELEGATED = @as(u32, 16384);
pub const USER_USE_DES_KEY_ONLY = @as(u32, 32768);
pub const USER_DONT_REQUIRE_PREAUTH = @as(u32, 65536);
pub const USER_PASSWORD_EXPIRED = @as(u32, 131072);
pub const USER_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION = @as(u32, 262144);
pub const USER_NO_AUTH_DATA_REQUIRED = @as(u32, 524288);
pub const USER_PARTIAL_SECRETS_ACCOUNT = @as(u32, 1048576);
pub const USER_USE_AES_KEYS = @as(u32, 2097152);
pub const SAM_DAYS_PER_WEEK = @as(u32, 7);
pub const USER_ALL_PARAMETERS = @as(u32, 2097152);
pub const CLEAR_BLOCK_LENGTH = @as(u32, 8);
pub const CYPHER_BLOCK_LENGTH = @as(u32, 8);
pub const MSV1_0_VALIDATION_LOGOFF_TIME = @as(u32, 1);
pub const MSV1_0_VALIDATION_KICKOFF_TIME = @as(u32, 2);
pub const MSV1_0_VALIDATION_LOGON_SERVER = @as(u32, 4);
pub const MSV1_0_VALIDATION_LOGON_DOMAIN = @as(u32, 8);
pub const MSV1_0_VALIDATION_SESSION_KEY = @as(u32, 16);
pub const MSV1_0_VALIDATION_USER_FLAGS = @as(u32, 32);
pub const MSV1_0_VALIDATION_USER_ID = @as(u32, 64);
pub const MSV1_0_SUBAUTH_ACCOUNT_DISABLED = @as(u32, 1);
pub const MSV1_0_SUBAUTH_PASSWORD = @as(u32, 2);
pub const MSV1_0_SUBAUTH_WORKSTATIONS = @as(u32, 4);
pub const MSV1_0_SUBAUTH_LOGON_HOURS = @as(u32, 8);
pub const MSV1_0_SUBAUTH_ACCOUNT_EXPIRY = @as(u32, 16);
pub const MSV1_0_SUBAUTH_PASSWORD_EXPIRY = @as(u32, 32);
pub const MSV1_0_SUBAUTH_ACCOUNT_TYPE = @as(u32, 64);
pub const MSV1_0_SUBAUTH_LOCKOUT = @as(u32, 128);
pub const SL_MDOLLAR_ZONE = @as(u32, 40960);
pub const SL_SERVER_ZONE = @as(u32, 45056);
pub const SL_MSCH_ZONE = @as(u32, 49152);
pub const SL_INTERNAL_ZONE = @as(u32, 57344);
pub const SL_CLIENTAPI_ZONE = @as(u32, 61440);
pub const FACILITY_SL_ITF = @as(u32, 4);
pub const _FACILITY_WINDOWS_STORE = @as(u32, 63);
pub const SL_E_SRV_INVALID_PUBLISH_LICENSE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073434623));
pub const SL_E_SRV_INVALID_PRODUCT_KEY_LICENSE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073434622));
pub const SL_E_SRV_INVALID_RIGHTS_ACCOUNT_LICENSE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073434621));
pub const SL_E_SRV_INVALID_LICENSE_STRUCTURE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073434620));
pub const SL_E_SRV_AUTHORIZATION_FAILED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073434619));
pub const SL_E_SRV_INVALID_BINDING = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073434618));
pub const SL_E_SRV_SERVER_PONG = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073434617));
pub const SL_E_SRV_INVALID_PAYLOAD = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073434616));
pub const SL_E_SRV_INVALID_SECURITY_PROCESSOR_LICENSE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073434615));
pub const SL_E_SRV_BUSINESS_TOKEN_ENTRY_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073434608));
pub const SL_E_SRV_CLIENT_CLOCK_OUT_OF_SYNC = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073434607));
pub const SL_E_SRV_GENERAL_ERROR = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073434368));
pub const SL_E_CHPA_PRODUCT_KEY_OUT_OF_RANGE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430527));
pub const SL_E_CHPA_INVALID_BINDING = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430526));
pub const SL_E_CHPA_PRODUCT_KEY_BLOCKED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430525));
pub const SL_E_CHPA_INVALID_PRODUCT_KEY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430524));
pub const SL_E_CHPA_BINDING_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430523));
pub const SL_E_CHPA_BINDING_MAPPING_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430522));
pub const SL_E_CHPA_UNSUPPORTED_PRODUCT_KEY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430521));
pub const SL_E_CHPA_MAXIMUM_UNLOCK_EXCEEDED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430520));
pub const SL_E_CHPA_ACTCONFIG_ID_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430519));
pub const SL_E_CHPA_INVALID_PRODUCT_DATA_ID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430518));
pub const SL_E_CHPA_INVALID_PRODUCT_DATA = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430517));
pub const SL_E_CHPA_SYSTEM_ERROR = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430516));
pub const SL_E_CHPA_INVALID_ACTCONFIG_ID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430515));
pub const SL_E_CHPA_INVALID_PRODUCT_KEY_LENGTH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430514));
pub const SL_E_CHPA_INVALID_PRODUCT_KEY_FORMAT = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430513));
pub const SL_E_CHPA_INVALID_PRODUCT_KEY_CHAR = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430512));
pub const SL_E_CHPA_INVALID_BINDING_URI = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430511));
pub const SL_E_CHPA_NETWORK_ERROR = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430510));
pub const SL_E_CHPA_DATABASE_ERROR = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430509));
pub const SL_E_CHPA_INVALID_ARGUMENT = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430508));
pub const SL_E_CHPA_DMAK_LIMIT_EXCEEDED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430496));
pub const SL_E_CHPA_DMAK_EXTENSION_LIMIT_EXCEEDED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430495));
pub const SL_E_CHPA_REISSUANCE_LIMIT_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430494));
pub const SL_E_CHPA_OVERRIDE_REQUEST_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430493));
pub const SL_E_CHPA_OEM_SLP_COA0 = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430506));
pub const SL_E_CHPA_PRODUCT_KEY_BLOCKED_IPLOCATION = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430505));
pub const SL_E_CHPA_RESPONSE_NOT_AVAILABLE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430507));
pub const SL_E_CHPA_GENERAL_ERROR = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430448));
pub const SL_E_CHPA_TIMEBASED_ACTIVATION_BEFORE_START_DATE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430480));
pub const SL_E_CHPA_TIMEBASED_ACTIVATION_AFTER_END_DATE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430479));
pub const SL_E_CHPA_TIMEBASED_ACTIVATION_NOT_AVAILABLE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430478));
pub const SL_E_CHPA_TIMEBASED_PRODUCT_KEY_NOT_CONFIGURED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430477));
pub const SL_E_CHPA_NO_RULES_TO_ACTIVATE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430449));
pub const SL_E_CHPA_DIGITALMARKER_INVALID_BINDING = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430447));
pub const SL_E_CHPA_DIGITALMARKER_BINDING_NOT_CONFIGURED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430446));
pub const SL_E_CHPA_DYNAMICALLY_BLOCKED_PRODUCT_KEY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073430432));
pub const SL_E_CHPA_MSCH_RESPONSE_NOT_AVAILABLE_VGA = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429505));
pub const SL_E_CHPA_BUSINESS_RULE_INPUT_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073428736));
pub const SL_E_CHPA_NULL_VALUE_FOR_PROPERTY_NAME_OR_ID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073428656));
pub const SL_E_CHPA_UNKNOWN_PROPERTY_NAME = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073428655));
pub const SL_E_CHPA_UNKNOWN_PROPERTY_ID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073428654));
pub const SL_E_CHPA_FAILED_TO_UPDATE_PRODUCTKEY_BINDING = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073428651));
pub const SL_E_CHPA_FAILED_TO_INSERT_PRODUCTKEY_BINDING = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073428650));
pub const SL_E_CHPA_FAILED_TO_DELETE_PRODUCTKEY_BINDING = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073428649));
pub const SL_E_CHPA_FAILED_TO_PROCESS_PRODUCT_KEY_BINDINGS_XML = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073428648));
pub const SL_E_CHPA_FAILED_TO_INSERT_PRODUCT_KEY_PROPERTY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073428646));
pub const SL_E_CHPA_FAILED_TO_UPDATE_PRODUCT_KEY_PROPERTY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073428645));
pub const SL_E_CHPA_FAILED_TO_DELETE_PRODUCT_KEY_PROPERTY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073428644));
pub const SL_E_CHPA_UNKNOWN_PRODUCT_KEY_TYPE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073428636));
pub const SL_E_CHPA_PRODUCT_KEY_BEING_USED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073428624));
pub const SL_E_CHPA_FAILED_TO_INSERT_PRODUCT_KEY_RECORD = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073428608));
pub const SL_E_CHPA_FAILED_TO_UPDATE_PRODUCT_KEY_RECORD = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073428607));
pub const SL_E_INVALID_LICENSE_STATE_BREACH_GRACE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429871));
pub const SL_E_INVALID_LICENSE_STATE_BREACH_GRACE_EXPIRED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429870));
pub const SL_E_INVALID_TEMPLATE_ID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429770));
pub const SL_E_INVALID_XML_BLOB = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429766));
pub const SL_E_VALIDATION_BLOB_PARAM_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429721));
pub const SL_E_INVALID_CLIENT_TOKEN = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429720));
pub const SL_E_INVALID_OFFLINE_BLOB = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429719));
pub const SL_E_OFFLINE_VALIDATION_BLOB_PARAM_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429718));
pub const SL_E_INVALID_OSVERSION_TEMPLATEID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429717));
pub const SL_E_OFFLINE_GENUINE_BLOB_REVOKED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429716));
pub const SL_E_OFFLINE_GENUINE_BLOB_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429715));
pub const SL_E_INVALID_OS_FOR_PRODUCT_KEY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429503));
pub const SL_E_INVALID_FILE_HASH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429343));
pub const SL_E_VALIDATION_BLOCKED_PRODUCT_KEY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429342));
pub const SL_E_MISMATCHED_KEY_TYPES = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429340));
pub const SL_E_VALIDATION_INVALID_PRODUCT_KEY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429339));
pub const SL_E_INVALID_OEM_OR_VOLUME_BINDING_DATA = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429337));
pub const SL_E_INVALID_LICENSE_STATE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429336));
pub const SL_E_IP_LOCATION_FALIED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429335));
pub const SL_E_SOFTMOD_EXPLOIT_DETECTED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429333));
pub const SL_E_INVALID_TOKEN_DATA = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429332));
pub const SL_E_HEALTH_CHECK_FAILED_NEUTRAL_FILES = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429331));
pub const SL_E_HEALTH_CHECK_FAILED_MUI_FILES = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429330));
pub const SL_E_INVALID_AD_DATA = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429329));
pub const SL_E_INVALID_RSDP_COUNT = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429328));
pub const SL_E_ENGINE_DETECTED_EXPLOIT = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429327));
pub const SL_E_NON_GENUINE_STATUS_LAST = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073428992));
pub const SL_E_NOTIFICATION_BREACH_DETECTED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429199));
pub const SL_E_NOTIFICATION_GRACE_EXPIRED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429198));
pub const SL_E_NOTIFICATION_OTHER_REASONS = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073429197));
pub const SL_E_INVALID_CONTEXT = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422335));
pub const SL_E_TOKEN_STORE_INVALID_STATE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422334));
pub const SL_E_EVALUATION_FAILED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422333));
pub const SL_E_NOT_EVALUATED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422332));
pub const SL_E_NOT_ACTIVATED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422331));
pub const SL_E_INVALID_GUID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422330));
pub const SL_E_TOKSTO_TOKEN_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422329));
pub const SL_E_TOKSTO_NO_PROPERTIES = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422328));
pub const SL_E_TOKSTO_NOT_INITIALIZED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422327));
pub const SL_E_TOKSTO_ALREADY_INITIALIZED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422326));
pub const SL_E_TOKSTO_NO_ID_SET = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422325));
pub const SL_E_TOKSTO_CANT_CREATE_FILE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422324));
pub const SL_E_TOKSTO_CANT_WRITE_TO_FILE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422323));
pub const SL_E_TOKSTO_CANT_READ_FILE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422322));
pub const SL_E_TOKSTO_CANT_PARSE_PROPERTIES = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422321));
pub const SL_E_TOKSTO_PROPERTY_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422320));
pub const SL_E_TOKSTO_INVALID_FILE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422319));
pub const SL_E_TOKSTO_CANT_CREATE_MUTEX = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422318));
pub const SL_E_TOKSTO_CANT_ACQUIRE_MUTEX = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422317));
pub const SL_E_TOKSTO_NO_TOKEN_DATA = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422316));
pub const SL_E_EUL_CONSUMPTION_FAILED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422315));
pub const SL_E_PKEY_INVALID_CONFIG = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422314));
pub const SL_E_PKEY_INVALID_UNIQUEID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422313));
pub const SL_E_PKEY_INVALID_ALGORITHM = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422312));
pub const SL_E_PKEY_INTERNAL_ERROR = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422311));
pub const SL_E_LICENSE_INVALID_ADDON_INFO = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422310));
pub const SL_E_HWID_ERROR = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422309));
pub const SL_E_PKEY_INVALID_KEYCHANGE1 = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422308));
pub const SL_E_PKEY_INVALID_KEYCHANGE2 = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422307));
pub const SL_E_PKEY_INVALID_KEYCHANGE3 = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422306));
pub const SL_E_POLICY_OTHERINFO_MISMATCH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422304));
pub const SL_E_PRODUCT_UNIQUENESS_GROUP_ID_INVALID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422303));
pub const SL_E_SECURE_STORE_ID_MISMATCH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422302));
pub const SL_E_INVALID_RULESET_RULE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422301));
pub const SL_E_INVALID_CONTEXT_DATA = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422300));
pub const SL_E_INVALID_HASH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422299));
pub const SL_E_INVALID_USE_OF_ADD_ON_PKEY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2147164122));
pub const SL_E_WINDOWS_VERSION_MISMATCH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422297));
pub const SL_E_ACTIVATION_IN_PROGRESS = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422296));
pub const SL_E_STORE_UPGRADE_TOKEN_REQUIRED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422295));
pub const SL_E_STORE_UPGRADE_TOKEN_WRONG_EDITION = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422294));
pub const SL_E_STORE_UPGRADE_TOKEN_WRONG_PID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422293));
pub const SL_E_STORE_UPGRADE_TOKEN_NOT_PRS_SIGNED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422292));
pub const SL_E_STORE_UPGRADE_TOKEN_WRONG_VERSION = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422291));
pub const SL_E_STORE_UPGRADE_TOKEN_NOT_AUTHORIZED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073422290));
pub const SL_E_SFS_INVALID_FS_VERSION = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2147163903));
pub const SL_E_SFS_INVALID_FD_TABLE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2147163902));
pub const SL_E_SFS_INVALID_SYNC = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2147163901));
pub const SL_E_SFS_BAD_TOKEN_NAME = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2147163900));
pub const SL_E_SFS_BAD_TOKEN_EXT = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2147163899));
pub const SL_E_SFS_DUPLICATE_TOKEN_NAME = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2147163898));
pub const SL_E_SFS_TOKEN_SIZE_MISMATCH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2147163897));
pub const SL_E_SFS_INVALID_TOKEN_DATA_HASH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2147163896));
pub const SL_E_SFS_FILE_READ_ERROR = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2147163895));
pub const SL_E_SFS_FILE_WRITE_ERROR = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2147163894));
pub const SL_E_SFS_INVALID_FILE_POSITION = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2147163893));
pub const SL_E_SFS_NO_ACTIVE_TRANSACTION = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2147163892));
pub const SL_E_SFS_INVALID_FS_HEADER = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2147163891));
pub const SL_E_SFS_INVALID_TOKEN_DESCRIPTOR = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2147163890));
pub const SL_E_INTERNAL_ERROR = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418239));
pub const SL_E_RIGHT_NOT_CONSUMED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418238));
pub const SL_E_USE_LICENSE_NOT_INSTALLED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418237));
pub const SL_E_MISMATCHED_PKEY_RANGE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418236));
pub const SL_E_MISMATCHED_PID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418235));
pub const SL_E_EXTERNAL_SIGNATURE_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418234));
pub const SL_E_RAC_NOT_AVAILABLE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418233));
pub const SL_E_SPC_NOT_AVAILABLE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418232));
pub const SL_E_GRACE_TIME_EXPIRED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418231));
pub const SL_E_MISMATCHED_APPID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418230));
pub const SL_E_NO_PID_CONFIG_DATA = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418229));
pub const SL_I_OOB_GRACE_PERIOD = @import("../../zig.zig").typedConst(HRESULT, @as(i32, 1074065420));
pub const SL_I_OOT_GRACE_PERIOD = @import("../../zig.zig").typedConst(HRESULT, @as(i32, 1074065421));
pub const SL_E_MISMATCHED_SECURITY_PROCESSOR = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418226));
pub const SL_E_OUT_OF_TOLERANCE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418225));
pub const SL_E_INVALID_PKEY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418224));
pub const SL_E_LICENSE_FILE_NOT_INSTALLED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418223));
pub const SL_E_VALUE_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418222));
pub const SL_E_RIGHT_NOT_GRANTED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418221));
pub const SL_E_PKEY_NOT_INSTALLED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418220));
pub const SL_E_PRODUCT_SKU_NOT_INSTALLED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418219));
pub const SL_E_NOT_SUPPORTED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418218));
pub const SL_E_PUBLISHING_LICENSE_NOT_INSTALLED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418217));
pub const SL_E_LICENSE_SERVER_URL_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418216));
pub const SL_E_INVALID_EVENT_ID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418215));
pub const SL_E_EVENT_NOT_REGISTERED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418214));
pub const SL_E_EVENT_ALREADY_REGISTERED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418213));
pub const SL_E_DECRYPTION_LICENSES_NOT_AVAILABLE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418212));
pub const SL_E_LICENSE_SIGNATURE_VERIFICATION_FAILED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418211));
pub const SL_E_DATATYPE_MISMATCHED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418210));
pub const SL_E_INVALID_LICENSE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418209));
pub const SL_E_INVALID_PACKAGE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418208));
pub const SL_E_VALIDITY_TIME_EXPIRED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418207));
pub const SL_E_LICENSE_AUTHORIZATION_FAILED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418206));
pub const SL_E_LICENSE_DECRYPTION_FAILED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418205));
pub const SL_E_WINDOWS_INVALID_LICENSE_STATE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418204));
pub const SL_E_LUA_ACCESSDENIED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418203));
pub const SL_E_PROXY_KEY_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418202));
pub const SL_E_TAMPER_DETECTED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418201));
pub const SL_E_POLICY_CACHE_INVALID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418200));
pub const SL_E_INVALID_RUNNING_MODE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418199));
pub const SL_E_SLP_NOT_SIGNED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418198));
pub const SL_E_CIDIID_INVALID_DATA = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418196));
pub const SL_E_CIDIID_INVALID_VERSION = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418195));
pub const SL_E_CIDIID_VERSION_NOT_SUPPORTED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418194));
pub const SL_E_CIDIID_INVALID_DATA_LENGTH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418193));
pub const SL_E_CIDIID_NOT_DEPOSITED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418192));
pub const SL_E_CIDIID_MISMATCHED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418191));
pub const SL_E_INVALID_BINDING_BLOB = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418190));
pub const SL_E_PRODUCT_KEY_INSTALLATION_NOT_ALLOWED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418189));
pub const SL_E_EUL_NOT_AVAILABLE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418188));
pub const SL_E_VL_NOT_WINDOWS_SLP = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418187));
pub const SL_E_VL_NOT_ENOUGH_COUNT = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418184));
pub const SL_E_VL_BINDING_SERVICE_NOT_ENABLED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418183));
pub const SL_E_VL_INFO_PRODUCT_USER_RIGHT = @import("../../zig.zig").typedConst(HRESULT, @as(i32, 1074065472));
pub const SL_E_VL_KEY_MANAGEMENT_SERVICE_NOT_ACTIVATED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418175));
pub const SL_E_VL_KEY_MANAGEMENT_SERVICE_ID_MISMATCH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418174));
pub const SL_E_PROXY_POLICY_NOT_UPDATED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418169));
pub const SL_E_CIDIID_INVALID_CHECK_DIGITS = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418163));
pub const SL_E_LICENSE_MANAGEMENT_DATA_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418161));
pub const SL_E_INVALID_PRODUCT_KEY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418160));
pub const SL_E_BLOCKED_PRODUCT_KEY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418159));
pub const SL_E_DUPLICATE_POLICY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418158));
pub const SL_E_MISSING_OVERRIDE_ONLY_ATTRIBUTE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418157));
pub const SL_E_LICENSE_MANAGEMENT_DATA_DUPLICATED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418156));
pub const SL_E_BASE_SKU_NOT_AVAILABLE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418155));
pub const SL_E_VL_MACHINE_NOT_BOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418154));
pub const SL_E_SLP_MISSING_ACPI_SLIC = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418153));
pub const SL_E_SLP_MISSING_SLP_MARKER = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418152));
pub const SL_E_SLP_BAD_FORMAT = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418151));
pub const SL_E_INVALID_PACKAGE_VERSION = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418144));
pub const SL_E_PKEY_INVALID_UPGRADE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418143));
pub const SL_E_ISSUANCE_LICENSE_NOT_INSTALLED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418142));
pub const SL_E_SLP_OEM_CERT_MISSING = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418141));
pub const SL_E_NONGENUINE_GRACE_TIME_EXPIRED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418140));
pub const SL_I_NONGENUINE_GRACE_PERIOD = @import("../../zig.zig").typedConst(HRESULT, @as(i32, 1074065509));
pub const SL_E_DEPENDENT_PROPERTY_NOT_SET = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418138));
pub const SL_E_NONGENUINE_GRACE_TIME_EXPIRED_2 = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418137));
pub const SL_I_NONGENUINE_GRACE_PERIOD_2 = @import("../../zig.zig").typedConst(HRESULT, @as(i32, 1074065512));
pub const SL_E_MISMATCHED_PRODUCT_SKU = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418135));
pub const SL_E_OPERATION_NOT_ALLOWED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418134));
pub const SL_E_VL_KEY_MANAGEMENT_SERVICE_VM_NOT_SUPPORTED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418133));
pub const SL_E_VL_INVALID_TIMESTAMP = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418132));
pub const SL_E_PLUGIN_INVALID_MANIFEST = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418127));
pub const SL_E_APPLICATION_POLICIES_MISSING = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418126));
pub const SL_E_APPLICATION_POLICIES_NOT_LOADED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418125));
pub const SL_E_VL_BINDING_SERVICE_UNAVAILABLE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418124));
pub const SL_E_SERVICE_STOPPING = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418123));
pub const SL_E_PLUGIN_NOT_REGISTERED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418122));
pub const SL_E_AUTHN_WRONG_VERSION = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418121));
pub const SL_E_AUTHN_MISMATCHED_KEY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418120));
pub const SL_E_AUTHN_CHALLENGE_NOT_SET = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418119));
pub const SL_E_AUTHN_CANT_VERIFY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418118));
pub const SL_E_SERVICE_RUNNING = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418117));
pub const SL_E_SLP_INVALID_MARKER_VERSION = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418116));
pub const SL_E_INVALID_PRODUCT_KEY_TYPE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418115));
pub const SL_E_CIDIID_MISMATCHED_PKEY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418114));
pub const SL_E_CIDIID_NOT_BOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418113));
pub const SL_E_LICENSE_NOT_BOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418112));
pub const SL_E_VL_AD_AO_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418111));
pub const SL_E_VL_AD_AO_NAME_TOO_LONG = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418110));
pub const SL_E_VL_AD_SCHEMA_VERSION_NOT_SUPPORTED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073418109));
pub const SL_E_NOT_GENUINE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417728));
pub const SL_E_EDITION_MISMATCHED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417712));
pub const SL_E_HWID_CHANGED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417711));
pub const SL_E_OEM_KEY_EDITION_MISMATCH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417710));
pub const SL_E_NO_PRODUCT_KEY_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417709));
pub const SL_E_DOWNLEVEL_SETUP_KEY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417708));
pub const SL_E_BIOS_KEY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417707));
pub const SL_E_TKA_CHALLENGE_EXPIRED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417471));
pub const SL_E_TKA_SILENT_ACTIVATION_FAILURE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417470));
pub const SL_E_TKA_INVALID_CERT_CHAIN = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417469));
pub const SL_E_TKA_GRANT_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417468));
pub const SL_E_TKA_CERT_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417467));
pub const SL_E_TKA_INVALID_SKU_ID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417466));
pub const SL_E_TKA_INVALID_BLOB = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417465));
pub const SL_E_TKA_TAMPERED_CERT_CHAIN = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417464));
pub const SL_E_TKA_CHALLENGE_MISMATCH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417463));
pub const SL_E_TKA_INVALID_CERTIFICATE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417462));
pub const SL_E_TKA_INVALID_SMARTCARD = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417461));
pub const SL_E_TKA_FAILED_GRANT_PARSING = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417460));
pub const SL_E_TKA_INVALID_THUMBPRINT = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417459));
pub const SL_E_TKA_THUMBPRINT_CERT_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417458));
pub const SL_E_TKA_CRITERIA_MISMATCH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417457));
pub const SL_E_TKA_TPID_MISMATCH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417456));
pub const SL_E_TKA_SOFT_CERT_DISALLOWED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417455));
pub const SL_E_TKA_SOFT_CERT_INVALID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417454));
pub const SL_E_TKA_CERT_CNG_NOT_AVAILABLE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073417453));
pub const SL_I_STORE_BASED_ACTIVATION = @import("../../zig.zig").typedConst(HRESULT, @as(i32, 1074066433));
pub const E_RM_UNKNOWN_ERROR = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073415165));
pub const SL_I_TIMEBASED_VALIDITY_PERIOD = @import("../../zig.zig").typedConst(HRESULT, @as(i32, 1074068484));
pub const SL_I_PERPETUAL_OOB_GRACE_PERIOD = @import("../../zig.zig").typedConst(HRESULT, @as(i32, 1074068485));
pub const SL_I_TIMEBASED_EXTENDED_GRACE_PERIOD = @import("../../zig.zig").typedConst(HRESULT, @as(i32, 1074068486));
pub const SL_E_VALIDITY_PERIOD_EXPIRED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073415161));
pub const SL_E_IA_THROTTLE_LIMIT_EXCEEDED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073414912));
pub const SL_E_IA_INVALID_VIRTUALIZATION_PLATFORM = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073414911));
pub const SL_E_IA_PARENT_PARTITION_NOT_ACTIVATED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073414910));
pub const SL_E_IA_ID_MISMATCH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073414909));
pub const SL_E_IA_MACHINE_NOT_BOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073414908));
pub const SL_E_TAMPER_RECOVERY_REQUIRES_ACTIVATION = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073414656));
pub const SL_REMAPPING_SP_PUB_GENERAL_NOT_INITIALIZED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073426175));
pub const SL_REMAPPING_SP_STATUS_SYSTEM_TIME_SKEWED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2147167998));
pub const SL_REMAPPING_SP_STATUS_GENERIC_FAILURE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073426173));
pub const SL_REMAPPING_SP_STATUS_INVALIDARG = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073426172));
pub const SL_REMAPPING_SP_STATUS_ALREADY_EXISTS = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073426171));
pub const SL_REMAPPING_SP_STATUS_INSUFFICIENT_BUFFER = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073426169));
pub const SL_REMAPPING_SP_STATUS_INVALIDDATA = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073426168));
pub const SL_REMAPPING_SP_STATUS_INVALID_SPAPI_CALL = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073426167));
pub const SL_REMAPPING_SP_STATUS_INVALID_SPAPI_VERSION = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073426166));
pub const SL_REMAPPING_SP_STATUS_DEBUGGER_DETECTED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2147167989));
pub const SL_REMAPPING_SP_STATUS_NO_MORE_DATA = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073426164));
pub const SL_REMAPPING_SP_PUB_CRYPTO_INVALID_KEYLENGTH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425919));
pub const SL_REMAPPING_SP_PUB_CRYPTO_INVALID_BLOCKLENGTH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425918));
pub const SL_REMAPPING_SP_PUB_CRYPTO_INVALID_CIPHER = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425917));
pub const SL_REMAPPING_SP_PUB_CRYPTO_INVALID_CIPHERMODE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425916));
pub const SL_REMAPPING_SP_PUB_CRYPTO_UNKNOWN_PROVIDERID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425915));
pub const SL_REMAPPING_SP_PUB_CRYPTO_UNKNOWN_KEYID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425914));
pub const SL_REMAPPING_SP_PUB_CRYPTO_UNKNOWN_HASHID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425913));
pub const SL_REMAPPING_SP_PUB_CRYPTO_UNKNOWN_ATTRIBUTEID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425912));
pub const SL_REMAPPING_SP_PUB_CRYPTO_HASH_FINALIZED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425911));
pub const SL_REMAPPING_SP_PUB_CRYPTO_KEY_NOT_AVAILABLE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425910));
pub const SL_REMAPPING_SP_PUB_CRYPTO_KEY_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425909));
pub const SL_REMAPPING_SP_PUB_CRYPTO_NOT_BLOCK_ALIGNED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425908));
pub const SL_REMAPPING_SP_PUB_CRYPTO_INVALID_SIGNATURELENGTH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425907));
pub const SL_REMAPPING_SP_PUB_CRYPTO_INVALID_SIGNATURE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425906));
pub const SL_REMAPPING_SP_PUB_CRYPTO_INVALID_BLOCK = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425905));
pub const SL_REMAPPING_SP_PUB_CRYPTO_INVALID_FORMAT = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425904));
pub const SL_REMAPPING_SP_PUB_CRYPTO_INVALID_PADDING = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425903));
pub const SL_REMAPPING_SP_PUB_TS_TAMPERED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425663));
pub const SL_REMAPPING_SP_PUB_TS_REARMED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425662));
pub const SL_REMAPPING_SP_PUB_TS_RECREATED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425661));
pub const SL_REMAPPING_SP_PUB_TS_ENTRY_KEY_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425660));
pub const SL_REMAPPING_SP_PUB_TS_ENTRY_KEY_ALREADY_EXISTS = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425659));
pub const SL_REMAPPING_SP_PUB_TS_ENTRY_KEY_SIZE_TOO_BIG = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425658));
pub const SL_REMAPPING_SP_PUB_TS_MAX_REARM_REACHED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425657));
pub const SL_REMAPPING_SP_PUB_TS_DATA_SIZE_TOO_BIG = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425656));
pub const SL_REMAPPING_SP_PUB_TS_INVALID_HW_BINDING = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425655));
pub const SL_REMAPPING_SP_PUB_TIMER_ALREADY_EXISTS = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425654));
pub const SL_REMAPPING_SP_PUB_TIMER_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425653));
pub const SL_REMAPPING_SP_PUB_TIMER_EXPIRED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425652));
pub const SL_REMAPPING_SP_PUB_TIMER_NAME_SIZE_TOO_BIG = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425651));
pub const SL_REMAPPING_SP_PUB_TS_FULL = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425650));
pub const SL_REMAPPING_SP_PUB_TRUSTED_TIME_OK = @import("../../zig.zig").typedConst(HRESULT, @as(i32, 1074057999));
pub const SL_REMAPPING_SP_PUB_TS_ENTRY_READ_ONLY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425648));
pub const SL_REMAPPING_SP_PUB_TIMER_READ_ONLY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425647));
pub const SL_REMAPPING_SP_PUB_TS_ATTRIBUTE_READ_ONLY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425646));
pub const SL_REMAPPING_SP_PUB_TS_ATTRIBUTE_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425645));
pub const SL_REMAPPING_SP_PUB_TS_ACCESS_DENIED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425644));
pub const SL_REMAPPING_SP_PUB_TS_NAMESPACE_NOT_FOUND = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425643));
pub const SL_REMAPPING_SP_PUB_TS_NAMESPACE_IN_USE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425642));
pub const SL_REMAPPING_SP_PUB_TS_TAMPERED_BREADCRUMB_LOAD_INVALID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425641));
pub const SL_REMAPPING_SP_PUB_TS_TAMPERED_BREADCRUMB_GENERATION = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425640));
pub const SL_REMAPPING_SP_PUB_TS_TAMPERED_INVALID_DATA = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425639));
pub const SL_REMAPPING_SP_PUB_TS_TAMPERED_NO_DATA = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425638));
pub const SL_REMAPPING_SP_PUB_TS_TAMPERED_DATA_BREADCRUMB_MISMATCH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425637));
pub const SL_REMAPPING_SP_PUB_TS_TAMPERED_DATA_VERSION_MISMATCH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425636));
pub const SL_REMAPPING_SP_PUB_TAMPER_MODULE_AUTHENTICATION = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425407));
pub const SL_REMAPPING_SP_PUB_TAMPER_SECURITY_PROCESSOR_PATCHED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425406));
pub const SL_REMAPPING_SP_PUB_KM_CACHE_TAMPER = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425151));
pub const SL_REMAPPING_SP_PUB_KM_CACHE_TAMPER_RESTORE_FAILED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073425150));
pub const SL_REMAPPING_SP_PUB_KM_CACHE_IDENTICAL = @import("../../zig.zig").typedConst(HRESULT, @as(i32, 1074058753));
pub const SL_REMAPPING_SP_PUB_KM_CACHE_POLICY_CHANGED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, 1074058754));
pub const SL_REMAPPING_SP_STATUS_PUSHKEY_CONFLICT = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073424639));
pub const SL_REMAPPING_SP_PUB_PROXY_SOFT_TAMPER = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073424638));
pub const SL_REMAPPING_SP_PUB_API_INVALID_LICENSE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073426432));
pub const SL_REMAPPING_SP_PUB_API_INVALID_ALGORITHM_TYPE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073426423));
pub const SL_REMAPPING_SP_PUB_API_TOO_MANY_LOADED_ENVIRONMENTS = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073426420));
pub const SL_REMAPPING_SP_PUB_API_BAD_GET_INFO_QUERY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073426414));
pub const SL_REMAPPING_SP_PUB_API_INVALID_HANDLE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073426388));
pub const SL_REMAPPING_SP_PUB_API_INVALID_KEY_LENGTH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073426347));
pub const SL_REMAPPING_SP_PUB_API_NO_AES_PROVIDER = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073426317));
pub const SL_REMAPPING_SP_PUB_API_HANDLE_NOT_COMMITED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -1073426303));
pub const SL_REMAPPING_MDOLLAR_PRODUCT_KEY_OUT_OF_RANGE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313819));
pub const SL_REMAPPING_MDOLLAR_INVALID_BINDING = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313818));
pub const SL_REMAPPING_MDOLLAR_PRODUCT_KEY_BLOCKED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313817));
pub const SL_REMAPPING_MDOLLAR_INVALID_PRODUCT_KEY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313816));
pub const SL_REMAPPING_MDOLLAR_UNSUPPORTED_PRODUCT_KEY = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313812));
pub const SL_REMAPPING_MDOLLAR_MAXIMUM_UNLOCK_EXCEEDED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313807));
pub const SL_REMAPPING_MDOLLAR_INVALID_PRODUCT_DATA_ID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313805));
pub const SL_REMAPPING_MDOLLAR_INVALID_PRODUCT_DATA = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313804));
pub const SL_REMAPPING_MDOLLAR_INVALID_ACTCONFIG_ID = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313802));
pub const SL_REMAPPING_MDOLLAR_INVALID_PRODUCT_KEY_LENGTH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313801));
pub const SL_REMAPPING_MDOLLAR_INVALID_PRODUCT_KEY_FORMAT = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313800));
pub const SL_REMAPPING_MDOLLAR_INVALID_BINDING_URI = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313798));
pub const SL_REMAPPING_MDOLLAR_INVALID_ARGUMENT = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313795));
pub const SL_REMAPPING_MDOLLAR_DMAK_LIMIT_EXCEEDED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313793));
pub const SL_REMAPPING_MDOLLAR_DMAK_EXTENSION_LIMIT_EXCEEDED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313792));
pub const SL_REMAPPING_MDOLLAR_OEM_SLP_COA0 = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313789));
pub const SL_REMAPPING_MDOLLAR_CIDIID_INVALID_VERSION = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313779));
pub const SL_REMAPPING_MDOLLAR_CIDIID_INVALID_DATA = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313778));
pub const SL_REMAPPING_MDOLLAR_CIDIID_INVALID_DATA_LENGTH = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313777));
pub const SL_REMAPPING_MDOLLAR_CIDIID_INVALID_CHECK_DIGITS = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313776));
pub const SL_REMAPPING_MDOLLAR_TIMEBASED_ACTIVATION_BEFORE_START_DATE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313769));
pub const SL_REMAPPING_MDOLLAR_TIMEBASED_ACTIVATION_AFTER_END_DATE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313768));
pub const SL_REMAPPING_MDOLLAR_TIMEBASED_ACTIVATION_NOT_AVAILABLE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313767));
pub const SL_REMAPPING_MDOLLAR_TIMEBASED_PRODUCT_KEY_NOT_CONFIGURED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313766));
pub const SL_REMAPPING_MDOLLAR_NO_RULES_TO_ACTIVATE = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313720));
pub const SL_REMAPPING_MDOLLAR_PRODUCT_KEY_BLOCKED_IPLOCATION = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313717));
pub const SL_REMAPPING_MDOLLAR_DIGITALMARKER_INVALID_BINDING = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313709));
pub const SL_REMAPPING_MDOLLAR_DIGITALMARKER_BINDING_NOT_CONFIGURED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313708));
pub const SL_REMAPPING_MDOLLAR_ROT_OVERRIDE_LIMIT_REACHED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313707));
pub const SL_REMAPPING_MDOLLAR_DMAK_OVERRIDE_LIMIT_REACHED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143313706));
pub const SL_REMAPPING_MDOLLAR_FREE_OFFER_EXPIRED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143312896));
pub const SL_REMAPPING_MDOLLAR_OSR_DONOR_HWID_NO_ENTITLEMENT = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143310920));
pub const SL_REMAPPING_MDOLLAR_OSR_GENERIC_ERROR = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143310919));
pub const SL_REMAPPING_MDOLLAR_OSR_NO_ASSOCIATION = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143310918));
pub const SL_REMAPPING_MDOLLAR_OSR_NOT_ADMIN = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143310917));
pub const SL_REMAPPING_MDOLLAR_OSR_USER_THROTTLED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143310916));
pub const SL_REMAPPING_MDOLLAR_OSR_LICENSE_THROTTLED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143310915));
pub const SL_REMAPPING_MDOLLAR_OSR_DEVICE_THROTTLED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143310914));
pub const SL_REMAPPING_MDOLLAR_OSR_GP_DISABLED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143310913));
pub const SL_REMAPPING_MDOLLAR_OSR_HARDWARE_BLOCKED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143310912));
pub const SL_REMAPPING_MDOLLAR_OSR_USER_BLOCKED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143310911));
pub const SL_REMAPPING_MDOLLAR_OSR_LICENSE_BLOCKED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143310910));
pub const SL_REMAPPING_MDOLLAR_OSR_DEVICE_BLOCKED = @import("../../zig.zig").typedConst(HRESULT, @as(i32, -2143310909));
pub const WINDOWS_SLID = Guid.initString("55c92734-d682-4d71-983e-d6ec3f16059f");

//--------------------------------------------------------------------------------
// Section: Types (607)
//--------------------------------------------------------------------------------
pub const SECPKG_ATTR = enum(u32) {
    C_ACCESS_TOKEN = 2147483666,
    C_FULL_ACCESS_TOKEN = 2147483778,
    CERT_TRUST_STATUS = 2147483780,
    CREDS = 2147483776,
    CREDS_2 = 2147483782,
    NEGOTIATION_PACKAGE = 2147483777,
    PACKAGE_INFO = 10,
    SERVER_AUTH_FLAGS = 2147483779,
    SIZES = 0,
    SUBJECT_SECURITY_ATTRIBUTES = 124,
    APP_DATA = 94,
    EAP_PRF_INFO = 101,
    EARLY_START = 105,
    DTLS_MTU = 34,
    KEYING_MATERIAL_INFO = 106,
    ACCESS_TOKEN = 18,
    AUTHORITY = 6,
    CLIENT_SPECIFIED_TARGET = 27,
    CONNECTION_INFO = 90,
    DCE_INFO = 3,
    ENDPOINT_BINDINGS = 26,
    EAP_KEY_BLOCK = 91,
    FLAGS = 14,
    ISSUER_LIST_EX = 89,
    KEY_INFO = 5,
    LAST_CLIENT_TOKEN_STATUS = 30,
    LIFESPAN = 2,
    LOCAL_CERT_CONTEXT = 84,
    LOCAL_CRED = 82,
    NAMES = 1,
    NATIVE_NAMES = 13,
    NEGOTIATION_INFO = 12,
    PASSWORD_EXPIRY = 8,
    REMOTE_CERT_CONTEXT = 83,
    ROOT_STORE = 85,
    SESSION_KEY = 9,
    SESSION_INFO = 93,
    STREAM_SIZES = 4,
    SUPPORTED_SIGNATURES = 102,
    TARGET_INFORMATION = 17,
    UNIQUE_BINDINGS = 25,
};
pub const SECPKG_ATTR_C_ACCESS_TOKEN = SECPKG_ATTR.C_ACCESS_TOKEN;
pub const SECPKG_ATTR_C_FULL_ACCESS_TOKEN = SECPKG_ATTR.C_FULL_ACCESS_TOKEN;
pub const SECPKG_ATTR_CERT_TRUST_STATUS = SECPKG_ATTR.CERT_TRUST_STATUS;
pub const SECPKG_ATTR_CREDS = SECPKG_ATTR.CREDS;
pub const SECPKG_ATTR_CREDS_2 = SECPKG_ATTR.CREDS_2;
pub const SECPKG_ATTR_NEGOTIATION_PACKAGE = SECPKG_ATTR.NEGOTIATION_PACKAGE;
pub const SECPKG_ATTR_PACKAGE_INFO = SECPKG_ATTR.PACKAGE_INFO;
pub const SECPKG_ATTR_SERVER_AUTH_FLAGS = SECPKG_ATTR.SERVER_AUTH_FLAGS;
pub const SECPKG_ATTR_SIZES = SECPKG_ATTR.SIZES;
pub const SECPKG_ATTR_SUBJECT_SECURITY_ATTRIBUTES = SECPKG_ATTR.SUBJECT_SECURITY_ATTRIBUTES;
pub const SECPKG_ATTR_APP_DATA = SECPKG_ATTR.APP_DATA;
pub const SECPKG_ATTR_EAP_PRF_INFO = SECPKG_ATTR.EAP_PRF_INFO;
pub const SECPKG_ATTR_EARLY_START = SECPKG_ATTR.EARLY_START;
pub const SECPKG_ATTR_DTLS_MTU = SECPKG_ATTR.DTLS_MTU;
pub const SECPKG_ATTR_KEYING_MATERIAL_INFO = SECPKG_ATTR.KEYING_MATERIAL_INFO;
pub const SECPKG_ATTR_ACCESS_TOKEN = SECPKG_ATTR.ACCESS_TOKEN;
pub const SECPKG_ATTR_AUTHORITY = SECPKG_ATTR.AUTHORITY;
pub const SECPKG_ATTR_CLIENT_SPECIFIED_TARGET = SECPKG_ATTR.CLIENT_SPECIFIED_TARGET;
pub const SECPKG_ATTR_CONNECTION_INFO = SECPKG_ATTR.CONNECTION_INFO;
pub const SECPKG_ATTR_DCE_INFO = SECPKG_ATTR.DCE_INFO;
pub const SECPKG_ATTR_ENDPOINT_BINDINGS = SECPKG_ATTR.ENDPOINT_BINDINGS;
pub const SECPKG_ATTR_EAP_KEY_BLOCK = SECPKG_ATTR.EAP_KEY_BLOCK;
pub const SECPKG_ATTR_FLAGS = SECPKG_ATTR.FLAGS;
pub const SECPKG_ATTR_ISSUER_LIST_EX = SECPKG_ATTR.ISSUER_LIST_EX;
pub const SECPKG_ATTR_KEY_INFO = SECPKG_ATTR.KEY_INFO;
pub const SECPKG_ATTR_LAST_CLIENT_TOKEN_STATUS = SECPKG_ATTR.LAST_CLIENT_TOKEN_STATUS;
pub const SECPKG_ATTR_LIFESPAN = SECPKG_ATTR.LIFESPAN;
pub const SECPKG_ATTR_LOCAL_CERT_CONTEXT = SECPKG_ATTR.LOCAL_CERT_CONTEXT;
pub const SECPKG_ATTR_LOCAL_CRED = SECPKG_ATTR.LOCAL_CRED;
pub const SECPKG_ATTR_NAMES = SECPKG_ATTR.NAMES;
pub const SECPKG_ATTR_NATIVE_NAMES = SECPKG_ATTR.NATIVE_NAMES;
pub const SECPKG_ATTR_NEGOTIATION_INFO = SECPKG_ATTR.NEGOTIATION_INFO;
pub const SECPKG_ATTR_PASSWORD_EXPIRY = SECPKG_ATTR.PASSWORD_EXPIRY;
pub const SECPKG_ATTR_REMOTE_CERT_CONTEXT = SECPKG_ATTR.REMOTE_CERT_CONTEXT;
pub const SECPKG_ATTR_ROOT_STORE = SECPKG_ATTR.ROOT_STORE;
pub const SECPKG_ATTR_SESSION_KEY = SECPKG_ATTR.SESSION_KEY;
pub const SECPKG_ATTR_SESSION_INFO = SECPKG_ATTR.SESSION_INFO;
pub const SECPKG_ATTR_STREAM_SIZES = SECPKG_ATTR.STREAM_SIZES;
pub const SECPKG_ATTR_SUPPORTED_SIGNATURES = SECPKG_ATTR.SUPPORTED_SIGNATURES;
pub const SECPKG_ATTR_TARGET_INFORMATION = SECPKG_ATTR.TARGET_INFORMATION;
pub const SECPKG_ATTR_UNIQUE_BINDINGS = SECPKG_ATTR.UNIQUE_BINDINGS;

pub const MSV1_0 = enum(u32) {
    PASSTHRU = 1,
    GUEST_LOGON = 2,
};
pub const MSV1_0_PASSTHRU = MSV1_0.PASSTHRU;
pub const MSV1_0_GUEST_LOGON = MSV1_0.GUEST_LOGON;

pub const SECPKG_CRED = enum(u32) {
    INBOUND = 1,
    OUTBOUND = 2,
};
pub const SECPKG_CRED_INBOUND = SECPKG_CRED.INBOUND;
pub const SECPKG_CRED_OUTBOUND = SECPKG_CRED.OUTBOUND;

pub const MSV_SUB_AUTHENTICATION_FILTER = enum(u32) {
    GUEST = 1,
    NOENCRYPTION = 2,
    CACHED_ACCOUNT = 4,
    USED_LM_PASSWORD = 8,
    EXTRA_SIDS = 32,
    SUBAUTH_SESSION_KEY = 64,
    SERVER_TRUST_ACCOUNT = 128,
    PROFILE_PATH_RETURNED = 1024,
    RESOURCE_GROUPS = 512,
};
pub const LOGON_GUEST = MSV_SUB_AUTHENTICATION_FILTER.GUEST;
pub const LOGON_NOENCRYPTION = MSV_SUB_AUTHENTICATION_FILTER.NOENCRYPTION;
pub const LOGON_CACHED_ACCOUNT = MSV_SUB_AUTHENTICATION_FILTER.CACHED_ACCOUNT;
pub const LOGON_USED_LM_PASSWORD = MSV_SUB_AUTHENTICATION_FILTER.USED_LM_PASSWORD;
pub const LOGON_EXTRA_SIDS = MSV_SUB_AUTHENTICATION_FILTER.EXTRA_SIDS;
pub const LOGON_SUBAUTH_SESSION_KEY = MSV_SUB_AUTHENTICATION_FILTER.SUBAUTH_SESSION_KEY;
pub const LOGON_SERVER_TRUST_ACCOUNT = MSV_SUB_AUTHENTICATION_FILTER.SERVER_TRUST_ACCOUNT;
pub const LOGON_PROFILE_PATH_RETURNED = MSV_SUB_AUTHENTICATION_FILTER.PROFILE_PATH_RETURNED;
pub const LOGON_RESOURCE_GROUPS = MSV_SUB_AUTHENTICATION_FILTER.RESOURCE_GROUPS;

pub const EXPORT_SECURITY_CONTEXT_FLAGS = enum(u32) {
    RESET_NEW = 1,
    DELETE_OLD = 2,
    TO_KERNEL = 4,
    _,
    pub fn initFlags(o: struct {
        RESET_NEW: u1 = 0,
        DELETE_OLD: u1 = 0,
        TO_KERNEL: u1 = 0,
    }) EXPORT_SECURITY_CONTEXT_FLAGS {
        return @as(EXPORT_SECURITY_CONTEXT_FLAGS, @enumFromInt((if (o.RESET_NEW == 1) @intFromEnum(EXPORT_SECURITY_CONTEXT_FLAGS.RESET_NEW) else 0) | (if (o.DELETE_OLD == 1) @intFromEnum(EXPORT_SECURITY_CONTEXT_FLAGS.DELETE_OLD) else 0) | (if (o.TO_KERNEL == 1) @intFromEnum(EXPORT_SECURITY_CONTEXT_FLAGS.TO_KERNEL) else 0)));
    }
};
pub const SECPKG_CONTEXT_EXPORT_RESET_NEW = EXPORT_SECURITY_CONTEXT_FLAGS.RESET_NEW;
pub const SECPKG_CONTEXT_EXPORT_DELETE_OLD = EXPORT_SECURITY_CONTEXT_FLAGS.DELETE_OLD;
pub const SECPKG_CONTEXT_EXPORT_TO_KERNEL = EXPORT_SECURITY_CONTEXT_FLAGS.TO_KERNEL;

pub const ACCEPT_SECURITY_CONTEXT_CONTEXT_REQ = enum(u32) {
    ALLOCATE_MEMORY = 256,
    CONNECTION = 2048,
    DELEGATE = 1,
    EXTENDED_ERROR = 32768,
    REPLAY_DETECT = 4,
    SEQUENCE_DETECT = 8,
    STREAM = 65536,
    _,
    pub fn initFlags(o: struct {
        ALLOCATE_MEMORY: u1 = 0,
        CONNECTION: u1 = 0,
        DELEGATE: u1 = 0,
        EXTENDED_ERROR: u1 = 0,
        REPLAY_DETECT: u1 = 0,
        SEQUENCE_DETECT: u1 = 0,
        STREAM: u1 = 0,
    }) ACCEPT_SECURITY_CONTEXT_CONTEXT_REQ {
        return @as(ACCEPT_SECURITY_CONTEXT_CONTEXT_REQ, @enumFromInt((if (o.ALLOCATE_MEMORY == 1) @intFromEnum(ACCEPT_SECURITY_CONTEXT_CONTEXT_REQ.ALLOCATE_MEMORY) else 0) | (if (o.CONNECTION == 1) @intFromEnum(ACCEPT_SECURITY_CONTEXT_CONTEXT_REQ.CONNECTION) else 0) | (if (o.DELEGATE == 1) @intFromEnum(ACCEPT_SECURITY_CONTEXT_CONTEXT_REQ.DELEGATE) else 0) | (if (o.EXTENDED_ERROR == 1) @intFromEnum(ACCEPT_SECURITY_CONTEXT_CONTEXT_REQ.EXTENDED_ERROR) else 0) | (if (o.REPLAY_DETECT == 1) @intFromEnum(ACCEPT_SECURITY_CONTEXT_CONTEXT_REQ.REPLAY_DETECT) else 0) | (if (o.SEQUENCE_DETECT == 1) @intFromEnum(ACCEPT_SECURITY_CONTEXT_CONTEXT_REQ.SEQUENCE_DETECT) else 0) | (if (o.STREAM == 1) @intFromEnum(ACCEPT_SECURITY_CONTEXT_CONTEXT_REQ.STREAM) else 0)));
    }
};
pub const ASC_REQ_ALLOCATE_MEMORY = ACCEPT_SECURITY_CONTEXT_CONTEXT_REQ.ALLOCATE_MEMORY;
pub const ASC_REQ_CONNECTION = ACCEPT_SECURITY_CONTEXT_CONTEXT_REQ.CONNECTION;
pub const ASC_REQ_DELEGATE = ACCEPT_SECURITY_CONTEXT_CONTEXT_REQ.DELEGATE;
pub const ASC_REQ_EXTENDED_ERROR = ACCEPT_SECURITY_CONTEXT_CONTEXT_REQ.EXTENDED_ERROR;
pub const ASC_REQ_REPLAY_DETECT = ACCEPT_SECURITY_CONTEXT_CONTEXT_REQ.REPLAY_DETECT;
pub const ASC_REQ_SEQUENCE_DETECT = ACCEPT_SECURITY_CONTEXT_CONTEXT_REQ.SEQUENCE_DETECT;
pub const ASC_REQ_STREAM = ACCEPT_SECURITY_CONTEXT_CONTEXT_REQ.STREAM;

pub const KERB_TICKET_FLAGS = enum(u32) {
    forwardable = 1073741824,
    forwarded = 536870912,
    hw_authent = 1048576,
    initial = 4194304,
    invalid = 16777216,
    may_postdate = 67108864,
    ok_as_delegate = 262144,
    postdated = 33554432,
    pre_authent = 2097152,
    proxiable = 268435456,
    proxy = 134217728,
    renewable = 8388608,
    reserved = 2147483648,
    reserved1 = 1,
    _,
    pub fn initFlags(o: struct {
        forwardable: u1 = 0,
        forwarded: u1 = 0,
        hw_authent: u1 = 0,
        initial: u1 = 0,
        invalid: u1 = 0,
        may_postdate: u1 = 0,
        ok_as_delegate: u1 = 0,
        postdated: u1 = 0,
        pre_authent: u1 = 0,
        proxiable: u1 = 0,
        proxy: u1 = 0,
        renewable: u1 = 0,
        reserved: u1 = 0,
        reserved1: u1 = 0,
    }) KERB_TICKET_FLAGS {
        return @as(KERB_TICKET_FLAGS, @enumFromInt((if (o.forwardable == 1) @intFromEnum(KERB_TICKET_FLAGS.forwardable) else 0) | (if (o.forwarded == 1) @intFromEnum(KERB_TICKET_FLAGS.forwarded) else 0) | (if (o.hw_authent == 1) @intFromEnum(KERB_TICKET_FLAGS.hw_authent) else 0) | (if (o.initial == 1) @intFromEnum(KERB_TICKET_FLAGS.initial) else 0) | (if (o.invalid == 1) @intFromEnum(KERB_TICKET_FLAGS.invalid) else 0) | (if (o.may_postdate == 1) @intFromEnum(KERB_TICKET_FLAGS.may_postdate) else 0) | (if (o.ok_as_delegate == 1) @intFromEnum(KERB_TICKET_FLAGS.ok_as_delegate) else 0) | (if (o.postdated == 1) @intFromEnum(KERB_TICKET_FLAGS.postdated) else 0) | (if (o.pre_authent == 1) @intFromEnum(KERB_TICKET_FLAGS.pre_authent) else 0) | (if (o.proxiable == 1) @intFromEnum(KERB_TICKET_FLAGS.proxiable) else 0) | (if (o.proxy == 1) @intFromEnum(KERB_TICKET_FLAGS.proxy) else 0) | (if (o.renewable == 1) @intFromEnum(KERB_TICKET_FLAGS.renewable) else 0) | (if (o.reserved == 1) @intFromEnum(KERB_TICKET_FLAGS.reserved) else 0) | (if (o.reserved1 == 1) @intFromEnum(KERB_TICKET_FLAGS.reserved1) else 0)));
    }
};
pub const KERB_TICKET_FLAGS_forwardable = KERB_TICKET_FLAGS.forwardable;
pub const KERB_TICKET_FLAGS_forwarded = KERB_TICKET_FLAGS.forwarded;
pub const KERB_TICKET_FLAGS_hw_authent = KERB_TICKET_FLAGS.hw_authent;
pub const KERB_TICKET_FLAGS_initial = KERB_TICKET_FLAGS.initial;
pub const KERB_TICKET_FLAGS_invalid = KERB_TICKET_FLAGS.invalid;
pub const KERB_TICKET_FLAGS_may_postdate = KERB_TICKET_FLAGS.may_postdate;
pub const KERB_TICKET_FLAGS_ok_as_delegate = KERB_TICKET_FLAGS.ok_as_delegate;
pub const KERB_TICKET_FLAGS_postdated = KERB_TICKET_FLAGS.postdated;
pub const KERB_TICKET_FLAGS_pre_authent = KERB_TICKET_FLAGS.pre_authent;
pub const KERB_TICKET_FLAGS_proxiable = KERB_TICKET_FLAGS.proxiable;
pub const KERB_TICKET_FLAGS_proxy = KERB_TICKET_FLAGS.proxy;
pub const KERB_TICKET_FLAGS_renewable = KERB_TICKET_FLAGS.renewable;
pub const KERB_TICKET_FLAGS_reserved = KERB_TICKET_FLAGS.reserved;
pub const KERB_TICKET_FLAGS_reserved1 = KERB_TICKET_FLAGS.reserved1;

pub const KERB_ADDRESS_TYPE = enum(u32) {
    INET_ADDRESS = 1,
    NETBIOS_ADDRESS = 2,
};
pub const DS_INET_ADDRESS = KERB_ADDRESS_TYPE.INET_ADDRESS;
pub const DS_NETBIOS_ADDRESS = KERB_ADDRESS_TYPE.NETBIOS_ADDRESS;

pub const SCHANNEL_CRED_FLAGS = enum(u32) {
    CRED_AUTO_CRED_VALIDATION = 32,
    CRED_CACHE_ONLY_URL_RETRIEVAL_ON_CREATE = 131072,
    DISABLE_RECONNECTS = 128,
    CRED_IGNORE_NO_REVOCATION_CHECK = 2048,
    CRED_IGNORE_REVOCATION_OFFLINE = 4096,
    CRED_MANUAL_CRED_VALIDATION = 8,
    CRED_NO_DEFAULT_CREDS = 16,
    CRED_NO_SERVERNAME_CHECK = 4,
    CRED_NO_SYSTEM_MAPPER = 2,
    CRED_REVOCATION_CHECK_CHAIN = 512,
    CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT = 1024,
    CRED_REVOCATION_CHECK_END_CERT = 256,
    CRED_USE_DEFAULT_CREDS = 64,
    SEND_AUX_RECORD = 2097152,
    SEND_ROOT_CERT = 262144,
    USE_STRONG_CRYPTO = 4194304,
    USE_PRESHAREDKEY_ONLY = 8388608,
    _,
    pub fn initFlags(o: struct {
        CRED_AUTO_CRED_VALIDATION: u1 = 0,
        CRED_CACHE_ONLY_URL_RETRIEVAL_ON_CREATE: u1 = 0,
        DISABLE_RECONNECTS: u1 = 0,
        CRED_IGNORE_NO_REVOCATION_CHECK: u1 = 0,
        CRED_IGNORE_REVOCATION_OFFLINE: u1 = 0,
        CRED_MANUAL_CRED_VALIDATION: u1 = 0,
        CRED_NO_DEFAULT_CREDS: u1 = 0,
        CRED_NO_SERVERNAME_CHECK: u1 = 0,
        CRED_NO_SYSTEM_MAPPER: u1 = 0,
        CRED_REVOCATION_CHECK_CHAIN: u1 = 0,
        CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT: u1 = 0,
        CRED_REVOCATION_CHECK_END_CERT: u1 = 0,
        CRED_USE_DEFAULT_CREDS: u1 = 0,
        SEND_AUX_RECORD: u1 = 0,
        SEND_ROOT_CERT: u1 = 0,
        USE_STRONG_CRYPTO: u1 = 0,
        USE_PRESHAREDKEY_ONLY: u1 = 0,
    }) SCHANNEL_CRED_FLAGS {
        return @as(SCHANNEL_CRED_FLAGS, @enumFromInt((if (o.CRED_AUTO_CRED_VALIDATION == 1) @intFromEnum(SCHANNEL_CRED_FLAGS.CRED_AUTO_CRED_VALIDATION) else 0) | (if (o.CRED_CACHE_ONLY_URL_RETRIEVAL_ON_CREATE == 1) @intFromEnum(SCHANNEL_CRED_FLAGS.CRED_CACHE_ONLY_URL_RETRIEVAL_ON_CREATE) else 0) | (if (o.DISABLE_RECONNECTS == 1) @intFromEnum(SCHANNEL_CRED_FLAGS.DISABLE_RECONNECTS) else 0) | (if (o.CRED_IGNORE_NO_REVOCATION_CHECK == 1) @intFromEnum(SCHANNEL_CRED_FLAGS.CRED_IGNORE_NO_REVOCATION_CHECK) else 0) | (if (o.CRED_IGNORE_REVOCATION_OFFLINE == 1) @intFromEnum(SCHANNEL_CRED_FLAGS.CRED_IGNORE_REVOCATION_OFFLINE) else 0) | (if (o.CRED_MANUAL_CRED_VALIDATION == 1) @intFromEnum(SCHANNEL_CRED_FLAGS.CRED_MANUAL_CRED_VALIDATION) else 0) | (if (o.CRED_NO_DEFAULT_CREDS == 1) @intFromEnum(SCHANNEL_CRED_FLAGS.CRED_NO_DEFAULT_CREDS) else 0) | (if (o.CRED_NO_SERVERNAME_CHECK == 1) @intFromEnum(SCHANNEL_CRED_FLAGS.CRED_NO_SERVERNAME_CHECK) else 0) | (if (o.CRED_NO_SYSTEM_MAPPER == 1) @intFromEnum(SCHANNEL_CRED_FLAGS.CRED_NO_SYSTEM_MAPPER) else 0) | (if (o.CRED_REVOCATION_CHECK_CHAIN == 1) @intFromEnum(SCHANNEL_CRED_FLAGS.CRED_REVOCATION_CHECK_CHAIN) else 0) | (if (o.CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT == 1) @intFromEnum(SCHANNEL_CRED_FLAGS.CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT) else 0) | (if (o.CRED_REVOCATION_CHECK_END_CERT == 1) @intFromEnum(SCHANNEL_CRED_FLAGS.CRED_REVOCATION_CHECK_END_CERT) else 0) | (if (o.CRED_USE_DEFAULT_CREDS == 1) @intFromEnum(SCHANNEL_CRED_FLAGS.CRED_USE_DEFAULT_CREDS) else 0) | (if (o.SEND_AUX_RECORD == 1) @intFromEnum(SCHANNEL_CRED_FLAGS.SEND_AUX_RECORD) else 0) | (if (o.SEND_ROOT_CERT == 1) @intFromEnum(SCHANNEL_CRED_FLAGS.SEND_ROOT_CERT) else 0) | (if (o.USE_STRONG_CRYPTO == 1) @intFromEnum(SCHANNEL_CRED_FLAGS.USE_STRONG_CRYPTO) else 0) | (if (o.USE_PRESHAREDKEY_ONLY == 1) @intFromEnum(SCHANNEL_CRED_FLAGS.USE_PRESHAREDKEY_ONLY) else 0)));
    }
};
pub const SCH_CRED_AUTO_CRED_VALIDATION = SCHANNEL_CRED_FLAGS.CRED_AUTO_CRED_VALIDATION;
pub const SCH_CRED_CACHE_ONLY_URL_RETRIEVAL_ON_CREATE = SCHANNEL_CRED_FLAGS.CRED_CACHE_ONLY_URL_RETRIEVAL_ON_CREATE;
pub const SCH_DISABLE_RECONNECTS = SCHANNEL_CRED_FLAGS.DISABLE_RECONNECTS;
pub const SCH_CRED_IGNORE_NO_REVOCATION_CHECK = SCHANNEL_CRED_FLAGS.CRED_IGNORE_NO_REVOCATION_CHECK;
pub const SCH_CRED_IGNORE_REVOCATION_OFFLINE = SCHANNEL_CRED_FLAGS.CRED_IGNORE_REVOCATION_OFFLINE;
pub const SCH_CRED_MANUAL_CRED_VALIDATION = SCHANNEL_CRED_FLAGS.CRED_MANUAL_CRED_VALIDATION;
pub const SCH_CRED_NO_DEFAULT_CREDS = SCHANNEL_CRED_FLAGS.CRED_NO_DEFAULT_CREDS;
pub const SCH_CRED_NO_SERVERNAME_CHECK = SCHANNEL_CRED_FLAGS.CRED_NO_SERVERNAME_CHECK;
pub const SCH_CRED_NO_SYSTEM_MAPPER = SCHANNEL_CRED_FLAGS.CRED_NO_SYSTEM_MAPPER;
pub const SCH_CRED_REVOCATION_CHECK_CHAIN = SCHANNEL_CRED_FLAGS.CRED_REVOCATION_CHECK_CHAIN;
pub const SCH_CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT = SCHANNEL_CRED_FLAGS.CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT;
pub const SCH_CRED_REVOCATION_CHECK_END_CERT = SCHANNEL_CRED_FLAGS.CRED_REVOCATION_CHECK_END_CERT;
pub const SCH_CRED_USE_DEFAULT_CREDS = SCHANNEL_CRED_FLAGS.CRED_USE_DEFAULT_CREDS;
pub const SCH_SEND_AUX_RECORD = SCHANNEL_CRED_FLAGS.SEND_AUX_RECORD;
pub const SCH_SEND_ROOT_CERT = SCHANNEL_CRED_FLAGS.SEND_ROOT_CERT;
pub const SCH_USE_STRONG_CRYPTO = SCHANNEL_CRED_FLAGS.USE_STRONG_CRYPTO;
pub const SCH_USE_PRESHAREDKEY_ONLY = SCHANNEL_CRED_FLAGS.USE_PRESHAREDKEY_ONLY;

pub const DOMAIN_PASSWORD_PROPERTIES = enum(u32) {
    PASSWORD_COMPLEX = 1,
    PASSWORD_NO_ANON_CHANGE = 2,
    PASSWORD_NO_CLEAR_CHANGE = 4,
    LOCKOUT_ADMINS = 8,
    PASSWORD_STORE_CLEARTEXT = 16,
    REFUSE_PASSWORD_CHANGE = 32,
    _,
    pub fn initFlags(o: struct {
        PASSWORD_COMPLEX: u1 = 0,
        PASSWORD_NO_ANON_CHANGE: u1 = 0,
        PASSWORD_NO_CLEAR_CHANGE: u1 = 0,
        LOCKOUT_ADMINS: u1 = 0,
        PASSWORD_STORE_CLEARTEXT: u1 = 0,
        REFUSE_PASSWORD_CHANGE: u1 = 0,
    }) DOMAIN_PASSWORD_PROPERTIES {
        return @as(DOMAIN_PASSWORD_PROPERTIES, @enumFromInt((if (o.PASSWORD_COMPLEX == 1) @intFromEnum(DOMAIN_PASSWORD_PROPERTIES.PASSWORD_COMPLEX) else 0) | (if (o.PASSWORD_NO_ANON_CHANGE == 1) @intFromEnum(DOMAIN_PASSWORD_PROPERTIES.PASSWORD_NO_ANON_CHANGE) else 0) | (if (o.PASSWORD_NO_CLEAR_CHANGE == 1) @intFromEnum(DOMAIN_PASSWORD_PROPERTIES.PASSWORD_NO_CLEAR_CHANGE) else 0) | (if (o.LOCKOUT_ADMINS == 1) @intFromEnum(DOMAIN_PASSWORD_PROPERTIES.LOCKOUT_ADMINS) else 0) | (if (o.PASSWORD_STORE_CLEARTEXT == 1) @intFromEnum(DOMAIN_PASSWORD_PROPERTIES.PASSWORD_STORE_CLEARTEXT) else 0) | (if (o.REFUSE_PASSWORD_CHANGE == 1) @intFromEnum(DOMAIN_PASSWORD_PROPERTIES.REFUSE_PASSWORD_CHANGE) else 0)));
    }
};
pub const DOMAIN_PASSWORD_COMPLEX = DOMAIN_PASSWORD_PROPERTIES.PASSWORD_COMPLEX;
pub const DOMAIN_PASSWORD_NO_ANON_CHANGE = DOMAIN_PASSWORD_PROPERTIES.PASSWORD_NO_ANON_CHANGE;
pub const DOMAIN_PASSWORD_NO_CLEAR_CHANGE = DOMAIN_PASSWORD_PROPERTIES.PASSWORD_NO_CLEAR_CHANGE;
pub const DOMAIN_LOCKOUT_ADMINS = DOMAIN_PASSWORD_PROPERTIES.LOCKOUT_ADMINS;
pub const DOMAIN_PASSWORD_STORE_CLEARTEXT = DOMAIN_PASSWORD_PROPERTIES.PASSWORD_STORE_CLEARTEXT;
pub const DOMAIN_REFUSE_PASSWORD_CHANGE = DOMAIN_PASSWORD_PROPERTIES.REFUSE_PASSWORD_CHANGE;

pub const SCHANNEL_ALERT_TOKEN_ALERT_TYPE = enum(u32) {
    WARNING = 1,
    FATAL = 2,
};
pub const TLS1_ALERT_WARNING = SCHANNEL_ALERT_TOKEN_ALERT_TYPE.WARNING;
pub const TLS1_ALERT_FATAL = SCHANNEL_ALERT_TOKEN_ALERT_TYPE.FATAL;

pub const TRUSTED_DOMAIN_TRUST_TYPE = enum(u32) {
    DOWNLEVEL = 1,
    UPLEVEL = 2,
    MIT = 3,
    DCE = 4,
};
pub const TRUST_TYPE_DOWNLEVEL = TRUSTED_DOMAIN_TRUST_TYPE.DOWNLEVEL;
pub const TRUST_TYPE_UPLEVEL = TRUSTED_DOMAIN_TRUST_TYPE.UPLEVEL;
pub const TRUST_TYPE_MIT = TRUSTED_DOMAIN_TRUST_TYPE.MIT;
pub const TRUST_TYPE_DCE = TRUSTED_DOMAIN_TRUST_TYPE.DCE;

pub const MSV_SUBAUTH_LOGON_PARAMETER_CONTROL = enum(u32) {
    CLEARTEXT_PASSWORD_ALLOWED = 2,
    UPDATE_LOGON_STATISTICS = 4,
    RETURN_USER_PARAMETERS = 8,
    DONT_TRY_GUEST_ACCOUNT = 16,
    ALLOW_SERVER_TRUST_ACCOUNT = 32,
    RETURN_PASSWORD_EXPIRY = 64,
    ALLOW_WORKSTATION_TRUST_ACCOUNT = 2048,
    TRY_GUEST_ACCOUNT_ONLY = 256,
    RETURN_PROFILE_PATH = 512,
    TRY_SPECIFIED_DOMAIN_ONLY = 1024,
    _,
    pub fn initFlags(o: struct {
        CLEARTEXT_PASSWORD_ALLOWED: u1 = 0,
        UPDATE_LOGON_STATISTICS: u1 = 0,
        RETURN_USER_PARAMETERS: u1 = 0,
        DONT_TRY_GUEST_ACCOUNT: u1 = 0,
        ALLOW_SERVER_TRUST_ACCOUNT: u1 = 0,
        RETURN_PASSWORD_EXPIRY: u1 = 0,
        ALLOW_WORKSTATION_TRUST_ACCOUNT: u1 = 0,
        TRY_GUEST_ACCOUNT_ONLY: u1 = 0,
        RETURN_PROFILE_PATH: u1 = 0,
        TRY_SPECIFIED_DOMAIN_ONLY: u1 = 0,
    }) MSV_SUBAUTH_LOGON_PARAMETER_CONTROL {
        return @as(MSV_SUBAUTH_LOGON_PARAMETER_CONTROL, @enumFromInt((if (o.CLEARTEXT_PASSWORD_ALLOWED == 1) @intFromEnum(MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.CLEARTEXT_PASSWORD_ALLOWED) else 0) | (if (o.UPDATE_LOGON_STATISTICS == 1) @intFromEnum(MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.UPDATE_LOGON_STATISTICS) else 0) | (if (o.RETURN_USER_PARAMETERS == 1) @intFromEnum(MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.RETURN_USER_PARAMETERS) else 0) | (if (o.DONT_TRY_GUEST_ACCOUNT == 1) @intFromEnum(MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.DONT_TRY_GUEST_ACCOUNT) else 0) | (if (o.ALLOW_SERVER_TRUST_ACCOUNT == 1) @intFromEnum(MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.ALLOW_SERVER_TRUST_ACCOUNT) else 0) | (if (o.RETURN_PASSWORD_EXPIRY == 1) @intFromEnum(MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.RETURN_PASSWORD_EXPIRY) else 0) | (if (o.ALLOW_WORKSTATION_TRUST_ACCOUNT == 1) @intFromEnum(MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.ALLOW_WORKSTATION_TRUST_ACCOUNT) else 0) | (if (o.TRY_GUEST_ACCOUNT_ONLY == 1) @intFromEnum(MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.TRY_GUEST_ACCOUNT_ONLY) else 0) | (if (o.RETURN_PROFILE_PATH == 1) @intFromEnum(MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.RETURN_PROFILE_PATH) else 0) | (if (o.TRY_SPECIFIED_DOMAIN_ONLY == 1) @intFromEnum(MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.TRY_SPECIFIED_DOMAIN_ONLY) else 0)));
    }
};
pub const MSV1_0_CLEARTEXT_PASSWORD_ALLOWED = MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.CLEARTEXT_PASSWORD_ALLOWED;
pub const MSV1_0_UPDATE_LOGON_STATISTICS = MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.UPDATE_LOGON_STATISTICS;
pub const MSV1_0_RETURN_USER_PARAMETERS = MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.RETURN_USER_PARAMETERS;
pub const MSV1_0_DONT_TRY_GUEST_ACCOUNT = MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.DONT_TRY_GUEST_ACCOUNT;
pub const MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT = MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.ALLOW_SERVER_TRUST_ACCOUNT;
pub const MSV1_0_RETURN_PASSWORD_EXPIRY = MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.RETURN_PASSWORD_EXPIRY;
pub const MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT = MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.ALLOW_WORKSTATION_TRUST_ACCOUNT;
pub const MSV1_0_TRY_GUEST_ACCOUNT_ONLY = MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.TRY_GUEST_ACCOUNT_ONLY;
pub const MSV1_0_RETURN_PROFILE_PATH = MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.RETURN_PROFILE_PATH;
pub const MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY = MSV_SUBAUTH_LOGON_PARAMETER_CONTROL.TRY_SPECIFIED_DOMAIN_ONLY;

pub const KERB_REQUEST_FLAGS = enum(u32) {
    ADD_CREDENTIAL = 1,
    REPLACE_CREDENTIAL = 2,
    REMOVE_CREDENTIAL = 4,
};
pub const KERB_REQUEST_ADD_CREDENTIAL = KERB_REQUEST_FLAGS.ADD_CREDENTIAL;
pub const KERB_REQUEST_REPLACE_CREDENTIAL = KERB_REQUEST_FLAGS.REPLACE_CREDENTIAL;
pub const KERB_REQUEST_REMOVE_CREDENTIAL = KERB_REQUEST_FLAGS.REMOVE_CREDENTIAL;

pub const TRUSTED_DOMAIN_TRUST_DIRECTION = enum(u32) {
    DISABLED = 0,
    INBOUND = 1,
    OUTBOUND = 2,
    BIDIRECTIONAL = 3,
};
pub const TRUST_DIRECTION_DISABLED = TRUSTED_DOMAIN_TRUST_DIRECTION.DISABLED;
pub const TRUST_DIRECTION_INBOUND = TRUSTED_DOMAIN_TRUST_DIRECTION.INBOUND;
pub const TRUST_DIRECTION_OUTBOUND = TRUSTED_DOMAIN_TRUST_DIRECTION.OUTBOUND;
pub const TRUST_DIRECTION_BIDIRECTIONAL = TRUSTED_DOMAIN_TRUST_DIRECTION.BIDIRECTIONAL;

pub const MSV_SUPPLEMENTAL_CREDENTIAL_FLAGS = enum(u32) {
    LM_PRESENT = 1,
    NT_PRESENT = 2,
    VERSION = 0,
    _,
    pub fn initFlags(o: struct {
        LM_PRESENT: u1 = 0,
        NT_PRESENT: u1 = 0,
        VERSION: u1 = 0,
    }) MSV_SUPPLEMENTAL_CREDENTIAL_FLAGS {
        return @as(MSV_SUPPLEMENTAL_CREDENTIAL_FLAGS, @enumFromInt((if (o.LM_PRESENT == 1) @intFromEnum(MSV_SUPPLEMENTAL_CREDENTIAL_FLAGS.LM_PRESENT) else 0) | (if (o.NT_PRESENT == 1) @intFromEnum(MSV_SUPPLEMENTAL_CREDENTIAL_FLAGS.NT_PRESENT) else 0) | (if (o.VERSION == 1) @intFromEnum(MSV_SUPPLEMENTAL_CREDENTIAL_FLAGS.VERSION) else 0)));
    }
};
pub const MSV1_0_CRED_LM_PRESENT = MSV_SUPPLEMENTAL_CREDENTIAL_FLAGS.LM_PRESENT;
pub const MSV1_0_CRED_NT_PRESENT = MSV_SUPPLEMENTAL_CREDENTIAL_FLAGS.NT_PRESENT;
pub const MSV1_0_CRED_VERSION = MSV_SUPPLEMENTAL_CREDENTIAL_FLAGS.VERSION;

pub const SECURITY_PACKAGE_OPTIONS_TYPE = enum(u32) {
    UNKNOWN = 0,
    LSA = 1,
    SSPI = 2,
};
pub const SECPKG_OPTIONS_TYPE_UNKNOWN = SECURITY_PACKAGE_OPTIONS_TYPE.UNKNOWN;
pub const SECPKG_OPTIONS_TYPE_LSA = SECURITY_PACKAGE_OPTIONS_TYPE.LSA;
pub const SECPKG_OPTIONS_TYPE_SSPI = SECURITY_PACKAGE_OPTIONS_TYPE.SSPI;

pub const SCHANNEL_SESSION_TOKEN_FLAGS = enum(u32) {
    ENABLE_RECONNECTS = 1,
    DISABLE_RECONNECTS = 2,
};
pub const SSL_SESSION_ENABLE_RECONNECTS = SCHANNEL_SESSION_TOKEN_FLAGS.ENABLE_RECONNECTS;
pub const SSL_SESSION_DISABLE_RECONNECTS = SCHANNEL_SESSION_TOKEN_FLAGS.DISABLE_RECONNECTS;

pub const KERB_CRYPTO_KEY_TYPE = enum(i32) {
    DES_CBC_CRC = 1,
    DES_CBC_MD4 = 2,
    DES_CBC_MD5 = 3,
    NULL = 0,
    RC4_HMAC_NT = 23,
    RC4_MD4 = -128,
};
pub const KERB_ETYPE_DES_CBC_CRC = KERB_CRYPTO_KEY_TYPE.DES_CBC_CRC;
pub const KERB_ETYPE_DES_CBC_MD4 = KERB_CRYPTO_KEY_TYPE.DES_CBC_MD4;
pub const KERB_ETYPE_DES_CBC_MD5 = KERB_CRYPTO_KEY_TYPE.DES_CBC_MD5;
pub const KERB_ETYPE_NULL = KERB_CRYPTO_KEY_TYPE.NULL;
pub const KERB_ETYPE_RC4_HMAC_NT = KERB_CRYPTO_KEY_TYPE.RC4_HMAC_NT;
pub const KERB_ETYPE_RC4_MD4 = KERB_CRYPTO_KEY_TYPE.RC4_MD4;

pub const LSA_AUTH_INFORMATION_AUTH_TYPE = enum(u32) {
    NONE = 0,
    NT4OWF = 1,
    CLEAR = 2,
    VERSION = 3,
};
pub const TRUST_AUTH_TYPE_NONE = LSA_AUTH_INFORMATION_AUTH_TYPE.NONE;
pub const TRUST_AUTH_TYPE_NT4OWF = LSA_AUTH_INFORMATION_AUTH_TYPE.NT4OWF;
pub const TRUST_AUTH_TYPE_CLEAR = LSA_AUTH_INFORMATION_AUTH_TYPE.CLEAR;
pub const TRUST_AUTH_TYPE_VERSION = LSA_AUTH_INFORMATION_AUTH_TYPE.VERSION;

pub const SECPKG_PACKAGE_CHANGE_TYPE = enum(u32) {
    LOAD = 0,
    UNLOAD = 1,
    SELECT = 2,
};
pub const SECPKG_PACKAGE_CHANGE_LOAD = SECPKG_PACKAGE_CHANGE_TYPE.LOAD;
pub const SECPKG_PACKAGE_CHANGE_UNLOAD = SECPKG_PACKAGE_CHANGE_TYPE.UNLOAD;
pub const SECPKG_PACKAGE_CHANGE_SELECT = SECPKG_PACKAGE_CHANGE_TYPE.SELECT;

pub const TRUSTED_DOMAIN_TRUST_ATTRIBUTES = enum(u32) {
    NON_TRANSITIVE = 1,
    UPLEVEL_ONLY = 2,
    FILTER_SIDS = 4,
    FOREST_TRANSITIVE = 8,
    CROSS_ORGANIZATION = 16,
    TREAT_AS_EXTERNAL = 64,
    WITHIN_FOREST = 32,
};
pub const TRUST_ATTRIBUTE_NON_TRANSITIVE = TRUSTED_DOMAIN_TRUST_ATTRIBUTES.NON_TRANSITIVE;
pub const TRUST_ATTRIBUTE_UPLEVEL_ONLY = TRUSTED_DOMAIN_TRUST_ATTRIBUTES.UPLEVEL_ONLY;
pub const TRUST_ATTRIBUTE_FILTER_SIDS = TRUSTED_DOMAIN_TRUST_ATTRIBUTES.FILTER_SIDS;
pub const TRUST_ATTRIBUTE_FOREST_TRANSITIVE = TRUSTED_DOMAIN_TRUST_ATTRIBUTES.FOREST_TRANSITIVE;
pub const TRUST_ATTRIBUTE_CROSS_ORGANIZATION = TRUSTED_DOMAIN_TRUST_ATTRIBUTES.CROSS_ORGANIZATION;
pub const TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL = TRUSTED_DOMAIN_TRUST_ATTRIBUTES.TREAT_AS_EXTERNAL;
pub const TRUST_ATTRIBUTE_WITHIN_FOREST = TRUSTED_DOMAIN_TRUST_ATTRIBUTES.WITHIN_FOREST;

// TODO: this type has a FreeFunc 'LsaDeregisterLogonProcess', what can Zig do with this information?
pub const LsaHandle = isize;

pub const LSA_TRUST_INFORMATION = extern struct {
    Name: UNICODE_STRING,
    Sid: ?PSID,
};

pub const LSA_REFERENCED_DOMAIN_LIST = extern struct {
    Entries: u32,
    Domains: ?*LSA_TRUST_INFORMATION,
};

pub const LSA_TRANSLATED_SID2 = extern struct {
    Use: SID_NAME_USE,
    Sid: ?PSID,
    DomainIndex: i32,
    Flags: u32,
};

pub const LSA_TRANSLATED_NAME = extern struct {
    Use: SID_NAME_USE,
    Name: UNICODE_STRING,
    DomainIndex: i32,
};

pub const POLICY_ACCOUNT_DOMAIN_INFO = extern struct {
    DomainName: UNICODE_STRING,
    DomainSid: ?PSID,
};

pub const POLICY_DNS_DOMAIN_INFO = extern struct {
    Name: UNICODE_STRING,
    DnsDomainName: UNICODE_STRING,
    DnsForestName: UNICODE_STRING,
    DomainGuid: Guid,
    Sid: ?PSID,
};

pub const LSA_LOOKUP_DOMAIN_INFO_CLASS = enum(i32) {
    AccountDomainInformation = 5,
    DnsDomainInformation = 12,
};
pub const AccountDomainInformation = LSA_LOOKUP_DOMAIN_INFO_CLASS.AccountDomainInformation;
pub const DnsDomainInformation = LSA_LOOKUP_DOMAIN_INFO_CLASS.DnsDomainInformation;

pub const SECURITY_LOGON_TYPE = enum(i32) {
    UndefinedLogonType = 0,
    Interactive = 2,
    Network = 3,
    Batch = 4,
    Service = 5,
    Proxy = 6,
    Unlock = 7,
    NetworkCleartext = 8,
    NewCredentials = 9,
    RemoteInteractive = 10,
    CachedInteractive = 11,
    CachedRemoteInteractive = 12,
    CachedUnlock = 13,
};
// NOTE: not creating aliases because this enum is 'Scoped'

pub const SE_ADT_PARAMETER_TYPE = enum(i32) {
    None = 0,
    String = 1,
    FileSpec = 2,
    Ulong = 3,
    Sid = 4,
    LogonId = 5,
    NoLogonId = 6,
    AccessMask = 7,
    Privs = 8,
    ObjectTypes = 9,
    HexUlong = 10,
    Ptr = 11,
    Time = 12,
    Guid = 13,
    Luid = 14,
    HexInt64 = 15,
    StringList = 16,
    SidList = 17,
    Duration = 18,
    UserAccountControl = 19,
    NoUac = 20,
    Message = 21,
    DateTime = 22,
    SockAddr = 23,
    SD = 24,
    LogonHours = 25,
    LogonIdNoSid = 26,
    UlongNoConv = 27,
    SockAddrNoPort = 28,
    AccessReason = 29,
    StagingReason = 30,
    ResourceAttribute = 31,
    Claims = 32,
    LogonIdAsSid = 33,
    MultiSzString = 34,
    LogonIdEx = 35,
};
pub const SeAdtParmTypeNone = SE_ADT_PARAMETER_TYPE.None;
pub const SeAdtParmTypeString = SE_ADT_PARAMETER_TYPE.String;
pub const SeAdtParmTypeFileSpec = SE_ADT_PARAMETER_TYPE.FileSpec;
pub const SeAdtParmTypeUlong = SE_ADT_PARAMETER_TYPE.Ulong;
pub const SeAdtParmTypeSid = SE_ADT_PARAMETER_TYPE.Sid;
pub const SeAdtParmTypeLogonId = SE_ADT_PARAMETER_TYPE.LogonId;
pub const SeAdtParmTypeNoLogonId = SE_ADT_PARAMETER_TYPE.NoLogonId;
pub const SeAdtParmTypeAccessMask = SE_ADT_PARAMETER_TYPE.AccessMask;
pub const SeAdtParmTypePrivs = SE_ADT_PARAMETER_TYPE.Privs;
pub const SeAdtParmTypeObjectTypes = SE_ADT_PARAMETER_TYPE.ObjectTypes;
pub const SeAdtParmTypeHexUlong = SE_ADT_PARAMETER_TYPE.HexUlong;
pub const SeAdtParmTypePtr = SE_ADT_PARAMETER_TYPE.Ptr;
pub const SeAdtParmTypeTime = SE_ADT_PARAMETER_TYPE.Time;
pub const SeAdtParmTypeGuid = SE_ADT_PARAMETER_TYPE.Guid;
pub const SeAdtParmTypeLuid = SE_ADT_PARAMETER_TYPE.Luid;
pub const SeAdtParmTypeHexInt64 = SE_ADT_PARAMETER_TYPE.HexInt64;
pub const SeAdtParmTypeStringList = SE_ADT_PARAMETER_TYPE.StringList;
pub const SeAdtParmTypeSidList = SE_ADT_PARAMETER_TYPE.SidList;
pub const SeAdtParmTypeDuration = SE_ADT_PARAMETER_TYPE.Duration;
pub const SeAdtParmTypeUserAccountControl = SE_ADT_PARAMETER_TYPE.UserAccountControl;
pub const SeAdtParmTypeNoUac = SE_ADT_PARAMETER_TYPE.NoUac;
pub const SeAdtParmTypeMessage = SE_ADT_PARAMETER_TYPE.Message;
pub const SeAdtParmTypeDateTime = SE_ADT_PARAMETER_TYPE.DateTime;
pub const SeAdtParmTypeSockAddr = SE_ADT_PARAMETER_TYPE.SockAddr;
pub const SeAdtParmTypeSD = SE_ADT_PARAMETER_TYPE.SD;
pub const SeAdtParmTypeLogonHours = SE_ADT_PARAMETER_TYPE.LogonHours;
pub const SeAdtParmTypeLogonIdNoSid = SE_ADT_PARAMETER_TYPE.LogonIdNoSid;
pub const SeAdtParmTypeUlongNoConv = SE_ADT_PARAMETER_TYPE.UlongNoConv;
pub const SeAdtParmTypeSockAddrNoPort = SE_ADT_PARAMETER_TYPE.SockAddrNoPort;
pub const SeAdtParmTypeAccessReason = SE_ADT_PARAMETER_TYPE.AccessReason;
pub const SeAdtParmTypeStagingReason = SE_ADT_PARAMETER_TYPE.StagingReason;
pub const SeAdtParmTypeResourceAttribute = SE_ADT_PARAMETER_TYPE.ResourceAttribute;
pub const SeAdtParmTypeClaims = SE_ADT_PARAMETER_TYPE.Claims;
pub const SeAdtParmTypeLogonIdAsSid = SE_ADT_PARAMETER_TYPE.LogonIdAsSid;
pub const SeAdtParmTypeMultiSzString = SE_ADT_PARAMETER_TYPE.MultiSzString;
pub const SeAdtParmTypeLogonIdEx = SE_ADT_PARAMETER_TYPE.LogonIdEx;

pub const SE_ADT_OBJECT_TYPE = extern struct {
    ObjectType: Guid,
    Flags: u16,
    Level: u16,
    AccessMask: u32,
};

pub const SE_ADT_PARAMETER_ARRAY_ENTRY = extern struct {
    Type: SE_ADT_PARAMETER_TYPE,
    Length: u32,
    Data: [2]usize,
    Address: ?*anyopaque,
};

pub const SE_ADT_ACCESS_REASON = extern struct {
    AccessMask: u32,
    AccessReasons: [32]u32,
    ObjectTypeIndex: u32,
    AccessGranted: u32,
    SecurityDescriptor: ?*SECURITY_DESCRIPTOR,
};

pub const SE_ADT_CLAIMS = extern struct {
    Length: u32,
    Claims: ?*anyopaque,
};

pub const SE_ADT_PARAMETER_ARRAY = extern struct {
    CategoryId: u32,
    AuditId: u32,
    ParameterCount: u32,
    Length: u32,
    FlatSubCategoryId: u16,
    Type: u16,
    Flags: u32,
    Parameters: [32]SE_ADT_PARAMETER_ARRAY_ENTRY,
};

pub const SE_ADT_PARAMETER_ARRAY_EX = extern struct {
    CategoryId: u32,
    AuditId: u32,
    Version: u32,
    ParameterCount: u32,
    Length: u32,
    FlatSubCategoryId: u16,
    Type: u16,
    Flags: u32,
    Parameters: [32]SE_ADT_PARAMETER_ARRAY_ENTRY,
};

pub const POLICY_AUDIT_EVENT_TYPE = enum(i32) {
    System = 0,
    Logon = 1,
    ObjectAccess = 2,
    PrivilegeUse = 3,
    DetailedTracking = 4,
    PolicyChange = 5,
    AccountManagement = 6,
    DirectoryServiceAccess = 7,
    AccountLogon = 8,
};
pub const AuditCategorySystem = POLICY_AUDIT_EVENT_TYPE.System;
pub const AuditCategoryLogon = POLICY_AUDIT_EVENT_TYPE.Logon;
pub const AuditCategoryObjectAccess = POLICY_AUDIT_EVENT_TYPE.ObjectAccess;
pub const AuditCategoryPrivilegeUse = POLICY_AUDIT_EVENT_TYPE.PrivilegeUse;
pub const AuditCategoryDetailedTracking = POLICY_AUDIT_EVENT_TYPE.DetailedTracking;
pub const AuditCategoryPolicyChange = POLICY_AUDIT_EVENT_TYPE.PolicyChange;
pub const AuditCategoryAccountManagement = POLICY_AUDIT_EVENT_TYPE.AccountManagement;
pub const AuditCategoryDirectoryServiceAccess = POLICY_AUDIT_EVENT_TYPE.DirectoryServiceAccess;
pub const AuditCategoryAccountLogon = POLICY_AUDIT_EVENT_TYPE.AccountLogon;

pub const LSA_TRANSLATED_SID = extern struct {
    Use: SID_NAME_USE,
    RelativeId: u32,
    DomainIndex: i32,
};

pub const POLICY_LSA_SERVER_ROLE = enum(i32) {
    Backup = 2,
    Primary = 3,
};
pub const PolicyServerRoleBackup = POLICY_LSA_SERVER_ROLE.Backup;
pub const PolicyServerRolePrimary = POLICY_LSA_SERVER_ROLE.Primary;

pub const POLICY_INFORMATION_CLASS = enum(i32) {
    AuditLogInformation = 1,
    AuditEventsInformation = 2,
    PrimaryDomainInformation = 3,
    PdAccountInformation = 4,
    AccountDomainInformation = 5,
    LsaServerRoleInformation = 6,
    ReplicaSourceInformation = 7,
    DefaultQuotaInformation = 8,
    ModificationInformation = 9,
    AuditFullSetInformation = 10,
    AuditFullQueryInformation = 11,
    DnsDomainInformation = 12,
    DnsDomainInformationInt = 13,
    LocalAccountDomainInformation = 14,
    MachineAccountInformation = 15,
    LastEntry = 16,
};
pub const PolicyAuditLogInformation = POLICY_INFORMATION_CLASS.AuditLogInformation;
pub const PolicyAuditEventsInformation = POLICY_INFORMATION_CLASS.AuditEventsInformation;
pub const PolicyPrimaryDomainInformation = POLICY_INFORMATION_CLASS.PrimaryDomainInformation;
pub const PolicyPdAccountInformation = POLICY_INFORMATION_CLASS.PdAccountInformation;
pub const PolicyAccountDomainInformation = POLICY_INFORMATION_CLASS.AccountDomainInformation;
pub const PolicyLsaServerRoleInformation = POLICY_INFORMATION_CLASS.LsaServerRoleInformation;
pub const PolicyReplicaSourceInformation = POLICY_INFORMATION_CLASS.ReplicaSourceInformation;
pub const PolicyDefaultQuotaInformation = POLICY_INFORMATION_CLASS.DefaultQuotaInformation;
pub const PolicyModificationInformation = POLICY_INFORMATION_CLASS.ModificationInformation;
pub const PolicyAuditFullSetInformation = POLICY_INFORMATION_CLASS.AuditFullSetInformation;
pub const PolicyAuditFullQueryInformation = POLICY_INFORMATION_CLASS.AuditFullQueryInformation;
pub const PolicyDnsDomainInformation = POLICY_INFORMATION_CLASS.DnsDomainInformation;
pub const PolicyDnsDomainInformationInt = POLICY_INFORMATION_CLASS.DnsDomainInformationInt;
pub const PolicyLocalAccountDomainInformation = POLICY_INFORMATION_CLASS.LocalAccountDomainInformation;
pub const PolicyMachineAccountInformation = POLICY_INFORMATION_CLASS.MachineAccountInformation;
pub const PolicyLastEntry = POLICY_INFORMATION_CLASS.LastEntry;

pub const POLICY_AUDIT_LOG_INFO = extern struct {
    AuditLogPercentFull: u32,
    MaximumLogSize: u32,
    AuditRetentionPeriod: LARGE_INTEGER,
    AuditLogFullShutdownInProgress: BOOLEAN,
    TimeToShutdown: LARGE_INTEGER,
    NextAuditRecordId: u32,
};

pub const POLICY_AUDIT_EVENTS_INFO = extern struct {
    AuditingMode: BOOLEAN,
    EventAuditingOptions: ?*u32,
    MaximumAuditEventCount: u32,
};

pub const POLICY_AUDIT_SUBCATEGORIES_INFO = extern struct {
    MaximumSubCategoryCount: u32,
    EventAuditingOptions: ?*u32,
};

pub const POLICY_AUDIT_CATEGORIES_INFO = extern struct {
    MaximumCategoryCount: u32,
    SubCategoriesInfo: ?*POLICY_AUDIT_SUBCATEGORIES_INFO,
};

pub const POLICY_PRIMARY_DOMAIN_INFO = extern struct {
    Name: UNICODE_STRING,
    Sid: ?PSID,
};

pub const POLICY_PD_ACCOUNT_INFO = extern struct {
    Name: UNICODE_STRING,
};

pub const POLICY_LSA_SERVER_ROLE_INFO = extern struct {
    LsaServerRole: POLICY_LSA_SERVER_ROLE,
};

pub const POLICY_REPLICA_SOURCE_INFO = extern struct {
    ReplicaSource: UNICODE_STRING,
    ReplicaAccountName: UNICODE_STRING,
};

pub const POLICY_DEFAULT_QUOTA_INFO = extern struct {
    QuotaLimits: QUOTA_LIMITS,
};

pub const POLICY_MODIFICATION_INFO = extern struct {
    ModifiedId: LARGE_INTEGER,
    DatabaseCreationTime: LARGE_INTEGER,
};

pub const POLICY_AUDIT_FULL_SET_INFO = extern struct {
    ShutDownOnFull: BOOLEAN,
};

pub const POLICY_AUDIT_FULL_QUERY_INFO = extern struct {
    ShutDownOnFull: BOOLEAN,
    LogIsFull: BOOLEAN,
};

pub const POLICY_DOMAIN_INFORMATION_CLASS = enum(i32) {
    EfsInformation = 2,
    KerberosTicketInformation = 3,
};
pub const PolicyDomainEfsInformation = POLICY_DOMAIN_INFORMATION_CLASS.EfsInformation;
pub const PolicyDomainKerberosTicketInformation = POLICY_DOMAIN_INFORMATION_CLASS.KerberosTicketInformation;

pub const POLICY_DOMAIN_EFS_INFO = extern struct {
    InfoLength: u32,
    EfsBlob: ?*u8,
};

pub const POLICY_DOMAIN_KERBEROS_TICKET_INFO = extern struct {
    AuthenticationOptions: u32,
    MaxServiceTicketAge: LARGE_INTEGER,
    MaxTicketAge: LARGE_INTEGER,
    MaxRenewAge: LARGE_INTEGER,
    MaxClockSkew: LARGE_INTEGER,
    Reserved: LARGE_INTEGER,
};

pub const POLICY_MACHINE_ACCT_INFO = extern struct {
    Rid: u32,
    Sid: ?PSID,
};

pub const POLICY_NOTIFICATION_INFORMATION_CLASS = enum(i32) {
    AuditEventsInformation = 1,
    AccountDomainInformation = 2,
    ServerRoleInformation = 3,
    DnsDomainInformation = 4,
    DomainEfsInformation = 5,
    DomainKerberosTicketInformation = 6,
    MachineAccountPasswordInformation = 7,
    GlobalSaclInformation = 8,
    Max = 9,
};
pub const PolicyNotifyAuditEventsInformation = POLICY_NOTIFICATION_INFORMATION_CLASS.AuditEventsInformation;
pub const PolicyNotifyAccountDomainInformation = POLICY_NOTIFICATION_INFORMATION_CLASS.AccountDomainInformation;
pub const PolicyNotifyServerRoleInformation = POLICY_NOTIFICATION_INFORMATION_CLASS.ServerRoleInformation;
pub const PolicyNotifyDnsDomainInformation = POLICY_NOTIFICATION_INFORMATION_CLASS.DnsDomainInformation;
pub const PolicyNotifyDomainEfsInformation = POLICY_NOTIFICATION_INFORMATION_CLASS.DomainEfsInformation;
pub const PolicyNotifyDomainKerberosTicketInformation = POLICY_NOTIFICATION_INFORMATION_CLASS.DomainKerberosTicketInformation;
pub const PolicyNotifyMachineAccountPasswordInformation = POLICY_NOTIFICATION_INFORMATION_CLASS.MachineAccountPasswordInformation;
pub const PolicyNotifyGlobalSaclInformation = POLICY_NOTIFICATION_INFORMATION_CLASS.GlobalSaclInformation;
pub const PolicyNotifyMax = POLICY_NOTIFICATION_INFORMATION_CLASS.Max;

pub const TRUSTED_INFORMATION_CLASS = enum(i32) {
    DomainNameInformation = 1,
    ControllersInformation = 2,
    PosixOffsetInformation = 3,
    PasswordInformation = 4,
    DomainInformationBasic = 5,
    DomainInformationEx = 6,
    DomainAuthInformation = 7,
    DomainFullInformation = 8,
    DomainAuthInformationInternal = 9,
    DomainFullInformationInternal = 10,
    DomainInformationEx2Internal = 11,
    DomainFullInformation2Internal = 12,
    DomainSupportedEncryptionTypes = 13,
};
pub const TrustedDomainNameInformation = TRUSTED_INFORMATION_CLASS.DomainNameInformation;
pub const TrustedControllersInformation = TRUSTED_INFORMATION_CLASS.ControllersInformation;
pub const TrustedPosixOffsetInformation = TRUSTED_INFORMATION_CLASS.PosixOffsetInformation;
pub const TrustedPasswordInformation = TRUSTED_INFORMATION_CLASS.PasswordInformation;
pub const TrustedDomainInformationBasic = TRUSTED_INFORMATION_CLASS.DomainInformationBasic;
pub const TrustedDomainInformationEx = TRUSTED_INFORMATION_CLASS.DomainInformationEx;
pub const TrustedDomainAuthInformation = TRUSTED_INFORMATION_CLASS.DomainAuthInformation;
pub const TrustedDomainFullInformation = TRUSTED_INFORMATION_CLASS.DomainFullInformation;
pub const TrustedDomainAuthInformationInternal = TRUSTED_INFORMATION_CLASS.DomainAuthInformationInternal;
pub const TrustedDomainFullInformationInternal = TRUSTED_INFORMATION_CLASS.DomainFullInformationInternal;
pub const TrustedDomainInformationEx2Internal = TRUSTED_INFORMATION_CLASS.DomainInformationEx2Internal;
pub const TrustedDomainFullInformation2Internal = TRUSTED_INFORMATION_CLASS.DomainFullInformation2Internal;
pub const TrustedDomainSupportedEncryptionTypes = TRUSTED_INFORMATION_CLASS.DomainSupportedEncryptionTypes;

pub const TRUSTED_DOMAIN_NAME_INFO = extern struct {
    Name: UNICODE_STRING,
};

pub const TRUSTED_CONTROLLERS_INFO = extern struct {
    Entries: u32,
    Names: ?*UNICODE_STRING,
};

pub const TRUSTED_POSIX_OFFSET_INFO = extern struct {
    Offset: u32,
};

pub const TRUSTED_PASSWORD_INFO = extern struct {
    Password: UNICODE_STRING,
    OldPassword: UNICODE_STRING,
};

pub const TRUSTED_DOMAIN_INFORMATION_EX = extern struct {
    Name: UNICODE_STRING,
    FlatName: UNICODE_STRING,
    Sid: ?PSID,
    TrustDirection: TRUSTED_DOMAIN_TRUST_DIRECTION,
    TrustType: TRUSTED_DOMAIN_TRUST_TYPE,
    TrustAttributes: TRUSTED_DOMAIN_TRUST_ATTRIBUTES,
};

pub const TRUSTED_DOMAIN_INFORMATION_EX2 = extern struct {
    Name: UNICODE_STRING,
    FlatName: UNICODE_STRING,
    Sid: ?PSID,
    TrustDirection: u32,
    TrustType: u32,
    TrustAttributes: u32,
    ForestTrustLength: u32,
    ForestTrustInfo: ?*u8,
};

pub const LSA_AUTH_INFORMATION = extern struct {
    LastUpdateTime: LARGE_INTEGER,
    AuthType: LSA_AUTH_INFORMATION_AUTH_TYPE,
    AuthInfoLength: u32,
    AuthInfo: ?*u8,
};

pub const TRUSTED_DOMAIN_AUTH_INFORMATION = extern struct {
    IncomingAuthInfos: u32,
    IncomingAuthenticationInformation: ?*LSA_AUTH_INFORMATION,
    IncomingPreviousAuthenticationInformation: ?*LSA_AUTH_INFORMATION,
    OutgoingAuthInfos: u32,
    OutgoingAuthenticationInformation: ?*LSA_AUTH_INFORMATION,
    OutgoingPreviousAuthenticationInformation: ?*LSA_AUTH_INFORMATION,
};

pub const TRUSTED_DOMAIN_FULL_INFORMATION = extern struct {
    Information: TRUSTED_DOMAIN_INFORMATION_EX,
    PosixOffset: TRUSTED_POSIX_OFFSET_INFO,
    AuthInformation: TRUSTED_DOMAIN_AUTH_INFORMATION,
};

pub const TRUSTED_DOMAIN_FULL_INFORMATION2 = extern struct {
    Information: TRUSTED_DOMAIN_INFORMATION_EX2,
    PosixOffset: TRUSTED_POSIX_OFFSET_INFO,
    AuthInformation: TRUSTED_DOMAIN_AUTH_INFORMATION,
};

pub const TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES = extern struct {
    SupportedEncryptionTypes: u32,
};

pub const LSA_FOREST_TRUST_RECORD_TYPE = enum(i32) {
    TopLevelName = 0,
    TopLevelNameEx = 1,
    DomainInfo = 2,
    // RecordTypeLast = 2, this enum value conflicts with DomainInfo
};
pub const ForestTrustTopLevelName = LSA_FOREST_TRUST_RECORD_TYPE.TopLevelName;
pub const ForestTrustTopLevelNameEx = LSA_FOREST_TRUST_RECORD_TYPE.TopLevelNameEx;
pub const ForestTrustDomainInfo = LSA_FOREST_TRUST_RECORD_TYPE.DomainInfo;
pub const ForestTrustRecordTypeLast = LSA_FOREST_TRUST_RECORD_TYPE.DomainInfo;

pub const LSA_FOREST_TRUST_DOMAIN_INFO = extern struct {
    Sid: ?PSID,
    DnsName: UNICODE_STRING,
    NetbiosName: UNICODE_STRING,
};

pub const LSA_FOREST_TRUST_BINARY_DATA = extern struct {
    Length: u32,
    Buffer: ?*u8,
};

pub const LSA_FOREST_TRUST_RECORD = extern struct {
    Flags: u32,
    ForestTrustType: LSA_FOREST_TRUST_RECORD_TYPE,
    Time: LARGE_INTEGER,
    ForestTrustData: extern union {
        TopLevelName: UNICODE_STRING,
        DomainInfo: LSA_FOREST_TRUST_DOMAIN_INFO,
        Data: LSA_FOREST_TRUST_BINARY_DATA,
    },
};

pub const LSA_FOREST_TRUST_INFORMATION = extern struct {
    RecordCount: u32,
    Entries: ?*?*LSA_FOREST_TRUST_RECORD,
};

pub const LSA_FOREST_TRUST_COLLISION_RECORD_TYPE = enum(i32) {
    Tdo = 0,
    Xref = 1,
    Other = 2,
};
pub const CollisionTdo = LSA_FOREST_TRUST_COLLISION_RECORD_TYPE.Tdo;
pub const CollisionXref = LSA_FOREST_TRUST_COLLISION_RECORD_TYPE.Xref;
pub const CollisionOther = LSA_FOREST_TRUST_COLLISION_RECORD_TYPE.Other;

pub const LSA_FOREST_TRUST_COLLISION_RECORD = extern struct {
    Index: u32,
    Type: LSA_FOREST_TRUST_COLLISION_RECORD_TYPE,
    Flags: u32,
    Name: UNICODE_STRING,
};

pub const LSA_FOREST_TRUST_COLLISION_INFORMATION = extern struct {
    RecordCount: u32,
    Entries: ?*?*LSA_FOREST_TRUST_COLLISION_RECORD,
};

pub const LSA_ENUMERATION_INFORMATION = extern struct {
    Sid: ?PSID,
};

pub const LSA_LAST_INTER_LOGON_INFO = extern struct {
    LastSuccessfulLogon: LARGE_INTEGER,
    LastFailedLogon: LARGE_INTEGER,
    FailedAttemptCountSinceLastSuccessfulLogon: u32,
};

pub const SECURITY_LOGON_SESSION_DATA = extern struct {
    Size: u32,
    LogonId: LUID,
    UserName: UNICODE_STRING,
    LogonDomain: UNICODE_STRING,
    AuthenticationPackage: UNICODE_STRING,
    LogonType: u32,
    Session: u32,
    Sid: ?PSID,
    LogonTime: LARGE_INTEGER,
    LogonServer: UNICODE_STRING,
    DnsDomainName: UNICODE_STRING,
    Upn: UNICODE_STRING,
    UserFlags: u32,
    LastLogonInfo: LSA_LAST_INTER_LOGON_INFO,
    LogonScript: UNICODE_STRING,
    ProfilePath: UNICODE_STRING,
    HomeDirectory: UNICODE_STRING,
    HomeDirectoryDrive: UNICODE_STRING,
    LogoffTime: LARGE_INTEGER,
    KickOffTime: LARGE_INTEGER,
    PasswordLastSet: LARGE_INTEGER,
    PasswordCanChange: LARGE_INTEGER,
    PasswordMustChange: LARGE_INTEGER,
};

pub const CENTRAL_ACCESS_POLICY_ENTRY = extern struct {
    Name: UNICODE_STRING,
    Description: UNICODE_STRING,
    ChangeId: UNICODE_STRING,
    LengthAppliesTo: u32,
    AppliesTo: ?*u8,
    LengthSD: u32,
    SD: ?*SECURITY_DESCRIPTOR,
    LengthStagedSD: u32,
    StagedSD: ?*SECURITY_DESCRIPTOR,
    Flags: u32,
};

pub const CENTRAL_ACCESS_POLICY = extern struct {
    CAPID: ?PSID,
    Name: UNICODE_STRING,
    Description: UNICODE_STRING,
    ChangeId: UNICODE_STRING,
    Flags: u32,
    CAPECount: u32,
    CAPEs: ?*?*CENTRAL_ACCESS_POLICY_ENTRY,
};

pub const NEGOTIATE_MESSAGES = enum(i32) {
    EnumPackagePrefixes = 0,
    GetCallerName = 1,
    TransferCredentials = 2,
    MsgReserved1 = 3,
    CallPackageMax = 4,
};
pub const NegEnumPackagePrefixes = NEGOTIATE_MESSAGES.EnumPackagePrefixes;
pub const NegGetCallerName = NEGOTIATE_MESSAGES.GetCallerName;
pub const NegTransferCredentials = NEGOTIATE_MESSAGES.TransferCredentials;
pub const NegMsgReserved1 = NEGOTIATE_MESSAGES.MsgReserved1;
pub const NegCallPackageMax = NEGOTIATE_MESSAGES.CallPackageMax;

pub const NEGOTIATE_PACKAGE_PREFIX = extern struct {
    PackageId: usize,
    PackageDataA: ?*anyopaque,
    PackageDataW: ?*anyopaque,
    PrefixLen: usize,
    Prefix: [32]u8,
};

pub const NEGOTIATE_PACKAGE_PREFIXES = extern struct {
    MessageType: u32,
    PrefixCount: u32,
    Offset: u32,
    Pad: u32,
};

pub const NEGOTIATE_CALLER_NAME_REQUEST = extern struct {
    MessageType: u32,
    LogonId: LUID,
};

pub const NEGOTIATE_CALLER_NAME_RESPONSE = extern struct {
    MessageType: u32,
    CallerName: ?PWSTR,
};

pub const DOMAIN_PASSWORD_INFORMATION = extern struct {
    MinPasswordLength: u16,
    PasswordHistoryLength: u16,
    PasswordProperties: DOMAIN_PASSWORD_PROPERTIES,
    MaxPasswordAge: LARGE_INTEGER,
    MinPasswordAge: LARGE_INTEGER,
};

pub const PSAM_PASSWORD_NOTIFICATION_ROUTINE = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        UserName: ?*UNICODE_STRING,
        RelativeId: u32,
        NewPassword: ?*UNICODE_STRING,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        UserName: ?*UNICODE_STRING,
        RelativeId: u32,
        NewPassword: ?*UNICODE_STRING,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PSAM_INIT_NOTIFICATION_ROUTINE = switch (@import("builtin").zig_backend) {
    .stage1 => fn () callconv(@import("std").os.windows.WINAPI) BOOLEAN,
    else => *const fn () callconv(@import("std").os.windows.WINAPI) BOOLEAN,
};

pub const PSAM_PASSWORD_FILTER_ROUTINE = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        AccountName: ?*UNICODE_STRING,
        FullName: ?*UNICODE_STRING,
        Password: ?*UNICODE_STRING,
        SetOperation: BOOLEAN,
    ) callconv(@import("std").os.windows.WINAPI) BOOLEAN,
    else => *const fn (
        AccountName: ?*UNICODE_STRING,
        FullName: ?*UNICODE_STRING,
        Password: ?*UNICODE_STRING,
        SetOperation: BOOLEAN,
    ) callconv(@import("std").os.windows.WINAPI) BOOLEAN,
};

pub const MSV1_0_LOGON_SUBMIT_TYPE = enum(i32) {
    InteractiveLogon = 2,
    Lm20Logon = 3,
    NetworkLogon = 4,
    SubAuthLogon = 5,
    WorkstationUnlockLogon = 7,
    S4ULogon = 12,
    VirtualLogon = 82,
    NoElevationLogon = 83,
    LuidLogon = 84,
};
pub const MsV1_0InteractiveLogon = MSV1_0_LOGON_SUBMIT_TYPE.InteractiveLogon;
pub const MsV1_0Lm20Logon = MSV1_0_LOGON_SUBMIT_TYPE.Lm20Logon;
pub const MsV1_0NetworkLogon = MSV1_0_LOGON_SUBMIT_TYPE.NetworkLogon;
pub const MsV1_0SubAuthLogon = MSV1_0_LOGON_SUBMIT_TYPE.SubAuthLogon;
pub const MsV1_0WorkstationUnlockLogon = MSV1_0_LOGON_SUBMIT_TYPE.WorkstationUnlockLogon;
pub const MsV1_0S4ULogon = MSV1_0_LOGON_SUBMIT_TYPE.S4ULogon;
pub const MsV1_0VirtualLogon = MSV1_0_LOGON_SUBMIT_TYPE.VirtualLogon;
pub const MsV1_0NoElevationLogon = MSV1_0_LOGON_SUBMIT_TYPE.NoElevationLogon;
pub const MsV1_0LuidLogon = MSV1_0_LOGON_SUBMIT_TYPE.LuidLogon;

pub const MSV1_0_PROFILE_BUFFER_TYPE = enum(i32) {
    InteractiveProfile = 2,
    Lm20LogonProfile = 3,
    SmartCardProfile = 4,
};
pub const MsV1_0InteractiveProfile = MSV1_0_PROFILE_BUFFER_TYPE.InteractiveProfile;
pub const MsV1_0Lm20LogonProfile = MSV1_0_PROFILE_BUFFER_TYPE.Lm20LogonProfile;
pub const MsV1_0SmartCardProfile = MSV1_0_PROFILE_BUFFER_TYPE.SmartCardProfile;

pub const MSV1_0_INTERACTIVE_LOGON = extern struct {
    MessageType: MSV1_0_LOGON_SUBMIT_TYPE,
    LogonDomainName: UNICODE_STRING,
    UserName: UNICODE_STRING,
    Password: UNICODE_STRING,
};

pub const MSV1_0_INTERACTIVE_PROFILE = extern struct {
    MessageType: MSV1_0_PROFILE_BUFFER_TYPE,
    LogonCount: u16,
    BadPasswordCount: u16,
    LogonTime: LARGE_INTEGER,
    LogoffTime: LARGE_INTEGER,
    KickOffTime: LARGE_INTEGER,
    PasswordLastSet: LARGE_INTEGER,
    PasswordCanChange: LARGE_INTEGER,
    PasswordMustChange: LARGE_INTEGER,
    LogonScript: UNICODE_STRING,
    HomeDirectory: UNICODE_STRING,
    FullName: UNICODE_STRING,
    ProfilePath: UNICODE_STRING,
    HomeDirectoryDrive: UNICODE_STRING,
    LogonServer: UNICODE_STRING,
    UserFlags: u32,
};

pub const MSV1_0_LM20_LOGON = extern struct {
    MessageType: MSV1_0_LOGON_SUBMIT_TYPE,
    LogonDomainName: UNICODE_STRING,
    UserName: UNICODE_STRING,
    Workstation: UNICODE_STRING,
    ChallengeToClient: [8]u8,
    CaseSensitiveChallengeResponse: STRING,
    CaseInsensitiveChallengeResponse: STRING,
    ParameterControl: u32,
};

pub const MSV1_0_SUBAUTH_LOGON = extern struct {
    MessageType: MSV1_0_LOGON_SUBMIT_TYPE,
    LogonDomainName: UNICODE_STRING,
    UserName: UNICODE_STRING,
    Workstation: UNICODE_STRING,
    ChallengeToClient: [8]u8,
    AuthenticationInfo1: STRING,
    AuthenticationInfo2: STRING,
    ParameterControl: MSV_SUBAUTH_LOGON_PARAMETER_CONTROL,
    SubAuthPackageId: u32,
};

pub const MSV1_0_S4U_LOGON = extern struct {
    MessageType: MSV1_0_LOGON_SUBMIT_TYPE,
    Flags: u32,
    UserPrincipalName: UNICODE_STRING,
    DomainName: UNICODE_STRING,
};

pub const MSV1_0_LM20_LOGON_PROFILE = extern struct {
    MessageType: MSV1_0_PROFILE_BUFFER_TYPE,
    KickOffTime: LARGE_INTEGER,
    LogoffTime: LARGE_INTEGER,
    UserFlags: MSV_SUB_AUTHENTICATION_FILTER,
    UserSessionKey: [16]u8,
    LogonDomainName: UNICODE_STRING,
    LanmanSessionKey: [8]u8,
    LogonServer: UNICODE_STRING,
    UserParameters: UNICODE_STRING,
};

pub const MSV1_0_CREDENTIAL_KEY_TYPE = enum(i32) {
    InvalidCredKey = 0,
    DeprecatedIUMCredKey = 1,
    DomainUserCredKey = 2,
    LocalUserCredKey = 3,
    ExternallySuppliedCredKey = 4,
};
pub const InvalidCredKey = MSV1_0_CREDENTIAL_KEY_TYPE.InvalidCredKey;
pub const DeprecatedIUMCredKey = MSV1_0_CREDENTIAL_KEY_TYPE.DeprecatedIUMCredKey;
pub const DomainUserCredKey = MSV1_0_CREDENTIAL_KEY_TYPE.DomainUserCredKey;
pub const LocalUserCredKey = MSV1_0_CREDENTIAL_KEY_TYPE.LocalUserCredKey;
pub const ExternallySuppliedCredKey = MSV1_0_CREDENTIAL_KEY_TYPE.ExternallySuppliedCredKey;

pub const MSV1_0_CREDENTIAL_KEY = extern struct {
    Data: [20]u8,
};

pub const MSV1_0_SUPPLEMENTAL_CREDENTIAL = extern struct {
    Version: u32,
    Flags: MSV_SUPPLEMENTAL_CREDENTIAL_FLAGS,
    LmPassword: [16]u8,
    NtPassword: [16]u8,
};

pub const MSV1_0_SUPPLEMENTAL_CREDENTIAL_V2 = extern struct {
    Version: u32,
    Flags: u32,
    NtPassword: [16]u8,
    CredentialKey: MSV1_0_CREDENTIAL_KEY,
};

pub const MSV1_0_SUPPLEMENTAL_CREDENTIAL_V3 = extern struct {
    Version: u32,
    Flags: u32,
    CredentialKeyType: MSV1_0_CREDENTIAL_KEY_TYPE,
    NtPassword: [16]u8,
    CredentialKey: MSV1_0_CREDENTIAL_KEY,
    ShaPassword: [20]u8,
};

pub const MSV1_0_IUM_SUPPLEMENTAL_CREDENTIAL = extern struct {
    Version: u32,
    EncryptedCredsSize: u32,
    EncryptedCreds: [1]u8,
};

pub const MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL = extern struct {
    Version: u32 align(1),
    Flags: u32 align(1),
    CredentialKey: MSV1_0_CREDENTIAL_KEY align(1),
    CredentialKeyType: MSV1_0_CREDENTIAL_KEY_TYPE align(1),
    EncryptedCredsSize: u32 align(1),
    EncryptedCreds: [1]u8 align(1),
};

pub const MSV1_0_NTLM3_RESPONSE = extern struct {
    Response: [16]u8,
    RespType: u8,
    HiRespType: u8,
    Flags: u16,
    MsgWord: u32,
    TimeStamp: u64,
    ChallengeFromClient: [8]u8,
    AvPairsOff: u32,
    Buffer: [1]u8,
};

pub const MSV1_0_AVID = enum(i32) {
    EOL = 0,
    NbComputerName = 1,
    NbDomainName = 2,
    DnsComputerName = 3,
    DnsDomainName = 4,
    DnsTreeName = 5,
    Flags = 6,
    Timestamp = 7,
    Restrictions = 8,
    TargetName = 9,
    ChannelBindings = 10,
};
pub const MsvAvEOL = MSV1_0_AVID.EOL;
pub const MsvAvNbComputerName = MSV1_0_AVID.NbComputerName;
pub const MsvAvNbDomainName = MSV1_0_AVID.NbDomainName;
pub const MsvAvDnsComputerName = MSV1_0_AVID.DnsComputerName;
pub const MsvAvDnsDomainName = MSV1_0_AVID.DnsDomainName;
pub const MsvAvDnsTreeName = MSV1_0_AVID.DnsTreeName;
pub const MsvAvFlags = MSV1_0_AVID.Flags;
pub const MsvAvTimestamp = MSV1_0_AVID.Timestamp;
pub const MsvAvRestrictions = MSV1_0_AVID.Restrictions;
pub const MsvAvTargetName = MSV1_0_AVID.TargetName;
pub const MsvAvChannelBindings = MSV1_0_AVID.ChannelBindings;

pub const MSV1_0_AV_PAIR = extern struct {
    AvId: u16,
    AvLen: u16,
};

pub const MSV1_0_PROTOCOL_MESSAGE_TYPE = enum(i32) {
    Lm20ChallengeRequest = 0,
    Lm20GetChallengeResponse = 1,
    EnumerateUsers = 2,
    GetUserInfo = 3,
    ReLogonUsers = 4,
    ChangePassword = 5,
    ChangeCachedPassword = 6,
    GenericPassthrough = 7,
    CacheLogon = 8,
    SubAuth = 9,
    DeriveCredential = 10,
    CacheLookup = 11,
    SetProcessOption = 12,
    ConfigLocalAliases = 13,
    ClearCachedCredentials = 14,
    LookupToken = 15,
    ValidateAuth = 16,
    CacheLookupEx = 17,
    GetCredentialKey = 18,
    SetThreadOption = 19,
    DecryptDpapiMasterKey = 20,
    GetStrongCredentialKey = 21,
    TransferCred = 22,
    ProvisionTbal = 23,
    DeleteTbalSecrets = 24,
};
pub const MsV1_0Lm20ChallengeRequest = MSV1_0_PROTOCOL_MESSAGE_TYPE.Lm20ChallengeRequest;
pub const MsV1_0Lm20GetChallengeResponse = MSV1_0_PROTOCOL_MESSAGE_TYPE.Lm20GetChallengeResponse;
pub const MsV1_0EnumerateUsers = MSV1_0_PROTOCOL_MESSAGE_TYPE.EnumerateUsers;
pub const MsV1_0GetUserInfo = MSV1_0_PROTOCOL_MESSAGE_TYPE.GetUserInfo;
pub const MsV1_0ReLogonUsers = MSV1_0_PROTOCOL_MESSAGE_TYPE.ReLogonUsers;
pub const MsV1_0ChangePassword = MSV1_0_PROTOCOL_MESSAGE_TYPE.ChangePassword;
pub const MsV1_0ChangeCachedPassword = MSV1_0_PROTOCOL_MESSAGE_TYPE.ChangeCachedPassword;
pub const MsV1_0GenericPassthrough = MSV1_0_PROTOCOL_MESSAGE_TYPE.GenericPassthrough;
pub const MsV1_0CacheLogon = MSV1_0_PROTOCOL_MESSAGE_TYPE.CacheLogon;
pub const MsV1_0SubAuth = MSV1_0_PROTOCOL_MESSAGE_TYPE.SubAuth;
pub const MsV1_0DeriveCredential = MSV1_0_PROTOCOL_MESSAGE_TYPE.DeriveCredential;
pub const MsV1_0CacheLookup = MSV1_0_PROTOCOL_MESSAGE_TYPE.CacheLookup;
pub const MsV1_0SetProcessOption = MSV1_0_PROTOCOL_MESSAGE_TYPE.SetProcessOption;
pub const MsV1_0ConfigLocalAliases = MSV1_0_PROTOCOL_MESSAGE_TYPE.ConfigLocalAliases;
pub const MsV1_0ClearCachedCredentials = MSV1_0_PROTOCOL_MESSAGE_TYPE.ClearCachedCredentials;
pub const MsV1_0LookupToken = MSV1_0_PROTOCOL_MESSAGE_TYPE.LookupToken;
pub const MsV1_0ValidateAuth = MSV1_0_PROTOCOL_MESSAGE_TYPE.ValidateAuth;
pub const MsV1_0CacheLookupEx = MSV1_0_PROTOCOL_MESSAGE_TYPE.CacheLookupEx;
pub const MsV1_0GetCredentialKey = MSV1_0_PROTOCOL_MESSAGE_TYPE.GetCredentialKey;
pub const MsV1_0SetThreadOption = MSV1_0_PROTOCOL_MESSAGE_TYPE.SetThreadOption;
pub const MsV1_0DecryptDpapiMasterKey = MSV1_0_PROTOCOL_MESSAGE_TYPE.DecryptDpapiMasterKey;
pub const MsV1_0GetStrongCredentialKey = MSV1_0_PROTOCOL_MESSAGE_TYPE.GetStrongCredentialKey;
pub const MsV1_0TransferCred = MSV1_0_PROTOCOL_MESSAGE_TYPE.TransferCred;
pub const MsV1_0ProvisionTbal = MSV1_0_PROTOCOL_MESSAGE_TYPE.ProvisionTbal;
pub const MsV1_0DeleteTbalSecrets = MSV1_0_PROTOCOL_MESSAGE_TYPE.DeleteTbalSecrets;

pub const MSV1_0_CHANGEPASSWORD_REQUEST = extern struct {
    MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE,
    DomainName: UNICODE_STRING,
    AccountName: UNICODE_STRING,
    OldPassword: UNICODE_STRING,
    NewPassword: UNICODE_STRING,
    Impersonating: BOOLEAN,
};

pub const MSV1_0_CHANGEPASSWORD_RESPONSE = extern struct {
    MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE,
    PasswordInfoValid: BOOLEAN,
    DomainPasswordInfo: DOMAIN_PASSWORD_INFORMATION,
};

pub const MSV1_0_PASSTHROUGH_REQUEST = extern struct {
    MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE,
    DomainName: UNICODE_STRING,
    PackageName: UNICODE_STRING,
    DataLength: u32,
    LogonData: ?*u8,
    Pad: u32,
};

pub const MSV1_0_PASSTHROUGH_RESPONSE = extern struct {
    MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE,
    Pad: u32,
    DataLength: u32,
    ValidationData: ?*u8,
};

pub const MSV1_0_SUBAUTH_REQUEST = extern struct {
    MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE,
    SubAuthPackageId: u32,
    SubAuthInfoLength: u32,
    SubAuthSubmitBuffer: ?*u8,
};

pub const MSV1_0_SUBAUTH_RESPONSE = extern struct {
    MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE,
    SubAuthInfoLength: u32,
    SubAuthReturnBuffer: ?*u8,
};

pub const KERB_LOGON_SUBMIT_TYPE = enum(i32) {
    InteractiveLogon = 2,
    SmartCardLogon = 6,
    WorkstationUnlockLogon = 7,
    SmartCardUnlockLogon = 8,
    ProxyLogon = 9,
    TicketLogon = 10,
    TicketUnlockLogon = 11,
    S4ULogon = 12,
    CertificateLogon = 13,
    CertificateS4ULogon = 14,
    CertificateUnlockLogon = 15,
    NoElevationLogon = 83,
    LuidLogon = 84,
};
pub const KerbInteractiveLogon = KERB_LOGON_SUBMIT_TYPE.InteractiveLogon;
pub const KerbSmartCardLogon = KERB_LOGON_SUBMIT_TYPE.SmartCardLogon;
pub const KerbWorkstationUnlockLogon = KERB_LOGON_SUBMIT_TYPE.WorkstationUnlockLogon;
pub const KerbSmartCardUnlockLogon = KERB_LOGON_SUBMIT_TYPE.SmartCardUnlockLogon;
pub const KerbProxyLogon = KERB_LOGON_SUBMIT_TYPE.ProxyLogon;
pub const KerbTicketLogon = KERB_LOGON_SUBMIT_TYPE.TicketLogon;
pub const KerbTicketUnlockLogon = KERB_LOGON_SUBMIT_TYPE.TicketUnlockLogon;
pub const KerbS4ULogon = KERB_LOGON_SUBMIT_TYPE.S4ULogon;
pub const KerbCertificateLogon = KERB_LOGON_SUBMIT_TYPE.CertificateLogon;
pub const KerbCertificateS4ULogon = KERB_LOGON_SUBMIT_TYPE.CertificateS4ULogon;
pub const KerbCertificateUnlockLogon = KERB_LOGON_SUBMIT_TYPE.CertificateUnlockLogon;
pub const KerbNoElevationLogon = KERB_LOGON_SUBMIT_TYPE.NoElevationLogon;
pub const KerbLuidLogon = KERB_LOGON_SUBMIT_TYPE.LuidLogon;

pub const KERB_INTERACTIVE_LOGON = extern struct {
    MessageType: KERB_LOGON_SUBMIT_TYPE,
    LogonDomainName: UNICODE_STRING,
    UserName: UNICODE_STRING,
    Password: UNICODE_STRING,
};

pub const KERB_INTERACTIVE_UNLOCK_LOGON = extern struct {
    Logon: KERB_INTERACTIVE_LOGON,
    LogonId: LUID,
};

pub const KERB_SMART_CARD_LOGON = extern struct {
    MessageType: KERB_LOGON_SUBMIT_TYPE,
    Pin: UNICODE_STRING,
    CspDataLength: u32,
    CspData: ?*u8,
};

pub const KERB_SMART_CARD_UNLOCK_LOGON = extern struct {
    Logon: KERB_SMART_CARD_LOGON,
    LogonId: LUID,
};

pub const KERB_CERTIFICATE_LOGON = extern struct {
    MessageType: KERB_LOGON_SUBMIT_TYPE,
    DomainName: UNICODE_STRING,
    UserName: UNICODE_STRING,
    Pin: UNICODE_STRING,
    Flags: u32,
    CspDataLength: u32,
    CspData: ?*u8,
};

pub const KERB_CERTIFICATE_UNLOCK_LOGON = extern struct {
    Logon: KERB_CERTIFICATE_LOGON,
    LogonId: LUID,
};

pub const KERB_CERTIFICATE_S4U_LOGON = extern struct {
    MessageType: KERB_LOGON_SUBMIT_TYPE,
    Flags: u32,
    UserPrincipalName: UNICODE_STRING,
    DomainName: UNICODE_STRING,
    CertificateLength: u32,
    Certificate: ?*u8,
};

pub const KERB_TICKET_LOGON = extern struct {
    MessageType: KERB_LOGON_SUBMIT_TYPE,
    Flags: u32,
    ServiceTicketLength: u32,
    TicketGrantingTicketLength: u32,
    ServiceTicket: ?*u8,
    TicketGrantingTicket: ?*u8,
};

pub const KERB_TICKET_UNLOCK_LOGON = extern struct {
    Logon: KERB_TICKET_LOGON,
    LogonId: LUID,
};

pub const KERB_S4U_LOGON = extern struct {
    MessageType: KERB_LOGON_SUBMIT_TYPE,
    Flags: u32,
    ClientUpn: UNICODE_STRING,
    ClientRealm: UNICODE_STRING,
};

pub const KERB_PROFILE_BUFFER_TYPE = enum(i32) {
    InteractiveProfile = 2,
    SmartCardProfile = 4,
    TicketProfile = 6,
};
pub const KerbInteractiveProfile = KERB_PROFILE_BUFFER_TYPE.InteractiveProfile;
pub const KerbSmartCardProfile = KERB_PROFILE_BUFFER_TYPE.SmartCardProfile;
pub const KerbTicketProfile = KERB_PROFILE_BUFFER_TYPE.TicketProfile;

pub const KERB_INTERACTIVE_PROFILE = extern struct {
    MessageType: KERB_PROFILE_BUFFER_TYPE,
    LogonCount: u16,
    BadPasswordCount: u16,
    LogonTime: LARGE_INTEGER,
    LogoffTime: LARGE_INTEGER,
    KickOffTime: LARGE_INTEGER,
    PasswordLastSet: LARGE_INTEGER,
    PasswordCanChange: LARGE_INTEGER,
    PasswordMustChange: LARGE_INTEGER,
    LogonScript: UNICODE_STRING,
    HomeDirectory: UNICODE_STRING,
    FullName: UNICODE_STRING,
    ProfilePath: UNICODE_STRING,
    HomeDirectoryDrive: UNICODE_STRING,
    LogonServer: UNICODE_STRING,
    UserFlags: u32,
};

pub const KERB_SMART_CARD_PROFILE = extern struct {
    Profile: KERB_INTERACTIVE_PROFILE,
    CertificateSize: u32,
    CertificateData: ?*u8,
};

pub const KERB_CRYPTO_KEY = extern struct {
    KeyType: KERB_CRYPTO_KEY_TYPE,
    Length: u32,
    Value: ?*u8,
};

pub const KERB_CRYPTO_KEY32 = extern struct {
    KeyType: i32,
    Length: u32,
    Offset: u32,
};

pub const KERB_TICKET_PROFILE = extern struct {
    Profile: KERB_INTERACTIVE_PROFILE,
    SessionKey: KERB_CRYPTO_KEY,
};

pub const KERB_PROTOCOL_MESSAGE_TYPE = enum(i32) {
    DebugRequestMessage = 0,
    QueryTicketCacheMessage = 1,
    ChangeMachinePasswordMessage = 2,
    VerifyPacMessage = 3,
    RetrieveTicketMessage = 4,
    UpdateAddressesMessage = 5,
    PurgeTicketCacheMessage = 6,
    ChangePasswordMessage = 7,
    RetrieveEncodedTicketMessage = 8,
    DecryptDataMessage = 9,
    AddBindingCacheEntryMessage = 10,
    SetPasswordMessage = 11,
    SetPasswordExMessage = 12,
    VerifyCredentialsMessage = 13,
    QueryTicketCacheExMessage = 14,
    PurgeTicketCacheExMessage = 15,
    RefreshSmartcardCredentialsMessage = 16,
    AddExtraCredentialsMessage = 17,
    QuerySupplementalCredentialsMessage = 18,
    TransferCredentialsMessage = 19,
    QueryTicketCacheEx2Message = 20,
    SubmitTicketMessage = 21,
    AddExtraCredentialsExMessage = 22,
    QueryKdcProxyCacheMessage = 23,
    PurgeKdcProxyCacheMessage = 24,
    QueryTicketCacheEx3Message = 25,
    CleanupMachinePkinitCredsMessage = 26,
    AddBindingCacheEntryExMessage = 27,
    QueryBindingCacheMessage = 28,
    PurgeBindingCacheMessage = 29,
    PinKdcMessage = 30,
    UnpinAllKdcsMessage = 31,
    QueryDomainExtendedPoliciesMessage = 32,
    QueryS4U2ProxyCacheMessage = 33,
    RetrieveKeyTabMessage = 34,
    RefreshPolicyMessage = 35,
    PrintCloudKerberosDebugMessage = 36,
};
pub const KerbDebugRequestMessage = KERB_PROTOCOL_MESSAGE_TYPE.DebugRequestMessage;
pub const KerbQueryTicketCacheMessage = KERB_PROTOCOL_MESSAGE_TYPE.QueryTicketCacheMessage;
pub const KerbChangeMachinePasswordMessage = KERB_PROTOCOL_MESSAGE_TYPE.ChangeMachinePasswordMessage;
pub const KerbVerifyPacMessage = KERB_PROTOCOL_MESSAGE_TYPE.VerifyPacMessage;
pub const KerbRetrieveTicketMessage = KERB_PROTOCOL_MESSAGE_TYPE.RetrieveTicketMessage;
pub const KerbUpdateAddressesMessage = KERB_PROTOCOL_MESSAGE_TYPE.UpdateAddressesMessage;
pub const KerbPurgeTicketCacheMessage = KERB_PROTOCOL_MESSAGE_TYPE.PurgeTicketCacheMessage;
pub const KerbChangePasswordMessage = KERB_PROTOCOL_MESSAGE_TYPE.ChangePasswordMessage;
pub const KerbRetrieveEncodedTicketMessage = KERB_PROTOCOL_MESSAGE_TYPE.RetrieveEncodedTicketMessage;
pub const KerbDecryptDataMessage = KERB_PROTOCOL_MESSAGE_TYPE.DecryptDataMessage;
pub const KerbAddBindingCacheEntryMessage = KERB_PROTOCOL_MESSAGE_TYPE.AddBindingCacheEntryMessage;
pub const KerbSetPasswordMessage = KERB_PROTOCOL_MESSAGE_TYPE.SetPasswordMessage;
pub const KerbSetPasswordExMessage = KERB_PROTOCOL_MESSAGE_TYPE.SetPasswordExMessage;
pub const KerbVerifyCredentialsMessage = KERB_PROTOCOL_MESSAGE_TYPE.VerifyCredentialsMessage;
pub const KerbQueryTicketCacheExMessage = KERB_PROTOCOL_MESSAGE_TYPE.QueryTicketCacheExMessage;
pub const KerbPurgeTicketCacheExMessage = KERB_PROTOCOL_MESSAGE_TYPE.PurgeTicketCacheExMessage;
pub const KerbRefreshSmartcardCredentialsMessage = KERB_PROTOCOL_MESSAGE_TYPE.RefreshSmartcardCredentialsMessage;
pub const KerbAddExtraCredentialsMessage = KERB_PROTOCOL_MESSAGE_TYPE.AddExtraCredentialsMessage;
pub const KerbQuerySupplementalCredentialsMessage = KERB_PROTOCOL_MESSAGE_TYPE.QuerySupplementalCredentialsMessage;
pub const KerbTransferCredentialsMessage = KERB_PROTOCOL_MESSAGE_TYPE.TransferCredentialsMessage;
pub const KerbQueryTicketCacheEx2Message = KERB_PROTOCOL_MESSAGE_TYPE.QueryTicketCacheEx2Message;
pub const KerbSubmitTicketMessage = KERB_PROTOCOL_MESSAGE_TYPE.SubmitTicketMessage;
pub const KerbAddExtraCredentialsExMessage = KERB_PROTOCOL_MESSAGE_TYPE.AddExtraCredentialsExMessage;
pub const KerbQueryKdcProxyCacheMessage = KERB_PROTOCOL_MESSAGE_TYPE.QueryKdcProxyCacheMessage;
pub const KerbPurgeKdcProxyCacheMessage = KERB_PROTOCOL_MESSAGE_TYPE.PurgeKdcProxyCacheMessage;
pub const KerbQueryTicketCacheEx3Message = KERB_PROTOCOL_MESSAGE_TYPE.QueryTicketCacheEx3Message;
pub const KerbCleanupMachinePkinitCredsMessage = KERB_PROTOCOL_MESSAGE_TYPE.CleanupMachinePkinitCredsMessage;
pub const KerbAddBindingCacheEntryExMessage = KERB_PROTOCOL_MESSAGE_TYPE.AddBindingCacheEntryExMessage;
pub const KerbQueryBindingCacheMessage = KERB_PROTOCOL_MESSAGE_TYPE.QueryBindingCacheMessage;
pub const KerbPurgeBindingCacheMessage = KERB_PROTOCOL_MESSAGE_TYPE.PurgeBindingCacheMessage;
pub const KerbPinKdcMessage = KERB_PROTOCOL_MESSAGE_TYPE.PinKdcMessage;
pub const KerbUnpinAllKdcsMessage = KERB_PROTOCOL_MESSAGE_TYPE.UnpinAllKdcsMessage;
pub const KerbQueryDomainExtendedPoliciesMessage = KERB_PROTOCOL_MESSAGE_TYPE.QueryDomainExtendedPoliciesMessage;
pub const KerbQueryS4U2ProxyCacheMessage = KERB_PROTOCOL_MESSAGE_TYPE.QueryS4U2ProxyCacheMessage;
pub const KerbRetrieveKeyTabMessage = KERB_PROTOCOL_MESSAGE_TYPE.RetrieveKeyTabMessage;
pub const KerbRefreshPolicyMessage = KERB_PROTOCOL_MESSAGE_TYPE.RefreshPolicyMessage;
pub const KerbPrintCloudKerberosDebugMessage = KERB_PROTOCOL_MESSAGE_TYPE.PrintCloudKerberosDebugMessage;

pub const KERB_QUERY_TKT_CACHE_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    LogonId: LUID,
};

pub const KERB_TICKET_CACHE_INFO = extern struct {
    ServerName: UNICODE_STRING,
    RealmName: UNICODE_STRING,
    StartTime: LARGE_INTEGER,
    EndTime: LARGE_INTEGER,
    RenewTime: LARGE_INTEGER,
    EncryptionType: i32,
    TicketFlags: KERB_TICKET_FLAGS,
};

pub const KERB_TICKET_CACHE_INFO_EX = extern struct {
    ClientName: UNICODE_STRING,
    ClientRealm: UNICODE_STRING,
    ServerName: UNICODE_STRING,
    ServerRealm: UNICODE_STRING,
    StartTime: LARGE_INTEGER,
    EndTime: LARGE_INTEGER,
    RenewTime: LARGE_INTEGER,
    EncryptionType: i32,
    TicketFlags: u32,
};

pub const KERB_TICKET_CACHE_INFO_EX2 = extern struct {
    ClientName: UNICODE_STRING,
    ClientRealm: UNICODE_STRING,
    ServerName: UNICODE_STRING,
    ServerRealm: UNICODE_STRING,
    StartTime: LARGE_INTEGER,
    EndTime: LARGE_INTEGER,
    RenewTime: LARGE_INTEGER,
    EncryptionType: i32,
    TicketFlags: u32,
    SessionKeyType: u32,
    BranchId: u32,
};

pub const KERB_TICKET_CACHE_INFO_EX3 = extern struct {
    ClientName: UNICODE_STRING,
    ClientRealm: UNICODE_STRING,
    ServerName: UNICODE_STRING,
    ServerRealm: UNICODE_STRING,
    StartTime: LARGE_INTEGER,
    EndTime: LARGE_INTEGER,
    RenewTime: LARGE_INTEGER,
    EncryptionType: i32,
    TicketFlags: u32,
    SessionKeyType: u32,
    BranchId: u32,
    CacheFlags: u32,
    KdcCalled: UNICODE_STRING,
};

pub const KERB_QUERY_TKT_CACHE_RESPONSE = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    CountOfTickets: u32,
    Tickets: [1]KERB_TICKET_CACHE_INFO,
};

pub const KERB_QUERY_TKT_CACHE_EX_RESPONSE = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    CountOfTickets: u32,
    Tickets: [1]KERB_TICKET_CACHE_INFO_EX,
};

pub const KERB_QUERY_TKT_CACHE_EX2_RESPONSE = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    CountOfTickets: u32,
    Tickets: [1]KERB_TICKET_CACHE_INFO_EX2,
};

pub const KERB_QUERY_TKT_CACHE_EX3_RESPONSE = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    CountOfTickets: u32,
    Tickets: [1]KERB_TICKET_CACHE_INFO_EX3,
};

pub const KERB_AUTH_DATA = extern struct {
    Type: u32,
    Length: u32,
    Data: ?*u8,
};

pub const KERB_NET_ADDRESS = extern struct {
    Family: u32,
    Length: u32,
    Address: ?[*]u8,
};

pub const KERB_NET_ADDRESSES = extern struct {
    Number: u32,
    Addresses: [1]KERB_NET_ADDRESS,
};

pub const KERB_EXTERNAL_NAME = extern struct {
    NameType: i16,
    NameCount: u16,
    Names: [1]UNICODE_STRING,
};

pub const KERB_EXTERNAL_TICKET = extern struct {
    ServiceName: ?*KERB_EXTERNAL_NAME,
    TargetName: ?*KERB_EXTERNAL_NAME,
    ClientName: ?*KERB_EXTERNAL_NAME,
    DomainName: UNICODE_STRING,
    TargetDomainName: UNICODE_STRING,
    AltTargetDomainName: UNICODE_STRING,
    SessionKey: KERB_CRYPTO_KEY,
    TicketFlags: KERB_TICKET_FLAGS,
    Flags: u32,
    KeyExpirationTime: LARGE_INTEGER,
    StartTime: LARGE_INTEGER,
    EndTime: LARGE_INTEGER,
    RenewUntil: LARGE_INTEGER,
    TimeSkew: LARGE_INTEGER,
    EncodedTicketSize: u32,
    EncodedTicket: ?*u8,
};

pub const KERB_RETRIEVE_TKT_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    LogonId: LUID,
    TargetName: UNICODE_STRING,
    TicketFlags: u32,
    CacheOptions: u32,
    EncryptionType: KERB_CRYPTO_KEY_TYPE,
    CredentialsHandle: SecHandle,
};

pub const KERB_RETRIEVE_TKT_RESPONSE = extern struct {
    Ticket: KERB_EXTERNAL_TICKET,
};

pub const KERB_PURGE_TKT_CACHE_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    LogonId: LUID,
    ServerName: UNICODE_STRING,
    RealmName: UNICODE_STRING,
};

pub const KERB_PURGE_TKT_CACHE_EX_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    LogonId: LUID,
    Flags: u32,
    TicketTemplate: KERB_TICKET_CACHE_INFO_EX,
};

pub const KERB_SUBMIT_TKT_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    LogonId: LUID,
    Flags: u32,
    Key: KERB_CRYPTO_KEY32,
    KerbCredSize: u32,
    KerbCredOffset: u32,
};

pub const KERB_QUERY_KDC_PROXY_CACHE_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    Flags: u32,
    LogonId: LUID,
};

pub const KDC_PROXY_CACHE_ENTRY_DATA = extern struct {
    SinceLastUsed: u64,
    DomainName: UNICODE_STRING,
    ProxyServerName: UNICODE_STRING,
    ProxyServerVdir: UNICODE_STRING,
    ProxyServerPort: u16,
    LogonId: LUID,
    CredUserName: UNICODE_STRING,
    CredDomainName: UNICODE_STRING,
    GlobalCache: BOOLEAN,
};

pub const KERB_QUERY_KDC_PROXY_CACHE_RESPONSE = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    CountOfEntries: u32,
    Entries: ?*KDC_PROXY_CACHE_ENTRY_DATA,
};

pub const KERB_PURGE_KDC_PROXY_CACHE_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    Flags: u32,
    LogonId: LUID,
};

pub const KERB_PURGE_KDC_PROXY_CACHE_RESPONSE = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    CountOfPurged: u32,
};

pub const KERB_S4U2PROXY_CACHE_ENTRY_INFO = extern struct {
    ServerName: UNICODE_STRING,
    Flags: u32,
    LastStatus: NTSTATUS,
    Expiry: LARGE_INTEGER,
};

pub const KERB_S4U2PROXY_CRED = extern struct {
    UserName: UNICODE_STRING,
    DomainName: UNICODE_STRING,
    Flags: u32,
    LastStatus: NTSTATUS,
    Expiry: LARGE_INTEGER,
    CountOfEntries: u32,
    Entries: ?*KERB_S4U2PROXY_CACHE_ENTRY_INFO,
};

pub const KERB_QUERY_S4U2PROXY_CACHE_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    Flags: u32,
    LogonId: LUID,
};

pub const KERB_QUERY_S4U2PROXY_CACHE_RESPONSE = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    CountOfCreds: u32,
    Creds: ?*KERB_S4U2PROXY_CRED,
};

pub const KERB_RETRIEVE_KEY_TAB_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    Flags: u32,
    UserName: UNICODE_STRING,
    DomainName: UNICODE_STRING,
    Password: UNICODE_STRING,
};

pub const KERB_RETRIEVE_KEY_TAB_RESPONSE = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    KeyTabLength: u32,
    KeyTab: ?*u8,
};

pub const KERB_REFRESH_POLICY_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    Flags: u32,
};

pub const KERB_REFRESH_POLICY_RESPONSE = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    Flags: u32,
};

pub const KERB_CLOUD_KERBEROS_DEBUG_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    LogonId: LUID,
};

pub const KERB_CLOUD_KERBEROS_DEBUG_RESPONSE = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    Version: u32,
    Length: u32,
    Data: [1]u32,
};

pub const KERB_CLOUD_KERBEROS_DEBUG_DATA_V0 = extern struct {
    _bitfield: i32,
};

pub const KERB_CHANGEPASSWORD_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    DomainName: UNICODE_STRING,
    AccountName: UNICODE_STRING,
    OldPassword: UNICODE_STRING,
    NewPassword: UNICODE_STRING,
    Impersonating: BOOLEAN,
};

pub const KERB_SETPASSWORD_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    LogonId: LUID,
    CredentialsHandle: SecHandle,
    Flags: u32,
    DomainName: UNICODE_STRING,
    AccountName: UNICODE_STRING,
    Password: UNICODE_STRING,
};

pub const KERB_SETPASSWORD_EX_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    LogonId: LUID,
    CredentialsHandle: SecHandle,
    Flags: u32,
    AccountRealm: UNICODE_STRING,
    AccountName: UNICODE_STRING,
    Password: UNICODE_STRING,
    ClientRealm: UNICODE_STRING,
    ClientName: UNICODE_STRING,
    Impersonating: BOOLEAN,
    KdcAddress: UNICODE_STRING,
    KdcAddressType: u32,
};

pub const KERB_DECRYPT_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    LogonId: LUID,
    Flags: u32,
    CryptoType: i32,
    KeyUsage: i32,
    Key: KERB_CRYPTO_KEY,
    EncryptedDataSize: u32,
    InitialVectorSize: u32,
    InitialVector: ?*u8,
    EncryptedData: ?*u8,
};

pub const KERB_DECRYPT_RESPONSE = extern struct {
    DecryptedData: [1]u8,
};

pub const KERB_ADD_BINDING_CACHE_ENTRY_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    RealmName: UNICODE_STRING,
    KdcAddress: UNICODE_STRING,
    AddressType: KERB_ADDRESS_TYPE,
};

pub const KERB_REFRESH_SCCRED_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    CredentialBlob: UNICODE_STRING,
    LogonId: LUID,
    Flags: u32,
};

pub const KERB_ADD_CREDENTIALS_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    UserName: UNICODE_STRING,
    DomainName: UNICODE_STRING,
    Password: UNICODE_STRING,
    LogonId: LUID,
    Flags: KERB_REQUEST_FLAGS,
};

pub const KERB_ADD_CREDENTIALS_REQUEST_EX = extern struct {
    Credentials: KERB_ADD_CREDENTIALS_REQUEST,
    PrincipalNameCount: u32,
    PrincipalNames: [1]UNICODE_STRING,
};

pub const KERB_TRANSFER_CRED_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    OriginLogonId: LUID,
    DestinationLogonId: LUID,
    Flags: u32,
};

pub const KERB_CLEANUP_MACHINE_PKINIT_CREDS_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    LogonId: LUID,
};

pub const KERB_BINDING_CACHE_ENTRY_DATA = extern struct {
    DiscoveryTime: u64,
    RealmName: UNICODE_STRING,
    KdcAddress: UNICODE_STRING,
    AddressType: KERB_ADDRESS_TYPE,
    Flags: u32,
    DcFlags: u32,
    CacheFlags: u32,
    KdcName: UNICODE_STRING,
};

pub const KERB_QUERY_BINDING_CACHE_RESPONSE = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    CountOfEntries: u32,
    Entries: ?*KERB_BINDING_CACHE_ENTRY_DATA,
};

pub const KERB_ADD_BINDING_CACHE_ENTRY_EX_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    RealmName: UNICODE_STRING,
    KdcAddress: UNICODE_STRING,
    AddressType: KERB_ADDRESS_TYPE,
    DcFlags: u32,
};

pub const KERB_QUERY_BINDING_CACHE_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
};

pub const KERB_PURGE_BINDING_CACHE_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
};

pub const KERB_QUERY_DOMAIN_EXTENDED_POLICIES_REQUEST = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    Flags: u32,
    DomainName: UNICODE_STRING,
};

pub const KERB_QUERY_DOMAIN_EXTENDED_POLICIES_RESPONSE = extern struct {
    MessageType: KERB_PROTOCOL_MESSAGE_TYPE,
    Flags: u32,
    ExtendedPolicies: u32,
    DsFlags: u32,
};

pub const KERB_CERTIFICATE_INFO_TYPE = enum(i32) {
    o = 1,
};
pub const CertHashInfo = KERB_CERTIFICATE_INFO_TYPE.o;

pub const KERB_CERTIFICATE_HASHINFO = extern struct {
    StoreNameLength: u16,
    HashLength: u16,
};

pub const KERB_CERTIFICATE_INFO = extern struct {
    CertInfoSize: u32,
    InfoType: u32,
};

pub const POLICY_AUDIT_SID_ARRAY = extern struct {
    UsersCount: u32,
    UserSidArray: ?*?PSID,
};

pub const AUDIT_POLICY_INFORMATION = extern struct {
    AuditSubCategoryGuid: Guid,
    AuditingInformation: u32,
    AuditCategoryGuid: Guid,
};

pub const PKU2U_CERT_BLOB = extern struct {
    CertOffset: u32,
    CertLength: u16,
};

pub const PKU2U_CREDUI_CONTEXT = extern struct {
    Version: u64,
    cbHeaderLength: u16,
    cbStructureLength: u32,
    CertArrayCount: u16,
    CertArrayOffset: u32,
};

pub const PKU2U_LOGON_SUBMIT_TYPE = enum(i32) {
    n = 14,
};
pub const Pku2uCertificateS4ULogon = PKU2U_LOGON_SUBMIT_TYPE.n;

pub const PKU2U_CERTIFICATE_S4U_LOGON = extern struct {
    MessageType: PKU2U_LOGON_SUBMIT_TYPE,
    Flags: u32,
    UserPrincipalName: UNICODE_STRING,
    DomainName: UNICODE_STRING,
    CertificateLength: u32,
    Certificate: ?*u8,
};

pub const SecPkgInfoW = extern struct {
    fCapabilities: u32,
    wVersion: u16,
    wRPCID: u16,
    cbMaxToken: u32,
    Name: ?*u16,
    Comment: ?*u16,
};

pub const SecPkgInfoA = extern struct {
    fCapabilities: u32,
    wVersion: u16,
    wRPCID: u16,
    cbMaxToken: u32,
    Name: ?*i8,
    Comment: ?*i8,
};

pub const SecBuffer = extern struct {
    cbBuffer: u32,
    BufferType: u32,
    pvBuffer: ?*anyopaque,
};

pub const SecBufferDesc = extern struct {
    ulVersion: u32,
    cBuffers: u32,
    pBuffers: ?*SecBuffer,
};

pub const SEC_NEGOTIATION_INFO = extern struct {
    Size: u32,
    NameLength: u32,
    Name: ?*u16,
    Reserved: ?*anyopaque,
};

pub const SEC_CHANNEL_BINDINGS = extern struct {
    dwInitiatorAddrType: u32,
    cbInitiatorLength: u32,
    dwInitiatorOffset: u32,
    dwAcceptorAddrType: u32,
    cbAcceptorLength: u32,
    dwAcceptorOffset: u32,
    cbApplicationDataLength: u32,
    dwApplicationDataOffset: u32,
};

pub const SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT = enum(i32) {
    None = 0,
    NPN = 1,
    ALPN = 2,
};
pub const SecApplicationProtocolNegotiationExt_None = SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT.None;
pub const SecApplicationProtocolNegotiationExt_NPN = SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT.NPN;
pub const SecApplicationProtocolNegotiationExt_ALPN = SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT.ALPN;

pub const SEC_APPLICATION_PROTOCOL_LIST = extern struct {
    ProtoNegoExt: SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT,
    ProtocolListSize: u16,
    ProtocolList: [1]u8,
};

pub const SEC_APPLICATION_PROTOCOLS = extern struct {
    ProtocolListsSize: u32,
    ProtocolLists: [1]SEC_APPLICATION_PROTOCOL_LIST,
};

pub const SEC_SRTP_PROTECTION_PROFILES = extern struct {
    ProfilesSize: u16,
    ProfilesList: [1]u16,
};

pub const SEC_SRTP_MASTER_KEY_IDENTIFIER = extern struct {
    MasterKeyIdentifierSize: u8,
    MasterKeyIdentifier: [1]u8,
};

pub const SEC_TOKEN_BINDING = extern struct {
    MajorVersion: u8,
    MinorVersion: u8,
    KeyParametersSize: u16,
    KeyParameters: [1]u8,
};

pub const SEC_PRESHAREDKEY = extern struct {
    KeySize: u16,
    Key: [1]u8,
};

pub const SEC_PRESHAREDKEY_IDENTITY = extern struct {
    KeyIdentitySize: u16,
    KeyIdentity: [1]u8,
};

pub const SEC_DTLS_MTU = extern struct {
    PathMTU: u16,
};

pub const SEC_FLAGS = extern struct {
    Flags: u64,
};

pub const SEC_TRAFFIC_SECRET_TYPE = enum(i32) {
    None = 0,
    Client = 1,
    Server = 2,
};
pub const SecTrafficSecret_None = SEC_TRAFFIC_SECRET_TYPE.None;
pub const SecTrafficSecret_Client = SEC_TRAFFIC_SECRET_TYPE.Client;
pub const SecTrafficSecret_Server = SEC_TRAFFIC_SECRET_TYPE.Server;

pub const SEC_TRAFFIC_SECRETS = extern struct {
    SymmetricAlgId: [64]u16,
    ChainingMode: [64]u16,
    HashAlgId: [64]u16,
    KeySize: u16,
    IvSize: u16,
    MsgSequenceStart: u16,
    MsgSequenceEnd: u16,
    TrafficSecretType: SEC_TRAFFIC_SECRET_TYPE,
    TrafficSecretSize: u16,
    TrafficSecret: [1]u8,
};

pub const SecPkgCredentials_NamesW = extern struct {
    sUserName: ?*u16,
};

pub const SecPkgCredentials_NamesA = extern struct {
    sUserName: ?*i8,
};

pub const SecPkgCredentials_SSIProviderW = extern struct {
    sProviderName: ?*u16,
    ProviderInfoLength: u32,
    ProviderInfo: ?PSTR,
};

pub const SecPkgCredentials_SSIProviderA = extern struct {
    sProviderName: ?*i8,
    ProviderInfoLength: u32,
    ProviderInfo: ?PSTR,
};

pub const SecPkgCredentials_KdcProxySettingsW = extern struct {
    Version: u32,
    Flags: u32,
    ProxyServerOffset: u16,
    ProxyServerLength: u16,
    ClientTlsCredOffset: u16,
    ClientTlsCredLength: u16,
};

pub const SecPkgCredentials_Cert = extern struct {
    EncodedCertSize: u32,
    EncodedCert: ?*u8,
};

pub const SecPkgContext_SubjectAttributes = extern struct {
    AttributeInfo: ?*anyopaque,
};

pub const SECPKG_CRED_CLASS = enum(i32) {
    None = 0,
    Ephemeral = 10,
    PersistedGeneric = 20,
    PersistedSpecific = 30,
    Explicit = 40,
};
pub const SecPkgCredClass_None = SECPKG_CRED_CLASS.None;
pub const SecPkgCredClass_Ephemeral = SECPKG_CRED_CLASS.Ephemeral;
pub const SecPkgCredClass_PersistedGeneric = SECPKG_CRED_CLASS.PersistedGeneric;
pub const SecPkgCredClass_PersistedSpecific = SECPKG_CRED_CLASS.PersistedSpecific;
pub const SecPkgCredClass_Explicit = SECPKG_CRED_CLASS.Explicit;

pub const SecPkgContext_CredInfo = extern struct {
    CredClass: SECPKG_CRED_CLASS,
    IsPromptingNeeded: u32,
};

pub const SecPkgContext_NegoPackageInfo = extern struct {
    PackageMask: u32,
};

pub const SecPkgContext_NegoStatus = extern struct {
    LastStatus: u32,
};

pub const SecPkgContext_Sizes = extern struct {
    cbMaxToken: u32,
    cbMaxSignature: u32,
    cbBlockSize: u32,
    cbSecurityTrailer: u32,
};

pub const SecPkgContext_StreamSizes = extern struct {
    cbHeader: u32,
    cbTrailer: u32,
    cbMaximumMessage: u32,
    cBuffers: u32,
    cbBlockSize: u32,
};

pub const SecPkgContext_NamesW = extern struct {
    sUserName: ?*u16,
};

pub const SECPKG_ATTR_LCT_STATUS = enum(i32) {
    Yes = 0,
    No = 1,
    Maybe = 2,
};
pub const SecPkgAttrLastClientTokenYes = SECPKG_ATTR_LCT_STATUS.Yes;
pub const SecPkgAttrLastClientTokenNo = SECPKG_ATTR_LCT_STATUS.No;
pub const SecPkgAttrLastClientTokenMaybe = SECPKG_ATTR_LCT_STATUS.Maybe;

pub const SecPkgContext_LastClientTokenStatus = extern struct {
    LastClientTokenStatus: SECPKG_ATTR_LCT_STATUS,
};

pub const SecPkgContext_NamesA = extern struct {
    sUserName: ?*i8,
};

pub const SecPkgContext_Lifespan = extern struct {
    tsStart: LARGE_INTEGER,
    tsExpiry: LARGE_INTEGER,
};

pub const SecPkgContext_DceInfo = extern struct {
    AuthzSvc: u32,
    pPac: ?*anyopaque,
};

pub const SecPkgContext_KeyInfoA = extern struct {
    sSignatureAlgorithmName: ?*i8,
    sEncryptAlgorithmName: ?*i8,
    KeySize: u32,
    SignatureAlgorithm: u32,
    EncryptAlgorithm: u32,
};

pub const SecPkgContext_KeyInfoW = extern struct {
    sSignatureAlgorithmName: ?*u16,
    sEncryptAlgorithmName: ?*u16,
    KeySize: u32,
    SignatureAlgorithm: u32,
    EncryptAlgorithm: u32,
};

pub const SecPkgContext_AuthorityA = extern struct {
    sAuthorityName: ?*i8,
};

pub const SecPkgContext_AuthorityW = extern struct {
    sAuthorityName: ?*u16,
};

pub const SecPkgContext_ProtoInfoA = extern struct {
    sProtocolName: ?*i8,
    majorVersion: u32,
    minorVersion: u32,
};

pub const SecPkgContext_ProtoInfoW = extern struct {
    sProtocolName: ?*u16,
    majorVersion: u32,
    minorVersion: u32,
};

pub const SecPkgContext_PasswordExpiry = extern struct {
    tsPasswordExpires: LARGE_INTEGER,
};

pub const SecPkgContext_LogoffTime = extern struct {
    tsLogoffTime: LARGE_INTEGER,
};

pub const SecPkgContext_SessionKey = extern struct {
    SessionKeyLength: u32,
    SessionKey: ?*u8,
};

pub const SecPkgContext_NegoKeys = extern struct {
    KeyType: u32,
    KeyLength: u16,
    KeyValue: ?*u8,
    VerifyKeyType: u32,
    VerifyKeyLength: u16,
    VerifyKeyValue: ?*u8,
};

pub const SecPkgContext_PackageInfoW = extern struct {
    PackageInfo: ?*SecPkgInfoW,
};

pub const SecPkgContext_PackageInfoA = extern struct {
    PackageInfo: ?*SecPkgInfoA,
};

pub const SecPkgContext_UserFlags = extern struct {
    UserFlags: u32,
};

pub const SecPkgContext_Flags = extern struct {
    Flags: u32,
};

pub const SecPkgContext_NegotiationInfoA = extern struct {
    PackageInfo: ?*SecPkgInfoA,
    NegotiationState: u32,
};

pub const SecPkgContext_NegotiationInfoW = extern struct {
    PackageInfo: ?*SecPkgInfoW,
    NegotiationState: u32,
};

pub const SecPkgContext_NativeNamesW = extern struct {
    sClientName: ?*u16,
    sServerName: ?*u16,
};

pub const SecPkgContext_NativeNamesA = extern struct {
    sClientName: ?*i8,
    sServerName: ?*i8,
};

pub const SecPkgContext_CredentialNameW = extern struct {
    CredentialType: u32,
    sCredentialName: ?*u16,
};

pub const SecPkgContext_CredentialNameA = extern struct {
    CredentialType: u32,
    sCredentialName: ?*i8,
};

pub const SecPkgContext_AccessToken = extern struct {
    AccessToken: ?*anyopaque,
};

pub const SecPkgContext_TargetInformation = extern struct {
    MarshalledTargetInfoLength: u32,
    MarshalledTargetInfo: ?*u8,
};

pub const SecPkgContext_AuthzID = extern struct {
    AuthzIDLength: u32,
    AuthzID: ?PSTR,
};

pub const SecPkgContext_Target = extern struct {
    TargetLength: u32,
    Target: ?PSTR,
};

pub const SecPkgContext_ClientSpecifiedTarget = extern struct {
    sTargetName: ?*u16,
};

pub const SecPkgContext_Bindings = extern struct {
    BindingsLength: u32,
    Bindings: ?*SEC_CHANNEL_BINDINGS,
};

pub const SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS = enum(i32) {
    None = 0,
    Success = 1,
    SelectedClientOnly = 2,
};
pub const SecApplicationProtocolNegotiationStatus_None = SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS.None;
pub const SecApplicationProtocolNegotiationStatus_Success = SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS.Success;
pub const SecApplicationProtocolNegotiationStatus_SelectedClientOnly = SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS.SelectedClientOnly;

pub const SecPkgContext_ApplicationProtocol = extern struct {
    ProtoNegoStatus: SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS,
    ProtoNegoExt: SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT,
    ProtocolIdSize: u8,
    ProtocolId: [255]u8,
};

pub const SecPkgContext_NegotiatedTlsExtensions = extern struct {
    ExtensionsCount: u32,
    Extensions: ?*u16,
};

pub const SECPKG_APP_MODE_INFO = extern struct {
    UserFunction: u32,
    Argument1: usize,
    Argument2: usize,
    UserData: SecBuffer,
    ReturnToLsa: BOOLEAN,
};

pub const SEC_GET_KEY_FN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Arg: ?*anyopaque,
        Principal: ?*anyopaque,
        KeyVer: u32,
        Key: ?*?*anyopaque,
        Status: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) void,
    else => *const fn (
        Arg: ?*anyopaque,
        Principal: ?*anyopaque,
        KeyVer: u32,
        Key: ?*?*anyopaque,
        Status: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) void,
};

pub const ACQUIRE_CREDENTIALS_HANDLE_FN_W = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*u16,
        param1: ?*u16,
        param2: u32,
        param3: ?*anyopaque,
        param4: ?*anyopaque,
        param5: ?SEC_GET_KEY_FN,
        param6: ?*anyopaque,
        param7: ?*SecHandle,
        param8: ?*LARGE_INTEGER,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*u16,
        param1: ?*u16,
        param2: u32,
        param3: ?*anyopaque,
        param4: ?*anyopaque,
        param5: ?SEC_GET_KEY_FN,
        param6: ?*anyopaque,
        param7: ?*SecHandle,
        param8: ?*LARGE_INTEGER,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const ACQUIRE_CREDENTIALS_HANDLE_FN_A = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*i8,
        param1: ?*i8,
        param2: u32,
        param3: ?*anyopaque,
        param4: ?*anyopaque,
        param5: ?SEC_GET_KEY_FN,
        param6: ?*anyopaque,
        param7: ?*SecHandle,
        param8: ?*LARGE_INTEGER,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*i8,
        param1: ?*i8,
        param2: u32,
        param3: ?*anyopaque,
        param4: ?*anyopaque,
        param5: ?SEC_GET_KEY_FN,
        param6: ?*anyopaque,
        param7: ?*SecHandle,
        param8: ?*LARGE_INTEGER,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const FREE_CREDENTIALS_HANDLE_FN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const ADD_CREDENTIALS_FN_W = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: ?*u16,
        param2: ?*u16,
        param3: u32,
        param4: ?*anyopaque,
        param5: ?SEC_GET_KEY_FN,
        param6: ?*anyopaque,
        param7: ?*LARGE_INTEGER,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: ?*u16,
        param2: ?*u16,
        param3: u32,
        param4: ?*anyopaque,
        param5: ?SEC_GET_KEY_FN,
        param6: ?*anyopaque,
        param7: ?*LARGE_INTEGER,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const ADD_CREDENTIALS_FN_A = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: ?*i8,
        param2: ?*i8,
        param3: u32,
        param4: ?*anyopaque,
        param5: ?SEC_GET_KEY_FN,
        param6: ?*anyopaque,
        param7: ?*LARGE_INTEGER,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: ?*i8,
        param2: ?*i8,
        param3: u32,
        param4: ?*anyopaque,
        param5: ?SEC_GET_KEY_FN,
        param6: ?*anyopaque,
        param7: ?*LARGE_INTEGER,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const CHANGE_PASSWORD_FN_W = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*u16,
        param1: ?*u16,
        param2: ?*u16,
        param3: ?*u16,
        param4: ?*u16,
        param5: BOOLEAN,
        param6: u32,
        param7: ?*SecBufferDesc,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*u16,
        param1: ?*u16,
        param2: ?*u16,
        param3: ?*u16,
        param4: ?*u16,
        param5: BOOLEAN,
        param6: u32,
        param7: ?*SecBufferDesc,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const CHANGE_PASSWORD_FN_A = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*i8,
        param1: ?*i8,
        param2: ?*i8,
        param3: ?*i8,
        param4: ?*i8,
        param5: BOOLEAN,
        param6: u32,
        param7: ?*SecBufferDesc,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*i8,
        param1: ?*i8,
        param2: ?*i8,
        param3: ?*i8,
        param4: ?*i8,
        param5: BOOLEAN,
        param6: u32,
        param7: ?*SecBufferDesc,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const INITIALIZE_SECURITY_CONTEXT_FN_W = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: ?*SecHandle,
        param2: ?*u16,
        param3: u32,
        param4: u32,
        param5: u32,
        param6: ?*SecBufferDesc,
        param7: u32,
        param8: ?*SecHandle,
        param9: ?*SecBufferDesc,
        param10: ?*u32,
        param11: ?*LARGE_INTEGER,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: ?*SecHandle,
        param2: ?*u16,
        param3: u32,
        param4: u32,
        param5: u32,
        param6: ?*SecBufferDesc,
        param7: u32,
        param8: ?*SecHandle,
        param9: ?*SecBufferDesc,
        param10: ?*u32,
        param11: ?*LARGE_INTEGER,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const INITIALIZE_SECURITY_CONTEXT_FN_A = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: ?*SecHandle,
        param2: ?*i8,
        param3: u32,
        param4: u32,
        param5: u32,
        param6: ?*SecBufferDesc,
        param7: u32,
        param8: ?*SecHandle,
        param9: ?*SecBufferDesc,
        param10: ?*u32,
        param11: ?*LARGE_INTEGER,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: ?*SecHandle,
        param2: ?*i8,
        param3: u32,
        param4: u32,
        param5: u32,
        param6: ?*SecBufferDesc,
        param7: u32,
        param8: ?*SecHandle,
        param9: ?*SecBufferDesc,
        param10: ?*u32,
        param11: ?*LARGE_INTEGER,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const ACCEPT_SECURITY_CONTEXT_FN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: ?*SecHandle,
        param2: ?*SecBufferDesc,
        param3: u32,
        param4: u32,
        param5: ?*SecHandle,
        param6: ?*SecBufferDesc,
        param7: ?*u32,
        param8: ?*LARGE_INTEGER,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: ?*SecHandle,
        param2: ?*SecBufferDesc,
        param3: u32,
        param4: u32,
        param5: ?*SecHandle,
        param6: ?*SecBufferDesc,
        param7: ?*u32,
        param8: ?*LARGE_INTEGER,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const COMPLETE_AUTH_TOKEN_FN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: ?*SecBufferDesc,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: ?*SecBufferDesc,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const IMPERSONATE_SECURITY_CONTEXT_FN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const REVERT_SECURITY_CONTEXT_FN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const QUERY_SECURITY_CONTEXT_TOKEN_FN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const DELETE_SECURITY_CONTEXT_FN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const APPLY_CONTROL_TOKEN_FN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: ?*SecBufferDesc,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: ?*SecBufferDesc,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const QUERY_CONTEXT_ATTRIBUTES_FN_W = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const QUERY_CONTEXT_ATTRIBUTES_EX_FN_W = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const QUERY_CONTEXT_ATTRIBUTES_FN_A = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const QUERY_CONTEXT_ATTRIBUTES_EX_FN_A = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const SET_CONTEXT_ATTRIBUTES_FN_W = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const SET_CONTEXT_ATTRIBUTES_FN_A = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const QUERY_CREDENTIALS_ATTRIBUTES_FN_W = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_W = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const QUERY_CREDENTIALS_ATTRIBUTES_FN_A = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_A = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const SET_CREDENTIALS_ATTRIBUTES_FN_W = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const SET_CREDENTIALS_ATTRIBUTES_FN_A = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*anyopaque,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const FREE_CONTEXT_BUFFER_FN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const MAKE_SIGNATURE_FN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*SecBufferDesc,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*SecBufferDesc,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const VERIFY_SIGNATURE_FN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: ?*SecBufferDesc,
        param2: u32,
        param3: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: ?*SecBufferDesc,
        param2: u32,
        param3: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const ENCRYPT_MESSAGE_FN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*SecBufferDesc,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*SecBufferDesc,
        param3: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const DECRYPT_MESSAGE_FN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: ?*SecBufferDesc,
        param2: u32,
        param3: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: ?*SecBufferDesc,
        param2: u32,
        param3: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const ENUMERATE_SECURITY_PACKAGES_FN_W = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*u32,
        param1: ?*?*SecPkgInfoW,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*u32,
        param1: ?*?*SecPkgInfoW,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const ENUMERATE_SECURITY_PACKAGES_FN_A = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*u32,
        param1: ?*?*SecPkgInfoA,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*u32,
        param1: ?*?*SecPkgInfoA,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const QUERY_SECURITY_PACKAGE_INFO_FN_W = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*u16,
        param1: ?*?*SecPkgInfoW,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*u16,
        param1: ?*?*SecPkgInfoW,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const QUERY_SECURITY_PACKAGE_INFO_FN_A = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*i8,
        param1: ?*?*SecPkgInfoA,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*i8,
        param1: ?*?*SecPkgInfoA,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const SecDelegationType = enum(i32) {
    Full = 0,
    Service = 1,
    Tree = 2,
    Directory = 3,
    Object = 4,
};
pub const SecFull = SecDelegationType.Full;
pub const SecService = SecDelegationType.Service;
pub const SecTree = SecDelegationType.Tree;
pub const SecDirectory = SecDelegationType.Directory;
pub const SecObject = SecDelegationType.Object;

pub const EXPORT_SECURITY_CONTEXT_FN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*SecBuffer,
        param3: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*SecHandle,
        param1: u32,
        param2: ?*SecBuffer,
        param3: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const IMPORT_SECURITY_CONTEXT_FN_W = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*u16,
        param1: ?*SecBuffer,
        param2: ?*anyopaque,
        param3: ?*SecHandle,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*u16,
        param1: ?*SecBuffer,
        param2: ?*anyopaque,
        param3: ?*SecHandle,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const IMPORT_SECURITY_CONTEXT_FN_A = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        param0: ?*i8,
        param1: ?*SecBuffer,
        param2: ?*anyopaque,
        param3: ?*SecHandle,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        param0: ?*i8,
        param1: ?*SecBuffer,
        param2: ?*anyopaque,
        param3: ?*SecHandle,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const SecurityFunctionTableW = extern struct {
    dwVersion: u32,
    EnumerateSecurityPackagesW: ?ENUMERATE_SECURITY_PACKAGES_FN_W,
    QueryCredentialsAttributesW: ?QUERY_CREDENTIALS_ATTRIBUTES_FN_W,
    AcquireCredentialsHandleW: ?ACQUIRE_CREDENTIALS_HANDLE_FN_W,
    FreeCredentialsHandle: ?FREE_CREDENTIALS_HANDLE_FN,
    Reserved2: ?*anyopaque,
    InitializeSecurityContextW: ?INITIALIZE_SECURITY_CONTEXT_FN_W,
    AcceptSecurityContext: ?ACCEPT_SECURITY_CONTEXT_FN,
    CompleteAuthToken: ?COMPLETE_AUTH_TOKEN_FN,
    DeleteSecurityContext: ?DELETE_SECURITY_CONTEXT_FN,
    ApplyControlToken: ?APPLY_CONTROL_TOKEN_FN,
    QueryContextAttributesW: ?QUERY_CONTEXT_ATTRIBUTES_FN_W,
    ImpersonateSecurityContext: ?IMPERSONATE_SECURITY_CONTEXT_FN,
    RevertSecurityContext: ?REVERT_SECURITY_CONTEXT_FN,
    MakeSignature: ?MAKE_SIGNATURE_FN,
    VerifySignature: ?VERIFY_SIGNATURE_FN,
    FreeContextBuffer: ?FREE_CONTEXT_BUFFER_FN,
    QuerySecurityPackageInfoW: ?QUERY_SECURITY_PACKAGE_INFO_FN_W,
    Reserved3: ?*anyopaque,
    Reserved4: ?*anyopaque,
    ExportSecurityContext: ?EXPORT_SECURITY_CONTEXT_FN,
    ImportSecurityContextW: ?IMPORT_SECURITY_CONTEXT_FN_W,
    AddCredentialsW: ?ADD_CREDENTIALS_FN_W,
    Reserved8: ?*anyopaque,
    QuerySecurityContextToken: ?QUERY_SECURITY_CONTEXT_TOKEN_FN,
    EncryptMessage: ?ENCRYPT_MESSAGE_FN,
    DecryptMessage: ?DECRYPT_MESSAGE_FN,
    SetContextAttributesW: ?SET_CONTEXT_ATTRIBUTES_FN_W,
    SetCredentialsAttributesW: ?SET_CREDENTIALS_ATTRIBUTES_FN_W,
    ChangeAccountPasswordW: ?CHANGE_PASSWORD_FN_W,
    QueryContextAttributesExW: ?QUERY_CONTEXT_ATTRIBUTES_EX_FN_W,
    QueryCredentialsAttributesExW: ?QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_W,
};

pub const SecurityFunctionTableA = extern struct {
    dwVersion: u32,
    EnumerateSecurityPackagesA: ?ENUMERATE_SECURITY_PACKAGES_FN_A,
    QueryCredentialsAttributesA: ?QUERY_CREDENTIALS_ATTRIBUTES_FN_A,
    AcquireCredentialsHandleA: ?ACQUIRE_CREDENTIALS_HANDLE_FN_A,
    FreeCredentialsHandle: ?FREE_CREDENTIALS_HANDLE_FN,
    Reserved2: ?*anyopaque,
    InitializeSecurityContextA: ?INITIALIZE_SECURITY_CONTEXT_FN_A,
    AcceptSecurityContext: ?ACCEPT_SECURITY_CONTEXT_FN,
    CompleteAuthToken: ?COMPLETE_AUTH_TOKEN_FN,
    DeleteSecurityContext: ?DELETE_SECURITY_CONTEXT_FN,
    ApplyControlToken: ?APPLY_CONTROL_TOKEN_FN,
    QueryContextAttributesA: ?QUERY_CONTEXT_ATTRIBUTES_FN_A,
    ImpersonateSecurityContext: ?IMPERSONATE_SECURITY_CONTEXT_FN,
    RevertSecurityContext: ?REVERT_SECURITY_CONTEXT_FN,
    MakeSignature: ?MAKE_SIGNATURE_FN,
    VerifySignature: ?VERIFY_SIGNATURE_FN,
    FreeContextBuffer: ?FREE_CONTEXT_BUFFER_FN,
    QuerySecurityPackageInfoA: ?QUERY_SECURITY_PACKAGE_INFO_FN_A,
    Reserved3: ?*anyopaque,
    Reserved4: ?*anyopaque,
    ExportSecurityContext: ?EXPORT_SECURITY_CONTEXT_FN,
    ImportSecurityContextA: ?IMPORT_SECURITY_CONTEXT_FN_A,
    AddCredentialsA: ?ADD_CREDENTIALS_FN_A,
    Reserved8: ?*anyopaque,
    QuerySecurityContextToken: ?QUERY_SECURITY_CONTEXT_TOKEN_FN,
    EncryptMessage: ?ENCRYPT_MESSAGE_FN,
    DecryptMessage: ?DECRYPT_MESSAGE_FN,
    SetContextAttributesA: ?SET_CONTEXT_ATTRIBUTES_FN_A,
    SetCredentialsAttributesA: ?SET_CREDENTIALS_ATTRIBUTES_FN_A,
    ChangeAccountPasswordA: ?CHANGE_PASSWORD_FN_A,
    QueryContextAttributesExA: ?QUERY_CONTEXT_ATTRIBUTES_EX_FN_A,
    QueryCredentialsAttributesExA: ?QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_A,
};

pub const INIT_SECURITY_INTERFACE_A = switch (@import("builtin").zig_backend) {
    .stage1 => fn () callconv(@import("std").os.windows.WINAPI) ?*SecurityFunctionTableA,
    else => *const fn () callconv(@import("std").os.windows.WINAPI) ?*SecurityFunctionTableA,
};

pub const INIT_SECURITY_INTERFACE_W = switch (@import("builtin").zig_backend) {
    .stage1 => fn () callconv(@import("std").os.windows.WINAPI) ?*SecurityFunctionTableW,
    else => *const fn () callconv(@import("std").os.windows.WINAPI) ?*SecurityFunctionTableW,
};

pub const SASL_AUTHZID_STATE = enum(i32) {
    Forbidden = 0,
    Processed = 1,
};
pub const Sasl_AuthZIDForbidden = SASL_AUTHZID_STATE.Forbidden;
pub const Sasl_AuthZIDProcessed = SASL_AUTHZID_STATE.Processed;

pub const SEC_WINNT_AUTH_IDENTITY_EX2 = extern struct {
    Version: u32,
    cbHeaderLength: u16,
    cbStructureLength: u32,
    UserOffset: u32,
    UserLength: u16,
    DomainOffset: u32,
    DomainLength: u16,
    PackedCredentialsOffset: u32,
    PackedCredentialsLength: u16,
    Flags: u32,
    PackageListOffset: u32,
    PackageListLength: u16,
};

pub const SEC_WINNT_AUTH_IDENTITY_EXW = extern struct {
    Version: u32,
    Length: u32,
    User: ?*u16,
    UserLength: u32,
    Domain: ?*u16,
    DomainLength: u32,
    Password: ?*u16,
    PasswordLength: u32,
    Flags: u32,
    PackageList: ?*u16,
    PackageListLength: u32,
};

pub const SEC_WINNT_AUTH_IDENTITY_EXA = extern struct {
    Version: u32,
    Length: u32,
    User: ?*u8,
    UserLength: u32,
    Domain: ?*u8,
    DomainLength: u32,
    Password: ?*u8,
    PasswordLength: u32,
    Flags: u32,
    PackageList: ?*u8,
    PackageListLength: u32,
};

pub const SEC_WINNT_AUTH_IDENTITY_INFO = extern union {
    AuthIdExw: SEC_WINNT_AUTH_IDENTITY_EXW,
    AuthIdExa: SEC_WINNT_AUTH_IDENTITY_EXA,
    AuthId_a: SEC_WINNT_AUTH_IDENTITY_A,
    AuthId_w: SEC_WINNT_AUTH_IDENTITY_W,
    AuthIdEx2: SEC_WINNT_AUTH_IDENTITY_EX2,
};

pub const SECURITY_PACKAGE_OPTIONS = extern struct {
    Size: u32,
    Type: SECURITY_PACKAGE_OPTIONS_TYPE,
    Flags: u32,
    SignatureSize: u32,
    Signature: ?*anyopaque,
};

pub const LSA_TOKEN_INFORMATION_TYPE = enum(i32) {
    Null = 0,
    V1 = 1,
    V2 = 2,
    V3 = 3,
};
pub const LsaTokenInformationNull = LSA_TOKEN_INFORMATION_TYPE.Null;
pub const LsaTokenInformationV1 = LSA_TOKEN_INFORMATION_TYPE.V1;
pub const LsaTokenInformationV2 = LSA_TOKEN_INFORMATION_TYPE.V2;
pub const LsaTokenInformationV3 = LSA_TOKEN_INFORMATION_TYPE.V3;

pub const LSA_TOKEN_INFORMATION_NULL = extern struct {
    ExpirationTime: LARGE_INTEGER,
    Groups: ?*TOKEN_GROUPS,
};

pub const LSA_TOKEN_INFORMATION_V1 = extern struct {
    ExpirationTime: LARGE_INTEGER,
    User: TOKEN_USER,
    Groups: ?*TOKEN_GROUPS,
    PrimaryGroup: TOKEN_PRIMARY_GROUP,
    Privileges: ?*TOKEN_PRIVILEGES,
    Owner: TOKEN_OWNER,
    DefaultDacl: TOKEN_DEFAULT_DACL,
};

pub const LSA_TOKEN_INFORMATION_V3 = extern struct {
    ExpirationTime: LARGE_INTEGER,
    User: TOKEN_USER,
    Groups: ?*TOKEN_GROUPS,
    PrimaryGroup: TOKEN_PRIMARY_GROUP,
    Privileges: ?*TOKEN_PRIVILEGES,
    Owner: TOKEN_OWNER,
    DefaultDacl: TOKEN_DEFAULT_DACL,
    UserClaims: TOKEN_USER_CLAIMS,
    DeviceClaims: TOKEN_DEVICE_CLAIMS,
    DeviceGroups: ?*TOKEN_GROUPS,
};

pub const PLSA_CREATE_LOGON_SESSION = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        LogonId: ?*LUID,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        LogonId: ?*LUID,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_DELETE_LOGON_SESSION = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        LogonId: ?*LUID,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        LogonId: ?*LUID,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_ADD_CREDENTIAL = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        LogonId: ?*LUID,
        AuthenticationPackage: u32,
        PrimaryKeyValue: ?*STRING,
        Credentials: ?*STRING,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        LogonId: ?*LUID,
        AuthenticationPackage: u32,
        PrimaryKeyValue: ?*STRING,
        Credentials: ?*STRING,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_GET_CREDENTIALS = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        LogonId: ?*LUID,
        AuthenticationPackage: u32,
        QueryContext: ?*u32,
        RetrieveAllCredentials: BOOLEAN,
        PrimaryKeyValue: ?*STRING,
        PrimaryKeyLength: ?*u32,
        Credentials: ?*STRING,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        LogonId: ?*LUID,
        AuthenticationPackage: u32,
        QueryContext: ?*u32,
        RetrieveAllCredentials: BOOLEAN,
        PrimaryKeyValue: ?*STRING,
        PrimaryKeyLength: ?*u32,
        Credentials: ?*STRING,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_DELETE_CREDENTIAL = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        LogonId: ?*LUID,
        AuthenticationPackage: u32,
        PrimaryKeyValue: ?*STRING,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        LogonId: ?*LUID,
        AuthenticationPackage: u32,
        PrimaryKeyValue: ?*STRING,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_ALLOCATE_LSA_HEAP = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Length: u32,
    ) callconv(@import("std").os.windows.WINAPI) ?*anyopaque,
    else => *const fn (
        Length: u32,
    ) callconv(@import("std").os.windows.WINAPI) ?*anyopaque,
};

pub const PLSA_FREE_LSA_HEAP = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Base: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) void,
    else => *const fn (
        Base: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) void,
};

pub const PLSA_ALLOCATE_PRIVATE_HEAP = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Length: usize,
    ) callconv(@import("std").os.windows.WINAPI) ?*anyopaque,
    else => *const fn (
        Length: usize,
    ) callconv(@import("std").os.windows.WINAPI) ?*anyopaque,
};

pub const PLSA_FREE_PRIVATE_HEAP = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Base: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) void,
    else => *const fn (
        Base: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) void,
};

pub const PLSA_ALLOCATE_CLIENT_BUFFER = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ClientRequest: ?*?*anyopaque,
        LengthRequired: u32,
        ClientBaseAddress: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ClientRequest: ?*?*anyopaque,
        LengthRequired: u32,
        ClientBaseAddress: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_FREE_CLIENT_BUFFER = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ClientRequest: ?*?*anyopaque,
        ClientBaseAddress: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ClientRequest: ?*?*anyopaque,
        ClientBaseAddress: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_COPY_TO_CLIENT_BUFFER = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ClientRequest: ?*?*anyopaque,
        Length: u32,
        // TODO: what to do with BytesParamIndex 1?
        ClientBaseAddress: ?*anyopaque,
        // TODO: what to do with BytesParamIndex 1?
        BufferToCopy: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ClientRequest: ?*?*anyopaque,
        Length: u32,
        // TODO: what to do with BytesParamIndex 1?
        ClientBaseAddress: ?*anyopaque,
        // TODO: what to do with BytesParamIndex 1?
        BufferToCopy: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_COPY_FROM_CLIENT_BUFFER = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ClientRequest: ?*?*anyopaque,
        Length: u32,
        // TODO: what to do with BytesParamIndex 1?
        BufferToCopy: ?*anyopaque,
        // TODO: what to do with BytesParamIndex 1?
        ClientBaseAddress: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ClientRequest: ?*?*anyopaque,
        Length: u32,
        // TODO: what to do with BytesParamIndex 1?
        BufferToCopy: ?*anyopaque,
        // TODO: what to do with BytesParamIndex 1?
        ClientBaseAddress: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const LSA_DISPATCH_TABLE = extern struct {
    CreateLogonSession: ?PLSA_CREATE_LOGON_SESSION,
    DeleteLogonSession: ?PLSA_DELETE_LOGON_SESSION,
    AddCredential: ?PLSA_ADD_CREDENTIAL,
    GetCredentials: ?PLSA_GET_CREDENTIALS,
    DeleteCredential: ?PLSA_DELETE_CREDENTIAL,
    AllocateLsaHeap: ?PLSA_ALLOCATE_LSA_HEAP,
    FreeLsaHeap: ?PLSA_FREE_LSA_HEAP,
    AllocateClientBuffer: ?PLSA_ALLOCATE_CLIENT_BUFFER,
    FreeClientBuffer: ?PLSA_FREE_CLIENT_BUFFER,
    CopyToClientBuffer: ?PLSA_COPY_TO_CLIENT_BUFFER,
    CopyFromClientBuffer: ?PLSA_COPY_FROM_CLIENT_BUFFER,
};

pub const PLSA_AP_INITIALIZE_PACKAGE = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        AuthenticationPackageId: u32,
        LsaDispatchTable: ?*LSA_DISPATCH_TABLE,
        Database: ?*STRING,
        Confidentiality: ?*STRING,
        AuthenticationPackageName: ?*?*STRING,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        AuthenticationPackageId: u32,
        LsaDispatchTable: ?*LSA_DISPATCH_TABLE,
        Database: ?*STRING,
        Confidentiality: ?*STRING,
        AuthenticationPackageName: ?*?*STRING,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_AP_LOGON_USER = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ClientRequest: ?*?*anyopaque,
        LogonType: SECURITY_LOGON_TYPE,
        // TODO: what to do with BytesParamIndex 4?
        AuthenticationInformation: ?*anyopaque,
        ClientAuthenticationBase: ?*anyopaque,
        AuthenticationInformationLength: u32,
        ProfileBuffer: ?*?*anyopaque,
        ProfileBufferLength: ?*u32,
        LogonId: ?*LUID,
        SubStatus: ?*i32,
        TokenInformationType: ?*LSA_TOKEN_INFORMATION_TYPE,
        TokenInformation: ?*?*anyopaque,
        AccountName: ?*?*UNICODE_STRING,
        AuthenticatingAuthority: ?*?*UNICODE_STRING,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ClientRequest: ?*?*anyopaque,
        LogonType: SECURITY_LOGON_TYPE,
        // TODO: what to do with BytesParamIndex 4?
        AuthenticationInformation: ?*anyopaque,
        ClientAuthenticationBase: ?*anyopaque,
        AuthenticationInformationLength: u32,
        ProfileBuffer: ?*?*anyopaque,
        ProfileBufferLength: ?*u32,
        LogonId: ?*LUID,
        SubStatus: ?*i32,
        TokenInformationType: ?*LSA_TOKEN_INFORMATION_TYPE,
        TokenInformation: ?*?*anyopaque,
        AccountName: ?*?*UNICODE_STRING,
        AuthenticatingAuthority: ?*?*UNICODE_STRING,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_AP_LOGON_USER_EX = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ClientRequest: ?*?*anyopaque,
        LogonType: SECURITY_LOGON_TYPE,
        // TODO: what to do with BytesParamIndex 4?
        AuthenticationInformation: ?*anyopaque,
        ClientAuthenticationBase: ?*anyopaque,
        AuthenticationInformationLength: u32,
        ProfileBuffer: ?*?*anyopaque,
        ProfileBufferLength: ?*u32,
        LogonId: ?*LUID,
        SubStatus: ?*i32,
        TokenInformationType: ?*LSA_TOKEN_INFORMATION_TYPE,
        TokenInformation: ?*?*anyopaque,
        AccountName: ?*?*UNICODE_STRING,
        AuthenticatingAuthority: ?*?*UNICODE_STRING,
        MachineName: ?*?*UNICODE_STRING,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ClientRequest: ?*?*anyopaque,
        LogonType: SECURITY_LOGON_TYPE,
        // TODO: what to do with BytesParamIndex 4?
        AuthenticationInformation: ?*anyopaque,
        ClientAuthenticationBase: ?*anyopaque,
        AuthenticationInformationLength: u32,
        ProfileBuffer: ?*?*anyopaque,
        ProfileBufferLength: ?*u32,
        LogonId: ?*LUID,
        SubStatus: ?*i32,
        TokenInformationType: ?*LSA_TOKEN_INFORMATION_TYPE,
        TokenInformation: ?*?*anyopaque,
        AccountName: ?*?*UNICODE_STRING,
        AuthenticatingAuthority: ?*?*UNICODE_STRING,
        MachineName: ?*?*UNICODE_STRING,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_AP_CALL_PACKAGE = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ClientRequest: ?*?*anyopaque,
        // TODO: what to do with BytesParamIndex 3?
        ProtocolSubmitBuffer: ?*anyopaque,
        ClientBufferBase: ?*anyopaque,
        SubmitBufferLength: u32,
        ProtocolReturnBuffer: ?*?*anyopaque,
        ReturnBufferLength: ?*u32,
        ProtocolStatus: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ClientRequest: ?*?*anyopaque,
        // TODO: what to do with BytesParamIndex 3?
        ProtocolSubmitBuffer: ?*anyopaque,
        ClientBufferBase: ?*anyopaque,
        SubmitBufferLength: u32,
        ProtocolReturnBuffer: ?*?*anyopaque,
        ReturnBufferLength: ?*u32,
        ProtocolStatus: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_AP_CALL_PACKAGE_PASSTHROUGH = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ClientRequest: ?*?*anyopaque,
        // TODO: what to do with BytesParamIndex 3?
        ProtocolSubmitBuffer: ?*anyopaque,
        ClientBufferBase: ?*anyopaque,
        SubmitBufferLength: u32,
        ProtocolReturnBuffer: ?*?*anyopaque,
        ReturnBufferLength: ?*u32,
        ProtocolStatus: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ClientRequest: ?*?*anyopaque,
        // TODO: what to do with BytesParamIndex 3?
        ProtocolSubmitBuffer: ?*anyopaque,
        ClientBufferBase: ?*anyopaque,
        SubmitBufferLength: u32,
        ProtocolReturnBuffer: ?*?*anyopaque,
        ReturnBufferLength: ?*u32,
        ProtocolStatus: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_AP_LOGON_TERMINATED = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        LogonId: ?*LUID,
    ) callconv(@import("std").os.windows.WINAPI) void,
    else => *const fn (
        LogonId: ?*LUID,
    ) callconv(@import("std").os.windows.WINAPI) void,
};

pub const PSAM_CREDENTIAL_UPDATE_NOTIFY_ROUTINE = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ClearPassword: ?*UNICODE_STRING,
        // TODO: what to do with BytesParamIndex 2?
        OldCredentials: ?*anyopaque,
        OldCredentialSize: u32,
        UserAccountControl: u32,
        UPN: ?*UNICODE_STRING,
        UserName: ?*UNICODE_STRING,
        NetbiosDomainName: ?*UNICODE_STRING,
        DnsDomainName: ?*UNICODE_STRING,
        NewCredentials: ?*?*anyopaque,
        NewCredentialSize: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ClearPassword: ?*UNICODE_STRING,
        // TODO: what to do with BytesParamIndex 2?
        OldCredentials: ?*anyopaque,
        OldCredentialSize: u32,
        UserAccountControl: u32,
        UPN: ?*UNICODE_STRING,
        UserName: ?*UNICODE_STRING,
        NetbiosDomainName: ?*UNICODE_STRING,
        DnsDomainName: ?*UNICODE_STRING,
        NewCredentials: ?*?*anyopaque,
        NewCredentialSize: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PSAM_CREDENTIAL_UPDATE_REGISTER_ROUTINE = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        CredentialName: ?*UNICODE_STRING,
    ) callconv(@import("std").os.windows.WINAPI) BOOLEAN,
    else => *const fn (
        CredentialName: ?*UNICODE_STRING,
    ) callconv(@import("std").os.windows.WINAPI) BOOLEAN,
};

pub const PSAM_CREDENTIAL_UPDATE_FREE_ROUTINE = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        p: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) void,
    else => *const fn (
        p: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) void,
};

pub const SAM_REGISTER_MAPPING_ELEMENT = extern struct {
    Original: ?PSTR,
    Mapped: ?PSTR,
    Continuable: BOOLEAN,
};

pub const SAM_REGISTER_MAPPING_LIST = extern struct {
    Count: u32,
    Elements: ?*SAM_REGISTER_MAPPING_ELEMENT,
};

pub const SAM_REGISTER_MAPPING_TABLE = extern struct {
    Count: u32,
    Lists: ?*SAM_REGISTER_MAPPING_LIST,
};

pub const PSAM_CREDENTIAL_UPDATE_REGISTER_MAPPED_ENTRYPOINTS_ROUTINE = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Table: ?*SAM_REGISTER_MAPPING_TABLE,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        Table: ?*SAM_REGISTER_MAPPING_TABLE,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SECPKG_CLIENT_INFO = extern struct {
    LogonId: LUID,
    ProcessID: u32,
    ThreadID: u32,
    HasTcbPrivilege: BOOLEAN,
    Impersonating: BOOLEAN,
    Restricted: BOOLEAN,
    ClientFlags: u8,
    ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL,
    ClientToken: ?HANDLE,
};

pub const SECPKG_CALL_INFO = extern struct {
    ProcessId: u32,
    ThreadId: u32,
    Attributes: u32,
    CallCount: u32,
    MechOid: ?*anyopaque,
};

pub const SECPKG_SUPPLEMENTAL_CRED = extern struct {
    PackageName: UNICODE_STRING,
    CredentialSize: u32,
    Credentials: ?*u8,
};

pub const SECPKG_BYTE_VECTOR = extern struct {
    ByteArrayOffset: u32,
    ByteArrayLength: u16,
};

pub const SECPKG_SHORT_VECTOR = extern struct {
    ShortArrayOffset: u32,
    ShortArrayCount: u16,
};

pub const SECPKG_SUPPLIED_CREDENTIAL = extern struct {
    cbHeaderLength: u16,
    cbStructureLength: u16,
    UserName: SECPKG_SHORT_VECTOR,
    DomainName: SECPKG_SHORT_VECTOR,
    PackedCredentials: SECPKG_BYTE_VECTOR,
    CredFlags: u32,
};

pub const SECPKG_CREDENTIAL = extern struct {
    Version: u64,
    cbHeaderLength: u16,
    cbStructureLength: u32,
    ClientProcess: u32,
    ClientThread: u32,
    LogonId: LUID,
    ClientToken: ?HANDLE,
    SessionId: u32,
    ModifiedId: LUID,
    fCredentials: u32,
    Flags: u32,
    PrincipalName: SECPKG_BYTE_VECTOR,
    PackageList: SECPKG_BYTE_VECTOR,
    MarshaledSuppliedCreds: SECPKG_BYTE_VECTOR,
};

pub const SECPKG_SUPPLEMENTAL_CRED_ARRAY = extern struct {
    CredentialCount: u32,
    Credentials: [1]SECPKG_SUPPLEMENTAL_CRED,
};

pub const SECPKG_SURROGATE_LOGON_ENTRY = extern struct {
    Type: Guid,
    Data: ?*anyopaque,
};

pub const SECPKG_SURROGATE_LOGON = extern struct {
    Version: u32,
    SurrogateLogonID: LUID,
    EntryCount: u32,
    Entries: ?*SECPKG_SURROGATE_LOGON_ENTRY,
};

pub const PLSA_CALLBACK_FUNCTION = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Argument1: usize,
        Argument2: usize,
        InputBuffer: ?*SecBuffer,
        OutputBuffer: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        Argument1: usize,
        Argument2: usize,
        InputBuffer: ?*SecBuffer,
        OutputBuffer: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SECPKG_PRIMARY_CRED = extern struct {
    LogonId: LUID,
    DownlevelName: UNICODE_STRING,
    DomainName: UNICODE_STRING,
    Password: UNICODE_STRING,
    OldPassword: UNICODE_STRING,
    UserSid: ?PSID,
    Flags: u32,
    DnsDomainName: UNICODE_STRING,
    Upn: UNICODE_STRING,
    LogonServer: UNICODE_STRING,
    Spare1: UNICODE_STRING,
    Spare2: UNICODE_STRING,
    Spare3: UNICODE_STRING,
    Spare4: UNICODE_STRING,
};

pub const SECPKG_PRIMARY_CRED_EX = extern struct {
    LogonId: LUID,
    DownlevelName: UNICODE_STRING,
    DomainName: UNICODE_STRING,
    Password: UNICODE_STRING,
    OldPassword: UNICODE_STRING,
    UserSid: ?PSID,
    Flags: u32,
    DnsDomainName: UNICODE_STRING,
    Upn: UNICODE_STRING,
    LogonServer: UNICODE_STRING,
    Spare1: UNICODE_STRING,
    Spare2: UNICODE_STRING,
    Spare3: UNICODE_STRING,
    Spare4: UNICODE_STRING,
    PackageId: usize,
    PrevLogonId: LUID,
    FlagsEx: u32,
};

pub const SECPKG_PARAMETERS = extern struct {
    Version: u32,
    MachineState: u32,
    SetupMode: u32,
    DomainSid: ?PSID,
    DomainName: UNICODE_STRING,
    DnsDomainName: UNICODE_STRING,
    DomainGuid: Guid,
};

pub const SECPKG_EXTENDED_INFORMATION_CLASS = enum(i32) {
    GssInfo = 1,
    ContextThunks = 2,
    MutualAuthLevel = 3,
    WowClientDll = 4,
    ExtraOids = 5,
    MaxInfo = 6,
    Nego2Info = 7,
};
pub const SecpkgGssInfo = SECPKG_EXTENDED_INFORMATION_CLASS.GssInfo;
pub const SecpkgContextThunks = SECPKG_EXTENDED_INFORMATION_CLASS.ContextThunks;
pub const SecpkgMutualAuthLevel = SECPKG_EXTENDED_INFORMATION_CLASS.MutualAuthLevel;
pub const SecpkgWowClientDll = SECPKG_EXTENDED_INFORMATION_CLASS.WowClientDll;
pub const SecpkgExtraOids = SECPKG_EXTENDED_INFORMATION_CLASS.ExtraOids;
pub const SecpkgMaxInfo = SECPKG_EXTENDED_INFORMATION_CLASS.MaxInfo;
pub const SecpkgNego2Info = SECPKG_EXTENDED_INFORMATION_CLASS.Nego2Info;

pub const SECPKG_GSS_INFO = extern struct {
    EncodedIdLength: u32,
    EncodedId: [4]u8,
};

pub const SECPKG_CONTEXT_THUNKS = extern struct {
    InfoLevelCount: u32,
    Levels: [1]u32,
};

pub const SECPKG_MUTUAL_AUTH_LEVEL = extern struct {
    MutualAuthLevel: u32,
};

pub const SECPKG_WOW_CLIENT_DLL = extern struct {
    WowClientDllPath: UNICODE_STRING,
};

pub const SECPKG_SERIALIZED_OID = extern struct {
    OidLength: u32,
    OidAttributes: u32,
    OidValue: [32]u8,
};

pub const SECPKG_EXTRA_OIDS = extern struct {
    OidCount: u32,
    Oids: [1]SECPKG_SERIALIZED_OID,
};

pub const SECPKG_NEGO2_INFO = extern struct {
    AuthScheme: [16]u8,
    PackageFlags: u32,
};

pub const SECPKG_EXTENDED_INFORMATION = extern struct {
    Class: SECPKG_EXTENDED_INFORMATION_CLASS,
    Info: extern union {
        GssInfo: SECPKG_GSS_INFO,
        ContextThunks: SECPKG_CONTEXT_THUNKS,
        MutualAuthLevel: SECPKG_MUTUAL_AUTH_LEVEL,
        WowClientDll: SECPKG_WOW_CLIENT_DLL,
        ExtraOids: SECPKG_EXTRA_OIDS,
        Nego2Info: SECPKG_NEGO2_INFO,
    },
};

pub const SECPKG_TARGETINFO = extern struct {
    DomainSid: ?PSID,
    ComputerName: ?[*:0]const u16,
};

pub const SecPkgContext_SaslContext = extern struct {
    SaslContext: ?*anyopaque,
};

pub const SECURITY_USER_DATA = extern struct {
    UserName: UNICODE_STRING,
    LogonDomainName: UNICODE_STRING,
    LogonServer: UNICODE_STRING,
    pSid: ?PSID,
};

pub const SECPKG_CALL_PACKAGE_MESSAGE_TYPE = enum(i32) {
    MinMessage = 1024,
    // PinDcMessage = 1024, this enum value conflicts with MinMessage
    UnpinAllDcsMessage = 1025,
    TransferCredMessage = 1026,
    // MaxMessage = 1026, this enum value conflicts with TransferCredMessage
};
pub const SecPkgCallPackageMinMessage = SECPKG_CALL_PACKAGE_MESSAGE_TYPE.MinMessage;
pub const SecPkgCallPackagePinDcMessage = SECPKG_CALL_PACKAGE_MESSAGE_TYPE.MinMessage;
pub const SecPkgCallPackageUnpinAllDcsMessage = SECPKG_CALL_PACKAGE_MESSAGE_TYPE.UnpinAllDcsMessage;
pub const SecPkgCallPackageTransferCredMessage = SECPKG_CALL_PACKAGE_MESSAGE_TYPE.TransferCredMessage;
pub const SecPkgCallPackageMaxMessage = SECPKG_CALL_PACKAGE_MESSAGE_TYPE.TransferCredMessage;

pub const SECPKG_CALL_PACKAGE_PIN_DC_REQUEST = extern struct {
    MessageType: u32,
    Flags: u32,
    DomainName: UNICODE_STRING,
    DcName: UNICODE_STRING,
    DcFlags: u32,
};

pub const SECPKG_CALL_PACKAGE_UNPIN_ALL_DCS_REQUEST = extern struct {
    MessageType: u32,
    Flags: u32,
};

pub const SECPKG_CALL_PACKAGE_TRANSFER_CRED_REQUEST = extern struct {
    MessageType: u32,
    OriginLogonId: LUID,
    DestinationLogonId: LUID,
    Flags: u32,
};

pub const PLSA_REDIRECTED_LOGON_INIT = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        RedirectedLogonHandle: ?HANDLE,
        PackageName: ?*const UNICODE_STRING,
        SessionId: u32,
        LogonId: ?*const LUID,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        RedirectedLogonHandle: ?HANDLE,
        PackageName: ?*const UNICODE_STRING,
        SessionId: u32,
        LogonId: ?*const LUID,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_REDIRECTED_LOGON_CALLBACK = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        RedirectedLogonHandle: ?HANDLE,
        Buffer: ?*anyopaque,
        BufferLength: u32,
        ReturnBuffer: ?*?*anyopaque,
        ReturnBufferLength: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        RedirectedLogonHandle: ?HANDLE,
        Buffer: ?*anyopaque,
        BufferLength: u32,
        ReturnBuffer: ?*?*anyopaque,
        ReturnBufferLength: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_REDIRECTED_LOGON_CLEANUP_CALLBACK = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        RedirectedLogonHandle: ?HANDLE,
    ) callconv(@import("std").os.windows.WINAPI) void,
    else => *const fn (
        RedirectedLogonHandle: ?HANDLE,
    ) callconv(@import("std").os.windows.WINAPI) void,
};

pub const PLSA_REDIRECTED_LOGON_GET_LOGON_CREDS = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        RedirectedLogonHandle: ?HANDLE,
        LogonBuffer: ?*?*u8,
        LogonBufferLength: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        RedirectedLogonHandle: ?HANDLE,
        LogonBuffer: ?*?*u8,
        LogonBufferLength: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_REDIRECTED_LOGON_GET_SUPP_CREDS = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        RedirectedLogonHandle: ?HANDLE,
        SupplementalCredentials: ?*?*SECPKG_SUPPLEMENTAL_CRED_ARRAY,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        RedirectedLogonHandle: ?HANDLE,
        SupplementalCredentials: ?*?*SECPKG_SUPPLEMENTAL_CRED_ARRAY,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SECPKG_REDIRECTED_LOGON_BUFFER = extern struct {
    RedirectedLogonGuid: Guid,
    RedirectedLogonHandle: ?HANDLE,
    Init: ?PLSA_REDIRECTED_LOGON_INIT,
    Callback: ?PLSA_REDIRECTED_LOGON_CALLBACK,
    CleanupCallback: ?PLSA_REDIRECTED_LOGON_CLEANUP_CALLBACK,
    GetLogonCreds: ?PLSA_REDIRECTED_LOGON_GET_LOGON_CREDS,
    GetSupplementalCreds: ?PLSA_REDIRECTED_LOGON_GET_SUPP_CREDS,
};

pub const SECPKG_POST_LOGON_USER_INFO = extern struct {
    Flags: u32,
    LogonId: LUID,
    LinkedLogonId: LUID,
};

pub const PLSA_IMPERSONATE_CLIENT = switch (@import("builtin").zig_backend) {
    .stage1 => fn () callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn () callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_UNLOAD_PACKAGE = switch (@import("builtin").zig_backend) {
    .stage1 => fn () callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn () callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_DUPLICATE_HANDLE = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        SourceHandle: ?HANDLE,
        DestionationHandle: ?*?HANDLE,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        SourceHandle: ?HANDLE,
        DestionationHandle: ?*?HANDLE,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_SAVE_SUPPLEMENTAL_CREDENTIALS = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        LogonId: ?*LUID,
        SupplementalCredSize: u32,
        // TODO: what to do with BytesParamIndex 1?
        SupplementalCreds: ?*anyopaque,
        Synchronous: BOOLEAN,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        LogonId: ?*LUID,
        SupplementalCredSize: u32,
        // TODO: what to do with BytesParamIndex 1?
        SupplementalCreds: ?*anyopaque,
        Synchronous: BOOLEAN,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_CREATE_THREAD = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        SecurityAttributes: ?*SECURITY_ATTRIBUTES,
        StackSize: u32,
        StartFunction: ?LPTHREAD_START_ROUTINE,
        ThreadParameter: ?*anyopaque,
        CreationFlags: u32,
        ThreadId: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) ?HANDLE,
    else => *const fn (
        SecurityAttributes: ?*SECURITY_ATTRIBUTES,
        StackSize: u32,
        StartFunction: ?LPTHREAD_START_ROUTINE,
        ThreadParameter: ?*anyopaque,
        CreationFlags: u32,
        ThreadId: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) ?HANDLE,
};

pub const PLSA_GET_CLIENT_INFO = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ClientInfo: ?*SECPKG_CLIENT_INFO,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ClientInfo: ?*SECPKG_CLIENT_INFO,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_REGISTER_NOTIFICATION = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        StartFunction: ?LPTHREAD_START_ROUTINE,
        Parameter: ?*anyopaque,
        NotificationType: u32,
        NotificationClass: u32,
        NotificationFlags: u32,
        IntervalMinutes: u32,
        WaitEvent: ?HANDLE,
    ) callconv(@import("std").os.windows.WINAPI) ?HANDLE,
    else => *const fn (
        StartFunction: ?LPTHREAD_START_ROUTINE,
        Parameter: ?*anyopaque,
        NotificationType: u32,
        NotificationClass: u32,
        NotificationFlags: u32,
        IntervalMinutes: u32,
        WaitEvent: ?HANDLE,
    ) callconv(@import("std").os.windows.WINAPI) ?HANDLE,
};

pub const PLSA_CANCEL_NOTIFICATION = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        NotifyHandle: ?HANDLE,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        NotifyHandle: ?HANDLE,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_MAP_BUFFER = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        InputBuffer: ?*SecBuffer,
        OutputBuffer: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        InputBuffer: ?*SecBuffer,
        OutputBuffer: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_CREATE_TOKEN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        LogonId: ?*LUID,
        TokenSource: ?*TOKEN_SOURCE,
        LogonType: SECURITY_LOGON_TYPE,
        ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL,
        TokenInformationType: LSA_TOKEN_INFORMATION_TYPE,
        TokenInformation: ?*anyopaque,
        TokenGroups: ?*TOKEN_GROUPS,
        AccountName: ?*UNICODE_STRING,
        AuthorityName: ?*UNICODE_STRING,
        Workstation: ?*UNICODE_STRING,
        ProfilePath: ?*UNICODE_STRING,
        Token: ?*?HANDLE,
        SubStatus: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        LogonId: ?*LUID,
        TokenSource: ?*TOKEN_SOURCE,
        LogonType: SECURITY_LOGON_TYPE,
        ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL,
        TokenInformationType: LSA_TOKEN_INFORMATION_TYPE,
        TokenInformation: ?*anyopaque,
        TokenGroups: ?*TOKEN_GROUPS,
        AccountName: ?*UNICODE_STRING,
        AuthorityName: ?*UNICODE_STRING,
        Workstation: ?*UNICODE_STRING,
        ProfilePath: ?*UNICODE_STRING,
        Token: ?*?HANDLE,
        SubStatus: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SECPKG_SESSIONINFO_TYPE = enum(i32) {
    d = 0,
};
pub const SecSessionPrimaryCred = SECPKG_SESSIONINFO_TYPE.d;

pub const PLSA_CREATE_TOKEN_EX = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        LogonId: ?*LUID,
        TokenSource: ?*TOKEN_SOURCE,
        LogonType: SECURITY_LOGON_TYPE,
        ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL,
        TokenInformationType: LSA_TOKEN_INFORMATION_TYPE,
        TokenInformation: ?*anyopaque,
        TokenGroups: ?*TOKEN_GROUPS,
        Workstation: ?*UNICODE_STRING,
        ProfilePath: ?*UNICODE_STRING,
        SessionInformation: ?*anyopaque,
        SessionInformationType: SECPKG_SESSIONINFO_TYPE,
        Token: ?*?HANDLE,
        SubStatus: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        LogonId: ?*LUID,
        TokenSource: ?*TOKEN_SOURCE,
        LogonType: SECURITY_LOGON_TYPE,
        ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL,
        TokenInformationType: LSA_TOKEN_INFORMATION_TYPE,
        TokenInformation: ?*anyopaque,
        TokenGroups: ?*TOKEN_GROUPS,
        Workstation: ?*UNICODE_STRING,
        ProfilePath: ?*UNICODE_STRING,
        SessionInformation: ?*anyopaque,
        SessionInformationType: SECPKG_SESSIONINFO_TYPE,
        Token: ?*?HANDLE,
        SubStatus: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_AUDIT_LOGON = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Status: NTSTATUS,
        SubStatus: NTSTATUS,
        AccountName: ?*UNICODE_STRING,
        AuthenticatingAuthority: ?*UNICODE_STRING,
        WorkstationName: ?*UNICODE_STRING,
        UserSid: ?PSID,
        LogonType: SECURITY_LOGON_TYPE,
        TokenSource: ?*TOKEN_SOURCE,
        LogonId: ?*LUID,
    ) callconv(@import("std").os.windows.WINAPI) void,
    else => *const fn (
        Status: NTSTATUS,
        SubStatus: NTSTATUS,
        AccountName: ?*UNICODE_STRING,
        AuthenticatingAuthority: ?*UNICODE_STRING,
        WorkstationName: ?*UNICODE_STRING,
        UserSid: ?PSID,
        LogonType: SECURITY_LOGON_TYPE,
        TokenSource: ?*TOKEN_SOURCE,
        LogonId: ?*LUID,
    ) callconv(@import("std").os.windows.WINAPI) void,
};

pub const PLSA_CALL_PACKAGE = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        AuthenticationPackage: ?*UNICODE_STRING,
        // TODO: what to do with BytesParamIndex 2?
        ProtocolSubmitBuffer: ?*anyopaque,
        SubmitBufferLength: u32,
        ProtocolReturnBuffer: ?*?*anyopaque,
        ReturnBufferLength: ?*u32,
        ProtocolStatus: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        AuthenticationPackage: ?*UNICODE_STRING,
        // TODO: what to do with BytesParamIndex 2?
        ProtocolSubmitBuffer: ?*anyopaque,
        SubmitBufferLength: u32,
        ProtocolReturnBuffer: ?*?*anyopaque,
        ReturnBufferLength: ?*u32,
        ProtocolStatus: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_CALL_PACKAGEEX = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        AuthenticationPackage: ?*UNICODE_STRING,
        ClientBufferBase: ?*anyopaque,
        // TODO: what to do with BytesParamIndex 3?
        ProtocolSubmitBuffer: ?*anyopaque,
        SubmitBufferLength: u32,
        ProtocolReturnBuffer: ?*?*anyopaque,
        ReturnBufferLength: ?*u32,
        ProtocolStatus: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        AuthenticationPackage: ?*UNICODE_STRING,
        ClientBufferBase: ?*anyopaque,
        // TODO: what to do with BytesParamIndex 3?
        ProtocolSubmitBuffer: ?*anyopaque,
        SubmitBufferLength: u32,
        ProtocolReturnBuffer: ?*?*anyopaque,
        ReturnBufferLength: ?*u32,
        ProtocolStatus: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_CALL_PACKAGE_PASSTHROUGH = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        AuthenticationPackage: ?*UNICODE_STRING,
        ClientBufferBase: ?*anyopaque,
        // TODO: what to do with BytesParamIndex 3?
        ProtocolSubmitBuffer: ?*anyopaque,
        SubmitBufferLength: u32,
        ProtocolReturnBuffer: ?*?*anyopaque,
        ReturnBufferLength: ?*u32,
        ProtocolStatus: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        AuthenticationPackage: ?*UNICODE_STRING,
        ClientBufferBase: ?*anyopaque,
        // TODO: what to do with BytesParamIndex 3?
        ProtocolSubmitBuffer: ?*anyopaque,
        SubmitBufferLength: u32,
        ProtocolReturnBuffer: ?*?*anyopaque,
        ReturnBufferLength: ?*u32,
        ProtocolStatus: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_GET_CALL_INFO = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Info: ?*SECPKG_CALL_INFO,
    ) callconv(@import("std").os.windows.WINAPI) BOOLEAN,
    else => *const fn (
        Info: ?*SECPKG_CALL_INFO,
    ) callconv(@import("std").os.windows.WINAPI) BOOLEAN,
};

pub const PLSA_CREATE_SHARED_MEMORY = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        MaxSize: u32,
        InitialSize: u32,
    ) callconv(@import("std").os.windows.WINAPI) ?*anyopaque,
    else => *const fn (
        MaxSize: u32,
        InitialSize: u32,
    ) callconv(@import("std").os.windows.WINAPI) ?*anyopaque,
};

pub const PLSA_ALLOCATE_SHARED_MEMORY = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        SharedMem: ?*anyopaque,
        Size: u32,
    ) callconv(@import("std").os.windows.WINAPI) ?*anyopaque,
    else => *const fn (
        SharedMem: ?*anyopaque,
        Size: u32,
    ) callconv(@import("std").os.windows.WINAPI) ?*anyopaque,
};

pub const PLSA_FREE_SHARED_MEMORY = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        SharedMem: ?*anyopaque,
        Memory: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) void,
    else => *const fn (
        SharedMem: ?*anyopaque,
        Memory: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) void,
};

pub const PLSA_DELETE_SHARED_MEMORY = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        SharedMem: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) BOOLEAN,
    else => *const fn (
        SharedMem: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) BOOLEAN,
};

pub const PLSA_GET_APP_MODE_INFO = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        UserFunction: ?*u32,
        Argument1: ?*usize,
        Argument2: ?*usize,
        UserData: ?*SecBuffer,
        ReturnToLsa: ?*BOOLEAN,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        UserFunction: ?*u32,
        Argument1: ?*usize,
        Argument2: ?*usize,
        UserData: ?*SecBuffer,
        ReturnToLsa: ?*BOOLEAN,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_SET_APP_MODE_INFO = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        UserFunction: u32,
        Argument1: usize,
        Argument2: usize,
        UserData: ?*SecBuffer,
        ReturnToLsa: BOOLEAN,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        UserFunction: u32,
        Argument1: usize,
        Argument2: usize,
        UserData: ?*SecBuffer,
        ReturnToLsa: BOOLEAN,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SECPKG_NAME_TYPE = enum(i32) {
    SamCompatible = 0,
    AlternateId = 1,
    Flat = 2,
    DN = 3,
    SPN = 4,
};
pub const SecNameSamCompatible = SECPKG_NAME_TYPE.SamCompatible;
pub const SecNameAlternateId = SECPKG_NAME_TYPE.AlternateId;
pub const SecNameFlat = SECPKG_NAME_TYPE.Flat;
pub const SecNameDN = SECPKG_NAME_TYPE.DN;
pub const SecNameSPN = SECPKG_NAME_TYPE.SPN;

pub const PLSA_OPEN_SAM_USER = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Name: ?*UNICODE_STRING,
        NameType: SECPKG_NAME_TYPE,
        Prefix: ?*UNICODE_STRING,
        AllowGuest: BOOLEAN,
        Reserved: u32,
        UserHandle: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        Name: ?*UNICODE_STRING,
        NameType: SECPKG_NAME_TYPE,
        Prefix: ?*UNICODE_STRING,
        AllowGuest: BOOLEAN,
        Reserved: u32,
        UserHandle: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_GET_USER_CREDENTIALS = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        UserHandle: ?*anyopaque,
        PrimaryCreds: ?*?*anyopaque,
        PrimaryCredsSize: ?*u32,
        SupplementalCreds: ?*?*anyopaque,
        SupplementalCredsSize: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        UserHandle: ?*anyopaque,
        PrimaryCreds: ?*?*anyopaque,
        PrimaryCredsSize: ?*u32,
        SupplementalCreds: ?*?*anyopaque,
        SupplementalCredsSize: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_GET_USER_AUTH_DATA = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        UserHandle: ?*anyopaque,
        UserAuthData: ?*?*u8,
        UserAuthDataSize: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        UserHandle: ?*anyopaque,
        UserAuthData: ?*?*u8,
        UserAuthDataSize: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_CLOSE_SAM_USER = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        UserHandle: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        UserHandle: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_GET_AUTH_DATA_FOR_USER = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Name: ?*UNICODE_STRING,
        NameType: SECPKG_NAME_TYPE,
        Prefix: ?*UNICODE_STRING,
        UserAuthData: ?*?*u8,
        UserAuthDataSize: ?*u32,
        UserFlatName: ?*UNICODE_STRING,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        Name: ?*UNICODE_STRING,
        NameType: SECPKG_NAME_TYPE,
        Prefix: ?*UNICODE_STRING,
        UserAuthData: ?*?*u8,
        UserAuthDataSize: ?*u32,
        UserFlatName: ?*UNICODE_STRING,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_CONVERT_AUTH_DATA_TO_TOKEN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        UserAuthData: ?*anyopaque,
        UserAuthDataSize: u32,
        ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL,
        TokenSource: ?*TOKEN_SOURCE,
        LogonType: SECURITY_LOGON_TYPE,
        AuthorityName: ?*UNICODE_STRING,
        Token: ?*?HANDLE,
        LogonId: ?*LUID,
        AccountName: ?*UNICODE_STRING,
        SubStatus: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        UserAuthData: ?*anyopaque,
        UserAuthDataSize: u32,
        ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL,
        TokenSource: ?*TOKEN_SOURCE,
        LogonType: SECURITY_LOGON_TYPE,
        AuthorityName: ?*UNICODE_STRING,
        Token: ?*?HANDLE,
        LogonId: ?*LUID,
        AccountName: ?*UNICODE_STRING,
        SubStatus: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_CRACK_SINGLE_NAME = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        FormatOffered: u32,
        PerformAtGC: BOOLEAN,
        NameInput: ?*UNICODE_STRING,
        Prefix: ?*UNICODE_STRING,
        RequestedFormat: u32,
        CrackedName: ?*UNICODE_STRING,
        DnsDomainName: ?*UNICODE_STRING,
        SubStatus: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        FormatOffered: u32,
        PerformAtGC: BOOLEAN,
        NameInput: ?*UNICODE_STRING,
        Prefix: ?*UNICODE_STRING,
        RequestedFormat: u32,
        CrackedName: ?*UNICODE_STRING,
        DnsDomainName: ?*UNICODE_STRING,
        SubStatus: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_AUDIT_ACCOUNT_LOGON = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        AuditId: u32,
        Success: BOOLEAN,
        Source: ?*UNICODE_STRING,
        ClientName: ?*UNICODE_STRING,
        MappedName: ?*UNICODE_STRING,
        Status: NTSTATUS,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        AuditId: u32,
        Success: BOOLEAN,
        Source: ?*UNICODE_STRING,
        ClientName: ?*UNICODE_STRING,
        MappedName: ?*UNICODE_STRING,
        Status: NTSTATUS,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_CLIENT_CALLBACK = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Callback: ?[*]u8,
        Argument1: usize,
        Argument2: usize,
        Input: ?*SecBuffer,
        Output: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        Callback: ?[*]u8,
        Argument1: usize,
        Argument2: usize,
        Input: ?*SecBuffer,
        Output: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_REGISTER_CALLBACK = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        CallbackId: u32,
        Callback: ?PLSA_CALLBACK_FUNCTION,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        CallbackId: u32,
        Callback: ?PLSA_CALLBACK_FUNCTION,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_GET_EXTENDED_CALL_FLAGS = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Flags: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        Flags: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SECPKG_EVENT_PACKAGE_CHANGE = extern struct {
    ChangeType: SECPKG_PACKAGE_CHANGE_TYPE,
    PackageId: usize,
    PackageName: UNICODE_STRING,
};

pub const SECPKG_EVENT_ROLE_CHANGE = extern struct {
    PreviousRole: u32,
    NewRole: u32,
};

pub const SECPKG_EVENT_NOTIFY = extern struct {
    EventClass: u32,
    Reserved: u32,
    EventDataSize: u32,
    EventData: ?*anyopaque,
    PackageParameter: ?*anyopaque,
};

pub const PLSA_UPDATE_PRIMARY_CREDENTIALS = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        PrimaryCredentials: ?*SECPKG_PRIMARY_CRED,
        Credentials: ?*SECPKG_SUPPLEMENTAL_CRED_ARRAY,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        PrimaryCredentials: ?*SECPKG_PRIMARY_CRED,
        Credentials: ?*SECPKG_SUPPLEMENTAL_CRED_ARRAY,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_PROTECT_MEMORY = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        // TODO: what to do with BytesParamIndex 1?
        Buffer: ?*anyopaque,
        BufferSize: u32,
    ) callconv(@import("std").os.windows.WINAPI) void,
    else => *const fn (
        // TODO: what to do with BytesParamIndex 1?
        Buffer: ?*anyopaque,
        BufferSize: u32,
    ) callconv(@import("std").os.windows.WINAPI) void,
};

pub const PLSA_OPEN_TOKEN_BY_LOGON_ID = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        LogonId: ?*LUID,
        RetTokenHandle: ?*?HANDLE,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        LogonId: ?*LUID,
        RetTokenHandle: ?*?HANDLE,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_EXPAND_AUTH_DATA_FOR_DOMAIN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        // TODO: what to do with BytesParamIndex 1?
        UserAuthData: ?*u8,
        UserAuthDataSize: u32,
        Reserved: ?*anyopaque,
        ExpandedAuthData: ?*?*u8,
        ExpandedAuthDataSize: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        // TODO: what to do with BytesParamIndex 1?
        UserAuthData: ?*u8,
        UserAuthDataSize: u32,
        Reserved: ?*anyopaque,
        ExpandedAuthData: ?*?*u8,
        ExpandedAuthDataSize: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const CRED_FETCH = enum(i32) {
    Default = 0,
    DPAPI = 1,
    Forced = 2,
};
pub const CredFetchDefault = CRED_FETCH.Default;
pub const CredFetchDPAPI = CRED_FETCH.DPAPI;
pub const CredFetchForced = CRED_FETCH.Forced;

pub const PLSA_GET_SERVICE_ACCOUNT_PASSWORD = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        AccountName: ?*UNICODE_STRING,
        DomainName: ?*UNICODE_STRING,
        CredFetch: CRED_FETCH,
        FileTimeExpiry: ?*FILETIME,
        CurrentPassword: ?*UNICODE_STRING,
        PreviousPassword: ?*UNICODE_STRING,
        FileTimeCurrPwdValidForOutbound: ?*FILETIME,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        AccountName: ?*UNICODE_STRING,
        DomainName: ?*UNICODE_STRING,
        CredFetch: CRED_FETCH,
        FileTimeExpiry: ?*FILETIME,
        CurrentPassword: ?*UNICODE_STRING,
        PreviousPassword: ?*UNICODE_STRING,
        FileTimeCurrPwdValidForOutbound: ?*FILETIME,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_AUDIT_LOGON_EX = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Status: NTSTATUS,
        SubStatus: NTSTATUS,
        AccountName: ?*UNICODE_STRING,
        AuthenticatingAuthority: ?*UNICODE_STRING,
        WorkstationName: ?*UNICODE_STRING,
        UserSid: ?PSID,
        LogonType: SECURITY_LOGON_TYPE,
        ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL,
        TokenSource: ?*TOKEN_SOURCE,
        LogonId: ?*LUID,
    ) callconv(@import("std").os.windows.WINAPI) void,
    else => *const fn (
        Status: NTSTATUS,
        SubStatus: NTSTATUS,
        AccountName: ?*UNICODE_STRING,
        AuthenticatingAuthority: ?*UNICODE_STRING,
        WorkstationName: ?*UNICODE_STRING,
        UserSid: ?PSID,
        LogonType: SECURITY_LOGON_TYPE,
        ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL,
        TokenSource: ?*TOKEN_SOURCE,
        LogonId: ?*LUID,
    ) callconv(@import("std").os.windows.WINAPI) void,
};

pub const PLSA_CHECK_PROTECTED_USER_BY_TOKEN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        UserToken: ?HANDLE,
        ProtectedUser: ?*BOOLEAN,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        UserToken: ?HANDLE,
        ProtectedUser: ?*BOOLEAN,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_QUERY_CLIENT_REQUEST = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ClientRequest: ?*?*anyopaque,
        QueryType: u32,
        ReplyBuffer: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ClientRequest: ?*?*anyopaque,
        QueryType: u32,
        ReplyBuffer: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const ENCRYPTED_CREDENTIALW = extern struct {
    Cred: CREDENTIALW,
    ClearCredentialBlobSize: u32,
};

pub const CredReadFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        LogonId: ?*LUID,
        CredFlags: u32,
        TargetName: ?PWSTR,
        Type: u32,
        Flags: u32,
        Credential: ?*?*ENCRYPTED_CREDENTIALW,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        LogonId: ?*LUID,
        CredFlags: u32,
        TargetName: ?PWSTR,
        Type: u32,
        Flags: u32,
        Credential: ?*?*ENCRYPTED_CREDENTIALW,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const CredReadDomainCredentialsFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        LogonId: ?*LUID,
        CredFlags: u32,
        TargetInfo: ?*CREDENTIAL_TARGET_INFORMATIONW,
        Flags: u32,
        Count: ?*u32,
        Credential: ?*?*?*ENCRYPTED_CREDENTIALW,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        LogonId: ?*LUID,
        CredFlags: u32,
        TargetInfo: ?*CREDENTIAL_TARGET_INFORMATIONW,
        Flags: u32,
        Count: ?*u32,
        Credential: ?*?*?*ENCRYPTED_CREDENTIALW,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const CredFreeCredentialsFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Count: u32,
        Credentials: ?[*]?*ENCRYPTED_CREDENTIALW,
    ) callconv(@import("std").os.windows.WINAPI) void,
    else => *const fn (
        Count: u32,
        Credentials: ?[*]?*ENCRYPTED_CREDENTIALW,
    ) callconv(@import("std").os.windows.WINAPI) void,
};

pub const CredWriteFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        LogonId: ?*LUID,
        CredFlags: u32,
        Credential: ?*ENCRYPTED_CREDENTIALW,
        Flags: u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        LogonId: ?*LUID,
        CredFlags: u32,
        Credential: ?*ENCRYPTED_CREDENTIALW,
        Flags: u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const CrediUnmarshalandDecodeStringFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        MarshaledString: ?PWSTR,
        Blob: ?*?*u8,
        BlobSize: ?*u32,
        IsFailureFatal: ?*u8,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        MarshaledString: ?PWSTR,
        Blob: ?*?*u8,
        BlobSize: ?*u32,
        IsFailureFatal: ?*u8,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SEC_WINNT_AUTH_IDENTITY32 = extern struct {
    User: u32,
    UserLength: u32,
    Domain: u32,
    DomainLength: u32,
    Password: u32,
    PasswordLength: u32,
    Flags: u32,
};

pub const SEC_WINNT_AUTH_IDENTITY_EX32 = extern struct {
    Version: u32,
    Length: u32,
    User: u32,
    UserLength: u32,
    Domain: u32,
    DomainLength: u32,
    Password: u32,
    PasswordLength: u32,
    Flags: u32,
    PackageList: u32,
    PackageListLength: u32,
};

pub const LSA_SECPKG_FUNCTION_TABLE = extern struct {
    CreateLogonSession: ?PLSA_CREATE_LOGON_SESSION,
    DeleteLogonSession: ?PLSA_DELETE_LOGON_SESSION,
    AddCredential: ?PLSA_ADD_CREDENTIAL,
    GetCredentials: ?PLSA_GET_CREDENTIALS,
    DeleteCredential: ?PLSA_DELETE_CREDENTIAL,
    AllocateLsaHeap: ?PLSA_ALLOCATE_LSA_HEAP,
    FreeLsaHeap: ?PLSA_FREE_LSA_HEAP,
    AllocateClientBuffer: ?PLSA_ALLOCATE_CLIENT_BUFFER,
    FreeClientBuffer: ?PLSA_FREE_CLIENT_BUFFER,
    CopyToClientBuffer: ?PLSA_COPY_TO_CLIENT_BUFFER,
    CopyFromClientBuffer: ?PLSA_COPY_FROM_CLIENT_BUFFER,
    ImpersonateClient: ?PLSA_IMPERSONATE_CLIENT,
    UnloadPackage: ?PLSA_UNLOAD_PACKAGE,
    DuplicateHandle: ?PLSA_DUPLICATE_HANDLE,
    SaveSupplementalCredentials: ?PLSA_SAVE_SUPPLEMENTAL_CREDENTIALS,
    CreateThread: ?PLSA_CREATE_THREAD,
    GetClientInfo: ?PLSA_GET_CLIENT_INFO,
    RegisterNotification: ?PLSA_REGISTER_NOTIFICATION,
    CancelNotification: ?PLSA_CANCEL_NOTIFICATION,
    MapBuffer: ?PLSA_MAP_BUFFER,
    CreateToken: ?PLSA_CREATE_TOKEN,
    AuditLogon: ?PLSA_AUDIT_LOGON,
    CallPackage: ?PLSA_CALL_PACKAGE,
    FreeReturnBuffer: ?PLSA_FREE_LSA_HEAP,
    GetCallInfo: ?PLSA_GET_CALL_INFO,
    CallPackageEx: ?PLSA_CALL_PACKAGEEX,
    CreateSharedMemory: ?PLSA_CREATE_SHARED_MEMORY,
    AllocateSharedMemory: ?PLSA_ALLOCATE_SHARED_MEMORY,
    FreeSharedMemory: ?PLSA_FREE_SHARED_MEMORY,
    DeleteSharedMemory: ?PLSA_DELETE_SHARED_MEMORY,
    OpenSamUser: ?PLSA_OPEN_SAM_USER,
    GetUserCredentials: ?PLSA_GET_USER_CREDENTIALS,
    GetUserAuthData: ?PLSA_GET_USER_AUTH_DATA,
    CloseSamUser: ?PLSA_CLOSE_SAM_USER,
    ConvertAuthDataToToken: ?PLSA_CONVERT_AUTH_DATA_TO_TOKEN,
    ClientCallback: ?PLSA_CLIENT_CALLBACK,
    UpdateCredentials: ?PLSA_UPDATE_PRIMARY_CREDENTIALS,
    GetAuthDataForUser: ?PLSA_GET_AUTH_DATA_FOR_USER,
    CrackSingleName: ?PLSA_CRACK_SINGLE_NAME,
    AuditAccountLogon: ?PLSA_AUDIT_ACCOUNT_LOGON,
    CallPackagePassthrough: ?PLSA_CALL_PACKAGE_PASSTHROUGH,
    CrediRead: ?CredReadFn,
    CrediReadDomainCredentials: ?CredReadDomainCredentialsFn,
    CrediFreeCredentials: ?CredFreeCredentialsFn,
    LsaProtectMemory: ?PLSA_PROTECT_MEMORY,
    LsaUnprotectMemory: ?PLSA_PROTECT_MEMORY,
    OpenTokenByLogonId: ?PLSA_OPEN_TOKEN_BY_LOGON_ID,
    ExpandAuthDataForDomain: ?PLSA_EXPAND_AUTH_DATA_FOR_DOMAIN,
    AllocatePrivateHeap: ?PLSA_ALLOCATE_PRIVATE_HEAP,
    FreePrivateHeap: ?PLSA_FREE_PRIVATE_HEAP,
    CreateTokenEx: ?PLSA_CREATE_TOKEN_EX,
    CrediWrite: ?CredWriteFn,
    CrediUnmarshalandDecodeString: ?CrediUnmarshalandDecodeStringFn,
    DummyFunction6: ?PLSA_PROTECT_MEMORY,
    GetExtendedCallFlags: ?PLSA_GET_EXTENDED_CALL_FLAGS,
    DuplicateTokenHandle: ?PLSA_DUPLICATE_HANDLE,
    GetServiceAccountPassword: ?PLSA_GET_SERVICE_ACCOUNT_PASSWORD,
    DummyFunction7: ?PLSA_PROTECT_MEMORY,
    AuditLogonEx: ?PLSA_AUDIT_LOGON_EX,
    CheckProtectedUserByToken: ?PLSA_CHECK_PROTECTED_USER_BY_TOKEN,
    QueryClientRequest: ?PLSA_QUERY_CLIENT_REQUEST,
    GetAppModeInfo: ?PLSA_GET_APP_MODE_INFO,
    SetAppModeInfo: ?PLSA_SET_APP_MODE_INFO,
};

pub const PLSA_LOCATE_PKG_BY_ID = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        PackgeId: u32,
    ) callconv(@import("std").os.windows.WINAPI) ?*anyopaque,
    else => *const fn (
        PackgeId: u32,
    ) callconv(@import("std").os.windows.WINAPI) ?*anyopaque,
};

pub const SECPKG_DLL_FUNCTIONS = extern struct {
    AllocateHeap: ?PLSA_ALLOCATE_LSA_HEAP,
    FreeHeap: ?PLSA_FREE_LSA_HEAP,
    RegisterCallback: ?PLSA_REGISTER_CALLBACK,
    LocatePackageById: ?PLSA_LOCATE_PKG_BY_ID,
};

pub const SpInitializeFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        PackageId: usize,
        Parameters: ?*SECPKG_PARAMETERS,
        FunctionTable: ?*LSA_SECPKG_FUNCTION_TABLE,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        PackageId: usize,
        Parameters: ?*SECPKG_PARAMETERS,
        FunctionTable: ?*LSA_SECPKG_FUNCTION_TABLE,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpShutdownFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn () callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn () callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpGetInfoFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        PackageInfo: ?*SecPkgInfoA,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        PackageInfo: ?*SecPkgInfoA,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpGetExtendedInformationFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Class: SECPKG_EXTENDED_INFORMATION_CLASS,
        ppInformation: ?*?*SECPKG_EXTENDED_INFORMATION,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        Class: SECPKG_EXTENDED_INFORMATION_CLASS,
        ppInformation: ?*?*SECPKG_EXTENDED_INFORMATION,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpSetExtendedInformationFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Class: SECPKG_EXTENDED_INFORMATION_CLASS,
        Info: ?*SECPKG_EXTENDED_INFORMATION,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        Class: SECPKG_EXTENDED_INFORMATION_CLASS,
        Info: ?*SECPKG_EXTENDED_INFORMATION,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_AP_LOGON_USER_EX2 = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ClientRequest: ?*?*anyopaque,
        LogonType: SECURITY_LOGON_TYPE,
        // TODO: what to do with BytesParamIndex 4?
        ProtocolSubmitBuffer: ?*anyopaque,
        ClientBufferBase: ?*anyopaque,
        SubmitBufferSize: u32,
        ProfileBuffer: ?*?*anyopaque,
        ProfileBufferSize: ?*u32,
        LogonId: ?*LUID,
        SubStatus: ?*i32,
        TokenInformationType: ?*LSA_TOKEN_INFORMATION_TYPE,
        TokenInformation: ?*?*anyopaque,
        AccountName: ?*?*UNICODE_STRING,
        AuthenticatingAuthority: ?*?*UNICODE_STRING,
        MachineName: ?*?*UNICODE_STRING,
        PrimaryCredentials: ?*SECPKG_PRIMARY_CRED,
        SupplementalCredentials: ?*?*SECPKG_SUPPLEMENTAL_CRED_ARRAY,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ClientRequest: ?*?*anyopaque,
        LogonType: SECURITY_LOGON_TYPE,
        // TODO: what to do with BytesParamIndex 4?
        ProtocolSubmitBuffer: ?*anyopaque,
        ClientBufferBase: ?*anyopaque,
        SubmitBufferSize: u32,
        ProfileBuffer: ?*?*anyopaque,
        ProfileBufferSize: ?*u32,
        LogonId: ?*LUID,
        SubStatus: ?*i32,
        TokenInformationType: ?*LSA_TOKEN_INFORMATION_TYPE,
        TokenInformation: ?*?*anyopaque,
        AccountName: ?*?*UNICODE_STRING,
        AuthenticatingAuthority: ?*?*UNICODE_STRING,
        MachineName: ?*?*UNICODE_STRING,
        PrimaryCredentials: ?*SECPKG_PRIMARY_CRED,
        SupplementalCredentials: ?*?*SECPKG_SUPPLEMENTAL_CRED_ARRAY,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_AP_LOGON_USER_EX3 = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ClientRequest: ?*?*anyopaque,
        LogonType: SECURITY_LOGON_TYPE,
        // TODO: what to do with BytesParamIndex 4?
        ProtocolSubmitBuffer: ?*anyopaque,
        ClientBufferBase: ?*anyopaque,
        SubmitBufferSize: u32,
        SurrogateLogon: ?*SECPKG_SURROGATE_LOGON,
        ProfileBuffer: ?*?*anyopaque,
        ProfileBufferSize: ?*u32,
        LogonId: ?*LUID,
        SubStatus: ?*i32,
        TokenInformationType: ?*LSA_TOKEN_INFORMATION_TYPE,
        TokenInformation: ?*?*anyopaque,
        AccountName: ?*?*UNICODE_STRING,
        AuthenticatingAuthority: ?*?*UNICODE_STRING,
        MachineName: ?*?*UNICODE_STRING,
        PrimaryCredentials: ?*SECPKG_PRIMARY_CRED,
        SupplementalCredentials: ?*?*SECPKG_SUPPLEMENTAL_CRED_ARRAY,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ClientRequest: ?*?*anyopaque,
        LogonType: SECURITY_LOGON_TYPE,
        // TODO: what to do with BytesParamIndex 4?
        ProtocolSubmitBuffer: ?*anyopaque,
        ClientBufferBase: ?*anyopaque,
        SubmitBufferSize: u32,
        SurrogateLogon: ?*SECPKG_SURROGATE_LOGON,
        ProfileBuffer: ?*?*anyopaque,
        ProfileBufferSize: ?*u32,
        LogonId: ?*LUID,
        SubStatus: ?*i32,
        TokenInformationType: ?*LSA_TOKEN_INFORMATION_TYPE,
        TokenInformation: ?*?*anyopaque,
        AccountName: ?*?*UNICODE_STRING,
        AuthenticatingAuthority: ?*?*UNICODE_STRING,
        MachineName: ?*?*UNICODE_STRING,
        PrimaryCredentials: ?*SECPKG_PRIMARY_CRED,
        SupplementalCredentials: ?*?*SECPKG_SUPPLEMENTAL_CRED_ARRAY,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_AP_PRE_LOGON_USER_SURROGATE = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ClientRequest: ?*?*anyopaque,
        LogonType: SECURITY_LOGON_TYPE,
        // TODO: what to do with BytesParamIndex 4?
        ProtocolSubmitBuffer: ?*anyopaque,
        ClientBufferBase: ?*anyopaque,
        SubmitBufferSize: u32,
        SurrogateLogon: ?*SECPKG_SURROGATE_LOGON,
        SubStatus: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ClientRequest: ?*?*anyopaque,
        LogonType: SECURITY_LOGON_TYPE,
        // TODO: what to do with BytesParamIndex 4?
        ProtocolSubmitBuffer: ?*anyopaque,
        ClientBufferBase: ?*anyopaque,
        SubmitBufferSize: u32,
        SurrogateLogon: ?*SECPKG_SURROGATE_LOGON,
        SubStatus: ?*i32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PLSA_AP_POST_LOGON_USER_SURROGATE = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ClientRequest: ?*?*anyopaque,
        LogonType: SECURITY_LOGON_TYPE,
        // TODO: what to do with BytesParamIndex 4?
        ProtocolSubmitBuffer: ?*anyopaque,
        ClientBufferBase: ?*anyopaque,
        SubmitBufferSize: u32,
        SurrogateLogon: ?*SECPKG_SURROGATE_LOGON,
        // TODO: what to do with BytesParamIndex 7?
        ProfileBuffer: ?*anyopaque,
        ProfileBufferSize: u32,
        LogonId: ?*LUID,
        Status: NTSTATUS,
        SubStatus: NTSTATUS,
        TokenInformationType: LSA_TOKEN_INFORMATION_TYPE,
        TokenInformation: ?*anyopaque,
        AccountName: ?*UNICODE_STRING,
        AuthenticatingAuthority: ?*UNICODE_STRING,
        MachineName: ?*UNICODE_STRING,
        PrimaryCredentials: ?*SECPKG_PRIMARY_CRED,
        SupplementalCredentials: ?*SECPKG_SUPPLEMENTAL_CRED_ARRAY,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ClientRequest: ?*?*anyopaque,
        LogonType: SECURITY_LOGON_TYPE,
        // TODO: what to do with BytesParamIndex 4?
        ProtocolSubmitBuffer: ?*anyopaque,
        ClientBufferBase: ?*anyopaque,
        SubmitBufferSize: u32,
        SurrogateLogon: ?*SECPKG_SURROGATE_LOGON,
        // TODO: what to do with BytesParamIndex 7?
        ProfileBuffer: ?*anyopaque,
        ProfileBufferSize: u32,
        LogonId: ?*LUID,
        Status: NTSTATUS,
        SubStatus: NTSTATUS,
        TokenInformationType: LSA_TOKEN_INFORMATION_TYPE,
        TokenInformation: ?*anyopaque,
        AccountName: ?*UNICODE_STRING,
        AuthenticatingAuthority: ?*UNICODE_STRING,
        MachineName: ?*UNICODE_STRING,
        PrimaryCredentials: ?*SECPKG_PRIMARY_CRED,
        SupplementalCredentials: ?*SECPKG_SUPPLEMENTAL_CRED_ARRAY,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpAcceptCredentialsFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        LogonType: SECURITY_LOGON_TYPE,
        AccountName: ?*UNICODE_STRING,
        PrimaryCredentials: ?*SECPKG_PRIMARY_CRED,
        SupplementalCredentials: ?*SECPKG_SUPPLEMENTAL_CRED,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        LogonType: SECURITY_LOGON_TYPE,
        AccountName: ?*UNICODE_STRING,
        PrimaryCredentials: ?*SECPKG_PRIMARY_CRED,
        SupplementalCredentials: ?*SECPKG_SUPPLEMENTAL_CRED,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpAcquireCredentialsHandleFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        PrincipalName: ?*UNICODE_STRING,
        CredentialUseFlags: u32,
        LogonId: ?*LUID,
        AuthorizationData: ?*anyopaque,
        GetKeyFunciton: ?*anyopaque,
        GetKeyArgument: ?*anyopaque,
        CredentialHandle: ?*usize,
        ExpirationTime: ?*LARGE_INTEGER,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        PrincipalName: ?*UNICODE_STRING,
        CredentialUseFlags: u32,
        LogonId: ?*LUID,
        AuthorizationData: ?*anyopaque,
        GetKeyFunciton: ?*anyopaque,
        GetKeyArgument: ?*anyopaque,
        CredentialHandle: ?*usize,
        ExpirationTime: ?*LARGE_INTEGER,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpFreeCredentialsHandleFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        CredentialHandle: usize,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        CredentialHandle: usize,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpQueryCredentialsAttributesFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        CredentialHandle: usize,
        CredentialAttribute: u32,
        Buffer: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        CredentialHandle: usize,
        CredentialAttribute: u32,
        Buffer: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpSetCredentialsAttributesFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        CredentialHandle: usize,
        CredentialAttribute: u32,
        // TODO: what to do with BytesParamIndex 3?
        Buffer: ?*anyopaque,
        BufferSize: u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        CredentialHandle: usize,
        CredentialAttribute: u32,
        // TODO: what to do with BytesParamIndex 3?
        Buffer: ?*anyopaque,
        BufferSize: u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpAddCredentialsFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        CredentialHandle: usize,
        PrincipalName: ?*UNICODE_STRING,
        Package: ?*UNICODE_STRING,
        CredentialUseFlags: u32,
        AuthorizationData: ?*anyopaque,
        GetKeyFunciton: ?*anyopaque,
        GetKeyArgument: ?*anyopaque,
        ExpirationTime: ?*LARGE_INTEGER,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        CredentialHandle: usize,
        PrincipalName: ?*UNICODE_STRING,
        Package: ?*UNICODE_STRING,
        CredentialUseFlags: u32,
        AuthorizationData: ?*anyopaque,
        GetKeyFunciton: ?*anyopaque,
        GetKeyArgument: ?*anyopaque,
        ExpirationTime: ?*LARGE_INTEGER,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpSaveCredentialsFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        CredentialHandle: usize,
        Credentials: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        CredentialHandle: usize,
        Credentials: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpGetCredentialsFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        CredentialHandle: usize,
        Credentials: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        CredentialHandle: usize,
        Credentials: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpDeleteCredentialsFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        CredentialHandle: usize,
        Key: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        CredentialHandle: usize,
        Key: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpInitLsaModeContextFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        CredentialHandle: usize,
        ContextHandle: usize,
        TargetName: ?*UNICODE_STRING,
        ContextRequirements: u32,
        TargetDataRep: u32,
        InputBuffers: ?*SecBufferDesc,
        NewContextHandle: ?*usize,
        OutputBuffers: ?*SecBufferDesc,
        ContextAttributes: ?*u32,
        ExpirationTime: ?*LARGE_INTEGER,
        MappedContext: ?*BOOLEAN,
        ContextData: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        CredentialHandle: usize,
        ContextHandle: usize,
        TargetName: ?*UNICODE_STRING,
        ContextRequirements: u32,
        TargetDataRep: u32,
        InputBuffers: ?*SecBufferDesc,
        NewContextHandle: ?*usize,
        OutputBuffers: ?*SecBufferDesc,
        ContextAttributes: ?*u32,
        ExpirationTime: ?*LARGE_INTEGER,
        MappedContext: ?*BOOLEAN,
        ContextData: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpDeleteContextFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextHandle: usize,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextHandle: usize,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpApplyControlTokenFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextHandle: usize,
        ControlToken: ?*SecBufferDesc,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextHandle: usize,
        ControlToken: ?*SecBufferDesc,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpAcceptLsaModeContextFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        CredentialHandle: usize,
        ContextHandle: usize,
        InputBuffer: ?*SecBufferDesc,
        ContextRequirements: u32,
        TargetDataRep: u32,
        NewContextHandle: ?*usize,
        OutputBuffer: ?*SecBufferDesc,
        ContextAttributes: ?*u32,
        ExpirationTime: ?*LARGE_INTEGER,
        MappedContext: ?*BOOLEAN,
        ContextData: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        CredentialHandle: usize,
        ContextHandle: usize,
        InputBuffer: ?*SecBufferDesc,
        ContextRequirements: u32,
        TargetDataRep: u32,
        NewContextHandle: ?*usize,
        OutputBuffer: ?*SecBufferDesc,
        ContextAttributes: ?*u32,
        ExpirationTime: ?*LARGE_INTEGER,
        MappedContext: ?*BOOLEAN,
        ContextData: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpGetUserInfoFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        LogonId: ?*LUID,
        Flags: u32,
        UserData: ?*?*SECURITY_USER_DATA,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        LogonId: ?*LUID,
        Flags: u32,
        UserData: ?*?*SECURITY_USER_DATA,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpQueryContextAttributesFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextHandle: usize,
        ContextAttribute: u32,
        Buffer: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextHandle: usize,
        ContextAttribute: u32,
        Buffer: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpSetContextAttributesFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextHandle: usize,
        ContextAttribute: u32,
        // TODO: what to do with BytesParamIndex 3?
        Buffer: ?*anyopaque,
        BufferSize: u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextHandle: usize,
        ContextAttribute: u32,
        // TODO: what to do with BytesParamIndex 3?
        Buffer: ?*anyopaque,
        BufferSize: u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpChangeAccountPasswordFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        pDomainName: ?*UNICODE_STRING,
        pAccountName: ?*UNICODE_STRING,
        pOldPassword: ?*UNICODE_STRING,
        pNewPassword: ?*UNICODE_STRING,
        Impersonating: BOOLEAN,
        pOutput: ?*SecBufferDesc,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        pDomainName: ?*UNICODE_STRING,
        pAccountName: ?*UNICODE_STRING,
        pOldPassword: ?*UNICODE_STRING,
        pNewPassword: ?*UNICODE_STRING,
        Impersonating: BOOLEAN,
        pOutput: ?*SecBufferDesc,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpQueryMetaDataFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        CredentialHandle: usize,
        TargetName: ?*UNICODE_STRING,
        ContextRequirements: u32,
        MetaDataLength: ?*u32,
        MetaData: ?*?*u8,
        ContextHandle: ?*usize,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        CredentialHandle: usize,
        TargetName: ?*UNICODE_STRING,
        ContextRequirements: u32,
        MetaDataLength: ?*u32,
        MetaData: ?*?*u8,
        ContextHandle: ?*usize,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpExchangeMetaDataFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        CredentialHandle: usize,
        TargetName: ?*UNICODE_STRING,
        ContextRequirements: u32,
        MetaDataLength: u32,
        // TODO: what to do with BytesParamIndex 3?
        MetaData: ?*u8,
        ContextHandle: ?*usize,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        CredentialHandle: usize,
        TargetName: ?*UNICODE_STRING,
        ContextRequirements: u32,
        MetaDataLength: u32,
        // TODO: what to do with BytesParamIndex 3?
        MetaData: ?*u8,
        ContextHandle: ?*usize,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpGetCredUIContextFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextHandle: usize,
        CredType: ?*Guid,
        FlatCredUIContextLength: ?*u32,
        FlatCredUIContext: ?*?*u8,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextHandle: usize,
        CredType: ?*Guid,
        FlatCredUIContextLength: ?*u32,
        FlatCredUIContext: ?*?*u8,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpUpdateCredentialsFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextHandle: usize,
        CredType: ?*Guid,
        FlatCredUIContextLength: u32,
        // TODO: what to do with BytesParamIndex 2?
        FlatCredUIContext: ?*u8,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextHandle: usize,
        CredType: ?*Guid,
        FlatCredUIContextLength: u32,
        // TODO: what to do with BytesParamIndex 2?
        FlatCredUIContext: ?*u8,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpValidateTargetInfoFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ClientRequest: ?*?*anyopaque,
        // TODO: what to do with BytesParamIndex 3?
        ProtocolSubmitBuffer: ?*anyopaque,
        ClientBufferBase: ?*anyopaque,
        SubmitBufferLength: u32,
        TargetInfo: ?*SECPKG_TARGETINFO,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ClientRequest: ?*?*anyopaque,
        // TODO: what to do with BytesParamIndex 3?
        ProtocolSubmitBuffer: ?*anyopaque,
        ClientBufferBase: ?*anyopaque,
        SubmitBufferLength: u32,
        TargetInfo: ?*SECPKG_TARGETINFO,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const LSA_AP_POST_LOGON_USER = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        PostLogonUserInfo: ?*SECPKG_POST_LOGON_USER_INFO,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        PostLogonUserInfo: ?*SECPKG_POST_LOGON_USER_INFO,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpGetRemoteCredGuardLogonBufferFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        CredHandle: usize,
        ContextHandle: usize,
        TargetName: ?*const UNICODE_STRING,
        RedirectedLogonHandle: ?*?HANDLE,
        Callback: ?*?PLSA_REDIRECTED_LOGON_CALLBACK,
        CleanupCallback: ?*?PLSA_REDIRECTED_LOGON_CLEANUP_CALLBACK,
        LogonBufferSize: ?*u32,
        LogonBuffer: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        CredHandle: usize,
        ContextHandle: usize,
        TargetName: ?*const UNICODE_STRING,
        RedirectedLogonHandle: ?*?HANDLE,
        Callback: ?*?PLSA_REDIRECTED_LOGON_CALLBACK,
        CleanupCallback: ?*?PLSA_REDIRECTED_LOGON_CLEANUP_CALLBACK,
        LogonBufferSize: ?*u32,
        LogonBuffer: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpGetRemoteCredGuardSupplementalCredsFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        CredHandle: usize,
        TargetName: ?*const UNICODE_STRING,
        RedirectedLogonHandle: ?*?HANDLE,
        Callback: ?*?PLSA_REDIRECTED_LOGON_CALLBACK,
        CleanupCallback: ?*?PLSA_REDIRECTED_LOGON_CLEANUP_CALLBACK,
        SupplementalCredsSize: ?*u32,
        SupplementalCreds: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        CredHandle: usize,
        TargetName: ?*const UNICODE_STRING,
        RedirectedLogonHandle: ?*?HANDLE,
        Callback: ?*?PLSA_REDIRECTED_LOGON_CALLBACK,
        CleanupCallback: ?*?PLSA_REDIRECTED_LOGON_CLEANUP_CALLBACK,
        SupplementalCredsSize: ?*u32,
        SupplementalCreds: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpGetTbalSupplementalCredsFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        LogonId: LUID,
        SupplementalCredsSize: ?*u32,
        SupplementalCreds: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        LogonId: LUID,
        SupplementalCredsSize: ?*u32,
        SupplementalCreds: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SECPKG_FUNCTION_TABLE = extern struct {
    InitializePackage: ?PLSA_AP_INITIALIZE_PACKAGE,
    LogonUserA: ?PLSA_AP_LOGON_USER,
    CallPackage: ?PLSA_AP_CALL_PACKAGE,
    LogonTerminated: ?PLSA_AP_LOGON_TERMINATED,
    CallPackageUntrusted: ?PLSA_AP_CALL_PACKAGE,
    CallPackagePassthrough: ?PLSA_AP_CALL_PACKAGE_PASSTHROUGH,
    LogonUserExA: ?PLSA_AP_LOGON_USER_EX,
    LogonUserEx2: ?PLSA_AP_LOGON_USER_EX2,
    Initialize: ?SpInitializeFn,
    Shutdown: ?SpShutdownFn,
    GetInfo: ?SpGetInfoFn,
    AcceptCredentials: ?SpAcceptCredentialsFn,
    AcquireCredentialsHandleA: ?SpAcquireCredentialsHandleFn,
    QueryCredentialsAttributesA: ?SpQueryCredentialsAttributesFn,
    FreeCredentialsHandle: ?SpFreeCredentialsHandleFn,
    SaveCredentials: ?SpSaveCredentialsFn,
    GetCredentials: ?SpGetCredentialsFn,
    DeleteCredentials: ?SpDeleteCredentialsFn,
    InitLsaModeContext: ?SpInitLsaModeContextFn,
    AcceptLsaModeContext: ?SpAcceptLsaModeContextFn,
    DeleteContext: ?SpDeleteContextFn,
    ApplyControlToken: ?SpApplyControlTokenFn,
    GetUserInfo: ?SpGetUserInfoFn,
    GetExtendedInformation: ?SpGetExtendedInformationFn,
    QueryContextAttributesA: ?SpQueryContextAttributesFn,
    AddCredentialsA: ?SpAddCredentialsFn,
    SetExtendedInformation: ?SpSetExtendedInformationFn,
    SetContextAttributesA: ?SpSetContextAttributesFn,
    SetCredentialsAttributesA: ?SpSetCredentialsAttributesFn,
    ChangeAccountPasswordA: ?SpChangeAccountPasswordFn,
    QueryMetaData: ?SpQueryMetaDataFn,
    ExchangeMetaData: ?SpExchangeMetaDataFn,
    GetCredUIContext: ?SpGetCredUIContextFn,
    UpdateCredentials: ?SpUpdateCredentialsFn,
    ValidateTargetInfo: ?SpValidateTargetInfoFn,
    PostLogonUser: ?LSA_AP_POST_LOGON_USER,
    GetRemoteCredGuardLogonBuffer: ?SpGetRemoteCredGuardLogonBufferFn,
    GetRemoteCredGuardSupplementalCreds: ?SpGetRemoteCredGuardSupplementalCredsFn,
    GetTbalSupplementalCreds: ?SpGetTbalSupplementalCredsFn,
    LogonUserEx3: ?PLSA_AP_LOGON_USER_EX3,
    PreLogonUserSurrogate: ?PLSA_AP_PRE_LOGON_USER_SURROGATE,
    PostLogonUserSurrogate: ?PLSA_AP_POST_LOGON_USER_SURROGATE,
};

pub const SpInstanceInitFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Version: u32,
        FunctionTable: ?*SECPKG_DLL_FUNCTIONS,
        UserFunctions: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        Version: u32,
        FunctionTable: ?*SECPKG_DLL_FUNCTIONS,
        UserFunctions: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpInitUserModeContextFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextHandle: usize,
        PackedContext: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextHandle: usize,
        PackedContext: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpMakeSignatureFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextHandle: usize,
        QualityOfProtection: u32,
        MessageBuffers: ?*SecBufferDesc,
        MessageSequenceNumber: u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextHandle: usize,
        QualityOfProtection: u32,
        MessageBuffers: ?*SecBufferDesc,
        MessageSequenceNumber: u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpVerifySignatureFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextHandle: usize,
        MessageBuffers: ?*SecBufferDesc,
        MessageSequenceNumber: u32,
        QualityOfProtection: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextHandle: usize,
        MessageBuffers: ?*SecBufferDesc,
        MessageSequenceNumber: u32,
        QualityOfProtection: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpSealMessageFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextHandle: usize,
        QualityOfProtection: u32,
        MessageBuffers: ?*SecBufferDesc,
        MessageSequenceNumber: u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextHandle: usize,
        QualityOfProtection: u32,
        MessageBuffers: ?*SecBufferDesc,
        MessageSequenceNumber: u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpUnsealMessageFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextHandle: usize,
        MessageBuffers: ?*SecBufferDesc,
        MessageSequenceNumber: u32,
        QualityOfProtection: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextHandle: usize,
        MessageBuffers: ?*SecBufferDesc,
        MessageSequenceNumber: u32,
        QualityOfProtection: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpGetContextTokenFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextHandle: usize,
        ImpersonationToken: ?*?HANDLE,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextHandle: usize,
        ImpersonationToken: ?*?HANDLE,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpExportSecurityContextFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        phContext: usize,
        fFlags: u32,
        pPackedContext: ?*SecBuffer,
        pToken: ?*?HANDLE,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        phContext: usize,
        fFlags: u32,
        pPackedContext: ?*SecBuffer,
        pToken: ?*?HANDLE,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpImportSecurityContextFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        pPackedContext: ?*SecBuffer,
        Token: ?HANDLE,
        phContext: ?*usize,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        pPackedContext: ?*SecBuffer,
        Token: ?HANDLE,
        phContext: ?*usize,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpCompleteAuthTokenFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextHandle: usize,
        InputBuffer: ?*SecBufferDesc,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextHandle: usize,
        InputBuffer: ?*SecBufferDesc,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpFormatCredentialsFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Credentials: ?*SecBuffer,
        FormattedCredentials: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        Credentials: ?*SecBuffer,
        FormattedCredentials: ?*SecBuffer,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpMarshallSupplementalCredsFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        CredentialSize: u32,
        // TODO: what to do with BytesParamIndex 0?
        Credentials: ?*u8,
        MarshalledCredSize: ?*u32,
        MarshalledCreds: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        CredentialSize: u32,
        // TODO: what to do with BytesParamIndex 0?
        Credentials: ?*u8,
        MarshalledCredSize: ?*u32,
        MarshalledCreds: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpMarshalAttributeDataFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        AttributeInfo: u32,
        Attribute: u32,
        AttributeDataSize: u32,
        // TODO: what to do with BytesParamIndex 2?
        AttributeData: ?*u8,
        MarshaledAttributeDataSize: ?*u32,
        MarshaledAttributeData: ?*?*u8,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        AttributeInfo: u32,
        Attribute: u32,
        AttributeDataSize: u32,
        // TODO: what to do with BytesParamIndex 2?
        AttributeData: ?*u8,
        MarshaledAttributeDataSize: ?*u32,
        MarshaledAttributeData: ?*?*u8,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SECPKG_USER_FUNCTION_TABLE = extern struct {
    InstanceInit: ?SpInstanceInitFn,
    InitUserModeContext: ?SpInitUserModeContextFn,
    MakeSignature: ?SpMakeSignatureFn,
    VerifySignature: ?SpVerifySignatureFn,
    SealMessage: ?SpSealMessageFn,
    UnsealMessage: ?SpUnsealMessageFn,
    GetContextToken: ?SpGetContextTokenFn,
    QueryContextAttributesA: ?SpQueryContextAttributesFn,
    CompleteAuthToken: ?SpCompleteAuthTokenFn,
    DeleteUserModeContext: ?SpDeleteContextFn,
    FormatCredentials: ?SpFormatCredentialsFn,
    MarshallSupplementalCreds: ?SpMarshallSupplementalCredsFn,
    ExportContext: ?SpExportSecurityContextFn,
    ImportContext: ?SpImportSecurityContextFn,
    MarshalAttributeData: ?SpMarshalAttributeDataFn,
};

pub const SpLsaModeInitializeFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        LsaVersion: u32,
        PackageVersion: ?*u32,
        ppTables: ?*?*SECPKG_FUNCTION_TABLE,
        pcTables: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        LsaVersion: u32,
        PackageVersion: ?*u32,
        ppTables: ?*?*SECPKG_FUNCTION_TABLE,
        pcTables: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SpUserModeInitializeFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        LsaVersion: u32,
        PackageVersion: ?*u32,
        ppTables: ?*?*SECPKG_USER_FUNCTION_TABLE,
        pcTables: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        LsaVersion: u32,
        PackageVersion: ?*u32,
        ppTables: ?*?*SECPKG_USER_FUNCTION_TABLE,
        pcTables: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const KSEC_CONTEXT_TYPE = enum(i32) {
    Paged = 0,
    NonPaged = 1,
};
pub const KSecPaged = KSEC_CONTEXT_TYPE.Paged;
pub const KSecNonPaged = KSEC_CONTEXT_TYPE.NonPaged;

pub const KSEC_LIST_ENTRY = extern struct {
    List: LIST_ENTRY,
    RefCount: i32,
    Signature: u32,
    OwningList: ?*anyopaque,
    Reserved: ?*anyopaque,
};

pub const PKSEC_CREATE_CONTEXT_LIST = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Type: KSEC_CONTEXT_TYPE,
    ) callconv(@import("std").os.windows.WINAPI) ?*anyopaque,
    else => *const fn (
        Type: KSEC_CONTEXT_TYPE,
    ) callconv(@import("std").os.windows.WINAPI) ?*anyopaque,
};

pub const PKSEC_INSERT_LIST_ENTRY = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        List: ?*anyopaque,
        Entry: ?*KSEC_LIST_ENTRY,
    ) callconv(@import("std").os.windows.WINAPI) void,
    else => *const fn (
        List: ?*anyopaque,
        Entry: ?*KSEC_LIST_ENTRY,
    ) callconv(@import("std").os.windows.WINAPI) void,
};

pub const PKSEC_REFERENCE_LIST_ENTRY = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Entry: ?*KSEC_LIST_ENTRY,
        Signature: u32,
        RemoveNoRef: BOOLEAN,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        Entry: ?*KSEC_LIST_ENTRY,
        Signature: u32,
        RemoveNoRef: BOOLEAN,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PKSEC_DEREFERENCE_LIST_ENTRY = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        Entry: ?*KSEC_LIST_ENTRY,
        Delete: ?*u8,
    ) callconv(@import("std").os.windows.WINAPI) void,
    else => *const fn (
        Entry: ?*KSEC_LIST_ENTRY,
        Delete: ?*u8,
    ) callconv(@import("std").os.windows.WINAPI) void,
};

pub const PKSEC_SERIALIZE_WINNT_AUTH_DATA = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        pvAuthData: ?*anyopaque,
        Size: ?*u32,
        SerializedData: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        pvAuthData: ?*anyopaque,
        Size: ?*u32,
        SerializedData: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PKSEC_SERIALIZE_SCHANNEL_AUTH_DATA = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        pvAuthData: ?*anyopaque,
        Size: ?*u32,
        SerializedData: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        pvAuthData: ?*anyopaque,
        Size: ?*u32,
        SerializedData: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const PKSEC_LOCATE_PKG_BY_ID = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        PackageId: u32,
    ) callconv(@import("std").os.windows.WINAPI) ?*anyopaque,
    else => *const fn (
        PackageId: u32,
    ) callconv(@import("std").os.windows.WINAPI) ?*anyopaque,
};

pub const SECPKG_KERNEL_FUNCTIONS = extern struct {
    AllocateHeap: ?PLSA_ALLOCATE_LSA_HEAP,
    FreeHeap: ?PLSA_FREE_LSA_HEAP,
    CreateContextList: ?PKSEC_CREATE_CONTEXT_LIST,
    InsertListEntry: ?PKSEC_INSERT_LIST_ENTRY,
    ReferenceListEntry: ?PKSEC_REFERENCE_LIST_ENTRY,
    DereferenceListEntry: ?PKSEC_DEREFERENCE_LIST_ENTRY,
    SerializeWinntAuthData: ?PKSEC_SERIALIZE_WINNT_AUTH_DATA,
    SerializeSchannelAuthData: ?PKSEC_SERIALIZE_SCHANNEL_AUTH_DATA,
    LocatePackageById: ?PKSEC_LOCATE_PKG_BY_ID,
};

pub const KspInitPackageFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        FunctionTable: ?*SECPKG_KERNEL_FUNCTIONS,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        FunctionTable: ?*SECPKG_KERNEL_FUNCTIONS,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const KspDeleteContextFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextId: usize,
        LsaContextId: ?*usize,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextId: usize,
        LsaContextId: ?*usize,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const KspInitContextFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextId: usize,
        ContextData: ?*SecBuffer,
        NewContextId: ?*usize,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextId: usize,
        ContextData: ?*SecBuffer,
        NewContextId: ?*usize,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const KspMakeSignatureFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextId: usize,
        fQOP: u32,
        Message: ?*SecBufferDesc,
        MessageSeqNo: u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextId: usize,
        fQOP: u32,
        Message: ?*SecBufferDesc,
        MessageSeqNo: u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const KspVerifySignatureFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextId: usize,
        Message: ?*SecBufferDesc,
        MessageSeqNo: u32,
        pfQOP: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextId: usize,
        Message: ?*SecBufferDesc,
        MessageSeqNo: u32,
        pfQOP: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const KspSealMessageFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextId: usize,
        fQOP: u32,
        Message: ?*SecBufferDesc,
        MessageSeqNo: u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextId: usize,
        fQOP: u32,
        Message: ?*SecBufferDesc,
        MessageSeqNo: u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const KspUnsealMessageFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextId: usize,
        Message: ?*SecBufferDesc,
        MessageSeqNo: u32,
        pfQOP: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextId: usize,
        Message: ?*SecBufferDesc,
        MessageSeqNo: u32,
        pfQOP: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const KspGetTokenFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextId: usize,
        ImpersonationToken: ?*?HANDLE,
        RawToken: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextId: usize,
        ImpersonationToken: ?*?HANDLE,
        RawToken: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const KspQueryAttributesFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextId: usize,
        Attribute: u32,
        Buffer: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextId: usize,
        Attribute: u32,
        Buffer: ?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const KspCompleteTokenFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextId: usize,
        Token: ?*SecBufferDesc,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextId: usize,
        Token: ?*SecBufferDesc,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const KspMapHandleFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        ContextId: usize,
        LsaContextId: ?*usize,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        ContextId: usize,
        LsaContextId: ?*usize,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const KspSetPagingModeFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        PagingMode: BOOLEAN,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        PagingMode: BOOLEAN,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const KspSerializeAuthDataFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        pvAuthData: ?*anyopaque,
        Size: ?*u32,
        SerializedData: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
    else => *const fn (
        pvAuthData: ?*anyopaque,
        Size: ?*u32,
        SerializedData: ?*?*anyopaque,
    ) callconv(@import("std").os.windows.WINAPI) NTSTATUS,
};

pub const SECPKG_KERNEL_FUNCTION_TABLE = extern struct {
    Initialize: ?KspInitPackageFn,
    DeleteContext: ?KspDeleteContextFn,
    InitContext: ?KspInitContextFn,
    MapHandle: ?KspMapHandleFn,
    Sign: ?KspMakeSignatureFn,
    Verify: ?KspVerifySignatureFn,
    Seal: ?KspSealMessageFn,
    Unseal: ?KspUnsealMessageFn,
    GetToken: ?KspGetTokenFn,
    QueryAttributes: ?KspQueryAttributesFn,
    CompleteToken: ?KspCompleteTokenFn,
    ExportContext: ?SpExportSecurityContextFn,
    ImportContext: ?SpImportSecurityContextFn,
    SetPackagePagingMode: ?KspSetPagingModeFn,
    SerializeAuthData: ?KspSerializeAuthDataFn,
};

pub const SecPkgCred_SupportedAlgs = extern struct {
    cSupportedAlgs: u32,
    palgSupportedAlgs: ?*u32,
};

pub const SecPkgCred_CipherStrengths = extern struct {
    dwMinimumCipherStrength: u32,
    dwMaximumCipherStrength: u32,
};

pub const SecPkgCred_SupportedProtocols = extern struct {
    grbitProtocol: u32,
};

pub const SecPkgCred_ClientCertPolicy = extern struct {
    dwFlags: u32,
    guidPolicyId: Guid,
    dwCertFlags: u32,
    dwUrlRetrievalTimeout: u32,
    fCheckRevocationFreshnessTime: BOOL,
    dwRevocationFreshnessTime: u32,
    fOmitUsageCheck: BOOL,
    pwszSslCtlStoreName: ?PWSTR,
    pwszSslCtlIdentifier: ?PWSTR,
};

pub const SecPkgCred_SessionTicketKey = extern struct {
    TicketInfoVersion: u32,
    KeyId: [16]u8,
    KeyingMaterial: [64]u8,
    KeyingMaterialSize: u8,
};

pub const SecPkgCred_SessionTicketKeys = extern struct {
    cSessionTicketKeys: u32,
    pSessionTicketKeys: ?*SecPkgCred_SessionTicketKey,
};

pub const eTlsSignatureAlgorithm = enum(i32) {
    Anonymous = 0,
    Rsa = 1,
    Dsa = 2,
    Ecdsa = 3,
};
pub const TlsSignatureAlgorithm_Anonymous = eTlsSignatureAlgorithm.Anonymous;
pub const TlsSignatureAlgorithm_Rsa = eTlsSignatureAlgorithm.Rsa;
pub const TlsSignatureAlgorithm_Dsa = eTlsSignatureAlgorithm.Dsa;
pub const TlsSignatureAlgorithm_Ecdsa = eTlsSignatureAlgorithm.Ecdsa;

pub const eTlsHashAlgorithm = enum(i32) {
    None = 0,
    Md5 = 1,
    Sha1 = 2,
    Sha224 = 3,
    Sha256 = 4,
    Sha384 = 5,
    Sha512 = 6,
};
pub const TlsHashAlgorithm_None = eTlsHashAlgorithm.None;
pub const TlsHashAlgorithm_Md5 = eTlsHashAlgorithm.Md5;
pub const TlsHashAlgorithm_Sha1 = eTlsHashAlgorithm.Sha1;
pub const TlsHashAlgorithm_Sha224 = eTlsHashAlgorithm.Sha224;
pub const TlsHashAlgorithm_Sha256 = eTlsHashAlgorithm.Sha256;
pub const TlsHashAlgorithm_Sha384 = eTlsHashAlgorithm.Sha384;
pub const TlsHashAlgorithm_Sha512 = eTlsHashAlgorithm.Sha512;

pub const SecPkgContext_RemoteCredentialInfo = extern struct {
    cbCertificateChain: u32,
    pbCertificateChain: ?*u8,
    cCertificates: u32,
    fFlags: u32,
    dwBits: u32,
};

pub const SecPkgContext_LocalCredentialInfo = extern struct {
    cbCertificateChain: u32,
    pbCertificateChain: ?*u8,
    cCertificates: u32,
    fFlags: u32,
    dwBits: u32,
};

pub const SecPkgContext_ClientCertPolicyResult = extern struct {
    dwPolicyResult: HRESULT,
    guidPolicyId: Guid,
};

pub const SecPkgContext_IssuerListInfoEx = extern struct {
    aIssuers: ?*CRYPTOAPI_BLOB,
    cIssuers: u32,
};

pub const SecPkgContext_ConnectionInfo = extern struct {
    dwProtocol: u32,
    aiCipher: u32,
    dwCipherStrength: u32,
    aiHash: u32,
    dwHashStrength: u32,
    aiExch: u32,
    dwExchStrength: u32,
};

pub const SecPkgContext_ConnectionInfoEx = extern struct {
    dwVersion: u32,
    dwProtocol: u32,
    szCipher: [64]u16,
    dwCipherStrength: u32,
    szHash: [64]u16,
    dwHashStrength: u32,
    szExchange: [64]u16,
    dwExchStrength: u32,
};

pub const SecPkgContext_CipherInfo = extern struct {
    dwVersion: u32,
    dwProtocol: u32,
    dwCipherSuite: u32,
    dwBaseCipherSuite: u32,
    szCipherSuite: [64]u16,
    szCipher: [64]u16,
    dwCipherLen: u32,
    dwCipherBlockLen: u32,
    szHash: [64]u16,
    dwHashLen: u32,
    szExchange: [64]u16,
    dwMinExchangeLen: u32,
    dwMaxExchangeLen: u32,
    szCertificate: [64]u16,
    dwKeyType: u32,
};

pub const SecPkgContext_EapKeyBlock = extern struct {
    rgbKeys: [128]u8,
    rgbIVs: [64]u8,
};

pub const SecPkgContext_MappedCredAttr = extern struct {
    dwAttribute: u32,
    pvBuffer: ?*anyopaque,
};

pub const SecPkgContext_SessionInfo = extern struct {
    dwFlags: u32,
    cbSessionId: u32,
    rgbSessionId: [32]u8,
};

pub const SecPkgContext_SessionAppData = extern struct {
    dwFlags: u32,
    cbAppData: u32,
    pbAppData: ?*u8,
};

pub const SecPkgContext_EapPrfInfo = extern struct {
    dwVersion: u32,
    cbPrfData: u32,
    pbPrfData: ?*u8,
};

pub const SecPkgContext_SupportedSignatures = extern struct {
    cSignatureAndHashAlgorithms: u16,
    pSignatureAndHashAlgorithms: ?*u16,
};

pub const SecPkgContext_Certificates = extern struct {
    cCertificates: u32,
    cbCertificateChain: u32,
    pbCertificateChain: ?*u8,
};

pub const SecPkgContext_CertInfo = extern struct {
    dwVersion: u32,
    cbSubjectName: u32,
    pwszSubjectName: ?PWSTR,
    cbIssuerName: u32,
    pwszIssuerName: ?PWSTR,
    dwKeySize: u32,
};

pub const SecPkgContext_UiInfo = extern struct {
    hParentWindow: ?HWND,
};

pub const SecPkgContext_EarlyStart = extern struct {
    dwEarlyStartFlags: u32,
};

pub const SecPkgContext_KeyingMaterialInfo = extern struct {
    cbLabel: u16,
    pszLabel: ?PSTR,
    cbContextValue: u16,
    pbContextValue: ?*u8,
    cbKeyingMaterial: u32,
};

pub const SecPkgContext_KeyingMaterial = extern struct {
    cbKeyingMaterial: u32,
    pbKeyingMaterial: ?*u8,
};

pub const SecPkgContext_KeyingMaterial_Inproc = extern struct {
    cbLabel: u16,
    pszLabel: ?PSTR,
    cbContextValue: u16,
    pbContextValue: ?*u8,
    cbKeyingMaterial: u32,
    pbKeyingMaterial: ?*u8,
};

pub const SecPkgContext_SrtpParameters = extern struct {
    ProtectionProfile: u16,
    MasterKeyIdentifierSize: u8,
    MasterKeyIdentifier: ?*u8,
};

pub const SecPkgContext_TokenBinding = extern struct {
    MajorVersion: u8,
    MinorVersion: u8,
    KeyParametersSize: u16,
    KeyParameters: ?*u8,
};

pub const SecPkgContext_CertificateValidationResult = extern struct {
    dwChainErrorStatus: u32,
    hrVerifyChainStatus: HRESULT,
};

pub const _HMAPPER = extern struct {
    placeholder: usize, // TODO: why is this type empty?
};

pub const SCHANNEL_CRED = extern struct {
    dwVersion: u32,
    cCreds: u32,
    paCred: ?*?*CERT_CONTEXT,
    hRootStore: ?*anyopaque,
    cMappers: u32,
    aphMappers: ?*?*_HMAPPER,
    cSupportedAlgs: u32,
    palgSupportedAlgs: ?*u32,
    grbitEnabledProtocols: u32,
    dwMinimumCipherStrength: u32,
    dwMaximumCipherStrength: u32,
    dwSessionLifespan: u32,
    dwFlags: SCHANNEL_CRED_FLAGS,
    dwCredFormat: u32,
};

pub const SEND_GENERIC_TLS_EXTENSION = extern struct {
    ExtensionType: u16,
    HandshakeType: u16,
    Flags: u32,
    BufferSize: u16,
    Buffer: [1]u8,
};

pub const TLS_EXTENSION_SUBSCRIPTION = extern struct {
    ExtensionType: u16,
    HandshakeType: u16,
};

pub const SUBSCRIBE_GENERIC_TLS_EXTENSION = extern struct {
    Flags: u32,
    SubscriptionsCount: u32,
    Subscriptions: [1]TLS_EXTENSION_SUBSCRIPTION,
};

pub const SCHANNEL_CERT_HASH = extern struct {
    dwLength: u32,
    dwFlags: u32,
    hProv: usize,
    ShaHash: [20]u8,
};

pub const SCHANNEL_CERT_HASH_STORE = extern struct {
    dwLength: u32,
    dwFlags: u32,
    hProv: usize,
    ShaHash: [20]u8,
    pwszStoreName: [128]u16,
};

pub const SCHANNEL_ALERT_TOKEN = extern struct {
    dwTokenType: u32,
    dwAlertType: SCHANNEL_ALERT_TOKEN_ALERT_TYPE,
    dwAlertNumber: u32,
};

pub const SCHANNEL_SESSION_TOKEN = extern struct {
    dwTokenType: u32,
    dwFlags: SCHANNEL_SESSION_TOKEN_FLAGS,
};

pub const SCHANNEL_CLIENT_SIGNATURE = extern struct {
    cbLength: u32,
    aiHash: u32,
    cbHash: u32,
    HashValue: [36]u8,
    CertThumbprint: [20]u8,
};

pub const SSL_EMPTY_CACHE_FN_A = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        pszTargetName: ?PSTR,
        dwFlags: u32,
    ) callconv(@import("std").os.windows.WINAPI) BOOL,
    else => *const fn (
        pszTargetName: ?PSTR,
        dwFlags: u32,
    ) callconv(@import("std").os.windows.WINAPI) BOOL,
};

pub const SSL_EMPTY_CACHE_FN_W = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        pszTargetName: ?PWSTR,
        dwFlags: u32,
    ) callconv(@import("std").os.windows.WINAPI) BOOL,
    else => *const fn (
        pszTargetName: ?PWSTR,
        dwFlags: u32,
    ) callconv(@import("std").os.windows.WINAPI) BOOL,
};

pub const SSL_CREDENTIAL_CERTIFICATE = extern struct {
    cbPrivateKey: u32,
    pPrivateKey: ?*u8,
    cbCertificate: u32,
    pCertificate: ?*u8,
    pszPassword: ?PSTR,
};

pub const SCH_CRED = extern struct {
    dwVersion: u32,
    cCreds: u32,
    paSecret: ?*?*anyopaque,
    paPublic: ?*?*anyopaque,
    cMappers: u32,
    aphMappers: ?*?*_HMAPPER,
};

pub const SCH_CRED_SECRET_CAPI = extern struct {
    dwType: u32,
    hProv: usize,
};

pub const SCH_CRED_SECRET_PRIVKEY = extern struct {
    dwType: u32,
    pPrivateKey: ?*u8,
    cbPrivateKey: u32,
    pszPassword: ?PSTR,
};

pub const SCH_CRED_PUBLIC_CERTCHAIN = extern struct {
    dwType: u32,
    cbCertChain: u32,
    pCertChain: ?*u8,
};

pub const PctPublicKey = extern struct {
    Type: u32,
    cbKey: u32,
    pKey: [1]u8,
};

pub const X509Certificate = extern struct {
    Version: u32,
    SerialNumber: [4]u32,
    SignatureAlgorithm: u32,
    ValidFrom: FILETIME,
    ValidUntil: FILETIME,
    pszIssuer: ?PSTR,
    pszSubject: ?PSTR,
    pPublicKey: ?*PctPublicKey,
};

pub const SSL_CRACK_CERTIFICATE_FN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        pbCertificate: ?*u8,
        cbCertificate: u32,
        VerifySignature: BOOL,
        ppCertificate: ?*?*X509Certificate,
    ) callconv(@import("std").os.windows.WINAPI) BOOL,
    else => *const fn (
        pbCertificate: ?*u8,
        cbCertificate: u32,
        VerifySignature: BOOL,
        ppCertificate: ?*?*X509Certificate,
    ) callconv(@import("std").os.windows.WINAPI) BOOL,
};

pub const SSL_FREE_CERTIFICATE_FN = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        pCertificate: ?*X509Certificate,
    ) callconv(@import("std").os.windows.WINAPI) void,
    else => *const fn (
        pCertificate: ?*X509Certificate,
    ) callconv(@import("std").os.windows.WINAPI) void,
};

pub const SslGetServerIdentityFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        // TODO: what to do with BytesParamIndex 1?
        ClientHello: ?*u8,
        ClientHelloSize: u32,
        ServerIdentity: ?*?*u8,
        ServerIdentitySize: ?*u32,
        Flags: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        // TODO: what to do with BytesParamIndex 1?
        ClientHello: ?*u8,
        ClientHelloSize: u32,
        ServerIdentity: ?*?*u8,
        ServerIdentitySize: ?*u32,
        Flags: u32,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const SCH_EXTENSION_DATA = extern struct {
    ExtensionType: u16,
    pExtData: ?*const u8,
    cbExtData: u32,
};

pub const SchGetExtensionsOptions = enum(u32) {
    EXTENSIONS_OPTIONS_NONE = 0,
    NO_RECORD_HEADER = 1,
    _,
    pub fn initFlags(o: struct {
        EXTENSIONS_OPTIONS_NONE: u1 = 0,
        NO_RECORD_HEADER: u1 = 0,
    }) SchGetExtensionsOptions {
        return @as(SchGetExtensionsOptions, @enumFromInt((if (o.EXTENSIONS_OPTIONS_NONE == 1) @intFromEnum(SchGetExtensionsOptions.EXTENSIONS_OPTIONS_NONE) else 0) | (if (o.NO_RECORD_HEADER == 1) @intFromEnum(SchGetExtensionsOptions.NO_RECORD_HEADER) else 0)));
    }
};
pub const SCH_EXTENSIONS_OPTIONS_NONE = SchGetExtensionsOptions.EXTENSIONS_OPTIONS_NONE;
pub const SCH_NO_RECORD_HEADER = SchGetExtensionsOptions.NO_RECORD_HEADER;

pub const SslGetExtensionsFn = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        clientHello: [*:0]const u8,
        clientHelloByteSize: u32,
        genericExtensions: [*]SCH_EXTENSION_DATA,
        genericExtensionsCount: u8,
        bytesToRead: ?*u32,
        flags: SchGetExtensionsOptions,
    ) callconv(@import("std").os.windows.WINAPI) i32,
    else => *const fn (
        clientHello: [*:0]const u8,
        clientHelloByteSize: u32,
        genericExtensions: [*]SCH_EXTENSION_DATA,
        genericExtensionsCount: u8,
        bytesToRead: ?*u32,
        flags: SchGetExtensionsOptions,
    ) callconv(@import("std").os.windows.WINAPI) i32,
};

pub const LOGON_HOURS = extern struct {
    UnitsPerWeek: u16,
    LogonHours: ?*u8,
};

pub const SR_SECURITY_DESCRIPTOR = extern struct {
    Length: u32,
    SecurityDescriptor: ?*u8,
};

pub const USER_ALL_INFORMATION = extern struct {
    LastLogon: LARGE_INTEGER align(4),
    LastLogoff: LARGE_INTEGER align(4),
    PasswordLastSet: LARGE_INTEGER align(4),
    AccountExpires: LARGE_INTEGER align(4),
    PasswordCanChange: LARGE_INTEGER align(4),
    PasswordMustChange: LARGE_INTEGER align(4),
    UserName: UNICODE_STRING align(4),
    FullName: UNICODE_STRING align(4),
    HomeDirectory: UNICODE_STRING align(4),
    HomeDirectoryDrive: UNICODE_STRING align(4),
    ScriptPath: UNICODE_STRING align(4),
    ProfilePath: UNICODE_STRING align(4),
    AdminComment: UNICODE_STRING align(4),
    WorkStations: UNICODE_STRING align(4),
    UserComment: UNICODE_STRING align(4),
    Parameters: UNICODE_STRING align(4),
    LmPassword: UNICODE_STRING align(4),
    NtPassword: UNICODE_STRING align(4),
    PrivateData: UNICODE_STRING align(4),
    SecurityDescriptor: SR_SECURITY_DESCRIPTOR align(4),
    UserId: u32 align(4),
    PrimaryGroupId: u32 align(4),
    UserAccountControl: u32 align(4),
    WhichFields: u32 align(4),
    LogonHours: LOGON_HOURS align(4),
    BadPasswordCount: u16 align(4),
    LogonCount: u16 align(4),
    CountryCode: u16 align(4),
    CodePage: u16 align(4),
    LmPasswordPresent: BOOLEAN align(4),
    NtPasswordPresent: BOOLEAN align(4),
    PasswordExpired: BOOLEAN align(4),
    PrivateDataSensitive: BOOLEAN align(4),
};

pub const CLEAR_BLOCK = extern struct {
    data: [8]CHAR,
};

pub const USER_SESSION_KEY = extern struct {
    data: [2]CYPHER_BLOCK,
};

pub const NETLOGON_LOGON_INFO_CLASS = enum(i32) {
    InteractiveInformation = 1,
    NetworkInformation = 2,
    ServiceInformation = 3,
    GenericInformation = 4,
    InteractiveTransitiveInformation = 5,
    NetworkTransitiveInformation = 6,
    ServiceTransitiveInformation = 7,
};
pub const NetlogonInteractiveInformation = NETLOGON_LOGON_INFO_CLASS.InteractiveInformation;
pub const NetlogonNetworkInformation = NETLOGON_LOGON_INFO_CLASS.NetworkInformation;
pub const NetlogonServiceInformation = NETLOGON_LOGON_INFO_CLASS.ServiceInformation;
pub const NetlogonGenericInformation = NETLOGON_LOGON_INFO_CLASS.GenericInformation;
pub const NetlogonInteractiveTransitiveInformation = NETLOGON_LOGON_INFO_CLASS.InteractiveTransitiveInformation;
pub const NetlogonNetworkTransitiveInformation = NETLOGON_LOGON_INFO_CLASS.NetworkTransitiveInformation;
pub const NetlogonServiceTransitiveInformation = NETLOGON_LOGON_INFO_CLASS.ServiceTransitiveInformation;

pub const NETLOGON_LOGON_IDENTITY_INFO = extern struct {
    LogonDomainName: UNICODE_STRING,
    ParameterControl: u32,
    LogonId: LARGE_INTEGER,
    UserName: UNICODE_STRING,
    Workstation: UNICODE_STRING,
};

pub const NETLOGON_INTERACTIVE_INFO = extern struct {
    Identity: NETLOGON_LOGON_IDENTITY_INFO,
    LmOwfPassword: LM_OWF_PASSWORD,
    NtOwfPassword: LM_OWF_PASSWORD,
};

pub const NETLOGON_SERVICE_INFO = extern struct {
    Identity: NETLOGON_LOGON_IDENTITY_INFO,
    LmOwfPassword: LM_OWF_PASSWORD,
    NtOwfPassword: LM_OWF_PASSWORD,
};

pub const NETLOGON_NETWORK_INFO = extern struct {
    Identity: NETLOGON_LOGON_IDENTITY_INFO,
    LmChallenge: CLEAR_BLOCK,
    NtChallengeResponse: STRING,
    LmChallengeResponse: STRING,
};

pub const NETLOGON_GENERIC_INFO = extern struct {
    Identity: NETLOGON_LOGON_IDENTITY_INFO,
    PackageName: UNICODE_STRING,
    DataLength: u32,
    LogonData: ?*u8,
};

pub const MSV1_0_VALIDATION_INFO = extern struct {
    LogoffTime: LARGE_INTEGER,
    KickoffTime: LARGE_INTEGER,
    LogonServer: UNICODE_STRING,
    LogonDomainName: UNICODE_STRING,
    SessionKey: USER_SESSION_KEY,
    Authoritative: BOOLEAN,
    UserFlags: u32,
    WhichFields: u32,
    UserId: u32,
};

pub const TOKENBINDING_TYPE = enum(i32) {
    PROVIDED = 0,
    REFERRED = 1,
};
pub const TOKENBINDING_TYPE_PROVIDED = TOKENBINDING_TYPE.PROVIDED;
pub const TOKENBINDING_TYPE_REFERRED = TOKENBINDING_TYPE.REFERRED;

pub const TOKENBINDING_EXTENSION_FORMAT = enum(i32) {
    D = 0,
};
pub const TOKENBINDING_EXTENSION_FORMAT_UNDEFINED = TOKENBINDING_EXTENSION_FORMAT.D;

pub const TOKENBINDING_KEY_PARAMETERS_TYPE = enum(i32) {
    RSA2048_PKCS = 0,
    RSA2048_PSS = 1,
    ECDSAP256 = 2,
    ANYEXISTING = 255,
};
pub const TOKENBINDING_KEY_PARAMETERS_TYPE_RSA2048_PKCS = TOKENBINDING_KEY_PARAMETERS_TYPE.RSA2048_PKCS;
pub const TOKENBINDING_KEY_PARAMETERS_TYPE_RSA2048_PSS = TOKENBINDING_KEY_PARAMETERS_TYPE.RSA2048_PSS;
pub const TOKENBINDING_KEY_PARAMETERS_TYPE_ECDSAP256 = TOKENBINDING_KEY_PARAMETERS_TYPE.ECDSAP256;
pub const TOKENBINDING_KEY_PARAMETERS_TYPE_ANYEXISTING = TOKENBINDING_KEY_PARAMETERS_TYPE.ANYEXISTING;

pub const TOKENBINDING_IDENTIFIER = extern struct {
    keyType: u8,
};

pub const TOKENBINDING_RESULT_DATA = extern struct {
    bindingType: TOKENBINDING_TYPE,
    identifierSize: u32,
    identifierData: ?*TOKENBINDING_IDENTIFIER,
    extensionFormat: TOKENBINDING_EXTENSION_FORMAT,
    extensionSize: u32,
    extensionData: ?*anyopaque,
};

pub const TOKENBINDING_RESULT_LIST = extern struct {
    resultCount: u32,
    resultData: ?*TOKENBINDING_RESULT_DATA,
};

pub const TOKENBINDING_KEY_TYPES = extern struct {
    keyCount: u32,
    keyType: ?*TOKENBINDING_KEY_PARAMETERS_TYPE,
};

pub const EXTENDED_NAME_FORMAT = enum(i32) {
    Unknown = 0,
    FullyQualifiedDN = 1,
    SamCompatible = 2,
    Display = 3,
    UniqueId = 6,
    Canonical = 7,
    UserPrincipal = 8,
    CanonicalEx = 9,
    ServicePrincipal = 10,
    DnsDomain = 12,
    GivenName = 13,
    Surname = 14,
};
pub const NameUnknown = EXTENDED_NAME_FORMAT.Unknown;
pub const NameFullyQualifiedDN = EXTENDED_NAME_FORMAT.FullyQualifiedDN;
pub const NameSamCompatible = EXTENDED_NAME_FORMAT.SamCompatible;
pub const NameDisplay = EXTENDED_NAME_FORMAT.Display;
pub const NameUniqueId = EXTENDED_NAME_FORMAT.UniqueId;
pub const NameCanonical = EXTENDED_NAME_FORMAT.Canonical;
pub const NameUserPrincipal = EXTENDED_NAME_FORMAT.UserPrincipal;
pub const NameCanonicalEx = EXTENDED_NAME_FORMAT.CanonicalEx;
pub const NameServicePrincipal = EXTENDED_NAME_FORMAT.ServicePrincipal;
pub const NameDnsDomain = EXTENDED_NAME_FORMAT.DnsDomain;
pub const NameGivenName = EXTENDED_NAME_FORMAT.GivenName;
pub const NameSurname = EXTENDED_NAME_FORMAT.Surname;

pub const SLDATATYPE = enum(u32) {
    NONE = 0,
    SZ = 1,
    DWORD = 4,
    BINARY = 3,
    MULTI_SZ = 7,
    SUM = 100,
};
pub const SL_DATA_NONE = SLDATATYPE.NONE;
pub const SL_DATA_SZ = SLDATATYPE.SZ;
pub const SL_DATA_DWORD = SLDATATYPE.DWORD;
pub const SL_DATA_BINARY = SLDATATYPE.BINARY;
pub const SL_DATA_MULTI_SZ = SLDATATYPE.MULTI_SZ;
pub const SL_DATA_SUM = SLDATATYPE.SUM;

pub const SLIDTYPE = enum(i32) {
    APPLICATION = 0,
    PRODUCT_SKU = 1,
    LICENSE_FILE = 2,
    LICENSE = 3,
    PKEY = 4,
    ALL_LICENSES = 5,
    ALL_LICENSE_FILES = 6,
    STORE_TOKEN = 7,
    LAST = 8,
};
pub const SL_ID_APPLICATION = SLIDTYPE.APPLICATION;
pub const SL_ID_PRODUCT_SKU = SLIDTYPE.PRODUCT_SKU;
pub const SL_ID_LICENSE_FILE = SLIDTYPE.LICENSE_FILE;
pub const SL_ID_LICENSE = SLIDTYPE.LICENSE;
pub const SL_ID_PKEY = SLIDTYPE.PKEY;
pub const SL_ID_ALL_LICENSES = SLIDTYPE.ALL_LICENSES;
pub const SL_ID_ALL_LICENSE_FILES = SLIDTYPE.ALL_LICENSE_FILES;
pub const SL_ID_STORE_TOKEN = SLIDTYPE.STORE_TOKEN;
pub const SL_ID_LAST = SLIDTYPE.LAST;

pub const SLLICENSINGSTATUS = enum(i32) {
    UNLICENSED = 0,
    LICENSED = 1,
    IN_GRACE_PERIOD = 2,
    NOTIFICATION = 3,
    LAST = 4,
};
pub const SL_LICENSING_STATUS_UNLICENSED = SLLICENSINGSTATUS.UNLICENSED;
pub const SL_LICENSING_STATUS_LICENSED = SLLICENSINGSTATUS.LICENSED;
pub const SL_LICENSING_STATUS_IN_GRACE_PERIOD = SLLICENSINGSTATUS.IN_GRACE_PERIOD;
pub const SL_LICENSING_STATUS_NOTIFICATION = SLLICENSINGSTATUS.NOTIFICATION;
pub const SL_LICENSING_STATUS_LAST = SLLICENSINGSTATUS.LAST;

pub const SL_LICENSING_STATUS = extern struct {
    SkuId: Guid,
    eStatus: SLLICENSINGSTATUS,
    dwGraceTime: u32,
    dwTotalGraceDays: u32,
    hrReason: HRESULT,
    qwValidityExpiration: u64,
};

pub const SL_ACTIVATION_TYPE = enum(i32) {
    DEFAULT = 0,
    ACTIVE_DIRECTORY = 1,
};
pub const SL_ACTIVATION_TYPE_DEFAULT = SL_ACTIVATION_TYPE.DEFAULT;
pub const SL_ACTIVATION_TYPE_ACTIVE_DIRECTORY = SL_ACTIVATION_TYPE.ACTIVE_DIRECTORY;

pub const SL_ACTIVATION_INFO_HEADER = extern struct {
    cbSize: u32,
    type: SL_ACTIVATION_TYPE,
};

pub const SL_AD_ACTIVATION_INFO = extern struct {
    header: SL_ACTIVATION_INFO_HEADER,
    pwszProductKey: ?[*:0]const u16,
    pwszActivationObjectName: ?[*:0]const u16,
};

pub const SLREFERRALTYPE = enum(i32) {
    SKUID = 0,
    APPID = 1,
    OVERRIDE_SKUID = 2,
    OVERRIDE_APPID = 3,
    BEST_MATCH = 4,
};
pub const SL_REFERRALTYPE_SKUID = SLREFERRALTYPE.SKUID;
pub const SL_REFERRALTYPE_APPID = SLREFERRALTYPE.APPID;
pub const SL_REFERRALTYPE_OVERRIDE_SKUID = SLREFERRALTYPE.OVERRIDE_SKUID;
pub const SL_REFERRALTYPE_OVERRIDE_APPID = SLREFERRALTYPE.OVERRIDE_APPID;
pub const SL_REFERRALTYPE_BEST_MATCH = SLREFERRALTYPE.BEST_MATCH;

pub const SL_GENUINE_STATE = enum(i32) {
    IS_GENUINE = 0,
    INVALID_LICENSE = 1,
    TAMPERED = 2,
    OFFLINE = 3,
    LAST = 4,
};
pub const SL_GEN_STATE_IS_GENUINE = SL_GENUINE_STATE.IS_GENUINE;
pub const SL_GEN_STATE_INVALID_LICENSE = SL_GENUINE_STATE.INVALID_LICENSE;
pub const SL_GEN_STATE_TAMPERED = SL_GENUINE_STATE.TAMPERED;
pub const SL_GEN_STATE_OFFLINE = SL_GENUINE_STATE.OFFLINE;
pub const SL_GEN_STATE_LAST = SL_GENUINE_STATE.LAST;

pub const SL_NONGENUINE_UI_OPTIONS = extern struct {
    cbSize: u32,
    pComponentId: ?*const Guid,
    hResultUI: HRESULT,
};

pub const SL_SYSTEM_POLICY_INFORMATION = extern struct {
    Reserved1: [2]?*anyopaque,
    Reserved2: [3]u32,
};

const IID_ICcgDomainAuthCredentials_Value = Guid.initString("6ecda518-2010-4437-8bc3-46e752b7b172");
pub const IID_ICcgDomainAuthCredentials = &IID_ICcgDomainAuthCredentials_Value;
pub const ICcgDomainAuthCredentials = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        GetPasswordCredentials: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const ICcgDomainAuthCredentials,
                pluginInput: ?[*:0]const u16,
                domainName: ?*?PWSTR,
                username: ?*?PWSTR,
                password: ?*?PWSTR,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const ICcgDomainAuthCredentials,
                pluginInput: ?[*:0]const u16,
                domainName: ?*?PWSTR,
                username: ?*?PWSTR,
                password: ?*?PWSTR,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn ICcgDomainAuthCredentials_GetPasswordCredentials(self: *const T, pluginInput: ?[*:0]const u16, domainName: ?*?PWSTR, username: ?*?PWSTR, password: ?*?PWSTR) HRESULT {
                return @as(*const ICcgDomainAuthCredentials.VTable, @ptrCast(self.vtable)).GetPasswordCredentials(@as(*const ICcgDomainAuthCredentials, @ptrCast(self)), pluginInput, domainName, username, password);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

//--------------------------------------------------------------------------------
// Section: Functions (211)
//--------------------------------------------------------------------------------
// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn LsaRegisterLogonProcess(
    LogonProcessName: ?*STRING,
    LsaHandle: ?*LsaHandle,
    SecurityMode: ?*u32,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn LsaLogonUser(
    LsaHandle: ?HANDLE,
    OriginName: ?*STRING,
    LogonType: SECURITY_LOGON_TYPE,
    AuthenticationPackage: u32,
    // TODO: what to do with BytesParamIndex 5?
    AuthenticationInformation: ?*anyopaque,
    AuthenticationInformationLength: u32,
    LocalGroups: ?*TOKEN_GROUPS,
    SourceContext: ?*TOKEN_SOURCE,
    ProfileBuffer: ?*?*anyopaque,
    ProfileBufferLength: ?*u32,
    LogonId: ?*LUID,
    Token: ?*?HANDLE,
    Quotas: ?*QUOTA_LIMITS,
    SubStatus: ?*i32,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn LsaLookupAuthenticationPackage(
    LsaHandle: ?HANDLE,
    PackageName: ?*STRING,
    AuthenticationPackage: ?*u32,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn LsaFreeReturnBuffer(
    Buffer: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn LsaCallAuthenticationPackage(
    LsaHandle: ?HANDLE,
    AuthenticationPackage: u32,
    // TODO: what to do with BytesParamIndex 3?
    ProtocolSubmitBuffer: ?*anyopaque,
    SubmitBufferLength: u32,
    ProtocolReturnBuffer: ?*?*anyopaque,
    ReturnBufferLength: ?*u32,
    ProtocolStatus: ?*i32,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn LsaDeregisterLogonProcess(
    LsaHandle: LsaHandle,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn LsaConnectUntrusted(
    LsaHandle: ?*?HANDLE,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaFreeMemory(
    Buffer: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaClose(
    ObjectHandle: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn LsaEnumerateLogonSessions(
    LogonSessionCount: ?*u32,
    LogonSessionList: ?*?*LUID,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn LsaGetLogonSessionData(
    LogonId: ?*LUID,
    ppLogonSessionData: ?*?*SECURITY_LOGON_SESSION_DATA,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaOpenPolicy(
    SystemName: ?*UNICODE_STRING,
    ObjectAttributes: ?*OBJECT_ATTRIBUTES,
    DesiredAccess: u32,
    PolicyHandle: ?*?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

pub extern "advapi32" fn LsaSetCAPs(
    CAPDNs: ?[*]UNICODE_STRING,
    CAPDNCount: u32,
    Flags: u32,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows8.0'
pub extern "advapi32" fn LsaGetAppliedCAPIDs(
    SystemName: ?*UNICODE_STRING,
    CAPIDs: ?*?*?PSID,
    CAPIDCount: ?*u32,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows8.0'
pub extern "advapi32" fn LsaQueryCAPs(
    CAPIDs: ?[*]?PSID,
    CAPIDCount: u32,
    CAPs: ?*?*CENTRAL_ACCESS_POLICY,
    CAPCount: ?*u32,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaQueryInformationPolicy(
    PolicyHandle: ?*anyopaque,
    InformationClass: POLICY_INFORMATION_CLASS,
    Buffer: ?*?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaSetInformationPolicy(
    PolicyHandle: ?*anyopaque,
    InformationClass: POLICY_INFORMATION_CLASS,
    Buffer: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaQueryDomainInformationPolicy(
    PolicyHandle: ?*anyopaque,
    InformationClass: POLICY_DOMAIN_INFORMATION_CLASS,
    Buffer: ?*?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaSetDomainInformationPolicy(
    PolicyHandle: ?*anyopaque,
    InformationClass: POLICY_DOMAIN_INFORMATION_CLASS,
    Buffer: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn LsaRegisterPolicyChangeNotification(
    InformationClass: POLICY_NOTIFICATION_INFORMATION_CLASS,
    NotificationEventHandle: ?HANDLE,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn LsaUnregisterPolicyChangeNotification(
    InformationClass: POLICY_NOTIFICATION_INFORMATION_CLASS,
    NotificationEventHandle: ?HANDLE,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaEnumerateTrustedDomains(
    PolicyHandle: ?*anyopaque,
    EnumerationContext: ?*u32,
    Buffer: ?*?*anyopaque,
    PreferedMaximumLength: u32,
    CountReturned: ?*u32,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaLookupNames(
    PolicyHandle: ?*anyopaque,
    Count: u32,
    Names: ?*UNICODE_STRING,
    ReferencedDomains: ?*?*LSA_REFERENCED_DOMAIN_LIST,
    Sids: ?*?*LSA_TRANSLATED_SID,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaLookupNames2(
    PolicyHandle: ?*anyopaque,
    Flags: u32,
    Count: u32,
    Names: ?*UNICODE_STRING,
    ReferencedDomains: ?*?*LSA_REFERENCED_DOMAIN_LIST,
    Sids: ?*?*LSA_TRANSLATED_SID2,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaLookupSids(
    PolicyHandle: ?*anyopaque,
    Count: u32,
    Sids: ?*?PSID,
    ReferencedDomains: ?*?*LSA_REFERENCED_DOMAIN_LIST,
    Names: ?*?*LSA_TRANSLATED_NAME,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows8.0'
pub extern "advapi32" fn LsaLookupSids2(
    PolicyHandle: ?*anyopaque,
    LookupOptions: u32,
    Count: u32,
    Sids: ?*?PSID,
    ReferencedDomains: ?*?*LSA_REFERENCED_DOMAIN_LIST,
    Names: ?*?*LSA_TRANSLATED_NAME,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaEnumerateAccountsWithUserRight(
    PolicyHandle: ?*anyopaque,
    UserRight: ?*UNICODE_STRING,
    Buffer: ?*?*anyopaque,
    CountReturned: ?*u32,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaEnumerateAccountRights(
    PolicyHandle: ?*anyopaque,
    AccountSid: ?PSID,
    UserRights: ?*?*UNICODE_STRING,
    CountOfRights: ?*u32,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaAddAccountRights(
    PolicyHandle: ?*anyopaque,
    AccountSid: ?PSID,
    UserRights: [*]UNICODE_STRING,
    CountOfRights: u32,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaRemoveAccountRights(
    PolicyHandle: ?*anyopaque,
    AccountSid: ?PSID,
    AllRights: BOOLEAN,
    UserRights: ?[*]UNICODE_STRING,
    CountOfRights: u32,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaOpenTrustedDomainByName(
    PolicyHandle: ?*anyopaque,
    TrustedDomainName: ?*UNICODE_STRING,
    DesiredAccess: u32,
    TrustedDomainHandle: ?*?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaQueryTrustedDomainInfo(
    PolicyHandle: ?*anyopaque,
    TrustedDomainSid: ?PSID,
    InformationClass: TRUSTED_INFORMATION_CLASS,
    Buffer: ?*?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaSetTrustedDomainInformation(
    PolicyHandle: ?*anyopaque,
    TrustedDomainSid: ?PSID,
    InformationClass: TRUSTED_INFORMATION_CLASS,
    Buffer: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaDeleteTrustedDomain(
    PolicyHandle: ?*anyopaque,
    TrustedDomainSid: ?PSID,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaQueryTrustedDomainInfoByName(
    PolicyHandle: ?*anyopaque,
    TrustedDomainName: ?*UNICODE_STRING,
    InformationClass: TRUSTED_INFORMATION_CLASS,
    Buffer: ?*?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaSetTrustedDomainInfoByName(
    PolicyHandle: ?*anyopaque,
    TrustedDomainName: ?*UNICODE_STRING,
    InformationClass: TRUSTED_INFORMATION_CLASS,
    Buffer: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaEnumerateTrustedDomainsEx(
    PolicyHandle: ?*anyopaque,
    EnumerationContext: ?*u32,
    Buffer: ?*?*anyopaque,
    PreferedMaximumLength: u32,
    CountReturned: ?*u32,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaCreateTrustedDomainEx(
    PolicyHandle: ?*anyopaque,
    TrustedDomainInformation: ?*TRUSTED_DOMAIN_INFORMATION_EX,
    AuthenticationInformation: ?*TRUSTED_DOMAIN_AUTH_INFORMATION,
    DesiredAccess: u32,
    TrustedDomainHandle: ?*?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windowsServer2003'
pub extern "advapi32" fn LsaQueryForestTrustInformation(
    PolicyHandle: ?*anyopaque,
    TrustedDomainName: ?*UNICODE_STRING,
    ForestTrustInfo: ?*?*LSA_FOREST_TRUST_INFORMATION,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windowsServer2003'
pub extern "advapi32" fn LsaSetForestTrustInformation(
    PolicyHandle: ?*anyopaque,
    TrustedDomainName: ?*UNICODE_STRING,
    ForestTrustInfo: ?*LSA_FOREST_TRUST_INFORMATION,
    CheckOnly: BOOLEAN,
    CollisionInfo: ?*?*LSA_FOREST_TRUST_COLLISION_INFORMATION,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaStorePrivateData(
    PolicyHandle: ?*anyopaque,
    KeyName: ?*UNICODE_STRING,
    PrivateData: ?*UNICODE_STRING,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaRetrievePrivateData(
    PolicyHandle: ?*anyopaque,
    KeyName: ?*UNICODE_STRING,
    PrivateData: ?*?*UNICODE_STRING,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "advapi32" fn LsaNtStatusToWinError(
    Status: NTSTATUS,
) callconv(@import("std").os.windows.WINAPI) u32;

pub extern "advapi32" fn SystemFunction036(
    // TODO: what to do with BytesParamIndex 1?
    RandomBuffer: ?*anyopaque,
    RandomBufferLength: u32,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

pub extern "advapi32" fn SystemFunction040(
    // TODO: what to do with BytesParamIndex 1?
    Memory: ?*anyopaque,
    MemorySize: u32,
    OptionFlags: u32,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

pub extern "advapi32" fn SystemFunction041(
    // TODO: what to do with BytesParamIndex 1?
    Memory: ?*anyopaque,
    MemorySize: u32,
    OptionFlags: u32,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "advapi32" fn AuditSetSystemPolicy(
    pAuditPolicy: [*]AUDIT_POLICY_INFORMATION,
    dwPolicyCount: u32,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "advapi32" fn AuditSetPerUserPolicy(
    pSid: ?PSID,
    pAuditPolicy: [*]AUDIT_POLICY_INFORMATION,
    dwPolicyCount: u32,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "advapi32" fn AuditQuerySystemPolicy(
    pSubCategoryGuids: [*]const Guid,
    dwPolicyCount: u32,
    ppAuditPolicy: ?*?*AUDIT_POLICY_INFORMATION,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "advapi32" fn AuditQueryPerUserPolicy(
    pSid: ?PSID,
    pSubCategoryGuids: [*]const Guid,
    dwPolicyCount: u32,
    ppAuditPolicy: ?*?*AUDIT_POLICY_INFORMATION,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "advapi32" fn AuditEnumeratePerUserPolicy(
    ppAuditSidArray: ?*?*POLICY_AUDIT_SID_ARRAY,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "advapi32" fn AuditComputeEffectivePolicyBySid(
    pSid: ?PSID,
    pSubCategoryGuids: [*]const Guid,
    dwPolicyCount: u32,
    ppAuditPolicy: ?*?*AUDIT_POLICY_INFORMATION,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "advapi32" fn AuditComputeEffectivePolicyByToken(
    hTokenHandle: ?HANDLE,
    pSubCategoryGuids: [*]const Guid,
    dwPolicyCount: u32,
    ppAuditPolicy: ?*?*AUDIT_POLICY_INFORMATION,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "advapi32" fn AuditEnumerateCategories(
    ppAuditCategoriesArray: ?*?*Guid,
    pdwCountReturned: ?*u32,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "advapi32" fn AuditEnumerateSubCategories(
    pAuditCategoryGuid: ?*const Guid,
    bRetrieveAllSubCategories: BOOLEAN,
    ppAuditSubCategoriesArray: ?*?*Guid,
    pdwCountReturned: ?*u32,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "advapi32" fn AuditLookupCategoryNameW(
    pAuditCategoryGuid: ?*const Guid,
    ppszCategoryName: ?*?PWSTR,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "advapi32" fn AuditLookupCategoryNameA(
    pAuditCategoryGuid: ?*const Guid,
    ppszCategoryName: ?*?PSTR,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "advapi32" fn AuditLookupSubCategoryNameW(
    pAuditSubCategoryGuid: ?*const Guid,
    ppszSubCategoryName: ?*?PWSTR,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "advapi32" fn AuditLookupSubCategoryNameA(
    pAuditSubCategoryGuid: ?*const Guid,
    ppszSubCategoryName: ?*?PSTR,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "advapi32" fn AuditLookupCategoryIdFromCategoryGuid(
    pAuditCategoryGuid: ?*const Guid,
    pAuditCategoryId: ?*POLICY_AUDIT_EVENT_TYPE,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "advapi32" fn AuditLookupCategoryGuidFromCategoryId(
    AuditCategoryId: POLICY_AUDIT_EVENT_TYPE,
    pAuditCategoryGuid: ?*Guid,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "advapi32" fn AuditSetSecurity(
    SecurityInformation: u32,
    pSecurityDescriptor: ?*SECURITY_DESCRIPTOR,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "advapi32" fn AuditQuerySecurity(
    SecurityInformation: u32,
    ppSecurityDescriptor: ?*?*SECURITY_DESCRIPTOR,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.1'
pub extern "advapi32" fn AuditSetGlobalSaclW(
    ObjectTypeName: ?[*:0]const u16,
    Acl: ?*ACL,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.1'
pub extern "advapi32" fn AuditSetGlobalSaclA(
    ObjectTypeName: ?[*:0]const u8,
    Acl: ?*ACL,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.1'
pub extern "advapi32" fn AuditQueryGlobalSaclW(
    ObjectTypeName: ?[*:0]const u16,
    Acl: ?*?*ACL,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.1'
pub extern "advapi32" fn AuditQueryGlobalSaclA(
    ObjectTypeName: ?[*:0]const u8,
    Acl: ?*?*ACL,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "advapi32" fn AuditFree(
    Buffer: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) void;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "secur32" fn AcquireCredentialsHandleW(
    pszPrincipal: ?PWSTR,
    pszPackage: ?PWSTR,
    fCredentialUse: SECPKG_CRED,
    pvLogonId: ?*anyopaque,
    pAuthData: ?*anyopaque,
    pGetKeyFn: ?SEC_GET_KEY_FN,
    pvGetKeyArgument: ?*anyopaque,
    phCredential: ?*SecHandle,
    ptsExpiry: ?*LARGE_INTEGER,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "secur32" fn AcquireCredentialsHandleA(
    pszPrincipal: ?PSTR,
    pszPackage: ?PSTR,
    fCredentialUse: SECPKG_CRED,
    pvLogonId: ?*anyopaque,
    pAuthData: ?*anyopaque,
    pGetKeyFn: ?SEC_GET_KEY_FN,
    pvGetKeyArgument: ?*anyopaque,
    phCredential: ?*SecHandle,
    ptsExpiry: ?*LARGE_INTEGER,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn FreeCredentialsHandle(
    phCredential: ?*SecHandle,
) callconv(@import("std").os.windows.WINAPI) i32;

pub extern "secur32" fn AddCredentialsW(
    hCredentials: ?*SecHandle,
    pszPrincipal: ?PWSTR,
    pszPackage: ?PWSTR,
    fCredentialUse: u32,
    pAuthData: ?*anyopaque,
    pGetKeyFn: ?SEC_GET_KEY_FN,
    pvGetKeyArgument: ?*anyopaque,
    ptsExpiry: ?*LARGE_INTEGER,
) callconv(@import("std").os.windows.WINAPI) i32;

pub extern "secur32" fn AddCredentialsA(
    hCredentials: ?*SecHandle,
    pszPrincipal: ?PSTR,
    pszPackage: ?PSTR,
    fCredentialUse: u32,
    pAuthData: ?*anyopaque,
    pGetKeyFn: ?SEC_GET_KEY_FN,
    pvGetKeyArgument: ?*anyopaque,
    ptsExpiry: ?*LARGE_INTEGER,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "secur32" fn ChangeAccountPasswordW(
    pszPackageName: ?*u16,
    pszDomainName: ?*u16,
    pszAccountName: ?*u16,
    pszOldPassword: ?*u16,
    pszNewPassword: ?*u16,
    bImpersonating: BOOLEAN,
    dwReserved: u32,
    pOutput: ?*SecBufferDesc,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "secur32" fn ChangeAccountPasswordA(
    pszPackageName: ?*i8,
    pszDomainName: ?*i8,
    pszAccountName: ?*i8,
    pszOldPassword: ?*i8,
    pszNewPassword: ?*i8,
    bImpersonating: BOOLEAN,
    dwReserved: u32,
    pOutput: ?*SecBufferDesc,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn InitializeSecurityContextW(
    phCredential: ?*SecHandle,
    phContext: ?*SecHandle,
    pszTargetName: ?*u16,
    fContextReq: u32,
    Reserved1: u32,
    TargetDataRep: u32,
    pInput: ?*SecBufferDesc,
    Reserved2: u32,
    phNewContext: ?*SecHandle,
    pOutput: ?*SecBufferDesc,
    pfContextAttr: ?*u32,
    ptsExpiry: ?*LARGE_INTEGER,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn InitializeSecurityContextA(
    phCredential: ?*SecHandle,
    phContext: ?*SecHandle,
    pszTargetName: ?*i8,
    fContextReq: u32,
    Reserved1: u32,
    TargetDataRep: u32,
    pInput: ?*SecBufferDesc,
    Reserved2: u32,
    phNewContext: ?*SecHandle,
    pOutput: ?*SecBufferDesc,
    pfContextAttr: ?*u32,
    ptsExpiry: ?*LARGE_INTEGER,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "secur32" fn AcceptSecurityContext(
    phCredential: ?*SecHandle,
    phContext: ?*SecHandle,
    pInput: ?*SecBufferDesc,
    fContextReq: ACCEPT_SECURITY_CONTEXT_CONTEXT_REQ,
    TargetDataRep: u32,
    phNewContext: ?*SecHandle,
    pOutput: ?*SecBufferDesc,
    pfContextAttr: ?*u32,
    ptsExpiry: ?*LARGE_INTEGER,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn CompleteAuthToken(
    phContext: ?*SecHandle,
    pToken: ?*SecBufferDesc,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn ImpersonateSecurityContext(
    phContext: ?*SecHandle,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn RevertSecurityContext(
    phContext: ?*SecHandle,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn QuerySecurityContextToken(
    phContext: ?*SecHandle,
    Token: ?*?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn DeleteSecurityContext(
    phContext: ?*SecHandle,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn ApplyControlToken(
    phContext: ?*SecHandle,
    pInput: ?*SecBufferDesc,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "secur32" fn QueryContextAttributesW(
    phContext: ?*SecHandle,
    ulAttribute: SECPKG_ATTR,
    pBuffer: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "sspicli" fn QueryContextAttributesExW(
    phContext: ?*SecHandle,
    ulAttribute: SECPKG_ATTR,
    // TODO: what to do with BytesParamIndex 3?
    pBuffer: ?*anyopaque,
    cbBuffer: u32,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "secur32" fn QueryContextAttributesA(
    phContext: ?*SecHandle,
    ulAttribute: SECPKG_ATTR,
    pBuffer: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "sspicli" fn QueryContextAttributesExA(
    phContext: ?*SecHandle,
    ulAttribute: SECPKG_ATTR,
    // TODO: what to do with BytesParamIndex 3?
    pBuffer: ?*anyopaque,
    cbBuffer: u32,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn SetContextAttributesW(
    phContext: ?*SecHandle,
    ulAttribute: SECPKG_ATTR,
    // TODO: what to do with BytesParamIndex 3?
    pBuffer: ?*anyopaque,
    cbBuffer: u32,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn SetContextAttributesA(
    phContext: ?*SecHandle,
    ulAttribute: SECPKG_ATTR,
    // TODO: what to do with BytesParamIndex 3?
    pBuffer: ?*anyopaque,
    cbBuffer: u32,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn QueryCredentialsAttributesW(
    phCredential: ?*SecHandle,
    ulAttribute: u32,
    pBuffer: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) i32;

pub extern "sspicli" fn QueryCredentialsAttributesExW(
    phCredential: ?*SecHandle,
    ulAttribute: u32,
    // TODO: what to do with BytesParamIndex 3?
    pBuffer: ?*anyopaque,
    cbBuffer: u32,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn QueryCredentialsAttributesA(
    phCredential: ?*SecHandle,
    ulAttribute: u32,
    pBuffer: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) i32;

pub extern "sspicli" fn QueryCredentialsAttributesExA(
    phCredential: ?*SecHandle,
    ulAttribute: u32,
    // TODO: what to do with BytesParamIndex 3?
    pBuffer: ?*anyopaque,
    cbBuffer: u32,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn SetCredentialsAttributesW(
    phCredential: ?*SecHandle,
    ulAttribute: u32,
    // TODO: what to do with BytesParamIndex 3?
    pBuffer: ?*anyopaque,
    cbBuffer: u32,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn SetCredentialsAttributesA(
    phCredential: ?*SecHandle,
    ulAttribute: u32,
    // TODO: what to do with BytesParamIndex 3?
    pBuffer: ?*anyopaque,
    cbBuffer: u32,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn FreeContextBuffer(
    pvContextBuffer: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn MakeSignature(
    phContext: ?*SecHandle,
    fQOP: u32,
    pMessage: ?*SecBufferDesc,
    MessageSeqNo: u32,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn VerifySignature(
    phContext: ?*SecHandle,
    pMessage: ?*SecBufferDesc,
    MessageSeqNo: u32,
    pfQOP: ?*u32,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn EncryptMessage(
    phContext: ?*SecHandle,
    fQOP: u32,
    pMessage: ?*SecBufferDesc,
    MessageSeqNo: u32,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn DecryptMessage(
    phContext: ?*SecHandle,
    pMessage: ?*SecBufferDesc,
    MessageSeqNo: u32,
    pfQOP: ?*u32,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn EnumerateSecurityPackagesW(
    pcPackages: ?*u32,
    ppPackageInfo: ?*?*SecPkgInfoW,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn EnumerateSecurityPackagesA(
    pcPackages: ?*u32,
    ppPackageInfo: ?*?*SecPkgInfoA,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn QuerySecurityPackageInfoW(
    pszPackageName: ?PWSTR,
    ppPackageInfo: ?*?*SecPkgInfoW,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn QuerySecurityPackageInfoA(
    pszPackageName: ?PSTR,
    ppPackageInfo: ?*?*SecPkgInfoA,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn ExportSecurityContext(
    phContext: ?*SecHandle,
    fFlags: EXPORT_SECURITY_CONTEXT_FLAGS,
    pPackedContext: ?*SecBuffer,
    pToken: ?*?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn ImportSecurityContextW(
    pszPackage: ?PWSTR,
    pPackedContext: ?*SecBuffer,
    Token: ?*anyopaque,
    phContext: ?*SecHandle,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn ImportSecurityContextA(
    pszPackage: ?PSTR,
    pPackedContext: ?*SecBuffer,
    Token: ?*anyopaque,
    phContext: ?*SecHandle,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn InitSecurityInterfaceA() callconv(@import("std").os.windows.WINAPI) ?*SecurityFunctionTableA;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "secur32" fn InitSecurityInterfaceW() callconv(@import("std").os.windows.WINAPI) ?*SecurityFunctionTableW;

// TODO: this type is limited to platform 'windowsServer2003'
pub extern "secur32" fn SaslEnumerateProfilesA(
    ProfileList: ?*?PSTR,
    ProfileCount: ?*u32,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windowsServer2003'
pub extern "secur32" fn SaslEnumerateProfilesW(
    ProfileList: ?*?PWSTR,
    ProfileCount: ?*u32,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windowsServer2003'
pub extern "secur32" fn SaslGetProfilePackageA(
    ProfileName: ?PSTR,
    PackageInfo: ?*?*SecPkgInfoA,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windowsServer2003'
pub extern "secur32" fn SaslGetProfilePackageW(
    ProfileName: ?PWSTR,
    PackageInfo: ?*?*SecPkgInfoW,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windowsServer2003'
pub extern "secur32" fn SaslIdentifyPackageA(
    pInput: ?*SecBufferDesc,
    PackageInfo: ?*?*SecPkgInfoA,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windowsServer2003'
pub extern "secur32" fn SaslIdentifyPackageW(
    pInput: ?*SecBufferDesc,
    PackageInfo: ?*?*SecPkgInfoW,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windowsServer2003'
pub extern "secur32" fn SaslInitializeSecurityContextW(
    phCredential: ?*SecHandle,
    phContext: ?*SecHandle,
    pszTargetName: ?PWSTR,
    fContextReq: u32,
    Reserved1: u32,
    TargetDataRep: u32,
    pInput: ?*SecBufferDesc,
    Reserved2: u32,
    phNewContext: ?*SecHandle,
    pOutput: ?*SecBufferDesc,
    pfContextAttr: ?*u32,
    ptsExpiry: ?*LARGE_INTEGER,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windowsServer2003'
pub extern "secur32" fn SaslInitializeSecurityContextA(
    phCredential: ?*SecHandle,
    phContext: ?*SecHandle,
    pszTargetName: ?PSTR,
    fContextReq: u32,
    Reserved1: u32,
    TargetDataRep: u32,
    pInput: ?*SecBufferDesc,
    Reserved2: u32,
    phNewContext: ?*SecHandle,
    pOutput: ?*SecBufferDesc,
    pfContextAttr: ?*u32,
    ptsExpiry: ?*LARGE_INTEGER,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windowsServer2003'
pub extern "secur32" fn SaslAcceptSecurityContext(
    phCredential: ?*SecHandle,
    phContext: ?*SecHandle,
    pInput: ?*SecBufferDesc,
    fContextReq: u32,
    TargetDataRep: u32,
    phNewContext: ?*SecHandle,
    pOutput: ?*SecBufferDesc,
    pfContextAttr: ?*u32,
    ptsExpiry: ?*LARGE_INTEGER,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windowsServer2003'
pub extern "secur32" fn SaslSetContextOption(
    ContextHandle: ?*SecHandle,
    Option: u32,
    Value: ?*anyopaque,
    Size: u32,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windowsServer2003'
pub extern "secur32" fn SaslGetContextOption(
    ContextHandle: ?*SecHandle,
    Option: u32,
    Value: ?*anyopaque,
    Size: u32,
    Needed: ?*u32,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.1'
pub extern "credui" fn SspiPromptForCredentialsW(
    pszTargetName: ?[*:0]const u16,
    pUiInfo: ?*anyopaque,
    dwAuthError: u32,
    pszPackage: ?[*:0]const u16,
    pInputAuthIdentity: ?*anyopaque,
    ppAuthIdentity: ?*?*anyopaque,
    pfSave: ?*i32,
    dwFlags: u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows6.1'
pub extern "credui" fn SspiPromptForCredentialsA(
    pszTargetName: ?[*:0]const u8,
    pUiInfo: ?*anyopaque,
    dwAuthError: u32,
    pszPackage: ?[*:0]const u8,
    pInputAuthIdentity: ?*anyopaque,
    ppAuthIdentity: ?*?*anyopaque,
    pfSave: ?*i32,
    dwFlags: u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn SspiPrepareForCredRead(
    AuthIdentity: ?*anyopaque,
    pszTargetName: ?[*:0]const u16,
    pCredmanCredentialType: ?*u32,
    ppszCredmanTargetName: ?*?PWSTR,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn SspiPrepareForCredWrite(
    AuthIdentity: ?*anyopaque,
    pszTargetName: ?[*:0]const u16,
    pCredmanCredentialType: ?*u32,
    ppszCredmanTargetName: ?*?PWSTR,
    ppszCredmanUserName: ?*?PWSTR,
    ppCredentialBlob: ?*?*u8,
    pCredentialBlobSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn SspiEncryptAuthIdentity(
    AuthData: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows8.0'
pub extern "sspicli" fn SspiEncryptAuthIdentityEx(
    Options: u32,
    AuthData: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn SspiDecryptAuthIdentity(
    EncryptedAuthData: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows8.0'
pub extern "sspicli" fn SspiDecryptAuthIdentityEx(
    Options: u32,
    EncryptedAuthData: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn SspiIsAuthIdentityEncrypted(
    EncryptedAuthData: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn SspiEncodeAuthIdentityAsStrings(
    pAuthIdentity: ?*anyopaque,
    ppszUserName: ?*?PWSTR,
    ppszDomainName: ?*?PWSTR,
    ppszPackedCredentialsString: ?*?PWSTR,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn SspiValidateAuthIdentity(
    AuthData: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn SspiCopyAuthIdentity(
    AuthData: ?*anyopaque,
    AuthDataCopy: ?*?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn SspiFreeAuthIdentity(
    AuthData: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) void;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn SspiZeroAuthIdentity(
    AuthData: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) void;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn SspiLocalFree(
    DataBuffer: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) void;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn SspiEncodeStringsAsAuthIdentity(
    pszUserName: ?[*:0]const u16,
    pszDomainName: ?[*:0]const u16,
    pszPackedCredentialsString: ?[*:0]const u16,
    ppAuthIdentity: ?*?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn SspiCompareAuthIdentities(
    AuthIdentity1: ?*anyopaque,
    AuthIdentity2: ?*anyopaque,
    SameSuppliedUser: ?*BOOLEAN,
    SameSuppliedIdentity: ?*BOOLEAN,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn SspiMarshalAuthIdentity(
    AuthIdentity: ?*anyopaque,
    AuthIdentityLength: ?*u32,
    AuthIdentityByteArray: ?*?*i8,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn SspiUnmarshalAuthIdentity(
    AuthIdentityLength: u32,
    // TODO: what to do with BytesParamIndex 0?
    AuthIdentityByteArray: ?PSTR,
    ppAuthIdentity: ?*?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.1'
pub extern "credui" fn SspiIsPromptingNeeded(
    ErrorOrNtStatus: u32,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn SspiGetTargetHostName(
    pszTargetName: ?[*:0]const u16,
    pszHostName: ?*?PWSTR,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn SspiExcludePackage(
    AuthIdentity: ?*anyopaque,
    pszPackageName: ?[*:0]const u16,
    ppNewAuthIdentity: ?*?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn AddSecurityPackageA(
    pszPackageName: ?PSTR,
    pOptions: ?*SECURITY_PACKAGE_OPTIONS,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn AddSecurityPackageW(
    pszPackageName: ?PWSTR,
    pOptions: ?*SECURITY_PACKAGE_OPTIONS,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn DeleteSecurityPackageA(
    pszPackageName: ?PSTR,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.1'
pub extern "secur32" fn DeleteSecurityPackageW(
    pszPackageName: ?PWSTR,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "secur32" fn CredMarshalTargetInfo(
    InTargetInfo: ?*CREDENTIAL_TARGET_INFORMATIONW,
    Buffer: ?*?*u16,
    BufferSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

pub extern "secur32" fn CredUnmarshalTargetInfo(
    // TODO: what to do with BytesParamIndex 1?
    Buffer: ?*u16,
    BufferSize: u32,
    RetTargetInfo: ?*?*CREDENTIAL_TARGET_INFORMATIONW,
    RetActualSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "schannel" fn SslEmptyCacheA(
    pszTargetName: ?PSTR,
    dwFlags: u32,
) callconv(@import("std").os.windows.WINAPI) BOOL;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "schannel" fn SslEmptyCacheW(
    pszTargetName: ?PWSTR,
    dwFlags: u32,
) callconv(@import("std").os.windows.WINAPI) BOOL;

pub extern "schannel" fn SslGenerateRandomBits(
    pRandomData: ?*u8,
    cRandomData: i32,
) callconv(@import("std").os.windows.WINAPI) void;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "schannel" fn SslCrackCertificate(
    pbCertificate: ?*u8,
    cbCertificate: u32,
    dwFlags: u32,
    ppCertificate: ?*?*X509Certificate,
) callconv(@import("std").os.windows.WINAPI) BOOL;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "schannel" fn SslFreeCertificate(
    pCertificate: ?*X509Certificate,
) callconv(@import("std").os.windows.WINAPI) void;

pub extern "schannel" fn SslGetMaximumKeySize(
    Reserved: u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows8.0'
pub extern "schannel" fn SslGetServerIdentity(
    // TODO: what to do with BytesParamIndex 1?
    ClientHello: ?*u8,
    ClientHelloSize: u32,
    ServerIdentity: ?*?*u8,
    ServerIdentitySize: ?*u32,
    Flags: u32,
) callconv(@import("std").os.windows.WINAPI) i32;

pub extern "schannel" fn SslGetExtensions(
    clientHello: [*:0]const u8,
    clientHelloByteSize: u32,
    genericExtensions: [*]SCH_EXTENSION_DATA,
    genericExtensionsCount: u8,
    bytesToRead: ?*u32,
    flags: SchGetExtensionsOptions,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows10.0.10240'
pub extern "tokenbinding" fn TokenBindingGenerateBinding(
    keyType: TOKENBINDING_KEY_PARAMETERS_TYPE,
    targetURL: ?[*:0]const u16,
    bindingType: TOKENBINDING_TYPE,
    // TODO: what to do with BytesParamIndex 4?
    tlsEKM: ?*const anyopaque,
    tlsEKMSize: u32,
    extensionFormat: TOKENBINDING_EXTENSION_FORMAT,
    extensionData: ?*const anyopaque,
    tokenBinding: ?*?*anyopaque,
    tokenBindingSize: ?*u32,
    resultData: ?*?*TOKENBINDING_RESULT_DATA,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows10.0.10240'
pub extern "tokenbinding" fn TokenBindingGenerateMessage(
    tokenBindings: [*]const ?*const anyopaque,
    tokenBindingsSize: [*]const u32,
    tokenBindingsCount: u32,
    tokenBindingMessage: ?*?*anyopaque,
    tokenBindingMessageSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows10.0.10240'
pub extern "tokenbinding" fn TokenBindingVerifyMessage(
    // TODO: what to do with BytesParamIndex 1?
    tokenBindingMessage: ?*const anyopaque,
    tokenBindingMessageSize: u32,
    keyType: TOKENBINDING_KEY_PARAMETERS_TYPE,
    // TODO: what to do with BytesParamIndex 4?
    tlsEKM: ?*const anyopaque,
    tlsEKMSize: u32,
    resultList: ?*?*TOKENBINDING_RESULT_LIST,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows10.0.10240'
pub extern "tokenbinding" fn TokenBindingGetKeyTypesClient(
    keyTypes: ?*?*TOKENBINDING_KEY_TYPES,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows10.0.10240'
pub extern "tokenbinding" fn TokenBindingGetKeyTypesServer(
    keyTypes: ?*?*TOKENBINDING_KEY_TYPES,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows10.0.10240'
pub extern "tokenbinding" fn TokenBindingDeleteBinding(
    targetURL: ?[*:0]const u16,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows10.0.10240'
pub extern "tokenbinding" fn TokenBindingDeleteAllBindings() callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows10.0.10240'
pub extern "tokenbinding" fn TokenBindingGenerateID(
    keyType: TOKENBINDING_KEY_PARAMETERS_TYPE,
    // TODO: what to do with BytesParamIndex 2?
    publicKey: ?*const anyopaque,
    publicKeySize: u32,
    resultData: ?*?*TOKENBINDING_RESULT_DATA,
) callconv(@import("std").os.windows.WINAPI) i32;

pub extern "tokenbinding" fn TokenBindingGenerateIDForUri(
    keyType: TOKENBINDING_KEY_PARAMETERS_TYPE,
    targetUri: ?[*:0]const u16,
    resultData: ?*?*TOKENBINDING_RESULT_DATA,
) callconv(@import("std").os.windows.WINAPI) i32;

pub extern "tokenbinding" fn TokenBindingGetHighestSupportedVersion(
    majorVersion: ?*u8,
    minorVersion: ?*u8,
) callconv(@import("std").os.windows.WINAPI) i32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "secur32" fn GetUserNameExA(
    NameFormat: EXTENDED_NAME_FORMAT,
    lpNameBuffer: ?[*:0]u8,
    nSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows5.0'
pub extern "secur32" fn GetUserNameExW(
    NameFormat: EXTENDED_NAME_FORMAT,
    lpNameBuffer: ?[*:0]u16,
    nSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows5.0'
pub extern "secur32" fn GetComputerObjectNameA(
    NameFormat: EXTENDED_NAME_FORMAT,
    lpNameBuffer: ?[*:0]u8,
    nSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows5.0'
pub extern "secur32" fn GetComputerObjectNameW(
    NameFormat: EXTENDED_NAME_FORMAT,
    lpNameBuffer: ?[*:0]u16,
    nSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows5.0'
pub extern "secur32" fn TranslateNameA(
    lpAccountName: ?[*:0]const u8,
    AccountNameFormat: EXTENDED_NAME_FORMAT,
    DesiredNameFormat: EXTENDED_NAME_FORMAT,
    lpTranslatedName: ?[*:0]u8,
    nSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows5.0'
pub extern "secur32" fn TranslateNameW(
    lpAccountName: ?[*:0]const u16,
    AccountNameFormat: EXTENDED_NAME_FORMAT,
    DesiredNameFormat: EXTENDED_NAME_FORMAT,
    lpTranslatedName: ?[*:0]u16,
    nSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) BOOLEAN;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLOpen(
    phSLC: ?*?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLClose(
    hSLC: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLInstallProofOfPurchase(
    hSLC: ?*anyopaque,
    pwszPKeyAlgorithm: ?[*:0]const u16,
    pwszPKeyString: ?[*:0]const u16,
    cbPKeySpecificData: u32,
    // TODO: what to do with BytesParamIndex 3?
    pbPKeySpecificData: ?*u8,
    pPkeyId: ?*Guid,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLUninstallProofOfPurchase(
    hSLC: ?*anyopaque,
    pPKeyId: ?*const Guid,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLInstallLicense(
    hSLC: ?*anyopaque,
    cbLicenseBlob: u32,
    // TODO: what to do with BytesParamIndex 1?
    pbLicenseBlob: ?*const u8,
    pLicenseFileId: ?*Guid,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLUninstallLicense(
    hSLC: ?*anyopaque,
    pLicenseFileId: ?*const Guid,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLConsumeRight(
    hSLC: ?*anyopaque,
    pAppId: ?*const Guid,
    pProductSkuId: ?*const Guid,
    pwszRightName: ?[*:0]const u16,
    pvReserved: ?*anyopaque,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLGetProductSkuInformation(
    hSLC: ?*anyopaque,
    pProductSkuId: ?*const Guid,
    pwszValueName: ?[*:0]const u16,
    peDataType: ?*SLDATATYPE,
    pcbValue: ?*u32,
    ppbValue: ?*?*u8,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLGetPKeyInformation(
    hSLC: ?*anyopaque,
    pPKeyId: ?*const Guid,
    pwszValueName: ?[*:0]const u16,
    peDataType: ?*SLDATATYPE,
    pcbValue: ?*u32,
    ppbValue: ?*?*u8,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLGetLicenseInformation(
    hSLC: ?*anyopaque,
    pSLLicenseId: ?*const Guid,
    pwszValueName: ?[*:0]const u16,
    peDataType: ?*SLDATATYPE,
    pcbValue: ?*u32,
    ppbValue: ?*?*u8,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLGetLicensingStatusInformation(
    hSLC: ?*anyopaque,
    pAppID: ?*const Guid,
    pProductSkuId: ?*const Guid,
    pwszRightName: ?[*:0]const u16,
    pnStatusCount: ?*u32,
    ppLicensingStatus: ?*?*SL_LICENSING_STATUS,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLGetPolicyInformation(
    hSLC: ?*anyopaque,
    pwszValueName: ?[*:0]const u16,
    peDataType: ?*SLDATATYPE,
    pcbValue: ?*u32,
    ppbValue: ?*?*u8,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLGetPolicyInformationDWORD(
    hSLC: ?*anyopaque,
    pwszValueName: ?[*:0]const u16,
    pdwValue: ?*u32,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLGetServiceInformation(
    hSLC: ?*anyopaque,
    pwszValueName: ?[*:0]const u16,
    peDataType: ?*SLDATATYPE,
    pcbValue: ?*u32,
    ppbValue: ?*?*u8,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLGetApplicationInformation(
    hSLC: ?*anyopaque,
    pApplicationId: ?*const Guid,
    pwszValueName: ?[*:0]const u16,
    peDataType: ?*SLDATATYPE,
    pcbValue: ?*u32,
    ppbValue: ?*?*u8,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slcext" fn SLActivateProduct(
    hSLC: ?*anyopaque,
    pProductSkuId: ?*const Guid,
    cbAppSpecificData: u32,
    pvAppSpecificData: ?*const anyopaque,
    pActivationInfo: ?*const SL_ACTIVATION_INFO_HEADER,
    pwszProxyServer: ?[*:0]const u16,
    wProxyPort: u16,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slcext" fn SLGetServerStatus(
    pwszServerURL: ?[*:0]const u16,
    pwszAcquisitionType: ?[*:0]const u16,
    pwszProxyServer: ?[*:0]const u16,
    wProxyPort: u16,
    phrStatus: ?*HRESULT,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLGenerateOfflineInstallationId(
    hSLC: ?*anyopaque,
    pProductSkuId: ?*const Guid,
    ppwszInstallationId: ?*?PWSTR,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLGenerateOfflineInstallationIdEx(
    hSLC: ?*anyopaque,
    pProductSkuId: ?*const Guid,
    pActivationInfo: ?*const SL_ACTIVATION_INFO_HEADER,
    ppwszInstallationId: ?*?PWSTR,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLDepositOfflineConfirmationId(
    hSLC: ?*anyopaque,
    pProductSkuId: ?*const Guid,
    pwszInstallationId: ?[*:0]const u16,
    pwszConfirmationId: ?[*:0]const u16,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLDepositOfflineConfirmationIdEx(
    hSLC: ?*anyopaque,
    pProductSkuId: ?*const Guid,
    pActivationInfo: ?*const SL_ACTIVATION_INFO_HEADER,
    pwszInstallationId: ?[*:0]const u16,
    pwszConfirmationId: ?[*:0]const u16,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLGetPKeyId(
    hSLC: ?*anyopaque,
    pwszPKeyAlgorithm: ?[*:0]const u16,
    pwszPKeyString: ?[*:0]const u16,
    cbPKeySpecificData: u32,
    // TODO: what to do with BytesParamIndex 3?
    pbPKeySpecificData: ?*const u8,
    pPKeyId: ?*Guid,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLGetInstalledProductKeyIds(
    hSLC: ?*anyopaque,
    pProductSkuId: ?*const Guid,
    pnProductKeyIds: ?*u32,
    ppProductKeyIds: ?*?*Guid,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLSetCurrentProductKey(
    hSLC: ?*anyopaque,
    pProductSkuId: ?*const Guid,
    pProductKeyId: ?*const Guid,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLGetSLIDList(
    hSLC: ?*anyopaque,
    eQueryIdType: SLIDTYPE,
    pQueryId: ?*const Guid,
    eReturnIdType: SLIDTYPE,
    pnReturnIds: ?*u32,
    ppReturnIds: ?*?*Guid,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLGetLicenseFileId(
    hSLC: ?*anyopaque,
    cbLicenseBlob: u32,
    // TODO: what to do with BytesParamIndex 1?
    pbLicenseBlob: ?*const u8,
    pLicenseFileId: ?*Guid,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLGetLicense(
    hSLC: ?*anyopaque,
    pLicenseFileId: ?*const Guid,
    pcbLicenseFile: ?*u32,
    ppbLicenseFile: ?*?*u8,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLFireEvent(
    hSLC: ?*anyopaque,
    pwszEventId: ?[*:0]const u16,
    pApplicationId: ?*const Guid,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLRegisterEvent(
    hSLC: ?*anyopaque,
    pwszEventId: ?[*:0]const u16,
    pApplicationId: ?*const Guid,
    hEvent: ?HANDLE,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slc" fn SLUnregisterEvent(
    hSLC: ?*anyopaque,
    pwszEventId: ?[*:0]const u16,
    pApplicationId: ?*const Guid,
    hEvent: ?HANDLE,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "slc" fn SLGetWindowsInformation(
    pwszValueName: ?[*:0]const u16,
    peDataType: ?*SLDATATYPE,
    pcbValue: ?*u32,
    ppbValue: ?*?*u8,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "slc" fn SLGetWindowsInformationDWORD(
    pwszValueName: ?[*:0]const u16,
    pdwValue: ?*u32,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "slwga" fn SLIsGenuineLocal(
    pAppId: ?*const Guid,
    pGenuineState: ?*SL_GENUINE_STATE,
    pUIOptions: ?*SL_NONGENUINE_UI_OPTIONS,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "slcext" fn SLAcquireGenuineTicket(
    ppTicketBlob: ?*?*anyopaque,
    pcbTicketBlob: ?*u32,
    pwszTemplateId: ?[*:0]const u16,
    pwszServerUrl: ?[*:0]const u16,
    pwszClientToken: ?[*:0]const u16,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "slc" fn SLSetGenuineInformation(
    pQueryId: ?*const Guid,
    pwszValueName: ?[*:0]const u16,
    eDataType: SLDATATYPE,
    cbValue: u32,
    // TODO: what to do with BytesParamIndex 3?
    pbValue: ?*const u8,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows8.0'
pub extern "slcext" fn SLGetReferralInformation(
    hSLC: ?*anyopaque,
    eReferralType: SLREFERRALTYPE,
    pSkuOrAppId: ?*const Guid,
    pwszValueName: ?[*:0]const u16,
    ppwszValue: ?*?PWSTR,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "slc" fn SLGetGenuineInformation(
    pQueryId: ?*const Guid,
    pwszValueName: ?[*:0]const u16,
    peDataType: ?*SLDATATYPE,
    pcbValue: ?*u32,
    ppbValue: ?*?*u8,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

// TODO: this type is limited to platform 'windows10.0.10240'
pub extern "api-ms-win-core-slapi-l1-1-0" fn SLQueryLicenseValueFromApp(
    valueName: ?[*:0]const u16,
    valueType: ?*u32,
    // TODO: what to do with BytesParamIndex 3?
    dataBuffer: ?*anyopaque,
    dataSize: u32,
    resultDataSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

//--------------------------------------------------------------------------------
// Section: Unicode Aliases (57)
//--------------------------------------------------------------------------------
const thismodule = @This();
pub usingnamespace switch (@import("../../zig.zig").unicode_mode) {
    .ansi => struct {
        pub const SecPkgInfo = thismodule.SecPkgInfoA;
        pub const SecPkgCredentials_Names = thismodule.SecPkgCredentials_NamesA;
        pub const SecPkgCredentials_SSIProvider = thismodule.SecPkgCredentials_SSIProviderA;
        pub const SecPkgContext_Names = thismodule.SecPkgContext_NamesA;
        pub const SecPkgContext_KeyInfo = thismodule.SecPkgContext_KeyInfoA;
        pub const SecPkgContext_Authority = thismodule.SecPkgContext_AuthorityA;
        pub const SecPkgContext_ProtoInfo = thismodule.SecPkgContext_ProtoInfoA;
        pub const SecPkgContext_PackageInfo = thismodule.SecPkgContext_PackageInfoA;
        pub const SecPkgContext_NegotiationInfo = thismodule.SecPkgContext_NegotiationInfoA;
        pub const SecPkgContext_NativeNames = thismodule.SecPkgContext_NativeNamesA;
        pub const SecPkgContext_CredentialName = thismodule.SecPkgContext_CredentialNameA;
        pub const ACQUIRE_CREDENTIALS_HANDLE_FN_ = thismodule.ACQUIRE_CREDENTIALS_HANDLE_FN_A;
        pub const ADD_CREDENTIALS_FN_ = thismodule.ADD_CREDENTIALS_FN_A;
        pub const CHANGE_PASSWORD_FN_ = thismodule.CHANGE_PASSWORD_FN_A;
        pub const INITIALIZE_SECURITY_CONTEXT_FN_ = thismodule.INITIALIZE_SECURITY_CONTEXT_FN_A;
        pub const QUERY_CONTEXT_ATTRIBUTES_FN_ = thismodule.QUERY_CONTEXT_ATTRIBUTES_FN_A;
        pub const QUERY_CONTEXT_ATTRIBUTES_EX_FN_ = thismodule.QUERY_CONTEXT_ATTRIBUTES_EX_FN_A;
        pub const SET_CONTEXT_ATTRIBUTES_FN_ = thismodule.SET_CONTEXT_ATTRIBUTES_FN_A;
        pub const QUERY_CREDENTIALS_ATTRIBUTES_FN_ = thismodule.QUERY_CREDENTIALS_ATTRIBUTES_FN_A;
        pub const QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_ = thismodule.QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_A;
        pub const SET_CREDENTIALS_ATTRIBUTES_FN_ = thismodule.SET_CREDENTIALS_ATTRIBUTES_FN_A;
        pub const ENUMERATE_SECURITY_PACKAGES_FN_ = thismodule.ENUMERATE_SECURITY_PACKAGES_FN_A;
        pub const QUERY_SECURITY_PACKAGE_INFO_FN_ = thismodule.QUERY_SECURITY_PACKAGE_INFO_FN_A;
        pub const IMPORT_SECURITY_CONTEXT_FN_ = thismodule.IMPORT_SECURITY_CONTEXT_FN_A;
        pub const SecurityFunctionTable = thismodule.SecurityFunctionTableA;
        pub const INIT_SECURITY_INTERFACE_ = thismodule.INIT_SECURITY_INTERFACE_A;
        pub const SEC_WINNT_AUTH_IDENTITY_EX = thismodule.SEC_WINNT_AUTH_IDENTITY_EXA;
        pub const SSL_EMPTY_CACHE_FN_ = thismodule.SSL_EMPTY_CACHE_FN_A;
        pub const AuditLookupCategoryName = thismodule.AuditLookupCategoryNameA;
        pub const AuditLookupSubCategoryName = thismodule.AuditLookupSubCategoryNameA;
        pub const AuditSetGlobalSacl = thismodule.AuditSetGlobalSaclA;
        pub const AuditQueryGlobalSacl = thismodule.AuditQueryGlobalSaclA;
        pub const AcquireCredentialsHandle = thismodule.AcquireCredentialsHandleA;
        pub const AddCredentials = thismodule.AddCredentialsA;
        pub const ChangeAccountPassword = thismodule.ChangeAccountPasswordA;
        pub const InitializeSecurityContext = thismodule.InitializeSecurityContextA;
        pub const QueryContextAttributes = thismodule.QueryContextAttributesA;
        pub const QueryContextAttributesEx = thismodule.QueryContextAttributesExA;
        pub const SetContextAttributes = thismodule.SetContextAttributesA;
        pub const QueryCredentialsAttributes = thismodule.QueryCredentialsAttributesA;
        pub const QueryCredentialsAttributesEx = thismodule.QueryCredentialsAttributesExA;
        pub const SetCredentialsAttributes = thismodule.SetCredentialsAttributesA;
        pub const EnumerateSecurityPackages = thismodule.EnumerateSecurityPackagesA;
        pub const QuerySecurityPackageInfo = thismodule.QuerySecurityPackageInfoA;
        pub const ImportSecurityContext = thismodule.ImportSecurityContextA;
        pub const InitSecurityInterface = thismodule.InitSecurityInterfaceA;
        pub const SaslEnumerateProfiles = thismodule.SaslEnumerateProfilesA;
        pub const SaslGetProfilePackage = thismodule.SaslGetProfilePackageA;
        pub const SaslIdentifyPackage = thismodule.SaslIdentifyPackageA;
        pub const SaslInitializeSecurityContext = thismodule.SaslInitializeSecurityContextA;
        pub const SspiPromptForCredentials = thismodule.SspiPromptForCredentialsA;
        pub const AddSecurityPackage = thismodule.AddSecurityPackageA;
        pub const DeleteSecurityPackage = thismodule.DeleteSecurityPackageA;
        pub const SslEmptyCache = thismodule.SslEmptyCacheA;
        pub const GetUserNameEx = thismodule.GetUserNameExA;
        pub const GetComputerObjectName = thismodule.GetComputerObjectNameA;
        pub const TranslateName = thismodule.TranslateNameA;
    },
    .wide => struct {
        pub const SecPkgInfo = thismodule.SecPkgInfoW;
        pub const SecPkgCredentials_Names = thismodule.SecPkgCredentials_NamesW;
        pub const SecPkgCredentials_SSIProvider = thismodule.SecPkgCredentials_SSIProviderW;
        pub const SecPkgContext_Names = thismodule.SecPkgContext_NamesW;
        pub const SecPkgContext_KeyInfo = thismodule.SecPkgContext_KeyInfoW;
        pub const SecPkgContext_Authority = thismodule.SecPkgContext_AuthorityW;
        pub const SecPkgContext_ProtoInfo = thismodule.SecPkgContext_ProtoInfoW;
        pub const SecPkgContext_PackageInfo = thismodule.SecPkgContext_PackageInfoW;
        pub const SecPkgContext_NegotiationInfo = thismodule.SecPkgContext_NegotiationInfoW;
        pub const SecPkgContext_NativeNames = thismodule.SecPkgContext_NativeNamesW;
        pub const SecPkgContext_CredentialName = thismodule.SecPkgContext_CredentialNameW;
        pub const ACQUIRE_CREDENTIALS_HANDLE_FN_ = thismodule.ACQUIRE_CREDENTIALS_HANDLE_FN_W;
        pub const ADD_CREDENTIALS_FN_ = thismodule.ADD_CREDENTIALS_FN_W;
        pub const CHANGE_PASSWORD_FN_ = thismodule.CHANGE_PASSWORD_FN_W;
        pub const INITIALIZE_SECURITY_CONTEXT_FN_ = thismodule.INITIALIZE_SECURITY_CONTEXT_FN_W;
        pub const QUERY_CONTEXT_ATTRIBUTES_FN_ = thismodule.QUERY_CONTEXT_ATTRIBUTES_FN_W;
        pub const QUERY_CONTEXT_ATTRIBUTES_EX_FN_ = thismodule.QUERY_CONTEXT_ATTRIBUTES_EX_FN_W;
        pub const SET_CONTEXT_ATTRIBUTES_FN_ = thismodule.SET_CONTEXT_ATTRIBUTES_FN_W;
        pub const QUERY_CREDENTIALS_ATTRIBUTES_FN_ = thismodule.QUERY_CREDENTIALS_ATTRIBUTES_FN_W;
        pub const QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_ = thismodule.QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_W;
        pub const SET_CREDENTIALS_ATTRIBUTES_FN_ = thismodule.SET_CREDENTIALS_ATTRIBUTES_FN_W;
        pub const ENUMERATE_SECURITY_PACKAGES_FN_ = thismodule.ENUMERATE_SECURITY_PACKAGES_FN_W;
        pub const QUERY_SECURITY_PACKAGE_INFO_FN_ = thismodule.QUERY_SECURITY_PACKAGE_INFO_FN_W;
        pub const IMPORT_SECURITY_CONTEXT_FN_ = thismodule.IMPORT_SECURITY_CONTEXT_FN_W;
        pub const SecurityFunctionTable = thismodule.SecurityFunctionTableW;
        pub const INIT_SECURITY_INTERFACE_ = thismodule.INIT_SECURITY_INTERFACE_W;
        pub const SEC_WINNT_AUTH_IDENTITY_EX = thismodule.SEC_WINNT_AUTH_IDENTITY_EXW;
        pub const SSL_EMPTY_CACHE_FN_ = thismodule.SSL_EMPTY_CACHE_FN_W;
        pub const AuditLookupCategoryName = thismodule.AuditLookupCategoryNameW;
        pub const AuditLookupSubCategoryName = thismodule.AuditLookupSubCategoryNameW;
        pub const AuditSetGlobalSacl = thismodule.AuditSetGlobalSaclW;
        pub const AuditQueryGlobalSacl = thismodule.AuditQueryGlobalSaclW;
        pub const AcquireCredentialsHandle = thismodule.AcquireCredentialsHandleW;
        pub const AddCredentials = thismodule.AddCredentialsW;
        pub const ChangeAccountPassword = thismodule.ChangeAccountPasswordW;
        pub const InitializeSecurityContext = thismodule.InitializeSecurityContextW;
        pub const QueryContextAttributes = thismodule.QueryContextAttributesW;
        pub const QueryContextAttributesEx = thismodule.QueryContextAttributesExW;
        pub const SetContextAttributes = thismodule.SetContextAttributesW;
        pub const QueryCredentialsAttributes = thismodule.QueryCredentialsAttributesW;
        pub const QueryCredentialsAttributesEx = thismodule.QueryCredentialsAttributesExW;
        pub const SetCredentialsAttributes = thismodule.SetCredentialsAttributesW;
        pub const EnumerateSecurityPackages = thismodule.EnumerateSecurityPackagesW;
        pub const QuerySecurityPackageInfo = thismodule.QuerySecurityPackageInfoW;
        pub const ImportSecurityContext = thismodule.ImportSecurityContextW;
        pub const InitSecurityInterface = thismodule.InitSecurityInterfaceW;
        pub const SaslEnumerateProfiles = thismodule.SaslEnumerateProfilesW;
        pub const SaslGetProfilePackage = thismodule.SaslGetProfilePackageW;
        pub const SaslIdentifyPackage = thismodule.SaslIdentifyPackageW;
        pub const SaslInitializeSecurityContext = thismodule.SaslInitializeSecurityContextW;
        pub const SspiPromptForCredentials = thismodule.SspiPromptForCredentialsW;
        pub const AddSecurityPackage = thismodule.AddSecurityPackageW;
        pub const DeleteSecurityPackage = thismodule.DeleteSecurityPackageW;
        pub const SslEmptyCache = thismodule.SslEmptyCacheW;
        pub const GetUserNameEx = thismodule.GetUserNameExW;
        pub const GetComputerObjectName = thismodule.GetComputerObjectNameW;
        pub const TranslateName = thismodule.TranslateNameW;
    },
    .unspecified => if (@import("builtin").is_test) struct {
        pub const SecPkgInfo = *opaque {};
        pub const SecPkgCredentials_Names = *opaque {};
        pub const SecPkgCredentials_SSIProvider = *opaque {};
        pub const SecPkgContext_Names = *opaque {};
        pub const SecPkgContext_KeyInfo = *opaque {};
        pub const SecPkgContext_Authority = *opaque {};
        pub const SecPkgContext_ProtoInfo = *opaque {};
        pub const SecPkgContext_PackageInfo = *opaque {};
        pub const SecPkgContext_NegotiationInfo = *opaque {};
        pub const SecPkgContext_NativeNames = *opaque {};
        pub const SecPkgContext_CredentialName = *opaque {};
        pub const ACQUIRE_CREDENTIALS_HANDLE_FN_ = *opaque {};
        pub const ADD_CREDENTIALS_FN_ = *opaque {};
        pub const CHANGE_PASSWORD_FN_ = *opaque {};
        pub const INITIALIZE_SECURITY_CONTEXT_FN_ = *opaque {};
        pub const QUERY_CONTEXT_ATTRIBUTES_FN_ = *opaque {};
        pub const QUERY_CONTEXT_ATTRIBUTES_EX_FN_ = *opaque {};
        pub const SET_CONTEXT_ATTRIBUTES_FN_ = *opaque {};
        pub const QUERY_CREDENTIALS_ATTRIBUTES_FN_ = *opaque {};
        pub const QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_ = *opaque {};
        pub const SET_CREDENTIALS_ATTRIBUTES_FN_ = *opaque {};
        pub const ENUMERATE_SECURITY_PACKAGES_FN_ = *opaque {};
        pub const QUERY_SECURITY_PACKAGE_INFO_FN_ = *opaque {};
        pub const IMPORT_SECURITY_CONTEXT_FN_ = *opaque {};
        pub const SecurityFunctionTable = *opaque {};
        pub const INIT_SECURITY_INTERFACE_ = *opaque {};
        pub const SEC_WINNT_AUTH_IDENTITY_EX = *opaque {};
        pub const SSL_EMPTY_CACHE_FN_ = *opaque {};
        pub const AuditLookupCategoryName = *opaque {};
        pub const AuditLookupSubCategoryName = *opaque {};
        pub const AuditSetGlobalSacl = *opaque {};
        pub const AuditQueryGlobalSacl = *opaque {};
        pub const AcquireCredentialsHandle = *opaque {};
        pub const AddCredentials = *opaque {};
        pub const ChangeAccountPassword = *opaque {};
        pub const InitializeSecurityContext = *opaque {};
        pub const QueryContextAttributes = *opaque {};
        pub const QueryContextAttributesEx = *opaque {};
        pub const SetContextAttributes = *opaque {};
        pub const QueryCredentialsAttributes = *opaque {};
        pub const QueryCredentialsAttributesEx = *opaque {};
        pub const SetCredentialsAttributes = *opaque {};
        pub const EnumerateSecurityPackages = *opaque {};
        pub const QuerySecurityPackageInfo = *opaque {};
        pub const ImportSecurityContext = *opaque {};
        pub const InitSecurityInterface = *opaque {};
        pub const SaslEnumerateProfiles = *opaque {};
        pub const SaslGetProfilePackage = *opaque {};
        pub const SaslIdentifyPackage = *opaque {};
        pub const SaslInitializeSecurityContext = *opaque {};
        pub const SspiPromptForCredentials = *opaque {};
        pub const AddSecurityPackage = *opaque {};
        pub const DeleteSecurityPackage = *opaque {};
        pub const SslEmptyCache = *opaque {};
        pub const GetUserNameEx = *opaque {};
        pub const GetComputerObjectName = *opaque {};
        pub const TranslateName = *opaque {};
    } else struct {
        pub const SecPkgInfo = @compileError("'SecPkgInfo' requires that UNICODE be set to true or false in the root module");
        pub const SecPkgCredentials_Names = @compileError("'SecPkgCredentials_Names' requires that UNICODE be set to true or false in the root module");
        pub const SecPkgCredentials_SSIProvider = @compileError("'SecPkgCredentials_SSIProvider' requires that UNICODE be set to true or false in the root module");
        pub const SecPkgContext_Names = @compileError("'SecPkgContext_Names' requires that UNICODE be set to true or false in the root module");
        pub const SecPkgContext_KeyInfo = @compileError("'SecPkgContext_KeyInfo' requires that UNICODE be set to true or false in the root module");
        pub const SecPkgContext_Authority = @compileError("'SecPkgContext_Authority' requires that UNICODE be set to true or false in the root module");
        pub const SecPkgContext_ProtoInfo = @compileError("'SecPkgContext_ProtoInfo' requires that UNICODE be set to true or false in the root module");
        pub const SecPkgContext_PackageInfo = @compileError("'SecPkgContext_PackageInfo' requires that UNICODE be set to true or false in the root module");
        pub const SecPkgContext_NegotiationInfo = @compileError("'SecPkgContext_NegotiationInfo' requires that UNICODE be set to true or false in the root module");
        pub const SecPkgContext_NativeNames = @compileError("'SecPkgContext_NativeNames' requires that UNICODE be set to true or false in the root module");
        pub const SecPkgContext_CredentialName = @compileError("'SecPkgContext_CredentialName' requires that UNICODE be set to true or false in the root module");
        pub const ACQUIRE_CREDENTIALS_HANDLE_FN_ = @compileError("'ACQUIRE_CREDENTIALS_HANDLE_FN_' requires that UNICODE be set to true or false in the root module");
        pub const ADD_CREDENTIALS_FN_ = @compileError("'ADD_CREDENTIALS_FN_' requires that UNICODE be set to true or false in the root module");
        pub const CHANGE_PASSWORD_FN_ = @compileError("'CHANGE_PASSWORD_FN_' requires that UNICODE be set to true or false in the root module");
        pub const INITIALIZE_SECURITY_CONTEXT_FN_ = @compileError("'INITIALIZE_SECURITY_CONTEXT_FN_' requires that UNICODE be set to true or false in the root module");
        pub const QUERY_CONTEXT_ATTRIBUTES_FN_ = @compileError("'QUERY_CONTEXT_ATTRIBUTES_FN_' requires that UNICODE be set to true or false in the root module");
        pub const QUERY_CONTEXT_ATTRIBUTES_EX_FN_ = @compileError("'QUERY_CONTEXT_ATTRIBUTES_EX_FN_' requires that UNICODE be set to true or false in the root module");
        pub const SET_CONTEXT_ATTRIBUTES_FN_ = @compileError("'SET_CONTEXT_ATTRIBUTES_FN_' requires that UNICODE be set to true or false in the root module");
        pub const QUERY_CREDENTIALS_ATTRIBUTES_FN_ = @compileError("'QUERY_CREDENTIALS_ATTRIBUTES_FN_' requires that UNICODE be set to true or false in the root module");
        pub const QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_ = @compileError("'QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_' requires that UNICODE be set to true or false in the root module");
        pub const SET_CREDENTIALS_ATTRIBUTES_FN_ = @compileError("'SET_CREDENTIALS_ATTRIBUTES_FN_' requires that UNICODE be set to true or false in the root module");
        pub const ENUMERATE_SECURITY_PACKAGES_FN_ = @compileError("'ENUMERATE_SECURITY_PACKAGES_FN_' requires that UNICODE be set to true or false in the root module");
        pub const QUERY_SECURITY_PACKAGE_INFO_FN_ = @compileError("'QUERY_SECURITY_PACKAGE_INFO_FN_' requires that UNICODE be set to true or false in the root module");
        pub const IMPORT_SECURITY_CONTEXT_FN_ = @compileError("'IMPORT_SECURITY_CONTEXT_FN_' requires that UNICODE be set to true or false in the root module");
        pub const SecurityFunctionTable = @compileError("'SecurityFunctionTable' requires that UNICODE be set to true or false in the root module");
        pub const INIT_SECURITY_INTERFACE_ = @compileError("'INIT_SECURITY_INTERFACE_' requires that UNICODE be set to true or false in the root module");
        pub const SEC_WINNT_AUTH_IDENTITY_EX = @compileError("'SEC_WINNT_AUTH_IDENTITY_EX' requires that UNICODE be set to true or false in the root module");
        pub const SSL_EMPTY_CACHE_FN_ = @compileError("'SSL_EMPTY_CACHE_FN_' requires that UNICODE be set to true or false in the root module");
        pub const AuditLookupCategoryName = @compileError("'AuditLookupCategoryName' requires that UNICODE be set to true or false in the root module");
        pub const AuditLookupSubCategoryName = @compileError("'AuditLookupSubCategoryName' requires that UNICODE be set to true or false in the root module");
        pub const AuditSetGlobalSacl = @compileError("'AuditSetGlobalSacl' requires that UNICODE be set to true or false in the root module");
        pub const AuditQueryGlobalSacl = @compileError("'AuditQueryGlobalSacl' requires that UNICODE be set to true or false in the root module");
        pub const AcquireCredentialsHandle = @compileError("'AcquireCredentialsHandle' requires that UNICODE be set to true or false in the root module");
        pub const AddCredentials = @compileError("'AddCredentials' requires that UNICODE be set to true or false in the root module");
        pub const ChangeAccountPassword = @compileError("'ChangeAccountPassword' requires that UNICODE be set to true or false in the root module");
        pub const InitializeSecurityContext = @compileError("'InitializeSecurityContext' requires that UNICODE be set to true or false in the root module");
        pub const QueryContextAttributes = @compileError("'QueryContextAttributes' requires that UNICODE be set to true or false in the root module");
        pub const QueryContextAttributesEx = @compileError("'QueryContextAttributesEx' requires that UNICODE be set to true or false in the root module");
        pub const SetContextAttributes = @compileError("'SetContextAttributes' requires that UNICODE be set to true or false in the root module");
        pub const QueryCredentialsAttributes = @compileError("'QueryCredentialsAttributes' requires that UNICODE be set to true or false in the root module");
        pub const QueryCredentialsAttributesEx = @compileError("'QueryCredentialsAttributesEx' requires that UNICODE be set to true or false in the root module");
        pub const SetCredentialsAttributes = @compileError("'SetCredentialsAttributes' requires that UNICODE be set to true or false in the root module");
        pub const EnumerateSecurityPackages = @compileError("'EnumerateSecurityPackages' requires that UNICODE be set to true or false in the root module");
        pub const QuerySecurityPackageInfo = @compileError("'QuerySecurityPackageInfo' requires that UNICODE be set to true or false in the root module");
        pub const ImportSecurityContext = @compileError("'ImportSecurityContext' requires that UNICODE be set to true or false in the root module");
        pub const InitSecurityInterface = @compileError("'InitSecurityInterface' requires that UNICODE be set to true or false in the root module");
        pub const SaslEnumerateProfiles = @compileError("'SaslEnumerateProfiles' requires that UNICODE be set to true or false in the root module");
        pub const SaslGetProfilePackage = @compileError("'SaslGetProfilePackage' requires that UNICODE be set to true or false in the root module");
        pub const SaslIdentifyPackage = @compileError("'SaslIdentifyPackage' requires that UNICODE be set to true or false in the root module");
        pub const SaslInitializeSecurityContext = @compileError("'SaslInitializeSecurityContext' requires that UNICODE be set to true or false in the root module");
        pub const SspiPromptForCredentials = @compileError("'SspiPromptForCredentials' requires that UNICODE be set to true or false in the root module");
        pub const AddSecurityPackage = @compileError("'AddSecurityPackage' requires that UNICODE be set to true or false in the root module");
        pub const DeleteSecurityPackage = @compileError("'DeleteSecurityPackage' requires that UNICODE be set to true or false in the root module");
        pub const SslEmptyCache = @compileError("'SslEmptyCache' requires that UNICODE be set to true or false in the root module");
        pub const GetUserNameEx = @compileError("'GetUserNameEx' requires that UNICODE be set to true or false in the root module");
        pub const GetComputerObjectName = @compileError("'GetComputerObjectName' requires that UNICODE be set to true or false in the root module");
        pub const TranslateName = @compileError("'TranslateName' requires that UNICODE be set to true or false in the root module");
    },
};
//--------------------------------------------------------------------------------
// Section: Imports (44)
//--------------------------------------------------------------------------------
const Guid = @import("../../zig.zig").Guid;
const ACL = @import("../../security.zig").ACL;
const BOOL = @import("../../foundation.zig").BOOL;
const BOOLEAN = @import("../../foundation.zig").BOOLEAN;
const CERT_CONTEXT = @import("../../security/cryptography.zig").CERT_CONTEXT;
const CHAR = @import("../../foundation.zig").CHAR;
const CREDENTIAL_TARGET_INFORMATIONW = @import("../../security/credentials.zig").CREDENTIAL_TARGET_INFORMATIONW;
const CREDENTIALW = @import("../../security/credentials.zig").CREDENTIALW;
const CRYPTOAPI_BLOB = @import("../../security/cryptography.zig").CRYPTOAPI_BLOB;
const CYPHER_BLOCK = @import("../../system/password_management.zig").CYPHER_BLOCK;
const FILETIME = @import("../../foundation.zig").FILETIME;
const HANDLE = @import("../../foundation.zig").HANDLE;
const HRESULT = @import("../../foundation.zig").HRESULT;
const HWND = @import("../../foundation.zig").HWND;
const IUnknown = @import("../../system/com.zig").IUnknown;
const LARGE_INTEGER = @import("../../foundation.zig").LARGE_INTEGER;
const LIST_ENTRY = @import("../../system/kernel.zig").LIST_ENTRY;
const LM_OWF_PASSWORD = @import("../../system/password_management.zig").LM_OWF_PASSWORD;
const LPTHREAD_START_ROUTINE = @import("../../system/threading.zig").LPTHREAD_START_ROUTINE;
const LUID = @import("../../foundation.zig").LUID;
const NTSTATUS = @import("../../foundation.zig").NTSTATUS;
const OBJECT_ATTRIBUTES = @import("../../system/windows_programming.zig").OBJECT_ATTRIBUTES;
const PSID = @import("../../foundation.zig").PSID;
const PSTR = @import("../../foundation.zig").PSTR;
const PWSTR = @import("../../foundation.zig").PWSTR;
const QUOTA_LIMITS = @import("../../security.zig").QUOTA_LIMITS;
const SEC_WINNT_AUTH_IDENTITY_A = @import("../../system/rpc.zig").SEC_WINNT_AUTH_IDENTITY_A;
const SEC_WINNT_AUTH_IDENTITY_W = @import("../../system/rpc.zig").SEC_WINNT_AUTH_IDENTITY_W;
const SecHandle = @import("../../security/credentials.zig").SecHandle;
const SECURITY_ATTRIBUTES = @import("../../security.zig").SECURITY_ATTRIBUTES;
const SECURITY_DESCRIPTOR = @import("../../security.zig").SECURITY_DESCRIPTOR;
const SECURITY_IMPERSONATION_LEVEL = @import("../../security.zig").SECURITY_IMPERSONATION_LEVEL;
const SID_NAME_USE = @import("../../security.zig").SID_NAME_USE;
const STRING = @import("../../system/kernel.zig").STRING;
const TOKEN_DEFAULT_DACL = @import("../../security.zig").TOKEN_DEFAULT_DACL;
const TOKEN_DEVICE_CLAIMS = @import("../../security.zig").TOKEN_DEVICE_CLAIMS;
const TOKEN_GROUPS = @import("../../security.zig").TOKEN_GROUPS;
const TOKEN_OWNER = @import("../../security.zig").TOKEN_OWNER;
const TOKEN_PRIMARY_GROUP = @import("../../security.zig").TOKEN_PRIMARY_GROUP;
const TOKEN_PRIVILEGES = @import("../../security.zig").TOKEN_PRIVILEGES;
const TOKEN_SOURCE = @import("../../security.zig").TOKEN_SOURCE;
const TOKEN_USER = @import("../../security.zig").TOKEN_USER;
const TOKEN_USER_CLAIMS = @import("../../security.zig").TOKEN_USER_CLAIMS;
const UNICODE_STRING = @import("../../foundation.zig").UNICODE_STRING;

test {
    // The following '_ = <FuncPtrType>' lines are a workaround for https://github.com/ziglang/zig/issues/4476
    if (@hasDecl(@This(), "PSAM_PASSWORD_NOTIFICATION_ROUTINE")) {
        _ = PSAM_PASSWORD_NOTIFICATION_ROUTINE;
    }
    if (@hasDecl(@This(), "PSAM_INIT_NOTIFICATION_ROUTINE")) {
        _ = PSAM_INIT_NOTIFICATION_ROUTINE;
    }
    if (@hasDecl(@This(), "PSAM_PASSWORD_FILTER_ROUTINE")) {
        _ = PSAM_PASSWORD_FILTER_ROUTINE;
    }
    if (@hasDecl(@This(), "SEC_GET_KEY_FN")) {
        _ = SEC_GET_KEY_FN;
    }
    if (@hasDecl(@This(), "ACQUIRE_CREDENTIALS_HANDLE_FN_W")) {
        _ = ACQUIRE_CREDENTIALS_HANDLE_FN_W;
    }
    if (@hasDecl(@This(), "ACQUIRE_CREDENTIALS_HANDLE_FN_A")) {
        _ = ACQUIRE_CREDENTIALS_HANDLE_FN_A;
    }
    if (@hasDecl(@This(), "FREE_CREDENTIALS_HANDLE_FN")) {
        _ = FREE_CREDENTIALS_HANDLE_FN;
    }
    if (@hasDecl(@This(), "ADD_CREDENTIALS_FN_W")) {
        _ = ADD_CREDENTIALS_FN_W;
    }
    if (@hasDecl(@This(), "ADD_CREDENTIALS_FN_A")) {
        _ = ADD_CREDENTIALS_FN_A;
    }
    if (@hasDecl(@This(), "CHANGE_PASSWORD_FN_W")) {
        _ = CHANGE_PASSWORD_FN_W;
    }
    if (@hasDecl(@This(), "CHANGE_PASSWORD_FN_A")) {
        _ = CHANGE_PASSWORD_FN_A;
    }
    if (@hasDecl(@This(), "INITIALIZE_SECURITY_CONTEXT_FN_W")) {
        _ = INITIALIZE_SECURITY_CONTEXT_FN_W;
    }
    if (@hasDecl(@This(), "INITIALIZE_SECURITY_CONTEXT_FN_A")) {
        _ = INITIALIZE_SECURITY_CONTEXT_FN_A;
    }
    if (@hasDecl(@This(), "ACCEPT_SECURITY_CONTEXT_FN")) {
        _ = ACCEPT_SECURITY_CONTEXT_FN;
    }
    if (@hasDecl(@This(), "COMPLETE_AUTH_TOKEN_FN")) {
        _ = COMPLETE_AUTH_TOKEN_FN;
    }
    if (@hasDecl(@This(), "IMPERSONATE_SECURITY_CONTEXT_FN")) {
        _ = IMPERSONATE_SECURITY_CONTEXT_FN;
    }
    if (@hasDecl(@This(), "REVERT_SECURITY_CONTEXT_FN")) {
        _ = REVERT_SECURITY_CONTEXT_FN;
    }
    if (@hasDecl(@This(), "QUERY_SECURITY_CONTEXT_TOKEN_FN")) {
        _ = QUERY_SECURITY_CONTEXT_TOKEN_FN;
    }
    if (@hasDecl(@This(), "DELETE_SECURITY_CONTEXT_FN")) {
        _ = DELETE_SECURITY_CONTEXT_FN;
    }
    if (@hasDecl(@This(), "APPLY_CONTROL_TOKEN_FN")) {
        _ = APPLY_CONTROL_TOKEN_FN;
    }
    if (@hasDecl(@This(), "QUERY_CONTEXT_ATTRIBUTES_FN_W")) {
        _ = QUERY_CONTEXT_ATTRIBUTES_FN_W;
    }
    if (@hasDecl(@This(), "QUERY_CONTEXT_ATTRIBUTES_EX_FN_W")) {
        _ = QUERY_CONTEXT_ATTRIBUTES_EX_FN_W;
    }
    if (@hasDecl(@This(), "QUERY_CONTEXT_ATTRIBUTES_FN_A")) {
        _ = QUERY_CONTEXT_ATTRIBUTES_FN_A;
    }
    if (@hasDecl(@This(), "QUERY_CONTEXT_ATTRIBUTES_EX_FN_A")) {
        _ = QUERY_CONTEXT_ATTRIBUTES_EX_FN_A;
    }
    if (@hasDecl(@This(), "SET_CONTEXT_ATTRIBUTES_FN_W")) {
        _ = SET_CONTEXT_ATTRIBUTES_FN_W;
    }
    if (@hasDecl(@This(), "SET_CONTEXT_ATTRIBUTES_FN_A")) {
        _ = SET_CONTEXT_ATTRIBUTES_FN_A;
    }
    if (@hasDecl(@This(), "QUERY_CREDENTIALS_ATTRIBUTES_FN_W")) {
        _ = QUERY_CREDENTIALS_ATTRIBUTES_FN_W;
    }
    if (@hasDecl(@This(), "QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_W")) {
        _ = QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_W;
    }
    if (@hasDecl(@This(), "QUERY_CREDENTIALS_ATTRIBUTES_FN_A")) {
        _ = QUERY_CREDENTIALS_ATTRIBUTES_FN_A;
    }
    if (@hasDecl(@This(), "QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_A")) {
        _ = QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_A;
    }
    if (@hasDecl(@This(), "SET_CREDENTIALS_ATTRIBUTES_FN_W")) {
        _ = SET_CREDENTIALS_ATTRIBUTES_FN_W;
    }
    if (@hasDecl(@This(), "SET_CREDENTIALS_ATTRIBUTES_FN_A")) {
        _ = SET_CREDENTIALS_ATTRIBUTES_FN_A;
    }
    if (@hasDecl(@This(), "FREE_CONTEXT_BUFFER_FN")) {
        _ = FREE_CONTEXT_BUFFER_FN;
    }
    if (@hasDecl(@This(), "MAKE_SIGNATURE_FN")) {
        _ = MAKE_SIGNATURE_FN;
    }
    if (@hasDecl(@This(), "VERIFY_SIGNATURE_FN")) {
        _ = VERIFY_SIGNATURE_FN;
    }
    if (@hasDecl(@This(), "ENCRYPT_MESSAGE_FN")) {
        _ = ENCRYPT_MESSAGE_FN;
    }
    if (@hasDecl(@This(), "DECRYPT_MESSAGE_FN")) {
        _ = DECRYPT_MESSAGE_FN;
    }
    if (@hasDecl(@This(), "ENUMERATE_SECURITY_PACKAGES_FN_W")) {
        _ = ENUMERATE_SECURITY_PACKAGES_FN_W;
    }
    if (@hasDecl(@This(), "ENUMERATE_SECURITY_PACKAGES_FN_A")) {
        _ = ENUMERATE_SECURITY_PACKAGES_FN_A;
    }
    if (@hasDecl(@This(), "QUERY_SECURITY_PACKAGE_INFO_FN_W")) {
        _ = QUERY_SECURITY_PACKAGE_INFO_FN_W;
    }
    if (@hasDecl(@This(), "QUERY_SECURITY_PACKAGE_INFO_FN_A")) {
        _ = QUERY_SECURITY_PACKAGE_INFO_FN_A;
    }
    if (@hasDecl(@This(), "EXPORT_SECURITY_CONTEXT_FN")) {
        _ = EXPORT_SECURITY_CONTEXT_FN;
    }
    if (@hasDecl(@This(), "IMPORT_SECURITY_CONTEXT_FN_W")) {
        _ = IMPORT_SECURITY_CONTEXT_FN_W;
    }
    if (@hasDecl(@This(), "IMPORT_SECURITY_CONTEXT_FN_A")) {
        _ = IMPORT_SECURITY_CONTEXT_FN_A;
    }
    if (@hasDecl(@This(), "INIT_SECURITY_INTERFACE_A")) {
        _ = INIT_SECURITY_INTERFACE_A;
    }
    if (@hasDecl(@This(), "INIT_SECURITY_INTERFACE_W")) {
        _ = INIT_SECURITY_INTERFACE_W;
    }
    if (@hasDecl(@This(), "PLSA_CREATE_LOGON_SESSION")) {
        _ = PLSA_CREATE_LOGON_SESSION;
    }
    if (@hasDecl(@This(), "PLSA_DELETE_LOGON_SESSION")) {
        _ = PLSA_DELETE_LOGON_SESSION;
    }
    if (@hasDecl(@This(), "PLSA_ADD_CREDENTIAL")) {
        _ = PLSA_ADD_CREDENTIAL;
    }
    if (@hasDecl(@This(), "PLSA_GET_CREDENTIALS")) {
        _ = PLSA_GET_CREDENTIALS;
    }
    if (@hasDecl(@This(), "PLSA_DELETE_CREDENTIAL")) {
        _ = PLSA_DELETE_CREDENTIAL;
    }
    if (@hasDecl(@This(), "PLSA_ALLOCATE_LSA_HEAP")) {
        _ = PLSA_ALLOCATE_LSA_HEAP;
    }
    if (@hasDecl(@This(), "PLSA_FREE_LSA_HEAP")) {
        _ = PLSA_FREE_LSA_HEAP;
    }
    if (@hasDecl(@This(), "PLSA_ALLOCATE_PRIVATE_HEAP")) {
        _ = PLSA_ALLOCATE_PRIVATE_HEAP;
    }
    if (@hasDecl(@This(), "PLSA_FREE_PRIVATE_HEAP")) {
        _ = PLSA_FREE_PRIVATE_HEAP;
    }
    if (@hasDecl(@This(), "PLSA_ALLOCATE_CLIENT_BUFFER")) {
        _ = PLSA_ALLOCATE_CLIENT_BUFFER;
    }
    if (@hasDecl(@This(), "PLSA_FREE_CLIENT_BUFFER")) {
        _ = PLSA_FREE_CLIENT_BUFFER;
    }
    if (@hasDecl(@This(), "PLSA_COPY_TO_CLIENT_BUFFER")) {
        _ = PLSA_COPY_TO_CLIENT_BUFFER;
    }
    if (@hasDecl(@This(), "PLSA_COPY_FROM_CLIENT_BUFFER")) {
        _ = PLSA_COPY_FROM_CLIENT_BUFFER;
    }
    if (@hasDecl(@This(), "PLSA_AP_INITIALIZE_PACKAGE")) {
        _ = PLSA_AP_INITIALIZE_PACKAGE;
    }
    if (@hasDecl(@This(), "PLSA_AP_LOGON_USER")) {
        _ = PLSA_AP_LOGON_USER;
    }
    if (@hasDecl(@This(), "PLSA_AP_LOGON_USER_EX")) {
        _ = PLSA_AP_LOGON_USER_EX;
    }
    if (@hasDecl(@This(), "PLSA_AP_CALL_PACKAGE")) {
        _ = PLSA_AP_CALL_PACKAGE;
    }
    if (@hasDecl(@This(), "PLSA_AP_CALL_PACKAGE_PASSTHROUGH")) {
        _ = PLSA_AP_CALL_PACKAGE_PASSTHROUGH;
    }
    if (@hasDecl(@This(), "PLSA_AP_LOGON_TERMINATED")) {
        _ = PLSA_AP_LOGON_TERMINATED;
    }
    if (@hasDecl(@This(), "PSAM_CREDENTIAL_UPDATE_NOTIFY_ROUTINE")) {
        _ = PSAM_CREDENTIAL_UPDATE_NOTIFY_ROUTINE;
    }
    if (@hasDecl(@This(), "PSAM_CREDENTIAL_UPDATE_REGISTER_ROUTINE")) {
        _ = PSAM_CREDENTIAL_UPDATE_REGISTER_ROUTINE;
    }
    if (@hasDecl(@This(), "PSAM_CREDENTIAL_UPDATE_FREE_ROUTINE")) {
        _ = PSAM_CREDENTIAL_UPDATE_FREE_ROUTINE;
    }
    if (@hasDecl(@This(), "PSAM_CREDENTIAL_UPDATE_REGISTER_MAPPED_ENTRYPOINTS_ROUTINE")) {
        _ = PSAM_CREDENTIAL_UPDATE_REGISTER_MAPPED_ENTRYPOINTS_ROUTINE;
    }
    if (@hasDecl(@This(), "PLSA_CALLBACK_FUNCTION")) {
        _ = PLSA_CALLBACK_FUNCTION;
    }
    if (@hasDecl(@This(), "PLSA_REDIRECTED_LOGON_INIT")) {
        _ = PLSA_REDIRECTED_LOGON_INIT;
    }
    if (@hasDecl(@This(), "PLSA_REDIRECTED_LOGON_CALLBACK")) {
        _ = PLSA_REDIRECTED_LOGON_CALLBACK;
    }
    if (@hasDecl(@This(), "PLSA_REDIRECTED_LOGON_CLEANUP_CALLBACK")) {
        _ = PLSA_REDIRECTED_LOGON_CLEANUP_CALLBACK;
    }
    if (@hasDecl(@This(), "PLSA_REDIRECTED_LOGON_GET_LOGON_CREDS")) {
        _ = PLSA_REDIRECTED_LOGON_GET_LOGON_CREDS;
    }
    if (@hasDecl(@This(), "PLSA_REDIRECTED_LOGON_GET_SUPP_CREDS")) {
        _ = PLSA_REDIRECTED_LOGON_GET_SUPP_CREDS;
    }
    if (@hasDecl(@This(), "PLSA_IMPERSONATE_CLIENT")) {
        _ = PLSA_IMPERSONATE_CLIENT;
    }
    if (@hasDecl(@This(), "PLSA_UNLOAD_PACKAGE")) {
        _ = PLSA_UNLOAD_PACKAGE;
    }
    if (@hasDecl(@This(), "PLSA_DUPLICATE_HANDLE")) {
        _ = PLSA_DUPLICATE_HANDLE;
    }
    if (@hasDecl(@This(), "PLSA_SAVE_SUPPLEMENTAL_CREDENTIALS")) {
        _ = PLSA_SAVE_SUPPLEMENTAL_CREDENTIALS;
    }
    if (@hasDecl(@This(), "PLSA_CREATE_THREAD")) {
        _ = PLSA_CREATE_THREAD;
    }
    if (@hasDecl(@This(), "PLSA_GET_CLIENT_INFO")) {
        _ = PLSA_GET_CLIENT_INFO;
    }
    if (@hasDecl(@This(), "PLSA_REGISTER_NOTIFICATION")) {
        _ = PLSA_REGISTER_NOTIFICATION;
    }
    if (@hasDecl(@This(), "PLSA_CANCEL_NOTIFICATION")) {
        _ = PLSA_CANCEL_NOTIFICATION;
    }
    if (@hasDecl(@This(), "PLSA_MAP_BUFFER")) {
        _ = PLSA_MAP_BUFFER;
    }
    if (@hasDecl(@This(), "PLSA_CREATE_TOKEN")) {
        _ = PLSA_CREATE_TOKEN;
    }
    if (@hasDecl(@This(), "PLSA_CREATE_TOKEN_EX")) {
        _ = PLSA_CREATE_TOKEN_EX;
    }
    if (@hasDecl(@This(), "PLSA_AUDIT_LOGON")) {
        _ = PLSA_AUDIT_LOGON;
    }
    if (@hasDecl(@This(), "PLSA_CALL_PACKAGE")) {
        _ = PLSA_CALL_PACKAGE;
    }
    if (@hasDecl(@This(), "PLSA_CALL_PACKAGEEX")) {
        _ = PLSA_CALL_PACKAGEEX;
    }
    if (@hasDecl(@This(), "PLSA_CALL_PACKAGE_PASSTHROUGH")) {
        _ = PLSA_CALL_PACKAGE_PASSTHROUGH;
    }
    if (@hasDecl(@This(), "PLSA_GET_CALL_INFO")) {
        _ = PLSA_GET_CALL_INFO;
    }
    if (@hasDecl(@This(), "PLSA_CREATE_SHARED_MEMORY")) {
        _ = PLSA_CREATE_SHARED_MEMORY;
    }
    if (@hasDecl(@This(), "PLSA_ALLOCATE_SHARED_MEMORY")) {
        _ = PLSA_ALLOCATE_SHARED_MEMORY;
    }
    if (@hasDecl(@This(), "PLSA_FREE_SHARED_MEMORY")) {
        _ = PLSA_FREE_SHARED_MEMORY;
    }
    if (@hasDecl(@This(), "PLSA_DELETE_SHARED_MEMORY")) {
        _ = PLSA_DELETE_SHARED_MEMORY;
    }
    if (@hasDecl(@This(), "PLSA_GET_APP_MODE_INFO")) {
        _ = PLSA_GET_APP_MODE_INFO;
    }
    if (@hasDecl(@This(), "PLSA_SET_APP_MODE_INFO")) {
        _ = PLSA_SET_APP_MODE_INFO;
    }
    if (@hasDecl(@This(), "PLSA_OPEN_SAM_USER")) {
        _ = PLSA_OPEN_SAM_USER;
    }
    if (@hasDecl(@This(), "PLSA_GET_USER_CREDENTIALS")) {
        _ = PLSA_GET_USER_CREDENTIALS;
    }
    if (@hasDecl(@This(), "PLSA_GET_USER_AUTH_DATA")) {
        _ = PLSA_GET_USER_AUTH_DATA;
    }
    if (@hasDecl(@This(), "PLSA_CLOSE_SAM_USER")) {
        _ = PLSA_CLOSE_SAM_USER;
    }
    if (@hasDecl(@This(), "PLSA_GET_AUTH_DATA_FOR_USER")) {
        _ = PLSA_GET_AUTH_DATA_FOR_USER;
    }
    if (@hasDecl(@This(), "PLSA_CONVERT_AUTH_DATA_TO_TOKEN")) {
        _ = PLSA_CONVERT_AUTH_DATA_TO_TOKEN;
    }
    if (@hasDecl(@This(), "PLSA_CRACK_SINGLE_NAME")) {
        _ = PLSA_CRACK_SINGLE_NAME;
    }
    if (@hasDecl(@This(), "PLSA_AUDIT_ACCOUNT_LOGON")) {
        _ = PLSA_AUDIT_ACCOUNT_LOGON;
    }
    if (@hasDecl(@This(), "PLSA_CLIENT_CALLBACK")) {
        _ = PLSA_CLIENT_CALLBACK;
    }
    if (@hasDecl(@This(), "PLSA_REGISTER_CALLBACK")) {
        _ = PLSA_REGISTER_CALLBACK;
    }
    if (@hasDecl(@This(), "PLSA_GET_EXTENDED_CALL_FLAGS")) {
        _ = PLSA_GET_EXTENDED_CALL_FLAGS;
    }
    if (@hasDecl(@This(), "PLSA_UPDATE_PRIMARY_CREDENTIALS")) {
        _ = PLSA_UPDATE_PRIMARY_CREDENTIALS;
    }
    if (@hasDecl(@This(), "PLSA_PROTECT_MEMORY")) {
        _ = PLSA_PROTECT_MEMORY;
    }
    if (@hasDecl(@This(), "PLSA_OPEN_TOKEN_BY_LOGON_ID")) {
        _ = PLSA_OPEN_TOKEN_BY_LOGON_ID;
    }
    if (@hasDecl(@This(), "PLSA_EXPAND_AUTH_DATA_FOR_DOMAIN")) {
        _ = PLSA_EXPAND_AUTH_DATA_FOR_DOMAIN;
    }
    if (@hasDecl(@This(), "PLSA_GET_SERVICE_ACCOUNT_PASSWORD")) {
        _ = PLSA_GET_SERVICE_ACCOUNT_PASSWORD;
    }
    if (@hasDecl(@This(), "PLSA_AUDIT_LOGON_EX")) {
        _ = PLSA_AUDIT_LOGON_EX;
    }
    if (@hasDecl(@This(), "PLSA_CHECK_PROTECTED_USER_BY_TOKEN")) {
        _ = PLSA_CHECK_PROTECTED_USER_BY_TOKEN;
    }
    if (@hasDecl(@This(), "PLSA_QUERY_CLIENT_REQUEST")) {
        _ = PLSA_QUERY_CLIENT_REQUEST;
    }
    if (@hasDecl(@This(), "CredReadFn")) {
        _ = CredReadFn;
    }
    if (@hasDecl(@This(), "CredReadDomainCredentialsFn")) {
        _ = CredReadDomainCredentialsFn;
    }
    if (@hasDecl(@This(), "CredFreeCredentialsFn")) {
        _ = CredFreeCredentialsFn;
    }
    if (@hasDecl(@This(), "CredWriteFn")) {
        _ = CredWriteFn;
    }
    if (@hasDecl(@This(), "CrediUnmarshalandDecodeStringFn")) {
        _ = CrediUnmarshalandDecodeStringFn;
    }
    if (@hasDecl(@This(), "PLSA_LOCATE_PKG_BY_ID")) {
        _ = PLSA_LOCATE_PKG_BY_ID;
    }
    if (@hasDecl(@This(), "SpInitializeFn")) {
        _ = SpInitializeFn;
    }
    if (@hasDecl(@This(), "SpShutdownFn")) {
        _ = SpShutdownFn;
    }
    if (@hasDecl(@This(), "SpGetInfoFn")) {
        _ = SpGetInfoFn;
    }
    if (@hasDecl(@This(), "SpGetExtendedInformationFn")) {
        _ = SpGetExtendedInformationFn;
    }
    if (@hasDecl(@This(), "SpSetExtendedInformationFn")) {
        _ = SpSetExtendedInformationFn;
    }
    if (@hasDecl(@This(), "PLSA_AP_LOGON_USER_EX2")) {
        _ = PLSA_AP_LOGON_USER_EX2;
    }
    if (@hasDecl(@This(), "PLSA_AP_LOGON_USER_EX3")) {
        _ = PLSA_AP_LOGON_USER_EX3;
    }
    if (@hasDecl(@This(), "PLSA_AP_PRE_LOGON_USER_SURROGATE")) {
        _ = PLSA_AP_PRE_LOGON_USER_SURROGATE;
    }
    if (@hasDecl(@This(), "PLSA_AP_POST_LOGON_USER_SURROGATE")) {
        _ = PLSA_AP_POST_LOGON_USER_SURROGATE;
    }
    if (@hasDecl(@This(), "SpAcceptCredentialsFn")) {
        _ = SpAcceptCredentialsFn;
    }
    if (@hasDecl(@This(), "SpAcquireCredentialsHandleFn")) {
        _ = SpAcquireCredentialsHandleFn;
    }
    if (@hasDecl(@This(), "SpFreeCredentialsHandleFn")) {
        _ = SpFreeCredentialsHandleFn;
    }
    if (@hasDecl(@This(), "SpQueryCredentialsAttributesFn")) {
        _ = SpQueryCredentialsAttributesFn;
    }
    if (@hasDecl(@This(), "SpSetCredentialsAttributesFn")) {
        _ = SpSetCredentialsAttributesFn;
    }
    if (@hasDecl(@This(), "SpAddCredentialsFn")) {
        _ = SpAddCredentialsFn;
    }
    if (@hasDecl(@This(), "SpSaveCredentialsFn")) {
        _ = SpSaveCredentialsFn;
    }
    if (@hasDecl(@This(), "SpGetCredentialsFn")) {
        _ = SpGetCredentialsFn;
    }
    if (@hasDecl(@This(), "SpDeleteCredentialsFn")) {
        _ = SpDeleteCredentialsFn;
    }
    if (@hasDecl(@This(), "SpInitLsaModeContextFn")) {
        _ = SpInitLsaModeContextFn;
    }
    if (@hasDecl(@This(), "SpDeleteContextFn")) {
        _ = SpDeleteContextFn;
    }
    if (@hasDecl(@This(), "SpApplyControlTokenFn")) {
        _ = SpApplyControlTokenFn;
    }
    if (@hasDecl(@This(), "SpAcceptLsaModeContextFn")) {
        _ = SpAcceptLsaModeContextFn;
    }
    if (@hasDecl(@This(), "SpGetUserInfoFn")) {
        _ = SpGetUserInfoFn;
    }
    if (@hasDecl(@This(), "SpQueryContextAttributesFn")) {
        _ = SpQueryContextAttributesFn;
    }
    if (@hasDecl(@This(), "SpSetContextAttributesFn")) {
        _ = SpSetContextAttributesFn;
    }
    if (@hasDecl(@This(), "SpChangeAccountPasswordFn")) {
        _ = SpChangeAccountPasswordFn;
    }
    if (@hasDecl(@This(), "SpQueryMetaDataFn")) {
        _ = SpQueryMetaDataFn;
    }
    if (@hasDecl(@This(), "SpExchangeMetaDataFn")) {
        _ = SpExchangeMetaDataFn;
    }
    if (@hasDecl(@This(), "SpGetCredUIContextFn")) {
        _ = SpGetCredUIContextFn;
    }
    if (@hasDecl(@This(), "SpUpdateCredentialsFn")) {
        _ = SpUpdateCredentialsFn;
    }
    if (@hasDecl(@This(), "SpValidateTargetInfoFn")) {
        _ = SpValidateTargetInfoFn;
    }
    if (@hasDecl(@This(), "LSA_AP_POST_LOGON_USER")) {
        _ = LSA_AP_POST_LOGON_USER;
    }
    if (@hasDecl(@This(), "SpGetRemoteCredGuardLogonBufferFn")) {
        _ = SpGetRemoteCredGuardLogonBufferFn;
    }
    if (@hasDecl(@This(), "SpGetRemoteCredGuardSupplementalCredsFn")) {
        _ = SpGetRemoteCredGuardSupplementalCredsFn;
    }
    if (@hasDecl(@This(), "SpGetTbalSupplementalCredsFn")) {
        _ = SpGetTbalSupplementalCredsFn;
    }
    if (@hasDecl(@This(), "SpInstanceInitFn")) {
        _ = SpInstanceInitFn;
    }
    if (@hasDecl(@This(), "SpInitUserModeContextFn")) {
        _ = SpInitUserModeContextFn;
    }
    if (@hasDecl(@This(), "SpMakeSignatureFn")) {
        _ = SpMakeSignatureFn;
    }
    if (@hasDecl(@This(), "SpVerifySignatureFn")) {
        _ = SpVerifySignatureFn;
    }
    if (@hasDecl(@This(), "SpSealMessageFn")) {
        _ = SpSealMessageFn;
    }
    if (@hasDecl(@This(), "SpUnsealMessageFn")) {
        _ = SpUnsealMessageFn;
    }
    if (@hasDecl(@This(), "SpGetContextTokenFn")) {
        _ = SpGetContextTokenFn;
    }
    if (@hasDecl(@This(), "SpExportSecurityContextFn")) {
        _ = SpExportSecurityContextFn;
    }
    if (@hasDecl(@This(), "SpImportSecurityContextFn")) {
        _ = SpImportSecurityContextFn;
    }
    if (@hasDecl(@This(), "SpCompleteAuthTokenFn")) {
        _ = SpCompleteAuthTokenFn;
    }
    if (@hasDecl(@This(), "SpFormatCredentialsFn")) {
        _ = SpFormatCredentialsFn;
    }
    if (@hasDecl(@This(), "SpMarshallSupplementalCredsFn")) {
        _ = SpMarshallSupplementalCredsFn;
    }
    if (@hasDecl(@This(), "SpMarshalAttributeDataFn")) {
        _ = SpMarshalAttributeDataFn;
    }
    if (@hasDecl(@This(), "SpLsaModeInitializeFn")) {
        _ = SpLsaModeInitializeFn;
    }
    if (@hasDecl(@This(), "SpUserModeInitializeFn")) {
        _ = SpUserModeInitializeFn;
    }
    if (@hasDecl(@This(), "PKSEC_CREATE_CONTEXT_LIST")) {
        _ = PKSEC_CREATE_CONTEXT_LIST;
    }
    if (@hasDecl(@This(), "PKSEC_INSERT_LIST_ENTRY")) {
        _ = PKSEC_INSERT_LIST_ENTRY;
    }
    if (@hasDecl(@This(), "PKSEC_REFERENCE_LIST_ENTRY")) {
        _ = PKSEC_REFERENCE_LIST_ENTRY;
    }
    if (@hasDecl(@This(), "PKSEC_DEREFERENCE_LIST_ENTRY")) {
        _ = PKSEC_DEREFERENCE_LIST_ENTRY;
    }
    if (@hasDecl(@This(), "PKSEC_SERIALIZE_WINNT_AUTH_DATA")) {
        _ = PKSEC_SERIALIZE_WINNT_AUTH_DATA;
    }
    if (@hasDecl(@This(), "PKSEC_SERIALIZE_SCHANNEL_AUTH_DATA")) {
        _ = PKSEC_SERIALIZE_SCHANNEL_AUTH_DATA;
    }
    if (@hasDecl(@This(), "PKSEC_LOCATE_PKG_BY_ID")) {
        _ = PKSEC_LOCATE_PKG_BY_ID;
    }
    if (@hasDecl(@This(), "KspInitPackageFn")) {
        _ = KspInitPackageFn;
    }
    if (@hasDecl(@This(), "KspDeleteContextFn")) {
        _ = KspDeleteContextFn;
    }
    if (@hasDecl(@This(), "KspInitContextFn")) {
        _ = KspInitContextFn;
    }
    if (@hasDecl(@This(), "KspMakeSignatureFn")) {
        _ = KspMakeSignatureFn;
    }
    if (@hasDecl(@This(), "KspVerifySignatureFn")) {
        _ = KspVerifySignatureFn;
    }
    if (@hasDecl(@This(), "KspSealMessageFn")) {
        _ = KspSealMessageFn;
    }
    if (@hasDecl(@This(), "KspUnsealMessageFn")) {
        _ = KspUnsealMessageFn;
    }
    if (@hasDecl(@This(), "KspGetTokenFn")) {
        _ = KspGetTokenFn;
    }
    if (@hasDecl(@This(), "KspQueryAttributesFn")) {
        _ = KspQueryAttributesFn;
    }
    if (@hasDecl(@This(), "KspCompleteTokenFn")) {
        _ = KspCompleteTokenFn;
    }
    if (@hasDecl(@This(), "KspMapHandleFn")) {
        _ = KspMapHandleFn;
    }
    if (@hasDecl(@This(), "KspSetPagingModeFn")) {
        _ = KspSetPagingModeFn;
    }
    if (@hasDecl(@This(), "KspSerializeAuthDataFn")) {
        _ = KspSerializeAuthDataFn;
    }
    if (@hasDecl(@This(), "SSL_EMPTY_CACHE_FN_A")) {
        _ = SSL_EMPTY_CACHE_FN_A;
    }
    if (@hasDecl(@This(), "SSL_EMPTY_CACHE_FN_W")) {
        _ = SSL_EMPTY_CACHE_FN_W;
    }
    if (@hasDecl(@This(), "SSL_CRACK_CERTIFICATE_FN")) {
        _ = SSL_CRACK_CERTIFICATE_FN;
    }
    if (@hasDecl(@This(), "SSL_FREE_CERTIFICATE_FN")) {
        _ = SSL_FREE_CERTIFICATE_FN;
    }
    if (@hasDecl(@This(), "SslGetServerIdentityFn")) {
        _ = SslGetServerIdentityFn;
    }
    if (@hasDecl(@This(), "SslGetExtensionsFn")) {
        _ = SslGetExtensionsFn;
    }

    @setEvalBranchQuota(comptime @import("std").meta.declarations(@This()).len * 3);

    // reference all the pub declarations
    if (!@import("builtin").is_test) return;
    inline for (comptime @import("std").meta.declarations(@This())) |decl| {
        if (decl.is_pub) {
            _ = @field(@This(), decl.name);
        }
    }
}
//--------------------------------------------------------------------------------
// Section: SubModules (1)
//--------------------------------------------------------------------------------
pub const provider = @import("identity/provider.zig");
