Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6file.h
Go to the documentation of this file.
1 
9 #ifndef P6FILE_H__
10 #define P6FILE_H__ 1
11 
12 #include "p6filetypes.h"
13 #include "p6datastream.h"
14 
15 
16 #ifdef __cplusplus
17 namespace P6R {
18 extern "C" {
19 #endif
20 
36 #undef INTERFACE
37 #define INTERFACE p6IUnbufferedFile
39 {
41  P6DECLCOMMETHOD(initialize)(P6THIS) P6PURE;
42 
54  P6DECLCOMMETHOD(getID)(P6THIS_ P6SIZE *pID) P6PURE;
55 
88  P6DECLCOMMETHOD(open)(P6THIS_ const P6WCHAR *pwszFilename,P6FILEFLAGS fFlags,P6FILEMODE perms) P6PURE;
89 
109  P6DECLCOMMETHOD(read)(P6THIS_ P6VOID *pBuffer,P6SIZE cBytesToRead,P6SIZE *pcBytesRead) P6PURE;
110 
131  P6DECLCOMMETHOD(write)(P6THIS_ const P6VOID *pBuffer,P6SIZE cBytesToWrite,P6SIZE *pcBytesWritten) P6PURE;
132 
163  P6DECLCOMMETHOD(writeFormatted)(P6THIS_ const P6CHAR *pFmt,P6ARG *pArgs,P6UINT32 cArgs,P6SIZE *pcBytesWritten) P6PURE;
164 
183  P6DECLCOMMETHOD(seek)(P6THIS_ P6FILESEEK fromWhere,P6INT64 offset) P6PURE;
184 
198 
207  P6DECLCOMMETHOD(close)(P6THIS) P6PURE;
208 };
209 
210 // {8E3A9F05-7A8E-440F-9FB9-EBC9CCDE129E}
211 #define IF_p6IUnbufferedFile {0x8E3A9F05,0x7A8E,0x440F,{0x9F,0xB9,0xEB,0xC9,0xCC,0xDE,0x12,0x9E}}
212 
213 // {0EECD54D-12D3-4DF8-8EE8-EE118718B2E2}
214 #define COMP_p6UnbufferedFile {0x0EECD54D,0x12D3,0x4DF8,{0x8E,0xE8,0xEE,0x11,0x87,0x18,0xB2,0xE2}}
215 
216 #ifdef __cplusplus
217 } /* extern "C" */
218 } // namespace
219 #endif
220 
221 
222 #endif
223 
size_t P6SIZE
Definition: p6types.h:90
uint32_t P6UINT32
Definition: p6types.h:77
#define P6DECLAREICOM
Definition: p6defs.h:191
#define P6PURE
Definition: p6defs.h:192
p6IDataStream interface definitions
File and directory type definitions.
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:111
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:97
int64_t P6INT64
Definition: p6types.h:78
Provides ability to create, open, read, write and seek files.
Definition: p6file.h:38
P6UINT32 P6FILESEEK
Definition: p6filetypes.h:62
P6UINT32 P6FILEFLAGS
File access flags are passed to various file open/create calls to specify the type of access that is ...
Definition: p6filetypes.h:40
#define P6DECLCOMMETHOD(method)
Definition: p6defs.h:189
P6UINT32 P6FILEMODE
Definition: p6filetypes.h:75
Used to describe an open file.
Definition: p6filetypes.h:174
#define P6THIS_
Definition: p6defs.h:193
void P6VOID
Definition: p6types.h:109
#define P6THIS
Definition: p6defs.h:194
Argument definition.
Definition: p6types.h:591
char P6CHAR
Narrow character type.
Definition: p6types.h:105
#define P6DECLAREIF_(iface, baseif)
Definition: p6defs.h:188