本文整理汇总了C++中system::IntPtr::ToPointer方法的典型用法代码示例。如果您正苦于以下问题:C++ IntPtr::ToPointer方法的具体用法?C++ IntPtr::ToPointer怎么用?C++ IntPtr::ToPointer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类system::IntPtr
的用法示例。
在下文中一共展示了IntPtr::ToPointer方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
Flood::Vector3::Vector3(System::IntPtr native)
{
auto __native = (::Vector3*)native.ToPointer();
__X = __native->x;
__Y = __native->y;
__Z = __native->z;
}
示例2: Initialize
//-----------------------------------------------------------------------------
bool MWorldEditor::Initialize(System::IntPtr hWndPtr)
{
m_pkWorldEditor = new sdWorldEditor;
NIASSERT(m_pkWorldEditor);
m_pkWorldEditor->Initialize((HWND)hWndPtr.ToPointer());
return true;
}
示例3: Compute
System::IntPtr MFeatureProcessor::Compute(float x, float y, float z,
System::IntPtr depth_image_ptr, bool visulize) {
IplImage* depth_image = reinterpret_cast<IplImage*>(depth_image_ptr.ToPointer());
cv::Mat mat(depth_image);
cv::Mat skinMat;
float* descriptor = processor_->Compute(x, y, z, mat, skinMat, visulize);
return System::IntPtr(descriptor);
}
示例4:
Flood::Color::Color(System::IntPtr native)
{
auto __native = (::Color*)native.ToPointer();
__R = __native->r;
__G = __native->g;
__B = __native->b;
__A = __native->a;
}
示例5:
Flood::FileWatchEvent::FileWatchEvent(System::IntPtr native)
{
auto __native = (::FileWatchEvent*)native.ToPointer();
__Action = (Flood::FileWatchEventKind)__native->action;
__WatchId = __native->watchId;
__Dir = StringMarshaller::marshalString(__native->dir);
__Filename = StringMarshaller::marshalString(__native->filename);
__Userdata = __native->userdata;
}
示例6: Initialize
virtual void Initialize()
{
DWORD flag = MPEG_CODEC_ID_BKMPEG4 | FILE_CODEC_TYPE_STREAM;
DWORD flag1 = VMDDS_YUVOFF|VMDDS_RGBOFF;
HANDLE hClient = NULL;
hClient = MP4_ClientInit(0, flag, flag1, 0);
if (hClient == NULL)
{
throw gcnew System::Exception();
}
this->hClient = hClient;
int result = 0;
result = MP4_ClientSetStreamType(this->hClient, STREAM_TYPE_AVSYNC);
CheckResult(result);
result = MP4_ClientSetWaitTime(this->hClient, 3000);
CheckResult(result);
System::IntPtr ptrUser = Marshal::StringToHGlobalAnsi(this->userName);
LPCTSTR pUser = static_cast<LPCTSTR>(ptrUser.ToPointer());
System::IntPtr ptrPwd = Marshal::StringToHGlobalAnsi(this->password);
LPCTSTR pPwd = static_cast<LPCTSTR>(ptrPwd.ToPointer());
result = MP4_ClientSetConnectUser(this->hClient, pUser, pPwd);
CheckResult(result);
Marshal::FreeHGlobal(ptrUser);
Marshal::FreeHGlobal(ptrPwd);
MP4_ClientSetTranstType(this->hClient, 1);
result = MP4_ClientSetTranstPackSize(this->hClient, 4096);
CheckResult(result);
result = MP4_ClientStartCapture(this->hClient);
CheckResult(result);
}
示例7:
NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE::OvPropertyMappingDefinition^ NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE::ObjectFactory::CreateOvPropertyMappingDefinition(System::IntPtr ptr, System::Boolean autoDispose)
{
if (ptr == IntPtr::Zero)
return nullptr;
FdoRdbmsOvPropertyMappingDefinition* p = (FdoRdbmsOvPropertyMappingDefinition*)ptr.ToPointer();
NAMESPACE_OSGEO_RUNTIME::Disposable^ wrap;
if (wrap = CHECK<FdoRdbmsOvPropertyMappingSingle, NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE::OvPropertyMappingSingle>(p, autoDispose)) return static_cast<NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE::OvPropertyMappingDefinition^>(wrap);
if (wrap = CHECK<FdoRdbmsOvPropertyMappingDefinition, NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE::OvPropertyMappingDefinition>(p, autoDispose)) return static_cast<NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE::OvPropertyMappingDefinition^>(wrap);
return nullptr;
}
示例8:
Flood::Matrix4x3::Matrix4x3(System::IntPtr native)
{
auto __native = (::Matrix4x3*)native.ToPointer();
__M11 = __native->m11;
__M12 = __native->m12;
__M13 = __native->m13;
__M21 = __native->m21;
__M22 = __native->m22;
__M23 = __native->m23;
__M31 = __native->m31;
__M32 = __native->m32;
__M33 = __native->m33;
__Tx = __native->tx;
__Ty = __native->ty;
__Tz = __native->tz;
}
示例9: Present
Result SwapChain::Present( SlimDX::Direct3D9::Present flags, System::Drawing::Rectangle sourceRectangle, System::Drawing::Rectangle destinationRectangle, System::IntPtr windowOverride )
{
RECT nativeSourceRect = { sourceRectangle.Left, sourceRectangle.Top, sourceRectangle.Right, sourceRectangle.Bottom };
RECT nativeDestRect = { destinationRectangle.Left, destinationRectangle.Top, destinationRectangle.Right, destinationRectangle.Bottom };
RECT *sourcePtr = NULL;
RECT *destPtr = NULL;
if( sourceRectangle != Rectangle::Empty )
sourcePtr = &nativeSourceRect;
if( destinationRectangle != Rectangle::Empty )
destPtr = &nativeDestRect;
HRESULT hr = InternalPointer->Present( sourcePtr, destPtr, static_cast<HWND>( windowOverride.ToPointer() ), NULL, static_cast<DWORD>( flags ) );
return RECORD_D3D9( hr );
}
示例10:
NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::IOvPropertyDefinition^ NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::ObjectFactory::CreateIOvPropertyDefinition(System::IntPtr ptr, System::Boolean autoDispose)
{
if (ptr == IntPtr::Zero)
return nullptr;
FdoSqlServerOvPropertyDefinition* p = (FdoSqlServerOvPropertyDefinition*)ptr.ToPointer();
NAMESPACE_OSGEO_RUNTIME::Disposable^ wrap;
// Note:
// Here we need keep dynamic_cast to decide the real type of "ptr"
if(wrap = CHECK<FdoSqlServerOvAssociationPropertyDefinition, NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvAssociationPropertyDefinition>(p, autoDispose)) return static_cast<NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvAssociationPropertyDefinition^>(wrap);
if(wrap = CHECK<FdoSqlServerOvDataPropertyDefinition, NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvDataPropertyDefinition>(p, autoDispose)) return static_cast<NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvDataPropertyDefinition^>(wrap);
if(wrap = CHECK<FdoSqlServerOvGeometricPropertyDefinition, NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvGeometricPropertyDefinition>(p, autoDispose)) return static_cast<NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvGeometricPropertyDefinition^>(wrap);
if(wrap = CHECK<FdoSqlServerOvObjectPropertyDefinition, NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvObjectPropertyDefinition>(p, autoDispose)) return static_cast<NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvObjectPropertyDefinition^>(wrap);
if(wrap = CHECK<FdoSqlServerOvPropertyDefinition, NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvPropertyDefinition>(p, autoDispose)) return static_cast<NAMESPACE_OSGEO_FDO_PROVIDERS_RDBMS_OVERRIDE_SQLSERVERSPATIAL::OvPropertyDefinition^>(wrap);
return nullptr;
}
示例11:
CppSharp::Parser::ParserTargetInfo^ CppSharp::Parser::ParserTargetInfo::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance)
{
::CppSharp::Parser::ParserTargetInfo^ result = gcnew ::CppSharp::Parser::ParserTargetInfo((::CppSharp::CppParser::ParserTargetInfo*) native.ToPointer());
result->__ownsNativeInstance = __ownsNativeInstance;
return result;
}
示例12:
OpenCV::Cv::MatOp::MatOp(System::IntPtr native)
{
auto __native = (::cv::MatOp*)native.ToPointer();
NativePtr = __native;
}
示例13:
Flood::Stream::Stream(System::IntPtr native)
{
auto __native = (::Stream*)native.ToPointer();
NativePtr = __native;
}
示例14:
Flood::Archive::Archive(System::IntPtr native)
{
auto __native = (::Archive*)native.ToPointer();
NativePtr = __native;
}
示例15:
InputManager::InputManager(System::IntPtr _windowHandle)
{
IntPtr hInst = System::Runtime::InteropServices::Marshal::GetHINSTANCE(this->GetType()->Module);
m_Pimpl = new RE::InputNative::InputManager(hInst.ToPointer(), (int*)_windowHandle.ToPointer());
}