Home | History | Annotate | Download | only in include
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 #ifndef _NPAPI_INCLUDED
      7 #define _NPAPI_INCLUDED
      8 
      9 #include <_mingw_unicode.h>
     10 
     11 typedef DWORD (WINAPI *PF_NPAddConnection)(LPNETRESOURCEW lpNetResource,LPWSTR lpPassword,LPWSTR lpUserName);
     12 typedef DWORD (WINAPI *PF_NPAddConnection3)(HWND hwndOwner,LPNETRESOURCEW lpNetResource,LPWSTR lpPassword,LPWSTR lpUserName,DWORD dwFlags);
     13 typedef DWORD (WINAPI *PF_NPCancelConnection)(LPWSTR lpName,WINBOOL fForce);
     14 typedef DWORD (WINAPI *PF_NPGetConnection)(LPWSTR lpLocalName,LPWSTR lpRemoteName,LPDWORD lpnBufferLen);
     15 typedef DWORD (WINAPI *PF_NPGetUniversalName)(LPWSTR lpLocalPath,DWORD dwInfoLevel,LPVOID lpBuffer,LPDWORD lpnBufferSize);
     16 typedef DWORD (WINAPI *PF_NPOpenEnum) (DWORD dwScope,DWORD dwType,DWORD dwUsage,LPNETRESOURCEW lpNetResource,LPHANDLE lphEnum);
     17 typedef DWORD (WINAPI *PF_NPEnumResource) (HANDLE hEnum,LPDWORD lpcCount,LPVOID lpBuffer,LPDWORD lpBufferSize);
     18 
     19 DWORD WINAPI NPAddConnection(LPNETRESOURCEW lpNetResource,LPWSTR lpPassword,LPWSTR lpUserName);
     20 DWORD WINAPI NPAddConnection3(HWND hwndOwner,LPNETRESOURCEW lpNetResource,LPTSTR lpPassword,LPTSTR lpUserName,DWORD dwFlags);
     21 DWORD WINAPI NPCancelConnection(LPWSTR lpName,WINBOOL fForce);
     22 DWORD WINAPI NPGetConnection(LPWSTR lpLocalName,LPWSTR lpRemoteName,LPDWORD lpnBufferLen);
     23 DWORD WINAPI NPGetUniversalName(LPWSTR lpLocalPath,DWORD dwInfoLevel,LPVOID lpBuffer,LPDWORD lpBufferSize);
     24 DWORD WINAPI NPOpenEnum (DWORD dwScope,DWORD dwType,DWORD dwUsage,LPNETRESOURCEW lpNetResource,LPHANDLE lphEnum);
     25 DWORD WINAPI NPEnumResource (HANDLE hEnum,LPDWORD lpcCount,LPVOID lpBuffer,LPDWORD lpBufferSize);
     26 DWORD WINAPI NPCloseEnum (HANDLE hEnum);
     27 
     28 typedef DWORD (*PF_NPCloseEnum) (HANDLE hEnum);
     29 
     30 #define WNNC_SPEC_VERSION 0x00000001
     31 #define WNNC_SPEC_VERSION51 0x00050001
     32 #define WNNC_NET_TYPE 0x00000002
     33 #define WNNC_NET_NONE 0x00000000
     34 
     35 #define WNNC_DRIVER_VERSION 0x00000003
     36 
     37 #define WNNC_USER 0x00000004
     38 #define WNNC_USR_GETUSER 0x00000001
     39 
     40 #define WNNC_CONNECTION 0x00000006
     41 #define WNNC_CON_ADDCONNECTION 0x00000001
     42 #define WNNC_CON_CANCELCONNECTION 0x00000002
     43 #define WNNC_CON_GETCONNECTIONS 0x00000004
     44 #define WNNC_CON_ADDCONNECTION3 0x00000008
     45 
     46 #define WNNC_DIALOG 0x00000008
     47 #define WNNC_DLG_DEVICEMODE 0x00000001
     48 #define WNNC_DLG_PROPERTYDIALOG 0x00000020
     49 #define WNNC_DLG_SEARCHDIALOG 0x00000040
     50 #define WNNC_DLG_FORMATNETWORKNAME 0x00000080
     51 #define WNNC_DLG_PERMISSIONEDITOR 0x00000100
     52 
     53 #define WNNC_ADMIN 0x00000009
     54 #define WNNC_ADM_GETDIRECTORYTYPE 0x00000001
     55 #define WNNC_ADM_DIRECTORYNOTIFY 0x00000002
     56 
     57 #define WNNC_ENUMERATION 0x0000000B
     58 #define WNNC_ENUM_GLOBAL 0x00000001
     59 #define WNNC_ENUM_LOCAL 0x00000002
     60 
     61 #define WNNC_START 0x0000000C
     62 #define WNNC_WAIT_FOR_START 0x00000001
     63 
     64 typedef DWORD (WINAPI *PF_NPGetCaps)(DWORD ndex);
     65 typedef DWORD (WINAPI *PF_NPGetUser)(LPWSTR lpName,LPWSTR lpUserName,LPDWORD lpnBufferLen);
     66 
     67 DWORD WINAPI NPGetCaps (DWORD ndex);
     68 DWORD WINAPI NPGetUser(LPWSTR lpName,LPWSTR lpUserName,LPDWORD lpnBufferLen);
     69 
     70 
     71 #define WNTYPE_DRIVE 1
     72 #define WNTYPE_FILE 2
     73 #define WNTYPE_PRINTER 3
     74 #define WNTYPE_COMM 4
     75 
     76 #define WNPS_FILE 0
     77 #define WNPS_DIR 1
     78 #define WNPS_MULT 2
     79 
     80 #define WNSRCH_REFRESH_FIRST_LEVEL 0x00000001
     81 
     82 typedef DWORD (WINAPI *PF_NPDeviceMode)(HWND hParent);
     83 typedef DWORD (WINAPI *PF_NPSearchDialog)(HWND hwndParent,LPNETRESOURCEW lpNetResource,LPVOID lpBuffer,DWORD cbBuffer,LPDWORD lpnFlags);
     84 typedef DWORD (WINAPI *PF_NPFormatNetworkName)(LPWSTR lpRemoteName,LPWSTR lpFormattedName,LPDWORD lpnLength,DWORD dwFlags,DWORD dwAveCharPerLine);
     85 typedef DWORD (WINAPI *PF_NPGetPropertyText)(DWORD iButton,DWORD nPropSel,LPWSTR lpName,LPWSTR lpButtonName,DWORD nButtonNameLen,DWORD nType);
     86 typedef DWORD (WINAPI *PF_NPPropertyDialog)(HWND hwndParent,DWORD iButtonDlg,DWORD nPropSel,LPWSTR lpFileName,DWORD nType);
     87 
     88 DWORD WINAPI NPDeviceMode(HWND hParent);
     89 DWORD WINAPI NPSearchDialog(HWND hwndParent,LPNETRESOURCEW lpNetResource,LPVOID lpBuffer,DWORD cbBuffer,LPDWORD lpnFlags);
     90 DWORD WINAPI NPFormatNetworkName(LPWSTR lpRemoteName,LPWSTR lpFormattedName,LPDWORD lpnLength,DWORD dwFlags,DWORD dwAveCharPerLine);
     91 DWORD WINAPI NPGetPropertyText(DWORD iButton,DWORD nPropSel,LPWSTR lpName,LPWSTR lpButtonName,DWORD nButtonNameLen,DWORD nType);
     92 DWORD WINAPI NPPropertyDialog(HWND hwndParent,DWORD iButtonDlg,DWORD nPropSel,LPWSTR lpFileName,DWORD nType);
     93 
     94 #define WNDT_NORMAL 0
     95 #define WNDT_NETWORK 1
     96 
     97 #define WNDN_MKDIR 1
     98 #define WNDN_RMDIR 2
     99 #define WNDN_MVDIR 3
    100 
    101 typedef DWORD (WINAPI *PF_NPGetDirectoryType)(LPWSTR lpName,LPINT lpType,WINBOOL bFlushCache);
    102 typedef DWORD (WINAPI *PF_NPDirectoryNotify)(HWND hwnd,LPWSTR lpDir,DWORD dwOper);
    103 
    104 DWORD WINAPI NPGetDirectoryType(LPWSTR lpName,LPINT lpType,WINBOOL bFlushCache);
    105 DWORD WINAPI NPDirectoryNotify(HWND hwnd,LPWSTR lpDir,DWORD dwOper);
    106 VOID WNetSetLastErrorA(DWORD err,LPSTR lpError,LPSTR lpProviders);
    107 VOID WNetSetLastErrorW(DWORD err,LPWSTR lpError,LPWSTR lpProviders);
    108 
    109 #define WNetSetLastError __MINGW_NAME_AW(WNetSetLastError)
    110 
    111 #define WN_NETWORK_CLASS 0x00000001
    112 #define WN_CREDENTIAL_CLASS 0x00000002
    113 #define WN_PRIMARY_AUTHENT_CLASS 0x00000004
    114 #define WN_SERVICE_CLASS 0x00000008
    115 
    116 #define WN_VALID_LOGON_ACCOUNT 0x00000001
    117 #define WN_NT_PASSWORD_CHANGED 0x00000002
    118 
    119 typedef DWORD (WINAPI *PF_NPLogonNotify) (PLUID lpLogonId,LPCWSTR lpAuthentInfoType,LPVOID lpAuthentInfo,LPCWSTR lpPreviousAuthentInfoType,LPVOID lpPreviousAuthentInfo,LPWSTR lpStationName,LPVOID StationHandle,LPWSTR *lpLogonScript);
    120 typedef DWORD (WINAPI *PF_NPPasswordChangeNotify) (LPCWSTR lpAuthentInfoType,LPVOID lpAuthentInfo,LPCWSTR lpPreviousAuthentInfoType,LPVOID lpPreviousAuthentInfo,LPWSTR lpStationName,LPVOID StationHandle,DWORD dwChangeInfo);
    121 
    122 DWORD WINAPI NPLogonNotify (PLUID lpLogonId,LPCWSTR lpAuthentInfoType,LPVOID lpAuthentInfo,LPCWSTR lpPreviousAuthentInfoType,LPVOID lpPreviousAuthentInfo,LPWSTR lpStationName,LPVOID StationHandle,LPWSTR *lpLogonScript);
    123 DWORD WINAPI NPPasswordChangeNotify (LPCWSTR lpAuthentInfoType,LPVOID lpAuthentInfo,LPCWSTR lpPreviousAuthentInfoType,LPVOID lpPreviousAuthentInfo,LPWSTR lpStationName,LPVOID StationHandle,DWORD dwChangeInfo);
    124 
    125 #define NOTIFY_PRE 0x00000001
    126 #define NOTIFY_POST 0x00000002
    127 
    128 #define WNPERMC_PERM 0x00000001
    129 #define WNPERMC_AUDIT 0x00000002
    130 #define WNPERMC_OWNER 0x00000004
    131 
    132 #define WNPERM_DLG_PERM 0
    133 #define WNPERM_DLG_AUDIT 1
    134 #define WNPERM_DLG_OWNER 2
    135 
    136 typedef struct _NOTIFYINFO {
    137   DWORD dwNotifyStatus;
    138   DWORD dwOperationStatus;
    139   LPVOID lpContext;
    140 } NOTIFYINFO,*LPNOTIFYINFO;
    141 
    142 typedef struct _NOTIFYADD {
    143   HWND hwndOwner;
    144   NETRESOURCE NetResource;
    145   DWORD dwAddFlags;
    146 } NOTIFYADD,*LPNOTIFYADD;
    147 
    148 typedef struct _NOTIFYCANCEL {
    149   LPTSTR lpName;
    150   LPTSTR lpProvider;
    151   DWORD dwFlags;
    152   WINBOOL fForce;
    153 } NOTIFYCANCEL,*LPNOTIFYCANCEL;
    154 
    155 typedef DWORD (WINAPI *PF_AddConnectNotify) (LPNOTIFYINFO lpNotifyInfo,LPNOTIFYADD lpAddInfo);
    156 typedef DWORD (WINAPI *PF_CancelConnectNotify) (LPNOTIFYINFO lpNotifyInfo,LPNOTIFYCANCEL lpCancelInfo);
    157 typedef DWORD (WINAPI *PF_NPFMXGetPermCaps)(LPWSTR lpDriveName);
    158 typedef DWORD (WINAPI *PF_NPFMXEditPerm)(LPWSTR lpDriveName,HWND hwndFMX,DWORD nDialogType);
    159 typedef DWORD (WINAPI *PF_NPFMXGetPermHelp)(LPWSTR lpDriveName,DWORD nDialogType,WINBOOL fDirectory,LPVOID lpFileNameBuffer,LPDWORD lpBufferSize,LPDWORD lpnHelpContext);
    160 
    161 DWORD WINAPI AddConnectNotify (LPNOTIFYINFO lpNotifyInfo,LPNOTIFYADD lpAddInfo);
    162 DWORD WINAPI CancelConnectNotify (LPNOTIFYINFO lpNotifyInfo,LPNOTIFYCANCEL lpCancelInfo);
    163 DWORD WINAPI NPFMXGetPermCaps(LPWSTR lpDriveName);
    164 DWORD WINAPI NPFMXEditPerm(LPWSTR lpDriveName,HWND hwndFMX,DWORD nDialogType);
    165 DWORD WINAPI NPFMXGetPermHelp(LPWSTR lpDriveName,DWORD nDialogType,WINBOOL fDirectory,LPVOID lpFileNameBuffer,LPDWORD lpBufferSize,LPDWORD lpnHelpContext);
    166 
    167 #endif
    168