I am tring to set the ProcessorAffinity property of my applicaton. My
problem is this property wants the value to be set as intptr and I
don't know how to convert form integer to intptr. Does anyone know
how to do this? TIA

Re: ProcessorAffinity by Mattias

Mattias
Thu Feb 05 13:39:24 CST 2004


>My
>problem is this property wants the value to be set as intptr and I
>don't know how to convert form integer to intptr. Does anyone know
>how to do this?

In C#

IntPtr ip = (IntPtr)i;

In VB.NET

Dim ip As New IntPtr(i)



Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Re: ProcessorAffinity by Bjoern

Bjoern
Thu Feb 05 14:22:03 CST 2004

Mattias Sjögren schrieb:

>>My
>>problem is this property wants the value to be set as intptr and I
>>don't know how to convert form integer to intptr. Does anyone know
>>how to do this?
>
>
> In C#
>
> IntPtr ip = (IntPtr)i;
>
> In VB.NET
>
> Dim ip As New IntPtr(i)

and in VC++.NET something like

int a = 0x0007;
IntPtr b = IntPtr(__int64(a));