Subversion Repositories WoWGM

Rev

Rev 16 | Rev 32 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#include "pch.h"
#pragma hdrstop

#include "CDataStore.h"


/****************************************************************************
*
*   Client memory addresses
*
***/

#define  CDATASTORE__INITIALIZE       0x00401050;
#define  CDATASTORE__RESET            0x004010E0;
#define  CDATASTORE__DESTROY          0x00403880;
#define  CDATASTORE__SETCHAR          0x00417C80;       
#define  CDATASTORE__SETUCHAR         0x00417CD0;
#define  CDATASTORE__SETSHORT         0x00417D20;
#define  CDATASTORE__SETUSHORT        0x00417D70;
#define  CDATASTORE__SETINT           0x00417DC0;
#define  CDATASTORE__SETUINT          0x00417E10;
#define  CDATASTORE__SETLONG          0x00417E60;
#define  CDATASTORE__SETULONG         0x00417EB0;
#define  CDATASTORE__SETINT64         0x00417F00;
#define  CDATASTORE__SETUINT64        0x00417F60;
#define  CDATASTORE__SETFLOAT         0x00417FC0;
#define  CDATASTORE__PUTCHAR          0x00418010;
#define  CDATASTORE__PUTUCHAR         0x00418070;
#define  CDATASTORE__PUTSHORT         0x004180D0;
#define  CDATASTORE__PUTUSHORT        0x00418130;
#define  CDATASTORE__PUTINT           0x0047B0A0;
#define  CDATASTORE__PUTUINT          0x0047B0A0;
#define  CDATASTORE__PUTLONG          0x00418250;
#define  CDATASTORE__PUTULONG         0x004182B0;
#define  CDATASTORE__PUTINT64         0x0047B100;
#define  CDATASTORE__PUTUINT64        0x0047B100;
#define  CDATASTORE__PUTFLOAT         0x0047B160;
#define  CDATASTORE__PUTSTRING        0x0047B300;
#define  CDATASTORE__PUTARRAY         0x00418570;
#define  CDATASTORE__PUTARRAY2        0x00418680;
#define  CDATASTORE__PUTARRAY3        0x00418790;
#define  CDATASTORE__PUTARRAY4        0x004188B0;
#define  CDATASTORE__PUTARRAY5        0x004189D0;
#define  CDATASTORE__PUTDATA          0x00418C10;
#define  CDATASTORE__GETCHAR          0x00418C30;
#define  CDATASTORE__GETUCHAR         0x00418CB0;
#define  CDATASTORE__GETSHORT         0x00418D30;
#define  CDATASTORE__GETUSHORT        0x00418DB0;
#define  CDATASTORE__GETINT           0x0047B3C0;
#define  CDATASTORE__GETUINT          0x0047B3C0;
#define  CDATASTORE__GETLONG          0x00418F30;
#define  CDATASTORE__GETULONG         0x00418FB0;
#define  CDATASTORE__GETINT64         0x00419030;
#define  CDATASTORE__GETUINT64        0x004190B0;
#define  CDATASTORE__GETFLOAT         0x00419130;
#define  CDATASTORE__GETSTRING        0x004191B0;
#define  CDATASTORE__GETSTRING2       0x004192E0;
#define  CDATASTORE__GETARRAY         0x00419400;
#define  CDATASTORE__GETARRAY2        0x00419510;
#define  CDATASTORE__GETARRAY3        0x00419620;
#define  CDATASTORE__GETARRAY4        0x00419740;
#define  CDATASTORE__GETARRAY5        0x00419860;
#define  CDATASTORE__GETDATA          0x00419AA0;
#define  CDATASTORE__GETBUFFERPARAMS  0x00419B50;
#define  CDATASTORE__DETACHBUFFER     0x00419B80;


/****************************************************************************
*
*   Client function pointers
*
***/

CDataStore* (__thiscall* CDataStore__InitializePtr)(CDataStore*) = *(CDataStore*(__thiscall*)(CDataStore *))CDATASTORE__INITIALIZE;

CDataStore* (__thiscall* CDataStore__ResetPtr)(CDataStore*) = *(CDataStore*(__thiscall*)(CDataStore *))CDATASTORE__RESET;

CDataStore* (__thiscall* CDataStore__DestroyPtr)(CDataStore*) = *(CDataStore*(__thiscall*)(CDataStore *))CDATASTORE__DESTROY;

CDataStore& (__thiscall* CDataStore__SetCharPtr)(CDataStore*,DWORD,CHAR) = *(CDataStore&(__thiscall*)(CDataStore*,DWORD,CHAR))CDATASTORE__SETCHAR;

CDataStore& (__thiscall* CDataStore__SetUCharPtr)(CDataStore*,DWORD,UCHAR) = *(CDataStore&(__thiscall*)(CDataStore*,DWORD,UCHAR))CDATASTORE__SETUCHAR;

CDataStore& (__thiscall* CDataStore__SetShortPtr)(CDataStore*,DWORD,SHORT) = *(CDataStore&(__thiscall*)(CDataStore*,DWORD,SHORT))CDATASTORE__SETSHORT;

CDataStore& (__thiscall* CDataStore__SetUShortPtr)(CDataStore*,DWORD,USHORT) = *(CDataStore&(__thiscall*)(CDataStore*,DWORD,USHORT))CDATASTORE__SETSHORT;

CDataStore& (__thiscall* CDataStore__SetIntPtr)(CDataStore*,DWORD,INT) = *(CDataStore&(__thiscall*)(CDataStore*,DWORD,INT))CDATASTORE__SETINT;

CDataStore& (__thiscall* CDataStore__SetUIntPtr)(CDataStore*,DWORD,DWORD) = *(CDataStore&(__thiscall*)(CDataStore*,DWORD,DWORD))CDATASTORE__SETUINT;

CDataStore& (__thiscall* CDataStore__SetLongPtr)(CDataStore*,DWORD,long) = *(CDataStore&(__thiscall*)(CDataStore*,DWORD,long))CDATASTORE__SETLONG;

CDataStore& (__thiscall* CDataStore__SetULongPtr)(CDataStore*,DWORD,DWORD) = *(CDataStore&(__thiscall*)(CDataStore*,DWORD,DWORD))CDATASTORE__SETULONG;

CDataStore& (__thiscall* CDataStore__SetInt64Ptr)(CDataStore*,DWORD,INT64) = *(CDataStore&(__thiscall*)(CDataStore*,DWORD,INT64))CDATASTORE__SETINT64;

CDataStore& (__thiscall* CDataStore__SetUInt64Ptr)(CDataStore*,DWORD,UINT64) = *(CDataStore&(__thiscall*)(CDataStore*,DWORD,UINT64))CDATASTORE__SETUINT64;

CDataStore& (__thiscall* CDataStore__SetFloatPtr)(CDataStore*,DWORD,float) = *(CDataStore&(__thiscall*)(CDataStore*,DWORD,float))CDATASTORE__SETFLOAT;

CDataStore& (__thiscall* CDataStore__PutCharPtr)(CDataStore*,char) = *(CDataStore&(__thiscall*)(CDataStore*,char))CDATASTORE__PUTCHAR;

CDataStore& (__thiscall* CDataStore__PutUCharPtr)(CDataStore*,UCHAR) = *(CDataStore&(__thiscall*)(CDataStore*,UCHAR))CDATASTORE__PUTUCHAR;

CDataStore& (__thiscall* CDataStore__PutShortPtr)(CDataStore*,short) = *(CDataStore&(__thiscall*)(CDataStore*,short))CDATASTORE__PUTSHORT;

CDataStore& (__thiscall* CDataStore__PutUShortPtr)(CDataStore*,USHORT) = *(CDataStore&(__thiscall*)(CDataStore*,USHORT))CDATASTORE__PUTUSHORT;

CDataStore& (__thiscall* CDataStore__PutIntPtr)(CDataStore*,int) = *(CDataStore&(__thiscall*)(CDataStore*,int))CDATASTORE__PUTINT;

