Jump to content
Sign in to follow this  
=sinister=

Skinning Error

Recommended Posts

=sinister=

:) I'm puzzled. On my computer, I tried using skincrafter to skin my GUI. I get this strange error:

Error: AutoIt has detected the stack has become corrupt.

Stack corruption typically occurs when either the wrong calling convention is used or when the function is called with the wrong number of arguments.

AutoIt supports the _stdcall (WINAPI) and _cdecl calling conventions. The _Stdcall (WINAPI) convention is used by default but_cdecl can be 
used instead. See the DllCall() documentation for details on changing the calling convention.

But it works flawlessly on my other computer. What is wrong with my computer and is there any way to check for this error in the future? Help is appreciated, thanks.

Share this post


Link to post
Share on other sites
SmOke_N

The answer to your question is knowing what is required by the third party application more than likely (Kind of a stupid question when you don't post the necessary resources to help you)...


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
=sinister=

hehe sorry couldn't find my flash drive. Here was my test that didn't work on my computer but worked on my other one:

; example 1
#include <GUIConstants.au3>

 $dll = DllOpen("Skin.dll")
 DllCall($dll, "int", "InitLicenKeys", "int", BSTR("0"), "int", BSTR("SKINCRAFTER"), "int", BSTR("SKINCRAFTER.COM"), "int", BSTR("support@skincrafter.com"),"int", BSTR("DEMOSKINCRAFTERLICENCE"))
 DllCall($dll, "int", "DefineLanguage", "int", 0)
 DllCall($dll, "int", "InitDecoration", "int", 1)
 DllCall($dll, "int", "LoadSkinFromFile", "int", BSTR("Blue.skf"));skin file
 DllCall($dll, "int", "ApplySkin")

GUICreate("My GUI") ; will create a dialog box that when displayed is centered
GUISetState (@SW_SHOW)    ; will display an empty dialog box

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend
   ; Put this function anywhere
 Func BSTR($str)
 $len = StringLen($str)
 $buff = DllCall("oleaut32.dll", "int", "SysAllocStringLen", "int", 0, "int", $len)
 DllCall("kernel32.dll", "int", "MultiByteToWideChar", "int", 0, "int", 0, "str", $str, "int", $len, "ptr", $buff[0], "int", $len)
 Return $buff[0]
 EndFunc

and I used the older version of Skincrafter.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×