开发者

mciSendString: file that contains spaces

If i use mciSendString (winmm.dll) and try to read file that conta开发者_如何学运维ins spaces (for example F:\MUSIC\(01) [VA]01.StimAxel - Restart(DJ X-VenomRemix).mp3) i got an error with code 263.

mciSendString can't work with files that contains spaces. How to avoid this problem?

Pcommand = "status \"" + path + "\" length";

int ret = (int)mciSendString(Pcommand, sBuffer, sBuffer.Capacity, 0);


Try surrounding the filename with double quotes.

Update: According to the docs, the status command takes a device name, not a filename. You need to use open to open the file on a specific device, then pass that device name to status.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