Windows Develop Bookmark and Share   
 index > Windows Forms General > Socket Question
 

Socket Question

Are sockets available as objects that you can drag into a form? If they must be created from code, what headers do I need to include (I suppose specifically for winsock). How do I use SSL for my sockets? Where would I include the headers? The main .cpp file?

I tried including winsock.h in stdafx.h but every build failed with it not being able to find such a file.

I tried including it in my main Project.cpp I don't get the missing file error, but I do get an error telling me: error C2065: 'SOCKET' : undeclared identifier.

Start Chunk of Solution Learner Project.cpp:

// Learner Project.cpp : main project file.

#include "winsock2.h"
#include "stdafx.h"
#include "Main.h"

Socket Declaration:    

SOCKET OpenSocket;
Theisos  Wednesday, May 17, 2006 8:40 PM
Thanks.

This article looks like a good place to start with socket programming. Seems however, that I needed the Windows Server x86 SDK installed in order to take advantage of the Windows libraries that allowed the use of socket type classes among other things.

Is there an article somewhere about contructing and using custom classes with your own programs?
Theisos  Thursday, May 18, 2006 7:44 PM

This might be a good starting point for you to learn socket programming

http://www.codeproject.com/internet/client_server_socket.asp

Andreas Johansson  Thursday, May 18, 2006 9:21 AM
Thanks.

This article looks like a good place to start with socket programming. Seems however, that I needed the Windows Server x86 SDK installed in order to take advantage of the Windows libraries that allowed the use of socket type classes among other things.

Is there an article somewhere about contructing and using custom classes with your own programs?
Theisos  Thursday, May 18, 2006 7:44 PM
Andreas Johansson  Thursday, May 18, 2006 8:09 PM

You can use google to search for other answers

Custom Search

More Threads

• Keyboard-usb-hid-usageid
• Video capture in BackgroundWorker
• 'System.Security.SecurityException' when running .exe file from other than developermachine
• blank buttons - no text on start
• Webbrowser Zooming
• need help in form mouse event
• How to change System DPI programatically (C# Visual Studio 2005)
• ListView is not showing groups
• A generic error occurred in GDI+.
• Hiding Images with timer control