home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 2002 July
/
VPR0207A.ISO
/
OLS
/
UNRAR32007
/
unrar32007.lzh
/
src.lzh
/
src
/
mapf.h
< prev
next >
Wrap
C/C++ Source or Header
|
2001-01-06
|
1KB
|
44 lines
/*
* Copyright (c) 1998-2001 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