• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetPrivateProfileStringA函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetPrivateProfileStringA函数的典型用法代码示例。如果您正苦于以下问题:C++ GetPrivateProfileStringA函数的具体用法?C++ GetPrivateProfileStringA怎么用?C++ GetPrivateProfileStringA使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetPrivateProfileStringA函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: mir_strcpy

void CToxProto::BootstrapNodesFromIni(bool isIPv6)
{
	if (IsFileExists((TCHAR*)VARST(_T(TOX_INI_PATH))))
	{
		char fileName[MAX_PATH];
		mir_strcpy(fileName, VARS(TOX_INI_PATH));

		char *section, sections[MAX_PATH], value[MAX_PATH];
		GetPrivateProfileSectionNamesA(sections, _countof(sections), fileName);
		section = sections;
		while (*section != NULL)
		{
			if (strstr(section, TOX_SETTINGS_NODE_PREFIX) == section)
			{
				GetPrivateProfileStringA(section, "IPv4", NULL, value, _countof(value), fileName);
				ptrA address(mir_strdup(value));
				int port = GetPrivateProfileIntA(section, "Port", 33445, fileName);
				GetPrivateProfileStringA(section, "PubKey", NULL, value, _countof(value), fileName);
				ptrA pubKey(mir_strdup(value));
				BootstrapNode(address, port, pubKey);
				if (isIPv6)
				{
					GetPrivateProfileStringA(section, "IPv6", NULL, value, _countof(value), fileName);
					address = mir_strdup(value);
					BootstrapNode(address, port, pubKey);
				}
			}
			section += mir_strlen(section) + 1;
		}
	}
}
开发者ID:truefriend-cz,项目名称:miranda-ng,代码行数:31,代码来源:tox_network.cpp


示例2: MAIN_CreateGroups

static VOID MAIN_CreateGroups(VOID)
{
  CHAR buffer[BUFFER_SIZE];
  CHAR szPath[MAX_PATHNAME_LEN];
  CHAR key[20], *ptr;

  /* Initialize groups according the `Order' entry of `progman.ini' */
  GetPrivateProfileStringA("Settings", "Order", "", buffer, sizeof(buffer), Globals.lpszIniFile);
  ptr = buffer;
  while (ptr < buffer + sizeof(buffer))
    {
      int num, skip, ret;
      ret = sscanf(ptr, "%d%n", &num, &skip);
      if (ret == 0)
	MAIN_MessageBoxIDS_s(IDS_FILE_READ_ERROR_s, Globals.lpszIniFile, IDS_ERROR, MB_OK);
      if (ret != 1) break;

      sprintf(key, "Group%d", num);
      GetPrivateProfileStringA("Groups", key, "", szPath,
			      sizeof(szPath), Globals.lpszIniFile);
      if (!szPath[0]) continue;

      GRPFILE_ReadGroupFile(szPath);

      ptr += skip;
    }
  /* FIXME initialize other groups, not enumerated by `Order' */
}
开发者ID:Moteesh,项目名称:reactos,代码行数:28,代码来源:main.c


示例3: strcpy_s

void SQLClass::Init()
{

	bool bResult = false;
	char SQLConnect[]="..\\OptionsData\\Options.ini";

	if( GetPrivateProfileIntA("SQL", "SQLVersion", 2000, SQLConnect) == 2000 ) {
		strcpy_s(m_SqlConn.sDriver, "{SQL Server}");
	} 
	else {
		strcpy_s(m_SqlConn.sDriver, "{SQL Native Client}");
	}
	

	GetPrivateProfileStringA("SQL", "Host",	"",m_SqlConn.sServer,	sizeof(m_SqlConn.sServer),	SQLConnect);
	GetPrivateProfileStringA("SQL", "Database",		"",m_SqlConn.sDatabase,	sizeof(m_SqlConn.sDatabase),SQLConnect);
	GetPrivateProfileStringA("SQL", "User",	"",m_SqlConn.sUID,		sizeof(m_SqlConn.sUID),		SQLConnect);
	GetPrivateProfileStringA("SQL", "Password",	"",m_SqlConn.sPwd,		sizeof(m_SqlConn.sPwd),		SQLConnect);

	if( PointsSql.Connect(&m_SqlConn) == false ) 
	{
		MessageBoxA(NULL, "g_SQL::Init() Connect to SQL Server false \n chek your setting !", "SQL Error!", MB_OK|MB_ICONERROR);
		ExitProcess(0);
	} 
	else 
	{
		bResult = true;
	}

	if( bResult == true )
	{
		//Log.outInfo("SQL Manager Initialized");
	}
}
开发者ID:brunohkbx,项目名称:pendmu-server,代码行数:34,代码来源:SQL_Manager.cpp


示例4: ReadSettings

// Read our settings from a file.
static void ReadSettings(const char *Filename)
{
	GetPrivateProfileStringA("Steam", "Username", "redacted", Global::Steam_Username, 16, Filename);
	GetPrivateProfileStringA("Steam", "Language", "english", Global::Steam_Language, 16, Filename);
	
	Global::Steam_Offline = GetPrivateProfileIntA("System", "OfflineMode", 1, Filename) == TRUE;
	Global::Steam_Dedicated = GetPrivateProfileIntA("System", "DedicatedMode", 0, Filename) == TRUE;
}
开发者ID:CreaTeF,项目名称:SteamBase,代码行数:9,代码来源:DllMain.cpp


示例5: getUserKey

BOOL getUserKey( PROV_CTX *pProvCtx, KEY_INFO *pKey ){

	/*
	if ( !pProvCtx->bSilent ){
		HANDLE hDialogBox;
		createDialogBox( hDialogBox );
		showModal( hDialogBox );
	*/
	//showDialogBox( 

	CONTAINER_IRZ *pContainerIRZ = (CONTAINER_IRZ *) pProvCtx->pContainer->hServiceInformation;
	CHAR szPrivateKey[PRIVATEKEY_CHAR_LEN+1];
	CHAR szPublicKey[PUBLICKEY_CHAR_LEN+1];
	DWORD dwRes = GetPrivateProfileStringA(  
		"PRIVATEKEY",
		"PRIVATEKEY",
		NULL,
		szPrivateKey,
		PRIVATEKEY_CHAR_LEN+1,
		pContainerIRZ->szToken);

	if ( dwRes != PRIVATEKEY_CHAR_LEN ){
		SetLastError(NTE_BAD_KEYSET);
		return FALSE;
	}

	dwRes = GetPrivateProfileStringA(  
		"PUBLICKEY", 
		"PUBLICKEY",
		NULL,
		szPublicKey,
		PUBLICKEY_CHAR_LEN+1,
		pContainerIRZ->szToken);
	
	pKey->algId = CALG_GOST_SIGN;
	pKey->blockLen = 0;
	pKey->dwKeySpec = AT_SIGNATURE;
	pKey->exportable = TRUE;
	pKey->fLen = 0;
	pKey->length = PRIVATEKEY_BYTE_LEN;

	KEY_SIGN_INFO *pKeyInfo = (KEY_SIGN_INFO *) pKey->hKeyInformation;

	//pKeyInfo->params = PARAMS_GOST_SIGN( PARAMSET_GOST_SIGN_1 );
	if ( !derivePrivateKey( pKeyInfo, szPrivateKey ) ){
		SetLastError( NTE_BAD_KEYSET );
		return FALSE;
	}
	if ( szPublicKey != NULL ){
		if ( !derivePubKey( pKeyInfo, szPublicKey ) ){
			SetLastError( NTE_BAD_KEYSET );
			return FALSE;
		}		
	} else 
		pKeyInfo->pPubKey = NULL;

	return TRUE;
}
开发者ID:banghury,项目名称:cryptoprovider-with-russian-gost,代码行数:58,代码来源:csp-services.cpp


示例6: Load_Config

	int Load_Config(const char* filename)
	{
		if(!filename)
			filename = defaultConfigFilename;
		char Conf_File[1024];

		if(*filename && filename[1] == ':')
			strcpy(Conf_File, filename);
		else
			sprintf(Conf_File, "%s\\%s", thisprocessPath, filename);

		GetPrivateProfileStringA("General", "Exe path", exefilename, exefilename, MAX_PATH, Conf_File);
		GetPrivateProfileStringA("General", "Movie path", moviefilename, moviefilename, MAX_PATH, Conf_File);
		GetPrivateProfileStringA("General", "Command line", commandline, commandline, ARRAYSIZE(commandline), Conf_File);

		nextLoadRecords = 0!=GetPrivateProfileIntA("General", "Movie Read Only", nextLoadRecords, Conf_File);
		//localTASflags.forceWindowed = GetPrivateProfileIntA("Graphics", "Force Windowed", localTASflags.forceWindowed, Conf_File);
		localTASflags.fastForwardFlags = GetPrivateProfileIntA("Tools", "Fast Forward Flags", localTASflags.fastForwardFlags, Conf_File);
		advancePastNonVideoFrames = GetPrivateProfileIntA("Input", "Skip Lag Frames", advancePastNonVideoFrames, Conf_File);
		advancePastNonVideoFramesConfigured = 0!=GetPrivateProfileIntA("Input", "Skip Lag Frames", 0, Conf_File);
		inputFocusFlags = GetPrivateProfileIntA("Input", "Background Input Focus Flags", inputFocusFlags, Conf_File);
		hotkeysFocusFlags = GetPrivateProfileIntA("Input", "Background Hotkeys Focus Flags", hotkeysFocusFlags, Conf_File);

		traceEnabled = 0!=GetPrivateProfileIntA("Debug", "Load Debug Tracing", traceEnabled, Conf_File);

		if (RWSaveWindowPos)
		{
			ramw_x = GetPrivateProfileIntA ("Watches", "Ramwatch_X", 0, Conf_File);
			ramw_y = GetPrivateProfileIntA ("Watches", "Ramwatch_Y", 0, Conf_File);
		}

		for(int i = 0; i < MAX_RECENT_WATCHES; i++)
		{
			char str[256];
			sprintf(str, "Recent Watch %d", i+1);
			GetPrivateProfileStringA("Watches", str, "", &rw_recent_files[i][0], 1024, Conf_File);
		}

		// TODO: Load hotkeys.
		//LoadHotkeys(Conf_File, true);
		//LoadHotkeys(Conf_File, false);

		// done loading

		//UpdateReverseLookup(true);
		//UpdateReverseLookup(false);

		// Reeeeeeeeeeeeally weird code...
		static bool first = true;
		if(first)
			first = false;
		else
			debugprintf(L"loaded config from \"%S\".\n", Conf_File);

		return 1;
	}
开发者ID:smurfton,项目名称:Hourglass-Resurrection,代码行数:56,代码来源:Config.cpp


示例7: memset

void FixPatsPriceSource::ReadIniConfig()
{ // 登录需要的参数 HeartBeatInterval,username,password
	m_HeartBeatInterval = 30;
	m_useSimEngine = 0;
	memset(m_szUsername,   0, sizeof(m_szUsername));
	memset(m_szPassword,   0, sizeof(m_szPassword));

	GetPrivateProfileStringA("FIXPATSGW", "LOGON_UID", "patsusername", m_szUsername, 16, ".\\AIB.ini");
	GetPrivateProfileStringA("FIXPATSGW", "LOGON_PWD", "patspassword", m_szPassword, 16, ".\\AIB.ini");
	m_HeartBeatInterval = GetPrivateProfileIntA("FIXPATSGW","LOGON_HBINT",30,".\\AIB.ini");
	m_useSimEngine = GetPrivateProfileIntA("FIXPATSGW","SIMENGINE_PS",0,".\\AIB.ini");
	TRACE_LOG("FixPatsPriceSource ReadIniConfig UID:%s,PWD:%s,HeartBeatInt:%d,UseSimEngine:%d.",m_szUsername,m_szPassword,m_HeartBeatInterval,m_useSimEngine);
}
开发者ID:marco-sun,项目名称:arbi6,代码行数:13,代码来源:FixPatsPriceSource.cpp


示例8: GetPrivateProfileStringA

void CSQLEx::Load()
{
	szDriver="{SQL Server}";
	GetPrivateProfileStringA("SQL","Host","127.0.0.1",szServer,sizeof(szServer),CUSTOM_PATH);
	GetPrivateProfileStringA("SQL","Host","127.0.0.1",szServer2,sizeof(szServer2),CUSTOM_PATH);
	GetPrivateProfileStringA("SQL","User","sa",szUser,sizeof(szUser),CUSTOM_PATH);
	GetPrivateProfileStringA("SQL","Password","12345",szPassword,sizeof(szPassword),CUSTOM_PATH);
	GetPrivateProfileStringA("SQL","Database","MuOnline",szDatabase,sizeof(szDatabase),CUSTOM_PATH);

	if(!this->Connect())
	{
		MessageBoxA(0,"Failed to connect - Check your Exillum.ini!","Error",MB_OK);
		::ExitProcess(0);
	} 
}
开发者ID:Natzugen,项目名称:ExilliumS3-EP1,代码行数:15,代码来源:SQL.cpp


示例9: OpenDriver16

/**************************************************************************
 *		OpenDriver (USER.252)
 */
HDRVR16 WINAPI OpenDriver16(LPCSTR lpDriverName, LPCSTR lpSectionName, LPARAM lParam2)
{
    LPWINE_DRIVER	lpDrv = NULL;
    char		drvName[128];

    TRACE("(%s, %s, %08lX);\n", debugstr_a(lpDriverName), debugstr_a(lpSectionName), lParam2);

    if (!lpDriverName || !*lpDriverName) return 0;

    if (lpSectionName == NULL) {
	strcpy(drvName, lpDriverName);

	if ((lpDrv = DRIVER_TryOpenDriver16(drvName, lParam2)))
	    goto the_end;
	/* in case hDriver is NULL, search in Drivers section */
	lpSectionName = "Drivers";
    }
    if (GetPrivateProfileStringA(lpSectionName, lpDriverName, "",
				 drvName, sizeof(drvName), "SYSTEM.INI") > 0) {
	lpDrv = DRIVER_TryOpenDriver16(drvName, lParam2);
    }
    if (!lpDrv) {
	TRACE("Failed to open driver %s from system.ini file, section %s\n", debugstr_a(lpDriverName), debugstr_a(lpSectionName));
	return 0;
    }
 the_end:
    TRACE("=> %04x / %p\n", lpDrv->hDriver16, lpDrv);
    return lpDrv->hDriver16;
}
开发者ID:howard5888,项目名称:wineT,代码行数:32,代码来源:driver16.c


示例10: gServerConnectionFix

void gServerConnectionFix()
{
	//char ConnectIP[] = "127.0.0.1";


	//char ConnectIP[28];
    GetPrivateProfileStringA("LOGIN", "ConnectAddress", "127.0.0.1", ConnectIP, 28, ".\\config.ini");


	char *MainAddr_Eng = (char*)(0x011AFAF2);
	memset(MainAddr_Eng,0,28);
	//memcpy(MainAddr_Eng,"127.0.0.1",13);
	memcpy(MainAddr_Eng,ConnectIP,strlen(ConnectIP));
	
	char MainVersion[6] = "22858";
	char *Version   = (char*)(0x011B0F1A+6);
	memset(Version,0,6);
	memcpy(Version,MainVersion,strlen(MainVersion));


	char MainSerial[17] = "mUuJnr3Cdqp8hvxT";
	char *SERIAL   = (char*)(0x011B0F2A-2);
	memset(SERIAL,0,17);
	memcpy(SERIAL,MainSerial,strlen(MainSerial));
	//
	SetByte((LPVOID)(0x00FE6910+4),0xFF);	
	SetByte((LPVOID)(0x00FE6910+5),0x15);	
	SetByte((LPVOID)(0x00FE6910+6),0x90);	
	SetByte((LPVOID)(0x00FE6910+7),0x92);	
	SetByte((LPVOID)(0x00FE6910+8),0x01);	
	SetByte((LPVOID)(0x00FE6910+8),0x01);	

}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:33,代码来源:Fix.cpp


示例11: ReputationsInit

void ReputationsInit() {
	int count;
	if(count=GetPrivateProfileIntA("Misc", "CityRepsCount", 0, ini)) {
		repList=new CityRep[count];
		char buf[512];
		GetPrivateProfileStringA("Misc", "CityRepsList", "", buf, 512, ini);
		char* end;
		char* start=buf;
		for(int i=0;i<count;i++) {
			end=strchr(start,':');
			*end='\0';
			repList[i].cityID=atoi(start);
			start=end+1;
			if(i==count-1) {
				repList[i].globalID=atoi(start);
			} else {
				end=strchr(start,',');
				*end='\0';
				repList[i].globalID=atoi(start);
				start=end+1;
			}
		}

		SafeWrite32(0x43BEA5, (DWORD)&repList[0].cityID);
		SafeWrite32(0x43BF3C, (DWORD)&repList[0].cityID);
		SafeWrite32(0x43BF4C, (DWORD)&repList[0].globalID);
		SafeWrite32(0x43C03E, count*8);
	}
}
开发者ID:Vennor,项目名称:sfall,代码行数:29,代码来源:Reputations.cpp


示例12: config_load_a

BOOL config_load_a(HMODULE module,CONFIG_BINDING_A* binding){
	char path[MAX_PATH];
	GetModuleFileNameA(module,path,MAX_PATH);
	for(int i=strlen(path)-1;i>=0;i--){
		if(path[i]=='\\'){
			path[i]='\0';
			break;
		}
	}
	strcat(path,"\\config.ini");
	PCONFIG_BINDING_A b;
	int i=0;
	char buffer[32767];
	int l;
	while((b=binding+(i++))->section){
		switch(b->type){
			case CONFIG_TYPE_STRING:
				l = GetPrivateProfileStringA(b->section,b->key,b->def.asString,buffer,32767,path);
				if(buffer[0]==0&&b->def.asString==NULL){
					*(b->val.asString)=NULL;
				}else{
					*(b->val.asString)=(char*)malloc(sizeof(char)*(strlen(buffer)+1));
					strcpy(*(b->val.asString),buffer);
				}
				break;
			case CONFIG_TYPE_INT:
				*(b->val.asInt) = GetPrivateProfileIntA(b->section,b->key,b->def.asInt,path);
				break;
		}
	}
	return TRUE;
}
开发者ID:pengjiang80,项目名称:win32-dhcp-filter-and-logger,代码行数:32,代码来源:config.cpp


示例13: GetPrivateProfileStringA

std::string MiscUtil::getINIString( const char * key, const char *app_name){
        
    char buffer[512];
    GetPrivateProfileStringA( app_name, key, "", buffer, 512,".\\settings.ini");

    return std::string(buffer);
}
开发者ID:MA5YK,项目名称:AmibrokerFeeder,代码行数:7,代码来源:misc_util.cpp


示例14: memset

HRESULT CShellExt::Initialize(LPCITEMIDLIST pidlFolder, LPDATAOBJECT pDataObj, HKEY hProgID)
{
	memset(_vc_path, 0, MAX_PATH*2);
	char inifile[MAX_PATH] = {0};
	char drive[_MAX_DRIVE*2] = {0};
	char dir[_MAX_DIR*2] = {0};


	GetModuleFileNameA(g_hInstance, inifile, MAX_PATH);
	//MessageBoxA(NULL, inifile, "", MB_OK);

	errno_t err;
	err = _splitpath_s(inifile, 
		drive,
		_MAX_DRIVE,
		dir,
		_MAX_DIR,
		NULL, 0, 
		NULL, 0);
	err = _makepath_s(inifile, _MAX_PATH, drive, dir, "zShellExt", "ini");

	GetPrivateProfileStringA("VS2008", "path", "", _vc_path, MAX_PATH*2, inifile);
	//MessageBoxA(NULL, _vc_path, "", MB_OK);
	return S_OK;
}
开发者ID:grimtraveller,项目名称:utocode,代码行数:25,代码来源:ShellExt.cpp


示例15: GetModuleFileNameA

void CVideoEyeApp::LoadLaguage()
{
	//配置文件路径
	char conf_path[300]={0};
	//获得exe绝对路径
	GetModuleFileNameA(NULL,(LPSTR)conf_path,300);//
	//获得exe文家夹路径
	strrchr( conf_path, '\\')[0]= '\0';//
	strcat(conf_path,"\\configure.ini");
	//存储属性的字符串
	char conf_val[300]={0};

	if((_access(conf_path, 0 )) == -1 ){  
		//配置文件不存在,直接返回
	}else{
		GetPrivateProfileStringA("Settings","language",NULL,conf_val,300,conf_path);
		if(strcmp(conf_val,"Chinese")==0){
			SetThreadUILanguage(MAKELCID(MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED), SORT_DEFAULT));
		}else if(strcmp(conf_val,"English")==0){
			SetThreadUILanguage(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT));
		}
		
	}
	return;
}
开发者ID:Guokr1991,项目名称:VideoEye,代码行数:25,代码来源:VideoEye.cpp


示例16: GetPrivateProfileStringA

string Options::getParameter(string section, string parameter, string defaultValue) {
    char param[256];
    
    GetPrivateProfileStringA(section.c_str(), parameter.c_str(), defaultValue.c_str(), param, 100, configPath.c_str());
    
    return param;
}
开发者ID:PyatkinAleksey,项目名称:ftp_client_gui,代码行数:7,代码来源:Options.cpp


示例17: getIniValue

