Click here to Skip to main content
15,908,455 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: LNK2005 Redefinition Error on using CLI --already defined LNK2005 error Pin
jobin00700731-May-09 10:18
jobin00700731-May-09 10:18 
GeneralRe: LNK2005 Redefinition Error on using CLI --already defined LNK2005 error [modified] Pin
Mark Salsbery31-May-09 10:40
Mark Salsbery31-May-09 10:40 
GeneralRe: LNK2005 Redefinition Error on using CLI --already defined LNK2005 error Pin
jobin00700731-May-09 10:48
jobin00700731-May-09 10:48 
GeneralRe: LNK2005 Redefinition Error on using CLI --already defined LNK2005 error Pin
Mark Salsbery31-May-09 10:53
Mark Salsbery31-May-09 10:53 
GeneralRe: LNK2005 Redefinition Error on using CLI --already defined LNK2005 error Pin
jobin00700731-May-09 11:00
jobin00700731-May-09 11:00 
GeneralRe: LNK2005 Redefinition Error on using CLI --already defined LNK2005 error Pin
Mark Salsbery31-May-09 11:08
Mark Salsbery31-May-09 11:08 
GeneralRe: LNK2005 Redefinition Error on using CLI --already defined LNK2005 error Pin
jobin00700731-May-09 12:07
jobin00700731-May-09 12:07 
GeneralRe: LNK2005 Redefinition Error on using CLI --already defined LNK2005 error Pin
Mark Salsbery1-Jun-09 7:09
Mark Salsbery1-Jun-09 7:09 
jobin007007 wrote:
How would I provide access to these variables from the C# file?


Provide an interface through your managed wrapper class.

Properties would work great ...
public ref class ManagedCLR
{
private:
    UNMANAGED.Data *pObj; //Here my Unmanaged Class is referenced through a pointer.

public:
    ManagedCLR()
    {
        pObj = new UNMANAGED.Data(); 
    }

    ~ManagedCLR()
    {
        // clean up managed resources here

        // call the finalizer to release unmanaged resources!
        this->!ManagedCLR();
    }

    !ManagedCLR()
    {
        // clean up unmanaged resources here
        delete pObj;
        pObj = 0;
    }

    void EntryPoint(void)
    {
        //pass through to the unmanaged object
        pObj->EntryPointUnmanged(); //Here the managed program accesses my unmanaged program.
    }

    property int s
    {
        int get()
        {
            return UNMANAGED::s;
        }
        void set(int value)
        {
            UNMANAGED::s = value;
        }
    }

    property int k
    {
        int get()
        {
            return UNMANAGED::k;
        }
        void set(int value)
        {
            UNMANAGED::k = value;
        }
    }
};


Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

AnswerAttempt to load an unverifiable executable with fixups (IAT with more than 2 sections or a TLS section.) (Exception from HRESULT: 0x80131019) Help! Pin
jobin0070071-Jun-09 12:37
jobin0070071-Jun-09 12:37 
GeneralRe: Attempt to load an unverifiable executable with fixups (IAT with more than 2 sections or a TLS section.) (Exception from HRESULT: 0x80131019) Help! Pin
Mark Salsbery1-Jun-09 12:42
Mark Salsbery1-Jun-09 12:42 
GeneralRe: Attempt to load an unverifiable executable with fixups (IAT with more than 2 sections or a TLS section.) (Exception from HRESULT: 0x80131019) Help! Pin
jobin0070071-Jun-09 13:15
jobin0070071-Jun-09 13:15 
AnswerUnable to access variables. Pin
jobin0070071-Jun-09 13:18
jobin0070071-Jun-09 13:18 
GeneralRe: Unable to access variables. Pin
jobin0070071-Jun-09 13:21
jobin0070071-Jun-09 13:21 
GeneralRe: Unable to access variables. Pin
jobin0070071-Jun-09 13:27
jobin0070071-Jun-09 13:27 
GeneralRe: Unable to access variables. Pin
jobin0070071-Jun-09 13:54
jobin0070071-Jun-09 13:54 
GeneralRe: Unable to access variables. Pin
Mark Salsbery1-Jun-09 17:25
Mark Salsbery1-Jun-09 17:25 
NewsNo Intellisense support in VC10 for C++/CLI!!! Pin
small_mountain28-May-09 7:05
small_mountain28-May-09 7:05 
GeneralRe: No Intellisense support in VC10 for C++/CLI!!! Pin
teejayem28-May-09 7:27
teejayem28-May-09 7:27 
GeneralRe: No Intellisense support in VC10 for C++/CLI!!! [modified] Pin
Mark Salsbery28-May-09 7:31
Mark Salsbery28-May-09 7:31 
GeneralRe: No Intellisense support in VC10 for C++/CLI!!! Pin
led mike28-May-09 11:29
led mike28-May-09 11:29 
GeneralRe: No Intellisense support in VC10 for C++/CLI!!! Pin
Mark Salsbery28-May-09 11:32
Mark Salsbery28-May-09 11:32 
GeneralRe: No Intellisense support in VC10 for C++/CLI!!! Pin
led mike4-Jun-09 4:52
led mike4-Jun-09 4:52 
GeneralRe: No Intellisense support in VC10 for C++/CLI!!! Pin
Mark Salsbery4-Jun-09 5:02
Mark Salsbery4-Jun-09 5:02 
GeneralRe: No Intellisense support in VC10 for C++/CLI!!! Pin
small_mountain1-Jun-09 1:39
small_mountain1-Jun-09 1:39 
GeneralRe: No Intellisense support in VC10 for C++/CLI!!! Pin
N a v a n e e t h1-Jun-09 3:14
N a v a n e e t h1-Jun-09 3:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.