• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.gitignoreH A D15-Apr-2020258 3635

README.mdH A D15-Apr-20201 KiB2921

dlltest.cH A D15-Apr-20204.9 KiB16878

plregtry.cH A D15-Apr-202019 KiB736511

registry.plH A D15-Apr-20208.7 KiB240204

README.md

1# Foreign language demo for Windows
2
3This directory contains two examples of foreign-language extensions.
4
5  - dlltest.dll
6    Simple code illustrating very basic functionality of the
7    interface.  Load it using:
8
9        ?- load_foreign_library(dlltest).
10
11    It defines the following predicates:
12
13     - say_hello(+Text)
14       Shows a simple Windows message-box containing Text.
15     - mclock(-MilliSeconds)
16       Return the number of milli-seconds elapsed since the library was loaded.
17     - rlc_color(+Which, +R, +G, +B)
18       Set the color of the plwin window. Which is one of {window, text,
19       highlight, highlighttext}, RGB are integers between 0 and 255 for
20       the color components.
21
22    In addition, it illustrates how to hook into a Prolog abort.
23
24  - plregtry.dll
25    Defines predicates to access the Windows registry.  It is a much
26    more elaborate example, and also a useful library. Its not
27    documented, but with some knowledge of the Windows API it should
28    be fairly easy to figure out how it works.
29