Guest dldaniele Posted December 8, 2004 Posted December 8, 2004 I would like to obtain the internal volume ID of the local harddrive. Using the GetVolumeSerialNumber function in Kernel32.dll, this should be possible. The following code receives an error in the call. Any assistance would be appreciated. I am using the latest beta downloaded Dec 7, 2004. $serialno = 0 $returned = DllCall("kernel32.DLL", "long", "GetVolumeSerialNumber", "str", "C:\", "str", "", "long", 0, "long", 0, "long", 0, "long", 0, "long", 0, "long", 0) if @error = 1 then Tooltip(" error in call " & $serialno, 0,0) sleep (5000) exit endif tooltip (" Drive Serial is " & $returned[4] & " ---", 0,0) sleep (5000) Thanks, Dean
Guest dldaniele Posted December 8, 2004 Posted December 8, 2004 seems you need to supply some ommitted info... try this...$serialno = 0 $returned = DllCall("kernel32.DLL", "int", "GetVolumeInformation", "str", "C:\",_ "str", "", "long", 64, "long_ptr", 0,_ "long_ptr", 2048, "long_ptr", 0, "str", "",_ "long", 64) if @error = 1 then Tooltip(" error in call " & $serialno, 0,0) sleep (5000) exit endif tooltip (" Drive Serial is " & $returned[4] & " ---", 0,0) sleep (5000)<{POST_SNAPBACK}>Larry, Thanks for the feedback... works great!!Regards,Dean
layer Posted December 8, 2004 Posted December 8, 2004 and... next time post in the "Support Forum" =) please, thank you... but we all make mistakes =) FootbaG
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now