кодирование 0 Newbie Poster

How would I go about attaching a stub to my payload, which shall control the execution of the payload. I have looked into file mapping http://msdn.microsoft.com/en-us/library/windows/desktop/aa366556%28v=vs.85%29.aspx, but I am not 100% certain this is the right way to do that?

Thank you.