vc整合工程

来源:百度知道 编辑:UC知道 时间:2024/06/23 17:23:52
我现在做了两个工程,一个负责通过网络传输文件,另一个负责作文件的处理。现在我想把他们和在一起,即在文件处理的工程中添加一个菜单项,通过这个菜单项调用传输的工程,怎么实现呢

你可以用CreateProcess来连接,具体请查阅msdn

BOOL CreateProcess(
LPCTSTR lpApplicationName, // name of executable module
LPTSTR lpCommandLine, // command line string
LPSECURITY_ATTRIBUTES lpProcessAttributes, // SD
LPSECURITY_ATTRIBUTES lpThreadAttributes, // SD
BOOL bInheritHandles, // handle inheritance option
DWORD dwCreationFlags, // creation flags
LPVOID lpEnvironment, // new environment block
LPCTSTR lpCurrentDirectory, // current directory name
LPSTARTUPINFO lpStartupInfo, // startup information
LPPROCESS_INFORMATION lpProcessInformation // process information
);