Click here to Skip to main content
15,905,508 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: WinSock 2 + UNICODE / Win32 Pin
Stephen Hewitt19-Apr-10 14:41
Stephen Hewitt19-Apr-10 14:41 
GeneralRe: WinSock 2 + UNICODE / Win32 Pin
Fareed Rizkalla19-Apr-10 15:45
Fareed Rizkalla19-Apr-10 15:45 
hostent *ResolveHost;
wchar_t *HosName = L"www.codeproject.com";
MessageBox(g_hWindow, HosName, L"Tracing", NULL);
char *HostName = new char[wcslen(HosName)+1];
wcstombs(HostName, HosName, wcslen(HosName)+1);
wchar_t buf[100];
swprintf(buf, L"Multi-Byte: %s", HostName);
MessageBox(g_hWindow, (LPCWSTR)HostName, L"Tracing", NULL);
ResolveHost = gethostbyname(HostName);


Well I've been using the Network Monitor to see how the resolving is going. The multi byte string has some random conversions in it, because the IP the program is trying to connect to is consistent in the begging and changing in the end.



Casting the best way to shut up a compiler. Cool | :cool:
Question[SOLVED]Problem using dmColor member of DEVMODE struct [modified] Pin
hhh19-Apr-10 7:14
hhh19-Apr-10 7:14 
QuestionUnhandled exception Pin
PankajB19-Apr-10 5:59
PankajB19-Apr-10 5:59 
AnswerRe: Unhandled exception Pin
Richard MacCutchan19-Apr-10 6:14
mveRichard MacCutchan19-Apr-10 6:14 
GeneralRe: Unhandled exception Pin
PankajB19-Apr-10 6:50
PankajB19-Apr-10 6:50 
GeneralRe: Unhandled exception Pin
Richard MacCutchan19-Apr-10 6:57
mveRichard MacCutchan19-Apr-10 6:57 
AnswerRe: Unhandled exception Pin
Stephen Hewitt19-Apr-10 14:09
Stephen Hewitt19-Apr-10 14:09 
GeneralRe: Unhandled exception Pin
ramana.g19-Apr-10 19:30
ramana.g19-Apr-10 19:30 
GeneralRe: Unhandled exception Pin
Stephen Hewitt19-Apr-10 21:48
Stephen Hewitt19-Apr-10 21:48 
GeneralRe: Unhandled exception Pin
Saurabh.Garg19-Apr-10 19:51
Saurabh.Garg19-Apr-10 19:51 
GeneralRe: Unhandled exception Pin
Stephen Hewitt19-Apr-10 21:48
Stephen Hewitt19-Apr-10 21:48 
Questiontransaction - rollback in C ??? Pin
aa_zz19-Apr-10 0:20
aa_zz19-Apr-10 0:20 
AnswerRe: transaction - rollback in C ??? PinPopular
CPallini19-Apr-10 0:39
mveCPallini19-Apr-10 0:39 
AnswerRe: transaction - rollback in C ??? PinPopular
KarstenK19-Apr-10 1:09
mveKarstenK19-Apr-10 1:09 
GeneralRe: transaction - rollback in C ??? Pin
aa_zz19-Apr-10 22:29
aa_zz19-Apr-10 22:29 
GeneralRe: transaction - rollback in C ??? Pin
CPallini19-Apr-10 22:38
mveCPallini19-Apr-10 22:38 
GeneralRe: transaction - rollback in C ??? Pin
aa_zz19-Apr-10 22:45
aa_zz19-Apr-10 22:45 
GeneralRe: transaction - rollback in C ??? Pin
CPallini19-Apr-10 22:52
mveCPallini19-Apr-10 22:52 
GeneralRe: transaction - rollback in C ??? Pin
KarstenK19-Apr-10 22:42
mveKarstenK19-Apr-10 22:42 
GeneralRe: transaction - rollback in C ??? Pin
aa_zz20-Apr-10 21:22
aa_zz20-Apr-10 21:22 
GeneralRe: transaction - rollback in C ??? Pin
KarstenK20-Apr-10 21:35
mveKarstenK20-Apr-10 21:35 
QuestionBlack Berry not working with AT commands to Send SMS. Pin
Le@rner19-Apr-10 0:08
Le@rner19-Apr-10 0:08 
AnswerRe: Black Berry not working with AT commands to Send SMS. Pin
Code-o-mat19-Apr-10 6:21
Code-o-mat19-Apr-10 6:21 
QuestionSDI Data Transfer (Windows Explorer) Pin
hellogany18-Apr-10 23:04
hellogany18-Apr-10 23:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.