G
Guest
I wrote a C# class library with tlb output,so i can call it from C++ codes.
My code in C# like:
[Guid("...")]
public struct item
{
string key;
double val;
}
[Guid("...")]
public interface IFirst
{
string try();
item[] tryAgain();
}
[Guid("...")]
public class First : IFirst
{
public string try(){...}
public item[] tryAgain(){...}
}
My code in C++ like:
IFirstPtr p;
p.CreateInstance(__uuidof(First));
_bstr_t bt = p->try();
SAFEARRAY* psa = p->tryAgain();
Well,my problem is here:
the p->try() call is processed OK,and i got the correct return values.
while the p->tryAgain() call failed,as i debugged into the .tli code
generated by IDE,
i found the HRESULT code of the raw_tryAgain() call is 0X80028019,says "old
format or invalid type library",which i thought meant nothing to me.
So,could anybody help me?
I am using VS.Net 2003.
Whyithappen
My code in C# like:
[Guid("...")]
public struct item
{
string key;
double val;
}
[Guid("...")]
public interface IFirst
{
string try();
item[] tryAgain();
}
[Guid("...")]
public class First : IFirst
{
public string try(){...}
public item[] tryAgain(){...}
}
My code in C++ like:
IFirstPtr p;
p.CreateInstance(__uuidof(First));
_bstr_t bt = p->try();
SAFEARRAY* psa = p->tryAgain();
Well,my problem is here:
the p->try() call is processed OK,and i got the correct return values.
while the p->tryAgain() call failed,as i debugged into the .tli code
generated by IDE,
i found the HRESULT code of the raw_tryAgain() call is 0X80028019,says "old
format or invalid type library",which i thought meant nothing to me.
So,could anybody help me?
I am using VS.Net 2003.
Whyithappen