The key status returned from GetKeyState function changes as a specified thread reads key messages from its message queue. The status does not reflect the interrupt-level state associated with the hardware. Use the GetAsyncKeyState function to retrieve that information.
I have a problem. I have some USB flash media and i want to use it to store some key data for my software. The data are encrypted. In order to protect the media from direct copying i want to include Vendor ID, Product ID and serial number into the encryption key.
How to obtain VID, PID and serial?
I've tried two approaches:
1. Issue IOCTL_STORAGE_QUERY_PROPERTY on the drive in order to obtain STORAGE_DEVICE_DESCRIPTOR. It looked like these parameters are present in this structure. However looks like this works correctly only for SCSI. For IDE devices VendorID field is empty (NULL), ProductID field contains drive model string obtained via Identify command, SerialNo field is also empty. For USB drive the things are even worse: Vendor = "USB", Product = "Flash disk" and no serial number.
I've tried IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER, but on my flash drives it simply doesn't work. The documentation says it works only WinXP SP1 and only if the media is SCM-1 (Security content management)-compilant. That's all, approach no. 1 stopped here.
2. Traverse through a USB devices tree exactly in the same way as USBView does. Everything is okay, i see IDs and serials, but now i need to find out a drive letter under which the flash device is mounted from the hub name and port number? IOCTL_USB_GET_NODE_CONNECTION_NAME gives empty string on non-hubs. IOCTL_USB_GET_NODE_CONNECTION_DRIVERKEY_NAME works and gives me some ID, but what to do with it then?
Please help me.
I am using .NET framework 1.1 (Visual studio 2003.NET) and I have written some codes in VC and VC++. I want to add some XML tags to make documentation out of it. But it only supports XML tags for C#. As far as know Visual Studio 2005 (.NET framework 2) supports XML tags for VC, but I can not switch to it. I want to know if there are some tools that help me to make some documents with .chm extension out of the XML tags I have written or not?(in C#.NET I have written these tags and then I made the XML file out of them and by using NDOC, I have created files in .chm extension. Is there any way to make such documentation out of VC and VC++.NET?)
The ::SHGetSpecialFolderPath() function is available as part of Internet Explorer 4.0. I would like to emulate this function, on systems with an earlier version of Internet Explorer. Typically, I need my software to run on plain vanilla Windows NT 4.0.
I would like to know if it's possible to emulate this function using ::SHGetSpecialFolderLocation() which is available on my target platform?
The problem is :
::SHGetSpecialFolderLocation(CSIDL_APPDATA) returns an ITEMIDLIST that contains something like "Document and Settings" on my XP box, instead of something more like I would expect, something like "C:\Document and Settings\UserName\Application Data".
Should I revert to using an environment variable? Is there a better solution?
(Still not sure why you're creating a table for each name though...)
Well, the program is such that certain set of 'budget' data should be in one table. And when the user creates another 'budget' a new table with the new budget name has to be created. So if the user wants to delete the old 'budget' all I have to do is delete the table with that name. Makes life easy for me!
Last Visit: 31-Dec-99 19:00 Last Update: 3-Dec-23 21:28