Categories
Computers Windows

SimpleSocket

SimpleSocket is a COM DLL server that wraps basic UDP send/receive functionality. It is quite simple to use from all major Windows programming environments (C++, C#, VB, VBScript etc).

This application is provided as-is and is free for any use provided that it is not resold or included in any commercial offering.

The DLL must be registered prior to use. Although this can be done in many ways, one simple way is:

  1. Extract the File SimpleSocket.dll to a suitable folder
  2. Press the start button and select “Run…”
  3. Type cmd and press OK
  4. Type regsvr32 followed by the full path to the DLL

Although the exact usage varies depending on programming environment, the following sample should be able to serve as a guide. It includes a sending and a receiving application. Put each of these code segments in a file with the suffix .vbs, then run them both.

Receiver

Set socket=WScript.CreateObject("SimpleSocket.Udp", "event_")
Sub event_OnReceive(data)
    WScript.Echo "Received: " & data
End Sub

socket.Listen "127.0.0.1", 10000
While(True)
    WScript.Sleep(5000)
Wend
socket.Abort

Sender

Set socket=WScript.CreateObject("SimpleSocket.Udp")
socket.Send "127.0.0.1", 10000, "Data sent from the client"

Methods

The following methods are supported

  • Listen {ip}, {port} – Starts listening for incoming data on the ip and port.
  • Abort – Stops listening for data.
  • Send {ip}, {port}, {data} – Sends the data to the peer using the ip and port. The data must be provided in text format.
  • OnReceive – Callback method for asynchronous notification of incoming data.

Uninstallation

  1. Press the start button and select “Run…”
  2. Type cmd and press OK
  3. Type regsvr32 -u followed by the full path to the DLL

Attachments

Categories
Computers Windows

Descript

Descript provides for an easy way to stop specific VBScripts. VBScripts running under either WScript.exe or CScript.exe, the two script hosts in Windows, turn up with just the name of the script host in the task manager and it can be difficult to know which process to kill.

descript_taskmgr.gif

By using this application the scripts are distinguished by the name of the actual script file.

descript_gui.gif

This application works on Windows XP and later only. This application is provided as-is and is free for any use provided that it is not resold or included in any commercial offering.

To install this application:

  1. Extract the application to your disk
  2. Run descript.exe

Usage
Right-click on the icon in the notification area (system tray) and select Stop. A list of scripts, if any, is shown. By selecting a script it is terminated. As an alternative, all scripts can be stopped in one operation. The icons to the left of the script names indicates if the script is running under WScript.exe or CScript.exe.

Attachments

css.php