Chapter 5.  Extending C/AL with COM Components

In this chapter, we will cover the following recipes:

  • Using COM type libraries in C/AL
  • Mapping COM datatypes to C/AL
  • Disposing of COM objects
  • Working with the Variant datatype
  • Sending data to the Excel automation server
  • Creating a Word document using automation objects
  • Creating and registering a COM component that can be used in NAV

Introduction

The Component Object Model (COM) is a platform-independent interoperability model. Each COM library is a piece of software that can be bound to a client application at runtime. NAV application code can use classes and interfaces exported by COM type libraries, although this support has certain limitations:

  • COM automation objects can run only on the NAV client. Server-side automation objects are not supported.
  • Automation objects cannot run on the NAV Web client.
  • Only non-visual components are supported.
  • Exception handling is not supported.
  • In NAV 2016, C/SIDE cannot receive events from automation servers.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.100.202