找回密码
 加入
搜索
查看: 2408|回复: 3

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

[复制链接]
发表于 2010-11-14 13:49:30 | 显示全部楼层 |阅读模式
本帖最后由 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      ;==_

评分

参与人数 1金钱 +10 收起 理由
afan + 10 感谢主动将修改帖子分类为[已解决],请继续 ...

查看全部评分

发表于 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

评分

参与人数 1金钱 +20 收起 理由
afan + 20

查看全部评分

 楼主| 发表于 2010-11-14 15:44:43 | 显示全部楼层
奇怪了,这样楼上的这样就可以了。
但是如果不使用  _IECreateEmbedded ()
不移除dll 不会报错, 加了  _IECreateEmbedded () 不移除 dll 就会报错。
发表于 2010-11-14 17:34:39 | 显示全部楼层
回复 1# netsmu


    多看看皮肤教程吧,
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-6-8 22:31 , Processed in 0.082124 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表