netsmu 发表于 2010-11-14 13:49:30

[已解决]皮肤文件 SkinCrafterDll.dll 退出内存报错,不兼容 _IECreateEmbedded ()

本帖最后由 netsmu 于 2010-11-14 15:45 编辑

刚刚使用了论坛里的皮肤文件,SkinCrafterDll.dll, 运行正常,但是推出后,会提示内存出错,请大家测试一下。不知道有没有什么办法解决这个皮肤跟 _IECreateEmbedded () 不兼容的问题呢?#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ie.au3>
Dim $dllpf
Dim $bf=@TempDir&"vista.skf"
FileInstall ( "SkinCrafterDll.dll", @TempDir&"SkinCrafterDll.dll",1)
FileInstall ( "vista.skf", @TempDir&"vista.skf",1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 397, 255, 359, 223)
_SkinGUI(@TempDir&"SkinCrafterDll.dll", $bf, $Form1)
$oIE1 = _IECreateEmbedded ()   ;
$GUIActiveX1 = GUICtrlCreateObj($oIE1, 0,0,358,222)
_IENavigate ($oIE1,"www.baidu.com")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd
Func _SkinGUI($SkincrafterDll, $SkincrafterSkin, $Handle)
   $dllpf = DllOpen($SkincrafterDll)
   DllCall($dllpf, "int:cdecl", "InitLicenKeys", "wstr", "1", "wstr", "", "wstr", "1@1.com", "wstr", "1")
   DllCall($dllpf, "int:cdecl", "InitDecoration", "int", 1)
   DllCall($dllpf, "int:cdecl", "LoadSkinFromFile", "wstr", $SkincrafterSkin)
   DllCall($dllpf, "int:cdecl", "DecorateAs", "int", $Handle, "int", 25)
   DllCall($dllpf, "int:cdecl", "ApplySkin")
EndFunc      ;==_

lpxx 发表于 2010-11-14 14:10:34

估计是关闭前没有移除dll        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        DllCall($dllpf, "int", "DeInitDecoration")
                        DllCall($dllpf, "int", "RemoveSkin")
                        DllClose($dllpf)
                        Exit

        EndSwitch

netsmu 发表于 2010-11-14 15:44:43

奇怪了,这样楼上的这样就可以了。
但是如果不使用_IECreateEmbedded ()
不移除dll 不会报错, 加了_IECreateEmbedded () 不移除 dll 就会报错。

guland 发表于 2010-11-14 17:34:39

回复 1# netsmu


    多看看皮肤教程吧,
页: [1]
查看完整版本: [已解决]皮肤文件 SkinCrafterDll.dll 退出内存报错,不兼容 _IECreateEmbedded ()