>I am trying to give the users the ability to set the wallpaper. Being a bit of a newbie to API programming I've hunted around and come across the SystemParametersInfo function. However, when I use the following code....
>
>
>DECLARE INTEGER SystemParametersInfo IN USER32 uAction AS INTEGER uParam AS INTEGER lpvParam AS STRING fuWinIni AS INTEGER
>
The declaration is wrong, try:
DECLARE INTEGER SystemParametersInfo IN WIN32API ;
INTEGER uAction, ;
INTEGER uParam, ;
STRING @ pvParam, ;
INTEGER fUpdateProfile
Depending on exactly what is being passed and how you are constructing structures, it might be better to declare pvParam as a string and create the structure in a static location in memory, passing the address of the buffer; this is what I do when using CLSHEAP.
>SystemParametersInfo(20,0,"C:\TEST.BMP",0)
>
pvParam needs to point to the null-terminated string that names the BMP file to use for the wallpaper, so the STRIN @ construct should be used.
>
>...I get a 'Too many arguments' error.
>
>Any clues?
>
>Cheers!