ReactOS 0.4.15-dev-5669-g09dde2c
undocmpr.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

DWORD WINAPI WNetClearConnections (HWND owner)
 

Function Documentation

◆ WNetClearConnections()

DWORD WINAPI WNetClearConnections ( HWND  owner)

Definition at line 2825 of file wnet.c.

2826{
2828 PWSTR connection;
2829 DWORD ret, size, count;
2830 NETRESOURCEW * resources, * iter;
2831
2833 if (ret != WN_SUCCESS)
2834 {
2835 if (ret != WN_NO_NETWORK)
2836 {
2837 return ret;
2838 }
2839
2840 /* Means no provider, then, clearing is OK */
2841 return WN_SUCCESS;
2842 }
2843
2844 size = 0x1000;
2846 if (!resources)
2847 {
2849 return WN_OUT_OF_MEMORY;
2850 }
2851
2852 for (;;)
2853 {
2854 size = 0x1000;
2855 count = -1;
2856
2857 memset(resources, 0, size);
2859 if (ret == WN_SUCCESS || ret == WN_MORE_DATA)
2860 {
2861 for (iter = resources; count; count--, iter++)
2862 {
2863 if (iter->lpLocalName && iter->lpLocalName[0])
2864 connection = iter->lpLocalName;
2865 else
2866 connection = iter->lpRemoteName;
2867
2868 WNetCancelConnection2W(connection, 0, TRUE);
2869 }
2870 }
2871 else
2872 break;
2873 }
2874
2877
2878 return ret;
2879}
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
unsigned long DWORD
Definition: ntddk_ex.h:95
int connected
Definition: main.c:61
FxCmResList * resources
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
#define memset(x, y, z)
Definition: compat.h:39
LPWSTR lpLocalName
Definition: winnetwk.h:181
LPWSTR lpRemoteName
Definition: winnetwk.h:182
uint16_t * PWSTR
Definition: typedefs.h:56
int ret
#define RESOURCE_CONNECTED
Definition: winnetwk.h:58
#define WN_OUT_OF_MEMORY
Definition: winnetwk.h:125
#define WN_MORE_DATA
Definition: winnetwk.h:117
#define WN_SUCCESS
Definition: winnetwk.h:111
#define WN_NO_NETWORK
Definition: winnetwk.h:126
#define RESOURCETYPE_ANY
Definition: winnetwk.h:63
DWORD WINAPI WNetEnumResourceW(HANDLE hEnum, LPDWORD lpcCount, LPVOID lpBuffer, LPDWORD lpBufferSize)
Definition: wnet.c:1700
DWORD WINAPI WNetCloseEnum(HANDLE hEnum)
Definition: wnet.c:1760
DWORD WINAPI WNetCancelConnection2W(LPCWSTR lpName, DWORD dwFlags, BOOL fForce)
Definition: wnet.c:2418
DWORD WINAPI WNetOpenEnumW(DWORD dwScope, DWORD dwType, DWORD dwUsage, LPNETRESOURCEW lpNet, LPHANDLE lphEnum)
Definition: wnet.c:920

Referenced by LogoffShutdownThread().