Casio PA-2400W Manuel Page 52

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 83
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 51
52
7.9.2 Setting Up Registry with User Application
Modify the registry as required from your application while referencing the following sample program.
/***********************************************/
/* Registry Registration Program */
/***********************************************/
#include <windows.h>
#include <string.h>
#include <commctrl.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPWSTR lpCmdLine, int nCmdShow )
{
HKEY hKey1; // Open Handle
LONG lReg1; // Result code
DWORDDisp1; // Create or Open disposition
int err;
const wchar_t SubKey1[] = TEXT( "FLCE"); // Key for FLCE
const wchar_t Name[] = TEXT( "RECVWAIT");
// Name for the command-to-response interval timeout
const DWORD Value = 1800L;
// Time-out value to be set (seconds)
err=TRUE;
// Open the registry key
lReg1=RegCreateKeyEx( HKEY_CURRENT_USER, SubKey1, 0, NULL, 0, 0, 0,
&hKey1, &Disp1);
if( lReg1 == ERROR_SUCCESS) {
// Set the value
lReg1=RegSetValueEx( hKey1, Name, 0, REG_DWORD, ( const BYTE
*)&Value, sizeof( Value)); if( lReg1 != ERROR_SUCCESS)
err=FALSE;
// Close the registry key.
lReg1=RegCloseKey( hKey1);
if( lReg1 != ERROR_SUCCESS)
Vue de la page 51
1 2 ... 47 48 49 50 51 52 53 54 55 56 57 ... 82 83

Commentaires sur ces manuels

Pas de commentaire