RecAPI
RecAPI .NET Support

This is a P/Invoke .NET Assembly to bridge between native and managed applications. It allows the functionality of KernelAPI and RecAPIPlus to be presented through a unified interface.

If you want to implement a fast, robust and reliable application (like an application handling huge batches or working in a Windows service) on the .NET platform, you should seriously consider using the P/Invoke interface.

  • In CSDK 20 the KernelAPI and RecAPIPlus interfaces are accessible from the .NET environment (languages at your choice are C#, managed C++ or VB.NET) through the P/Invoke assemblies. You have to add a reference to your current project (CAPI_PInvoke.dll) and the CSDK namespace, with all the KernelAPI and RecAPIPlus functions, is at your service.
  • The PI in the name of the above mentioned DLL stands for Platform Invoke because this is the public Platform Invoke interface of CSDK 20. Platform Invoke is a service that enables managed code to call unmanaged functions implemented in dynamic link libraries (DLLs). It locates and invokes an exported function and marshals its arguments (integers, strings, arrays, structures, and so on) across the interoperation boundary as needed.
  • Description of each function in this help contains the specification of the function also in C# language.
  • Our CSSamples sample codes exhibit the usage of the P/Invoke interface from C#.
  • KernelAPIS and RecAPIPlusS interfaces of RecAPI are not accessible from .NET environments.
  • In general the Nuance CSDK and the integrating .NET application must share a common folder. However if you want to place your .NET application and the CSDK binaries into different folders, you must write a small application configuration file containing the relative or absolute path to the CSDK. Here is a small example, where the Nuance CSDK is in the Nuance subfolder in your application folder:
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <probing privatePath="Nuance" />
        </assemblyBinding>
      </runtime>
    </configuration>
    
    The name of this configuration file is YourApp.exe.config and should be placed alongside with the YourApp.exe file. You can find a detailed description on the following URL: http://msdn.microsoft.com/en-us/library/823z9h8w(VS.80).aspx
  • CAPI PInvoke assembly does not appear automatically in the Add Reference dialog box .NET tab. To display assemblies in the Add Reference dialog box Add the following registry key, where <CSDKAssemblyLocation> is the directory of the assemblies that you want to appear in the Add Reference dialog box, for example, C:\Program Files\Nuance\...\Bin.
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\<version>\AssemblyFoldersEx\Nuance Assemblies]@="<CSDKAssemblyLocation>"