PW SDK aaApi_Monikers Examples

Hi all,

Does anyone know where I can find some examples for retrieving monikers (using aaApi_GetProjectMonikers and aaApi_MonikersToStrings) in PW SDK. I'm looking at trying to retrieve a full document/folder path from a document or from the address bar, but having some issues getting it to work.

Regards,

Mark

Parents
  • Give this a try  - assumes you have the project and document Id's (LONG lProjectId and LONG lDocumentId)

    HMONIKER hMoniker[1];

    hMoniker[0] = NULL;

    AADOC_ITEM aaItem;

    aaItem.lProjectId = lProjectId;

    aaItem.lDocumentId = lDocumentId;

    BOOL bPassed = aaApi_GetDocumentMonikers(1L,&aaItem,hMoniker);

    LPWSTR* ppMonikerStr;

    aaApi_MonikersToStrings(1L,hMoniker,&ppMonikerStr,AAMONIKERF_RESOURCE_LOCATION | AAMONIKERF_VISUAL);

    //Get the string from *ppMonikerStr, do what you need

    //AfxMessageBox(*ppMonikerStr);

    aaApi_Free(ppMonikerStr);

    ppMonikerStr = NULL;

    Answer Verified By: Mark Shamoun 

Reply
  • Give this a try  - assumes you have the project and document Id's (LONG lProjectId and LONG lDocumentId)

    HMONIKER hMoniker[1];

    hMoniker[0] = NULL;

    AADOC_ITEM aaItem;

    aaItem.lProjectId = lProjectId;

    aaItem.lDocumentId = lDocumentId;

    BOOL bPassed = aaApi_GetDocumentMonikers(1L,&aaItem,hMoniker);

    LPWSTR* ppMonikerStr;

    aaApi_MonikersToStrings(1L,hMoniker,&ppMonikerStr,AAMONIKERF_RESOURCE_LOCATION | AAMONIKERF_VISUAL);

    //Get the string from *ppMonikerStr, do what you need

    //AfxMessageBox(*ppMonikerStr);

    aaApi_Free(ppMonikerStr);

    ppMonikerStr = NULL;

    Answer Verified By: Mark Shamoun 

Children