├── eicar.com ├── Misc ├── readme.txt ├── TrIDLib.dll ├── license.txt ├── triddefs.trd └── installer.iss ├── GUI ├── Images │ ├── clear.PNG │ ├── warn.png │ ├── explore.png │ ├── vt_small.bmp │ ├── VTHash_102.ico │ ├── redshield.png │ ├── Hashtag_Icon.png │ ├── grayredshield.png │ ├── greenshield.png │ ├── graygreenshield.png │ ├── icon_validation_fail.png │ └── icon_validation_good.png ├── MenuBar1.rbmnu ├── WaitWindow.rbfrm └── TridResultWindow.rbfrm ├── virusTotal_RELEASE.rbres ├── .virusTotal_RELEASE.rbuistate ├── Build Automation.rbbas ├── .gitattributes ├── .gitignore ├── FileTypes1.rbbas ├── Win32 ├── Libs │ ├── Libs.rbbas │ ├── Connect.rbbas │ ├── Netapi32.rbbas │ ├── PowrProf.rbbas │ ├── Crypt32.rbbas │ ├── Iphlpapi.rbbas │ ├── SensApi.rbbas │ ├── DNSAPI.rbbas │ ├── PSAPI.rbbas │ ├── ICMP.rbbas │ ├── User32.rbbas │ ├── Avicap32.rbbas │ ├── Version.rbbas │ ├── ws2_32.rbbas │ ├── WinInet.rbbas │ ├── msvcrt.rbbas │ ├── Kernel32.rbbas │ ├── Rpcrt4.rbbas │ ├── Dwmapi.rbbas │ ├── Shlwapi.rbbas │ ├── NTDLL.rbbas │ ├── Shell32.rbbas │ ├── GDI32.rbbas │ └── AdvApi32.rbbas ├── Win32Exception.rbbas ├── Crypto │ ├── Random.rbbas │ ├── SessionKey.rbbas │ ├── Stream.rbbas │ ├── HashProcessor.rbbas │ └── Context.rbbas ├── Win32Object.rbbas ├── GUI │ ├── MessageWindow.rbbas │ ├── ClipboardMonitor.rbbas │ ├── ClipBoard.rbbas │ ├── MessageMonitor.rbbas │ └── HotKeyMonitor.rbbas └── IO.rbbas ├── libcURL ├── ErrorSetter.rbbas ├── FormStreamGetter.rbbas ├── RequestHeaderEngineCreator.rbbas ├── MIMEMessageCreator.rbbas ├── CookieEngineCreator.rbbas ├── Opts │ ├── Multi.rbbas │ └── OptionInfoCreator.rbbas ├── ResponseHeaderCreator.rbbas ├── Version │ └── LibZ.rbbas ├── MIMEMessagePartCreator.rbbas ├── MultipartFormElementCreator.rbbas ├── ProxyEngineCreator.rbbas ├── ResponseHeaderEngineCreator.rbbas ├── cURLException.rbbas ├── Protocols.rbbas ├── Info │ └── InfoTypeIterator.rbbas ├── HTTPAuthMethods.rbbas ├── cURLHandle.rbbas ├── RequestHeaderEngine.rbbas ├── ListPtr.rbbas └── ResponseHeader.rbbas ├── TridLib └── FileType.rbbas ├── TaskBar.rbbas ├── README.md └── VTHash ├── MultipartForm.rbbas └── Results.rbbas /eicar.com: -------------------------------------------------------------------------------- 1 | X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H* -------------------------------------------------------------------------------- /Misc/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charonn0/VT-Hash/HEAD/Misc/readme.txt -------------------------------------------------------------------------------- /Misc/TrIDLib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charonn0/VT-Hash/HEAD/Misc/TrIDLib.dll -------------------------------------------------------------------------------- /Misc/license.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charonn0/VT-Hash/HEAD/Misc/license.txt -------------------------------------------------------------------------------- /Misc/triddefs.trd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charonn0/VT-Hash/HEAD/Misc/triddefs.trd -------------------------------------------------------------------------------- /GUI/Images/clear.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charonn0/VT-Hash/HEAD/GUI/Images/clear.PNG -------------------------------------------------------------------------------- /GUI/Images/warn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charonn0/VT-Hash/HEAD/GUI/Images/warn.png -------------------------------------------------------------------------------- /GUI/Images/explore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charonn0/VT-Hash/HEAD/GUI/Images/explore.png -------------------------------------------------------------------------------- /GUI/Images/vt_small.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charonn0/VT-Hash/HEAD/GUI/Images/vt_small.bmp -------------------------------------------------------------------------------- /GUI/Images/VTHash_102.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charonn0/VT-Hash/HEAD/GUI/Images/VTHash_102.ico -------------------------------------------------------------------------------- /GUI/Images/redshield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charonn0/VT-Hash/HEAD/GUI/Images/redshield.png -------------------------------------------------------------------------------- /virusTotal_RELEASE.rbres: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charonn0/VT-Hash/HEAD/virusTotal_RELEASE.rbres -------------------------------------------------------------------------------- /GUI/Images/Hashtag_Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charonn0/VT-Hash/HEAD/GUI/Images/Hashtag_Icon.png -------------------------------------------------------------------------------- /GUI/Images/grayredshield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charonn0/VT-Hash/HEAD/GUI/Images/grayredshield.png -------------------------------------------------------------------------------- /GUI/Images/greenshield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charonn0/VT-Hash/HEAD/GUI/Images/greenshield.png -------------------------------------------------------------------------------- /.virusTotal_RELEASE.rbuistate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charonn0/VT-Hash/HEAD/.virusTotal_RELEASE.rbuistate -------------------------------------------------------------------------------- /GUI/Images/graygreenshield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charonn0/VT-Hash/HEAD/GUI/Images/graygreenshield.png -------------------------------------------------------------------------------- /GUI/Images/icon_validation_fail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charonn0/VT-Hash/HEAD/GUI/Images/icon_validation_fail.png -------------------------------------------------------------------------------- /GUI/Images/icon_validation_good.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charonn0/VT-Hash/HEAD/GUI/Images/icon_validation_good.png -------------------------------------------------------------------------------- /Build Automation.rbbas: -------------------------------------------------------------------------------- 1 | #tag BuildAutomation 2 | Begin BuildStepList Linux 3 | Begin BuildProjectStep Build 4 | End 5 | End 6 | Begin BuildStepList Mac OS X 7 | Begin BuildProjectStep Build 8 | End 9 | End 10 | Begin BuildStepList Windows 11 | Begin BuildProjectStep Build 12 | End 13 | End 14 | #tag EndBuildAutomation 15 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Standard to msysgit 5 | *.doc diff=astextplain 6 | *.DOC diff=astextplain 7 | *.docx diff=astextplain 8 | *.DOCX diff=astextplain 9 | *.dot diff=astextplain 10 | *.DOT diff=astextplain 11 | *.pdf diff=astextplain 12 | *.PDF diff=astextplain 13 | *.rtf diff=astextplain 14 | *.RTF diff=astextplain 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ############ 2 | ## Windows 3 | ############ 4 | 5 | # Windows image file caches 6 | Thumbs.db 7 | 8 | # Folder config file 9 | Desktop.ini 10 | 11 | # Mac crap 12 | .DS_Store 13 | 14 | #RB 15 | Builds* 16 | *.debug 17 | *.debug.app 18 | Debug*.exe 19 | Debug*/Debug*.exe 20 | Debug*/Debug*\ Libs 21 | *.rbuistate 22 | *.obsolete 23 | 24 | #libs 25 | *.dll 26 | 27 | #GPG sigs 28 | *.sig 29 | 30 | #installers 31 | *.exe 32 | *.zip -------------------------------------------------------------------------------- /FileTypes1.rbbas: -------------------------------------------------------------------------------- 1 | #tag FileTypeSet 2 | #tag FileType 3 | CodeName=Text 4 | Extension=.txt 5 | Flags=&h0 6 | MacCreator=???? 7 | MacType=TEXT 8 | Name=Plain Text 9 | UTI=public.text 10 | #tag EndFileType 11 | 12 | #tag FileType 13 | CodeName=CommaSeparatedValues 14 | Extension=.csv 15 | Flags=&h0 16 | MacCreator= 17 | MacType= 18 | Name=Comma-Separated Values 19 | #tag EndFileType 20 | 21 | #tag FileType 22 | CodeName=JavascriptObjectNotation 23 | Extension=.json 24 | Flags=&h0 25 | MacCreator= 26 | MacType= 27 | Name=Javascript Object Notation 28 | #tag EndFileType 29 | 30 | #tag EndFileTypeSet 31 | -------------------------------------------------------------------------------- /Win32/Libs/Libs.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Private Module Libs 3 | #tag ViewBehavior 4 | #tag ViewProperty 5 | Name="Index" 6 | Visible=true 7 | Group="ID" 8 | InitialValue="-2147483648" 9 | InheritedFrom="Object" 10 | #tag EndViewProperty 11 | #tag ViewProperty 12 | Name="Left" 13 | Visible=true 14 | Group="Position" 15 | InitialValue="0" 16 | InheritedFrom="Object" 17 | #tag EndViewProperty 18 | #tag ViewProperty 19 | Name="Name" 20 | Visible=true 21 | Group="ID" 22 | InheritedFrom="Object" 23 | #tag EndViewProperty 24 | #tag ViewProperty 25 | Name="Super" 26 | Visible=true 27 | Group="ID" 28 | InheritedFrom="Object" 29 | #tag EndViewProperty 30 | #tag ViewProperty 31 | Name="Top" 32 | Visible=true 33 | Group="Position" 34 | InitialValue="0" 35 | InheritedFrom="Object" 36 | #tag EndViewProperty 37 | #tag EndViewBehavior 38 | End Module 39 | #tag EndModule 40 | -------------------------------------------------------------------------------- /libcURL/ErrorSetter.rbbas: -------------------------------------------------------------------------------- 1 | #tag Interface 2 | Private Interface ErrorSetter 3 | #tag Method, Flags = &h0 4 | Sub LastError(Assigns NewError As Integer) 5 | 6 | End Sub 7 | #tag EndMethod 8 | 9 | 10 | #tag ViewBehavior 11 | #tag ViewProperty 12 | Name="Index" 13 | Visible=true 14 | Group="ID" 15 | InitialValue="-2147483648" 16 | InheritedFrom="Object" 17 | #tag EndViewProperty 18 | #tag ViewProperty 19 | Name="Left" 20 | Visible=true 21 | Group="Position" 22 | InitialValue="0" 23 | InheritedFrom="Object" 24 | #tag EndViewProperty 25 | #tag ViewProperty 26 | Name="Name" 27 | Visible=true 28 | Group="ID" 29 | InheritedFrom="Object" 30 | #tag EndViewProperty 31 | #tag ViewProperty 32 | Name="Super" 33 | Visible=true 34 | Group="ID" 35 | InheritedFrom="Object" 36 | #tag EndViewProperty 37 | #tag ViewProperty 38 | Name="Top" 39 | Visible=true 40 | Group="Position" 41 | InitialValue="0" 42 | InheritedFrom="Object" 43 | #tag EndViewProperty 44 | #tag EndViewBehavior 45 | End Interface 46 | #tag EndInterface 47 | -------------------------------------------------------------------------------- /Win32/Libs/Connect.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module Connect 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Declare Function IsInternetConnected Lib "Connect" () As Integer 5 | #tag EndExternalMethod 6 | 7 | 8 | #tag ViewBehavior 9 | #tag ViewProperty 10 | Name="Index" 11 | Visible=true 12 | Group="ID" 13 | InitialValue="-2147483648" 14 | InheritedFrom="Object" 15 | #tag EndViewProperty 16 | #tag ViewProperty 17 | Name="Left" 18 | Visible=true 19 | Group="Position" 20 | InitialValue="0" 21 | InheritedFrom="Object" 22 | #tag EndViewProperty 23 | #tag ViewProperty 24 | Name="Name" 25 | Visible=true 26 | Group="ID" 27 | InheritedFrom="Object" 28 | #tag EndViewProperty 29 | #tag ViewProperty 30 | Name="Super" 31 | Visible=true 32 | Group="ID" 33 | InheritedFrom="Object" 34 | #tag EndViewProperty 35 | #tag ViewProperty 36 | Name="Top" 37 | Visible=true 38 | Group="Position" 39 | InitialValue="0" 40 | InheritedFrom="Object" 41 | #tag EndViewProperty 42 | #tag EndViewBehavior 43 | End Module 44 | #tag EndModule 45 | -------------------------------------------------------------------------------- /libcURL/FormStreamGetter.rbbas: -------------------------------------------------------------------------------- 1 | #tag Interface 2 | Private Interface FormStreamGetter 3 | #tag Method, Flags = &h0 4 | Function GetStream(UserData As Ptr) As Readable 5 | 6 | End Function 7 | #tag EndMethod 8 | 9 | 10 | #tag ViewBehavior 11 | #tag ViewProperty 12 | Name="Index" 13 | Visible=true 14 | Group="ID" 15 | InitialValue="-2147483648" 16 | InheritedFrom="Object" 17 | #tag EndViewProperty 18 | #tag ViewProperty 19 | Name="Left" 20 | Visible=true 21 | Group="Position" 22 | InitialValue="0" 23 | InheritedFrom="Object" 24 | #tag EndViewProperty 25 | #tag ViewProperty 26 | Name="Name" 27 | Visible=true 28 | Group="ID" 29 | InheritedFrom="Object" 30 | #tag EndViewProperty 31 | #tag ViewProperty 32 | Name="Super" 33 | Visible=true 34 | Group="ID" 35 | InheritedFrom="Object" 36 | #tag EndViewProperty 37 | #tag ViewProperty 38 | Name="Top" 39 | Visible=true 40 | Group="Position" 41 | InitialValue="0" 42 | InheritedFrom="Object" 43 | #tag EndViewProperty 44 | #tag EndViewBehavior 45 | End Interface 46 | #tag EndInterface 47 | -------------------------------------------------------------------------------- /Win32/Libs/Netapi32.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module Netapi32 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Declare Function NetIsServiceAccount Lib "Netapi32" (ServerName As Ptr, Accountname As WString, ByRef isService As Boolean) As Integer 5 | #tag EndExternalMethod 6 | 7 | 8 | #tag ViewBehavior 9 | #tag ViewProperty 10 | Name="Index" 11 | Visible=true 12 | Group="ID" 13 | InitialValue="-2147483648" 14 | InheritedFrom="Object" 15 | #tag EndViewProperty 16 | #tag ViewProperty 17 | Name="Left" 18 | Visible=true 19 | Group="Position" 20 | InitialValue="0" 21 | InheritedFrom="Object" 22 | #tag EndViewProperty 23 | #tag ViewProperty 24 | Name="Name" 25 | Visible=true 26 | Group="ID" 27 | InheritedFrom="Object" 28 | #tag EndViewProperty 29 | #tag ViewProperty 30 | Name="Super" 31 | Visible=true 32 | Group="ID" 33 | InheritedFrom="Object" 34 | #tag EndViewProperty 35 | #tag ViewProperty 36 | Name="Top" 37 | Visible=true 38 | Group="Position" 39 | InitialValue="0" 40 | InheritedFrom="Object" 41 | #tag EndViewProperty 42 | #tag EndViewBehavior 43 | End Module 44 | #tag EndModule 45 | -------------------------------------------------------------------------------- /Win32/Libs/PowrProf.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module PowrProf 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Declare Function CallNtPowerInformation Lib "PowrProf" (infoLevel As Integer, InputBuffer As Ptr, buffSize As Integer, OutputBuffer As Ptr, outbufferSize As Integer) As Integer 5 | #tag EndExternalMethod 6 | 7 | 8 | #tag ViewBehavior 9 | #tag ViewProperty 10 | Name="Index" 11 | Visible=true 12 | Group="ID" 13 | InitialValue="-2147483648" 14 | InheritedFrom="Object" 15 | #tag EndViewProperty 16 | #tag ViewProperty 17 | Name="Left" 18 | Visible=true 19 | Group="Position" 20 | InitialValue="0" 21 | InheritedFrom="Object" 22 | #tag EndViewProperty 23 | #tag ViewProperty 24 | Name="Name" 25 | Visible=true 26 | Group="ID" 27 | InheritedFrom="Object" 28 | #tag EndViewProperty 29 | #tag ViewProperty 30 | Name="Super" 31 | Visible=true 32 | Group="ID" 33 | InheritedFrom="Object" 34 | #tag EndViewProperty 35 | #tag ViewProperty 36 | Name="Top" 37 | Visible=true 38 | Group="Position" 39 | InitialValue="0" 40 | InheritedFrom="Object" 41 | #tag EndViewProperty 42 | #tag EndViewBehavior 43 | End Module 44 | #tag EndModule 45 | -------------------------------------------------------------------------------- /Win32/Libs/Crypt32.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module Crypt32 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Declare Function CryptBinaryToString Lib "Crypt32" Alias "CryptBinaryToStringW" (Data As Ptr, DataLen As Integer, Flags As Integer, Buffer As Ptr, ByRef BufferLen As Integer) As Boolean 5 | #tag EndExternalMethod 6 | 7 | 8 | #tag ViewBehavior 9 | #tag ViewProperty 10 | Name="Index" 11 | Visible=true 12 | Group="ID" 13 | InitialValue="-2147483648" 14 | InheritedFrom="Object" 15 | #tag EndViewProperty 16 | #tag ViewProperty 17 | Name="Left" 18 | Visible=true 19 | Group="Position" 20 | InitialValue="0" 21 | InheritedFrom="Object" 22 | #tag EndViewProperty 23 | #tag ViewProperty 24 | Name="Name" 25 | Visible=true 26 | Group="ID" 27 | InheritedFrom="Object" 28 | #tag EndViewProperty 29 | #tag ViewProperty 30 | Name="Super" 31 | Visible=true 32 | Group="ID" 33 | InheritedFrom="Object" 34 | #tag EndViewProperty 35 | #tag ViewProperty 36 | Name="Top" 37 | Visible=true 38 | Group="Position" 39 | InitialValue="0" 40 | InheritedFrom="Object" 41 | #tag EndViewProperty 42 | #tag EndViewBehavior 43 | End Module 44 | #tag EndModule 45 | -------------------------------------------------------------------------------- /Win32/Libs/Iphlpapi.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module Iphlpapi 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Declare Function GetAdaptersInfo Lib "Iphlpapi" (info As Ptr, ByRef size As Integer) As Integer 5 | #tag EndExternalMethod 6 | 7 | #tag ExternalMethod, Flags = &h1 8 | Protected Declare Function GetIpStatistics Lib "Iphlpapi" (ByRef Info As Win32 . Utils . MIB_IPSTATS) As Integer 9 | #tag EndExternalMethod 10 | 11 | 12 | #tag ViewBehavior 13 | #tag ViewProperty 14 | Name="Index" 15 | Visible=true 16 | Group="ID" 17 | InitialValue="-2147483648" 18 | InheritedFrom="Object" 19 | #tag EndViewProperty 20 | #tag ViewProperty 21 | Name="Left" 22 | Visible=true 23 | Group="Position" 24 | InitialValue="0" 25 | InheritedFrom="Object" 26 | #tag EndViewProperty 27 | #tag ViewProperty 28 | Name="Name" 29 | Visible=true 30 | Group="ID" 31 | InheritedFrom="Object" 32 | #tag EndViewProperty 33 | #tag ViewProperty 34 | Name="Super" 35 | Visible=true 36 | Group="ID" 37 | InheritedFrom="Object" 38 | #tag EndViewProperty 39 | #tag ViewProperty 40 | Name="Top" 41 | Visible=true 42 | Group="Position" 43 | InitialValue="0" 44 | InheritedFrom="Object" 45 | #tag EndViewProperty 46 | #tag EndViewBehavior 47 | End Module 48 | #tag EndModule 49 | -------------------------------------------------------------------------------- /Win32/Win32Exception.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class Win32Exception 3 | Inherits RuntimeException 4 | #tag ViewBehavior 5 | #tag ViewProperty 6 | Name="ErrorNumber" 7 | Group="Behavior" 8 | InitialValue="0" 9 | Type="Integer" 10 | InheritedFrom="RuntimeException" 11 | #tag EndViewProperty 12 | #tag ViewProperty 13 | Name="Index" 14 | Visible=true 15 | Group="ID" 16 | InitialValue="-2147483648" 17 | InheritedFrom="Object" 18 | #tag EndViewProperty 19 | #tag ViewProperty 20 | Name="Left" 21 | Visible=true 22 | Group="Position" 23 | InitialValue="0" 24 | InheritedFrom="Object" 25 | #tag EndViewProperty 26 | #tag ViewProperty 27 | Name="Message" 28 | Group="Behavior" 29 | Type="String" 30 | EditorType="MultiLineEditor" 31 | InheritedFrom="RuntimeException" 32 | #tag EndViewProperty 33 | #tag ViewProperty 34 | Name="Name" 35 | Visible=true 36 | Group="ID" 37 | InheritedFrom="Object" 38 | #tag EndViewProperty 39 | #tag ViewProperty 40 | Name="Super" 41 | Visible=true 42 | Group="ID" 43 | InheritedFrom="Object" 44 | #tag EndViewProperty 45 | #tag ViewProperty 46 | Name="Top" 47 | Visible=true 48 | Group="Position" 49 | InitialValue="0" 50 | InheritedFrom="Object" 51 | #tag EndViewProperty 52 | #tag EndViewBehavior 53 | End Class 54 | #tag EndClass 55 | -------------------------------------------------------------------------------- /Win32/Libs/SensApi.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module SensApi 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Declare Function IsDestinationReachable Lib "SensApi" Alias "IsDestinationReachableW" (destination As Wstring, ByRef info As Win32 . Utils . QOCINFO) As Boolean 5 | #tag EndExternalMethod 6 | 7 | #tag ExternalMethod, Flags = &h1 8 | Protected Declare Function IsNetworkAlive Lib "SensApi" (ByRef netFlags As Integer) As Boolean 9 | #tag EndExternalMethod 10 | 11 | 12 | #tag ViewBehavior 13 | #tag ViewProperty 14 | Name="Index" 15 | Visible=true 16 | Group="ID" 17 | InitialValue="-2147483648" 18 | InheritedFrom="Object" 19 | #tag EndViewProperty 20 | #tag ViewProperty 21 | Name="Left" 22 | Visible=true 23 | Group="Position" 24 | InitialValue="0" 25 | InheritedFrom="Object" 26 | #tag EndViewProperty 27 | #tag ViewProperty 28 | Name="Name" 29 | Visible=true 30 | Group="ID" 31 | InheritedFrom="Object" 32 | #tag EndViewProperty 33 | #tag ViewProperty 34 | Name="Super" 35 | Visible=true 36 | Group="ID" 37 | InheritedFrom="Object" 38 | #tag EndViewProperty 39 | #tag ViewProperty 40 | Name="Top" 41 | Visible=true 42 | Group="Position" 43 | InitialValue="0" 44 | InheritedFrom="Object" 45 | #tag EndViewProperty 46 | #tag EndViewBehavior 47 | End Module 48 | #tag EndModule 49 | -------------------------------------------------------------------------------- /Win32/Libs/DNSAPI.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module DNSAPI 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Declare Function DnsQuery Lib "DNSAPI" Alias "DnsQuery_A" (hostname As CString, type As Int16, options As Integer, reserved1 As Integer, ByRef result As Ptr, reserved As Integer) As Integer 5 | #tag EndExternalMethod 6 | 7 | #tag ExternalMethod, Flags = &h1 8 | Protected Declare Sub DnsRecordListFree Lib "DNSAPI" (listPtr As Integer, freeType As Integer) 9 | #tag EndExternalMethod 10 | 11 | 12 | #tag ViewBehavior 13 | #tag ViewProperty 14 | Name="Index" 15 | Visible=true 16 | Group="ID" 17 | InitialValue="-2147483648" 18 | InheritedFrom="Object" 19 | #tag EndViewProperty 20 | #tag ViewProperty 21 | Name="Left" 22 | Visible=true 23 | Group="Position" 24 | InitialValue="0" 25 | InheritedFrom="Object" 26 | #tag EndViewProperty 27 | #tag ViewProperty 28 | Name="Name" 29 | Visible=true 30 | Group="ID" 31 | InheritedFrom="Object" 32 | #tag EndViewProperty 33 | #tag ViewProperty 34 | Name="Super" 35 | Visible=true 36 | Group="ID" 37 | InheritedFrom="Object" 38 | #tag EndViewProperty 39 | #tag ViewProperty 40 | Name="Top" 41 | Visible=true 42 | Group="Position" 43 | InitialValue="0" 44 | InheritedFrom="Object" 45 | #tag EndViewProperty 46 | #tag EndViewBehavior 47 | End Module 48 | #tag EndModule 49 | -------------------------------------------------------------------------------- /Win32/Libs/PSAPI.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module PSAPI 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Soft Declare Function GetMappedFileName Lib "PSAPI" Alias "GetMappedFileNameW" (hProcess As Integer, lvp As Integer, Filename As Ptr, Size As Integer) As Integer 5 | #tag EndExternalMethod 6 | 7 | #tag ExternalMethod, Flags = &h1 8 | Protected Soft Declare Function GetModuleFileNameEx Lib "PSAPI" Alias "GetModuleFileNameExW" (hProcess As Integer, hModule As Integer, ModuleName As Ptr, nSize As Integer) As Integer 9 | #tag EndExternalMethod 10 | 11 | 12 | #tag ViewBehavior 13 | #tag ViewProperty 14 | Name="Index" 15 | Visible=true 16 | Group="ID" 17 | InitialValue="-2147483648" 18 | InheritedFrom="Object" 19 | #tag EndViewProperty 20 | #tag ViewProperty 21 | Name="Left" 22 | Visible=true 23 | Group="Position" 24 | InitialValue="0" 25 | InheritedFrom="Object" 26 | #tag EndViewProperty 27 | #tag ViewProperty 28 | Name="Name" 29 | Visible=true 30 | Group="ID" 31 | InheritedFrom="Object" 32 | #tag EndViewProperty 33 | #tag ViewProperty 34 | Name="Super" 35 | Visible=true 36 | Group="ID" 37 | InheritedFrom="Object" 38 | #tag EndViewProperty 39 | #tag ViewProperty 40 | Name="Top" 41 | Visible=true 42 | Group="Position" 43 | InitialValue="0" 44 | InheritedFrom="Object" 45 | #tag EndViewProperty 46 | #tag EndViewBehavior 47 | End Module 48 | #tag EndModule 49 | -------------------------------------------------------------------------------- /Win32/Crypto/Random.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class Random 3 | Inherits Win32.Crypto.Context 4 | #tag Method, Flags = &h1000 5 | Sub Constructor() 6 | Super.Constructor(BaseProvider) 7 | End Sub 8 | #tag EndMethod 9 | 10 | #tag Method, Flags = &h0 11 | Function Generate(ByteCount As Integer) As MemoryBlock 12 | Dim mb As New MemoryBlock(ByteCount) 13 | If Not Win32.Libs.AdvApi32.CryptGenRandom(Me.Provider, mb.Size, mb) Then 14 | mLastError = Win32.LastError 15 | Else 16 | Return mb 17 | End If 18 | 19 | End Function 20 | #tag EndMethod 21 | 22 | 23 | #tag ViewBehavior 24 | #tag ViewProperty 25 | Name="Index" 26 | Visible=true 27 | Group="ID" 28 | InitialValue="-2147483648" 29 | InheritedFrom="Object" 30 | #tag EndViewProperty 31 | #tag ViewProperty 32 | Name="Left" 33 | Visible=true 34 | Group="Position" 35 | InitialValue="0" 36 | InheritedFrom="Object" 37 | #tag EndViewProperty 38 | #tag ViewProperty 39 | Name="Name" 40 | Visible=true 41 | Group="ID" 42 | InheritedFrom="Object" 43 | #tag EndViewProperty 44 | #tag ViewProperty 45 | Name="Super" 46 | Visible=true 47 | Group="ID" 48 | InheritedFrom="Object" 49 | #tag EndViewProperty 50 | #tag ViewProperty 51 | Name="Top" 52 | Visible=true 53 | Group="Position" 54 | InitialValue="0" 55 | InheritedFrom="Object" 56 | #tag EndViewProperty 57 | #tag EndViewBehavior 58 | End Class 59 | #tag EndClass 60 | -------------------------------------------------------------------------------- /Win32/Libs/ICMP.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module ICMP 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Declare Sub IcmpCloseHandle Lib "ICMP" (Handle As Integer) 5 | #tag EndExternalMethod 6 | 7 | #tag ExternalMethod, Flags = &h1 8 | Protected Declare Function IcmpCreateFile Lib "ICMP" () As Integer 9 | #tag EndExternalMethod 10 | 11 | #tag ExternalMethod, Flags = &h1 12 | Protected Declare Function IcmpSendEcho Lib "ICMP" (handle As Integer, address As Integer, data As Integer, size As Integer, options As Ptr, reply As Ptr, replySize As Integer, timeout As Integer) As Integer 13 | #tag EndExternalMethod 14 | 15 | 16 | #tag ViewBehavior 17 | #tag ViewProperty 18 | Name="Index" 19 | Visible=true 20 | Group="ID" 21 | InitialValue="-2147483648" 22 | InheritedFrom="Object" 23 | #tag EndViewProperty 24 | #tag ViewProperty 25 | Name="Left" 26 | Visible=true 27 | Group="Position" 28 | InitialValue="0" 29 | InheritedFrom="Object" 30 | #tag EndViewProperty 31 | #tag ViewProperty 32 | Name="Name" 33 | Visible=true 34 | Group="ID" 35 | InheritedFrom="Object" 36 | #tag EndViewProperty 37 | #tag ViewProperty 38 | Name="Super" 39 | Visible=true 40 | Group="ID" 41 | InheritedFrom="Object" 42 | #tag EndViewProperty 43 | #tag ViewProperty 44 | Name="Top" 45 | Visible=true 46 | Group="Position" 47 | InitialValue="0" 48 | InheritedFrom="Object" 49 | #tag EndViewProperty 50 | #tag EndViewBehavior 51 | End Module 52 | #tag EndModule 53 | -------------------------------------------------------------------------------- /Win32/Libs/User32.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module User32 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Soft Declare Function ShutdownBlockReasonCreate Lib "User32" (HWND As Integer, Reason As WString) As Boolean 5 | #tag EndExternalMethod 6 | 7 | #tag ExternalMethod, Flags = &h1 8 | Protected Soft Declare Function ShutdownBlockReasonDestroy Lib "User32" (HWND As Integer) As Boolean 9 | #tag EndExternalMethod 10 | 11 | #tag ExternalMethod, Flags = &h1 12 | Protected Soft Declare Function ShutdownBlockReasonQuery Lib "User32" (HWND As Integer, Buffer As Ptr, ByRef BufferSz As Integer) As Boolean 13 | #tag EndExternalMethod 14 | 15 | 16 | #tag ViewBehavior 17 | #tag ViewProperty 18 | Name="Index" 19 | Visible=true 20 | Group="ID" 21 | InitialValue="-2147483648" 22 | InheritedFrom="Object" 23 | #tag EndViewProperty 24 | #tag ViewProperty 25 | Name="Left" 26 | Visible=true 27 | Group="Position" 28 | InitialValue="0" 29 | InheritedFrom="Object" 30 | #tag EndViewProperty 31 | #tag ViewProperty 32 | Name="Name" 33 | Visible=true 34 | Group="ID" 35 | InheritedFrom="Object" 36 | #tag EndViewProperty 37 | #tag ViewProperty 38 | Name="Super" 39 | Visible=true 40 | Group="ID" 41 | InheritedFrom="Object" 42 | #tag EndViewProperty 43 | #tag ViewProperty 44 | Name="Top" 45 | Visible=true 46 | Group="Position" 47 | InitialValue="0" 48 | InheritedFrom="Object" 49 | #tag EndViewProperty 50 | #tag EndViewBehavior 51 | End Module 52 | #tag EndModule 53 | -------------------------------------------------------------------------------- /libcURL/RequestHeaderEngineCreator.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Private Class RequestHeaderEngineCreator 3 | Inherits libcURL.RequestHeaderEngine 4 | #tag Method, Flags = &h0 5 | Sub Constructor(Owner As libcURL.EasyHandle) 6 | ' This class exists solely to protect the superclass Constructor from being called 7 | ' from outside the libcURL module. 8 | 9 | // Calling the overridden superclass constructor. 10 | // Constructor(Owner As libcURL.EasyHandle) -- From RequestHeaderEngine 11 | Super.Constructor(Owner) 12 | End Sub 13 | #tag EndMethod 14 | 15 | 16 | #tag ViewBehavior 17 | #tag ViewProperty 18 | Name="Index" 19 | Visible=true 20 | Group="ID" 21 | InitialValue="-2147483648" 22 | Type="Integer" 23 | EditorType="" 24 | #tag EndViewProperty 25 | #tag ViewProperty 26 | Name="Left" 27 | Visible=true 28 | Group="Position" 29 | InitialValue="0" 30 | Type="Integer" 31 | EditorType="" 32 | #tag EndViewProperty 33 | #tag ViewProperty 34 | Name="Name" 35 | Visible=true 36 | Group="ID" 37 | InitialValue="" 38 | Type="String" 39 | EditorType="" 40 | #tag EndViewProperty 41 | #tag ViewProperty 42 | Name="Super" 43 | Visible=true 44 | Group="ID" 45 | InitialValue="" 46 | Type="String" 47 | EditorType="" 48 | #tag EndViewProperty 49 | #tag ViewProperty 50 | Name="Top" 51 | Visible=true 52 | Group="Position" 53 | InitialValue="0" 54 | Type="Integer" 55 | EditorType="" 56 | #tag EndViewProperty 57 | #tag EndViewBehavior 58 | End Class 59 | #tag EndClass 60 | -------------------------------------------------------------------------------- /Win32/Libs/Avicap32.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module Avicap32 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Soft Declare Function capCreateCaptureWindow Lib "Avicap32" Alias "capCreateCaptureWindowW" (WindowName As WString, Style As Integer, X As Integer, Y As Integer, Width As Integer, Height As Integer, Parent As Integer, ID As Integer) As Integer 5 | #tag EndExternalMethod 6 | 7 | #tag ExternalMethod, Flags = &h1 8 | Protected Soft Declare Function capGetDriverDescription Lib "Avicap32" Alias "capGetDriverDescriptionW" (DriverIndex As UInt16, DriverName As Ptr, NameLen As Integer, DriverVersion As Ptr, VersionLen As Integer) As Boolean 9 | #tag EndExternalMethod 10 | 11 | 12 | #tag ViewBehavior 13 | #tag ViewProperty 14 | Name="Index" 15 | Visible=true 16 | Group="ID" 17 | InitialValue="-2147483648" 18 | InheritedFrom="Object" 19 | #tag EndViewProperty 20 | #tag ViewProperty 21 | Name="Left" 22 | Visible=true 23 | Group="Position" 24 | InitialValue="0" 25 | InheritedFrom="Object" 26 | #tag EndViewProperty 27 | #tag ViewProperty 28 | Name="Name" 29 | Visible=true 30 | Group="ID" 31 | InheritedFrom="Object" 32 | #tag EndViewProperty 33 | #tag ViewProperty 34 | Name="Super" 35 | Visible=true 36 | Group="ID" 37 | InheritedFrom="Object" 38 | #tag EndViewProperty 39 | #tag ViewProperty 40 | Name="Top" 41 | Visible=true 42 | Group="Position" 43 | InitialValue="0" 44 | InheritedFrom="Object" 45 | #tag EndViewProperty 46 | #tag EndViewBehavior 47 | End Module 48 | #tag EndModule 49 | -------------------------------------------------------------------------------- /libcURL/MIMEMessageCreator.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Private Class MIMEMessageCreator 3 | Inherits libcURL.MIMEMessage 4 | #tag Method, Flags = &h1000 5 | Sub Constructor(MessagePtr As Ptr, ParentMessage As libcURL.MIMEMessage) 6 | ' This class exists solely to protect the superclass Constructor from being called 7 | ' from outside the libcURL module. 8 | 9 | // Calling the overridden superclass constructor. 10 | // Constructor(MessagePtr As Ptr, ParentMessage As libcURL.MIMEMessage) -- From MIMEMessage 11 | Super.Constructor(MessagePtr, ParentMessage) 12 | End Sub 13 | #tag EndMethod 14 | 15 | 16 | #tag ViewBehavior 17 | #tag ViewProperty 18 | Name="Index" 19 | Visible=true 20 | Group="ID" 21 | InitialValue="-2147483648" 22 | Type="Integer" 23 | EditorType="" 24 | #tag EndViewProperty 25 | #tag ViewProperty 26 | Name="Left" 27 | Visible=true 28 | Group="Position" 29 | InitialValue="0" 30 | Type="Integer" 31 | EditorType="" 32 | #tag EndViewProperty 33 | #tag ViewProperty 34 | Name="Name" 35 | Visible=true 36 | Group="ID" 37 | InitialValue="" 38 | Type="String" 39 | EditorType="" 40 | #tag EndViewProperty 41 | #tag ViewProperty 42 | Name="Super" 43 | Visible=true 44 | Group="ID" 45 | InitialValue="" 46 | Type="String" 47 | EditorType="" 48 | #tag EndViewProperty 49 | #tag ViewProperty 50 | Name="Top" 51 | Visible=true 52 | Group="Position" 53 | InitialValue="0" 54 | Type="Integer" 55 | EditorType="" 56 | #tag EndViewProperty 57 | #tag EndViewBehavior 58 | End Class 59 | #tag EndClass 60 | -------------------------------------------------------------------------------- /TridLib/FileType.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class FileType 3 | #tag Property, Flags = &h0 4 | Description As String 5 | #tag EndProperty 6 | 7 | #tag Property, Flags = &h0 8 | Extension As String 9 | #tag EndProperty 10 | 11 | #tag Property, Flags = &h0 12 | Points As Integer 13 | #tag EndProperty 14 | 15 | 16 | #tag ViewBehavior 17 | #tag ViewProperty 18 | Name="Description" 19 | Group="Behavior" 20 | Type="String" 21 | EditorType="MultiLineEditor" 22 | #tag EndViewProperty 23 | #tag ViewProperty 24 | Name="Extension" 25 | Group="Behavior" 26 | Type="String" 27 | EditorType="MultiLineEditor" 28 | #tag EndViewProperty 29 | #tag ViewProperty 30 | Name="Index" 31 | Visible=true 32 | Group="ID" 33 | InitialValue="-2147483648" 34 | InheritedFrom="Object" 35 | #tag EndViewProperty 36 | #tag ViewProperty 37 | Name="Left" 38 | Visible=true 39 | Group="Position" 40 | InitialValue="0" 41 | InheritedFrom="Object" 42 | #tag EndViewProperty 43 | #tag ViewProperty 44 | Name="Name" 45 | Visible=true 46 | Group="ID" 47 | InheritedFrom="Object" 48 | #tag EndViewProperty 49 | #tag ViewProperty 50 | Name="Points" 51 | Group="Behavior" 52 | Type="Integer" 53 | #tag EndViewProperty 54 | #tag ViewProperty 55 | Name="Super" 56 | Visible=true 57 | Group="ID" 58 | InheritedFrom="Object" 59 | #tag EndViewProperty 60 | #tag ViewProperty 61 | Name="Top" 62 | Visible=true 63 | Group="Position" 64 | InitialValue="0" 65 | InheritedFrom="Object" 66 | #tag EndViewProperty 67 | #tag EndViewBehavior 68 | End Class 69 | #tag EndClass 70 | -------------------------------------------------------------------------------- /Win32/Libs/Version.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module Version 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Declare Function GetFileVersionInfo Lib "Version" Alias "GetFileVersionInfoW" (fileName As WString, ignored As Integer, bufferSize As Integer, buffer As Ptr) As Boolean 5 | #tag EndExternalMethod 6 | 7 | #tag ExternalMethod, Flags = &h1 8 | Protected Declare Function GetFileVersionInfoSize Lib "Version" Alias "GetFileVersionInfoSizeW" (fileName As WString, ignored As Integer) As Integer 9 | #tag EndExternalMethod 10 | 11 | #tag ExternalMethod, Flags = &h1 12 | Protected Declare Function VerQueryValue Lib "Version" Alias "VerQueryValueW" (inBuffer As Ptr, subBlock As WString, outBuffer As Ptr, ByRef outBufferLen As Integer) As Boolean 13 | #tag EndExternalMethod 14 | 15 | 16 | #tag ViewBehavior 17 | #tag ViewProperty 18 | Name="Index" 19 | Visible=true 20 | Group="ID" 21 | InitialValue="-2147483648" 22 | InheritedFrom="Object" 23 | #tag EndViewProperty 24 | #tag ViewProperty 25 | Name="Left" 26 | Visible=true 27 | Group="Position" 28 | InitialValue="0" 29 | InheritedFrom="Object" 30 | #tag EndViewProperty 31 | #tag ViewProperty 32 | Name="Name" 33 | Visible=true 34 | Group="ID" 35 | InheritedFrom="Object" 36 | #tag EndViewProperty 37 | #tag ViewProperty 38 | Name="Super" 39 | Visible=true 40 | Group="ID" 41 | InheritedFrom="Object" 42 | #tag EndViewProperty 43 | #tag ViewProperty 44 | Name="Top" 45 | Visible=true 46 | Group="Position" 47 | InitialValue="0" 48 | InheritedFrom="Object" 49 | #tag EndViewProperty 50 | #tag EndViewBehavior 51 | End Module 52 | #tag EndModule 53 | -------------------------------------------------------------------------------- /Win32/Libs/ws2_32.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module ws2_32 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Declare Function GetHostByName Lib "ws2_32" (Address As CString) As Ptr 5 | #tag EndExternalMethod 6 | 7 | #tag ExternalMethod, Flags = &h1 8 | Protected Declare Function GetHostName Lib "ws2_32" (name As Ptr, size As Integer) As Integer 9 | #tag EndExternalMethod 10 | 11 | #tag ExternalMethod, Flags = &h1 12 | Protected Declare Function inet_addr Lib "ws2_32" (Address As CString) As Integer 13 | #tag EndExternalMethod 14 | 15 | #tag ExternalMethod, Flags = &h1 16 | Protected Declare Sub WSACleanup Lib "ws2_32" () 17 | #tag EndExternalMethod 18 | 19 | #tag ExternalMethod, Flags = &h1 20 | Protected Declare Sub WSAStartup Lib "ws2_32" (versRequest As Integer, data As Ptr) 21 | #tag EndExternalMethod 22 | 23 | 24 | #tag ViewBehavior 25 | #tag ViewProperty 26 | Name="Index" 27 | Visible=true 28 | Group="ID" 29 | InitialValue="-2147483648" 30 | InheritedFrom="Object" 31 | #tag EndViewProperty 32 | #tag ViewProperty 33 | Name="Left" 34 | Visible=true 35 | Group="Position" 36 | InitialValue="0" 37 | InheritedFrom="Object" 38 | #tag EndViewProperty 39 | #tag ViewProperty 40 | Name="Name" 41 | Visible=true 42 | Group="ID" 43 | InheritedFrom="Object" 44 | #tag EndViewProperty 45 | #tag ViewProperty 46 | Name="Super" 47 | Visible=true 48 | Group="ID" 49 | InheritedFrom="Object" 50 | #tag EndViewProperty 51 | #tag ViewProperty 52 | Name="Top" 53 | Visible=true 54 | Group="Position" 55 | InitialValue="0" 56 | InheritedFrom="Object" 57 | #tag EndViewProperty 58 | #tag EndViewBehavior 59 | End Module 60 | #tag EndModule 61 | -------------------------------------------------------------------------------- /Win32/Win32Object.rbbas: -------------------------------------------------------------------------------- 1 | #tag Interface 2 | Protected Interface Win32Object 3 | #tag Method, Flags = &h0 4 | Function Handle() As Integer 5 | 6 | End Function 7 | #tag EndMethod 8 | 9 | #tag Method, Flags = &h0 10 | Function LastError() As Integer 11 | 12 | End Function 13 | #tag EndMethod 14 | 15 | 16 | #tag Note, Name = About this interface 17 | A Win32Object refers to a Win32 handle (or equivalent). Once the Object is constructed, implementors guarentee 18 | that the handle value will be returned from the Win32Object.Handle method. Implementors do not necessarily 19 | guarantee that the handle is (or ever was) valid. 20 | 21 | Implementors MUST store the value of Win32.LastError after every Win32 call, and return the stored error number from 22 | Win32Object.LastError. 23 | #tag EndNote 24 | 25 | 26 | #tag ViewBehavior 27 | #tag ViewProperty 28 | Name="Index" 29 | Visible=true 30 | Group="ID" 31 | InitialValue="-2147483648" 32 | InheritedFrom="Object" 33 | #tag EndViewProperty 34 | #tag ViewProperty 35 | Name="Left" 36 | Visible=true 37 | Group="Position" 38 | InitialValue="0" 39 | InheritedFrom="Object" 40 | #tag EndViewProperty 41 | #tag ViewProperty 42 | Name="Name" 43 | Visible=true 44 | Group="ID" 45 | InheritedFrom="Object" 46 | #tag EndViewProperty 47 | #tag ViewProperty 48 | Name="Super" 49 | Visible=true 50 | Group="ID" 51 | InheritedFrom="Object" 52 | #tag EndViewProperty 53 | #tag ViewProperty 54 | Name="Top" 55 | Visible=true 56 | Group="Position" 57 | InitialValue="0" 58 | InheritedFrom="Object" 59 | #tag EndViewProperty 60 | #tag EndViewBehavior 61 | End Interface 62 | #tag EndInterface 63 | -------------------------------------------------------------------------------- /libcURL/CookieEngineCreator.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Private Class CookieEngineCreator 3 | Inherits libcURL.CookieEngine 4 | #tag Method, Flags = &h0 5 | Sub Constructor(Owner As libcURL.EasyHandle) 6 | ' This class exists solely to protect the superclass Constructor from being called 7 | ' from outside the libcURL module. 8 | 9 | // Calling the overridden superclass constructor. 10 | // Constructor(Owner As libcURL.EasyHandle) -- From CookieEngine 11 | Super.Constructor(Owner) 12 | End Sub 13 | #tag EndMethod 14 | 15 | 16 | #tag ViewBehavior 17 | #tag ViewProperty 18 | Name="Enabled" 19 | Visible=false 20 | Group="Behavior" 21 | InitialValue="" 22 | Type="Boolean" 23 | EditorType="" 24 | #tag EndViewProperty 25 | #tag ViewProperty 26 | Name="Index" 27 | Visible=true 28 | Group="ID" 29 | InitialValue="-2147483648" 30 | Type="Integer" 31 | EditorType="" 32 | #tag EndViewProperty 33 | #tag ViewProperty 34 | Name="Left" 35 | Visible=true 36 | Group="Position" 37 | InitialValue="0" 38 | Type="Integer" 39 | EditorType="" 40 | #tag EndViewProperty 41 | #tag ViewProperty 42 | Name="Name" 43 | Visible=true 44 | Group="ID" 45 | InitialValue="" 46 | Type="String" 47 | EditorType="" 48 | #tag EndViewProperty 49 | #tag ViewProperty 50 | Name="Super" 51 | Visible=true 52 | Group="ID" 53 | InitialValue="" 54 | Type="String" 55 | EditorType="" 56 | #tag EndViewProperty 57 | #tag ViewProperty 58 | Name="Top" 59 | Visible=true 60 | Group="Position" 61 | InitialValue="0" 62 | Type="Integer" 63 | EditorType="" 64 | #tag EndViewProperty 65 | #tag EndViewBehavior 66 | End Class 67 | #tag EndClass 68 | -------------------------------------------------------------------------------- /Win32/Libs/WinInet.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module WinInet 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Declare Function InternetAttemptConnect Lib "WinInet" (Reserved As Integer) As Integer 5 | #tag EndExternalMethod 6 | 7 | #tag ExternalMethod, Flags = &h1 8 | Protected Declare Function InternetAutodial Lib "WinInet" (flags As Integer, HWND As Integer) As Boolean 9 | #tag EndExternalMethod 10 | 11 | #tag ExternalMethod, Flags = &h1 12 | Protected Declare Function InternetCanonicalizeUrl Lib "WinInet" Alias "InternetCanonicalizeUrlW" (URL As WString, output As Ptr, ByRef buffersize As Integer, flags As Integer) As Boolean 13 | #tag EndExternalMethod 14 | 15 | #tag ExternalMethod, Flags = &h1 16 | Protected Declare Function InternetCombineUrl Lib "WinInet" Alias "InternetCombineUrlW" (base As WString, relative As WString, output As Ptr, ByRef size As Integer, flags As Integer) As Boolean 17 | #tag EndExternalMethod 18 | 19 | 20 | #tag ViewBehavior 21 | #tag ViewProperty 22 | Name="Index" 23 | Visible=true 24 | Group="ID" 25 | InitialValue="-2147483648" 26 | InheritedFrom="Object" 27 | #tag EndViewProperty 28 | #tag ViewProperty 29 | Name="Left" 30 | Visible=true 31 | Group="Position" 32 | InitialValue="0" 33 | InheritedFrom="Object" 34 | #tag EndViewProperty 35 | #tag ViewProperty 36 | Name="Name" 37 | Visible=true 38 | Group="ID" 39 | InheritedFrom="Object" 40 | #tag EndViewProperty 41 | #tag ViewProperty 42 | Name="Super" 43 | Visible=true 44 | Group="ID" 45 | InheritedFrom="Object" 46 | #tag EndViewProperty 47 | #tag ViewProperty 48 | Name="Top" 49 | Visible=true 50 | Group="Position" 51 | InitialValue="0" 52 | InheritedFrom="Object" 53 | #tag EndViewProperty 54 | #tag EndViewBehavior 55 | End Module 56 | #tag EndModule 57 | -------------------------------------------------------------------------------- /Win32/Libs/msvcrt.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module msvcrt 3 | #tag Method, Flags = &h1 4 | Protected Function IsAvailable() As Boolean 5 | Return System.IsFunctionAvailable("__argc", "msvcrt") 6 | End Function 7 | #tag EndMethod 8 | 9 | #tag ExternalMethod, Flags = &h1 10 | Protected Soft Declare Function _fdopen Lib "msvcrt" (FileDescriptor As Integer, Mode As CString) As Integer 11 | #tag EndExternalMethod 12 | 13 | #tag ExternalMethod, Flags = &h1 14 | Protected Soft Declare Function _get_errno Lib "msvcrt" (ByRef errno As Integer) As Boolean 15 | #tag EndExternalMethod 16 | 17 | #tag ExternalMethod, Flags = &h1 18 | Protected Soft Declare Function _open_osfhandle Lib "msvcrt" (osfhandle As Integer, Flags As Integer) As Integer 19 | #tag EndExternalMethod 20 | 21 | #tag ExternalMethod, Flags = &h1 22 | Protected Soft Declare Function _set_errno Lib "msvcrt" (NewErrorNumber As Integer) As Boolean 23 | #tag EndExternalMethod 24 | 25 | 26 | #tag ViewBehavior 27 | #tag ViewProperty 28 | Name="Index" 29 | Visible=true 30 | Group="ID" 31 | InitialValue="-2147483648" 32 | InheritedFrom="Object" 33 | #tag EndViewProperty 34 | #tag ViewProperty 35 | Name="Left" 36 | Visible=true 37 | Group="Position" 38 | InitialValue="0" 39 | InheritedFrom="Object" 40 | #tag EndViewProperty 41 | #tag ViewProperty 42 | Name="Name" 43 | Visible=true 44 | Group="ID" 45 | InheritedFrom="Object" 46 | #tag EndViewProperty 47 | #tag ViewProperty 48 | Name="Super" 49 | Visible=true 50 | Group="ID" 51 | InheritedFrom="Object" 52 | #tag EndViewProperty 53 | #tag ViewProperty 54 | Name="Top" 55 | Visible=true 56 | Group="Position" 57 | InitialValue="0" 58 | InheritedFrom="Object" 59 | #tag EndViewProperty 60 | #tag EndViewBehavior 61 | End Module 62 | #tag EndModule 63 | -------------------------------------------------------------------------------- /Win32/Libs/Kernel32.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module Kernel32 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Declare Function FormatMessage Lib "Kernel32" Alias "FormatMessageW" (dwFlags As Integer, lpSource As Integer, dwMessageId As Integer, dwLanguageId As Integer, lpBuffer As ptr, nSize As Integer, Arguments As Integer) As Integer 5 | #tag EndExternalMethod 6 | 7 | #tag ExternalMethod, Flags = &h1 8 | Protected Declare Function GetLastError Lib "Kernel32" () As Integer 9 | #tag EndExternalMethod 10 | 11 | #tag ExternalMethod, Flags = &h1 12 | Protected Soft Declare Function GetVersionEx Lib "Kernel32" Alias "GetVersionExA" (ByRef info As OSVERSIONINFOEX) As Boolean 13 | #tag EndExternalMethod 14 | 15 | #tag ExternalMethod, Flags = &h1 16 | Protected Declare Function MoveFileEx Lib "Kernel32" Alias "MoveFileExW" (sourceFile As WString, destinationFile As WString, flags As Integer) As Boolean 17 | #tag EndExternalMethod 18 | 19 | 20 | #tag ViewBehavior 21 | #tag ViewProperty 22 | Name="Index" 23 | Visible=true 24 | Group="ID" 25 | InitialValue="-2147483648" 26 | Type="Integer" 27 | InheritedFrom="Object" 28 | #tag EndViewProperty 29 | #tag ViewProperty 30 | Name="Left" 31 | Visible=true 32 | Group="Position" 33 | InitialValue="0" 34 | Type="Integer" 35 | InheritedFrom="Object" 36 | #tag EndViewProperty 37 | #tag ViewProperty 38 | Name="Name" 39 | Visible=true 40 | Group="ID" 41 | Type="String" 42 | InheritedFrom="Object" 43 | #tag EndViewProperty 44 | #tag ViewProperty 45 | Name="Super" 46 | Visible=true 47 | Group="ID" 48 | Type="String" 49 | InheritedFrom="Object" 50 | #tag EndViewProperty 51 | #tag ViewProperty 52 | Name="Top" 53 | Visible=true 54 | Group="Position" 55 | InitialValue="0" 56 | Type="Integer" 57 | InheritedFrom="Object" 58 | #tag EndViewProperty 59 | #tag EndViewBehavior 60 | End Module 61 | #tag EndModule 62 | -------------------------------------------------------------------------------- /Win32/Libs/Rpcrt4.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module Rpcrt4 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Declare Function RpcStringFree Lib "Rpcrt4" Alias "RpcStringFreeA" (Addr As Ptr) As Integer 5 | #tag EndExternalMethod 6 | 7 | #tag ExternalMethod, Flags = &h1 8 | Protected Declare Function UuidCompare Lib "Rpcrt4" (Uuid1 As Ptr, Uuid2 As Ptr, Status As Ptr) As Integer 9 | #tag EndExternalMethod 10 | 11 | #tag ExternalMethod, Flags = &h1 12 | Protected Declare Function UuidCreate Lib "Rpcrt4" (Uuid As Ptr) As Integer 13 | #tag EndExternalMethod 14 | 15 | #tag ExternalMethod, Flags = &h1 16 | Protected Declare Function UuidCreateSequential Lib "Rpcrt4" (Uuid As Ptr) As Integer 17 | #tag EndExternalMethod 18 | 19 | #tag ExternalMethod, Flags = &h1 20 | Protected Declare Function UuidFromString Lib "Rpcrt4" Alias "UuidFromStringA" (StringUUID As Ptr, BinaryUUID As Ptr) As Integer 21 | #tag EndExternalMethod 22 | 23 | #tag ExternalMethod, Flags = &h1 24 | Protected Declare Function UuidToString Lib "Rpcrt4" Alias "UuidToStringA" (Uuid As Ptr, ByRef p As ptr) As Integer 25 | #tag EndExternalMethod 26 | 27 | 28 | #tag ViewBehavior 29 | #tag ViewProperty 30 | Name="Index" 31 | Visible=true 32 | Group="ID" 33 | InitialValue="-2147483648" 34 | InheritedFrom="Object" 35 | #tag EndViewProperty 36 | #tag ViewProperty 37 | Name="Left" 38 | Visible=true 39 | Group="Position" 40 | InitialValue="0" 41 | InheritedFrom="Object" 42 | #tag EndViewProperty 43 | #tag ViewProperty 44 | Name="Name" 45 | Visible=true 46 | Group="ID" 47 | InheritedFrom="Object" 48 | #tag EndViewProperty 49 | #tag ViewProperty 50 | Name="Super" 51 | Visible=true 52 | Group="ID" 53 | InheritedFrom="Object" 54 | #tag EndViewProperty 55 | #tag ViewProperty 56 | Name="Top" 57 | Visible=true 58 | Group="Position" 59 | InitialValue="0" 60 | InheritedFrom="Object" 61 | #tag EndViewProperty 62 | #tag EndViewBehavior 63 | End Module 64 | #tag EndModule 65 | -------------------------------------------------------------------------------- /Win32/Crypto/SessionKey.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class SessionKey 3 | Inherits Win32.Crypto.KeyContainer 4 | #tag Method, Flags = &h1000 5 | Sub Constructor(BaseData As Win32.Crypto.HashProcessor) 6 | ' Create a HashProcessor and hash some data, then pass it to this constructor. The Generate method 7 | ' will use the entropy from the HashProcessor to generate keys. 8 | // Calling the overridden superclass constructor. 9 | // Constructor(DuplicateContext As Win32.Crypto.Context) -- From Context 10 | Super.Constructor(BaseData) 11 | mBaseData = BaseData 12 | 13 | End Sub 14 | #tag EndMethod 15 | 16 | #tag Method, Flags = &h0 17 | Function Generate(Algorithm As Integer, KeySize As Integer) As Boolean 18 | Dim Flags As Integer = BitOr(ShiftLeft(KeySize, 16), (CRYPT_CREATE_SALT Or CRYPT_EXPORTABLE)) 19 | If Win32.Libs.AdvApi32.CryptDeriveKey(Me.Provider, Algorithm, mBaseData.Handle, Flags, mHandle) Then 20 | Return True 21 | End If 22 | mLastError = Win32.LastError 23 | End Function 24 | #tag EndMethod 25 | 26 | 27 | #tag Property, Flags = &h1 28 | Protected mBaseData As Win32.Crypto.HashProcessor 29 | #tag EndProperty 30 | 31 | 32 | #tag ViewBehavior 33 | #tag ViewProperty 34 | Name="Index" 35 | Visible=true 36 | Group="ID" 37 | InitialValue="-2147483648" 38 | InheritedFrom="Object" 39 | #tag EndViewProperty 40 | #tag ViewProperty 41 | Name="Left" 42 | Visible=true 43 | Group="Position" 44 | InitialValue="0" 45 | InheritedFrom="Object" 46 | #tag EndViewProperty 47 | #tag ViewProperty 48 | Name="Name" 49 | Visible=true 50 | Group="ID" 51 | InheritedFrom="Object" 52 | #tag EndViewProperty 53 | #tag ViewProperty 54 | Name="Super" 55 | Visible=true 56 | Group="ID" 57 | InheritedFrom="Object" 58 | #tag EndViewProperty 59 | #tag ViewProperty 60 | Name="Top" 61 | Visible=true 62 | Group="Position" 63 | InitialValue="0" 64 | InheritedFrom="Object" 65 | #tag EndViewProperty 66 | #tag EndViewBehavior 67 | End Class 68 | #tag EndClass 69 | -------------------------------------------------------------------------------- /Win32/Libs/Dwmapi.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module Dwmapi 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Soft Declare Function DwmEnableComposition Lib "Dwmapi" (CompositionAction As Integer) As Integer 5 | #tag EndExternalMethod 6 | 7 | #tag ExternalMethod, Flags = &h1, CompatibilityFlags = TargetHasGUI 8 | Protected Soft Declare Function DwmExtendFrameIntoClientArea Lib "Dwmapi" (HWND As Integer, ByRef Margin As Win32 . GUI . MARGINS) As Integer 9 | #tag EndExternalMethod 10 | 11 | #tag ExternalMethod, Flags = &h1 12 | Protected Soft Declare Function DwmIsCompositionEnabled Lib "Dwmapi" (ByRef IsEnabled As Boolean) As Integer 13 | #tag EndExternalMethod 14 | 15 | #tag ExternalMethod, Flags = &h1 16 | Protected Soft Declare Function DwmRegisterThumbnail Lib "Dwmapi" (MainWindow As Integer, ThumbWindow As Integer, ByRef ThumbID As Integer) As Integer 17 | #tag EndExternalMethod 18 | 19 | #tag ExternalMethod, Flags = &h1 20 | Protected Soft Declare Function DwmUnregisterThumbnail Lib "Dwmapi" (ThumbID As Integer) As Integer 21 | #tag EndExternalMethod 22 | 23 | #tag ExternalMethod, Flags = &h1, CompatibilityFlags = TargetHasGUI 24 | Protected Soft Declare Function DwmUpdateThumbnailProperties Lib "Dwmapi" (ThumbID As Integer, ByRef Properties As Win32 . GUI . DWM_THUMBNAIL_PROPERTIES) As Integer 25 | #tag EndExternalMethod 26 | 27 | 28 | #tag ViewBehavior 29 | #tag ViewProperty 30 | Name="Index" 31 | Visible=true 32 | Group="ID" 33 | InitialValue="-2147483648" 34 | InheritedFrom="Object" 35 | #tag EndViewProperty 36 | #tag ViewProperty 37 | Name="Left" 38 | Visible=true 39 | Group="Position" 40 | InitialValue="0" 41 | InheritedFrom="Object" 42 | #tag EndViewProperty 43 | #tag ViewProperty 44 | Name="Name" 45 | Visible=true 46 | Group="ID" 47 | InheritedFrom="Object" 48 | #tag EndViewProperty 49 | #tag ViewProperty 50 | Name="Super" 51 | Visible=true 52 | Group="ID" 53 | InheritedFrom="Object" 54 | #tag EndViewProperty 55 | #tag ViewProperty 56 | Name="Top" 57 | Visible=true 58 | Group="Position" 59 | InitialValue="0" 60 | InheritedFrom="Object" 61 | #tag EndViewProperty 62 | #tag EndViewBehavior 63 | End Module 64 | #tag EndModule 65 | -------------------------------------------------------------------------------- /GUI/MenuBar1.rbmnu: -------------------------------------------------------------------------------- 1 | #tag Menu 2 | Begin Menu MenuBar1 3 | Begin MenuItem FileMenu 4 | SpecialMenu = 0 5 | Text = "&Tools" 6 | Index = -2147483648 7 | AutoEnable = True 8 | Begin MenuItem RescanMenu 9 | SpecialMenu = 0 10 | Text = "&Request Rescan 🔒" 11 | Index = -2147483648 12 | ShortcutKey = "R" 13 | Shortcut = "Cmd+R" 14 | MenuModifier = True 15 | AutoEnable = True 16 | End 17 | Begin MenuItem exportmenu 18 | SpecialMenu = 0 19 | Text = "&Save report" 20 | Index = -2147483648 21 | AutoEnable = True 22 | SubMenu = True 23 | Begin MenuItem textmenu 24 | SpecialMenu = 0 25 | Text = "As &Text" 26 | Index = -2147483648 27 | AutoEnable = True 28 | End 29 | Begin MenuItem csvmenu 30 | SpecialMenu = 0 31 | Text = "As &CSV" 32 | Index = -2147483648 33 | AutoEnable = True 34 | End 35 | Begin MenuItem jsonmenu 36 | SpecialMenu = 0 37 | Text = "As original &JSON" 38 | Index = -2147483648 39 | AutoEnable = True 40 | End 41 | Begin MenuItem unpackedmenu 42 | SpecialMenu = 0 43 | Text = "As &unpacked JSON" 44 | Index = -2147483648 45 | AutoEnable = True 46 | End 47 | End 48 | Begin MenuItem tridmenu 49 | SpecialMenu = 0 50 | Text = "Analyze with &TrID..." 51 | Index = -2147483648 52 | ShortcutKey = "T" 53 | Shortcut = "Cmd+T" 54 | MenuModifier = True 55 | AutoEnable = True 56 | End 57 | Begin MenuItem OpenFileMenu 58 | SpecialMenu = 0 59 | Text = "R&un target file" 60 | Index = -2147483648 61 | ShortcutKey = "K" 62 | Shortcut = "Cmd+K" 63 | MenuModifier = True 64 | AutoEnable = True 65 | End 66 | Begin MenuItem SettsMenu 67 | SpecialMenu = 0 68 | Text = "&Settings..." 69 | Index = -2147483648 70 | AutoEnable = True 71 | End 72 | Begin MenuItem AboutMenu 73 | SpecialMenu = 0 74 | Text = "&About..." 75 | Index = -2147483648 76 | AutoEnable = True 77 | End 78 | End 79 | End 80 | #tag EndMenu 81 | -------------------------------------------------------------------------------- /Win32/Libs/Shlwapi.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module Shlwapi 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Soft Declare Function AssocIsDangerous Lib "Shlwapi" (FileExtension As WString) As Boolean 5 | #tag EndExternalMethod 6 | 7 | #tag ExternalMethod, Flags = &h1 8 | Protected Declare Function IsOS Lib "Shlwapi" (OSFeature As Integer) As Boolean 9 | #tag EndExternalMethod 10 | 11 | #tag ExternalMethod, Flags = &h1 12 | Protected Declare Function PathAddBackslash Lib "Shlwapi" Alias "PathAddBackslashW" (thePath As Ptr) As Integer 13 | #tag EndExternalMethod 14 | 15 | #tag ExternalMethod, Flags = &h1 16 | Protected Declare Function PathAppend Lib "Shlwapi" Alias "PathAppendW" (firstHalf As Ptr, secondHalf As Ptr) As Boolean 17 | #tag EndExternalMethod 18 | 19 | #tag ExternalMethod, Flags = &h1 20 | Protected Declare Function PathCanonicalize Lib "Shlwapi" Alias "PathCanonicalizeW" (OutBuffer As Ptr, InBuffer As Ptr) As Boolean 21 | #tag EndExternalMethod 22 | 23 | #tag ExternalMethod, Flags = &h1 24 | Protected Declare Function PathGetArgs Lib "Shlwapi" Alias "PathGetArgsW" (path As WString) As WString 25 | #tag EndExternalMethod 26 | 27 | #tag ExternalMethod, Flags = &h1 28 | Protected Declare Function PathMatchSpec Lib "Shlwapi" Alias "PathMatchSpecW" (path As WString, spec As WString) As Boolean 29 | #tag EndExternalMethod 30 | 31 | #tag ExternalMethod, Flags = &h1 32 | Protected Soft Declare Function PathMatchSpecEx Lib "Shlwapi" Alias "PathMatchSpecExW" (path As WString, spec As WString, Flags As Integer) As Integer 33 | #tag EndExternalMethod 34 | 35 | 36 | #tag ViewBehavior 37 | #tag ViewProperty 38 | Name="Index" 39 | Visible=true 40 | Group="ID" 41 | InitialValue="-2147483648" 42 | InheritedFrom="Object" 43 | #tag EndViewProperty 44 | #tag ViewProperty 45 | Name="Left" 46 | Visible=true 47 | Group="Position" 48 | InitialValue="0" 49 | InheritedFrom="Object" 50 | #tag EndViewProperty 51 | #tag ViewProperty 52 | Name="Name" 53 | Visible=true 54 | Group="ID" 55 | InheritedFrom="Object" 56 | #tag EndViewProperty 57 | #tag ViewProperty 58 | Name="Super" 59 | Visible=true 60 | Group="ID" 61 | InheritedFrom="Object" 62 | #tag EndViewProperty 63 | #tag ViewProperty 64 | Name="Top" 65 | Visible=true 66 | Group="Position" 67 | InitialValue="0" 68 | InheritedFrom="Object" 69 | #tag EndViewProperty 70 | #tag EndViewBehavior 71 | End Module 72 | #tag EndModule 73 | -------------------------------------------------------------------------------- /libcURL/Opts/Multi.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module Multi 3 | #tag Constant, Name = CHUNK_LENGTH_PENALTY_SIZE, Type = Double, Dynamic = False, Default = \"30010", Scope = Protected 4 | #tag EndConstant 5 | 6 | #tag Constant, Name = CONTENT_LENGTH_PENALTY_SIZE, Type = Double, Dynamic = False, Default = \"30009", Scope = Protected 7 | #tag EndConstant 8 | 9 | #tag Constant, Name = MAXCONNECTS, Type = Double, Dynamic = False, Default = \"6", Scope = Protected 10 | #tag EndConstant 11 | 12 | #tag Constant, Name = MAX_CONCURRENT_STREAMS, Type = Double, Dynamic = False, Default = \"16", Scope = Protected 13 | #tag EndConstant 14 | 15 | #tag Constant, Name = MAX_HOST_CONNECTIONS, Type = Double, Dynamic = False, Default = \"7", Scope = Protected 16 | #tag EndConstant 17 | 18 | #tag Constant, Name = MAX_PIPELINE_LENGTH, Type = Double, Dynamic = False, Default = \"8", Scope = Protected 19 | #tag EndConstant 20 | 21 | #tag Constant, Name = MAX_TOTAL_CONNECTIONS, Type = Double, Dynamic = False, Default = \"13", Scope = Protected 22 | #tag EndConstant 23 | 24 | #tag Constant, Name = PIPELINING, Type = Double, Dynamic = False, Default = \"3", Scope = Protected 25 | #tag EndConstant 26 | 27 | #tag Constant, Name = SOCKETDATA, Type = Double, Dynamic = False, Default = \"10002", Scope = Protected 28 | #tag EndConstant 29 | 30 | #tag Constant, Name = SOCKETFUNCTION, Type = Double, Dynamic = False, Default = \"20001", Scope = Protected 31 | #tag EndConstant 32 | 33 | #tag Constant, Name = TIMERDATA, Type = Double, Dynamic = False, Default = \"10005", Scope = Protected 34 | #tag EndConstant 35 | 36 | #tag Constant, Name = TIMERFUNCTION, Type = Double, Dynamic = False, Default = \"20004", Scope = Protected 37 | #tag EndConstant 38 | 39 | 40 | #tag ViewBehavior 41 | #tag ViewProperty 42 | Name="Index" 43 | Visible=true 44 | Group="ID" 45 | InitialValue="-2147483648" 46 | InheritedFrom="Object" 47 | #tag EndViewProperty 48 | #tag ViewProperty 49 | Name="Left" 50 | Visible=true 51 | Group="Position" 52 | InitialValue="0" 53 | InheritedFrom="Object" 54 | #tag EndViewProperty 55 | #tag ViewProperty 56 | Name="Name" 57 | Visible=true 58 | Group="ID" 59 | InheritedFrom="Object" 60 | #tag EndViewProperty 61 | #tag ViewProperty 62 | Name="Super" 63 | Visible=true 64 | Group="ID" 65 | InheritedFrom="Object" 66 | #tag EndViewProperty 67 | #tag ViewProperty 68 | Name="Top" 69 | Visible=true 70 | Group="Position" 71 | InitialValue="0" 72 | InheritedFrom="Object" 73 | #tag EndViewProperty 74 | #tag EndViewBehavior 75 | End Module 76 | #tag EndModule 77 | -------------------------------------------------------------------------------- /libcURL/ResponseHeaderCreator.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Private Class ResponseHeaderCreator 3 | Inherits libcURL.ResponseHeader 4 | #tag Method, Flags = &h0 5 | Sub Constructor(Header As curl_header, RequestIndex As Integer) 6 | ' This class exists solely to protect the superclass Constructor from being called 7 | ' from outside the libcURL module. 8 | 9 | // Calling the overridden superclass constructor. 10 | // Constructor(Header As curl_header, RequestIndex As Integer) -- From ResponseHeader 11 | Super.Constructor(Header, RequestIndex) 12 | End Sub 13 | #tag EndMethod 14 | 15 | #tag Method, Flags = &h0 16 | Sub Constructor(Header As curl_header64, RequestIndex As Integer) 17 | ' This class exists solely to protect the superclass Constructor from being called 18 | ' from outside the libcURL module. 19 | 20 | // Calling the overridden superclass constructor. 21 | // Constructor(Header As curl_header, RequestIndex As Integer) -- From ResponseHeader 22 | Super.Constructor(Header, RequestIndex) 23 | End Sub 24 | #tag EndMethod 25 | 26 | #tag Method, Flags = &h1000 27 | Sub Constructor(Name As String, Value As String, NameIndex As Integer, NameCount As Integer, RequestIndex As Integer) 28 | Dim h As curl_header 29 | h.Amount = NameCount 30 | h.Index = NameIndex 31 | h.Origin = CType(HeaderOriginType.Header, UInt32) 32 | 33 | // Calling the overridden superclass constructor. 34 | // Constructor(Header As curl_header, RequestIndex As Integer) -- From ResponseHeader 35 | Super.Constructor(h, RequestIndex) 36 | 37 | mName = Name 38 | mValue = Value 39 | End Sub 40 | #tag EndMethod 41 | 42 | 43 | #tag ViewBehavior 44 | #tag ViewProperty 45 | Name="Index" 46 | Visible=true 47 | Group="ID" 48 | InitialValue="-2147483648" 49 | Type="Integer" 50 | EditorType="" 51 | #tag EndViewProperty 52 | #tag ViewProperty 53 | Name="Left" 54 | Visible=true 55 | Group="Position" 56 | InitialValue="0" 57 | Type="Integer" 58 | EditorType="" 59 | #tag EndViewProperty 60 | #tag ViewProperty 61 | Name="Name" 62 | Visible=true 63 | Group="ID" 64 | InitialValue="" 65 | Type="String" 66 | EditorType="" 67 | #tag EndViewProperty 68 | #tag ViewProperty 69 | Name="Super" 70 | Visible=true 71 | Group="ID" 72 | InitialValue="" 73 | Type="String" 74 | EditorType="" 75 | #tag EndViewProperty 76 | #tag ViewProperty 77 | Name="Top" 78 | Visible=true 79 | Group="Position" 80 | InitialValue="0" 81 | Type="Integer" 82 | EditorType="" 83 | #tag EndViewProperty 84 | #tag EndViewBehavior 85 | End Class 86 | #tag EndClass 87 | -------------------------------------------------------------------------------- /libcURL/Version/LibZ.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module LibZ 3 | #tag Method, Flags = &h1 4 | Protected Function IsAtLeast(Major As Integer, Minor As Integer, Patch As Integer) As Boolean 5 | ' Returns True if LibZ is available and at least the version specified. 6 | 7 | Static avail As Boolean = libcURL.Version.LibZ.IsAvailable 8 | If Not avail Then Return False 9 | 10 | Static versionname As String 11 | If versionname = "" And Struct.libzVersion <> Nil Then 12 | Dim mb As MemoryBlock = Struct.libzVersion 13 | versionname = mb.CString(0) 14 | End If 15 | Static min, maj, pat As Integer 16 | If maj = 0 Then 17 | maj = Val(NthField(versionname, ".", 1)) 18 | min = Val(NthField(versionname, ".", 2)) 19 | pat = Val(NthField(versionname, ".", 3)) 20 | End If 21 | 22 | Return maj > Major Or (maj = Major And (min > Minor Or (min = Minor And pat >= Patch))) 23 | End Function 24 | #tag EndMethod 25 | 26 | #tag Method, Flags = &h1 27 | Protected Function IsAvailable() As Boolean 28 | Return BitAnd(Features, FEATURE_LIBZ) = FEATURE_LIBZ // libz features are present 29 | End Function 30 | #tag EndMethod 31 | 32 | #tag Method, Flags = &h1 33 | Attributes( deprecated ) Protected Function Name() As String 34 | #If Target32Bit Then 35 | Dim data As MemoryBlock = Struct.libzVersion 36 | #Else 37 | Dim data As MemoryBlock = Struct64.libzVersion 38 | #EndIf 39 | 40 | If data <> Nil Then Return data.CString(0) 41 | End Function 42 | #tag EndMethod 43 | 44 | 45 | #tag Constant, Name = FEATURE_LIBZ, Type = Double, Dynamic = False, Default = \"8", Scope = Private 46 | #tag EndConstant 47 | 48 | 49 | #tag ViewBehavior 50 | #tag ViewProperty 51 | Name="Index" 52 | Visible=true 53 | Group="ID" 54 | InitialValue="-2147483648" 55 | Type="Integer" 56 | EditorType="" 57 | #tag EndViewProperty 58 | #tag ViewProperty 59 | Name="Left" 60 | Visible=true 61 | Group="Position" 62 | InitialValue="0" 63 | Type="Integer" 64 | EditorType="" 65 | #tag EndViewProperty 66 | #tag ViewProperty 67 | Name="Name" 68 | Visible=true 69 | Group="ID" 70 | InitialValue="" 71 | Type="String" 72 | EditorType="" 73 | #tag EndViewProperty 74 | #tag ViewProperty 75 | Name="Super" 76 | Visible=true 77 | Group="ID" 78 | InitialValue="" 79 | Type="String" 80 | EditorType="" 81 | #tag EndViewProperty 82 | #tag ViewProperty 83 | Name="Top" 84 | Visible=true 85 | Group="Position" 86 | InitialValue="0" 87 | Type="Integer" 88 | EditorType="" 89 | #tag EndViewProperty 90 | #tag EndViewBehavior 91 | End Module 92 | #tag EndModule 93 | -------------------------------------------------------------------------------- /Win32/Libs/NTDLL.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module NTDLL 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Soft Declare Sub NtQueryInformationFile Lib "NTDLL" (fHandle As Integer, ByRef status As Win32 . IO . IO_STATUS_BLOCK, FileInformation As Ptr, FILength As UInt32, InfoClass As Int32) 5 | #tag EndExternalMethod 6 | 7 | #tag ExternalMethod, Flags = &h1 8 | Protected Soft Declare Function NtQuerySystemInformation Lib "NTDLL" (SystemInfoClass As UInt32, SystemInfoBuffer As Ptr, SysInfoBufferLen As UInt32, ByRef ReturnLen As Integer) As UInt32 9 | #tag EndExternalMethod 10 | 11 | #tag ExternalMethod, Flags = &h1 12 | Protected Soft Declare Function RtlCompressBuffer Lib "NTDLL" (Engine As Integer, SourceBuffer As Ptr, SrcSize As Integer, OutputBuffer As Ptr, OutputSize As Integer, SourceChunkSize As Integer, ByRef FinalSize As Integer, Workspace As Ptr) As Integer 13 | #tag EndExternalMethod 14 | 15 | #tag ExternalMethod, Flags = &h1 16 | Protected Soft Declare Function RtlDecompressBuffer Lib "NTDLL" (Format As Integer, OutputBuffer As Ptr, OutputSize As Integer, SourceBuffer As Ptr, SourceSize As Integer, ByRef FinalSize As Integer) As Integer 17 | #tag EndExternalMethod 18 | 19 | #tag ExternalMethod, Flags = &h1 20 | Protected Soft Declare Function RtlGetCompressionWorkSpaceSize Lib "NTDLL" (Format As Integer, ByRef WorkSpaceSize As Integer, ByRef FragmentSize As Integer) As Integer 21 | #tag EndExternalMethod 22 | 23 | #tag ExternalMethod, Flags = &h1 24 | Protected Soft Declare Function RtlQueryElevationFlags Lib "NTDLL" (ByRef flags As Integer) As Integer 25 | #tag EndExternalMethod 26 | 27 | #tag ExternalMethod, Flags = &h1 28 | Protected Soft Declare Function RtlSetProcessIsCritical Lib "NTDLL" (NewStatus As Boolean, ByRef OldStatus As Boolean, needscb As Boolean) As Boolean 29 | #tag EndExternalMethod 30 | 31 | 32 | #tag ViewBehavior 33 | #tag ViewProperty 34 | Name="Index" 35 | Visible=true 36 | Group="ID" 37 | InitialValue="-2147483648" 38 | InheritedFrom="Object" 39 | #tag EndViewProperty 40 | #tag ViewProperty 41 | Name="Left" 42 | Visible=true 43 | Group="Position" 44 | InitialValue="0" 45 | InheritedFrom="Object" 46 | #tag EndViewProperty 47 | #tag ViewProperty 48 | Name="Name" 49 | Visible=true 50 | Group="ID" 51 | InheritedFrom="Object" 52 | #tag EndViewProperty 53 | #tag ViewProperty 54 | Name="Super" 55 | Visible=true 56 | Group="ID" 57 | InheritedFrom="Object" 58 | #tag EndViewProperty 59 | #tag ViewProperty 60 | Name="Top" 61 | Visible=true 62 | Group="Position" 63 | InitialValue="0" 64 | InheritedFrom="Object" 65 | #tag EndViewProperty 66 | #tag EndViewBehavior 67 | End Module 68 | #tag EndModule 69 | -------------------------------------------------------------------------------- /libcURL/MIMEMessagePartCreator.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Private Class MIMEMessagePartCreator 3 | Inherits libcURL.MIMEMessagePart 4 | #tag Method, Flags = &h0 5 | Sub Constructor(ItemStruct As Ptr, Owner As libcURL.MIMEMessage) 6 | ' This class exists solely to protect the superclass Constructor from being called 7 | ' from outside the libcURL module. 8 | 9 | // Calling the overridden superclass constructor. 10 | // Constructor(ItemStruct As Ptr, Owner As libcURL.MIMEMessage) -- From MIMEMessagePart 11 | Super.Constructor(ItemStruct, Owner) 12 | End Sub 13 | #tag EndMethod 14 | 15 | 16 | #tag ViewBehavior 17 | #tag ViewProperty 18 | Name="ContentType" 19 | Visible=false 20 | Group="Behavior" 21 | InitialValue="" 22 | Type="String" 23 | EditorType="MultiLineEditor" 24 | #tag EndViewProperty 25 | #tag ViewProperty 26 | Name="Data" 27 | Visible=false 28 | Group="Behavior" 29 | InitialValue="" 30 | Type="String" 31 | EditorType="MultiLineEditor" 32 | #tag EndViewProperty 33 | #tag ViewProperty 34 | Name="FileName" 35 | Visible=false 36 | Group="Behavior" 37 | InitialValue="" 38 | Type="String" 39 | EditorType="MultiLineEditor" 40 | #tag EndViewProperty 41 | #tag ViewProperty 42 | Name="Flags" 43 | Visible=false 44 | Group="Behavior" 45 | InitialValue="" 46 | Type="Integer" 47 | EditorType="" 48 | #tag EndViewProperty 49 | #tag ViewProperty 50 | Name="DataSize" 51 | Visible=false 52 | Group="Behavior" 53 | InitialValue="" 54 | Type="UInt32" 55 | EditorType="" 56 | #tag EndViewProperty 57 | #tag ViewProperty 58 | Name="Type" 59 | Visible=false 60 | Group="Behavior" 61 | InitialValue="" 62 | Type="libcURL.MIMEPartType" 63 | EditorType="Enum" 64 | #tag EnumValues 65 | "0 - None" 66 | "1 - Data" 67 | "2 - File" 68 | "3 - Callback" 69 | "4 - Multipart" 70 | #tag EndEnumValues 71 | #tag EndViewProperty 72 | #tag ViewProperty 73 | Name="Index" 74 | Visible=true 75 | Group="ID" 76 | InitialValue="-2147483648" 77 | Type="Integer" 78 | EditorType="" 79 | #tag EndViewProperty 80 | #tag ViewProperty 81 | Name="Left" 82 | Visible=true 83 | Group="Position" 84 | InitialValue="0" 85 | Type="Integer" 86 | EditorType="" 87 | #tag EndViewProperty 88 | #tag ViewProperty 89 | Name="Name" 90 | Visible=true 91 | Group="ID" 92 | InitialValue="" 93 | Type="String" 94 | EditorType="" 95 | #tag EndViewProperty 96 | #tag ViewProperty 97 | Name="Super" 98 | Visible=true 99 | Group="ID" 100 | InitialValue="" 101 | Type="String" 102 | EditorType="" 103 | #tag EndViewProperty 104 | #tag ViewProperty 105 | Name="Top" 106 | Visible=true 107 | Group="Position" 108 | InitialValue="0" 109 | Type="Integer" 110 | EditorType="" 111 | #tag EndViewProperty 112 | #tag EndViewBehavior 113 | End Class 114 | #tag EndClass 115 | -------------------------------------------------------------------------------- /libcURL/MultipartFormElementCreator.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Private Class MultipartFormElementCreator 3 | Inherits libcURL.MultipartFormElement 4 | #tag Method, Flags = &h0 5 | Sub Constructor(ItemStruct As Ptr, Owner As libcURL.MultipartForm) 6 | ' This class exists solely to protect the superclass Constructor from being called 7 | ' from outside the libcURL module. 8 | 9 | // Calling the overridden superclass constructor. 10 | // Constructor(ItemStruct As Ptr, Owner As libcURL.MultipartForm) -- From MultipartFormElement 11 | Super.Constructor(ItemStruct, Owner) 12 | End Sub 13 | #tag EndMethod 14 | 15 | 16 | #tag ViewBehavior 17 | #tag ViewProperty 18 | Name="BufferSize" 19 | Visible=false 20 | Group="Behavior" 21 | InitialValue="" 22 | Type="Integer" 23 | EditorType="" 24 | #tag EndViewProperty 25 | #tag ViewProperty 26 | Name="ContentLen" 27 | Visible=false 28 | Group="Behavior" 29 | InitialValue="" 30 | Type="Integer" 31 | EditorType="" 32 | #tag EndViewProperty 33 | #tag ViewProperty 34 | Name="Contents" 35 | Visible=false 36 | Group="Behavior" 37 | InitialValue="" 38 | Type="String" 39 | EditorType="MultiLineEditor" 40 | #tag EndViewProperty 41 | #tag ViewProperty 42 | Name="ContentType" 43 | Visible=false 44 | Group="Behavior" 45 | InitialValue="" 46 | Type="String" 47 | EditorType="MultiLineEditor" 48 | #tag EndViewProperty 49 | #tag ViewProperty 50 | Name="FileName" 51 | Visible=false 52 | Group="Behavior" 53 | InitialValue="" 54 | Type="String" 55 | EditorType="MultiLineEditor" 56 | #tag EndViewProperty 57 | #tag ViewProperty 58 | Name="Flags" 59 | Visible=false 60 | Group="Behavior" 61 | InitialValue="" 62 | Type="Integer" 63 | EditorType="" 64 | #tag EndViewProperty 65 | #tag ViewProperty 66 | Name="Type" 67 | Visible=false 68 | Group="Behavior" 69 | InitialValue="" 70 | Type="libcURL.FormElementType" 71 | EditorType="Enum" 72 | #tag EnumValues 73 | "0 - MemoryBlock" 74 | "1 - Stream" 75 | "2 - String" 76 | "3 - File" 77 | "4 - FileArray" 78 | #tag EndEnumValues 79 | #tag EndViewProperty 80 | #tag ViewProperty 81 | Name="Index" 82 | Visible=true 83 | Group="ID" 84 | InitialValue="-2147483648" 85 | Type="Integer" 86 | EditorType="" 87 | #tag EndViewProperty 88 | #tag ViewProperty 89 | Name="Left" 90 | Visible=true 91 | Group="Position" 92 | InitialValue="0" 93 | Type="Integer" 94 | EditorType="" 95 | #tag EndViewProperty 96 | #tag ViewProperty 97 | Name="Name" 98 | Visible=true 99 | Group="ID" 100 | InitialValue="" 101 | Type="String" 102 | EditorType="" 103 | #tag EndViewProperty 104 | #tag ViewProperty 105 | Name="Super" 106 | Visible=true 107 | Group="ID" 108 | InitialValue="" 109 | Type="String" 110 | EditorType="" 111 | #tag EndViewProperty 112 | #tag ViewProperty 113 | Name="Top" 114 | Visible=true 115 | Group="Position" 116 | InitialValue="0" 117 | Type="Integer" 118 | EditorType="" 119 | #tag EndViewProperty 120 | #tag EndViewBehavior 121 | End Class 122 | #tag EndClass 123 | -------------------------------------------------------------------------------- /Win32/GUI/MessageWindow.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class MessageWindow 3 | Inherits Win32.GUI.MessageMonitor 4 | Implements Win32.Win32Object 5 | #tag CompatibilityFlags = TargetHasGUI 6 | #tag Method, Flags = &h0 7 | Sub Close() 8 | Super.Close 9 | If Not Win32.Libs.User32.DestroyWindow(Me.Handle) Then mLastError = Win32.LastError 10 | 11 | End Sub 12 | #tag EndMethod 13 | 14 | #tag Method, Flags = &h1000 15 | Sub Constructor() 16 | Me.Constructor("WinLibMessageWindow") 17 | End Sub 18 | #tag EndMethod 19 | 20 | #tag Method, Flags = &h0 21 | Sub Constructor(ClassName As String) 22 | mAtom = Super.RegisterClass(ClassName, AddressOf DefWindowProc) 23 | Dim HWND As Integer = Super.CreateWindow(ClassName, "", 0, 0, 0, 0, 0, New Win32.GUI.HWND(HWND_MESSAGE)) 24 | mLastError = Win32.LastError 25 | If HWND <> 0 Then 26 | Super.Constructor(HWND) 27 | Else 28 | Raise Win32Exception(Win32.LastError) 29 | End If 30 | End Sub 31 | #tag EndMethod 32 | 33 | #tag Method, Flags = &h1 34 | Protected Shared Function DefWindowProc(HWND as Integer, msg as Integer, wParam as Ptr, lParam as Ptr) As Integer 35 | #pragma X86CallingConvention StdCall 36 | #If TargetWin32 Then 37 | Select Case msg 38 | Case WM_CREATE, WM_NCCREATE 39 | ' Windows sends these messages when the window is first created, but before this class is fully initialized. 40 | ' We must return success else Windows will consider the creation to have failed. 41 | Return 1 42 | Else 43 | ' Let the superclass handle all other messages 44 | Break 45 | Return Super.DefWindowProc(HWND, msg, wParam, lParam) 46 | End Select 47 | #endif 48 | End Function 49 | #tag EndMethod 50 | 51 | #tag Method, Flags = &h21 52 | Private Sub Destructor() 53 | Me.Close 54 | End Sub 55 | #tag EndMethod 56 | 57 | 58 | #tag Hook, Flags = &h0 59 | Event Open() 60 | #tag EndHook 61 | 62 | 63 | #tag Note, Name = About this class 64 | This class provides an invisible message-reception window. 65 | #tag EndNote 66 | 67 | 68 | #tag Property, Flags = &h1 69 | Protected mAtom As Integer 70 | #tag EndProperty 71 | 72 | 73 | #tag Constant, Name = HWND_MESSAGE, Type = Double, Dynamic = False, Default = \"-3", Scope = Private 74 | #tag EndConstant 75 | 76 | 77 | #tag ViewBehavior 78 | #tag ViewProperty 79 | Name="Index" 80 | Visible=true 81 | Group="ID" 82 | InitialValue="-2147483648" 83 | Type="Integer" 84 | InheritedFrom="Object" 85 | #tag EndViewProperty 86 | #tag ViewProperty 87 | Name="Left" 88 | Visible=true 89 | Group="Position" 90 | InitialValue="0" 91 | InheritedFrom="Object" 92 | #tag EndViewProperty 93 | #tag ViewProperty 94 | Name="Name" 95 | Visible=true 96 | Group="ID" 97 | InheritedFrom="Object" 98 | #tag EndViewProperty 99 | #tag ViewProperty 100 | Name="Super" 101 | Visible=true 102 | Group="ID" 103 | InheritedFrom="Object" 104 | #tag EndViewProperty 105 | #tag ViewProperty 106 | Name="Top" 107 | Visible=true 108 | Group="Position" 109 | InitialValue="0" 110 | InheritedFrom="Object" 111 | #tag EndViewProperty 112 | #tag EndViewBehavior 113 | End Class 114 | #tag EndClass 115 | -------------------------------------------------------------------------------- /Win32/IO.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module IO 3 | #tag Method, Flags = &h1 4 | Protected Function DeleteOnReboot(source As FolderItem) As Boolean 5 | //Schedules the source file to be deleted on the next system reboot 6 | //This function will fail if the user does not have write access to the 7 | //HKEY_LOCAL_MACHINE registry hive (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations) 8 | //Or if the user does not have write access to the Target file. 9 | 10 | #If TargetWin32 11 | Return Win32.Libs.Kernel32.MoveFileEx(source.NativePath, Nil, MOVEFILE_DELAY_UNTIL_REBOOT) 12 | #endif 13 | End Function 14 | #tag EndMethod 15 | 16 | #tag Method, Flags = &h1 17 | Protected Function IsExecutable(File As FolderItem) As Boolean 18 | Return Win32.Libs.AdvApi32.SaferiIsExecutableFileType(File.NativePath, False) 19 | End Function 20 | #tag EndMethod 21 | 22 | 23 | #tag Constant, Name = MOVEFILE_DELAY_UNTIL_REBOOT, Type = Double, Dynamic = False, Default = \"&h4", Scope = Protected 24 | #tag EndConstant 25 | 26 | 27 | #tag Structure, Name = FILETIME, Flags = &h1, Attributes = \"StructureAlignment \x3D 1" 28 | HighDateTime As Integer 29 | LowDateTime As Integer 30 | #tag EndStructure 31 | 32 | #tag Structure, Name = IO_STATUS_BLOCK, Flags = &h1, Attributes = \"StructureAlignment \x3D 1" 33 | Status As Int32 34 | Info As Int32 35 | #tag EndStructure 36 | 37 | #tag Structure, Name = OVERLAPPED, Flags = &h1, Attributes = \"StructureAlignment \x3D 1" 38 | Internal As Integer 39 | InternalHigh As Integer 40 | Offset As UInt64 41 | hEvent As Integer 42 | #tag EndStructure 43 | 44 | #tag Structure, Name = WIN32_FIND_DATA, Flags = &h1, Attributes = \"StructureAlignment \x3D 1" 45 | Attribs As Integer 46 | CreationTime As FILETIME 47 | LastAccess As FILETIME 48 | LastWrite As FILETIME 49 | sizeHigh As Integer 50 | sizeLow As Integer 51 | Reserved1 As Integer 52 | Reserved2 As Integer 53 | FileName As WString*260 54 | AlternateName As String*14 55 | #tag EndStructure 56 | 57 | #tag Structure, Name = WIN32_FIND_STREAM_DATA, Flags = &h1, Attributes = \"StructureAlignment \x3D 1" 58 | StreamSize As Int64 59 | StreamName As String*1024 60 | #tag EndStructure 61 | 62 | 63 | #tag ViewBehavior 64 | #tag ViewProperty 65 | Name="Index" 66 | Visible=true 67 | Group="ID" 68 | InitialValue="-2147483648" 69 | Type="Integer" 70 | EditorType="" 71 | #tag EndViewProperty 72 | #tag ViewProperty 73 | Name="Left" 74 | Visible=true 75 | Group="Position" 76 | InitialValue="0" 77 | Type="Integer" 78 | EditorType="" 79 | #tag EndViewProperty 80 | #tag ViewProperty 81 | Name="Name" 82 | Visible=true 83 | Group="ID" 84 | InitialValue="" 85 | Type="String" 86 | EditorType="" 87 | #tag EndViewProperty 88 | #tag ViewProperty 89 | Name="Super" 90 | Visible=true 91 | Group="ID" 92 | InitialValue="" 93 | Type="String" 94 | EditorType="" 95 | #tag EndViewProperty 96 | #tag ViewProperty 97 | Name="Top" 98 | Visible=true 99 | Group="Position" 100 | InitialValue="0" 101 | Type="Integer" 102 | EditorType="" 103 | #tag EndViewProperty 104 | #tag EndViewBehavior 105 | End Module 106 | #tag EndModule 107 | -------------------------------------------------------------------------------- /Win32/Libs/Shell32.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module Shell32 3 | #tag ExternalMethod, Flags = &h1, CompatibilityFlags = TargetHasGUI 4 | Protected Declare Function ExtractIconEx Lib "Shell32" Alias "ExtractIconExW" (ResourceFile As WString, Index As Integer, largeIco As Ptr, smallIco As Ptr, Icons As Integer) As Integer 5 | #tag EndExternalMethod 6 | 7 | #tag ExternalMethod, Flags = &h1 8 | Protected Declare Function FindExecutable Lib "Shell32" Alias "FindExecutableW" (file As WString, directory As WString, result As Ptr) As Integer 9 | #tag EndExternalMethod 10 | 11 | #tag ExternalMethod, Flags = &h1 12 | Protected Declare Function IsUserAnAdmin Lib "Shell32" () As Boolean 13 | #tag EndExternalMethod 14 | 15 | #tag ExternalMethod, Flags = &h1 16 | Protected Declare Function PathIsSlow Lib "Shell32" Alias "PathIsSlowW" (path As WString, attribs As Integer) As Boolean 17 | #tag EndExternalMethod 18 | 19 | #tag ExternalMethod, Flags = &h1 20 | Protected Declare Function PathResolve Lib "Shell32" (path As Ptr, startDir As Ptr, flags As Integer) As Boolean 21 | #tag EndExternalMethod 22 | 23 | #tag ExternalMethod, Flags = &h1 24 | Protected Declare Function PickIconDlg Lib "Shell32" (ParentWindow As Integer, resource As Ptr, resourceLen As Integer, ByRef Index As Integer) As Integer 25 | #tag EndExternalMethod 26 | 27 | #tag ExternalMethod, Flags = &h1 28 | Protected Declare Function ShellAbout Lib "Shell32" Alias "ShellAboutW" (HWND As Integer, msgString As WString, otherStuff As WString, hIcon As Integer) As Boolean 29 | #tag EndExternalMethod 30 | 31 | #tag ExternalMethod, Flags = &h1 32 | Protected Declare Function ShellExecute Lib "Shell32" Alias "ShellExecuteW" (HWND As Integer, op As WString, file As WString, params As WString, directory As WString, cmd As Integer) As Integer 33 | #tag EndExternalMethod 34 | 35 | #tag ExternalMethod, Flags = &h1, CompatibilityFlags = TargetHasGUI 36 | Protected Declare Function Shell_NotifyIcon Lib "Shell32" Alias "Shell_NotifyIconW" (Message As Integer, Data As Win32 . GUI . NOTIFYICONDATA) As Boolean 37 | #tag EndExternalMethod 38 | 39 | #tag ExternalMethod, Flags = &h1, CompatibilityFlags = TargetHasGUI 40 | Protected Declare Function SHGetFileInfo Lib "Shell32" Alias "SHGetFileInfoW" (FilePath As WString, Attribs As Integer, ByRef info As Win32 . GUI . SHFILEINFO, infoSize As Integer, flags As Integer) As Boolean 41 | #tag EndExternalMethod 42 | 43 | #tag ExternalMethod, Flags = &h1, CompatibilityFlags = TargetHasGUI 44 | Protected Declare Sub SHGetSettings Lib "Shell32" (ByRef flagStruct As Win32 . GUI . SHELLFLAGSTATE, flags As Integer) 45 | #tag EndExternalMethod 46 | 47 | 48 | #tag ViewBehavior 49 | #tag ViewProperty 50 | Name="Index" 51 | Visible=true 52 | Group="ID" 53 | InitialValue="-2147483648" 54 | InheritedFrom="Object" 55 | #tag EndViewProperty 56 | #tag ViewProperty 57 | Name="Left" 58 | Visible=true 59 | Group="Position" 60 | InitialValue="0" 61 | InheritedFrom="Object" 62 | #tag EndViewProperty 63 | #tag ViewProperty 64 | Name="Name" 65 | Visible=true 66 | Group="ID" 67 | InheritedFrom="Object" 68 | #tag EndViewProperty 69 | #tag ViewProperty 70 | Name="Super" 71 | Visible=true 72 | Group="ID" 73 | InheritedFrom="Object" 74 | #tag EndViewProperty 75 | #tag ViewProperty 76 | Name="Top" 77 | Visible=true 78 | Group="Position" 79 | InitialValue="0" 80 | InheritedFrom="Object" 81 | #tag EndViewProperty 82 | #tag EndViewBehavior 83 | End Module 84 | #tag EndModule 85 | -------------------------------------------------------------------------------- /libcURL/ProxyEngineCreator.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Private Class ProxyEngineCreator 3 | Inherits libcURL.ProxyEngine 4 | #tag Method, Flags = &h0 5 | Sub Constructor(Owner As libcURL.EasyHandle) 6 | ' This class exists solely to protect the superclass Constructor from being called 7 | ' from outside the libcURL module. 8 | 9 | // Calling the overridden superclass constructor. 10 | // Constructor(Owner As libcURL.EasyHandle) -- From ProxyEngine 11 | Super.Constructor(Owner) 12 | End Sub 13 | #tag EndMethod 14 | 15 | 16 | #tag ViewBehavior 17 | #tag ViewProperty 18 | Name="Address" 19 | Visible=false 20 | Group="Behavior" 21 | InitialValue="" 22 | Type="String" 23 | EditorType="MultiLineEditor" 24 | #tag EndViewProperty 25 | #tag ViewProperty 26 | Name="HTTPTunnel" 27 | Visible=false 28 | Group="Behavior" 29 | InitialValue="" 30 | Type="Boolean" 31 | EditorType="" 32 | #tag EndViewProperty 33 | #tag ViewProperty 34 | Name="Password" 35 | Visible=false 36 | Group="Behavior" 37 | InitialValue="" 38 | Type="String" 39 | EditorType="MultiLineEditor" 40 | #tag EndViewProperty 41 | #tag ViewProperty 42 | Name="Port" 43 | Visible=false 44 | Group="Behavior" 45 | InitialValue="" 46 | Type="Integer" 47 | EditorType="" 48 | #tag EndViewProperty 49 | #tag ViewProperty 50 | Name="ServiceName" 51 | Visible=false 52 | Group="Behavior" 53 | InitialValue="" 54 | Type="String" 55 | EditorType="MultiLineEditor" 56 | #tag EndViewProperty 57 | #tag ViewProperty 58 | Name="Username" 59 | Visible=false 60 | Group="Behavior" 61 | InitialValue="" 62 | Type="String" 63 | EditorType="MultiLineEditor" 64 | #tag EndViewProperty 65 | #tag ViewProperty 66 | Name="Secure" 67 | Visible=false 68 | Group="Behavior" 69 | InitialValue="" 70 | Type="Boolean" 71 | EditorType="" 72 | #tag EndViewProperty 73 | #tag ViewProperty 74 | Name="UnifiedHeaders" 75 | Visible=false 76 | Group="Behavior" 77 | InitialValue="" 78 | Type="Boolean" 79 | EditorType="" 80 | #tag EndViewProperty 81 | #tag ViewProperty 82 | Name="Type" 83 | Visible=false 84 | Group="Behavior" 85 | InitialValue="" 86 | Type="libcURL.ProxyType" 87 | EditorType="Enum" 88 | #tag EnumValues 89 | "0 - HTTP" 90 | "1 - HTTP1_0" 91 | "4 - SOCKS4" 92 | "6 - SOCKS4A" 93 | "5 - SOCKS5" 94 | "7 - SOCKS5_HOSTNAME" 95 | #tag EndEnumValues 96 | #tag EndViewProperty 97 | #tag ViewProperty 98 | Name="Index" 99 | Visible=true 100 | Group="ID" 101 | InitialValue="-2147483648" 102 | Type="Integer" 103 | EditorType="" 104 | #tag EndViewProperty 105 | #tag ViewProperty 106 | Name="Left" 107 | Visible=true 108 | Group="Position" 109 | InitialValue="0" 110 | Type="Integer" 111 | EditorType="" 112 | #tag EndViewProperty 113 | #tag ViewProperty 114 | Name="Name" 115 | Visible=true 116 | Group="ID" 117 | InitialValue="" 118 | Type="String" 119 | EditorType="" 120 | #tag EndViewProperty 121 | #tag ViewProperty 122 | Name="Super" 123 | Visible=true 124 | Group="ID" 125 | InitialValue="" 126 | Type="String" 127 | EditorType="" 128 | #tag EndViewProperty 129 | #tag ViewProperty 130 | Name="Top" 131 | Visible=true 132 | Group="Position" 133 | InitialValue="0" 134 | Type="Integer" 135 | EditorType="" 136 | #tag EndViewProperty 137 | #tag EndViewBehavior 138 | End Class 139 | #tag EndClass 140 | -------------------------------------------------------------------------------- /libcURL/ResponseHeaderEngineCreator.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Private Class ResponseHeaderEngineCreator 3 | Inherits libcURL.ResponseHeaderEngine 4 | #tag Method, Flags = &h0 5 | Sub Constructor(Owner As libcURL.EasyHandle, Optional FakeHeaders As InternetHeaders) 6 | // Calling the overridden superclass constructor. 7 | Super.Constructor(Owner) 8 | mFake = FakeHeaders 9 | End Sub 10 | #tag EndMethod 11 | 12 | #tag Method, Flags = &h0 13 | Function Count(Name As String = "", Origin As libcURL.HeaderOriginType = libcURL.HeaderOriginType.Any, RequestIndex As Integer = - 1) As Integer 14 | If mFake = Nil Then Return Super.Count(Name, Origin, RequestIndex) 15 | If Name = "" Then 16 | Return mFake.Count 17 | Else 18 | Return mFake.NameCount(Name) 19 | End If 20 | End Function 21 | #tag EndMethod 22 | 23 | #tag Method, Flags = &h0 24 | Function GetHeader(Name As String, Index As Integer = 0, Origin As libcURL.HeaderOriginType = libcURL.HeaderOriginType.Any, RequestIndex As Integer = - 1) As libcURL.ResponseHeader 25 | If mFake = Nil Then Return Super.GetHeader(Name, Index, Origin, RequestIndex) 26 | Dim vl As String = mFake.Value(Name, Index) 27 | If vl <> "" Then Return New ResponseHeaderCreator(Name, vl, Index, Me.Count(Name, Origin, RequestIndex), RequestIndex) 28 | End Function 29 | #tag EndMethod 30 | 31 | #tag Method, Flags = &h0 32 | Function GetHeaders(Name As String = "", Origin As libcURL.HeaderOriginType = libcURL.HeaderOriginType.Any, RequestIndex As Integer = - 1) As libcURL.ResponseHeader() 33 | If mFake = Nil Then Return Super.GetHeaders(Name, Origin, RequestIndex) 34 | If RequestIndex < 0 Then RequestIndex = 0 35 | Dim h() As ResponseHeader 36 | Dim count As Integer = mFake.Count 37 | For i As Integer = 0 To count - 1 38 | If Name = "" Or Name = mFake.Name(i) Then h.Append(New ResponseHeaderCreator(mFake.Name(i), mFake.Value(i), i, count, RequestIndex)) 39 | Next 40 | Return h 41 | End Function 42 | #tag EndMethod 43 | 44 | #tag Method, Flags = &h0 45 | Function Operator_Convert() As InternetHeaders 46 | If mFake = Nil Then Return Super.Operator_Convert() 47 | Return mFake 48 | End Function 49 | #tag EndMethod 50 | 51 | #tag Method, Flags = &h0 52 | Function RequestCount() As Integer 53 | If mFake = Nil Then Return Super.RequestCount() 54 | Return 1 55 | End Function 56 | #tag EndMethod 57 | 58 | 59 | #tag Property, Flags = &h21 60 | Private mFake As InternetHeaders 61 | #tag EndProperty 62 | 63 | 64 | #tag ViewBehavior 65 | #tag ViewProperty 66 | Name="Index" 67 | Visible=true 68 | Group="ID" 69 | InitialValue="-2147483648" 70 | Type="Integer" 71 | EditorType="" 72 | #tag EndViewProperty 73 | #tag ViewProperty 74 | Name="Left" 75 | Visible=true 76 | Group="Position" 77 | InitialValue="0" 78 | Type="Integer" 79 | EditorType="" 80 | #tag EndViewProperty 81 | #tag ViewProperty 82 | Name="Name" 83 | Visible=true 84 | Group="ID" 85 | InitialValue="" 86 | Type="String" 87 | EditorType="" 88 | #tag EndViewProperty 89 | #tag ViewProperty 90 | Name="Super" 91 | Visible=true 92 | Group="ID" 93 | InitialValue="" 94 | Type="String" 95 | EditorType="" 96 | #tag EndViewProperty 97 | #tag ViewProperty 98 | Name="Top" 99 | Visible=true 100 | Group="Position" 101 | InitialValue="0" 102 | Type="Integer" 103 | EditorType="" 104 | #tag EndViewProperty 105 | #tag EndViewBehavior 106 | End Class 107 | #tag EndClass 108 | -------------------------------------------------------------------------------- /Win32/Libs/GDI32.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module GDI32 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Declare Function AddFontResource Lib "GDI32" Alias "AddFontResourceW" (FontFile As WString) As Integer 5 | #tag EndExternalMethod 6 | 7 | #tag ExternalMethod, Flags = &h1 8 | Protected Declare Function AddFontResourceEx Lib "GDI32" Alias "AddFontResourceExW" (FontFile As WString, Flags As Integer, Reserved As Integer) As Integer 9 | #tag EndExternalMethod 10 | 11 | #tag ExternalMethod, Flags = &h1 12 | Protected Declare Function BitBlt Lib "GDI32" (DCdest As Integer, xDest As Integer, yDest As Integer, nWidth As Integer, nHeight As Integer, DCdource As Integer, xSource As Integer, ySource As Integer, rasterOp As Integer) As Boolean 13 | #tag EndExternalMethod 14 | 15 | #tag ExternalMethod, Flags = &h1 16 | Protected Declare Function CombineRgn Lib "GDI32" (rgnDest As Integer, rgnSrc1 As Integer, rgnSrc2 As Integer, combineMode As Integer) As Integer 17 | #tag EndExternalMethod 18 | 19 | #tag ExternalMethod, Flags = &h1 20 | Protected Declare Function CreateBitmap Lib "GDI32" (Width As Integer, Height As Integer, Planes As UInt32, BitsPerPel As UInt32, Buffer As Ptr) As Integer 21 | #tag EndExternalMethod 22 | 23 | #tag ExternalMethod, Flags = &h1 24 | Protected Declare Function CreateCompatibleBitmap Lib "GDI32" (hDC As Integer, Width As Integer, Height As Integer) As Integer 25 | #tag EndExternalMethod 26 | 27 | #tag ExternalMethod, Flags = &h1 28 | Protected Declare Function CreateCompatibleDC Lib "GDI32" (hDC As Integer) As Integer 29 | #tag EndExternalMethod 30 | 31 | #tag ExternalMethod, Flags = &h1 32 | Protected Declare Function CreateRectRgn Lib "GDI32" (Left As Integer, Top As Integer, Right As Integer, Bottom As Integer) As Integer 33 | #tag EndExternalMethod 34 | 35 | #tag ExternalMethod, Flags = &h1 36 | Protected Declare Function DeleteObject Lib "GDI32" (hObject As Integer) As Integer 37 | #tag EndExternalMethod 38 | 39 | #tag ExternalMethod, Flags = &h1 40 | Protected Declare Function GetBitmapDimensionEx Lib "GDI32" (hBitmap As Integer, Dimensions As Ptr) As Boolean 41 | #tag EndExternalMethod 42 | 43 | #tag ExternalMethod, Flags = &h1 44 | Protected Declare Function GetObject Lib "GDI32" Alias "GetObjectW" (hObject As Integer, BuffSz As Integer, Buffer As Ptr) As Integer 45 | #tag EndExternalMethod 46 | 47 | #tag ExternalMethod, Flags = &h1 48 | Protected Declare Function RemoveFontResourceEx Lib "GDI32" Alias "RemoveFontResourceExW" (FontFile As WString, Flags As Integer, Reserved As Integer) As Boolean 49 | #tag EndExternalMethod 50 | 51 | #tag ExternalMethod, Flags = &h1 52 | Protected Declare Function SelectObject Lib "GDI32" (hDC As Integer, hObject As Integer) As Integer 53 | #tag EndExternalMethod 54 | 55 | 56 | #tag ViewBehavior 57 | #tag ViewProperty 58 | Name="Index" 59 | Visible=true 60 | Group="ID" 61 | InitialValue="-2147483648" 62 | InheritedFrom="Object" 63 | #tag EndViewProperty 64 | #tag ViewProperty 65 | Name="Left" 66 | Visible=true 67 | Group="Position" 68 | InitialValue="0" 69 | InheritedFrom="Object" 70 | #tag EndViewProperty 71 | #tag ViewProperty 72 | Name="Name" 73 | Visible=true 74 | Group="ID" 75 | InheritedFrom="Object" 76 | #tag EndViewProperty 77 | #tag ViewProperty 78 | Name="Super" 79 | Visible=true 80 | Group="ID" 81 | InheritedFrom="Object" 82 | #tag EndViewProperty 83 | #tag ViewProperty 84 | Name="Top" 85 | Visible=true 86 | Group="Position" 87 | InitialValue="0" 88 | InheritedFrom="Object" 89 | #tag EndViewProperty 90 | #tag EndViewBehavior 91 | End Module 92 | #tag EndModule 93 | -------------------------------------------------------------------------------- /libcURL/Opts/OptionInfoCreator.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Private Class OptionInfoCreator 3 | Inherits libcURL.Opts.OptionInfo 4 | #tag Method, Flags = &h0 5 | Sub Constructor(Option As curl_easyoption) 6 | ' This class exists solely to protect the superclass Constructor from being called 7 | ' from outside the libcURL module. 8 | 9 | // Calling the overridden superclass constructor. 10 | // Constructor(Option As curl_easyoption) -- From OptionInfo 11 | Super.Constructor(Option) 12 | 13 | End Sub 14 | #tag EndMethod 15 | 16 | 17 | #tag ViewBehavior 18 | #tag ViewProperty 19 | Name="BindingAlias" 20 | Visible=false 21 | Group="Behavior" 22 | InitialValue="" 23 | Type="String" 24 | EditorType="MultiLineEditor" 25 | #tag EndViewProperty 26 | #tag ViewProperty 27 | Name="DocumentationURL" 28 | Visible=false 29 | Group="Behavior" 30 | InitialValue="" 31 | Type="String" 32 | EditorType="MultiLineEditor" 33 | #tag EndViewProperty 34 | #tag ViewProperty 35 | Name="IsAvailable" 36 | Visible=false 37 | Group="Behavior" 38 | InitialValue="" 39 | Type="Boolean" 40 | EditorType="" 41 | #tag EndViewProperty 42 | #tag ViewProperty 43 | Name="IsDeprecated" 44 | Visible=false 45 | Group="Behavior" 46 | InitialValue="" 47 | Type="Boolean" 48 | EditorType="" 49 | #tag EndViewProperty 50 | #tag ViewProperty 51 | Name="IsNullable" 52 | Visible=false 53 | Group="Behavior" 54 | InitialValue="" 55 | Type="Boolean" 56 | EditorType="" 57 | #tag EndViewProperty 58 | #tag ViewProperty 59 | Name="LibraryAlias" 60 | Visible=false 61 | Group="Behavior" 62 | InitialValue="" 63 | Type="String" 64 | EditorType="MultiLineEditor" 65 | #tag EndViewProperty 66 | #tag ViewProperty 67 | Name="MinimumVersion" 68 | Visible=false 69 | Group="Behavior" 70 | InitialValue="" 71 | Type="String" 72 | EditorType="MultiLineEditor" 73 | #tag EndViewProperty 74 | #tag ViewProperty 75 | Name="OptionNumber" 76 | Visible=false 77 | Group="Behavior" 78 | InitialValue="" 79 | Type="Int32" 80 | EditorType="" 81 | #tag EndViewProperty 82 | #tag ViewProperty 83 | Name="Type" 84 | Visible=false 85 | Group="Behavior" 86 | InitialValue="" 87 | Type="libcURL.OptionType" 88 | EditorType="Enum" 89 | #tag EnumValues 90 | "0 - Number" 91 | "1 - Bitmask" 92 | "2 - LargeNumber" 93 | "3 - Ptr" 94 | "4 - String" 95 | "5 - List" 96 | "6 - Opaque" 97 | "7 - Blob" 98 | "8 - Subroutine" 99 | "9 - Unknown" 100 | "10 - Boolean" 101 | #tag EndEnumValues 102 | #tag EndViewProperty 103 | #tag ViewProperty 104 | Name="Index" 105 | Visible=true 106 | Group="ID" 107 | InitialValue="-2147483648" 108 | Type="Integer" 109 | EditorType="" 110 | #tag EndViewProperty 111 | #tag ViewProperty 112 | Name="Left" 113 | Visible=true 114 | Group="Position" 115 | InitialValue="0" 116 | Type="Integer" 117 | EditorType="" 118 | #tag EndViewProperty 119 | #tag ViewProperty 120 | Name="Name" 121 | Visible=true 122 | Group="ID" 123 | InitialValue="" 124 | Type="String" 125 | EditorType="" 126 | #tag EndViewProperty 127 | #tag ViewProperty 128 | Name="Super" 129 | Visible=true 130 | Group="ID" 131 | InitialValue="" 132 | Type="String" 133 | EditorType="" 134 | #tag EndViewProperty 135 | #tag ViewProperty 136 | Name="Top" 137 | Visible=true 138 | Group="Position" 139 | InitialValue="0" 140 | Type="Integer" 141 | EditorType="" 142 | #tag EndViewProperty 143 | #tag EndViewBehavior 144 | End Class 145 | #tag EndClass 146 | -------------------------------------------------------------------------------- /TaskBar.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class TaskBar 3 | Inherits COM.IUnknown 4 | #tag Method, Flags = &h0 5 | Sub Constructor(wnd As Window) 6 | mAssociatedWindow = wnd 7 | 8 | // The CLSID describes the COM object we want to create 9 | Dim CLSID_TaskbarList As MemoryBlock = COM.IIDFromString("{56FDF344-FD6D-11d0-958A-006097C9A090}") 10 | // The IID describes the interface you're requesting from the COM object 11 | Dim IID_ITaskbarList3 As MemoryBlock = COM.IIDFromString("{ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf}") 12 | 13 | Dim taskBarPtr As Ptr 14 | Dim result As Integer 15 | result = COM.CoCreateInstance(CLSID_TaskbarList, Nil, COM.CLSCTX_SERVER, IID_ITaskbarList3, taskBarPtr) 16 | 17 | If result = COM.S_OK Then 18 | // Constructor for COM.IUnknown takes a pointer. 19 | // This pointer is the TaskBar COM object. 20 | // COM.IUnknown adopts the reference and will release this reference on destruction. 21 | Super.Constructor(taskBarPtr) 22 | Else 23 | MsgBox "Failed to create TaskBar object" 24 | End If 25 | 26 | 27 | End Sub 28 | #tag EndMethod 29 | 30 | #tag DelegateDeclaration, Flags = &h21 31 | Private Delegate Function SetProgressState(this As Ptr, hwnd As Integer, state As TaskBarStates) As Integer 32 | #tag EndDelegateDeclaration 33 | 34 | #tag Method, Flags = &h0 35 | Sub SetProgressState(state As TaskBarStates) 36 | Dim sizeOfPtr As Integer 37 | #if Target64Bit 38 | sizeOfPtr = 8 39 | #else 40 | sizeOfPtr = 4 41 | #endif 42 | 43 | // SetProgressState is listed as the 10th function pointer in ITaskbarList3 44 | Dim setProgressStateFunc As New SetProgressState(Handle.Ptr(0).Ptr(10 * sizeOfPtr)) 45 | Call SetProgressStateFunc.Invoke(Handle, mAssociatedWindow.Handle, state) 46 | 47 | End Sub 48 | #tag EndMethod 49 | 50 | #tag Method, Flags = &h0 51 | Sub SetProgressValue(value As Integer, maxValue As Integer) 52 | Dim sizeOfPtr As Integer 53 | #if Target64Bit 54 | sizeOfPtr = 8 55 | #else 56 | sizeOfPtr = 4 57 | #endif 58 | 59 | // SetProgressValue is listed as the 9th function pointer in ITaskbarList3 60 | Dim setProgressValueFunc As New SetProgressValue(Handle.Ptr(0).Ptr(9 * sizeOfPtr)) 61 | Call SetProgressValueFunc.Invoke(Handle, mAssociatedWindow.Handle, value, maxValue) 62 | 63 | End Sub 64 | #tag EndMethod 65 | 66 | #tag DelegateDeclaration, Flags = &h21 67 | Private Delegate Function SetProgressValue(this As Ptr, hwnd As Integer, completed As Int64, total As Int64) As Integer 68 | #tag EndDelegateDeclaration 69 | 70 | 71 | #tag Property, Flags = &h21 72 | Private mAssociatedWindow As Window 73 | #tag EndProperty 74 | 75 | 76 | #tag Enum, Name = TaskBarStates, Type = Int32, Flags = &h0 77 | NoProgress = 0 78 | Indeterminate = 1 79 | Normal = 2 80 | Error = 4 81 | Paused = 8 82 | #tag EndEnum 83 | 84 | 85 | #tag ViewBehavior 86 | #tag ViewProperty 87 | Name="Index" 88 | Visible=true 89 | Group="ID" 90 | InitialValue="2147483648" 91 | InheritedFrom="Object" 92 | #tag EndViewProperty 93 | #tag ViewProperty 94 | Name="Left" 95 | Visible=true 96 | Group="Position" 97 | InitialValue="0" 98 | InheritedFrom="Object" 99 | #tag EndViewProperty 100 | #tag ViewProperty 101 | Name="Name" 102 | Visible=true 103 | Group="ID" 104 | InheritedFrom="Object" 105 | #tag EndViewProperty 106 | #tag ViewProperty 107 | Name="Super" 108 | Visible=true 109 | Group="ID" 110 | InheritedFrom="Object" 111 | #tag EndViewProperty 112 | #tag ViewProperty 113 | Name="Top" 114 | Visible=true 115 | Group="Position" 116 | InitialValue="0" 117 | InheritedFrom="Object" 118 | #tag EndViewProperty 119 | #tag EndViewBehavior 120 | End Class 121 | #tag EndClass 122 | -------------------------------------------------------------------------------- /Misc/installer.iss: -------------------------------------------------------------------------------- 1 | ; Script generated by the Inno Setup Script Wizard. 2 | ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! 3 | 4 | [Setup] 5 | ; NOTE: The value of AppId uniquely identifies this application. 6 | ; Do not use the same AppId value in installers for other applications. 7 | ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) 8 | AppId={{1E579B65-503B-4184-B481-5138124BEE1D} 9 | AppName=VT Hash Check 10 | AppVersion=1.66 11 | ;AppVerName=VT Hash Check 1.22 12 | AppPublisher=Boredom Software 13 | AppPublisherURL=http://www.boredomsoft.org 14 | AppSupportURL=http://www.boredomsoft.org/vt-hash-check.bs 15 | AppUpdatesURL=http://www.boredomsoft.org/vt-hash-check.bs 16 | DefaultDirName={pf}\Boredom Software\VT Hash Check 17 | DisableProgramGroupPage=true 18 | AllowNoIcons=true 19 | LicenseFile=..\Misc\license.txt 20 | InfoBeforeFile=..\Misc\readme.txt 21 | OutputBaseFilename=setup 22 | SetupIconFile=..\GUI\Images\VTHash_102.ico 23 | Compression=lzma/ultra 24 | SolidCompression=true 25 | AppCopyright=Boredom Software 26 | AppVerName=VT Hash Check 1.66 27 | AllowUNCPath=false 28 | UsePreviousGroup=false 29 | UninstallDisplayIcon={app}\VTHash.exe 30 | UninstallDisplayName=VT Hash Check 1.66 31 | ShowLanguageDialog=no 32 | ;WizardImageFile=D:\Program Files\Inno Setup 5\Wizard Images\Modern\SetupModern21.bmp 33 | ;WizardSmallImageFile=D:\Program Files\Inno Setup 5\Wizard Images\Modern\Small\SetupModernSmall26.bmp 34 | 35 | [Languages] 36 | Name: english; MessagesFile: compiler:Default.isl 37 | 38 | [Files] 39 | Source: "D:\Git Repository\VT-Hash\Builds - virusTotal_RELEASE\Windows\VTHash\*"; DestDir: "{app}"; Flags: ignoreversion replacesameversion touch 40 | Source: "D:\Git Repository\VT-Hash\Builds - virusTotal_RELEASE\Windows\VTHash\VTHash Libs\*"; DestDir: "{app}\VTHash Libs"; Flags: ignoreversion recursesubdirs createallsubdirs touch 41 | Source: "D:\Git Repository\VT-Hash\Builds - virusTotal_RELEASE\Windows\VTHash\VTHash Resources\*"; DestDir: "{app}\VTHash Resources"; Flags: ignoreversion recursesubdirs createallsubdirs touch 42 | ; NOTE: Don't use "Flags: ignoreversion" on any shared system files 43 | Source: "readme.txt"; DestDir: "{app}"; DestName: "readme.txt"; Flags: touch 44 | Source: "license.txt"; DestDir: "{app}"; DestName: "license.txt"; Flags: touch 45 | Source: "..\GUI\Images\VTHash_102.ico"; DestDir: "{app}"; MinVersion: 0,6.0.6000 46 | Source: "triddefs.trd"; DestDir: "{app}"; Flags: overwritereadonly 47 | Source: "TrIDLib.dll"; DestDir: "{app}"; Flags: overwritereadonly 48 | Source: "libbrotlicommon.dll"; DestDir: "{app}"; Flags: ignoreversion overwritereadonly 49 | Source: "libbrotlidec.dll"; DestDir: "{app}"; Flags: ignoreversion overwritereadonly 50 | Source: "libbrotlienc.dll"; DestDir: "{app}"; Flags: ignoreversion overwritereadonly 51 | Source: "libcrypto-1_1.dll"; DestDir: "{app}"; Flags: ignoreversion overwritereadonly 52 | Source: "libcurl.dll"; DestDir: "{app}"; Flags: ignoreversion overwritereadonly 53 | Source: "libssh2.dll"; DestDir: "{app}"; Flags: ignoreversion overwritereadonly 54 | Source: "libssl-1_1.dll"; DestDir: "{app}"; Flags: ignoreversion overwritereadonly 55 | Source: "TrIDLib.dll"; DestDir: "{app}"; Flags: ignoreversion overwritereadonly 56 | Source: "zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion overwritereadonly 57 | 58 | [Registry] 59 | Root: HKCR; SubKey: *\shell\vthash; ValueType: string; ValueData: Check File Hash...; Flags: uninsdeletekey 60 | Root: HKLM; SubKey: SOFTWARE\Boredomsoft\VTHash; ValueType: string; ValueName: Version; ValueData: 1.66; Flags: uninsdeletekey 61 | Root: HKLM; SubKey: SOFTWARE\Boredomsoft\VTHash; ValueType: string; ValueName: Release; ValueData: Final 62 | Root: HKCR; SubKey: *\shell\vthash\command; ValueType: string; ValueData: """{app}\VTHash.exe"" ""%1"""; Flags: uninsdeletekey 63 | Root: HKCR; SubKey: *\shell\vthash; ValueType: string; ValueData: """{app}\VTHash_102.ico"""; Flags: uninsdeletekey; ValueName: Icon; MinVersion: 0,6.0.6000; Languages: 64 | [InstallDelete] 65 | Name: {app}\VTHash Libs\*; Type: filesandordirs; Languages: 66 | Name: {app}\VTHash Resources\*; Type: filesandordirs; Languages: 67 | -------------------------------------------------------------------------------- /Win32/GUI/ClipboardMonitor.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class ClipboardMonitor 3 | Inherits Win32.GUI.MessageMonitor 4 | #tag CompatibilityFlags = TargetHasGUI 5 | #tag Event 6 | Function WindowMessage(Message As Integer, WParam As Ptr, LParam As Ptr) As Boolean 7 | #If TargetWin32 Then 8 | Select Case Message 9 | Case WM_CHANGECBCHAIN ' XP and older 10 | 'A window is being removed 11 | If Integer(WParam) = NextViewerWindow Then 12 | NextViewerWindow = Integer(LParam) 13 | Return True 14 | Else 15 | Call Win32.Libs.User32.SendMessage(NextViewerWindow, Message, WParam, LParam) 16 | Return True 17 | End If 18 | 19 | Case WM_DRAWCLIPBOARD ' XP and older 20 | 'clipboard changed, pass it on 21 | Call Win32.Libs.User32.SendMessage(NextViewerWindow, Message, WParam, LParam) 22 | RaiseEvent ClipboardChanged() 23 | 24 | Return True 25 | Case WM_CLIPBOARDUPDATE ' Vista and newer 26 | RaiseEvent ClipboardChanged() 27 | Return True 28 | 29 | End Select 30 | #endif 31 | 32 | End Function 33 | #tag EndEvent 34 | 35 | 36 | #tag Method, Flags = &h1001 37 | Protected Sub Constructor() 38 | ' Empty constructor so the class can be dropped on a window. 39 | Me.Constructor(RB_FOREMOST_WINDOW_HWND) 40 | End Sub 41 | #tag EndMethod 42 | 43 | #tag Method, Flags = &h1000 44 | Sub Constructor(ParentHandle As Integer) 45 | // Calling the overridden superclass constructor. 46 | // Constructor(HWND As Integer) -- From MessageMonitor 47 | Super.Constructor(ParentHandle) 48 | #If TargetWin32 Then 49 | If Win32.KernelVersion >= 6.0 Then ' Vista and newer 50 | If Not Win32.Libs.User32.AddClipboardFormatListener(Me.Handle) Then 51 | mLastError = Win32.LastError 52 | Raise Win32Exception(mLastError) 53 | End If 54 | Else 55 | NextViewerWindow = Win32.Libs.User32.SetClipboardViewer(Me.Handle) 56 | End If 57 | #endif 58 | End Sub 59 | #tag EndMethod 60 | 61 | #tag Method, Flags = &h21 62 | Private Sub Destructor() 63 | #If TargetWin32 Then 64 | If Win32.KernelVersion >= 6.0 Then ' Vista and newer 65 | Call Win32.Libs.User32.RemoveClipboardFormatListener(Me.Handle) 66 | 67 | Else ' XP and older 68 | ' We must unlink ourselves from the Clipboard chain without breaking it! 69 | Call Win32.Libs.User32.ChangeClipboardChain(Me.Handle, Me.NextViewerWindow) 70 | End If 71 | #endif 72 | End Sub 73 | #tag EndMethod 74 | 75 | 76 | #tag Hook, Flags = &h0 77 | Event ClipboardChanged() 78 | #tag EndHook 79 | 80 | 81 | #tag Note, Name = About this class 82 | For Windows XP and older, uses this API: http://msdn.microsoft.com/en-us/library/windows/desktop/ms649052%28v=vs.85%29.aspx 83 | 84 | For Vista and newer, uses the new API: http://msdn.microsoft.com/en-us/library/windows/desktop/ms649033%28v=vs.85%29.aspx 85 | 86 | Monitors the system-wide clipboard for changes. 87 | #tag EndNote 88 | 89 | 90 | #tag Property, Flags = &h1 91 | #tag Note 92 | This property is unused on Vista and newer 93 | #tag EndNote 94 | Protected NextViewerWindow As Integer 95 | #tag EndProperty 96 | 97 | 98 | #tag ViewBehavior 99 | #tag ViewProperty 100 | Name="Index" 101 | Visible=true 102 | Group="ID" 103 | InitialValue="-2147483648" 104 | Type="Integer" 105 | InheritedFrom="Object" 106 | #tag EndViewProperty 107 | #tag ViewProperty 108 | Name="Left" 109 | Visible=true 110 | Group="Position" 111 | InitialValue="0" 112 | InheritedFrom="Object" 113 | #tag EndViewProperty 114 | #tag ViewProperty 115 | Name="Name" 116 | Visible=true 117 | Group="ID" 118 | InheritedFrom="Object" 119 | #tag EndViewProperty 120 | #tag ViewProperty 121 | Name="Super" 122 | Visible=true 123 | Group="ID" 124 | InheritedFrom="Object" 125 | #tag EndViewProperty 126 | #tag ViewProperty 127 | Name="Top" 128 | Visible=true 129 | Group="Position" 130 | InitialValue="0" 131 | InheritedFrom="Object" 132 | #tag EndViewProperty 133 | #tag EndViewBehavior 134 | End Class 135 | #tag EndClass 136 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **VT Hash Check** ("VTHC") is a Windows Explorer context menu extension that allows you to query the [Virus Total](https://www.virustotal.com/) malware scanning service simply by right-clicking on a file. If the file has already been scanned by Virus Total then the most recent results are displayed, otherwise VTCH will allow you to upload the file for analysis. 2 | 3 | [**Download the latest release**](https://github.com/charonn0/VT-Hash/releases/latest) 4 | 5 | ![VTHash](https://user-images.githubusercontent.com/585485/156867146-4a53f28f-3745-4cef-9d2c-0124f41424e3.png) 6 | 7 | ![VTHash2](https://user-images.githubusercontent.com/585485/156867175-d8961989-6720-4df9-93a3-31f9fe4e192c.png) 8 | 9 | ![VTHash4](https://user-images.githubusercontent.com/585485/156867164-00a8113f-2236-4ddd-b495-2f2b57bc95be.png) 10 | 11 | 12 | 13 | ## Command line arguments 14 | VT Hash Check will interpret its command line arguments as a list of files to check, allowing it to be used in other ways besides right-clicking a file. 15 | 16 | Besides file paths, you may optionally pass several command line arguments: 17 | 18 | * `--prefs` Opens the settings window instead of checking a file 19 | * `--trid` Runs a TrID analysis of the input file(s) instead of a hash check 20 | * `--debug` Writes debugging info to the system log. Use a tool like DbgView to view the debug messages. 21 | * `--insecure` Disables SSL certificate validation without disabling SSL/TLS (not recommended) 22 | * `--update` Shows the updater window instead of checking a file 23 | * `--about` Shows the about window instead of checking a file 24 | 25 | ## TrID mode from the context menu 26 | 27 | You can add a context menu item which runs only a [TrID](http://mark0.net/soft-trid-e.html) analysis by using this registry script: 28 | 29 | ```reg 30 | Windows Registry Editor Version 5.00 31 | 32 | [HKEY_CLASSES_ROOT\*\shell\vthashtrid] 33 | @="Analyze with TrID..." 34 | "Icon"="\"C:\\Program Files (x86)\\Boredom Software\\VT Hash Check\\VTHash_102.ico\"" 35 | 36 | [HKEY_CLASSES_ROOT\*\shell\vthashtrid\command] 37 | @="\"C:\\Program Files (x86)\\Boredom Software\\VT Hash Check\\VTHash.exe\" --trid \"%1\"" 38 | ``` 39 | 40 | ## SSL Certificate Authorities 41 | VT Hash Check ships with [a list of trusted CAs](https://github.com/charonn0/RB-libcURL/blob/master/DEFAULT_CA_INFO_PEM). This list is the default list of trusted authorities used by Mozilla products, and includes a number of CAs that Virus Total may never actually use. You may optionally provide your own list of trustworthy CAs. This may be useful in situations where you need to trust a proxy's certificate or allow similarly friendly MITM "attacks" on your SSL connections, but using the `--insecure` command line parameter is undesirable. 42 | 43 | List your trusted authorities in a file named `certlist.pem` saved to VT Hash's data folder. The data folder is located at `%USERDATA%\Boredom Software\VT Hash\`. The file format is standard PEM. 44 | 45 | ## Using the search engine feature 46 | You may optionally define an Internet search engine which you can use to search for results from the context menu. To define a search engine, open the Settings window and enter the URL and display name of the search engine to use. Use the string `%PARAMETER%` as a placeholder in the URL for the search parameter. For example, Google's URL would be: `https://encrypted.google.com/search?q=%PARAMETER%` 47 | 48 | ## Further Notes 49 | To use this application you will need a [Virus Total API key](https://support.virustotal.com/hc/en-us/articles/115002146769-Vote-comment#retrieve-api-key). VT Hash Check will prompt you to fill in your key the first time you run it. You can get an API key by signing up for a free Virus Total community account. 50 | 51 | Virus Total limits the number of requests made to its API unless the particular API key has been granted higher limits. VT Hash Check should work just fine with both standard API keys and keys which have been granted higher request limits. 52 | 53 | By default, the SHA256 checksum is computed. MD5 and SHA1 may also be used if SHA256 proves too slow, however MD5 is vulnerable to collisions and is not recommended for operations requiring a high level of security1. SHA1 is similarly not recommended, but to a lesser severity. 54 | 55 | When attempting check the hashes of executable files obtained from the Internet or accessed via a network share users are likely to see a warning similar to these: 56 | 57 | -------------------------------------------------------------------------------- /libcURL/cURLException.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class cURLException 3 | Inherits RuntimeException 4 | #tag Method, Flags = &h1000 5 | Sub Constructor(ErrantItem As libcURL.cURLHandle) 6 | If ErrantItem Is Nil Then 7 | Me.Message = "Unknown error." 8 | Me.ErrorNumber = 0 9 | Return 10 | End If 11 | Me.ErrorNumber = ErrantItem.LastError 12 | Select Case True 13 | Case Me.ErrorNumber = libcURL.Errors.INIT_FAILED 14 | Me.Message = "Unknown failure while constructing a libcURL handle." 15 | 16 | Case Me.ErrorNumber = libcURL.Errors.MIME_ADD_FAILED 17 | Me.Message = "Unknown failure while adding a MIME message part." 18 | 19 | Case Me.ErrorNumber = libcURL.Errors.MIME_OWNER_MISSING 20 | Me.Message = "MIME messages must be owned by an instance of EasyHandle, but this message has outlived its owner." 21 | 22 | Case Me.ErrorNumber = libcURL.Errors.MIME_MANUAL_ONLY 23 | Me.Message = "The specified dictionary cannot be automatically converted into a MIME message." 24 | 25 | Case Me.ErrorNumber = libcURL.Errors.FEATURE_UNAVAILABLE 26 | Me.Message = "A required feature is not available in the installed version of libcURL." 27 | 28 | Case Me.ErrorNumber = libcURL.Errors.CALL_LOOP_DETECTED 29 | Me.Message = "MultiHandle.PerformOnce was invoked by a MultiHandle or EasyHandle event handler." 30 | 31 | Case Me.ErrorNumber = libcURL.Errors.INVALID_STATE 32 | Me.Message = "The requested operation is illegal in the current context." 33 | 34 | Case Me.ErrorNumber = libcURL.Errors.INVALID_LOCAL_FILE 35 | Me.Message = "The specified local file is invalid or does not exist." 36 | 37 | Case Not libcURL.IsAvailable 38 | Me.Message = "libcURL is not available or is an unsupported version." 39 | 40 | Case Me.ErrorNumber = libcURL.Errors.NOT_INITIALIZED 41 | ' This indicates that cURLHandle.Constructor has not yet run, but ErrantItem is not Nil (e.g. an error in Operator_Convert) 42 | ' cURLHandle.Constructor MUST be called from subclass constructors, else this error will be raised. 43 | Me.Message = "libcURL has not yet been initialized." 44 | 45 | Case ErrantItem IsA libcURL.ShareHandle 46 | Me.Message = libcURL.FormatShareError(Me.ErrorNumber) 47 | 48 | Case ErrantItem IsA libcURL.MultiHandle 49 | Me.Message = libcURL.FormatMultiError(Me.ErrorNumber) 50 | 51 | Case ErrantItem IsA libcURL.URLParser 52 | Me.Message = libcURL.FormatURLError(Me.ErrorNumber) 53 | 54 | Else 55 | Me.Message = libcURL.FormatError(Me.ErrorNumber) + " (" + libcURL.Errors.Name(Me.ErrorNumber) + ")" 56 | 57 | End Select 58 | If ErrantItem IsA libcURL.EasyHandle Then 59 | Dim easy As libcURL.EasyHandle = libcURL.EasyHandle(ErrantItem) 60 | If easy.ErrorBuffer <> "" Then 61 | Me.Message = Me.Message + EndOfLine + "Additional info: " + easy.ErrorBuffer 62 | End If 63 | End If 64 | End Sub 65 | #tag EndMethod 66 | 67 | 68 | #tag ViewBehavior 69 | #tag ViewProperty 70 | Name="ErrorNumber" 71 | Group="Behavior" 72 | InitialValue="0" 73 | Type="Integer" 74 | InheritedFrom="RuntimeException" 75 | #tag EndViewProperty 76 | #tag ViewProperty 77 | Name="Index" 78 | Visible=true 79 | Group="ID" 80 | InitialValue="-2147483648" 81 | InheritedFrom="Object" 82 | #tag EndViewProperty 83 | #tag ViewProperty 84 | Name="Left" 85 | Visible=true 86 | Group="Position" 87 | InitialValue="0" 88 | InheritedFrom="Object" 89 | #tag EndViewProperty 90 | #tag ViewProperty 91 | Name="Message" 92 | Group="Behavior" 93 | Type="String" 94 | EditorType="MultiLineEditor" 95 | InheritedFrom="RuntimeException" 96 | #tag EndViewProperty 97 | #tag ViewProperty 98 | Name="Name" 99 | Visible=true 100 | Group="ID" 101 | InheritedFrom="Object" 102 | #tag EndViewProperty 103 | #tag ViewProperty 104 | Name="Super" 105 | Visible=true 106 | Group="ID" 107 | InheritedFrom="Object" 108 | #tag EndViewProperty 109 | #tag ViewProperty 110 | Name="Top" 111 | Visible=true 112 | Group="Position" 113 | InitialValue="0" 114 | InheritedFrom="Object" 115 | #tag EndViewProperty 116 | #tag EndViewBehavior 117 | End Class 118 | #tag EndClass 119 | -------------------------------------------------------------------------------- /libcURL/Protocols.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module Protocols 3 | #tag Constant, Name = DICT, Type = Double, Dynamic = False, Default = \"&h200", Scope = Protected 4 | #tag EndConstant 5 | 6 | #tag Constant, Name = FILE, Type = Double, Dynamic = False, Default = \"&h400", Scope = Protected 7 | #tag EndConstant 8 | 9 | #tag Constant, Name = FTP, Type = Double, Dynamic = False, Default = \"&h4", Scope = Protected 10 | #tag EndConstant 11 | 12 | #tag Constant, Name = FTPS, Type = Double, Dynamic = False, Default = \"&h8", Scope = Protected 13 | #tag EndConstant 14 | 15 | #tag Constant, Name = GOPHER, Type = Double, Dynamic = False, Default = \"&h2000000", Scope = Protected 16 | #tag EndConstant 17 | 18 | #tag Constant, Name = HTTP, Type = Double, Dynamic = False, Default = \"&h1", Scope = Protected 19 | #tag EndConstant 20 | 21 | #tag Constant, Name = HTTPS, Type = Double, Dynamic = False, Default = \"&h2", Scope = Protected 22 | #tag EndConstant 23 | 24 | #tag Constant, Name = IMAP, Type = Double, Dynamic = False, Default = \"&h1000", Scope = Protected 25 | #tag EndConstant 26 | 27 | #tag Constant, Name = IMAPS, Type = Double, Dynamic = False, Default = \"&h2000", Scope = Protected 28 | #tag EndConstant 29 | 30 | #tag Constant, Name = LDAP, Type = Double, Dynamic = False, Default = \"&h80", Scope = Protected 31 | #tag EndConstant 32 | 33 | #tag Constant, Name = LDAPS, Type = Double, Dynamic = False, Default = \"&h100", Scope = Protected 34 | #tag EndConstant 35 | 36 | #tag Constant, Name = POP3, Type = Double, Dynamic = False, Default = \"&h4000", Scope = Protected 37 | #tag EndConstant 38 | 39 | #tag Constant, Name = POP3S, Type = Double, Dynamic = False, Default = \"&h8000", Scope = Protected 40 | #tag EndConstant 41 | 42 | #tag Constant, Name = RTMP, Type = Double, Dynamic = False, Default = \"&h80000", Scope = Protected 43 | #tag EndConstant 44 | 45 | #tag Constant, Name = RTMPE, Type = Double, Dynamic = False, Default = \"&h200000", Scope = Protected 46 | #tag EndConstant 47 | 48 | #tag Constant, Name = RTMPS, Type = Double, Dynamic = False, Default = \"&h800000", Scope = Protected 49 | #tag EndConstant 50 | 51 | #tag Constant, Name = RTMPT, Type = Double, Dynamic = False, Default = \"&h100000", Scope = Protected 52 | #tag EndConstant 53 | 54 | #tag Constant, Name = RTMPTE, Type = Double, Dynamic = False, Default = \"&h400000", Scope = Protected 55 | #tag EndConstant 56 | 57 | #tag Constant, Name = RTMPTS, Type = Double, Dynamic = False, Default = \"&h1000000", Scope = Protected 58 | #tag EndConstant 59 | 60 | #tag Constant, Name = RTSP, Type = Double, Dynamic = False, Default = \"&h40000", Scope = Protected 61 | #tag EndConstant 62 | 63 | #tag Constant, Name = SCP, Type = Double, Dynamic = False, Default = \"&h10", Scope = Protected 64 | #tag EndConstant 65 | 66 | #tag Constant, Name = SFTP, Type = Double, Dynamic = False, Default = \"&h20", Scope = Protected 67 | #tag EndConstant 68 | 69 | #tag Constant, Name = SMB, Type = Double, Dynamic = False, Default = \"67108864", Scope = Protected 70 | #tag EndConstant 71 | 72 | #tag Constant, Name = SMBS, Type = Double, Dynamic = False, Default = \"134217728", Scope = Protected 73 | #tag EndConstant 74 | 75 | #tag Constant, Name = SMTP, Type = Double, Dynamic = False, Default = \"&h10000", Scope = Protected 76 | #tag EndConstant 77 | 78 | #tag Constant, Name = SMTPS, Type = Double, Dynamic = False, Default = \"&h20000", Scope = Protected 79 | #tag EndConstant 80 | 81 | #tag Constant, Name = TELNET, Type = Double, Dynamic = False, Default = \"&h40", Scope = Protected 82 | #tag EndConstant 83 | 84 | #tag Constant, Name = TFTP, Type = Double, Dynamic = False, Default = \"&h800", Scope = Protected 85 | #tag EndConstant 86 | 87 | 88 | #tag ViewBehavior 89 | #tag ViewProperty 90 | Name="Index" 91 | Visible=true 92 | Group="ID" 93 | InitialValue="-2147483648" 94 | InheritedFrom="Object" 95 | #tag EndViewProperty 96 | #tag ViewProperty 97 | Name="Left" 98 | Visible=true 99 | Group="Position" 100 | InitialValue="0" 101 | InheritedFrom="Object" 102 | #tag EndViewProperty 103 | #tag ViewProperty 104 | Name="Name" 105 | Visible=true 106 | Group="ID" 107 | InheritedFrom="Object" 108 | #tag EndViewProperty 109 | #tag ViewProperty 110 | Name="Super" 111 | Visible=true 112 | Group="ID" 113 | InheritedFrom="Object" 114 | #tag EndViewProperty 115 | #tag ViewProperty 116 | Name="Top" 117 | Visible=true 118 | Group="Position" 119 | InitialValue="0" 120 | InheritedFrom="Object" 121 | #tag EndViewProperty 122 | #tag EndViewBehavior 123 | End Module 124 | #tag EndModule 125 | -------------------------------------------------------------------------------- /libcURL/Info/InfoTypeIterator.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class InfoTypeIterator 3 | #tag Method, Flags = &h0 4 | Sub Constructor() 5 | ' Enumerate all known info types. 6 | ' 7 | ' See: 8 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.Info.InfoTypeIterator.Constructor 9 | 10 | If UBound(AllTypes) = -1 Then 11 | Dim all() As Integer = Array( _ 12 | ACTIVESOCKET, APPCONNECT_TIME, APPCONNECT_TIME_T, CERTINFO, CONDITION_UNMET, CONNECT_TIME, _ 13 | CONNECT_TIME_T, CONTENT_LENGTH_DOWNLOAD, CONTENT_LENGTH_DOWNLOAD_T, CONTENT_LENGTH_UPLOAD, _ 14 | CONTENT_LENGTH_UPLOAD_T, CONTENT_TYPE, COOKIELIST, EFFECTIVE_METHOD, EFFECTIVE_URL, FILETIME, _ 15 | FILETIME_T, FTP_ENTRY_PATH, HEADER_SIZE, HTTPAUTH_AVAIL, HTTP_CONNECTCODE, HTTP_VERSION, _ 16 | LASTSOCKET, LOCAL_IP, LOCAL_PORT, NAMELOOKUP_TIME, NAMELOOKUP_TIME_T, NUM_CONNECTS, OS_ERRNO, _ 17 | PRETRANSFER_TIME, PRETRANSFER_TIME_T, PRIMARY_IP, PRIMARY_PORT, PRIVATE_, PROTOCOL, PROXYAUTH_AVAIL, _ 18 | PROXY_ERROR, PROXY_SSL_VERIFYRESULT, REDIRECT_COUNT, REDIRECT_TIME, REDIRECT_TIME_T, REDIRECT_URL, _ 19 | REFERER, REQUEST_SIZE, RESPONSE_CODE, RETRY_AFTER, RTSP_CLIENT_CSEQ, RTSP_CSEQ_RECV, RTSP_SERVER_CSEQ, _ 20 | RTSP_SESSION_ID, SCHEME, SIZE_DOWNLOAD, SIZE_DOWNLOAD_T, SIZE_UPLOAD, SIZE_UPLOAD_T, SPEED_DOWNLOAD, _ 21 | SPEED_DOWNLOAD_T, SPEED_UPLOAD, SPEED_UPLOAD_T, SSL_ENGINES, SSL_VERIFYRESULT, STARTTRANSFER_TIME, _ 22 | STARTTRANSFER_TIME_T, TLS_SESSION, TLS_SSL_PTR, TOTAL_TIME, TOTAL_TIME_T) 23 | For i As Integer = 0 To UBound(all) 24 | AllTypes.Append(all(i)) 25 | Next 26 | End If 27 | 28 | mIndex = 0 29 | End Sub 30 | #tag EndMethod 31 | 32 | #tag Method, Flags = &h0 33 | Function Count() As Integer 34 | ' Returns the total number of info types known. 35 | ' 36 | ' See: 37 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.Info.InfoTypeIterator.Count 38 | 39 | Return UBound(AllTypes) + 1 40 | End Function 41 | #tag EndMethod 42 | 43 | #tag Method, Flags = &h0 44 | Function MoveNext() As Boolean 45 | ' Advances the iterator to the next info type in the list. Returns True 46 | ' until there are no further types. 47 | ' 48 | ' See: 49 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.Info.InfoTypeIterator.MoveNext 50 | 51 | If mIndex < UBound(AllTypes) Then 52 | mIndex = mIndex + 1 53 | Return True 54 | End If 55 | End Function 56 | #tag EndMethod 57 | 58 | 59 | #tag Property, Flags = &h21 60 | Private Shared AllTypes() As libcURL.Info.InfoType 61 | #tag EndProperty 62 | 63 | #tag ComputedProperty, Flags = &h0 64 | #tag Getter 65 | Get 66 | ' The index of the current infotype in the list. 67 | ' 68 | ' See: 69 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.Info.InfoTypeIterator.CurrentIndex 70 | 71 | Return mIndex 72 | End Get 73 | #tag EndGetter 74 | CurrentIndex As Integer 75 | #tag EndComputedProperty 76 | 77 | #tag ComputedProperty, Flags = &h0 78 | #tag Getter 79 | Get 80 | ' The current InfoType object in the list. 81 | ' 82 | ' See: 83 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.Info.InfoTypeIterator.CurrentInfoType 84 | 85 | Return AllTypes(mIndex) 86 | End Get 87 | #tag EndGetter 88 | CurrentInfoType As libcURL.Info.InfoType 89 | #tag EndComputedProperty 90 | 91 | #tag Property, Flags = &h21 92 | Private mIndex As Integer 93 | #tag EndProperty 94 | 95 | 96 | #tag ViewBehavior 97 | #tag ViewProperty 98 | Name="CurrentIndex" 99 | Visible=false 100 | Group="Behavior" 101 | InitialValue="" 102 | Type="Integer" 103 | EditorType="" 104 | #tag EndViewProperty 105 | #tag ViewProperty 106 | Name="Index" 107 | Visible=true 108 | Group="ID" 109 | InitialValue="-2147483648" 110 | Type="Integer" 111 | EditorType="" 112 | #tag EndViewProperty 113 | #tag ViewProperty 114 | Name="Left" 115 | Visible=true 116 | Group="Position" 117 | InitialValue="0" 118 | Type="Integer" 119 | EditorType="" 120 | #tag EndViewProperty 121 | #tag ViewProperty 122 | Name="Name" 123 | Visible=true 124 | Group="ID" 125 | InitialValue="" 126 | Type="String" 127 | EditorType="" 128 | #tag EndViewProperty 129 | #tag ViewProperty 130 | Name="Super" 131 | Visible=true 132 | Group="ID" 133 | InitialValue="" 134 | Type="String" 135 | EditorType="" 136 | #tag EndViewProperty 137 | #tag ViewProperty 138 | Name="Top" 139 | Visible=true 140 | Group="Position" 141 | InitialValue="0" 142 | Type="Integer" 143 | EditorType="" 144 | #tag EndViewProperty 145 | #tag EndViewBehavior 146 | End Class 147 | #tag EndClass 148 | -------------------------------------------------------------------------------- /Win32/Crypto/Stream.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class Stream 3 | Implements Readable,Writeable 4 | #tag Method, Flags = &h0 5 | Sub Close() 6 | If mWriter <> Nil And mKey <> Nil Then 7 | mWriter.Write(mKey.Encrypt("", True, mHash)) 8 | mWriter.Flush 9 | End If 10 | mWriter = Nil 11 | mReader = Nil 12 | mKey = Nil 13 | mHash = Nil 14 | End Sub 15 | #tag EndMethod 16 | 17 | #tag Method, Flags = &h1 18 | Protected Sub Constructor(Key As Win32.Crypto.KeyContainer) 19 | mKey = Key 20 | End Sub 21 | #tag EndMethod 22 | 23 | #tag Method, Flags = &h0 24 | Shared Function Create(Key As Win32.Crypto.KeyContainer, Output As Writeable, Hash As Win32.Crypto.HashProcessor = Nil) As Win32.Crypto.Stream 25 | Dim c As New Win32.Crypto.Stream(Key) 26 | c.mWriter = Output 27 | c.mHash = Hash 28 | Return c 29 | End Function 30 | #tag EndMethod 31 | 32 | #tag Method, Flags = &h21 33 | Private Sub Destructor() 34 | Me.Close() 35 | End Sub 36 | #tag EndMethod 37 | 38 | #tag Method, Flags = &h21 39 | Private Function EndOfFile() As Boolean 40 | // Part of the Readable interface. 41 | Return Me.EOF 42 | End Function 43 | #tag EndMethod 44 | 45 | #tag Method, Flags = &h0 46 | Function EOF() As Boolean 47 | // Part of the Readable interface. 48 | If mReader <> Nil Then 49 | Return mReader.EOF 50 | End If 51 | End Function 52 | #tag EndMethod 53 | 54 | #tag Method, Flags = &h0 55 | Sub Flush() 56 | // Part of the Writeable interface. 57 | If mWriter <> Nil Then 58 | mWriter.Flush 59 | Else 60 | Raise New IOException 61 | End If 62 | End Sub 63 | #tag EndMethod 64 | 65 | #tag Method, Flags = &h0 66 | Function HashValue() As MemoryBlock 67 | If mHash <> Nil Then Return mHash.Value 68 | End Function 69 | #tag EndMethod 70 | 71 | #tag Method, Flags = &h0 72 | Shared Function Open(Key As Win32.Crypto.KeyContainer, InputData As Readable) As Win32.Crypto.Stream 73 | Dim c As New Win32.Crypto.Stream(Key) 74 | c.mReader = InputData 75 | Return c 76 | End Function 77 | #tag EndMethod 78 | 79 | #tag Method, Flags = &h0 80 | Function Read(Count As Integer, encoding As TextEncoding = Nil) As String 81 | // Part of the Readable interface. 82 | If mReader <> Nil Then 83 | Dim data As MemoryBlock = mReader.Read(Count) 84 | data = mKey.Decrypt(data, False, mHash) 85 | Return DefineEncoding(data, encoding) 86 | Else 87 | Raise New IOException 88 | End If 89 | End Function 90 | #tag EndMethod 91 | 92 | #tag Method, Flags = &h0 93 | Function ReadError() As Boolean 94 | // Part of the Readable interface. 95 | If mReader <> Nil Then 96 | Return mReader.ReadError Or mKey.LastError <> 0 97 | End If 98 | End Function 99 | #tag EndMethod 100 | 101 | #tag Method, Flags = &h0 102 | Sub Write(text As String) 103 | // Part of the Writeable interface. 104 | If mWriter <> Nil Then 105 | mWriter.Write(mKey.Encrypt(text, False, mHash)) 106 | Else 107 | Raise New IOException 108 | End If 109 | End Sub 110 | #tag EndMethod 111 | 112 | #tag Method, Flags = &h0 113 | Function WriteError() As Boolean 114 | // Part of the Writeable interface. 115 | If mWriter <> Nil Then 116 | Return mWriter.WriteError Or mKey.LastError <> 0 117 | End If 118 | End Function 119 | #tag EndMethod 120 | 121 | 122 | #tag Property, Flags = &h21 123 | Private mHash As Win32.Crypto.HashProcessor 124 | #tag EndProperty 125 | 126 | #tag Property, Flags = &h1 127 | Protected mKey As Win32.Crypto.KeyContainer 128 | #tag EndProperty 129 | 130 | #tag Property, Flags = &h21 131 | Private mReader As Readable 132 | #tag EndProperty 133 | 134 | #tag Property, Flags = &h21 135 | Private mWriter As Writeable 136 | #tag EndProperty 137 | 138 | 139 | #tag ViewBehavior 140 | #tag ViewProperty 141 | Name="Index" 142 | Visible=true 143 | Group="ID" 144 | InitialValue="-2147483648" 145 | Type="Integer" 146 | EditorType="" 147 | #tag EndViewProperty 148 | #tag ViewProperty 149 | Name="Left" 150 | Visible=true 151 | Group="Position" 152 | InitialValue="0" 153 | Type="Integer" 154 | EditorType="" 155 | #tag EndViewProperty 156 | #tag ViewProperty 157 | Name="Name" 158 | Visible=true 159 | Group="ID" 160 | InitialValue="" 161 | Type="String" 162 | EditorType="" 163 | #tag EndViewProperty 164 | #tag ViewProperty 165 | Name="Super" 166 | Visible=true 167 | Group="ID" 168 | InitialValue="" 169 | Type="String" 170 | EditorType="" 171 | #tag EndViewProperty 172 | #tag ViewProperty 173 | Name="Top" 174 | Visible=true 175 | Group="Position" 176 | InitialValue="0" 177 | Type="Integer" 178 | EditorType="" 179 | #tag EndViewProperty 180 | #tag EndViewBehavior 181 | End Class 182 | #tag EndClass 183 | -------------------------------------------------------------------------------- /GUI/WaitWindow.rbfrm: -------------------------------------------------------------------------------- 1 | #tag Window 2 | Begin Window WaitWindow 3 | BackColor = &cFFFFFF00 4 | Backdrop = 0 5 | CloseButton = False 6 | Composite = False 7 | Frame = 4 8 | FullScreen = False 9 | HasBackColor = False 10 | HasFullScreenButton= False 11 | Height = 64 12 | ImplicitInstance= False 13 | LiveResize = "True" 14 | MacProcID = 0 15 | MaxHeight = 32000 16 | MaximizeButton = False 17 | MaxWidth = 32000 18 | MenuBar = 0 19 | MenuBarVisible = True 20 | MinHeight = 64 21 | MinimizeButton = False 22 | MinWidth = 64 23 | Placement = 1 24 | Resizeable = False 25 | Title = "Deep Thoughts" 26 | Visible = True 27 | Width = 160 28 | Begin Label Label1 29 | AutoDeactivate = True 30 | Bold = False 31 | DataField = "" 32 | DataSource = "" 33 | Enabled = True 34 | Height = 64 35 | HelpTag = "" 36 | Index = -2147483648 37 | InitialParent = "" 38 | Italic = False 39 | Left = 0 40 | LockBottom = False 41 | LockedInPosition= False 42 | LockLeft = True 43 | LockRight = False 44 | LockTop = True 45 | Multiline = False 46 | Scope = 0 47 | Selectable = False 48 | TabIndex = 0 49 | TabPanelIndex = 0 50 | TabStop = True 51 | Text = "Thinking..." 52 | TextAlign = 1 53 | TextColor = &c000000 54 | TextFont = "System" 55 | TextSize = 24.0 56 | TextUnit = 0 57 | Top = 0 58 | Transparent = False 59 | Underline = False 60 | Visible = True 61 | Width = 160 62 | Begin ProgressWheel ProgressWheel1 63 | AutoDeactivate = True 64 | Enabled = True 65 | Height = 16 66 | HelpTag = "" 67 | Index = -2147483648 68 | InitialParent = "Label1" 69 | Left = 9 70 | LockBottom = False 71 | LockedInPosition= False 72 | LockLeft = True 73 | LockRight = False 74 | LockTop = True 75 | Scope = 0 76 | TabIndex = 0 77 | TabPanelIndex = 0 78 | TabStop = True 79 | Top = 28 80 | Transparent = True 81 | Visible = True 82 | Width = 16 83 | End 84 | Begin ProgressBar ProgressBar1 85 | AutoDeactivate = True 86 | Enabled = True 87 | Height = 8 88 | HelpTag = "" 89 | Indeterminate = False 90 | Index = -2147483648 91 | InitialParent = "Label1" 92 | Left = 0 93 | LockBottom = True 94 | LockedInPosition= False 95 | LockLeft = True 96 | LockRight = True 97 | LockTop = False 98 | Maximum = 0 99 | Scope = 0 100 | TabIndex = 1 101 | TabPanelIndex = 0 102 | TabStop = "True" 103 | Top = 56 104 | Transparent = True 105 | Value = 0.0 106 | Visible = True 107 | Width = 160 108 | End 109 | End 110 | End 111 | #tag EndWindow 112 | 113 | #tag WindowCode 114 | #tag Event 115 | Sub Open() 116 | mTaskBar = New TaskBar(Self) 117 | mTaskBar.SetProgressState(TaskBar.TaskBarStates.Indeterminate) 118 | mTaskBar.SetProgressValue(50, 100) 119 | End Sub 120 | #tag EndEvent 121 | 122 | 123 | #tag Method, Flags = &h0 124 | Sub SetProgress(Value As Integer, Max As Integer) 125 | If Self.Visible Then 126 | ProgressBar1.Maximum = 100 127 | ProgressBar1.Value = Value * 100 / Max 128 | mTaskBar.SetProgressState(TaskBar.TaskBarStates.Normal) 129 | mTaskBar.SetProgressValue(Value, Max) 130 | End If 131 | End Sub 132 | #tag EndMethod 133 | 134 | #tag Method, Flags = &h0 135 | Sub ShowWithin(parentWindow As Window, facing As Integer = - 1) 136 | Super.ShowWithin(parentWindow, facing) 137 | Dim w, h As Integer 138 | w = parentWindow.Left + (0.25 * Me.Width) + (0.25 * parentWindow.Width) 139 | h = parentWindow.Top + (0.25 * Me.Height) + (0.25 * parentWindow.Height) 140 | Me.Left = w 141 | Me.Top = h 142 | End Sub 143 | #tag EndMethod 144 | 145 | 146 | #tag Property, Flags = &h21 147 | Private mTaskBar As TaskBar 148 | #tag EndProperty 149 | 150 | 151 | #tag EndWindowCode 152 | 153 | -------------------------------------------------------------------------------- /libcURL/HTTPAuthMethods.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class HTTPAuthMethods 3 | #tag Method, Flags = &h1 4 | Protected Sub Constructor(Mask As Integer) 5 | Basic = (BitAnd(Mask, Integer(CURLAUTH.BASIC)) = Integer(CURLAUTH.BASIC)) 6 | Bearer = (BitAnd(Mask, Integer(CURLAUTH.BEARER)) = Integer(CURLAUTH.BEARER)) 7 | Digest = (BitAnd(Mask, Integer(CURLAUTH.DIGEST)) = Integer(CURLAUTH.DIGEST)) 8 | Digest_IE = (BitAnd(Mask, Integer(CURLAUTH.DIGEST_IE)) = Integer(CURLAUTH.DIGEST_IE)) 9 | Negotiate = (BitAnd(Mask, Integer(CURLAUTH.NEGOTIATE)) = Integer(CURLAUTH.NEGOTIATE)) 10 | NTLM = (BitAnd(Mask, Integer(CURLAUTH.NTLM)) = Integer(CURLAUTH.NTLM)) 11 | NTLM_WB = (BitAnd(Mask, Integer(CURLAUTH.NTLM_WB)) = Integer(CURLAUTH.NTLM_WB)) 12 | 13 | End Sub 14 | #tag EndMethod 15 | 16 | #tag Method, Flags = &h0 17 | Function Mask() As Integer 18 | Dim m As Integer 19 | If Basic Then m = Integer(CURLAUTH.BASIC) 20 | If Bearer Then m = m Or Integer(CURLAUTH.BEARER) 21 | If Digest Then m = m Or Integer(CURLAUTH.DIGEST) 22 | If Digest_IE Then m = m Or Integer(CURLAUTH.DIGEST_IE) 23 | If Negotiate Then m = m Or Integer(CURLAUTH.NEGOTIATE) 24 | If NTLM Then m = m Or Integer(CURLAUTH.NTLM) 25 | If NTLM_WB Then m = m Or Integer(CURLAUTH.NTLM_WB) 26 | Return m 27 | End Function 28 | #tag EndMethod 29 | 30 | #tag Method, Flags = &h0 31 | Sub Operator_Convert(FromMask As Integer) 32 | Me.Constructor(FromMask) 33 | End Sub 34 | #tag EndMethod 35 | 36 | #tag Method, Flags = &h0 37 | Sub Operator_Convert(FromEnum As libcURL.CURLAUTH) 38 | SetOnly(FromEnum) 39 | End Sub 40 | #tag EndMethod 41 | 42 | #tag Method, Flags = &h0 43 | Sub SetAll() 44 | SetSafe() 45 | Basic = True 46 | 47 | End Sub 48 | #tag EndMethod 49 | 50 | #tag Method, Flags = &h0 51 | Sub SetOnly(AuthMethod As libcURL.CURLAUTH) 52 | Me.Operator_Convert(0) 53 | Select Case AuthMethod 54 | Case CURLAUTH.BASIC 55 | Basic = True 56 | 57 | Case CURLAUTH.BEARER 58 | Bearer = True 59 | 60 | Case CURLAUTH.DIGEST 61 | Digest = True 62 | 63 | Case CURLAUTH.DIGEST_IE 64 | Digest_IE = True 65 | 66 | Case CURLAUTH.NEGOTIATE 67 | Negotiate = True 68 | 69 | Case CURLAUTH.NTLM 70 | NTLM = True 71 | 72 | Case CURLAUTH.NTLM_WB 73 | NTLM_WB = True 74 | 75 | Case CURLAUTH.ANY 76 | SetAll() 77 | Return 78 | End Select 79 | 80 | End Sub 81 | #tag EndMethod 82 | 83 | #tag Method, Flags = &h0 84 | Sub SetSafe() 85 | Bearer = True 86 | Digest = True 87 | Digest_IE = True 88 | Negotiate = True 89 | NTLM = True 90 | NTLM_WB = True 91 | End Sub 92 | #tag EndMethod 93 | 94 | 95 | #tag Property, Flags = &h0 96 | Basic As Boolean 97 | #tag EndProperty 98 | 99 | #tag Property, Flags = &h0 100 | Bearer As Boolean 101 | #tag EndProperty 102 | 103 | #tag Property, Flags = &h0 104 | Digest As Boolean 105 | #tag EndProperty 106 | 107 | #tag Property, Flags = &h0 108 | Digest_IE As Boolean 109 | #tag EndProperty 110 | 111 | #tag Property, Flags = &h0 112 | Negotiate As Boolean 113 | #tag EndProperty 114 | 115 | #tag Property, Flags = &h0 116 | NTLM As Boolean 117 | #tag EndProperty 118 | 119 | #tag Property, Flags = &h0 120 | NTLM_WB As Boolean 121 | #tag EndProperty 122 | 123 | 124 | #tag ViewBehavior 125 | #tag ViewProperty 126 | Name="Basic" 127 | Group="Behavior" 128 | Type="Boolean" 129 | #tag EndViewProperty 130 | #tag ViewProperty 131 | Name="Bearer" 132 | Group="Behavior" 133 | Type="Boolean" 134 | #tag EndViewProperty 135 | #tag ViewProperty 136 | Name="Digest" 137 | Group="Behavior" 138 | Type="Boolean" 139 | #tag EndViewProperty 140 | #tag ViewProperty 141 | Name="Digest_IE" 142 | Group="Behavior" 143 | Type="Boolean" 144 | #tag EndViewProperty 145 | #tag ViewProperty 146 | Name="Index" 147 | Visible=true 148 | Group="ID" 149 | InitialValue="-2147483648" 150 | InheritedFrom="Object" 151 | #tag EndViewProperty 152 | #tag ViewProperty 153 | Name="Left" 154 | Visible=true 155 | Group="Position" 156 | InitialValue="0" 157 | InheritedFrom="Object" 158 | #tag EndViewProperty 159 | #tag ViewProperty 160 | Name="Name" 161 | Visible=true 162 | Group="ID" 163 | InheritedFrom="Object" 164 | #tag EndViewProperty 165 | #tag ViewProperty 166 | Name="Negotiate" 167 | Group="Behavior" 168 | Type="Boolean" 169 | #tag EndViewProperty 170 | #tag ViewProperty 171 | Name="NTLM" 172 | Group="Behavior" 173 | Type="Boolean" 174 | #tag EndViewProperty 175 | #tag ViewProperty 176 | Name="NTLM_WB" 177 | Group="Behavior" 178 | Type="Boolean" 179 | #tag EndViewProperty 180 | #tag ViewProperty 181 | Name="Super" 182 | Visible=true 183 | Group="ID" 184 | InheritedFrom="Object" 185 | #tag EndViewProperty 186 | #tag ViewProperty 187 | Name="Top" 188 | Visible=true 189 | Group="Position" 190 | InitialValue="0" 191 | InheritedFrom="Object" 192 | #tag EndViewProperty 193 | #tag EndViewBehavior 194 | End Class 195 | #tag EndClass 196 | -------------------------------------------------------------------------------- /libcURL/cURLHandle.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class cURLHandle 3 | Implements ErrorSetter 4 | #tag Method, Flags = &h1 5 | Protected Sub Constructor() 6 | ' Initializes libcURL if necessary. 7 | ' See: 8 | ' http://curl.haxx.se/libcurl/c/curl_global_init.html 9 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.cURLHandle.Constructor 10 | 11 | Static available As Boolean = libcURL.IsAvailable 12 | If Not available Then 13 | Dim err As New PlatformNotSupportedException 14 | err.Message = "libcURL is not available or is an unsupported version." 15 | ' We can't find the libcurl binary or one of its dependencies (OpenSSL, zlib, etc.) Verify 16 | ' that all neccesary dll/solib/dylib files are located in the expected directory for your 17 | ' environment. The easiest way to avoid this problem is to add a build step to your project 18 | ' that copies the necessary files automatically. 19 | ' See: http://docs.xojo.com/UserGuide:Build_Automation#Copy_Files 20 | Raise err 21 | End If 22 | 23 | mLastError = 0 ' clears the NOT_INITIALIZED default value 24 | 25 | If InitFlag = libcURL.Errors.INIT_FAILED Then 26 | mLastError = curl_global_init(CURL_GLOBAL_DEFAULT) 27 | If mLastError <> 0 Then 28 | ' We were not able to initialize libcurl (or a dependency) even though the binary was 29 | ' successfully loaded. 30 | Raise New cURLException(Me) 31 | End If 32 | End If 33 | mFlags = CURL_GLOBAL_DEFAULT 34 | InitFlag = CURL_GLOBAL_DEFAULT 35 | End Sub 36 | #tag EndMethod 37 | 38 | #tag Method, Flags = &h21 39 | Private Sub Destructor() 40 | ' Decrements the reference count for the instance's Flags. If the count reaches zero 41 | ' calls curl_global_cleanup. 42 | ' See: 43 | ' http://curl.haxx.se/libcurl/c/curl_global_cleanup.html 44 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.cURLHandle.Destructor 45 | 46 | If InitFlags = Nil Then Return 47 | Do Until InitFlagsLock.TrySignal 48 | #If RBVersion < 2020 Then 49 | App.YieldToNextThread 50 | #Else 51 | Thread.YieldToNext 52 | #EndIf 53 | Loop 54 | Try 55 | InitFlags.Value(mFlags) = InitFlags.Value(mFlags) - 1 56 | If InitFlags.Value(mFlags) <= 0 Then 57 | If libcURL.IsAvailable Then curl_global_cleanup() 58 | InitFlags.Remove(mFlags) 59 | End If 60 | If InitFlags.Count = 0 Then InitFlags = Nil 61 | Finally 62 | InitFlagsLock.Release 63 | End Try 64 | 65 | End Sub 66 | #tag EndMethod 67 | 68 | #tag Method, Flags = &h0 69 | Attributes( deprecated ) Function Flags() As Integer 70 | ' The global initialization flags that were passed to the instance Constructor 71 | ' See: 72 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.cURLHandle.Flags 73 | 74 | Return mFlags 75 | End Function 76 | #tag EndMethod 77 | 78 | #tag Method, Flags = &h0 79 | Function Handle() As Integer 80 | ' the curl handle itself 81 | Return mHandle 82 | End Function 83 | #tag EndMethod 84 | 85 | #tag Method, Flags = &h0 86 | Function LastError() As Integer 87 | ' All calls into libcURL that return an error code will update LastError 88 | ' See: 89 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.cURLHandle.LastError 90 | 91 | Return mLastError 92 | End Function 93 | #tag EndMethod 94 | 95 | #tag Method, Flags = &h21 96 | Private Sub LastError(Assigns NewError As Integer) 97 | // Part of the ErrorSetter interface. 98 | mLastError = NewError 99 | 100 | 101 | End Sub 102 | #tag EndMethod 103 | 104 | #tag Method, Flags = &h1 105 | Protected Function Operator_Compare(OtherHandle As libcURL.cURLHandle) As Integer 106 | If OtherHandle Is Nil Then Return 1 107 | Return Sign(mFlags - OtherHandle.mFlags) 108 | End Function 109 | #tag EndMethod 110 | 111 | 112 | #tag Property, Flags = &h21 113 | Private Shared InitFlag As Integer = libcURL.Errors.INIT_FAILED 114 | #tag EndProperty 115 | 116 | #tag Property, Flags = &h21 117 | Private Shared InitFlags As Dictionary 118 | #tag EndProperty 119 | 120 | #tag Property, Flags = &h21 121 | Private Shared InitFlagsLock As Semaphore 122 | #tag EndProperty 123 | 124 | #tag Property, Flags = &h21 125 | Private mFlags As Integer 126 | #tag EndProperty 127 | 128 | #tag Property, Flags = &h1 129 | Protected mHandle As Integer 130 | #tag EndProperty 131 | 132 | #tag Property, Flags = &h1 133 | Protected mLastError As Integer = libcURL.Errors.NOT_INITIALIZED 134 | #tag EndProperty 135 | 136 | 137 | #tag ViewBehavior 138 | #tag ViewProperty 139 | Name="Index" 140 | Visible=true 141 | Group="ID" 142 | InitialValue="-2147483648" 143 | Type="Integer" 144 | EditorType="" 145 | #tag EndViewProperty 146 | #tag ViewProperty 147 | Name="Left" 148 | Visible=true 149 | Group="Position" 150 | InitialValue="0" 151 | Type="Integer" 152 | EditorType="" 153 | #tag EndViewProperty 154 | #tag ViewProperty 155 | Name="Name" 156 | Visible=true 157 | Group="ID" 158 | InitialValue="" 159 | Type="String" 160 | EditorType="" 161 | #tag EndViewProperty 162 | #tag ViewProperty 163 | Name="Super" 164 | Visible=true 165 | Group="ID" 166 | InitialValue="" 167 | Type="String" 168 | EditorType="" 169 | #tag EndViewProperty 170 | #tag ViewProperty 171 | Name="Top" 172 | Visible=true 173 | Group="Position" 174 | InitialValue="0" 175 | Type="Integer" 176 | EditorType="" 177 | #tag EndViewProperty 178 | #tag EndViewBehavior 179 | End Class 180 | #tag EndClass 181 | -------------------------------------------------------------------------------- /Win32/Crypto/HashProcessor.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class HashProcessor 3 | Inherits Win32.Crypto.Context 4 | #tag Method, Flags = &h0 5 | Function Algorithm() As Integer 6 | Dim alg As New MemoryBlock(4) 7 | If Not Me.GetHashParam(HP_ALGID, alg) Then 8 | Dim err As New Win32Exception 9 | err.ErrorNumber = mLastError 10 | err.Message = Win32.FormatError(mLastError) 11 | Raise err 12 | End If 13 | Return alg.Int32Value(0) 14 | End Function 15 | #tag EndMethod 16 | 17 | #tag Method, Flags = &h0 18 | Sub Constructor(Algorithm As Integer, Key As Win32.Crypto.KeyContainer = Nil) 19 | Select Case Algorithm 20 | Case CALG_MD2, CALG_MD4, CALG_MD5, CALG_SHA1 21 | Super.Constructor(EnhancedProvider) 22 | Case CALG_SHA256, CALG_SHA384, CALG_SHA512 23 | Super.Constructor(AESProvider) 24 | Else 25 | Raise New UnsupportedFormatException 26 | End Select 27 | 28 | Dim kh As Integer 29 | If Key <> Nil Then kh = Key.Handle 30 | If Not Win32.Libs.AdvApi32.CryptCreateHash(Me.Provider, Algorithm, kh, 0, mHandle) Then 31 | mLastError = Win32.LastError 32 | Dim err As New Win32Exception 33 | err.ErrorNumber = mLastError 34 | err.Message = Win32.FormatError(mLastError) 35 | Raise err 36 | End If 37 | End Sub 38 | #tag EndMethod 39 | 40 | #tag Method, Flags = &h1000 41 | Sub Constructor(DuplicateHash As Win32.Crypto.HashProcessor) 42 | // Calling the overridden superclass constructor. 43 | // Constructor(DuplicateContext As Win32.Crypto.Context) -- From Context 44 | Super.Constructor(DuplicateHash) 45 | If Not Win32.Libs.AdvApi32.CryptDuplicateHash(DuplicateHash.mHandle, 0, 0, mHandle) Then 46 | mLastError = Win32.LastError 47 | Dim err As New Win32Exception 48 | err.ErrorNumber = mLastError 49 | err.Message = Win32.FormatError(mLastError) 50 | Raise err 51 | End If 52 | End Sub 53 | #tag EndMethod 54 | 55 | #tag Method, Flags = &h21 56 | Private Sub Destructor() 57 | If Not Win32.Libs.AdvApi32.CryptDestroyHash(mHandle) Then 58 | mLastError = Win32.LastError 59 | End If 60 | End Sub 61 | #tag EndMethod 62 | 63 | #tag Method, Flags = &h1 64 | Protected Function GetHashParam(Type As Integer, Buffer As MemoryBlock) As Boolean 65 | Dim buffersz As Integer = buffer.Size 66 | If Not Win32.Libs.AdvApi32.CryptGetHashParam(mHandle, Type, buffer, buffersz, 0) Then 67 | mLastError = Win32.LastError 68 | Return False 69 | Else 70 | Return True 71 | End If 72 | End Function 73 | #tag EndMethod 74 | 75 | #tag Method, Flags = &h0 76 | Function Handle() As Integer 77 | Return mHandle 78 | End Function 79 | #tag EndMethod 80 | 81 | #tag Method, Flags = &h0 82 | Sub Process(NewData As MemoryBlock) 83 | If Not Win32.Libs.AdvApi32.CryptHashData(mHandle, NewData, NewData.Size, 0) Then 84 | mLastError = Win32.LastError 85 | Dim err As New Win32Exception 86 | err.ErrorNumber = mLastError 87 | err.Message = Win32.FormatError(mLastError) 88 | Raise err 89 | End If 90 | End Sub 91 | #tag EndMethod 92 | 93 | #tag Method, Flags = &h1 94 | Protected Function SetHashParam(Type As Integer, Buffer As MemoryBlock, Flags As Integer) As Boolean 95 | If Not Win32.Libs.AdvApi32.CryptSetHashParam(mHandle, Type, buffer, Flags) Then 96 | mLastError = Win32.LastError 97 | Return False 98 | Else 99 | Return True 100 | End If 101 | End Function 102 | #tag EndMethod 103 | 104 | #tag Method, Flags = &h0 105 | Function Value() As String 106 | Dim buffer As New MemoryBlock(4) 107 | If Not Me.GetHashParam(HP_HASHSIZE, buffer) Then 108 | Dim err As New Win32Exception 109 | err.ErrorNumber = mLastError 110 | err.Message = Win32.FormatError(mLastError) 111 | Raise err 112 | End If 113 | buffer = New MemoryBlock(buffer.Int32Value(0)) 114 | If Not Me.GetHashParam(HP_HASHVAL, buffer) Then 115 | Dim err As New Win32Exception 116 | err.ErrorNumber = mLastError 117 | err.Message = Win32.FormatError(mLastError) 118 | Raise err 119 | End If 120 | Return buffer 121 | End Function 122 | #tag EndMethod 123 | 124 | 125 | #tag Property, Flags = &h1 126 | Protected mHandle As Integer = INVALID_HANDLE_VALUE 127 | #tag EndProperty 128 | 129 | 130 | #tag Constant, Name = HP_ALGID, Type = Double, Dynamic = False, Default = \"1", Scope = Protected 131 | #tag EndConstant 132 | 133 | #tag Constant, Name = HP_HASHSIZE, Type = Double, Dynamic = False, Default = \"4", Scope = Protected 134 | #tag EndConstant 135 | 136 | #tag Constant, Name = HP_HASHVAL, Type = Double, Dynamic = False, Default = \"2", Scope = Protected 137 | #tag EndConstant 138 | 139 | 140 | #tag ViewBehavior 141 | #tag ViewProperty 142 | Name="Index" 143 | Visible=true 144 | Group="ID" 145 | InitialValue="-2147483648" 146 | InheritedFrom="Object" 147 | #tag EndViewProperty 148 | #tag ViewProperty 149 | Name="Left" 150 | Visible=true 151 | Group="Position" 152 | InitialValue="0" 153 | InheritedFrom="Object" 154 | #tag EndViewProperty 155 | #tag ViewProperty 156 | Name="Name" 157 | Visible=true 158 | Group="ID" 159 | InheritedFrom="Object" 160 | #tag EndViewProperty 161 | #tag ViewProperty 162 | Name="Super" 163 | Visible=true 164 | Group="ID" 165 | InheritedFrom="Object" 166 | #tag EndViewProperty 167 | #tag ViewProperty 168 | Name="Top" 169 | Visible=true 170 | Group="Position" 171 | InitialValue="0" 172 | InheritedFrom="Object" 173 | #tag EndViewProperty 174 | #tag EndViewBehavior 175 | End Class 176 | #tag EndClass 177 | -------------------------------------------------------------------------------- /libcURL/RequestHeaderEngine.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class RequestHeaderEngine 3 | #tag Method, Flags = &h1 4 | Protected Sub Constructor(Owner As libcURL.EasyHandle) 5 | ' Creates a new instance of RequestHeaderEngine for the EasyHandle whose request headers are to be manipulated 6 | ' 7 | ' See: 8 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.RequestHeaderEngine.Constructor 9 | 10 | mOwner = New WeakRef(Owner) 11 | End Sub 12 | #tag EndMethod 13 | 14 | #tag Method, Flags = &h0 15 | Sub CopyFrom(OtherHeaders As libcURL.RequestHeaderEngine) 16 | ' Copies the specified request headers. 17 | ' 18 | ' See: 19 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.RequestHeaderEngine.CopyFrom 20 | 21 | Dim s() As String = OtherHeaders.mHeaders 22 | Dim l As ListPtr = s 23 | If Not Owner.SetOption(libcURL.Opts.HTTPHEADER, l) Then Raise New cURLException(Owner) 24 | mHeaders = l 25 | End Sub 26 | #tag EndMethod 27 | 28 | #tag Method, Flags = &h0 29 | Function Count() As Integer 30 | ' Returns the number of user-set request headers currently being used. 31 | ' 32 | ' See: 33 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.RequestHeaderEngine.Count 34 | 35 | If mHeaders <> Nil Then Return mHeaders.Count 36 | End Function 37 | #tag EndMethod 38 | 39 | #tag Method, Flags = &h0 40 | Function GetHeader(Name As String) As String 41 | ' Returns the value of the named request header. 42 | ' 43 | ' See: 44 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.RequestHeaderEngine.GetHeader 45 | 46 | Dim c As Integer = Me.Count 47 | For i As Integer = 0 To c - 1 48 | If Me.Name(i) = Name Then Return Me.Value(i) 49 | Next 50 | End Function 51 | #tag EndMethod 52 | 53 | #tag Method, Flags = &h0 54 | Function HasHeader(Name As String) As Boolean 55 | ' Returns True if the named request header has been set. 56 | ' 57 | ' See: 58 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.RequestHeaderEngine.HasHeader 59 | 60 | Return Me.GetHeader(Name) <> "" 61 | End Function 62 | #tag EndMethod 63 | 64 | #tag Method, Flags = &h0 65 | Function Name(Index As Integer) As String 66 | ' Returns the name of the request header at Index. The first header is at Index=0. 67 | ' 68 | ' See: 69 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.RequestHeaderEngine.Name 70 | 71 | If mHeaders = Nil Then Return "" 72 | Return NthField(mHeaders.Item(Index), ":", 1) 73 | End Function 74 | #tag EndMethod 75 | 76 | #tag Method, Flags = &h1 77 | Protected Function Owner() As libcURL.EasyHandle 78 | If mOwner <> Nil And mOwner.Value <> Nil And mOwner.Value IsA libcURL.EasyHandle Then 79 | Return libcURL.EasyHandle(mOwner.Value) 80 | End If 81 | End Function 82 | #tag EndMethod 83 | 84 | #tag Method, Flags = &h0 85 | Sub RemoveHeader(Name As String) 86 | ' Removes the named request header. 87 | ' 88 | ' See: 89 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.RequestHeaderEngine.RemoveHeader 90 | 91 | Me.SetHeader(Name, "") 92 | End Sub 93 | #tag EndMethod 94 | 95 | #tag Method, Flags = &h0 96 | Sub Reset() 97 | ' Deletes all custom request headers and resets defaults. 98 | ' 99 | ' See: 100 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.RequestHeaderEngine.Reset 101 | 102 | Me.SetHeader("", "") 103 | End Sub 104 | #tag EndMethod 105 | 106 | #tag Method, Flags = &h0 107 | Sub SetHeader(Name As String, Value As String) 108 | ' Adds or updates the named request header. Headers will persist until removed or reset. 109 | ' 110 | ' See: 111 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.RequestHeaderEngine.SetHeader 112 | 113 | mHeaders = Owner.SetRequestHeader(mHeaders, Name, Value) 114 | End Sub 115 | #tag EndMethod 116 | 117 | #tag Method, Flags = &h0 118 | Function Value(Index As Integer) As String 119 | ' Returns the value of the request header at Index. The first header is at Index=0. 120 | ' 121 | ' See: 122 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.RequestHeaderEngine.Value 123 | 124 | If mHeaders = Nil Then Return "" 125 | Dim header As String = mHeaders.Item(Index) 126 | Dim nm As String = Me.Name(Index) 127 | Return Replace(header, nm + ":", "").Trim 128 | 129 | End Function 130 | #tag EndMethod 131 | 132 | 133 | #tag Property, Flags = &h21 134 | Private mHeaders As libcURL.ListPtr 135 | #tag EndProperty 136 | 137 | #tag Property, Flags = &h21 138 | Private mOwner As WeakRef 139 | #tag EndProperty 140 | 141 | 142 | #tag ViewBehavior 143 | #tag ViewProperty 144 | Name="Index" 145 | Visible=true 146 | Group="ID" 147 | InitialValue="-2147483648" 148 | Type="Integer" 149 | EditorType="" 150 | #tag EndViewProperty 151 | #tag ViewProperty 152 | Name="Left" 153 | Visible=true 154 | Group="Position" 155 | InitialValue="0" 156 | Type="Integer" 157 | EditorType="" 158 | #tag EndViewProperty 159 | #tag ViewProperty 160 | Name="Name" 161 | Visible=true 162 | Group="ID" 163 | InitialValue="" 164 | Type="String" 165 | EditorType="" 166 | #tag EndViewProperty 167 | #tag ViewProperty 168 | Name="Super" 169 | Visible=true 170 | Group="ID" 171 | InitialValue="" 172 | Type="String" 173 | EditorType="" 174 | #tag EndViewProperty 175 | #tag ViewProperty 176 | Name="Top" 177 | Visible=true 178 | Group="Position" 179 | InitialValue="0" 180 | Type="Integer" 181 | EditorType="" 182 | #tag EndViewProperty 183 | #tag EndViewBehavior 184 | End Class 185 | #tag EndClass 186 | -------------------------------------------------------------------------------- /Win32/GUI/ClipBoard.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class ClipBoard 3 | Implements Win32.Win32Object 4 | #tag CompatibilityFlags = TargetHasGUI 5 | #tag Method, Flags = &h0 6 | Sub Close() 7 | If Not Win32.Libs.User32.CloseClipboard() Then mLastError = Win32.LastError() 8 | End Sub 9 | #tag EndMethod 10 | 11 | #tag Method, Flags = &h0 12 | Sub Constructor() 13 | mHandle = Window(RB_FOREMOST_WINDOW_HWND).Handle 14 | End Sub 15 | #tag EndMethod 16 | 17 | #tag Method, Flags = &h0 18 | Function Data(Format As Win32.GUI.ClipboardFormat) As MemoryBlock 19 | 20 | If Not Me.Open Then Raise New Win32Exception 21 | Dim hMem As Integer = Win32.Libs.User32.GetClipboardData(Format.Handle) 22 | mLastError = Win32.LastError() 23 | If hMem = 0 Then 24 | Me.Close 25 | Raise New Win32Exception 26 | End If 27 | Dim hGlobal As Win32.Utils.WinMB = Win32.Utils.WinMB.Acquire(hMem, Win32.Utils.WinMB.TypeGlobal) 28 | If hGlobal.Size > -1 Then 29 | Dim data As String 30 | If hGlobal <> Nil Then 31 | data = hGlobal.StringValue(0, hGlobal.Size) 32 | Me.Close 33 | Return data 34 | End If 35 | Else 36 | Return Ptr(hMem) 37 | Me.Close 38 | End If 39 | End Function 40 | #tag EndMethod 41 | 42 | #tag Method, Flags = &h0 43 | Sub Data(Format As Win32.GUI.ClipboardFormat, Assigns NewData As MemoryBlock) 44 | ' Sets the content of the ClipBoard. The ClipBoard may contain data in multiple formats, 45 | ' you must specify the format of the data being set. 46 | 47 | If Not Me.Open Or Not Me.Empty Then Raise Win32Exception(mLastError) 48 | Dim hGlobal As Win32.Utils.WinMB = Win32.Utils.WinMB.HeapAllocate(NewData.Size, True, -1, Win32.Utils.GMEM_MOVEABLE) 49 | If hGlobal <> Nil Then 50 | Win32.Utils.WinMB.Acquire(hGlobal) ' mark as not freeable. 51 | hGlobal.StringValue(0, NewData.Size) = NewData.StringValue(0, NewData.Size) 52 | Call Win32.Libs.User32.SetClipboardData(Format.Handle, hGlobal) 53 | mLastError = Win32.LastError() 54 | Break 55 | End If 56 | Me.Close 57 | End Sub 58 | #tag EndMethod 59 | 60 | #tag Method, Flags = &h21 61 | Private Sub Destructor() 62 | Me.Close() 63 | End Sub 64 | #tag EndMethod 65 | 66 | #tag Method, Flags = &h0 67 | Function Empty() As Boolean 68 | If Win32.Libs.User32.EmptyClipboard Then Return True 69 | mLastError = Win32.LastError 70 | End Function 71 | #tag EndMethod 72 | 73 | #tag Method, Flags = &h0 74 | Function FormatCount() As Integer 75 | 76 | If Not Me.Open Then Raise New Win32Exception 77 | Dim hClip, c As Integer 78 | Do 79 | hClip = Win32.Libs.User32.EnumClipboardFormats(hClip) 80 | If hClip = 0 Then Exit Do 81 | c = c + 1 82 | Loop 83 | mLastError = Win32.LastError 84 | Me.Close 85 | Return c 86 | 87 | End Function 88 | #tag EndMethod 89 | 90 | #tag Method, Flags = &h0 91 | Function GetFormat(Index As Integer) As Win32.GUI.ClipboardFormat 92 | 93 | If Not Me.Open Then Raise New Win32Exception 94 | Dim hClip As Integer 95 | For i As Integer = 0 To Index 96 | hClip = Win32.Libs.User32.EnumClipboardFormats(hClip) 97 | Next 98 | mLastError = Win32.LastError 99 | Me.Close 100 | If hClip > 0 Then 101 | Return New Win32.GUI.ClipboardFormat(hClip) 102 | End If 103 | Raise New OutOfBoundsException 104 | 105 | End Function 106 | #tag EndMethod 107 | 108 | #tag Method, Flags = &h0 109 | Function Handle() As Integer 110 | // Part of the Win32Object interface. 111 | Return mHandle 112 | End Function 113 | #tag EndMethod 114 | 115 | #tag Method, Flags = &h0 116 | Function HasFormat(Format As Win32.GUI.ClipboardFormat) As Boolean 117 | If Not Me.Open Then Raise New Win32Exception 118 | Dim hClip As Integer 119 | Dim ret As Boolean 120 | Do 121 | hClip = Win32.Libs.User32.EnumClipboardFormats(hClip) 122 | mLastError = Win32.LastError 123 | If hClip = 0 Then Exit Do 124 | If hClip = Format.Handle Then ret = True 125 | Loop 126 | Me.Close 127 | Return ret 128 | End Function 129 | #tag EndMethod 130 | 131 | #tag Method, Flags = &h0 132 | Function LastError() As Integer 133 | // Part of the Win32Object interface. 134 | Return mLastError 135 | End Function 136 | #tag EndMethod 137 | 138 | #tag Method, Flags = &h0 139 | Function Open() As Boolean 140 | If Win32.Libs.User32.OpenClipboard(mHandle) Then Return True 141 | mLastError = Win32.LastError 142 | End Function 143 | #tag EndMethod 144 | 145 | 146 | #tag Property, Flags = &h1 147 | Protected mHandle As Integer = INVALID_HANDLE_VALUE 148 | #tag EndProperty 149 | 150 | #tag Property, Flags = &h1 151 | Protected mLastError As Integer 152 | #tag EndProperty 153 | 154 | 155 | #tag ViewBehavior 156 | #tag ViewProperty 157 | Name="Index" 158 | Visible=true 159 | Group="ID" 160 | InitialValue="-2147483648" 161 | InheritedFrom="Object" 162 | #tag EndViewProperty 163 | #tag ViewProperty 164 | Name="Left" 165 | Visible=true 166 | Group="Position" 167 | InitialValue="0" 168 | InheritedFrom="Object" 169 | #tag EndViewProperty 170 | #tag ViewProperty 171 | Name="Name" 172 | Visible=true 173 | Group="ID" 174 | InheritedFrom="Object" 175 | #tag EndViewProperty 176 | #tag ViewProperty 177 | Name="Super" 178 | Visible=true 179 | Group="ID" 180 | InheritedFrom="Object" 181 | #tag EndViewProperty 182 | #tag ViewProperty 183 | Name="Top" 184 | Visible=true 185 | Group="Position" 186 | InitialValue="0" 187 | InheritedFrom="Object" 188 | #tag EndViewProperty 189 | #tag EndViewBehavior 190 | End Class 191 | #tag EndClass 192 | -------------------------------------------------------------------------------- /Win32/Crypto/Context.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class Context 3 | #tag Method, Flags = &h0 4 | Sub Constructor(ProviderID As String, ProviderType As Integer) 5 | ' See: http://msdn.microsoft.com/en-us/library/windows/desktop/aa386983%28v=vs.85%29.aspx 6 | Select Case True 7 | Case Win32.Libs.AdvApi32.CryptAcquireContext(mProvider, 0, ProviderID, ProviderType, 0) 8 | mLastError = 0 9 | 10 | 'Case Win32.Libs.AdvApi32.CryptAcquireContext(mProvider, 0, ProviderID, ProviderType, CRYPT_NEWKEYSET) 11 | 'mLastError = 0 12 | 13 | Case Win32.Libs.AdvApi32.CryptAcquireContext(mProvider, 0, ProviderID, ProviderType, CRYPT_VERIFYCONTEXT) 14 | mLastError = 0 15 | 16 | Else 17 | mLastError = Win32.LastError 18 | End Select 19 | 20 | If mLastError <> 0 Then 21 | Dim err As New Win32Exception 22 | err.ErrorNumber = mLastError 23 | err.Message = Win32.FormatError(mLastError) 24 | Raise err 25 | End If 26 | End Sub 27 | #tag EndMethod 28 | 29 | #tag Method, Flags = &h1 30 | Protected Sub Constructor(DuplicateContext As Win32.Crypto.Context) 31 | If Win32.Libs.AdvApi32.CryptContextAddRef(DuplicateContext.Provider, Nil, 0) Then ' increment ref count 32 | mProvider = DuplicateContext.Provider 33 | 34 | Else 35 | mLastError = Win32.LastError 36 | Dim err As New Win32Exception 37 | err.ErrorNumber = mLastError 38 | err.Message = Win32.FormatError(mLastError) 39 | Raise err 40 | 41 | End If 42 | 43 | End Sub 44 | #tag EndMethod 45 | 46 | #tag Method, Flags = &h21 47 | Private Sub Destructor() 48 | If Not Win32.Libs.AdvApi32.CryptReleaseContext(mProvider, 0) Then 49 | mLastError = Win32.LastError 50 | End If 51 | 52 | End Sub 53 | #tag EndMethod 54 | 55 | #tag Method, Flags = &h1 56 | Protected Function GetProviderParam(Type As Integer, ByRef Buffer As MemoryBlock, Flags As Integer) As Boolean 57 | ' If Buffer is Nil and no error occurs, on return Buffer will be instantiated with the correct size of the data. 58 | ' Call this method again with the same parameters to fill the Buffer. 59 | Dim buffersz As Integer 60 | Dim p As Ptr 61 | If Buffer <> Nil Then 62 | p = Buffer 63 | buffersz = buffer.Size 64 | End If 65 | If Not Win32.Libs.AdvApi32.CryptGetProvParam(mProvider, Type, p, buffersz, Flags) Then 66 | mLastError = Win32.LastError 67 | Return False 68 | Else 69 | If Buffer = Nil Then Buffer = New MemoryBlock(buffersz) 70 | Return True 71 | End If 72 | End Function 73 | #tag EndMethod 74 | 75 | #tag Method, Flags = &h0 76 | Function LastError() As Integer 77 | // Part of the Win32Object interface. 78 | Return mLastError 79 | End Function 80 | #tag EndMethod 81 | 82 | #tag Method, Flags = &h0 83 | Function Operator_Compare(OtherContext As Win32.Crypto.Context) As Integer 84 | Select Case True 85 | Case OtherContext Is Nil 86 | Return 1 87 | Case OtherContext.Provider > mProvider 88 | Return -1 89 | Case OtherContext.Provider < mProvider 90 | Return 1 91 | Case OtherContext.Provider = mProvider 92 | Return 0 93 | End Select 94 | 95 | 96 | End Function 97 | #tag EndMethod 98 | 99 | #tag Method, Flags = &h0 100 | Function Provider() As Integer 101 | Return mProvider 102 | End Function 103 | #tag EndMethod 104 | 105 | #tag Method, Flags = &h0 106 | Function ProviderName() As String 107 | Dim mb As MemoryBlock 108 | ' first call allocates a buffer big enough for the second call 109 | If Me.GetProviderParam(PP_NAME, mb, 0) Then ' on in mb is Nil 110 | If Me.GetProviderParam(PP_NAME, mb, 0) Then ' on in mb is a MemoryBlock of correct size 111 | Return mb.CString(0) 112 | Else 113 | mLastError = Win32.LastError 114 | End If 115 | Else 116 | mLastError = Win32.LastError 117 | End If 118 | End Function 119 | #tag EndMethod 120 | 121 | #tag Method, Flags = &h1 122 | Protected Function SetProviderParam(Type As Integer, Buffer As MemoryBlock, Flags As Integer) As Boolean 123 | If Not Win32.Libs.AdvApi32.CryptSetProvParam(mProvider, Type, buffer, Flags) Then 124 | mLastError = Win32.LastError 125 | Return False 126 | Else 127 | Return True 128 | End If 129 | End Function 130 | #tag EndMethod 131 | 132 | 133 | #tag Property, Flags = &h1 134 | Protected mLastError As Integer 135 | #tag EndProperty 136 | 137 | #tag Property, Flags = &h1 138 | Protected mProvider As Integer 139 | #tag EndProperty 140 | 141 | 142 | #tag Constant, Name = NTE_BAD_UID, Type = Double, Dynamic = False, Default = \"&h80090001", Scope = Private 143 | #tag EndConstant 144 | 145 | #tag Constant, Name = PP_NAME, Type = Double, Dynamic = False, Default = \"4", Scope = Private 146 | #tag EndConstant 147 | 148 | 149 | #tag ViewBehavior 150 | #tag ViewProperty 151 | Name="Index" 152 | Visible=true 153 | Group="ID" 154 | InitialValue="-2147483648" 155 | InheritedFrom="Object" 156 | #tag EndViewProperty 157 | #tag ViewProperty 158 | Name="Left" 159 | Visible=true 160 | Group="Position" 161 | InitialValue="0" 162 | InheritedFrom="Object" 163 | #tag EndViewProperty 164 | #tag ViewProperty 165 | Name="Name" 166 | Visible=true 167 | Group="ID" 168 | InheritedFrom="Object" 169 | #tag EndViewProperty 170 | #tag ViewProperty 171 | Name="Super" 172 | Visible=true 173 | Group="ID" 174 | InheritedFrom="Object" 175 | #tag EndViewProperty 176 | #tag ViewProperty 177 | Name="Top" 178 | Visible=true 179 | Group="Position" 180 | InitialValue="0" 181 | InheritedFrom="Object" 182 | #tag EndViewProperty 183 | #tag EndViewBehavior 184 | End Class 185 | #tag EndClass 186 | -------------------------------------------------------------------------------- /Win32/Libs/AdvApi32.rbbas: -------------------------------------------------------------------------------- 1 | #tag Module 2 | Protected Module AdvApi32 3 | #tag ExternalMethod, Flags = &h1 4 | Protected Declare Function CryptAcquireContext Lib "AdvApi32" Alias "CryptAcquireContextW" (ByRef provider as Integer, container as Integer, providerName as WString, providerType as Integer, flags as Integer) As Boolean 5 | #tag EndExternalMethod 6 | 7 | #tag ExternalMethod, Flags = &h1 8 | Protected Declare Function CryptContextAddRef Lib "AdvApi32" (Provider As Integer, Reserved As Ptr, Flags As Integer) As Boolean 9 | #tag EndExternalMethod 10 | 11 | #tag ExternalMethod, Flags = &h1 12 | Protected Declare Function CryptCreateHash Lib "AdvApi32" (Provider as Integer, Algorithm as Integer, Key as Integer, flags as Integer, ByRef hashHandle as Integer) As Boolean 13 | #tag EndExternalMethod 14 | 15 | #tag ExternalMethod, Flags = &h1 16 | Protected Declare Function CryptDecrypt Lib "AdvApi32" (hKey As Integer, hHash As Integer, Final As Boolean, Flags As Integer, Buffer As Ptr, ByRef BufferLen As Integer) As Boolean 17 | #tag EndExternalMethod 18 | 19 | #tag ExternalMethod, Flags = &h1 20 | Protected Declare Function CryptDeriveKey Lib "AdvApi32" (Provider As Integer, Algorithm As Integer, BaseData As Integer, Flags As Integer, ByRef hKey As Integer) As Boolean 21 | #tag EndExternalMethod 22 | 23 | #tag ExternalMethod, Flags = &h1 24 | Protected Declare Function CryptDestroyHash Lib "AdvApi32" (HashHandle As Integer) As Boolean 25 | #tag EndExternalMethod 26 | 27 | #tag ExternalMethod, Flags = &h1 28 | Protected Declare Function CryptDestroyKey Lib "AdvApi32" (hKey As Integer) As Boolean 29 | #tag EndExternalMethod 30 | 31 | #tag ExternalMethod, Flags = &h1 32 | Protected Declare Function CryptDuplicateHash Lib "AdvApi32" (hHash As Integer, Reserved As Integer, Flags As Integer, ByRef NewHash As Integer) As Boolean 33 | #tag EndExternalMethod 34 | 35 | #tag ExternalMethod, Flags = &h1 36 | Protected Declare Function CryptEncrypt Lib "AdvApi32" (hKey As Integer, hHash As Integer, Final As Boolean, Flags As Integer, Buffer As Ptr, ByRef DataLen As Integer, BufferLen As Integer) As Boolean 37 | #tag EndExternalMethod 38 | 39 | #tag ExternalMethod, Flags = &h1 40 | Protected Declare Function CryptExportKey Lib "AdvApi32" (hKey As Integer, ExpKey As Integer, BlobType As Integer, Flags As Integer, Buffer As Ptr, ByRef BufferSize As Integer) As Boolean 41 | #tag EndExternalMethod 42 | 43 | #tag ExternalMethod, Flags = &h1 44 | Protected Declare Function CryptGenKey Lib "AdvApi32" (Provider As Integer, Algorithm As Integer, Flags As Integer, ByRef hKey As Integer) As Boolean 45 | #tag EndExternalMethod 46 | 47 | #tag ExternalMethod, Flags = &h1 48 | Protected Declare Function CryptGenRandom Lib "AdvApi32" (Provider As Integer, BufferLen As Integer, Buffer As Ptr) As Boolean 49 | #tag EndExternalMethod 50 | 51 | #tag ExternalMethod, Flags = &h1 52 | Protected Declare Function CryptGetHashParam Lib "AdvApi32" (hashHandle as Integer, type as Integer, value as Ptr, ByRef length as Integer, flags as Integer) As Boolean 53 | #tag EndExternalMethod 54 | 55 | #tag ExternalMethod, Flags = &h1 56 | Protected Declare Function CryptGetKeyParam Lib "AdvApi32" (hKeyContainer As Integer, Param As Integer, Buffer As Ptr, ByRef BufferSize As Integer, Flags As Integer) As Boolean 57 | #tag EndExternalMethod 58 | 59 | #tag ExternalMethod, Flags = &h1 60 | Protected Declare Function CryptGetProvParam Lib "AdvApi32" (Provider As Integer, Param As Integer, Buffer As Ptr, ByRef BufferSize As Integer, Flags As Integer) As Boolean 61 | #tag EndExternalMethod 62 | 63 | #tag ExternalMethod, Flags = &h1 64 | Protected Declare Function CryptHashData Lib "AdvApi32" (hashHandle as Integer, data as Ptr, length as Integer, flags as Integer) As Boolean 65 | #tag EndExternalMethod 66 | 67 | #tag ExternalMethod, Flags = &h1 68 | Protected Declare Function CryptImportKey Lib "AdvApi32" (hProvider As Integer, Data As Ptr, DataLen As Integer, hPubKey As Integer, Flags As Integer, ByRef hKey As Integer) As Boolean 69 | #tag EndExternalMethod 70 | 71 | #tag ExternalMethod, Flags = &h1 72 | Protected Declare Function CryptReleaseContext Lib "AdvApi32" (Provider As Integer, Reserved As Integer) As Boolean 73 | #tag EndExternalMethod 74 | 75 | #tag ExternalMethod, Flags = &h1 76 | Protected Declare Function CryptSetHashParam Lib "AdvApi32" (Hash As Integer, Param As Integer, Buffer As Ptr, Flags As Integer) As Boolean 77 | #tag EndExternalMethod 78 | 79 | #tag ExternalMethod, Flags = &h1 80 | Protected Declare Function CryptSetKeyParam Lib "AdvApi32" (hKeyContainer As Integer, Param As Integer, Buffer As Ptr, Flags As Integer) As Boolean 81 | #tag EndExternalMethod 82 | 83 | #tag ExternalMethod, Flags = &h1 84 | Protected Declare Function CryptSetProvParam Lib "AdvApi32" (Provider As Integer, Param As Integer, Buffer As Ptr, Flags As Integer) As Boolean 85 | #tag EndExternalMethod 86 | 87 | #tag ExternalMethod, Flags = &h1 88 | Protected Declare Function GetUserName Lib "AdvApi32" Alias "GetUserNameW" (buffer As Ptr, ByRef buffSize As Integer) As Boolean 89 | #tag EndExternalMethod 90 | 91 | #tag ExternalMethod, Flags = &h1 92 | Protected Declare Function SaferiIsExecutableFileType Lib "AdvApi32" (FilePath As WString, OmitEXE As Boolean) As Boolean 93 | #tag EndExternalMethod 94 | 95 | 96 | #tag ViewBehavior 97 | #tag ViewProperty 98 | Name="Index" 99 | Visible=true 100 | Group="ID" 101 | InitialValue="-2147483648" 102 | InheritedFrom="Object" 103 | #tag EndViewProperty 104 | #tag ViewProperty 105 | Name="Left" 106 | Visible=true 107 | Group="Position" 108 | InitialValue="0" 109 | InheritedFrom="Object" 110 | #tag EndViewProperty 111 | #tag ViewProperty 112 | Name="Name" 113 | Visible=true 114 | Group="ID" 115 | InheritedFrom="Object" 116 | #tag EndViewProperty 117 | #tag ViewProperty 118 | Name="Super" 119 | Visible=true 120 | Group="ID" 121 | InheritedFrom="Object" 122 | #tag EndViewProperty 123 | #tag ViewProperty 124 | Name="Top" 125 | Visible=true 126 | Group="Position" 127 | InitialValue="0" 128 | InheritedFrom="Object" 129 | #tag EndViewProperty 130 | #tag EndViewBehavior 131 | End Module 132 | #tag EndModule 133 | -------------------------------------------------------------------------------- /GUI/TridResultWindow.rbfrm: -------------------------------------------------------------------------------- 1 | #tag Window 2 | Begin Window TridResultWindow 3 | BackColor = &cFFFFFF00 4 | Backdrop = 0 5 | CloseButton = True 6 | Composite = False 7 | Frame = 1 8 | FullScreen = False 9 | HasBackColor = False 10 | HasFullScreenButton= False 11 | Height = 113 12 | ImplicitInstance= False 13 | LiveResize = "True" 14 | MacProcID = 0 15 | MaxHeight = 32000 16 | MaximizeButton = False 17 | MaxWidth = 32000 18 | MenuBar = 0 19 | MenuBarVisible = True 20 | MinHeight = 64 21 | MinimizeButton = False 22 | MinWidth = 64 23 | Placement = 1 24 | Resizeable = True 25 | Title = "Trid Says" 26 | Visible = True 27 | Width = 348 28 | Begin PrettyListBox TridResultList 29 | AutoDeactivate = True 30 | AutoHideScrollbars= True 31 | Bold = False 32 | Border = True 33 | ColumnCount = 2 34 | ColumnsResizable= False 35 | ColumnWidths = "80%,*" 36 | DataField = "" 37 | DataSource = "" 38 | DefaultRowHeight= -1 39 | Enabled = True 40 | EnableDrag = False 41 | EnableDragReorder= False 42 | GridLinesHorizontal= 0 43 | GridLinesVertical= 0 44 | HasHeading = True 45 | HeadingIndex = -1 46 | Height = 113 47 | HelpTag = "" 48 | Hierarchical = False 49 | Index = -2147483648 50 | InitialParent = "" 51 | InitialValue = "Guess Certainty" 52 | Italic = False 53 | Left = 0 54 | LockBottom = True 55 | LockedInPosition= False 56 | LockLeft = True 57 | LockRight = True 58 | LockTop = True 59 | RequiresSelection= False 60 | Scope = 0 61 | ScrollbarHorizontal= False 62 | ScrollBarVertical= True 63 | SelectionType = 0 64 | ShowDropIndicator= False 65 | TabIndex = 0 66 | TabPanelIndex = 0 67 | TabStop = True 68 | TextFont = "System" 69 | TextSize = 0.0 70 | TextUnit = 0 71 | Top = 0 72 | Transparent = True 73 | Underline = False 74 | UseFocusRing = True 75 | Visible = True 76 | Width = 348 77 | _ScrollOffset = 0 78 | _ScrollWidth = -1 79 | End 80 | Begin PushButton CancelBtn 81 | AutoDeactivate = True 82 | Bold = False 83 | ButtonStyle = 0 84 | Cancel = True 85 | Caption = "Cancel" 86 | Default = False 87 | Enabled = True 88 | Height = 22 89 | HelpTag = "" 90 | Index = -2147483648 91 | InitialParent = "" 92 | Italic = False 93 | Left = 103 94 | LockBottom = False 95 | LockedInPosition= False 96 | LockLeft = True 97 | LockRight = False 98 | LockTop = True 99 | Scope = 0 100 | TabIndex = 1 101 | TabPanelIndex = 0 102 | TabStop = True 103 | TextFont = "System" 104 | TextSize = 0.0 105 | TextUnit = 0 106 | Top = -57 107 | Transparent = True 108 | Underline = False 109 | Visible = True 110 | Width = 80 111 | End 112 | End 113 | #tag EndWindow 114 | 115 | #tag WindowCode 116 | #tag Method, Flags = &h0 117 | Sub ShowResult(Results() As TridLib.FileType, File As FolderItem, ParentWindow As Window) 118 | TridResultList.DeleteAllRows 119 | Self.Title = "TrID Analysis of " + File.Name 120 | If UBound(Results) > -1 Then 121 | Dim total As Integer 122 | For i As Integer = 0 To UBound(Results) 123 | Dim rs As TridLib.FileType = Results(i) 124 | TridResultList.AddRow("(" + rs.Extension + ")" + rs.Description) 125 | TridResultList.RowTag(TridResultList.LastIndex) = rs 126 | total = total + rs.Points 127 | Next 128 | For i As Integer = 0 To TridResultList.ListCount - 1 129 | Dim rs As TridLib.FileType = TridResultList.RowTag(i) 130 | TridResultList.Cell(i, 1) = Format(rs.Points * 100 / total, "##0.0#") + "%" 131 | Next 132 | Else 133 | TridResultList.AddRow("Unknown (plain text?)", "100%") 134 | End If 135 | 136 | 137 | Dim ScreenNumber As Integer = 0 138 | If ParentWindow <> Nil Then ScreenNumber = ScreenFromXY(parentWindow.Left, ParentWindow.Top) 139 | ShowCentered(Me, ScreenNumber) 140 | Me.ShowModal 141 | End Sub 142 | #tag EndMethod 143 | 144 | 145 | #tag EndWindowCode 146 | 147 | #tag Events TridResultList 148 | #tag Event 149 | Function ConstructContextualMenu(base as MenuItem, x as Integer, y as Integer) As Boolean 150 | Dim tridtype As String = Me.Cell(Me.RowFromXY(X, Y), 0).Trim 151 | If tridtype <> "" Then 152 | Dim cp As New MenuItem("Copy to clipboard") 153 | Dim se As New MenuItem("Search " + VTHash.GetConfig("SearchEngineName")) 154 | se.Tag = tridtype 155 | cp.Tag = tridtype 156 | base.Append(cp) 157 | If VTHash.GetConfig("SearchEngineName") <> "" Then base.Append(se) 158 | Return True 159 | End If 160 | End Function 161 | #tag EndEvent 162 | #tag Event 163 | Function ContextualMenuAction(hitItem as MenuItem) As Boolean 164 | Select Case hitItem.Text.Left(5) 165 | Case "Copy " 166 | Dim cb As New Clipboard 167 | cb.Text = hitItem.Tag 168 | Case "Searc" 169 | ShowURL(Replace(VTHash.GetConfig("SearchEngineURL"), "%PARAMETER%", hitItem.Tag)) 170 | End Select 171 | End Function 172 | #tag EndEvent 173 | #tag EndEvents 174 | #tag Events CancelBtn 175 | #tag Event 176 | Sub Action() 177 | Self.Close 178 | End Sub 179 | #tag EndEvent 180 | #tag EndEvents 181 | -------------------------------------------------------------------------------- /VTHash/MultipartForm.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class MultipartForm 3 | #tag Method, Flags = &h0 4 | Sub Constructor() 5 | mFormElements = New Dictionary 6 | End Sub 7 | #tag EndMethod 8 | 9 | #tag Method, Flags = &h0 10 | Function Count() As Integer 11 | Return mFormElements.Count 12 | End Function 13 | #tag EndMethod 14 | 15 | #tag Method, Flags = &h0 16 | Function Element(Name As String) As Variant 17 | Return mFormElements.Value(Name) 18 | End Function 19 | #tag EndMethod 20 | 21 | #tag Method, Flags = &h0 22 | Sub Element(Name As String, Assigns Value As Variant) 23 | If Value = Nil Then 24 | mFormElements.Remove(Name) 25 | Else 26 | mFormElements.Value(Name) = Value 27 | End If 28 | End Sub 29 | #tag EndMethod 30 | 31 | #tag Method, Flags = &h0 32 | Shared Function FromString(FormData As String, Boundary As String) As MultipartForm 33 | Dim form As New MultipartForm 34 | Dim elements() As String = Split(FormData, "--" + Boundary)' + CRLF) 35 | form.Boundary = Boundary 36 | 37 | Dim ecount As Integer = UBound(elements) 38 | For i As Integer = 1 To ecount 39 | Dim line As String = NthField(elements(i).LTrim, CRLF, 1) 40 | Dim name As String = NthField(line, ";", 2) 41 | name = NthField(name, "=", 2) 42 | name = ReplaceAll(name, """", "") 43 | If name.Trim = "" Then Continue For i 44 | Dim j As Integer 45 | Dim nm As String = name 46 | Do 47 | If form.HasElement(nm) Then 48 | j = j + 1 49 | nm = name + Str(j) 50 | Else 51 | Exit Do 52 | End If 53 | Loop 54 | If CountFields(line, ";") < 3 Then 'form field 55 | form.Element(nm) = NthField(elements(i), CRLF + CRLF, 2) 56 | Else 'file field 57 | Dim filename As String = NthField(line, ";", 3) 58 | filename = NthField(filename, "=", 2) 59 | filename = ReplaceAll(filename, """", "") 60 | Dim tmp As FolderItem = SpecialFolder.Temporary.Child(filename) 61 | Dim bs As BinaryStream = BinaryStream.Create(tmp, True) 62 | Dim filedata As MemoryBlock = elements(i) 63 | Dim t As Integer = InStr(filedata, CRLF + CRLF) + 3 64 | filedata = filedata.StringValue(t, filedata.Size - t - 2) 65 | bs.Write(filedata) 66 | bs.Close 67 | form.Element(nm) = tmp 68 | End If 69 | Next 70 | 71 | Return form 72 | 73 | End Function 74 | #tag EndMethod 75 | 76 | #tag Method, Flags = &h0 77 | Function HasElement(Name As String) As Boolean 78 | Return mFormElements.HasKey(Name) 79 | End Function 80 | #tag EndMethod 81 | 82 | #tag Method, Flags = &h0 83 | Function Name(Index As Integer) As String 84 | Return mFormElements.Key(Index).StringValue 85 | End Function 86 | #tag EndMethod 87 | 88 | #tag Method, Flags = &h0 89 | Sub Name(Index As Integer, Assigns NewName As String) 90 | Dim nm As String = mFormElements.Key(Index) 91 | Dim v As Variant = mFormElements.Value(nm) 92 | mFormElements.Remove(nm) 93 | mFormElements.Value(NewName) = v 94 | End Sub 95 | #tag EndMethod 96 | 97 | #tag Method, Flags = &h0 98 | Function ToString() As String 99 | If Boundary.Trim = "" Then 100 | Boundary = "0x" + Left(EncodeHex(MD5(Format(Microseconds, "############.##########"))) + "00000000000000000000000000000000", 32) + "bOuNdArY" 101 | End If 102 | 103 | Dim data As New MemoryBlock(0) 104 | Dim out As New BinaryStream(data) 105 | 'out.Write("Content-Type: multipart/form-data; boundary=" + Me.Boundary + CRLF + CRLF) 106 | For Each key As String In mFormElements.Keys 107 | If VarType(mFormElements.Value(Key)) = Variant.TypeString Then 108 | out.Write("--" + Me.Boundary + CRLF) 109 | out.Write("Content-Disposition: form-data; name=""" + key + """" + CRLF + CRLF) 110 | out.Write(mFormElements.Value(key) + CRLF) 111 | ElseIf mFormElements.Value(Key) IsA FolderItem Then 112 | Dim file As FolderItem = mFormElements.Value(key) 113 | out.Write("--" + Me.Boundary + CRLF) 114 | out.Write("Content-Disposition: form-data; name=""" + key + """; filename=""" + File.Name + """" + CRLF) 115 | Dim type As ContentType = file 116 | out.Write("Content-Type: " + type.ToString + CRLF + CRLF) 117 | Dim bs As BinaryStream = BinaryStream.Open(File) 118 | out.Write(bs.Read(bs.Length) + CRLF) 119 | bs.Close 120 | ElseIf DebugBuild Then 121 | Raise New TypeMismatchException ' Strings and folderitems only 122 | End If 123 | Next 124 | 125 | out.Write("--" + Me.Boundary + "--" + CRLF) 126 | out.Close 127 | Return data 128 | End Function 129 | #tag EndMethod 130 | 131 | #tag Method, Flags = &h0 132 | Function Type() As VTHash.ContentType 133 | Return "multipart/form-data; Boundary=" + Boundary 134 | End Function 135 | #tag EndMethod 136 | 137 | 138 | #tag Property, Flags = &h0 139 | Boundary As String 140 | #tag EndProperty 141 | 142 | #tag Property, Flags = &h21 143 | Private mFormElements As Dictionary 144 | #tag EndProperty 145 | 146 | 147 | #tag ViewBehavior 148 | #tag ViewProperty 149 | Name="Boundary" 150 | Group="Behavior" 151 | InitialValue="--bOrEdOmSoFtBoUnDaRy" 152 | Type="String" 153 | EditorType="MultiLineEditor" 154 | #tag EndViewProperty 155 | #tag ViewProperty 156 | Name="Index" 157 | Visible=true 158 | Group="ID" 159 | InitialValue="-2147483648" 160 | Type="Integer" 161 | InheritedFrom="Object" 162 | #tag EndViewProperty 163 | #tag ViewProperty 164 | Name="Left" 165 | Visible=true 166 | Group="Position" 167 | InitialValue="0" 168 | Type="Integer" 169 | InheritedFrom="Object" 170 | #tag EndViewProperty 171 | #tag ViewProperty 172 | Name="Name" 173 | Visible=true 174 | Group="ID" 175 | Type="String" 176 | InheritedFrom="Object" 177 | #tag EndViewProperty 178 | #tag ViewProperty 179 | Name="Super" 180 | Visible=true 181 | Group="ID" 182 | Type="String" 183 | InheritedFrom="Object" 184 | #tag EndViewProperty 185 | #tag ViewProperty 186 | Name="Top" 187 | Visible=true 188 | Group="Position" 189 | InitialValue="0" 190 | Type="Integer" 191 | InheritedFrom="Object" 192 | #tag EndViewProperty 193 | #tag EndViewBehavior 194 | End Class 195 | #tag EndClass 196 | -------------------------------------------------------------------------------- /Win32/GUI/MessageMonitor.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class MessageMonitor 3 | Inherits Win32.GUI.HWND 4 | Implements Win32.Win32Object 5 | #tag CompatibilityFlags = TargetHasGUI 6 | #tag Method, Flags = &h0 7 | Sub Close() 8 | // Part of the Win32Object interface. 9 | #If TargetWin32 Then 10 | If Not WndProcs.HasKey(mHandle) Then Return 11 | Dim oldWndProc As Ptr = WndProcs.Value(mHandle) 12 | Call Win32.Libs.User32.SetWindowLong(mHandle, GWL_WNDPROC, oldWndProc) 13 | WndProcs.Remove(mHandle) 14 | Dim wndclass As Dictionary 15 | For i As Integer = UBound(Subclasses) DownTo 0 16 | wndclass = Subclasses(i) 17 | If wndclass.HasKey(mHandle) Then 18 | Subclasses.Remove(i) 19 | End 20 | Next 21 | #endif 22 | End Sub 23 | #tag EndMethod 24 | 25 | #tag Method, Flags = &h1 26 | Protected Sub Constructor(HWND As Integer) 27 | #If TargetHasGUI Then 28 | If HWND = 0 Then HWND = Window(0).Handle 29 | // Calling the overridden superclass constructor. 30 | // Constructor(HWND As Integer) -- From HWND 31 | Super.Constructor(HWND) 32 | If WndProcs = Nil Then WndProcs = New Dictionary 33 | 34 | If WndProcs.HasKey(mHandle) Then 35 | Dim d As New Dictionary 36 | d.Value(mHandle) = Me 37 | Subclasses.Append(d) 38 | Else 39 | Dim windproc As Ptr = AddressOf DefWindowProc 40 | Dim oldWndProc As Integer = Me.SetLong(GWL_WNDPROC, windproc) 41 | WndProcs.Value(mHandle) = oldWndProc 42 | Dim d As New Dictionary 43 | d.Value(mHandle) = New WeakRef(Me) 44 | Subclasses.Append(d) 45 | End If 46 | #Else 47 | ' Console and Web apps are not supported 48 | #pragma Unused HWND 49 | Raise New PlatformNotSupportedException 50 | #endif 51 | 52 | End Sub 53 | #tag EndMethod 54 | 55 | #tag Method, Flags = &h1 56 | Protected Shared Function DefWindowProc(HWND as Integer, msg as Integer, wParam as Ptr, lParam as Ptr) As Integer 57 | #pragma X86CallingConvention StdCall 58 | For Each wndclass As Dictionary In Subclasses 59 | ' Find the instance of MessageMonitor that belongs to HWND 60 | If wndclass.HasKey(HWND) Then 61 | Dim w As WeakRef = wndclass.Value(HWND) 62 | Dim subclass As MessageMonitor = MessageMonitor(w.Value) 63 | If subclass <> Nil And subclass.WndProc(HWND, msg, wParam, lParam) Then 64 | ' subclass handled the message 65 | Return 1 66 | End If 67 | End If 68 | Next 69 | 70 | ' No one handled this message, pass it to the next WndProc 71 | Dim nextWndProc As Integer 72 | nextWndProc = WndProcs.Lookup(HWND, INVALID_HANDLE_VALUE) 73 | If nextWndProc <> INVALID_HANDLE_VALUE Then 74 | Return Win32.Libs.User32.CallWindowProc(nextWndProc, HWND, msg, wParam, lParam) 75 | End If 76 | 77 | End Function 78 | #tag EndMethod 79 | 80 | #tag Method, Flags = &h21 81 | Private Sub Destructor() 82 | Me.Close 83 | End Sub 84 | #tag EndMethod 85 | 86 | #tag Method, Flags = &h0 87 | Shared Function Subclass(Target As RectControl) As Win32.GUI.MessageMonitor 88 | Return New Win32.GUI.MessageMonitor(Target.Handle) 89 | End Function 90 | #tag EndMethod 91 | 92 | #tag Method, Flags = &h0 93 | Shared Function Subclass(Target As Window) As Win32.GUI.MessageMonitor 94 | Return New Win32.GUI.MessageMonitor(Target.Handle) 95 | End Function 96 | #tag EndMethod 97 | 98 | #tag Method, Flags = &h21 99 | Private Function WndProc(HWND as Integer, msg as Integer, wParam as Ptr, lParam as Ptr) As Boolean 100 | #pragma Unused HWND 101 | Return WindowMessage(msg, wParam, lParam) 102 | End Function 103 | #tag EndMethod 104 | 105 | 106 | #tag Hook, Flags = &h0 107 | Event WindowMessage(Message As Integer, WParam As Ptr, LParam As Ptr) As Boolean 108 | #tag EndHook 109 | 110 | 111 | #tag Note, Name = About this class 112 | This class allows RB applications to capture Window Messages sent by the system to a window or control. 113 | Window Messages are used to inform applications of user actions, events, and other useful things. For example 114 | the WM_PAINT message tells a window to repaint itself and WM_HOTKEY indicates that a global hotkey combo was 115 | pressed. See the HotKeyMonitor class for using Hotkeys. 116 | 117 | By default, all window messages are immediately passed on to the RB framework for normal processing. Use the 118 | AddMessageFilter method to specify which window messages you would like to receive. Return True from the 119 | WindowMessage event to prevent the message from being passed on to the framework. 120 | 121 | Each MessageMonitor instance must belong to a window or a control. If no window/control is specified to the 122 | Constructor (specifically, the handle property of the Window/Control) then your app's frontmost window will 123 | be used (AKA Window(0) See: http://docs.realsoftware.com/index.php/Window_Method) 124 | 125 | Each instance can handle any number of message types, but can only have one owning window/control. 126 | 127 | See: http://msdn.microsoft.com/en-us/library/windows/desktop/ff381405%28v=vs.85%29.aspx 128 | 129 | 130 | CAUTION: 131 | Avoid performing any lengthy actions directly in the WindowMessage event. Otherwise Windows may report that 132 | the application is "Not Responding." 133 | #tag EndNote 134 | 135 | 136 | #tag Property, Flags = &h21 137 | Private Shared Subclasses() As Dictionary 138 | #tag EndProperty 139 | 140 | #tag Property, Flags = &h21 141 | Private Shared WndProcs As Dictionary 142 | #tag EndProperty 143 | 144 | 145 | #tag ViewBehavior 146 | #tag ViewProperty 147 | Name="Index" 148 | Visible=true 149 | Group="ID" 150 | InitialValue="-2147483648" 151 | Type="Integer" 152 | InheritedFrom="Object" 153 | #tag EndViewProperty 154 | #tag ViewProperty 155 | Name="Left" 156 | Visible=true 157 | Group="Position" 158 | InitialValue="0" 159 | InheritedFrom="Object" 160 | #tag EndViewProperty 161 | #tag ViewProperty 162 | Name="Name" 163 | Visible=true 164 | Group="ID" 165 | InheritedFrom="Object" 166 | #tag EndViewProperty 167 | #tag ViewProperty 168 | Name="Super" 169 | Visible=true 170 | Group="ID" 171 | InheritedFrom="Object" 172 | #tag EndViewProperty 173 | #tag ViewProperty 174 | Name="Top" 175 | Visible=true 176 | Group="Position" 177 | InitialValue="0" 178 | InheritedFrom="Object" 179 | #tag EndViewProperty 180 | #tag EndViewBehavior 181 | End Class 182 | #tag EndClass 183 | -------------------------------------------------------------------------------- /Win32/GUI/HotKeyMonitor.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class HotKeyMonitor 3 | Inherits Win32.GUI.MessageMonitor 4 | #tag CompatibilityFlags = TargetHasGUI 5 | #tag Event 6 | Function WindowMessage(Message As Integer, WParam As Ptr, LParam As Ptr) As Boolean 7 | If Message = WM_HOTKEY Then 8 | Dim keystring As String = ConstructKeyString(Integer(LParam)) 9 | Return HotKeyPressed(Integer(WParam), keystring) 10 | End If 11 | End Function 12 | #tag EndEvent 13 | 14 | 15 | #tag Method, Flags = &h1 16 | Protected Shared Function ConstructKeyString(lParam as Integer) As String 17 | #If TargetWin32 Then 18 | Dim lo, high As Integer 19 | lo = Bitwise.BitAnd(lParam, &hFFFF) 20 | high = Bitwise.ShiftRight(lParam, 16) 21 | 22 | Dim ret As String 23 | If Bitwise.BitAnd(lo, MOD_CONTROL) <> 0 Then 24 | ret = ret + "Ctrl " 25 | End 26 | If Bitwise.BitAnd(lo, MOD_ALT) <> 0 Then 27 | ret = ret + "Alt " 28 | End 29 | If Bitwise.BitAnd(lo, MOD_SHIFT) <> 0 Then 30 | ret = ret + "Shift " 31 | End 32 | If Bitwise.BitAnd(lo, MOD_WIN) <> 0 Then 33 | ret = ret + "Meta " 34 | End 35 | ret = ReplaceAll(ret, " ", "+") 36 | 37 | Dim scanCode As Integer = Win32.Libs.User32.MapVirtualKey(high, 0) 38 | scanCode = Bitwise.ShiftLeft(scanCode, 16) 39 | Dim keyText As New MemoryBlock(32) 40 | Dim keyTextLen As Integer 41 | keyTextLen = Win32.Libs.User32.GetKeyNameText(scanCode, keyText, keyText.Size) 42 | Return ret + keyText.WString(0) 43 | #endif 44 | End Function 45 | #tag EndMethod 46 | 47 | #tag Method, Flags = &h1000 48 | Sub Constructor() 49 | // Calling the overridden superclass constructor. 50 | // Constructor(HWND As Integer) -- From MessageMonitor 51 | Super.Constructor(RB_FOREMOST_WINDOW_HWND) 52 | End Sub 53 | #tag EndMethod 54 | 55 | #tag Method, Flags = &h21 56 | Private Sub Destructor() 57 | For i As Integer = UBound(KeyIDs) DownTo 0 58 | Me.UnregisterKey(KeyIDs(i)) 59 | Next 60 | End Sub 61 | #tag EndMethod 62 | 63 | #tag Method, Flags = &h1 64 | Protected Function RegisterKey(modifiers as Integer, virtualKey as Integer, Optional ID As Integer) As Integer 65 | #If TargetWin32 Then 66 | If ID = 0 Then ID = NextNum 67 | If Win32.Libs.User32.RegisterHotKey(Me.Handle, ID, modifiers, virtualKey) Then 68 | KeyIDs.Append(id) 69 | Return id 70 | Else 71 | Return -1 72 | End If 73 | #endif 74 | End Function 75 | #tag EndMethod 76 | 77 | #tag Method, Flags = &h0 78 | Function RegisterKey(Key As String, ParamArray modifiers() As Integer) As Integer 79 | Dim m As Integer 80 | For i As Integer = 0 To UBound(modifiers) 81 | m = m Or modifiers(i) 82 | Next 83 | Return Me.RegisterKey(m, VirtualKey(key)) 84 | End Function 85 | #tag EndMethod 86 | 87 | #tag Method, Flags = &h0 88 | Sub UnregisterKey(id as Integer) 89 | #If TargetWin32 Then 90 | Call Win32.Libs.User32.UnregisterHotkey(Me.Handle, id) 91 | Call Win32.Libs.User32.GlobalDeleteAtom(id) 92 | For i As Integer = UBound(KeyIDs) DownTo 0 93 | If KeyIDs(i) = id Then 94 | KeyIDs.Remove(i) 95 | End If 96 | Next 97 | #endif 98 | End Sub 99 | #tag EndMethod 100 | 101 | #tag Method, Flags = &h1 102 | Protected Shared Function VirtualKey(Key As String) As Integer 103 | #If TargetWin32 Then Return Win32.Libs.User32.VkKeyScan(Asc(Key)) 104 | End Function 105 | #tag EndMethod 106 | 107 | 108 | #tag Hook, Flags = &h0 109 | Event HotKeyPressed(Identifier As Integer, KeyString As String) As Boolean 110 | #tag EndHook 111 | 112 | 113 | #tag Note, Name = About This Class 114 | This class allows you to detect specified keyboard shortcuts no matter what application has keyboard input. 115 | 116 | For example: 117 | 118 | Dim hotkey As New HotKeyMonitor() 119 | Dim hotkeyID As Integer = HotKey.RegisterKey("a", MOD_CONTROL, MOD_ALT) 120 | 121 | The above snippet would raise the HotKeyMonitor.HotKeyPressed event whenever the global hotkey combo Ctrl+Alt+a is pressed. 122 | Each instance of the HotKeyMonitor class can handle an arbitrary number of hotkey combinations, each being uniquely 123 | identifiable by their hotkeyID number. A global hotkey combo can be registered to only one application at a time, and 124 | only the most recent application to register the combo will be notified. 125 | 126 | If you no longer want to receive notifications for a particular HotKey, pass its ID number (the return value from RegisterKey) 127 | to the UnregisterKey method. 128 | 129 | See: http://msdn.microsoft.com/en-us/library/windows/desktop/ms646309%28v=vs.85%29.aspx 130 | #tag EndNote 131 | 132 | 133 | #tag Property, Flags = &h1 134 | Protected KeyIDs() As Integer 135 | #tag EndProperty 136 | 137 | #tag ComputedProperty, Flags = &h21 138 | #tag Getter 139 | Get 140 | Static i As Integer 141 | i = i + 1 142 | Return i 143 | End Get 144 | #tag EndGetter 145 | Private Shared NextNum As Integer 146 | #tag EndComputedProperty 147 | 148 | 149 | #tag Constant, Name = MOD_ALT, Type = Double, Dynamic = False, Default = \"&h1", Scope = Public 150 | #tag EndConstant 151 | 152 | #tag Constant, Name = MOD_CONTROL, Type = Double, Dynamic = False, Default = \"&h2", Scope = Public 153 | #tag EndConstant 154 | 155 | #tag Constant, Name = MOD_SHIFT, Type = Double, Dynamic = False, Default = \"&h4", Scope = Public 156 | #tag EndConstant 157 | 158 | #tag Constant, Name = MOD_WIN, Type = Double, Dynamic = False, Default = \"&h8", Scope = Public 159 | #tag EndConstant 160 | 161 | #tag Constant, Name = WM_HOTKEY, Type = Double, Dynamic = False, Default = \"&h0312", Scope = Public 162 | #tag EndConstant 163 | 164 | 165 | #tag ViewBehavior 166 | #tag ViewProperty 167 | Name="Index" 168 | Visible=true 169 | Group="ID" 170 | InitialValue="-2147483648" 171 | Type="Integer" 172 | InheritedFrom="Object" 173 | #tag EndViewProperty 174 | #tag ViewProperty 175 | Name="Left" 176 | Visible=true 177 | Group="Position" 178 | InitialValue="0" 179 | InheritedFrom="Object" 180 | #tag EndViewProperty 181 | #tag ViewProperty 182 | Name="Name" 183 | Visible=true 184 | Group="ID" 185 | InheritedFrom="Object" 186 | #tag EndViewProperty 187 | #tag ViewProperty 188 | Name="Super" 189 | Visible=true 190 | Group="ID" 191 | InheritedFrom="Object" 192 | #tag EndViewProperty 193 | #tag ViewProperty 194 | Name="Top" 195 | Visible=true 196 | Group="Position" 197 | InitialValue="0" 198 | InheritedFrom="Object" 199 | #tag EndViewProperty 200 | #tag EndViewBehavior 201 | End Class 202 | #tag EndClass 203 | -------------------------------------------------------------------------------- /libcURL/ListPtr.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class ListPtr 3 | Inherits libcURL.cURLHandle 4 | #tag Method, Flags = &h0 5 | Function Append(s As String) As Boolean 6 | ' Appends the passed string to the list. If the List is NULL it will be created. 7 | ' See: 8 | ' http://curl.haxx.se/libcurl/c/curl_slist_append.html 9 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.ListPtr.Append 10 | 11 | Dim p As Ptr = curl_slist_append(List, s) 12 | If p <> Nil Then 13 | List = p 14 | Return True 15 | End If 16 | End Function 17 | #tag EndMethod 18 | 19 | #tag Method, Flags = &h0 20 | Sub Constructor(ListPtr As Ptr = Nil, GlobalInitFlags As Integer = libcURL.CURL_GLOBAL_DEFAULT) 21 | ' Creates a linked list that is managed by libcURL. Pass a Ptr to the first item in an existing list, 22 | ' or Nil to create an empty list. 23 | ' 24 | ' See: 25 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.ListPtr.Constructor 26 | 27 | // Calling the overridden superclass constructor. 28 | // Constructor() -- From libcURL.cURLHandle 29 | #pragma Unused GlobalInitFlags 30 | Super.Constructor() 31 | List = ListPtr 32 | End Sub 33 | #tag EndMethod 34 | 35 | #tag Method, Flags = &h0 36 | Function Count() As Integer 37 | ' Returns the number of strings in the list. 38 | ' 39 | ' See: 40 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.ListPtr.Count 41 | 42 | Dim nxt As Ptr = List 43 | Dim i As Integer 44 | Do Until nxt = Nil 45 | i = i + 1 46 | #If Target32Bit Then 47 | nxt = nxt.Ptr(4) 48 | #Else 49 | nxt = nxt.Ptr(8) 50 | #Endif 51 | Loop 52 | Return i 53 | End Function 54 | #tag EndMethod 55 | 56 | #tag Method, Flags = &h21 57 | Private Sub Destructor() 58 | ' Frees the list. 59 | ' See: 60 | ' http://curl.haxx.se/libcurl/c/curl_slist_free_all.html 61 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.ListPtr.Destructor 62 | 63 | If List <> Nil Then curl_slist_free_all(List) 64 | List = Nil 65 | End Sub 66 | #tag EndMethod 67 | 68 | #tag Method, Flags = &h0 69 | Function Item(Index As Integer) As String 70 | ' Reads the string located at Index. The first item is at Index=0 71 | ' If the list does not contain a string at Index then an OutOfBoundsException will be raised. 72 | ' If the list is empty then a NilObjectException will be raised. 73 | ' 74 | ' See: 75 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.ListPtr.Item 76 | 77 | If List = Nil Then 78 | Dim err As New NilObjectException 79 | err.Message = "The list is empty." 80 | Raise err 81 | End If 82 | 83 | Dim nxt As Ptr = List 84 | Dim i As Integer 85 | Do 86 | If i = Index Then 87 | Dim txt As MemoryBlock = nxt.Ptr(0) 88 | If txt = Nil Then Return "" 89 | Return txt.CString(0) 90 | 91 | ElseIf i < Index Then 92 | #If Target32Bit Then 93 | nxt = nxt.Ptr(4) 94 | #Else 95 | nxt = nxt.Ptr(8) 96 | #Endif 97 | If nxt = Nil Then 98 | Dim err As New OutOfBoundsException 99 | err.Message = "The list does not contain an entry at that index." 100 | Raise err 101 | End If 102 | 103 | Else 104 | Dim err As New OutOfBoundsException 105 | err.Message = "List indices must be greater than or equal to zero." 106 | Raise err 107 | End If 108 | i = i + 1 109 | Loop 110 | End Function 111 | #tag EndMethod 112 | 113 | #tag Method, Flags = &h0 114 | Function Operator_Compare(OtherList As libcURL.ListPtr) As Integer 115 | ' Overloads the comparison operator(=), permitting direct comparisons between references to ListPtrs 116 | ' 117 | ' See: 118 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.ListPtr.Operator_Compare 119 | 120 | Dim i As Integer = Super.Operator_Compare(OtherList) 121 | If i = 0 Then i = Sign(mHandle - OtherList.Handle) 122 | Return i 123 | End Function 124 | #tag EndMethod 125 | 126 | #tag Method, Flags = &h0 127 | Function Operator_Convert() As String() 128 | ' Overloads the conversion operator(=), permitting implicit and explicit conversion from a ListPtr into a string array 129 | ' The converted array is a copy of the ListPtr contents 130 | ' 131 | ' See: 132 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.ListPtr.Operator_Convert 133 | 134 | If mLastError = libcURL.Errors.NOT_INITIALIZED Then Raise New cURLException(Me) 135 | 136 | Dim ret() As String 137 | Dim nxt As Ptr = List 138 | Do Until nxt = Nil 139 | Dim txt As MemoryBlock = nxt.Ptr(0) 140 | #If Target32Bit Then 141 | nxt = nxt.Ptr(4) 142 | #Else 143 | nxt = nxt.Ptr(8) 144 | #Endif 145 | If txt = Nil Then Continue 146 | ret.Append(txt.CString(0)) 147 | Loop 148 | 149 | Return ret 150 | End Function 151 | #tag EndMethod 152 | 153 | #tag Method, Flags = &h0 154 | Sub Operator_Convert(From() As String) 155 | ' Overloads the conversion operator(=), permitting implicit and explicit conversion from a string array into a ListPtr 156 | ' 157 | ' See: 158 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.ListPtr.Operator_Convert 159 | 160 | If mLastError = libcURL.Errors.NOT_INITIALIZED Then 161 | Me.Constructor() 162 | Else 163 | Me.Destructor() 164 | End If 165 | For i As Integer = 0 To UBound(From) 166 | If Not Me.Append(From(i)) Then Raise New cURLException(Me) 167 | Next 168 | End Sub 169 | #tag EndMethod 170 | 171 | 172 | #tag ComputedProperty, Flags = &h1 173 | #tag Getter 174 | Get 175 | return Ptr(mHandle) 176 | End Get 177 | #tag EndGetter 178 | #tag Setter 179 | Set 180 | mHandle = Integer(value) 181 | End Set 182 | #tag EndSetter 183 | Protected List As Ptr 184 | #tag EndComputedProperty 185 | 186 | 187 | #tag ViewBehavior 188 | #tag ViewProperty 189 | Name="Index" 190 | Visible=true 191 | Group="ID" 192 | InitialValue="-2147483648" 193 | InheritedFrom="Object" 194 | #tag EndViewProperty 195 | #tag ViewProperty 196 | Name="Left" 197 | Visible=true 198 | Group="Position" 199 | InitialValue="0" 200 | InheritedFrom="Object" 201 | #tag EndViewProperty 202 | #tag ViewProperty 203 | Name="Name" 204 | Visible=true 205 | Group="ID" 206 | InheritedFrom="Object" 207 | #tag EndViewProperty 208 | #tag ViewProperty 209 | Name="Super" 210 | Visible=true 211 | Group="ID" 212 | InheritedFrom="Object" 213 | #tag EndViewProperty 214 | #tag ViewProperty 215 | Name="Top" 216 | Visible=true 217 | Group="Position" 218 | InitialValue="0" 219 | InheritedFrom="Object" 220 | #tag EndViewProperty 221 | #tag EndViewBehavior 222 | End Class 223 | #tag EndClass 224 | -------------------------------------------------------------------------------- /libcURL/ResponseHeader.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class ResponseHeader 3 | #tag Method, Flags = &h1 4 | Protected Sub Constructor(Header As curl_header, RequestIndex As Integer) 5 | ' Creates a new instance of ResponseHeader for the EasyHandle whose response headers are to be queried. 6 | ' 7 | ' See: 8 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.ResponseHeader.Constructor 9 | 10 | mAmount = Header.Amount 11 | mIndex = Header.Index 12 | Dim mb As MemoryBlock = Header.Name 13 | If mb <> Nil Then mName = mb.CString(0) 14 | Dim ori As UInt16 = CType(Header.Origin, UInt16) 15 | mOrigin = CType(ori, HeaderOriginType) 16 | mb = Header.Value 17 | If mb <> Nil Then mValue = mb.CString(0) 18 | mRequestIndex = RequestIndex 19 | End Sub 20 | #tag EndMethod 21 | 22 | #tag Method, Flags = &h1 23 | Protected Sub Constructor(Header As curl_header64, RequestIndex As Integer) 24 | ' Creates a new instance of ResponseHeader for the EasyHandle whose response headers are to be queried. 25 | ' 26 | ' See: 27 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.ResponseHeader.Constructor 28 | 29 | mAmount = Header.Amount 30 | mIndex = Header.Index 31 | Dim mb As MemoryBlock = Header.Name 32 | If mb <> Nil Then mName = mb.CString(0) 33 | Dim ori As UInt16 = CType(Header.Origin, UInt16) 34 | mOrigin = CType(ori, HeaderOriginType) 35 | mb = Header.Value 36 | If mb <> Nil Then mValue = mb.CString(0) 37 | mRequestIndex = RequestIndex 38 | End Sub 39 | #tag EndMethod 40 | 41 | #tag Method, Flags = &h0 42 | Function Operator_Convert() As Pair 43 | ' Converts to a Pair of the name and value properties. 44 | ' 45 | ' See: 46 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.ResponseHeader.Operator_Convert 47 | 48 | Return Name:Value 49 | End Function 50 | #tag EndMethod 51 | 52 | 53 | #tag ComputedProperty, Flags = &h0 54 | #tag Getter 55 | Get 56 | ' Returns the number of headers using this name 57 | ' 58 | ' See: 59 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.ResponseHeader.Amount 60 | 61 | Return mAmount 62 | End Get 63 | #tag EndGetter 64 | Amount As Integer 65 | #tag EndComputedProperty 66 | 67 | #tag ComputedProperty, Flags = &h0 68 | #tag Getter 69 | Get 70 | ' There may be more than one header of the same name for a given transfer. This property is 71 | ' the index of this instance of the named header, 0 or higher. 72 | ' 73 | ' See: 74 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.ResponseHeader.Index 75 | 76 | Return mIndex 77 | End Get 78 | #tag EndGetter 79 | Index As Integer 80 | #tag EndComputedProperty 81 | 82 | #tag Property, Flags = &h21 83 | Private mAmount As Integer 84 | #tag EndProperty 85 | 86 | #tag Property, Flags = &h21 87 | Private mIndex As Integer 88 | #tag EndProperty 89 | 90 | #tag Property, Flags = &h1 91 | Protected mName As String 92 | #tag EndProperty 93 | 94 | #tag Property, Flags = &h21 95 | Private mOrigin As libcURL.HeaderOriginType 96 | #tag EndProperty 97 | 98 | #tag Property, Flags = &h21 99 | Private mRequestIndex As Integer 100 | #tag EndProperty 101 | 102 | #tag Property, Flags = &h1 103 | Protected mValue As String 104 | #tag EndProperty 105 | 106 | #tag ComputedProperty, Flags = &h0 107 | #tag Getter 108 | Get 109 | ' The name of the header. 110 | ' 111 | ' See: 112 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.ResponseHeader.Name 113 | 114 | Return mName 115 | End Get 116 | #tag EndGetter 117 | Name As String 118 | #tag EndComputedProperty 119 | 120 | #tag ComputedProperty, Flags = &h0 121 | #tag Getter 122 | Get 123 | ' The origin of the header. A member of the HeaderOriginType enumeration. 124 | ' HeaderOriginType.Header -> plain server header 125 | ' HeaderOriginType.Trailer -> trailing header 126 | ' HeaderOriginType.Connect -> proxy CONNECT headers 127 | ' HeaderOriginType.Intermediate_1XX -> HTTP 1xx headers 128 | ' HeaderOriginType.Pseudo -> HTTP/2 pseudo headers 129 | ' 130 | ' See: 131 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.ResponseHeader.Origin 132 | 133 | Return mOrigin 134 | End Get 135 | #tag EndGetter 136 | Origin As libcURL.HeaderOriginType 137 | #tag EndComputedProperty 138 | 139 | #tag ComputedProperty, Flags = &h0 140 | #tag Getter 141 | Get 142 | ' A given transfer might involve more than one request (redirects, etc.) This property is 143 | ' the index of the request that this header is a response to, 0 or higher. 144 | ' 145 | ' See: 146 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.ResponseHeader.RequestIndex 147 | 148 | Return mRequestIndex 149 | End Get 150 | #tag EndGetter 151 | RequestIndex As Integer 152 | #tag EndComputedProperty 153 | 154 | #tag ComputedProperty, Flags = &h0 155 | #tag Getter 156 | Get 157 | ' The value of the header. 158 | ' 159 | ' See: 160 | ' https://github.com/charonn0/RB-libcURL/wiki/libcURL.ResponseHeader.Value 161 | 162 | Return mValue 163 | End Get 164 | #tag EndGetter 165 | Value As String 166 | #tag EndComputedProperty 167 | 168 | 169 | #tag ViewBehavior 170 | #tag ViewProperty 171 | Name="Amount" 172 | Visible=false 173 | Group="Behavior" 174 | InitialValue="" 175 | Type="Integer" 176 | EditorType="" 177 | #tag EndViewProperty 178 | #tag ViewProperty 179 | Name="Index" 180 | Visible=true 181 | Group="ID" 182 | InitialValue="-2147483648" 183 | Type="Integer" 184 | EditorType="" 185 | #tag EndViewProperty 186 | #tag ViewProperty 187 | Name="Left" 188 | Visible=true 189 | Group="Position" 190 | InitialValue="0" 191 | Type="Integer" 192 | EditorType="" 193 | #tag EndViewProperty 194 | #tag ViewProperty 195 | Name="Name" 196 | Visible=true 197 | Group="ID" 198 | InitialValue="" 199 | Type="String" 200 | EditorType="" 201 | #tag EndViewProperty 202 | #tag ViewProperty 203 | Name="Super" 204 | Visible=true 205 | Group="ID" 206 | InitialValue="" 207 | Type="String" 208 | EditorType="" 209 | #tag EndViewProperty 210 | #tag ViewProperty 211 | Name="Top" 212 | Visible=true 213 | Group="Position" 214 | InitialValue="0" 215 | Type="Integer" 216 | EditorType="" 217 | #tag EndViewProperty 218 | #tag ViewProperty 219 | Name="Value" 220 | Visible=false 221 | Group="Behavior" 222 | InitialValue="" 223 | Type="String" 224 | EditorType="MultiLineEditor" 225 | #tag EndViewProperty 226 | #tag ViewProperty 227 | Name="RequestIndex" 228 | Visible=false 229 | Group="Behavior" 230 | InitialValue="" 231 | Type="Integer" 232 | EditorType="" 233 | #tag EndViewProperty 234 | #tag EndViewBehavior 235 | End Class 236 | #tag EndClass 237 | -------------------------------------------------------------------------------- /VTHash/Results.rbbas: -------------------------------------------------------------------------------- 1 | #tag Class 2 | Protected Class Results 3 | #tag Method, Flags = &h0 4 | Sub Compact(Assigns b As Boolean) 5 | Original.Compact = b 6 | End Sub 7 | #tag EndMethod 8 | 9 | #tag Method, Flags = &h0 10 | Sub Constructor(Item As JSONItem, File As FolderItem) 11 | If Item <> Nil Then 12 | Me.Original = Item 13 | Else 14 | Raise New NilObjectException 15 | End If 16 | TargetFile = File 17 | End Sub 18 | #tag EndMethod 19 | 20 | #tag Method, Flags = &h0 21 | Function ScannerName(Item As Integer) As String 22 | Return Me.Scans.Name(Item) 23 | 24 | Exception 25 | Return "" 26 | End Function 27 | #tag EndMethod 28 | 29 | #tag Method, Flags = &h0 30 | Function ScannerResult(Item As Integer) As String 31 | Dim scanner, scanResult As String 32 | scanner = Me.Scans.Name(Item) 33 | scanResult = Me.Scans.Child(scanner).Value("result") 34 | Return scanResult 35 | 36 | 37 | Exception 38 | Return "" 39 | End Function 40 | #tag EndMethod 41 | 42 | #tag Method, Flags = &h0 43 | Function ScannerUpdate(Item As Integer) As String 44 | Dim scanner, LastUpdate As String 45 | scanner = Me.Scans.Name(Item) 46 | LastUpdate = Me.Scans.Child(scanner).Value("update") 47 | Return LastUpdate 48 | 49 | 50 | Exception 51 | Return "" 52 | End Function 53 | #tag EndMethod 54 | 55 | #tag Method, Flags = &h0 56 | Function ScannerVersion(Item As Integer) As String 57 | Dim scanner, scannerVersion As String 58 | scanner = Me.Scans.Name(Item) 59 | scannerVersion = Me.Scans.Child(scanner).Value("version") 60 | 61 | Return scannerVersion 62 | 63 | Exception 64 | Return "" 65 | End Function 66 | #tag EndMethod 67 | 68 | #tag Method, Flags = &h0 69 | Function ToString() As String 70 | Return Original.ToString() 71 | End Function 72 | #tag EndMethod 73 | 74 | 75 | #tag Property, Flags = &h0 76 | Algorithm As Integer 77 | #tag EndProperty 78 | 79 | #tag ComputedProperty, Flags = &h0 80 | #tag Getter 81 | Get 82 | If mHashValue.Trim = "" Then mHashValue = Original.Value("sha256") 83 | return mHashValue 84 | End Get 85 | #tag EndGetter 86 | #tag Setter 87 | Set 88 | mHashValue = value 89 | End Set 90 | #tag EndSetter 91 | HashValue As String 92 | #tag EndComputedProperty 93 | 94 | #tag Property, Flags = &h21 95 | Private mHashValue As String 96 | #tag EndProperty 97 | 98 | #tag Property, Flags = &h21 99 | Private Original As JSONItem 100 | #tag EndProperty 101 | 102 | #tag ComputedProperty, Flags = &h0 103 | #tag Getter 104 | Get 105 | return Original.Value("permalink") 106 | End Get 107 | #tag EndGetter 108 | Permalink As String 109 | #tag EndComputedProperty 110 | 111 | #tag ComputedProperty, Flags = &h0 112 | #tag Getter 113 | Get 114 | return Original.Value("resource") 115 | End Get 116 | #tag EndGetter 117 | Resource As String 118 | #tag EndComputedProperty 119 | 120 | #tag ComputedProperty, Flags = &h0 121 | #tag Getter 122 | Get 123 | return Original.Value("response_code") 124 | End Get 125 | #tag EndGetter 126 | ResponseCode As Integer 127 | #tag EndComputedProperty 128 | 129 | #tag ComputedProperty, Flags = &h0 130 | #tag Getter 131 | Get 132 | return Original.Value("verbose_msg") 133 | End Get 134 | #tag EndGetter 135 | ResponseMessage As String 136 | #tag EndComputedProperty 137 | 138 | #tag ComputedProperty, Flags = &h0 139 | #tag Getter 140 | Get 141 | Return Original.Value("total") 142 | End Get 143 | #tag EndGetter 144 | ResultCount As Integer 145 | #tag EndComputedProperty 146 | 147 | #tag ComputedProperty, Flags = &h0 148 | #tag Getter 149 | Get 150 | Dim d As Date 151 | Dim s As String = Original.Value("scan_date").StringValue + " GMT" 152 | s = s.ReplaceAll("-", "") 153 | If Not libcURL.ParseDate(s, d) Then Return Original.Value("scan_date").DateValue 154 | Dim d1 As New Date 155 | d.GMTOffset = d1.GMTOffset 156 | Return d 157 | End Get 158 | #tag EndGetter 159 | ScanDate As Date 160 | #tag EndComputedProperty 161 | 162 | #tag ComputedProperty, Flags = &h0 163 | #tag Getter 164 | Get 165 | return Original.Value("scan_id") 166 | End Get 167 | #tag EndGetter 168 | ScanID As String 169 | #tag EndComputedProperty 170 | 171 | #tag ComputedProperty, Flags = &h0 172 | #tag Getter 173 | Get 174 | Return Original.Child("scans") 175 | End Get 176 | #tag EndGetter 177 | Scans As JSONItem 178 | #tag EndComputedProperty 179 | 180 | #tag Property, Flags = &h0 181 | TargetFile As FolderItem 182 | #tag EndProperty 183 | 184 | #tag ComputedProperty, Flags = &h0 185 | #tag Getter 186 | Get 187 | return Original.Value("positives") 188 | End Get 189 | #tag EndGetter 190 | ThreatCount As Integer 191 | #tag EndComputedProperty 192 | 193 | 194 | #tag ViewBehavior 195 | #tag ViewProperty 196 | Name="Algorithm" 197 | Group="Behavior" 198 | Type="Integer" 199 | #tag EndViewProperty 200 | #tag ViewProperty 201 | Name="HashValue" 202 | Group="Behavior" 203 | Type="String" 204 | EditorType="MultiLineEditor" 205 | #tag EndViewProperty 206 | #tag ViewProperty 207 | Name="Index" 208 | Visible=true 209 | Group="ID" 210 | InitialValue="-2147483648" 211 | InheritedFrom="Object" 212 | #tag EndViewProperty 213 | #tag ViewProperty 214 | Name="Left" 215 | Visible=true 216 | Group="Position" 217 | InitialValue="0" 218 | InheritedFrom="Object" 219 | #tag EndViewProperty 220 | #tag ViewProperty 221 | Name="Name" 222 | Visible=true 223 | Group="ID" 224 | InheritedFrom="Object" 225 | #tag EndViewProperty 226 | #tag ViewProperty 227 | Name="Permalink" 228 | Group="Behavior" 229 | Type="String" 230 | EditorType="MultiLineEditor" 231 | #tag EndViewProperty 232 | #tag ViewProperty 233 | Name="Resource" 234 | Group="Behavior" 235 | Type="String" 236 | EditorType="MultiLineEditor" 237 | #tag EndViewProperty 238 | #tag ViewProperty 239 | Name="ResponseCode" 240 | Group="Behavior" 241 | Type="Integer" 242 | #tag EndViewProperty 243 | #tag ViewProperty 244 | Name="ResponseMessage" 245 | Group="Behavior" 246 | Type="String" 247 | EditorType="MultiLineEditor" 248 | #tag EndViewProperty 249 | #tag ViewProperty 250 | Name="ResultCount" 251 | Group="Behavior" 252 | Type="Integer" 253 | #tag EndViewProperty 254 | #tag ViewProperty 255 | Name="ScanID" 256 | Group="Behavior" 257 | Type="String" 258 | EditorType="MultiLineEditor" 259 | #tag EndViewProperty 260 | #tag ViewProperty 261 | Name="Super" 262 | Visible=true 263 | Group="ID" 264 | InheritedFrom="Object" 265 | #tag EndViewProperty 266 | #tag ViewProperty 267 | Name="ThreatCount" 268 | Group="Behavior" 269 | Type="Integer" 270 | #tag EndViewProperty 271 | #tag ViewProperty 272 | Name="Top" 273 | Visible=true 274 | Group="Position" 275 | InitialValue="0" 276 | InheritedFrom="Object" 277 | #tag EndViewProperty 278 | #tag EndViewBehavior 279 | End Class 280 | #tag EndClass 281 | --------------------------------------------------------------------------------