Click here to Skip to main content
15,888,816 members
Home / Discussions / C#
   

C#

 
AnswerRe: Visual Basic Commission Switch Statement + Calc Pin
Dave Kreskowiak15-Jun-21 17:44
mveDave Kreskowiak15-Jun-21 17:44 
AnswerRe: Visual Basic Commission Switch Statement + Calc Pin
Richard Deeming15-Jun-21 22:07
mveRichard Deeming15-Jun-21 22:07 
GeneralRe: Visual Basic Commission Switch Statement + Calc Pin
Member 1524886716-Jun-21 9:36
Member 1524886716-Jun-21 9:36 
QuestionGet serial number from local printers connected to workstation by USB Pin
SzakiII15-Jun-21 2:28
SzakiII15-Jun-21 2:28 
AnswerRe: Get serial number from local printers connected to workstation by USB Pin
Gerry Schmitz15-Jun-21 9:21
mveGerry Schmitz15-Jun-21 9:21 
AnswerRe: Get serial number from local printers connected to workstation by USB Pin
Randor 15-Jun-21 11:41
professional Randor 15-Jun-21 11:41 
GeneralRe: Get serial number from local printers connected to workstation by USB Pin
Gerry Schmitz15-Jun-21 13:13
mveGerry Schmitz15-Jun-21 13:13 
GeneralRe: Get serial number from local printers connected to workstation by USB Pin
Randor 15-Jun-21 14:06
professional Randor 15-Jun-21 14:06 
Hi Gerry,

Gerry Schmitz wrote:
A "Hardware Id" (or "instance" id) is not same as a Serial Number.
Some humble comments:

1.) Actually that is not entirely correct. The hardware ID is handled by the driver IRP_MN_QUERY_ID[^] request handler and might contain a serial number if Parameters.QueryId.IdType is set to BusQueryDeviceSerialNumber and if the device manufacturer/vendor has supplied it.

2.) A serial number is optional and might not be present. It is completely optional and the device manufacturer is not required to set this information.

3.) You can ask the device if it is capable of giving a serial number by sending a IRP_MN_QUERY_CAPABILITIES[^] request. If the device can supply a serial number then the UniqueID field in the DEVICE_CAPABILITIES structure[^] will be set to TRUE.

4.) The Windows operating system internally is using the device instance ID[^] to uniquely identify devices.

5.) The device instance ID is appended to the tail end of the hardware ID you mentined.

Best Wishes,
-David Delaune

P.S.

If the author of the post wants to write code that would only work with USB printers then he might be able to get something from the USB device descriptor[^]. The USB_DEVICE_DESCRIPTOR structure[^] which contains the same unique identifier. I believe it is also optional and the manufacturer is not required to set this information.

Best Wishes,
-David Delaune
Questionhow to convert Character codes HTML to arabic using c# Pin
michael nabil14-Jun-21 8:30
michael nabil14-Jun-21 8:30 
AnswerRe: how to convert Character codes HTML to arabic using c# Pin
Richard Deeming14-Jun-21 22:02
mveRichard Deeming14-Jun-21 22:02 
GeneralRe: how to convert Character codes HTML to arabic using c# Pin
michael nabil15-Jun-21 3:00
michael nabil15-Jun-21 3:00 
GeneralRe: how to convert Character codes HTML to arabic using c# Pin
Richard Deeming15-Jun-21 3:26
mveRichard Deeming15-Jun-21 3:26 
AnswerRe: how to convert Character codes HTML to arabic using c# Pin
Gerry Schmitz15-Jun-21 6:14
mveGerry Schmitz15-Jun-21 6:14 
QuestionHow to add row headers to DataGridView? Pin
Alex Dunlop9-Jun-21 19:16
Alex Dunlop9-Jun-21 19:16 
AnswerRe: How to add row headers to DataGridView? Pin
OriginalGriff9-Jun-21 20:13
mveOriginalGriff9-Jun-21 20:13 
GeneralRe: How to add row headers to DataGridView? Pin
Alex Dunlop9-Jun-21 21:53
Alex Dunlop9-Jun-21 21:53 
GeneralRe: How to add row headers to DataGridView? Pin
OriginalGriff9-Jun-21 22:07
mveOriginalGriff9-Jun-21 22:07 
GeneralRe: How to add row headers to DataGridView? Pin
Alex Dunlop9-Jun-21 22:10
Alex Dunlop9-Jun-21 22:10 
GeneralRe: How to add row headers to DataGridView? Pin
OriginalGriff9-Jun-21 22:25
mveOriginalGriff9-Jun-21 22:25 
GeneralRe: How to add row headers to DataGridView? Pin
Alex Dunlop9-Jun-21 22:39
Alex Dunlop9-Jun-21 22:39 
GeneralRe: How to add row headers to DataGridView? Pin
OriginalGriff9-Jun-21 22:41
mveOriginalGriff9-Jun-21 22:41 
GeneralRe: How to add row headers to DataGridView? Pin
Alex Dunlop9-Jun-21 23:08
Alex Dunlop9-Jun-21 23:08 
GeneralRe: How to add row headers to DataGridView? Pin
Alex Dunlop10-Jun-21 0:02
Alex Dunlop10-Jun-21 0:02 
GeneralRe: How to add row headers to DataGridView? Pin
OriginalGriff10-Jun-21 0:24
mveOriginalGriff10-Jun-21 0:24 
QuestionHow can i read a xml file with Linq? c# Pin
bart10008-Jun-21 9:07
bart10008-Jun-21 9:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.