Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Mondkin · Feb 11, 2015 at 03:59 AM · plugindlldllnotfoundexceptionwindows 8

UnauthorizedAccessException when accessing DLL

Hello,

I'm facing the following error in Unity 4.5.3f3 on Windows 8.1 when trying to load a DLL:

UnauthorizedAccessException: Access to the path 'C:/Users/Angela/GIT/UWYO/3DiA/NUI/Unity integration/Assets/' is denied. System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/FileStream.cs:259) System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare) System.IO.File.Open (System.String path, FileMode mode) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/File.cs:347) Plugins.CreateFileFromAsset (System.String filename) (at Assets/Plugin/VRPNWrapper/Plugins.cs:159) VRPNManager.ParseConfigFile () (at Assets/Plugin/VRPNWrapper/VRPNManager.cs:202) VRPNManager.Start () (at Assets/Plugin/VRPNWrapper/VRPNManager.cs:129)

This is followed by:

DllNotFoundException: VRPNWrapper/VRPNWrapper VRPNManager.Update () (at Assets/Plugin/VRPNWrapper/VRPNManager.cs:164)

I have seen a lot of people having that problem in Windows 8.1 and the solutions that have worked for them don't work for me. What I have tried so far:

  • Running Unity as administrator: didn't work

  • Disabling antivirus (AVG): didn't work

  • Checking the permissions of my Assets and VRPNWrapper folder (where the DLL is): I have even given permissions to Everyone and it doesn't fix the problem.

  • I have even run auditpol /clear

I have even thought that Unity is not using my username when trying to access the DLL folder, but in that case, to what user I should gave permissions ?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Mondkin · Feb 11, 2015 at 05:40 AM

I finally found the problem !

Actually those are two different problems:

UnauthorizedAccessException

Check that the error mentions a file operation and "C:/Users/Angela/GIT/UWYO/3DiA/NUI/Unity integration/Assets/", the problem is that the library I'm using (VRPNWrapper) is trying to open that path as if it were a file, so the access is not denied for a matter of permissions, it is denied because the operation is illegal (opening a directory to read its contents). The solution was to configure that library with the correct filename that it was missing.

DllNotFoundException

This is a misleading error message, Unity is not failing to find my DLL, it's failing to load it. The reason is that this DLL depends on other DLLs that are not present in my system. Using Dependency Walker helped me to understand the load chain and find which DLLs were missing.

I hope this information may guide others.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

19 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Error building Player: Extracting referenced dlls failed. 1 Answer

Windows 8 - DLLNotFoundException. Windows 7 - No problems! 0 Answers

Why does my 32-bit dll plugin(c++) work in Unity 4 and not in Unity 5 indy (Windows 32-bit editor) 0 Answers

How to fix failed to load assets/Plugins/filename.dll with error the specified module could not be found and DllNotFoundException: Assets/Plugins/filename.dll 1 Answer

DLLNotFoundException - C++ plugin 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges