Skip to Main Content Skip to Search
Product Documentation

ntswrap - Generates type-safe API

Syntax

ntswrap.exe [-c namespace.class] [-i interface_name] [-a assembly_name]

Description

Available as a MATLAB function or Windows console executable.

ntswrap.exe [-c namespace.class] [-i interface_name]
[-a assembly_name]
accepts command line switches in any order.

Run ntswrap to generate a type-safe interface for a MATLAB Builder NE generated component.

Arguments

Inputs

-a .NET_native_interface.dll

Absolute or relative path to assembly containing .NET statically-typed interface, referenced by -i switch.

-b MATLAB_Builder_NE_Component.dll

Path to folder containing MATLAB Builder NE component that defines component referenced by -c switch

-c component_class_name

Namespace-qualified name of MATLAB Builder NE component in assembly identified by path in -b switch

-d

Enables debugging of the type-safe API assembly

Incompatible with -s.

-i interface_name

Namespace-qualified name of user-supplied interface in assembly identified by path in -a switch

-k

Keep generated type safe API source code; do not delete after processing

-n namespace_containing_generated_type-safe_API_class

Optional. If specified, places generated type-safe API in specifed namespace

-o output_folder

Optional. If specified, all output files will be written to specified, preallocated folder

-s

Generate source code only; do not compile type-safe API source into an assembly

-v vx.x

Version of Microsoft .NET Framework (csc compiler) used to generate type-safe API assembly (for example v2.0)

Incompatible with -s.

-w name_of_generated_type-safe_API_wrapper_class_and_assembly

Optional. If specified, overrides default name of generated type-safe API class and assembly

Incompatible with -c.

Outputs

ComponentInterface.dll

.NET binary containing type-safe API class. Requires ComponentNative.dll,Interface.dll and MWArray.dll

ComponentInterface.cs

Optional output, produced by -s and -k

Examples

ntswrap.exe -c AddOneComp.Mechanism 
            -i IAddOne 
            -a IAddOne.dll 

Issuing this command generates a type-safe API for the MATLAB Builder NE class Mechanism in the namespace AddOneCompNative. By default, ntswrap compiles the source code into an assembly MechanismIAddOne.dll.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS