Click here to Skip to main content
15,910,661 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionIn ATL, how to sink web event with IDispEventImpl?? Pin
King_jinjing7-Nov-08 3:12
King_jinjing7-Nov-08 3:12 
AnswerRe: In ATL, how to sink web event with IDispEventImpl?? Pin
Stuart Dootson7-Nov-08 5:47
professionalStuart Dootson7-Nov-08 5:47 
GeneralRe: In ATL, how to sink web event with IDispEventImpl?? Pin
King_jinjing7-Nov-08 6:04
King_jinjing7-Nov-08 6:04 
GeneralRe: In ATL, how to sink web event with IDispEventImpl?? Pin
Stuart Dootson7-Nov-08 8:50
professionalStuart Dootson7-Nov-08 8:50 
GeneralRe: In ATL, how to sink web event with IDispEventImpl?? Pin
King_jinjing7-Nov-08 18:05
King_jinjing7-Nov-08 18:05 
GeneralRe: In ATL, how to sink web event with IDispEventImpl?? Pin
Stuart Dootson8-Nov-08 1:10
professionalStuart Dootson8-Nov-08 1:10 
GeneralRe: In ATL, how to sink web event with IDispEventImpl?? Pin
King_jinjing8-Nov-08 5:38
King_jinjing8-Nov-08 5:38 
GeneralRe: In ATL, how to sink web event with IDispEventImpl?? Pin
Stuart Dootson9-Nov-08 22:21
professionalStuart Dootson9-Nov-08 22:21 
I think your problem is that you haven't defined an ATL 'module' object. ATL tries to reference the module object in the CComTypeHolder::GetTI method (when it's locking the critical section), so if you haven't defined one, it'll crash there.

Here's what I have in place of your WinMain:


class CHostActiveXModule : public CAtlExeModuleT<CHostActiveXModule>
{
public :

   CMainWindow m_wndMain;

   // Create the Main window
   HRESULT PreMessageLoop(int nCmdShow)
   {
      m_libid = LIBID_ATLLib;
      HRESULT hr = CAtlExeModuleT<CHostActiveXModule>::PreMessageLoop(nCmdShow);
      if (SUCCEEDED(hr))
      {
         AtlAxWinInit();
         hr = S_OK;
         RECT rc;
         rc.top = rc.left = 100;
         rc.bottom = rc.right = 500;
         m_wndMain.Create(NULL, rc, _T("Host Calendar") );
         m_wndMain.ShowWindow(nCmdShow);         
      }
      return hr;
   }

   // Clean up. App is exiting.
   HRESULT PostMessageLoop()
   {
      AtlAxWinTerm();
      return CAtlExeModuleT<CHostActiveXModule>::PostMessageLoop();
   }
};

CHostActiveXModule _AtlModule;

int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int nShowCmd)
{
   return _AtlModule.WinMain(nShowCmd);
}

GeneralRe: In ATL, how to sink web event with IDispEventImpl?? Pin
King_jinjing10-Nov-08 3:15
King_jinjing10-Nov-08 3:15 
QuestionNT Services (ATL Com AppWizard - ServerType:Service(exe) ) Pin
Taruni4-Nov-08 0:48
Taruni4-Nov-08 0:48 
AnswerRe: NT Services (ATL Com AppWizard - ServerType:Service(exe) ) Pin
led mike4-Nov-08 6:53
led mike4-Nov-08 6:53 
QuestionIs it to return the address of an element in a vector Pin
followait29-Oct-08 0:11
followait29-Oct-08 0:11 
AnswerRe: Is it to return the address of an element in a vector Pin
Roger Stoltz29-Oct-08 0:39
Roger Stoltz29-Oct-08 0:39 
AnswerRe: Is it to return the address of an element in a vector Pin
Stuart Dootson29-Oct-08 4:13
professionalStuart Dootson29-Oct-08 4:13 
GeneralRe: Is it to return the address of an element in a vector Pin
followait29-Oct-08 5:01
followait29-Oct-08 5:01 
AnswerRe: Is it to return the address of an element in a vector Pin
Jürgen Jung5-Nov-08 22:08
Jürgen Jung5-Nov-08 22:08 
AnswerRe: Is it to return the address of an element in a vector Pin
Michael Dunn5-Dec-08 15:54
sitebuilderMichael Dunn5-Dec-08 15:54 
Questiona small question about STL naming convention Pin
followait27-Oct-08 16:51
followait27-Oct-08 16:51 
AnswerRe: a small question about STL naming convention Pin
Stuart Dootson27-Oct-08 23:57
professionalStuart Dootson27-Oct-08 23:57 
QuestionDoes IE forward WM_DISPLAYCHANGE Message to ATL Plugin Pin
chatko23-Oct-08 14:40
chatko23-Oct-08 14:40 
AnswerRe: Does IE forward WM_DISPLAYCHANGE Message to ATL Plugin Pin
Stuart Dootson23-Oct-08 21:25
professionalStuart Dootson23-Oct-08 21:25 
GeneralRe: Does IE forward WM_DISPLAYCHANGE Message to ATL Plugin Pin
chatko27-Oct-08 2:51
chatko27-Oct-08 2:51 
QuestionHow to Monitor "Internet explorer" ? Pin
mohamed hedi16-Oct-08 23:48
mohamed hedi16-Oct-08 23:48 
AnswerRe: How to Monitor "Internet explorer" ? Pin
Michael Dunn18-Oct-08 17:10
sitebuilderMichael Dunn18-Oct-08 17:10 
GeneralRe: How to Monitor "Internet explorer" ? Pin
mohamed hedi19-Oct-08 23:30
mohamed hedi19-Oct-08 23:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.