Posts

Showing posts from January, 2015

Windows programming using MinGW

Image
A short example of how to started with Windows programming in non-Visual Studio environments. In this example, we use the MinGW (Minimalist GNU for Windows) compiler within the Code::Blocks integrated development environment. MinGW can be obtained via the following link: http://www.mingw.org/ First select File > New > Project... and opt to create a new empty project:

Creating and avoiding deadlock conditions in C++

Image
A short and to-the-point post illustrating how a deadlock situation can be created in C++, together with a possible strategy for avoiding such a condition. I'm am using the boost libraries to implement threads and mutexes, but it should be possible to the standard library implementations std::thread , std::mutex etc as well.

Using sc.exe to communicate with Windows Services in Visual C++

Image
SC.exe is commonly used to retrieve and set control information about installed Windows services. Common tasks are to configure, start and stop a service, as well as retrieve the status of a specific service. These tasks can be achieved by executing sc.exe inside a command prompt as a batch (.bat) files that can call combinations of sc.exe commands to automate startup or shutdown of services.