Internationalization and localization tools


Process Control Function

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

int main(int argc, char *argv[], char *envp[]);

int wmain(int argc, wchar_t *argv[], wchar_t *envp[]);

int _tmain(int argc, TCHAR *argv[], TCHAR *envp[]);

Internationalization (I18n) Function Overview

The main function marks the start of program execution. Optionally, main can be called with parameters, where argc is the number of arguments and argv is the corresponding array of null-terminated strings.

On Windows and some ANSI platforms, an optional third parameter is supported: envp, which is a pointer to an array of environment strings. For ANSI, POSIX.1 does not allow this three-argument form, so to be portable it is best to write main to take two arguments.

wmain is the wide-character version of the function; its parameters and return value are wide characters. wmain is supported on Windows platforms only. There is no wide version on ANSI platforms.

_tmain is the Windows-only Generic version of the function; with the _MBCS or _UNICODE compiler flags determining its mapping to either main or wmain.

I18n Issues

Use the appropriate version of the function as required for internationalization support.

Recommended Replacements*

*If you're already using the recommended function, see I18n Issues for other reasons why Globalyzer is detecting the function.

Process Control Functions

 

Lingoport internationalization and localization services and software