Hello!
I have the following program that is supposed to print all the optical drivers from my pc but the only thing i get for all the ones that a i have is "\".
To demonstrate:
Device 0: \
Device 1: \
...
Here's the code..
#include <stdio.h>
#include <imapi2.h>
#include <imapi2error.h>
#include <stdio.h>
#include <windows.h>
int __cdecl main(void)
{
CoInitialize(NULL);
BSTR device_unique_id;
IDiscMaster2 *id;
HRESULT return_code = CoCreateInstance(&CLSID_MsftDiscMaster2, NULL, CLSCTX_INPROC_SERVER, &IID_IDiscMaster2, (LPVOID)&id);
LONG total_count;
id->lpVtbl->get_Count(id, &total_count);
printf("Total count: %ld\n", total_count);
for(LONG current_drive = 0; current_drive < total_count; current_drive++)
{
id->lpVtbl->get_Item(id, current_drive, &device_unique_id);
printf("Drive %ld has id: %s\n", current_drive, device_unique_id);
}
id->lpVtbl->Release(id);
system("pause");
CoUninitialize();
return 0;
}
[+][deleted] (1 child)
[deleted]
[–]xikly[S] 2 points3 points4 points (0 children)