#include <stdlib.h>
#include "mono/io-layer/wapi.h"
-#include "mono/io-layer/timefuncs.h"
G_BEGIN_DECLS
guint16 wMilliseconds;
} WapiSystemTime;
+typedef struct {
+#if G_BYTE_ORDER == G_BIG_ENDIAN
+ guint32 dwHighDateTime;
+ guint32 dwLowDateTime;
+#else
+ guint32 dwLowDateTime;
+ guint32 dwHighDateTime;
+#endif
+} WapiFileTime;
+
typedef struct
{
guint32 dwFileAttributes;
guint32 nFileSizeLow;
} WapiFileAttributesData;
+typedef union {
+ struct {
+ guint32 LowPart;
+ guint32 HighPart;
+ } u;
+ guint64 QuadPart;
+} ULARGE_INTEGER;
+
#define INVALID_SET_FILE_POINTER ((guint32)-1)
#define INVALID_FILE_SIZE ((guint32)0xFFFFFFFF)
#define INVALID_FILE_ATTRIBUTES ((guint32)-1)
extern gboolean FlushFileBuffers(gpointer handle);
extern gboolean SetEndOfFile(gpointer handle);
extern guint32 SetFilePointer(gpointer handle, gint32 movedistance,
- gint32 *highmovedistance, WapiSeekMethod method);
+ gint32 *highmovedistance, guint32 method);
extern WapiFileType GetFileType(gpointer handle);
extern guint32 GetFileSize(gpointer handle, guint32 *highsize);
extern gboolean GetFileTime(gpointer handle, WapiFileTime *create_time,
extern gboolean CreatePipe (gpointer *readpipe, gpointer *writepipe,
WapiSecurityAttributes *security, guint32 size);
extern gint32 GetLogicalDriveStrings (guint32 len, gunichar2 *buf);
-extern gboolean GetDiskFreeSpaceEx(const gunichar2 *path_name, WapiULargeInteger *free_bytes_avail,
- WapiULargeInteger *total_number_of_bytes,
- WapiULargeInteger *total_number_of_free_bytes);
+extern gboolean GetDiskFreeSpaceEx(const gunichar2 *path_name, ULARGE_INTEGER *free_bytes_avail,
+ ULARGE_INTEGER *total_number_of_bytes,
+ ULARGE_INTEGER *total_number_of_free_bytes);
extern guint32 GetDriveType(const gunichar2 *root_path_name);
extern gboolean LockFile (gpointer handle, guint32 offset_low,
guint32 offset_high, guint32 length_low,
extern void _wapi_io_init (void);
+extern void _wapi_io_cleanup (void);
G_END_DECLS