CDataStore& (__thiscall* CDataStore__PutUIntPtr)(CDataStore*,UINT) = *(CDataStore&(__thiscall*)(CDataStore*,UINT))CDATASTORE__PUTUINT;

CDataStore& (__thiscall* CDataStore__PutLongPtr)(CDataStore*,long) = *(CDataStore&(__thiscall*)(CDataStore*,long))CDATASTORE__PUTLONG;

CDataStore& (__thiscall* CDataStore__PutULongPtr)(CDataStore*,DWORD) = *(CDataStore&(__thiscall*)(CDataStore*,DWORD))CDATASTORE__PUTULONG;

CDataStore& (__thiscall* CDataStore__PutInt64Ptr)(CDataStore*,INT64) = *(CDataStore&(__thiscall*)(CDataStore*,INT64))CDATASTORE__PUTINT64;

CDataStore& (__thiscall* CDataStore__PutUInt64Ptr)(CDataStore*,UINT64) = *(CDataStore&(__thiscall*)(CDataStore*,UINT64))CDATASTORE__PUTUINT64;

CDataStore& (__thiscall* CDataStore__PutFloatPtr)(CDataStore*,float) = *(CDataStore&(__thiscall*)(CDataStore*,float))CDATASTORE__PUTFLOAT;

CDataStore& (__thiscall* CDataStore__PutStringPtr)(CDataStore*,LPCSTR) = *(CDataStore&(__thiscall*)(CDataStore*,LPCSTR))CDATASTORE__PUTSTRING;

CDataStore& (__thiscall* CDataStore__PutArrayPtr)(CDataStore*,UCHAR const*,DWORD) = *(CDataStore&(__thiscall*)(CDataStore*,UCHAR const*,DWORD))CDATASTORE__PUTARRAY;

CDataStore& (__thiscall* CDataStore__PutArrayPtr2)(CDataStore*,USHORT const*,UINT) = *(CDataStore&(__thiscall*)(CDataStore*,USHORT const*,UINT))CDATASTORE__PUTARRAY2;

CDataStore& (__thiscall* CDataStore__PutArrayPtr3)(CDataStore*,ULONG const*,UINT) = *(CDataStore&(__thiscall*)(CDataStore*,ULONG const*,UINT))CDATASTORE__PUTARRAY3;

CDataStore& (__thiscall* CDataStore__PutArrayPtr4)(CDataStore*,UINT64 const*,UINT) = *(CDataStore&(__thiscall*)(CDataStore*,UINT64 const*,UINT))CDATASTORE__PUTARRAY4;

CDataStore& (__thiscall* CDataStore__PutArrayPtr5)(CDataStore*,float const*,UINT) = *(CDataStore&(__thiscall*)(CDataStore*,float const*,UINT))CDATASTORE__PUTARRAY5;

CDataStore& (__thiscall* CDataStore__PutDataPtr)(CDataStore*,const void*,UINT) = *(CDataStore&(__thiscall*)(CDataStore*,const void*,UINT))CDATASTORE__PUTDATA;

CDataStore& (__thiscall* CDataStore__GetCharPtr)(CDataStore*,char&) = *(CDataStore&(__thiscall*)(CDataStore*,char&))CDATASTORE__GETCHAR;

CDataStore& (__thiscall* CDataStore__GetUCharPtr)(CDataStore*,UCHAR&) = *(CDataStore&(__thiscall*)(CDataStore*,UCHAR&))CDATASTORE__GETUCHAR;

CDataStore& (__thiscall* CDataStore__GetShortPtr)(CDataStore*,short&) = *(CDataStore&(__thiscall*)(CDataStore*,short&))CDATASTORE__GETSHORT;

CDataStore& (__thiscall* CDataStore__GetUShortPtr)(CDataStore*,USHORT&) = *(CDataStore&(__thiscall*)(CDataStore*,USHORT&))CDATASTORE__GETUSHORT;

CDataStore& (__thiscall* CDataStore__GetIntPtr)(CDataStore*,int&) = *(CDataStore&(__thiscall*)(CDataStore*,int&))CDATASTORE__GETINT;

