diff --git a/samples/vboxwrapper/vbox_win.cpp b/samples/vboxwrapper/vbox_win.cpp index b44a82b581..90dd59861e 100644 --- a/samples/vboxwrapper/vbox_win.cpp +++ b/samples/vboxwrapper/vbox_win.cpp @@ -71,41 +71,41 @@ int virtualbox_initialize() { int virtualbox_cleanup() { // Cleanup. - CoUninitialize(); + CoUninitialize(); return 0; } int virtualbox_enumeratevms() { - HRESULT rc; - - SAFEARRAY *machinesArray = NULL; - - rc = pVirtualBox->get_Machines(&machinesArray); - if (SUCCEEDED(rc)) - { - IMachine **machines; - rc = SafeArrayAccessData (machinesArray, (void **) &machines); - if (SUCCEEDED(rc)) - { - for (ULONG i = 0; i < machinesArray->rgsabound[0].cElements; ++i) - { - BSTR str; - - rc = machines[i]->get_Name(&str); - if (SUCCEEDED(rc)) - { - fprintf(stderr, "Name: %S\n", str); - SysFreeString(str); - } - } - - SafeArrayUnaccessData (machinesArray); - } - - SafeArrayDestroy (machinesArray); - } - + HRESULT rc; + + SAFEARRAY *machinesArray = NULL; + + rc = pVirtualBox->get_Machines(&machinesArray); + if (SUCCEEDED(rc)) + { + IMachine **machines; + rc = SafeArrayAccessData (machinesArray, (void **) &machines); + if (SUCCEEDED(rc)) + { + for (ULONG i = 0; i < machinesArray->rgsabound[0].cElements; ++i) + { + BSTR str; + + rc = machines[i]->get_Name(&str); + if (SUCCEEDED(rc)) + { + fprintf(stderr, "Name: %S\n", str); + SysFreeString(str); + } + } + + SafeArrayUnaccessData (machinesArray); + } + + SafeArrayDestroy (machinesArray); + } + return 0; }