Give this C example a try -- set the entry point to RawEntryPoint. Make sure to link with all the defaults. Its easiest to test this by building it in the VS IDE.
#include <stdio.h>
int mainCRTStartup();
int __stdcall RawEntryPoint(void)
{
return mainCRTStartup();
}
int main(int argc, char *argv[], char *env[]) {
//Variable declarations.
int ret;
//Argument checks.
//Initializations.
//Main logic.
printf("\nargc = %d\n", argc);
}