Generic programming question

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
I could implement either of these with little change elsewhere and with the same result.

Code:
ULONGLONG LocalDateTimeToUTCFileTime( LPWSTR szDateTime )

BOOL LocalDateTimeToUTCFileTime( LPWSTR szDateTime, ULONGLONG *pftDueUTC )
The first, and one call to it, requires 32 fewer bytes in .text while the second seems more in keeping with the MS way of doing things and avoids passing 64-bit values (inefficient on a 32-bit machine?).

Is one preferred over the other? Thanks.
 
#3
On Sat, 02 Apr 2011 15:23:40 -0400, you wrote:

|---Quote---
|> ULONGLONG LocalDateTimeToUTCFileTime( LPWSTR szDateTime )
|>
|> BOOL LocalDateTimeToUTCFileTime( LPWSTR szDateTime, ULONGLONG *pftDueUTC )
|---End Quote---
|[...]
|
|
|---Quote---
|> Is one preferred over the other?
|---End Quote---

|If LocalDateTimeToUTCFileTime can fail, the second one should be preferred.

In the first form, a return of 0 indicates failure. I have no problem with
that.