| From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
|---|---|
| To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
| Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, PG Patches <pgsql-patches(at)postgresql(dot)org> |
| Subject: | Re: pg_id.c windows fix |
| Date: | 2003-10-05 05:45:51 |
| Message-ID: | 20031004224132.F57459@megazone.bigpanda.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
On Sun, 5 Oct 2003, Bruce Momjian wrote:
>
> Can you tell me what Win32 compile environment can't handle a sizeof()
> as a function parameter?
>
> ! GetUserName(pw->pw_name, sizeof(pw->pw_name)-1);
>
> Does casting to DWORD help?
> > ! GetUserName(pw->pw_name, &pwname_size);
It looks like the second argument is supposed to be a pointer and probably
returns back the length actually used (if it follows the pattern of other
win32 calls)
It's something like:
BOOL GetUserName(
LPTSTR lpBuffer, // address of name buffer
LPDWORD nSize // address of size of name buffer
);
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephan Szabo | 2003-10-05 05:50:29 | Re: Open 7.4 items |
| Previous Message | Bruce Momjian | 2003-10-05 04:41:21 | Open 7.4 items |