Solved

Single Active X for 32and 64-bit IE?

Posted on 2010-09-22
7
810 Views
Last Modified: 2013-11-26
Is it possible to build a single Active X control in VS.NET (C#) that works in both 32/64-bit Internet Explorer via Javascript?

Also curious how to register it manually via the registry.
0
Comment
Question by:tkroll71
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 13

Expert Comment

by:zadeveloper
ID: 33741352
yes.

Just compile it to "any cpu"
0
 
LVL 7

Expert Comment

by:illusio
ID: 33743024
The question - as far as I can read it doesn't concern .NET Assemblies.

It goes for COM visible components - more specifically ActiveX components.
Well - I sincerely doubt that you can make one build that acts as 32bit and 64bit at the same time.
And if so - I'm watching this thread ;-) Maybe there is something possible I'm not aware of.

Generally speaken: ActiveX components are 32bit or 64bit, never both.
0
 

Author Comment

by:tkroll71
ID: 33748920
Illusio is correct. I want an Active X component to register via COM.

If I can't make a single component for x86/x64, is it still possible to register each separately via registry keys?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Accepted Solution

by:
illusio earned 500 total points
ID: 33749236
I did a little research and from what I see you will need to make two seperate components and even give them a different progid and clsid. The version independant progid can be the same but I don't see the point in that - it would just cause to load the wrong dll at moments you don't want it. At this point I don't know if you can still talk about the "same" component. You have to compile the ActiveX specifically for x86 if you want it to run in 32 bit modus.

The 32bit app has to refer to the 32bit version of the ActiveX and the 64bit app ... well you get the picture.

Disappointing but no other solution. The only reason .NET has us confused about the "interoperability" is that a .NET program compiles to IL and not to the machine language. Which means that the amount of bits a .NET app uses depends on the framework version. There is no way 32bit and 64bit addressing is interoperable... (WoW64 is special...)

That all, of course, till someone has better information. Which would surprise me but then again... this is a very specialized niche.
0
 

Author Comment

by:tkroll71
ID: 33749317
Thanks again, Illusio. You def get the points, but I'll throw another question at you while we're on the subject. Is there a way to do this besides .NET languages? I'm migrating the control from VB6. I can't recall if VS6 has any 64-bit options.
0
 
LVL 7

Expert Comment

by:illusio
ID: 33751536
Nice question.

It's quite simple. In the age of VB6, there was a faint idea of one day having 64 bit OS's but they didn't exist. VB6 was more in the times where the 16 bit machines migrated towards 32 bit machines. And the 16bit way of addressing (included overlay addressing) was compatible with 32 bit. Using 32 bit they have abandonned the technique of segments and offsets in addressing, rendering the current 32 bit addressing compatible with the 16bit with overlays but making it completely incapable of a compatibility with 64bit.
In numbers:
- 16bit addressing had 16bit memory address + 16 bit segment address = 32 bit
Thus a 16 bit program could see the entire 32 bit address space, it only used a different method to get there.
- 32 bit addressing can only see half of the memory space of a 64 bit addressing field. Making it possible that some variables get placed on spots a 32 bit program can't address.

VB6 does not support 64bit because it's too old and it's end of life, so there will never be any 64 bit options in it. If you want to build new 64bit controls, you'll have to turn to C++ (which will probably shorten your own lifespan greatly) or to .NET (more fun).

0
 
LVL 7

Expert Comment

by:illusio
ID: 33751541
Nice question.

It's quite simple. In the age of VB6, there was a faint idea of one day having 64 bit OS's but they didn't exist. VB6 was more in the times where the 16 bit machines migrated towards 32 bit machines. And the 16bit way of addressing (included overlay addressing) was compatible with 32 bit. Using 32 bit they have abandonned the technique of segments and offsets in addressing, rendering the current 32 bit addressing compatible with the 16bit with overlays but making it completely incapable of a compatibility with 64bit.
In numbers:
- 16bit addressing had 16bit memory address + 16 bit segment address = 32 bit
Thus a 16 bit program could see the entire 32 bit address space, it only used a different method to get there.
- 32 bit addressing can only see half of the memory space of a 64 bit addressing field. Making it possible that some variables get placed on spots a 32 bit program can't address.

VB6 does not support 64bit because it's too old and it's end of life, so there will never be any 64 bit options in it. If you want to build new 64bit controls, you'll have to turn to C++ (which will probably shorten your own lifespan greatly) or to .NET (more fun).

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C# MVC Insert Multiple Row into DB 2 61
custom authorization on controller action and HTML in asp.net mvc 1 42
Visual Studio npm 1 29
SSIS GUID Variable 2 30
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question