const GUID guidEntryPoint { 0x71e456a5, 0x6a4e, 0x46aa, { 0xa7, 0x27, 0x10, 0x5d, 0x58, 0x4c, 0x79, 0x17 } };
const
GUID
public static readonly Guid guidEntryPoint = new Guid("71E456A5-6A4E-46aa-A727-105D584C7917");
public
static
readonly
Guid
new
"71E456A5-6A4E-46aa-A727-105D584C7917"
WSupplies* pSupplies; WSupplies::Create(&pSupplies, pDomain);
WSupplies
WSupplies pSupplies; WSupplies.Create(out pSupplies, pDomain);
out
pDomain->InsertNamedObject(&pSupplies->BuildLink(true), &guidEntryPoint, L"first entry point");
true
"first entry point"
pDomain.InsertNamedObject(pSupplies.BuildLink(true), guidEntryPoint, "first entry point", Transaction.Store);
Transaction
DataFoundation::stcObjectLink* pSuppliesLink; pDomain->QueryNamedObjectLink(&guidEntryPoint, 1, &pSuppliesLink); WSupplies* pSupplies = NULL; WSupplies::Open(&pSupplies, *pSuppliesLink, pDomain);
stcObjectLink
NULL
DataFoundation.stcObjectLink[] apSuppliesLink; pDomain.QueryNamedObjectLink(aguidEntryPoint, out apSuppliesLink); WSupplies pSupplies = null; WSupplies.Open(out pSupplies, apSuppliesLink[0].oiObjectId, pDomain, Transaction.Load);
null
WSupplies* pSupplies = NULL; DataFoundation::stcObjectLink* pSuppliesLink; if(S_OK == pDomain->QueryNamedObjectLink(&guidEntryPoint, 1, &pSuppliesLink)) { if(WSupplies::IsOfType(pSuppliesLink)) { WSupplies::Open(&pSupplies, *pSuppliesLink, pDomain); pSupplies->Load(); DataFoundationAccess::MemFree(pSuppliesLink); if(FAILED(pDomain->Execute(Transaction::Load))) { wprintf(L"Execute failed...\n"); } } else { DataFoundationAccess::MemFree(pSuppliesLink); wprintf(L"Object is not of type WSupplies\n"); } } else { WSupplies::Create(&pSupplies, pDomain); pDomain->InsertNamedObject(&pSupplies->BuildLink(true), &guidEntryPoint, L"first entry point"); pSupplies->Store(); if(FAILED(pDomain->Execute(Transaction::Store))) { wprintf(L"Execute failed...\n"); } }
if
S_OK
FAILED
"Execute failed...\n"
else
"Object is not of type WSupplies\n"
WSupplies pSupplies = null; DataFoundation.stcObjectLink[] apSuppliesLink; if(0 == pDomain.QueryNamedObjectLink(aguidEntryPoint, out apSuppliesLink)) { if(WSupplies.IsOfType(apSuppliesLink[0])) { WSupplies.Open(out pSupplies, apSuppliesLink[0].oiObjectId, pDomain, Transaction.Load); pSupplies.Load(_WSupplies.ALL_ATTRIBUTES, Transaction.Load); if(0 > pDomain.Execute(Transaction.Load)) { Console.WriteLine("Execute failed..."); } } else { Console.WriteLine("Object is not of type WSupplies"); } } else { WSupplies.Create(out pSupplies, pDomain); pDomain.InsertNamedObject(pSupplies.BuildLink(true), guidEntryPoint, "first entry point", Transaction.Store); pSupplies->Store(Transaction.Store); if(0 > pDomain.Execute(Transaction.Load)) { Console.WriteLine("Execute failed..."); } }
"Execute failed..."
"Object is not of type WSupplies"