source: trunk/src/win32k/kKrnlLib/include/OS2KIO.h

Last change on this file was 6815, checked in by bird, 24 years ago

Updated to work for kKrnlLib.DLL and internally in kKrnlLib.

File size: 3.5 KB
Line 
1/* $Id: OS2KIO.h,v 1.2 2001-09-26 03:52:35 bird Exp $
2 *
3 * OS/2 kernel I/O: prototypes, typedefs and macros.
4 *
5 * Copyright (c) 1999-2001 knut st. osmundsen (kosmunds@csc.com)
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10
11#ifndef _OS2KIO_h_
12#define _OS2KIO_h_
13
14
15/**
16 * Opens a given file.
17 * @returns NO_ERROR on success. OS/2 error code on error.
18 * @param pszFilename Pointer to filename.
19 * @param flOpenFlags Open flags. (similar to DosOpen)
20 * @param fsOpenMode Open mode flags. (similar to DosOpen)
21 * @param phFile Pointer to filehandle.
22 * @param pulsomething 16-bit near (?) pointer to a variable - unknown. NULL is allowed. EA?
23 */
24APIRET KRNLCALL IOSftOpen(
25 PSZ pszFilename,
26 ULONG flOpenFlags,
27 ULONG fsOpenMode,
28 PSFN phFile,
29 PULONG pulsomething
30 );
31APIRET KRNLCALL OrgIOSftOpen(
32 PSZ pszFilename,
33 ULONG flOpenFlags,
34 ULONG fsOpenMode,
35 PSFN phFile,
36 PULONG pulsomething
37 );
38
39
40/**
41 * Closes the specified file.
42 * @returns NO_ERROR on success. OS/2 error code on error.
43 * @param hFile File handle - System File Number.
44 */
45APIRET KRNLCALL IOSftClose(
46 SFN hFile
47 );
48APIRET KRNLCALL OrgIOSftClose(
49 SFN hFile
50 );
51
52
53/**
54 * Probably this function will expand a relative path to a full path.
55 * @returns NO_ERROR on success. OS/2 error code on error.
56 * @param pszPath Pointer to path to expand. Contains the full path upon return. (?)
57 * This buffer should probably be of CCHMAXPATH length.
58 */
59APIRET KRNLCALL IOSftTransPath(
60 PSZ pszPath
61 );
62APIRET KRNLCALL OrgIOSftTransPath(
63 PSZ pszPath
64 );
65
66
67/**
68 * Read at a given offset in the a file.
69 * @returns NO_ERROR on success. OS/2 error code on error.
70 * @param hFile File handle - System File Number.
71 * @param pcbActual Pointer to variable which upon input holds the number
72 * of bytes to read, on output the actual number of bytes read.
73 * @param pvBuffer Pointer to the read buffer.
74 * @param flFlags Read flags?
75 * @param ulOffset File offset to read from. (0=start of file)
76 */
77APIRET KRNLCALL IOSftReadAt(
78 SFN hFile,
79 PULONG pcbActual,
80 PVOID pvBuffer,
81 ULONG flFlags,
82 ULONG ulOffset
83 );
84APIRET KRNLCALL OrgIOSftReadAt(
85 SFN hFile,
86 PULONG pcbActual,
87 PVOID pvBuffer,
88 ULONG flFlags,
89 ULONG ulOffset
90 );
91
92
93/**
94 * Write at a given offset in the a file.
95 * @returns NO_ERROR on success. OS/2 error code on error.
96 * @param hFile File handle - System File Number.
97 * @param pcbActual Pointer to variable which upon input holds the number
98 * of bytes to write, on output the actual number of bytes write.
99 * @param pvBuffer Pointer to the write buffer.
100 * @param flFlags Read flags?
101 * @param ulOffset File offset to write from. (0=start of file)
102 */
103APIRET KRNLCALL IOSftWriteAt(
104 SFN hFile,
105 PULONG pcbActual,
106 PVOID pvBuffer,
107 ULONG flFlags,
108 ULONG ulOffset
109 );
110APIRET KRNLCALL OrgIOSftWriteAt(
111 SFN hFile,
112 PULONG pcbActual,
113 PVOID pvBuffer,
114 ULONG flFlags,
115 ULONG ulOffset
116 );
117
118
119/**
120 * Gets the filesize.
121 * @returns NO_ERROR on success; OS/2 error code on error.
122 * @param hFile File handle - System File Number.
123 * @param pcbFile Pointer to ULONG which will hold the file size upon return.
124 */
125APIRET KRNLCALL SftFileSize(
126 SFN hFile,
127 PULONG pcbFile
128 );
129APIRET KRNLCALL OrgSftFileSize(
130 SFN hFile,
131 PULONG pcbFile
132 );
133
134#endif
Note: See TracBrowser for help on using the repository browser.