Особист » 22.07.2006 (Сб) 11:53
Хакер
Ну, весь код очень большой, примерно 20 форм и куча контролов, описаний и т.д.
Насчёт массивов, вот это в модуле:
Public Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" (ByVal lpszAgent As String, ByVal dwAccessType As Long, ByVal lpszProxyName As String, ByVal lpszProxyBypass As String, ByVal dwFlags As Long) As Long
Public Declare Function InternetOpenUrl Lib "wininet.dll" Alias "InternetOpenUrlA" (ByVal hInet As Long, ByVal lpszUrl As String, ByVal lpszHeaders As String, ByVal dwHeadersLength As Long, ByVal dwFlags As Long, ByVal dwContext As Long) As Long
Public Declare Function InternetCloseHandle Lib "wininet.dll" (ByVal hInet As Long) As Long
Public WorkPath, a As String, IOR As Byte, FileURL As String, LastURL As String, PageURL As String, imgerr As Byte
Public timelimit As Boolean, GU As String, GU2 As String, PausedGals(100) As String, PGC As Byte, FileUR As String, MinToTray As Byte
Public TGPs As Currency, TGPURL() As String, TGPInfo() As String, TGPActive() As Byte
Public Gals As Currency, GalURL() As String, GalInfo() As String, RefH As Integer
Public DLGals As Currency, DLURL() As String, DLInfo() As String, AutoStartDownloading As Byte
Public TempPath As String, MinLen, LenOfFile, Err1 As Byte, OTGPS, T, TgpList() As String, TgpTitle() As String, CurTitle As String
Public DLPath() As String, CurGenre As String, CurPath As String, AutoSync As Byte, FilesInDir As Currency
Public WriteHtml As Byte, WriteInfo As Byte, ImgVerify As Byte, urladd As Boolean, NewGals(256) As String, NewGalsCnt(256) As Integer, NewGalsTot As Integer, NewGalsStart(256) As Integer
Public Banlist() As String, Banned As Currency, ret, bai As Byte, DownloadVideo As Byte, Ver As String, SaveGalPath As String
Public StopDownload As Boolean, Busy As Boolean, QuickStop As Boolean, LoadImage As Boolean, Tmp, StopSync As Boolean
Public IncPath As String, GalPath As String, TargetDevice As String, TargetPath As String, FreeSpace As Long, Genres(1023) As String, GenresLC(1023) As Integer, LCs As Integer, GlobalSize As Currency, FullSize As Currency, SpaceLimit As Long, FC As Byte, vm As Long
Public Declare Function GetDiskFreeSpaceEx Lib "kernel32" Alias "GetDiskFreeSpaceExA" (ByVal lpRootPathName As String, lpFreeBytesAvailableToCaller As Currency, lpTotalNumberOfBytes As Currency, lpTotalNumberOfFreeBytes As Currency) As Long
Public Compl As Byte, SaveAfterBurn As Byte, Ent As Byte, Statuses(3) As String, AntiBanner As Byte, Language As String
Public Plugins As Byte, Plugin(255) As String, PluginName(255) As String, PluginVer(255) As String, PluginInfo(255) As String, PluginConfig(255) As String, PluginStat(255) As String, PluginExec(255) As String, PluginAut(255) As String
Public ErrGals As Currency, ErrURL() As String, ErrInfo() As String, LastPicBG As Long, BrBG As Long, IWBG As Long, LBBG As Long, HDDSize As Currency, PercFree As Integer, WaitMins As Integer
Public Cp(500) As String, URLTestResult As Byte, AddrTestResult As Byte, VideoGals As Currency, VideoURL() As String, VideoInfo() As String, RunMinimized As Byte, TestGals As Byte
Public KeepWP As Byte, DefSize As Byte, OV As String, AutoRun As Byte, AreReg As String, NoInetTest As Byte, Servs As Byte, ServURL(255) As String
Public InetTGPs As Currency, InetTgpInfo() As String, InetTgpURL() As String, ExpRes As String, RetT As String, Old1 As String, Old2 As String, CurLog As String, Old3 As String, DLType As Byte, MinStat As Byte
Public Sub ReDimTGPs()
ReDim Preserve TGPURL(TGPs + 1)
ReDim Preserve TGPInfo(TGPs + 1)
ReDim Preserve TGPActive(TGPs + 1)
End Sub
Public Sub ReDimInetTGPs()
ReDim Preserve InetTgpInfo(InetTGPs + 1)
ReDim Preserve InetTgpURL(InetTGPs + 1)
End Sub
Public Sub ReDimGALs()
ReDim Preserve GalURL(Gals + 1)
ReDim Preserve GalInfo(Gals + 1)
End Sub
Public Sub ReDimDLGALs()
ReDim Preserve DLURL(DLGals + 1)
ReDim Preserve DLInfo(DLGals + 1)
ReDim Preserve DLPath(DLGals + 1)
End Sub
Public Sub ReDimVideoGALs()
ReDim Preserve VideoURL(VideoGals + 1)
ReDim Preserve VideoInfo(VideoGals + 1)
End Sub
Public Sub ReDimBanned()
ReDim Preserve Banlist(Banned + 1)
End Sub
Public Sub ReDimErrGals()
ReDim Preserve ErrURL(ErrGals + 1)
ReDim Preserve ErrInfo(ErrGals + 1)
End Sub
И к примеру вот функция для добавление одного элемента за обращение:
Sub AddTGP(TGPName as string, TGPInfo as string)
for f=1 to tgps
if TGPURL(f) = TGPName then exit sub 'Объект существует
next f
TGPs = TGPs + 1
ReDimTGPs 'Обращение к модулю
TGPURL(TGPs) = TGPName
TGPInfo(TGPs) = TGPInfo
End Sub