Click here to Skip to main content
15,909,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to dynamically modify menu in MDI app Pin
JerzyPeter14-Aug-01 6:26
JerzyPeter14-Aug-01 6:26 
AnswerRe: How to dynamically modify menu in MDI app Pin
Not Active14-Aug-01 7:01
mentorNot Active14-Aug-01 7:01 
GeneralRe: How to dynamically modify menu in MDI app Pin
JerzyPeter14-Aug-01 9:39
JerzyPeter14-Aug-01 9:39 
GeneralRe: How to dynamically modify menu in MDI app Pin
Tomasz Sowinski14-Aug-01 9:56
Tomasz Sowinski14-Aug-01 9:56 
GeneralRe: How to dynamically modify menu in MDI app Pin
JerzyPeter14-Aug-01 11:30
JerzyPeter14-Aug-01 11:30 
GeneralRe: How to dynamically modify menu in MDI app Pin
Tomasz Sowinski16-Aug-01 0:54
Tomasz Sowinski16-Aug-01 0:54 
GeneralRe: How to dynamically modify menu in MDI app Pin
JerzyPeter16-Aug-01 9:28
JerzyPeter16-Aug-01 9:28 
GeneralSimple socket problem under WinCE Pin
14-Aug-01 6:17
suss14-Aug-01 6:17 
Netmeisters,

I have a problem with what appears to be a very simple operation. I'd like to use sockets in a simple client application. Initially, to create and connect a socket, I did this:

CCeSocket mySock;
mySock.Create();
mySock.Connect(_T("dp1.derm.mcw.edu"),23501);

However, I'd now like to move to secure sockets, so I thought I'd use the socket handle rather than the socket class. So I changed to this:

SOCKET s;

s=socket(AF_INET, SOCK_STREAM, 0);
SOCKADDR_IN tcpaddr;
tcpaddr.sin_family=AF_INET;
tcpaddr.sin_port=htons(23501);
tcpaddr.sin_addr.s_addr=inet_addr
("dp1.derm.mcw.edu");
int res=connect(s, (SOCKADDR *)&tcpaddr, sizeof
(tcpaddr));
if (res==SOCKET_ERROR) {
CString err;
err.Format(_T("Error
d\n"),WSAGetLastError());
MessageBox(err);
}

This fails with an error 10049, "The requested address is not valid in its context".

I suppose I could use CCeSocket to create the socket and then get the socket handle from the class, but I am annoyed that this doesn't work. Why?

Thanks very much,



Matthew Fleming
mgf@mcw.edu
GeneralHelp! My App crashes and I've no idea why! Pin
14-Aug-01 6:16
suss14-Aug-01 6:16 
GeneralRe: Help! My App crashes and I've no idea why! Pin
Tomasz Sowinski14-Aug-01 7:35
Tomasz Sowinski14-Aug-01 7:35 
GeneralRe: Help! My App crashes and I've no idea why! Pin
14-Aug-01 22:03
suss14-Aug-01 22:03 
GeneralCArchive, Serializing & Schema Pin
Jason Teagle14-Aug-01 5:50
Jason Teagle14-Aug-01 5:50 
GeneralRe: CArchive, Serializing & Schema Pin
Tomasz Sowinski14-Aug-01 6:01
Tomasz Sowinski14-Aug-01 6:01 
GeneralRe: CArchive, Serializing & Schema Pin
Jason Teagle14-Aug-01 6:11
Jason Teagle14-Aug-01 6:11 
GeneralRe: CArchive, Serializing & Schema Pin
Jason Teagle14-Aug-01 6:12
Jason Teagle14-Aug-01 6:12 
GeneralRe: CArchive, Serializing & Schema Pin
Tomasz Sowinski14-Aug-01 6:27
Tomasz Sowinski14-Aug-01 6:27 
GeneralRe: CArchive, Serializing & Schema Pin
Jason Teagle14-Aug-01 6:36
Jason Teagle14-Aug-01 6:36 
GeneralCreateIpForwardEntry Pin
Martijn14-Aug-01 5:46
Martijn14-Aug-01 5:46 
GeneralIHTMLEditHost in combination with CHtmlView Pin
Juergen Woelke14-Aug-01 4:35
Juergen Woelke14-Aug-01 4:35 
GeneralSocket receive performance Pin
sato14-Aug-01 3:51
sato14-Aug-01 3:51 
GeneralSocket receive performance Pin
sato14-Aug-01 3:49
sato14-Aug-01 3:49 
GeneralDockable application needed ! Pin
14-Aug-01 3:39
suss14-Aug-01 3:39 
GeneralRe: Dockable application needed ! Pin
Paul A. Howes14-Aug-01 4:02
Paul A. Howes14-Aug-01 4:02 
Generaladding binary files Pin
lina14-Aug-01 3:39
lina14-Aug-01 3:39 
GeneralRe: adding binary files Pin
Chris Losinger14-Aug-01 4:03
professionalChris Losinger14-Aug-01 4:03 

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.