Extend Call Log Menu

Hi,
i'm trying to add my custom menu in Call History on SP platform.
My code works as well on PPC but on SP 'DllGetClassObject' is never called! !
The dll is correctly registered and exports all functions.
The registry key that i'm using is: AppView\MSCLog

Any ideas

Thanks in advance ;)



Answer this question

Extend Call Log Menu

  • GazCoder

    no...i can read all records in history.
    Remeber: pRef returns the CEOID of record in clog.db and not the index for PhoneCallLog APIs

  • George Waters

    Hii'm not that expertbut i've been trying so long with no lucki'm trying to extend context menu for call history or call logi tried to do that based on windows mobile 2005 sdk sample:inbox list view extensionbut with no luck at all :(could u please tell me where to start or at least give me an example Thanx in advance
  • sofakng

    inboxmenu example contains the code to get ItemRefArray ;))
  • CrazyEye

    CEGUID m_ceguidInitDB;

    CEOID oidDB;

    //Get record's OID

    CEOID oidCallLog = (CEOID) pItemArray->rgRefs[0].pRef;

    //Mount the volume

    BOOL a=CeMountDBVolEx(&m_ceguidInitDB, L"\\pim.vol", 0, OPEN_EXISTING );

    //Open clog.db

    HANDLE m_hDBCLog = CeOpenDatabaseEx2( &m_ceguidInitDB, &oidDB, TEXT("clog.db"), 0, 0, NULL);

    //Go to record

    CEOID ceOIDTemp = CeSeekDatabase(m_hDBCLog, CEDB_SEEK_CEOID, oidCallLog, NULL);

    //Read the record

    CEPROPID propLogName = MAKELONG(CEVT_LPWSTR, 7);

    CEPROPID propLogNumber = MAKELONG(CEVT_LPWSTR, 6);

    DWORD dwBuf = 0;

    WORD wProps = 2;

    CEPROPVAL *pPropVals = NULL;

    CEPROPID propsToRead[2] = { propLogName, propLogNumber };

    ceOIDTemp = CeReadRecordPropsEx( m_hDBCLog, CEDB_ALLOWREALLOC, &wProps, propsToRead, reinterpret_cast<LPBYTE*>(&pPropVals), &dwBuf, NULL );

    //BOOL b=::MessageBox(GetActiveWindow(),pPropVals[0].val.lpwstr,TEXT("test"),MB_OK);

    if (a==TRUE)

    ::MessageBox(GetActiveWindow(),TEXT("ok database mounted"),TEXT("test"),MB_OK);

    BOOL c=CeUnmountDBVol(&m_ceguidInitDB);

    if (c==TRUE)

    ::MessageBox(GetActiveWindow(),TEXT("databse unmounted"),TEXT("test"),MB_OK);

    everything works fine,databse being mounted and unmounted.

    but i still don know how to use this "commented line:

    //BOOL b=::MessageBox(GetActiveWindow(),pPropVals[0].val.lpwstr,TEXT("test"),MB_OK);

     for the message. it tried many different combinations with no luck

    once i remove the //,it crash that i don even see any messages

    thanx again and again for ur help


  • bergeron

    have you registered your dll in the correct class key

    Software\Microsoft\Shell\Extensions\ContextMenus\Phone\Log for PPC

    Software\Microsoft\Shell\Extensions\ContextMenus\AppView\\MSClog for SP

    bye


  • wtrn

    Thank you!

    I have one problem....

    The documentation says that CeMountDBVolEx is defined in Winbase.h and coredll.lib. I've included winbase.h and added codedll.lib but I still get this error:
    Error 1 error C3861: 'CeMountDBVolEx': identifier not found

    CeUnmountDBVol works like a charm...

    Edit: #define EDB did it for me :)

     

     


  • danni123

    you have all in my above post.

    pRef returns the record's CEOID so you've to open clog.db database and readthe properties of this record.


  • Kent Waldrop Fe08

    Yes....on WM5 you've to use #define EDB

    ;)


  • Evgeny Popov

    //Get record's OID
    CEOID oidCallLog = (CEOID) ItemRefArray->rgRefs[0].pRef;

    //Mount the volume
    CeMountDBVolEx(&m_ceguidInitDB, L"\\pim.vol", 0, OPEN_EXISTING )

    //Open clog.db
    HANDLE m_hDBCLog = CeOpenDatabaseEx2( &m_ceguidInitDB, &oidDB, TEXT("clog.db"), 0, 0, NULL);

    //Go to record
    CEOID ceOIDTemp = CeSeekDatabase(m_hDBCLog, CEDB_SEEK_CEOID, oidCallLog, NULL);

    //Read the record
    CEPROPID propLogName = MAKELONG(CEVT_LPWSTR, 7);
    CEPROPID propLogNumber = MAKELONG(CEVT_LPWSTR, 6);
    DWORD dwBuf = 0;
    WORD wProps = 2;
    CEPROPVAL *pPropVals = NULL;
    CEPROPID propsToRead[2] = { propLogName, propLogNumber };
    ceOIDTemp = CeReadRecordPropsEx( m_hDBCLog, CEDB_ALLOWREALLOC, &wProps, propsToRead, reinterpret_cast<LPBYTE*>(&pPropVals), &dwBuf, NULL );

    Then check values in pPropVals array ;)

    Bye


  • Quinn01

    thanx alot its working now :Dmaybe i did something wrong in the begining.ok could u please paste the code for use getItemrefarray with call log,its different as far as i know than the one in the sample.Thanx again
  • russ_mac

    Thanx really for ur patince - ok i havent changed getItemRefArray,and i think its working - the problem now how to use use it with itemRef, i mean,i want to see like in a message box,that i'm really getting the call log(number to be more specific) for the item i'm selecting in call history -- its like doing same thing in the "AddToSender" in inbox example.--- i need that cuz 'im trying to add a new menu for call history which say "Add Number to Existing Contact".really thank you for ur help.
  • marcoMB

    Hi!

    I have been trying to make a menu extension to the call history in WM 5.0 for a long time and I'm stuck at one problem....

    I'm trying to get the phone number of the selected item in the list......

    It works as it should when the call history has less than 41 items...But when the number gets bigger the index of the call history item is "reset" and number 42 in the list becomes 1....

    Have you got a simular problem

    Best regard
    Oystein


  • BD_Elektrona

    code must be signed!

    sorry...i always forget this on SP :-p


  • ShakyMobo

    Could you please post the source code from your InvokeCommand

    Best regard
    Oystein


  • Extend Call Log Menu