|
// Copyright (c) Microsoft Corporation. All rights reserved.
#include "stdafx.h"
#include "D3D11ClassInstance.h"
#include "D3D11ClassLinkage.h"
using namespace Microsoft::WindowsAPICodePack::DirectX::Direct3D11;
ClassLinkage^ ClassInstance::GetClassLinkage()
{
ID3D11ClassLinkage* tempoutLinkage = NULL;
GetInterface<ID3D11ClassInstance>()->GetClassLinkage(&tempoutLinkage);
return tempoutLinkage == NULL ? nullptr : gcnew ClassLinkage(tempoutLinkage);
}
ClassInstanceDescription ClassInstance::Description::get()
{
ClassInstanceDescription desc;
pin_ptr<ClassInstanceDescription> ptr = &desc;
GetInterface<ID3D11ClassInstance>()->GetDesc((D3D11_CLASS_INSTANCE_DESC*)ptr);
return desc;
}
String^ ClassInstance::InstanceName::get()
{
SIZE_T len = CommonUtils::MaxNameSize;
LPSTR tempInstanceName = new char[len];
try
{
GetInterface<ID3D11ClassInstance>()->GetInstanceName(tempInstanceName, &len);
return tempInstanceName ? gcnew String(tempInstanceName) : nullptr;
}
finally
{
delete [] tempInstanceName;
}
}
String^ ClassInstance::TypeName::get()
{
SIZE_T len = CommonUtils::MaxNameSize;
LPSTR tempTypeName = new char[len];
try
{
GetInterface<ID3D11ClassInstance>()->GetTypeName(tempTypeName, &len);
return tempTypeName ? gcnew String(tempTypeName) : nullptr;
}
finally
{
delete [] tempTypeName;
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
John graduated from the University of South Australia in 1997 with a Bachelor of Electronic Engineering Degree, and since then he has worked on hardware and software in many fields including Aerospace, Defence, and Medical giving him over 10 of years experience in C++ and C# programming. In 2009 John Started his own contracting company doing business between Taiwan and Australia.