Jerry West
2008-06-18 01:49:15 UTC
My 32bit VB app needs to check for the existence of a file located in the
system32\drivers folder on a 64bit system. Because of file redirection my
app cannot see the file. I am aware of the API
Wow64DisableWow64FsRedirection. I make a call to it before checking for the
file. The call indicates success yet the file still is hidden due to
redirection. Here is a snippet of my code:
Declare Function Wow64DisableWow64FsRedirection Lib "Kernel32.dll" (ByRef
OldValue As Long) As Long
lRet& = Wow64DisableWow64FsRedirection(lOldValue&)
If gFSO.FileExists(udtCurOS.sWinSysDirUNC & "\drivers\" & sFile$) Then
DoSomething
lRet always is a non-zero value indicating success and I get a value in
lOldValue&. Yet, like I said, the call still fails when checking for the
file's existence.
Does anyone know if I'm doing this correctly? It sure appears so but I'm
baffled at this point. Any help appreciated!
JW
system32\drivers folder on a 64bit system. Because of file redirection my
app cannot see the file. I am aware of the API
Wow64DisableWow64FsRedirection. I make a call to it before checking for the
file. The call indicates success yet the file still is hidden due to
redirection. Here is a snippet of my code:
Declare Function Wow64DisableWow64FsRedirection Lib "Kernel32.dll" (ByRef
OldValue As Long) As Long
lRet& = Wow64DisableWow64FsRedirection(lOldValue&)
If gFSO.FileExists(udtCurOS.sWinSysDirUNC & "\drivers\" & sFile$) Then
DoSomething
lRet always is a non-zero value indicating success and I get a value in
lOldValue&. Yet, like I said, the call still fails when checking for the
file's existence.
Does anyone know if I'm doing this correctly? It sure appears so but I'm
baffled at this point. Any help appreciated!
JW