ホーム › Devices.WebServicesOnDevices › IWSDUdpAddress
IWSDUdpAddress
COMメソッド 10
vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。
vtbl 10 HRESULT SetSockaddr(SOCKADDR_STORAGE* pSockAddr)
| pSockAddr | SOCKADDR_STORAGE* | in | 設定する SOCKADDR_STORAGE 形式のソケットアドレスを指定する。 |
vtbl 11 HRESULT GetSockaddr(SOCKADDR_STORAGE* pSockAddr)
| pSockAddr | SOCKADDR_STORAGE* | out | 現在のソケットアドレスを受け取る SOCKADDR_STORAGE ポインタである。 |
| fExclusive | BOOL | in | ソケットを排他バインドするかどうかを示す真偽値である。 |
vtbl 13 HRESULT GetExclusive()
vtbl 14 HRESULT SetMessageType(WSDUdpMessageType messageType)
| messageType | WSDUdpMessageType | in | ワンウェイ等の UDP メッセージ種別を示す列挙値を指定する。 |
vtbl 15 HRESULT GetMessageType(WSDUdpMessageType* pMessageType)
| pMessageType | WSDUdpMessageType* | out | 現在の UDP メッセージ種別を受け取る出力先である。 |
| dwTTL | DWORD | in | マルチキャスト/ユニキャストの存続時間 TTL 値を指定する。 |
| pdwTTL | DWORD* | out | 現在の TTL 値を受け取る出力先である。 |
vtbl 18 HRESULT SetAlias(GUID* pAlias)
| pAlias | GUID* | in | メッセージを識別するエイリアス GUID を指定する。 |
vtbl 19 HRESULT GetAlias(GUID* pAlias)
| pAlias | GUID* | out | 現在のエイリアス GUID を受け取る出力先である。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IWSDUdpAddress "{74D6124A-A441-4F78-A1EB-97A8D1996893}" #usecom global IWSDUdpAddress IID_IWSDUdpAddress "{}" #comfunc global IWSDUdpAddress_SetSockaddr 10 var #comfunc global IWSDUdpAddress_GetSockaddr 11 var #comfunc global IWSDUdpAddress_SetExclusive 12 int #comfunc global IWSDUdpAddress_GetExclusive 13 #comfunc global IWSDUdpAddress_SetMessageType 14 int #comfunc global IWSDUdpAddress_GetMessageType 15 var #comfunc global IWSDUdpAddress_SetTTL 16 int #comfunc global IWSDUdpAddress_GetTTL 17 var #comfunc global IWSDUdpAddress_SetAlias 18 var #comfunc global IWSDUdpAddress_GetAlias 19 var ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。#define global IID_IWSDUdpAddress "{74D6124A-A441-4F78-A1EB-97A8D1996893}" #usecom global IWSDUdpAddress IID_IWSDUdpAddress "{}" #comfunc global IWSDUdpAddress_SetSockaddr 10 sptr #comfunc global IWSDUdpAddress_GetSockaddr 11 sptr #comfunc global IWSDUdpAddress_SetExclusive 12 int #comfunc global IWSDUdpAddress_GetExclusive 13 #comfunc global IWSDUdpAddress_SetMessageType 14 int #comfunc global IWSDUdpAddress_GetMessageType 15 sptr #comfunc global IWSDUdpAddress_SetTTL 16 int #comfunc global IWSDUdpAddress_GetTTL 17 sptr #comfunc global IWSDUdpAddress_SetAlias 18 sptr #comfunc global IWSDUdpAddress_GetAlias 19 sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。