Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
PRIMPART.H
Upload User: jnzhq888
Upload Date: 2007-01-18
Package Size: 51694k
Code Size: 2k
Category:
OS Develop
Development Platform:
WINDOWS
- /*
- FIPS - the First nondestructive Interactive Partition Splitting program
- Module hdstruct.h
- RCS - Header:
- $Id$
- Copyright (C) 1993 Arno Schaefer
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- Report problems and direct all questions to:
- schaefer@rbg.informatik.th-darmstadt.de
- */
- /* ----------------------------------------------------------------------- */
- /* Partition Class, derived from logical_drive and raw_partition */
- /* Represents one primary DOS partition. Read_sector() and write_sector() */
- /* are instances of the virtual functions in the logical_drive class */
- /* ----------------------------------------------------------------------- */
- #ifndef PRIMPART_H
- #define PRIMPART_H
- #include "types.h"
- #include "disk_io.h"
- #include "logdr_st.h"
- #include "hdstruct.h"
- class partition:public logical_drive
- {
- public:
- int number;
- physical_drive *drive;
- partition_info *partition_info;
- int read_sector (dword number, sector *sector)
- {
- return (drive->read_sector
- (
- sector,
- partition_info->start_sector_abs
- + number
- ));
- }
- int write_sector (dword number, sector *sector)
- {
- return (drive->write_sector
- (
- sector,
- partition_info->start_sector_abs
- + number
- ));
- }
- partition (class harddrive *drive, int number)
- {
- partition::number = number;
- partition::drive = drive;
- partition_info =
- &(drive->partition_table().partition_info[number]);
- boot_sector = new class boot_sector (this);
- }
- ~partition (void) { delete boot_sector; }
- };
- #endif