< ! --Digital window verification 001 -->

Nikon SDK C# wrapper library

Nikon SDK C# wrapper library
Nikon SDK C# wrapper library (2)

For all of you software developers out there - a reader created an open source C# wrapper library for Nikon's MAID SDK:

"This project aims to provide an easy-to-use C# library that wraps the functionality of the native Nikon MAID SDK. The library allows you to control your Nikon DSLR via USB using just a few lines of C#."

Features:

  • Control your Nikon DSLR via USB
  • Capture Jpeg and Raw images directly to system memory
  • Receive 'Live View' images
  • Record Video
  • Query and change camera settings (Exposure, Aperture, ISO, etc.)
  • And much more...
This entry was posted in Nikon Software and tagged . Bookmark the permalink. Trackbacks are closed, but you can post a comment.
  • Ken Elliott

    SWEET! Thank you so much.

  • http://jaysonknight.com/ Jayson Knight

    Perfect. Windows Phone app anyone?

    • cppguy16

      This is not for Windows Phone. It’s just a very thin wrapper around x86 machine code.

      • http://jaysonknight.com/ Jayson Knight

        I am fully aware of what this library is. WP is the only phone platform that natively supports managed code natively, and I see no reason why WP client apps cannot use this library to write client apps in any .Net language. So yes, it absolutely is for Windows Phone, and any other platform that supports .Net. All you need to make this library work is the correct MD3 files from Nikon (their SDK), and target a platform that supports the .Net runtime.

        (12 years experience as a professional software engineer).

        • Tudor Turcu

          Any .NET developer knows that the .NET version included with Windows Phone (7 and 8) is very limited (due to security and other reasons) and one of the limitations is calling native SDKs using PInvoke, like this library is doing (unless you are one of the very few companies that Microsoft has granted interop access or you have somehow managed to interop unlock your device).
          Anyway, it’s very unlikely that a WP7 will recognize a Nikon camera as an external USB device in the same way a desktop version of Windows does.

  • Art

    I’ve been looking for something like this in c/c++

    I wonder what the odds are that they (or someone else) will bite off a c/c++ port next? (Why? I want to be able to do both exposure bracketing and focus stacking with a single electronic activation.)

    • http://jaysonknight.com/ Jayson Knight

      You can call into managed assemblies from native C/C++ on Windows, doesn’t have to be CLI/C++. The underlying language does not matter. You can probably run this under Mono as well on Mac, and program against it in pretty much any language that supports COM, or has .Net bindings.

    • Anon

      You do realise this is a wrapper around _native_ libraries. It’s already C/C++…

    • http://www.facebook.com/romain.lamarche Romain Lamarche

      You can do all you need with libgphoto2 in C/C++. See my comment below : http://nikonrumors.com/2013/04/14/nikon-sdk-c-wrapper-library.aspx/#comment-864071420

    • cppguy16

      Then you just use the Nikon SDK directly. This is nothing more than a C# wrapper around that.

  • RMJ

    nice. with this, it finally might be possible to make an application that doesn’t suck ass ! I’m sick of the available control softwares… either they go crash happy, lack all the important features, are designed by blind monkeys, or simply fail to have even remotely usable GUI.

    If this library supports most important controls, I will certainly code my own app. Even an app for a specific task if needed ! It won’t be pretty but it damn straight will do the job as it is ment to do it. I wish I had had the time to get to known the SDK myself but that’s just even more pain in ass… this library could finally give some solution.

    C# isn’t my thing but that haven’t stopped me before doing what I want…

    • http://www.facebook.com/romain.lamarche Romain Lamarche

      Hi, I’m currently working on a similar tool but using libgphoto2 (opensource library) and QT.
      I also plan to make a WebService API to allow remoting with smartphone or other devices (tablet, …). Of course this tool will be compatible with Raspberry PI to allow remote control outdoor.

      What kind of features were you talking about that are missing in current tools ?

  • Zelf

    why c#? a c library would have been better so other language (python) can use it :(.

    • http://jaysonknight.com/ Jayson Knight

      Wrap the generated assemblies from the C# port in a COM Callable Wrapper (CCW), and then any language that is COM aware can use the assemblies as if they were COM objects. The underlying language doesn’t matter, this port is merely an API, and takes care of all the messy interop marshalling that would otherwise have to be done in any .Net project that needs to use the original Nikon COM objects.

      Or just use Nikon’s original SDK, it’s written in C/C++.

      • Zelf

        Is it distributed??? I though they gave it only to partners?! I can’t find it on the web though….
        EDIT: My bad I found it, but you have to ask permission to use it. And thery refuse a gmail address.

  • lorenzo

    Can’t see where the function NowSpredOilOnSensor is. :-)

    • Micah Goldstein

      Is anybody else tired of this whiny crap? Learn to clean your sensor (you should know how anyway!) and you’re fine.

      The real issue is the sub-par CAM4800. That shit is permanent.

  • Alec

    Hey- to NR guy or the author, any chance these controls could be ported to Android via direct USB anytime soon?

    • Zoltan Hubai

      For Android there are already numerous application that can control Nikon and Canon DSLR over USB or with the WU-1a/1b adapter (free and paid to).

  • Tero

    Thank you! This is awesome, i will give it a try!

  • Back to top