SensEvts.Idl
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:5k
源码类别:

模拟服务器

开发平台:

C/C++

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4.     sensevts.idl
  5. Abstract:
  6.     This file contains the ISensEvents interface which should be implemented
  7.     by any Subscriber that subscribes to SENS events.
  8. Author:
  9.     Gopal Parupudi    <GopalP>
  10. [Notes:]
  11.     optional-notes
  12. Revision History:
  13.     GopalP          11/12/1997         Start.
  14. --*/
  15. import "wtypes.idl";
  16. //
  17. // SENS Events Type library
  18. //
  19. [
  20. uuid(d597deed-5b9f-11d1-8dd2-00aa004abd5e),
  21. version(2.0),
  22. helpstring("SENS Events Type Library")
  23. ]
  24. library SensEvents
  25. {
  26.     importlib("stdole2.tlb");
  27.     typedef [uuid(d597fad1-5b9f-11d1-8dd2-00aa004abd5e)] struct SENS_QOCINFO
  28.     {
  29.         DWORD dwSize;
  30.         DWORD dwFlags;
  31.         DWORD dwOutSpeed;
  32.         DWORD dwInSpeed;
  33.     } SENS_QOCINFO;
  34.     typedef SENS_QOCINFO *LPSENS_QOCINFO;
  35.     //
  36.     // Interface ISensNetwork
  37.     //
  38.     [
  39.     object,
  40.     uuid(d597bab1-5b9f-11d1-8dd2-00aa004abd5e),
  41.     version(1.0),
  42.     helpstring("SENS Network Events"),
  43.     dual,
  44.     ]
  45.     interface ISensNetwork : IDispatch
  46.     {
  47.         [id(0x00000001)]
  48.         HRESULT
  49.         ConnectionMade(
  50.             [in] BSTR bstrConnection,
  51.             [in] ULONG ulType,
  52.             [in] LPSENS_QOCINFO lpQOCInfo
  53.             );
  54.         [id(0x00000002)]
  55.         HRESULT
  56.         ConnectionMadeNoQOCInfo(
  57.             [in] BSTR bstrConnection,
  58.             [in] ULONG ulType
  59.             );
  60.         [id(0x00000003)]
  61.         HRESULT
  62.         ConnectionLost(
  63.             [in] BSTR bstrConnection,
  64.             [in] ULONG ulType
  65.             );
  66.         [id(0x00000004)]
  67.         HRESULT
  68.         DestinationReachable(
  69.             [in] BSTR bstrDestination,
  70.             [in] BSTR bstrConnection,
  71.             [in] ULONG ulType,
  72.             [in] LPSENS_QOCINFO lpQOCInfo
  73.             );
  74.         [id(0x00000005)]
  75.         HRESULT
  76.         DestinationReachableNoQOCInfo(
  77.             [in] BSTR bstrDestination,
  78.             [in] BSTR bstrConnection,
  79.             [in] ULONG ulType
  80.             );
  81.     };
  82.     //
  83.     // Interface ISensOnNow
  84.     //
  85.     [
  86.     object,
  87.     uuid(d597bab2-5b9f-11d1-8dd2-00aa004abd5e),
  88.     version(1.0),
  89.     helpstring("SENS OnNow Events"),
  90.     dual
  91.     ]
  92.     interface ISensOnNow : IDispatch
  93.     {
  94.         [id(0x00000001)]
  95.         HRESULT
  96.         OnACPower(
  97.             void
  98.             );
  99.         [id(0x00000002)]
  100.         HRESULT
  101.         OnBatteryPower(
  102.             [in] DWORD dwBatteryLifePercent
  103.             );
  104.         [id(0x00000003)]
  105.         HRESULT
  106.         BatteryLow(
  107.             [in] DWORD dwBatteryLifePercent
  108.             );
  109.     };
  110.     //
  111.     // Interface ISensLogon
  112.     //
  113.     [
  114.     object,
  115.     uuid(d597bab3-5b9f-11d1-8dd2-00aa004abd5e),
  116.     version(1.0),
  117.     helpstring("SENS WinLogon Events"),
  118.     dual
  119.     ]
  120.     interface ISensLogon : IDispatch
  121.     {
  122.         [id(0x00000001)]
  123.         HRESULT
  124.         Logon(
  125.             [in] BSTR bstrUserName
  126.             );
  127.         [id(0x00000002)]
  128.         HRESULT
  129.         Logoff(
  130.             [in] BSTR bstrUserName
  131.             );
  132.         [id(0x00000003)]
  133.         HRESULT
  134.         StartShell(
  135.             [in] BSTR bstrUserName
  136.             );
  137.         [id(0x00000004)]
  138.         HRESULT
  139.         DisplayLock(
  140.             [in] BSTR bstrUserName
  141.             );
  142.         [id(0x00000005)]
  143.         HRESULT
  144.         DisplayUnlock(
  145.             [in] BSTR bstrUserName
  146.             );
  147.         [id(0x00000006)]
  148.         HRESULT
  149.         StartScreenSaver(
  150.             [in] BSTR bstrUserName
  151.             );
  152.         [id(0x00000007)]
  153.         HRESULT
  154.         StopScreenSaver(
  155.             [in] BSTR bstrUserName
  156.             );
  157.     };
  158.     //
  159.     // Interface ISensLogon2
  160.     //
  161.     [
  162.     object,
  163.     uuid(d597bab4-5b9f-11d1-8dd2-00aa004abd5e),
  164.     version(1.0),
  165.     helpstring("SENS WinLogon2 Events"),
  166.     dual
  167.     ]
  168.     interface ISensLogon2 : IDispatch
  169.     {
  170.         [id(0x00000001)]
  171.         HRESULT
  172.         Logon(
  173.             [in] BSTR bstrUserName,
  174.             [in] DWORD dwSessionId
  175.             );
  176.         [id(0x00000002)]
  177.         HRESULT
  178.         Logoff(
  179.             [in] BSTR bstrUserName,
  180.             [in] DWORD dwSessionId
  181.             );
  182.         [id(0x00000003)]
  183.         HRESULT
  184.         SessionDisconnect(
  185.             [in] BSTR bstrUserName,
  186.             [in] DWORD dwSessionId
  187.             );
  188.         [id(0x00000004)]
  189.         HRESULT
  190.         SessionReconnect(
  191.             [in] BSTR bstrUserName,
  192.             [in] DWORD dwSessionId
  193.             );
  194.         [id(0x00000005)]
  195.         HRESULT
  196.         PostShell(
  197.             [in] BSTR bstrUserName,
  198.             [in] DWORD dwSessionId
  199.             );
  200.     };
  201.     //
  202.     // CoClass SENS
  203.     //
  204.     [
  205.     uuid(d597cafe-5b9f-11d1-8dd2-00aa004abd5e),
  206.     helpstring("System Event Notification Service (SENS)")
  207.     ]
  208.     coclass SENS
  209.     {
  210.         [default, source]   interface ISensNetwork;
  211.         [source]            interface ISensOnNow;
  212.         [source]            interface ISensLogon;
  213.         [source]            interface ISensLogon2;
  214.     };
  215. };