开发环境:vs2005,windows2003,winform程序。
主要功能事修改文件的扩展属性->备注的内容。
程序中调用了ole32。
程序在windows2003运行成功并能修改。
但是当程序安装到windows2000/windowsXp下后,程序运行成功,但是修改不了了???!请帮忙啊!!!
主要功能事修改文件的扩展属性->备注的内容。
程序中调用了ole32。
程序在windows2003运行成功并能修改。
但是当程序安装到windows2000/windowsXp下后,程序运行成功,但是修改不了了???!请帮忙啊!!!
uint hresult = StgOpenStorageEx(
filename,
(int)(STGM.READWRITE|STGM.SHARE_EXCLUSIVE),
(int)STGFMT.FILE,
0,
(IntPtr)0,
(IntPtr)0,
ref IID_PropertySetStorage,// Guid IID_PropertySetStorage
ref propSetStorage); //IPropertySetStorage propSetStorage
)错误时propSetStorage=null,hresult=0x8007001
uint hresult = StgOpenStorageEx(
filename,
(int)(STGM.READWRITE|STGM.SHARE_EXCLUSIVE),
(int)STGFMT.FILE,
0,
(IntPtr)0,
(IntPtr)0,
ref IID_PropertySetStorage,// Guid IID_PropertySetStorage
ref propSetStorage); //IPropertySetStorage propSetStorage
个人猜测就是进行这种文件操作操作的.错误的情况下可以返回空的指针.