Skip to content

SWI-Prolog/packages-windows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Foreign language demo for Windows

This directory contains two examples of foreign-language extensions.

  • dlltest.dll Simple code illustrating very basic functionality of the interface. Load it using:

    ?- load_foreign_library(dlltest).
    

    It defines the following predicates:

    • say_hello(+Text) Shows a simple Windows message-box containing Text.
    • mclock(-MilliSeconds) Return the number of milli-seconds elapsed since the library was loaded.
    • rlc_color(+Which, +R, +G, +B) Set the color of the plwin window. Which is one of {window, text, highlight, highlighttext}, RGB are integers between 0 and 255 for the color components.

    In addition, it illustrates how to hook into a Prolog abort.

  • plregtry.dll Defines predicates to access the Windows registry. It is a much more elaborate example, and also a useful library. Its not documented, but with some knowledge of the Windows API it should be fairly easy to figure out how it works.

About

Example DLL and windows registry access library

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •