ホーム › Media.LibrarySharingServices › IWindowsMediaLibrarySharingServices
IWindowsMediaLibrarySharingServices
COMIDispatch (デュアル)✅ IDispatch を実装(デュアルインターフェース)。HSP では
comobj 経由でメソッド名による遅延バインド呼び出しができます(vtableインデックス不要)。メソッド 19
vtbl = vtable インデックス(0始まり)。IDispatch 実装のため HSP ではメソッド名でも呼べます(上記)。低レベルの index 呼び出し用に vtbl も掲載。0〜2 は IUnknown。
| device | LPWSTR | in | メディア共有のコントロールパネルで強調表示するデバイス名を指す広文字列を指定する。NULL 可。 |
vtbl 8 HRESULT get_userHomeMediaSharingState(VARIANT_BOOL* sharingEnabled)
| sharingEnabled | VARIANT_BOOL* | out | 現在のユーザーのホームメディア共有が有効かを受け取る VARIANT_BOOL ポインタ。 |
vtbl 9 HRESULT put_userHomeMediaSharingState(VARIANT_BOOL sharingEnabled)
| sharingEnabled | VARIANT_BOOL | in | 現在のユーザーのホームメディア共有の有効/無効を VARIANT_BOOL で指定する。 |
| libraryName | LPWSTR* | out | 共有ライブラリの表示名を受け取る LPWSTR ポインタ。呼び出し側が解放する。 |
| libraryName | LPWSTR | in | 設定する共有ライブラリの表示名を指す広文字列を指定する。 |
vtbl 12 HRESULT get_computerHomeMediaSharingAllowedState(VARIANT_BOOL* sharingAllowed)
| sharingAllowed | VARIANT_BOOL* | out | このコンピュータでホームメディア共有が許可されているかを受け取る VARIANT_BOOL ポインタ。 |
vtbl 13 HRESULT put_computerHomeMediaSharingAllowedState(VARIANT_BOOL sharingAllowed)
| sharingAllowed | VARIANT_BOOL | in | このコンピュータでのホームメディア共有許可の可否を VARIANT_BOOL で指定する。 |
vtbl 14 HRESULT get_userInternetMediaSharingState(VARIANT_BOOL* sharingEnabled)
| sharingEnabled | VARIANT_BOOL* | out | 現在のユーザーのインターネットメディア共有が有効かを受け取る VARIANT_BOOL ポインタ。 |
vtbl 15 HRESULT put_userInternetMediaSharingState(VARIANT_BOOL sharingEnabled)
| sharingEnabled | VARIANT_BOOL | in | 現在のユーザーのインターネットメディア共有の有効/無効を VARIANT_BOOL で指定する。 |
vtbl 16 HRESULT get_computerInternetMediaSharingAllowedState(VARIANT_BOOL* sharingAllowed)
| sharingAllowed | VARIANT_BOOL* | out | このコンピュータでインターネットメディア共有が許可されているかを受け取る VARIANT_BOOL ポインタ。 |
vtbl 17 HRESULT put_computerInternetMediaSharingAllowedState(VARIANT_BOOL sharingAllowed)
| sharingAllowed | VARIANT_BOOL | in | このコンピュータでのインターネットメディア共有許可の可否を VARIANT_BOOL で指定する。 |
| securityGroup | LPWSTR* | out | インターネットメディア共有を許可するセキュリティグループ名を受け取る LPWSTR ポインタ。 |
| securityGroup | LPWSTR | in | 設定するインターネットメディア共有用セキュリティグループ名を指す広文字列を指定する。 |
vtbl 20 HRESULT get_allowSharingToAllDevices(VARIANT_BOOL* sharingEnabled)
| sharingEnabled | VARIANT_BOOL* | out | 全デバイスへの共有を許可するかを受け取る VARIANT_BOOL ポインタ。 |
vtbl 21 HRESULT put_allowSharingToAllDevices(VARIANT_BOOL sharingEnabled)
| sharingEnabled | VARIANT_BOOL | in | 全デバイスへの共有許可の可否を VARIANT_BOOL で指定する。 |
vtbl 22 HRESULT setDefaultAuthorization(LPWSTR MACAddresses, LPWSTR friendlyName, VARIANT_BOOL authorization)
| MACAddresses | LPWSTR | in | 既定の許可状態を適用する対象デバイスの MAC アドレス一覧を指す広文字列を指定する。 |
| friendlyName | LPWSTR | in | 対象デバイスに付与する表示名を指す広文字列を指定する。 |
| authorization | VARIANT_BOOL | in | 許可するなら VARIANT_TRUE、拒否するなら VARIANT_FALSE を指定する。 |
vtbl 23 HRESULT setAuthorizationState(LPWSTR MACAddress, VARIANT_BOOL authorizationState)
| MACAddress | LPWSTR | in | 許可状態を変更する対象デバイスの MAC アドレスを指す広文字列を指定する。 |
| authorizationState | VARIANT_BOOL | in | 許可するなら VARIANT_TRUE、拒否するなら VARIANT_FALSE を指定する。 |
vtbl 24 HRESULT getAllDevices(IWindowsMediaLibrarySharingDevices** devices)
| devices | IWindowsMediaLibrarySharingDevices** | out | 既知の全共有デバイスを表す IWindowsMediaLibrarySharingDevices を受け取るポインタの格納先。 |
vtbl 25 HRESULT get_customSettingsApplied(VARIANT_BOOL* customSettingsApplied)
| customSettingsApplied | VARIANT_BOOL* | out | 既定以外のカスタム共有設定が適用されているかを受け取る VARIANT_BOOL ポインタ。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IWindowsMediaLibrarySharingServices "{01F5F85E-0A81-40DA-A7C8-21EF3AF8440C}" #usecom global IWindowsMediaLibrarySharingServices IID_IWindowsMediaLibrarySharingServices "{AD581B00-7B64-4E59-A38D-D2C5BF51DDB3}" #comfunc global IWindowsMediaLibrarySharingServices_showShareMediaCPL 7 wstr #comfunc global IWindowsMediaLibrarySharingServices_get_userHomeMediaSharingState 8 var #comfunc global IWindowsMediaLibrarySharingServices_put_userHomeMediaSharingState 9 int #comfunc global IWindowsMediaLibrarySharingServices_get_userHomeMediaSharingLibraryName 10 var #comfunc global IWindowsMediaLibrarySharingServices_put_userHomeMediaSharingLibraryName 11 wstr #comfunc global IWindowsMediaLibrarySharingServices_get_computerHomeMediaSharingAllowedState 12 var #comfunc global IWindowsMediaLibrarySharingServices_put_computerHomeMediaSharingAllowedState 13 int #comfunc global IWindowsMediaLibrarySharingServices_get_userInternetMediaSharingState 14 var #comfunc global IWindowsMediaLibrarySharingServices_put_userInternetMediaSharingState 15 int #comfunc global IWindowsMediaLibrarySharingServices_get_computerInternetMediaSharingAllowedState 16 var #comfunc global IWindowsMediaLibrarySharingServices_put_computerInternetMediaSharingAllowedState 17 int #comfunc global IWindowsMediaLibrarySharingServices_get_internetMediaSharingSecurityGroup 18 var #comfunc global IWindowsMediaLibrarySharingServices_put_internetMediaSharingSecurityGroup 19 wstr #comfunc global IWindowsMediaLibrarySharingServices_get_allowSharingToAllDevices 20 var #comfunc global IWindowsMediaLibrarySharingServices_put_allowSharingToAllDevices 21 int #comfunc global IWindowsMediaLibrarySharingServices_setDefaultAuthorization 22 wstr,wstr,int #comfunc global IWindowsMediaLibrarySharingServices_setAuthorizationState 23 wstr,int #comfunc global IWindowsMediaLibrarySharingServices_getAllDevices 24 sptr #comfunc global IWindowsMediaLibrarySharingServices_get_customSettingsApplied 25 var ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※#usecom 末尾は CoCreateInstance 用のクラスID(コクラスCLSID, SDKから自動取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。#define global IID_IWindowsMediaLibrarySharingServices "{01F5F85E-0A81-40DA-A7C8-21EF3AF8440C}" #usecom global IWindowsMediaLibrarySharingServices IID_IWindowsMediaLibrarySharingServices "{AD581B00-7B64-4E59-A38D-D2C5BF51DDB3}" #comfunc global IWindowsMediaLibrarySharingServices_showShareMediaCPL 7 wstr #comfunc global IWindowsMediaLibrarySharingServices_get_userHomeMediaSharingState 8 sptr #comfunc global IWindowsMediaLibrarySharingServices_put_userHomeMediaSharingState 9 int #comfunc global IWindowsMediaLibrarySharingServices_get_userHomeMediaSharingLibraryName 10 sptr #comfunc global IWindowsMediaLibrarySharingServices_put_userHomeMediaSharingLibraryName 11 wstr #comfunc global IWindowsMediaLibrarySharingServices_get_computerHomeMediaSharingAllowedState 12 sptr #comfunc global IWindowsMediaLibrarySharingServices_put_computerHomeMediaSharingAllowedState 13 int #comfunc global IWindowsMediaLibrarySharingServices_get_userInternetMediaSharingState 14 sptr #comfunc global IWindowsMediaLibrarySharingServices_put_userInternetMediaSharingState 15 int #comfunc global IWindowsMediaLibrarySharingServices_get_computerInternetMediaSharingAllowedState 16 sptr #comfunc global IWindowsMediaLibrarySharingServices_put_computerInternetMediaSharingAllowedState 17 int #comfunc global IWindowsMediaLibrarySharingServices_get_internetMediaSharingSecurityGroup 18 sptr #comfunc global IWindowsMediaLibrarySharingServices_put_internetMediaSharingSecurityGroup 19 wstr #comfunc global IWindowsMediaLibrarySharingServices_get_allowSharingToAllDevices 20 sptr #comfunc global IWindowsMediaLibrarySharingServices_put_allowSharingToAllDevices 21 int #comfunc global IWindowsMediaLibrarySharingServices_setDefaultAuthorization 22 wstr,wstr,int #comfunc global IWindowsMediaLibrarySharingServices_setAuthorizationState 23 wstr,int #comfunc global IWindowsMediaLibrarySharingServices_getAllDevices 24 sptr #comfunc global IWindowsMediaLibrarySharingServices_get_customSettingsApplied 25 sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※#usecom 末尾は CoCreateInstance 用のクラスID(コクラスCLSID, SDKから自動取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。