Write a C++ DLL function to list all the drive letters that are mounted to the same removable device.
**Hints:** Everything you need to complete this project is in this Code Project sample:
<[login to view URL]>
**int GetSameDeviceLetters(WCHAR drv_letter, PWCHAR result_letters);**
**Description:
**Find all drive letters that are mounted to the same removable device as drv_letter (case-insensitive). Save the result in result_letters. Return the number of drive letters saved in the result_letters parameter. result_letters is guaranteed to be at least 52 bytes (26 WCHARs).
**Hints:
**The Code Project sample above has everything you need. You do NOT need to research new methods. Just use the method in the sample which is proven to work and save you time!
In the sample, the [login to view URL] values are the same for volumes that belong to the same parent removable device. You can take advantage of this information to determine if 2 drive letters belong to the same parent device. Here's how to get the InstanceHandle in the Code Project sample:
<[login to view URL]>
## Deliverables
**Example:
**As shown in the "Safely Remove Hardware" window below, G: & F: belong to the same USB Mass Storage Device. I: & H: belong to another USB Mass Storage Device.
![][1]
Example 1:
WCHAR result_letters[26];
int num = GetSameDeviceLetters(L'G', result_letters);
After run: num = 2, result_letters = "GF"
Example 2:
int num = GetSameDeviceLetters(L'F', result_letters);
After run: num = 2, result_letters = "GF"
Example 3:
int num = GetSameDeviceLetters(L'I', result_letters);
After run: num = 2, result_letters = "HI"
Example 4:
int num = GetSameDeviceLetters(L'H', result_letters);
After run: num = 2, result_letters = "HI"
**Test program
**A simple command line test program should be delivered. The program should call the C++ function and print out the results. For example, in the above examples, the output would look like this (assuming the test program is called [login to view URL]):
C:\>test g
GF
C:\>test G
GF
C:\>test f
GF
C:\>test i
HI
C:\>test h
HI
====
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
Windows 2000 or above
C++
VS2005
a test program shoould be provided to show the dll works as specified