G
Guest
I have an API call function which return a pointer of C++ class object. I need the m_pData and m_lSize in the object
CReturnClass *APIFunction(void)
1. Could I directly use this API function in VS.NET by using DLLImport Declare? I don't want to wrap this dll in C++
2. If yes, How could I Decalare the class [CReturnClass] in .NET. How could I marshal it
Thanks
class CReturnClass
public
CReturnClass (LPBYTE pSource, int nCount, bool bIsKey = false, bool bCompressed = true, bool bAutoDelete = true)
virtual ~CReturnClass(void)
bool IsCompressed() cons
{ return m_bIsCompressed;
bool IsKeyFrame() cons
{ return m_bIsKey;
LONG GetSize() cons
{ return m_lSize;
const LPBYTE GetBuffer() cons
{ return m_pData;
void Close(
{ delete this;
protected
CReturnClass(void)
private
bool m_bIsCompressed
bool m_bIsKey
bool m_bAutoDelete
LPBYTE m_pData
LONG m_lSize
}
CReturnClass *APIFunction(void)
1. Could I directly use this API function in VS.NET by using DLLImport Declare? I don't want to wrap this dll in C++
2. If yes, How could I Decalare the class [CReturnClass] in .NET. How could I marshal it
Thanks
class CReturnClass
public
CReturnClass (LPBYTE pSource, int nCount, bool bIsKey = false, bool bCompressed = true, bool bAutoDelete = true)
virtual ~CReturnClass(void)
bool IsCompressed() cons
{ return m_bIsCompressed;
bool IsKeyFrame() cons
{ return m_bIsKey;
LONG GetSize() cons
{ return m_lSize;
const LPBYTE GetBuffer() cons
{ return m_pData;
void Close(
{ delete this;
protected
CReturnClass(void)
private
bool m_bIsCompressed
bool m_bIsKey
bool m_bAutoDelete
LPBYTE m_pData
LONG m_lSize
}