|
NTSF:
template "Boot Sector NTFS"
// Template by Paul Mullen, pcguru@the-answer.com
// last modified Jul 16, 2000
// To be applied to sector 0 of an NTFS-formatted
// logical drive or to the mirror copy of the boot
// sector, which will be located near the end of
// the partition.
// See Microsoft KB article Q153973, "Recovering NTFS boot Sector"
// http://support.microsoft.com/support/kb/articles/Q153/9/73.asp
description "Boot sector of an NTFS partition"
applies_to disk
sector-aligned
requires 0x00 "EB" // bytes 0 to 2 are
requires 0x02 "90" // JMP instruction
requires 0x03 "4E 54 46 53 20" // ID must be "NTFS"
requires 0x1FE "55 AA" // "magic" signature
begin
read-only hex 3 "JMP instruction" //00
char[8] "SystemID" //03
uint16 "Bytes per sector" //0B
uint8 "Sectors per cluster" //0D
uint16 "Reserved sectors" //0E
hex 3 "(always zero)" //10
read-only hex 2 "(unused)" //13
hex 1 "Media descriptor" //15
read-only hex 2 "(unused)" //16
uint16 "Sectors per track" //18
uint16 "Heads" //1A
uint32 "Hidden Sectors" //1C
read-only hex 4 "(unused)" //20
read-only hex 4 "(always 80 00 80 00)" //24
int64 "Total sectors" //28
move -8
hex 8 "Total sectors (hex)" //28
int64 "Start C# $MFT" //30
int64 "Start C# $MFTMirr" //38
uint32 "Clust per MFT rec" //40
uint32 "Clust per index block" //44
uint32 "Serial number (int)" //48
move -4
hex 4 "Serial number (hex)" //48
goto 0x1FE //boot load code follows
read-only hex 2 "Signature (55 AA)" //1FE
end
FAT32
template "Boot Sector FAT32"
// Template by Stefan Fleischmann
// To be applied to sector 0 of a FAT32-formatted logical drive.
description "BIOS parameter block (BPB) and more"
applies_to disk
sector-aligned
requires 0x02 "90"
requires 0x52 "46 41 54 33 32" // ="FAT32" at offset 52
requires 0x1FE "55 AA"
begin
read-only hex 3 "JMP instruction"
char[8] "OEM"
section "BIOS Parameter Block"
uint16 "Bytes per sector"
uint8 "Sectors per cluster"
uint16 "Reserved sectors"
uint8 "Number of FATs"
uint16 "Root entries (unused)"
uint16 "Sectors (on small volumes)"
hex 1 "Media descriptor (hex)"
uint16 "Sectors per FAT (small vol.)"
uint16 "Sectors per track"
uint16 "Heads"
uint32 "Hidden sectors"
uint32 "Sectors (on large volumes)"
section "FAT32 Section"
uint32 "Sectors per FAT"
uint16 "Flags"
uint16 "Version"
uint32 "Root dir 1st cluster"
uint16 "FSInfo sector"
uint16 "Backup boot sector"
read-only hex 12 "(Reserved)"
endsection
hex 1 "BIOS drive (hex, HD=8x)"
read-only uint8 (Unused)
hex 1 "Ext. boot signature (29h)"
uint32 "Volume serial number (decimal)"
move -4
hex 4 "Volume serial number (hex)"
char[11] "Volume label"
char[8] "File system"
endsection
goto 0x1FE
read-only hex 2 "Signature (55 AA)"
end
|
|
|
|
|
Whats that? I just need something like win32 functions.
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
It's how an NTFS and a FAT32 partition entrance looks like.
|
|
|
|
|
Thank you.
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Use GetVolumeInformation()
the Function params are
BOOL GetVolumeInformation(
LPCTSTR lpRootPathName, // root directory
LPTSTR lpVolumeNameBuffer, // volume name buffer
DWORD nVolumeNameSize, // length of name buffer
LPDWORD lpVolumeSerialNumber, // volume serial number
LPDWORD lpMaximumComponentLength, // maximum file name length
LPDWORD lpFileSystemFlags, // file system options
LPTSTR lpFileSystemNameBuffer, // file system name buffer
DWORD nFileSystemNameSize // length of file system name buffer
)
the out var lpFileSystemBuffer will give you the info abt
Type of ur partition(NTFS/FAT)
try it..
The TRUE CP -ian
|
|
|
|
|
Thank you.
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Always Welcome my friend...
R_Renjith The True CP ian
|
|
|
|
|
how to rotation a dialogbox??
example: rotation 45 degree!
I'm a beginner of VC++...
|
|
|
|
|
THe only way that is possible is to make a userdrawn window.
|
|
|
|
|
oh. my god! that's so......
i can't image that i need draw 100 windows!
I'm a beginner of VC++...
|
|
|
|
|
I'm confused with booleans. If I have these kind of methods in my classes
bool withdraw(float amount,Account a);
bool transfer(float amount,Account s,Account c);
could I still use couts and cin in my void main
|
|
|
|
|
I'd say your confused. So much so that I don't undestand the question.
--
Where are we going? And why am I in this handbasket?
|
|
|
|
|
I mean can the following be done:
bool Bank::withdraw(float amount,Account a);
cout<<"\nEnter a positive amount for the withdrawal-$";
cin>>amount;
while(amount<=0)
{
cout<<"\ninvalid amount";
cout<<"\nEnter a positive amount for withdrawal-$";
cin>>amount;
}
If there was an int or float in the place of bool I would not be so lost.
|
|
|
|
|
bool is just another type of variable, nothing magical about it.
--Mike--
Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer
Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines!
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
|
|
|
|
|
Dee wrote:
could I still use couts and cin in my void main
This has no connection with having a function that returns a bool.
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
How to create user in Active Dir on XP,2k
Please give sample code in VB+VC
...
Ibrar Ahmad
Softare Engr.
Comcept PVT LTD.
Islamabad
abrar_@yahoo.com
|
|
|
|
|
|
hi,
how can i get the height and width of a window?
|
|
|
|
|
Send a Message to that windows Hwnd
I'm a beginner of VC++...
|
|
|
|
|
Depends on whether you want the client are size or the actual windows size (including the titlebar, scroll bars, status bar, etc..)
Use either GetClientRect() or GetWindowRect().
--
Where are we going? And why am I in this handbasket?
|
|
|
|
|
Check GetWindowRect() .
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
hi
To get the height and width
You must
RECT rect;
::GetWindowRect(&rect);
then u will get the window dimensions to the rect structure variable
Then
long left,right,top,bottom,height,width;
left=rect.left;
right=rect.right;
top=rect.top;
bottom=rect.bottom;
height=bottom-top;
width=right-left;
try it...
The TRUE CP -ian
|
|
|
|
|
how to post a BMP file on a CommandButton??
Bitbmp Button!
I'm a beginner of VC++...
|
|
|
|
|
A very customizable button, with everything it takes can be found here
Best regards,
Alexandru Savescu
|
|
|
|
|
Use a derived class from CBitmapButton
The TRUE CP -ian
|
|
|
|