Marshal.SetComObjectData(Object, Object, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets data referenced by the specified key in the specified COM object.
public:
static bool SetComObjectData(System::Object ^ obj, System::Object ^ key, System::Object ^ data);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static bool SetComObjectData (object obj, object key, object? data);
public static bool SetComObjectData (object obj, object key, object data);
public static bool SetComObjectData (object obj, object key, object? data);
[System.Security.SecurityCritical]
public static bool SetComObjectData (object obj, object key, object data);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member SetComObjectData : obj * obj * obj -> bool
static member SetComObjectData : obj * obj * obj -> bool
[<System.Security.SecurityCritical>]
static member SetComObjectData : obj * obj * obj -> bool
Public Shared Function SetComObjectData (obj As Object, key As Object, data As Object) As Boolean
Parameters
- obj
- Object
The COM object in which to store the data.
- key
- Object
The key in the internal hash table of the COM object in which to store the data.
- data
- Object
The data to set.
Returns
true
if the data was set successfully; otherwise, false
.
- Attributes
Exceptions
Remarks
All COM objects wrapped in a Runtime Callable Wrapper (RCW) have an associated hash table, to which SetComObjectData adds data. Marshal.GetComObjectData retrieves data from the hash table. You should never have to call either method from your code.
Applies to
See also
.NET
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示