I'm trying to write an ActiveX controll that will let you increase the speed of VB for simple operations, for example say you wanted to do 50,00 simple calculations on a byte array (If you wanted to do nonlinear transformatins on a bitmap for example, this would let you write the code to do your calculations in the controls property page and then the controll would compile this into assembler, and hopefully speed up your code, it would also let you enter mathematical equations and do them at run time.

My plan involves declaring a large byte array to hold the code, writing the assembler into that with a set interface with four long parameters as pointers to any neccacerry data

eg a pointer to the input parameters, a pointer to the space allocated for the return value, a pointer to the start point and a pointer to something else, then call this using

Code:
CallWindowProc VarPtr(bytProgram(0)), VarPtr(uParamInfo), lngStartLine , VarPtr(dblReturnValue), lngOtherParameter
which would call the code in my byte array It works if I copy a VB function into a byte array using copy memory and the addressof operator.

The trouble is I've never used PC assembler, only PIC assembler( and not too much of that) and don't know how possible it is to make this Idea work.

So I need answers to the following questions

1 Is Assembler processor specific, eg if I've got an Intel Pentium III and I write the assembler so It runs on My machine will it still run on someone elses machine using a different processor?

2 If not how many different assembley languages will I have to learn, it it easy to translate between them, eg can I write the code for a pentium III and have a function that says, the user is using a Pentium Pro so where sam's got command XXAA change this to YYAA.

3 How easy it it to get at the windows memory, can I just use App.hInstace + VarPtr(uSomeMemory) as an address or is there some wierd stuff to get through.

4 Is windows going to object to me writing this and decide I'm a hacker or a virus.

If anyone's tried something similar to this or has used assembler with windows Please help, I really like this Idea but want to know if I can get it off the ground.