加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

删除魔兽世界缓存文件才经常掉线者使用(安装插件者禁用)

发布时间:2020-12-17 07:59:39 所属栏目:百科 来源:网络整理
导读:今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 Option ExplicitPrivate Const FO_DELETE = H3Private Const FOF_ALLOWUNDO = H40Private Const FOF_NOCONFIRMATION = H10Private Type SHFILEOPSTRUC

以下代码由PHP站长网 52php.cn收集自互联网

现在PHP站长网小编把它分享给大家,仅供参考

Option Explicit

Private Const FO_DELETE = &H3

Private Const FOF_ALLOWUNDO = &H40

Private Const FOF_NOCONFIRMATION = &H10

Private Type SHFILEOPSTRUCT

hwnd As Long

wFunc As Long

pFrom As String

pTo As String

fFlags As Long

fAnyOperationsAborted As Long

hNameMappings As Long

lpszProgressTitle As String

End Type

Private Declare Function SHFileOperation Lib "Shell32" Alias "SHFileOperationA" (ByRef lpFileOp As SHFILEOPSTRUCT) As Long

'*******************************************************
'
'本程序是给经常掉线且没有插件的玩家使用
'
'****************安装插件者禁止使用*****************
'****************安装插件者禁止使用*****************
'****************安装插件者禁止使用*****************
'****************安装插件者禁止使用*****************
'****************安装插件者禁止使用*****************
'****************安装插件者禁止使用*****************
'****************安装插件者禁止使用*****************
'
'程序运行完会自动启动魔兽世界
'
'*******************************************************

Private Sub Form_Load()
    
    Dim wow,str,dstr,arr,darr,i

    Dim sh As SHFILEOPSTRUCT

    sh.fFlags = FOF_ALLOWUNDO Or FOF_NOCONFIRMATION
    
    sh.wFunc = FO_DELETE
    
    wow = "E:World of Warcraft"
    
    '**********************************************************
    'wow为魔兽世界的文件夹,玩家根据自己的路径修改
    '**********************************************************
    
    str = wow & "Cache" & "|||" & wow & "Interface" & "|||" & wow & "WTF"
    
    dstr = "Cache" & "|||" & "Interface" & "|||" & "WTF"
    
    arr = Split(str,"|||")
    
    darr = Split(dstr,"|||")
    
    If Dir(wow,vbDirectory) <> "" Then '判断文件夹是否存在
    
        For i = 0 To UBound(arr)
        
            sh.pFrom = arr(i)
        
            If Dir(sh.pFrom,vbDirectory) <> "" Then
        
                If InStr(sh.pFrom,darr(i)) <> 0 Then
        
                    Call SHFileOperation(sh) '放入回收站
            
                End If
        
            End If
    
        Next i
        
        If Dir(wow & "World of Warcraft Launcher.exe",vbDirectory) <> "" Then

            Shell wow & "World of Warcraft Launcher.exe",vbHide '启动客户端程序

        Else

            MsgBox "客户端不存在!"

        End If

    Else

        MsgBox "魔兽文件夹不存在!"
    
    End If
    
    End

End Sub

以上内容由PHP站长网【52php.cn】收集整理供大家参考研究

如果以上内容对您有帮助,欢迎收藏、点赞、推荐、分享。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读