Hi Timo,
Thanks. This time, I have other problems :
#include <windows.h>
#include <wininet.h>
#include <shlobj.h>
#include <shlguid.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
HRESULT hr;
IActiveDesktop *pAD;
WALLPAPEROPT wpo;
LPCWSTR file1 = L"Test.bmp";
CoInitialize(0);
hr = CoCreateInstance(&CLSID_ActiveDesktop,
0,
CLSCTX_INPROC_SERVER,
&IID_IActiveDesktop,
(void**)&pAD);
wpo.dwSize=sizeof(WALLPAPEROPT);
wpo.dwStyle=WPSTYLE_CENTER;
pAD->lpVtbl->SetWallpaper(file1,0);
pAD->lpVtbl->SetWallpaperOptions(&wpo,0);
pAD->lpVtbl->ApplyChanges(AD_APPLY_ALL);
pAD->lpVtbl->Release(pAD);
CoUninitialize();
return 0;
}
SetWallpaper.c(26): error #2140: Type error in argument 1 to 'function'; expected 'LPACTIVEDESKTOP' but found 'const wchar_t *'.
SetWallpaper.c(26): error #2070: Insufficient number of arguments to 'function'.
SetWallpaper.c(28): error #2140: Type error in argument 1 to 'function'; expected 'LPACTIVEDESKTOP' but found 'LPWALLPAPEROPT'.
SetWallpaper.c(28): error #2070: Insufficient number of arguments to 'function'.
SetWallpaper.c(30): error #2140: Type error in argument 1 to 'function'; expected 'LPACTIVEDESKTOP' but found 'int'.
SetWallpaper.c(30): error #2070: Insufficient number of arguments to 'function'.