Otto,
Well I expect there is a windows API for this, but I don't know it.
Here is another idea though. Create an invisible GET. Send a ENTER key or TAB key to it, then read the data in the GET. The ENTER or TAB key may send the keyboard buffer into the GET.
James