Always initialize lpWaveHdr->lpNext to NULL.
[wine.git] / files / change.c
blob3aba77feb7dd8cafb7f9b12121814e6ebad46a84
1 /*
2 * Win32 file change notification functions
4 * Copyright 1998 Ulrich Weigand
5 */
7 #include <assert.h>
8 #include <stdlib.h>
9 #include <unistd.h>
10 #include <string.h>
11 #include <time.h>
12 #include "winbase.h"
13 #include "winerror.h"
14 #include "process.h"
15 #include "thread.h"
16 #include "heap.h"
17 #include "server.h"
18 #include "debugtools.h"
21 /****************************************************************************
22 * FindFirstChangeNotificationA (KERNEL32.248)
24 HANDLE WINAPI FindFirstChangeNotificationA( LPCSTR lpPathName, BOOL bWatchSubtree,
25 DWORD dwNotifyFilter )
27 struct create_change_notification_request *req = get_req_buffer();
29 req->subtree = bWatchSubtree;
30 req->filter = dwNotifyFilter;
31 server_call( REQ_CREATE_CHANGE_NOTIFICATION );
32 return req->handle;
35 /****************************************************************************
36 * FindFirstChangeNotification32W (KERNEL32.249)
38 HANDLE WINAPI FindFirstChangeNotificationW( LPCWSTR lpPathName,
39 BOOL bWatchSubtree,
40 DWORD dwNotifyFilter)
42 LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpPathName );
43 HANDLE ret = FindFirstChangeNotificationA( nameA, bWatchSubtree,
44 dwNotifyFilter );
45 if (nameA) HeapFree( GetProcessHeap(), 0, nameA );
46 return ret;
49 /****************************************************************************
50 * FindNextChangeNotification (KERNEL32.252)
52 BOOL WINAPI FindNextChangeNotification( HANDLE handle )
54 /* FIXME: do something */
55 return TRUE;
58 /****************************************************************************
59 * FindCloseChangeNotification (KERNEL32.247)
61 BOOL WINAPI FindCloseChangeNotification( HANDLE handle)
63 return CloseHandle( handle );