Set executable permissions when creating .exe/.com files.
[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
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 "wine/server.h"
21 #include "debugtools.h"
22
23 DEFAULT_DEBUG_CHANNEL(file);
24
25 /****************************************************************************
26  *              FindFirstChangeNotificationA (KERNEL32.@)
27  */
28 HANDLE WINAPI FindFirstChangeNotificationA( LPCSTR lpPathName, BOOL bWatchSubtree,
29                                             DWORD dwNotifyFilter ) 
30 {
31     HANDLE ret = INVALID_HANDLE_VALUE;
32
33     FIXME("this is not supported yet (non-trivial).\n");
34
35     SERVER_START_REQ( create_change_notification )
36     {
37         req->subtree = bWatchSubtree;
38         req->filter  = dwNotifyFilter;
39         if (!SERVER_CALL_ERR()) ret = req->handle;
40     }
41     SERVER_END_REQ;
42     return ret;
43 }
44
45 /****************************************************************************
46  *              FindFirstChangeNotificationW (KERNEL32.@)
47  */
48 HANDLE WINAPI FindFirstChangeNotificationW( LPCWSTR lpPathName,
49                                                 BOOL bWatchSubtree,
50                                                 DWORD dwNotifyFilter) 
51 {
52     LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpPathName );
53     HANDLE ret = FindFirstChangeNotificationA( nameA, bWatchSubtree, 
54                                                           dwNotifyFilter );
55     if (nameA) HeapFree( GetProcessHeap(), 0, nameA );
56     return ret;
57 }
58
59 /****************************************************************************
60  *              FindNextChangeNotification (KERNEL32.@)
61  */
62 BOOL WINAPI FindNextChangeNotification( HANDLE handle ) 
63 {
64     /* FIXME: do something */
65     return TRUE;
66 }
67
68 /****************************************************************************
69  *              FindCloseChangeNotification (KERNEL32.@)
70  */
71 BOOL WINAPI FindCloseChangeNotification( HANDLE handle) 
72 {
73     return CloseHandle( handle );
74 }
75