|
|
От: |
EqWu
|
|
| Дата: | 28.03.05 09:23 | ||
| Оценка: | 3 (1) | ||
Путем некоторых наблюдений мною было установлено, что при обновлении параметров аккаунта (при создании и удалении — тоже)Outlook 2003: user has a signature for each mail account (“New Signature” value in the account section under HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\PROFILE_NAME\9375CFF0413111d3B88A00104B2A6676\ACCOUNT_ID).
///////////////////////////////////////////////////////
/////// COutlookAccMan :: PostOutlookAccountMessage ///////
///////////////////////////////////////////////////////
// Purpose:
// Posts notification message of accounts changes to Outlook (2002 and 2003)
// This function registers message based on template:
// "OlkAcctMgrNotif" + account_creation_tag + "_" + profile_name
// If this is message about new account creation account_creation_tag = "Create",
// else account_creation_tag is empty
// profile_name - name of profile in which the changes occur
// This message is posted as broadcast message (!!!)
// Parameters:
// [in] strProfileName - profile name in which the changes occur
// [in] dwAction - action code
// 0 - account creation (valid only if bCreationNotify is true)
// 1 - account modification
// 4 - accounts configuration modification (e.g. set default account)
// 5 then 3 - account removal
// [in] dwAccID - account id (as keys names under 9375CFF0413111d3B88A00104B2A6676 section)
// [in] bCreationNotify - must be true if this message is notification about new account
// Return values:
// TRUE - success
// FALSE - error
///////////////////////////////////////////////////////
void OutlookAccMan::PostOutlookAccountMessage(LPCTSTR strProfileName, DWORD dwAction, DWORD dwAccID,
bool bCreationNotify)
{
UINT uMsgId2002_3 = WM_NULL;
CString msgName = _T("OlkAcctMgrNotif");
if(bCreationNotify)
msgName += _T("Create");
msgName += _T("_");
msgName += strProfileName;
uMsgId2002_3 = RegisterWindowMessage(msgName);
PostMessage(HWND_BROADCAST, uMsgId2002_3, (WPARAM)dwAction, (LPARAM)dwAccID);
// if we work as Exchage client extention or as Outlook Addin
// let Outlook to proceed messages
/*
MSG msg;
DWORD dwFirstTick = GetTickCount();
while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
if( (GetTickCount() - dwFirstTick) > 1000 )
break;
}
*/
}