mirror of
https://github.com/rfc2822/GfxTablet
synced 2025-10-03 17:49:17 +02:00
v-1.11
This commit is contained in:
parent
cc4ad72661
commit
82d25349d7
9 changed files with 835 additions and 460 deletions
|
@ -109,27 +109,11 @@ namespace GfxTabletWinDotnet
|
|||
return stuff;
|
||||
}
|
||||
|
||||
class StateObject
|
||||
{
|
||||
public static int BufferSize = 1024;
|
||||
internal Socket workSocket;
|
||||
internal byte[] buffer = new byte[1024];
|
||||
void StartInjector()
|
||||
{
|
||||
bool ok = Win32Interop.InitializeTouchInjection(10, Win32Interop.enInitTouchInjectionModes.TOUCH_FEEDBACK_DEFAULT);
|
||||
System.Diagnostics.Trace.Assert(ok);
|
||||
|
||||
}
|
||||
|
||||
void NewConnection(IAsyncResult ar)
|
||||
{
|
||||
Socket listenerSocket = (Socket)ar.AsyncState;
|
||||
|
||||
// Create the state object
|
||||
StateObject state = new StateObject();
|
||||
state.workSocket = (Socket)listenerSocket.EndAccept(ar);
|
||||
state.workSocket.BeginReceive(state.buffer, 0, Marshal.SizeOf(typeof(Protocol.event_packet)), 0, new AsyncCallback(ReceiveCallback), state);
|
||||
}
|
||||
|
||||
private void ReceiveCallback(IAsyncResult ar)
|
||||
{
|
||||
//ar.AsyncState;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue