Skip to content
Tags

Logging in MFC

October 20, 2010

I often had a necessity to log data from webservice to verify the contents. And thought of implementing a function for that. And the result is here.


void CYourClass::WriteLog(CString sData, CString sFileName)

{
CStdioFile file;

if(file.Open(sFileName, CFile::modeCreate|CFile::modeWrite))

{

file.WriteString(sData);

}

}

 

Advertisements

From → Windows Mobile

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: