Hello !!!!
I'm callind a form from Dll it works jut pirfect, but i have no idea how it works, so now i need to add parameters to the function,so i can pass some parammeters to the form, and have no idea how to do this, any one can help??
{
1 typedef void (*CALLEDFUNCTION) (TComponent* Owner);
2 CALLEDFUNCTION DllFunctionPtr;
3 AnsiString fDllName = "MyDll.dll";
4 AnsiString fFunctionName = "MyFunction";
5 AnsiString fMessage;
6 char fDllNameStr[50];
7 strcpy(fDllNameStr, fDllName.c_str());
8 HINSTANCE DLLInst = NULL;
9 DLLInst = LoadLibrary(fDllNameStr);
10 if (DLLInst) {
11 DllFunctionPtr = (CALLEDFUNCTION) GetProcAddress(DLLInst, unctionName.c_str());
12 if (DllFunctionPtr) DllFunctionPtr(this);
13 else {
14 fMessage = "Could not obtain pointer for function";
15 fMessage += fFunctionName;
16 fMessage += " in DLL ";
17 fMessage += fDllName;
18 }
19 }
20 else {
21 fMessage = "Could not load DLL ";
22 fMessage += fDllName;
23 Edit1->Text= fMessage;
24 }
25}
in line 3 is set the dll file name, in line 4 is set the function thet is defined and implemented in the dll file, it is a void MyFunction() now i need to run the same function but with parammeters, like void MyFunction(AnsiString A, TIBTable* IBTable1), how do i do this???