普通的MFC程序,如何增加一个COM接口,使之成为COM服务器(COM入口在App中)当客户端进行COM接口调用时,服务器可以自动启动现在自己写的,当进行过COM调用后,服务器程序不能正常结束(窗口已经关闭,但进程还在)

解决方案 »

  1.   

    take a look at the SERIAL sample in the DDK. You have to duplicate that to provide the serial port functionality. You could then buy a kernel sockets package or else learn how to use TDI to talk TCP/IP. Then you have to learn about named pipes in the kernel. Each of these things is intricate and something that only specialists should ever actually attempt. POSUSB is written (and abandoned) by Microsoft. It creates a com port and uses it for USB communications, which latter part you probably don't need. 
    http://www.isibrno.cz/~ivovi/usb.htm
      

  2.   

    COM组件必要条件,提供类工厂,注册组件等.
      

  3.   

    sorry, this is for COM port
    for adding automation to MFC applications, see http://www.codeproject.com/com/mfc_autom.asp
      

  4.   

    MFC可以支持com,直接添加atl组件