mciSendString

哈哈哈hhhzzz 2017-08-07 05:23:42
为什么路径这样写在vs中运行有声音,而打开exe文件时却没有声音?
...全文
866 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
赵4老师 2017-08-08
  • 打赏
  • 举报
回复
SetCurrentDirectory The SetCurrentDirectory function changes the current directory for the current process. BOOL SetCurrentDirectory( LPCTSTR lpPathName // pointer to name of new current directory ); Parameters lpPathName Pointer to a null-terminated string that specifies the path to the new current directory. This parameter may be a relative path or a fully qualified path. In either case, the fully qualified path of the specified directory is calculated and stored as the current directory. Return Values If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. Remarks Each process has a single current directory made up of two parts: A disk designator that is either a drive letter followed by a colon, or a server name and share name (\\servername\sharename) A directory on the disk designator QuickInfo Windows NT: Requires version 3.1 or later. Windows: Requires Windows 95 or later. Windows CE: Unsupported. Header: Declared in winbase.h. Import Library: Use kernel32.lib. Unicode: Implemented as Unicode and ANSI versions on Windows NT. See Also File I/O Overview, File Functions, GetCurrentDirectory
kuangbao9 2017-08-08
  • 打赏
  • 举报
回复
文件路径不对吧?你把音乐文件夹拷到exe同一目录试试看

2,640

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 硬件/系统
社区管理员
  • 硬件/系统社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