Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Volume Serial Number 1

Status
Not open for further replies.

teknik

Programmer
Feb 27, 2001
33
IN
We are using "RUN VOL" command to get the volume serial number of a drive in Visual Foxpro 6.0. But due to the RUN command VFP runs the VOL command on the DOS prompt because of which the screen goes blank for a second. Is there an other way to get the volume serial number?
 
Hi Tesar,
Can you please be more specific as to how to use this in Visual Foxpro? We do not want the screen to go blank when the command is executed. Can the volume serial number be acquired only through the VOL command or is there any other method to do this ?
 
Try the code in - "How to Use the GetVolumeInformation API Call".

Note: It appears that MS's new way of specifing access to the KB articles doesn't produce a "clickable" link here, so you'll have to copy it (out through the Q139547) to your browser's URL Address window.

Rick
 
Why don't you try the following:


lcProg2Run = [Vol] && where Vol is the command to execute

DECLARE INTEGER WinExec IN kernel32 ;
STRING lpCmdLine ,;
INTEGER uCmdShow
=winexec(lcprog2run,0)
*0 = Hide
*1 = Normal
*3 = Maximized
*6 = Minimized




This will define a function you can call.
The "0" parameter (hide) will execute Vol in a hidden window, meaning you won't see it.

Hope that helps

Rianeiro
rianeiromiron@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top