开发者

How to start a DVD playback on Windows using the default playback software?

开发者 https://www.devze.com 2023-01-16 12:55 出处:网络
Does anybody know how to initiate a DVD playback using a known drive letter from out of a C++ program.

Does anybody know how to initiate a DVD playback using a known drive letter from out of a C++ program.

For what's worth: I simply search for the windows开发者_运维问答 explorer's play function which is located in the context menu when right-clicking a DVD drive...

Thx in advance, Axel


You should be able to use ShellExecute for this; the verb for playing DVDs or CDs seems to be "play".

ShellExecute(NULL, "play", "D:\\", NULL, NULL, SW_SHOWNORMAL);


It's been too long since I used Windows for me to give you exact details, but you should be able to get some idea of what to do by diving into the explorer settings in regedit and checking what the "Play" context menu is actually doing.

As I remember, the context menu entries are defined in a subtree with a path something like HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/explorer/... but don't quote me on it.

0

精彩评论

暂无评论...
验证码 换一张
取 消