Hello Again

I got a simple function working from a dll, but now i can't seem to pass it variables to act on!

Inside my dll i have the function:

int WINAPI InitHooksDll(HWND hwndMainWindow, int nWinLineHeight)
{
hwndMain = hwndMainWindow;
nLineHeight = nWinLineHeight;

InitCalled = 1;
return (0);
}

and I can call the function "test" which has no varibales apssed to it ok, and it is called as follows:

HMODULE hkeyDLL = LoadLibrary("keydll");
if(!hkeyDLL) {
MessageBox(NULL, "Could not load hkeyDLL library", "Error", MB_OK);
return -1;
}

if (hkeyDLL != NULL)
{
ProcAdd = (MYPROC) GetProcAddress(hkeyDLL, "Test");

// If the function address is valid, call the function.

if (fRunTimeLinkSuccess = (ProcAdd != NULL))
(ProcAdd) ("message via DLL function\n");

// Free the DLL module.

fFreeResult = FreeLibrary(hkeyDLL);
}

How do I alter this code to run the function above (InitHooksDll) and pass it the required variables?!

I don't know whether I have explained myself to well, so if anybody understand could you please shed some light! or If not let me know and I'll try and re-explain myself!

Cheers in advance

Andy