32bit-64bit

Utilizing a 32-bit DLL in a 64-bit process via COM

血红的双手。 提交于 2019-12-17 19:24:03
问题 So some time ago I was investigating an issue that I knew would be coming up soon. We have a DLL that links to 32-bit versions of a certain library. There is no x64 version of this library available to us and we have no practical options in regards to replacing it. When I performed this initial investigation I found an article or two describing a method by which a 64-bit process can utilize a 32-bit DLL (Windows) via a COM "server". Unfortunately I lost the links I had saved and I have now

How can I determine the Windows version from a VB 6 app?

╄→尐↘猪︶ㄣ 提交于 2019-12-17 18:37:44
问题 I want to detect any Windows versions from 95 to Win 7. I also would like to display if the OS is 32-bit or 64-bit. That's it; it's that simple. :) What code could I use to do this from within a VB 6 application? 回答1: Update: For code that correctly detects Windows 8.1 and Windows 10, see this answer. The code below still works fine for older versions of Windows, but it will report anything newer than Windows 8 as being Windows 8. The "bitness" testing code shown at the bottom (to see if the

What causes System.BadImageFormatException when constructing System.Data.SQLite.SQLiteConnection

筅森魡賤 提交于 2019-12-17 18:33:07
问题 I've broken the code down to the smallest possible statement: Dim cn As System.Data.SQLite.SQLiteConnection And I get the following error when calling the code from a WinForm applicaiton: System.BadImageFormatException: Could not load file or assembly 'System.Data.SQLite, Version=1.0.65.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. An attempt was made to load a program with an incorrect format. File name: 'System.Data.SQLite, Version=1.0.65.0, Culture

printf with sizeof on 32 vs 64 platforms: how do I handle format code in platform independent manner?

瘦欲@ 提交于 2019-12-17 18:23:56
问题 I have some code that prints the amount of memory used by the program. The line is similar to this: printf("The about of RAM used is %u", anIntVariable*sizeof(double) ); where anIntVariable is an int variable for the number of elements of the double array. Anyhow, on 32-bit systems I never had any problems but on 64-bit systems, I get a compiler warning about using "%u" for a unsigned long integer. Using "%lu" as the format code fixes the problem on 64-bit but causes the compiler to complain

Convert from 64bit number to 32bit number

孤者浪人 提交于 2019-12-17 17:05:26
问题 Trying a lot and just failing.. $x = 76561198005785475; I want to this number, turn into this: $y = 45519747; That is the 32bit form of it. Trying to explain with more details: http://www.tonymarston.net/php-mysql/converter.php 1) Put the value 76561198005785475 on the "Decimal (input)" field. 2) Press "DEC to BIN" on the "Binary (Base 2)" field. 3) Count 32 starting from the RIGHT and copy it. 4) Paste the 32 chars binary number on "Binary (Base 2)" field. 5) Press "Bin to Dec" button on the

portable way to deal with 64/32 bit time_t

两盒软妹~` 提交于 2019-12-17 16:32:54
问题 I have some code which is built both on Windows and Linux. Linux at this point is always 32bit but Windows is 32 and 64bit. Windows wants to have time_t be 64 bit and Linux still has it as 32 bit. I'm fine with that, except in some places time_t values are converted to strings. So when time_T is 32 bit it should be done with %d and when it is 64bit with %lld... what is the smart way to do this? Also: any ideas how I may find all places where time_t's are passed to printf-style functions to

What does the Python version line mean?

好久不见. 提交于 2019-12-17 16:31:54
问题 What does the line that's displayed when you start an instance of the Python interpreter mean? Python 2.7 (r27:82525, Jul 4 2010, 07:43:08) [MSC v.1500 64 bit (AMD64)] on win32 So I know I have Python 2.7, but what about the rest? Especially confusing to me are the 64 bit (AMD64) on win32 and r27:82525 sections. 回答1: That line you see indicates how the python interpreter was built. Breaking it down: Python 2.7 -- Python version (r27:82525, Jul 4 2010, 07:43:08) -- The build date and revision

CentOS 64 bit bad ELF interpreter

自古美人都是妖i 提交于 2019-12-17 10:07:37
问题 I have just installed CentOS 6 64bit version, I'm trying to install a 32-bit application on a 64-bit machine and got this error: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory I'm new to linux. How do I resolve this? 回答1: You're on a 64-bit system, and don't have 32-bit library support installed. To install (baseline) support for 32-bit executables (if you don't use sudo in your setup read note below) Most desktop Linux systems in the Fedora/Red Hat family: pkcon install

how to stop xcode5.1 building for 64bit

你说的曾经没有我的故事 提交于 2019-12-17 08:51:26
问题 I just updated to xcode 5.1 - apple decided to make all apps compile to 64bit by default - My app has some legacy code and I spent the last couple of hours figuring out how to STOP Xcode building for 64bit. Thought this might help people with the same problem... See the accepted answer for a clearer visual walk thought (my original text based answer...) In Targets-->Build Settings-->Architectures-->Architectures select other delete (press '-') $(ARCH_STANDARD) add (press '+') armv7 add (press

how to stop xcode5.1 building for 64bit

女生的网名这么多〃 提交于 2019-12-17 08:51:06
问题 I just updated to xcode 5.1 - apple decided to make all apps compile to 64bit by default - My app has some legacy code and I spent the last couple of hours figuring out how to STOP Xcode building for 64bit. Thought this might help people with the same problem... See the accepted answer for a clearer visual walk thought (my original text based answer...) In Targets-->Build Settings-->Architectures-->Architectures select other delete (press '-') $(ARCH_STANDARD) add (press '+') armv7 add (press