📄 getsec.c
字号:
/***************************************************************************/
/* */
/* GETSECT.C */
/* */
/* Copyright (c) 1991 - Microsoft Corp. */
/* All rights reserved. */
/* Microsoft Confidential */
/* */
/* Calculates the total sectors on a hard disk based on the values in a */
/* hard disk parameters structure. */
/* */
/* UL GetTotalHdSectors( struct HdParms *Parms ) */
/* */
/* ARGUMENTS: Parms - Ptr to hard disk parameters structure */
/* RETURNS: unsigned long - Total physical sectors on the hard disk */
/* */
/* NOTE: */
/* Need to remember that heads and cylinders begin with 0 and */
/* sectors begin with 1. */
/* */
/* Created 02-07-90 johnhe */
/***************************************************************************/
#include <alias.h>
#include <hdisk.h>
UL GetTotalHdSectors( struct HdParms *Parms )
{
return( (UL)(Parms->MaxHead+1) *
(UL)(Parms->MaxSec) *
(UL)( Parms->MaxCyl+1) );
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -