Модуль Test.ob2
## Код:
```
MODULE Test;

TYPE
  INTEGER = LONGINT;
  REAL = LONGREAL;

PROCEDURE ["StdCall"] Sum*(n: INTEGER): REAL;
VAR a: POINTER TO ARRAY OF REAL; i: INTEGER; s: REAL;
BEGIN
  NEW(a, n);
  FOR i := 0 TO n-1 DO a[i] := i; END;
  s := 0;
  FOR i := 0 TO n-1 DO s := s + a[i]; END;
  RETURN s;
END Sum;

END Test.
```


Проект XDS
## Код:
```
-gendll+
-dllexport+
-o2extensions+
!module Test.ob2
```


Модуль импорта BlackBox
## Код:
```
MODULE XdsTest ["Test.dll"];
  PROCEDURE Sum* (n: INTEGER): REAL;
END XdsTest.
```


Модуль использования
## Код:
```
MODULE XdsUse;
  IMPORT Xds := XdsTest, Log;

  PROCEDURE Do*;
  BEGIN
    Log.Real(Xds.Sum(10));
  END Do;

END XdsUse.
```
