Search Unity

DllNotFoundException: Unable to load DLL '**Internal' using Javascript sample

Discussion in 'Web' started by DjEmix, Apr 6, 2016.

  1. DjEmix

    DjEmix

    Joined:
    Feb 7, 2013
    Posts:
    11
    Hello! I have this problem when I use the sample in:
    http://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html
    When I call Hello() I get this error in log in browser:

    DllNotFoundException: Unable to load DLL '**Internal': The specified module could not be found.

    I have declarated this like the sample:

    [DllImport("**Internal")]
    private static extern void Hello();

    And put MyPlugin.jslib into Assets\Plugins\WebGL\ directory.

    What is the problem?

    Thank you!
     
  2. rarebyte

    rarebyte

    Joined:
    Sep 26, 2015
    Posts:
    11
    Hey,

    I figured there's a typo in the docs. It should be

    [DllImport("__Internal")]

    E.g. 2 underlines instead of the 2 stars.
     
    jacksonkr likes this.
  3. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    We're getting this fixed. Someone did a search and replace of some markup on the docs, and accidentally broke this.
     
    jacksonkr likes this.
  4. jacksonkr

    jacksonkr

    Joined:
    Jan 22, 2013
    Posts:
    23
    I'm getting this issue even though I'm using the correctly code

    [DllImport("__Internal")]

    is resulting in

    Code (CSharp):
    1. DllNotFoundException: Unable to load DLL '__Internal': The specified module could not be found.
    --- SYKE ---

    the error quickly resolved itself. Whatever. (user error? probably)

    --- DOUBLE PLOT TWIST ---

    error is back with
    Code (CSharp):
    1. Unable to load DLL '__internal'. Tried the load the following dynamic libraries:
    Solved yet again - use a capital I *smh
     
    Last edited: Sep 9, 2022
  5. wechat_os_Qy03NZibZc6qHiTASa-lenQjQ

    wechat_os_Qy03NZibZc6qHiTASa-lenQjQ

    Joined:
    May 15, 2023
    Posts:
    2
    I'm having the same issue,and I consult alot of information,I found the [DllImport("__Internal")] should have 2 “_” not only one "_"