home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cidsam.zip
/
GETBOOTD.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-06-28
|
1KB
|
34 lines
/*********************************/
/* NOTE */
/* */
/* This sample code has been */
/* provided by IBM. It is not */
/* warranted for any particular */
/* use or purpose. */
/* */
/* IBM releases this code into */
/* the public domain. You may */
/* use it, modify it, or */
/* incorporate it into other */
/* products without restriction. */
/*********************************/
/* Returns an integer in the range 1 - 32 indicating the drive from which */
/* the system was booted. A: = 1, B: = 2, C: = 3, etc. */
#define INCL_DOSFILEMGR
#define INCL_DOSMISC
#include <os2.h>
int main()
{
UINT buf, rc;
rc = DosQuerySysInfo(QSV_BOOT_DRIVE, QSV_BOOT_DRIVE,
(PVOID)&buf, sizeof(UINT));
if (rc)
buf = 0;
return (buf);
}