China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-23 08:53
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Partition Table Backup Tool miniTO Source Code (Three Versions, Including Executable) View 15,928 Replies 57
Original Poster Posted 2007-04-29 11:42 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
23-year member
UID 7105
Gender Male
Status Offline
I am now uploading the source code... I hope it can be helpful to those learning DOS, Windows, disk systems, and programming.

It includes three versions: pure DOS, WIN32 Console, and WIN32 GUI. The backup files generated by these versions can be used across any version.

Main functions: Backup/restore/replace/compare/print partition tables, partition boot sectors, file allocation tables, and CMOS.


USB disks are not supported.

The DOS version includes all functions.
The WIN32 Console version has not yet enabled the print function and CMOS operations.
The WIN32 GUI version has not yet enabled the compare function, print function, and CMOS operations.

The modules for the unimplemented functions in the WIN32 versions are complete. If you wish to use them, you can manually enable the call switches or add a few lines of calling code. I will add them in the future when I have time...

(In Windows, the print function cannot directly use DOS code; it needs to first send content to the edit box buffer for display... Those interested can implement this themselves...) Since this was just converted from DOS code to Windows, the program prompts have not been fully adapted to Windows, and functions like printf() remain, but they do not affect compilation. They can be rewritten when time permits. Due to time constraints, there are no detailed comments, but variable names were generally chosen based on their functions during writing, so the code structure should be relatively easy to understand.

[ Last edited by GOTOmsdos on 2007-9-22 at 08:44 AM ]
Recent Ratings for This Post ( 3 in total) Click for details
RaterScoreTime
hapeacock -1 2007-08-22 20:46
yangzhiyi +2 2008-03-12 12:15
johnsonlam +1 2008-03-12 18:39
Attachments
minito源码(修正0值分区项bug).rar (325.9 KiB, Downloads: 1068)
Floor 2 Posted 2007-04-29 13:13 ·  中国 广东 深圳 福田区 电信
高级用户
★★
Credits 525
Posts 222
Joined 2006-08-28 21:07
19-year member
UID 61476
Status Offline
Thank you, I'll download it to study.

However, I'm really inexperienced...
Floor 3 Posted 2007-04-29 16:04 ·  中国 广东 深圳 南山区 电信
高级用户
★★★
Credits 972
Posts 420
Joined 2004-05-16 00:00
22-year member
UID 24467
Gender Male
Status Offline
Thank you
平生进退如飙风
Floor 4 Posted 2007-04-29 22:11 ·  中国 河南 济源 联通
中级用户
★★
Credits 343
Posts 50
Joined 2004-02-21 00:00
22-year member
UID 18062
Gender Male
Status Offline
Thank you for sharing. You are a true expert among experts.
Floor 5 Posted 2007-04-30 08:35 ·  中国 北京 鹏博士宽带
新手上路
Credits 12
Posts 6
Joined 2007-03-29 01:51
19-year member
UID 83220
Gender Male
Status Offline
Thank you for sharing.
Floor 6 Posted 2007-04-30 09:47 ·  中国 江苏 常州 武进区 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
Thank you for sharing. You are a true expert! However, I am really inexperienced.
Floor 7 Posted 2007-04-30 12:54 ·  中国 黑龙江 哈尔滨 电信
高级用户
★★★
Credits 760
Posts 357
Joined 2005-10-10 22:33
20-year member
UID 43332
Status Offline
Wow, I salute the original poster.
Floor 8 Posted 2007-04-30 21:20 ·  中国 江苏 苏州 电信
银牌会员
★★★
Credits 2,227
Posts 790
Joined 2005-01-27 00:00
21-year member
UID 35703
Gender Male
Status Offline
Thank you for sharing the source code! Well done!
my major is english----my love is dos----my teacher is the buddha----my friends--how about U
Floor 9 Posted 2007-05-01 07:27 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
23-year member
UID 7105
Gender Male
Status Offline
The source code for the Win32 graphical version has been updated and uploaded. The updates are as follows:
1
Added recovery and replacement functions, so all main functions of this tool are now available.

2
Changed the manual input of hard disk numbers and partitions to a pop-up list for selection, making it more convenient to use and less error-prone.
Tested on my own physical machine and confirmed to work...
Floor 10 Posted 2007-05-01 17:45 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
23-year member
UID 7105
Gender Male
Status Offline
I am improving the structure of the files generated by the program to ensure that the program does not make errors even if the user inputs different types of filenames. For example, if the user enters a backup filename for the FAT of a single partition but selects the option to restore the partition table of the entire hard drive, the program will still execute the restoration of the FAT for the single partition, and vice versa. This makes the program more robust.

[ Last edited by GOTOmsdos on 2007-5-3 at 12:13 AM ]
Floor 11 Posted 2007-05-02 21:49 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
23-year member
UID 7105
Gender Male
Status Offline
The above improvement and enhancement plan has been completed and updated. Now, a function to display the total table of hard disks and partitions has been added.
Floor 12 Posted 2007-05-03 17:53 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
23-year member
UID 7105
Gender Male
Status Offline
Added the function to display the total table of hard disks and partitions, updated.
Floor 13 Posted 2007-05-05 10:37 ·  中国 湖南 长沙 电信
初级用户
Credits 127
Posts 12
Joined 2003-06-20 00:00
23-year member
UID 5576
Gender Male
Status Offline
Thank you.
Floor 14 Posted 2007-05-05 18:57 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
23-year member
UID 7105
Gender Male
Status Offline
Updated as follows:
1
Now, the files generated by the three versions are compatible with each other... Additionally, if you mistakenly restore a backup file of a single partition's partition table, partition boot sector, or FAT to the entire hard drive, or vice versa, it will still successfully restore to the location you intended without errors.
2
Added a program identifier when backing up files to check the input file during restoration, thus preventing errors caused by users entering incorrect filenames.
3
I never had time to replace the parameters and help content of the DOS version with the concise style of the Windows version; now this has been updated.

With this, the series of three versions is complete.
The program is also more robust now.

[ Last edited by GOTOmsdos on 2007-5-5 at 10:41 PM ]
Floor 15 Posted 2007-05-09 01:24 ·  中国 安徽 淮南 电信
初级用户
Credits 50
Posts 15
Joined 2005-10-02 01:15
20-year member
UID 43053
Status Offline
Thanks, this tool is really great, it basically solved my problem.
Just one shortcoming: After loading IFS, the command "minito /p /nohp /ifs" can normally display the drive letters of the NTFS partitions loaded by IFS, but cannot display the drive letters of the hidden partitions loaded by IFS.
Hope to improve it. I'm a novice. Please bear with me if it's my operation error

a:\>ifs
Loading IFS driver..
Dos LFN services installed
Mounted DOS Drives: E: F: G:
a:\>minito /p /nohp /ifs
N:N : PRI/LOG ACT HIDE ID FILE SYSTEM LABEL TOTALmb FREEmb
1:1 = E: PRIMARY YES NO 07 NTFS/HPFS 1513
1:2 = C: LOGICAL NO NO 0B FAT32 NO NAME 2266 2262
1:3 = F: LOGICAL NO NO 07 NTFS/HPFS 2266
1:4 = D: LOGICAL NO NO 0B FAT32 NO NAME 760 759
1:5 LOGICAL NO YES 1B FAT32 NO NAME 1380
Forum Jump: