About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like
I was writing a test program that will perform some actions when a USB Memory Stick is inserted.
When this happens Windows send a Broadcast a WM_DEVICECHANGE message.
The wParam member of this Message contains a (pointer to) a DEV_BROADCAST_HDR structure.
if the dbch_devicetype member of this structure is of type DBT_DEVTYP_VOLUME then we can cast the structure to DEV_BROADCAST_VOLUME.
And finally the dbcv_unitmask member of that structure returns a Bitmask containing the Drive Letter.
A fast and convenient method to convert this Bitmask to a Drive Letter (the first found) is the function below:
function BitMaskToDriveLetter(const Bitmask: Cardinal): Char;
bsr eax, eax; // Find first Bit Set
add eax, 65; // 65 = ASCII value of A
.NET .NET FrameWork Active Directory Altiris Apple Automation Manager Citrix Dell Delphi Excel Exchange Exchange2003 Exchange2010 Hack HP iOS Java LinkedIn Linux Lync MSI Office Office 2010 Passat Password PowerPoint PowerShell RES RNS510 SasLibEx SCOM Security Terminal Server ThinApp TSAdminEx VBS VCDS Visual Basic Visual Studio VMWare Volkswagen VW Windows PE Wordpress XenApp