Getting the Physical Device Object for a specific volume id - windows

I want to query different flags of a specific volume. Input should be the volume id, for instance:
\\?\Volume{b1a245f3-0000-0000-0000-100000000000}\,
then some flags are checked and the output is true/false depending if the desired flags are set.
The question is: How can I retrieve the Physical Device Object for a specific volume id? Exists there a method which takes the volume id as input or do I have to enumerate over all device objects?

Related

RFID Unique serial number conversion to custom text

My USB-RFID reader receives a 10 bit ID from the card. I want to assign a unique name and surname to each 10-bit number.
My goal is to have the name appear on the screen when the person using the card reads the card. Is there any way I can do this?

Best method to store and retrieve data using multiple keys

As part of an application being developed in "C" language, clients would be sending requests with two 16-byte values and some data. One of the two 16-byte values is the per client UID and the other being some random unique object UID. So, server would be receiving below kind of data from clients:
From client1:
<Client UID1, obj UID1, random-data>
From client2:
<Client UID2, obj UID4, random-data>
From client3:
<Client UID3, obj UID5, random-data>
Upon receiving above information, server needs to store them in a kind of table and respond a 8-byte unique ID for each such request. Clients will come back to server using either the combination of <Client UID, Obj UID> or the unique 8-byte ID (generated by server) to operate on the random data associated with the <Client UID, Obj UID>.
As number of such requests received would be humongous, I cannot store them in an array and use the index as the 8-byte unique ID. Also it would force me to do linear kind of search for identifying the matching <Client UID, Obj UID>.
So, can I know how to organize the data in an efficient manner so that I would be able to index using both 8-byte unique ID and the combination of both <Client UID, Obj UID>?
I think, you need to use hash-table, and store/lookup data here.
It is very quick for add or update record.
If you using double hashing algorithm, you can use hashtable index as a unique 8-byte ID, to direct access into table cell without search. Of course, that index will be less than 8 bytes, but I think, you can pad it with 0s or so on.
You can get as basis my own double hash implementation in emerSSL project.

Create DropDowns that are based on which criteria are searched for

I am trying to allow the user to search on any of 4 criteria and have the rest of the 3 remaining field data validate based on the first search for selection.
I have four fields that I am trying to make dependent drop downs for the remaining 3 based on what you search for 1st. For example:
Scenario 1 - I search the data range validation for NAME and select a name in Cell L2.
I want the Phone, Email and Address to become dependent on the name was chosen (as there may be multiple records with the name of the person chosen).
I have accomplished this by using a secondary filter formula to filter address based on the name chosen and then applied data validation from the filter.
My problem is that I can't seem to figure out how to do the same thing if they pick the address first. Because my data validation is set on the filtered values and not the entire database. If they picked the address first, I want to validate based on ALL addresses and then filter-validate the NAME, PHONE and EMAIL.
I really just want them to be able to search whatever of the 4 criteria and then validate the other 3 on that result.
Any thoughts would help.
You can see my formula for filtering Addresses based on the Name selection in Cell S2 of the Customer Record Tab.
=if(L6="Address",filter('Sample Data'!$C:$C,'Sample Data'!$E:$E=L6),IF(L6="Phone",filter('Sample Data'!$C:$C,'Sample Data'!$D:$D=L3),IF(L6="Email",filter('Sample Data'!$C:$C,'Sample Data'!$J:$J=L4),L2)))
https://docs.google.com/spreadsheets/d/1E7adi88aEgvdV4ao8unbMHgZLEyu5CCRdTOjv8thjtc/edit#gid=1427488050
Select Name and only the Phones, Emails and Addresses for that selected name can be selected.
Select the Address and only the Names, Phones and Emails for that Address can be selected.
Same for Phone and for Email

Retrieve enterprise number from snmpget

I'd like to retrieve the unique enterprise number of a switch from an snmpget query
Is there any global OID to query?
I've tried with 1.3.6.1.2.1.1.1.0 that is nearly ok but I'd like to retrieve the unique number for the enterprise for example HP ---> 11
Thanks a lot
SysobjectID (or the OID 1.3.6.1.2.1.1.2.0 ) is the way to get the unique enterprise OID. It is the number following the 1.3.6.1.4.1
Here is description from the MIB documentation
"The vendor's authoritative identification of the
network management subsystem contained in the entity.
This value is allocated within the SMI enterprises
subtree (1.3.6.1.4.1) and provides an easy and
unambiguous means for determining what kind of box' is
being managed. For example, if vendorFlintstones,
Inc.' was assigned the subtree 1.3.6.1.4.1.424242,
it could assign the identifier 1.3.6.1.4.1.424242.1.1
to its `Fred Router'."

SNMP4J dynamic index value

I am trying to build a client to get values from an snmp enabled device using snmp4j. Using the OID and index number i can fetch the name and serial number of the device. But i heard that index number is not constant and it keeps changing.
Thou i may find the required index number (for example, of a network interface) among the SNMP OIDs, sometimes we may not completely rely on the index number always staying the same.
Index numbers may be dynamic - they may change over time and your item may stop working as a consequence.
SO i need to find a way as to how to fetch the index number dynamically. Or is there any way that i can get the serial number without hard coding the serial number.
One OID might have 150 index numbers each having an different value. i need to get a particular info from that table.
It's (unfortunately) not unusual that index numbers change. For example, some equipment will re-order some tables on reboot.
You probably already realized that if the index values are volatile, you won't be able to fetch the data in one request. But you could do it by "walking" the table.
Using the GetNextRequest, you can start at the column headers, and then proceed through the table, fetching all the data or just individual columns. For a more detailed example, see section 4.2.2.1 of RFC 1905:
https://www.rfc-editor.org/rfc/rfc1905
Assuming that there is some column in the table which will identify the correct card, you could either:
Walk only the identifying column, and from the values find the index of the card you want, then issue a single GetRequest for the serial number of that card
(More efficient) Walk both columns (identifier and serial number) by requesting those two column headers in the first request, etc. In the resulting data set, find the data for you card.

Resources