• Advertisement
Sign in to follow this  

Strange function call coding

This topic is 2304 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is in C++. Im looking through code. Part of it has the following

void __stdcall function1(int param1, Byte param2, void* param3)
{
//function code
}

then when its called its as a parameter to another function


Result = function2(param1, function1, (void *) param3);

Function1 is being called with no parameters. There is no default values set for these parameters so can anyone explain to me whats goin on here?

Cheers

Share this post


Link to post
Share on other sites
Advertisement

This is in C++. Im looking through code. Part of it has the following

void __stdcall function1(int param1, Byte param2, void* param3)
{
//function code
}

then when its called its as a parameter to another function


Result = function2(param1, function1, (void *) param3);

Function1 is being called with no parameters. There is no default values set for these parameters so can anyone explain to me whats goin on here?

Cheers



Result = function2(param1, function1, (void *) param3); does not call function1 , it passes a pointer to function1 to function2, the actual call is made inside function2.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement