简体   繁体   中英

Convert 32 bit exe to 64 bit exe on Windows 7 64 bit machine

Developed an 32 bit Visual Basic dll. dll written only 1 method GetSum having two integer parameteres

Now using late binding load an dll in Winform 32 bit application. pass two integer values show the sum in label. the sum shows correct.

private void Form1_Load(object sender, EventArgs e)
{
     object[] args = new object[] { "89", "2" };
     Type comObjectType = Type.GetTypeFromProgID("Project1.Class1", true);
     object comObject = Activator.CreateInstance(comObjectType);
     Type acctualObjectType = comObject.GetType();
     object result = acctualObjectType.InvokeMember("GetSum", System.Reflection.BindingFlags.InvokeMethod, null, comObject, args);
     label1.Text = result.ToString();
}

My problem is when i run the winfrom exe on windows 7 64 bit machine. in task manager processes section shows like "WindowsFormsApplication.exe *32"

Means my winfrom exe is running as 32 bit mode on 64 bit machine. What should i do to run my 32 bit exe on 64 bit machine to run as 64 bit exe.

Dont want *32 append to exe in task manager processes section.

First: for creating the dll, are you using Visual Basic .NET or legacy Visual Basic 6?

If you are using VB6, you won't be able to create a 64bit dll. If you are using VB.NET, compile your dll to 64bit.

And remember, if your VB dll is a 32bit dll, you won't be able to use it from a 64bit application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM