Hello,
In my "Windows Form Application" project, i have created Button. On Button click , I want to open compound file present on my hard disk using function StgOpenStorageEx(). the code i have written code for this in button click event as
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
IStorage *pStorage; if(StgOpenStorageEx(L"E:\\Backup.stg",STGM_READ|STGM_SHARE_DENY_WRITE,STGFMT_DOCFILE,0, NULL, 0,IID_IStorage,(void**)&pStorage)==S_OK)
{
tb4->Text="hehe";
}
}
for this i have added header files like
#include "StdAfx.h"
#include<Objbase.h>
Also I have added "Ole32.lib" in proj->properties->Linker->input->additional dependencies.
But still im getting following errors
1>BackGUI.obj : error LNK2020: unresolved token (0A000010) IID_IStorage
1>BackGUI.obj : error LNK2001: unresolved external symbol IID_IStorage
1>C:\Users\SUMIT\Desktop\prj\BACKUP & RESTORE\BackGUI\Debug\BackGUI.exe : fatal error LNK1120: 2 unresolved externals
any suggestions plz??