Sunday, April 29, 2012

MultiThreaded server in c++ and win32 api

A very simple server that's show how to apply the windows CreateThread function, follows the normal procedure in creating a server,
  • Initialization of the DLL
  • create socket
  • bind the socket
  • listen for an incoming connection

Friday, April 27, 2012

Using thread on windows

#include <iostream>
#include <string>
#include <windows.h>

using namespace std;

#define BUFFER MAX_PATH

DWORD WINAPI function1(LPVOID lpParam);
void function2();

Register a file

#include <iostream>
#include <windows.h>
#include <conio.h>
#pragma comment(lib, "user32.lib")

using namespace std;

#define BUFFER 32750

Sunday, April 22, 2012

Delete itself after execution (C++ and WIN32 API's)


#include <windows.h>
#include <iostream>
#include <string>

using namespace std;

void DeleteMe();

int main(int arg, char **argv)
{
    cout << "THIS PROGRAM WILL KILL ITSELF" << endl;
    Sleep(5000);

Saturday, April 21, 2012

List all the processes running on your system using win32 API

Make sure to link the libpsapi.a library if you are using code blocks  

This program uses the following windows API functions and structures
  •  CreateToolhelp32Snapshot
  •  GetProcessMemoryInfo
  •  Process32First
  •  Process32Next
  •  PROCESSENTRY32 
  •  PROCESS_MEMORY_COUNTERS

How to create Custom push button in QT5

To be honest this is not my work its an exact copy from this link. http://mcmtechtips.blogspot.com/2012/03/shape-qpushbutton-in-your-own-st...