Usually programs written in VB can run normally on 32-bit systems, but on 64-bit systems they can run but cannot modify OEM information. After searching for the reason, we can find that when we access the folder "SYSTEM32", the system will automatically redirect to the folder "SYSWOW64". When we access certain registry keys, similar to file redirection, the system will also redirect Automatically redirect program access to Wow6432Node.
Let’s talk about the file system redirection first. I looked up some information and there is no VB-related information, but I can find two related functions: Wow64DisableWow64FsRedirection (turn off system redirection) and Wow64RevertWow64FsRedirection (turn on system redirection).
VB's statement is as follows:
Private Declare Function Wow64RevertWow64FsRedirection Lib "kernel32.dll" ()Private Declare Function Wow64DisableWow64FsRedirection Lib "kernel32.dll" ()
Then use the CALL Wow64DisableWow64FsRedirection statement to turn off file system redirection.
Let’s talk about the steering of registry keys:
There is still no VB information on this, but I know that there is a function RegOpenEx (VB has this function, see the API browser for usage) that can decide whether to redirect. Just add 256 (&H100) to the samDesired [Long] parameter of the function to access 64-bit of the registry. Since there are a lot of API access registry codes, I won’t post them here.