Letting processes communicate on Windows can be done on several ways. By sending Windows messages, opening network connections via sockets or via Named Pipes. Here a minimalistic example of a Named Pipe Client and also its counter part, the server. With this example code only one client can connect to the server. If you want [...]

read full post »

C# – Sending ARP request

Unfortunately there is no standard method in .Net you can call to resolve an systems MAC address. To do that you have to load the Windows IP helper API to make use of the SendARP function. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 [...]

read full post »

C# – Creating a thread pool

In place of manually creating an array of threads that do similar work you can also use the C# Threadpool methods to handle threads. You typically make use of them in server applications or generally in worker threads that do routine work in the background. 1 2 3 4 5 6 7 8 9 10 [...]

read full post »

Parsing command line arguments with C# is not that easy as with Linux as it doesn’t come with a getopt parsing library. To do that with Windows you need third party libs/classes like NConsoler. I googled for it, grabbed the latest copy, added it to the C# project and it was working out of the [...]

read full post »

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 [...]

read full post »

older posts »