2 // System.Threading.Thread.cs
5 // Dick Porter (dick@ximian.com)
7 // (C) Ximian, Inc. http://www.ximian.com
8 // Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
10 // Permission is hereby granted, free of charge, to any person obtaining
11 // a copy of this software and associated documentation files (the
12 // "Software"), to deal in the Software without restriction, including
13 // without limitation the rights to use, copy, modify, merge, publish,
14 // distribute, sublicense, and/or sell copies of the Software, and to
15 // permit persons to whom the Software is furnished to do so, subject to
16 // the following conditions:
18 // The above copyright notice and this permission notice shall be
19 // included in all copies or substantial portions of the Software.
21 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 using System.Runtime.Remoting.Contexts;
31 using System.Runtime.Serialization;
32 using System.Runtime.Serialization.Formatters.Binary;
33 using System.Security.Permissions;
34 using System.Security.Principal;
35 using System.Globalization;
36 using System.Runtime.CompilerServices;
37 using System.Runtime.InteropServices;
39 using System.Collections;
40 using System.Security;
43 using System.Runtime.ConstrainedExecution;
46 namespace System.Threading {
48 [ClassInterface (ClassInterfaceType.None)]
51 [ComDefaultInterface (typeof (_Thread))]
53 public sealed class Thread : _Thread {
55 #region Sync with metadata/object-internals.h
57 // stores a thread handle
58 private IntPtr system_thread_handle;
60 private IntPtr culture_info;
61 private IntPtr ui_culture_info;
62 private bool threadpool_thread;
63 /* accessed only from unmanaged code */
66 private ThreadState state = ThreadState.Unstarted;
67 private object abort_exc;
68 internal object abort_state;
69 /* thread_id is only accessed from unmanaged code */
70 private Int64 thread_id;
72 /* start_notify is used by the runtime to signal that Start()
75 private IntPtr start_notify;
76 private IntPtr stack_ptr;
77 private IntPtr static_data;
78 private IntPtr jit_data;
79 private IntPtr lock_data;
80 Context current_appcontext;
83 private IntPtr appdomain_refs;
84 private bool interruption_requested;
85 private IntPtr suspend_event;
86 private IntPtr suspended_event;
87 private IntPtr resume_event;
88 /* Don't lock on synch_lock in managed code, since it can result in deadlocks */
89 private object synch_lock = new Object();
90 private IntPtr serialized_culture_info;
91 private int serialized_culture_info_len;
92 private IntPtr serialized_ui_culture_info;
93 private int serialized_ui_culture_info_len;
94 private ExecutionContext _ec;
96 * These fields are used to avoid having to increment corlib versions
97 * when a new field is added to the unmanaged MonoThread structure.
99 private IntPtr unused1;
100 private IntPtr unused2;
101 private IntPtr unused3;
102 private IntPtr unused4;
103 private IntPtr unused5;
104 private IntPtr unused6;
105 private IntPtr unused7;
109 static Hashtable slothash;
111 // can be both a ThreadSart and a ParameterizedThreadStart
112 private MulticastDelegate threadstart;
113 private string thread_name=null;
115 private IPrincipal _principal;
117 public static Context CurrentContext {
118 [SecurityPermission (SecurityAction.LinkDemand, Infrastructure=true)]
120 return(AppDomain.InternalGetContext ());
124 public static IPrincipal CurrentPrincipal {
127 Thread th = CurrentThread;
131 p = GetDomain ().DefaultPrincipal;
137 [SecurityPermission (SecurityAction.Demand, ControlPrincipal = true)]
139 CurrentThread._principal = value;
143 // Looks up the object associated with the current thread
144 [MethodImplAttribute(MethodImplOptions.InternalCall)]
145 private extern static Thread CurrentThread_internal();
147 public static Thread CurrentThread {
149 [ReliabilityContract (Consistency.WillNotCorruptState, Cer.MayFail)]
152 return(CurrentThread_internal());
156 internal static int CurrentThreadId {
158 return (int)(CurrentThread.thread_id);
162 // Stores a hash keyed by strings of LocalDataStoreSlot objects
163 static Hashtable datastorehash;
164 private static object datastore_lock = new object ();
166 private static void InitDataStoreHash () {
167 lock (datastore_lock) {
168 if (datastorehash == null) {
169 datastorehash = Hashtable.Synchronized(new Hashtable());
174 public static LocalDataStoreSlot AllocateNamedDataSlot(string name) {
175 lock (datastore_lock) {
176 if (datastorehash == null)
177 InitDataStoreHash ();
178 LocalDataStoreSlot slot = (LocalDataStoreSlot)datastorehash[name];
180 // This exception isnt documented (of
181 // course) but .net throws it
182 throw new ArgumentException("Named data slot already added");
185 slot = new LocalDataStoreSlot();
187 datastorehash.Add(name, slot);
193 public static void FreeNamedDataSlot(string name) {
194 lock (datastore_lock) {
195 if (datastorehash == null)
196 InitDataStoreHash ();
197 LocalDataStoreSlot slot=(LocalDataStoreSlot)datastorehash[name];
200 datastorehash.Remove(slot);
205 private static Hashtable SlotHash {
207 if (slothash == null)
208 slothash = new Hashtable ();
213 public static LocalDataStoreSlot AllocateDataSlot() {
214 return new LocalDataStoreSlot();
217 public static object GetData(LocalDataStoreSlot slot) {
218 return SlotHash [slot];
221 public static void SetData(LocalDataStoreSlot slot,
223 SlotHash [slot] = data;
226 public static AppDomain GetDomain() {
227 return AppDomain.CurrentDomain;
230 [MethodImplAttribute(MethodImplOptions.InternalCall)]
231 public extern static int GetDomainID();
233 public static LocalDataStoreSlot GetNamedDataSlot(string name) {
234 lock (datastore_lock) {
235 if (datastorehash == null)
236 InitDataStoreHash ();
237 LocalDataStoreSlot slot=(LocalDataStoreSlot)datastorehash[name];
240 slot=AllocateNamedDataSlot(name);
247 [MethodImplAttribute(MethodImplOptions.InternalCall)]
248 private extern static void ResetAbort_internal();
250 [SecurityPermission (SecurityAction.Demand, ControlThread=true)]
251 public static void ResetAbort ()
253 ResetAbort_internal ();
256 [MethodImplAttribute(MethodImplOptions.InternalCall)]
257 private extern static void Sleep_internal(int ms);
259 public static void Sleep(int millisecondsTimeout) {
260 if((millisecondsTimeout<0) && (millisecondsTimeout != Timeout.Infinite)) {
261 throw new ArgumentException("Negative timeout");
263 Sleep_internal(millisecondsTimeout);
266 public static void Sleep(TimeSpan timeout) {
267 // LAMESPEC: says to throw ArgumentException too
268 int ms=Convert.ToInt32(timeout.TotalMilliseconds);
270 if(ms < 0 || ms > Int32.MaxValue) {
271 throw new ArgumentOutOfRangeException("Timeout out of range");
277 // Returns the system thread handle
278 [MethodImplAttribute(MethodImplOptions.InternalCall)]
279 private extern IntPtr Thread_internal (MulticastDelegate start);
281 public Thread(ThreadStart start) {
283 throw new ArgumentNullException("Null ThreadStart");
290 [Obsolete ("Deprecated in favor of GetApartmentState, SetApartmentState and TrySetApartmentState.")]
292 public ApartmentState ApartmentState {
294 return(ApartmentState.Unknown);
301 [MethodImplAttribute (MethodImplOptions.InternalCall)]
302 private static extern int current_lcid ();
304 [MethodImplAttribute (MethodImplOptions.InternalCall)]
305 private extern CultureInfo GetCachedCurrentCulture ();
307 [MethodImplAttribute (MethodImplOptions.InternalCall)]
308 private extern byte[] GetSerializedCurrentCulture ();
310 [MethodImplAttribute (MethodImplOptions.InternalCall)]
311 private extern void SetCachedCurrentCulture (CultureInfo culture);
313 [MethodImplAttribute (MethodImplOptions.InternalCall)]
314 private extern void SetSerializedCurrentCulture (byte[] culture);
316 [MethodImplAttribute (MethodImplOptions.InternalCall)]
317 private extern CultureInfo GetCachedCurrentUICulture ();
319 [MethodImplAttribute (MethodImplOptions.InternalCall)]
320 private extern byte[] GetSerializedCurrentUICulture ();
322 [MethodImplAttribute (MethodImplOptions.InternalCall)]
323 private extern void SetCachedCurrentUICulture (CultureInfo culture);
325 [MethodImplAttribute (MethodImplOptions.InternalCall)]
326 private extern void SetSerializedCurrentUICulture (byte[] culture);
328 /* If the current_lcid() isn't known by CultureInfo,
329 * it will throw an exception which may cause
330 * String.Concat to try and recursively look up the
331 * CurrentCulture, which will throw an exception, etc.
332 * Use a boolean to short-circuit this scenario.
334 private static bool in_currentculture=false;
336 static object culture_lock = new object ();
339 * Thread objects are shared between appdomains, and CurrentCulture
340 * should always return an object in the calling appdomain. See bug
341 * http://bugzilla.ximian.com/show_bug.cgi?id=50049 for more info.
342 * This is hard to implement correctly and efficiently, so the current
343 * implementation is not perfect: changes made in one appdomain to the
344 * state of the current cultureinfo object are not visible to other
347 public CultureInfo CurrentCulture {
349 if (in_currentculture)
351 return CultureInfo.InvariantCulture;
353 CultureInfo culture = GetCachedCurrentCulture ();
357 byte[] arr = GetSerializedCurrentCulture ();
359 lock (culture_lock) {
360 in_currentculture=true;
361 culture = CultureInfo.ConstructCurrentCulture ();
363 // Don't serialize the culture in this case to avoid
364 // initializing the serialization infrastructure in the
365 // common case when the culture is not set explicitly.
367 SetCachedCurrentCulture (culture);
368 in_currentculture = false;
374 * No cultureinfo object exists for this domain, so create one
375 * by deserializing the serialized form.
377 in_currentculture = true;
379 BinaryFormatter bf = new BinaryFormatter ();
380 MemoryStream ms = new MemoryStream (arr);
381 culture = (CultureInfo)bf.Deserialize (ms);
382 SetCachedCurrentCulture (culture);
384 in_currentculture = false;
390 [SecurityPermission (SecurityAction.Demand, ControlThread=true)]
393 throw new ArgumentNullException ("value");
395 value.CheckNeutral ();
396 in_currentculture = true;
398 BinaryFormatter bf = new BinaryFormatter();
399 MemoryStream ms = new MemoryStream ();
400 bf.Serialize (ms, value);
402 SetCachedCurrentCulture (value);
403 SetSerializedCurrentCulture (ms.GetBuffer ());
405 in_currentculture = false;
410 public CultureInfo CurrentUICulture {
412 if (in_currentculture)
414 return CultureInfo.InvariantCulture;
416 CultureInfo culture = GetCachedCurrentUICulture ();
420 byte[] arr = GetSerializedCurrentUICulture ();
422 lock (culture_lock) {
423 in_currentculture=true;
430 culture = CultureInfo.ConstructCurrentUICulture ();
432 // Don't serialize the culture in this case to avoid
433 // initializing the serialization infrastructure in the
434 // common case when the culture is not set explicitly.
436 SetCachedCurrentUICulture (culture);
437 in_currentculture = false;
443 * No cultureinfo object exists for this domain, so create one
444 * by deserializing the serialized form.
446 in_currentculture = true;
448 BinaryFormatter bf = new BinaryFormatter ();
449 MemoryStream ms = new MemoryStream (arr);
450 culture = (CultureInfo)bf.Deserialize (ms);
451 SetCachedCurrentUICulture (culture);
454 in_currentculture = false;
461 in_currentculture = true;
464 throw new ArgumentNullException ("value");
467 BinaryFormatter bf = new BinaryFormatter();
468 MemoryStream ms = new MemoryStream ();
469 bf.Serialize (ms, value);
471 SetCachedCurrentUICulture (value);
472 SetSerializedCurrentUICulture (ms.GetBuffer ());
474 in_currentculture = false;
479 public bool IsThreadPoolThread {
481 return IsThreadPoolThreadInternal;
485 internal bool IsThreadPoolThreadInternal {
487 return threadpool_thread;
490 threadpool_thread = value;
494 public bool IsAlive {
496 ThreadState curstate = GetState ();
498 if((curstate & ThreadState.Aborted) != 0 ||
499 (curstate & ThreadState.Stopped) != 0 ||
500 (curstate & ThreadState.Unstarted) != 0) {
508 public bool IsBackground {
510 return (GetState () & ThreadState.Background) != 0;
515 SetState (ThreadState.Background);
517 ClrState (ThreadState.Background);
522 [MethodImplAttribute(MethodImplOptions.InternalCall)]
523 private extern string GetName_internal ();
525 [MethodImplAttribute(MethodImplOptions.InternalCall)]
526 private extern void SetName_internal (String name);
529 * The thread name must be shared by appdomains, so it is stored in
535 return GetName_internal ();
539 SetName_internal (value);
544 public ThreadPriority Priority {
546 return(ThreadPriority.Lowest);
553 public ThreadState ThreadState {
559 [MethodImplAttribute(MethodImplOptions.InternalCall)]
560 private extern void Abort_internal (object stateInfo);
562 [SecurityPermission (SecurityAction.Demand, ControlThread=true)]
565 Abort_internal (null);
568 [SecurityPermission (SecurityAction.Demand, ControlThread=true)]
569 public void Abort (object stateInfo)
571 Abort_internal (stateInfo);
576 [SecurityPermission (SecurityAction.Demand, ControlThread=true)]
577 public void Interrupt ()
581 // The current thread joins with 'this'. Set ms to 0 to block
582 // until this actually exits.
583 [MethodImplAttribute(MethodImplOptions.InternalCall)]
584 private extern bool Join_internal(int ms, IntPtr handle);
588 Join_internal(Timeout.Infinite, system_thread_handle);
591 public bool Join(int millisecondsTimeout)
593 if (millisecondsTimeout != Timeout.Infinite && millisecondsTimeout < 0)
594 throw new ArgumentException ("Timeout less than zero", "millisecondsTimeout");
596 return Join_internal(millisecondsTimeout, system_thread_handle);
599 public bool Join(TimeSpan timeout)
601 // LAMESPEC: says to throw ArgumentException too
602 int ms=Convert.ToInt32(timeout.TotalMilliseconds);
604 if(ms < 0 || ms > Int32.MaxValue) {
605 throw new ArgumentOutOfRangeException("timeout out of range");
607 return Join_internal(ms, system_thread_handle);
611 [MonoTODO ("seems required for multi-processors systems like Itanium")]
612 public static void MemoryBarrier ()
614 // Will be implemented when we support Itanium
617 [MethodImplAttribute(MethodImplOptions.InternalCall)]
618 private extern void Resume_internal();
623 [SecurityPermission (SecurityAction.Demand, ControlThread=true)]
624 public void Resume ()
631 [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.Success)]
633 public static void SpinWait (int iterations)
635 throw new NotImplementedException ();
638 public void Start() {
639 // propagate informations from the original thread to the new thread
641 if (!ExecutionContext.IsFlowSuppressed ())
642 _ec = ExecutionContext.Capture ();
644 // before 2.0 this was only used for security (mostly CAS) so we
645 // do this only if the security manager is active
646 if (SecurityManager.SecurityEnabled)
647 _ec = ExecutionContext.Capture ();
650 // Thread_internal creates and starts the new thread,
651 if (Thread_internal(threadstart) == (IntPtr) 0)
652 throw new SystemException ("Thread creation failed.");
655 [MethodImplAttribute(MethodImplOptions.InternalCall)]
656 private extern void Suspend_internal();
661 [SecurityPermission (SecurityAction.Demand, ControlThread=true)]
662 public void Suspend ()
667 // Closes the system thread handle
668 [MethodImplAttribute(MethodImplOptions.InternalCall)]
669 private extern void Thread_free_internal(IntPtr handle);
672 // Free up the handle
673 if (system_thread_handle != (IntPtr) 0)
674 Thread_free_internal(system_thread_handle);
677 [MethodImplAttribute (MethodImplOptions.InternalCall)]
678 extern private void SetState (ThreadState set);
680 [MethodImplAttribute (MethodImplOptions.InternalCall)]
681 extern private void ClrState (ThreadState clr);
683 [MethodImplAttribute (MethodImplOptions.InternalCall)]
684 extern private ThreadState GetState ();
688 [MethodImplAttribute (MethodImplOptions.InternalCall)]
689 extern public static byte VolatileRead (ref byte address);
691 [MethodImplAttribute (MethodImplOptions.InternalCall)]
692 extern public static double VolatileRead (ref double address);
694 [MethodImplAttribute (MethodImplOptions.InternalCall)]
695 extern public static short VolatileRead (ref short address);
697 [MethodImplAttribute (MethodImplOptions.InternalCall)]
698 extern public static int VolatileRead (ref int address);
700 [MethodImplAttribute (MethodImplOptions.InternalCall)]
701 extern public static long VolatileRead (ref long address);
703 [MethodImplAttribute (MethodImplOptions.InternalCall)]
704 extern public static IntPtr VolatileRead (ref IntPtr address);
706 [MethodImplAttribute (MethodImplOptions.InternalCall)]
707 extern public static object VolatileRead (ref object address);
709 [CLSCompliant(false)]
710 [MethodImplAttribute (MethodImplOptions.InternalCall)]
711 extern public static sbyte VolatileRead (ref sbyte address);
713 [MethodImplAttribute (MethodImplOptions.InternalCall)]
714 extern public static float VolatileRead (ref float address);
716 [CLSCompliant (false)]
717 [MethodImplAttribute (MethodImplOptions.InternalCall)]
718 extern public static ushort VolatileRead (ref ushort address);
720 [CLSCompliant (false)]
721 [MethodImplAttribute (MethodImplOptions.InternalCall)]
722 extern public static uint VolatileRead (ref uint address);
724 [CLSCompliant (false)]
725 [MethodImplAttribute (MethodImplOptions.InternalCall)]
726 extern public static ulong VolatileRead (ref ulong address);
728 [CLSCompliant (false)]
729 [MethodImplAttribute (MethodImplOptions.InternalCall)]
730 extern public static UIntPtr VolatileRead (ref UIntPtr address);
732 [MethodImplAttribute (MethodImplOptions.InternalCall)]
733 extern public static void VolatileWrite (ref byte address, byte value);
735 [MethodImplAttribute (MethodImplOptions.InternalCall)]
736 extern public static void VolatileWrite (ref double address, double value);
738 [MethodImplAttribute (MethodImplOptions.InternalCall)]
739 extern public static void VolatileWrite (ref short address, short value);
741 [MethodImplAttribute (MethodImplOptions.InternalCall)]
742 extern public static void VolatileWrite (ref int address, int value);
744 [MethodImplAttribute (MethodImplOptions.InternalCall)]
745 extern public static void VolatileWrite (ref long address, long value);
747 [MethodImplAttribute (MethodImplOptions.InternalCall)]
748 extern public static void VolatileWrite (ref IntPtr address, IntPtr value);
750 [MethodImplAttribute (MethodImplOptions.InternalCall)]
751 extern public static void VolatileWrite (ref object address, object value);
753 [CLSCompliant(false)]
754 [MethodImplAttribute (MethodImplOptions.InternalCall)]
755 extern public static void VolatileWrite (ref sbyte address, sbyte value);
757 [MethodImplAttribute (MethodImplOptions.InternalCall)]
758 extern public static void VolatileWrite (ref float address, float value);
760 [CLSCompliant (false)]
761 [MethodImplAttribute (MethodImplOptions.InternalCall)]
762 extern public static void VolatileWrite (ref ushort address, ushort value);
764 [CLSCompliant (false)]
765 [MethodImplAttribute (MethodImplOptions.InternalCall)]
766 extern public static void VolatileWrite (ref uint address, uint value);
768 [CLSCompliant (false)]
769 [MethodImplAttribute (MethodImplOptions.InternalCall)]
770 extern public static void VolatileWrite (ref ulong address, ulong value);
772 [CLSCompliant (false)]
773 [MethodImplAttribute (MethodImplOptions.InternalCall)]
774 extern public static void VolatileWrite (ref UIntPtr address, UIntPtr value);
779 public Thread (ThreadStart start, int maxStackSize)
782 throw new ArgumentNullException ("start");
783 if (maxStackSize < 131072)
784 throw new ArgumentException ("< 128 kb", "maxStackSize");
787 stack_size = maxStackSize;
790 public Thread (ParameterizedThreadStart start)
793 throw new ArgumentNullException ("start");
798 public Thread (ParameterizedThreadStart start, int maxStackSize)
801 throw new ArgumentNullException ("start");
802 if (maxStackSize < 131072)
803 throw new ArgumentException ("< 128 kb", "maxStackSize");
806 stack_size = maxStackSize;
809 [MonoTODO ("limited to CompressedStack support")]
810 public ExecutionContext ExecutionContext {
811 [ReliabilityContract (Consistency.WillNotCorruptState, Cer.MayFail)]
814 _ec = new ExecutionContext ();
819 public int ManagedThreadId {
820 [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.Success)]
821 get { return (int)thread_id; }
825 [ReliabilityContract (Consistency.WillNotCorruptState, Cer.MayFail)]
826 public static void BeginCriticalRegion ()
828 throw new NotImplementedException ();
832 [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
833 public static void EndCriticalRegion ()
835 throw new NotImplementedException ();
839 [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
840 public static void BeginThreadAffinity ()
842 throw new NotImplementedException ();
846 [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
847 public static void EndThreadAffinity ()
849 throw new NotImplementedException ();
853 // We disable warning 618, because we are accessing the
854 // empty property ApartmentState which produces an Obsolete
855 // message, but since its an empty routine needed for 1.x
858 // Maybe we should later turn these into internal methods for 1.x
859 // instead and have the property call these.
863 public ApartmentState GetApartmentState ()
865 return this.ApartmentState;
869 public void SetApartmentState (ApartmentState state)
871 this.ApartmentState = state;
875 public bool TrySetApartmentState (ApartmentState state)
878 this.ApartmentState = state;
881 catch (ArgumentException) {
890 public override int GetHashCode ()
892 // ??? overridden but not guaranteed to be unique ???
893 return (int)thread_id;
896 public void Start (object parameter)
898 start_obj = parameter;
902 internal ExecutionContext ExecutionContext {
905 _ec = new ExecutionContext ();
911 // NOTE: This method doesn't show in the class library status page because
912 // it cannot be "found" with the StrongNameIdentityPermission for ECMA key.
914 [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
915 [StrongNameIdentityPermission (SecurityAction.LinkDemand, PublicKey="00000000000000000400000000000000")]
921 CompressedStack GetCompressedStack ()
923 // Note: returns null if no CompressedStack has been set.
924 // However CompressedStack.GetCompressedStack returns an
925 // (empty?) CompressedStack instance.
926 CompressedStack cs = ExecutionContext.SecurityContext.CompressedStack;
927 return ((cs == null) || cs.IsEmpty ()) ? null : cs.CreateCopy ();
930 // NOTE: This method doesn't show in the class library status page because
931 // it cannot be "found" with the StrongNameIdentityPermission for ECMA key.
933 [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
934 [StrongNameIdentityPermission (SecurityAction.LinkDemand, PublicKey="00000000000000000400000000000000")]
940 void SetCompressedStack (CompressedStack stack)
942 ExecutionContext.SecurityContext.CompressedStack = stack;
946 void _Thread.GetIDsOfNames ([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
948 throw new NotImplementedException ();
951 void _Thread.GetTypeInfo (uint iTInfo, uint lcid, IntPtr ppTInfo)
953 throw new NotImplementedException ();
956 void _Thread.GetTypeInfoCount (out uint pcTInfo)
958 throw new NotImplementedException ();
961 void _Thread.Invoke (uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams,
962 IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
964 throw new NotImplementedException ();