Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "GetCurrentThread" in [All]

user32

.

    private static extern IntPtr GetCurrentThread();

.

    uint appThread = GetCurrentThreadId();

.

AppDomain.GetCurrentThreadId is marked as deprecated in favour of Thread.ManagedThreadId but this will not to work with unmanaged API.

.

You can use the GetCurrentThreadId API as well:

.

     SetWindowsHookEx(HookType.WH_KEYBOARD, this.myCallbackDelegate, IntPtr.Zero, AppDomain.GetCurrentThreadId());

.

    SetWindowsHookEx(HookType.WH_KEYBOARD, Me.myCallbackDelegate, IntPtr.Zero, AppDomain.GetCurrentThreadId())

advapi32

.

    private static extern IntPtr GetCurrentThread();

.

    if (!OpenThreadToken(GetCurrentThread(), TOKEN_READ | TOKEN_IMPERSONATE, true, out hToken))

dbghelp

.

static extern uint GetCurrentThreadId();

.

    info.ThreadId = GetCurrentThreadId();

kernel32

.

static extern void GetCurrentThreadStackLimits(out uint lowLimit, out uint highLimit);

.

Declare Function GetCurrentThreadStackLimits Lib "kernel32.dll" (ByRef lowLimit As UInteger, ByRef highLimit As UInteger)

.

GetCurrentThreadStackLimits(out low, out high);

.
Documentation
[GetCurrentThreadStackLimits] on MSDN
.
Summary
.

static extern uint GetCurrentThreadId();

.

Public Shared Function GetCurrentThreadId() As UInteger

.

  System.AppDomain.GetCurrentThreadId() (This is deprecated in .NET 2.0)

.
Documentation
[GetCurrentThreadId] on MSDN
.

     threadId = (uint)AppDomain.GetCurrentThreadId();

.

    if ( !GetThreadContext( GetCurrentThread(), ref cntx ) )

.

    if ( !GetThreadSelectorEntry( GetCurrentThread(), cntx.SegDs, out ldt ) )

.

GetThreadTimes(GetCurrentThread(),out l,out l,out KernelStart,out UserStart);

.

    GetThreadTimes(GetCurrentThread(),out l,out l,out KernelEnd,out UserEnd);


 
Access PInvoke.net directly from VS: