Using Visual Prolog DLL's from Microsoft Visual C++

This directory contains examples of how to use a Dynamic Link Library (DLL) created with Visual Prolog in Microsoft Visual C++ (see Using Visual Prolog DLL’s from other languages for an overview of the examples)

All these examples uses the same Visual Prolog DLL’s that are found in the DLLS directory, so these have to be compiled before any of the examples are compiled and run.

Notes for C++

Please also read the common notes.

 

Visual Prolog

C/C++

integer

int

real

double

unsigned

unsigned

string

char*

 

Visual Prolog

C/C++

integer

int*

real

double*

unsigned

unsigned*

string

char**

 

#ifdef __cplusplus
extern "C" {
#endif
/*list of imported functions from DLL*/
void APIENTRY dll_mark_gstack(unsigned long *out);
void APIENTRY dll_release_gstack(unsigned long in);
void APIENTRY setInteger(int In );
void APIENTRY getInteger(int* Out);
void APIENTRY setReal(double In );
void APIENTRY getReal(double* Out );
void APIENTRY setString(char* In);
void APIENTRY getString(char** Out);
#ifdef __cplusplus
}
#endif

Examples

NONGUI: Visual Prolog project with MSVC as main program which uses non-GUI Visual Prolog DLL.

USEVPI: Microsoft Visual C++ MFC project which uses a Visual Prolog DLL with VPI.

ActiveX: Microsoft Visual C++ MFC ActiveX project which uses a Visual Prolog DLL with VPI.