Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
2
Question by Rajeesh_AR · Dec 23, 2015 at 09:16 AM · unity 5webgldllnotfoundexception

"DllNotFoundException: Unable to load DLL 'kernel32.dll': The specified module could not be found. Error.

private class ThreadJasonDll {

     private static string DLL_LOCATION =  System.IO.Path.Combine(Application.streamingAssetsPath, "ThreadJasonDll.dll");
     
     private IntPtr pDll;  public ThreadJasonDll() {
         Debug.Log(DLL_LOCATION);
         pDll = NativeMethods.LoadLibrary (DLL_LOCATION);    
         int error = Marshal.GetLastWin32Error();
         if (error != 0) {
             Debug.Log("LoadLibrary error: " + error);
         }IntPtr pInitialize = NativeMethods.GetProcAddress (pDll, "Initialize");
         CallInitialize = (DllInitialize)Marshal.GetDelegateForFunctionPointer (pInitialize, typeof(DllInitialize));
         IntPtr pApplyMotionInput = NativeMethods.GetProcAddress(pDll, "ApplyMotionInput");}

This is the major part of the code. I am trying to access the ThreadJasonDll.dll . This project is working fine in unity and also in the .exe build. But when I took the WebGl build, I got this error. Can any one please help me.

While printing the DLL_LOCATION, I am getting the correct path also. I copied that path and put it in browser. It goes to the dll location. But still I am getting this error and due to this, the major part is missing in my project.

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 Landern · Dec 23, 2015 at 04:00 PM

The Editor and your windows build(.exe) have access to the local file system. WebGL doesn't offer access to your file system (browsers specifically don't allow this behavior by default, the security/privacy ramifications aren't hard to think out), if it did then "rogue" websites could troll for files with ease. So you can't load windows system file kernel32.dll from within a web browser.

Comment
Add comment · Show 1 · 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
avatar image Rajeesh_AR · Dec 24, 2015 at 05:21 AM 0
Share

@Landern So how could I solve my current issue? Could you please help me..

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

43 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 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 avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity Build error when not used B.dll referenced by A.dll I used, it couldn't build successfully. 1 Answer

No 'Access-Control-Allow-Origin' in webGL Unity Multiplayer 1 Answer

web gl facebook multiplayer 0 Answers

webGl not running in Browser showing Message 0 Answers

Unity WebGL build and PHP Post communication 0 Answers


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