//! NOTE: this file is autogenerated, DO NOT MODIFY
//--------------------------------------------------------------------------------
// Section: Constants (83)
//--------------------------------------------------------------------------------
pub const WNGETCON_CONNECTED = @as(u32, 0);
pub const WNGETCON_DISCONNECTED = @as(u32, 1);
pub const WNNC_SPEC_VERSION = @as(u32, 1);
pub const WNNC_SPEC_VERSION51 = @as(u32, 327681);
pub const WNNC_NET_TYPE = @as(u32, 2);
pub const WNNC_NET_NONE = @as(u32, 0);
pub const WNNC_DRIVER_VERSION = @as(u32, 3);
pub const WNNC_USER = @as(u32, 4);
pub const WNNC_USR_GETUSER = @as(u32, 1);
pub const WNNC_CONNECTION = @as(u32, 6);
pub const WNNC_CON_ADDCONNECTION = @as(u32, 1);
pub const WNNC_CON_CANCELCONNECTION = @as(u32, 2);
pub const WNNC_CON_GETCONNECTIONS = @as(u32, 4);
pub const WNNC_CON_ADDCONNECTION3 = @as(u32, 8);
pub const WNNC_CON_ADDCONNECTION4 = @as(u32, 16);
pub const WNNC_CON_CANCELCONNECTION2 = @as(u32, 32);
pub const WNNC_CON_GETPERFORMANCE = @as(u32, 64);
pub const WNNC_CON_DEFER = @as(u32, 128);
pub const WNNC_DIALOG = @as(u32, 8);
pub const WNNC_DLG_DEVICEMODE = @as(u32, 1);
pub const WNNC_DLG_PROPERTYDIALOG = @as(u32, 32);
pub const WNNC_DLG_SEARCHDIALOG = @as(u32, 64);
pub const WNNC_DLG_FORMATNETWORKNAME = @as(u32, 128);
pub const WNNC_DLG_PERMISSIONEDITOR = @as(u32, 256);
pub const WNNC_DLG_GETRESOURCEPARENT = @as(u32, 512);
pub const WNNC_DLG_GETRESOURCEINFORMATION = @as(u32, 2048);
pub const WNNC_ADMIN = @as(u32, 9);
pub const WNNC_ADM_GETDIRECTORYTYPE = @as(u32, 1);
pub const WNNC_ADM_DIRECTORYNOTIFY = @as(u32, 2);
pub const WNNC_ENUMERATION = @as(u32, 11);
pub const WNNC_ENUM_GLOBAL = @as(u32, 1);
pub const WNNC_ENUM_LOCAL = @as(u32, 2);
pub const WNNC_ENUM_CONTEXT = @as(u32, 4);
pub const WNNC_ENUM_SHAREABLE = @as(u32, 8);
pub const WNNC_START = @as(u32, 12);
pub const WNNC_WAIT_FOR_START = @as(u32, 1);
pub const WNNC_CONNECTION_FLAGS = @as(u32, 13);
pub const WNTYPE_DRIVE = @as(u32, 1);
pub const WNTYPE_FILE = @as(u32, 2);
pub const WNTYPE_PRINTER = @as(u32, 3);
pub const WNTYPE_COMM = @as(u32, 4);
pub const WNSRCH_REFRESH_FIRST_LEVEL = @as(u32, 1);
pub const WNDT_NORMAL = @as(u32, 0);
pub const WNDT_NETWORK = @as(u32, 1);
pub const WN_NETWORK_CLASS = @as(u32, 1);
pub const WN_CREDENTIAL_CLASS = @as(u32, 2);
pub const WN_PRIMARY_AUTHENT_CLASS = @as(u32, 4);
pub const WN_SERVICE_CLASS = @as(u32, 8);
pub const WN_VALID_LOGON_ACCOUNT = @as(u32, 1);
pub const WN_NT_PASSWORD_CHANGED = @as(u32, 2);
pub const NOTIFY_PRE = @as(u32, 1);
pub const NOTIFY_POST = @as(u32, 2);
pub const WNPERMC_PERM = @as(u32, 1);
pub const WNPERMC_AUDIT = @as(u32, 2);
pub const WNPERMC_OWNER = @as(u32, 4);
pub const RESOURCE_RECENT = @as(u32, 4);
pub const RESOURCETYPE_RESERVED = @as(u32, 8);
pub const RESOURCETYPE_UNKNOWN = @as(u32, 4294967295);
pub const RESOURCEUSAGE_NOLOCALDEVICE = @as(u32, 4);
pub const RESOURCEUSAGE_SIBLING = @as(u32, 8);
pub const RESOURCEUSAGE_RESERVED = @as(u32, 2147483648);
pub const RESOURCEDISPLAYTYPE_NETWORK = @as(u32, 6);
pub const RESOURCEDISPLAYTYPE_ROOT = @as(u32, 7);
pub const RESOURCEDISPLAYTYPE_SHAREADMIN = @as(u32, 8);
pub const RESOURCEDISPLAYTYPE_DIRECTORY = @as(u32, 9);
pub const RESOURCEDISPLAYTYPE_NDSCONTAINER = @as(u32, 11);
pub const NETPROPERTY_PERSISTENT = @as(u32, 1);
pub const CONNECT_NEED_DRIVE = @as(u32, 32);
pub const CONNECT_REFCOUNT = @as(u32, 64);
pub const CONNECT_LOCALDRIVE = @as(u32, 256);
pub const CONNECT_CURRENT_MEDIA = @as(u32, 512);
pub const CONNECT_RESERVED = @as(u32, 4278190080);
pub const CONNECT_CRED_RESET = @as(u32, 8192);
pub const CONNECT_REQUIRE_INTEGRITY = @as(u32, 16384);
pub const CONNECT_REQUIRE_PRIVACY = @as(u32, 32768);
pub const CONNECT_WRITE_THROUGH_SEMANTICS = @as(u32, 65536);
pub const CONNECT_GLOBAL_MAPPING = @as(u32, 262144);
pub const WNFMT_INENUM = @as(u32, 16);
pub const WNFMT_CONNECTION = @as(u32, 32);
pub const WNCON_FORNETCARD = @as(u32, 1);
pub const WNCON_NOTROUTED = @as(u32, 2);
pub const WNCON_SLOWLINK = @as(u32, 4);
pub const WNCON_DYNAMIC = @as(u32, 8);

//--------------------------------------------------------------------------------
// Section: Types (59)
//--------------------------------------------------------------------------------
pub const UNC_INFO_LEVEL = enum(u32) {
    UNIVERSAL_NAME_INFO_LEVEL = 1,
    REMOTE_NAME_INFO_LEVEL = 2,
};
pub const UNIVERSAL_NAME_INFO_LEVEL = UNC_INFO_LEVEL.UNIVERSAL_NAME_INFO_LEVEL;
pub const REMOTE_NAME_INFO_LEVEL = UNC_INFO_LEVEL.REMOTE_NAME_INFO_LEVEL;

pub const WNPERM_DLG = enum(u32) {
    PERM = 0,
    AUDIT = 1,
    OWNER = 2,
};
pub const WNPERM_DLG_PERM = WNPERM_DLG.PERM;
pub const WNPERM_DLG_AUDIT = WNPERM_DLG.AUDIT;
pub const WNPERM_DLG_OWNER = WNPERM_DLG.OWNER;

pub const WNET_OPEN_ENUM_USAGE = enum(u32) {
    NONE = 0,
    CONNECTABLE = 1,
    CONTAINER = 2,
    ATTACHED = 16,
    ALL = 19,
    _,
    pub fn initFlags(o: struct {
        NONE: u1 = 0,
        CONNECTABLE: u1 = 0,
        CONTAINER: u1 = 0,
        ATTACHED: u1 = 0,
        ALL: u1 = 0,
    }) WNET_OPEN_ENUM_USAGE {
        return @as(WNET_OPEN_ENUM_USAGE, @enumFromInt((if (o.NONE == 1) @intFromEnum(WNET_OPEN_ENUM_USAGE.NONE) else 0) | (if (o.CONNECTABLE == 1) @intFromEnum(WNET_OPEN_ENUM_USAGE.CONNECTABLE) else 0) | (if (o.CONTAINER == 1) @intFromEnum(WNET_OPEN_ENUM_USAGE.CONTAINER) else 0) | (if (o.ATTACHED == 1) @intFromEnum(WNET_OPEN_ENUM_USAGE.ATTACHED) else 0) | (if (o.ALL == 1) @intFromEnum(WNET_OPEN_ENUM_USAGE.ALL) else 0)));
    }
};
pub const RESOURCEUSAGE_NONE = WNET_OPEN_ENUM_USAGE.NONE;
pub const RESOURCEUSAGE_CONNECTABLE = WNET_OPEN_ENUM_USAGE.CONNECTABLE;
pub const RESOURCEUSAGE_CONTAINER = WNET_OPEN_ENUM_USAGE.CONTAINER;
pub const RESOURCEUSAGE_ATTACHED = WNET_OPEN_ENUM_USAGE.ATTACHED;
pub const RESOURCEUSAGE_ALL = WNET_OPEN_ENUM_USAGE.ALL;

pub const NET_USE_CONNECT_FLAGS = enum(u32) {
    INTERACTIVE = 8,
    PROMPT = 16,
    REDIRECT = 128,
    UPDATE_PROFILE = 1,
    COMMANDLINE = 2048,
    CMD_SAVECRED = 4096,
    TEMPORARY = 4,
    DEFERRED = 1024,
    UPDATE_RECENT = 2,
    _,
    pub fn initFlags(o: struct {
        INTERACTIVE: u1 = 0,
        PROMPT: u1 = 0,
        REDIRECT: u1 = 0,
        UPDATE_PROFILE: u1 = 0,
        COMMANDLINE: u1 = 0,
        CMD_SAVECRED: u1 = 0,
        TEMPORARY: u1 = 0,
        DEFERRED: u1 = 0,
        UPDATE_RECENT: u1 = 0,
    }) NET_USE_CONNECT_FLAGS {
        return @as(NET_USE_CONNECT_FLAGS, @enumFromInt((if (o.INTERACTIVE == 1) @intFromEnum(NET_USE_CONNECT_FLAGS.INTERACTIVE) else 0) | (if (o.PROMPT == 1) @intFromEnum(NET_USE_CONNECT_FLAGS.PROMPT) else 0) | (if (o.REDIRECT == 1) @intFromEnum(NET_USE_CONNECT_FLAGS.REDIRECT) else 0) | (if (o.UPDATE_PROFILE == 1) @intFromEnum(NET_USE_CONNECT_FLAGS.UPDATE_PROFILE) else 0) | (if (o.COMMANDLINE == 1) @intFromEnum(NET_USE_CONNECT_FLAGS.COMMANDLINE) else 0) | (if (o.CMD_SAVECRED == 1) @intFromEnum(NET_USE_CONNECT_FLAGS.CMD_SAVECRED) else 0) | (if (o.TEMPORARY == 1) @intFromEnum(NET_USE_CONNECT_FLAGS.TEMPORARY) else 0) | (if (o.DEFERRED == 1) @intFromEnum(NET_USE_CONNECT_FLAGS.DEFERRED) else 0) | (if (o.UPDATE_RECENT == 1) @intFromEnum(NET_USE_CONNECT_FLAGS.UPDATE_RECENT) else 0)));
    }
};
pub const CONNECT_INTERACTIVE = NET_USE_CONNECT_FLAGS.INTERACTIVE;
pub const CONNECT_PROMPT = NET_USE_CONNECT_FLAGS.PROMPT;
pub const CONNECT_REDIRECT = NET_USE_CONNECT_FLAGS.REDIRECT;
pub const CONNECT_UPDATE_PROFILE = NET_USE_CONNECT_FLAGS.UPDATE_PROFILE;
pub const CONNECT_COMMANDLINE = NET_USE_CONNECT_FLAGS.COMMANDLINE;
pub const CONNECT_CMD_SAVECRED = NET_USE_CONNECT_FLAGS.CMD_SAVECRED;
pub const CONNECT_TEMPORARY = NET_USE_CONNECT_FLAGS.TEMPORARY;
pub const CONNECT_DEFERRED = NET_USE_CONNECT_FLAGS.DEFERRED;
pub const CONNECT_UPDATE_RECENT = NET_USE_CONNECT_FLAGS.UPDATE_RECENT;

pub const NP_PROPERTY_DIALOG_SELECTION = enum(u32) {
    FILE = 0,
    DIR = 1,
    MULT = 2,
};
pub const WNPS_FILE = NP_PROPERTY_DIALOG_SELECTION.FILE;
pub const WNPS_DIR = NP_PROPERTY_DIALOG_SELECTION.DIR;
pub const WNPS_MULT = NP_PROPERTY_DIALOG_SELECTION.MULT;

pub const NPDIRECTORY_NOTIFY_OPERATION = enum(u32) {
    MKDIR = 1,
    RMDIR = 2,
    MVDIR = 3,
};
pub const WNDN_MKDIR = NPDIRECTORY_NOTIFY_OPERATION.MKDIR;
pub const WNDN_RMDIR = NPDIRECTORY_NOTIFY_OPERATION.RMDIR;
pub const WNDN_MVDIR = NPDIRECTORY_NOTIFY_OPERATION.MVDIR;

pub const NET_RESOURCE_TYPE = enum(u32) {
    ANY = 0,
    DISK = 1,
    PRINT = 2,
    _,
    pub fn initFlags(o: struct {
        ANY: u1 = 0,
        DISK: u1 = 0,
        PRINT: u1 = 0,
    }) NET_RESOURCE_TYPE {
        return @as(NET_RESOURCE_TYPE, @enumFromInt((if (o.ANY == 1) @intFromEnum(NET_RESOURCE_TYPE.ANY) else 0) | (if (o.DISK == 1) @intFromEnum(NET_RESOURCE_TYPE.DISK) else 0) | (if (o.PRINT == 1) @intFromEnum(NET_RESOURCE_TYPE.PRINT) else 0)));
    }
};
pub const RESOURCETYPE_ANY = NET_RESOURCE_TYPE.ANY;
pub const RESOURCETYPE_DISK = NET_RESOURCE_TYPE.DISK;
pub const RESOURCETYPE_PRINT = NET_RESOURCE_TYPE.PRINT;

pub const NETWORK_NAME_FORMAT_FLAGS = enum(u32) {
    MULTILINE = 1,
    ABBREVIATED = 2,
};
pub const WNFMT_MULTILINE = NETWORK_NAME_FORMAT_FLAGS.MULTILINE;
pub const WNFMT_ABBREVIATED = NETWORK_NAME_FORMAT_FLAGS.ABBREVIATED;

pub const NET_RESOURCE_SCOPE = enum(u32) {
    CONNECTED = 1,
    CONTEXT = 5,
    GLOBALNET = 2,
    REMEMBERED = 3,
};
pub const RESOURCE_CONNECTED = NET_RESOURCE_SCOPE.CONNECTED;
pub const RESOURCE_CONTEXT = NET_RESOURCE_SCOPE.CONTEXT;
pub const RESOURCE_GLOBALNET = NET_RESOURCE_SCOPE.GLOBALNET;
pub const RESOURCE_REMEMBERED = NET_RESOURCE_SCOPE.REMEMBERED;

pub const NETINFOSTRUCT_CHARACTERISTICS = enum(u32) {
    DLL16 = 1,
    DISKRED = 4,
    PRINTERRED = 8,
    _,
    pub fn initFlags(o: struct {
        DLL16: u1 = 0,
        DISKRED: u1 = 0,
        PRINTERRED: u1 = 0,
    }) NETINFOSTRUCT_CHARACTERISTICS {
        return @as(NETINFOSTRUCT_CHARACTERISTICS, @enumFromInt((if (o.DLL16 == 1) @intFromEnum(NETINFOSTRUCT_CHARACTERISTICS.DLL16) else 0) | (if (o.DISKRED == 1) @intFromEnum(NETINFOSTRUCT_CHARACTERISTICS.DISKRED) else 0) | (if (o.PRINTERRED == 1) @intFromEnum(NETINFOSTRUCT_CHARACTERISTICS.PRINTERRED) else 0)));
    }
};
pub const NETINFO_DLL16 = NETINFOSTRUCT_CHARACTERISTICS.DLL16;
pub const NETINFO_DISKRED = NETINFOSTRUCT_CHARACTERISTICS.DISKRED;
pub const NETINFO_PRINTERRED = NETINFOSTRUCT_CHARACTERISTICS.PRINTERRED;

pub const CONNECTDLGSTRUCT_FLAGS = enum(u32) {
    RO_PATH = 1,
    CONN_POINT = 2,
    USE_MRU = 4,
    HIDE_BOX = 8,
    PERSIST = 16,
    NOT_PERSIST = 32,
    _,
    pub fn initFlags(o: struct {
        RO_PATH: u1 = 0,
        CONN_POINT: u1 = 0,
        USE_MRU: u1 = 0,
        HIDE_BOX: u1 = 0,
        PERSIST: u1 = 0,
        NOT_PERSIST: u1 = 0,
    }) CONNECTDLGSTRUCT_FLAGS {
        return @as(CONNECTDLGSTRUCT_FLAGS, @enumFromInt((if (o.RO_PATH == 1) @intFromEnum(CONNECTDLGSTRUCT_FLAGS.RO_PATH) else 0) | (if (o.CONN_POINT == 1) @intFromEnum(CONNECTDLGSTRUCT_FLAGS.CONN_POINT) else 0) | (if (o.USE_MRU == 1) @intFromEnum(CONNECTDLGSTRUCT_FLAGS.USE_MRU) else 0) | (if (o.HIDE_BOX == 1) @intFromEnum(CONNECTDLGSTRUCT_FLAGS.HIDE_BOX) else 0) | (if (o.PERSIST == 1) @intFromEnum(CONNECTDLGSTRUCT_FLAGS.PERSIST) else 0) | (if (o.NOT_PERSIST == 1) @intFromEnum(CONNECTDLGSTRUCT_FLAGS.NOT_PERSIST) else 0)));
    }
};
pub const CONNDLG_RO_PATH = CONNECTDLGSTRUCT_FLAGS.RO_PATH;
pub const CONNDLG_CONN_POINT = CONNECTDLGSTRUCT_FLAGS.CONN_POINT;
pub const CONNDLG_USE_MRU = CONNECTDLGSTRUCT_FLAGS.USE_MRU;
pub const CONNDLG_HIDE_BOX = CONNECTDLGSTRUCT_FLAGS.HIDE_BOX;
pub const CONNDLG_PERSIST = CONNECTDLGSTRUCT_FLAGS.PERSIST;
pub const CONNDLG_NOT_PERSIST = CONNECTDLGSTRUCT_FLAGS.NOT_PERSIST;

pub const DISCDLGSTRUCT_FLAGS = enum(u32) {
    UPDATE_PROFILE = 1,
    NO_FORCE = 64,
    _,
    pub fn initFlags(o: struct {
        UPDATE_PROFILE: u1 = 0,
        NO_FORCE: u1 = 0,
    }) DISCDLGSTRUCT_FLAGS {
        return @as(DISCDLGSTRUCT_FLAGS, @enumFromInt((if (o.UPDATE_PROFILE == 1) @intFromEnum(DISCDLGSTRUCT_FLAGS.UPDATE_PROFILE) else 0) | (if (o.NO_FORCE == 1) @intFromEnum(DISCDLGSTRUCT_FLAGS.NO_FORCE) else 0)));
    }
};
pub const DISC_UPDATE_PROFILE = DISCDLGSTRUCT_FLAGS.UPDATE_PROFILE;
pub const DISC_NO_FORCE = DISCDLGSTRUCT_FLAGS.NO_FORCE;

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

pub const NETRESOURCEA = extern struct {
    dwScope: NET_RESOURCE_SCOPE,
    dwType: NET_RESOURCE_TYPE,
    dwDisplayType: u32,
    dwUsage: u32,
    lpLocalName: ?PSTR,
    lpRemoteName: ?PSTR,
    lpComment: ?PSTR,
    lpProvider: ?PSTR,
};

pub const NETRESOURCEW = extern struct {
    dwScope: NET_RESOURCE_SCOPE,
    dwType: NET_RESOURCE_TYPE,
    dwDisplayType: u32,
    dwUsage: u32,
    lpLocalName: ?PWSTR,
    lpRemoteName: ?PWSTR,
    lpComment: ?PWSTR,
    lpProvider: ?PWSTR,
};

pub const CONNECTDLGSTRUCTA = extern struct {
    cbStructure: u32,
    hwndOwner: ?HWND,
    lpConnRes: ?*NETRESOURCEA,
    dwFlags: CONNECTDLGSTRUCT_FLAGS,
    dwDevNum: u32,
};

pub const CONNECTDLGSTRUCTW = extern struct {
    cbStructure: u32,
    hwndOwner: ?HWND,
    lpConnRes: ?*NETRESOURCEW,
    dwFlags: CONNECTDLGSTRUCT_FLAGS,
    dwDevNum: u32,
};

pub const DISCDLGSTRUCTA = extern struct {
    cbStructure: u32,
    hwndOwner: ?HWND,
    lpLocalName: ?PSTR,
    lpRemoteName: ?PSTR,
    dwFlags: DISCDLGSTRUCT_FLAGS,
};

pub const DISCDLGSTRUCTW = extern struct {
    cbStructure: u32,
    hwndOwner: ?HWND,
    lpLocalName: ?PWSTR,
    lpRemoteName: ?PWSTR,
    dwFlags: DISCDLGSTRUCT_FLAGS,
};

pub const UNIVERSAL_NAME_INFOA = extern struct {
    lpUniversalName: ?PSTR,
};

pub const UNIVERSAL_NAME_INFOW = extern struct {
    lpUniversalName: ?PWSTR,
};

pub const REMOTE_NAME_INFOA = extern struct {
    lpUniversalName: ?PSTR,
    lpConnectionName: ?PSTR,
    lpRemainingPath: ?PSTR,
};

pub const REMOTE_NAME_INFOW = extern struct {
    lpUniversalName: ?PWSTR,
    lpConnectionName: ?PWSTR,
    lpRemainingPath: ?PWSTR,
};

pub const NETINFOSTRUCT = extern struct {
    cbStructure: u32,
    dwProviderVersion: u32,
    dwStatus: WIN32_ERROR,
    dwCharacteristics: NETINFOSTRUCT_CHARACTERISTICS,
    dwHandle: usize,
    wNetType: u16,
    dwPrinters: u32,
    dwDrives: u32,
};

pub const NETCONNECTINFOSTRUCT = extern struct {
    cbStructure: u32,
    dwFlags: u32,
    dwSpeed: u32,
    dwDelay: u32,
    dwOptDataSize: u32,
};

