请问一下,这个函数的第三个参数的是做什么的
// 插件被挂接到插槽 
STDMETHODIMP Cmain_ww_item_obj::OnCreate(IDispatch* pSlot, long hParentWnd , long lCookie)
{
// 使用模态对话框可能导致异常, 不要在此函数中执行耗时操作 
m_h_ie_dlg_wnd = NULL;
if(!pSlot)
{
return E_INVALIDARG;
}
m_plugincookie = lCookie;
g_plugincookie = lCookie;
cookie2=lCookie;
m_spEServiceInputToolbarSlot = CComQIPtr<ISDKEServiceInputToolbarSlot>(pSlot); if (m_spEServiceInputToolbarSlot == NULL)
{
return E_FAIL;
}

g_spEServiceInputToolbarSlot = m_spEServiceInputToolbarSlot; CComPtr<IDispatch> spDisp; 
m_spEServiceInputToolbarSlot->GetApplication(lCookie, &spDisp);
m_spApplication = CComQIPtr<ISDKApplication>(spDisp);
g_spApplication = m_spApplication;
g_spApplication2=g_spApplication;
if (g_spApplication != NULL) {
HRESULT hr = g_spApplication->GetSessionKey(lCookie);

if (hr != S_OK)
{
MessageBox(NULL, _T("GetSessionKey failed"), _T("info"), MB_OK);
}  /*get UID*/
CComPtr<IDispatch> spUserDisp;
m_spApplication->GetLoginUser(g_plugincookie, &spUserDisp);
// 当前登陆用户的对象, 包含当前登录用户的一些信息
CComQIPtr<ISDKLoginUser> spLoginUser(spUserDisp);

if (spLoginUser){
spLoginUser->GetUserID(g_plugincookie, g_loginuser.GetAddress());
if (g_loginuser.length() > 0)
{
WriteLoginIdToIni(g_loginuser);
}
spUserDisp.Release();
}
} ATLTRACE(_T("onclick: slot %p, cookie %d"), m_spEServiceInputToolbarSlot, m_plugincookie);
// g_ie_browser_dlg.SetSlotAndItemCookie(m_spEServiceInputToolbarSlot, m_plugincookie); _bstr_t sversion;
// 获取当前用户安装的SDK版本, 插件可以通过当前用户的SDK版本来判断是否符合自己的插件版本
// 并可以根据不同版本做相应的兼容性处理
HRESULT hr = m_spApplication->GetVersion(m_plugincookie, sversion.GetAddress(), &m_current_SDKVer);
if (FAILED(hr))
{
m_current_SDKVer = 5000;
} // 管理用于事件消息的对象, 由于该对象是插槽插件, 本身能监听的消息必须和窗口有关
// 为了全局消息的监听, 需要让实现了ISDKPlugin2接口的对象将全局消息转发到各个插槽插件
if (!m_spNotifyMsgSource)
{
HRESULT hr = ::CoCreateInstance(__uuidof(NotifyMsg), NULL,
CLSCTX_INPROC_SERVER, __uuidof(INotifyMsgSource), (void**)&m_spNotifyMsgSource);
if (FAILED(hr))
{
ATL::CString errmsg;
errmsg.Format(_T("create notify msg source failed. code:%d."), GetLastError());
#ifdef _MSG_BOX
::MessageBox(NULL, errmsg, _T("error"), MB_OK);
#endif
return hr;
} // 将自身加入消息监听的列表中, 这样可以让一些消息转发到该对象
hr = m_spNotifyMsgSource->AddListener(this);
if (FAILED(hr))
{
ATL::CString errmsg;
errmsg.Format(_T("add listener error. code:%d."), GetLastError());
#ifdef _MSG_BOX
::MessageBox(NULL, errmsg, _T("error"), MB_OK);
#endif
return hr;
}
}
// 注册消息回调函数, 用于处理键盘事件
m_spApplication->RegisterPreTranslate(m_plugincookie, (LONG_PTR)&MyPreTranslateFunc);
g_session_key_event = CreateEvent(NULL, TRUE, FALSE, NULL);
return S_OK;
}