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, unsi
Try this... it is POSSIBLE!!!
int ProcessMe(int nCommand, unsigned int wParam, long lParam)
{
int *nCommand_ptr = (int*)nCommand;
unsigned int *wParam_ptr = (unsigned int*)wParam;
long *lParam_ptr = (long*)lParam;
*nCommand_ptr = 10;
*wParam_ptr = 10;
*lParam_ptr = 10;
return 0;
}
int main(){
int nCommand = 5;
unsigned int wParam = 5;
long lParam = 5;
printf("\n %d %u %lu",nCommand,wParam,lParam);
ProcessMe((int)&nCommand,(unsigned int)&wParam,(long)&lParam);
printf("\n %d %u %lu",nCommand,wParam,lParam);
return 0;
}
Output:
$>g++ passbyref.cc
$>./a.out
5 5 5
10 10 10$>