ByteScout Screen Capturing SDK - C# - Use Registration Free Deployment - ByteScout

ByteScout Screen Capturing SDK – C# – Use Registration Free Deployment

  • Home
  • /
  • Articles
  • /
  • ByteScout Screen Capturing SDK – C# – Use Registration Free Deployment

How to use registration free deployment in C# with ByteScout Screen Capturing SDK

The tutorial below will demonstrate how to use registration free deployment in C#

These source code samples are listed and grouped by their programming language and functions they use. ByteScout Screen Capturing SDK can use registration free deployment. It can be used from C#. ByteScout Screen Capturing SDK is the SDK for developers for quick implementation of screen video recording. The SDK records screen into video or into a series of screenshots. Can also record audio. Saves video into AVI,WMV and Google’s WebM. Output video quality, size, resolution or framerate can be adjusted easily. Provides additional tools for privacy features like blacking out on scren areas with sensitive information on screen right during recording. Supports web camera as input and can add instant text and images into video output.

You will save a lot of time on writing and testing code as you may just take the C# code from ByteScout Screen Capturing SDK for use registration free deployment below and use it in your application. Just copy and paste the code into your C# application’s code and follow the instruction. Test C# sample code examples whether they respond your needs and requirements for the project.

Download free trial version of ByteScout Screen Capturing SDK from our website with this and other source code samples for C#.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
using System; using System.Threading; using System.Diagnostics; using System.Runtime.InteropServices; using BytescoutScreenCapturingLib; // import bytescout screen capturing activex object /* // NOTE: if you are getting error like "invalid image" related to loading the SDK's dll then // try to do the following: // 1) remove the reference to the SDK by View - Solution Explorer // then click on References, select Bytescout... reference name and right-click it and select Remove // 2) To re-add click on the menu: Project - Add Reference // 3) In "Add Reference" dialog switch to "COM" tab and find Bytescout... // 4) Select it and click "Add" // 5) Recompile the application // Note: if you need to run on both x64 and x86 then please make sure you have set "Embed Interop Types" to True for this reference */ /* * REGISTRATION FREE SCENARIO DEPLOYMENT: Please check README-FIRST.txt for more details!! HOW MANIFEST FILES WERE GENERATED 1) Files from Redistributable\x86 were copied into the folder ScreenCapturingSDK\x86\ 2) The regsvr42 tool ran with the following command: (The tool is acailable from http://www.codeproject.com/Articles/28682/regsvr-Generate-SxS-Manifest-Files-from-Native-D ) regsvr42 -client:SimpleCaptureCSharp.exe -dir:ScreenCapturingSDK\x86 3)the following file was generated x86.manifest 4) copy everything from this x86.manifest file from this tag: <file to the beginning of the </assembly> tag (do not include this tag) 5) Main application was recompiled 6) The copied code (from 4) was pasted into the main MyApp.exe.manifest right after the <assemblyIdentity> tag 7) Due to the bug in regsvr42 needs to remove duplicated COM interfaces declaration: For example the first COM interface declaration: <comInterfaceExternalProxyStub name="ICapturer" iid="{DCAFCA37-546E-4D0A-9C02-D3221E65FCA9}" But the same interface (with the same GUID) is declared again (removed the duplicated declaration): <comInterfaceExternalProxyStub name="{DCAFCA37-546E-4D0A-9C02-D3221E65FCA9}" iid="{DCAFCA37-546E-4D0A-9C02-D3221E65FCA9}" Need to remove all these duplicates 8) Now you may run your application MyApp.exe without need for the Administrator level installation * * */ namespace SimpleCaptureCSharp { class Program { static void Main(string[] args) { try { // Create Capturer instance. Capturer capturer = new Capturer(); // Set capturing area type to catScreen to capture entire screen. capturer.CapturingType = CaptureAreaType.catScreen; // Set output video file name. // (!) The file extension defines the output video format (.WVM or .AVI). capturer.OutputFileName = "EntireScreenCaptured.wmv"; // Set output video width and height capturer.OutputWidth = 1024; capturer.OutputHeight = 600; // Start capturing . capturer.Run(); Console.WriteLine("Capturing entire screen for 10 seconds..."); // Wait for 10 seconds... new ManualResetEvent(false).WaitOne(10000); // Stop capturing. capturer.Stop(); // Release objects Marshal.ReleaseComObject(capturer); Console.WriteLine("Done"); Process.Start("EntireScreenCaptured.wmv"); } finally { Console.WriteLine(); Console.WriteLine("Press any key to exit"); Console.ReadKey(); } } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Screen Capturing SDK Home Page

Explore ByteScout Screen Capturing SDK Documentation

Explore Samples

Sign Up for ByteScout Screen Capturing SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

README-FIRST.txt
      
** How to setup the registration free deployment in your project ** 1. Right-click your project in the solution tree, select 'Add'->'Existing Items...' menu item and add "app.manifest" file. 2. Open the project properties. On the Application tab select "app.manifest" in "Manifest" combo-box. Now when you build the project the manifest will embedded into the assembly resources. * Alternative way * Rename the added "app.manifest" into "YourAssemblyName.exe.manifest". In the file's properties set "Copy to Output Directory" to "Copy always". Now the file will be copied to the output folder automatically and the manifest will be loaded from the file instead of resources. 3. Right-click your project in the solution tree, select 'Add'->'Existing Items...' menu item and add "ByteScoutScreenCapturing.dll", "ByteScoutScreenCapturingFilter.dll" and "ByteScoutVideoMixerFilter.dll" files. Set "Copy to Output Directory" property to "Copy always" for the each file. * You can find these files in "Redistributable" folder of the SDK installation directory. (Default location: "c:\Program Files\ByteScout Screen Capturing SDK\Redistributable"). 4. Clean and rebuild your project.

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Screen Capturing SDK Home Page

Explore ByteScout Screen Capturing SDK Documentation

Explore Samples

Sign Up for ByteScout Screen Capturing SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Screen Capturing SDK Home Page

Explore ByteScout Screen Capturing SDK Documentation

Explore Samples

Sign Up for ByteScout Screen Capturing SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next