Programmation C++ 32 bit

Compilateur: Microsoft Visual C++ 6.0

Fonction de départ:

 int WINAPI WinMain(HINSTANCE hInstance, 
                    HINSTANCE hPrevInstance, 
                    LPSTR lpCmdLine, 
                    int nCmdShow)
 {
 }

 
 GetCommandLine() : permet d'avoir la ligne de commande de la fenêtre
 HANDLE FindFirstFile(char *, // critère de recherche d'un fichier: exemple *.txt
                      WIN32_FIND_DATA *);

 HANDLE CreateFile(char *szDbPath,
                   GENERIC_READ|GENERIC_WRITE,
                   FILE_SHARE_READ,
                   NULL,
                   OPEN_EXISTING,
                   0,
                   NULL);
 int DialogBox(GetModuleHandle(NULL),
               MAKEINTRESOURCE(IDD_PROFILEMANAGER),
               NULL,
               ProfileManagerDlgProc);
 MessageBox(NULL,
            "message",
            "title",
            MB_OK);   

 int GetFileSize(HANDLE hDbFile,
                     NULL);

 ReadFile(HANDLE hDbFile,
           void *class,
          sizeof(dbHeader),
          DWORD *bytesRead,
          NULL);  
 SetFilePointer(HANDLE hDbFile,
                0,
                NULL,
                FILE_BEGIN);
 WriteFile(HANDLE hDbFile,
           void *class,
           sizeof(dbHeader),
           DWORD *bytesWritten,
           NULL);
 FlushFileBuffers(HANDLE hDbFile);

 EnterCriticalSection(CRITICAL_SECTION *csServices);
 LeaveCriticalSection(CRITICAL_SECTION *csServices);
 Types
 char : Charactère
 int : Integer
 void : vide
 

 Types Microsoft:
 static CRITICAL_SECTION;
 DBHeader
 DWORD [32 bits]
 HANDLE
    FFh = INVALID_HANDLE_VALUE
 HINSTANCE
 HKEY
 LPSTR
 MSG
     hwnd
     message
     wParam
     lParam
     time
     pt
        x
        y
 WIN32_FIND_DATA
     cFileName : nom du fichier

REG_SZ = 0x01



/*
HYPERLINK:

int InitHyperlink(void)
{
	WNDCLASS wcl;

	if(LOBYTE(LOWORD(GetVersion()))>=5) hHandCursor=LoadCursor(NULL,IDC_HAND);
	else hHandCursor=LoadCursor(GetModuleHandle(NULL),MAKEINTRESOURCE(IDC_HYPERLINKHAND));
	wcl.lpfnWndProc=HyperlinkWndProc;
	wcl.cbClsExtra=0;
	wcl.cbWndExtra=sizeof(void*);
	wcl.hInstance=GetModuleHandle(NULL);
	wcl.hCursor=NULL;
	wcl.lpszClassName=WNDCLASS_HYPERLINK;
	wcl.hbrBackground=(HBRUSH)(COLOR_BTNFACE+1);
	wcl.hIcon=NULL;
	wcl.lpszMenuName=NULL;
	wcl.style=CS_HREDRAW|CS_VREDRAW;
	RegisterClass(&wcl);
	return 0;
}
 
*/