NOTE: This page has been translated automatically from Russian to English. Original page.



ВК NativeAPI на Delphi и FreePascal

1CNativeLib - free Delphi library for creating the external component (VC) 1C Native API technology.
A new version.
16/12/2015 Fixed: search properties and methods performed VC-sensitive letters.
10/06/2015 Fixed: Message "Incorrect work with memory components"

1CNativeLib - Delphi library for creating the external component (VC) 1C Native API technology. The library is easy to use and allows you to deal directly with VC functionality that is focused on compliance with the instructions provided by 1C.

To create a VC using 1CNativeLib, enough to create a DLL project, write a class with the implementation of your functional VC and register this class when loading dll. Minimum DLL project with the implementation of a class with a single method is as follows:

// ------------------------------------------------ -----------------

library MiniVK;

uses

SysUtils, v8napi;

type

TMyClass = class (TV8UserObject)

function Hello (RetValue: PV8Variant; Params: PV8ParamArray;

const ParamCount: integer): boolean;

end;

{TMyClass}

function TMyClass.Hello (RetValue: PV8Variant; Params: PV8ParamArray;

const ParamCount: integer): boolean;

begin

V8SetWString (RetValue, 'Hello from Delphi!'); // Set the result of the function

result: = True; // Set the flag that the function completed successfully

end;

begin

with ClassRegList.RegisterClass (TMyClass, 'MySuperExtention', 'TMyClass') do

begin

AddFunc ( 'Hello', 'Hi', @ TMyClass.Hello, 0); // Register function

end;

end.

// ------------------------------------------------ -----------------

Everything you need is contained in one v8napi. Pas module. The attached archive module itself, an example, a detailed description and a template for a new project.

1C:Enterprise Developer's Community