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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. VC++6.0 Interproc Communication

VC++6.0 Interproc Communication

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++javasysadminlinux
4 Posts 3 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.
  • Y Offline
    Y Offline
    Ylno
    wrote on last edited by
    #1

    In .NET we have the System.IO namespace providing convenient classes for Sockects and Pipes which ay be used for interprocess communication. How can one implement this in oldskool VC6? My requirements are as follows. I am writing a plugin for some legacy software for which there is a SDK which I can only get to compile with VC++6.0 compiler. I want to interface this code with both .NET and JAVA. I was thinking of implementing either a Socket server or Namedpipe in C# to act a a bridge between the VC6 code and .NET/JAVA. Requests from VC6 would be in the form of byte[] arrays and the C# bridge would interpret these requests, route them and eventually reply to the VC6 code which is awaiting a response. In summary I would like examples of the following in VC++6: - Use of threads - Socket/Pipes (or any other interproc comms method) - Invoking a process (other than a shell call to an executable) BTW non-MFC is required Any suggestions would be great. Best, Y

    _ D 2 Replies Last reply
    0
    • Y Ylno

      In .NET we have the System.IO namespace providing convenient classes for Sockects and Pipes which ay be used for interprocess communication. How can one implement this in oldskool VC6? My requirements are as follows. I am writing a plugin for some legacy software for which there is a SDK which I can only get to compile with VC++6.0 compiler. I want to interface this code with both .NET and JAVA. I was thinking of implementing either a Socket server or Namedpipe in C# to act a a bridge between the VC6 code and .NET/JAVA. Requests from VC6 would be in the form of byte[] arrays and the C# bridge would interpret these requests, route them and eventually reply to the VC6 code which is awaiting a response. In summary I would like examples of the following in VC++6: - Use of threads - Socket/Pipes (or any other interproc comms method) - Invoking a process (other than a shell call to an executable) BTW non-MFC is required Any suggestions would be great. Best, Y

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      Threads can be created using the CreateThread API - http://msdn.microsoft.com/en-us/library/windows/desktop/ms682453(v=vs.85).aspx[^] Pipes can be created either using CreatePipe or CreateNamedPipe - http://msdn.microsoft.com/en-us/library/windows/desktop/aa365152(v=vs.85).aspx[^] http://msdn.microsoft.com/en-us/library/windows/desktop/aa365150(v=vs.85).aspx[^] Sockets can be created using WinSock - http://msdn.microsoft.com/en-us/library/windows/desktop/ms741394(v=vs.85).aspx[^] A new Process can be invoked using CreateProcess - http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx[^]

      «_Superman_»  _I love work. It gives me something to do between weekends.

      _Microsoft MVP (Visual C++) (October 2009 - September 2013)

      Polymorphism in C

      Y 1 Reply Last reply
      0
      • _ _Superman_

        Threads can be created using the CreateThread API - http://msdn.microsoft.com/en-us/library/windows/desktop/ms682453(v=vs.85).aspx[^] Pipes can be created either using CreatePipe or CreateNamedPipe - http://msdn.microsoft.com/en-us/library/windows/desktop/aa365152(v=vs.85).aspx[^] http://msdn.microsoft.com/en-us/library/windows/desktop/aa365150(v=vs.85).aspx[^] Sockets can be created using WinSock - http://msdn.microsoft.com/en-us/library/windows/desktop/ms741394(v=vs.85).aspx[^] A new Process can be invoked using CreateProcess - http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx[^]

        «_Superman_»  _I love work. It gives me something to do between weekends.

        _Microsoft MVP (Visual C++) (October 2009 - September 2013)

        Polymorphism in C

        Y Offline
        Y Offline
        Ylno
        wrote on last edited by
        #3

        Thanks Superman, Exactly what I wanted. Whenever I search msdn I seem to find it have to get relevant results. my only realy experience it with .NET/JAVA and therefore when looking I'm a little non-plussed when it comes to C++/MFC and what is possible. Great

        1 Reply Last reply
        0
        • Y Ylno

          In .NET we have the System.IO namespace providing convenient classes for Sockects and Pipes which ay be used for interprocess communication. How can one implement this in oldskool VC6? My requirements are as follows. I am writing a plugin for some legacy software for which there is a SDK which I can only get to compile with VC++6.0 compiler. I want to interface this code with both .NET and JAVA. I was thinking of implementing either a Socket server or Namedpipe in C# to act a a bridge between the VC6 code and .NET/JAVA. Requests from VC6 would be in the form of byte[] arrays and the C# bridge would interpret these requests, route them and eventually reply to the VC6 code which is awaiting a response. In summary I would like examples of the following in VC++6: - Use of threads - Socket/Pipes (or any other interproc comms method) - Invoking a process (other than a shell call to an executable) BTW non-MFC is required Any suggestions would be great. Best, Y

          D Offline
          D Offline
          David Knechtges
          wrote on last edited by
          #4

          If you want to simplify things, rather than use the sockets or named pipes, you might consider these two other options for the .NET part: 1) C++/CLI to generate a bridge DLL from the C# code that loads and runs the VC 6 DLL. 2) PInvoke from C# to load and run the VC 6 DLL. For the Java part, you might do the process execution or use one of the Java - .NET bridges that exist out there. Just some other suggestions to consider.

          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