*******************UseDll1.cpp*********************
#include
typedef int (*function1_ptr) ();
function1_ptr function1=NULL;
int APIENTR
Thank you very much, your web page helped me a lot :) I only had to use tchar.h to make it working. You can see it in the rest of the answer.
#pragma once
#include
#include "spinapi.h"
#include
typedef int (*count_boards_ptr)(void);
int x = 0;
HINSTANCE hinstDLL;
hinstDLL = LoadLibrary(_T("C:\\Smajdalf\\doucko_C\\DLLProblem\\DLLProblem\\spinapi.dll"));
count_boards_ptr count_boards = NULL;
count_boards = (count_boards_ptr) GetProcAddress(hinstDLL, "pb_count_boards");
if(count_boards != NULL) {
x = count_boards();
}
FreeLibrary(hinstDLL);