// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the DATAFILEREADERDLL_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// DATAFILEREADERDLL_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
// DataFileReader.dll (C) Ro2Helpers. All rights reserved.
#include <stdio.h>
#ifdef DATAFILEREADERDLL_EXPORTS
#define DATAFILEREADERDLL_API __declspec(dllexport)
#else
#define DATAFILEREADERDLL_API __declspec(dllimport)
#endif
typedef unsigned int __uint;
typedef unsigned char __uchar;
enum ro2data_offset { offset_cur = 1, offset_end = 2, offset_start = 3 };
typedef struct
{
FILE *hFile;
__uint fPos;
} ro2data_handle;
DATAFILEREADERDLL_API __uint ro2data_read ( ro2data_handle *handle,
__uchar *pBuf,
__uint BlockSize,
__uint BlockCount );
DATAFILEREADERDLL_API __uint ro2data_write ( ro2data_handle *handle,
__uchar *pBuf,
__uint BlockSize,
__uint BlockCount );
DATAFILEREADERDLL_API bool ro2data_open ( ro2data_handle *handle,
char *name );
DATAFILEREADERDLL_API int ro2data_seek ( ro2data_handle *handle,
int seek, int origin );
DATAFILEREADERDLL_API int ro2data_close ( ro2data_handle *handle );