The GetLayoutCount2 method retrieves the count of layout objects for the specified object in the loaded profile
HRESULT GetLayoutCount2(
[in, string] BSTR p_pwsObjectId,
[out] LONG* p_pnCount
);
Parameters:
p_pwsObjectId
[in] object id (watermark text, watermark image, overlay, signature or content)
p_pnCount
[out] layouts count
Return values:
S_OK on success or COM error codeNV_NOT_INITIALIZED - Initialize was not calledNV_UNKNOWN_PROFILE - no profile loadedNV_INVALID_OPTION - wrong object id