Share via


EXEENTRY (Windows Embedded CE 6.0)

1/5/2010

This macro definition specifies the function that is used as an entry point for the .exe file if TARGETTYPE is set equal to PROGRAM.

The default value for EXEENTRY is WinMainCRTStartup.

EXEENTRY can use the following values.

Values

Value Description

Startup

Ee478957.note(en-US,WinEmbedded.60).gifNote:
The actual name of the function is not significant. By convention, this name is used for bootloader entry points. The name of any function defined in your application can be used as an entry point.

Direct low-level entry point.

For example, the entry point for a boot application.

No parameters are passed to this function.

main

- or -

WinMain

Ee478957.note(en-US,WinEmbedded.60).gifNote:
The actual name of the function is not significant. By convention, these two names are used for Windows application entry points. The name of any function defined in your application can be used as an entry point.

Direct entry point for an application.

Your application is responsible for performing any initialization of the C Runtime if that is used.

Ee478957.note(en-US,WinEmbedded.60).gifNote:
Global initializers are normally called by the C Runtime initialization code, so global variables might be initialized to zero instead of their expected value.

This function should not return. Instead, call ExitProcess to terminate your application.

Your application must define the specified function. For example, if the entry point is given the name WinMain, your application must define a function with the following signature:

void WinMain(HINSTANCE hInstance, HINSTANCE hInstacePrev, LPWSTR lpszCmdLine, int nCmdShow);

mainCRTStartup

- or -

mainACRTStartup

C Runtime entry point for an ANSI console-based application.

This entry point is defined in the C Runtime. It initializes the C Runtime, calls global initializers, and initializes argc and argv before transferring control to your application’s main function.

Your application must define a 'main' function with the following signature:

int main(int argc, char** argv);

wmainCRTStartup

- or -

mainWCRTStartup

C Runtime entry point for a Unicode console-based application.

This entry point is defined in the C Runtime. It initializes the C Runtime, calls global initializers, and initializes wargc and wargv before transferring control to your application’s wmain function.

Your application must define a 'wmain' function with the following signature:

int wmain(int wargc, wchar_t** wargv);

WinMainCRTStartup

Entry point for a Windows-based application.

This is the default value.

This entry point is defined in the C Runtime. It initializes the C Runtime and calls global initializers before transferring control to your application’s WinMain function.

Your application must define a 'WinMain' function with the following signature:

int WinMain(HINSTANCE hInstance, HINSTANCE hInstancePrev, LPWSTR lpszCmdLine, int nCmdShow);

wWinMainCRTStartup

Entry point for a Windows-based application.

This entry point is defined in the C Runtime. It initializes the C Runtime and calls global initializers before transferring control to your application’s wWinMain function.

Your application must define a 'wWinMain' function with the following signature:

int wWinMain(HINSTANCE hInstance, HINSTANCE hInstancePrev, LPWSTR lpszCmdLine, int nCmdShow);

See Also

Concepts

Sources File
TARGETTYPE

Other Resources

CRT Entry Points