Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Development
System Services
System Information
 GetSystemWow64Directory function
GetSystemWow64Directory function

Applies to: desktop apps only

Retrieves the path of the system directory used by WOW64. This directory is not present on 32-bit Windows.

Syntax

UINT WINAPI GetSystemWow64Directory(
  __out  LPTSTR lpBuffer,
  __in   UINT uSize
);

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.

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.

On 32-bit Windows, the function always fails, and the extended error is set to ERROR_CALL_NOT_IMPLEMENTED.

Remarks

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.

To compile an application that uses this function, define _WIN32_WINNT as 0x0501 or later. For more information, see Using the Windows Headers.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

Winbase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

Unicode and ANSI names

GetSystemWow64DirectoryW (Unicode) and GetSystemWow64DirectoryA (ANSI)

See also

System Information Functions

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Example Using C++      Mike Burr   |   Edit   |   Show History
I know this isn't perfect C++, but here is a simple example demonstrating the ASCII version of this function,

// Get32BitFolder.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "Windows.h"
#include "stdio.h"

int _tmain(int argc, _TCHAR* argv[])
{
    char str[100];
    UINT size = 100;

    GetSystemWow64DirectoryA(str, size);

    printf("%s\r\n",str);

    return 0;
}
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker