Fixed GetTextExtentPointI driver usage.
[wine] / files / change.c
1 /*
2  * Win32 file change notification functions
3  *
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.
8  *
9  * Copyright 1998 Ulrich Weigand
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with this library; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
24  */
25
26 #include <assert.h>
27 #include <stdlib.h>
28 #include <unistd.h>
29 #include <string.h>
30 #include <time.h>
31 #include "winbase.h"
32 #include "winerror.h"
33 #include "wine/server.h"
34 #include "wine/debug.h"
35
36 WINE_DEFAULT_DEBUG_CHANNEL(file);
37
38 /****************************************************************************
39  *              FindFirstChangeNotificationA (KERNEL32.@)
40  */
41 HANDLE WINAPI FindFirstChangeNotificationA( LPCSTR lpPathName, BOOL bWatchSubtree,
42                                             DWORD dwNotifyFilter ) 
43 {
44     HANDLE ret = INVALID_HANDLE_VALUE;
45
46     FIXME("this is not supported yet (non-trivial).\n");
47
48     SERVER_START_REQ( create_change_notification )
49     {
50         req->subtree = bWatchSubtree;
51         req->filter  = dwNotifyFilter;
52         if (!wine_server_call_err( req )) ret = reply->handle;
53     }
54     SERVER_END_REQ;
55     return ret;
56 }
57
58 /****************************************************************************
59  *              FindFirstChangeNotificationW (KERNEL32.@)
60  */
61 HANDLE WINAPI FindFirstChangeNotificationW( LPCWSTR lpPathName,
62                                                 BOOL bWatchSubtree,
63                                                 DWORD dwNotifyFilter) 
64 {
65     HANDLE ret = INVALID_HANDLE_VALUE;
66
67     FIXME("this is not supported yet (non-trivial).\n");
68
69     SERVER_START_REQ( create_change_notification )
70     {
71         req->subtree = bWatchSubtree;
72         req->filter  = dwNotifyFilter;
73         if (!wine_server_call_err( req )) ret = reply->handle;
74     }
75     SERVER_END_REQ;
76     return ret;
77 }
78
79 /****************************************************************************
80  *              FindNextChangeNotification (KERNEL32.@)
81  */
82 BOOL WINAPI FindNextChangeNotification( HANDLE handle ) 
83 {
84     /* FIXME: do something */
85     return TRUE;
86 }
87
88 /****************************************************************************
89  *              FindCloseChangeNotification (KERNEL32.@)
90  */
91 BOOL WINAPI FindCloseChangeNotification( HANDLE handle) 
92 {
93     return CloseHandle( handle );
94 }
95