Incorrect values in AADOCTODIR_PARAM

Added a hook to capture when aaApi_DocumentSelectDlg checks out a document, selecting a file that is a parent in a logical set

 in AAPOSTHOOK + AAHOOK_CHECKOUT_DOCUMENT , where param2 == AAOPER_DOC_CHECKOUT

lProjectId is always -7

lDocumentId changes as if it’s the set number (didn’t check)

//paramType is param2, arg is param 1 from aaApiHook
    if (AAOPER_DOC_CHECKOUT == paramType && arg != 0)
    {
        const AADOCTODIR_PARAM *data = reinterpret_cast<const AADOCTODIR_PARAM*>(arg);
        if (data != nullptr && data->lptstrFileName != nullptr)
        {
            pwDoc.setPath(data->lptstrFileName);
            if (data->lpDocuments != nullptr && data->lCount > 0)
            {
                pwDoc.setProjectId(data->lpDocuments->lProjectId); //incorrect value
                pwDoc.setDocumentId(data->lpDocuments->lDocumentId); //incorrect value
            }
        }
    }

Parents Reply Children