From: Rayne on
Hi all,

I would like to know if there are Windows-equivalent functions for
mempcpy() and uname(). I'm using VS .NET 2003.

Thank you.
From: David Lowndes on
>I would like to know if there are Windows-equivalent functions for
>mempcpy() and uname(). I'm using VS .NET 2003.

memcpy is a standard 'C' run-time function. Which parts returned by
uname are you interested in? There are Windows APIs such as
GetComputerName.

Dave
From: Giovanni Dicanio on
"David Lowndes" <DavidL(a)example.invalid> ha scritto nel messaggio
news:kkmhh5p1il2bone44qc4rblg9ujujf7o9a(a)4ax.com...
>>I would like to know if there are Windows-equivalent functions for
>>mempcpy() and uname(). I'm using VS .NET 2003.
>
> memcpy is a standard 'C' run-time function.

The OP asked for mem*p*cpy.

Giovanni



From: David Lowndes on
>>>I would like to know if there are Windows-equivalent functions for
>>>mempcpy() and uname(). I'm using VS .NET 2003.
>>
>> memcpy is a standard 'C' run-time function.
>
>The OP asked for mem*p*cpy.

Missed that!

Given the description of it:

"The mempcpy() function is nearly identical to the memcpy() function.
It copies n bytes from the object beginning at src into the object
pointed to by dest. But instead of returning the value of dest it
returns a pointer to the byte following the last written byte"

It's only different if the return value is used, and can presumably be
simulated with something like:

static_cast<BYTE*>(memcpy( pDest, pSrc, Num )) + Num;

Dave
From: Rayne on
On Dec 4, 5:50 pm, David Lowndes <Dav...(a)example.invalid> wrote:
> >I would like to know if there are Windows-equivalent functions for
> >mempcpy() and uname(). I'm using VS .NET 2003.
>
> memcpy is a standard 'C' run-time function. Which parts returned by
> uname are you interested in? There are Windows APIs such as
> GetComputerName.
>
> Dave

Thanks. I think GetComputerNameEx with ComputerNameDnsHostname is most
suitable. But I can't use the function. I have

status = GetComputerNameEx(ComputerNameDnsHostname, buf, &dwSize);

and I get the errors

error C2065: 'ComputerNameDnsHostname': undeclared identifier
error C3861: 'GetComputerNameEx': identifier not found, even with
argument-dependent lookup

I have #include <windows.h>, and using GetComputerName(buf, &dwSize);
does not give me any errors.

How do I get GetComputerNameEx to work?