📄 fileiodeclarations.vb
字号:
Option Strict On
Option Explicit On
Imports System.Runtime.InteropServices
''' <summary>
''' API declarations relating to file I/O.
''' </summary>
Module FileIOApiDeclarations
Public Const FILE_ATTRIBUTE_NORMAL As Short = &H80
Public Const FILE_FLAG_OVERLAPPED As Integer = &H40000000
Public Const FILE_SHARE_READ As Short = &H1S
Public Const FILE_SHARE_WRITE As Short = &H2S
Public Const GENERIC_READ As Long = &H80000000
Public Const GENERIC_WRITE As UInteger = &H40000000
Public Const INVALID_HANDLE_VALUE As Integer = -1
Public Const OPEN_EXISTING As Short = 3
<StructLayout(LayoutKind.Sequential)> _
Public Structure SECURITY_ATTRIBUTES
Dim nLength As Integer
Dim lpSecurityDescriptor As Integer
Dim bInheritHandle As Integer
End Structure
<DllImport("kernel32.dll")> Function CloseHandle _
(ByVal hObject As Integer) _
As Boolean
End Function
<DllImport("kernel32.dll", CharSet:=CharSet.Auto)> Function CreateFile _
(ByVal lpFileName As String, _
ByVal dwDesiredAccess As Integer, _
ByVal dwShareMode As Integer, _
ByRef lpSecurityAttributes As SECURITY_ATTRIBUTES, _
ByVal dwCreationDisposition As Integer, _
ByVal dwFlagsAndAttributes As Integer, _
ByVal hTemplateFile As Integer) _
As Integer
End Function
End Module
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -