Getting the FLoppy Disk Serial Number ?

 Hi!
 How can I Get the floppy Serial Number ?

I'm using the GetVolumeInfoA WIndows Api  but even all drivers
(A:,c:,cd-rom)  always return 0



Declaring  local external function
 FUNCTION boolean GetVolumeInformationA(ref string lpRootPathName,ref string
lpVolumeNameBuffer,ulong nVolumeNameSize,ref ulong lpVolumeSerialNumber,ref
ulong lpMaximumComponentLength,ref ulong lpFileSystemFlags,ref string
lpFileSystemNameBuffer,ulong nFileSystemNameSize)  Library "kernel32.dll"

boolean rtn
string lprootpathname = "a:"
string lpVolumeNameBuffer = space(256)
ulong nVolumeNameSize = 256
ulong lpVolumeSerialNumber
ulong lpMaximumComponentLength

mle_1.Text="Disk Information "

setnull(lpVolumeSerialNumber)
lpMaximumComponentLength = 256
ulong lpFileSystemFlags
setnull(lpFileSystemFlags)
string lpFileSystemNameBuffer = space(256)
ulong nFileSystemNameSize = 256

rtn = GetVolumeInformationA(lpRootPathName, lpVolumeNameBuffer,
nVolumeNameSize,&
lpVolumeSerialNumber, lpMaximumComponentLength, lpFileSystemFlags,&
lpFileSystemNameBuffer, nFileSystemNameSize)

mle_1.text += lprootpathname+char(13)+char(10)
mle_1.text += lpVolumeNameBuffer+char(13)+char(10)
mle_1.text += string(nVolumeNameSize)+char(13)+char(10)
mle_1.text += "Serial Number "
+string(lpVolumeSerialNumber)+char(13)+char(10)
mle_1.text += string(lpMaximumComponentLength)+char(13)+char(10)
mle_1.text += string(lpFileSystemFlags)+char(13)+char(10)
mle_1.text += string(lpFileSystemNameBuffer)+char(13)+char(10)
mle_1.text += string(nFileSystemNameSize)+char(13)+char(10)


-- 
Ing. Raymundo Betancourt Yanez
CSNet
(686)-560-1390
(686)-576-4025
Mision san Juan 3135
Mision del Valle
Mexicali B.C. M�xico 21376


0
Raymundo
11/14/2003 11:02:19 PM
sybase.powerscript 7704 articles. 0 followers. Follow

1 Replies
834 Views

Similar Articles

[PageSpeed] 13
Get it on Google Play
Get it on Apple App Store

boolean lb_ret
String VolName
uLong     VolSerial
uLong     MCompLen
uLong     VolFlgs
String   VolFileSys
string lpRootPathName
lpRootPathName = 'A:\'
VolName = Space(256)
VolFileSys = Space(256)
lb_ret = GetVolumeInformationA(lpRootPathName, VolName, Len(VolName),
VolSerial,MCompLen, VolFlgs, VolFileSys, Len(VolFileSys))

MessageBox('Serial Number', string(VolSerial))

HTH
Alex Osin


"Raymundo Betancourt" <raymundo.betancourt@laseresp.com> wrote in message
news:3fb55efb@forums-1-dub...
>
>  Hi!
>  How can I Get the floppy Serial Number ?
>
> I'm using the GetVolumeInfoA WIndows Api  but even all drivers
> (A:,c:,cd-rom)  always return 0
>
>
>
> Declaring  local external function
>  FUNCTION boolean GetVolumeInformationA(ref string lpRootPathName,ref
string
> lpVolumeNameBuffer,ulong nVolumeNameSize,ref ulong
lpVolumeSerialNumber,ref
> ulong lpMaximumComponentLength,ref ulong lpFileSystemFlags,ref string
> lpFileSystemNameBuffer,ulong nFileSystemNameSize)  Library "kernel32.dll"
>
> boolean rtn
> string lprootpathname = "a:"
> string lpVolumeNameBuffer = space(256)
> ulong nVolumeNameSize = 256
> ulong lpVolumeSerialNumber
> ulong lpMaximumComponentLength
>
> mle_1.Text="Disk Information "
>
> setnull(lpVolumeSerialNumber)
> lpMaximumComponentLength = 256
> ulong lpFileSystemFlags
> setnull(lpFileSystemFlags)
> string lpFileSystemNameBuffer = space(256)
> ulong nFileSystemNameSize = 256
>
> rtn = GetVolumeInformationA(lpRootPathName, lpVolumeNameBuffer,
> nVolumeNameSize,&
> lpVolumeSerialNumber, lpMaximumComponentLength, lpFileSystemFlags,&
> lpFileSystemNameBuffer, nFileSystemNameSize)
>
> mle_1.text += lprootpathname+char(13)+char(10)
> mle_1.text += lpVolumeNameBuffer+char(13)+char(10)
> mle_1.text += string(nVolumeNameSize)+char(13)+char(10)
> mle_1.text += "Serial Number "
> +string(lpVolumeSerialNumber)+char(13)+char(10)
> mle_1.text += string(lpMaximumComponentLength)+char(13)+char(10)
> mle_1.text += string(lpFileSystemFlags)+char(13)+char(10)
> mle_1.text += string(lpFileSystemNameBuffer)+char(13)+char(10)
> mle_1.text += string(nFileSystemNameSize)+char(13)+char(10)
>
>
> -- 
> Ing. Raymundo Betancourt Yanez
> CSNet
> (686)-560-1390
> (686)-576-4025
> Mision san Juan 3135
> Mision del Valle
> Mexicali B.C. M�xico 21376
>
>


