corvias 0 Posted July 21, 2010 This is the first time I've attempted to use DllCall. I'm trying to use it to change the current visual style under XP. This is what I've come up with, but nothing seems to happen.DllCall("uxtheme.dll","none", "SetSystemVisualStyle","str","C:\WINDOWS\resources\Themes\Luna\Luna.msstyles","str","Metallic","str","NormalSize","int",0)I searched the forums and found a link to a page that describes the values for this function in uxtheme.dll. What am I doing wrong? It's probably something simple and I'm just not seeing it. Can anyone help? Share this post Link to post Share on other sites
trancexx 1,013 Posted July 21, 2010 Just read the page you linked to again. I fail to see how you managed to came up with the code you posted and say it's based on that link. ♡♡♡ . eMyvnE Share this post Link to post Share on other sites
corvias 0 Posted July 22, 2010 Just read the page you linked to again. I fail to see how you managed to came up with the code you posted and say it's based on that link.My mistake, I should have been more clear. To clarify: I got the name of the function in uxtheme.dll, its parameters, and the data types for those parameters from that page. I used this information to form the code I posted above, which I can't seem to get working. Share this post Link to post Share on other sites
trancexx 1,013 Posted July 22, 2010 I got this from that page$aCall = DllCall("uxtheme.dll", "int", 65, _ "wstr", "C:\WINDOWS\resources\Themes\Luna\Luna.msstyles", _ "wstr", "Metallic", _ "wstr", "NormalSize", _ "int", 0) If @error Then ConsoleWrite("!Error = " & @error & @CRLF) Else ConsoleWrite(">Returned " & $aCall[0] & @CRLF) ; 0 is success EndIf How come we got different? ♡♡♡ . eMyvnE Share this post Link to post Share on other sites
corvias 0 Posted July 22, 2010 I got this from that page$aCall = DllCall("uxtheme.dll", "int", 65, _ "wstr", "C:\WINDOWS\resources\Themes\Luna\Luna.msstyles", _ "wstr", "Metallic", _ "wstr", "NormalSize", _ "int", 0) If @error Then ConsoleWrite("!Error = " & @error & @CRLF) Else ConsoleWrite(">Returned " & $aCall[0] & @CRLF) ; 0 is success EndIf How come we got different? Probably because you are a far more experienced programmer and were able to glean more from that page than I. I think I see what I did wrong, now. I should have used the entry point number instead of the uxtheme function name, and I was using the wrong string datatype (should have been unicode instead of ansi). Thank you for your help! Share this post Link to post Share on other sites