Skip to content

It is deny access. #2

@quanfeining

Description

@quanfeining

Hello@Robmaister

When I attempt to run your latest commit on your Fork for SimplerHidWrite,I get this mistake:

if (!Kernel32.File.ReadAsync(reference, gch.AddrOfPinnedObject(), inBuffer.Length, ref bytesRead,
fileOverlapped))
{
if (Marshal.GetLastWin32Error() != 997)// ERROR_IO_PENDING
throw new Win32Exception();

                if (!fileEvent.WaitOne(timeout))
                {
                    Kernel32.File.CancelIo(reference);
                    //fileEvent.Reset();
                    gch.Free();
                    return false;
                }

}
Kernel32.File.ReadAsync(reference, gch.AddrOfPinnedObject(), inBuffer.Length, ref bytesRead, fileOverlapped) this line wiil get error, "Win32Exception() 0x80004005" ,is deny access.

this is :IliumVR.Bindings.Win32.Hid/HidDevice.cs

I am using Visual Studio 2017 on Windows 10 1903.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions