本文整理汇总了C++中FConfigFile::WriteConfigFile方法的典型用法代码示例。如果您正苦于以下问题:C++ FConfigFile::WriteConfigFile方法的具体用法?C++ FConfigFile::WriteConfigFile怎么用?C++ FConfigFile::WriteConfigFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FConfigFile
的用法示例。
在下文中一共展示了FConfigFile::WriteConfigFile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main_AttemptConnection
static void main_AttemptConnection( )
{
char szBuffer[128];
// Update the GUI.
time( &g_tLastSentCommand );
main_SetState( STATE_CONNECTING );
sprintf( szBuffer, "Connecting to %s...", NETWORK_AddressToString( g_ServerAddress ));
main_UpdateStatusbar( szBuffer );
main_UpdateTrayTooltip( szBuffer );
GetDlgItemText( g_hDlg, IDC_SERVERIP, szBuffer, 128 );
// Save this server to our config file.
g_Config.SetSection( "Settings", true );
g_Config.SetValueForKey( "LastServer", szBuffer );
g_Config.WriteConfigFile( );
// Start listening for packets.
if ( g_hThread == NULL )
{
g_hThread = CreateThread( NULL, 0, main_Loop, 0, 0, 0 );
NETWORK_InitBuffer( &g_MessageBuffer, 8192, BUFFERTYPE_WRITE );
}
NETWORK_ClearBuffer( &g_MessageBuffer );
NETWORK_WriteByte( &g_MessageBuffer.ByteStream, CLRC_BEGINCONNECTION );
NETWORK_WriteByte( &g_MessageBuffer.ByteStream, PROTOCOL_VERSION );
NETWORK_LaunchPacket( &g_MessageBuffer, g_ServerAddress );
}