BOOL EnumDeviceDrivers(
LPVOID *lpImageBase, // array to receive the load addresses
DWORD cb, // size of the array
LPDWORD lpcbNeeded // receives the number of bytes returned
);
可以吧!
LPVOID *lpImageBase, // array to receive the load addresses
DWORD cb, // size of the array
LPDWORD lpcbNeeded // receives the number of bytes returned
);
可以吧!
DWORD GetLogicalDriveStrings(
DWORD nBufferLength, // size of buffer
LPTSTR lpBuffer // drive strings buffer
);
这个用法很简单的。
在每两个子串中间有一个二进制的'0'分隔,最后结束时有两个二进制的'0'。如果我没记错的话是这样的,看一下MSDN。对这个字符串要进行处理可得到所有的驱动器的名字。