Venice
Dossier::CreateYearContext
 
Creates a Year context.
 
IYear* CreateYearContext (
    SHORT sYear
)
 
Parameters
sYear
[in] The financial year you want to create an interface of. When 0 is supplied, the last financial year of the dossier is used.
 
Return value
A pointer to a Financial Year object interface.
 
Remarks
How to explicitly destroy this object?
C++
pYear = NULL
If other objects (pEntry, pBalan,...) still refer to this object, assigning the object to NULL has no effect. Otherwise the object is destroyed immediately.
C#
System.Runtime.InteropServices.Marshal.ReleaseComObject(oYear)
oYear = null
If other objects (oEntry, oBalan,...) still refer to this object, assigning the object to null has no effect. Otherwise, the object is released (the reference count is decremented) but not destroyed. The garbage collector decides when the object is actually destroyed. Adding the ReleaseComObject-statement speeds up the actual destruction of the object.
VBS
Set oYear = Nothing
If other objects (oEntry, oBalan,...) still refer to this object, assigning the object to Nothing has no effect. Otherwise the object is destroyed immediately.
VBN
System.Runtime.InteropServices.Marshal.ReleaseComObject(oYear)
oYear = Nothing
If other objects (oEntry, oBalan,...) still refer to this object, assigning the object to Nothing has no effect. Otherwise the object is released (the reference count is decremented) but not destroyed. The garbage collector decides when the object is actually destroyed. Adding the ReleaseComObject-statement speeds up the actual destruction of the object.
 
See Also
CreateDossierContext
 
Samples
 
C++
 
IYearPtr pYear = pDossier->CreateYearContext (pDossier->vLastYear);
// This is equal to:
IYearPtr pYear = pDossier->CreateYearContext (0);

C#
 
Year oYear = oDossier.CreateYearContext (oDossier.vLastYear);
// This is equal to:
Year oYear = oDossier.CreateYearContext (0);

VBS
 
Dim oYear
Set oYear = oDossier.CreateYearContext(oDossier.vLastYear)
' This is equal to:
Set oYear = oDossier.CreateYearContext(0)

VB.NET
 
Dim oYear As ClSdk.Year
oYear = oDossier.CreateYearContext(oDossier.vLastYear)
' This is equal to:
oYear = oDossier.CreateYearContext(0)