BOOL CSkinIniFile::SetValue(LPCTSTR strSec, LPCTSTR strKey, CStringArray &strArr, TCHAR ch)
{
	CSkinSection* pSec = GetSectionPtr(strSec);
	
	if (pSec == NULL)
		return FALSE;
	
	return pSec->SetKeyValue(strKey,strArr,ch);
}
BOOL CSkinIniFile::SetValue(LPCTSTR strSec, LPCTSTR strKey, FLOAT fVal)
{
	CSkinSection* pSec = GetSectionPtr(strSec);

	if (pSec == NULL)
		return FALSE;

	return pSec->SetKeyValue(strKey,fVal);
}
BOOL CSkinIniFile::SetValue(LPCTSTR strSec, LPCTSTR strKey, const CRect &rect)
{	
	CSkinSection* pSec = GetSectionPtr(strSec);

	if (pSec == NULL)
		return FALSE;

	return pSec->SetKeyValue(strKey,rect);
}
BOOL CSkinIniFile::GetValue(LPCTSTR strSec, LPCTSTR strKey, CSize &size)
{
	CSkinSection* pSec = GetSectionPtr(strSec);
	
	if (pSec == NULL)
		return FALSE;

	return pSec->GetKeyValue(strKey,size);
}
BOOL CSkinIniFile::GetValue(LPCTSTR strSec, LPCTSTR strKey, DWORD &dwVal)
{
	CSkinSection* pSec = GetSectionPtr(strSec);
	
	if (pSec == NULL)
		return FALSE;

	return pSec->GetKeyValue(strKey,dwVal);
}
int CSkinIniFile::GetKeyCount(LPCTSTR strSec)
{
	
	CSkinSection* pSec = (CSkinSection*)GetSectionPtr(strSec);

	if (pSec == NULL)
		return 0;

	return pSec->m_mapKey.GetCount();
}
Beispiel #7
0
// Main function 
// see description of PPGIParamsBlock in unpack.h
// return TRUE if this pluging can handle the source
// __declspec(dllexport)
BOOL __stdcall PexPreloadImage(PPGIParamsBlock pPGI)
{
	CString str;	
	DWORD id = pPGI->dwInterface;
	PDWORD base = (DWORD *) pPGI->pInBuff;
	
	(pPGI->pCallBack)(id, 0, "Executing...");
	
	PIMAGE_DOS_HEADER pDosHdr = (PIMAGE_DOS_HEADER) base;
    PIMAGE_NT_HEADERS pSecondHdr = MakePtr( PIMAGE_NT_HEADERS, base, pDosHdr->e_lfanew );
	PBYTE NTbase = (PBYTE) GetSectionPtr( pSecondHdr, (DWORD) base);
	
	if ( NTbase > ((PBYTE) base + pPGI->dwInSize)) 
	{
//		str.Format("%s: Error in EXE file", PIABV);
//		(pPGI->pCallBack)(id, 0, str);  // 
		return FALSE;
	}
	if (NTbase)
	{ // NTbase + 24
		if (*(NTbase + 2) == 0xE9)
			str.Format("%s: File compressed with Aspack ver 2.11", PIABV);
		else if (*(PWORD)(NTbase + 0x3B2) == 0x01B8)
			str.Format("%s: File compressed with Aspack ver 2.12/2.12a/2.12b", PIABV);
		else if (*(PWORD)(NTbase + 0x3B3) == 0x01B8)
			str.Format("%s: File compressed with Aspack ver ??", PIABV);
		else if (*(PWORD)(NTbase + 0x4F4) == 0x01B8)
			str.Format("%s: File compressed with Aspack 2000", PIABV);
		else if (*(PWORD)(NTbase + 0x4F6) == 0x01B8)
			str.Format("%s: File compressed with Aspack 2001", PIABV);
		else if (*(PWORD)(NTbase + 0x4F6) == 0x01B8 && *(NTbase + 0x4DF) == 0x000443A02)
			str.Format("%s: File compressed with Aspack ver 2.1", PIABV);
		else if (*(PWORD)(NTbase + 0x4F6) == 0x01B8 && *(NTbase + 0x4DF) == 0x0004439FD)
			str.Format("%s: File compressed with Aspack ver ??", PIABV);
		else if (*(PWORD)(NTbase + 0x3BA) == 0x7561)
			str.Format("%s: File compressed with Aspack ver ??", PIABV);
		else if (*(NTbase + 2) == 0xE8)
			str.Format("%s: File compressed with Aspack ver 2.11c/d", PIABV);
		else return FALSE;
	} else return FALSE;
	(pPGI->pCallBack)(id, 0, str);  // 

	//void *p = (pPGI->pMemAllocator)(DWORD len);	// Memory allocator for the returned Image
	// if (p) pPGI->pOutBuff = (LPVOID) p;			// Initialize output buffer pointer
	// pPGI->dwOutSize = len;						// Set output buffer size
	return TRUE;

}