Sets the specified option to a given value for the current metadata scope. The option controls how calls to the current metadata scope are handled.
[in] A pointer to a GUID that specifies the option to be set.
[in] The value to use to set the option. The type of this value must be a variant of the specified option's type.
The following table lists the available GUIDs that the optionId parameter can point to and the corresponding valid values for the pValue parameter.
Controls which items are checked for duplicates. Each time you call an IMetaDataEmit method that creates a new item, you can ask the method to check whether the item already exists in the current scope. For example, you can check for the existence of mdMethodDef items; in this case, when you call IMetaDataEmit::DefineMethod, it will check that the method does not already exist in the current scope. This check uses the key that uniquely identifies a given method: parent type, name, and signature.
Must be a variant of type UI4, and must contain a combination of the values of the CorCheckDuplicatesFor enumeration.
Controls which referenced items are converted to definitions. By default, the metadata engine will optimize the code by converting a referenced item to its definition if the referenced item is actually defined in the current scope.
Must be a variant of type UI4, and must contain a combination of the values of the CorRefToDefCheck enumeration.
Must be a variant of type UI4, and must contain a combination of the values of the CorNotificationForTokenMovement enumeration.
Controls the behavior of edit-and-continue (ENC). Only one mode of behavior can be set at a time.
Must be a variant of type UI4, and must contain a value of the CorSetENC enumeration. The value is not a bitmask.
Controls which emitted-out-of-order errors generate callbacks. Emitting metadata out of order is not fatal; however, if you emit metadata in an order that is favored by the metadata engine, the metadata is more compact and therefore can be more efficiently searched. Use the IMetaDataEmit::SetHandler method to establish your IMetaDataError interface.
Must be a variant of type UI4, and must contain a combination of the values of the CorErrorIfEmitOutOfOrder enumeration.
Controls which kinds of items that were deleted during an ENC are retrieved by an enumerator.
Must be a variant of type UI4, and must contain a combination of the values of the CorImportOptions Enumeration enumeration.
Controls whether the metadata engine obtains reader/writer locks, thereby ensuring thread safety. By default, the engine assumes that access is single-threaded by the caller, so no locks are obtained. Clients are responsible for maintaining proper thread synchronization when using the metadata API.
Must be a variant of type UI4, and must contain a value of the CorThreadSafetyOptions enumeration. The value is not a bitmask.
Controls whether the type library importer should generate the tightly coupled event (TCE) adapters for COM connection point containers.
Must be a variant of type BOOL. If pValue is set to true, the type library importer generates the TCE adapters.
Specifies a non-default namespace for the type library that is being imported.
Must be either a null value or a variant of type BSTR. If pValue is a null value, the current namespace is set to null; otherwise, the current namespace is set to the string that is held in the variant's BSTR type.
Controls whether the linker should generate an assembly or a .NET Framework module file.
Must be a variant of type UI4, and must contain a combination of the values of the CorLinkerOptions enumeration.
Specifies the version of the common language runtime against which this image was built. The version is stored as a string, such as "v1.0.3705".
Must be a null value, a VT_EMPTY value, or a variant of type BSTR. If pValue is null, the runtime version is set to null. If pValue is VT_EMPTY, the version is set to a default value, which is drawn from the version of Mscorwks.dll within which the metadata code is running. Otherwise, the runtime version is set to the string that is held in the variant's BSTR type.
Specifies options for merging metadata.
Must be a variant of type UI4, and must contain a combination of the values of the MergeFlags enumeration, which is described in the CorHdr.h file.
Disables optimizing local references into definitions.
Must contain a combination of the values of the CorLocalRefPreservation enumeration.
Platform: See .NET Framework System Requirements.
Library: Used as a resource in MsCorEE.dll
.NET Framework Versions: Available since 1.0