Creating an application for detecting USB devices ?


hello everyone,

i hoping can clear mu confusion. 

the main aim of building application in c# can used in software calling progid.

all need serial number of usb devices connected.

i tried following code :

static void main(string[] args)          {              resourcemanager rmgr = new resourcemanager();              object resources = null;              resources = rmgr.findrsrc("usb[0-9]*::?*");              string[] resource_list = (string[])resources;                foreach ( string msg in resource_list)              {                                    string[] array = msg.split(':',':','"').toarray();                                   console.writeline("serial number: " + array[6]);                  console.writeline(msg);              }  console.read();  }
 

here serial numbers.

but getting confused is, when want use code application( calibration software has scripting capability) , how serial number there? 

do have store serial number in variable , use same variable name in script of software?

or write function returns serial number , call function?

does make sense?

please let me know. 

thanks.


 

hi nmedelec,

i think simplest way save serial numbers plain text file(.txt or .xml), use script of software read file.

how to: reading , writing text files

reading , writing xml in c#


we trying better understand customer views on social support experience, participation in interview project appreciated if have time. helping make community forums great place.
click here participate survey.



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'