From c0c336500955a23e344651e5412c9d9d441ef4ee Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Wed, 28 Jun 2023 22:22:32 +0100 Subject: first pass of T2DLL --- src/T2DLL/Mmio.cpp | 118 +++++++++++++---------------------------------------- 1 file changed, 28 insertions(+), 90 deletions(-) (limited to 'src/T2DLL/Mmio.cpp') diff --git a/src/T2DLL/Mmio.cpp b/src/T2DLL/Mmio.cpp index 5a11e85..8e77810 100644 --- a/src/T2DLL/Mmio.cpp +++ b/src/T2DLL/Mmio.cpp @@ -1,97 +1,35 @@ +//----------------------------------------------------------------- +// MMIO Objects +// C++ Source - MMIO.cpp +//----------------------------------------------------------------- + +//----------------------------------------------------------------- +// Inclusions +//----------------------------------------------------------------- +#include "common.h" +//----------------------------------------------------------------- #include "MMIO.h" -CMMChunk::CMMChunk() { -} - -CMMChunk& CMMChunk::operator=(const CMMChunk&) { -} - -CMMIdChunk& CMMIdChunk::operator=(const CMMIdChunk&) { -} - -CMMIdChunk::CMMIdChunk(char, char, char, char) { -} - -CMMIdChunk::CMMIdChunk(const char*, unsigned int) { -} - -CMMTypeChunk& CMMTypeChunk::operator=(const CMMTypeChunk&) { -} - -CMMTypeChunk::CMMTypeChunk(char, char, char, char) { -} - -CMMTypeChunk::CMMTypeChunk(const char*, unsigned int) { -} - -CMMIOInfo& CMMIOInfo::operator=(const CMMIOInfo&) { -} - -CMMIOInfo::CMMIOInfo() { -} - -CMMMemoryIOInfo& CMMMemoryIOInfo::operator=(const CMMMemoryIOInfo&) { -} - -CMMMemoryIOInfo::CMMMemoryIOInfo(long, unsigned long) { -} - -CMMMemoryIOInfo::CMMMemoryIOInfo(char*, long, unsigned long) { -} - -/*virtual*/ CMMIO::~CMMIO() { -} - -CMMIO::CMMIO() { -} +//----------------------------------------------------------------- +// MFC Debugging Support +//----------------------------------------------------------------- +#ifdef _DEBUG +#undef THIS_FILE +static char THIS_FILE[]=__FILE__; +#define new DEBUG_NEW +#endif -CMMIO::CMMIO(HMMIO) { -} - -CMMIO::CMMIO(const char*, unsigned long) { -} - -CMMIO::CMMIO(CMMMemoryIOInfo&) { -} - -unsigned int CMMIO::Close(unsigned int) { -} - -long CMMIO::Read(char*, long) { -} - -unsigned int CMMIO::Ascend(CMMChunk&, unsigned int) { -} - -unsigned int CMMIO::Descend(CMMChunk&, unsigned int) { -} - -unsigned int CMMIO::Descend(CMMChunk&, CMMChunk&, unsigned int) { -} - -long CMMIO::Seek(long, int) { -} - -long CMMIO::SendMessageA(unsigned int, long, long) { -} - -unsigned int CMMIO::SetBuffer(char*, long, unsigned int) { -} - -long CMMIO::Write(const char*, long) { -} - -unsigned int CMMIO::GetInfo(CMMIOInfo&, unsigned int) { -} - -unsigned int CMMIO::SetInfo(CMMIOInfo&, unsigned int) { -} - -unsigned int CMMIO::Advance(CMMIOInfo&, unsigned int) { -} +//----------------------------------------------------------------- +// CMMIO Public Methods +//----------------------------------------------------------------- +void CMMIO::Open(const char* pszFileName, DWORD dwOpenFlags) +{ -void CMMIO::Open(const char*, unsigned long) { + ASSERT(AfxIsValidString(pszFileName)); + m_hmmio = mmioOpen((char*)pszFileName, NULL, dwOpenFlags); } -void CMMIO::Open(CMMMemoryIOInfo&) { +void CMMIO::Open(CMMMemoryIOInfo &mmioinfo) +{ + m_hmmio = mmioOpen(NULL, &mmioinfo, MMIO_READWRITE); } -- cgit v1.2.3