Solved

Single Active X for 32and 64-bit IE?

Posted on 2010-09-22
7
805 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
  • 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now