VB,VC两个exe程序,如何将VB中的一组数据传递给VC?
用DLL可以吗?
如果可以,怎么做哪?小菜鸟十万火急,希望各位救救我,

解决方案 »

  1.   

    DLL的话就要制作标准DLL,Windows DLL,然后参数用字符串等char*
      

  2.   

    http://blog.csdn.net/fengrx/archive/2009/04/13/4069088.aspx
      

  3.   

    您的讲解很详细,可是我对那部分一窍不通,怕是很难应用啊,我想知道还有没有其他的方法,比如DLL,如果可以,要怎么编写啊,、
    我是需要VB的EXE传递数据给VC的EXE,并且要求他们实时性很好,因为VB的EXE是设备控制程序,VC的EXE是OpenGL的3D显示程序,要做到尽量实时
      

  4.   

    1.用dll    共享数据段,写读入读出函数,以便调用。
    2.内存映射  共享内存,每个程序都直接读入读出,但读入前后要注意防止读写竞争啊。本质上是一样的。
      

  5.   

    对于只是在有VB,VC开发两个应用程序中传递数组如此简单的数据,没必要用什么DLL,内存映射之类的大刀吧WM_COPYDATA Message--------------------------------------------------------------------------------An application sends the WM_COPYDATA message to pass data to another application. Syntax
    To send this message, call the SendMessage function as follows. 
    lResult = SendMessage(      // returns LRESULT in lResult     (HWND) hWndControl,      // handle to destination control     (UINT) WM_COPYDATA,      // message ID     (WPARAM) wParam,      // = (WPARAM) () wParam;    (LPARAM) lParam      // = (LPARAM) () lParam; );   
    ParameterswParam
    Handle to the window passing the data. 
    lParam
    Pointer to a COPYDATASTRUCT structure that contains the data to be passed. 
    Return ValueIf the receiving application processes this message, it should return TRUE; otherwise, it should return FALSE. 
    The COPYDATASTRUCT structure contains data to be passed to another application by the WM_COPYDATA message. Syntaxtypedef struct tagCOPYDATASTRUCT {
        ULONG_PTR dwData;
        DWORD cbData;
        PVOID lpData;
    } COPYDATASTRUCT, *PCOPYDATASTRUCT;
    MembersdwData
    Specifies data to be passed to the receiving application. 
    cbData
    Specifies the size, in bytes, of the data pointed to by the lpData member. 
    lpData
    Pointer to data to be passed to the receiving application. This member can be NULL.