[2] | 1 | /***
|
---|
| 2 | This file belongs to the Gotcha! distribution.
|
---|
| 3 | Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de>
|
---|
| 4 |
|
---|
| 5 | This program is free software; you can redistribute it and/or modify
|
---|
| 6 | it under the terms of the GNU General Public License as published by
|
---|
| 7 | the Free Software Foundation; either version 2 of the License, or
|
---|
| 8 | (at your option) any later version.
|
---|
| 9 |
|
---|
| 10 | This program is distributed in the hope that it will be useful,
|
---|
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 13 | GNU General Public License for more details.
|
---|
| 14 |
|
---|
| 15 | You should have received a copy of the GNU General Public License
|
---|
| 16 | along with this program; if not, write to the Free Software
|
---|
| 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
| 18 | ***/
|
---|
| 19 |
|
---|
| 20 | #include "mmio.h"
|
---|
| 21 |
|
---|
| 22 | // ** thth_MMIO *********************************************************** /*FOLD00*/
|
---|
| 23 |
|
---|
| 24 | thth_MMIO :: thth_MMIO( VOID )
|
---|
| 25 | {
|
---|
| 26 | CHAR achError[ 256 ] = "";
|
---|
| 27 |
|
---|
| 28 | HMODULE handleDLLTmp = NULLHANDLE;
|
---|
| 29 | handleDLL = NULLHANDLE;
|
---|
| 30 | rc = NO_ERROR;
|
---|
| 31 | step = 0;
|
---|
| 32 |
|
---|
| 33 | pfmmioGetFormats = NULL;
|
---|
| 34 | pfmmioOpen = NULL;
|
---|
| 35 | pfmmioQueryHeaderLength = NULL;
|
---|
| 36 | pfmmioClose = NULL;
|
---|
| 37 | pfmmioSetHeader = NULL;
|
---|
| 38 | pfmmioWrite = NULL;
|
---|
| 39 |
|
---|
| 40 | if( ( rc = DosLoadModule( achError, sizeof( achError ), PSZ_DLLNAME,
|
---|
| 41 | &handleDLLTmp ) ) != NO_ERROR )
|
---|
| 42 | return;
|
---|
| 43 |
|
---|
| 44 | step = 1;
|
---|
| 45 | if( ( rc = DosQueryProcAddr( handleDLLTmp, 0L, "mmioGetFormats", &pfmmioGetFormats ) ) != NO_ERROR ) return;
|
---|
| 46 | step = 2;
|
---|
| 47 | if( ( rc = DosQueryProcAddr( handleDLLTmp, 0L, "mmioOpen", &pfmmioOpen ) ) != NO_ERROR ) return;
|
---|
| 48 | step = 3;
|
---|
| 49 | if( ( rc = DosQueryProcAddr( handleDLLTmp, 0L, "mmioQueryHeaderLength", &pfmmioQueryHeaderLength ) ) != NO_ERROR ) return;
|
---|
| 50 | step = 4;
|
---|
| 51 | if( ( rc = DosQueryProcAddr( handleDLLTmp, 0L, "mmioClose", &pfmmioClose ) ) != NO_ERROR ) return;
|
---|
| 52 | step = 5;
|
---|
| 53 | if( ( rc = DosQueryProcAddr( handleDLLTmp, 0L, "mmioSetHeader", &pfmmioSetHeader ) ) != NO_ERROR ) return;
|
---|
| 54 | step = 6;
|
---|
| 55 | if( ( rc = DosQueryProcAddr( handleDLLTmp, 0L, "mmioWrite", &pfmmioWrite ) ) != NO_ERROR ) return;
|
---|
| 56 | step = 7;
|
---|
| 57 |
|
---|
| 58 | handleDLL = handleDLLTmp;
|
---|
| 59 | }
|
---|
| 60 |
|
---|
| 61 | // ************************************************************************
|
---|