dllimport


WOW64 Redirection and LoadLibrary


I'm trying to build a 32-bit program that can run correctly on 64-bit Windows; that is, if it needs to open a text file for the user, the file needs to not be redirected from C:\Program Files to C:\Program Files (x86). However, if I just call Wow64DisableWow64FsRedirection, then my program fails to load at all because some system libraries call LoadLibrary when portions of the GUI are loading, which tries to load a 64-bit version of a system DLL into my program.
How do I solve this problem?
Edit:
See the problem in the screenshot below:
Edit 2:
Here's another question that'll solve the problem: Is there any way to disable WOW64 redirection for an arbitrary thread in your process, or for your process as a whole?
Easy, call Wow64DisableWow64FsRedirection just before you call CreateFile, and then call Wow64RevertWow64FsRedirection just as soon as it is done.

Related Links

DllImport is not found C++
Mangled member function name different during dllimport
how to use DllImport in metro-style app
Converting doc file to post script
How can I get a COM component which can be used on Windows phone 8 project with C#
Externs and DLL imports
Mixed native and managed code heap corruption
MarshalDirectiveException
call unmanaged C++ code from C# using pinvoke
Detecting DLL Code Splicing
WOW64 Redirection and LoadLibrary
Using C# dll in Windows phone 7
Python 2.5 Import dll AttributeError
Replacing the Import Table in PE file by standart LoadLibrary
Unresolved external symbol
Declare and <DllImport> in VB.NET have different results

Categories

HOME
hyperlink
mjml
swt
requirements
tivoli
rds
interpolation
bookmarks
pearson-correlation
commonjs
fhir
plist
ycsb
rtf
google-form
pybossa
flatpak
oledb
asp.net-core-webapi
articulate-storyline
blade
displaytag
direct3d11
ckfinder
fable-f#
bulletphysics
flooding
entity-relationship-model
gp
realm-mobile-platform
deltaspike
android-sugarorm
code-snippets
card.io
hard-drive
hivemq
reason
android-augmented-reality
gdata
health-monitoring
demo
spring-mvc-test
azure-arm
wmp
print-css
drupal-theming
berkeley-db-je
stylecop
libgphoto2
proget
zenhub
carrot2
java-6
backbone-collections
edit
mach-o
pocketsphinx-android
atlas
pytables
watch-os-2
signalr.client
x-tag
boost-serialization
np-spring
realsense
toast
vhosts
java-money
rubaxa-sortable
evolus-pencil
zscript
dronekit-android
airbrake
google-refine
shopizer
broadband
gamekit
metatrader5
rmysql
lambda-architecture
menubar
koala
qscrollarea
ora-06550
http-patch
rolify
traceability
cascadingdropdown
idn
zope.interface
rmiregistry
mapping-by-code
oracle-enterprise-linux
azman
android-holo-everywhere
cgbitmapcontextcreate
nhprof
folding
interop-domino
asynchronous-wcf-call
firefox-3
pbcopy

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App