Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "WOW64" in [All]

advapi32

.

        SE_REGISTRY_WOW64_32KEY

.

        WOW64_32Key = 0x0200,

.

        WOW64_64Key = 0x0100,

.

        WOW64_Res = 0x0300,

.

Microsoft.Win32.RegistryKey.DeleteSubKey() (the non-WOW64 version)

.
KEY_WOW64_32KEY 0x0200 Delete the key from the 32-bit registry view.
.
KEY_WOW64_64KEY 0x0100 Delete the key from the 64-bit registry view.
.

Microsoft.Win32.RegistryKey.DeleteSubKey() (the non-WOW64 version)

.
KEY_WOW64_32KEY 0x0200 Delete the key from the 32-bit registry view.
.
KEY_WOW64_64KEY 0x0100 Delete the key from the 64-bit registry view.
.

Const KEY_WOW64_32KEY = &H200

.

Const KEY_WOW64_64KEY = &H100

.

Const KEY_WOW64_RES = &H300

.

Note that the root key should specify the registry path above where WOW6432node gets inserted, otherwise the KEY_WOW64_64 flag is ignored when used in a 32 bit application running on a 64 bit machine. So

.

Public Enum RegWow64Options As Integer

.

   KEY_WOW64_64KEY = &H100

.

   KEY_WOW64_32KEY = &H200

.

   Return OpenSubKey(Name, False, RegWow64Options.None)

.

   Return OpenSubKey(Name, Writeable, RegWow64Options.None)

.

Public Function OpenSubKey(ByVal Name As String, ByVal Writeable As Boolean, ByVal Options As RegWow64Options) As RegistryKey

.

     Options = RegWow64Options.None

.

    Public Enum RegWow64Options As System.Int32

.

    KEY_WOW64_64KEY = &H100

.

    KEY_WOW64_32KEY = &H200

.

    Public Function OpenSubKey(ByVal ParentKey As Microsoft.Win32.RegistryKey, ByVal SubKeyName As String, ByVal Writeable As Boolean, ByVal Options As RegWow64Options) As Microsoft.Win32.RegistryKey

