|
#import "SHELL32.dll"
Shell32::IShellDispatchPtr pShell = NULL;
#include <stdio.h>
int main()
{
CoInitialize(NULL);
try {
HRESULT hr;
hr = pShell.CreateInstance("Shell.Application");
if ( FAILED(hr) ) {
_com_issue_error(hr);
}
pShell->ShutdownWindows();
pShell.Release();
}
catch (_com_error &e)
{
printf( "%s\n", e.ErrorMessage() );
}
CoUninitialize();
return 0;
}
| |