If we are talking about Win64 programming, the decorated symbol _imp__CoCreateInstance@20 is not valid as the default calling x64 convention if fastcall. You would expect this one from the VS2010 Express installation : C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64\Ole32.Lib exports CoCreateInstance

the decorated symbol _imp__CoCreateInstance@20 is not valid as the default calling x64 convention if fastcall.

this is the cause of the problem.i can't find the VS2010 Express on internet,use the another method.i'm testing your codes "SetWallpaper.asm",the codes can't work rightly,it setted my Wallpaper into black.

endUsing the Active Desktop Object[This feature is supported only under Windows XP or earlier. ]

This article contains information on the ActiveDesktop object that is part of the Windows Shell API. This object, through its IActiveDesktop interface, enables you to add, remove, and change items on the desktop.

Then in your source code simply use this prototype:CoCreateInstance proto :ptr, :ptr, :dword, :ptr, :ptrthis is ok when i use "uasm64.exe -win64" and "link /ENTRY:start /SUBSYSTEM:windows /MACHINE:X64".thanks you.

Hi,VortexThanks you.the wallpaper has setted by three background modes(Picture,Slide show,Pure color),the "SetWallpaper.exe(SetWallPaper64b)" sets the wallpaper into "Pure color",not the test.bmp.

0x0. Center the wallpaper image in its original size, filling the remaining area with a solid background color if image is smaller than screen or cropping image if image is larger.

WPSTYLE_TILE (0x1)

0x1. Tile the wallpaper image, starting in the upper left corner of the screen. This uses the image in its original size.

WPSTYLE_STRETCH (0x2)

0x2. Stretch the image to cover the full screen. This can result in distortion of the image as the image's aspect ratio is not retained.

WPSTYLE_KEEPASPECT (0x3)

0x3. Introduced in Windows 7. Enlarge or shrink the image to fill the screen, retaining the aspect ratio of the original image. If necessary, the image is padded either on the top and bottom or on the right and left with the background color to fill any screen area not covered by the image.

WPSTYLE_CROPTOFIT (0x4)

0x4. Introduced in Windows 7. Enlarge or shrink the image to fill the screen, retaining the aspect ratio of the original image. If necessary, the image is cropped either on the top and bottom or on the left and right as necessary to fit the screen.

WPSTYLE_SPAN (0x5)

0x5. Introduced in Windows 8. Spans the wallpaper across multiple monitors. When this value is set, the WPSTYLE_MAX value must also be set.

WPSTYLE_MAX

The maximum legitimate value of these flags, used for validation purposes.