Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Generic programming question

May
12,845
164
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.
 
> ULONGLONG LocalDateTimeToUTCFileTime( LPWSTR szDateTime )
>
> BOOL LocalDateTimeToUTCFileTime( LPWSTR szDateTime, ULONGLONG *pftDueUTC )
[...]

> Is one preferred over the other? Â*Thanks.

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

Â* Â* Juanma
 
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.
 

Similar threads

Back
Top