Monthly Archives: December 2018

Programmez – My Articles from Oct 2017 to Jan 2019

Here are my articles for french Magazine Programmez:

  • N°225: Rookit key Logger – PDF
  • N°224: Space Invaders 1978 en C/C++ avec SFML – PDF
  • N°223: Windows Le Multithreading en C/C++ – PDF
  • N°222: Linux Le Multithreading en C++ – PDF
  • N°221: Au coeur d’un Service Windows NoSQL – PDF
  • N°220: Créer un service Windows – PDF
  • N°218: Migrer son code C/C++ en 64 bits – PDF
  • N°217: Les Tests en C++ – PDF
  • N°216: La Programmation Orientée Objet en C++ – PDF
  • N°215: Utiliser shared_ptr<T> en C++ pour la gestion des ressources – PDF
  • N°214: Développez un IDE en C++ Partie II – PDF
  • N°213: Développez un IDE en C++ Partie I – PDF
  • N°212: Un serveur REST Web API en C++ – PDF
  • N°211: Pourquoi C++ en 2017 ? – PDF

Surface Go feedback

After two weeks of using the Surface Go, I am very satisfied. I have installed Office suite 2019 for documents and messaging stuff.

The Microsoft multimedia keyboard is easy to use… The Pentium processor is enough to run Office, VS Code and Visual C++. I compile my teaching projects very fast and it works well. The memory of 4GB is just a problem if you open 20 Chrome windows but if you close and open at regular basis, it works perfectly well. This is definitively a good buy.

C++ developers need few resources…

I have installed Visual Studio 15.9.4 on my Surface Go with only Visual C++ features.

As a C++ developer, I only rely on small features:

  • an IDE for managing files, projects and the editor
  • an ISO C++ compiler

Surface Go comes with a Pentium processor and fast hard drive so it’s cool for C++ stuff.

Surface Go for developers !

My gift for Christmas is a Surface Go with a Microsoft Media Keyboard and two 128GB SanDisk MicroSD cards.

I have installed all the necessary tools:

  • 7zip
  • Acrobat Reader
  • VLC
  • Winamp
  • Notepad++
  • Chrome
  • TechSmith Camtasia 2018
  • SysInternals Suite

I have installed the following Microsoft products:

  • Office 2019
  • Visual Studio 2017 15.9.2 with Visual C++ only tools -> 10 GB

After that, remaining space is 10GB.

On SD cards, I put data, ebooks and multimedia files (mp3 and movies).

Search for files & folders

My boss wanted a tool for searching files and folders from a dedicated path… He used to write it using Powershell but took hours to run… Here is why system programming is important. No runtime, no framwork, no virtual machine, it runs direct on the metal. Fast !

#include <string>
#include <iostream>
#include <atlstr.h> 
#include <tchar.h>
#include <Windows.h>
#include <Shlwapi.h>

#pragma comment(lib, "Shlwapi.lib")

CString SearchDrive(const CString& strFile, const CString& strFilePath, const bool& bRecursive, const bool& bStopWhenFound) 
       CString strFoundFilePath;
       WIN32_FIND_DATA file;

       CString strPathToSearch = strFilePath;
       strPathToSearch += _T("\\");

       HANDLE hFile = FindFirstFile((strPathToSearch + "*"), &file);
       if (hFile != INVALID_HANDLE_VALUE)
                    CString strTheNameOfTheFile = file.cFileName;

                    // It could be a directory we are looking at
                    // if so look into that dir
                    if (file.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
                           if ((strTheNameOfTheFile != ".") && (strTheNameOfTheFile != "..") && (bRecursive))
                                  strFoundFilePath = SearchDrive(strFile, strPathToSearch + strTheNameOfTheFile, bRecursive, bStopWhenFound);

                                  if (!strFoundFilePath.IsEmpty() && bStopWhenFound)
                           strFoundFilePath = strPathToSearch + strTheNameOfTheFile; //strFile;

                           long size = (file.nFileSizeHigh * (MAXDWORD + 1)) + file.nFileSizeLow;

                           TCHAR szPath[10240];
                           memset(szPath, 0, 10240);
                           _tcscpy_s(szPath, (LPCTSTR)strFoundFilePath);
                           _tprintf(_T("%s;%s;%ld\n"), szPath, (LPCTSTR)strTheNameOfTheFile, size);

                           if (bStopWhenFound)
             } while (FindNextFile(hFile, &file));


       return strFoundFilePath;

int _tmain(int argc, TCHAR *argv[])
       if (argc != 2)
             std::wcout << _T("Help") << std::endl;
             std::wcout << _T("usage: scanfiles <path>") << std::endl;
             return 0;

       TCHAR strPath[1024];
       wcscpy_s(strPath, argv[1]);

       TCHAR strWildcard[255];
       wcscpy_s(strWildcard, _T("*.*"));

       SearchDrive(strWildcard, strPath, true, false);

       return 0;


Article in Programmez for January 2019

My next article will be in french Magazine Programmez in January 2019. It will talks about rootkits and key logger.


Visual Studio 2019 Live Share

With LiveShare feature, you can do remote debugging and remote coding from and to VS &nd VS Code: