Solved

Single Active X for 32and 64-bit IE?

Posted on 2010-09-22
7
806 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

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…
I made this because I wanted to get e-mail with a attached csv file so I'd would be able to import user input into a MS Excel template, but I also wanted to register/save all inputs from each day in a file on the server. 1st - It creates a temp C…
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 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

25 Experts available now in Live!

Get 1:1 Help Now