PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework GetCurrentThreadId

Reply

GetCurrentThreadId

 
Thread Tools Rate Thread
Old 21-07-2003, 02:09 PM   #1
Tibor Meinczinger
Guest
 
Posts: n/a
Default GetCurrentThreadId


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

  Reply With Quote
Old 21-07-2003, 04:54 PM   #2
Tibor Meinczinger
Guest
 
Posts: n/a
Default Re: GetCurrentThreadId

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
>>

>
>
>.
>

  Reply With Quote
Old 29-07-2003, 08:29 AM   #3
Alex Feinman [MVP]
Guest
 
Posts: n/a
Default Re: GetCurrentThreadId

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
> >> >>
> >> >
> >> >
> >> >.
> >> >

> >
> >
> >.
> >



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off