Value Class Reference
- From: "Bumbala" <bumbala@xxxxxxxxx>
- Date: 30 Mar 2007 00:27:25 -0700
Hello,
How can I store the pointer to a value class in managed C++ similar to
this:
// Old unmanaged C++ code:
struct MyStruct
{
// some members
};
class MyClass
{
private:
MyStruct* m_pMyStruct;
public:
MyClass(void)
{
m_pMyStruct = new MyStruct();
}
MyStruct* GetMyStruct() { return m_pMyStruct; }
};
I tried using MyStruct^ _MyStruct = gcnew MyStruct(), but the
application on the C# side recognizes the returned value as ValueType
which is meaningless.
Thanks.
.
- Prev by Date: Re: Attempted to write protected memory error when doing Excel automation
- Next by Date: Re: How would you marshal this?
- Previous by thread: Attempted to write protected memory error when doing Excel automation
- Next by thread: P/invoke an array of structs with embedded char* buffers
- Index(es):
Relevant Pages
|
Loading