mirror of https://github.com/mono/CppSharp.git
1 changed files with 13 additions and 8 deletions
@ -1,20 +1,25 @@ |
|||||||
// ------------------------------------------------------------------------------------------- //
|
// ------------------------------------------------------------------------------------------- //
|
||||||
// clix.hpp (from http://blog.nuclex-games.com/mono-dotnet/cxx-cli-string-marshaling)
|
// CppSharp C++/CLI helpers
|
||||||
//
|
//
|
||||||
// Marshals strings between .NET and C++ using C++/CLI (Visual C++ 2005 and later only).
|
// String marshaling code adapted from:
|
||||||
// Faster and cleaner than the System::Interop method because it uses garbage collected memory.
|
// http://blog.nuclex-games.com/mono-dotnet/cxx-cli-string-marshaling
|
||||||
// Use at your own leisure. No warranties whatsoever provided.
|
|
||||||
//
|
//
|
||||||
// Original code by Markus Ewald
|
// Licensed under the MIT license
|
||||||
// Updated version including several improvements suggested by Neil Hunt
|
|
||||||
//
|
|
||||||
// Licensed under the IBM CPL (free of charge, closed source commercial use is okay)
|
|
||||||
// ------------------------------------------------------------------------------------------- //
|
// ------------------------------------------------------------------------------------------- //
|
||||||
#pragma once |
#pragma once |
||||||
|
|
||||||
#include <string> |
#include <string> |
||||||
#include <vcclr.h> |
#include <vcclr.h> |
||||||
|
|
||||||
|
public interface class ICppInstance |
||||||
|
{ |
||||||
|
property System::IntPtr^ NativePtr |
||||||
|
{ |
||||||
|
System::IntPtr^ get(); |
||||||
|
void set(System::IntPtr^); |
||||||
|
} |
||||||
|
}; |
||||||
|
|
||||||
// CLI extensions namespace
|
// CLI extensions namespace
|
||||||
namespace clix { |
namespace clix { |
||||||
|
|
Loading…
Reference in new issue