亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? shfileop.bas

?? 軟件名稱 格式化軟盤源代碼 軟件大小 12K 軟件類型 Visual Basic源代碼 軟件介紹 格式化軟盤源代碼 更新日期 2004-5-19 13:57:47
?? BAS
字號:
Attribute VB_Name = "basSHFileOp"
Option Explicit

' ---------------------------------------------------------
' Constants and variables
' ---------------------------------------------------------
  Public Const ASCII_TEST_FILE = "A:\X"
  Public Const FMT_BAT_FILE = "BFormat.bat"
  Public Const FMT_KEY_FILE = "BFormat.key"

' ---------------------------------------------------------
' Declare, Type, and variable needed to obtain
' free disk space information
' ---------------------------------------------------------
  Public Type DISKSPACEINFO
       RootPath As String * 3
       FreeBytes As Long
       TotalBytes As Long
       FreePcnt As Single
       UsedPcnt As Single
  End Type
 
  Public DskInfo As DISKSPACEINFO

  Public Declare Function GetDiskFreeSpace Lib "kernel32" Alias "GetDiskFreeSpaceA" (ByVal lpRootPathName As String, lpSectorsPerCluster As Long, lpBytesPerSector As Long, lpNumberOfFreeClusters As Long, lpTotalNumberOfClusters As Long) As Long

' ------------------------------------------------------------------------
' TYPE required for SHFileOperation API call
' ------------------------------------------------------------------------
  Public Type SHFILEOPSTRUCT
          hwnd As Long
          wFunc As Long
          pFrom As String
          pTo As String
          fFlags As Integer
          fAnyOperationsAborted As Long
          hNameMappings As Long
          lpszProgressTitle As String '  only used if FOF_SIMPLEPROGRESS
  End Type
  
  Public FileOp As SHFILEOPSTRUCT

' ------------------------------------------------------------------------
' Function constants
' ------------------------------------------------------------------------
  Public Const FO_COPY = &H2
  Public Const FO_DELETE = &H3
  Public Const FO_MOVE = &H1
  Public Const FO_RENAME = &H4
  
' ------------------------------------------------------------------------
' Flags that control the file operation. This member can be a
' combination of the following values:
'
' FOF_ALLOWUNDO           Preserves undo information, if possible.
' FOF_CONFIRMMOUSE        Not implemented.
' FOF_FILESONLY           Performs the operation only on files if
'                         a wildcard filename (*.*) is specified.
' FOF_MULTIDESTFILES      Indicates that the pTo member specifies
'                         multiple destination files (one for each
'                         source file) rather than one directory
'                         where all source files are to be deposited.
' FOF_NOCONFIRMATION      Responds with "yes to all" for any dialog
'                         box that is displayed.
' FOF_NOCONFIRMMKDIR      Does not confirm the creation of a new
'                         directory if the operation requires one to
'                         be created.
' FOF_RENAMEONCOLLISION   Gives the file being operated on a new name
'                         (such as "Copy #1 of...") in a move, copy,
'                         or rename operation if a file of the target
'                         name already exists.
' FOF_SILENT              Does not display a progress dialog box.
' FOF_SIMPLEPROGRESS      Displays a progress dialog box, but does
'                         not show the filenames.
' FOF_WANTMAPPINGHANDLE   Fills in the hNameMappings member.
' ------------------------------------------------------------------------
  Public Const FOF_ALLOWUNDO = &H40
  Public Const FOF_CONFIRMMOUSE = &H2
  Public Const FOF_FILESONLY = &H80
  Public Const FOF_MULTIDESTFILES = &H1
  Public Const FOF_NOCONFIRMATION = &H10
  Public Const FOF_NOCONFIRMMKDIR = &H200
  Public Const FOF_RENAMEONCOLLISION = &H8
  Public Const FOF_SILENT = &H4
  Public Const FOF_SIMPLEPROGRESS = &H100
  Public Const FOF_WANTMAPPINGHANDLE = &H20