0
Alex
11/15/2003 5:07:18 AM
Reply:

Similar Artilces:

How to get hard disk serial number for NT
For windows 95 and 98, I can use an API call 'GetVolumeInformationA' to get the hard disk number of a local hard-disk. However it does not work for NT 4.0 workstation and servers. The serial number returned is '0000-0000' which is incorrect. Please advice if there is another specific API call for getting serial number from a NT 4.0 workstation. Tilden That function is supposed to work on NT as well. However, the function itself has a bug with regard to reporting the serial number for remote drives. You might want to look at: http://support.microsoft.com...

Need code to get hard disk serial number
Does anyone have a working piece of PowerScript code to read the hard disk volume serial number under Win95? This is the eight character string (such as '3733-1ED8') that you see when you run the ChkDsk command. Thanks in advance, Justin - Remove the X from my reply to address! - Justin Purington jnp@mottthehoople.mv.com - Use this API function GetVolumnInformationA( ) This function returns information about the harddrive. Global External Function: FUNCTION boolean GetVolumeInformation(ref string lpRootPathName,ref string lpVolumeNameBuffer,ulong nVolu...

Get Hard Disk Serial Number Delphi XE3
I have been using this great component from Devlib for many years in D7, D2010 and XE2 http://www.devlib.net/tgetdiskserial.htm The Delphi XE3 VCL installs without problem, but in an application the GetDiskSerial registrations are not recognised and Delphi... crashes (Close down)! They claim it works but not on my computer. Please install this and report if it works on your Delphi XE3 system? > {quote:title=Pieter van Wyk wrote:}{quote} > Please install this and report if it works on your Delphi XE3 system? I looked as far as the 'buy' button and just started laughing...

Getting MAC address or Serial number of Hard disk
Hi, I would like to track whether my client come back my site or not. Is it possible to get MAC address or Serial Number of hard disk of client PC accessing our site?ThanksTran Hong Quang There is no direct way of doing this in ASP.NET. However, you could use WMI in ASP.NET, and I beleive WMI can tell you that information.Cheers,       Kevin JonesMy Blog...

How to get the hard disk serial number of a network drive?
I know that there is a function called 'GetVolumeInformationA' and with this funcion, I can get the serial number of a local drive. However when I change the local drive to network drive (say Z:) as below: lb_ret = GetVolumeInformationA("Z:\", VolName, Len(VolName), VolSerial, MCompLen, VolFlgs, VolFileSys, Len(VolFileSys)) 0 instead of a proper serial number is returned as the VolSerial. Please advise! Tilden Lau Doesn't the solution given for the local harddrive on wednesday work on the network? -Charles Tin wrote: > I know tha...

disk serial number
Hi all. I nedd to get informations about local hard disk, i need mainly to get the disk serial number. using PB 10.5 Windows Xp and/or Vista I already try to use the 'kernel32.dll' function GetVolumeInformationA but I it gives me no informations. this is my code: --------------------------- FUNCTION boolean GetVolumeInformationA( ref string lpRootPathName,ref string lpVolumeNameBuffer,long nVolumeNameSize,ref uint lpVolumeSerialNumber[2], ref long lpMaximumComponentLength, ref long lpFileSystemFlags,ref string lpFileSystemNameBuffer,long nFileSystemNameSize ) ...

IDE Serial Number does not match Licence Serial Number
I just ordered a boundle key. This is because I have reinstalled all my Delphi versions on a new computer. I installed RAD Studio XE4, RAD Studio XE2 and RAD Studio XE In RAD Studio XE I want to install Intraweb XI. I followed the instructions and first uninstalled Intraweb and then did a install but the install does not not accept the key. The install is called IW11.0.60.exe Please help me. This is very important. /Mikael ...

Get Hard disk serial no.
Hi, I have a requirement, where I need help. We are developing a VB application, where I need to avoid users from misusing the application. So we track the serial no of the hard disk on which he has installed the program. But the issue here is that we are not able to get the actual Harddisk number of the system from where we are running the application. We are making use of an OCX file and try to get the Serial No. This OCX returns the serial no of the hard disk on which the application is developed on. But if the same app is run from a differnt system as an exe, then it returns the sl...

To get unique serial number
Do you have a program tips to create a unique serial number to use in a purchase order working in multiuser environment With thnaks Polachan POLACHAN wrote: > Do you have a program tips to create a unique serial number > to use in a purchase order working in multiuser environment Autoincrement. Dmitri. Thanks for the reply But the problem of auto incriment is the chance for loosing the numbers also it is very diffcult to give incriment on given condition. I am using MS Access database and powerbuilder 11.2 Is any other way to get unique serial numbers by sel...

How to get a Serial Number of a motheboard
Hi! i need to know if exist some lines to get the Serial number of a motherboard with Power Builder, I wanna make an application like Everest (i dream too) I 'm using PB 9 Best regards There is nothing built into PB to obtain that information. You'll have to make a call to the operating system to ask for that information. Check the documentation for your operating system to obtain the correct function to call then code it as an external function call in PB. Regards John "Diego Ramirez" <Alcidesdramirez@gmail.com> wrote in message news:fbf8e3d3-b2f...

Getting a the HD serial number
I have tried to use the API function GetVolumnInformationA in order to get the serial number of an hard disk. I used the sample code provided by infobase and also provided by sybase but I can't get it working. An ideas ? Regards, Guillaume Sample Code used : GetVolumnInformationA( ) This function returns information about the harddrive. Global External Function: FUNCTION boolean GetVolumeInformation(ref string lpRootPathName,ref string lpVolumeNameBuffer,ulong nVolumeNameSize,ref ulong lpVolumeSerialNumber,ref ulong lpMaximumComponentLength,ref ulong lpFileSy...

get volume serial number
can anyone help me get this working for asp.net server control using vb ? doesn't compile, error on "disk.Properties" and "response.write" ============== command line ================ vbc /t:library /out:volume.dll /r:System.web.dll /r:System.dll /r:System.Management.dll /r:System.Web.dll *.vb pause ============== code ================ Imports System Imports System.Management Imports System.web Class Disk Public Shared Sub Main() Dim drive As String = "C" Dim disk As ManagementObject = New Manageme...

Hard Disk Serial Number
Hi All, I there any one who can tell me how to get a Hard Disk Serial number(Volum Number). Thanks PS: I am really appreciate if you could give me the code. GetVolumeInformationA. Here's the declaration for it: FUNCTION boolean GetVolumeInformationA( string lpRootPathName, // address of root directory of the file system REF string lpVolumeNameBuffer, // address of name of the volume ulong nVolumeNameSize, // length of lpVolumeNameBuffer REF ulong lpVolumeSerialNumber, // address of volume serial number REF ulong lpMaximumCompon...

How do I get a vaild serial number?
I took advantage of the RAD Studio 2009 deal for those that had just bought D2009. Has anyone else done this and managed to register the upgrade? The supplied serial number (from a CG online purchase) returns a message that it has expired when I try to register it. I've logged the problem with CG Support (ref 00D57Mdw.50055bNLL), but they don't seem to have read the original message. They just explain how to run the license manager to generate the error message I had already sent them. I've tried the web method as well - and I get a similar expired message for my new ser...

Web resources about - Getting the FLoppy Disk Serial Number ? - sybase.powerscript

The Latest: US defense secretary welcomes sailors' release
TEHRAN, Iran (AP) — The latest developments following the release of 10 U.S. Navy sailors detained by Iran after entering its territorial waters ...

Confusion over David Bowie's death creates uncomfortable moment on reality TV show
LONDON - Celebrity Big Brother contestant Tiffany Pollard, ended up in an unbearably awkward situation on Tuesday night after she wrongly assumed ...

We're hiring a Senior Fintech Analyst for our subscription research service!
Click here to apply for this position We're hiring a Senior Research Analyst to help launch our London-based Fintech research team, as part ...

The Latest: Number of Germans killed in Istanbul rises to 10
ISTANBUL (AP) — The latest on the investigation into the explosion in the historic center of Istanbul. All times local.

21 times 'Star Wars' actress Daisy Ridley's Instagram was out of this world awesome
LONDON — We all already know that Rey, the badass heroine of the Star Wars: The Force Awakens is awesome, but did you know that the actress who ...

Pride in North Korea nuclear tests eroded by daily grind
Reuters Pride in North Korea nuclear tests eroded by daily grind Reuters SEOUL Oh Hyun-min was in middle school when North Korea conducted ...

Ricky Gervais reacts after being slammed for 'transphobic' Caitlyn Jenner jibe
Ricky Gervais has defended his decision to target Caitlyn Jenner in his Golden Globes opening monologue, after being accused of being 'transphobic'. ...

Rams Returning to Los Angeles; Chargers May Join Them
The Rams, which played in Los Angeles for 48 years before moving to St. Louis in 1994, are headed back. They may have company. ESPN : A long ...

What to Do with the Money If You Actually Win Tonight's Powerball Jackpot
You have a better chance of getting hit by lightning in a frog thunderstorm than you do winning the Powerball, but hey, it’s always fun to play ...

Google virtual reality reorg reveals surprising worry
Google is super-keen on virtual reality. That’s the obvious conclusion of a management shuffle that saw Clay Bavor told to focus only on VR and ...

Resources last updated: 1/13/2016 12:43:48 PM