1/03/2017

In MFC, File exist check and delete the file, example source code.



If file exist then delete the file, example source code in MFC

< github code >
___

MFC Encode / Decode example souce code



WtoC function code is here
http://study.marearts.com/2017/01/unicode-cstring-convert-to-char.html

And refer to GetMacAddress code
http://study.marearts.com/2017/01/get-mac-address-in-mfc.html

Encode code
//

..

Decode code
//

..

Unicode CString convert to char *

The returned char * will need to be freed after use.


< gist code start >

< gist code end >


#tags
wchar_t, WtoC, WideCharToMultiByte, WideCharToMultiByte

useful site for CString converting


http://www.flounder.com/cstring.htm#Converting%20a%20CString%20to%20an%20integer


Get Mac Address in MFC


GetMacAddress in MFC

Get by using GetAdaptersInfo function
//

..
Get by using ip address
//If localhost -> GetMacAddress(_T("*"));
//if have ip -> GetMacAddress(_T("192.168.1.1"));//

..