32bit-64bit

How to retrieve correct path of either system32 or SysWOW64?

送分小仙女□ 提交于 2019-12-18 08:54:35
问题 I have a 32-bit process that can run either in 32-bit or 64-bit Windows. So, naturally, if the process tried to access the file c:\windows\system32\file.ext , it would be redirected to c:\windows\SysWOW64\file.ext . So far so good - I don't want to disable the redirection. My problem is that my process doesn't actually access the file - instead it just takes its path and writes it into a text file , and I want that text file to read SysWOW64 on a 64-bit system, and system32 on a 32-bit system

Using 32-bit dll on 64-bit system shows 0x8007000B Error

北城余情 提交于 2019-12-18 07:46:40
问题 I have to use a third party DLL in my application. The DLL is a 32-bit and the system I am using is 64-bit OS. I have Imported the 32-bit DLL in my DotNet application (framework-4.5) as below [DllImport("Sample.dll", EntryPoint = "Add", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern int Add(int iA, int iB); In IIS 7.5 - I have set "Enable 32-bit Application" as "True". And also tried setting the Compiler Manager as - X86, x64 and Any CPU. But all

Should I use 'long' instead of 'int' on 64-bits in langs with fixed type size (like Java, C#)

耗尽温柔 提交于 2019-12-18 07:37:48
问题 In 10, or even 5 years there will be no [ Edit2: server or desktop] 32-bit CPUs. So, are there any advantages in using int (32bit) over long (64bit) ? And are there any disadvantages in using int ? Edit: By 10 or 5 years I meant on vast majority of places where those langs are used I meant which type to use by default . This days I won't even bother to think if I should use short as cycle counter, just for(int i... . The same way long counters already win registers are already 64-bit, there

Wow64DisableWow64FsRedirection on 32-bit Windows XP

佐手、 提交于 2019-12-18 06:56:07
问题 I'm writing a program in Visual Studio C++ which needs to run natively as a 32-bit process on any computer running Windows XP 32-bit, or any later Windows operating system. This program needs to be able to access the C:\Windows\system32\ folder on a computer, regardless of whether the program is running on a 64-bit or 32-bit system. To do this, I was using Wow64DisableWow64FsRedirection to disable the redirection that Windows typically does to 32-bit processes, sending them to C:\Windows

urlmon.dll FindMimeFromData() works perfectly on 64bit desktop/console but generates errors on ASP.NET

不羁岁月 提交于 2019-12-18 04:03:22
问题 I am creating a library of utilities to be used both in desktop environment in a web environment. It contains several features that I believe are often repeated in my applications, including utility to get the mime type of a file by its content (not the extension). The files that I'll have to check are the most common (jpg, png, pdf, txt) so I chose to use the external method FindMimeFromData (link above) Using .NET, how can you find the mime type of a file based on the file signature not the

How can I read 64-bit registry key from a 32-bit process?

不想你离开。 提交于 2019-12-18 03:41:53
问题 I've been using the value of key MachineGuid from HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography to uniquely identify hosts, but from 32-bit processes running on 64-bit computers, the value appears to be missing. I guess it's searching under Wow6432Node, where it is indeed missing. According to this you should be able to get to the right key by adding a flag, but below code still doesn't appear to do the job. What am I missing? const KEY_WOW64_64KEY=$0100; var r:HKEY; s:string; i,l

How can I read 64-bit registry key from a 32-bit process?

久未见 提交于 2019-12-18 03:41:36
问题 I've been using the value of key MachineGuid from HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography to uniquely identify hosts, but from 32-bit processes running on 64-bit computers, the value appears to be missing. I guess it's searching under Wow6432Node, where it is indeed missing. According to this you should be able to get to the right key by adding a flag, but below code still doesn't appear to do the job. What am I missing? const KEY_WOW64_64KEY=$0100; var r:HKEY; s:string; i,l

What are the lower level advantages and disadvantages of 64-bit/32-bit?

与世无争的帅哥 提交于 2019-12-18 00:36:10
问题 I'm sure we've all heard the terms 64bit and 32bit thrown around, but what do they actually mean? I'm pretty sure they have to do with the size of a memory address. On a 64bit machine, a reference to an object is 64 bits. But I want to dig a little deeper.... One often hears the phrase "64bit machine." What part of the computer is actually geared toward the number of bits? Processor? Operating System? What is the advantage of having larger memory addresses? I could add more questions, but I

possible to force a 64-bit JVM to use 32-bit mode via the argument “-d32”?

依然范特西╮ 提交于 2019-12-17 23:38:31
问题 so I have some 3rd party native library that works only in 32 bit JVM across windows,osx,linux and I need to always enforce the java application to run in 32 bit JVM mode. What about if the target system only has 64-bit JVM installed, would it be possible to force it to run the java application in 32 bit mode? 回答1: No. The preconditions that you specified prohibit (okay, I'm precluding the bundle-the-JVM solution and install-the-JVM solution) the application from running in a 32-bit JRE. If

strcmp behaviour in 32-bit and 64-bit systems

我只是一个虾纸丫 提交于 2019-12-17 21:32:59
问题 The following piece of code behaves differently in 32-bit and 64-bit operating systems. char *cat = "v,a"; if (strcmp(cat, ",") == 1) ... The above condition is true in 32-bit but false in 64-bit. I wonder why this is different? Both 32-bit and 64-bit OS are Linux (Fedora). 回答1: The strcmp() function is only defined to return a negative value if argument 1 precedes argument 2, zero if they're identical, or a positive value if argument 1 follows argument 2. There is no guarantee of any sort