- mostly cleanup after the renaming
[wine] / dlls / ntdll / om.c
1 /*
2  *      Object management functions
3  */
4
5 #include <stdlib.h>
6 #include <string.h>
7 #include "debug.h"
8
9 #include "ntddk.h"
10
11 /* move to somewhere */
12 typedef void * POBJDIR_INFORMATION;
13
14 /*
15  *      Generic object functions
16  */
17  
18 /******************************************************************************
19  * NtQueryObject [NTDLL.161]
20  */
21 NTSTATUS WINAPI NtQueryObject(
22         IN HANDLE ObjectHandle,
23         IN OBJECT_INFORMATION_CLASS ObjectInformationClass,
24         OUT PVOID ObjectInformation,
25         IN ULONG Length,
26         OUT PULONG ResultLength)
27 {
28         FIXME(ntdll,"(0x%08x,0x%08x,%p,0x%08lx,%p): stub\n",
29         ObjectHandle, ObjectInformationClass, ObjectInformation, Length, ResultLength);
30         return 0;
31 }
32
33 /******************************************************************************
34  *  NtQuerySecurityObject       [NTDLL] 
35  */
36 NTSTATUS WINAPI NtQuerySecurityObject(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) 
37 {
38         FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx) stub!\n",x1,x2,x3,x4,x5);
39         return 0;
40 }
41 /******************************************************************************
42  *  NtDuplicateObject           [NTDLL] 
43  */
44 NTSTATUS WINAPI NtDuplicateObject(
45         IN HANDLE SourceProcessHandle,
46         IN PHANDLE SourceHandle,
47         IN HANDLE TargetProcessHandle,
48         OUT PHANDLE TargetHandle,
49         IN ACCESS_MASK DesiredAccess,
50         IN BOOLEAN InheritHandle,
51         ULONG Options)
52 {
53         FIXME(ntdll,"(0x%08x,%p,0x%08x,%p,0x%08lx,0x%08x,0x%08lx) stub!\n",
54         SourceProcessHandle,SourceHandle,TargetProcessHandle,TargetHandle,
55         DesiredAccess,InheritHandle,Options);
56         *TargetHandle = 0;
57         return 0;
58 }
59
60 /**************************************************************************
61  *                 NtClose                              [NTDLL.65]
62  * FUNCTION: Closes a handle reference to an object
63  * ARGUMENTS:
64  *      Handle  handle to close
65  */
66 NTSTATUS WINAPI NtClose(
67         HANDLE Handle) 
68 {
69         FIXME(ntdll,"(0x%08x),stub!\n",Handle);
70         return 1;
71 }
72
73 /******************************************************************************
74  *  NtWaitForSingleObject               [NTDLL] 
75  */
76 NTSTATUS WINAPI NtWaitForSingleObject(
77         IN PHANDLE Object,
78         IN BOOLEAN Alertable,
79         IN PLARGE_INTEGER Time)
80 {
81         FIXME(ntdll,"(%p,0x%08x,%p),stub!\n",Object,Alertable,Time);
82         return 0;
83 }
84
85 /*
86  *      Directory functions
87  */
88
89 /**************************************************************************
90  * NtOpenDirectoryObject [NTDLL.124]
91  * FUNCTION: Opens a namespace directory object
92  * ARGUMENTS:
93  *  DirectoryHandle     Variable which receives the directory handle
94  *  DesiredAccess       Desired access to the directory
95  *  ObjectAttributes    Structure describing the directory
96  * RETURNS: Status
97  */
98 NTSTATUS WINAPI NtOpenDirectoryObject(
99         PHANDLE DirectoryHandle,
100         ACCESS_MASK DesiredAccess,
101         POBJECT_ATTRIBUTES ObjectAttributes)
102 {
103     FIXME(ntdll,"(%p,0x%08lx,%p(%s)): stub\n", 
104     DirectoryHandle, DesiredAccess, ObjectAttributes,
105     ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL);
106     return 0;
107 }
108
109 /******************************************************************************
110  *  NtCreateDirectoryObject     [NTDLL] 
111  */
112 NTSTATUS WINAPI NtCreateDirectoryObject(
113         PHANDLE DirectoryHandle,
114         ACCESS_MASK DesiredAccess,
115         POBJECT_ATTRIBUTES ObjectAttributes) 
116 {
117         FIXME(ntdll,"(%p,0x%08lx,%p(%s)),stub!\n",
118         DirectoryHandle,DesiredAccess,ObjectAttributes,
119         ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL);
120         return 0;
121 }
122
123 /******************************************************************************
124  * NtQueryDirectoryObject [NTDLL.149] 
125  * FUNCTION: Reads information from a namespace directory
126  * ARGUMENTS:
127  *  DirObjInformation   Buffer to hold the data read
128  *  BufferLength        Size of the buffer in bytes
129  *  GetNextIndex        If TRUE then set ObjectIndex to the index of the next object
130  *                      If FALSE then set ObjectIndex to the number of objects in the directory
131  *  IgnoreInputIndex    If TRUE start reading at index 0
132  *                      If FALSE start reading at the index specified by object index
133  *  ObjectIndex         Zero based index into the directory, interpretation depends on IgnoreInputIndex and GetNextIndex
134  *  DataWritten         Caller supplied storage for the number of bytes written (or NULL)
135  */
136 NTSTATUS WINAPI NtQueryDirectoryObject(
137         IN HANDLE DirObjHandle,
138         OUT POBJDIR_INFORMATION DirObjInformation,
139         IN ULONG BufferLength,
140         IN BOOLEAN GetNextIndex,
141         IN BOOLEAN IgnoreInputIndex,
142         IN OUT PULONG ObjectIndex,
143         OUT PULONG DataWritten OPTIONAL)
144 {
145         FIXME(ntdll,"(0x%08x,%p,0x%08lx,0x%08x,0x%08x,%p,%p) stub\n",
146                 DirObjHandle, DirObjInformation, BufferLength, GetNextIndex,
147                 IgnoreInputIndex, ObjectIndex, DataWritten);
148     return 0xc0000000; /* We don't have any. Whatever. (Yet.) */
149 }
150
151 /*
152  *      Link objects
153  */
154  
155 /******************************************************************************
156  *  NtOpenSymbolicLinkObject    [NTDLL] 
157  */
158 NTSTATUS WINAPI NtOpenSymbolicLinkObject(
159         OUT PHANDLE LinkHandle,
160         IN ACCESS_MASK DesiredAccess,
161         IN POBJECT_ATTRIBUTES ObjectAttributes)
162 {
163         FIXME(ntdll,"(%p,0x%08lx,%p(%s)) stub\n",
164         LinkHandle, DesiredAccess, ObjectAttributes,
165         ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL);
166         return 0;
167 }
168
169 /******************************************************************************
170  *  NtCreateSymbolicLinkObject  [NTDLL] 
171  */
172 NTSTATUS WINAPI NtCreateSymbolicLinkObject(
173         OUT PHANDLE SymbolicLinkHandle,
174         IN ACCESS_MASK DesiredAccess,
175         IN POBJECT_ATTRIBUTES ObjectAttributes,
176         IN PUNICODE_STRING Name)
177 {
178         FIXME(ntdll,"(%p,0x%08lx,%p(%s), %p) stub\n",
179         SymbolicLinkHandle, DesiredAccess, ObjectAttributes, 
180         ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL,
181         debugstr_w(Name->Buffer));
182         return 0;
183 }
184
185 /******************************************************************************
186  *  NtQuerySymbolicLinkObject   [NTDLL] 
187  */
188 NTSTATUS WINAPI NtQuerySymbolicLinkObject(
189         IN HANDLE LinkHandle,
190         IN OUT PUNICODE_STRING LinkTarget,
191         OUT PULONG ReturnedLength OPTIONAL)
192 {
193         FIXME(ntdll,"(0x%08x,%p,%p) stub\n",
194         LinkHandle, debugstr_w(LinkTarget->Buffer), ReturnedLength);
195
196         return 0;
197 }
198