Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.UnauthorizedAccessException" in mscorlib.dll #10

Open
RollingStone1989 opened this issue May 27, 2016 · 0 comments
Open

System.UnauthorizedAccessException" in mscorlib.dll #10

RollingStone1989 opened this issue May 27, 2016 · 0 comments

Comments

@RollingStone1989
Copy link

Hello!

OS: Windows 7

VB.NET always gives me an error message like written in title, when running test application and clicking the Button1:

`
Imports PiSharp.LibGpio
Imports PiSharp.LibGpio.Entities

Public Class Form1

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    LibGpio.Gpio.SetupChannel(BroadcomPinNumber.Four, Direction.Output)
    LibGpio.Gpio.SetupChannel(BroadcomPinNumber.Eighteen, Direction.Input)
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
    LibGpio.Gpio.OutputValue(BroadcomPinNumber.Four, True)
End Sub

End Class
`

It denies the access to the path written in the "LibGpio.cs" unter GetGpioPath() in line 470:

private string GetGpioPath() { if (Environment.OSVersion.Platform == PlatformID.Win32NT || Environment.OSVersion.Platform == PlatformID.Win32Windows || Environment.OSVersion.Platform == PlatformID.Win32S || Environment.OSVersion.Platform == PlatformID.WinCE) { // If we're running under Windows, use a Windows format test path return "C:\\RasPiGpioTest"; } }

Doesn't matter which path i'm filling in there (i tried different paths in my user directory or on another hard disk): the error rests. I tried to run the application as administrator and from the compiled .exe. It doesn't work.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant