IntPtr to String and long?
<p>i use c#.net 2.</p>

<p>I have this method here to get a string out of a IntPtr:</p>

<pre><code> void* cfstring = __CFStringMakeConstantString(StringToCString(name));
        IntPtr result = AMDeviceCopyValue_Int(device, unknown, cfstring);
        if (result != IntPtr.Zero)
        {
            byte length = Marshal.ReadByte(result, 8);
            if (length &gt; 0)
            {
                string s = Marshal.PtrToStringAnsi(new IntPtr(result.ToInt64() + 9L), length);
                return s;
            }
        }
        return String.Empty;
</code></pre>

<p>It works an all data which is saved as string in my USB-Device (return data of method "AMDeviceCopyValue").</p>

<p>Now I get this:
"£\rº\0\0Â¨\t\0\0\0ˆ\0\0\0\0\0\0x>Ô\0\0\0\0Å¨\t\0\0\0€1ÔxÕÍ¸MÔ\0\0\0\0È¨\t\0\0\0€)\0fŒ\a\0Value\0\0Ë¨\t\0\0\0€7fŒ\a\0Result\0Î¨\t\0\0\0ˆTÅfŒ\a\0\0Key\0\0\0\0ñ¨\t\0\0\0€+fŒ\a\0Port\0\0\0ô¨\t\0\0\0€%fŒ\a\0Key\0\0\0\0÷¨\t\0\0\0€:\0\0\0\0\0\0\0\0\0\0\0\0\0\0ú¨\t\0""</p>

<p>This is saved as "long" - so, how I can get this IntPtr into long and not string?</p>
