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

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
how to import/export dll and use its function
HELP linking library in DLL project

Categories

HOME
shell
windows
notepad++
jmeter
apache-jena
amp-html
alexa-skills-kit
interface
battery
serialization
gradient
carousel
telegram-bot
zip
opengl-3
flume
bing-maps
spin
project
gson
siddhi
frequency-distribution
shared-libraries
qsqlquery
esoteric-languages
google-container-registry
swagger-2.0
ember-cli
monit
game-theory
android-sharedpreferences
licensing
winexe
carrierwave
autodesk-designautomation
volatile
weather
gojs
hibernate-search
imx6
latitude-longitude
docfx
ideascript
xdocreport
z-notation
sim-card
jvmti
http-request
phpdbg
vaadin-elements
pom.xml
term
yii2-api
pair-programming
stdmap
qtranslate
appdomain
monkey
cpu-cache
google-photos
choice
cudd
hadoop-2.7.2
tooleap
mediametadataretriever
riot
libav
ascii-art
state-restoration
decimalformat
grgit
file-move
zen-cart
binomial-theorem
text-search
pax-exam
rdflib
j-security-check
rrule
bcache
public-html
exceldatareader
android-cookiemanager
deform
tweenlite
create.js
angular-carousel
memset
vsx
syndicationfeed
inputmismatchexception
script#
video-codecs
superscrollorama
usertype
predicatebuilder
matlab-load
exponentiation
creole
quotation-marks
dataform
msr
twitterizer
binomial-heap
hbm2java
request-headers
lxr
web-application-project
asynchronous-wcf-call
wcf-proxy

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