CDataStore& (__thiscall* CDataStore__GetUIntPtr)(CDataStore*,UINT&) = *(CDataStore&(__thiscall*)(CDataStore*,UINT&))CDATASTORE__GETUINT;

CDataStore& (__thiscall* CDataStore__GetLongPtr)(CDataStore*,long&) = *(CDataStore&(__thiscall*)(CDataStore*,long&))CDATASTORE__GETLONG;

CDataStore& (__thiscall* CDataStore__GetULongPtr)(CDataStore*,ULONG&) = *(CDataStore&(__thiscall*)(CDataStore*,ULONG&))CDATASTORE__GETULONG;

CDataStore& (__thiscall* CDataStore__GetInt64Ptr)(CDataStore*,INT64&) = *(CDataStore&(__thiscall*)(CDataStore*,INT64&))CDATASTORE__GETINT64;

CDataStore& (__thiscall* CDataStore__GetUInt64Ptr)(CDataStore*,UINT64&) = *(CDataStore&(__thiscall*)(CDataStore*,UINT64&))CDATASTORE__GETUINT64;

CDataStore& (__thiscall* CDataStore__GetFloatPtr)(CDataStore*,float&) = *(CDataStore&(__thiscall*)(CDataStore*,float&))CDATASTORE__GETFLOAT;

CDataStore& (__thiscall* CDataStore__GetStringPtr)(CDataStore*,LPSTR,DWORD) = *(CDataStore&(__thiscall*)(CDataStore*,LPSTR,DWORD))CDATASTORE__GETSTRING;

CDataStore& (__thiscall* CDataStore__GetStringPtr2)(CDataStore*,LPWSTR,DWORD) = *(CDataStore&(__thiscall*)(CDataStore*,LPWSTR,DWORD))CDATASTORE__GETSTRING2;

CDataStore& (__thiscall* CDataStore__GetArrayPtr)(CDataStore*,UCHAR*,UINT) = *(CDataStore&(__thiscall*)(CDataStore*,UCHAR*,UINT))CDATASTORE__GETARRAY;

CDataStore& (__thiscall* CDataStore__GetArrayPtr2)(CDataStore*,USHORT*,UINT) = *(CDataStore&(__thiscall*)(CDataStore*,USHORT*,UINT))CDATASTORE__GETARRAY2;

CDataStore& (__thiscall* CDataStore__GetArrayPtr3)(CDataStore*,ULONG*,UINT) = *(CDataStore&(__thiscall*)(CDataStore*,ULONG*,UINT))CDATASTORE__GETARRAY3;

CDataStore& (__thiscall* CDataStore__GetArrayPtr4)(CDataStore*,UINT64*,UINT) = *(CDataStore&(__thiscall*)(CDataStore*,UINT64*,UINT))CDATASTORE__GETARRAY4;

CDataStore& (__thiscall* CDataStore__GetArrayPtr5)(CDataStore*,float*,UINT) = *(CDataStore&(__thiscall*)(CDataStore*,float*,UINT))CDATASTORE__GETARRAY5;

CDataStore& (__thiscall* CDataStore__GetDataPtr)(CDataStore*,void*,UINT) = *(CDataStore&(__thiscall*)(CDataStore*,void*,UINT))CDATASTORE__GETDATA;

void (__thiscall* CDataStore__GetBufferParamsPtr)(const CDataStore*,const void**,UINT*,UINT*) = *(void(__thiscall*)(const CDataStore*,const void**,UINT*,UINT*))CDATASTORE__GETBUFFERPARAMS;

void (__thiscall* CDataStore__DetachBufferPtr)(CDataStore*,void**,UINT*,UINT*) = *(void (__thiscall*)(CDataStore*,void**,UINT*,UINT*))CDATASTORE__DETACHBUFFER;


/****************************************************************************
*
*   Externals
*
***/

//=======================================================================
void CDataStore::Initialize (CDataStore* pData) {
        CDataStore__InitializePtr(pData);
}

//=======================================================================
void CDataStore::Destroy (CDataStore* pData) {
        CDataStore__DestroyPtr(pData);
}

//=======================================================================
CDataStore::CDataStore () {
        Initialize(this);
}

//=======================================================================
CDataStore::~CDataStore () {
        Destroy(this);
}

//=======================================================================
CDataStore* CDataStore::Reset () {
        return CDataStore__ResetPtr(this);
}

//=======================================================================
CDataStore& CDataStore::Set (DWORD pos, char bytes) {
        return CDataStore__SetCharPtr(this,pos,bytes);
}

//=======================================================================
CDataStore& CDataStore::Set (DWORD pos, UCHAR bytes) {
        return CDataStore__SetUCharPtr(this, pos, bytes);
}

//=======================================================================
CDataStore& CDataStore::Set (DWORD pos, short bytes) {
        return CDataStore__SetShortPtr(this, pos, bytes);
}

//=======================================================================
CDataStore& CDataStore::Set (DWORD pos, USHORT bytes) {
        return CDataStore__SetUShortPtr(this, pos, bytes);
}

//=======================================================================
CDataStore& CDataStore::Set (DWORD pos, int bytes) {
        return CDataStore__SetIntPtr(this, pos, bytes);
}

//=======================================================================
CDataStore& CDataStore::Set (DWORD pos, UINT bytes) {
        return CDataStore__SetUIntPtr(this, pos, bytes);
}

//=======================================================================
CDataStore& CDataStore::Set (DWORD pos, long bytes) {
        return CDataStore__SetLongPtr(this, pos, bytes);
}

//=======================================================================
CDataStore& CDataStore::Set (DWORD pos, ULONG bytes) {
        return CDataStore__SetULongPtr(this, pos, bytes);
}

//=======================================================================
CDataStore& CDataStore::Set (DWORD pos, INT64 bytes) {
        return CDataStore__SetInt64Ptr(this, pos, bytes);
}

//=======================================================================
CDataStore& CDataStore::Set (DWORD pos, UINT64 bytes) {
        return CDataStore__SetUInt64Ptr(this, pos, bytes);
}

//=======================================================================
CDataStore& CDataStore::Set (DWORD pos, float bytes) {
        return CDataStore__SetFloatPtr(this, pos, bytes);
}

//=======================================================================
CDataStore& CDataStore::Put (char val) {
        return CDataStore__PutCharPtr(this,val);
}

//=======================================================================
CDataStore& CDataStore::Put (UCHAR val) {
        return CDataStore__PutUCharPtr(this, val);
}

//=======================================================================
CDataStore& CDataStore::Put (short val) {
        return CDataStore__PutShortPtr(this, val);
}

//=======================================================================
CDataStore& CDataStore::Put (USHORT val) {
        return CDataStore__PutUShortPtr(this, val);
}

//=======================================================================
CDataStore& CDataStore::Put (int val) {
        return CDataStore__PutIntPtr(this, val);
}

//=======================================================================
CDataStore& CDataStore::Put (UINT val) {
        return CDataStore__PutUIntPtr(this, val);
}

//=======================================================================
CDataStore& CDataStore::Put (long val) {
        return CDataStore__PutLongPtr(this, val);
}

//=======================================================================
CDataStore& CDataStore::Put (ULONG val) {
        return CDataStore__PutULongPtr(this, val);
}

//=======================================================================
CDataStore& CDataStore::Put (INT64 val) {
        return CDataStore__PutInt64Ptr(this, val);
}

//=======================================================================
CDataStore& CDataStore::Put (UINT64 val) {
        return CDataStore__PutUInt64Ptr(this, val);
}

//=======================================================================
CDataStore& CDataStore::Put (float val) {
        return CDataStore__PutFloatPtr(this, val);
}

//=======================================================================
CDataStore& CDataStore::PutString (char const* pval) {
        return CDataStore__PutStringPtr(this,pval);
}

//=======================================================================
CDataStore& CDataStore::PutArray (UCHAR const* pval, DWORD bytes) {
        return CDataStore__PutArrayPtr(this,pval,bytes);
}

//=======================================================================
CDataStore& CDataStore::PutArray (USHORT const* pval, DWORD bytes) {
        return CDataStore__PutArrayPtr2(this, pval, bytes);
}

//=======================================================================
CDataStore& CDataStore::PutArray (ULONG const* pval, DWORD bytes) {
        return CDataStore__PutArrayPtr3(this, pval, bytes);
}

//=======================================================================
CDataStore& CDataStore::PutArray (UINT64 const* pval, DWORD bytes) {
        return CDataStore__PutArrayPtr4(this, pval, bytes);
}

//=======================================================================
CDataStore& CDataStore::PutArray (float const* pval, DWORD bytes) {
        return CDataStore__PutArrayPtr5(this, pval, bytes);
}

//=======================================================================
CDataStore& CDataStore::PutData (void const* pval, DWORD bytes) {
        return CDataStore__PutDataPtr(this,pval,bytes);
}

//=======================================================================
CDataStore& CDataStore::Get (char& pval) {
        return CDataStore__GetCharPtr(this,pval);
}

//=======================================================================
CDataStore& CDataStore::Get (UCHAR& pval) {
        return CDataStore__GetUCharPtr(this, pval);
}

//=======================================================================
CDataStore& CDataStore::Get (short& pval) {
        return CDataStore__GetShortPtr(this, pval);
}

//=======================================================================
CDataStore& CDataStore::Get (USHORT& pval) {
        return CDataStore__GetUShortPtr(this, pval);
}

//=======================================================================
CDataStore& CDataStore::Get (int& pval) {
        return CDataStore__GetIntPtr(this, pval);
}

//=======================================================================
CDataStore& CDataStore::Get (UINT& pval) {
        return CDataStore__GetUIntPtr(this, pval);
}

//=======================================================================
CDataStore& CDataStore::Get (long& pval) {
        return CDataStore__GetLongPtr(this, pval);
}

//=======================================================================
CDataStore& CDataStore::Get (ULONG& pval) {
        return CDataStore__GetULongPtr(this, pval);
}

//=======================================================================
CDataStore& CDataStore::Get (INT64& pval) {
        return CDataStore__GetInt64Ptr(this, pval);
}

//=======================================================================
CDataStore& CDataStore::Get (UINT64& pval) {
        return CDataStore__GetUInt64Ptr(this, pval);
}

//=======================================================================
CDataStore& CDataStore::Get (float& pval) {
        return CDataStore__GetFloatPtr(this, pval);
}

//=======================================================================
CDataStore& CDataStore::GetString (LPSTR pval, DWORD maxChars) {
        return CDataStore__GetStringPtr(this,pval,maxChars);
}

//=======================================================================
CDataStore& CDataStore::GetString (LPWSTR pval, DWORD maxChars) {
        return CDataStore__GetStringPtr2(this, pval, maxChars);
}

//=======================================================================
CDataStore& CDataStore::GetArray (UCHAR* pval, DWORD count) {
        return CDataStore__GetArrayPtr(this, pval, count);
}

//=======================================================================
CDataStore& CDataStore::GetArray (USHORT* pval, DWORD count) {
        return CDataStore__GetArrayPtr2(this, pval, count);
}

//=======================================================================
CDataStore& CDataStore::GetArray (ULONG* pval, DWORD count) {
        return CDataStore__GetArrayPtr3(this, pval, count);
}

//=======================================================================
CDataStore& CDataStore::GetArray (UINT64* pval, DWORD count) {
        return CDataStore__GetArrayPtr4(this, pval, count);
}

//=======================================================================
CDataStore& CDataStore::GetArray (float* pval, DWORD count) {
        return CDataStore__GetArrayPtr5(this, pval, count);
}

//=======================================================================
void CDataStore::GetBufferParams (LPCVOID*  dataPtr,
                                  UINT*     sizePtr,
                                  UINT*     allocPtr) const {

        return CDataStore__GetBufferParamsPtr(this,dataPtr,sizePtr,allocPtr);
}

//=======================================================================
void CDataStore::DetachBuffer (PVOID* dataPtr, UINT* sizePtr, UINT* allocPtr) {
        return CDataStore__DetachBufferPtr(this, dataPtr, sizePtr, allocPtr);
}