I released mine.

So why don't you roll up your sleeves and make that vb to asm tool you want ? :grin:


hitch.
Posted on 2002-09-26 20:46:40 by hitchhikr
I'll try to do that, but your app don't handles .frm, and baziks, does. So i thought in learn how did he do that in order to mprove in yours.
Posted on 2002-09-26 23:02:37 by Beyond2000!
Hi,

The code convertion is the most important, and yet is it not finished at all in my converter. Forms files are simply asciis so it shouldn't be too hard to look in. Frx files are more or less resources (prioritary file format).

I think Bazik's tool only decode the headers of the .frm, no offence but it's actually quite easy to do. The code part of the files will be trickier to convert: unless the generated code handles com servers/clients, the code must be completly converted into Win32APIs, some code must be produced for MDIs and childs the rest should be translated into resources.
User made ocxs and other ActiveX objects are another problem.

Btw, if you want to officially give me a hand, just send me your sourceforge name and i'll include you in the developpers list.
The two other developpers haven't produced anything yet
(let's hope they will) so the project is running slowly.

Cheers,

h.
Posted on 2002-09-27 03:57:37 by hitchhikr
I fear this thread is running out of context.

:grin:


h.
Posted on 2002-09-27 04:00:35 by hitchhikr

I think Bazik's tool only decode the headers of the .frm, no offence but it's actually quite easy to do.


Make a better one :tongue:
For the code part, I prefer to use "Brain 18.0". I'll post the source code here once I am back at home. Need to find it first, though :/
Posted on 2002-09-27 04:03:15 by bazik
Yo,

i mean easy to do compared to the code generation.
Never said it was bad, it was only assumption coz i haven't even seen it.

I'll made one sooner or later coz as someone said: "a visual basic program without any forms is impossible in real world".
That one haven't seen the masmed sourcecode of course ;)

h.
Posted on 2002-09-27 04:10:13 by hitchhikr
Where we come back to the Topic that a API function like "CreateWindowEx" is something which a VB programmer is afraid of.
Posted on 2002-09-27 04:22:57 by bazik
I can understand that because i had to trick vb a lot to create a complete api application. VB is not really suited for hardcore apis.

And yea a vb developper can leave his entire happy life without knowing what a hook is all about. That's the way it goes.
Without mentioning of course that most vb developpers are incredibly bad :tongue: making vb itself a terrible reputation.


h.
Posted on 2002-09-27 04:33:47 by hitchhikr

i had to trick vb a lot to create a complete api application.


Why? Just put your startup code (CreateWindowEx, message queue, etc.) in a "sub main()" in a module and set this as entrypoint in the project properties.
What did you have to trick there :confused:
Posted on 2002-09-27 04:45:12 by bazik
MAsmEd is registering and managing it's own windows classes without talking about processes debugging and all other fancy tools included in the editor. It might looks easy but lot of things would have been easier to work directly in asm because vb is not that flexible outside it's own range. For example, messages like wm_notify have to be handled differently since the lparam must be a long in the declaration of a winproc so, it can't assume it's the address of some special structure one time and something else the other time, you have to make a local copy of it to access to the elements if this is a complex type, since usually only the header is a constant.
Of course not that hard to do but that slow down the whole process. Also there's a constant vb/asm interleaving in MAsmEd that makes the game more funny to play, everywhere. :grin:

h.
Posted on 2002-09-27 05:02:37 by hitchhikr
Convert it to assembly then :tongue:
Posted on 2002-09-27 07:02:04 by bazik
I will convert it to C (Hence the vb6tovc6 proggy)

Actually there's only 4 functions to add and user types handling in dynamic arrays to make the vb version history, i got reasons to get excited,
i just take my time :)

h.
Posted on 2002-09-27 07:15:11 by hitchhikr
Hi hitchhikr


Tks for intending me to include on your developers list.

I?ll try to do my best to help.

My sourceforge name ? Well it can be Beyond2000 or Guga (my real nick name).

About the convertion. There is a tool just like yours named BCX translator, that converts bas to c++ coding. I don?t have their site right now, cause i?m at office, but if you want to take a look at it, and it it can help you on anything, i can send to you the site in order to you analyse it, and see if you can use something from them.

Btw: I tried to convert your own code to vc++
(VB6ToVC6.vbp) but several errors came up. I thought in do that cause, having a VB6toVC6 converted to VC6, would be more easier to convert the inner code to produce masm coding. Why the errors came up ?


