Sync with trunk (r48545)
[reactos.git] / include / psdk / winnetwk.h
1 #ifndef _WINNETWK_H
2 #define _WINNETWK_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 #ifdef _MSC_VER
8 #pragma warning(push)
9 #pragma warning(disable:4820)
10 #endif
11 #define WNNC_NET_MSNET 0x00010000
12 #define WNNC_NET_LANMAN 0x00020000
13 #define WNNC_NET_NETWARE 0x00030000
14 #define WNNC_NET_VINES 0x00040000
15 #define WNNC_NET_10NET 0x00050000
16 #define WNNC_NET_LOCUS 0x00060000
17 #define WNNC_NET_SUN_PC_NFS 0x00070000
18 #define WNNC_NET_LANSTEP 0x00080000
19 #define WNNC_NET_9TILES 0x00090000
20 #define WNNC_NET_LANTASTIC 0x000A0000
21 #define WNNC_NET_AS400 0x000B0000
22 #define WNNC_NET_FTP_NFS 0x000C0000
23 #define WNNC_NET_PATHWORKS 0x000D0000
24 #define WNNC_NET_LIFENET 0x000E0000
25 #define WNNC_NET_POWERLAN 0x000F0000
26 #define WNNC_NET_BWNFS 0x00100000
27 #define WNNC_NET_COGENT 0x00110000
28 #define WNNC_NET_FARALLON 0x00120000
29 #define WNNC_NET_APPLETALK 0x00130000
30 #define WNNC_NET_INTERGRAPH 0x00140000
31 #define WNNC_NET_SYMFONET 0x00150000
32 #define WNNC_NET_CLEARCASE 0x00160000
33 #define WNNC_NET_FRONTIER 0x00170000
34 #define WNNC_NET_BMC 0x00180000
35 #define WNNC_NET_DCE 0x00190000
36 #define WNNC_NET_AVID 0x001A0000
37 #define WNNC_NET_DOCUSPACE 0x001B0000
38 #define WNNC_NET_MANGOSOFT 0x001C0000
39 #define WNNC_NET_SERNET 0x001D0000
40 #define WNNC_NET_DECORB 0x00200000
41 #define WNNC_NET_PROTSTOR 0x00210000
42 #define WNNC_NET_FJ_REDIR 0x00220000
43 #define WNNC_NET_DISTINCT 0x00230000
44 #define WNNC_NET_TWINS 0x00240000
45 #define WNNC_NET_RDR2SAMPLE 0x00250000
46 #define WNNC_NET_CSC 0x00260000
47 #define WNNC_NET_3IN1 0x00270000
48 #define WNNC_NET_EXTENDNET 0x00290000
49 #define WNNC_NET_OBJECT_DIRE 0x00300000
50 #define WNNC_NET_MASFAX 0x00310000
51 #define WNNC_NET_HOB_NFS 0x00320000
52 #define WNNC_NET_SHIVA 0x00330000
53 #define WNNC_NET_IBMAL 0x00340000
54 #define WNNC_CRED_MANAGER 0xFFFF0000
55
56 #define RESOURCE_CONNECTED 1
57 #define RESOURCE_GLOBALNET 2
58 #define RESOURCE_REMEMBERED 3
59 #define RESOURCE_RECENT 4
60 #define RESOURCE_CONTEXT 5
61 #define RESOURCETYPE_ANY 0
62 #define RESOURCETYPE_DISK 1
63 #define RESOURCETYPE_PRINT 2
64 #define RESOURCETYPE_RESERVED 8
65 #define RESOURCETYPE_UNKNOWN 0xFFFFFFFF
66 #define RESOURCEUSAGE_CONNECTABLE 0x00000001
67 #define RESOURCEUSAGE_CONTAINER 0x00000002
68 #define RESOURCEUSAGE_NOLOCALDEVICE 0x00000004
69 #define RESOURCEUSAGE_SIBLING 0x00000008
70 #define RESOURCEUSAGE_ATTACHED 0x00000010
71 #define RESOURCEUSAGE_ALL (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER | RESOURCEUSAGE_ATTACHED)
72 #define RESOURCEUSAGE_RESERVED 0x80000000
73 #define RESOURCEDISPLAYTYPE_GENERIC 0
74 #define RESOURCEDISPLAYTYPE_DOMAIN 1
75 #define RESOURCEDISPLAYTYPE_SERVER 2
76 #define RESOURCEDISPLAYTYPE_SHARE 3
77 #define RESOURCEDISPLAYTYPE_FILE 4
78 #define RESOURCEDISPLAYTYPE_GROUP 5
79 #define RESOURCEDISPLAYTYPE_NETWORK 6
80 #define RESOURCEDISPLAYTYPE_ROOT 7
81 #define RESOURCEDISPLAYTYPE_SHAREADMIN 8
82 #define RESOURCEDISPLAYTYPE_DIRECTORY 9
83 #define RESOURCEDISPLAYTYPE_TREE 10
84 #define NETPROPERTY_PERSISTENT 1
85 #define CONNECT_UPDATE_PROFILE 1
86 #define CONNECT_UPDATE_RECENT 2
87 #define CONNECT_TEMPORARY 4
88 #define CONNECT_INTERACTIVE 8
89 #define CONNECT_PROMPT 16
90 #define CONNECT_NEED_DRIVE 32
91 #define CONNECT_REFCOUNT 64
92 #define CONNECT_REDIRECT 128
93 #define CONNECT_LOCALDRIVE 256
94 #define CONNECT_CURRENT_MEDIA 512
95 #define CONNECT_COMMANDLINE 2048
96 #define CONNECT_CMD_SAVECRED 4096
97 #define CONNDLG_RO_PATH 1
98 #define CONNDLG_CONN_POINT 2
99 #define CONNDLG_USE_MRU 4
100 #define CONNDLG_HIDE_BOX 8
101 #define CONNDLG_PERSIST 16
102 #define CONNDLG_NOT_PERSIST 32
103 #define DISC_UPDATE_PROFILE 1
104 #define DISC_NO_FORCE 64
105 #define WNFMT_MULTILINE 1
106 #define WNFMT_ABBREVIATED 2
107 #define WNFMT_INENUM 16
108 #define WNFMT_CONNECTION 32
109 #define WN_SUCCESS NO_ERROR
110 #define WN_NO_ERROR NO_ERROR
111 #define WN_NOT_SUPPORTED ERROR_NOT_SUPPORTED
112 #define WN_CANCEL ERROR_CANCELLED
113 #define WN_RETRY ERROR_RETRY
114 #define WN_NET_ERROR ERROR_UNEXP_NET_ERR
115 #define WN_MORE_DATA ERROR_MORE_DATA
116 #define WN_BAD_POINTER ERROR_INVALID_ADDRESS
117 #define WN_BAD_VALUE ERROR_INVALID_PARAMETER
118 #define WN_BAD_USER ERROR_BAD_USERNAME
119 #define WN_BAD_PASSWORD ERROR_INVALID_PASSWORD
120 #define WN_ACCESS_DENIED ERROR_ACCESS_DENIED
121 #define WN_FUNCTION_BUSY ERROR_BUSY
122 #define WN_WINDOWS_ERROR ERROR_UNEXP_NET_ERR
123 #define WN_OUT_OF_MEMORY ERROR_NOT_ENOUGH_MEMORY
124 #define WN_NO_NETWORK ERROR_NO_NETWORK
125 #define WN_EXTENDED_ERROR ERROR_EXTENDED_ERROR
126 #define WN_BAD_LEVEL ERROR_INVALID_LEVEL
127 #define WN_BAD_HANDLE ERROR_INVALID_HANDLE
128 #define WN_NOT_INITIALIZING ERROR_ALREADY_INITIALIZED
129 #define WN_NO_MORE_DEVICES ERROR_NO_MORE_DEVICES
130 #define WN_NOT_CONNECTED ERROR_NOT_CONNECTED
131 #define WN_OPEN_FILES ERROR_OPEN_FILES
132 #define WN_DEVICE_IN_USE ERROR_DEVICE_IN_USE
133 #define WN_BAD_NETNAME ERROR_BAD_NET_NAME
134 #define WN_BAD_LOCALNAME ERROR_BAD_DEVICE
135 #define WN_ALREADY_CONNECTED ERROR_ALREADY_ASSIGNED
136 #define WN_DEVICE_ERROR ERROR_GEN_FAILURE
137 #define WN_CONNECTION_CLOSED ERROR_CONNECTION_UNAVAIL
138 #define WN_NO_NET_OR_BAD_PATH ERROR_NO_NET_OR_BAD_PATH
139 #define WN_BAD_PROVIDER ERROR_BAD_PROVIDER
140 #define WN_CANNOT_OPEN_PROFILE ERROR_CANNOT_OPEN_PROFILE
141 #define WN_BAD_PROFILE ERROR_BAD_PROFILE
142 #define WN_BAD_DEV_TYPE ERROR_BAD_DEV_TYPE
143 #define WN_DEVICE_ALREADY_REMEMBERED ERROR_DEVICE_ALREADY_REMEMBERED
144 #define WN_NO_MORE_ENTRIES ERROR_NO_MORE_ITEMS
145 #define WN_NOT_CONTAINER ERROR_NOT_CONTAINER
146 #define WN_NOT_AUTHENTICATED ERROR_NOT_AUTHENTICATED
147 #define WN_NOT_LOGGED_ON ERROR_NOT_LOGGED_ON
148 #define WN_NOT_VALIDATED ERROR_NO_LOGON_SERVERS
149 #define UNIVERSAL_NAME_INFO_LEVEL 1
150 #define REMOTE_NAME_INFO_LEVEL 2
151 #define NETINFO_DLL16 1
152 #define NETINFO_DISKRED 4
153 #define NETINFO_PRINTERRED 8
154 #define RP_LOGON 1
155 #define RP_INIFILE 2
156 #define PP_DISPLAYERRORS 1
157 #define WNCON_FORNETCARD 1
158 #define WNCON_NOTROUTED 2
159 #define WNCON_SLOWLINK 4
160 #define WNCON_DYNAMIC 8
161
162 #ifndef RC_INVOKED
163 typedef struct _NETRESOURCEA {
164 DWORD dwScope;
165 DWORD dwType;
166 DWORD dwDisplayType;
167 DWORD dwUsage;
168 LPSTR lpLocalName;
169 LPSTR lpRemoteName;
170 LPSTR lpComment ;
171 LPSTR lpProvider;
172 }NETRESOURCEA,*LPNETRESOURCEA;
173 typedef struct _NETRESOURCEW {
174 DWORD dwScope;
175 DWORD dwType;
176 DWORD dwDisplayType;
177 DWORD dwUsage;
178 LPWSTR lpLocalName;
179 LPWSTR lpRemoteName;
180 LPWSTR lpComment ;
181 LPWSTR lpProvider;
182 }NETRESOURCEW,*LPNETRESOURCEW;
183 typedef struct _CONNECTDLGSTRUCTA{
184 DWORD cbStructure;
185 HWND hwndOwner;
186 LPNETRESOURCEA lpConnRes;
187 DWORD dwFlags;
188 DWORD dwDevNum;
189 } CONNECTDLGSTRUCTA,*LPCONNECTDLGSTRUCTA;
190 typedef struct _CONNECTDLGSTRUCTW{
191 DWORD cbStructure;
192 HWND hwndOwner;
193 LPNETRESOURCEW lpConnRes;
194 DWORD dwFlags;
195 DWORD dwDevNum;
196 } CONNECTDLGSTRUCTW,*LPCONNECTDLGSTRUCTW;
197 typedef struct _DISCDLGSTRUCTA{
198 DWORD cbStructure;
199 HWND hwndOwner;
200 LPSTR lpLocalName;
201 LPSTR lpRemoteName;
202 DWORD dwFlags;
203 } DISCDLGSTRUCTA,*LPDISCDLGSTRUCTA;
204 typedef struct _DISCDLGSTRUCTW{
205 DWORD cbStructure;
206 HWND hwndOwner;
207 LPWSTR lpLocalName;
208 LPWSTR lpRemoteName;
209 DWORD dwFlags;
210 } DISCDLGSTRUCTW,*LPDISCDLGSTRUCTW;
211 typedef struct _UNIVERSAL_NAME_INFOA { LPSTR lpUniversalName; }UNIVERSAL_NAME_INFOA,*LPUNIVERSAL_NAME_INFOA;
212 typedef struct _UNIVERSAL_NAME_INFOW { LPWSTR lpUniversalName; }UNIVERSAL_NAME_INFOW,*LPUNIVERSAL_NAME_INFOW;
213 typedef struct _REMOTE_NAME_INFOA {
214 LPSTR lpUniversalName;
215 LPSTR lpConnectionName;
216 LPSTR lpRemainingPath;
217 }REMOTE_NAME_INFOA,*LPREMOTE_NAME_INFOA;
218 typedef struct _REMOTE_NAME_INFOW {
219 LPWSTR lpUniversalName;
220 LPWSTR lpConnectionName;
221 LPWSTR lpRemainingPath;
222 }REMOTE_NAME_INFOW,*LPREMOTE_NAME_INFOW;
223 typedef struct _NETINFOSTRUCT{
224 DWORD cbStructure;
225 DWORD dwProviderVersion;
226 DWORD dwStatus;
227 DWORD dwCharacteristics;
228 DWORD dwHandle;
229 WORD wNetType;
230 DWORD dwPrinters;
231 DWORD dwDrives;
232 } NETINFOSTRUCT,*LPNETINFOSTRUCT;
233 typedef UINT(PASCAL *PFNGETPROFILEPATHA)(LPCSTR,LPSTR,UINT);
234 typedef UINT(PASCAL *PFNGETPROFILEPATHW)(LPCWSTR,LPWSTR,UINT);
235 typedef UINT(PASCAL *PFNRECONCILEPROFILEA)(LPCSTR,LPCSTR,DWORD);
236 typedef UINT(PASCAL *PFNRECONCILEPROFILEW)(LPCWSTR,LPCWSTR,DWORD);
237 typedef BOOL(PASCAL *PFNPROCESSPOLICIESA)(HWND,LPCSTR,LPCSTR,LPCSTR,DWORD);
238 typedef BOOL(PASCAL *PFNPROCESSPOLICIESW)(HWND,LPCWSTR,LPCWSTR,LPCWSTR,DWORD);
239 typedef struct _NETCONNECTINFOSTRUCT{
240 DWORD cbStructure;
241 DWORD dwFlags;
242 DWORD dwSpeed;
243 DWORD dwDelay;
244 DWORD dwOptDataSize;
245 } NETCONNECTINFOSTRUCT,*LPNETCONNECTINFOSTRUCT;
246
247 DWORD APIENTRY WNetAddConnectionA(LPCSTR,LPCSTR,LPCSTR);
248 DWORD APIENTRY WNetAddConnectionW(LPCWSTR,LPCWSTR,LPCWSTR);
249 DWORD APIENTRY WNetAddConnection2A(LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
250 DWORD APIENTRY WNetAddConnection2W(LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
251 DWORD APIENTRY WNetAddConnection3A(HWND,LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
252 DWORD APIENTRY WNetAddConnection3W(HWND,LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
253 DWORD APIENTRY WNetCancelConnectionA(LPCSTR,BOOL);
254 DWORD APIENTRY WNetCancelConnectionW(LPCWSTR,BOOL);
255 DWORD APIENTRY WNetCancelConnection2A(LPCSTR,DWORD,BOOL);
256 DWORD APIENTRY WNetCancelConnection2W(LPCWSTR,DWORD,BOOL);
257 DWORD APIENTRY WNetGetConnectionA(LPCSTR,LPSTR,PDWORD);
258 DWORD APIENTRY WNetGetConnectionW(LPCWSTR,LPWSTR,PDWORD);
259 DWORD APIENTRY WNetUseConnectionA(HWND,LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD,LPSTR,PDWORD,PDWORD);
260 DWORD APIENTRY WNetUseConnectionW(HWND,LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD,LPWSTR,PDWORD,PDWORD);
261 DWORD APIENTRY WNetSetConnectionA(LPCSTR,DWORD,PVOID);
262 DWORD APIENTRY WNetSetConnectionW(LPCWSTR,DWORD,PVOID);
263 DWORD APIENTRY WNetConnectionDialog(HWND,DWORD);
264 DWORD APIENTRY WNetDisconnectDialog(HWND,DWORD);
265 DWORD APIENTRY WNetConnectionDialog1A(LPCONNECTDLGSTRUCTA);
266 DWORD APIENTRY WNetConnectionDialog1W(LPCONNECTDLGSTRUCTW);
267 DWORD APIENTRY WNetDisconnectDialog1A(LPDISCDLGSTRUCTA);
268 DWORD APIENTRY WNetDisconnectDialog1W(LPDISCDLGSTRUCTW);
269 DWORD APIENTRY WNetOpenEnumA(DWORD,DWORD,DWORD,LPNETRESOURCEA,LPHANDLE);
270 DWORD APIENTRY WNetOpenEnumW(DWORD,DWORD,DWORD,LPNETRESOURCEW,LPHANDLE);
271 DWORD APIENTRY WNetEnumResourceA(HANDLE,PDWORD,PVOID,PDWORD);
272 DWORD APIENTRY WNetEnumResourceW(HANDLE,PDWORD,PVOID,PDWORD);
273 DWORD APIENTRY WNetCloseEnum(HANDLE);
274 DWORD APIENTRY WNetGetUniversalNameA(LPCSTR,DWORD,PVOID,PDWORD);
275 DWORD APIENTRY WNetGetUniversalNameW(LPCWSTR,DWORD,PVOID,PDWORD);
276 DWORD APIENTRY WNetGetUserA(LPCSTR,LPSTR,PDWORD);
277 DWORD APIENTRY WNetGetUserW(LPCWSTR,LPWSTR,PDWORD);
278 DWORD APIENTRY WNetGetProviderNameA(DWORD,LPSTR,PDWORD);
279 DWORD APIENTRY WNetGetProviderNameW(DWORD,LPWSTR,PDWORD);
280 DWORD APIENTRY WNetGetNetworkInformationA(LPCSTR,LPNETINFOSTRUCT);
281 DWORD APIENTRY WNetGetNetworkInformationW(LPCWSTR,LPNETINFOSTRUCT);
282 DWORD APIENTRY WNetGetResourceInformationA(LPNETRESOURCEA,LPVOID,LPDWORD,LPSTR*);
283 DWORD APIENTRY WNetGetResourceInformationW(LPNETRESOURCEW,LPVOID,LPDWORD,LPWSTR*);
284 DWORD APIENTRY WNetGetLastErrorA(PDWORD,LPSTR,DWORD,LPSTR,DWORD);
285 DWORD APIENTRY WNetGetLastErrorW(PDWORD,LPWSTR,DWORD,LPWSTR,DWORD);
286 DWORD WINAPI WNetRestoreConnectionA(HWND,LPCSTR);
287 DWORD WINAPI WNetRestoreConnectionW(HWND,LPCWSTR);
288 DWORD APIENTRY MultinetGetConnectionPerformanceA(LPNETRESOURCEA,LPNETCONNECTINFOSTRUCT);
289 DWORD APIENTRY MultinetGetConnectionPerformanceW(LPNETRESOURCEW,LPNETCONNECTINFOSTRUCT);
290
291 #ifdef _WINE
292 typedef struct tagPASSWORD_CACHE_ENTRY
293 {
294 WORD cbEntry;
295 WORD cbResource;
296 WORD cbPassword;
297 BYTE iEntry;
298 BYTE nType;
299 BYTE abResource[1];
300 } PASSWORD_CACHE_ENTRY;
301
302 typedef BOOL (CALLBACK *ENUMPASSWORDPROC)(PASSWORD_CACHE_ENTRY *, DWORD);
303 DWORD WINAPI WNetCachePassword( LPSTR, WORD, LPSTR, WORD, BYTE, WORD );
304 UINT WINAPI WNetEnumCachedPasswords( LPSTR, WORD, BYTE, ENUMPASSWORDPROC, DWORD);
305 DWORD WINAPI WNetGetCachedPassword( LPSTR, WORD, LPSTR, LPWORD, BYTE );
306 #endif
307
308 #ifdef UNICODE
309 #define PFNPROCESSPOLICIES PFNPROCESSPOLICIESW
310 #define PFNRECONCILEPROFILE PFNRECONCILEPROFILEW
311 #define PFNGETPROFILEPATH PFNGETPROFILEPATHW
312 typedef NETRESOURCEW NETRESOURCE,*LPNETRESOURCE;
313 typedef CONNECTDLGSTRUCTW CONNECTDLGSTRUCT,*LPCONNECTDLGSTRUCT;
314 typedef DISCDLGSTRUCTW DISCDLGSTRUCT,*LPDISCDLGSTRUCT;
315 typedef REMOTE_NAME_INFOW REMOTE_NAME_INFO,*LPREMOTE_NAME_INFO;
316 typedef UNIVERSAL_NAME_INFOW UNIVERSAL_NAME_INFO,*LPUNIVERSAL_NAME_INFO;
317 #define WNetEnumResource WNetEnumResourceW
318 #define WNetOpenEnum WNetOpenEnumW
319 #define WNetGetResourceInformation WNetGetResourceInformationW
320 #define WNetGetUniversalName WNetGetUniversalNameW
321 #define WNetSetConnection WNetSetConnectionW
322 #define WNetUseConnection WNetUseConnectionW
323 #define WNetGetConnection WNetGetConnectionW
324 #define WNetCancelConnection2 WNetCancelConnection2W
325 #define WNetCancelConnection WNetCancelConnectionW
326 #define WNetAddConnection3 WNetAddConnection3W
327 #define WNetAddConnection2 WNetAddConnection2W
328 #define WNetAddConnection WNetAddConnectionW
329 #define WNetConnectionDialog1 WNetConnectionDialog1W
330 #define WNetDisconnectDialog1 WNetDisconnectDialog1W
331 #define WNetGetNetworkInformation WNetGetNetworkInformationW
332 #define WNetGetProviderName WNetGetProviderNameW
333 #define WNetGetUser WNetGetUserW
334 #define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceW
335 #define WNetGetLastError WNetGetLastErrorW
336 #else
337 #define PFNGETPROFILEPATH PFNGETPROFILEPATHA
338 #define PFNRECONCILEPROFILE PFNRECONCILEPROFILEA
339 #define PFNPROCESSPOLICIES PFNPROCESSPOLICIESA
340 typedef NETRESOURCEA NETRESOURCE,*LPNETRESOURCE;
341 typedef CONNECTDLGSTRUCTA CONNECTDLGSTRUCT,*LPCONNECTDLGSTRUCT;
342 typedef DISCDLGSTRUCTA DISCDLGSTRUCT,*LPDISCDLGSTRUCT;
343 typedef UNIVERSAL_NAME_INFOA UNIVERSAL_NAME_INFO,*LPUNIVERSAL_NAME_INFO;
344 typedef REMOTE_NAME_INFOA REMOTE_NAME_INFO,*LPREMOTE_NAME_INFO;
345 #define WNetOpenEnum WNetOpenEnumA
346 #define WNetEnumResource WNetEnumResourceA
347 #define WNetGetResourceInformation WNetGetResourceInformationA
348 #define WNetGetUniversalName WNetGetUniversalNameA
349 #define WNetConnectionDialog1 WNetConnectionDialog1A
350 #define WNetDisconnectDialog1 WNetDisconnectDialog1A
351 #define WNetAddConnection2 WNetAddConnection2A
352 #define WNetAddConnection3 WNetAddConnection3A
353 #define WNetCancelConnection WNetCancelConnectionA
354 #define WNetCancelConnection2 WNetCancelConnection2A
355 #define WNetGetConnection WNetGetConnectionA
356 #define WNetUseConnection WNetUseConnectionA
357 #define WNetSetConnection WNetSetConnectionA
358 #define WNetAddConnection WNetAddConnectionA
359 #define WNetGetUser WNetGetUserA
360 #define WNetGetProviderName WNetGetProviderNameA
361 #define WNetGetNetworkInformation WNetGetNetworkInformationA
362 #define WNetGetLastError WNetGetLastErrorA
363 #define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceA
364 #endif
365 #endif
366 #ifdef _MSC_VER
367 #pragma warning(pop)
368 #endif
369 #ifdef __cplusplus
370 }
371 #endif
372 #endif