Home All Groups Group Topic Archive Search About

Convert IntPtr to Handle

Author
19 Aug 2006 12:38 PM
erupakat
Hello,
I am using VS2005 along with a third part SDK . In that I am having a
function called OpenInterface() which will return a Handle .I think in
VS2005 they replaced Handle with IntPtr. How can I solve this issue. I
require this handle in all functions provided by SDK.
Thanks

Author
19 Aug 2006 1:22 PM
Herfried K. Wagner [MVP]
<erupa***@emirates.net.ae> schrieb:
> I am using VS2005 along with a third part SDK . In that I am having a
> function called OpenInterface() which will return a Handle .I think in
> VS2005 they replaced Handle with IntPtr. How can I solve this issue. I
> require this handle in all functions provided by SDK.

What's the exact function prototype and type name?

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
Author
20 Aug 2006 4:36 AM
erupakat
Hello,

    The function is like
Handle OpenInterface();

Herfried K. Wagner [MVP] wrote:
Show quoteHide quote
> <erupa***@emirates.net.ae> schrieb:
> > I am using VS2005 along with a third part SDK . In that I am having a
> > function called OpenInterface() which will return a Handle .I think in
> > VS2005 they replaced Handle with IntPtr. How can I solve this issue. I
> > require this handle in all functions provided by SDK.
>
> What's the exact function prototype and type name?
>
> --
>  M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
Author
20 Aug 2006 12:29 PM
Herfried K. Wagner [MVP]
<erupa***@emirates.net.ae> schrieb:
>    The function is like
> Handle OpenInterface();

The problem is we do not know anything about the 'Handle' type the function
is using.  Do you have the 'typedef' for the type?

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
Author
19 Aug 2006 10:01 PM
Stuart Nathan
You can try changing the definition from IntPtr to Integer. It works for
many APIs
Author
20 Aug 2006 4:37 AM
erupakat
I want to change from IntPtr to Handle type.
The function I am using has the prototype
Handle OpenInterface()

Stuart Nathan wrote:
Show quoteHide quote
> You can try changing the definition from IntPtr to Integer. It works for
> many APIs
Author
20 Aug 2006 4:50 PM
Stuart Nathan
You can try h = Handle.ToInt32