|
//Boby Thomas - march 2006
// plat_ind.cpp : Definiert den Einstiegspunkt f�r die Konsolenanwendung.
//
#include "os_call.h"
#include <iostream>
using namespace std;
typedef int (*AddFnPtr)(int,int);
int main(int argc, char* argv[])
{
AddFnPtr AddFn;
void *hDLL;
//do not add extension. It is hndled by LoadSharedLibrary.
hDLL = LoadSharedLibrary("add");
if(hDLL == 0)
return 1;
AddFn = (AddFnPtr)GetFunction(hDLL,"fnAdd");
int iTmp = AddFn(8,5);
cout<<"8 + 5 = "<<iTmp;
FreeSharedLibrary(hDLL);
return 0;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.