GetSystemWow64Directory2 function

Retrieves the path of the system directory used by WOW64, using the specified image file machine type. This directory is not present on 32-bit Windows.

Syntax


UINT WINAPI GetSystemWow64Directory2(
  _Out_ LPTSTR lpBuffer,
  _In_  UINT   uSize,
  _In_  WORD   ImageFileMachineType
);

Parameters

lpBuffer [out]

A pointer to the buffer to receive the path. This path does not end with a backslash.

uSize [in]

The maximum size of the buffer, in TCHARs.

ImageFileMachineType [in]

An IMAGE_FILE_MACHINE_* value that specifies the machine to test.

Return value

If the function succeeds, the return value is the length, in TCHARs, of the string copied to the buffer, not including the terminating null character. If the length is greater than the size of the buffer, the return value is the size of the buffer required to hold the path.

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

Remarks

On systems that support multiple WOW64 architectures, you can use GetSystemWow64Directory2 to retrieve appropriate system directory associated with the WOW64 architecture specified by ImageFileMachineType.

WOW64 uses the system directory to store shared 32-bit code on 64-bit Windows. Most applications have no need to access this directory explicitly.

For more information on WOW64, see Running 32-bit Applications.

Requirements

Minimum supported client

Windows 10, version 1511 [desktop apps only]

Minimum supported server

Windows Server 2016 [desktop apps only]

Header

Wow64apiset.h

Library

Kernel32.dll

DLL

Kernel32.lib

Unicode and ANSI names

GetSystemWow64Directory2W (Unicode) and GetSystemWow64Directory2A (ANSI)

See also

GetSystemWow64Directory

 

 

Show: