Skip to content

Commit

Permalink
better message if no .NET version found
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Sep 18, 2013
1 parent da7d141 commit 15492c1
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 15 deletions.
14 changes: 8 additions & 6 deletions CSharpFilters.cls
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@ Public Function DetectDotNet() As Boolean

If Not FolderExists(installroot) Then GoTo hell

'apparently 4.5 that comes with Win8, cant run apps compiled for .NET 2.0 so users have to install 3.5 to get it wtf...

folders = GetSubFolders(installroot)

For Each f In folders
If VBA.Left(f, 2) = "v2" Then
If VBA.left(f, 2) = "v2" Then
DetectDotNet = True
Exit Function
End If
Expand Down Expand Up @@ -106,7 +108,7 @@ Function SetPredictorParams(predictor As Integer, Optional columns = 1, Optional
hell:
End Function

Function decode(Data As String, decoder As Decoders, Optional surpressErrorMsg As Boolean = True, Optional dbugMode As Boolean = False) As Boolean
Function decode(data As String, decoder As Decoders, Optional surpressErrorMsg As Boolean = True, Optional dbugMode As Boolean = False) As Boolean

On Error GoTo hell

Expand All @@ -119,12 +121,12 @@ Function decode(Data As String, decoder As Decoders, Optional surpressErrorMsg A
Dim addr As Long
Dim bufsize As Long

If Len(Data) = 0 Then
If Len(data) = 0 Then
Me.ErrorMessage = "Data length was 0, nothing to do"
Exit Function 'nothing to do
End If

b() = StrConv(Data, vbFromUnicode, LANG_US)
b() = StrConv(data, vbFromUnicode, LANG_US)
addr = VarPtr(b(0))
bufsize = UBound(b)

Expand Down Expand Up @@ -231,11 +233,11 @@ Private Function GetSubFolders(folder) As String()
Exit Function
End If

If Right(folder, 1) <> "\" Then folder = folder & "\"
If right(folder, 1) <> "\" Then folder = folder & "\"

fd = Dir(folder, vbDirectory)
While fd <> ""
If Left(fd, 1) <> "." Then
If left(fd, 1) <> "." Then
If (GetAttr(folder & fd) And vbDirectory) = vbDirectory Then
push fnames(), fd
End If
Expand Down
10 changes: 9 additions & 1 deletion Form1.frm
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ Begin VB.Form Form1
_ExtentX = 15478
_ExtentY = 6059
_Version = 393217
Enabled = -1 'True
ScrollBars = 2
TextRTF = $"Form1.frx":1142
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Expand Down Expand Up @@ -410,6 +409,7 @@ Begin VB.Form Form1
_ExtentX = 17383
_ExtentY = 7223
_Version = 393217
Enabled = -1 'True
HideSelection = 0 'False
ScrollBars = 2
TextRTF = $"Form1.frx":11C4
Expand Down Expand Up @@ -2731,6 +2731,8 @@ end_of_func:
Set oBrowser = GetObject("", "obj_Browser.plugin") 'not much of a plugin is it! more of a lib at this point :P
oBrowser.initasLib Me

If Not csharp.Initilized Then lvDebug.ListItems.Add , , "C# Filters not initilized. See Tools->Manual Filters and click on iText Filters = false link"

TabStrip1.Tabs(3).Caption = "Debug" & IIf(lvDebug.ListItems.Count > 0, " (" & lvDebug.ListItems.Count & ")", "")

If Len(ExtractToFolder) > 0 Then ExtractTo ExtractToFolder
Expand Down Expand Up @@ -3371,6 +3373,12 @@ Private Sub Form_Load()
' TabStrip1.Tabs(3).Selected = True
'End If

If Not csharp.Initilized Then
lvDebug.ListItems.Add , , "C# Filters not initilized. See Tools->Manual Filters and click on iText Enabled = false link"
TabStrip1.Tabs(3).selected = True
End If


If Len(command) > 0 Then 'handle files draged and droped on icon or on command line...
If InStr(1, command, ".js", vbTextCompare) > 0 Then 'js files load in jseditor
f = Replace(command, """", Empty)
Expand Down
Binary file modified PDFStreamDumper.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion Project1.vbp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ HelpContextID="0"
CompatibleMode="0"
MajorVer=0
MinorVer=9
RevisionVer=485
RevisionVer=491
AutoIncrementVer=1
ServerSupportFiles=0
VersionCompanyName="sandsprite"
Expand Down
10 changes: 5 additions & 5 deletions Project1.vbw
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Form1 = 13, 35, 1305, 767, , 74, 17, 1171, 749, C
Module4 = 23, 23, 856, 435,
fso = 55, 78, 1272, 666,
fso = 55, 78, 1272, 666, C
clsCmnDlg = 39, 144, 954, 566, C
CPDFStream = 43, 33, 956, 508, C
CPDFStream = 43, 33, 1009, 599,
CPdfParser = 89, 89, 1002, 509, C
Form2 = 389, 127, 1346, 831, , 140, 21, 1202, 753, C
Form2 = 185, 50, 1142, 754, , 140, 21, 1202, 753, C
CScriptFunctions = 45, 61, 958, 481,
frmReplace = -9, 46, 1270, 778, , 0, 0, 858, 451, C
modCrc = 23, 23, 936, 443,
Expand All @@ -14,12 +14,12 @@ frmRefactor = 204, 135, 1313, 899, C, 114, 13, 1202, 695, C
CInstruction = 154, 154, 1069, 576, C
CDisassembler = 132, 132, 1047, 554, C
modEscapes = 111, 111, 1294, 753,
CSharpFilters = 89, 89, 1002, 509,
CSharpFilters = 89, 89, 1002, 509, Z
CApplyFilters = 67, 67, 980, 487,
frmManualFilters = 44, 44, 959, 466, , 32, 0, 850, 570, C
frmScTest = 23, 23, 1190, 755, , 84, 20, 895, 585, C
ucScint = 44, 44, 713, 466, , 176, 176, 913, 598, C
b64 = 111, 111, 900, 523, C
b64 = 111, 111, 900, 523,
frmAbout = 112, 40, 895, 565, , 65, 46, 916, 571, C
frmBruteZLib = 36, 30, 922, 565, , 0, 0, 998, 544, C
ucAsyncDownload = 177, 177, 962, 590, , 22, 22, 809, 437, C
Expand Down
4 changes: 2 additions & 2 deletions frmManualFilters.frm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form frmManualFilters
Caption = "Form3"
Caption = "Manual Filters"
ClientHeight = 7290
ClientLeft = 60
ClientTop = 345
Expand Down Expand Up @@ -717,7 +717,7 @@ End Sub
Private Sub lbliText_Click()

MsgBox "For iText filters to be enabled you have to have: " & vbCrLf & vbCrLf & _
"1) .NET runtime v2.0 or greater installed" & vbCrLf & _
"1) .NET runtime v2.0 or v3.5 installed" & vbCrLf & _
"2) iTextFilters dll has be correctly registered (should be done by installer" & vbCrLf & _
"3) pdfStreamDumper has to be able to find the dll" & vbCrLf & vbCrLf & _
"Initilization error message (if any) is: " & vbCrLf & vbCrLf & csharp.ErrorMessage, vbInformation
Expand Down
18 changes: 18 additions & 0 deletions frmReplace.frm
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,31 @@ Begin VB.Form frmReplace
Width = 1335
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "Courier"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 960
TabIndex = 3
Top = 480
Width = 4335
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "Courier"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 960
TabIndex = 1
Expand Down
Binary file modified highlighters/CPP.Bin
Binary file not shown.
Binary file modified highlighters/Java.bin
Binary file not shown.
Binary file modified libemu/scdbg.exe
Binary file not shown.

0 comments on commit 15492c1

Please sign in to comment.