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
search
kentico
microsoftgraph
localization
paraview
phpmyadmin
angular2-material
graphics
r-googlesheets
google-cloud-functions
iis-6
azure-container-service
recordrtc
elasticsearch-5
32bit-64bit
g++
mel
alamofire
rtf
angular-dart
naivebayes
code-generation
android-intent
cumulocity
firefox-addon
intershop
swagger-2.0
undertow
libigl
object-storage
tosca
highstock
apktool
handler
soot
mobx
dst
carriage-return
pop3
roblox
engine.io
xcode7.3
cd
xdocreport
android-augmented-reality
nohup
recurrent-neural-network
metawidget
urlsession
numberpicker
apollostack
drupal-theming
photos
flask-login
servermanager
globalize
netbeans6.8
identification
lightning
azure-cli
backbone-collections
jtree
slackware
nikeplus-api
android-dateutils
avspeechsynthesizer
kango-framework
tracker-enabled-dbcontext
redis-cluster
fuzzywuzzy
nio2
poppler
baasbox
airbrake
dnssec
snackbar
cryptographichashfunction
rapidsvn
at-job
administration
big-ip
metatrader5
nsmenu
jama
trdion2011
ignite-ui
functional-java
wxformbuilder
gtm-oauth2
kendo-dataviz
ie8-compatibility-mode
inappsettingskit
neos-server
cmmi
server-administration
cascadingdropdown
apache-abdera
asplinkbutton
sqlclr
xcode3.2
veracity
hibernateexception
convention
xcelsius
webdev.webserver
dataform
collectionviewsource
aspmenu
folding
murmurhash
spread
wordprocessingml
sun
dojo-dnd
alsb
escrow

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App