Hello!
27.05.2016, 17:35, "John Benediktsson" <mrj...@gmail.com>:
Since the 1234 is supposed to be a LPDWORD which I think should be a pointer wouldn't something like this work:1234 DWORD <ref>Note: I'm not a windows programmer, I just play one on TV.
Ha! : ))
That parameter is actually optional, according to the MSDN page on CreateThread, so the following code should theoretically work:
USING: kernel windows.kernel32
alien.data alien.syntax windows.types ;
IN: my-thd
LIBRARY: kernel32
FUNCTION: HANDLE CreateThread ( LPSECURITY_ATTRIBUTES lpThreadAttributes,
SIZE_T dwStackSize,
LPVOID lpStartAddress,
LPVOID lpParameter,
DWORD dwCreationFlags,
LPDWORD lpThreadId )
CALLBACK: DWORD ThreadProc ( LPVOID lpParameter )
: <ThreadProc> ( -- alien )
[ [ t ] [ ] while ] ThreadProc ;
: start-thd ( -- hnd )
f 0 <ThreadProc> f 0 f CreateThread ;
It all compiles, but unfortunately, calling start-thd from the Listener immediately terminates the Factor.com process. No message boxes, no console output, nothing.
Any ideas?
Александр
------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk