Dll exception
-
Hi experts, I want to add a com dll file in my project.I wtitten the below code to create a pst file in c drive. Program compiled successfully But the function Logon() goes fail and sows a exception : "Unhandled exception at 0x7c812a5b in samp.exe: 0x0EEDFADE: 0xeedfade." CoInitialize(NULL); IRDOSessionPtr session; HRESULT hr = session.CreateInstance(__uuidof(RDOSession)); session->Logon(" ",NULL,NULL,NULL,NULL,NULL); session.Release(); what is the problem.Is there other way to add com dll in prject. Plz tell
manu
-
Hi experts, I want to add a com dll file in my project.I wtitten the below code to create a pst file in c drive. Program compiled successfully But the function Logon() goes fail and sows a exception : "Unhandled exception at 0x7c812a5b in samp.exe: 0x0EEDFADE: 0xeedfade." CoInitialize(NULL); IRDOSessionPtr session; HRESULT hr = session.CreateInstance(__uuidof(RDOSession)); session->Logon(" ",NULL,NULL,NULL,NULL,NULL); session.Release(); what is the problem.Is there other way to add com dll in prject. Plz tell
manu
You should always check the returned HRESULT value, i.e.
if (FAILED(hr)))
{
// report the error code so that manu_2205 can understand what happened
}and never use the pointer (even the smart ones :)) if the CreateInstance failed.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
Hi experts, I want to add a com dll file in my project.I wtitten the below code to create a pst file in c drive. Program compiled successfully But the function Logon() goes fail and sows a exception : "Unhandled exception at 0x7c812a5b in samp.exe: 0x0EEDFADE: 0xeedfade." CoInitialize(NULL); IRDOSessionPtr session; HRESULT hr = session.CreateInstance(__uuidof(RDOSession)); session->Logon(" ",NULL,NULL,NULL,NULL,NULL); session.Release(); what is the problem.Is there other way to add com dll in prject. Plz tell
manu
Whats return value of hr?
WhiteSky