主题:如何将下面的这段vb代码改为delphi代码~~~~~~~~~~
单引号后面的为注释 在vb中这段代码是在类模块里 ,我将如何转换到delphi中
Option Explicit
Private iExtension As String
Private iFirstName As String
Private iName As String
Private iHandle As Integer
Private iBlockSize As Long
' (InStr, Replace)
Public ParentDir As Object
' -------------------------
' File module declarations
#If Win32 Then
#Else
Private Declare Function GetModuleUsage Lib "Kernel" (ByVal hModule As Integer) As Integer
Private Declare Function GetModuleHandle Lib "Kernel" (ByVal lpModuleName As String) As Integer
#End If
' -------------------------
' Attached Executable
#If Win32 Then
Private Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (ByVal lpFile As String, ByVal lpDir As String, ByVal lpResult As String) As Long
#Else
Private Declare Function FindExecutable Lib "shell.dll" (ByVal File As String, ByVal Dir As String, ByVal result As String) As Integer
#End If
' -------------------------
' File name modifications
'
' This doesn't apply to 16 bit systems
#If Win32 Then
Private Declare Function GetFullPathName Lib "kernel32" Alias "GetFullPathNameA" ( _
ByVal lpFileName As String, _
ByVal nBufferLength As Long, _
ByVal lpBuffer As String, _
ByVal lpFilePart As String) As Long
Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" ( _
ByVal lpszLongPath As String, _
ByVal lpszShortPath As String, _
ByVal cchBuffer As Long) As Long
#End If
' -------------------------
' Executing and waiting
#If Win32 Then
Private Type STARTUPINFO
cb As Long
lpReserved As String
lpDesktop As String
lpTitle As String
dwX As Long
dwY As Long
dwXSize As Long
dwYSize As Long
dwXCountChars As Long
dwYCountChars As Long
dwFillAttribute As Long
dwFlags As Long
wShowWindow As Integer
cbReserved2 As Integer
lpReserved2 As Byte
hStdInput As Long
hStdOutput As Long
hStdError As Long
End Type
Option Explicit
Private iExtension As String
Private iFirstName As String
Private iName As String
Private iHandle As Integer
Private iBlockSize As Long
' (InStr, Replace)
Public ParentDir As Object
' -------------------------
' File module declarations
#If Win32 Then
#Else
Private Declare Function GetModuleUsage Lib "Kernel" (ByVal hModule As Integer) As Integer
Private Declare Function GetModuleHandle Lib "Kernel" (ByVal lpModuleName As String) As Integer
#End If
' -------------------------
' Attached Executable
#If Win32 Then
Private Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (ByVal lpFile As String, ByVal lpDir As String, ByVal lpResult As String) As Long
#Else
Private Declare Function FindExecutable Lib "shell.dll" (ByVal File As String, ByVal Dir As String, ByVal result As String) As Integer
#End If
' -------------------------
' File name modifications
'
' This doesn't apply to 16 bit systems
#If Win32 Then
Private Declare Function GetFullPathName Lib "kernel32" Alias "GetFullPathNameA" ( _
ByVal lpFileName As String, _
ByVal nBufferLength As Long, _
ByVal lpBuffer As String, _
ByVal lpFilePart As String) As Long
Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" ( _
ByVal lpszLongPath As String, _
ByVal lpszShortPath As String, _
ByVal cchBuffer As Long) As Long
#End If
' -------------------------
' Executing and waiting
#If Win32 Then
Private Type STARTUPINFO
cb As Long
lpReserved As String
lpDesktop As String
lpTitle As String
dwX As Long
dwY As Long
dwXSize As Long
dwYSize As Long
dwXCountChars As Long
dwYCountChars As Long
dwFillAttribute As Long
dwFlags As Long
wShowWindow As Integer
cbReserved2 As Integer
lpReserved2 As Byte
hStdInput As Long
hStdOutput As Long
hStdError As Long
End Type