Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

HoloLens with ARToolKit and Unity - ARWrapper.dll Not Found

SehrjaSehrja
edited October 2016 in Questions And Answers

Hey everyone, I am wanting to combine the HoloLens with the fiduciary marker tracking provided in the ARToolKit for Unity Package; however, I am getting errors deploying to the HoloLens Emulator and HoloLens itself. The application works perfectly fine in Unity. I know the ARToolKit is "officially" not compatible with Windows 10 and VS 2015 (ie. HoloLens) however I believe it is possible to make this work by recompiling the ARToolKit binaries in Windows 10 and VS 2015 - which I have done. However it seems like no matter what I do I cannot get the following errors absolved:

An exception of type 'System.DllNotFoundException' occurred in Assembly-CSharp.dll but was not handled in user code. Additional information: Unable to load DLL 'ARWrapper': The specified module could not be found. (Exception from HRESULT: 0x8007007E)



DllNotFoundException: Unable to load DLL 'ARWrapper': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at ARNativePlugin.arwInitialiseARWithOptions(Int32 pattSize, Int32 pattCountMax)
at PluginFunctions.arwInitialiseAR(Int32 pattSize, Int32 pattCountMax)
at ARController.Awake()
at ARController.$Invoke0(Int64 instance, Int64* args)
at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)
(Filename: Line: 0)


DllNotFoundException: Unable to load DLL 'ARWrapper': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at ARNativePlugin.arwRegisterLogCallback(LogCallback callback)
at PluginFunctions.arwRegisterLogCallback(LogCallback lcb)
at ARController.OnDisable()
at ARController.$Invoke34(Int64 instance, Int64* args)
at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)
(Filename: Line: 0)


Through research I have found that ARWrapper.dll is dependent on ARvideo.dll, DSVL.dll, opencv_core246.dll, opencv_flann246, pthreadVC2 (per here: https://artoolkit.org/documentation/doku.php?id=6_Unity:unity_on_windows) and if the latter dependencies are missing then the error will still be "ARWrapper not found" - even if it can be found. Therefore I have gathered all the source code and dependencies and recompiled the latter DLLs in Windows 10 Visual Studio 15 (clearing the compiling errors as I went) however I am still receiving the same errors. I have been stumped for some time now and any help would be greatly appreciated. Thanks!

EDIT: Also, I want to mention I am following the advice stated on the ARToolKit forums here: http://artoolkit.org/community/forums/viewtopic.php?f=28&t=9437&p=20571 where a user has claimed to have gotten this to work - but has yet to respond to further questions.

Answers

  • Options
    Jimbohalo10Jimbohalo10 ✭✭✭
    edited October 2016

    Hi @Sehrja,
    Your problems seem like the Question in another conference Unable to load dll file - exception 0x8007007E

    It is also essential that you use the Assets\Plugins\WSAPlayer\x86 directory for your plugins and check in Unity by clicking on the DLL
    to see what the status is.

    Unity Player uses Net 3.5 managed, and WSA/UWP uses Net 5.0 show as Net 4.*, then you have to select the correct runtimes as WSA Player only.

    A further check in Visual Studio is to build a "Local" version, instead building for HoloLens Emulator, of the App, then try and "Start with debugging" and check the output window.

    Ignore all this all ready built messages, basically because OpenCv 2.8xxx has NOT been built to work with UWP because the C# wrappers ONLY work IN Unity Player NOT UWP/WSA

  • Options

    ARToolKit does not support Universal Windows Platform yet. So the dlls shipped with ARToolKit unity package are not compatible with HoloLens.

    I built a wrapper of ARToolKit for UWP, and successfully run ARToolKit on HoloLens.
    Check here.

Sign In or Register to comment.