| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Pascal And ??? |
I am having a problem understanding the DosQueryFSInfo function as it is
not returning with the FSA requested, but always a " " when using the
FSIL_ALLOC parameter.
#define INCL_DOSFILEMGR /* File Manager values */
#include
#include
#include
int main(int argc, char *argv[]) {
UCHAR szDeviceName[25]; /* Device name or drive letter string */
ULONG ulOrdinal; /* Ordinal of entry in name list */
ULONG ulFSAInfoLevel; /* Type of attached FSD data required */
ULONG cbBuffer; /* Buffer length */
PBYTE pszFSDName; /* pointer to FS name */
PBYTE pFSData; /* pointer to FS data */
APIRET rc; /* Return code */
ULONG DriveNumber; /* Drive number */
ULONG FSInfoLevel; /* File system data required */
UCHAR FSInfoBuf[40]; /* File system info buffer */
ULONG FSInfoBufSize; /* File system info buffer size */
BYTE fsqBuffer [ sizeof(FSQBUFFER2) + (3 * CCHMAXPATH) ];
PFSQBUFFER2 pfsqBuffer = (PFSQBUFFER2) fsqBuffer;
ulOrdinal = 0; /* ignored for this info level */
cbBuffer = sizeof(fsqBuffer); /* Length of data buffer */
DriveNumber = toupper(argv[1][0])-'A'; /* Specify drive C */
DriveNumber++;
FSInfoLevel = FSIL_ALLOC;
/* Indicate that file system allocation */
/* information is requested */
FSInfoBufSize = 40; /* Size of return data buffer */
rc = DosQueryFSInfo(DriveNumber, FSInfoLevel, FSInfoBuf,
FSInfoBufSize);
/* On successful return, the data buffer */
/* FSInfoBuf contains a set of */
/* information about space allocation */
/* within the specified file system */
if (rc != 0) printf("DosQueryFSInfo error: return code = %ld", rc);
else printf("Disk information Buffer contains:\n\t%s\n",FSInfoBuf);
return 0;
}
After a bit of playing around and then displaying each position of the
FSInfoBuf I now realize that different values are returned, BUT what is
the format of the information? 40 bytes leaves me lots of
possibilities!
David Johnson
* You can't make a silk purse out of a sow's ear.
---
* RoseReader 2.50* P004198 Entered at [PROGRAMMERS GLD]
--- QScan v1.067b
* Origin: Programmer's Guild BBS, Hamilton, Ont. (1:244/317)SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413 SEEN-BY: 711/430 807 808 809 934 942 712/353 623 713/888 800/1 @PATH: 244/317 300 99 12/12 270/101 396/1 3615/50 229/2 12/2442 @PATH: 711/409 54/54 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.