#pragma once
#include <atlbase.h>
#include <shlobj.h>
#include <shlguid.h>int main()
{
WCHAR wszWallPaper[MAX_PATH];
    CString strPath;
    HRESULT hr;
IActiveDesktop *pIAD = NULL; //Step 1:initialize COM library
CoInitialize(NULL); //Step 2: Create new instance of active desktop
hr = CoCreateInstance(CLSID_ACTIVEDESKTOP,NULL,
                  CLSCTX_INPROC_SERVER,IID_IACTIVEDESKTOP,(void**)&pIAD);
if(Succeeded(hr))
{
//step3: fetch the destop wallpaper
hr = pIAD->GetWallpaper(wszWallPaper, MAX_PATH, 0);

if(Succeeded(hr))
{
wcout<<The wallpaper is :" + wszWallPaper;
}
else
{
wcout<<GetWallpaper() failed!";
}
pIAD->Release();
}
else
{
wcout<<"Failed to create new instance!";
} //step4: uninitialize the com library CoUninitialize();

return 0;
}我有几个问题想问:
1。#pragama once是什么东东?干什么用的?
2。我已经引用了<shlobj>和<shlguid>为什么还是说 “CLSID_ACTIVEDESKTOP”为定义?
3。wcout是什么东东?怎么样在VC中使用cout??
4。Succeeded,Failed宏在哪里定义的?请大家帮忙!!!!