login about faq


I've tried this example : http://www.example-code.com/vb/http_upload_with_params.asp

I get error -1 and the msgbox saying Unlocked trial ....

success = http.UnlockComponent("Anything for 30-day trial") If (success <> 1) Then MsgBox http.LastErrorText Exit Sub End If

But still does not work.

Then on the next check i get again the error on this part here :

success = req.AddFileForUpload("file2","dude.gif") If (success <> 1) Then MsgBox req.LastErrorText Exit Sub End If

I would really want to try this and if it works i would definitely buy it.



asked May 16 '14 at 03:34

bruno's gravatar image


Sounds like you trial expired? Can you post the exact contents of the LastErrorText at the first failing method?


answered May 17 '14 at 21:02

jpbro's gravatar image

jpbro ♦


Here it is :

alt text



answered May 18 '14 at 03:37

bruno's gravatar image


It looks like you are using the VB6 examples in VB.net. I had a quick look at the .Net examples, and they use a boolean datatype for success checks (instead of Long).

Instead you should try:

Dim success As boolean

success = http.UnlockComponent("Anything for Trial")

if (success <> true) then
    ' Show error
end if



answered May 18 '14 at 13:47

jpbro's gravatar image

jpbro ♦

Ok, then i get this ... on the next step down

alt text

Then when i click once more i get this

alt text


answered May 18 '14 at 13:53

bruno's gravatar image


But it does not start any kind of upload...

     Dim success As Boolean
        Dim http As New Chilkat.Http

'  Any string unlocks the component for the 1st 30-days.
        success = http.UnlockComponent("Hello World")

If (success <> 1) Then
            Exit Sub
        End If

'  Build a HTTP request with the files to be uploaded:
        Dim req As New Chilkat.HttpRequest

'  The URL we'll be posting to is:

'  Therefore, the path part of the URL is:
        req.Path = "/cgi-bin/up_flash.cgi"

'  Note: You may test uploads to this URL, but anything over 80K will be aborted on the receiving side.

'  Add some files to the request:
        '  The 1st argument is an arbitrary name.  It's the POST form field name.
        '  The 2nd argument is the filename currently existing on
        '  the local filesystem.  It may include an absolute or relative
        '  path, or no path at all if it's in the current working directory.
        success = req.AddFileForUpload("Filedata", "C:\test.txt")
        If (success <> 1) Then
            Exit Sub
        End If

'  Additional non-file params may be added to the POST request
        '  by calling AddParam:
        req.AddParam("sess_id", "0z2oo0y9libd9i9t")
        req.AddParam("Filename", "test.jpg")
        req.AddParam("folder", "\")
        req.AddParam("Upload", "Submit Query")

'  Send the HTTP POST and get the response.  Note: This is a blocking call.
        '  The method does not return until the full HTTP response is received.
        Dim domain As String
        Dim port As Long
        Dim ssl As Long
        domain = "http://skizzle12.terafile.co"
        port = 80
        ssl = 0
        Dim resp As Chilkat.HttpResponse
        resp = http.SynchronousRequest(domain, port, ssl, req)
        If (resp Is Nothing) Then
            TextBox1.Text = TextBox1.Text & http.LastErrorText & vbCrLf
            '  Display the HTML source of the page returned.
            TextBox1.Text = TextBox1.Text & resp.BodyStr & vbCrLf
        End If

answered May 18 '14 at 13:53

bruno's gravatar image


edited May 18 '14 at 14:02

Post your code in <pre> </pre> tags, not a screenshot, and I will take a closer look.

(May 18 '14 at 14:00) jpbro ♦

added code

(May 18 '14 at 14:02) bruno

You're still testing <> 1 - you need to test for <> true - the boolean datatype can only hold true (-1) or false (0).

(May 18 '14 at 14:07) jpbro ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: May 16 '14 at 03:34

Seen: 3,241 times

Last updated: May 18 '14 at 14:07

powered by OSQA