Hello!
I made a dll :
and a .DEFPHP Code:#include "MYDLL.h"
__declspec( dllexport ) int doubleInt(int iNumber)
{
return (iNumber * 2);
}
but now that's what I just found in some thread here but that doesn't work and I know that I miss something but I really do not have a clue how to call my DLL in an other C++ projectCode:LIBRARY MYDLL DESCRIPTION "Simply double an integer" EXPORTS doubleInt @1
Here is what I got :
PHP Code:#include <iostream>
//Prototype
void LoadDll(void);
void main(void)
{
LoadDll();
}//End main
void LoadDll(void)
{
HMODULE hDLL = LoadLibrary("MYDLL");
if (hDLL)
MYFUNC function = (MYFUNC)GetProcAddress(hDLL, "MyFunction");
else
std::cout << "Error loading DLL";
}//End LoadDll
Any one can help me ?





Reply With Quote