我的目的是使用它来copy一个文件夹内的文件至另外一个文件夹内,应该这个函数有这个功能,但是目前我只能用它来copy一个文件至其根目录下,没办法至其文件夹内.
有经验的高手请指点一下啊.
hr = pIWMDMStorageControl->Insert(
WMDM_MODE_BLOCK | /*WMDM_STORAGECONTROL_INSERTINTO*/ WMDM_STORAGECAP_FILESINFOLDERS| WMDM_CONTENT_FILE |WMDM_FILE_CREATE_OVERWRITE,
L"d:\\music\\wm_screen.wmv",
NULL, NULL,
&pIStorage);
不管我如何调整它的参数,都没法将文件copy到指定的文件夹内.下面是它在msdn中的用法说明,真是搞不明白。
IWMDMStorageControl::Insert
The Insert method inserts content onto a storage medium.
Syntax
HRESULT Insert(
UINT fuMode,
LPWSTR pwszFile,
IWMDMOperation* pOperation,
IWMDMProgress* pProgress,
IWMDMStorage** ppNewObject
);The Insert method does not necessarily imply any particular ordering of the contents, although if the file system supports ordering, the Insert method provides that capability by means of the flags WMDM_STORAGECONTROL_INSERTBEFORE and WMDM_STORAGECONTROL_INSERTAFTER. If the file system does not support ordering (for instance, FAT32), WMDM_STORAGECONTROL_INSERTBEFORE and WMDM_STORAGECONTROL_INSERTAFTER will behave identically to each other and will insert the new storage object at the same level as the current object in the file system hierarchy. WMDM_STORAGECONTROL_INSERTINTO can be specified only if the current storage is a folder, and in that case the new storage object will become nested in the current storage.
有经验的高手请指点一下啊.
hr = pIWMDMStorageControl->Insert(
WMDM_MODE_BLOCK | /*WMDM_STORAGECONTROL_INSERTINTO*/ WMDM_STORAGECAP_FILESINFOLDERS| WMDM_CONTENT_FILE |WMDM_FILE_CREATE_OVERWRITE,
L"d:\\music\\wm_screen.wmv",
NULL, NULL,
&pIStorage);
不管我如何调整它的参数,都没法将文件copy到指定的文件夹内.下面是它在msdn中的用法说明,真是搞不明白。
IWMDMStorageControl::Insert
The Insert method inserts content onto a storage medium.
Syntax
HRESULT Insert(
UINT fuMode,
LPWSTR pwszFile,
IWMDMOperation* pOperation,
IWMDMProgress* pProgress,
IWMDMStorage** ppNewObject
);The Insert method does not necessarily imply any particular ordering of the contents, although if the file system supports ordering, the Insert method provides that capability by means of the flags WMDM_STORAGECONTROL_INSERTBEFORE and WMDM_STORAGECONTROL_INSERTAFTER. If the file system does not support ordering (for instance, FAT32), WMDM_STORAGECONTROL_INSERTBEFORE and WMDM_STORAGECONTROL_INSERTAFTER will behave identically to each other and will insert the new storage object at the same level as the current object in the file system hierarchy. WMDM_STORAGECONTROL_INSERTINTO can be specified only if the current storage is a folder, and in that case the new storage object will become nested in the current storage.
解决方案 »
- opengl谁有c++的有关一段隧道漫游的代码?
- 关于C语言
- 端口扫描程序的一些疑问
- 怎样设置鼠标光标,让它对所有程序都有效?
- 我新手,我想要做网络游戏如传奇,千年的外挂,学习用哪种语言好?
- 在VC中怎样扫描后台进程的SOCKET空闲状态!!!??在线等待!!
- 用CSocket编程时,里面有好多的如atol,htonl,htons等xtox类型的函数,请问他们的作用是什么?我没装MSDN,书上又没讲
- 如何解决SQLite数据库删除大数据后执行“VACUUM”效率低的问题
- 线程中对话框没法显示的问题?请高手帮忙,在线等。谢谢!
- MFC连接ODBC数据源时出现"记录集只读"问题,还有就是提示“SNAPSHOT”仅对内存优化的表有效,无法预定义语句,怎么办?
- 如何给另外一个进程的ListView中的某个item发消息,取得它的绝对坐标。
- 应聘单位要求编写:一个可以推断出或证明外星人到底存不存在的软件
Mark一下。
谢谢!
初始化应该是初始化了,因为我可以将文件正常copy至设备的媒体目录下,就是没法拷贝至所创建的目录下.