BStrWrapper Classe
Definizione
Attenzione
BStrWrapper and support for marshalling to the VARIANT type may be unavailable in future releases.
Esegue il marshalling dei dati di tipo VT_BSTR
dal codice gestito al codice non gestito.Marshals data of type VT_BSTR
from managed to unmanaged code. La classe non può essere ereditata.This class cannot be inherited.
public ref class BStrWrapper sealed
[System.Obsolete("BStrWrapper and support for marshalling to the VARIANT type may be unavailable in future releases.")]
public sealed class BStrWrapper
public sealed class BStrWrapper
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public sealed class BStrWrapper
[<System.Obsolete("BStrWrapper and support for marshalling to the VARIANT type may be unavailable in future releases.")>]
type BStrWrapper = class
type BStrWrapper = class
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type BStrWrapper = class
Public NotInheritable Class BStrWrapper
- Ereditarietà
-
BStrWrapper
- Attributi
Commenti
La BStrWrapper classe controlla come viene eseguito il marshalling dell'oggetto di cui è stato eseguito il wrapper quando viene passato come VARIANT
The BStrWrapper class controls how the wrapped object is marshaled when passed as VARIANT
. È possibile eseguire il wrapping di un String oggetto in un BStrWrapper oggetto per eseguirne il marshalling come VT_BSTR
.You can wrap a String object in a BStrWrapper object to marshal it as VT_BSTR
. BStrWrapper è utile quando si passa una stringa null al codice non gestito.BStrWrapper is useful when passing a null string to unmanaged code. Senza BStrWrapper , una stringa null viene passata come VT_EMPTY
. Tuttavia, il wrapping della stringa con BStrWrapper garantisce che la stringa null venga passata come VT_BSTR
.Without BStrWrapper, a null string is passed as VT_EMPTY
; however, wrapping the string with BStrWrapper ensures that the null string is passed as VT_BSTR
.
Costruttori
BStrWrapper(Object) |
Inizializza una nuova istanza della classe BStrWrapper con l'oggetto Object specificato.Initializes a new instance of the BStrWrapper class with the specified Object object. |
BStrWrapper(String) |
Inizializza una nuova istanza della classe BStrWrapper con l'oggetto String specificato.Initializes a new instance of the BStrWrapper class with the specified String object. |
Proprietà
WrappedObject |
Ottiene l'oggetto String incluso da sottoporre a marshalling come tipo |
Metodi
Equals(Object) |
Determina se l'oggetto specificato è uguale all'oggetto corrente.Determines whether the specified object is equal to the current object. (Ereditato da Object) |
GetHashCode() |
Funge da funzione hash predefinita.Serves as the default hash function. (Ereditato da Object) |
GetType() |
Ottiene l'oggetto Type dell'istanza corrente.Gets the Type of the current instance. (Ereditato da Object) |
MemberwiseClone() |
Crea una copia superficiale dell'oggetto Object corrente.Creates a shallow copy of the current Object. (Ereditato da Object) |
ToString() |
Restituisce una stringa che rappresenta l'oggetto corrente.Returns a string that represents the current object. (Ereditato da Object) |