Drive Volume Information 
Author Message
 Drive Volume Information

Hi,
Anybody know a way in Cobol to retrieve a computer drive volume information
ie. Volume name, serial number etc.
We have a routine in VB to do this, so another possibility is to find a way
to call a VB program from Cobol and have the parameter pass back to Cobol.

Can anybody offer any suggestion?
Thanks



Mon, 01 Nov 2004 14:54:02 GMT  
 Drive Volume Information

Quote:

> Hi,
> Anybody know a way in Cobol to retrieve a computer drive volume information
> ie. Volume name, serial number etc.
> We have a routine in VB to do this, so another possibility is to find a way
> to call a VB program from Cobol and have the parameter pass back to Cobol.

> Can anybody offer any suggestion?
> Thanks

You haven't specified which compiler, but with your reference to VB, guess it
has to be a PC. Check out any library routines available - if you compiler has
them. Another alternative there *may* be a an API routine by Young Kim - see
his :-

http://www.kimsoft.com/api-cobol/api-cobol.htm

Jimmy, Calgary AB



Tue, 02 Nov 2004 00:49:20 GMT  
 Drive Volume Information
Sorry forgot to tell you that I am using Fujitsu Version 5.0 on a Win 2K PC.


Quote:


> > Hi,
> > Anybody know a way in Cobol to retrieve a computer drive volume
information
> > ie. Volume name, serial number etc.
> > We have a routine in VB to do this, so another possibility is to find a
way
> > to call a VB program from Cobol and have the parameter pass back to
Cobol.

> > Can anybody offer any suggestion?
> > Thanks

> You haven't specified which compiler, but with your reference to VB, guess
it
> has to be a PC. Check out any library routines available - if you compiler
has
> them. Another alternative there *may* be a an API routine by Young Kim -
see
> his :-

> http://www.kimsoft.com/api-cobol/api-cobol.htm

> Jimmy, Calgary AB



Tue, 02 Nov 2004 07:11:37 GMT  
 Drive Volume Information
Rob,

I've never used this particular API, but I have used:

     CALL "GetWindowsDirectoryA" WITH STDCALL USING
                         BY REFERENCE WINDOWS-DIRECTORY
                         BY VALUE 240
                         RETURNING Returnvalue.

so that I know whether I'm running under Windows NT or 95/98/ME, and I
believe Windows 2000 still installs under WINNT (I'm not sure tonight,
however, I can check it out tomorrow at work).  I don't run W2K at home
since XP is the latest flavor of MS.  At work, I have a "triple boot" PC
that runs Win98/Win NT 4.0/Win 2000, but I honestly never paid any attention
to where Windows 2000 installed.

I've also used:

     CALL "GetDriveTypeA" WITH STDCALL USING
                         BY REFERENCE ROOTPATH-NAME
                         RETURNING Returnvalue.

to make sure that Users don't try to map a drive to a CD-ROM or floppy.

Although I'm using Fujitsu 6.1, I think the same API calls will work for
5.0.  You need to link with "kernel32.lib" and within that lib is
"GetVolumeInformationA", which should give you the information that you
need.  Unfortunately, I don't have the additional parameters to add to the
call, but I think others in this group can help you, or possibly a search of
"GetVolumeInformation" at the MS support site will give you the parameters.
You'll need to translate the "C" parameters to COBOL, as was done above, but
hopefully, this will give you a place to start.

Best of Luck,

Denny

"A Unisys Mainframe guy trying to become "semi" Fujitsu PC COBOL literate"


Quote:
> Sorry forgot to tell you that I am using Fujitsu Version 5.0 on a Win 2K
PC.



> > > Hi,
> > > Anybody know a way in Cobol to retrieve a computer drive volume
> information
> > > ie. Volume name, serial number etc.
> > > We have a routine in VB to do this, so another possibility is to find
a
> way
> > > to call a VB program from Cobol and have the parameter pass back to
> Cobol.

> > > Can anybody offer any suggestion?
> > > Thanks

> > You haven't specified which compiler, but with your reference to VB,
guess
> it
> > has to be a PC. Check out any library routines available - if you
compiler
> has
> > them. Another alternative there *may* be a an API routine by Young Kim -
> see
> > his :-

> > http://www.kimsoft.com/api-cobol/api-cobol.htm

> > Jimmy, Calgary AB



Tue, 02 Nov 2004 09:19:05 GMT  
 Drive Volume Information


Quote:
> Rob,

> I've never used this particular API, but I have used:

>      CALL "GetWindowsDirectoryA" WITH STDCALL USING
>                          BY REFERENCE WINDOWS-DIRECTORY
>                          BY VALUE 240
>                          RETURNING Returnvalue.

> so that I know whether I'm running under Windows NT or 95/98/ME, and I
> believe Windows 2000 still installs under WINNT (I'm not sure tonight,
> however, I can check it out tomorrow at work).  I don't run W2K at home
> since XP is the latest flavor of MS.  At work, I have a "triple boot" PC
> that runs Win98/Win NT 4.0/Win 2000, but I honestly never paid any
attention
> to where Windows 2000 installed.

> I've also used:

