Hey all,

Hammer gave me this code to use in a small app that will be used in a cd autorun.inf file. I can get it to compile, but it errors out when I try to build it with this error:

LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/AutoStart.exe : fatal error LNK1120: 1 unresolved externals
Code:
#define STRICT
#include <Windows.h>
/* */
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pCmdLine, int nCmdShow)
{
int i;
for (i = 1; i < __argc; i ++)
{
if ((int) ShellExecute(NULL, NULL, __argv[i], NULL, NULL, SW_SHOWNORMAL) <= 32)
{// Error trying to run default browser, tell user
CHAR sz[1024];
wsprintf(sz, TEXT("Error openning %s on CD-ROM disc."), __argv[i]);
MessageBox(NULL, sz, TEXT("ShellExecute"), MB_OK | MB_ICONWARNING);
}
}
return(0);
}
help?