Click here to Skip to main content
15,908,437 members
Home / Discussions / Mobile
   

Mobile

 
AnswerRe: How to use a timer in a dll Pin
KingsGambit7-Mar-10 19:22
KingsGambit7-Mar-10 19:22 
GeneralRe: How to use a timer in a dll Pin
anuhoho7-Mar-10 20:22
anuhoho7-Mar-10 20:22 
AnswerRe: How to use a timer in a dll Pin
Alain Rist7-Mar-10 21:39
Alain Rist7-Mar-10 21:39 
QuestionHow can i attach a dll in the start up Pin
anuhoho7-Mar-10 17:38
anuhoho7-Mar-10 17:38 
AnswerRe: How can i attach a dll in the start up Pin
KingsGambit7-Mar-10 19:25
KingsGambit7-Mar-10 19:25 
QuestionHow to program sleep in windows mobile Pin
anuhoho5-Mar-10 1:26
anuhoho5-Mar-10 1:26 
AnswerRe: How to program sleep in windows mobile Pin
Joel Ivory Johnson10-Mar-10 7:38
professionalJoel Ivory Johnson10-Mar-10 7:38 
QuestionSome problen in converting char * to LPCWSTR Pin
anuhoho4-Mar-10 19:56
anuhoho4-Mar-10 19:56 
Hi I am facing some problem in the following code .Actually I am not able to print the full data present in my LPCWSTR .Here is the code


....
SYSTEMTIME current_time;.

GetLocalTime(¤t_time);

char *str =new char[2000];

sprintf(str, "%4d/%2d/%2d  %2d:%2d:%2d:%2d\n", current_time.wYear,current_time.wMonth,current_time.wDay,current_time.wHour,current_time.wMinute,current_time.wSecond,current_time.wMilliseconds);  

int i;

wchar_t *pwc = (wchar_t *)malloc( sizeof( wchar_t ));

 i = mbstowcs( pwc, str, sizeof(str) );

 WriteToLogFile(pwc);

delete [] str;



In the log file I just want to print the year date and time but only the year gets printed. Here is the log file

void WriteToLogFile(LPCWSTR strData)
{
	try
	{ 
		ofstream  myfile;		
	    myfile.open("\\MyData\\Log.txt",ios::app);

				
	    int iSize = WideCharToMultiByte(CP_ACP,0,strData, -1, NULL, 0, NULL, NULL );

	    char* lpNarrow = new char[iSize];

            lpNarrow[0] = 0;

	    iSize= WideCharToMultiByte(CP_ACP, 0,strData, -1, lpNarrow, iSize, NULL, NULL );

		

	    myfile<<lpNarrow<<endl;
	
            delete [] lpNarrow;

           myfile.close();		
	}
	catch(...)
	{
	}
}



Any help on this..

Thanks in advance
AnswerRe: Some problen in converting char * to LPCWSTR Pin
Covean4-Mar-10 20:47
Covean4-Mar-10 20:47 
GeneralRe: Some problen in converting char * to LPCWSTR Pin
anuhoho4-Mar-10 22:31
anuhoho4-Mar-10 22:31 
AnswerRe: Some problen in converting char * to LPCWSTR Pin
Covean4-Mar-10 21:52
Covean4-Mar-10 21:52 
GeneralRe: Some problen in converting char * to LPCWSTR Pin
anuhoho4-Mar-10 22:33
anuhoho4-Mar-10 22:33 
GeneralRe: Some problen in converting char * to LPCWSTR Pin
Covean4-Mar-10 22:55
Covean4-Mar-10 22:55 
GeneralRe: Some problen in converting char * to LPCWSTR Pin
anuhoho5-Mar-10 1:20
anuhoho5-Mar-10 1:20 
Questioni want to get all phone number in iphone. Pin
buffering833-Mar-10 19:23
buffering833-Mar-10 19:23 
QuestionDataGrid In Pocket PC Pin
ejaz_pk2-Mar-10 18:05
ejaz_pk2-Mar-10 18:05 
QuestionI need help in creating file system filter Pin
xiaowenjie27-Feb-10 22:24
xiaowenjie27-Feb-10 22:24 
QuestionDownloading CSV to database? Pin
BM7727-Feb-10 6:21
BM7727-Feb-10 6:21 
AnswerRe: Downloading CSV to database? Pin
BM7727-Feb-10 6:22
BM7727-Feb-10 6:22 
QuestionForm unload method in pocket pc application Pin
ejaz_pk26-Feb-10 11:30
ejaz_pk26-Feb-10 11:30 
AnswerRe: Form unload method in pocket pc application Pin
yrishi2-Mar-10 2:21
yrishi2-Mar-10 2:21 
NewsVisionMobile invites you to join in the biggest Mobile Platform Survey to date, sponsored by O2 Litmus. Pin
Matos Kapetanakis26-Feb-10 4:59
Matos Kapetanakis26-Feb-10 4:59 
Question.NET CAB creation / installation fail Pin
hairy_hats25-Feb-10 23:38
hairy_hats25-Feb-10 23:38 
AnswerRe: .NET CAB creation / installation fail Pin
JUNEYT11-Apr-10 0:37
JUNEYT11-Apr-10 0:37 
QuestionNeed some help immediately Pin
anuhoho24-Feb-10 18:58
anuhoho24-Feb-10 18:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.