UDP and Socket component for Service

I need to convert some existing code that uses a socket component.

The new code will run as a service, but the existing component uses
WSAASyncSelect (and other API calls) that require a window handle.

Since the server process needs to operate when logged off, I need to be able
to run the code without a window handle.

I assume I'll need to get/write a socket component that uses syncronous
calls (perhaps in seperate threads) rather than having windows (NT) send
back notifications via messages.

Any hints, or existing code to do this would be appreciated.

Steve