Search code examples
dji-sdk

Has anyone here gotten the DJI Windows SDK to work yet?


As the https://developer.dji.com/windows-sdk/ is now available, I thought I might have a go.

However, so far I have not gotten anything in VisualStudio using C# that references either the DJIWindowsSDK.dll, DJIWindowsWrapper.dll or DJIWindowsWrapper.winmd to work.

I have tried console applications on the .NET Framework and .NETCore, but so far all I get when just trying to either get at var droneManager = DJISDKManager.Instance; or trying to set any callback on DJIWindowsWrappedInterfaces are compile errors about mismatched platform settings (MSIL vs x32 or x64) or System.BadImageFormatException on first access to any SDK code.

Anyone have any idea on what type of projects these assemblies are actually meant to be usable? Documentation only describes classes and methods and such (which seem clear enough, in general), not basic nitty gritty stuff like the type of projects and platform settings supported.

And I have so far not gotten the SampleCode to work. It's nice that the sample code seems (if I look at source code) to be a sort of complete set of code showing SDK functions at work, but it only seems to work with the latest version of Windows 10, the Windows 10 SDK, and VisualStudio. And possibly a ton of other prerequisites, which do not seem all to clearly spelled out at all.

I would like to get a most simple kind of Hello World! style example (from some kind of Console app) working (first), but so far I'm not succeeding..


Solution

  • Have you checked the DJI Windows SDK Github Readme? I think the Get Started Immediately part can help you run the sample code. It lists the prerequisites, and necessary steps to run it.

    BTW, I just found this documentation, you can take a look and see if it helps: https://github.com/dji-sdk/Windows-SDK-Doc/blob/master/source/application-development-workflow/workflow-integrate.md