32bit-64bit

Warning C4267 'argument': conversion from 'size_t' to 'DWORD', possible loss of data

徘徊边缘 提交于 2019-12-12 19:09:16
问题 I am migrating code from 32bit vs2012 to 64bit vs2015. I encountered the following function call in my program: CryptHashData(hHash, (BYTE*)AUTH_ENCRYPTION_KEY, wcslen(AUTH_ENCRYPTION_KEY) * sizeof(wchar_t), 0u)) whose declaration is in wincrypt.h located in c:\Program Files (x86)\Windows Kits\8.0\Include\um\wincrypt.h (looks like not to be edited). The declaration is: WINADVAPI BOOL WINAPI CryptHashData( _In_ HCRYPTHASH hHash, _In_reads_bytes_(dwDataLen) CONST BYTE *pbData, _In_ DWORD

x86 console application doesn't run on 64bit machines except in debugger

随声附和 提交于 2019-12-12 18:17:32
问题 In order to get a better hold on my question NUnit: Could not load file or assembly 'some.dll' or one of its dependencies. The specified module could not be found I tried to reduce complexity by getting rid of NUnit. Now I wrote a plain console application (C#) which interacts with a c++/cli wrapper which does calls on company framework c++ dlls. Dumpbin says that all assemblies are 32bit. Visual Studio has console application and wrapper set to x86. On x86 machines console application works

Create an msi package which installs both 32-bit and 64-bit resources on a machine

☆樱花仙子☆ 提交于 2019-12-12 16:25:03
问题 I need to create an MSI package which installs both 32-bit and 64-bit .dll files of a firebreath based plugin on a machine. What I want to achieve is have both resources installed and use the one suitable depending on the Browser (32-bit or 64-bit). For instance, if I have a 64-bit machine with Windows, Chrome 64-bit and Firefox 32-bit; I want to be able to use my plugin from both browsers. To do so, I am using Visual Studio 2008 and Wix. Up to now I was able to create a 32-bit .dll which is

C# program and C++ DLL compiled for 32-bit system crash on 64-bit system

99封情书 提交于 2019-12-12 13:45:23
问题 I have a C# application that makes use of a DLL as I need C++ to access some unmanaged functionalities of the user32 API (I cannot use PInvoke for that). I compile both the application and the DLL for x86 architectures, and everything works fine on Windows 7 32 bits. Now the problem is, on Windows 7 64 bits, the application crashes when I try to use the feature that relies on the DLL (but all the rest works fine). I suspect that this is a 32/64 bits issue, so I tried re-compiling the DLL for

How can elusive 64-bit portability issues be detected?

十年热恋 提交于 2019-12-12 12:09:16
问题 I found a snippet similar to this in some (C++) code I'm preparing for a 64-bit port. int n; size_t pos, npos; /* ... initialization ... */ while((pos = find(ch, start)) != npos) { /* ... advance start position ... */ n++; // this will overflow if the loop iterates too many times } While I seriously doubt this would actually cause a problem in even memory-intensive applications, it's worth looking at from a theoretical standpoint because similar errors could surface that will cause problems.

Debug 32 bit application with gdb in 64 bit environment

会有一股神秘感。 提交于 2019-12-12 10:37:06
问题 Is there any specific step required to debug 32 bit application with 64 bit gdb under 64 bit O.S. Normally I use -m32 switch for gcc, is there something like for gdb? 回答1: No: 64-bit GDB can debug either 32 or 64-bit processes. This message warning: the debug information found in "/lib/ld-2.11.1.so" does not match "/lib/ld-linux.so.2" (CRC mismatch) simply means that your installed libc-debuginfo package does not match your installed libc package, and that you will not be able to do source

How to know if your .ipa is 64-Bit

人盡茶涼 提交于 2019-12-12 08:57:27
问题 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. 回答1: 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. 回答2: I have created a script that takes .ipa file as an input and returns what architecture the app supports -

Algorithm C/C++ : Fastest way to compute (2^n)%d with a n and d 32 or 64 bit integers

余生长醉 提交于 2019-12-12 07:49:42
问题 I am searching for an algorithm that allow me to compute (2^n)%d with n and d 32 or 64 bits integers . The problem is that it's impossible to store 2^n in memory even with multiprecision libraries, but maybe there exist a trick to compute (2^n)%d only using 32 or 64 bits integers. Thank you very much. 回答1: Take a look at the Modular Exponentiation algorithm. The idea is not to compute 2^n . Instead, you reduce modulus d multiple times while you are powering up. That keeps the number small.

How to determine if compiling for 64-bit iOS in Xcode

拥有回忆 提交于 2019-12-12 07:44:44
问题 Consider the following function CGSize CGSizeIntegral(CGSize size) { return CGSizeMake(ceilf(size.width), ceilf(size.height)); } CGSize actually consists of two CGFloat s, and CGFloat 's definition changes depending on the architecture: typedef float CGFloat;// 32-bit typedef double CGFloat;// 64-bit So, the above code is wrong on 64-bit systems, and needs to be updated with something like CGSize CGSizeIntegral(CGSize size) { #if 64_bit return CGSizeMake(ceil(size.width), ceil(size.height));

NUnit “missing” GPSVC.DLL on Windows 7/64

陌路散爱 提交于 2019-12-12 07:10:04
问题 I recently upgraded from Vista/32 to Win7/64. On my old machine, everything was working fine. Unfortunately, on my new machine NUnit won't load my unit tests, with the error message "System.IO.FileNotFoundException: Could not load file or assembly 'UnitTest' or one of its dependencies. The system cannot find the file specified" . (Actually, I had to go through all of my solution's projects and set them to 32-bit to get this far.) So I loaded up Dependency Walker, and it told me that I was