什么方法可以判断系统是无盘系统 [英] What method can judge system is diskless system

查看:378
本文介绍了什么方法可以判断系统是无盘系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么方法可以判断系统是无盘系统

请给我一些建议

What method can judge system is diskless system
Please give me some Suggestions

推荐答案

我相信这个任务将是特定于操作系统的从操作系统到操作系统也是如此。



在Windows中,您可以使用以下方法之一 -



使用 QueryDosDevice 列出系统中的所有设备名称。

列出的设备名称类似于 \Device \ HarddiskVolume1 \Device \Floppy0

从此列表中您可以检查如果没有Harddiskxxx,则表示系统中没有硬盘。



使用 CreateFile 打开物理驱动器,如 \\.\PhysicalDrive0 \\.\PhysicalDrive1 等。 />
检查返回值以确保不存在任何磁盘。
I believe that this task would be OS specific and so would defer from OS to OS.

In Windows, you can use one of the following methods -

Use QueryDosDevice to list all the device names in the system.
The device names listed would be something like \Device\HarddiskVolume1, \Device\Floppy0 etc.
From this list you can check that if there is no Harddiskxxx, it means there is no hard disk in the system.

Use CreateFile to open physical drives like \\.\PhysicalDrive0, \\.\PhysicalDrive1 etc.
Check the return value to ensure that none of the disks exists.


这篇关于什么方法可以判断系统是无盘系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