Hey guys,

i found this awesome example on the internet written using autoit 3 script, i was wondering how this would translate in c++ so i can use this for one of my projects, any ideas would be awesome, thanks once again...

$sUserName = "username"
$sPicPath = "usertile.png"

; call CoInitialize

$hPicPath = DLLStructCreate("wchar[128]")
DllStructSetData($hPicPath, 1, $sPicPath)

$hUserName = DLLStructCreate("wchar[128]")
DllStructSetData($hUserName, 1, $sUserName)

$aRet = DllCall(@SystemDir & "\shell32.dll", "long", 262, "ptr", DllStructGetPtr($hUserName), "int", 0, "ptr", DllStructGetPtr($hPicPath))

MsgBox(4096, "SetUserTile", $aRet[0])

Best Wishes,
Nathaniel Blackburn

Since the functions and objects defined in .dlls can be used directly in a C++ program simply by linking against them, e.g. g++ myobj.o -o myprog -lole32 (or just adding the OLE library to your VS project), the notation in C++ should be much simpler. I have no actual experience doing this, I'm afraid, but found a sample C/C++ snippet here: http://www.relisoft.com/win32/olerant.html -- hope that gets you going!