Sto portando una parte di codice da .NET a C++ "standard", ma non sono molto esperto del primo...
Questo è il codice che ho:
codice:
PBYTE PropertyValueBuffer;
DWORD dwRegSize;
//...
PropertyValueBuffer = (BYTE *) malloc (dwRegSize);
//...
//PropertyValueBuffer gets filled with a
//REG_MULTI_SZ (array of null terminated strings).
//To find a device, we only care about the very first string in the
//buffer, which will be the "device ID".
String^ DeviceIDFromRegistry = gcnew String((char *)PropertyValueBuffer);
L'unico punto dolente è l'ultima riga... io vorrei sostituirla con qualcosa del genere:
codice:
string DeviceIDFromRegistry = ...
Qualcuno potrebbe darmi un suggerimento?
Grazie in anticipo!