C++ MFC 如何用程序判断我的操作系统是装在了哪个硬盘中?有哪个函数能实现吗?求代码

2025-04-09 12:05:20
推荐回答(1个)
回答1:

#include "stdafx.h"
#include 
#include 
using namespace std;
int main( int argc, char** argv )    
{
 char str[MAX_PATH];    
 char outstr[] = "系统的盘符是";    
 GetSystemDirectory(str, MAX_PATH);    
 outstr[12] = str[0];
 cout< //MessageBox( NULL, outstr, "系统消息", MB_OK); 
 return 0; 
}