32-bit

Create 64 bit registry key (non-WOW64) from a 32 bit application

北城余情 提交于 2019-11-30 05:51:49
问题 I have a Visual Studio installer that is creating some registry keys: HKEY_LOCAL_MACHINE\SOFTWARE\MyApp but the registry keys it is creating are automatically appearing under Wow6432Node: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyApp How do I ignore the Wow6432Node when creating registry keys in my C# code being executed by the msi? 回答1: Just FYI, .NET 4.0 supports this natively. Example: RegistryBase = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64); You can then

Why does BinaryReader.ReadUInt32() reverse the bit pattern?

蹲街弑〆低调 提交于 2019-11-30 04:03:32
问题 I am trying to read a binary file with the BinaryReader class, and I need to read it in as blocks of UInt32, and then do some bit shifting etc. afterwords. But, for some reason bit order is reversed when I use the ReadUInt32 method. If I for example have a file where the first four bytes looks like this in hex, 0x12345678 , they end up like this after being read by ReadUInt32: 0x78563412 . If I use the ReadBytes(4) method, I get the expected array: [0x00000000] 0x12 byte [0x00000001] 0x34

How do I compile and link a 32-bit Windows executable using mingw-w64

我只是一个虾纸丫 提交于 2019-11-29 21:28:57
I am using Ubuntu 13.04 and installed mingw-w64 using apt-get install mingw-w64 . I can compile and link a working 64-bit version of my program with the following command: x86_64-w64-mingw32-g++ code.cpp -o app.exe Which generates a 64-bit app.exe file. What binary or command line flags do I use to generate a 32-bit version of app.exe? Alexander Shukaev That depends on which variant of toolchain you're currently using. Both DWARF and SEH variants (which come starting from GCC 4.8.0) are only single-target. You can see it yourself by inspecting the directory structure of their distributions, i

What is the difference between a 32-bit and 64-bit processor?

三世轮回 提交于 2019-11-29 19:32:52
I have been trying to read up on 32-bit and 64-bit processors ( http://en.wikipedia.org/wiki/32-bit_processing ). My understanding is that a 32-bit processor (like x86) has registers 32-bits wide. I'm not sure what that means. So it has special "memory spaces" that can store integer values up to 2^32? I don't want to sound stupid, but I have no idea about processors. I'm assuming 64-bits is, in general, better than 32-bits. Although my computer now (one year old, Win 7, Intel Atom) has a 32-bit processor. All calculations take place in the registers. When you're adding (or subtracting, or

'Microsoft.ACE.OLEDB.12.0' 64x Sql Server and 86x Office?

做~自己de王妃 提交于 2019-11-29 15:17:55
问题 The error: OLE DB provider 'Microsoft.ACE.OLEDB.12.0' cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode. And the answers I'm seeing is a conflict between 64 bit Sql Server and 32 bit Office. Is there a way to run an openrowset on Excel into Sql Server? insert into dbo.FiscalCalendar select * from openrowset('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0 Xml;Database=C:\Users\uname\Desktop\fy11.xlsx;', 'Select * from [Sheet1]') 回答1: ..

Is there any way to execute 64-bit programs on a 32-bit computer?

孤街醉人 提交于 2019-11-29 13:41:22
Just a simple question: Is there any way to run a program compiled under a 64 bit Windows environment (with mingw64) on a 32 bit machine? Any DLL or any compatibility layer which I can use? If you are talking about a 32-bit processor, then no. But if you are running a 32-bit OS on 64-bit hardware, then you can do it with VMWare. A 64-bit guest can run on a 32-bit host, if the hardware supports it. Bochs should do the trick, but you'd need another copy of Windows to run in the virtual machine. (Some editions of Windows include additional licenses for virtual machines, so you might be in luck.)

Determining 64-bit vs. 32-bit Windows

感情迁移 提交于 2019-11-29 13:26:12
问题 I'd like to configure visual studio 2005 to copy .dll's based on whether the OS is 64-bit or 32-bit during a build. I do not want to specify what the platform target is. My first attempt was to use a batch file to lookup the Windows version, but some 32-bit and 64-bit versions of Windows share the same version number. Anyone know of any way to check this? Thanks! 回答1: You should be able to read the environment variable %PROCESSOR_ARCHITECTURE%. Here is some great information on it. http:/

How to count leading zeros in a 32 bit unsigned integer [closed]

亡梦爱人 提交于 2019-11-29 13:03:58
问题 Could anyone tell me please what is an efficient algorithm to count the number of leading zeroes in a 32-bit unsigned integer in C programming? 回答1: This discussion assumes that your compiler either doesn't support the operation or that it doesn't produce good enough assembly. Note that both of these are unlikely nowadays so I'd recommend just using __builtin_clz for gcc or equivalent on your compiler. Note that determining which is the "best" clz algo can only be done by you. Modern

Writing cross-platform apps in C

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 12:32:43
问题 What things should be kept most in mind when writing cross-platform applications in C? Targeted platforms: 32-bit Intel based PC, Mac, and Linux. I'm especially looking for the type of versatility that Jungle Disk has in their USB desktop edition ( http://www.jungledisk.com/desktop/download.aspx ) What are tips and "gotchas" for this type of development? 回答1: I maintained for a number of years an ANSI C networking library that was ported to close to 30 different OS's and compilers. The

How to read 4GB file on 32bit system

六眼飞鱼酱① 提交于 2019-11-29 11:44:38
In my case I have different files lets assume that I have >4GB file with data. I want to read that file line by line and process each line. One of my restrictions is that soft has to be run on 32bit MS Windows or on 64bit with small amount of RAM (min 4GB). You can also assume that processing of these lines isn't bottleneck. In current solution I read that file by ifstream and copy to some string. Here is snippet how it looks like. std::ifstream file(filename_xml.c_str()); uintmax_t m_numLines = 0; std::string str; while (std::getline(file, str)) { m_numLines++; } And ok, that's working but to