PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
GetCurrentThreadId
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
GetCurrentThreadId
![]() |
GetCurrentThreadId |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi,
how can I find out the id of the current thread in the compact framework? Is there a managed solution, or should I call the GetCurrentThreadId function? If yes, in which CE-dll can I find the GetCurrentThreadId function? Thanks, zeppi |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Alex,
I have tried the sample. It worked fine on the desktop. On the device it works as well, however the id is negative, which may not be a problem. I try to use the id in SetWindowsHookEx, which fails with a NotSupportedException, and I have know other idea, why. Thanks, Tibor >-----Original Message----- >http://groups.google.com/groups?hl=en&lr=&ie=UTF- 8&frame=right&th=d0abba9299850f7f&seekm=u93V0%24WRDHA.3236% 40TK2MSFTNGP10.phx.gbl#link4 > >"Tibor Meinczinger" <meinczinger@web.de> wrote in message >news:04c601c34f89$4b96be30$a001280a@phx.gbl... >> Hi, >> >> how can I find out the id of the current thread in the >> compact framework? Is there a managed solution, or should >> I call the GetCurrentThreadId function? If yes, >> in which CE-dll can I find the GetCurrentThreadId function? >> Thanks, >> zeppi >> > > >. > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Callbacks code is still waiting to be intergrated into the OpenNETCF
namespace because I haven't had a chance to add the code for ARM on Windows CE.NET 4.2 - it requires writing a new assembly language stub "Tibor Meinczinger" <meinczinger@web.de> wrote in message news:065001c355a1$baa7ca80$a601280a@phx.gbl... > Alex, > > you mention in your article, that the callbacks are > part of the OpenNETCF library now, however I cannot find > it. Which project contains the callback functionality? > Thanks, > Tibor > > >-----Original Message----- > >Negative is ok. The actual value is uint and is > > 0x80000000 > >NotSupported exception is typically caused by an > incorrect P/Invoke > >definition, such as using "long" type or complex > structures > >In case of SetWindowsHookEx it is caused by you > attempting to pass a > >delegate to the P/Invoked function - this is not > supported on Compact > >Framework. The workarounds are either place hook code > into unmanaged code or > >use the approach I described here: > > > >http://www.alexfeinman.com/callbacks/Callbacks.htm > > > >"Tibor Meinczinger" <meinczinger@web.de> wrote in message > >news:09a701c34fa0$70597b60$a601280a@phx.gbl... > >> Alex, > >> > >> I have tried the sample. It worked fine on the desktop. > >> On the device it works as well, however the id is > >> negative, which may not be a problem. I try to use the > >> id in SetWindowsHookEx, which fails with a > >> NotSupportedException, and I have know other idea, why. > >> Thanks, > >> > >> Tibor > >> > >> >-----Original Message----- > >> >http://groups.google.com/groups?hl=en&lr=&ie=UTF- > >> 8&frame=right&th=d0abba9299850f7f&seekm=u93V0% > 24WRDHA.3236% > >> 40TK2MSFTNGP10.phx.gbl#link4 > >> > > >> >"Tibor Meinczinger" <meinczinger@web.de> wrote in > message > >> >news:04c601c34f89$4b96be30$a001280a@phx.gbl... > >> >> Hi, > >> >> > >> >> how can I find out the id of the current thread in > the > >> >> compact framework? Is there a managed solution, or > >> should > >> >> I call the GetCurrentThreadId function? If yes, > >> >> in which CE-dll can I find the GetCurrentThreadId > >> function? > >> >> Thanks, > >> >> zeppi > >> >> > >> > > >> > > >> >. > >> > > > > > > >. > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