' ------------------------------------------------------------------------
' Declares required for SHFileOperation API call
' ------------------------------------------------------------------------
  Public Declare Function SHFileOperation Lib "shell32.dll" Alias "SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long
  Public Declare Function GetTempFileName Lib "kernel32" Alias "GetTempFileNameA" (ByVal lpszPath As String, ByVal lpPrefixString As String, ByVal wUnique As Long, ByVal lpTempFileName As String) As Long
  Public Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
Public Sub GetDiskSpace()

' ------------------------------------------------------
' Define local variables
' ------------------------------------------------------
  Dim SxC As Long         ' Sectors Per Cluster
  Dim BxS As Long         ' Bytes Per Sector
  Dim NOFC As Long        ' Number Of Free Clusters
  Dim TNOC As Long        ' Total Number Of Clusters
  Dim lRetVal As Long
  
' ------------------------------------------------------
' Make API call to get disk infomation
' ------------------------------------------------------
  lRetVal = GetDiskFreeSpace(DskInfo.RootPath, SxC, BxS, NOFC, TNOC)

' ------------------------------------------------------
' If it was a good call, then separate the information
' ------------------------------------------------------
  With DskInfo
        If lRetVal Then
            .FreeBytes = BxS * SxC * NOFC
            .TotalBytes = BxS * SxC * TNOC
            .FreePcnt = ((.TotalBytes - .FreeBytes) / .TotalBytes) * 100
            .UsedPcnt = (.FreeBytes / .TotalBytes) * 100
        Else
            .FreeBytes = 0
            .TotalBytes = 0
            .FreePcnt = 0
            .UsedPcnt = 0
        End If
  End With

End Sub

Public Sub BuildFormatBatFile(sDriveLetter As String)

' --------------------------------------------------------
' sDriveLetter = "A:"
' --------------------------------------------------------
  
' --------------------------------------------------------
' Define local variables
' --------------------------------------------------------
  Dim iFile As Integer
  Dim sFormatCmd As String
  
' --------------------------------------------------------
' Initialize variables
' --------------------------------------------------------
  iFile = FreeFile
  sFormatCmd = "Format.com " & sDriveLetter & " /q/u<" & FMT_KEY_FILE
  
' --------------------------------------------------------
' build the DOS batch file that will do the quick format
' --------------------------------------------------------
  Open FMT_BAT_FILE For Output As #iFile
  Print #iFile, "@echo off"
  Print #iFile, sFormatCmd
  Print #iFile, "del bformat.key"
  Close #iFile

' --------------------------------------------------------
' Build the key file that will answer the DOS Format.COM
' prompts
' --------------------------------------------------------
  Open FMT_KEY_FILE For Output As #iFile
  Print #iFile, vbCrLf & vbCrLf & "n" & vbCrLf
  Close #iFile
   
End Sub
Public Sub Delay(lAmtOfDelay As Long)

' -----------------------------------------------------------
' This routine will cause a delay for the time requested,
' yet will not interrupt with the program progress like the
' Sleep API.  The Sleep API will stop all processing while
' it is sleeping.  We also do not need a timer control.
'
' Parameters:
'       lAmtOfDelay - amount of time to delay
' -----------------------------------------------------------

' -----------------------------------------------------------
' Define local variables
' -----------------------------------------------------------
  Dim vDelayTime As Variant
  
' -----------------------------------------------------------
' Determine the length of time to delay using the
' VB DateAdd function.  These options could also be
' variables.
'
'    "s" - seconds
'    "n" - minutes
'    "h" - hours
'
' We are adding the amount of delay to the current time
' -----------------------------------------------------------
  vDelayTime = DateAdd("s", lAmtOfDelay, Now)

' -----------------------------------------------------------
' Loop thru and continualy check the curent time with the
' calculated time so we know when to leave
' -----------------------------------------------------------
  Do
      If Now < vDelayTime Then
          ' Let the application do its work
          DoEvents
      Else
          Exit Do
      End If
  Loop

End Sub
Public Function FileExist(Filename As String) As Boolean

' -----------------------------------------------------------
' If there is an error, ignore it
' -----------------------------------------------------------
  On Error Resume Next
  
' -----------------------------------------------------------
' See if the File exist then return TRUE else FALSE
' -----------------------------------------------------------
  FileExist = IIf(Dir(Filename) <> "", True, False)

' -----------------------------------------------------------
' Nullify the "On Error" routine now that we are
' finished here
' -----------------------------------------------------------
  On Error GoTo 0
  
End Function

Public Function BuildDummyFile(iChar As Integer) As Boolean

On Error GoTo Data_Errors
' ---------------------------------------------------
' Define local variables
' ---------------------------------------------------
  Dim iFile As Integer
  Dim i As Integer
  Dim sRec1 As String
  Dim sRec2 As String
  Dim sMsg As String
  Dim lBuffersize As Long
  
' ---------------------------------------------------
' initialize variables
' ---------------------------------------------------
  sMsg = ""                     ' Empty the error message string
  iFile = FreeFile              ' get first available file handle
  lBuffersize = 1457664         ' Max size of 1.44mb disk in bytes
  
  ' 2 bytes short to accomodate the carriage return and linefeed
  ' that VB adds when a record is written to a file
  sRec1 = String(32766, iChar)
  sRec2 = String(15870, iChar)
  
' ------------------------------------------------------------
' See if we have enough free space to do our job
' ------------------------------------------------------------
  DskInfo.RootPath = "A:\"
  GetDiskSpace

' ------------------------------------------------------------
' If we have a space problem.  Display a message.
' ------------------------------------------------------------
  If (lBuffersize > DskInfo.FreeBytes) Then
       sMsg = "Are you viewing a file on this disk with another tool?    " & vbCrLf
       sMsg = sMsg & "Please point the tool somewhere else or close it.  " & vbCrLf & vbCrLf
       sMsg = sMsg & "If not, then there may be some bad clusters here.  " & vbCrLf
       sMsg = sMsg & "Discard the disk or try again.  Thank you."
       '
       MsgBox sMsg, vbQuestion + vbOKOnly, "Disk Access Error"
       BuildDummyFile = False
       Exit Function
  End If
      
' ---------------------------------------------------
' open the new file on drive A: and write data that
' is in 32k chunks except for the last write,
' which is 15872 bytes.  This way, we save on memory
' allocations.
' ---------------------------------------------------
  Open ASCII_TEST_FILE For Output As #iFile
  
  ' write a total of 1441792 bytes
  For i = 1 To 44
      Print #iFile, sRec1
  Next
  
  ' Write the last record to the disk (15872 bytes)
  Print #iFile, sRec2
  Close #iFile
  
' ---------------------------------------------------
' Delete the file on drive A:
' ---------------------------------------------------
  Kill ASCII_TEST_FILE
  
' ---------------------------------------------------
' Now leave
' ---------------------------------------------------
  BuildDummyFile = True
  On Error GoTo 0       ' Nullify the "On Error" in this routine
  Exit Function
  
' ---------------------------------------------------
' initialize variables
' ---------------------------------------------------
Data_Errors:
  
  sMsg = "Did someone remove the disk or is it damaged?  " & vbCrLf & vbCrLf
  sMsg = sMsg & "Error: " & Err.Number & vbCrLf & Err.Description
  
  MsgBox sMsg, vbQuestion + vbOKOnly, "Disk Access Error"
  BuildDummyFile = False
  Close #iFile
  
  On Error GoTo 0      ' Nullify the "On Error" in this routine
  
End Function
Public Function RemoveAllData() As Boolean
  
' ---------------------------------------------------
' Define local variables
' ---------------------------------------------------
  Dim lReturn As Long

On Error GoTo Disk_Errors
' ---------------------------------------------------
' Make source path the current directory
' ---------------------------------------------------
  ChDrive "A:\"
  ChDir "A:\"

' ---------------------------------------------------
' open the new file on drive A: and write one
' long record to it
' ---------------------------------------------------
  Open "A:\X" For Output As #1
  Close #1

' ---------------------------------------------------
' Options
' ---------------------------------------------------
  With FileOp
       .hwnd = 0                  ' Parent window of dialog box
       .wFunc = FO_DELETE         ' ID the function to do a delete
       .pFrom = "A:\" & Chr(0)    ' ID the drive
       ' do not prompt the user
       .fFlags = FOF_NOCONFIRMATION + FOF_NOCONFIRMMKDIR + FOF_SIMPLEPROGRESS
  End With
  
' ---------------------------------------------------
' Call SHFileOperation API
' ---------------------------------------------------
  lReturn = SHFileOperation(FileOp)
  
' ---------------------------------------------------
' Check the return value.  If non-zero the FALSE
' ---------------------------------------------------
  If lReturn <> 0 Then
      MsgBox "Did not complete operation successfully."
      RemoveAllData = False
  Else
      RemoveAllData = True
  End If

  On Error GoTo 0      ' Nullify the "On Error" in this routine

  Exit Function
  

Disk_Errors:
  
  MsgBox "Did not complete operation successfully." & vbCrLf & vbCrLf & _
         "Error: " & Err.Number & vbCrLf & Err.Description, vbOKOnly, "Error Message"
  RemoveAllData = False
  On Error GoTo 0      ' Nullify the "On Error" in this routine

End Function

Public Sub RunDosShell(sBatchFile As String, sDummyFile As String)

' ---------------------------------------------------------
' Note:  I use "Command.com /c" to prefix the batchfile.
'        This ensures that the DOS window will close upon
'        completion.
' ---------------------------------------------------------
  Dim lRetVal As Long

  lRetVal = Shell("Command.com /c " & sBatchFile, 0)
  
  Do
      If FileExist(sDummyFile) Then
          Delay 5     ' Delay for 5 seconds before checking again
      Else
          Exit Do
      End If
  Loop
  
' ---------------------------------------------------------
' Now we delete the batch file
' ---------------------------------------------------------
  If FileExist(sBatchFile) Then
      Kill sBatchFile
  End If
  
End Sub

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲女与黑人做爰| 久久国产精品72免费观看| 欧美日韩在线亚洲一区蜜芽| 国产成人精品影院| 国产一区二区美女诱惑| 视频一区免费在线观看| 亚洲永久精品国产| 一区二区在线看| 亚洲激情欧美激情| 国产精品一级在线| aaa国产一区| 91在线观看污| 狠狠久久亚洲欧美| 成人丝袜视频网| 91视视频在线直接观看在线看网页在线看 | 国产精品污网站| 国产午夜精品一区二区三区视频| 日韩欧美一级在线播放| 日韩一区二区免费电影| 欧美成人免费网站| 国产人成一区二区三区影院| 综合色中文字幕| 一区二区三区色| 秋霞电影网一区二区| 久久99国产精品久久99果冻传媒| 国产在线精品一区二区三区不卡| 欧美日韩一卡二卡三卡| 亚洲精品va在线观看| 91在线高清观看| 18欧美乱大交hd1984| 亚洲成人一二三| 黑人精品欧美一区二区蜜桃 | 午夜精品免费在线| 国产在线一区二区| 久久一区二区三区国产精品| 亚洲视频免费在线| 一本一道综合狠狠老| 欧美日韩成人高清| wwwwww.欧美系列| 国产资源精品在线观看| 久久久久高清精品| 亚洲一区二区三区四区五区中文| 在线视频国内一区二区| 精品国偷自产国产一区| 一区二区三区**美女毛片| 色悠悠久久综合| 亚洲国产美女搞黄色| 国产一区在线观看视频| 国产目拍亚洲精品99久久精品| 国产成人av一区二区| 中文字幕第一区二区| 日本视频一区二区三区| 一本一道波多野结衣一区二区| 亚洲免费资源在线播放| 欧美乱妇一区二区三区不卡视频| 亚洲欧美怡红院| 欧美午夜精品一区二区三区| 中文av字幕一区| 日本韩国欧美一区| 中文字幕在线观看不卡| 91蜜桃免费观看视频| 婷婷综合久久一区二区三区| 精品对白一区国产伦| www.在线成人| 丝袜诱惑亚洲看片| 国产人伦精品一区二区| 在线观看中文字幕不卡| 久久99九九99精品| 亚洲欧美综合另类在线卡通| 欧美日韩高清在线| 国产成人免费网站| 亚洲电影视频在线| 国产午夜精品一区二区| 欧美丝袜丝交足nylons图片| 久久电影网站中文字幕| 亚洲乱码国产乱码精品精98午夜| 日韩一区二区三区高清免费看看| 成人综合在线观看| 视频一区二区三区中文字幕| 欧美国产精品中文字幕| 在线成人av影院| 91香蕉视频mp4| 国产裸体歌舞团一区二区| 亚洲综合一二区| 国产亚洲欧美日韩日本| 4438成人网| 老司机午夜精品| 亚洲精品久久久蜜桃| 久久精品夜夜夜夜久久| 欧美乱妇20p| 91麻豆精品秘密| 粉嫩av一区二区三区在线播放| 亚洲国产激情av| 欧美一区二区三区在线电影| 久久国内精品自在自线400部| 亚洲欧美精品午睡沙发| 国产亚洲欧洲997久久综合| 69久久夜色精品国产69蝌蚪网| 91尤物视频在线观看| 国产精品夜夜嗨| 久久99久久99精品免视看婷婷| 婷婷开心久久网| 亚洲一区二区三区中文字幕| 国产精品国产三级国产aⅴ中文| 色综合久久66| 成人av在线网| 午夜av区久久| 亚洲自拍偷拍欧美| 亚洲国产精品影院| 亚洲午夜电影在线观看| 亚洲综合小说图片| 一区二区理论电影在线观看| 亚洲另类在线视频| 一区二区成人在线视频 | 日韩精品一区二区三区在线| 欧美日韩大陆一区二区| 欧美日韩aaaaaa| 欧美精选午夜久久久乱码6080| 色综合中文综合网| 7777精品伊人久久久大香线蕉经典版下载 | 亚洲不卡在线观看| 亚洲成人福利片| 午夜精彩视频在线观看不卡| 午夜不卡av免费| 日本不卡视频在线| 久久成人18免费观看| 国产精品99久久久久久久vr| 国产成人午夜片在线观看高清观看| 国产综合久久久久影院| 国产成人av资源| 色综合久久久久综合99| 欧美午夜影院一区| 日韩亚洲欧美一区| 久久看人人爽人人| 日韩一区在线看| 亚洲444eee在线观看| 韩国欧美国产1区| 欧美三级日韩三级国产三级| 欧美色偷偷大香| 日韩女优av电影| 国产精品无人区| 石原莉奈在线亚洲二区| 国产又粗又猛又爽又黄91精品| 成人aaaa免费全部观看| 欧美日韩在线免费视频| 久久午夜免费电影| 亚洲激情在线激情| 国产精品综合在线视频| 91成人网在线| 久久亚洲私人国产精品va媚药| 国产精品成人一区二区艾草| 日韩高清电影一区| 国产黑丝在线一区二区三区| 欧美视频在线一区二区三区 | 欧洲中文字幕精品| 欧美zozo另类异族| 亚洲精品乱码久久久久久久久| 六月丁香综合在线视频| 91在线观看一区二区| 日韩一区二区精品葵司在线| 中文字幕在线一区| 久久国产麻豆精品| 色婷婷精品大视频在线蜜桃视频| 日韩久久精品一区| 亚洲精品中文字幕乱码三区| 麻豆精品一二三| 精品夜夜嗨av一区二区三区| 色欧美片视频在线观看| 久久久久久一二三区| 三级影片在线观看欧美日韩一区二区| 国产成人亚洲精品青草天美| 欧美精品久久一区二区三区| 综合亚洲深深色噜噜狠狠网站| 国产制服丝袜一区| 777亚洲妇女| 亚洲综合一区二区| 成人av在线一区二区三区| 精品剧情v国产在线观看在线| 亚洲尤物在线视频观看| 9久草视频在线视频精品| 精品国产乱码久久久久久闺蜜| 亚洲高清在线精品| 色8久久精品久久久久久蜜| 日本一区二区视频在线观看| 韩国一区二区视频| 日韩一区二区在线播放| 日韩—二三区免费观看av| 欧美丝袜自拍制服另类| 一区二区激情视频| 91传媒视频在线播放| 亚洲精品高清视频在线观看| 99精品视频一区二区| 国产精品妹子av| 成人午夜大片免费观看| 欧美国产在线观看| www.激情成人| 亚洲视频网在线直播| 在线观看网站黄不卡| 亚洲一区二区三区自拍| 欧美精品乱码久久久久久 |