Re: SYSTEMTIME and Conversion
- From: "Simes" <Simes@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 29 Jul 2005 04:05:03 -0700
This is my first attempt at C++ and it's been a good 10 years since I last
coded in C so forgive me for being dense!
I remember getting very confused by pointers and pointers to pointers and
addresses even then so I need a little clarification!
SYSTEMTIME p_stTime;
TCHAR *tcDatHelp = (TCHAR*)LocalAlloc(LPTR, 40);
CString csDateformat = _T("dd'.'MM'.'yyyy");
GetSystemTime(&p_stTime);
GetDateFormat(NULL, NULL, p_stTime, (LPCTSTR) csDateformat, tcDatHelp,40);
I've added the necessary header includes and swapped around the odd * and &
but it's throwing up 'error C2664: 'GetDateFormatW' : cannot convert
parameter 3 from 'struct _SYSTEMTIME' to 'const struct _SYSTEMTIME *'
Not sure what the problem is!
Also, it's the Hour and Minute (HH:mm) I'm trying to get a hold of. I have
looked at the GetTimeFormat function but I'm now totally confused!
Many thanks for your patience!
Si
"Kerstin Pirrung" wrote:
>
> Haven't all of us already had this problem?
> I'm doing
>
> GetDateFormat(NULL, NULL, p_stTime, (LPCTSTR) csDateformat, tcDatHelp,40);
>
> with
>
> SYSTEMTIME * p_stTime;
> TCHAR * tcDatHelp = (TCHAR*)LocalAlloc(LPTR, 40);
> CString csDateformat = _T("dd'.'MM'.'yyyy");
>
> Kerstin
>
.
- Follow-Ups:
- Re: SYSTEMTIME and Conversion
- From: Bruce Eitman \(eMVP\)
- Re: SYSTEMTIME and Conversion
- References:
- SYSTEMTIME and Conversion
- From: Simes
- Re: SYSTEMTIME and Conversion
- From: Kerstin Pirrung
- SYSTEMTIME and Conversion
- Prev by Date: Re: Pocket PC Emulator
- Next by Date: Re: Problem with Switch Off - Pocket PC 2003
- Previous by thread: Re: SYSTEMTIME and Conversion
- Next by thread: Re: SYSTEMTIME and Conversion
- Index(es):
Relevant Pages
|