These convertions can be also a very good thing to other project i?m involved (Spasm), cause if at the end your project could converto literally 100% to VC6 (including forms to resources etc...), not only a convertion betwen vbp could be done, but a hole exe made in visualbasic could be converted to asm (or VC).

It?s not impossible, since if you know exactly the vb functions (and their hexadecimal values), we could use flirt (file language recognition technology) to see which vb function are equivalent to your vc functions and later, to masm functions.

A disassembler (From Spasm) can then use flirt to identify the vb functions, and convert their asm equivalents.

For now the convertion of VB6toVC6 or VB6toMasm through the .vbp files, is really, really a very good idea.

Congratulation of your wonderfull project.

If you allowed me, i?ll be glad in help you.


Best Regards,

Guga
Posted on 2002-09-29 08:39:11 by Beyond2000!
Do you really think you can translate a .exe file compiled with vb since you only know the vc equivalents ?

Do you at least have a consideration on how a .exe from vb is made ?
Posted on 2002-10-02 09:28:42 by CrazyTripA

Do you really think you can translate a .exe file compiled with vb since you only know the vc equivalents ?

Do you at least have a consideration on how a .exe from vb is made ?


Hitchhikr's tool can convert VB source code to VC source code.
Posted on 2002-10-02 09:49:30 by bazik
Hi Bazik

did you found the code for Brain 18.0 or frm2asm ?
Posted on 2002-10-02 10:19:13 by Beyond2000!

Hi Bazik

did you found the code for Brain 18.0 or frm2asm ?



ROTFL! "Brain 18.0" is in my head (I am 18 years old) :grin: :grin: :grin:

And for frm2asm... I was just checking where I put the backup (I forgot about it again).
And yes, I found the source in a 1 GB tar.bz2 file.... well, and here is what I get when I try to decompress it:



F:\>bzip2 -d misc.tar.bz2

bzip2: Data integrity error when decompressing.
Input file = misc.tar.bz2, output file = misc.tar

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

bzip2: Deleting output file misc.tar, if it exists.

F:\>

(yes, I am on a Windows box right now)

Seems like I lost over 1 GB of Windows source code :( :(
I'll try the recover thing, maybe I can resuce something :/
Posted on 2002-10-02 10:31:19 by bazik
Hi Bazik.

How gib is your HD ?

If your attempt i failing, you can try to recover using winrar. It has an recover tool inside, tyhat is very usefull in many situations.

If you have enough space, copy other file (misc.tar.bz2) to make a backup of your backup.

Then you can try to recover using winrar.

If you want i can serach for some zip recovery tools on the net.


Btw: Don't you have an CDR ?
Posted on 2002-10-02 11:40:41 by Beyond2000!
>How gib is your HD ?

180 GB :grin:

>If your attempt i failing, you can try to recover using winrar. It has an recover tool
>inside, tyhat is very usefull in many situations.

Yes, I know but it can only repair RAR and ZIP files.

>If you want i can serach for some zip recovery tools on the net.

Its not ZIP, its bzip2 ;)


>Btw: Don't you have an CDR ?

No, I dont have CDR's for 1 GB files :tongue:

Its sad to loose 1 GB of source code... on the other hand I switched to Linux on my dev machine anyway.... I am just sorry for you in that case. Maybe I have the source on my machine at work...
Posted on 2002-10-02 11:50:41 by bazik
Hello coders,
Some months ago I tried frm2asm (executable) and I'd started to make my own version...After some results I proposed to author to share /& codes. NOP! So I didn't made mine public. It's easy if you understand .frm structure (my own start analising .vbp files and after - all frms involved). I had a small problem about transforming twips/pixel, but solved. Now I can convert all forms in a project in equiv. files (.rc + .asm) maintaining exactly the dimensions of forms (you can see in frm2asm are some diff. betw. original & converted frm size) with menus (frm2asm doesn't!) and for a lots of controls - almost all commdlg. objects (some small problems - bugs- on objects contained in others...). All with some "options": all in one rc, separate .rc files (for big projs. may be usefull) code for initializ. using declared in res./runtime created controls etc.. and even some tipical vb functions (you know...msgboxes etc. :) ...). I'm not a guru in asm and I did it in vb! I intend to made a final version capable to convert itself...So don't cry anymore for source code... Start make it! I saw some splendid projects done here (IDE's & others). I think can be a great help & service for the incommings - a GOOD conversion tool, maybe a modular/multilanguage one (there are others "in migration" coders from cobol, fox etc. which can apreciate/pay for this)...(sorry for english, not native language). See you...
Posted on 2002-10-03 08:35:36 by syntheticbyte