Page 1 of 1

Import ATEM SDK into Visual Studio

PostPosted: Thu Jan 03, 2019 3:22 pm
by cjdenio
This is probably obvious, but I can't figure out how to get the ATEM SDK into Visual Studio. The examples use VS, so it must be possible. I can't find anything on .idl files, either. I'm using Visual Studio 2017. Thanks!

Re: Import ATEM SDK into Visual Studio

PostPosted: Fri Jan 04, 2019 6:56 pm
by Ian Morrish
Hi,
Just add a reference to your project. Under COM - Type Libraries
"Blackmagic Switcher API Library" should be listed if the BMD Control software is installed.

Then you can add
using BMDSwitcherAPI;
using System.Runtime.InteropServices;

After first time building the project, Visual Studio will create all the required files for your project to work. If you update the version of the client, just select "Clean Solution" from the Build menu to regenerate the interop files.

You don't really need the SDK installed as the desktop software includes the API dll.
I only use the SDK to get the API documentation.

Re: Import ATEM SDK into Visual Studio

PostPosted: Fri Jan 04, 2019 11:44 pm
by cjdenio
That's it. Thank you so much!

Re: Import ATEM SDK into Visual Studio

PostPosted: Mon Feb 10, 2020 2:52 am
by nzmillsto
A followup question to this.
We are adding ATEM support to a software product, but not all users of our product are ATEM users.
THerefore not all of them have the ATEM software installed.
We don't want to have to force non ATEM users to install the ATEM software.

Is there a way of including BMDSwitcherAPI without referencing the software, or only referencing it if we know they want to use an ATEM.

At the moment, when you install our application on a PC without the ATEM software, it says COM object not found.

Re: Import ATEM SDK into Visual Studio

PostPosted: Wed Feb 12, 2020 3:42 am
by Ian Morrish
You can copy the api 64bit dll in your project and include a regserv64 command to register it in your installer. There is also a dependency on ms windows c++ runtime

Sent from my SM-G960F using Tapatalk