.

        Config = OpenSubKey(Microsoft.Win32.Registry.LocalMachine, "SOFTWARE\" & BaseName, False, RegWow64Options.KEY_WOW64_64KEY)

.

    enum RegWow64Options

.

        KEY_WOW64_64KEY = 0x0100,

.

        KEY_WOW64_32KEY = 0x0200

.

    /// Open a registry key using the Wow64 node instead of the default 32-bit node.

.

    RegistryKey _openSubKey(RegistryKey parentKey, string subKeyName, bool writable, RegWow64Options options)

.

            RegistryKey software = _openSubKey(Registry.LocalMachine, "SOFTWARE", false, RegWow64Options.KEY_WOW64_64KEY);

.

            RegistryKey microsoft = _openSubKey(software, "Microsoft", false, RegWow64Options.KEY_WOW64_64KEY);

.

            RegistryKey windowsNT = _openSubKey(microsoft, "Windows NT", false, RegWow64Options.KEY_WOW64_64KEY);

.

            currentVersion = _openSubKey(windowsNT, "CurrentVersion", false, RegWow64Options.KEY_WOW64_64KEY);

.

In both cases, examples would take you to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node on 64-bit operating systems due to using RegistryView.Registry32.

.

Const KEY_WOW64_32KEY = &H200

.

Const KEY_WOW64_64KEY = &H100

.

Const KEY_WOW64_RES = &H300

.

Note that the root key should specify the registry path above where WOW6432node gets inserted, otherwise the KEY_WOW64_64 flag is ignored when used in a 32 bit application running on a 64 bit machine. So

.

Public Enum RegWow64Options As Integer

.

   KEY_WOW64_64KEY = &H100

.

   KEY_WOW64_32KEY = &H200

.

   Return OpenSubKey(Name, False, RegWow64Options.None)

.

   Return OpenSubKey(Name, Writeable, RegWow64Options.None)

.

Public Function OpenSubKey(ByVal Name As String, ByVal Writeable As Boolean, ByVal Options As RegWow64Options) As RegistryKey

.

     Options = RegWow64Options.None

.

    Public Enum RegWow64Options As System.Int32

.

    KEY_WOW64_64KEY = &H100

.

    KEY_WOW64_32KEY = &H200

.

    Public Function OpenSubKey(ByVal ParentKey As Microsoft.Win32.RegistryKey, ByVal SubKeyName As String, ByVal Writeable As Boolean, ByVal Options As RegWow64Options) As Microsoft.Win32.RegistryKey

.

        Config = OpenSubKey(Microsoft.Win32.Registry.LocalMachine, "SOFTWARE\" & BaseName, False, RegWow64Options.KEY_WOW64_64KEY)

.

    enum RegWow64Options

.

        KEY_WOW64_64KEY = 0x0100,

.

        KEY_WOW64_32KEY = 0x0200

.

    /// Open a registry key using the Wow64 node instead of the default 32-bit node.

.

    RegistryKey _openSubKey(RegistryKey parentKey, string subKeyName, bool writable, RegWow64Options options)

.

            RegistryKey software = _openSubKey(Registry.LocalMachine, "SOFTWARE", false, RegWow64Options.KEY_WOW64_64KEY);

.

            RegistryKey microsoft = _openSubKey(software, "Microsoft", false, RegWow64Options.KEY_WOW64_64KEY);

.

            RegistryKey windowsNT = _openSubKey(microsoft, "Windows NT", false, RegWow64Options.KEY_WOW64_64KEY);

.

            currentVersion = _openSubKey(windowsNT, "CurrentVersion", false, RegWow64Options.KEY_WOW64_64KEY);

.

In both cases, examples would take you to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node on 64-bit operating systems due to using RegistryView.Registry32.

.

    SE_WMIGUID_OBJECT,S E_REGISTRY_WOW64_32KEY

.

        SE_REGISTRY_WOW64_32KEY

shlwapi

9: IsOS
.

     WOW6432 = 30,

Enums

.

    ///Operation not allowed in WOW64.

.

    [Description("Operation not allowed in WOW64.")]

.

    public const int SPAPI_E_IN_WOW64 = unchecked((int)0x800F0235);

.

    '''Operation not allowed in WOW64.

.

    <Description("Operation not allowed in WOW64.")> _

.

    Public Const SPAPI_E_IN_WOW64 As Integer = CInt(&H800f0235UI)

.

    SE_REGISTRY_WOW64_32KEY

.

    SE_REGISTRY_WOW64_32KEY

Constants

.

        /// Operation not allowed in WOW64.

.

        public const int SPAPI_E_IN_WOW64 = (int)(0x800F0235 - 0x100000000);

ntdll

.

    ProcessWow64Information, // q: ULONG_PTR

.

    SystemWow64SharedInformationObsolete = 0x004A,

kernel32

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

public static extern int GetSystemWow64Directory([In, Out] char[] lpBuffer, [MarshalAs(UnmanagedType.U4)] uint size);

.

public static extern int GetSystemWow64Directory([Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder lpBuffer, [MarshalAs(UnmanagedType.U4)] uint size);

.

Private Declare Function GetSystemWow64Directory Lib "Kernel32.dll" Alias _

.

      "GetSystemWow64DirectoryA" (ByVal lpBuffer As String, ByVal uSize As Long) As Integer

.

    public static extern int GetSystemWow64Directory([In, Out] char[] lpBuffer, [MarshalAs(UnmanagedType.U4)] uint size);

.

    int result = GetSystemWow64Directory(path, (uint)path.Length);

.

    private static extern int GetSystemWow64Directory([Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder lpBuffer, [MarshalAs(UnmanagedType.U4)] uint size);

.

    if (GetSystemWow64Directory(buffer, (uint)buffer.Capacity) != 0)

.

    Private Declare Function GetSystemWow64Directory Lib "Kernel32.dll" Alias _

.

      "GetSystemWow64DirectoryA" (ByVal lpBuffer As String, ByVal uSize As Integer) As Integer

.

    Dim Result As Integer = GetSystemWow64Directory(DirPath, DirPath.Length)

.
Documentation
.
Summary
Determines whether the specified process is running under WOW64. Some WinAPI functions work differently when running through WOW64, so you will sometimes need to know if a process is under the thunking layer.
.

public static extern bool IsWow64Process(

.

     [Out, MarshalAs(UnmanagedType.Bool)] out bool wow64Process

.

public static extern bool IsWow64Process([In] IntPtr processHandle,

.

     [Out, MarshalAs(UnmanagedType.Bool)] out bool wow64Process);

.

    Public Shared Function IsWow64Process( _

.

    ByRef wow64Process As Boolean) As <MarshalAs(UnmanagedType.Bool)> Boolean

.

isWow64 = false;

.

     if (!NativeMethods.IsWow64Process(processHandle, out retVal))

.

     isWow64 = retVal;

.

Private Shared Function IsWow64() As Boolean

.

    proc = GetProcAddress(GetModuleHandle("Kernel32.dll"), "IsWow64Process")

.

    If IsWow64Process(GetCurrentProcess(), retVal) Then

.

'Uses Wow64 to see if the current process is running on Windows XP 64 bit

.

             IsWow64()

.

'Uses Wow64 to see if the current process is running on Windows Vista 64 bit

.

             (osv.dwMajorVersion = 6) And IsWow64()

.
Documentation
[IsWow64Process] on MSDN
17: WOW64
.

private static extern bool Wow64SetThreadContext(IntPtr thread, int[] context);

.

<DllImport("kernel32.dll", EntryPoint:="Wow64GetThreadContext"), SuppressUnmanagedCodeSecurity> _

.

    Private Shared Function Wow64GetThreadContext( _

.
Documentation
[Wow64SetThreadContext] on MSDN
.
Summary
Wow64DisableWow64FsRedirection disables automatic redirecton of 32-bit processes from "Windows\system32" to "Windows\SysWOW64". Use this method when you need to launch 64-bit process from 32-bit process.
.

public static extern bool Wow64DisableWow64FsRedirection(ref IntPtr ptr);

.

Declare Function Wow64DisableWow64FsRedirection Lib "kernel32.dll" (ByRef ptr As IntPtr) As Boolean

.

        bool isWow64FsRedirectionDisabled = Wow64DisableWow64FsRedirection(ref ptr);

.

        Debug.WriteLine("Is Wow64Fs Redirection disabled:\t" + isWow64FsRedirectionDisabled);

.

        if (isWow64FsRedirectionDisabled)

.

        bool isWow64FsRedirectionReverted = Wow64RevertWow64FsRedirection(ptr);

.

        Debug.WriteLine("Is Wow64Fs Redirection reverted:\t" + isWow64FsRedirectionReverted);

.
Documentation
[Wow64DisableWow64FsRedirection] on MSDN
.

public static extern bool Wow64RevertWow64FsRedirection(IntPtr ptr);

.

Declare Function Wow64RevertWow64FsRedirection Lib "kernel32.dll" (ptr As IntPtr) As Boolean

.

        bool isWow64FsRedirectionDisabled = Wow64DisableWow64FsRedirection(ref ptr);

.

        Debug.WriteLine("Is Wow64Fs Redirection disabled:\t" + isWow64FsRedirectionDisabled);

.

        if (isWow64FsRedirectionDisabled)

.

        bool isWow64FsRedirectionReverted = Wow64RevertWow64FsRedirection(ptr);

.

        Debug.WriteLine("Is Wow64Fs Redirection reverted:\t" + isWow64FsRedirectionReverted);

.

        Declare Function Wow64DisableWow64FsRedirection Lib "kernel32.dll" (ByRef ptr As IntPtr) As Boolean

.

        Declare Function Wow64RevertWow64FsRedirection Lib "kernel32.dll" (ByRef ptr As IntPtr) As Boolean

.

        Dim isWow64FsRedirectionDisabled As Boolean = Wow64DisableWow64FsRedirection(ptr)

.

        MsgBox(isWow64FsRedirectionDisabled)

.

        Dim isWow64FsRedirectionReverted As Boolean = Wow64RevertWow64FsRedirection(ptr)

.

        MsgBox(isWow64FsRedirectionReverted)

.
Documentation
[Wow64RevertWow64FsRedirection] on MSDN

 
Access PInvoke.net directly from VS: