CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2002
    Location
    Boise Idaho
    Posts
    47

    Help: CSocket problem

    I am trying to use CSocket for the first time.. I am trying to write a basic server and can't seem to get it to create the server.. Attached is the class I created as a test.. Can anyone tell me what it is that I am doing wrong.. I have a demo class that I have been working off of and it looks pretty much identical.. It works, this one doesn't.. As far as I can tell the only difference is that I created this one in vs7 and the demo was created in vs6.
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2002
    Location
    Czech
    Posts
    251
    Sent files only contains CTestServerApp class, nothing from the CSocket.

    Btw.: InitInstance() of this class should contain the calling of function AfxSocketInit().

    David

  3. #3
    Join Date
    May 2002
    Location
    Boise Idaho
    Posts
    47

    Thanks

    Your right I posted the wrong source.. Sorry about that, it was very late when I got frustrated enough to toss up a post.. But you were right with the AfxSocketInit(); That fixed it..

    Thanks for the help..

    Paul

  4. #4
    Join Date
    Jun 2000
    Location
    Maryland
    Posts
    181
    Exactly where in the code did you put the function

    AfxSocketInit();
    ??

  5. #5
    Join Date
    Jan 2002
    Location
    Czech
    Posts
    251
    Into the InitInstance method of your CApp class.
    Code:
    BOOL CYourApp::InitInstance()
    {
         AfxSocketInit();
         ......
    }
    David

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured