Link to home
Start Free TrialLog in
Avatar of raw_enha
raw_enha

asked on

Accessing C++ code(unmanaged & if possible, managed as well) in C#

I want to write a managed C++ class that I can then access in C# code.  The C++ class will contain unmanaged code as well.  The C++ class has to keep things in memory as well.  It's a class that deals with image manipulation, so I gotta keep a USHORT* in memory (it has to be this type or some other type that easily converts into USHORT* because we use 3rd party code for image enhancement and it requires USHORT*). So, it has to be something that can be long-lived.  When I use a function that causes the buffer to change and then use another function to access that buffer later on, i want to access the newly changed one, not a new instance.  I've tried creating an MFC DLL and just started trying to create a C++ Class library instead.  I can't get anything to work.  Can anybody give me any pointers on how to deal with this? I"ve never done cross-platform stuff before AND its also my first time working in C#.  Any help would be appreciated.  Any websites or examples you could point me towards would also be appreciated.
Avatar of AlexNek
AlexNek

ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial