Sign in to follow this  
Followers 0
Ackwell

@SystemDir incorrect on X64 in 64-bit mode

7 posts in this topic

Hi,

On X64 systems the @SystemDir macro delivers C:\Windows\system32 instead of C:\Windows\SysVow64 when compiled in 64-bit mode.

I tried it both with AutoIt 3.3.4.0 and 3.3.5.1 beta.

Regards,

Ackwell

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Share this post


Link to post
Share on other sites

I guess the macro result is correct:

http://msdn.microsoft.com/en-us/library/aa384187%28VS.85%29.aspx

"The %windir%\System32 directory is reserved for 64-bit applications. Most DLL file names were not changed when 64-bit versions of the DLLs were created, so 32-bit versions of the DLLs are stored in a different directory. WOW64 hides this difference using a file system redirector."

As I understand system32 contains 64bit dlls and 32bit calls are redirected to SYSWOW64... but sounds strange to me too :D...

Share this post


Link to post
Share on other sites

OK, thanks a lot for your quick and friendly replies. I really didn't know that and yes, it appears quite strange to me, too.

Regards

Ackwell

Share this post


Link to post
Share on other sites

The reason the redirection is in place is that for years people have been using dlls with 32 in the name. For whatever reason Microsoft added these, it has now become a problem because everyone needs to use things like shell32 or kernel32. By making it automatically jump to the new files, that provides a cushion for the old programs to still run.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Of course I see the necessity for the redirection… but why not just create a sytem64 directory for 64bit and let 32bit stay in system32? If the redirection mechanism can capture the calls by process architecture, sure that would’ve been a more logical way then putting 32bit dlls in a dir called SysWOW64 and 64bit dlls in the system32.

Edit: Hmmm, one reason might be that the redirection has an impact on the overall performance and MS thinks most programs run on 64bit machines are 64bit... but I fear that's not nearly true looking on the processes in my taskmanager :D...

Edited by KaFu

Share this post


Link to post
Share on other sites

The real problem is that there is no easy bridge between 32 bit and 64 bit applications. If everything were compiled to match the OS, there wouldn't be any need for redirection.

That's what I like about being able to compile programs from source...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0