2014. 10. 23. 16:30

Events relate to drive

Events relate to the drive


Win32_VolumeChangeEventNetwork drives are not currently supported.

WM_DEVICECHANGE

SHChangeNotifyRegister

2013. 9. 23. 16:35

Implement event sink by ATL

Implement dispinterface and dual interface event sink by ATL

http://msdn.microsoft.com/en-us/library/windows/desktop/dd695280(v=vs.85).aspx

2013. 9. 17. 10:53

Development Event Log

2012. 8. 1. 16:04

dynamic create activeX (javascript)

  1. create
    1. new ActiveXObject 를 이용한다.
    2. var object = new  ActiveXObject(progid);
  2. link event
    1. 해당 activeX 가 IProvideClasInfo2 와 IConnnectionPoint 가 구현되어 있어야 한다.
    2. eval("function object::event1( value ) { event_handler(value); }");


2011. 8. 13. 20:04

Console Event Handling

console programming은 event 에 대해서 별로 생각하지 않았지만, 이번 작업은 console server 라서 event notify 관련 함수를 찾아 보았다.
SetConsoleCtrlHandler API 가 관련 함수이고 아래 link 에 관련 post가 있다.

해당 함수를 GDI 없는 순수 console 사용할 때는 아래처럼 정의하면 <window.h>를 정의하지 않아도 된다.
#define NOGDI
#include <WTypes.h>
#include <WinCon.h>

 
http://www.codeproject.com/KB/winsdk/console_event_handling.aspx
2009. 5. 21. 20:45

call class member function as if global function

바람직한 방법인 것 같지는 않지만 MFC로 만들어지 ActiveX에서 event를 전역함수 처럼 호출하여 쓰는 방법이 있다. 비단 event 뿐 아니라 COleControl를 상속받은 class의 모든 member 함수를 호출할 수 있다.



void AfxFireFunc( CWnd * sender,
                     ONE one,
                     TWO two )
{
    class CHelperCtrl : public CxxxCtrl
    {
    public:
        CHelperCtrl() {}
        void FireCallFunc( ONE one,   TWO two )
        {
            CxxxCtrl::FireFunc( one, two );
        }
    };

    CHelperCtrl * ctrl;
    ctrl = (CHelperCtrl * )s_Controls.Query( sender );

    if (ctrl)
        ctrl->FireFunc( one, two );
}

//
static COleInstances s_Controls;

s_Controls.Query 는 COleControl의 pointer를 가지고 있으며, sender로 자식 창의 pointer를 넣어주면 부모인 COleControl의 pointer를 넘겨준다.