Here is my latest code. I understand that you are not supporting .Net but still maybe you can give me a hint:

using System.Collections;
using System.Threading;
using System;
using System.Runtime.InteropServices;
using Lightstreamer.Interfaces.Data;
using System.Windows.Forms;

public class SocketToLightStreamer : IDataProvider
{
private IItemEventListener _listener;
public void Init(IDictionary parameters, string configFile)
{
}

public bool IsSnapshotAvailable(string itemName)
{
return false;
}

public void SetListener(IItemEventListener eventListener)
{
_listener = eventListener;
}
public void Subscribe(string itemName)
{
if (itemName.Equals("floorupdate"))
{
}
}

public void Unsubscribe(string itemName)
{
if (itemName.Equals("floorupdate"))
{
}
}
public void PushData(string data)
{
IDictionary eventData = new Hashtable();
eventData["scan"] = data;
_listener.Update("floorupdate", eventData, false);
}
public class GetMessage : Form
{
const int WM_COPYDATA = 0x004a;

public GetMessage()
{
Text = "my_unique_id";
}

protected override void WndProc(ref System.Windows.Forms.Message m)
{
switch (m.Msg)
{
case WM_COPYDATA:
COPYDATASTRUCT mystr = new COPYDATASTRUCT();
Type mytype = mystr.GetType();
mystr = (COPYDATASTRUCT)m.GetLParam(mytype);
IDictionary eventData = new Hashtable();
eventData["scan"] = mystr.Data;
SocketToLightStreamer a = new SocketToLightStreamer();
a._listener.Update("floorupdate", eventData, false);
break;
}
base.WndProc(ref m);
}
}
[StructLayout(LayoutKind.Sequential)]
public struct COPYDATASTRUCT
{
public Int32 ID;
public int Length;
public string Data;
}
}
While this code is compiling fine when I run it I get:
"null reference" at a._listener.Update("floorupdate", eventData, false);
Wold you suggest to how to have a form inside of SocketToLightStreamer class in a way that I could access _listener object from it?

Thanks for the hep.