pub const PF_NPAddConnection = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        lpNetResource: ?*NETRESOURCEW,
        lpPassword: ?PWSTR,
        lpUserName: ?PWSTR,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        lpNetResource: ?*NETRESOURCEW,
        lpPassword: ?PWSTR,
        lpUserName: ?PWSTR,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const PF_NPAddConnection3 = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        hwndOwner: ?HWND,
        lpNetResource: ?*NETRESOURCEW,
        lpPassword: ?PWSTR,
        lpUserName: ?PWSTR,
        dwFlags: u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        hwndOwner: ?HWND,
        lpNetResource: ?*NETRESOURCEW,
        lpPassword: ?PWSTR,
        lpUserName: ?PWSTR,
        dwFlags: u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const PF_NPAddConnection4 = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        hwndOwner: ?HWND,
        lpNetResource: ?*NETRESOURCEW,
        // TODO: what to do with BytesParamIndex 3?
        lpAuthBuffer: ?*anyopaque,
        cbAuthBuffer: u32,
        dwFlags: u32,
        // TODO: what to do with BytesParamIndex 6?
        lpUseOptions: ?*u8,
        cbUseOptions: u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        hwndOwner: ?HWND,
        lpNetResource: ?*NETRESOURCEW,
        // TODO: what to do with BytesParamIndex 3?
        lpAuthBuffer: ?*anyopaque,
        cbAuthBuffer: u32,
        dwFlags: u32,
        // TODO: what to do with BytesParamIndex 6?
        lpUseOptions: ?*u8,
        cbUseOptions: u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

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

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

pub const PF_NPGetConnection = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        lpLocalName: ?PWSTR,
        lpRemoteName: ?[*:0]u16,
        lpnBufferLen: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        lpLocalName: ?PWSTR,
        lpRemoteName: ?[*:0]u16,
        lpnBufferLen: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const PF_NPGetConnection3 = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        lpLocalName: ?[*:0]const u16,
        dwLevel: u32,
        // TODO: what to do with BytesParamIndex 3?
        lpBuffer: ?*anyopaque,
        lpBufferSize: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        lpLocalName: ?[*:0]const u16,
        dwLevel: u32,
        // TODO: what to do with BytesParamIndex 3?
        lpBuffer: ?*anyopaque,
        lpBufferSize: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const PF_NPGetUniversalName = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        lpLocalPath: ?[*:0]const u16,
        dwInfoLevel: u32,
        // TODO: what to do with BytesParamIndex 3?
        lpBuffer: ?*anyopaque,
        lpnBufferSize: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        lpLocalPath: ?[*:0]const u16,
        dwInfoLevel: u32,
        // TODO: what to do with BytesParamIndex 3?
        lpBuffer: ?*anyopaque,
        lpnBufferSize: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const PF_NPGetConnectionPerformance = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        lpRemoteName: ?[*:0]const u16,
        lpNetConnectInfo: ?*NETCONNECTINFOSTRUCT,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        lpRemoteName: ?[*:0]const u16,
        lpNetConnectInfo: ?*NETCONNECTINFOSTRUCT,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const PF_NPOpenEnum = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        dwScope: u32,
        dwType: u32,
        dwUsage: u32,
        lpNetResource: ?*NETRESOURCEW,
        lphEnum: ?*?HANDLE,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        dwScope: u32,
        dwType: u32,
        dwUsage: u32,
        lpNetResource: ?*NETRESOURCEW,
        lphEnum: ?*?HANDLE,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const PF_NPEnumResource = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        hEnum: ?HANDLE,
        lpcCount: ?*u32,
        // TODO: what to do with BytesParamIndex 3?
        lpBuffer: ?*anyopaque,
        lpBufferSize: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        hEnum: ?HANDLE,
        lpcCount: ?*u32,
        // TODO: what to do with BytesParamIndex 3?
        lpBuffer: ?*anyopaque,
        lpBufferSize: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

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

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

pub const PF_NPGetUser = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        lpName: ?PWSTR,
        lpUserName: [*:0]u16,
        lpnBufferLen: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        lpName: ?PWSTR,
        lpUserName: [*:0]u16,
        lpnBufferLen: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const PF_NPGetPersistentUseOptionsForConnection = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        lpRemotePath: ?PWSTR,
        // TODO: what to do with BytesParamIndex 2?
        lpReadUseOptions: ?*u8,
        cbReadUseOptions: u32,
        // TODO: what to do with BytesParamIndex 4?
        lpWriteUseOptions: ?*u8,
        lpSizeWriteUseOptions: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        lpRemotePath: ?PWSTR,
        // TODO: what to do with BytesParamIndex 2?
        lpReadUseOptions: ?*u8,
        cbReadUseOptions: u32,
        // TODO: what to do with BytesParamIndex 4?
        lpWriteUseOptions: ?*u8,
        lpSizeWriteUseOptions: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

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

pub const PF_NPSearchDialog = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        hwndParent: ?HWND,
        lpNetResource: ?*NETRESOURCEW,
        lpBuffer: [*]u8,
        cbBuffer: u32,
        lpnFlags: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        hwndParent: ?HWND,
        lpNetResource: ?*NETRESOURCEW,
        lpBuffer: [*]u8,
        cbBuffer: u32,
        lpnFlags: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const PF_NPGetResourceParent = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        lpNetResource: ?*NETRESOURCEW,
        // TODO: what to do with BytesParamIndex 2?
        lpBuffer: ?*anyopaque,
        lpBufferSize: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        lpNetResource: ?*NETRESOURCEW,
        // TODO: what to do with BytesParamIndex 2?
        lpBuffer: ?*anyopaque,
        lpBufferSize: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const PF_NPGetResourceInformation = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        lpNetResource: ?*NETRESOURCEW,
        // TODO: what to do with BytesParamIndex 2?
        lpBuffer: ?*anyopaque,
        lpBufferSize: ?*u32,
        lplpSystem: ?*?PWSTR,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        lpNetResource: ?*NETRESOURCEW,
        // TODO: what to do with BytesParamIndex 2?
        lpBuffer: ?*anyopaque,
        lpBufferSize: ?*u32,
        lplpSystem: ?*?PWSTR,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const PF_NPFormatNetworkName = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        lpRemoteName: ?PWSTR,
        lpFormattedName: [*:0]u16,
        lpnLength: ?*u32,
        dwFlags: u32,
        dwAveCharPerLine: u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        lpRemoteName: ?PWSTR,
        lpFormattedName: [*:0]u16,
        lpnLength: ?*u32,
        dwFlags: u32,
        dwAveCharPerLine: u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const PF_NPGetPropertyText = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        iButton: u32,
        nPropSel: u32,
        lpName: ?PWSTR,
        lpButtonName: [*:0]u16,
        nButtonNameLen: u32,
        nType: u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        iButton: u32,
        nPropSel: u32,
        lpName: ?PWSTR,
        lpButtonName: [*:0]u16,
        nButtonNameLen: u32,
        nType: u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const PF_NPPropertyDialog = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        hwndParent: ?HWND,
        iButtonDlg: u32,
        nPropSel: u32,
        lpFileName: ?PWSTR,
        nType: u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        hwndParent: ?HWND,
        iButtonDlg: u32,
        nPropSel: u32,
        lpFileName: ?PWSTR,
        nType: u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const PF_NPGetDirectoryType = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        lpName: ?PWSTR,
        lpType: ?*i32,
        bFlushCache: BOOL,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        lpName: ?PWSTR,
        lpType: ?*i32,
        bFlushCache: BOOL,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const PF_NPDirectoryNotify = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        hwnd: ?HWND,
        lpDir: ?PWSTR,
        dwOper: u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        hwnd: ?HWND,
        lpDir: ?PWSTR,
        dwOper: u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const PF_NPLogonNotify = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        lpLogonId: ?*LUID,
        lpAuthentInfoType: ?[*:0]const u16,
        lpAuthentInfo: ?*anyopaque,
        lpPreviousAuthentInfoType: ?[*:0]const u16,
        lpPreviousAuthentInfo: ?*anyopaque,
        lpStationName: ?PWSTR,
        StationHandle: ?*anyopaque,
        lpLogonScript: ?*?PWSTR,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        lpLogonId: ?*LUID,
        lpAuthentInfoType: ?[*:0]const u16,
        lpAuthentInfo: ?*anyopaque,
        lpPreviousAuthentInfoType: ?[*:0]const u16,
        lpPreviousAuthentInfo: ?*anyopaque,
        lpStationName: ?PWSTR,
        StationHandle: ?*anyopaque,
        lpLogonScript: ?*?PWSTR,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const PF_NPPasswordChangeNotify = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        lpAuthentInfoType: ?[*:0]const u16,
        lpAuthentInfo: ?*anyopaque,
        lpPreviousAuthentInfoType: ?[*:0]const u16,
        lpPreviousAuthentInfo: ?*anyopaque,
        lpStationName: ?PWSTR,
        StationHandle: ?*anyopaque,
        dwChangeInfo: u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        lpAuthentInfoType: ?[*:0]const u16,
        lpAuthentInfo: ?*anyopaque,
        lpPreviousAuthentInfoType: ?[*:0]const u16,
        lpPreviousAuthentInfo: ?*anyopaque,
        lpStationName: ?PWSTR,
        StationHandle: ?*anyopaque,
        dwChangeInfo: u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const NOTIFYINFO = extern struct {
    dwNotifyStatus: u32,
    dwOperationStatus: u32,
    lpContext: ?*anyopaque,
};

pub const NOTIFYADD = extern struct {
    hwndOwner: ?HWND,
    NetResource: NETRESOURCEA,
    dwAddFlags: NET_USE_CONNECT_FLAGS,
};

pub const NOTIFYCANCEL = extern struct {
    lpName: ?PWSTR,
    lpProvider: ?PWSTR,
    dwFlags: u32,
    fForce: BOOL,
};

pub const PF_AddConnectNotify = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        lpNotifyInfo: ?*NOTIFYINFO,
        lpAddInfo: ?*NOTIFYADD,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        lpNotifyInfo: ?*NOTIFYINFO,
        lpAddInfo: ?*NOTIFYADD,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const PF_CancelConnectNotify = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        lpNotifyInfo: ?*NOTIFYINFO,
        lpCancelInfo: ?*NOTIFYCANCEL,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        lpNotifyInfo: ?*NOTIFYINFO,
        lpCancelInfo: ?*NOTIFYCANCEL,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

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

pub const PF_NPFMXEditPerm = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        lpDriveName: ?PWSTR,
        hwndFMX: ?HWND,
        nDialogType: u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        lpDriveName: ?PWSTR,
        hwndFMX: ?HWND,
        nDialogType: u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

pub const PF_NPFMXGetPermHelp = switch (@import("builtin").zig_backend) {
    .stage1 => fn (
        lpDriveName: ?PWSTR,
        nDialogType: u32,
        fDirectory: BOOL,
        lpFileNameBuffer: [*]u8,
        lpBufferSize: ?*u32,
        lpnHelpContext: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
    else => *const fn (
        lpDriveName: ?PWSTR,
        nDialogType: u32,
        fDirectory: BOOL,
        lpFileNameBuffer: [*]u8,
        lpBufferSize: ?*u32,
        lpnHelpContext: ?*u32,
    ) callconv(@import("std").os.windows.WINAPI) u32,
};

//--------------------------------------------------------------------------------
// Section: Functions (65)
//--------------------------------------------------------------------------------
// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetAddConnectionA(
    lpRemoteName: ?[*:0]const u8,
    lpPassword: ?[*:0]const u8,
    lpLocalName: ?[*:0]const u8,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetAddConnectionW(
    lpRemoteName: ?[*:0]const u16,
    lpPassword: ?[*:0]const u16,
    lpLocalName: ?[*:0]const u16,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetAddConnection2A(
    lpNetResource: ?*NETRESOURCEA,
    lpPassword: ?[*:0]const u8,
    lpUserName: ?[*:0]const u8,
    dwFlags: u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetAddConnection2W(
    lpNetResource: ?*NETRESOURCEW,
    lpPassword: ?[*:0]const u16,
    lpUserName: ?[*:0]const u16,
    dwFlags: u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetAddConnection3A(
    hwndOwner: ?HWND,
    lpNetResource: ?*NETRESOURCEA,
    lpPassword: ?[*:0]const u8,
    lpUserName: ?[*:0]const u8,
    dwFlags: u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetAddConnection3W(
    hwndOwner: ?HWND,
    lpNetResource: ?*NETRESOURCEW,
    lpPassword: ?[*:0]const u16,
    lpUserName: ?[*:0]const u16,
    dwFlags: u32,
) callconv(@import("std").os.windows.WINAPI) u32;

pub extern "mpr" fn WNetAddConnection4A(
    hwndOwner: ?HWND,
    lpNetResource: ?*NETRESOURCEA,
    // TODO: what to do with BytesParamIndex 3?
    pAuthBuffer: ?*anyopaque,
    cbAuthBuffer: u32,
    dwFlags: u32,
    // TODO: what to do with BytesParamIndex 6?
    lpUseOptions: ?*u8,
    cbUseOptions: u32,
) callconv(@import("std").os.windows.WINAPI) u32;

pub extern "mpr" fn WNetAddConnection4W(
    hwndOwner: ?HWND,
    lpNetResource: ?*NETRESOURCEW,
    // TODO: what to do with BytesParamIndex 3?
    pAuthBuffer: ?*anyopaque,
    cbAuthBuffer: u32,
    dwFlags: u32,
    // TODO: what to do with BytesParamIndex 6?
    lpUseOptions: ?*u8,
    cbUseOptions: u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetCancelConnectionA(
    lpName: ?[*:0]const u8,
    fForce: BOOL,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetCancelConnectionW(
    lpName: ?[*:0]const u16,
    fForce: BOOL,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetCancelConnection2A(
    lpName: ?[*:0]const u8,
    dwFlags: u32,
    fForce: BOOL,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetCancelConnection2W(
    lpName: ?[*:0]const u16,
    dwFlags: u32,
    fForce: BOOL,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetGetConnectionA(
    lpLocalName: ?[*:0]const u8,
    lpRemoteName: ?[*:0]u8,
    lpnLength: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetGetConnectionW(
    lpLocalName: ?[*:0]const u16,
    lpRemoteName: ?[*:0]u16,
    lpnLength: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetUseConnectionA(
    hwndOwner: ?HWND,
    lpNetResource: ?*NETRESOURCEA,
    lpPassword: ?[*:0]const u8,
    lpUserId: ?[*:0]const u8,
    dwFlags: NET_USE_CONNECT_FLAGS,
    lpAccessName: ?[*:0]u8,
    lpBufferSize: ?*u32,
    lpResult: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetUseConnectionW(
    hwndOwner: ?HWND,
    lpNetResource: ?*NETRESOURCEW,
    lpPassword: ?[*:0]const u16,
    lpUserId: ?[*:0]const u16,
    dwFlags: NET_USE_CONNECT_FLAGS,
    lpAccessName: ?[*:0]u16,
    lpBufferSize: ?*u32,
    lpResult: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

pub extern "mpr" fn WNetUseConnection4A(
    hwndOwner: ?HWND,
    lpNetResource: ?*NETRESOURCEA,
    // TODO: what to do with BytesParamIndex 3?
    pAuthBuffer: ?*anyopaque,
    cbAuthBuffer: u32,
    dwFlags: u32,
    // TODO: what to do with BytesParamIndex 6?
    lpUseOptions: ?*u8,
    cbUseOptions: u32,
    lpAccessName: ?[*:0]u8,
    lpBufferSize: ?*u32,
    lpResult: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

pub extern "mpr" fn WNetUseConnection4W(
    hwndOwner: ?HWND,
    lpNetResource: ?*NETRESOURCEW,
    // TODO: what to do with BytesParamIndex 3?
    pAuthBuffer: ?*anyopaque,
    cbAuthBuffer: u32,
    dwFlags: u32,
    // TODO: what to do with BytesParamIndex 6?
    lpUseOptions: ?*u8,
    cbUseOptions: u32,
    lpAccessName: ?[*:0]u16,
    lpBufferSize: ?*u32,
    lpResult: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetConnectionDialog(
    hwnd: ?HWND,
    dwType: u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetDisconnectDialog(
    hwnd: ?HWND,
    dwType: u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetConnectionDialog1A(
    lpConnDlgStruct: ?*CONNECTDLGSTRUCTA,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetConnectionDialog1W(
    lpConnDlgStruct: ?*CONNECTDLGSTRUCTW,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetDisconnectDialog1A(
    lpConnDlgStruct: ?*DISCDLGSTRUCTA,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetDisconnectDialog1W(
    lpConnDlgStruct: ?*DISCDLGSTRUCTW,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetOpenEnumA(
    dwScope: NET_RESOURCE_SCOPE,
    dwType: NET_RESOURCE_TYPE,
    dwUsage: WNET_OPEN_ENUM_USAGE,
    lpNetResource: ?*NETRESOURCEA,
    lphEnum: ?*NetEnumHandle,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetOpenEnumW(
    dwScope: NET_RESOURCE_SCOPE,
    dwType: NET_RESOURCE_TYPE,
    dwUsage: WNET_OPEN_ENUM_USAGE,
    lpNetResource: ?*NETRESOURCEW,
    lphEnum: ?*NetEnumHandle,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetEnumResourceA(
    hEnum: ?HANDLE,
    lpcCount: ?*u32,
    // TODO: what to do with BytesParamIndex 3?
    lpBuffer: ?*anyopaque,
    lpBufferSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetEnumResourceW(
    hEnum: ?HANDLE,
    lpcCount: ?*u32,
    // TODO: what to do with BytesParamIndex 3?
    lpBuffer: ?*anyopaque,
    lpBufferSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetCloseEnum(
    hEnum: ?HANDLE,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetGetResourceParentA(
    lpNetResource: ?*NETRESOURCEA,
    // TODO: what to do with BytesParamIndex 2?
    lpBuffer: ?*anyopaque,
    lpcbBuffer: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetGetResourceParentW(
    lpNetResource: ?*NETRESOURCEW,
    // TODO: what to do with BytesParamIndex 2?
    lpBuffer: ?*anyopaque,
    lpcbBuffer: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetGetResourceInformationA(
    lpNetResource: ?*NETRESOURCEA,
    // TODO: what to do with BytesParamIndex 2?
    lpBuffer: ?*anyopaque,
    lpcbBuffer: ?*u32,
    lplpSystem: ?*?PSTR,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetGetResourceInformationW(
    lpNetResource: ?*NETRESOURCEW,
    // TODO: what to do with BytesParamIndex 2?
    lpBuffer: ?*anyopaque,
    lpcbBuffer: ?*u32,
    lplpSystem: ?*?PWSTR,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetGetUniversalNameA(
    lpLocalPath: ?[*:0]const u8,
    dwInfoLevel: UNC_INFO_LEVEL,
    // TODO: what to do with BytesParamIndex 3?
    lpBuffer: ?*anyopaque,
    lpBufferSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetGetUniversalNameW(
    lpLocalPath: ?[*:0]const u16,
    dwInfoLevel: UNC_INFO_LEVEL,
    // TODO: what to do with BytesParamIndex 3?
    lpBuffer: ?*anyopaque,
    lpBufferSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetGetUserA(
    lpName: ?[*:0]const u8,
    lpUserName: [*:0]u8,
    lpnLength: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetGetUserW(
    lpName: ?[*:0]const u16,
    lpUserName: [*:0]u16,
    lpnLength: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetGetProviderNameA(
    dwNetType: u32,
    lpProviderName: [*:0]u8,
    lpBufferSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetGetProviderNameW(
    dwNetType: u32,
    lpProviderName: [*:0]u16,
    lpBufferSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetGetNetworkInformationA(
    lpProvider: ?[*:0]const u8,
    lpNetInfoStruct: ?*NETINFOSTRUCT,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetGetNetworkInformationW(
    lpProvider: ?[*:0]const u16,
    lpNetInfoStruct: ?*NETINFOSTRUCT,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetGetLastErrorA(
    lpError: ?*u32,
    lpErrorBuf: [*:0]u8,
    nErrorBufSize: u32,
    lpNameBuf: [*:0]u8,
    nNameBufSize: u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn WNetGetLastErrorW(
    lpError: ?*u32,
    lpErrorBuf: [*:0]u16,
    nErrorBufSize: u32,
    lpNameBuf: [*:0]u16,
    nNameBufSize: u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn MultinetGetConnectionPerformanceA(
    lpNetResource: ?*NETRESOURCEA,
    lpNetConnectInfoStruct: ?*NETCONNECTINFOSTRUCT,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.0'
pub extern "mpr" fn MultinetGetConnectionPerformanceW(
    lpNetResource: ?*NETRESOURCEW,
    lpNetConnectInfoStruct: ?*NETCONNECTINFOSTRUCT,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "davclnt" fn NPAddConnection(
    lpNetResource: ?*NETRESOURCEW,
    lpPassword: ?PWSTR,
    lpUserName: ?PWSTR,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "davclnt" fn NPAddConnection3(
    hwndOwner: ?HWND,
    lpNetResource: ?*NETRESOURCEW,
    lpPassword: ?PWSTR,
    lpUserName: ?PWSTR,
    dwFlags: NET_USE_CONNECT_FLAGS,
) callconv(@import("std").os.windows.WINAPI) u32;

pub extern "ntlanman" fn NPAddConnection4(
    hwndOwner: ?HWND,
    lpNetResource: ?*NETRESOURCEW,
    // TODO: what to do with BytesParamIndex 3?
    lpAuthBuffer: ?*anyopaque,
    cbAuthBuffer: u32,
    dwFlags: u32,
    // TODO: what to do with BytesParamIndex 6?
    lpUseOptions: ?*u8,
    cbUseOptions: u32,
) callconv(@import("std").os.windows.WINAPI) u32;

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

pub extern "ntlanman" fn NPCancelConnection2(
    lpName: ?PWSTR,
    fForce: BOOL,
    dwFlags: u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "davclnt" fn NPGetConnection(
    lpLocalName: ?PWSTR,
    lpRemoteName: ?[*:0]u16,
    lpnBufferLen: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "ntlanman" fn NPGetConnection3(
    lpLocalName: ?[*:0]const u16,
    dwLevel: u32,
    // TODO: what to do with BytesParamIndex 3?
    lpBuffer: ?*anyopaque,
    lpBufferSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "davclnt" fn NPGetUniversalName(
    lpLocalPath: ?[*:0]const u16,
    dwInfoLevel: UNC_INFO_LEVEL,
    // TODO: what to do with BytesParamIndex 3?
    lpBuffer: ?*anyopaque,
    lpBufferSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "ntlanman" fn NPGetConnectionPerformance(
    lpRemoteName: ?[*:0]const u16,
    lpNetConnectInfo: ?*NETCONNECTINFOSTRUCT,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "davclnt" fn NPOpenEnum(
    dwScope: u32,
    dwType: u32,
    dwUsage: u32,
    lpNetResource: ?*NETRESOURCEW,
    lphEnum: ?*?HANDLE,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "davclnt" fn NPEnumResource(
    hEnum: ?HANDLE,
    lpcCount: ?*u32,
    // TODO: what to do with BytesParamIndex 3?
    lpBuffer: ?*anyopaque,
    lpBufferSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "davclnt" fn NPCloseEnum(
    hEnum: ?HANDLE,
) callconv(@import("std").os.windows.WINAPI) u32;

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

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "davclnt" fn NPGetUser(
    lpName: ?PWSTR,
    lpUserName: [*:0]u16,
    lpnBufferLen: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

pub extern "ntlanman" fn NPGetPersistentUseOptionsForConnection(
    lpRemotePath: ?PWSTR,
    // TODO: what to do with BytesParamIndex 2?
    lpReadUseOptions: ?*u8,
    cbReadUseOptions: u32,
    // TODO: what to do with BytesParamIndex 4?
    lpWriteUseOptions: ?*u8,
    lpSizeWriteUseOptions: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "davclnt" fn NPGetResourceParent(
    lpNetResource: ?*NETRESOURCEW,
    // TODO: what to do with BytesParamIndex 2?
    lpBuffer: ?*anyopaque,
    lpBufferSize: ?*u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "davclnt" fn NPGetResourceInformation(
    lpNetResource: ?*NETRESOURCEW,
    // TODO: what to do with BytesParamIndex 2?
    lpBuffer: ?*anyopaque,
    lpBufferSize: ?*u32,
    lplpSystem: ?*?PWSTR,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "davclnt" fn NPFormatNetworkName(
    lpRemoteName: ?PWSTR,
    lpFormattedName: [*:0]u16,
    lpnLength: ?*u32,
    dwFlags: NETWORK_NAME_FORMAT_FLAGS,
    dwAveCharPerLine: u32,
) callconv(@import("std").os.windows.WINAPI) u32;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "mpr" fn WNetSetLastErrorA(
    err: u32,
    lpError: ?PSTR,
    lpProviders: ?PSTR,
) callconv(@import("std").os.windows.WINAPI) void;

pub extern "mpr" fn WNetSetLastErrorW(
    err: u32,
    lpError: ?PWSTR,
    lpProviders: ?PWSTR,
) callconv(@import("std").os.windows.WINAPI) void;

//--------------------------------------------------------------------------------
// Section: Unicode Aliases (27)
//--------------------------------------------------------------------------------
const thismodule = @This();
pub usingnamespace switch (@import("../zig.zig").unicode_mode) {
    .ansi => struct {
        pub const NETRESOURCE = thismodule.NETRESOURCEA;
        pub const CONNECTDLGSTRUCT = thismodule.CONNECTDLGSTRUCTA;
        pub const DISCDLGSTRUCT = thismodule.DISCDLGSTRUCTA;
        pub const UNIVERSAL_NAME_INFO = thismodule.UNIVERSAL_NAME_INFOA;
        pub const REMOTE_NAME_INFO = thismodule.REMOTE_NAME_INFOA;
        pub const WNetAddConnection = thismodule.WNetAddConnectionA;
        pub const WNetAddConnection2 = thismodule.WNetAddConnection2A;
        pub const WNetAddConnection3 = thismodule.WNetAddConnection3A;
        pub const WNetAddConnection4 = thismodule.WNetAddConnection4A;
        pub const WNetCancelConnection = thismodule.WNetCancelConnectionA;
        pub const WNetCancelConnection2 = thismodule.WNetCancelConnection2A;
        pub const WNetGetConnection = thismodule.WNetGetConnectionA;
        pub const WNetUseConnection = thismodule.WNetUseConnectionA;
        pub const WNetUseConnection4 = thismodule.WNetUseConnection4A;
        pub const WNetConnectionDialog1 = thismodule.WNetConnectionDialog1A;
        pub const WNetDisconnectDialog1 = thismodule.WNetDisconnectDialog1A;
        pub const WNetOpenEnum = thismodule.WNetOpenEnumA;
        pub const WNetEnumResource = thismodule.WNetEnumResourceA;
        pub const WNetGetResourceParent = thismodule.WNetGetResourceParentA;
        pub const WNetGetResourceInformation = thismodule.WNetGetResourceInformationA;
        pub const WNetGetUniversalName = thismodule.WNetGetUniversalNameA;
        pub const WNetGetUser = thismodule.WNetGetUserA;
        pub const WNetGetProviderName = thismodule.WNetGetProviderNameA;
        pub const WNetGetNetworkInformation = thismodule.WNetGetNetworkInformationA;
        pub const WNetGetLastError = thismodule.WNetGetLastErrorA;
        pub const MultinetGetConnectionPerformance = thismodule.MultinetGetConnectionPerformanceA;
        pub const WNetSetLastError = thismodule.WNetSetLastErrorA;
    },
    .wide => struct {
        pub const NETRESOURCE = thismodule.NETRESOURCEW;
        pub const CONNECTDLGSTRUCT = thismodule.CONNECTDLGSTRUCTW;
        pub const DISCDLGSTRUCT = thismodule.DISCDLGSTRUCTW;
        pub const UNIVERSAL_NAME_INFO = thismodule.UNIVERSAL_NAME_INFOW;
        pub const REMOTE_NAME_INFO = thismodule.REMOTE_NAME_INFOW;
        pub const WNetAddConnection = thismodule.WNetAddConnectionW;
        pub const WNetAddConnection2 = thismodule.WNetAddConnection2W;
        pub const WNetAddConnection3 = thismodule.WNetAddConnection3W;
        pub const WNetAddConnection4 = thismodule.WNetAddConnection4W;
        pub const WNetCancelConnection = thismodule.WNetCancelConnectionW;
        pub const WNetCancelConnection2 = thismodule.WNetCancelConnection2W;
        pub const WNetGetConnection = thismodule.WNetGetConnectionW;
        pub const WNetUseConnection = thismodule.WNetUseConnectionW;
        pub const WNetUseConnection4 = thismodule.WNetUseConnection4W;
        pub const WNetConnectionDialog1 = thismodule.WNetConnectionDialog1W;
        pub const WNetDisconnectDialog1 = thismodule.WNetDisconnectDialog1W;
        pub const WNetOpenEnum = thismodule.WNetOpenEnumW;
        pub const WNetEnumResource = thismodule.WNetEnumResourceW;
        pub const WNetGetResourceParent = thismodule.WNetGetResourceParentW;
        pub const WNetGetResourceInformation = thismodule.WNetGetResourceInformationW;
        pub const WNetGetUniversalName = thismodule.WNetGetUniversalNameW;
        pub const WNetGetUser = thismodule.WNetGetUserW;
        pub const WNetGetProviderName = thismodule.WNetGetProviderNameW;
        pub const WNetGetNetworkInformation = thismodule.WNetGetNetworkInformationW;
        pub const WNetGetLastError = thismodule.WNetGetLastErrorW;
        pub const MultinetGetConnectionPerformance = thismodule.MultinetGetConnectionPerformanceW;
        pub const WNetSetLastError = thismodule.WNetSetLastErrorW;
    },
    .unspecified => if (@import("builtin").is_test) struct {
        pub const NETRESOURCE = *opaque {};
        pub const CONNECTDLGSTRUCT = *opaque {};
        pub const DISCDLGSTRUCT = *opaque {};
        pub const UNIVERSAL_NAME_INFO = *opaque {};
        pub const REMOTE_NAME_INFO = *opaque {};
        pub const WNetAddConnection = *opaque {};
        pub const WNetAddConnection2 = *opaque {};
        pub const WNetAddConnection3 = *opaque {};
        pub const WNetAddConnection4 = *opaque {};
        pub const WNetCancelConnection = *opaque {};
        pub const WNetCancelConnection2 = *opaque {};
        pub const WNetGetConnection = *opaque {};
        pub const WNetUseConnection = *opaque {};
        pub const WNetUseConnection4 = *opaque {};
        pub const WNetConnectionDialog1 = *opaque {};
        pub const WNetDisconnectDialog1 = *opaque {};
        pub const WNetOpenEnum = *opaque {};
        pub const WNetEnumResource = *opaque {};
        pub const WNetGetResourceParent = *opaque {};
        pub const WNetGetResourceInformation = *opaque {};
        pub const WNetGetUniversalName = *opaque {};
        pub const WNetGetUser = *opaque {};
        pub const WNetGetProviderName = *opaque {};
        pub const WNetGetNetworkInformation = *opaque {};
        pub const WNetGetLastError = *opaque {};
        pub const MultinetGetConnectionPerformance = *opaque {};
        pub const WNetSetLastError = *opaque {};
    } else struct {
        pub const NETRESOURCE = @compileError("'NETRESOURCE' requires that UNICODE be set to true or false in the root module");
        pub const CONNECTDLGSTRUCT = @compileError("'CONNECTDLGSTRUCT' requires that UNICODE be set to true or false in the root module");
        pub const DISCDLGSTRUCT = @compileError("'DISCDLGSTRUCT' requires that UNICODE be set to true or false in the root module");
        pub const UNIVERSAL_NAME_INFO = @compileError("'UNIVERSAL_NAME_INFO' requires that UNICODE be set to true or false in the root module");
        pub const REMOTE_NAME_INFO = @compileError("'REMOTE_NAME_INFO' requires that UNICODE be set to true or false in the root module");
        pub const WNetAddConnection = @compileError("'WNetAddConnection' requires that UNICODE be set to true or false in the root module");
        pub const WNetAddConnection2 = @compileError("'WNetAddConnection2' requires that UNICODE be set to true or false in the root module");
        pub const WNetAddConnection3 = @compileError("'WNetAddConnection3' requires that UNICODE be set to true or false in the root module");
        pub const WNetAddConnection4 = @compileError("'WNetAddConnection4' requires that UNICODE be set to true or false in the root module");
        pub const WNetCancelConnection = @compileError("'WNetCancelConnection' requires that UNICODE be set to true or false in the root module");
        pub const WNetCancelConnection2 = @compileError("'WNetCancelConnection2' requires that UNICODE be set to true or false in the root module");
        pub const WNetGetConnection = @compileError("'WNetGetConnection' requires that UNICODE be set to true or false in the root module");
        pub const WNetUseConnection = @compileError("'WNetUseConnection' requires that UNICODE be set to true or false in the root module");
        pub const WNetUseConnection4 = @compileError("'WNetUseConnection4' requires that UNICODE be set to true or false in the root module");
        pub const WNetConnectionDialog1 = @compileError("'WNetConnectionDialog1' requires that UNICODE be set to true or false in the root module");
        pub const WNetDisconnectDialog1 = @compileError("'WNetDisconnectDialog1' requires that UNICODE be set to true or false in the root module");
        pub const WNetOpenEnum = @compileError("'WNetOpenEnum' requires that UNICODE be set to true or false in the root module");
        pub const WNetEnumResource = @compileError("'WNetEnumResource' requires that UNICODE be set to true or false in the root module");
        pub const WNetGetResourceParent = @compileError("'WNetGetResourceParent' requires that UNICODE be set to true or false in the root module");
        pub const WNetGetResourceInformation = @compileError("'WNetGetResourceInformation' requires that UNICODE be set to true or false in the root module");
        pub const WNetGetUniversalName = @compileError("'WNetGetUniversalName' requires that UNICODE be set to true or false in the root module");
        pub const WNetGetUser = @compileError("'WNetGetUser' requires that UNICODE be set to true or false in the root module");
        pub const WNetGetProviderName = @compileError("'WNetGetProviderName' requires that UNICODE be set to true or false in the root module");
        pub const WNetGetNetworkInformation = @compileError("'WNetGetNetworkInformation' requires that UNICODE be set to true or false in the root module");
        pub const WNetGetLastError = @compileError("'WNetGetLastError' requires that UNICODE be set to true or false in the root module");
        pub const MultinetGetConnectionPerformance = @compileError("'MultinetGetConnectionPerformance' requires that UNICODE be set to true or false in the root module");
        pub const WNetSetLastError = @compileError("'WNetSetLastError' requires that UNICODE be set to true or false in the root module");
    },
};
//--------------------------------------------------------------------------------
// Section: Imports (7)
//--------------------------------------------------------------------------------
const BOOL = @import("../foundation.zig").BOOL;
const HANDLE = @import("../foundation.zig").HANDLE;
const HWND = @import("../foundation.zig").HWND;
const LUID = @import("../foundation.zig").LUID;
const PSTR = @import("../foundation.zig").PSTR;
const PWSTR = @import("../foundation.zig").PWSTR;
const WIN32_ERROR = @import("../foundation.zig").WIN32_ERROR;

test {
    // The following '_ = <FuncPtrType>' lines are a workaround for https://github.com/ziglang/zig/issues/4476
    if (@hasDecl(@This(), "PF_NPAddConnection")) {
        _ = PF_NPAddConnection;
    }
    if (@hasDecl(@This(), "PF_NPAddConnection3")) {
        _ = PF_NPAddConnection3;
    }
    if (@hasDecl(@This(), "PF_NPAddConnection4")) {
        _ = PF_NPAddConnection4;
    }
    if (@hasDecl(@This(), "PF_NPCancelConnection")) {
        _ = PF_NPCancelConnection;
    }
    if (@hasDecl(@This(), "PF_NPCancelConnection2")) {
        _ = PF_NPCancelConnection2;
    }
    if (@hasDecl(@This(), "PF_NPGetConnection")) {
        _ = PF_NPGetConnection;
    }
    if (@hasDecl(@This(), "PF_NPGetConnection3")) {
        _ = PF_NPGetConnection3;
    }
    if (@hasDecl(@This(), "PF_NPGetUniversalName")) {
        _ = PF_NPGetUniversalName;
    }
    if (@hasDecl(@This(), "PF_NPGetConnectionPerformance")) {
        _ = PF_NPGetConnectionPerformance;
    }
    if (@hasDecl(@This(), "PF_NPOpenEnum")) {
        _ = PF_NPOpenEnum;
    }
    if (@hasDecl(@This(), "PF_NPEnumResource")) {
        _ = PF_NPEnumResource;
    }
    if (@hasDecl(@This(), "PF_NPCloseEnum")) {
        _ = PF_NPCloseEnum;
    }
    if (@hasDecl(@This(), "PF_NPGetCaps")) {
        _ = PF_NPGetCaps;
    }
    if (@hasDecl(@This(), "PF_NPGetUser")) {
        _ = PF_NPGetUser;
    }
    if (@hasDecl(@This(), "PF_NPGetPersistentUseOptionsForConnection")) {
        _ = PF_NPGetPersistentUseOptionsForConnection;
    }
    if (@hasDecl(@This(), "PF_NPDeviceMode")) {
        _ = PF_NPDeviceMode;
    }
    if (@hasDecl(@This(), "PF_NPSearchDialog")) {
        _ = PF_NPSearchDialog;
    }
    if (@hasDecl(@This(), "PF_NPGetResourceParent")) {
        _ = PF_NPGetResourceParent;
    }
    if (@hasDecl(@This(), "PF_NPGetResourceInformation")) {
        _ = PF_NPGetResourceInformation;
    }
    if (@hasDecl(@This(), "PF_NPFormatNetworkName")) {
        _ = PF_NPFormatNetworkName;
    }
    if (@hasDecl(@This(), "PF_NPGetPropertyText")) {
        _ = PF_NPGetPropertyText;
    }
    if (@hasDecl(@This(), "PF_NPPropertyDialog")) {
        _ = PF_NPPropertyDialog;
    }
    if (@hasDecl(@This(), "PF_NPGetDirectoryType")) {
        _ = PF_NPGetDirectoryType;
    }
    if (@hasDecl(@This(), "PF_NPDirectoryNotify")) {
        _ = PF_NPDirectoryNotify;
    }
    if (@hasDecl(@This(), "PF_NPLogonNotify")) {
        _ = PF_NPLogonNotify;
    }
    if (@hasDecl(@This(), "PF_NPPasswordChangeNotify")) {
        _ = PF_NPPasswordChangeNotify;
    }
    if (@hasDecl(@This(), "PF_AddConnectNotify")) {
        _ = PF_AddConnectNotify;
    }
    if (@hasDecl(@This(), "PF_CancelConnectNotify")) {
        _ = PF_CancelConnectNotify;
    }
    if (@hasDecl(@This(), "PF_NPFMXGetPermCaps")) {
        _ = PF_NPFMXGetPermCaps;
    }
    if (@hasDecl(@This(), "PF_NPFMXEditPerm")) {
        _ = PF_NPFMXEditPerm;
    }
    if (@hasDecl(@This(), "PF_NPFMXGetPermHelp")) {
        _ = PF_NPFMXGetPermHelp;
    }

    @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);
        }
    }
}
