A tricky one :o)
-
Hi: I'm a newbie Visual C ++ programmer, and I'm trying to do a Simple chat using winsock.ocx, I have already done one in VB5 but now I would like to do it in VC. Mainly, i'm having problems with .Connect metod, I don't understand what Const VARIANT &RemoteHost and Const VARIANT &RemotePort means. PD: I have a chat example but it uses API and i would like to do it just using winsock.ocx. Thanks and I hope you help.:D This is the strangest life I've ever known.
-
Hi: I'm a newbie Visual C ++ programmer, and I'm trying to do a Simple chat using winsock.ocx, I have already done one in VB5 but now I would like to do it in VC. Mainly, i'm having problems with .Connect metod, I don't understand what Const VARIANT &RemoteHost and Const VARIANT &RemotePort means. PD: I have a chat example but it uses API and i would like to do it just using winsock.ocx. Thanks and I hope you help.:D This is the strangest life I've ever known.
RaulGonzalez wrote: Mainly, i'm having problems with .Connect metod, I don't understand what Const VARIANT &RemoteHost and Const VARIANT &RemotePort means. These parameters it is asking for is the "address-of" by the "&" sign for both the RemoteHost and the RemotePort variables being passed to the function. I would suggest that you read Andrew Peace's article on pointers. A Beginner's Guide to Pointers[^]
Nick Parker
You see the Standards change. - Fellow co-worker
-
RaulGonzalez wrote: Mainly, i'm having problems with .Connect metod, I don't understand what Const VARIANT &RemoteHost and Const VARIANT &RemotePort means. These parameters it is asking for is the "address-of" by the "&" sign for both the RemoteHost and the RemotePort variables being passed to the function. I would suggest that you read Andrew Peace's article on pointers. A Beginner's Guide to Pointers[^]
Nick Parker
You see the Standards change. - Fellow co-worker
ok, I'm on it, thanks. Um, do you know where could i get a chat sample using winsock.ocx ? :o) This is the strangest life I've ever known.
-
ok, I'm on it, thanks. Um, do you know where could i get a chat sample using winsock.ocx ? :o) This is the strangest life I've ever known.
Sample code in C++ is probably going to use the APIs, since That's How It's Done in C++. (I don't even have winsock.ocx on my system, either) --Mike-- When 900 years old you reach, look as good you will not. Hmm. 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm
-
ok, I'm on it, thanks. Um, do you know where could i get a chat sample using winsock.ocx ? :o) This is the strangest life I've ever known.
RaulGonzalez wrote: ok, I'm on it, thanks. Um, do you know where could i get a chat sample using winsock.ocx ? :o) Are you using MFC?
Nick Parker
You see the Standards change. - Fellow co-worker
-
Sample code in C++ is probably going to use the APIs, since That's How It's Done in C++. (I don't even have winsock.ocx on my system, either) --Mike-- When 900 years old you reach, look as good you will not. Hmm. 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm
Michael Dunn wrote: (I don't even have winsock.ocx on my system, either) Mike, It should come with Visual Studio however the only place I have ever seen it used is with Visual Basic. :eek: It's in the Windows\System32 folder.
Nick Parker
You see the Standards change. - Fellow co-worker
-
RaulGonzalez wrote: ok, I'm on it, thanks. Um, do you know where could i get a chat sample using winsock.ocx ? :o) Are you using MFC?
Nick Parker
You see the Standards change. - Fellow co-worker
Yes, i'm using MFC AppWizard (exe)... This is the strangest life I've ever known.
-
Yes, i'm using MFC AppWizard (exe)... This is the strangest life I've ever known.
RaulGonzalez wrote: Yes, i'm using MFC AppWizard (exe)... There is already a Socket class written, you might also want to read about this: Beginning Winsock Programming - Simple TCP server[^] Beginning Winsock Programming - Simple TCP client[^] Beginning Winsock Programming - Multithreaded TCP server with client[^]
Nick Parker
You see the Standards change. - Fellow co-worker
-
RaulGonzalez wrote: Yes, i'm using MFC AppWizard (exe)... There is already a Socket class written, you might also want to read about this: Beginning Winsock Programming - Simple TCP server[^] Beginning Winsock Programming - Simple TCP client[^] Beginning Winsock Programming - Multithreaded TCP server with client[^]
Nick Parker
You see the Standards change. - Fellow co-worker
Um, yeah, I had already seen these samples but Nish uses API :( thanks anyway :) This is the strangest life I've ever known.