home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1999 October
/
VPR9910A.BIN
/
OLS
/
unrar32005
/
unrar32005.lzh
/
src
/
mapf.h
< prev
next >
Wrap
C/C++ Source or Header
|
1998-04-03
|
1KB
|
44 lines
/*
* Copyright (c) 1998 T. Kamei (kamei@jsdlab.co.jp)
*
* Permission to use, copy, modify, and distribute this software
* and its documentation for any purpose is hereby granted provided
* that the above copyright notice and this permission notice appear
* in all copies of the software and related documentation.
*
* NO WARRANTY
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY WARRANTIES;
* WITHOUT EVEN THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS
* FOR A PARTICULAR PURPOSE.
*/
#ifndef _MAPF_H_
# define _MAPF_H_
class mapf
{
HANDLE mf_hf;
HANDLE mf_hm;
DWORD mf_size;
void *mf_base;
void init ()
{
mf_hf = INVALID_HANDLE_VALUE;
mf_hm = 0;
mf_base = 0;
mf_size = 0;
}
public:
mapf () {init ();}
~mapf () {close ();}
void close ();
int open (const char *, int = FILE_FLAG_SEQUENTIAL_SCAN);
const void *base () const {return mf_base;}
DWORD size () const {return mf_size;}
operator HANDLE () const {return mf_hf;}
};
#endif