bool getIniValue(string filename,string section,string key,string defultValue,string& value){
	

	char lpBuffer[PATH_BUFFER_LENGTH];
	ZeroMemory(lpBuffer,PATH_BUFFER_LENGTH);

	DWORD nBufferLength = GetCurrentDirectoryA(
									PATH_BUFFER_LENGTH,
									lpBuffer
								);
	string path = ""; 
	if (!nBufferLength) return false;

	path=lpBuffer;
	path+="\\";
	path+=filename;
	

	ZeroMemory(lpBuffer,PATH_BUFFER_LENGTH);

	nBufferLength=  GetPrivateProfileStringA(						  
						  section.c_str(),
						  key.c_str(),
						  defultValue.c_str(),
						  lpBuffer,
						  PATH_BUFFER_LENGTH,
						  path.c_str()
						);

	if (!nBufferLength) return false;

	value = lpBuffer;
	return true;

}
开发者ID:witwall,项目名称:planetariumfd,代码行数:35,代码来源:ConfigIni.cpp


示例18: strcat

bool tNetworkServer::Init(boost::intrusive_ptr<tINetworkServer> s){

	LOG_DEBUG << "tNetworkServer::Init()";

	this->_storage=s;
	char cc[100];
	::GetCurrentDirectoryA(100,cc);
	strcat(cc,"\\config.ini");
	DWORD res=GetPrivateProfileStringA("Network", "interfaceServer", "127.0.0.1", _interface, 100, cc);
	LOG_DEBUG << cc << _interface;
//	if (memcmp(cInterface,"auto",4)==0)	GetDefaultIP(cInterface);
//	printf("\nSelected Network interface:%s\n",cInterface);

// шаг 1 - подключение библиотеки 
	WSADATA wsaData;
    if (WSAStartup(MAKEWORD(2,2), &wsaData)){
		LOG_ERROR << "WSAStartup error: " << WSAGetLastError();
		return false;
    }
	LOG_DEBUG << "WSAStartup() - OK";
	for (int i=0;i<5;i++){
		this->_clients[i].used=false;
		ZeroMemory(&this->_clients[i].clientAddrForRecv,sizeof(sockaddr)) ;
		ZeroMemory(&this->_clients[i].mInfo,sizeof(tNetInfo));
	}
	return true;
}
开发者ID:sirdyf,项目名称:ENEV_2_261,代码行数:27,代码来源:tNetworkServer.cpp


示例19: memset

void PatsApiDealer::ReadIniConfig()
{ // 登录需要的参数
	m_useSimEngine = 0;
	memset(m_szTraderAccount,   0, sizeof(m_szTraderAccount));
	m_useSimEngine = GetPrivateProfileIntA("PATSAPIDEALER","SIMENGINE_DEALER",0,".\\AIB.ini");
	GetPrivateProfileStringA("PATSAPIDEALER", "TRADER_ACCOUNT", "", m_szTraderAccount, 21, ".\\AIB.ini");
	TRACE_LOG("PatsApiDealer ReadIniConfig UseSimEngine:%d, TraderAccount:%s.",m_useSimEngine,m_szTraderAccount);
}
开发者ID:marco-sun,项目名称:arbi6,代码行数:8,代码来源:PatsApiDealer.cpp


示例20: AfxSocketInit

BOOL CLLKCLIApp::InitInstance()
{

	AfxSocketInit();

	AfxEnableControlContainer();

	// Standard initialization
	// If you are not using these features and wish to reduce the size
	//  of your final executable, you should remove from the following
	//  the specific initialization routines you do not need.

#ifdef _AFXDLL
	Enable3dControls();			// Call this when using MFC in a shared DLL
#else
	Enable3dControlsStatic();	// Call this when linking to MFC statically
#endif

	GetPrivateProfileStringA("SERVER_INFO","IP","127.0.0.1",ip,sizeof(ip),"./set.ini");
	char strPort[5];
	GetPrivateProfileStringA("SERVER_INFO","PORT","5601",strPort,sizeof(strPort),"./set.ini");
	port = atoi(strPort);
	m_pSockThd = new CSockThd;
	m_pSockThd->CreateThread();

	CLLKCLIDlg login;
	int nResponse = login.DoModal();

	if(nResponse == IDCANCEL)
		return FALSE;

	CLLKHome home;
	home.m_uid=userInfo.id;
	home.m_nick=userInfo.nick;
	home.m_score=userInfo.type;
	if(userInfo.sex==0){
		home.m_sex="Å®";
	}
	else{
		home.m_sex="ÄÐ";
	}
	m_pMainWnd = &home;
	home.DoModal();

	return FALSE;
}
开发者ID:dongzy08,项目名称:picture-matching,代码行数:46,代码来源:LLKCLI.cpp



注:本文中的GetPrivateProfileStringA函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetPrivateProfileStringW函数代码示例发布时间:2022-05-30
下一篇:
C++ GetPrivateProfileString函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap