次の方法で共有


IVbcHostObject5.SetPlatformWith32BitPreference(String) Method

Definition

Sets the /platform value to AnyCPU32BitPreferred.

public:
 bool SetPlatformWith32BitPreference(System::String ^ platformWith32BitPreference);
public bool SetPlatformWith32BitPreference (string platformWith32BitPreference);
abstract member SetPlatformWith32BitPreference : string -> bool
Public Function SetPlatformWith32BitPreference (platformWith32BitPreference As String) As Boolean

Parameters

platformWith32BitPreference
String

True to set the /platform value to AnyCPU32BitPreferred; otherwise, False.

Returns

Returns True if the method was successful.

Remarks

If the Prefer32Bit property is set on the project, SetPlatformWith32BitPreference changes the /platform value AnyCPU or the default platform value (null or "") to AnyCPU32BitPreferred. For more information, see /platform (Visual Basic). The AnyCPU /platform switch setting (/platform:AnyCPU) runs your application as a 64-bit process whenever possible, falling back to 32-bit for 32-bit-only systems. However, running applications as 32-bit is often preferred to running them as 64-bit because 64-bit applications may consume more memory. The AnyCPU32BitPreferred setting is similar to AnyCPU except that its default action is to run applications in 32-bit mode on systems that support either 32-bit or 64-bit mode. This setting accommodates future processors that may not have a fallback 32-bit mode.

Applies to