There is an existing API function which does only allow the plugin(DLL) to receive three parameters and perform some action:
int ProcessMe(int nCommand, unsigned int wParam, long lParam);
Now, from the main program(exe), would like to pass two variables to the plugin, and require plugin to modify their content, and main program will read them again, to perform some task.
My question is, from the above function, can I perform this, without changing the function parameters?
Example:
int ProcessMe(int nCommand, unsigned int wParam, long lParam)
{
// modify the parameters//
return 0;
}
int main()
{
BOOL bSave = TRUE;
int nOption = 0;
ProcessMe(0, (unsigned int)(&bSave), (long)(&nOption));
if(FALSE==bSave)
printf("bSave is modified!");
return 1;
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…