ReactOS 0.4.16-dev-329-g9223134
np_enum.c
Go to the documentation of this file.
1#include <windows.h>
2#include <stdio.h>
3
5
6#define INC_SHIFT ++debug_shift;
7#define DEC_SHIFT --debug_shift;
8#define PRT_SHIFT do { DWORD cur = 0; for (; cur < debug_shift; ++cur) printf("\t"); } while (0);
9
11{
12 DWORD ret;
14 DWORD size = 0x1000;
17
18 if (resource && resource->lpRemoteName)
19 check = TRUE;
20
22 if (ret != WN_SUCCESS)
23 return;
24
26 if (!out)
27 {
29 return;
30 }
31
33
34 if (check)
35 {
36 printf("Called with lpRemoteName not null, current value: %S\n", resource->lpRemoteName);
37 }
38
39 do
40 {
41 DWORD count = -1;
42
44 if (ret == WN_SUCCESS || ret == WN_MORE_DATA)
45 {
47
48 current = out;
49 for (; count; count--)
50 {
52 printf("lpRemoteName: %S\n", current->lpRemoteName);
53
55 {
57 printf("Found provider: %S\n", current->lpProvider);
59 }
60
61 current++;
62 }
63 }
64 } while (ret != WN_NO_MORE_ENTRIES);
66
69}
70
71int wmain(int argc, const WCHAR *argv[])
72{
74
75 return 0;
76}
static int argc
Definition: ServiceArgs.c:12
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define check(expected, result)
Definition: dplayx.c:32
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define printf
Definition: freeldr.h:97
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
struct task_struct * current
Definition: linux.c:32
#define argv
Definition: mplay32.c:18
#define DEC_SHIFT
Definition: np_enum.c:7
#define PRT_SHIFT
Definition: np_enum.c:8
DWORD debug_shift
Definition: np_enum.c:4
void np_enum(NETRESOURCEW *resource)
Definition: np_enum.c:10
#define INC_SHIFT
Definition: np_enum.c:6
int wmain()
static FILE * out
Definition: regtests2xml.c:44
int ret
#define RESOURCETYPE_DISK
Definition: winnetwk.h:64
#define WN_MORE_DATA
Definition: winnetwk.h:117
#define WN_SUCCESS
Definition: winnetwk.h:111
#define WNetEnumResource
Definition: winnetwk.h:599
#define WNetOpenEnum
Definition: winnetwk.h:598
#define RESOURCEUSAGE_CONTAINER
Definition: winnetwk.h:69
#define WN_NO_MORE_ENTRIES
Definition: winnetwk.h:146
#define RESOURCE_GLOBALNET
Definition: winnetwk.h:59
DWORD WINAPI WNetCloseEnum(HANDLE hEnum)
Definition: wnet.c:1762
__wchar_t WCHAR
Definition: xmlstorage.h:180