Esempio n. 1
0
void DumpImageDbgHeader(MPanelItem *pRoot, PIMAGE_SEPARATE_DEBUG_HEADER pImageSepDbgHeader)
{
    UINT headerFieldWidth = 30;

    pRoot->printf("  %-*s%04X\n", headerFieldWidth, "Flags:",
                pImageSepDbgHeader->Flags);
    pRoot->printf("  %-*s%04X %s\n", headerFieldWidth, "Machine:",
                pImageSepDbgHeader->Machine,
                GetMachineTypeName(pImageSepDbgHeader->Machine));
    pRoot->printf("  %-*s%04X\n", headerFieldWidth, "Characteristics:",
                pImageSepDbgHeader->Characteristics);
	__time32_t timeStamp = pImageSepDbgHeader->TimeDateStamp;
    pRoot->printf("  %-*s%08X -> %s", headerFieldWidth, "TimeDateStamp:",
                pImageSepDbgHeader->TimeDateStamp, _ctime32(&timeStamp) );
    pRoot->printf("  %-*s%08X\n", headerFieldWidth, "CheckSum:",
                pImageSepDbgHeader->CheckSum);
    pRoot->printf("  %-*s%08X\n", headerFieldWidth, "ImageBase:",
                pImageSepDbgHeader->ImageBase);
    pRoot->printf("  %-*s%08X\n", headerFieldWidth, "Size of Image:",
                pImageSepDbgHeader->SizeOfImage);
    pRoot->printf("  %-*s%04X\n", headerFieldWidth, "Number of Sections:",
                pImageSepDbgHeader->NumberOfSections);
    pRoot->printf("  %-*s%04X\n", headerFieldWidth, "ExportedNamesSize:",
                pImageSepDbgHeader->ExportedNamesSize);
    pRoot->printf("  %-*s%08X\n", headerFieldWidth, "DebugDirectorySize:",
                pImageSepDbgHeader->DebugDirectorySize);
    pRoot->printf("  %-*s%08X\n", headerFieldWidth, "SectionAlignment:",
                pImageSepDbgHeader->SectionAlignment);
}
Esempio n. 2
0
void IMsgs_Reset(HWND dialog)
{
	char string[32], version[5] = "0.00";
	char game[32] = "";
	char *version1 = scen.header.version;

	//these aren't gonna change, so load them here
	if (version1[0] == '\0')
		version1 = version;
	sprintf(string, "%s - %.2f", version1, scen.version2);

	switch (scen.game) {
	case AOE:
	    sprintf(game, "Age of Empires");
	    break;
	case ROR:
	    sprintf(game, "Rise of Rome");
	    break;
	case AOK:
	    sprintf(game, "Age of Kings");
	    break;
	case AOC:
	    sprintf(game, "The Conquerors");
	    break;
	case AOHD:
	    sprintf(game, "Age of Empires II: HD Edition");
	    break;
	case AOF:
	    sprintf(game, "The Forgotten");
	    break;
	case SWGB:
	    sprintf(game, "Star Wars Galactic Battlegrounds");
	    break;
	case SWGBCC:
	    sprintf(game, "Clone Campaigns");
	    break;
	default:
	    sprintf(game, "Unknown");
	    break;
	}

	SetDlgItemText(dialog, IDC_G_VER, string);
	SetDlgItemText(dialog, IDC_G_GAME, game);
	SetDlgItemText(dialog, IDC_G_TIMESTAMP, _ctime32(&scen.header.timestamp));
	SetDlgItemText(dialog, IDC_G_ONAME, scen.origname);
	SetDlgItemFloat(dialog, IDC_G_X, scen.editor_pos[0]);
	SetDlgItemFloat(dialog, IDC_G_Y, scen.editor_pos[1]);

	IM_msel = 0;
	SendDlgItemMessage(dialog, IDC_M_SEL, CB_SETCURSEL, 0, 0);
	IM_csel = 3;	//Bitmap = default
	SendDlgItemMessage(dialog, IDC_M_SELC, CB_SETCURSEL, 3, 0);
	LoadIM(dialog);
}
Esempio n. 3
0
  bool getdate( machine&, FSP arg1 ) {
#if defined( HAVE_GETTIMEOFDAY ) && defined( HAVE_CTIME )
    struct timeval current_time;
    gettimeofday( &current_time, NULL );
    string str( ctime( &current_time.tv_sec ) );
    return arg1.Unify( str.substr( 0, str.size() - 1 ).c_str() );
#elif defined(HAVE_TIME_H) && defined(LILFES_WIN_) // LILFES_WIN_
  __time32_t ltime;

  _time32( &ltime );

  string str(_ctime32( &ltime ));

  return arg1.Unify( str.substr( 0, str.size() - 1 ).c_str() );
#else // HAVE_GETTIMEOFDAY && HAVE_CTIME
    RUNWARN( "getdata: gettimeofday is not implemented in this system" );
    return arg1.Unify( "" );
#endif // HAVE_GETTIMEOFDAY && HAVE_CTIME
  }