Re: CString to const char*
- From: "NickP" <a@xxxxx>
- Date: Wed, 27 Sep 2006 14:45:03 +0100
Hi
I was thinking along the lines of gethostbyname which asks for const
char*.
I know the sockets use Byte arrays, that wasn't actually the problem to
be totally honest.
Anyway, not to worry now I have a solution. Thanks for your time.
Nick.
"Jochen Kalmbach [MVP]" <nospam-Jochen.Kalmbach@xxxxxxxxx> wrote in message
news:OipR4nj4GHA.3556@xxxxxxxxxxxxxxxxxxxxxxx
Hello NickP!
BTW, you can use TCHAR instead of char and use your normal functions
(MessageBox instead of MessageBoxA) and avoid all the hassle...
Unfortunately I do not have control over the methods being called, i.e.
the socket functions, or are there TCHAR equivilents?
Sockets do neither know about "char" nor about "wchar_t" (and also not
about TCHAR)!!!
It just accepts an pointer to a byte-array (which is char*).
What you provide in this array is up to you. You can sent whatever you
want. This has nothing to do with char*/wchar_t* not TCHAR*!
Read the specification of your data which is required by the receiver of
the data-stream; then you know what to send!
Greetings
Jochen
.
- References:
- CString to const char*
- From: NickP
- Re: CString to const char*
- From: Abdo Haji-Ali
- Re: CString to const char*
- From: NickP
- Re: CString to const char*
- From: Jochen Kalmbach [MVP]
- CString to const char*
- Prev by Date: Re: CString to const char*
- Next by Date: VC++2005 executables much slower than VC++6????
- Previous by thread: Re: CString to const char*
- Next by thread: VC++2005 executables much slower than VC++6????
- Index(es):