Removed some direct accesses to the 16-bit task structure.
[wine/multimedia.git] / files / change.c
blob38f28a271eedf9bead2ae39ee18b508b431971a1
1 /*
2 * Win32 file change notification functions
4 * FIXME: this is VERY difficult to implement with proper Unix support
5 * at the wineserver side.
6 * (Unix doesn't really support this)
7 * See http://x57.deja.com/getdoc.xp?AN=575483053 for possible solutions.
9 * Copyright 1998 Ulrich Weigand
12 #include <assert.h>
13 #include <stdlib.h>
14 #include <unistd.h>
15 #include <string.h>
16 #include <time.h>
17 #include "winbase.h"
18 #include "winerror.h"
19 #include "heap.h"
20 #include "server.h"
21 #include "debugtools.h"
23 DEFAULT_DEBUG_CHANNEL(file);
25 /****************************************************************************
26 * FindFirstChangeNotificationA (KERNEL32.248)
28 HANDLE WINAPI FindFirstChangeNotificationA( LPCSTR lpPathName, BOOL bWatchSubtree,
29 DWORD dwNotifyFilter )
31 HANDLE ret = INVALID_HANDLE_VALUE;
33 FIXME("this is not supported yet (non-trivial).\n");
35 SERVER_START_REQ
37 struct create_change_notification_request *req = server_alloc_req( sizeof(*req), 0 );
38 req->subtree = bWatchSubtree;
39 req->filter = dwNotifyFilter;
40 if (!server_call( REQ_CREATE_CHANGE_NOTIFICATION )) ret = req->handle;
42 SERVER_END_REQ;
43 return ret;
46 /****************************************************************************
47 * FindFirstChangeNotificationW (KERNEL32.249)
49 HANDLE WINAPI FindFirstChangeNotificationW( LPCWSTR lpPathName,
50 BOOL bWatchSubtree,
51 DWORD dwNotifyFilter)
53 LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpPathName );
54 HANDLE ret = FindFirstChangeNotificationA( nameA, bWatchSubtree,
55 dwNotifyFilter );
56 if (nameA) HeapFree( GetProcessHeap(), 0, nameA );
57 return ret;
60 /****************************************************************************
61 * FindNextChangeNotification (KERNEL32.252)
63 BOOL WINAPI FindNextChangeNotification( HANDLE handle )
65 /* FIXME: do something */
66 return TRUE;
69 /****************************************************************************
70 * FindCloseChangeNotification (KERNEL32.247)
72 BOOL WINAPI FindCloseChangeNotification( HANDLE handle)
74 return CloseHandle( handle );