source: trunk/src/kernel32/stubs.cpp@ 4562

Last change on this file since 4562 was 4526, checked in by sandervl, 25 years ago

SearchPathA fix (multiple dirs), add rename odin.ini entry for winspool.drv, extra pointer checks in Read/WriteProcessMemory

File size: 91.1 KB
Line 
1
2/*
3 * Win32 KERNEL32 Subsystem for OS/2
4 *
5 * 1998/05/19 PH Patrick Haller (haller@zebra.fh-weingarten.de)
6 *
7 * @(#) Stubs.H 1.0.0 1998/05/19 PH start
8 *
9 * Project Odin Software License can be found in LICENSE.TXT
10 *
11 */
12
13/*****************************************************************************
14 * Includes *
15 *****************************************************************************/
16#include <os2win.h>
17#include <winnls.h>
18#include "unicode.h"
19#include <builtin.h>
20#include "handlemanager.h"
21#include <string.h>
22
23#include "stubs.h"
24
25#define DBG_LOCALLOG DBG_stubs
26#include "dbglocal.h"
27
28
29/*****************************************************************************
30 * Defines *
31 *****************************************************************************/
32
33
34// For DefineDosDevice
35
36#define DDD_RAW_TARGET_PATH 0x00000001
37#define DDD_REMOVE_DEFINITION 0x00000002
38#define DDD_EXACT_MATCH_ON_REMOVE 0x00000004
39#define DDD_NO_BROADCAST_SYSTEM 0x00000008
40
41
42// For Backup functions
43
44//
45// Stream Ids
46//
47
48#define BACKUP_INVALID 0x00000000
49#define BACKUP_DATA 0x00000001
50#define BACKUP_EA_DATA 0x00000002
51#define BACKUP_SECURITY_DATA 0x00000003
52#define BACKUP_ALTERNATE_DATA 0x00000004
53#define BACKUP_LINK 0x00000005
54#define BACKUP_PROPERTY_DATA 0x00000006
55
56//
57// Stream Attributes
58//
59
60#define STREAM_NORMAL_ATTRIBUTE 0x00000000
61#define STREAM_MODIFIED_WHEN_READ 0x00000001
62#define STREAM_CONTAINS_SECURITY 0x00000002
63#define STREAM_CONTAINS_PROPERTIES 0x00000004
64
65
66// Locale
67#define LCID DWORD
68
69/*
70 * Locale Dependent Mapping Flags.
71 */
72
73#define LCMAP_LOWERCASE 0x00000100 /* lower case letters */
74#define LCMAP_UPPERCASE 0x00000200 /* upper case letters */
75#define LCMAP_SORTKEY 0x00000400 /* WC sort key (normalize) */
76#define LCMAP_BYTEREV 0x00000800 /* byte reversal */
77
78#define LCMAP_HIRAGANA 0x00100000 /* map katakana to hiragana */
79#define LCMAP_KATAKANA 0x00200000 /* map hiragana to katakana */
80#define LCMAP_HALFWIDTH 0x00400000 /* map double byte to single byte */
81#define LCMAP_FULLWIDTH 0x00800000 /* map single byte to double byte */
82
83#define LCMAP_LINGUISTIC_CASING 0x01000000 /* use linguistic rules for casing */
84
85#define LCMAP_SIMPLIFIED_CHINESE 0x02000000 /* map traditional chinese to simplified chinese */
86#define LCMAP_TRADITIONAL_CHINESE 0x04000000 /* map simplified chinese to traditional chinese */
87
88
89
90/*
91 * Locale Enumeration Flags.
92 */
93#define LCID_INSTALLED 0x00000001 /* installed locale ids */
94#define LCID_SUPPORTED 0x00000002 /* supported locale ids */
95
96
97
98// For FindFirstFileEx
99
100#define FIND_FIRST_EX_CASE_SENSITIVE 0x00000001
101
102/*****************************************************************************
103 * Structures *
104 *****************************************************************************/
105
106 // For FindFirstFileEx
107
108typedef enum _FINDEX_INFO_LEVELS {
109 FindExInfoStandard,
110 FindExInfoMaxInfoLevel
111} FINDEX_INFO_LEVELS;
112
113typedef enum _FINDEX_SEARCH_OPS {
114 FindExSearchNameMatch,
115 FindExSearchLimitToDirectories,
116 FindExSearchLimitToDevices,
117 FindExSearchMaxSearchOp
118} FINDEX_SEARCH_OPS;
119
120 // For Backup funtions
121
122typedef struct _WIN32_STREAM_ID {
123
124 DWORD dwStreamId;
125 DWORD dwStreamAttributes;
126 LARGE_INTEGER Size;
127 DWORD dwStreamNameSize;
128// WCHAR cStreamName[ ] ; /* @@@PH */
129 WCHAR cStreamName[1] ;
130} WIN32_STREAM_ID;
131
132
133//
134// File structures
135//
136
137//typedef struct _OVERLAPPED {
138// DWORD Internal;
139// DWORD InternalHigh;
140// DWORD Offset;
141// DWORD OffsetHigh;
142// HANDLE hEvent;
143//} OVERLAPPED, *LPOVERLAPPED;
144
145//typedef struct _SECURITY_ATTRIBUTES {
146// DWORD nLength;
147// LPVOID lpSecurityDescriptor;
148// BOOL bInheritHandle;
149//} SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
150
151//typedef struct _PROCESS_INFORMATION {
152// HANDLE hProcess;
153// HANDLE hThread;
154// DWORD dwProcessId;
155// DWORD dwThreadId;
156//} PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
157
158// For Fiber functions
159
160typedef VOID (WINAPI *PFIBER_START_ROUTINE)(
161 LPVOID lpFiberParameter
162 );
163typedef PFIBER_START_ROUTINE LPFIBER_START_ROUTINE;
164
165// For Enum CalendarInfo & EnumSystemCodePages see winnls.h
166
167/*
168 * Calendar type constant.
169 */
170typedef DWORD CALTYPE;
171
172/*
173 * Calendar ID.
174 */
175typedef DWORD CALID;
176
177
178/*****************************************************************************
179 * Prototypes *
180 *****************************************************************************/
181
182void WIN32API CommonUnimpStub()
183{
184 dprintf(("STUB: KERNEL32.17!!"));
185}
186
187/*****************************************************************************
188 * Name : BOOL WIN32API AreFileApisANSI (VOID)
189 * Purpose : The AreFileApisANSI function determines whether a set of Win32
190 * file functions is using the ANSI or OEM character set code page.
191 * This function is useful for 8-bit console input and output
192 * operations.
193 * Parameters: NONE
194 * Variables :
195 * Result : If the set of Win32 file functions is using the ANSI code page,
196 * the return value is nonzero.
197 * If the set of Win32 file functions is using the OEM code page,
198 * the return value is zero.
199 * Remark :
200 * Status : UNTESTED STUB
201 *
202 * Author : Markus Montkowski [Thu, 1998/02/19 11:46]
203 *****************************************************************************/
204
205BOOL WIN32API AreFileApisANSI (VOID)
206{
207
208 dprintf(("KERNEL32:AreFileApisANSI() not implemented - TRUE\n"
209 ));
210
211 return (TRUE);
212}
213
214/*****************************************************************************
215 * Name : BOOL WIN32API BackupRead(
216 * Purpose : The BackupRead function reads data associated with a specified
217 * file or directory into a buffer. You use this function to back
218 * up a file or directory.
219 * Parameters: HANDLE hFile handle to file or directory
220 * LPBYTE lpBuffer pointer to buffer to read to
221 * DWORD nNumberOfBytesToRead number of bytes to read
222 * LPDWORD lpNumberOfBytesRead pointer to variable to receive
223 * number of bytes read
224 * BOOL bAbort termination type
225 * BOOL bProcessSecurity process security flag
226 * LPVOID *lpContext pointer to pointer to internal
227 * context information
228 * Variables :
229 * Result : 0 on Error Nonzero if OK
230 * Remark : BackupRead processes all of the data pertaining to an opened
231 * object as a series of discrete byte streams. Each stream is
232 * preceded by a 32-bit aligned WIN32_STREAM_ID structure.
233 * Streams must be processed in the same order in which they were
234 * written to the tape. This ordering enables applications to
235 * compare the data backed up against the data on the source device.
236 * The data returned by BackupRead is to be used only as input to
237 * the BackupWrite function. This data is returned as one large data
238 * stream divided into substreams. The substreams are separated
239 * by WIN32_STREAM_ID headers.
240 *
241 * If an error occurs while BackupRead is reading, the calling
242 * process can skip the bad data by calling the BackupSeek function.
243 * Status : UNTESTED STUB
244 *
245 * Author : Markus Montkowski [Thu, 1998/05/19 11:46]
246 *****************************************************************************/
247
248BOOL WIN32API BackupRead(
249 HANDLE hFile, // handle to file or directory
250 LPBYTE lpBuffer, // pointer to buffer to read to
251 DWORD nNumberOfBytesToRead, // number of bytes to read
252 LPDWORD lpNumberOfBytesRead, // pointer to variable to receive number of bytes read
253 BOOL bAbort, // termination type
254 BOOL bProcessSecurity, // process security flag
255 LPVOID *lpContext // pointer to pointer to internal context information
256)
257{
258
259 dprintf(("KERNEL32:BackupRead(%08x,%08x,%08x,%08x,%08x,%08x,%08x) not implemented\n",
260 hFile, lpBuffer, nNumberOfBytesToRead, lpNumberOfBytesRead,
261 bAbort, bProcessSecurity, lpContext
262 ));
263
264 return (FALSE);
265}
266/*****************************************************************************
267 * Name : BOOL WIN32API BackupSeek()
268 * Purpose : The BackupSeek function seeks forward in a data stream initially
269 * accessed by using the BackupRead or BackupWrite function.
270 * Parameters: HANDLE hFile handle to open file
271 * DWORD dwLowBytesToSeek low-order 32 bits of number of bytes
272 * DWORD dwHighBytesToSeek high-order 32 bits of number of bytes
273 * LPDWORD lpdwLowByteSeeked pointer to number of bytes function seeks
274 * LPDWORD lpdwHighByteSeeked pointer to number of bytes function seeks
275 * LPVOID *lpContext pointer to internal context information
276 *
277 * Variables :
278 * Result : If the function could seek the requested amount, the function
279 * returns nonzero.
280 * If the function could not seek the requested amount, the function
281 * returns zero.
282 * Remark : Applications use the BackUpSeek function to skip portions of a
283 * data stream that cause errors. This function does not seek across
284 * stream headers. If an application attempts to seek past the end
285 * of a substream, the function fails, the lpdwLowByteSeeked and
286 * lpdwHighByteSeeked parameters indicate the actual number of bytes
287 * the function seeks, and the file position is placed at the start
288 * of the next stream header.
289 * Status : UNTESTED STUB
290 *
291 * Author : Markus Montkowski [Thu, 1998/05/19 11:46]
292 *****************************************************************************/
293
294BOOL WIN32API BackupSeek( HANDLE hFile, DWORD dwLowBytesToSeek,
295 DWORD dwHighBytesToSeek,
296 LPDWORD lpdwLowByteSeeked,
297 LPDWORD lpdwHighByteSeeked,LPVOID *lpContext)
298{
299
300 dprintf(("KERNEL32:BackupSeek(%08x,%08x,%08x,%08x,%08x,08x) not implemented\n",
301 hFile, dwLowBytesToSeek,dwHighBytesToSeek,
302 lpdwLowByteSeeked, lpdwHighByteSeeked, lpContext));
303
304 return (FALSE);
305}
306
307/*****************************************************************************
308 * Name : BOOL WIN32API BackupWrite
309 * Purpose : The BackupWrite function writes a stream of data from a buffer to
310 * a specified file or directory. The data must be divided into
311 * substreams separated by WIN32_STREAM_ID structures. You use this
312 * function to restore a file or directory that has been backed up.
313 * Parameters: HANDLE hFile handle to file or directory
314 * LPBYTE lpBuffer pointer to buffer containing data
315 * to write
316 * DWORD nNumberOfBytesToWrite number of bytes to write
317 * LPDWORD lpNumberOfBytesWritten pointer to variable to receive
318 * number of bytes written
319 * BOOL bAbort termination type
320 * BOOL bProcessSecurity process security
321 * LPVOID *lpContext pointer to pointer to internal
322 * context information
323 *
324 * Variables :
325 * Result : If the function succeeds, the return value is nonzero.
326 * If the function fails, the return value is zero,
327 * indicating that an I/O error occurred.
328 * To get extended error information, call GetLastError.
329 * Remark :
330 * Status : UNTESTED STUB
331 *
332 * Author : Markus Montkowski [Thu, 1998/05/19 11:46]
333 *****************************************************************************/
334
335BOOL WIN32API BackupWrite( HANDLE hFile, LPBYTE lpBuffer,
336 DWORD nNumberOfBytesToWrite,
337 LPDWORD lpNumberOfBytesWritten,
338 BOOL bAbort, BOOL bProcessSecurity,
339 LPVOID *lpContext)
340{
341
342 dprintf(("KERNEL32:BackupWrite(%08x,%0x8,%08x,%08x,%08x,%08x,%08x) not implemented\n",
343 hFile, lpBuffer, nNumberOfBytesToWrite,
344 lpNumberOfBytesWritten, bAbort, bProcessSecurity, lpContext));
345
346 return (FALSE);
347}
348
349/*****************************************************************************
350 * Name : HANDLE WIN32API BeginUpdateResourceA
351 * Purpose : The BeginUpdateResource function returns a handle that can be
352 * used by the UpdateResource function to add, delete, or replace
353 * resources in an executable file.
354 * Parameters: LPCSTR pFileName pointer to file in which to
355 * update resources
356 * BOOL bDeleteExistingResources deletion option
357 *
358 * Variables :
359 * Result : If the function succeeds, the return value is a handle that can
360 * be used by the UpdateResource and EndUpdateResource functions.
361 * The return value is NULL if the specified file is not an
362 * executable file, the executable file is already loaded,
363 * the file does not exist, or the file cannot be opened for writing.
364 * To get extended error information, call GetLastError
365 * Remark :
366 * Status : UNTESTED STUB
367 *
368 * Author : Markus Montkowski [Thu, 1998/05/19 11:46]
369 *****************************************************************************/
370
371HANDLE WIN32API BeginUpdateResourceA( LPCSTR pFileName,
372 BOOL bDeleteExistingResources)
373{
374
375 dprintf(("KERNEL32: BeginUpdateResource(%08x,%08x) not implemented\n",
376 pFileName, bDeleteExistingResources
377 ));
378
379 return (NULL);
380}
381
382/*****************************************************************************
383 * Name : HANDLE WIN32API BeginUpdateResourceW
384 * Purpose : The BeginUpdateResource function returns a handle that can be
385 * used by the UpdateResource function to add, delete, or replace
386 * resources in an executable file.
387 * Parameters: LPCWSTR pFileName pointer to file in which to
388 * update resources
389 * BOOL bDeleteExistingResources deletion option
390 *
391 * Variables :
392 * Result : If the function succeeds, the return value is a handle that can
393 * be used by the UpdateResource and EndUpdateResource functions.
394 * The return value is NULL if the specified file is not an
395 * executable file, the executable file is already loaded,
396 * the file does not exist, or the file cannot be opened for writing.
397 * To get extended error information, call GetLastError
398 * Remark :
399 * Status : UNTESTED STUB
400 *
401 * Author : Markus Montkowski [Thu, 1998/05/19 11:46]
402 *****************************************************************************/
403
404HANDLE WIN32API BeginUpdateResourceW( LPCWSTR pFileName,
405 BOOL bDeleteExistingResources)
406{
407
408 dprintf(("KERNEL32: BeginUpdateResource(%08x,%08x) not implemented\n",
409 pFileName, bDeleteExistingResources
410 ));
411
412 return (NULL);
413}
414
415/*****************************************************************************
416 * Name : BOOL WIN32API CancelIo
417 * Purpose : The CancelIO function cancels all pending input and output
418 * (I/O) operations that were issued by the calling thread for
419 * the specified file handle. The function does not cancel
420 * I/O operations issued for the file handle by other threads.
421 * Parameters: HANDLE hFile file handle for which to cancel I/O
422 * Variables :
423 * Result : If the function succeeds, the return value is nonzero All pending
424 * I/O operations issued by the calling thread for the file handle
425 * were successfully canceled.
426 * If the function fails, the return value is zero.
427 * To get extended error information, call GetLastError.
428 * Remark : If there are any I/O operations in progress for the specified
429 * file handle, and they were issued by the calling thread, the
430 * CancelIO function cancels them.
431 * Note that the I/O operations must have been issued as
432 * overlapped I/O. If they were not, the I/O operations would not
433 * have returned to allow the thread to call the CancelIO function.
434 * Calling the CancelIO function with a file handle that was not
435 * opened with FILE_FLAG_OVERLAPPED does nothing.
436 * All I/O operations that are canceled will complete with the
437 * error ERROR_OPERATION_ABORTED. All completion notifications
438 * for the I/O operations will occur normally.
439 * Status : UNTESTED STUB
440 *
441 * Author : Markus Montkowski [Thu, 1998/05/19 11:46]
442 *****************************************************************************/
443
444BOOL WIN32API CancelIo(HANDLE hFile)
445{
446
447 dprintf(("KERNEL32:CancelIo(%08x) not implemented\n",
448 hFile
449 ));
450
451 return (FALSE);
452}
453
454/*****************************************************************************
455 * Name : BOOL CancelWaitableTimer
456 * Purpose : The CancelWaitableTimer function sets the specified "waitable"
457 * timer to the inactive state.
458 * Parameters: HANDLE hTimer handle to a timer object
459 * Variables :
460 * Result : If the function succeeds, the return value is nonzero.
461 * If the function fails, the return value is zero.
462 * To get extended error information, call GetLastError.
463 * Remark : The CancelWaitableTimer function does not change the signaled
464 * state of the timer. It stops the timer before it can be set to
465 * the signaled state. Therefore, threads performing a wait
466 * operation on the timer remain waiting until they time out or
467 * the timer is reactivated and its state is set to signaled.
468 *
469 * To reactivate the timer, call the SetWaitableTimer function.
470 * Status : UNTESTED STUB
471 *
472 * Author : Markus Montkowski [Thu, 1998/05/19 11:46]
473 *****************************************************************************/
474
475BOOL WIN32API CancelWaitableTimer(HANDLE hTimer)
476{
477
478 dprintf(("KERNEL32:CancelWaitableTimer(%08x) not implemented\n",
479 hTimer
480 ));
481
482 return (FALSE);
483}
484
485
486/*****************************************************************************
487 * Name : LPVOID WIN32API CreateFiber
488 * Purpose : The CreateFiber function allocates a fiber object, assigns it a
489 * stack, and sets up execution to begin at the specified
490 * start address, typically the fiber function.
491 * This function does not schedule the fiber.
492 * Parameters: DWORD dwStackSize initial thread stack size, in bytes
493 * LPFIBER_START_ROUTINE lpStartAddress pointer to fiber function
494 * LPVOID lpParameter argument for new fiber
495 * Variables :
496 * Result : If the function succeeds, the return value is the address of
497 * the fiber.
498 * If the function fails, the return value is NULL.
499 * Remark : Before a thread can schedule a fiber using the SwitchToFiber
500 * function, it must call the ConvertThreadToFiber function so there
501 * is a fiber associated with the thread.
502 * The fiber function is of type FIBER_START_ROUTINE.
503 * It accepts a single value of type PVOID (fiber data) and does not
504 * return a value. The prototype for this function is as follows:
505 *
506 * VOID WINAPI FiberFunc( PVOID lpParameter );
507 *
508 * Status : UNTESTED STUB
509 *
510 * Author : Markus Montkowski [Tha, 1998/05/21 17:46]
511 *****************************************************************************/
512
513LPVOID WIN32API CreateFiber( DWORD dwStackSize,
514 LPFIBER_START_ROUTINE lpStartAddress,
515 LPVOID lpParameter)
516{
517
518 dprintf(("KERNEL32:CreateFiber(%08x,%08x,%08x) not implemented\n",
519 dwStackSize, lpStartAddress,lpParameter
520 ));
521
522 return (NULL);
523}
524
525
526/*****************************************************************************
527 * Name : HANDLE WIN32API CreateIoCompletionPort
528 * Purpose : The CreateIoCompletionPort function can associate an instance of
529 * an opened file with a newly created or an existing input/output
530 * completion port; or it can create an input/output completion port
531 * without associating it with a file.
532 * Associating an instance of an opened file with an input/output
533 * completion port lets an application receive notification of the
534 * completion of asynchronous input/output operations involving that
535 * file.
536 * Parameters: HANDLE FileHandle file handle to associate with I/O
537 * completion port. Must be created
538 * with flag FILE_FLAG_OVERLAPPED !
539 * HANDLE ExistingCompletionPort optional handle to existing
540 * I/O completion port
541 * DWORD CompletionKey per-file completion key for
542 * I/O completion packets
543 * DWORD NumberOfConcurrentThreads number of threads allowed to
544 * execute concurrently
545 * Variables :
546 * Result : If the function succeeds, the return value is the handle to the
547 * I/O completion port that is associated with the specified file.
548 * This return value is not NULL.
549 * If the function fails, the return value is NULL.
550 * Remark : The Win32 I/O system can be instructed to send I/O completion
551 * notification packets to input/output completion ports, where they
552 * are queued up. The CreateIoCompletionPort function provides a
553 * mechanism for this.
554 * When you perform an input/output operation with a file handle
555 * that has an associated input/output completion port, the
556 * I/O system sends a completion notification packet to the
557 * completion port when the I/O operation completes.
558 * The I/O completion port places the completion packet in a
559 * first-in-first-out queue.
560 * Use the GetQueuedCompletionStatus function to retrieve these
561 * queued I/O completion packets.
562 * Threads in the same process can use the PostQueuedCompletionStatus
563 * function to place I/O completion notification packets in a
564 * completion port's queue. This allows you to use the port to
565 * receive communications from other threads of the process,
566 * in addition to receiving I/O completion notification packets
567 * from the Win32 I/O system.
568 * Status : UNTESTED STUB
569 *
570 * Author : Markus Montkowski [Tha, 1998/05/21 17:46]
571 *****************************************************************************/
572
573HANDLE WIN32API CreateIoCompletionPort( HANDLE FileHandle,
574 HANDLE ExistingCompletionPort,
575 DWORD CompletionKey,
576 DWORD NumberOfConcurrentThreads)
577{
578
579 dprintf(("KERNEL32: CreateIoCompletionPort(%08x,%08x,%08x,%08x) not implemented\n",
580 FileHandle, ExistingCompletionPort, CompletionKey,
581 NumberOfConcurrentThreads
582 ));
583
584 return (NULL);
585}
586/*****************************************************************************
587 * Name : HANDLE WIN32API CreateMailslotA
588 * Purpose : The CreateMailslot function creates a mailslot with the specified
589 * name and returns a handle that a mailslot server can use to
590 * perform operations on the mailslot. The mailslot is local to the
591 * computer that creates it. An error occurs if a mailslot with
592 * the specified name already exists.
593 * Parameters: LPCSTR lpName pointer to string for mailslot name
594 * DWORD nMaxMessageSize maximum message size
595 * DWORD lReadTimeout milliseconds before read time-out
596 * LPSECURITY_ATTRIBUTES lpSecurityAttributes pointer to security structure
597 * Variables :
598 * Result : If the function succeeds, the return value is a handle to
599 * the mailslot, for use in server mailslot operations.
600 * If the function fails, the return value is INVALID_HANDLE_VALUE.
601 * Remark :
602 * Status : UNTESTED STUB
603 *
604 * Author : Markus Montkowski [Tha, 1998/05/21 17:46]
605 *****************************************************************************/
606
607HANDLE WIN32API CreateMailslotA(LPCSTR lpName, DWORD nMaxMessageSize,
608 DWORD lReadTimeout,
609 LPSECURITY_ATTRIBUTES lpSecurityAttributes)
610{
611
612 dprintf(("KERNEL32: CreateMailslotA(%08x,%08x,%08x,%08x) not implemented - INVALID_HANDLE_VALUE\n",
613 lpName, nMaxMessageSize, lReadTimeout, lpSecurityAttributes
614 ));
615
616 return (INVALID_HANDLE_VALUE);
617}
618
619/*****************************************************************************
620 * Name : HANDLE WIN32API CreateMailslotW
621 * Purpose : The CreateMailslot function creates a mailslot with the specified
622 * name and returns a handle that a mailslot server can use to
623 * perform operations on the mailslot. The mailslot is local to the
624 * computer that creates it. An error occurs if a mailslot with
625 * the specified name already exists.
626 * Parameters: LPCWSTR lpName pointer to string for mailslot name
627 * DWORD nMaxMessageSize maximum message size
628 * DWORD lReadTimeout milliseconds before read time-out
629 * LPSECURITY_ATTRIBUTES lpSecurityAttributes pointer to security
630 * structure
631 * Variables :
632 * Result : If the function succeeds, the return value is a handle to
633 * the mailslot, for use in server mailslot operations.
634 * If the function fails, the return value is INVALID_HANDLE_VALUE.
635 * Remark :
636 * Status : UNTESTED STUB
637 *
638 * Author : Markus Montkowski [Tha, 1998/05/21 17:46]
639 *****************************************************************************/
640
641HANDLE WIN32API CreateMailslotW(LPCWSTR lpName, DWORD nMaxMessageSize,
642 DWORD lReadTimeout,
643 LPSECURITY_ATTRIBUTES lpSecurityAttributes)
644{
645
646 dprintf(("KERNEL32: CreateMailslotW(%08x,%08x,%08x,%08x) not implemented - INVALID_HANDLE_VALUE\n",
647 lpName, nMaxMessageSize, lReadTimeout, lpSecurityAttributes
648 ));
649
650 return (INVALID_HANDLE_VALUE);
651}
652
653/*****************************************************************************
654 * Name : HANDLE WIN32API CreateRemoteThread
655 * Purpose : The CreateRemoteThread function creates a thread that runs in
656 * the address space of another process.
657 * Parameters: HANDLE hProcess handle to process to create thread in
658 * LPSECURITY_ATTRIBUTES lpThreadAttributes pointer to thread
659 * security attributes
660 * DWORD dwStackSize initial thread stack size, in bytes
661 * LPTHREAD_START_ROUTINE lpStartAddress pointer to thread function
662 * LPVOID lpParameter pointer to argument for new thread
663 * DWORD dwCreationFlags creation flags
664 * LPDWORD lpThreadId pointer to returned thread identifier
665 * Variables :
666 * Result : If the function succeeds, the return value is a handle to
667 * the new thread.
668 * If the function fails, the return value is NULL.
669 * Remark :
670 * Status : UNTESTED STUB
671 *
672 * Author : Markus Montkowski [Tha, 1998/05/21 17:46]
673 *****************************************************************************/
674
675HANDLE WIN32API CreateRemoteThread( HANDLE hProcess,
676 LPSECURITY_ATTRIBUTES lpThreadAttributes,
677 DWORD dwStackSize,
678 LPTHREAD_START_ROUTINE lpStartAddress,
679 LPVOID lpParameter,DWORD dwCreationFlags,
680 LPDWORD lpThreadId )
681{
682
683 dprintf(("KERNEL32: CreateRemoteThread(%08x,%08x,%08x,%08x,%08x,%08x,%08x) not implemented\n",
684 hProcess, lpThreadAttributes, dwStackSize, lpStartAddress,
685 lpParameter, dwCreationFlags, lpThreadId
686 ));
687
688 return (NULL);
689}
690/*****************************************************************************
691 * Name : DWORD WIN32API CreateTapePartition
692 * Purpose : The CreateTapePartition function reformats a tape.
693 * Parameters: HANDLE hDevice handle to open device
694 * DWORD dwPartitionMethode type of new partition
695 * DWORD dwCount number of new partitions to create
696 * DWORD dwSize size of new partition, in megabytes
697 * Variables :
698 * Result : If the function succeeds, the return value is NO_ERROR.
699 * If the function fails, it may return one of the following
700 * error codes:
701 * Error Description
702 * ERROR_BEGINNING_OF_MEDIA An attempt to access data before
703 * the beginning-of-medium marker failed.
704 * ERROR_BUS_RESET A reset condition was detected on the bus.
705 * ERROR_END_OF_MEDIA The end-of-tape marker was reached
706 * during an operation.
707 * ERROR_FILEMARK_DETECTED A filemark was reached during an operation.
708 * ERROR_SETMARK_DETECTED A setmark was reached during an operation.
709 * ERROR_NO_DATA_DETECTED The end-of-data marker was reached
710 * during an operation.
711 * ERROR_PARTITION_FAILURE The tape could not be partitioned.
712 * ERROR_INVALID_BLOCK_LENGTH The block size is incorrect on a
713 * new tape in a multivolume partition.
714 * ERROR_DEVICE_NOT_PARTITIONED The partition information could not
715 * be found when a tape was being loaded.
716 * ERROR_MEDIA_CHANGED The tape that was in the drive has
717 * been replaced or removed.
718 * ERROR_NO_MEDIA_IN_DRIVE There is no media in the drive.
719 * ERROR_NOT_SUPPORTED The tape driver does not support a
720 * requested function.
721 * ERROR_UNABLE_TO_LOCK_MEDIA An attempt to lock the ejection
722 * mechanism failed.
723 * ERROR_UNABLE_TO_UNLOAD_MEDIA An attempt to unload the tape failed.
724 * ERROR_WRITE_PROTECT The media is write protected.
725 * Remark : Creating partitions reformats the tape. All previous information
726 * recorded on the tape is destroyed.
727 * Errorcodes are defined in winerror.h
728 * Status : UNTESTED STUB
729 *
730 * Author : Markus Montkowski [Tha, 1998/05/21 17:46]
731 *****************************************************************************/
732
733DWORD WIN32API CreateTapePartition( HANDLE hDevice, DWORD dwPartitionMethod,
734 DWORD dwCount, DWORD dwSize)
735{
736
737 dprintf(("KERNEL32: CreateTapePartition(%08x,%08x,%08x,%08x) not implemented - ERROR_NOT_SUPPORTED\n",
738 hDevice, dwPartitionMethod, dwCount, dwSize
739 ));
740
741 return (ERROR_NOT_SUPPORTED);
742}
743/*****************************************************************************
744 * Name : HANDLE WIN23API CreateWaitableTimerA
745 * Purpose : The CreateWaitableTimerA function creates a "waitable" timer object.
746 * Parameters: LPSECURITY_ATTRIBUTES lpTimerAttributes pointer to security attributes
747 * BOOL bManualReset flag for manual reset state
748 * LPCTSTR lpTimerName pointer to timer object name
749 * Variables :
750 * Result : If the function succeeds, the return value is a handle to the
751 * timer object. If the named timer object exists before the
752 * function call, GetLastError returns ERROR_ALREADY_EXISTS.
753 * Otherwise, GetLastError returns zero.
754 * If the function fails, the return value is NULL
755 * Remark :
756 * Status : UNTESTED STUB
757 *
758 * Author : Markus Montkowski [Tha, 1998/05/21 17:46]
759 *****************************************************************************/
760
761HANDLE WIN32API CreateWaitableTimerA( LPSECURITY_ATTRIBUTES lpTimerAttributes,
762 BOOL bManualReset, LPCSTR lpTimerName)
763{
764
765 dprintf(("KERNEL32: CreateWaitableTimer(%08x,%08x,%08x) not implemented\n",
766 lpTimerAttributes, bManualReset, lpTimerName
767 ));
768
769 return (NULL);
770}
771
772/*****************************************************************************
773 * Name : HANDLE WIN23API CreateWaitableTimerW
774 * Purpose : The CreateWaitableTimerW function creates a "waitable" timer object.
775 * Parameters: LPSECURITY_ATTRIBUTES lpTimerAttributes pointer to security attributes
776 * BOOL bManualReset flag for manual reset state
777 * LPCTSTR lpTimerName pointer to timer object name
778 * Variables :
779 * Result : If the function succeeds, the return value is a handle to the
780 * timer object. If the named timer object exists before the
781 * function call, GetLastError returns ERROR_ALREADY_EXISTS.
782 * Otherwise, GetLastError returns zero.
783 * If the function fails, the return value is NULL
784 * Remark :
785 * Status : UNTESTED STUB
786 *
787 * Author : Markus Montkowski [Tha, 1998/05/21 17:46]
788 *****************************************************************************/
789
790HANDLE WIN32API CreateWaitableTimerW( LPSECURITY_ATTRIBUTES lpTimerAttributes,
791 BOOL bManualReset, LPCWSTR lpTimerName)
792{
793
794 dprintf(("KERNEL32: CreateWaitableTimer(%08x,%08x,%08x) not implemented\n",
795 lpTimerAttributes, bManualReset, lpTimerName
796 ));
797
798 return (NULL);
799}
800
801/*****************************************************************************
802 * Name : BOOL WIN32API DebugActiveProcess
803 * Purpose : The DebugActiveProcess function allows a debugger to attach to
804 * an active process and then debug it.
805 * Parameters: DWORD dwProcessId process to be debugged
806 * Variables :
807 * Result : If the function succeeds, the return value is nonzero.
808 * If the function fails, the return value is zero
809 * Remark :
810 * Status : UNTESTED STUB
811 *
812 * Author : Markus Montkowski [Tha, 1998/05/21 17:46]
813 *****************************************************************************/
814
815BOOL WIN32API DebugActiveProcess(DWORD dwProcessId)
816{
817
818 dprintf(("KERNEL32:DebugActiveProcess(%08x) not implemented\n",
819 dwProcessId
820 ));
821
822 return (FALSE);
823}
824
825/*****************************************************************************
826 * Name : BOOL WIN32API DefineDosDeviceA
827 * Purpose : The DefineDosDeviceA function lets an application define,
828 * redefine, or delete MS-DOS device names.
829 * MS-DOS device names are stored as symbolic links in the object
830 * name space in 32-bit versions of Windows. The code that converts
831 * an MS-DOS path into a corresponding path in 32-bit versions of
832 * Windows uses these symbolic links to map MS-DOS devices and drive
833 * letters. The DefineDosDevice function provides a mechanism
834 * whereby a Win32-based application can modify the symbolic links
835 * used to implement the MS-DOS device name space.
836 * Parameters: DWORD dwFlags flags specifying aspects of device definition
837 * LPCSTR lpDeviceName pointer to MS-DOS device name string
838 * LPCSTR lpTargetPath pointer to MS-DOS or path string for
839 * 32-bit Windows
840 * Variables :
841 * Result : If the function succeeds, the return value is nonzero.
842 * If the function fails, the return value is zero
843 * Remark :
844 * Status : UNTESTED STUB
845 *
846 * Author : Markus Montkowski [Tha, 1998/05/21 17:46]
847 *****************************************************************************/
848
849BOOL WIN32API DefineDosDeviceA( DWORD dwFlags, LPCSTR lpDeviceName,
850 LPCSTR lpTargetPath )
851{
852
853 dprintf(("KERNEL32: DefineDosDeviceA(%08x,%08x,%08x) not implemented\n",
854 dwFlags, lpDeviceName, lpTargetPath
855 ));
856
857 return (FALSE);
858}
859
860/*****************************************************************************
861 * Name : BOOL WIN32API DefineDosDeviceW
862 * Purpose : UNICODE version of DefineDosDeviceA
863 * Parameters: DWORD dwFlags flags specifying aspects of device definition
864 * LPCSTR lpDeviceName pointer to MS-DOS device name string
865 * LPCSTR lpTargetPath pointer to MS-DOS or path string for
866 * 32-bit Windows
867 * Variables :
868 * Result : If the function succeeds, the return value is nonzero.
869 * If the function fails, the return value is zero
870 * Remark :
871 * Status : UNTESTED STUB
872 *
873 * Author : Markus Montkowski [Tha, 1998/05/21 17:46]
874 *****************************************************************************/
875
876BOOL WIN32API DefineDosDeviceW( DWORD dwFlags, LPCWSTR lpDeviceName,
877 LPCWSTR lpTargetPath )
878{
879
880 dprintf(("KERNEL32: DefineDosDeviceW(%08x,%08x,%08x) not implemented\n",
881 dwFlags, lpDeviceName, lpTargetPath
882 ));
883
884 return (FALSE);
885}
886
887/*****************************************************************************
888 * Name : VOID WIN32API DeleteFiber
889 * Purpose : The DeleteFiber function deletes an existing fiber
890 * Parameters: LPVOID lpFiber pointer to the fiber to delete
891 * Variables :
892 * Result : No returnvalue
893 * Remark : The DeleteFiber function deletes all data associated with the
894 * fiber. This data includes the stack, a subset of the registers,
895 * and the fiber data. If the currently running fiber calls
896 * DeleteFiber, the ExitThread function is called and the thread
897 * terminates. If the currently running fiber is deleted by another
898 * thread, the thread associated with the fiber is likely to
899 * terminate abnormally because the fiber stack has been freed.
900 * Status : UNTESTED STUB
901 *
902 * Author : Markus Montkowski [Tha, 1998/05/21 17:46]
903 *****************************************************************************/
904
905VOID WIN32API DeleteFiber(LPVOID lpFiber)
906{
907
908 dprintf(("KERNEL32: DeleteFiber(%08x) not implemented\n",
909 lpFiber
910 ));
911}
912/*****************************************************************************
913 * Name : BOOL WIN3API EndUpdateResourceA
914 * Purpose : The EndUpdateResourceA function ends a resource update
915 * in an executable file.
916 * Parameters: HANDLE hUpdate update-file handle
917 * BOOL fDiscard write flag
918 * Variables :
919 * Result : If the function succeeds and the accumulated resource
920 * modifications specified by calls to the UpdateResource function
921 * are written to the specified executable file,
922 * the return value is nonzero.
923 * If the function fails, the return value is zero
924 * Remark :
925 * Status : UNTESTED STUB
926 *
927 * Author : Markus Montkowski [Tha, 1998/05/21 17:46]
928 *****************************************************************************/
929
930BOOL WIN32API EndUpdateResourceA(HANDLE hUpdate,BOOL fDiscard)
931{
932
933 dprintf(("KERNEL32:EndUpdateResourceA(%08x,%08x)not implemented\n",
934 hUpdate, fDiscard
935 ));
936
937 return (FALSE);
938}
939
940/*****************************************************************************
941 * Name : BOOL WIN3API EndUpdateResourceW
942 * Purpose : The EndUpdateResourceW function ends a resource update
943 * in an executable file.
944 * Parameters: HANDLE hUpdate update-file handle
945 * BOOL fDiscard write flag
946 * Variables :
947 * Result : If the function succeeds and the accumulated resource
948 * modifications specified by calls to the UpdateResource function
949 * are written to the specified executable file,
950 * the return value is nonzero.
951 * If the function fails, the return value is zero
952 * Remark :
953 * Status : UNTESTED STUB
954 *
955 * Author : Markus Montkowski [Tha, 1998/05/21 17:46]
956 *****************************************************************************/
957
958BOOL WIN32API EndUpdateResourceW(HANDLE hUpdate,BOOL fDiscard)
959{
960
961 dprintf(("KERNEL32:EndUpdateResourceW(%08x,%08x) not implemented\n",
962 hUpdate, fDiscard
963 ));
964
965 return (FALSE);
966}
967
968
969/*****************************************************************************
970 * Name : BOOL WIN32API EnumSystemCodePagesA
971 * Purpose : The EnumSystemCodePagesA function enumerates the code pages that
972 * are either installed on or supported by a system. The dwFlags
973 * parameter determines whether the function enumerates installed
974 * or supported code pages. The function enumerates the code pages
975 * by passing code page identifiers, one at a time, to the specified
976 * application-defined callback function. This continues until all
977 * of the installed or supported code page identifiers have been
978 * passed to the callback function, or the callback function
979 * returns FALSE
980 * Parameters: CODEPAGE_ENUMPROCA lpCodePageEnumProc pointer to enumeration
981 * callback function
982 * DWORD dwFlags indicates which code pages
983 * to enumerate
984 * Variables :
985 * Result : If the function succeeds, the return value is nonzero.
986 * If the function fails, the return value is zero
987 * Remark :
988 * Status : UNTESTED STUB
989 *
990 * Author : Markus Montkowski [Tha, 1998/05/21 17:46]
991 *****************************************************************************/
992
993BOOL WIN32API EnumSystemCodePagesA(CODEPAGE_ENUMPROCA lpCodePageEnumProc,
994 DWORD dwFlags)
995{
996
997 dprintf(("KERNEL32: EnumSystemCodePagesA(%08x,%08x) not implemented\n",
998 lpCodePageEnumProc, dwFlags
999 ));
1000
1001 return (FALSE);
1002}
1003
1004/*****************************************************************************
1005 * Name : BOOL WIN32API EnumSystemCodePagesW
1006 * Purpose : The EnumSystemCodePagesW function enumerates the code pages that
1007 * are either installed on or supported by a system. The dwFlags
1008 * parameter determines whether the function enumerates installed
1009 * or supported code pages. The function enumerates the code pages
1010 * by passing code page identifiers, one at a time, to the specified
1011 * application-defined callback function. This continues until all
1012 * of the installed or supported code page identifiers have been
1013 * passed to the callback function, or the callback function
1014 * returns FALSE
1015 * Parameters: CODEPAGE_ENUMPROCW lpCodePageEnumProc pointer to enumeration
1016 * callback function
1017 * DWORD dwFlags indicates which code pages
1018 * to enumerate
1019 * Variables :
1020 * Result : If the function succeeds, the return value is nonzero.
1021 * If the function fails, the return value is zero
1022 * Remark :
1023 * Status : UNTESTED STUB
1024 *
1025 * Author : Markus Montkowski [Tha, 1998/05/21 17:46]
1026 *****************************************************************************/
1027
1028BOOL WIN32API EnumSystemCodePagesW(CODEPAGE_ENUMPROCW lpCodePageEnumProc,
1029 DWORD dwFlags)
1030{
1031
1032 dprintf(("KERNEL32: EnumSystemCodePagesA(%08x,%08x) not implemented\n",
1033 lpCodePageEnumProc, dwFlags
1034 ));
1035
1036 return (FALSE);
1037}
1038
1039/*****************************************************************************
1040 * Name : DWORD WIN32API EraseTape
1041 * Purpose : The EraseTape function erases all or part of a tape.
1042 * Parameters: HANDLE hDevice handle to open device
1043 * DWORD dwEraseType type of erasure to perform
1044 * BOOL bImmediate return after erase operation begins
1045 * Variables :
1046 * Result : If the function succeeds, the return value is NO_ERROR.
1047 * If the function fails, the return value is like in
1048 * CreateTapePartition
1049 * Remark : Some tape devices do not support certain tape operations. To de
1050 * termine your tape device's capabilities, see your tape device
1051 * documentation and use the GetTapeParameters function
1052 * Status : UNTESTED STUB
1053 *
1054 * Author : Markus Montkowski [Tha, 1998/05/21 20:57]
1055 *****************************************************************************/
1056
1057DWORD WIN32API EraseTape( HANDLE hDevice, DWORD dwEraseType, BOOL bImmediate)
1058{
1059
1060 dprintf(("KERNEL32: EraseTape(%08x,%08x,%08x) not implemented - ERROR_NOT_SUPPORTED\n",
1061 hDevice, dwEraseType, bImmediate
1062 ));
1063
1064 return (ERROR_NOT_SUPPORTED);
1065}
1066
1067
1068/*****************************************************************************
1069 * Name : HANDLE WIN32API FindFirstFileExA
1070 * Purpose : The FindFirstFileExA function searches a directory for a file
1071 * whose name and attributes match those specified in the
1072 * function call.
1073 * Parameters: LPCSTR lpFileName pointer to the name of the file
1074 * to search for
1075 * FINDEX_INFO_LEVELS fInfoLevelId information level of the returned data
1076 * LPVOID lpFindFileData pointer to the returned information
1077 * FINDEX_SEARCH_OPS fSearchOp type of filtering to perform
1078 * LPVOID lpSearchFilter pointer to search criteria
1079 * DWORD dwAdditionalFlags additional search control flags
1080 * Variables :
1081 * Result : If the function succeeds, the return value is a search handle
1082 * that can be used in a subsequent call to the FindNextFile or
1083 * FindClose functions.
1084 * If the function fails, the return value is INVALID_HANDLE_VALUE
1085 * Remark :
1086 * Status : UNTESTED STUB
1087 *
1088 * Author : Markus Montkowski [Tha, 1998/05/21 20:57]
1089 *****************************************************************************/
1090
1091HANDLE WIN32API FindFirstFileExA( LPCSTR lpFileName,
1092 FINDEX_INFO_LEVELS fInfoLevelId,
1093 LPVOID lpFindFileData,
1094 FINDEX_SEARCH_OPS fSearchOp,
1095 LPVOID lpSearchFilter,
1096 DWORD dwAdditionalFlags)
1097{
1098
1099 dprintf(("KERNEL32: FindFirstFileExA(%08x,%08x,%08x,%08x,%08x,%08x)not implemented - INVALID_HANDLE_VALUE\n",
1100 lpFileName,
1101 fInfoLevelId,
1102 lpFindFileData,
1103 fSearchOp,
1104 lpSearchFilter,
1105 dwAdditionalFlags
1106 ));
1107
1108 return (INVALID_HANDLE_VALUE);
1109}
1110
1111/*****************************************************************************
1112 * Name : HANDLE WIN32API FindFirstFileExW
1113 * Purpose : The FindFirstFileExW function searches a directory for a file
1114 * whose name and attributes match those specified in the
1115 * function call.
1116 * Parameters: LPCWSTR lpFileName pointer to the name of the file
1117 * to search for
1118 * FINDEX_INFO_LEVELS fInfoLevelId information level of the returned data
1119 * LPVOID lpFindFileData pointer to the returned information
1120 * FINDEX_SEARCH_OPS fSearchOp type of filtering to perform
1121 * LPVOID lpSearchFilter pointer to search criteria
1122 * DWORD dwAdditionalFlags additional search control flags
1123 * Variables :
1124 * Result : If the function succeeds, the return value is a search handle
1125 * that can be used in a subsequent call to the FindNextFile or
1126 * FindClose functions.
1127 * If the function fails, the return value is INVALID_HANDLE_VALUE
1128 * Remark :
1129 * Status : UNTESTED STUB
1130 *
1131 * Author : Markus Montkowski [Tha, 1998/05/21 20:57]
1132 *****************************************************************************/
1133
1134HANDLE WIN32API FindFirstFileExW( LPCWSTR lpFileName,
1135 FINDEX_INFO_LEVELS fInfoLevelId,
1136 LPVOID lpFindFileData,
1137 FINDEX_SEARCH_OPS fSearchOp,
1138 LPVOID lpSearchFilter,
1139 DWORD dwAdditionalFlags)
1140{
1141
1142 dprintf(("KERNEL32: FindFirstFileExW(%08x,%08x,%08x,%08x,%08x,%08x)not implemented - INVALID_HANDLE_VALUE\n",
1143 lpFileName,
1144 fInfoLevelId,
1145 lpFindFileData,
1146 fSearchOp,
1147 lpSearchFilter,
1148 dwAdditionalFlags
1149 ));
1150
1151 return (INVALID_HANDLE_VALUE);
1152}
1153
1154/*****************************************************************************
1155 * Name : int WIN32API FoldStringA
1156 * Purpose : The FoldStringW function maps one string to another, performing
1157 * a specified transformation option.
1158 * Parameters: DWORD dwMapFlags, // mapping transformation options
1159 * LPCSTR lpSrcStr, // pointer to source string
1160 * int cchSrc, // size of source string, in bytes or characters
1161 * LPSTR lpDestStr, // pointer to destination buffer
1162 * int cchDest // size of destination buffer, in bytes or characters
1163 * Variables :
1164 * Result : If the function succeeds, the return value is the number of bytes
1165 * (ANSI version) or characters (Unicode version) written to the
1166 * destination buffer, or if the cchDest parameter is zero,
1167 * the number of bytes or characters required to hold the mapped
1168 * string.
1169 * If the function fails, the return value is zero
1170 * Remark :
1171 * Status : UNTESTED STUB
1172 *
1173 * Author : Markus Montkowski [Tha, 1998/05/21 20:57]
1174 *****************************************************************************/
1175
1176int WIN32API FoldStringA( DWORD dwMapFlags, LPCSTR lpSrcStr,
1177 int cchSrc, LPSTR lpDestStr, int cchDest)
1178{
1179
1180 dprintf(("KERNEL32: FoldStringA(%08x,%08x,%08x,%08x,%08x) not implemented\n",
1181 dwMapFlags, lpSrcStr, cchSrc, lpDestStr, cchDest
1182 ));
1183
1184 return (0);
1185}
1186
1187/*****************************************************************************
1188 * Name : int WIN32API FoldStringW
1189 * Purpose : The FoldStringW function maps one string to another, performing
1190 * a specified transformation option.
1191 * Parameters: DWORD dwMapFlags, // mapping transformation options
1192 * LPCSTR lpSrcStr, // pointer to source string
1193 * int cchSrc, // size of source string, in bytes or characters
1194 * LPSTR lpDestStr, // pointer to destination buffer
1195 * int cchDest // size of destination buffer, in bytes or characters
1196 * Variables :
1197 * Result : If the function succeeds, the return value is the number of bytes
1198 * (ANSI version) or characters (Unicode version) written to the
1199 * destination buffer, or if the cchDest parameter is zero,
1200 * the number of bytes or characters required to hold the mapped
1201 * string.
1202 * If the function fails, the return value is zero
1203 * Remark :
1204 * Status : UNTESTED STUB
1205 *
1206 * Author : Markus Montkowski [Tha, 1998/05/21 20:57]
1207 *****************************************************************************/
1208
1209int WIN32API FoldStringW( DWORD dwMapFlags, LPCWSTR lpSrcStr,
1210 int cchSrc, LPWSTR lpDestStr, int cchDest)
1211{
1212
1213 dprintf(("KERNEL32: FoldStringA(%08x,%08x,%08x,%08x,%08x) not implemented\n",
1214 dwMapFlags, lpSrcStr, cchSrc, lpDestStr, cchDest
1215 ));
1216
1217 return (0);
1218}
1219
1220
1221/*****************************************************************************
1222 * Name : VOID WIN32API FreeLibraryAndExitThread
1223 * Purpose : The FreeLibraryAndExitThread function decrements the reference
1224 * count of a loaded dynamic-link library (DLL) by one, and then
1225 * calls ExitThread to terminate the calling thread.
1226 * The function does not return.
1227 *
1228 * The FreeLibraryAndExitThread function gives threads that are
1229 * created and executed within a dynamic-link library an opportunity
1230 * to safely unload the DLL and terminate themselves.
1231 * Parameters:
1232 * Variables :
1233 * Result :
1234 * Remark :
1235 * Status : UNTESTED STUB
1236 *
1237 * Author : Markus Montkowski [Tha, 1998/05/21 20:57]
1238 *****************************************************************************/
1239
1240VOID WIN32API FreeLibraryAndExitThread( HMODULE hLibModule, DWORD dwExitCode)
1241{
1242
1243 dprintf(("KERNEL32: FreeLibraryAndExitThread(%08x,%08x) not implemented\n",
1244 hLibModule, dwExitCode
1245 ));
1246
1247}
1248
1249
1250/*****************************************************************************
1251 * Name : DWORD GetHandleInformation
1252 * Purpose : The GetHandleInformation function obtains information about certain
1253 * properties of an object handle. The information is obtained as a set of bit flags.
1254 * Parameters: HANDLE hObject
1255 * LPDWORD lpdwFlags
1256 * Variables :
1257 * Result : TRUE / FALSE
1258 * Remark :
1259 * Status : UNTESTED STUB
1260 *
1261 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1262 *****************************************************************************/
1263
1264BOOL WIN32API GetHandleInformation(HANDLE hObject,
1265 LPDWORD lpdwFlags)
1266{
1267 dprintf(("KERNEL32: GetHandleInformation (%08xh, %08xh) not implemented\n",
1268 hObject,
1269 lpdwFlags));
1270
1271 return (FALSE);
1272}
1273
1274
1275/*****************************************************************************
1276 * Name : BOOL GetMailslotInfo
1277 * Purpose : The GetMailslotInfo function retrieves information about the
1278 * specified mailslot.
1279 * Parameters: HANDLE hMailslot mailslot handle
1280 * LPDWORD lpMaxMessageSize address of maximum message size
1281 * LPDWORD lpNextSize address of size of next message
1282 * LPDWORD lpMessageCount address of number of messages
1283 * LPDWORD lpReadTimeout address of read time-out
1284 * Variables :
1285 * Result : TRUE / FALSE
1286 * Remark :
1287 * Status : UNTESTED STUB
1288 *
1289 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1290 *****************************************************************************/
1291
1292BOOL WIN32API GetMailslotInfo(HANDLE hMailslot,
1293 LPDWORD lpMaxMessageSize,
1294 LPDWORD lpNextSize,
1295 LPDWORD lpMessageCount,
1296 LPDWORD lpReadTimeout)
1297{
1298 dprintf(("KERNEL32: GetMailslotInfo(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented\n",
1299 hMailslot,
1300 lpMaxMessageSize,
1301 lpNextSize,
1302 lpMessageCount,
1303 lpReadTimeout));
1304
1305 return (FALSE);
1306}
1307
1308
1309
1310/*****************************************************************************
1311 * Name : BOOL GetQueuedCompletionStatus
1312 * Purpose : The GetQueuedCompletionStatus function attempts to dequeue an
1313 * I/O completion packet from a specified input/output completion
1314 * port. If there is no completion packet queued, the function waits
1315 * for a pending input/output operation associated with the completion
1316 * port to complete. The function returns when it can dequeue a
1317 * completion packet, or optionally when the function times out. If
1318 * the function returns because of an I/O operation completion, it
1319 * sets several variables that provide information about the operation.
1320 * Parameters: HANDLE CompletionPort the I/O completion port of interest
1321 * LPDWORD lpNumberOfBytesTransferred to receive number of bytes transferred during I/O
1322 * LPDWORD lpCompletionKey to receive file's completion key
1323 * LPOVERLAPPED * lpOverlapped to receive pointer to OVERLAPPED structure
1324 * DWORD dwMilliseconds optional timeout value
1325 * Variables :
1326 * Result : TRUE / FALSE
1327 * Remark :
1328 * Status : UNTESTED STUB
1329 *
1330 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1331 *****************************************************************************/
1332
1333BOOL WIN32API GetQueuedCompletionStatus(HANDLE CompletionPort,
1334 LPDWORD lpNumberOfBytesTransferred,
1335 LPDWORD lpCompletionKey,
1336 LPOVERLAPPED *lpOverlapped,
1337 DWORD dwMilliseconds)
1338{
1339 dprintf(("Kernel32: GetQueuedCompletionStatus(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.",
1340 CompletionPort,
1341 lpNumberOfBytesTransferred,
1342 lpCompletionKey,
1343 lpOverlapped,
1344 dwMilliseconds));
1345
1346 return (FALSE);
1347}
1348
1349
1350
1351/*****************************************************************************
1352 * Name : BOOL GetSystemTimeAdjustment
1353 * Purpose : The GetSystemTimeAdjustment function determines whether the system
1354 * is applying periodic time adjustments to its time-of-day clock
1355 * at each clock interrupt, along with the value and period of any
1356 * such adjustments. Note that the period of such adjustments is
1357 * equivalent to the time period between clock interrupts.
1358 * Parameters: PDWORD lpTimeAdjustment
1359 * size, in 100-nanosecond units, of a periodic time adjustment
1360 * PDWORD lpTimeIncrement
1361 * time, in 100-nanosecond units, between periodic time adjustments
1362 * PBOOL lpTimeAdjustmentDisabled
1363 * whether periodic time adjustment is disabled or enabled
1364 * Variables :
1365 * Result : TRUE / FALSE
1366 * Remark :
1367 * Status : UNTESTED STUB
1368 *
1369 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1370 *****************************************************************************/
1371
1372BOOL WIN32API GetSystemTimeAdjustment(PDWORD lpTimeAdjustment,
1373 PDWORD lpTimeIncrement,
1374 PBOOL lpTimeAdjustmentDisabled)
1375{
1376 dprintf(("KERNEL32: GetSystemTimeAdjustment(%08xh,%08xh,%08xh) not implemented.\n",
1377 lpTimeAdjustment,
1378 lpTimeIncrement,
1379 lpTimeAdjustmentDisabled));
1380
1381 return (FALSE);
1382}
1383
1384
1385/*****************************************************************************
1386 * Name : BOOL GetTapeParameters
1387 * Purpose : The GetTapeParameters function retrieves information that
1388 * describes the tape or the tape drive.
1389 * Parameters: HANDLE hDevice handle of open device
1390 * DWORD dwOperation type of information requested
1391 * LPDWORD lpdwSize address of returned information
1392 * LPVOID lpTapeInformation tape media or drive information
1393 * Variables :
1394 * Result : API returncode
1395 * Remark :
1396 * Status : UNTESTED STUB
1397 *
1398 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1399 *****************************************************************************/
1400
1401DWORD WIN32API GetTapeParameters(HANDLE hDevice,
1402 DWORD dwOperation,
1403 LPDWORD lpdwSize,
1404 LPVOID lpTapeInformation)
1405{
1406 dprintf(("KERNEL32: GetTapeParameters(%08xh,%08xh,%08xh,%08xh) not implemented - ERROR_NOT_SUPPORTED.\n",
1407 hDevice,
1408 dwOperation,
1409 lpdwSize,
1410 lpTapeInformation));
1411
1412 return (ERROR_NOT_SUPPORTED);
1413}
1414
1415
1416/*****************************************************************************
1417 * Name : BOOL GetTapePosition
1418 * Purpose : The GetTapePosition function retrieves the current address of
1419 * the tape, in logical or absolute blocks.
1420 * Parameters: HANDLE hDevice handle of open device
1421 * DWORD dwPositionType type of address to obtain
1422 * LPDWORD lpdwPartition address of current tape partition
1423 * LPDWORD lpdwOffsetLow address of low-order 32 bits of tape position
1424 * LPDWORD lpdwOffsetHigh address of high-order 32 bits of tape position
1425 * Variables :
1426 * Result : TRUE / FALSE
1427 * Remark :
1428 * Status : UNTESTED STUB
1429 *
1430 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1431 *****************************************************************************/
1432
1433DWORD WIN32API GetTapePosition(HANDLE hDevice,
1434 DWORD dwPositionType,
1435 LPDWORD lpdwPartition,
1436 LPDWORD lpdwOffsetLow,
1437 LPDWORD lpdwOffsetHigh)
1438{
1439 dprintf(("KERNEL32: OS2GetTapePosition(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented - ERROR_NOT_SUPPORTED.\n",
1440 hDevice,
1441 dwPositionType,
1442 lpdwPartition,
1443 lpdwOffsetLow,
1444 lpdwOffsetHigh));
1445
1446 return (ERROR_NOT_SUPPORTED);
1447}
1448
1449
1450/*****************************************************************************
1451 * Name : BOOL GetTapeStatus
1452 * Purpose : The GetTapeStatus function indicates whether the tape device is
1453 * ready to process tape commands.
1454 * Parameters: HANDLE hDevice handle of open device
1455 * Variables :
1456 * Result : API returncode
1457 * Remark :
1458 * Status : UNTESTED STUB
1459 *
1460 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1461 *****************************************************************************/
1462
1463DWORD WIN32API GetTapeStatus(HANDLE hDevice)
1464{
1465 dprintf(("KERNEL32: OS2GetTapeStatus(%08xh) not implemented - ERROR_NOT_SUPPORTED.\n",
1466 hDevice));
1467
1468 return (ERROR_NOT_SUPPORTED);
1469}
1470
1471
1472/*****************************************************************************
1473 * Name : BOOL GetThreadSelectorEntry
1474 * Purpose : The GetThreadSelectorEntry function retrieves a descriptor table
1475 * entry for the specified selector and thread.
1476 * Parameters: HANDLE hThread handle of thread that contains selector
1477 * DWORD dwSelector number of selector value to look up
1478 * LPLDT_ENTRY lpSelectorEntry address of selector entry structure
1479 * Variables :
1480 * Result : TRUE / FALSE
1481 * Remark :
1482 * Status : UNTESTED STUB
1483 *
1484 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1485 *****************************************************************************/
1486
1487BOOL WIN32API GetThreadSelectorEntry(HANDLE hThread,
1488 DWORD dwSelector,
1489 LPLDT_ENTRY lpSelectorEntry)
1490{
1491 dprintf(("KERNEL32: GetThreadSelectorEntry(%08xh,%08xh,%08xh) not implemented.\n",
1492 hThread,
1493 dwSelector,
1494 lpSelectorEntry));
1495
1496 return (FALSE);
1497}
1498
1499
1500/*****************************************************************************
1501 * Name : BOOL GetThreadTimes
1502 * Purpose : The GetThreadTimes function obtains timing information about a specified thread.
1503 * Parameters: HANDLE hThread specifies the thread of interest
1504 * LPFILETIME lpCreationTime when the thread was created
1505 * LPFILETIME lpExitTime when the thread exited
1506 * LPFILETIME lpKernelTime time the thread has spent in kernel mode
1507 * LPFILETIME lpUserTime time the thread has spent in user mode
1508 * Variables :
1509 * Result : TRUE / FALSE
1510 * Remark :
1511 * Status : UNTESTED STUB
1512 *
1513 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1514 *****************************************************************************/
1515
1516BOOL WIN32API GetThreadTimes(HANDLE hThread,
1517 LPFILETIME lpCreationTime,
1518 LPFILETIME lpExitTime,
1519 LPFILETIME lpKernelTime,
1520 LPFILETIME lpUserTime)
1521{
1522 dprintf(("Kernel32: GetThreadTimes(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
1523 hThread,
1524 lpCreationTime,
1525 lpExitTime,
1526 lpKernelTime,
1527 lpUserTime));
1528
1529 return (FALSE);
1530}
1531
1532
1533
1534/*****************************************************************************
1535 * Name : BOOL PostQueuedCompletionStatus
1536 * Purpose : The PostQueuedCompletionStatus function lets you post an I/O
1537 * completion packet to an I/O completion port. The I/O completion
1538 * packet will satisfy an outstanding call to the GetQueuedCompletionStatus
1539 * function. The GetQueuedCompletionStatus function returns with the three
1540 * values passed as the second, third, and fourth parameters of the call
1541 * to PostQueuedCompletionStatus.
1542 * Parameters: HANDLE CompletionPort handle to an I/O completion port
1543 * DWORD dwNumberOfBytesTransferred
1544 * DWORD dwCompletionKey
1545 * LPOVERLAPPED lpOverlapped
1546 * Variables :
1547 * Result : TRUE / FALSE
1548 * Remark :
1549 * Status : UNTESTED STUB
1550 *
1551 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1552 *****************************************************************************/
1553
1554BOOL WIN32API PostQueuedCompletionStatus(HANDLE CompletionPort,
1555 DWORD dwNumberOfBytesTransferred,
1556 DWORD dwCompletionKey,
1557 LPOVERLAPPED lpOverlapped)
1558{
1559 dprintf(("Kernel32: PostQueuedCompletionStatus(%08xh,%08xh,%08xh,%08xh) not implemented.",
1560 CompletionPort,
1561 dwNumberOfBytesTransferred,
1562 dwCompletionKey,
1563 lpOverlapped));
1564
1565 return (FALSE);
1566}
1567
1568
1569/*****************************************************************************
1570 * Name : DWORD PrepareTape
1571 * Purpose : The PrepareTape function prepares the tape to be accessed or removed.
1572 * Parameters: HANDLE hDevice handle of open device
1573 * DWORD dwOperation preparation method
1574 * BOOL bImmediate return after operation begins
1575 * Variables :
1576 * Result : API returncode
1577 * Remark :
1578 * Status : UNTESTED STUB
1579 *
1580 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1581 *****************************************************************************/
1582
1583DWORD WIN32API PrepareTape(HANDLE hDevice,
1584 DWORD dwOperation,
1585 BOOL bImmediate)
1586{
1587 dprintf(("Kernel32: PrepareTape(%08xh,%08xh,%08xh) not implemented - ERROR_NOT_SUPPORTED.\n",
1588 hDevice,
1589 dwOperation,
1590 bImmediate));
1591
1592 return (ERROR_NOT_SUPPORTED);
1593}
1594
1595
1596/*****************************************************************************
1597 * Name : DWORD QueryDosDeviceA
1598 * Purpose : The QueryDosDevice function lets an application obtain information
1599 * about MS-DOS device names. The function can obtain the current
1600 * mapping for a particular MS-DOS device name. The function can also
1601 * obtain a list of all existing MS-DOS device names.
1602 * MS-DOS device names are stored as symbolic links in the Windows NT
1603 * object name space. The code that converts an MS-DOS path into a
1604 * corresponding Windows NT path uses these symbolic links to map
1605 * MS-DOS devices and drive letters. The QueryDosDevice function
1606 * provides a mechanism whereby a Win32-based application can query
1607 * the names of the symbolic links used to implement the MS-DOS device
1608 * namespace as well as the value of each specific symbolic link.
1609 * Parameters: LPCTSTR lpDeviceName address of MS-DOS device name string
1610 * LPTSTR lpTargetPath ddress of buffer for storing query results
1611 * DWORD ucchMax maximum storage capacity of buffer
1612 * Variables :
1613 * Result : pointer to lpTargetPath
1614 * Remark :
1615 * Status : UNTESTED STUB
1616 *
1617 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1618 *****************************************************************************/
1619
1620DWORD WIN32API QueryDosDeviceA(LPCTSTR lpDeviceName,
1621 LPTSTR lpTargetPath,
1622 DWORD ucchMax)
1623{
1624 dprintf(("Kernel32: QueryDosDeviceA(%s,%08xh,%08xh) not implemented.\n",
1625 lpDeviceName,
1626 lpTargetPath,
1627 ucchMax));
1628
1629 return (0);
1630}
1631
1632
1633/*****************************************************************************
1634 * Name : DWORD QueryDosDeviceW
1635 * Purpose : The QueryDosDevice function lets an application obtain information
1636 * about MS-DOS device names. The function can obtain the current
1637 * mapping for a particular MS-DOS device name. The function can also
1638 * obtain a list of all existing MS-DOS device names.
1639 * MS-DOS device names are stored as symbolic links in the Windows NT
1640 * object name space. The code that converts an MS-DOS path into a
1641 * corresponding Windows NT path uses these symbolic links to map
1642 * MS-DOS devices and drive letters. The QueryDosDevice function
1643 * provides a mechanism whereby a Win32-based application can query
1644 * the names of the symbolic links used to implement the MS-DOS device
1645 * namespace as well as the value of each specific symbolic link.
1646 * Parameters: LPCTSTR lpDeviceName address of MS-DOS device name string
1647 * LPTSTR lpTargetPath ddress of buffer for storing query results
1648 * DWORD ucchMax maximum storage capacity of buffer
1649 * Variables :
1650 * Result : pointer to lpTargetPath
1651 * Remark :
1652 * Status : UNTESTED STUB
1653 *
1654 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1655 *****************************************************************************/
1656
1657DWORD WIN32API QueryDosDeviceW(LPCWSTR lpDeviceName,
1658 LPWSTR lpTargetPath,
1659 DWORD ucchMax)
1660{
1661 dprintf(("Kernel32: QueryDosDeviceW(%s,%08xh,%08xh) not implemented.\n",
1662 lpDeviceName,
1663 lpTargetPath,
1664 ucchMax));
1665
1666 return (0);
1667}
1668
1669
1670/*****************************************************************************
1671 * Name : DWORD ReadProcessMemory
1672 * Purpose : The ReadProcessMemory function reads memory in a specified process.
1673 * The entire area to be read must be accessible, or the operation fails.
1674 * Parameters: HANDLE hProcess handle of the process whose memory is read
1675 * LPCVOID lpBaseAddress address to start reading
1676 * LPVOID lpBuffer address of buffer to place read data
1677 * DWORD cbRead number of bytes to read
1678 * LPDWORD lpNumberOfBytesRead address of number of bytes read
1679 * Variables :
1680 * Result : TRUE / FALSE
1681 * Remark :
1682 * Status : UNTESTED STUB
1683 *
1684 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1685 *****************************************************************************/
1686
1687DWORD WIN32API ReadProcessMemory(HANDLE hProcess,
1688 LPCVOID lpBaseAddress,
1689 LPVOID lpBuffer,
1690 DWORD cbRead,
1691 LPDWORD lpNumberOfBytesRead)
1692{
1693 dprintf(("Kernel32: ReadProcessMemory(%08xh,%08xh,%08xh,%08xh,%08xh) not completely implemented",
1694 hProcess,
1695 lpBaseAddress,
1696 lpBuffer,
1697 cbRead,
1698 lpNumberOfBytesRead));
1699
1700 // do some (faked) access check
1701 if(hProcess != GetCurrentProcess())
1702 {
1703 dprintf(("WARNING: ReadProcessMemory: can't read memory from other processes!"));
1704 SetLastError(ERROR_ACCESS_DENIED);
1705 return FALSE;
1706 }
1707
1708 if(IsBadReadPtr(lpBaseAddress, cbRead)) {
1709 dprintf(("ERROR: ReadProcessMemory bad source pointer!"));
1710 if(lpNumberOfBytesRead)
1711 *lpNumberOfBytesRead = 0;
1712 SetLastError(ERROR_ACCESS_DENIED);
1713 return FALSE;
1714 }
1715 // FIXME: check this, if we ever run win32 binaries in different addressspaces
1716 // ... and add a sizecheck
1717 memcpy(lpBuffer,lpBaseAddress,cbRead);
1718 if(lpNumberOfBytesRead)
1719 *lpNumberOfBytesRead = cbRead;
1720
1721 SetLastError(ERROR_SUCCESS);
1722 return TRUE;
1723}
1724
1725/*****************************************************************************
1726 * Name : DWORD WriteProcessMemory
1727 * Purpose : The WriteProcessMemory function writes memory in a specified
1728 * process. The entire area to be written to must be accessible,
1729 * or the operation fails.
1730 * Parameters: HANDLE hProcess handle of process whose memory is written to
1731 * LPVOID lpBaseAddress address to start writing to
1732 * LPVOID lpBuffer address of buffer to write data to
1733 * DWORD cbWrite number of bytes to write
1734 * LPDWORD lpNumberOfBytesWritten actual number of bytes written
1735 * Variables :
1736 * Result : TRUE / FALSE
1737 * Remark :
1738 * Status : UNTESTED STUB
1739 *
1740 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1741 *****************************************************************************/
1742
1743BOOL WIN32API WriteProcessMemory(HANDLE hProcess,
1744 LPCVOID lpBaseAddress,
1745 LPVOID lpBuffer,
1746 DWORD cbWrite,
1747 LPDWORD lpNumberOfBytesWritten)
1748{
1749 // do some (faked) access check
1750 if(hProcess != GetCurrentProcess())
1751 {
1752 dprintf(("Kernel32: WriteProcessMemory(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented (different process!!)",
1753 hProcess, lpBaseAddress, lpBuffer, cbWrite, lpNumberOfBytesWritten));
1754 SetLastError(ERROR_ACCESS_DENIED);
1755 return FALSE;
1756 }
1757 dprintf(("Kernel32: WriteProcessMemory(%08xh,%08xh,%08xh,%08xh,%08xh))",
1758 hProcess,lpBaseAddress, lpBuffer, cbWrite, lpNumberOfBytesWritten));
1759
1760 if(IsBadWritePtr((LPVOID)lpBaseAddress, cbWrite))
1761 {
1762 dprintf(("ERROR: WriteProcessMemory bad destination pointer!"));
1763 if(lpNumberOfBytesWritten)
1764 *lpNumberOfBytesWritten = 0;
1765 SetLastError(ERROR_ACCESS_DENIED);
1766 return FALSE;
1767 }
1768
1769 // FIXME: check this, if we ever run win32 binaries in different addressspaces
1770 // ... and add a sizecheck
1771 memcpy((void*)lpBaseAddress,lpBuffer,cbWrite);
1772 if(lpNumberOfBytesWritten)
1773 *lpNumberOfBytesWritten = cbWrite;
1774
1775 SetLastError(ERROR_SUCCESS);
1776 return TRUE;
1777}
1778
1779
1780/*****************************************************************************
1781 * Name : BOOL SetComputerNameA
1782 * Purpose : The SetComputerNameA function sets the computer name to be used
1783 * the next time the system is restarted.
1784 * Parameters: LPCTSTR lpszName address of new computer name
1785 * Variables :
1786 * Result : TRUE / FALSE
1787 * Remark :
1788 * Status : UNTESTED STUB
1789 *
1790 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1791 *****************************************************************************/
1792
1793BOOL WIN32API SetComputerNameA(LPCTSTR lpszName)
1794{
1795 dprintf(("Kernel32: SetComputerNameA(%s) not implemented.\n",
1796 lpszName));
1797
1798 return (FALSE);
1799}
1800
1801
1802/*****************************************************************************
1803 * Name : BOOL SetComputerNameW
1804 * Purpose : The SetComputerNameW function sets the computer name to be used
1805 * the next time the system is restarted.
1806 * Parameters: LPCTSTR lpszName address of new computer name
1807 * Variables :
1808 * Result : TRUE / FALSE
1809 * Remark :
1810 * Status : UNTESTED STUB
1811 *
1812 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1813 *****************************************************************************/
1814
1815BOOL WIN32API SetComputerNameW(LPCWSTR lpszName)
1816{
1817 dprintf(("Kernel32: SetComputerNameW(%s) not implemented.\n",
1818 lpszName));
1819
1820 return (FALSE);
1821}
1822
1823
1824/*****************************************************************************
1825 * Name : VOID SetFileApisToOEM
1826 * Purpose : The SetFileApisToOEM function causes a set of Win32 file functions
1827 * to use the OEM character set code page. This function is useful
1828 * for 8-bit console input and output operations.
1829 * Parameters: VOID
1830 * Variables :
1831 * Result :
1832 * Remark :
1833 * Status : UNTESTED STUB
1834 *
1835 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1836 *****************************************************************************/
1837
1838VOID WIN32API SetFileApisToOEM(VOID)
1839{
1840 dprintf(("Kernel32: SetFileApisToOEM() not implemented.\n"));
1841}
1842
1843
1844/*****************************************************************************
1845 * Name : BOOL SetHandleInformation
1846 * Purpose : The SetHandleInformation function sets certain properties of an
1847 * object handle. The information is specified as a set of bit flags.
1848 * Parameters: HANDLE hObject handle to an object
1849 * DWORD dwMask specifies flags to change
1850 * DWORD dwFlags specifies new values for flags
1851 * Variables :
1852 * Result : TRUE / FALSE
1853 * Remark :
1854 * Status : UNTESTED STUB
1855 *
1856 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1857 *****************************************************************************/
1858
1859BOOL WIN32API SetHandleInformation(HANDLE hObject,
1860 DWORD dwMask,
1861 DWORD dwFlags)
1862{
1863 dprintf(("KERNEL32: SetHandleInformation(%08xh,%08xh,%08xh) not implemented.\n",
1864 hObject,
1865 dwMask,
1866 dwFlags));
1867
1868 return (FALSE);
1869}
1870
1871
1872/*****************************************************************************
1873 * Name : BOOL SetMailslotInfo
1874 * Purpose : The SetMailslotInfo function sets the time-out value used by the
1875 * specified mailslot for a read operation.
1876 * Parameters: HANDLE hObject handle to a mailslot object
1877 * DWORD dwReadTimeout read time-out
1878 * Variables :
1879 * Result : TRUE / FALSE
1880 * Remark :
1881 * Status : UNTESTED STUB
1882 *
1883 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1884 *****************************************************************************/
1885
1886BOOL WIN32API SetMailslotInfo(HANDLE hObject,
1887 DWORD dwReadTimeout)
1888{
1889 dprintf(("KERNEL32: SetMailslotInfo(%08xh,%08xh) not implemented.\n",
1890 hObject,
1891 dwReadTimeout));
1892
1893 return (FALSE);
1894}
1895
1896
1897/*****************************************************************************
1898 * Name : BOOL SetSystemPowerState
1899 * Purpose : The SetSystemPowerState function suspends the system by shutting
1900 * power down. Depending on the ForceFlag parameter, the function
1901 * either suspends operation immediately or requests permission from
1902 * all applications and device drivers before doing so.
1903 * Parameters: BOOL fSuspend
1904 * BOOL fForce
1905 * Variables :
1906 * Result : TRUE / FALSE
1907 * Remark :
1908 * Status : UNTESTED STUB
1909 *
1910 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1911 *****************************************************************************/
1912
1913BOOL WIN32API SetSystemPowerState(BOOL fSuspend,
1914 BOOL fForce)
1915{
1916 dprintf(("KERNEL32: SetSystemPowerState(%08xh,%08xh) not implemented.\n",
1917 fSuspend,
1918 fForce));
1919
1920 return (FALSE);
1921}
1922
1923
1924/*****************************************************************************
1925 * Name : BOOL SetSystemTimeAdjustment
1926 * Purpose : The SetSystemTimeAdjustment function tells the system to enable
1927 * or disable periodic time adjustments to its time of day clock.
1928 * Such time adjustments are used to synchronize the time of day
1929 * with some other source of time information. When periodic time
1930 * adjustments are enabled, they are applied at each clock interrupt.
1931 * Parameters: DWORD dwTimeAdjustment
1932 * BOOL bTimeAdjustmentDisabled
1933 * Variables :
1934 * Result : TRUE / FALSE
1935 * Remark :
1936 * Status : UNTESTED STUB
1937 *
1938 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1939 *****************************************************************************/
1940
1941BOOL WIN32API SetSystemTimeAdjustment(DWORD dwTimeAdjustment,
1942 BOOL bTimeAdjustmentDisabled)
1943{
1944 dprintf(("KERNEL32: SetSystemTimeAdjustment(%08xh,%08xh) not implemented.\n",
1945 dwTimeAdjustment,
1946 bTimeAdjustmentDisabled));
1947
1948 return (FALSE);
1949}
1950
1951
1952/*****************************************************************************
1953 * Name : DWORD SetTapeParameters
1954 * Purpose : The SetTapeParameters function either specifies the block size
1955 * of a tape or configures the tape device.
1956 * Parameters: HANDLE hDevice handle of open device
1957 * DWORD dwOperation type of information to set
1958 * LPVOID lpTapeInformation address of buffer with information to set
1959 * Variables :
1960 * Result : API returncode
1961 * Remark :
1962 * Status : UNTESTED STUB
1963 *
1964 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1965 *****************************************************************************/
1966
1967BOOL WIN32API SetTapeParameters(HANDLE hDevice,
1968 DWORD dwOperation,
1969 LPVOID lpTapeInformation)
1970{
1971 dprintf(("KERNEL32: SetTapeParameters(%08xh,%08xh,%08xh) not implemented - ERROR_NOT_SUPPORTED.\n",
1972 hDevice,
1973 dwOperation,
1974 lpTapeInformation));
1975
1976 return (ERROR_NOT_SUPPORTED);
1977}
1978
1979
1980/*****************************************************************************
1981 * Name : DWORD SetTapePosition
1982 * Purpose : The SetTapePosition sets the tape position on the specified device.
1983 * Parameters: HANDLE hDevice handle of open device
1984 * DWORD dwPositionMethod type of positioning to perform
1985 * DWORD dwPartition new tape partition
1986 * DWORD dwOffsetLow low-order 32 bits of tape position
1987 * DWORD dwOffsetHigh high-order 32 bits of tape position
1988 * BOOL bImmediate return after operation begins
1989 * Variables :
1990 * Result : API returncode
1991 * Remark :
1992 * Status : UNTESTED STUB
1993 *
1994 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
1995 *****************************************************************************/
1996
1997BOOL WIN32API SetTapePosition(HANDLE hDevice,
1998 DWORD dwPositionMethod,
1999 DWORD dwPartition,
2000 DWORD dwOffsetLow,
2001 DWORD dwOffsetHigh,
2002 BOOL bImmediate)
2003{
2004 dprintf(("KERNEL32: SetTapePosition(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented - ERROR_NOT_SUPPORTED.\n",
2005 hDevice,
2006 dwPositionMethod,
2007 dwPartition,
2008 dwOffsetLow,
2009 dwOffsetHigh,
2010 bImmediate));
2011
2012 return (ERROR_NOT_SUPPORTED);
2013}
2014
2015
2016/*****************************************************************************
2017 * Name : DWORD SetThreadAffinityMask
2018 * Purpose : The SetThreadAffinityMask function sets a processor affinity
2019 * mask for a specified thread.
2020 * A thread affinity mask is a bit vector in which each bit
2021 * represents the processors that a thread is allowed to run on.
2022 * A thread affinity mask must be a proper subset of the process
2023 * affinity mask for the containing process of a thread. A thread
2024 * is only allowed to run on the processors its process is allowed to run on.
2025 * Parameters: HANDLE hThread handle to the thread of interest
2026 * DWORD dwThreadAffinityMask a thread affinity mask
2027 * Variables :
2028 * Result : TRUE / FALSE
2029 * Remark :
2030 * Status : UNTESTED STUB
2031 *
2032 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2033 *****************************************************************************/
2034
2035DWORD WIN32API SetThreadAffinityMask(HANDLE hThread,
2036 DWORD dwThreadAffinityMask)
2037{
2038 dprintf(("KERNEL32: SetThreadAffinityMask(%08xh,%08xh) not implemented.\n",
2039 hThread,
2040 dwThreadAffinityMask));
2041
2042 return (0);
2043}
2044
2045
2046
2047/*****************************************************************************
2048 * Name : BOOL UpdateResourceA
2049 * Purpose : The UpdateResourceA function adds, deletes, or replaces a resource
2050 * in an executable file.
2051 * Parameters: HANDLE hUpdateFile update-file handle
2052 * LPCTSTR lpszType address of resource type to update
2053 * LPCTSTR lpszName address of resource name to update
2054 * WORD IDLanguage language identifier of resource
2055 * LPVOID lpvData address of resource data
2056 * DWORD cbData length of resource data, in bytes
2057 * Variables :
2058 * Result : TRUE / FALSE
2059 * Remark :
2060 * Status : UNTESTED STUB
2061 *
2062 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2063 *****************************************************************************/
2064
2065BOOL WIN32API UpdateResourceA(HANDLE hUpdateFile,
2066 LPCTSTR lpszType,
2067 LPCTSTR lpszName,
2068 WORD IDLanguage,
2069 LPVOID lpvData,
2070 DWORD cbData)
2071{
2072 dprintf(("KERNEL32: UpdateResourceA(%08xh,%s,%s,%08xh,%08xh,%08xh) not implemented.\n",
2073 hUpdateFile,
2074 lpszType,
2075 lpszName,
2076 IDLanguage,
2077 lpvData,
2078 cbData));
2079
2080 return (FALSE);
2081}
2082
2083
2084/*****************************************************************************
2085 * Name : BOOL UpdateResourceW
2086 * Purpose : The UpdateResourceW function adds, deletes, or replaces a resource
2087 * in an executable file.
2088 * Parameters: HANDLE hUpdateFile update-file handle
2089 * LPCTSTR lpszType address of resource type to update
2090 * LPCTSTR lpszName address of resource name to update
2091 * WORD IDLanguage language identifier of resource
2092 * LPVOID lpvData address of resource data
2093 * DWORD cbData length of resource data, in bytes
2094 * Variables :
2095 * Result : TRUE / FALSE
2096 * Remark :
2097 * Status : UNTESTED STUB
2098 *
2099 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2100 *****************************************************************************/
2101
2102BOOL WIN32API UpdateResourceW(HANDLE hUpdateFile,
2103 LPCWSTR lpszType,
2104 LPCWSTR lpszName,
2105 WORD IDLanguage,
2106 LPVOID lpvData,
2107 DWORD cbData)
2108{
2109 dprintf(("KERNEL32: UpdateResourceW(%08xh,%s,%s,%08xh,%08xh,%08xh) not implemented.\n",
2110 hUpdateFile,
2111 lpszType,
2112 lpszName,
2113 IDLanguage,
2114 lpvData,
2115 cbData));
2116
2117 return (FALSE);
2118}
2119
2120/*****************************************************************************
2121 * Name : BOOL WriteTapemark
2122 * Purpose : The WriteTapemark function writes a specified number of filemarks,
2123 * setmarks, short filemarks, or long filemarks to a tape device.
2124 * These tapemarks divide a tape partition into smaller areas.
2125 * Parameters: HANDLE hDevice handle of open device
2126 * DWORD dwTapemarkType type of tapemarks to write
2127 * DWORD dwTapemarkCount number of tapemarks to write
2128 * BOOL bImmediate return after write begins
2129 * Variables :
2130 * Result : API returncode
2131 * Remark :
2132 * Status : UNTESTED STUB
2133 *
2134 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
2135 *****************************************************************************/
2136
2137DWORD WIN32API WriteTapemark(HANDLE hDevice,
2138 DWORD dwTapemarkType,
2139 DWORD dwTapemarkCount,
2140 BOOL bImmediate)
2141{
2142 dprintf(("KERNEL32: WriteTapemark(%08xh,%08xh,%08xh,%08xh) not implemented - ERROR_NOT_SUPPORTED.\n",
2143 hDevice,
2144 dwTapemarkType,
2145 dwTapemarkCount,
2146 bImmediate));
2147
2148 return (ERROR_NOT_SUPPORTED);
2149}
2150
2151
2152/*****************************************************************************
2153 * Name : DWORD CmdBatNotification
2154 * Purpose : Unknown, used by /winnt/cmd.exe
2155 * Parameters: Unknown (wrong)
2156 * Variables :
2157 * Result : Unknown
2158 * Remark :
2159 * Status : UNTESTED STUB
2160 *
2161 * Author : Patrick Haller [Tue, 1999/06/08 21:44]
2162 *****************************************************************************/
2163
2164DWORD WIN32API CmdBatNotification(DWORD x1)
2165{
2166 dprintf(("KERNEL32: CmdBatNotification(%08xh) not implemented\n",
2167 x1));
2168
2169 return (0);
2170}
2171
2172
2173/*****************************************************************************
2174 * Name : DWORD GetVDMCurrentDirectories
2175 * Purpose : Unknown, used by /winnt/cmd.exe
2176 * Parameters: Unknown (wrong)
2177 * Variables :
2178 * Result : Unknown
2179 * Remark :
2180 * Status : UNTESTED STUB
2181 *
2182 * Author : Patrick Haller [Tue, 1999/06/08 21:44]
2183 *****************************************************************************/
2184
2185DWORD WIN32API GetVDMCurrentDirectories(DWORD x1)
2186{
2187 dprintf(("KERNEL32: GetVDMCurrentDirectories(%08xh) not implemented\n",
2188 x1));
2189
2190 return (0);
2191}
2192
2193
2194/*****************************************************************************
2195 * Name : DWORD SetThreadPriorityBoost
2196 * Purpose : Unknown
2197 * Parameters: Unknown (wrong)
2198 * Variables :
2199 * Result : Unknown
2200 * Remark :
2201 * Status : UNTESTED STUB
2202 *
2203 * Author : Patrick Haller [Tue, 1999/06/08 21:44]
2204 *****************************************************************************/
2205
2206DWORD WIN32API SetThreadPriorityBoost(DWORD x1,
2207 DWORD x2)
2208{
2209 dprintf(("KERNEL32: SetThreadPriorityBoost(%08xh, %08xh) not implemented\n",
2210 x1,
2211 x2));
2212
2213 return (0);
2214}
2215
2216/*****************************************************************************
2217 * Name : ???
2218 * Purpose : Unknown (used by explorer.exe)
2219 * Parameters: Unknown (wrong)
2220 * Variables :
2221 * Result : Unknown
2222 * Remark :
2223 * Status : UNTESTED STUB
2224 *
2225 * Author : Christoph Bratschi [Wed, 2000/03/29 19:47]
2226 *****************************************************************************/
2227
2228VOID WIN32API KERNEL32_99(DWORD x)
2229{
2230 dprintf(("KERNEL32: Unknown API KERNEL32.99\n"));
2231}
2232
2233
Note: See TracBrowser for help on using the repository browser.