Venice
Year::CreateStockDoc
 
Creates a Stock Document object.
 
IStockDoc* CreateStockDoc (
    VARIANT_BOOL bCanChange
)
 
Parameters
bCanChange
[in] True if you want to make changes (perform inserts, updates or deletes) to the object you are creating, otherwise false.
 
Remarks
How to explicitly destroy this object?
C++
pStockDoc = NULL
The object is destroyed immediately.
C#
System.Runtime.InteropServices.Marshal.ReleaseComObject(oStockDoc)
oStockDoc = null
By assigning the object to null 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 oStockDoc = Nothing
The object is destroyed immediately.
VBN
System.Runtime.InteropServices.Marshal.ReleaseComObject(oStockDoc)
oStockDoc = Nothing
By assigning the object to Nothing 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
CreateYearContext
 
Samples
 
C++
 
IStockDocPtr pStockDoc = pYear->CreateStockDoc (VARIANT_TRUE);

C#
 
StockDoc oStockDoc = oYear.CreateStockDoc (true);

VBS
 
Dim oStockDoc
Set oStockDoc = oYear.CreateStockDoc(True)

VB.NET
 
Dim oStockDoc As ClSdk.StockDoc
oStockDoc = oYear.CreateStockDoc(True)