32bit-64bit

Calling function from 64bit app from a 32bit dll

混江龙づ霸主 提交于 2019-12-08 01:31:29
I have a 32bit dll (no source code) that I need to access from 64bit C# application. I've read this article and took a look into the corresponding code from here . I've also read this post. I'm not sure that I'm asking the right question, so please help me. There are 3 projects: dotnetclient , x86Library and x86x64 . The x86x64 has x86LibraryProxy.cpp which loads the x86library.dll and calls the GetTemperature function: STDMETHODIMP Cx86LibraryProxy::GetTemperature(ULONG sensorId, FLOAT* temperature) { *temperature = -1; typedef float (__cdecl *PGETTEMPERATURE)(int); PGETTEMPERATURE pFunc;

From a programming point of view, what does it mean when a program is 32 or 64 bit?

南笙酒味 提交于 2019-12-08 01:01:24
问题 I'm a beginner programmer in my first year of Computer Science. I'm curious about the 32 bit and 64 bit systems, and how it affects developing software. When I download software I need to choose between the two, while other software only has a 32 bit version. Are there different ways of programming for a 64 bit system? Is it compiled in the same way? What are the main benefits of a separate 64 bit app? Cheers 回答1: Generally speaking the main benefit of 64 bit application is that it has access

Double-precision operations: 32-bit vs 64-bit machines

坚强是说给别人听的谎言 提交于 2019-12-07 23:31:34
问题 Why don't we see twice better performance when executing a 64-bit operations (e.g. Double precision operation) on a 64-bit machine, compared to executing on a 32-bit machine? In a 32-bit machine, don't we need to fetch from memory twice as much? more importantly, dont we need twice as much cycles to execute a 64-bit operation? 回答1: “64-bit machine” is an ambiguous term but usually means that the processor's General-Purpose Registers are 64-bit wide. Compare 8086 and 8088, which have the same

Mixing 32 and 64-bit Libraries in Linux (gcc)

瘦欲@ 提交于 2019-12-07 21:44:47
问题 I have a 32-bit binary-only C .so (provided by a vendor) built for Linux (using gcc), that I need to link to a 64-bit C/C++ application (which I am developing). Is there any way to access this library from my application? I know there will need to be care taken to handle arguments and pointers to functions inside the .so, and I know that long ago it was deemed basically impossible (like this post). I'm hoping the situation has changed. 回答1: It might be possible to hack together some assembler

InputManager plug-ins in Snow Leopard (OS X 10.6)

做~自己de王妃 提交于 2019-12-07 20:03:23
问题 I'm getting conflicting reports from various places. Engadget's review says InputManager plug-ins being completely ignored (and causing strange behaviour if the application is loaded in 32-bit mode), but this mailing list thread says they will work if the 32/64-bit compatibility is right. So I have two questions: Do we get to use InputManagers in Snow Leopard? If yes, will it work the same way as in Leopard. And if no, what is good a workaround (because 1Password is apparently working on a

32bit to 64bit inline assembly porting

强颜欢笑 提交于 2019-12-07 18:35:38
问题 I have a piece of C++ code (compiled with g++ under a GNU/Linux environment) that load a function pointer (how it does that doesn't matter), pushes some arguments onto the stack with some inline assembly and then calls that function, the code is like : unsigned long stack[] = { 1, 23, 33, 43 }; /* save all the registers and the stack pointer */ unsigned long esp; asm __volatile__ ( "pusha" ); asm __volatile__ ( "mov %%esp, %0" :"=m" (esp)); for( i = 0; i < sizeof(stack); i++ ){ unsigned long

Ubuntu : dpkg --add-architecture i386 throwing error --add-architecture unknown option

 ̄綄美尐妖づ 提交于 2019-12-07 13:30:51
问题 I want to enable extra architecture (of 32-bit) in my 64 bit machine . I did dpkg --print-architecture to know the already known architecture i.e.amd64 . After that I did dpkg --print--foreign-architectures and got the result as i386(I want to enable this) . But when i typed dpkg --add-architecture i386 , it is throwing an error saying that unknown option -add-architecture ? Please suggest some solutions for this . I refer this link by the way : https://wiki.debian.org/Multiarch/HOWTO 回答1:

gfortran: compiling 32-bit executable in 64-bit system

帅比萌擦擦* 提交于 2019-12-07 12:53:55
问题 I'm running Ubuntu 12.10 (64-bit), with Linux kernel 3.5.0-51-generic, on an AMD Athlon(tm) 64 X2 Dual Core Processor 5200+ ×2. I have GNU Fortran (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2. I'm trying to compile some code into a 32-bit executable. I've checked that all the needed libraries are installed on my system (I ran ldd on a program previously compiled on a 32-bit computer, and downloaded the missing packages). I tried running $ gfortran foo.f -m32 -L/lib/i386-linux-gnu, but I get the

Change 64bit Registry from 32bit Python

余生长醉 提交于 2019-12-07 11:32:11
问题 I am having difficulty do understand this. If I'm correct, A 32bit Python can't run a code and change registry values in 64bit. Do I get it right? Or is there a switch to turn on in which enables this functionality? There is this: http://msdn.microsoft.com/en-us/library/aa384129%28v=VS.85%29.aspx But how do I use it with the following code? http://www.blog.pythonlibrary.org/2010/03/20/pythons-_winreg-editing-the-windows-registry/ Thanks, Oz 回答1: As the MSDN article you linked to explains,

Issue running 32-bit executable on 64-bit Windows

China☆狼群 提交于 2019-12-07 10:40:59
问题 I'll add 500 of my own rep as a bounty when SO lets me. I'm using wkhtmltopdf to convert HTML web pages to PDFs. This works perfectly on my 32-bit dev server [unfortunately, I can't ship my machine :-p ]. However, when I deploy to the web application's 64-bit server the following errors are displayed: (running from cmd.exe) C:\>wkhtmltopdf http://www.google.com google.pdf Loading pages (1/5) QFontEngine::loadEngine: GetTextMetrics failed () ] 10% QFontEngineWin: GetTextMetrics failed ()