Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to close Handle in MSVC++ 1.52

How to close Handle in MSVC++ 1.52

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++sysadminagentic-aidata-structures
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    Hi, I got a problem in my programmming project. I need to develop an agent program that connect between server and client. The matter is I need to develop it in Win 3.1 and MSVC++ 1.52. So, I chagned some api functions and I could connect sockets between win 2000 server and win 3.1 client. However, whenever I try to run some functions after accepting socket and checking the IP, agent program makes "Stack Overflow" error. But no variable initiation is exeist after that. So, I wanna use Handle for sockets as I did in Win 2000. Is this the right way? If so, Could you please let me know the api function that close handle like CloseHandle in MSVC++ 6.0? Thanks in advance.

    A A 2 Replies Last reply
    0
    • A Anonymous

      Hi, I got a problem in my programmming project. I need to develop an agent program that connect between server and client. The matter is I need to develop it in Win 3.1 and MSVC++ 1.52. So, I chagned some api functions and I could connect sockets between win 2000 server and win 3.1 client. However, whenever I try to run some functions after accepting socket and checking the IP, agent program makes "Stack Overflow" error. But no variable initiation is exeist after that. So, I wanna use Handle for sockets as I did in Win 2000. Is this the right way? If so, Could you please let me know the api function that close handle like CloseHandle in MSVC++ 6.0? Thanks in advance.

      A Offline
      A Offline
      Anthony_Yio
      wrote on last edited by
      #2

      Why not try to install platform SDK? Probably it could solve the API not exist problem. Sonork 100.41263:Anthony_Yio Life is about experiencing ...

      S 1 Reply Last reply
      0
      • A Anthony_Yio

        Why not try to install platform SDK? Probably it could solve the API not exist problem. Sonork 100.41263:Anthony_Yio Life is about experiencing ...

        S Offline
        S Offline
        Steve S
        wrote on last edited by
        #3

        Life is about reading ;) This person is trying to use Win3.x, not a Win32 version, so Platform SDK won't help... Steve S

        J 1 Reply Last reply
        0
        • A Anonymous

          Hi, I got a problem in my programmming project. I need to develop an agent program that connect between server and client. The matter is I need to develop it in Win 3.1 and MSVC++ 1.52. So, I chagned some api functions and I could connect sockets between win 2000 server and win 3.1 client. However, whenever I try to run some functions after accepting socket and checking the IP, agent program makes "Stack Overflow" error. But no variable initiation is exeist after that. So, I wanna use Handle for sockets as I did in Win 2000. Is this the right way? If so, Could you please let me know the api function that close handle like CloseHandle in MSVC++ 6.0? Thanks in advance.

          A Offline
          A Offline
          Antony M Kancidrowski
          wrote on last edited by
          #4

          Is it possible for you to post a snippet of code where you get the Stack Overflow? I don't envy you still developing 16-bit on 1.52. I am glad I no longer need to use this compiler!;) Ant.

          1 Reply Last reply
          0
          • S Steve S

            Life is about reading ;) This person is trying to use Win3.x, not a Win32 version, so Platform SDK won't help... Steve S

            J Offline
            J Offline
            Juergen Froehlich
            wrote on last edited by
            #5

            When developing socket programs under Win16 the WinSock API (Version 1.1) must be used. (See http://www.sockets.com/winsock.htm[^]). In short... You create a socket with the socket() function. You connect a client socket with the connect(..) function. You read data from a socket with the recv() function (or if asychron what it a must under Win16 via WSAAsyncSelect and windows messaging on FD_READ) You close a connected socket with the closesocket() function. For using this function you must include the winsock.h header. (In the latest MSVC 1.52c version this is included). A very good book for WinSock Programming under Win16 is named book on the website of the above link: Bob Quinn "Windows Sockets Network Programming" A pendant for CloseHandle() in Win32 is not known under Win16. Here you have to handle all socket specific functions with the WinSock API.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups