* Handle E_NOTIMPL return from CoInitializeEx.
* Remove unneeded STA attributes.
STRINGTABLE DISCARDABLE
BEGIN
CEE_E_CVTRES_NOT_FOUND "Could not execute CVTRES.EXE."
+ IDS_EE_THREAD_APARTMENT_NOT_SUPPORTED "The system does not support the %1 thread apartment."
IDS_EE_NDIRECT_UNSUPPORTED_SIG "Method's type signature is not PInvoke compatible."
IDS_EE_COM_UNSUPPORTED_SIG "Method's type signature is not Interop compatible."
IDS_EE_COM_UNSUPPORTED_TYPE "The method returned a COM Variant type that is not Interop compatible."
#define IDS_EE_BADMARSHAL_COPYCTORRESTRICTION 0x2647
#define IDS_EE_BADMARSHAL_WINRT_COPYCTOR 0x2648
#define IDS_EE_BADMARSHAL_DELEGATE_TLB_INTERFACE 0x2649
+#define IDS_EE_THREAD_APARTMENT_NOT_SUPPORTED 0x264A
+
\ No newline at end of file
{
COMPlusThrowOM();
}
+ else if (hr == E_NOTIMPL)
+ {
+ COMPlusThrow(kPlatformNotSupportedException, IDS_EE_THREAD_APARTMENT_NOT_SUPPORTED, (state == AS_InSTA) ? W("STA") : W("MTA"));
+ }
else
{
_ASSERTE(!"Unexpected HRESULT returned from CoInitializeEx!");
s_testLog = new TestUtil.TestLog(expectedOut);
}
- [STAThread]
+
private static int Main(string[] args)
{
string[] s = { "one", "two", "three", "four", "five", "six" };
/// <summary>
/// The main entry point for the application.
/// </summary>
- [STAThread]
static int Main(string[] args)
{
string[] s = { "one", "two", "three", "four", "five", "six" };
/// <summary>
/// The main entry point for the application.
/// </summary>
- [STAThread]
public static int Main(String[] args)
{
int[] ar = new int[] { 1, 2, 3, 4, 5 };
s_testLog = new TestUtil.TestLog(expectedOut);
}
- [STAThread]
+
private static int Main(string[] args)
{
string[] s = { "one", "two", "three", "four", "five", "six" };
/// <summary>
/// The main entry point for the application.
/// </summary>
- [STAThread]
static int Main(string[] args)
{
//Start recording
// Create and initialize test log object
testLog = new TestUtil.TestLog(expectedOut);
}
- [STAThread]
+
static int Main(string[] args)
{
int[] array = { 1, 2, 3, 4, 5, 6 };
{
internal class Class1
{
- [STAThread]
private static int Main(string[] args)
{
string[] s = { "one", "two", "three", "four", "five", "six" };
.method public static int32 Main() cil managed
{
.entrypoint
- .custom instance void [mscorlib]System.STAThreadAttribute::.ctor() = ( 01 00 00 00 )
.maxstack 2
.locals init (bool V_0,
int16 V_1,
.method public static int32 Main() cil managed
{
.entrypoint
- .custom instance void [mscorlib]System.STAThreadAttribute::.ctor() = ( 01 00 00 00 )
.maxstack 2
.locals init (bool V_0,
uint8 V_1)
.method public static int32 Main() cil managed
{
.entrypoint
- .custom instance void [mscorlib]System.STAThreadAttribute::.ctor() = ( 01 00 00 00 )
.maxstack 1
.locals init ([0] class ConsoleApplicationVB.ICovariant`1<object> y)
IL_0000: nop
// post-finalization work to be done.
const int maxIterations = 10;
- // STA
- [STAThread]
static int Main()
{
MyFinalizeObject mfo;
/// <summary>
/// The main entry point for the application.
/// </summary>
- [STAThread]
static int Main(string[] args)
{
GCD gcd = new GCD();
/// <summary>
/// The main entry point for the application.
/// </summary>
- [STAThread]
static int Main(string[] args)
{
int loops = 100;
/// <summary>
/// The main entry point for the application.
/// </summary>
- [STAThread]
static int Main(string[] args)
{
int rValue = 0;
/// <summary>
/// The main entry point for the application.
/// </summary>
- [STAThread]
static int Main(string[] args)
{
int rValue = 0;
/// <summary>
/// The main entry point for the application.
/// </summary>
- [STAThread]
static int Main(string[] args)
{
int rValue = 0;
/// <summary>
/// The main entry point for the application.
/// </summary>
- [STAThread]
static int Main(string[] args)
{
int rValue = 0;