本文整理汇总了C++中system::IntPtr类的典型用法代码示例。如果您正苦于以下问题:C++ IntPtr类的具体用法?C++ IntPtr怎么用?C++ IntPtr使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IntPtr类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Dismiss
void InteriorsExplorerCLIMethods::Dismiss(System::IntPtr nativeObjectPtr)
{
InteriorsExplorer::View::InteriorsExplorerView* view = reinterpret_cast<InteriorsExplorer::View::InteriorsExplorerView*>(nativeObjectPtr.ToPointer());
view->Dismiss();
}
示例2:
NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::IOvPropertyMappingDefinition^ NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::ObjectFactory::CreateIOvPropertyMappingDefinition(System::IntPtr ptr, System::Boolean autoDispose)
{
if (ptr == IntPtr::Zero)
return nullptr;
FdoSqlServerOvPropertyMappingDefinition* p = (FdoSqlServerOvPropertyMappingDefinition*)ptr.ToPointer();
NAMESPACE_OSGEO_RUNTIME::Disposable^ wrap;
// Note:
// Here we need keep dynamic_cast to decide the real type of "ptr"
if(wrap = CHECK<FdoSqlServerOvPropertyMappingClass, NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvPropertyMappingClass>(p, autoDispose)) return static_cast<NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvPropertyMappingClass^>(wrap);
if(wrap = CHECK<FdoSqlServerOvPropertyMappingConcrete, NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvPropertyMappingConcrete>(p, autoDispose)) return static_cast<NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvPropertyMappingConcrete^>(wrap);
if(wrap = CHECK<FdoSqlServerOvPropertyMappingRelation, NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvPropertyMappingRelation>(p, autoDispose)) return static_cast<NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvPropertyMappingRelation^>(wrap);
if(wrap = CHECK<FdoSqlServerOvPropertyMappingSingle, NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvPropertyMappingSingle>(p, autoDispose)) return static_cast<NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvPropertyMappingSingle^>(wrap);
if(wrap = CHECK<FdoSqlServerOvPropertyMappingDefinition, NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvPropertyMappingDefinition>(p, autoDispose)) return static_cast<NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvPropertyMappingDefinition^>(wrap);
return nullptr;
}
示例3: SelectFloor
void InteriorsExplorerCLIMethods::SelectFloor(System::IntPtr nativeObjectPtr, int index)
{
InteriorsExplorer::View::InteriorsExplorerView* view = reinterpret_cast<InteriorsExplorer::View::InteriorsExplorerView*>(nativeObjectPtr.ToPointer());
view->SelectFloor(index);
}
示例4:
Flood::RayQueryResult::RayQueryResult(System::IntPtr native)
{
auto __native = (::RayQueryResult*)native.ToPointer();
NativePtr = __native;
}
示例5: ManagedToUnmanaged
* <[email protected]> and licensed under the MIT/X11 License.
* For more information, see
* http://geographiclib.sourceforge.net/
**********************************************************************/
#include "stdafx.h"
#include "GeographicLib/Config.h"
#include "GeographicLib/Utility.hpp"
#include "NETGeographicLib.h"
using namespace System::Runtime::InteropServices;
using namespace NETGeographicLib;
//*****************************************************************************
std::string StringConvert::ManagedToUnmanaged( System::String^ s )
{
System::IntPtr buffer = Marshal::StringToHGlobalAnsi(s);
std::string output( reinterpret_cast<const char*>(buffer.ToPointer()) );
Marshal::FreeHGlobal(buffer);
return output;
}
//*****************************************************************************
System::String^ VersionInfo::GetString()
{
return gcnew System::String(GEOGRAPHICLIB_VERSION_STRING);
}
//*****************************************************************************
int VersionInfo::MajorVersion()
{
return GEOGRAPHICLIB_VERSION_MAJOR;
示例6: MarshalStringToUnmanaged
// Static
const char* MarshalStringToUnmanaged(System::String* inputString)
{
System::IntPtr strPtr = System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(inputString);
return (const char*)strPtr.ToPointer();
}
示例7:
CLROBS::Texture::Texture(System::IntPtr texture)
{
this->texture = (::Texture *)(texture.ToPointer());
}
示例8:
CppSharp::Parser::ParserOptions::ParserOptions(System::IntPtr native)
{
auto __native = (::CppSharp::CppParser::ParserOptions*)native.ToPointer();
NativePtr = __native;
}
示例9:
CppSharp::Parser::SourceLocation^ CppSharp::Parser::SourceLocation::__CreateInstance(::System::IntPtr native)
{
return gcnew ::CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*) native.ToPointer());
}
示例10:
CppSharp::Parser::ParserTargetInfo^ CppSharp::Parser::ParserTargetInfo::__CreateInstance(::System::IntPtr native)
{
return gcnew ::CppSharp::Parser::ParserTargetInfo((::CppSharp::CppParser::ParserTargetInfo*) native.ToPointer());
}
示例11:
CppSharp::Parser::ParserOptions^ CppSharp::Parser::ParserOptions::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance)
{
::CppSharp::Parser::ParserOptions^ result = gcnew ::CppSharp::Parser::ParserOptions((::CppSharp::CppParser::ParserOptions*) native.ToPointer());
result->__ownsNativeInstance = __ownsNativeInstance;
return result;
}
示例12:
CppSharp::Parser::CppParserOptions^ CppSharp::Parser::CppParserOptions::__CreateInstance(::System::IntPtr native)
{
return gcnew ::CppSharp::Parser::CppParserOptions((::CppSharp::CppParser::CppParserOptions*) native.ToPointer());
}