Hello everyone.

We have decided to phase out the Mixed Reality Forums over the next few months in favor of other ways to connect with us.

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.

The plan between now and the beginning of May is to clean up old, unanswered questions that are no longer relevant. The forums will remain open and usable.

On May 1st we will be locking the forums to new posts and replies. They will remain available for another three months for the purposes of searching them, and then they will be closed altogether on August 1st.

So, where does that leave our awesome community to ask questions? Well, there are a few places we want to engage with you. 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. And always feel free to hit us up on Twitter @MxdRealityDev.

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

  • 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

  • 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.