ReactOS 0.4.16-dev-109-gf4cb10f
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 2827 of file wnet.c.

2828{
2830 PWSTR connection;
2831 DWORD ret, size, count;
2832 NETRESOURCEW * resources, * iter;
2833
2835 if (ret != WN_SUCCESS)
2836 {
2837 if (ret != WN_NO_NETWORK)
2838 {
2839 return ret;
2840 }
2841
2842 /* Means no provider, then, clearing is OK */
2843 return WN_SUCCESS;
2844 }
2845
2846 size = 0x1000;
2848 if (!resources)
2849 {
2851 return WN_OUT_OF_MEMORY;
2852 }
2853
2854 for (;;)
2855 {
2856 size = 0x1000;
2857 count = -1;
2858
2859 memset(resources, 0, size);
2861 if (ret == WN_SUCCESS || ret == WN_MORE_DATA)
2862 {
2863 for (iter = resources; count; count--, iter++)
2864 {
2865 if (iter->lpLocalName && iter->lpLocalName[0])
2866 connection = iter->lpLocalName;
2867 else
2868 connection = iter->lpRemoteName;
2869
2870 WNetCancelConnection2W(connection, 0, TRUE);
2871 }
2872 }
2873 else
2874 break;
2875 }
2876
2879
2880 return ret;
2881}
#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:1702
DWORD WINAPI WNetCloseEnum(HANDLE hEnum)
Definition: wnet.c:1762
DWORD WINAPI WNetCancelConnection2W(LPCWSTR lpName, DWORD dwFlags, BOOL fForce)
Definition: wnet.c:2420
DWORD WINAPI WNetOpenEnumW(DWORD dwScope, DWORD dwType, DWORD dwUsage, LPNETRESOURCEW lpNet, LPHANDLE lphEnum)
Definition: wnet.c:922

Referenced by LogoffShutdownThread().