HeaderPane
Main

SftPicture2 Documentation

Share Link
Print

Sft_CopyPicture

Copy one SFT_PICTURE into another. Handles and COM pointers are copied verbatim - the destination becomes a second reference to the same resources.

C

void Sft_CopyPicture(LPSFT_PICTURE lpPictureCopy, LPCSFT_PICTURE lpPictureOrig);

Parameters

lpPictureCopy

Pointer to the destination SFT_PICTURE. Must not be NULL. Reset to empty by an internal Sft_ClearPicture call before the copy.

lpPictureOrig

Pointer to the source SFT_PICTURE. Must not be NULL.

Comments

Sft_CopyPicture is the right call when the application needs two SFT_PICTURE structures pointing at the same underlying picture - for example to hand a copy to a per-product API that captures the structure by value. The SFT_PICFLAG_FREE bit is cleared on the destination so the copy is treated as application-owned regardless of the source's ownership flag.

Resource lifetime: after Sft_CopyPicture both structures reference the same handle / pointer. The application is still responsible for releasing the resource exactly once - whichever of the two structures outlives the resource must Sft_ClearPicture itself before the resource is destroyed.

The function asserts at runtime that the source's type is one of the recognized SFT_PICTURE_* constants - useful for catching uninitialized memory.

See Also SftPicture2 | SFT_PICTURE | Sft_InitPicture | Sft_ClearPicture


Last Updated 05/09/2026 - (email)
© 2026 Softel vdm, Inc.