Your question is not very clear.
If I understood well, you have a function in your main application and you want to call that function from a dll. If I didn't understand then rephrase your question.
If I am correct, the function from your main application is called a
callback. You will give to the dll a pointer to that function, and the dll will use this pointer to make the call.
For example, in your dll:
typedef void (*YOUR_CALLBACK)(int someParameter);
YOUR_CALLBACK _theCallback = NULL;
__declspec(dllexport) void SetCallback(YOUR_CALLBACK callback)
{
_theCallback = callback;
}
void function()
{
...
if (_theCallback != NULL)
_theCallback(10);
}
Now in your main application:
void YourCallback(int someParameters)
{
....
}
void Init()
{
...
SetCallback(YourCallback);
...
}