Skip to content
johnmoore edited this page Sep 14, 2010 · 6 revisions

Welcome to the VB6-ucCon wiki!

You can find out more at http://programiscellaneous.com/programming-projects/uccon/what-is-it/. Please see the README for more information, and be sure to read the license. Below is the documentation, copied for your convenience from http://programiscellaneous.com/programming-projects/uccon/documentation/.

Control Overview
Events

  • Event ConnectionError(lngNumber%, strDescription$): Raised when there was an error connecting
    o lngNumber: The Winsock error code
    o strDescription: A description of the error
  • Event ConnectionConnected(): Raised when the socket made a successful connection
  • Event ConnectionClosed(): Raised when the socket closes
  • Event SendingPOST(strData$): Raised when the POST request is being sent
    o strData: The POST data being sent
  • Event SendingGET(strData$): Raised when the GET request is being sent
    o strData: The GET data being sent
  • Event DataArrival(strData$): Raised when data packets (but not necessarily a full response) have arrived
    o strData: The [partial] data that arrived
  • Event DataComplete(strData$, strFileName$): Raised when a complete response has finished
    o strData: The data of the entire response
    o strFileName: The name of the file that was requested
  • Event MovedDataComplete(strData$): Not implemented
  • Event CookieSet(strName$, strData$): Raised when a cookie has been set (when a Set-cookie header field arrives)
    o strName: The name of the cookie (e.g. “var1″)
    o strData: The value of the cookie (e.g. “value1″)
  • Event StatusUpdate(strPercentage%): Raised when a request has made progress
    o strPercentage: The percentage of the response that has been received

Accessor Methods

  • Function GetIPAddress() As String: Returns the RemoteHostIP field of the local Winsock object
  • Function GetHost() As String: Returns the RemoteHost field of the local Winsock object
  • Function GetState() As String: Returns the State field of the local Winsock object
  • Function GetLastURL() As String: Returns the last requested URL

Functions and Subs

  • Function SendGet(sURL$, sHost$, sCookies$, Optional sReferrer$, Optional sProxy$, Optional sProxyPort$): Sends a GET request
    o sURL: The path of the file to request from the host (e.g. “/index.php”)
    o sHost: The host from which to request (e.g. “www.programiscellaneous.com”)
    o sCookies: The cookies to send with the response, in the format: “var1=value; &\var2=value2″
    o Optional sReferrer: The referring page
    o Optional sProxy: The proxy IP address/host
    o Optional sProxyPort: The port on which to connect to the proxy
  • Function SendPost(sURL$, sHost$, sCookies$, sData$, Optional sReferrer$, Optional sProxy$, Optional sProxyPort$): Sends a POST request
    o sURL: The path of the file to request from the host (e.g. “/index.php”)
    o sHost: The host from which to request (e.g. “www.programiscellaneous.com”)
    o sCookies: The cookies to send with the response, in the format: “var1=value1; var2=value2″
    o sData: The POST data to send with the request, in the format: “var1=value1&var2=value2″
    o Optional sReferrer: The referring page
    o Optional sProxy: The proxy IP address/host
    o Optional sProxyPort: The port on which to connect to the proxy
  • Sub CloseConnection(): Closes the local socket

ucCon requires the Microsoft Winsock Control, which is part of the Microsoft Visual Basic Service Pack 6. Be sure to add MSWINSCK.OCX as a reference to your project in addition to the ucCon.ctl user control.

Clone this wiki locally