473,657 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

API call for hdd firmware

13 New Member
Hello
This code works nicely for some of the hard disk specs but it doesn't cover getting the firmware of the drive. Does anyone know how to get that?...
Expand|Select|Wrap|Line Numbers
  1. Private Sub btnGetDriveType_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetDriveType.Click
  2.         Dim rootPathName As String
  3.         rootPathName = txtDriveLetter.Text & ":" & Path.DirectorySeparatorChar
  4.  
  5.         Select Case Win32API.GetDriveType(rootPathName)
  6.             Case 2
  7.                 txtFunctionOutput.Text = "Drive type: Removable"
  8.             Case 3
  9.                 txtFunctionOutput.Text = "Drive type: Fixed"
  10.             Case Is = 4
  11.                 txtFunctionOutput.Text = "Drive type: Remote"
  12.             Case Is = 5
  13.                 txtFunctionOutput.Text = "Drive type: Cd-Rom"
  14.             Case Is = 6
  15.                 txtFunctionOutput.Text = "Drive type: Ram disk"
  16.             Case Else
  17.                 txtFunctionOutput.Text = "Drive type: Unrecognized"
  18.         End Select
  19.     End Sub
  20.  
I'm using VS 2008
thanks, Steve
Aug 6 '10 #1
1 1476
Frinavale
9,735 Recognized Expert Moderator Expert
Instead of using the Win32API I recommend that you check out the DrivInfo class which is part of the System.IO namespace. I don't know if it will give you the firmware version but at least it's managed code :)

-Frinny
Aug 10 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

13
4124
by: Bern McCarty | last post by:
I have run an experiment to try to learn some things about floating point performance in managed C++. I am using Visual Studio 2003. I was hoping to get a feel for whether or not it would make sense to punch out from managed code to native code (I was using IJW) in order to do some amount of floating point work and, if so, what that certain amount of floating point work was approximately. To attempt to do this I made a program that...
4
4279
by: John | last post by:
Hi all, This really is quite an urgent matter. I have a page with multiple, dynamically-loaded user controls and when a user clicks on a button, the whole form is submitted. Now at this stage I know I need to call a function that will save data but I'm not sure exactly when to call this function. I've tried two ways and both seem to have 'gotcha's':
13
26591
by: mitchellpal | last post by:
i am really having a hard time trying to differentiate the two..........i mean.....anyone got a better idea how each occurs?
13
9704
by: shsingh | last post by:
I have a class A containing some map as data variables. I creat an object of class A on heap by allocatiing memory by using "malloc". This will return me the required memory but the object is not initialized properly as constructor same is not get called ( as per the behavior). How to call a constructor explicitly if we want to allocate memory using malloc ?
1
2635
by: Neo | last post by:
Hi, I dont know if this is the right forum to ask but I would like to know what is firmware testing is all about. I have been asked if I am interested in this but have not worked in this area before(I am from hardware background) so please let me know of any links or sites which can give me an idea. thanks, Neo
3
4778
by: cberthu | last post by:
Hi all, Is it possible to have two connects in the same rexx script to different DB's? I have to get data form on DB (with specifics selects and filter out some values with RExx) and save the results into another DB? I know from Wscripts and MS-Sql that you can build just two objects but I did not see something like that in REXX. Thanks in advance for your help
9
3267
by: CryptiqueGuy | last post by:
Consider the variadic function with the following prototype: int foo(int num,...); Here 'num' specifies the number of arguments, and assume that all the arguments that should be passed to this function are of type int. (My question has nothing to do with the definition of the function foo, so don't bother about it.) If I call the function as: foo(2,3,4,5,6,7,8);/*More arguments than expected*/
2
1861
by: cmdolcet69 | last post by:
I have the following code that will request the Version of firmware from the device. The problem is how can i display this in a textbox control? Below are the specs of the call: VER Description: The firmware version command allows for the master to check which version of firmware is loaded on the slave device. Firmware version is hard coded and cannot be changed by the factory of end user.
6
4051
by: james457 | last post by:
Hi all, I am sending data from a linux application through serial port to an embedded device. In the current implementation a byte circular buffer is used in the firmware. (Nothing but an array with a read and write pointer) As the bytes come in, it is written to the circular bufffer. Now the PC application appears to be sending the data too fast for the firmware to handle. Bytes are missed resulting in the firmware returning...
0
2684
by: demize | last post by:
Does anyone have or could upload these files for the T459? They are the original firmware for the Samsung Gravity. All help would be appreciated. T459UVHI4 T459_PNX6511 Another question is , where could I obtain FOTA Downloader II? Has anyone heard of it? Thanks guys.
0
8394
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8306
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7327
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6164
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.