亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? appcore.cpp

?? 基于Nuleus操作系統和s3c4510的編寫的EFC。已經包含了該EFC的設計說明。這是個實際產品的代碼
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
	return strValue.Todouble();
}
/*
///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		lpszSection		Points to a null-terminated string that specifies the 
//						section containing the entry.
//		lpszEntry		Points to a null-terminated string that contains the 
//						entry whose value is to be retrieved.
//		pbyData			Pointer to the buffer that receives the data associated with section and key names. 
//						
//		wDataLen		Specifies the size, in bytes, of the buffer pointed to by the pbyData parameter.
// Return Value:
//		If the function succeeds, the return value is nonzero.
//		If the function fails, the return value is zero.

// Remarks:
//		Call this member function to retrieve the data associated with the specified key 
//		in the given section of the application's .INI file.
BOOL CRTApp::GetProfileStruct(LPCSTR lpszSection, LPCSTR lpszEntry,
							  BYTE *pbyData, WORD wDataLen)
{
	ASSERT(lpszSection != NULL);
	ASSERT(lpszEntry != NULL);
	ASSERT(pbyData != NULL);

	CProfileEntry *pEntry = FindProfileEntry(lpszSection, lpszEntry);
	if (pEntry && pEntry->wDataLen > 0)
	{
		memcpy(pbyData, pEntry->pbyData, wDataLen);
		return TRUE;
	}
	
	return FALSE;	
}

///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		lpszSection		Points to a null-terminated string that specifies the 
//						section containing the entry.
//		lpszEntry		Points to a null-terminated string that contains the 
//						entry whose value is to be retrieved.
//		pbyData			Pointer to the buffer that receives the data associated with section and key names. 
//						
//		wDataLen		Specifies the size, in bytes, of the buffer pointed to by the pbyData parameter.
// Return Value:
//		If the function succeeds, the return value is nonzero.
//		If the function fails, the return value is zero.

// Remarks:
//		Call this member function to copies data into the specified key 
//		in the given section of the application's .INI file.
BOOL CRTApp::WriteProfileStruct(LPCSTR lpszSection, LPCSTR lpszEntry,
							  BYTE *pbyData, WORD wDataLen)
{
	ASSERT(lpszSection != NULL && *lpszSection != '\0');
	ASSERT(lpszEntry != NULL && *lpszEntry != '\0');

	if (pbyData == NULL)
		return DeleteProfileEntry(lpszSection, lpszEntry);

	CProfileSection *pSection = FindProfileSection(lpszSection);
	if (pSection == NULL)
	{// create new section
		pSection = new CProfileSection();
		ASSERT(pSection);
		pSection->strSection = lpszSection;
		// Add to header
		pSection->pNext = m_pSectionHeader;
		m_pSectionHeader = pSection;
	}

	CProfileEntry *pEntry = FindProfileEntry(pSection, lpszEntry);
	if (pEntry == NULL)
	{// create new entry
		pEntry = new CProfileEntry();
		ASSERT(pEntry);
		pEntry->strEntry = lpszEntry;
		pEntry->bStructData = TRUE; // This entry hold struct data
		// Add to header
		pEntry->pNext = pSection->pEntryHeader;
		pSection->pEntryHeader = pEntry;
	}

	// Free previously allocated memory
	if (pEntry->pbyData != NULL)
	{
		delete [] pEntry->pbyData;
		pEntry->pbyData = NULL;
	}

	// New data
	pEntry->wDataLen = wDataLen;
	pEntry->pbyData = new BYTE[wDataLen + 1];
	ASSERT(pEntry->pbyData);
	
	memcpy(pEntry->pbyData, pbyData, wDataLen);

	return TRUE;
}
*/
///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		lpszSection		Points to a null-terminated string that specifies the 
//						section containing the entry. If the section does not 
//						exist, it is created. The name of the section is case 
//						sensitive;  the string may be any combination of 
//						uppercase and lowercase letters.
//		lpszEntry		Points to a null-terminated string that contains the 
//						entry into which the value is to be written. If the 
//						entry does not exist in the specified section, it is 
//						created.
//		dbValue			Contains the value to be written.
// Return Value:
//		TRUE if successful; otherwise FALSE.
// Remarks:
//		Call this member function to write the specified float number value into
//		the specified section of the application's .INI file.
BOOL CRTApp::WriteProfileFloat(LPCSTR lpszSection, LPCSTR lpszEntry, double dbValue)
{
	ASSERT(lpszSection != NULL);
	ASSERT(lpszEntry != NULL);	
	
	CString strValue;
	strValue.Format("%f", dbValue);
	return WriteProfileString(lpszSection, lpszEntry, strValue);
}

///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		lpszSection		Points to a null-terminated string that specifies the 
//						section containing the entry. If the section does not 
//						exist, it is created. The name of the section is case 
//						sensitive;  the string may be any combination of 
//						uppercase and lowercase letters.
//		lpszEntry		Points to a null-terminated string that contains the 
//						entry into which the value is to be written. If the 
//						entry does not exist in the specified section, it is 
//						created.
//		pData			Points to the data to be written.
//		nBytes			Contains the number of bytes to be written.
// Return Value:
//		TRUE if successful; otherwise FALSE.
// Remarks:
//		Call this member function to write binary data into the specified 
//		section of the application's .INI file.
BOOL CRTApp::WriteProfileBinary(LPCSTR lpszSection, LPCSTR lpszEntry,
								BYTE *pData, UINT nBytes, BYTE uMode)
{
	ASSERT(lpszSection != NULL);
	ASSERT(lpszEntry != NULL);
	ASSERT(pData != NULL);

	UINT i;
	CString strByte, strValue;
	switch (uMode) 
	{
	case PROFILE_BINARY_MODE_MAC:
		for (i = 0; i < nBytes; i++)
		{
			strByte.Format("%02X-", *pData++);
			strValue += strByte;
		}
		strValue.TrimRight('-');
		break;
	case PROFILE_BINARY_MODE_IP:
		for (i = 0; i < nBytes; i++) 
		{
			strByte.Format("%d.", *pData++);
			strValue += strByte;
		}
		strValue.TrimRight('.');
		break;
	case PROFILE_BINARY_MODE_NORMAL:
	default:
		for (i = 0; i < nBytes; i++)
		{
			strByte.Format("%02X ", *pData++);
			strValue += strByte;
		}
		strValue.TrimRight();
		break;
	}
	return WriteProfileString(lpszSection, lpszEntry, strValue);
}

///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		lpszSection		Points to a null-terminated string that specifies the 
//						section containing the entry. The name of the section 
//						is case sensitive;  the string may be any combination
//						of uppercase and lowercase letters.
//		lpszEntry		Points to a null-terminated string that contains the 
//						entry whose value is to be retrieved.
//		pData			Points to the buffer to retrieve the data.
//		nBytes			Contains the number of bytes to retrieve at most.
// Return Value:
//		TRUE if successful; otherwise FALSE.
// Remarks:
//		Call this member function to retrieve binary data from an entry within
//		a specified section of the application's .INI file.
BOOL CRTApp::GetProfileBinary(LPCSTR lpszSection, LPCSTR lpszEntry, 
							  BYTE *pData, UINT nBytes) const
{
	ASSERT(lpszSection != NULL);
	ASSERT(lpszEntry != NULL);
	
	CString strValue = GetProfileString(lpszSection, lpszEntry, NULL);
	if (strValue.IsEmpty())
		return FALSE;
	
	UINT i;
	if (strValue.Find('.') > 0)
	{// PROFILE_BINARY_MODE_IP
		for (i = 0; i < nBytes; i++)
		{
			*pData++ = (BYTE)strValue.Toint();
			strValue = strValue.Mid(".", NULL);
		}
	}
	else if (strValue.Find('-') > 0) 
	{// PROFILE_BINARY_MODE_MAC
		for (i = 0; i < nBytes; i++)
		{
			*pData++ = (BYTE)strValue.Tohex();
			strValue = strValue.Mid("-", NULL);
		}
	}
	else
	{// PROFILE_BINARY_MODE_NORMAL
		for (i = 0; i < nBytes; i++)
		{
			*pData++ = (BYTE)strValue.Tohex();
			strValue = strValue.Mid(" ", NULL);
		}
	}
	return TRUE;
}

///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		lpszSection		Points to a null-terminated string that specifies the 
//						section. If this parameter is NULL, the whole section
//						link table was deleted.
// Return Value:
//		TRUE if successful, FALSE if the specified section was not found.
// Remarks:
//		Deletes a section from the section link table or the whole link table.
BOOL CRTApp::DeleteProfileSection(LPCSTR lpszSection)
{
	if (lpszSection == NULL) 
	{
		if (m_pSectionHeader != NULL) 
		{// delete the whole profile link table.
			delete m_pSectionHeader;
			m_pSectionHeader = NULL;
		}
		return TRUE;
	}

	CProfileSection *pSection = NULL;
	CProfileSection *pNextSec = m_pSectionHeader;
	while (pNextSec != NULL)
	{
		if (pNextSec->strSection == lpszSection)
		{
			if (pSection != NULL)
			{
				pSection->pNext = pNextSec->pNext;
			}
			else
			{// it's the section header
				m_pSectionHeader = pNextSec->pNext;
			}
			pNextSec->pNext = NULL; // cut off from the link table
			delete pNextSec;
			return TRUE;
		}
		pSection = pNextSec;
		pNextSec = pNextSec->pNext;
	}
	return FALSE;
}

///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		lpszSection		Points to a null-terminated string that specifies the 
//						section.
//		lpszEntry		Points to a null-terminated string that contains the 
//						entry.
// Return Value:
//		TRUE if successful, FALSE if the specified entry was not found.
// Remarks:
//		Deletes an entry from the section-entry link table.
BOOL CRTApp::DeleteProfileEntry(LPCSTR lpszSection, LPCSTR lpszEntry)
{
	ASSERT(lpszSection);
	ASSERT(lpszEntry);

	CProfileSection *pSection = FindProfileSection(lpszSection);	
	if (pSection != NULL)
	{// section found
		CProfileEntry *pEntry = NULL;
		CProfileEntry *pNextEntry = pSection->pEntryHeader;
		while (pNextEntry != NULL)
		{
			if (pNextEntry->strEntry == lpszEntry)
			{
				if (pEntry != NULL)
				{
					pEntry->pNext = pNextEntry->pNext;
				}
				else
				{// it's the entry header
					pSection->pEntryHeader = pNextEntry->pNext;
				}
				pNextEntry->pNext = NULL; // cut off from the link table
				delete pNextEntry;
				return TRUE;
			}
		}
	}
	return FALSE;
}

///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		lpszSection		Points to a null-terminated string that specifies the 
//						section.
//		lpszEntry		Points to a null-terminated string that contains the 
//						entry. If lpszEntry is NULL, then the section rights
//						is set.
//		nReadRights		Access rights for reading it. The value is same as the
//						system user's access rights defined in EFCCONTS.H
//		nWriteRights	Access rights for writing it.
// Return Value:
//		TRUE if profile rights was set successful, FALSE if the entry or section
//		was not found.
// Remarks:
//		Sets the read/write rights of the specified profile entry of section.
BOOL CRTApp::SetProfileRights(LPCSTR lpszSection, LPCSTR lpszEntry,
							  int nReadRights, int nWriteRights)
{
	ASSERT(lpszSection);
	
	CProfileSection *pSection = FindProfileSection(lpszSection);
	if (pSection == NULL)
		return FALSE; // section does not exist.

	if (lpszEntry == NULL) 
	{// sets the section rights
		pSection->nReadRights  = nReadRights;
		pSection->nWriteRights = nWriteRights;
		return TRUE;
	}

	CProfileEntry *pEntry = FindProfileEntry(pSection, lpszEntry);
	if (pEntry != NULL) 
	{
		pEntry->nReadRights  = nReadRights;
		pEntry->nWriteRights = nWriteRights;
		return TRUE;
	}

	return FALSE;
}

///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		lpszSection		The string of the profile section to search for.
// Return Value:
//		The pointer of the profile section if found, otherwise NULL.
// Remarks:
//		Searches the whole profile link table for the match of a section
CProfileSection *CRTApp::FindProfileSection(LPCSTR lpszSection) const
{
	ASSERT(lpszSection);
	CProfileSection *pSection = m_pSectionHeader;
	while (pSection != NULL) 
	{
		if (pSection->strSection == lpszSection)
			break;
		pSection = pSection->pNext;
	}
	return pSection;
}

///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		pSection	A pointer of the specified profile section.
//		lpszEntry	The name of the profile entry to search for.
// Return Value:
//		The pointer of the profile entry if found, otherwise NULL.
// Remarks:
//		Searches the specified profile section for the match of an profile entry.
CProfileEntry *CRTApp::FindProfileEntry(const CProfileSection *pSection,
										LPCSTR lpszEntry) const
{
	ASSERT(lpszEntry);
	if (pSection == NULL)
		return NULL;
	
	CProfileEntry *pEntry = pSection->pEntryHeader;
	while (pEntry != NULL) 
	{
		if (pEntry->strEntry == lpszEntry)
			break;
		pEntry = pEntry->pNext;
	}
	return pEntry;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲女同ⅹxx女同tv| 99久久国产综合色|国产精品| 国产高清精品久久久久| 91丨porny丨户外露出| 欧美精品丝袜久久久中文字幕| 亚洲国产精华液网站w| 日本亚洲三级在线| 91福利在线观看| 亚洲欧洲无码一区二区三区| 亚洲成av人片在线观看| www.成人网.com| 久久综合狠狠综合久久综合88| 亚洲国产sm捆绑调教视频 | 一本到高清视频免费精品| 日韩欧美一二三区| 亚洲一二三专区| 色噜噜狠狠一区二区三区果冻| 久久精品夜色噜噜亚洲aⅴ| 日本不卡不码高清免费观看| 欧美色图免费看| 亚洲精品亚洲人成人网| 大美女一区二区三区| 日韩免费电影一区| 日韩av一二三| 欧美军同video69gay| 亚洲乱码国产乱码精品精小说| 国产成人精品一区二 | 欧美在线观看18| 国产精品乱子久久久久| 国产不卡视频一区| 国产亚洲制服色| 国产一区在线不卡| 久久人人爽爽爽人久久久| 精品在线免费视频| 精品国产一区二区三区不卡 | 色网站国产精品| 亚洲人快播电影网| 色天天综合色天天久久| 亚洲视频免费看| 91国产成人在线| 亚洲制服丝袜一区| 91麻豆精品国产91| 青青草国产成人99久久| 欧美精品一区二区三区四区| 另类小说欧美激情| 久久久久久久综合色一本| 国产精品亚洲成人| 国产精品久久久久久久久免费相片| 国产69精品久久99不卡| 国产精品初高中害羞小美女文| 成人网在线免费视频| 亚洲免费看黄网站| 制服丝袜成人动漫| 韩国三级中文字幕hd久久精品| 国产亚洲欧美激情| 91国在线观看| 精东粉嫩av免费一区二区三区| 久久综合久久综合久久综合| 成人福利电影精品一区二区在线观看| 1000精品久久久久久久久| 欧美日韩一区二区欧美激情| 久久99久久久久| 欧美国产精品专区| 欧美在线视频全部完| 精品一区二区三区在线观看国产| 久久精品欧美日韩| 欧美日韩一区二区三区不卡| 国产在线不卡一区| 亚洲激情自拍视频| 精品久久国产字幕高潮| av午夜精品一区二区三区| 亚洲一区二区欧美| 久久久国产精华| 一本色道久久加勒比精品| 日本不卡123| 亚洲图片激情小说| 欧美tickle裸体挠脚心vk| 91麻豆高清视频| 美洲天堂一区二卡三卡四卡视频| 国产精品麻豆网站| 日韩一卡二卡三卡四卡| aaa亚洲精品一二三区| 久久99精品一区二区三区三区| 亚洲美腿欧美偷拍| 国产日韩欧美激情| 欧美区视频在线观看| 北条麻妃一区二区三区| 久久99国产精品久久| 亚洲免费av网站| 国产精品嫩草影院com| 日韩欧美你懂的| 欧美少妇xxx| 91小视频在线| 国产精品一区二区久激情瑜伽 | 国产毛片精品视频| 午夜欧美大尺度福利影院在线看| 欧美国产一区二区在线观看| 日韩午夜三级在线| 欧美日韩成人一区| 欧美三级视频在线| 色素色在线综合| 91麻豆产精品久久久久久 | 日本亚洲视频在线| 亚洲va天堂va国产va久| 亚洲日本在线看| 国产精品久久久久久久久免费相片| 日韩一区二区三区视频在线| 欧美日韩免费高清一区色橹橹| 99久久久久免费精品国产| 国产高清不卡一区| 国产中文字幕精品| 精品写真视频在线观看| 久久99精品一区二区三区三区| 视频一区中文字幕| 舔着乳尖日韩一区| 日韩成人午夜电影| 日韩精品成人一区二区在线| 亚洲高清久久久| 午夜精品爽啪视频| 日韩国产高清影视| 另类调教123区| 激情小说亚洲一区| 国产精品中文字幕欧美| 精品一区二区三区日韩| 国产精品白丝jk黑袜喷水| 国产传媒欧美日韩成人| av中文一区二区三区| 色999日韩国产欧美一区二区| 91国在线观看| 日韩视频在线永久播放| 久久女同性恋中文字幕| 中文字幕字幕中文在线中不卡视频| 亚洲视频 欧洲视频| 污片在线观看一区二区| 青青草国产精品亚洲专区无| 国产九色精品成人porny| 成人综合在线网站| 在线观看一区二区视频| 91精品国产综合久久香蕉麻豆| 日韩午夜在线播放| 国产精品久久久99| 亚洲一区在线视频观看| 日本在线不卡视频一二三区| 韩国av一区二区三区四区| 风流少妇一区二区| 欧美系列在线观看| 26uuu色噜噜精品一区二区| 亚洲欧美在线aaa| 亚洲超丰满肉感bbw| 国产一区二区三区| 91麻豆文化传媒在线观看| 日韩精品一区二区三区在线| 中文字幕永久在线不卡| 日本视频在线一区| 97se亚洲国产综合自在线不卡 | 欧美xfplay| 亚洲三级免费电影| 麻豆中文一区二区| 91在线观看污| 欧美大黄免费观看| 亚洲美女视频在线| 国产一区二区福利| 欧美日韩一区二区三区在线看| ww亚洲ww在线观看国产| 一区二区视频免费在线观看| 国产精品资源在线| 欧美日韩一区中文字幕| 国产精品伦理一区二区| 久久机这里只有精品| 在线一区二区观看| 国产精品国产三级国产aⅴ原创 | 国产黄色精品网站| 欧美天堂亚洲电影院在线播放| 久久久久久亚洲综合影院红桃| 日韩精品一级中文字幕精品视频免费观看| 国产精品66部| 日韩一区二区三免费高清| 一区二区三区不卡在线观看| 国产99精品视频| 精品成人免费观看| 婷婷综合另类小说色区| 日本丰满少妇一区二区三区| 国产欧美中文在线| 国内精品久久久久影院色| 欧美日韩国产bt| 亚洲一二三四久久| 91麻豆国产福利精品| 国产精品国产三级国产三级人妇| 国产精品一区2区| 日韩欧美中文字幕一区| 午夜在线成人av| 欧洲色大大久久| 亚洲精品成人天堂一二三| 99re在线精品| 亚洲色图清纯唯美| av电影天堂一区二区在线 | 亚洲一区二区免费视频| 欧美中文一区二区三区| 亚洲自拍另类综合| 欧美精品v国产精品v日韩精品|