Rayne
2010-02-08 09:21:17 UTC
Hi all,
I'm using Visual Studio .NET 2003, and I'm trying to write a program
that can compile in both Unicode and Multi-Byte. Hence, the use of
TCHAR. However, I'm getting errors on pcap functions and socket
functions:
error C2664: 'pcap_findalldevs': cannot convert parameter 2 from
'TCHAR[256]' to 'char *'
error C2664: 'pcap_lookupnet: cannot convert parameter 1 from
'TCHAR[5]' to 'const char *'
error C2664: 'pcap_loop: cannot convert parameter 3 from 'void
(_TUCHAR *, const pcap_pkthdr *, const _TUCHAR *)' to 'pcap_handler'
error C2664: 'pcap_open_live': cannot convert parameter 5 from
'TCHAR[256]' to 'char *'
error C2664: 'pcap_open_offline: cannot convert parameter 1 from
'TCHAR *' to 'const char *'
error C2664: 'recv': cannot convert parameter 2 from 'TCHAR *' to
'char *'
error C2664: 'send': cannot convert parameter 2 from 'TCHAR *' to
'const char *'
error C2664: 'setsockopt': cannot convert parameter 4 from 'const
TCHAR *' to 'const char *'
Please advise.
Thank you.
Regards,
Rayne
I'm using Visual Studio .NET 2003, and I'm trying to write a program
that can compile in both Unicode and Multi-Byte. Hence, the use of
TCHAR. However, I'm getting errors on pcap functions and socket
functions:
error C2664: 'pcap_findalldevs': cannot convert parameter 2 from
'TCHAR[256]' to 'char *'
error C2664: 'pcap_lookupnet: cannot convert parameter 1 from
'TCHAR[5]' to 'const char *'
error C2664: 'pcap_loop: cannot convert parameter 3 from 'void
(_TUCHAR *, const pcap_pkthdr *, const _TUCHAR *)' to 'pcap_handler'
error C2664: 'pcap_open_live': cannot convert parameter 5 from
'TCHAR[256]' to 'char *'
error C2664: 'pcap_open_offline: cannot convert parameter 1 from
'TCHAR *' to 'const char *'
error C2664: 'recv': cannot convert parameter 2 from 'TCHAR *' to
'char *'
error C2664: 'send': cannot convert parameter 2 from 'TCHAR *' to
'const char *'
error C2664: 'setsockopt': cannot convert parameter 4 from 'const
TCHAR *' to 'const char *'
Please advise.
Thank you.
Regards,
Rayne