问题描述
大家好:
我有一个应用程序(用VC ++ MFC编写),需要播放一些媒体文件,包括MP4,JPEG,HTML。
我认为最简单的方法是激活与这些文件扩展名相关联的本地安装的应用程序,并要求这些应用程序打开我的媒体文件。
然后我开始使用CreateProcess ()启动那些本地安装的应用程序,如Chrome或MediaPlayer,并通过调用CreateProcess()将我的媒体文件名作为cmd行参数传递给他们。
And我很高兴说它有效。我的文件按顺序播放。
然而,在调用本地应用程序并通过调用CreateProcess()获取进程句柄后,我想要求应用程序执行其他任务,例如将PageViewMode从Portrait更改为LandScape,或以最大化模式显示,或其他有趣的东西。
所以我的问题是,
1- br />
2-如果我想要求这些应用程序执行某些任务,我可以使用哪些选项,我可以轻松访问他们的API吗?
欢迎您提出明智的建议?
非常感谢Rez。
我尝试过的事情:
除了上面描述的内容之外没什么别的
hello all:
I have an Application (written in VC++ MFC) that needs to play some media files, including MP4, JPEG, HTML only.
I thought the easiest way would be to activate the locally installed Applications that are associated with those file extensions, and ask those Apps to open my media files.
I then started using CreateProcess() to start those locally installed Apps, like Chrome or MediaPlayer and passed to them my media file name as cmd line parameters via the call to CreateProcess().
And I'm glad to say it works. My Files are played in sequence.
However, after calling the local Apps, and getting a process handle for them via my call to CreateProcess(), I would like to ask the Apps to perform other tasks such as change PageViewMode from Portrait to LandScape, or display in Maximised Mode, Or other interesting stuff.
So My question is,
1- after retrieving the Process Handle, can I use it to do anything useful at all, or can I just use it to call TerminateProcess() or CloseHandle() ?
2- If I want to ask these Apps to perform certain tasks, what options are available to me, and can i access their APIs easily ?
Your informed suggestions are welcome?
Many Thanks Rez.
What I have tried:
Nothing other than what I described above
这篇关于Createprocess()现在是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!