|
mav.northwind wrote: Hi!
I think Win32_DiskDrive.PNPDeviceID is unique. I tried it with two idential usb sticks and they gave different PNPDeviceID's.
Hi Mav... Tried that but unfortunately I think I couldn't use that, as windows gives your pen-drive a different PNPDeviceID each time you plug it in. =) I needed something that could tell "Oh, this is Jimmy's pen-drive" for instance. I am developing an app in which, along with user and password, the client system has to provide an unique ID for the pen-drive being used with the app. Any other ideas?
Regards...
Vini
|
|
|
|
|
You might be able to gleen something useful from this[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
ReHi!
At least with the 4 sticks (3 different brands) I tried it with, they all kept their PNPDeviceID, even when I plugged them into another computer.
But your mileage may vary...
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
mav.northwind wrote: At least with the 4 sticks (3 different brands) I tried it with, they all kept their PNPDeviceID, even when I plugged them into another computer.
But your mileage may vary...
You're quite right, mav... Looking through msinfo32.exe I could check that it remains the same, actually. I also tested on another workstation.
Thanks a lot for your help.
And btw: the link that Dave (if Im not wrong) posted is very nice. If you wanna take a peek:
http://msdn.microsoft.com/coding4fun/someassemblyrequired/isthatyou/default.aspx
Cheers,
|
|
|
|
|
Marcos Accioly wrote: And btw: the link that Dave (if Im not wrong) posted is very nice. If you wanna take a peek:
http://msdn.microsoft.com/coding4fun/someassemblyrequired/isthatyou/default.aspx
Yup, I already browsed through it. Very nice, indeed.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Hi again mav,
I actually tried the PNPDeviceID for my LG UP3D USB Device and it simply informed nothing. *But* going to msinfo32.exe gives me the following output:
LG UP3D USB Device USBSTOR\DISK&VEN_LG_UP3D&PROD_&REV_\200508010001&0
USB Mass Storage Device USB\VID_043E&PID_7090\200508010001
which tells me that windows actually has a PNPDeviceId for it, that being VID_043E&PID_7090 (according to the article at Coding4Fun about the wireless usb PC Lock).
Now the question is: Why?
you can check out a printscreen I've done of the simple app for identifying the hardware HERE
Cheers,
Vini
|
|
|
|
|
The wonders of windows...
I'm afraid I don't have the faintest idea why
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
hi there,
I have the following MATLAB function:
function y=drwmesh(FNo,V1,V2,T)
figure(FNo)
x=[-10:2.5:60]; y=[-20:2.5:35];
[sx sy]=MESHGRID(-10:60,-20:35);
h=STREAMLINE(V1',V2',sx,sy);
set(h,'color','red'); view(2);
xlabel('Longitude'); ylabel('Latitude');
title(T);
y=0;
I have converted it to (.dll) file by using MATLAB Builder for COM.
My problem is that I don't know how to pass the parameters: FNo(Figure No.) which is integer and the two matrices V1,V2 and the string T.
Woudl u plz write me the C# code? plz help me!!
Note: I'm using "Extreme Optimization Mathematics Library for .NET" to creat and perform matrix operatins.
Thanks in advance,
Jr.Allam
|
|
|
|
|
Hi,
If i send a comman to a device which is attached to my serial port.
How can i save the response i get?
Thanks in advance!
|
|
|
|
|
Yustme wrote: How can i save the response i get?
Create a file and write the data to the file
led mike
|
|
|
|
|
You have to register an event in the serialport class like this
SPort.DataReceived += new SerialDataReceivedEventHandler(SPort_DataReceived);
In the eventhandler you can read the data in the buffer by char or by the whole string using the following methods
ReadChar()
ReadExisting();
|
|
|
|
|
Hello,
Just i want to ask you that can we set system's default sound device through
programmitically.
I just explore my questions as, I have two sound cards connected to my pc.
One is my inbuilt and i have connected anothor USB sound card to PC.
Now, the inbuild sound card in my default sound card and i want to make second one
i.e. i want to make USB sound card as default when my application starts and when application is
shutting down i want to make it as default.
Thanks in advance.
Rahul Kulkarni.
|
|
|
|
|
Hello
you should be looking Here[^]
Regards
|
|
|
|
|
How to move e-mail item from inbox folder to another folder (backup) Using Microsoft Outlook 2002, in C# ?
Thanks!
Manoel Bonin
|
|
|
|
|
Hi everybody.
I use Visual C# w managed DirectX to load the mesh. It looks fine, but the
edges are raugh. When I adjust the light, it looks somewhat better, but it is
still not good. I tried changing the camera near and far plain, making the
object bigger so more pixels are used to render the object, removed all other
objects from the scene so Z-fighting would not be the issue, but to no avail.
When I load the mesh into 3DS Max it looks perfect, so it is not the object
itself. The edges look as if not being antialiased, but I have no clue how to
go with this.
Any help would be appreciated.
Thanks.
|
|
|
|
|
hi, was hoping to get some help with a problem of mine.
i get an error when i run this saying that Control.Invoke is required.
However i want to avoid using delegates since it eats up a lot of resources.
how do i do this?
is it even possible?
thanks!
|
|
|
|
|
Hello
lushgrass wrote: i get an error when i run this
What is this exactly??!
lushgrass wrote: i want to avoid using delegates since it eats up a lot of resources.
Who on earth said that?!!
lushgrass wrote: is it even possible?
Depends on what you are trying to do?? Some details and a bit of code will be very helpful.
Regards
|
|
|
|
|
Nader Elshehabi wrote: i want to avoid using delegates since it eats up a lot of resources.
Who on earth said that?!!
Well since every callback instantiates a thread, hence consumes a resource, he is correct on this point
codito ergo sum
|
|
|
|
|
hello
BadKarma wrote: every callback instantiates a thread
Pardon me but, I totaly disagree. Delegates don't make threads by themselves unless you call them asynchronously. Here is a small demo:
private delegate void MyDel();
MyDel NewDel;
Form1()
{
NewDel = new MyDel(MyDelMethod);
}
void MyLink_Click(object sender, EventArgs e)
{
for (int i = 0; i < 5; i++)
Invoke(NewDel);
}
private void MyDelMethod()
{
MessageBox.Show("Hello");
}
You will see that the Invoke call is blocked by the Messagebox.Show and the second message isn't shown until you close the previous one. Also because the Invoke was called from the main thread, you will see that the UI is blocked as well.
Regards
|
|
|
|
|
Hi,
you are right
thanks for reminding me that delegates can also be used in singlethreaded manner
(i've been stuck for a little while with inner thread communication using delegates, which is a resource bloat )
codito ergo sum
|
|
|
|
|
well, basically, is there any way to force the gui to update without delegates?
the only way i can currently think of is by having the gui update itself on a timer.
then have a flag that sets true when there are changes to be made.
|
|
|
|
|
Hello
lushgrass wrote: is there any way to force the gui to update without delegates?
Usually any changes made to your controls' contents -like adding/removing items, etc...- are automatically updated and viewed. Yet you can force your UI to refresh itself using Refresh() method.
lushgrass wrote: the only way i can currently think of is by having the gui update itself on a timer.
You can issue Refresh() or Invalidate() calls from methods that alter the content of a certain control only to that control. Yet again if you still want to refresh your entire UI, no problem!
lushgrass wrote: then have a flag that sets true when there are changes to be made.
In the old times we called that bool modified in the document class of MFC, but why use it in C#?? I'm sure you don't need all that complexity!!
Regards
|
|
|
|
|
HI
Just i want to know the want is the use of singletone class and please write a simple code to create a sinlgetone class and and how its implement.
Thanks in advance.
Thanks n Regard,
Srinandan
|
|
|
|
|
There are tons of information on this topic in the internet. Try googling.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|