DirectXSetupGetEULA

Gets the DirectX end-user license agreement (EULA) text for a specific language.

int DirectXSetupGetEULA(
  LPTSTR lpszEULA,
  UINT cchEULA,
  WORD LangID
);

Parameters

lpszEULA
[in] Points to a buffer that receives the EULA string. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
cchEULA
[out] Specifies the size of the buffer pointed to by the lpszEULA parameter. If this value is zero, the function returns the required buffer size and makes no use of the lpszEULA buffer. If the compiler settings specify Unicode, the size is in Unicode characters, otherwise the size will be in ANSI characters.
LangID
[in] Determines in which language the DirectX EULA is returned. Specify 0 for the system default language. Or specify one of the following values.
MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED)
MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL)
MAKELANGID(LANG_CZECH, SUBLANG_NEUTRAL)
MAKELANGID(LANG_DUTCH, SUBLANG_NEUTRAL)
MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL)
MAKELANGID(LANG_FRENCH, SUBLANG_NEUTRAL)
MAKELANGID(LANG_GERMAN, SUBLANG_NEUTRAL)
MAKELANGID(LANG_ITALIAN, SUBLANG_NEUTRAL)
MAKELANGID(LANG_JAPANESE, SUBLANG_NEUTRAL)
MAKELANGID(LANG_KOREAN, SUBLANG_NEUTRAL)
MAKELANGID(LANG_POLISH, SUBLANG_NEUTRAL)
MAKELANGID(LANG_PORTUGUESE, SUBLANG_NEUTRAL)
MAKELANGID(LANG_RUSSIAN, SUBLANG_NEUTRAL)
MAKELANGID(LANG_SPANISH, SUBLANG_NEUTRAL)
MAKELANGID(LANG_SWEDISH, SUBLANG_NEUTRAL)

Return Values

If the function succeeds, and cchEULA is nonzero, the return value is the number of EULA characters (Unicode or ANSI) written to the buffer pointed to by lpszEULA. If the function succeeds, and cchEULA is zero, the return value is the required size, in ANSI or Unicode characters, for a buffer that can receive the EULA string.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The compiler setting also determines the function version. If Unicode is defined, the function call resolves to DirectXSetupGetEULAW. Otherwise, the function call resolves to DirectXSetupGetEULAA because ANSI strings are being used.

If a LangID is passed that is not supported, the function will fail and return 0. In this case, the GetLastError return value will be ERROR_INVALID_PARAMETER. ERROR_INVALID_PARAMETER is also returned for the following reasons.

The setup application must display the EULA with in accordance with the DirectX SDK EULA.

The EULA must be displayed and accepted before continuing with DirectSetup.

Requirements

Header: Declared in Dsetup.h.