32bit-64bit

Analyze 64-bit DLL from within T4 template in Visual Studio (32-bit) using Reflection

怎甘沉沦 提交于 2019-12-04 16:46:27
I would like to analyse a DLL from within a T4 template using Reflection, so that I can generate code based on the results of the reflection analysis. I know EnvDTE would be a better option, but this is not possible in my case for several reasons. The problem with reflection is that the DLL is a 64-bit DLL and if I load that within the T4 template I get a BadImageFormatException because I am trying to load a 64-bit DLL into a 32-bit process (Visual Studio 2012). Is there any way to analyse the contents of that DLL within T4, preferrably using reflection? I have already thought about writing a

Double multiplication differs between compile time and runtime in 32 bit platform

早过忘川 提交于 2019-12-04 16:02:14
问题 I'm compiling and running the following program in 32 and 64 bit platforms: int main() { double y = 8.34214e08; double z = 1.25823e45; return y * z == 8.34214e08 * 1.25823e45; } While in 64bit the result is the expected (the values are the same and the exit code is non-zero) in 32bit seems there is a little difference between the value calculated at compile time, the right hand side of the comparison, and the left side computed at runtime. Is this a bug in the compiler or there is a logical

Detect CPU Architecture (32-bit / 64-bit) runtime in Objective C (Mac OS X)

耗尽温柔 提交于 2019-12-04 15:04:59
I'm currently wring a Cocoa application which needs to execute some (console) applications which are optimized for 32 and 64 bit. Because of this I would like to detect what CPU architecture the application is running on so I can start the correct console application. So in short: how do I detect if the application is running on a 64 bit OS? Edit: I know about the Mach-O fat binaries, that was not my question. I need to know this so I can start another non bundled (console) application. One that is optimized for x86 and one for x64 . There is a super-easy way. Compile two versions of the

launching correct installer for 32 and 64-bit apps

我的未来我决定 提交于 2019-12-04 13:35:46
We have an application which, for various reasons, needs to be compiled as both a 32-bit and 64-bit app. The thing is, we want to distribute both setup files (msi) on a single CD. Is there a launch condition or autorun.inf entry that we can use to know which setup.exe to launch? Or do we need to write a separate little exe that gets called by autorun, and which determines the OS, and calls the appropriate setup.exe? There does not appear to be any 32/64bit detection support inherent in autorun.inf files . The convention that most applications which supply a 32 and 64 bit MSI follow is similar

How to know if your .ipa is 64-Bit

大憨熊 提交于 2019-12-04 12:27:13
I've built an .ipa file with following flags armv7 armv7s and arm64. Is there any way/ tool through which i can make sure the .ipa does have the 64-Bit support? How does apple find out during app submission if the app binary does have 64-Bit support. One of the options is to use lipo -info %path-to-executable% make sure you are not using path to .app folder or .ipa archive. I have created a script that takes .ipa file as an input and returns what architecture the app supports - (replace and with yours) ORIGINAL_FILE="<file path>" FILE_NAME=$(basename $ORIGINAL_FILE) EXPANDED_DIR="/Users/

Why do I get nonsense from GetModuleFileNameEx on 64-bit Windows 8?

拈花ヽ惹草 提交于 2019-12-04 11:49:02
I have this function NazwaProcesu(const uchwyt: Thandle): string; var pid: DWORD; hProcess: Thandle; sciezka: array [0..MAX_PATH - 1] of char; begin GetWindowThreadProcessId(uchwyt, pid); hProcess := OpenProcess(PROCESS_QUERY_INFORMATION or PROCESS_VM_READ, FALSE, pid); if hProcess <> 0 then try GetModuleFileNameEx(hProcess, 0, sciezka, MAX_PATH) finally Result := sciezka; CloseHandle(hProcess); end; end; On windows 7 32 bit no problems. On Win 8 x64 i have this: where last 3 entries should be explorer.exe, i guess. Thanks for help. As far as I am aware, this approach will fail to retrieve 64

Differences between compiling for i386 vs x86_64 in Xcode?

倖福魔咒の 提交于 2019-12-04 11:42:34
问题 What are the differences between compiling a Mac app in Xcode with the Active Architecture set to i386 vs x86_64 (chosen in the drop down at the top left of the main window)? In the Build settings for the project, the Architecture options are Standard (32/64-bit Universal), 32-bit Universal, and 64-bit Intel. Practically, what do these mean and how does one decide? Assume one is targeting OS X 10.5 and above. I see in the Activity Monitor that compiling for x86_64 results in an app that uses

How to use #if to decide which platform is being compiled for in C#

南笙酒味 提交于 2019-12-04 11:26:10
问题 In C++ there are predefined macros: #if defined(_M_X64) || defined(__amd64__) // Building for 64bit target const unsigned long MaxGulpSize = 1048576 * 128;// megabyte = 1048576; const unsigned long MaxRecsCopy = 1048576 * 16; #else const unsigned long MaxGulpSize = 1048576 * 8;// megabyte = 1048576; const unsigned long MaxRecsCopy = 1048576; #endif Which allows me to set constants to control the amount of memory that will be used. Of course I can define a preprocessor variable verbatim:

MSBuild and $(ProgramFiles) issue with 32/64 bits

一笑奈何 提交于 2019-12-04 10:34:53
问题 I wrote a custom MSBuild task which calls SubWCRev.exe , an executable which (typically) resides in C:\Program Files\TortoiseSVN\bin , whether it's 32 or 64 bits, since TortoiseSVN provides both versions. The problem is, Visual Studio 2010 only has a 32 bit version. So when my colleagues with a 64 bit box try to build using my shiny new task, $(ProgramFiles) resolves to C:\Program Files(x86) and it explodes saying that SubWCRev.exe cannot be found. Because they have the 64 bit version of

Running 32bit eclipse with 32bit jvm on windows 64bit

我的梦境 提交于 2019-12-04 10:16:53
One of the .jar files I am using only works with the 32-bit java virtual machine on windows. I installed the 32bit versions of eclipse and the jdk but it is still getting the same error. What commands would I use in the run configuration to specify 32-bit virtual machine for running the application that uses this .jar file? -vm C:\Program Files (x86)\Java\jre6\bin\javaw.exe doesn't work. Any ideas? There are TWO JVM's in action when developing with Eclipse. One running Eclipse itself, and the other one used for your program. Unless you are talking about a plugin, it is the latter you need to