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

Last change on this file since 7480 was 7480, checked in by phaller, 24 years ago

Split stubs.cpp into dosdevice.cpp

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