dlls

I have a function in my program:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
void tables()
{ 
   BOOL freeResult, runTimeLinkSuccess = FALSE; 
   HINSTANCE dllHandle = NULL;              
   tablemain tablem = NULL;

   dllHandle = LoadLibrary(LPCWSTR("table.dll"));


   if (NULL != dllHandle) 
   { 
      tablem = (tablemain)GetProcAddress(dllHandle,"tablemain");

      if (runTimeLinkSuccess = (NULL != tablem))
      {
         tablem(logflag);
      }


      freeResult = FreeLibrary(dllHandle);       
   }

   if(!runTimeLinkSuccess)
      printf("\tUnable to acces 'table.dll.'"); 

I've seen it on MSDN
in the same directory i have a table.dll with dllmain.cpp and table.cpp.In table.cpp i have declared a function:
int _stdcall tablemain(int&login)
the def file looks like:
LIBRARY "table.dll"

EXPORTS
tablemain @1

But my function isn't exported.Can someone help?
Last edited on
Topic archived. No new replies allowed.