>      CALL "GetDriveTypeA" WITH STDCALL USING
>                          BY REFERENCE ROOTPATH-NAME
>                          RETURNING Returnvalue.

> to make sure that Users don't try to map a drive to a CD-ROM or floppy.

> Although I'm using Fujitsu 6.1, I think the same API calls will work for
> 5.0.  You need to link with "kernel32.lib" and within that lib is
> "GetVolumeInformationA", which should give you the information that you
> need.  Unfortunately, I don't have the additional parameters to add to the
> call, but I think others in this group can help you, or possibly a search
of
> "GetVolumeInformation" at the MS support site will give you the
parameters.
> You'll need to translate the "C" parameters to COBOL, as was done above,
but
> hopefully, this will give you a place to start.

Try:

http://www.allapi.net/



Tue, 02 Nov 2004 09:47:07 GMT  
 Drive Volume Information
Thanks for everyone help.
I've solved the problem using
     CALL "GetVolumeInformationA" WITH STDCALL USING
                                  By Value RootPathName
                                  By Value VolumeNameBuffer
                                  By Value VolumeNameSize
                                  By Reference VolumeSerialNumber
                                  By Reference MaximumComponentLength
                                  By Reference FileSystemFlags
                                  By Value FileSystemNameBuffer
                                  By Value FileSystemNameSize.


Quote:



> > Rob,

> > I've never used this particular API, but I have used:

> >      CALL "GetWindowsDirectoryA" WITH STDCALL USING
> >                          BY REFERENCE WINDOWS-DIRECTORY
> >                          BY VALUE 240
> >                          RETURNING Returnvalue.

> > so that I know whether I'm running under Windows NT or 95/98/ME, and I
> > believe Windows 2000 still installs under WINNT (I'm not sure tonight,
> > however, I can check it out tomorrow at work).  I don't run W2K at home
> > since XP is the latest flavor of MS.  At work, I have a "triple boot" PC
> > that runs Win98/Win NT 4.0/Win 2000, but I honestly never paid any
> attention
> > to where Windows 2000 installed.

> > I've also used:

> >      CALL "GetDriveTypeA" WITH STDCALL USING
> >                          BY REFERENCE ROOTPATH-NAME
> >                          RETURNING Returnvalue.

> > to make sure that Users don't try to map a drive to a CD-ROM or floppy.

> > Although I'm using Fujitsu 6.1, I think the same API calls will work for
> > 5.0.  You need to link with "kernel32.lib" and within that lib is
> > "GetVolumeInformationA", which should give you the information that you
> > need.  Unfortunately, I don't have the additional parameters to add to
the
> > call, but I think others in this group can help you, or possibly a
search
> of
> > "GetVolumeInformation" at the MS support site will give you the
> parameters.
> > You'll need to translate the "C" parameters to COBOL, as was done above,
> but
> > hopefully, this will give you a place to start.

> Try:

> http://www.allapi.net/



Tue, 02 Nov 2004 12:07:59 GMT  
 Drive Volume Information
Jerry,

Great Link!  I can see why the author feels the need to shut it down in a
few years.  What a wealth of information.

Thanks,

Denny


Quote:



> > Rob,

> > I've never used this particular API, but I have used:

> >      CALL "GetWindowsDirectoryA" WITH STDCALL USING
> >                          BY REFERENCE WINDOWS-DIRECTORY
> >                          BY VALUE 240
> >                          RETURNING Returnvalue.

> > so that I know whether I'm running under Windows NT or 95/98/ME, and I
> > believe Windows 2000 still installs under WINNT (I'm not sure tonight,
> > however, I can check it out tomorrow at work).  I don't run W2K at home
> > since XP is the latest flavor of MS.  At work, I have a "triple boot" PC
> > that runs Win98/Win NT 4.0/Win 2000, but I honestly never paid any
> attention
> > to where Windows 2000 installed.

> > I've also used:

> >      CALL "GetDriveTypeA" WITH STDCALL USING
> >                          BY REFERENCE ROOTPATH-NAME
> >                          RETURNING Returnvalue.

> > to make sure that Users don't try to map a drive to a CD-ROM or floppy.

> > Although I'm using Fujitsu 6.1, I think the same API calls will work for
> > 5.0.  You need to link with "kernel32.lib" and within that lib is
> > "GetVolumeInformationA", which should give you the information that you
> > need.  Unfortunately, I don't have the additional parameters to add to
the
> > call, but I think others in this group can help you, or possibly a
search
> of
> > "GetVolumeInformation" at the MS support site will give you the
> parameters.
> > You'll need to translate the "C" parameters to COBOL, as was done above,
> but
> > hopefully, this will give you a place to start.

> Try:

> http://www.allapi.net/



Tue, 02 Nov 2004 19:00:26 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Volume Drive Information

2. Drive Size and or Volume Label

3. How much free space on a drive/volume?

4. drive volume name...

5. Determining the volume ID for a file/drive?

6. Volume Information with CW2003

7. System Volume Information

8. LoveLetter Virus in C:\System Volume Information

9. Virus in System Volume Information

10. Getting Connected Drives Information

11. Hard Drive Information

12. Information about Message Driven Dataflow Language (MDDL)

 

 
Powered by phpBB® Forum Software