Suggestive code (I have not tried it really):

1
2
3
type Foo = struct end
let x = System.IntPtr.Zero 
let y : nativeptr<Foo> = NativeInterop.NativePtr.ofNativeInt x

See also

[link:msdn.microsoft.com]

By on 11/23/2009 2:31 PM ()

thanks Brian, you are a star.

Here is the working code:

1
2
3
4
5
6
7
8
    let mutable x = System.IntPtr.Zero 

    pLib.GetLibAttr(&x);

    let y  = NativeInterop.NativePtr.of_nativeint<TYPELIBATTR> x

    let z = NativeInterop.NativePtr.read y
By on 11/24/2009 1:16 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper