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

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
how to import/export dll and use its function

Categories

HOME
phpword
facebook-oauth
jpa
google-spreadsheet
case
apache-spark-mllib
gradient
yandex
parameters
vxml
echo
x264
title
barcode
mql5
g++
little-proxy
octave
commonjs
google-chrome-app
windows-ce
mxgraph
microsoft-dynamics-nav
firefox-addon
android-7.0-nougat
gmm
named-entity-recognition
ember-cli
object-storage
tiki-wiki
fable-f#
has-and-belongs-to-many
mat
calculation
scrollview
volatile
sql-server-2000
database-comparison
git-squash
playstation-portable
spring-security4
swagger-php
imagenet
reactivekit
filesystemwatcher
metawidget
cin
google-data-api
news
signals-slots
portforwarding
ssrs-2014
optimizely
term
launchctl
context-switch
cpu-cache
shinobi
reachability
atlas
dotnetnuke-7
signalr.client
jquery-jscrollpane
delta
avspeechsynthesizer
xdoclet
shopping
http-status-code-401
data-protection
hadoop-partitioning
inf
tfs-workitem
terracotta
google-books
.bash-profile
amiga
keyup
nsurlsessiondatatask
uvc
entity-framework-4.3
dbaccess
angular-gettext
post-commit-hook
formview
imagefilter
codeplex
wxformbuilder
ray
memset
authlogic
conditionaltagsupport
kendo-dataviz
cmmi
poker
facebook-timeline
node-blade
traceability
preload
resource-management
vfs
multiplexing
infobright
pinch
socketserver
metaweblog
eclipse-marketplace
strtod
dsoframer
commercial-application

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