10-21-2016, 02:33 PM
1. In C++ need only #include <devpkey.h> and maybe add some library. And install Windows SDK. In QM need to find DEVPKEY_Device_FriendlyName definition in devpkey.h and convert to QM. Attached devpkey.h from Win10 SDK. In PROPERTYKEY definition we see that it consists of GUID and int. One of ways to fill a GUID is memcpy uuidof.
2. QM _create is a shorter way to call CoCreateInstance. The MSDN example uses CoCreateInstance only for pEnumerator.
3. C++ LPWSTR in QM is word*. It is a raw Unicode string (just pointer).
4. Converts from Unicode UTF16 to QM string format, probably UTF8.
2. QM _create is a shorter way to call CoCreateInstance. The MSDN example uses CoCreateInstance only for pEnumerator.
3. C++ LPWSTR in QM is word*. It is a raw Unicode string (just pointer).
4. Converts from Unicode UTF16 to QM string format, probably UTF8.