I have a C++ DLL file. I am facing a problem while trying to access the below mentioned function into my C# code.

```
DLLFILEACCESS_API long APIENTRY DllFAOpenFile(LPCWSTR path, DWORD* handle);

```

My revised not working C# code:

```
    [DllImport(@"C:\Program Files\Yokogawa Electric Corporation\DllGXFileAccess R2.01.01\DllGXFileAccess.dll", EntryPoint = "DllGXFAOpenFile", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
    [return:MarshalAs(UnmanagedType.I4)]
    public static extern int FILE_OPEN([param: MarshalAs(UnmanagedType.LPStr)] string path, [param: MarshalAs(UnmanagedType.U4)] out uint handle);

    private void button1_Click(object sender, EventArgs e)
    {
        long ret;
        string path = textBox1.Text;

        uint handle =0;
        //IntPtr uhandle = new IntPtr(handle);
        ret = FILE_OPEN(path, out handle);
        textBox2.Text = ret.ToString();

    }

```

I am able to marshal LPCWSTR. But i cannot marshal DWORD \*handle. What is the problem here?