Converting from ANSI to Unicode
Posted
by Rayne
on Stack Overflow
See other posts from Stack Overflow
or by Rayne
Published on 2010-02-09T07:16:59Z
Indexed on
2010/04/05
13:03 UTC
Read the original article
Hit count: 340
Hi all,
I'm using Visual Studio .NET 2003, and I'm trying to convert a program written in purely ANSI characters to be independent of Unicode/Multi-byte characters.
The program has a callback function of pcap_loop, called "got_packet". It's defined as
void got_packet(u_char *user, const struct pcap_pkthdr *header, const u_char *cpacket)
{
USES_CONVERSION;
_TUCHAR *packet;
packet = A2T(cpacket);
...
}
However, I get the error message
error C2440: 'type cast': cannot convert from 'const u_char *' to 'ATL::CA2WEX<>'
How do fix this?
Thank you.
Regards, Rayne
© Stack Overflow or respective owner