Results 1 to 15 of 15
  1. #1
    deadskulz's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    hell.
    Posts
    8,954
    Reputation
    702
    Thanks
    4,294,967,295
    My Mood
    Devilish

    [HELP] Need help with code. REWARD

    So i need help with a code, but before i start, the reward is to be in the credits of my program which has currently 4,353 lines of code (not lying). Plus ill give you the program that I have created right now (not everything works, but still useful). And its gonna be released within the next couple of weeks. So heres the code i need help with:
    Code:
    Dim source As String
    Dim fileURL As String = ".rez"
    Dim dir As String = TextBox1.Text
    If CheckedListBox1.CheckedItems.Contains("ATTACH_M") Then
                Dim filename As String = "ATTACH_M"
                source = "https://deadskulz.x.gg/rezdownloader/" + filename + fileURL
                Try
                    'My.Computer.Network.DownloadFile((source), (dir) + "\" + filename + fileURL)
                    httpclient.DownloadFileAsync(New Uri(source), (dir) + "\" + filename + fileURL)
                Catch ex As Exception
                    MsgBox("failed")
                End Try
    
                stage = stage + 1
                stagelabel.Text = stage + "/" + CheckedListBox1.CheckedItems.Count.ToString
            End If
    So what happends is a error shows up with this as the message:
    Code:
    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.
    
    ************** Exception Text **************
    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.ToDouble(String Value, NumberFormatInfo NumberFormat)
    
    
    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
    ----------------------------------------
    Deadskulz UserApp
        Assembly Version: 1.0.0.6
        Win32 Version: 1.0.0.6
        CodeBase: file:///C:/Users/Max/Documents/Visual%20Studio%202008/Projects/AutoUpdater2/AutoUpdater2/bin/Release/Deadskulz%20UserApp.exe
    ----------------------------------------
    Microsoft.VisualBasic
        Assembly Version: 8.0.0.0
        Win32 Version: 8.0.50727.4927 (NetFXspW7.050727-4900)
        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.4927 (NetFXspW7.050727-4900)
        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.4927 (NetFXspW7.050727-4900)
        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.4927 (NetFXspW7.050727-4900)
        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.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
    ----------------------------------------
    System.Configuration
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        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.
    BUT the file actually does download, so, does anyone know whats wrong?
    So if you want even more info on the error, please email me at: bushouse92@gmail.com and we can do a TV session on it.

  2. #2
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Code:
     Dim filename As String = "ATTACH_M"
                source = "https://deadskulz.x.gg/rezdownloader/" + filename + fileURL
                Try
                    'My.Computer.Network.DownloadFile((source), (dir) + "\" + filename + fileURL)
                    httpclient.DownloadFileAsync(New Uri(source), (dir) + "\" + filename + fileURL)
                
                stage = stage + 1
                stagelabel.Text = stage + "/" + CheckedListBox1.CheckedItems.Count.ToString
          Catch ex As Exception
                    MsgBox(ex)
                End Try
    Write down the error, if the program does download and does not close using the try-catch block I've posted you may just remove the messagebox.



  3. #3
    deadskulz's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    hell.
    Posts
    8,954
    Reputation
    702
    Thanks
    4,294,967,295
    My Mood
    Devilish
    when I tried out your way, the forum of the rez downloader didnt even work, theres an error that said 'could nout create system forum.'

    heres the error after i fixed the forum to show up, this occurs in visual basic, when I press download, but It does download, after about 20 sec of the error appearing. with the httpclient method.



    and heres the error when I launch it without visual basic:

    Last edited by deadskulz; 05-23-2010 at 06:32 AM. Reason: added a picture

  4. #4
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Quote Originally Posted by deadskulz View Post
    when I tried out your way, the forum of the rez downloader didnt even work, theres an error that said 'could nout create system forum.'

    heres the error after i fixed the forum to show up, this occurs in visual basic, when I press download, but It does download, after about 20 sec of the error appearing. with the httpclient method.



    and heres the error when I launch it without visual basic:

    This info is not helpful. At least the stack trace is needed. You need to post the code of the form. Right now I can suggest that you add a Try..Catch...wrapper around inside every procedure in the form that's showing the exception.

    For example if the name of the form is "FrmDownloader", then its load event should look something like this:

    Private Sub FrmDownloader_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    Try

    'Your code here...

    Catch ex As Exception

    End Try


    End Sub

    Do the same with every procedure and hopefully the problem would be solved. If not, then show us some code.

  5. #5
    deadskulz's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    hell.
    Posts
    8,954
    Reputation
    702
    Thanks
    4,294,967,295
    My Mood
    Devilish
    ok.. yeah, i 4got bout that, well i fixed one way, the
    Code:
    My.Computer.Network.DownloadFile(source, dirURL)
    way.

    But I want to do the httpclient way, so heres part of the coding in the rezdownloader that deals with the error.
    Code:
    Dim source As String
        Dim totalsize As String
        Dim fileURL As String = ".rez"
        Dim dirURL As String
        Dim filename As String
        Dim dir As String = TextBox1.Text
        Dim stage As String = 0
        Dim baseurl As String = "https://deadskulz.x.gg/rezdownloader/"
        Private WithEvents httpclient As WebClient
    
        Private Sub download_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles download.Click
            httpclient = New WebClient
            source = "https://deadskulz.x.gg/rezdownloader/" + filename + fileURL
            stagelabel.Text = stage + "/" + CheckedListBox1.CheckedItems.Count.ToString
            'httpclient.DownloadFileAsync(New Uri(source), (dirURL))
            If CheckedListBox1.CheckedItems.Contains("ATTACH_M") Then
                filename = CheckedListBox1.CheckedItems.ToString
                source = baseurl + +filename + fileURL
                dirURL = (dir) + "\" + filename + fileURL
                Try
                    NotifyIcon1.Visible = True
                    My.Computer.Network.DownloadFile(source, dirURL)
                    stage = stage + 1
                    stagelabel.Text = stage + "/" + CheckedListBox1.CheckedItems.Count.ToString
                Catch ex As Exception
                    MsgBox("Failed.")
                End Try
            End If
        End Sub

  6. #6
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Code:
    Try  
    httpclient = New WebClient
            source = "https://deadskulz.x.gg/rezdownloader/" + filename + fileURL
            stagelabel.Text = stage + "/" + CheckedListBox1.CheckedItems.Count.ToString
            'httpclient.DownloadFileAsync(New Uri(source), (dirURL))
            If CheckedListBox1.CheckedItems.Contains("ATTACH_M") Then
                filename = CheckedListBox1.CheckedItems.ToString
                source = baseurl + +filename + fileURL
                dirURL = (dir) + "\" + filename + fileURL
                
                    NotifyIcon1.Visible = True
                    My.Computer.Network.DownloadFile(source, dirURL)
                    stage = stage + 1
                    stagelabel.Text = stage + "/" + CheckedListBox1.CheckedItems.Count.ToString
                Catch ex As Exception
                    MsgBox("Failed.")
                End Try
            End If
    That neither works?



  7. #7
    deadskulz's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    hell.
    Posts
    8,954
    Reputation
    702
    Thanks
    4,294,967,295
    My Mood
    Devilish
    It cant, theres no "try".

  8. #8
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    There is, duh. Just in the first line.



  9. #9
    deadskulz's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    hell.
    Posts
    8,954
    Reputation
    702
    Thanks
    4,294,967,295
    My Mood
    Devilish
    God, ok, well i dont need help with the 'my.network.downloadfile(source, dir)' method, i need help with the httpclient method, bc i already got the first one working from bombsway.

  10. #10
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Well the code above should actually prevent your program from dying.



  11. #11
    deadskulz's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    hell.
    Posts
    8,954
    Reputation
    702
    Thanks
    4,294,967,295
    My Mood
    Devilish
    yeah, but im just saying that i figured out how to do the 'my.network' way of downloading things, but since thats slow, i would like to figure out whats wrong with the httpclient was, because the error that keeps on coming up says 'input string not in correct format'.

  12. #12
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by deadskulz View Post
    yeah, but im just saying that i figured out how to do the 'my.network' way of downloading things, but since thats slow, i would like to figure out whats wrong with the httpclient was, because the error that keeps on coming up says 'input string not in correct format'.
    Did you just want my downloader source from my .rez downloader? I won't send you my full source, but I don't mind sharing the source to download a file.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  13. #13
    deadskulz's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    hell.
    Posts
    8,954
    Reputation
    702
    Thanks
    4,294,967,295
    My Mood
    Devilish
    sure, does it use http or 'my.network'?

  14. #14
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by deadskulz View Post
    sure, does it use http or 'my.network'?
    http. I'll copy and paste it to you via PM in a sec.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  15. #15
    deadskulz's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    hell.
    Posts
    8,954
    Reputation
    702
    Thanks
    4,294,967,295
    My Mood
    Devilish
    kk, thank you sooo much

Similar Threads

  1. need help with code
    By rangg in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 8
    Last Post: 10-24-2010, 02:24 PM
  2. need help with coding vip console
    By GER-Domi. in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 13
    Last Post: 09-10-2010, 03:28 AM
  3. I need help with codes
    By MATTHEW4422 in forum Combat Arms Help
    Replies: 0
    Last Post: 10-31-2009, 04:41 PM
  4. need a little help with coding
    By jmonking in forum C++/C Programming
    Replies: 13
    Last Post: 09-14-2009, 08:55 AM
  5. need a little help with coding
    By jmonking in forum C++/C Programming
    Replies: 9
    Last Post: 09-11-2009, 10:57 PM