Convert 64 bit exe to 32 bit



  1. hey guys,
    i am having a 64 bit autodesk maya software but my computer is 32 bit. internet it costly here, So i need to convert this software because i cannot download a 32 bit version.

    pls help.....



  2. Can't be done. AFAIK Maya is 64 bit from 2014. You should get an earlier 32 bit version or (pref) upgrade your system to 64 bit. A lot of high end graphics software is 64 bit only nowadays eg Premiere Pro, After Effects, Cinema 4D. If gfx is your thing, I suggest moving to 64 bit.



  3. Conversion of 64 bit software to 32 bit (or the reverse) is virtually impossible. The very similar user interface serves to hide the fact that internally 32 bit and 64 bit software is VERY different. For the original developer who has complete source code and knowledge of it's internal operation this would be a major task.


 


This article applies to the Oracle Developer Studio (previously known as Oracle Solaris Studio) compilers. The principal cause of problems when converting 32-bit applications to 64-bit applications is the change in size of the char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1 type with respect to the char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 and pointer types. When converting 32-bit programs to 64-bit programs, only char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 types and pointer types change in size from 32 bits to 64 bits; integers of type char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1 stay at 32 bits in size. This can cause trouble with data truncation when assigning pointer or char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 types to char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1 types. Also, problems with sign extension can occur when assigning expressions using types shorter than the size of an char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1 to an char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 8 or a pointer. This article discusses how to avoid or eliminate these problems.

Consider the Differences Between the 32-bit and 64-bit Data Models

The biggest difference between the 32-bit and the 64-bit compilation environments is the change in data-type models. The C data-type model for 32-bit applications is the ILP32 model, so named because the char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1 and char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 types, and pointers, are 32-bit data types. The data-type model for 64-bit applications is the LP64 data model, so named because char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 and pointer types grow to 64 bits. The remaining C integer types and the floating-point types are the same in both data-type models.

It is not unusual for current 32-bit applications to assume that the char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1 type, char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 type, and pointers are the same size. Because the size of char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 and int waiting; long w_io; long w_swap; ... waiting = w_io + w_swap; % cc warning: assignment of 64-bit integer to 32-bit integer 5 change in the LP64 data model, this change alone is the principal cause of ILP32-to-LP64 conversion problems.

Use the int waiting; long w_io; long w_swap; ... waiting = w_io + w_swap; % cc warning: assignment of 64-bit integer to 32-bit integer 6 Utility to Detect Problems with 64-bit char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 and Pointer Types

Use int waiting; long w_io; long w_swap; ... waiting = w_io + w_swap; % cc warning: assignment of 64-bit integer to 32-bit integer 6 to check code that is written for both the 32-bit and the 64-bit compilation environment. Specify the int waiting; long w_io; long w_swap; ... waiting = w_io + w_swap; % cc warning: assignment of 64-bit integer to 32-bit integer 9 option to generate LP64 warnings. Also use the int waiting; long w_io; long w_swap; ... waiting = w_io + w_swap; % cc warning: assignment of 64-bit integer to 32-bit integer 9 flag which checks portability to an environment for which the size of long integers and pointers is 64 bits and the size of plain integers is 32 bits. The int waiting; long w_io; long w_swap; ... waiting = w_io + w_swap; % cc warning: assignment of 64-bit integer to 32-bit integer 9 flag checks assignments of pointer expressions and long integer expressions to plain integers, even when explicit casts are used.

Use the %cat test.c struct foo {   unsigned int base:19, rehash:13; }; main(int argc, char *argv[]) { struct foo a; unsigned long addr; a.base = 0x40000; addr = a.base << 13; /* Sign extension here! */ printf("addr 0x%lx\n", addr); addr = (unsigned int)(a.base << 13); /* No sign extension here! */   printf("addr 0x%lx\n", addr); } 2 option to find code where the normal ISO C value-preserving rules allow the extension of the sign of a signed-integral value in an expression of unsigned-integral type. Use the %cat test.c struct foo {   unsigned int base:19, rehash:13; }; main(int argc, char *argv[]) { struct foo a; unsigned long addr; a.base = 0x40000; addr = a.base << 13; /* Sign extension here! */ printf("addr 0x%lx\n", addr); addr = (unsigned int)(a.base << 13); /* No sign extension here! */   printf("addr 0x%lx\n", addr); } 3 option of int waiting; long w_io; long w_swap; ... waiting = w_io + w_swap; % cc warning: assignment of 64-bit integer to 32-bit integer 6 when you want to check code that you intend to run in the Solaris 64-bit SPARC or x86 64-bit environment.

When lint generates warnings, it prints the line number of the offending code, a message that describes the problem, and whether or not a pointer is involved. The warning message also indicates the sizes of the involved data types. When you know a pointer is involved and you know the size of the data types, you can find specific 64-bit problems and avoid the pre-existing problems between 32-bit and smaller types.

You can suppress the warning for a given line of code by placing a comment of the form %cat test.c struct foo {   unsigned int base:19, rehash:13; }; main(int argc, char *argv[]) { struct foo a; unsigned long addr; a.base = 0x40000; addr = a.base << 13; /* Sign extension here! */ printf("addr 0x%lx\n", addr); addr = (unsigned int)(a.base << 13); /* No sign extension here! */   printf("addr 0x%lx\n", addr); } 5 on the previous line. This is useful when you want lint to ignore certain lines of code such as casts and assignments. Exercise extreme care when you use the %cat test.c struct foo {   unsigned int base:19, rehash:13; }; main(int argc, char *argv[]) { struct foo a; unsigned long addr; a.base = 0x40000; addr = a.base << 13; /* Sign extension here! */ printf("addr 0x%lx\n", addr); addr = (unsigned int)(a.base << 13); /* No sign extension here! */   printf("addr 0x%lx\n", addr); } 5 comment because it can mask real problems. When you use %cat test.c struct foo {   unsigned int base:19, rehash:13; }; main(int argc, char *argv[]) { struct foo a; unsigned long addr; a.base = 0x40000; addr = a.base << 13; /* Sign extension here! */ printf("addr 0x%lx\n", addr); addr = (unsigned int)(a.base << 13); /* No sign extension here! */   printf("addr 0x%lx\n", addr); } 7, also include %cat test.c struct foo {   unsigned int base:19, rehash:13; }; main(int argc, char *argv[]) { struct foo a; unsigned long addr; a.base = 0x40000; addr = a.base << 13; /* Sign extension here! */ printf("addr 0x%lx\n", addr); addr = (unsigned int)(a.base << 13); /* No sign extension here! */   printf("addr 0x%lx\n", addr); } 8. Refer to the %cat test.c struct foo {   unsigned int base:19, rehash:13; }; main(int argc, char *argv[]) { struct foo a; unsigned long addr; a.base = 0x40000; addr = a.base << 13; /* Sign extension here! */ printf("addr 0x%lx\n", addr); addr = (unsigned int)(a.base << 13); /* No sign extension here! */   printf("addr 0x%lx\n", addr); } 9 page for more information.

Check for Changes of Pointer Size With Respect to the Size of Plain Integers

Since plain integers and pointers are the same size in the ILP32 compilation environment, 32-bit code commonly relies on this assumption. Pointers are often cast to char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1 or % cc -o test64 -m64 test.c % ./test64 addr 0xffffffff80000000 addr 0x80000000 % 1 for address arithmetic. You can cast your pointers to char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 8 because char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 and pointer types are the same size in both ILP32 and LP64 data-type models. However, rather than explicitly using char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 8, use % cc -o test64 -m64 test.c % ./test64 addr 0xffffffff80000000 addr 0x80000000 % 5 instead because it expresses your intent more closely and makes the code more portable, insulating it against future changes. To use the % cc -o test64 -m64 test.c % ./test64 addr 0xffffffff80000000 addr 0x80000000 % 5 and % cc -o test64 -m64 test.c % ./test64 addr 0xffffffff80000000 addr 0x80000000 % 7 you need to %cat test.c struct foo {   unsigned int base:19, rehash:13; }; main(int argc, char *argv[]) { struct foo a; unsigned long addr; a.base = 0x40000; addr = a.base << 13; /* Sign extension here! */ printf("addr 0x%lx\n", addr); addr = (unsigned int)(a.base << 13); /* No sign extension here! */   printf("addr 0x%lx\n", addr); } 8.

Consider the following example:

char *p; p = (char *) ((int)p & PAGEOFFSET); % cc .. warning: conversion of pointer loses bits

The following version will function correctly when compiled to both 32-bit and 64-bit targets:

char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET);

Check for Changes in Size of Long Integers With Respect to the Size of Plain Integers

Because integers and longs are never really distinguished in the ILP32 data-type model, your existing code probably uses them indiscriminately. Modify any code that uses integers and longs interchangeably so it conforms to the requirements of both the ILP32 and LP64 data-type models. While an integer and a long are both 32-bits in the ILP32 data-type model, a long is 64 bits in the LP64 data-type model.

Consider the following example:

int waiting; long w_io; long w_swap; ... waiting = w_io + w_swap; % cc warning: assignment of 64-bit integer to 32-bit integer

Check for Sign Extensions

Sign extension is a common problem when you convert to the 64-bit compilation environment because the type conversion and promotion rules are somewhat obscure. To prevent sign-extension problems, use explicit casting to achieve the intended results.

To understand why sign extension occurs, it helps to understand the conversion rules for ISO C. The conversion rules that seem to cause the most sign extension problems between the 32-bit and the 64-bit compilation environment come into effect during the following operations:

  • Integral promotion

    You can use a char, short, enumerated type, or bit-field, whether signed or unsigned, in any expression that calls for an integer. If an integer can hold all possible values of the original type, the value is converted to an integer; otherwise, the value is converted to an unsigned integer.

  • Conversion between signed and unsigned integers

    When an integer with a negative sign is promoted to an unsigned integer of the same or larger type, it is first promoted to the signed equivalent of the larger type, then converted to the unsigned value.

When the following example is compiled as a 64-bit program, the addr variable becomes sign-extended, even though both addr and a.base are unsigned types.

%cat test.c struct foo {   unsigned int base:19, rehash:13; }; main(int argc, char *argv[]) { struct foo a; unsigned long addr; a.base = 0x40000; addr = a.base << 13; /* Sign extension here! */ printf("addr 0x%lx\n", addr); addr = (unsigned int)(a.base << 13); /* No sign extension here! */   printf("addr 0x%lx\n", addr); }

This sign extension occurs because the conversion rules are applied as follows:

  • % cc -o test64 -m64 test.c % ./test64 addr 0xffffffff80000000 addr 0x80000000 % 9 is converted from an % cc -o test64 -m64 test.c % ./test64 addr 0xffffffff80000000 addr 0x80000000 % 1 bit field to an char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1 because of the integral promotion rule. In other words, because the unsigned 19-bit field fits within a 32-bit integer, the bit field is promoted to an integer rather than an unsigned integer. Thus, the expression % cc -o test test.c % ./test addr 0x80000000 addr 0x80000000 % 2 is of type char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1. If the result were assigned to an % cc -o test64 -m64 test.c % ./test64 addr 0xffffffff80000000 addr 0x80000000 % 1, this would not matter because no sign extension has yet occurred.
  • The expression % cc -o test test.c % ./test addr 0x80000000 addr 0x80000000 % 2 is of type char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1, but it is converted to a char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 and then to an char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 8 before being assigned to % cc -o test test.c % ./test addr 0x80000000 addr 0x80000000 % 9, because of signed and unsigned integer promotion rules. The sign extension occurs when performing the char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1 to char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 conversion.

Thus, when compiled as a 64-bit program, the result is as follows:

% cc -o test64 -m64 test.c % ./test64 addr 0xffffffff80000000 addr 0x80000000 %

When compiled as a 32-bit program, the size of an char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 8 is the same as the size of an char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1, so there is no sign extension.

% cc -o test test.c % ./test addr 0x80000000 addr 0x80000000 %

Check Structure Packing

Check the internal data structures in an applications for holes; that is, extra padding appearing between fields in the structure to meet alignment requirements. This extra padding is allocated when char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 or pointer fields grow to 64 bits for the LP64 data-type model, and appear after an char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1 that remains at 32 bits in size. Since char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 and pointer types are 64-bit aligned in the LP64 data-type model, padding appears between the char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1 and char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 or pointer type. In the following example, member struct bar { int i; long j; int k; char *p; }; /* sizeof (struct bar) = 32 bytes */ 9 is 64-bit aligned, and so padding appears between the member struct bar { char *p; long j; int i; int k; }; /* sizeof (struct bar) = 24 bytes */ 0 and member struct bar { int i; long j; int k; char *p; }; /* sizeof (struct bar) = 32 bytes */ 9.

struct bar { int i; long j; int k; char *p; }; /* sizeof (struct bar) = 32 bytes */

Also, structures are aligned to the size of the largest member within them. Thus, in the above structure, padding appears between member struct bar { char *p; long j; int i; int k; }; /* sizeof (struct bar) = 24 bytes */ 2 and member struct bar { char *p; long j; int i; int k; }; /* sizeof (struct bar) = 24 bytes */ 3.

When you repack a structure, follow the simple rule of moving the long and pointer fields to the beginning of the structure. Consider the following structure definition:

struct bar { char *p; long j; int i; int k; }; /* sizeof (struct bar) = 24 bytes */

Check for Unbalanced Size of Union Members

Be sure to check the members of unions because their fields can change size between the ILP32 and the LP64 data-type models, making the size of the members different. In the following union, member struct bar { char *p; long j; int i; int k; }; /* sizeof (struct bar) = 24 bytes */ 4 and member array struct bar { char *p; long j; int i; int k; }; /* sizeof (struct bar) = 24 bytes */ 5 are the same size in the ILP32 model, but different in the LP64 model because char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 types grow to 64 bits in the LP64 model, but struct bar { char *p; long j; int i; int k; }; /* sizeof (struct bar) = 24 bytes */ 7 types do not.

typedef union { double _d; long _l[2]; } llx_

The size of the members can be rebalanced by changing the type of the struct bar { char *p; long j; int i; int k; }; /* sizeof (struct bar) = 24 bytes */ 5 array member from type char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 to type char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1.

Make Sure Constant Types are Used in Constant Expressions

A lack of precision can cause the loss of data in some constant expressions. Be explicit when you specify the data types in your constant expression. Specify the type of each integer constant by adding some combination of { typedef union { double _d; long _l[2]; } llx_ 1}. You can also use casts to specify the type of a constant expression. Consider the following example:

int i = 32; long j = 1 << i; /* j will get 0 because RHS is integer expression */

The above code can be made to work as intended, by appending the type to the constant, typedef union { double _d; long _l[2]; } llx_ 2, as follows:

char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 0

Check Format String Conversions

Make sure the format strings for typedef union { double _d; long _l[2]; } llx_ 3(3S), typedef union { double _d; long _l[2]; } llx_ 4(3S), typedef union { double _d; long _l[2]; } llx_ 5(3S), and typedef union { double _d; long _l[2]; } llx_ 6(3S) can accommodate long or pointer arguments. For pointer arguments, the conversion operation given in the format string should be typedef union { double _d; long _l[2]; } llx_ 7 to work in both the 32-bit and 64-bit compilation environments. For char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 arguments, the long size specification, typedef union { double _d; long _l[2]; } llx_ 9, should be prepended to the conversion operation character in the format string.

Also, check to be sure that buffers passed to the first argument in typedef union { double _d; long _l[2]; } llx_ 4 contain enough storage to accommodate the expanded number of digits used to convey long and pointer values. For example, a pointer is expressed by 8 hex digits in the ILP32 data model but expands to 16 in the LP64 data model.

Type Returned by int i = 32; long j = 1 << i; /* j will get 0 because RHS is integer expression */ 1 Operator is an char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 8

In the LP64 data-type model, int i = 32; long j = 1 << i; /* j will get 0 because RHS is integer expression */ 1 has the effective type of an char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 8. If int i = 32; long j = 1 << i; /* j will get 0 because RHS is integer expression */ 1 is passed to a function expecting an argument of type char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1, or assigned or cast to an char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1, the truncation could cause a loss of data. This is only likely to be problematic in large database programs containing extremely long arrays.

Use Portable Data Types or Fixed Integer Types for Binary Interface Data

For data structures that are shared between 32-bit and 64-bit versions of an application, stick with data types that have a common size between ILP32 and LP64 programs. Avoid using char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 data types and pointers. Also, avoid using derived data types that change in size between 32-bit and 64-bit applications. For example, the following types defined in int i = 32; long j = 1 << i; /* j will get 0 because RHS is integer expression */ 9 change in size between the ILP32 and LP64 data models:

  • char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 00, which represents the system time in clock ticks
  • char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 01, which is used for device numbers
  • char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 02, which is used for file sizes and offsets
  • char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 03, which is the signed integral type for the result of subtracting two pointers
  • char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 04, which reflects the size, in bytes, of objects in memory
  • char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 05, which is used by functions that return a count of bytes or an error indication
  • char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 06, which counts time in seconds

Using the derived data types in int i = 32; long j = 1 << i; /* j will get 0 because RHS is integer expression */ 9 is a good idea for internal data, because it helps to insulate the code from data-model changes. However, preccisely because the size of these types are prone to change with the data model, using them is not recommended in data that is shared between 32-bit and 64-bit applications, or in other situations where the data size must remain fixed. Nevertheless, as with the sizeof() operator discussed above, before making any changes to the code, consider whether the loss of precision will actually have any practical impact on the program.

For binary interface data, consider using the fixed-width integer types in. These types are good for explicit binary representations of the following:

  • Binary interface specifications
  • On-disk data
  • Over the data wire
  • Hardware registers
  • Binary data structures

Check for Side Effects

Be aware that a type change in one area can result in an unexpected 64-bit conversion in another area. For example, check all the callers of a function that previously returned an char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1 and now returns an char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 05.

Consider the Effect of char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 Arrays on Performance

Large arrays of char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 or char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 8 types, can cause serious performance degradation in the LP64 data-type model as compared to arrays of char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1 or % cc -o test64 -m64 test.c % ./test64 addr 0xffffffff80000000 addr 0x80000000 % 1 types. Large arrays of char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 types cause significantly more cache misses and consume more memory. Therefore, if char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1 works just as well as char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2 for the application purposes, it's better to use char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1 rather than char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 2. This is also an argument for using arrays of char *p; p = (char *) ((uintptr_t)p & PAGEOFFSET); 1 types instead of arrays of pointers. Some C applications suffer from serious performance degradation after conversion to the LP64 data-type model because they rely on many, large, arrays of pointers.

How can I change my 64

Not possible, you need to check the developers website then download the 32 bit version of the software you need to install. Most developers will have both architectures on their site. If not, then you will need to switch to a 64 bit version of Windows 7 or Windows 10 if your system supports it. Was this reply helpful?

Can 64

On 64-bit Windows, a 64-bit process cannot load a 32-bit dynamic-link library (DLL). Additionally, a 32-bit process cannot load a 64-bit DLL. However, 64-bit Windows supports remote procedure calls (RPC) between 64-bit and 32-bit processes (both on the same computer and across computers).

Can I downgrade from 64bit to 32bit?

You can't. There's is no official or unofficial downgrade path for 64-bit to 32-bit (or vice versa). You didn't specify a windows version, but it doesn't matter. None offer such an option.

Can you run a 32

You can run 32bit applications on a 32bit machine or a 64bit machine. However, you can not run a 64bit application on a 32bit machine.

Postingan terbaru

LIHAT SEMUA