The MASM Forum

Projects => Easy Code IDE 32/64-bit => Topic started by: Daniel on February 12, 2016, 05:31:53 PM

Title: About Easy Code functionality
Post by: Daniel on February 12, 2016, 05:31:53 PM
Hi All,
I have just a general question. I am a vb6 programmer and I would like to know if Easy Code does allow me to work with other libraries in a COM standard. For example, is it possible to open an excel file, to modify some rows and save it ? Also, it would be useful to me to find out which are the similarities and differences between vb classic and this interesting language developed by Ramon Sala. Thank you in advance.

Title: Re: About Easy Code functionality
Post by: rsala on February 13, 2016, 07:55:49 AM
Hi Daniel,

Thanks for your kind words about the IDE.

Easy Code was based on VB to make assembly programming easier. The very main difference is that Easy Code works only with assembly programming (supporting various assemblers), so you have to know the assembler language in depth.

Regards,

Ramon

BTW: Easy Code CANNOT open an excel file.
Title: Re: About Easy Code functionality
Post by: HSE on February 13, 2016, 11:12:58 AM
Ramon:
   Believe or not, it's posible and apparently not very dificult (using the work of Biterider, of course).

Daniel:
   You need ObjAsm32 macro system      http://masm32.com/board/index.php?board=43.0
   I don't know how easy is for a Asm beginner.


Regards. HSE
 
Title: Re: About Easy Code functionality
Post by: jj2007 on February 13, 2016, 12:24:09 PM
xlsConnect (http://www.webalice.it/jj2006/MasmBasicQuickReference.htm#Mb1085) is another option; see \masm32\MasmBasic\Res\Masm2Excel.asc for a full example (needs MasmBasic (http://masm32.com/board/index.php?topic=94.0)).

@HSE: Can you post a small example? Here is one using xlsConnect:

include \masm32\MasmBasic\MasmBasic.inc      ; download (http://masm32.com/board/index.php?topic=94.0)
  Init
  xlsConnect                  ; no args=Excel, System
  .if !Zero?                  ; non-zero means success
      FileWrite "tmp.xls", "Just a test"      ; create a spreadsheet
      xlsCommand "[app.activate()]"           ; optional: activate Excel
      xlsOpen Cat$(CurDir$()+"tmp.xls")
      xlsConnect "tmp"
      .if !Zero?
            xlsWrite "R2C1", Cat$("This sheet was modified on "+Date$+", "+Time$)
      .endif
  .endif
  xlsDisconnect      ; say bye to Excel
EndOfCode
Title: Re: About Easy Code functionality
Post by: HSE on February 13, 2016, 12:50:00 PM
Hi JJ!

The example is ObjAsm32\Projects\Office\ExcelHost
Title: Re: About Easy Code functionality
Post by: mabdelouahab on February 13, 2016, 08:02:13 PM
Guys...
The man says "I am a vb6 programmer ... ", This means that it needs to MASM32REF (http://masm32.com/board/index.php?topic=5028.0)  :biggrin:
Title: Re: About Easy Code functionality
Post by: jj2007 on February 13, 2016, 09:05:15 PM
The example is ObjAsm32\Projects\Office\ExcelHost

Thanks. It works if you manually copy \Masm32\ObjAsm32\Code\ObjMem32\ObjMem32.lib to \Masm32\lib\ObjMem32.lib

A bit more complicated than my example, though: 240 lines of source code, plus 1.4 MB of specific include files...
Title: Re: About Easy Code functionality
Post by: Biterider on February 13, 2016, 10:07:33 PM
Hi jj
ObjMem32.lib and .inc should be copied on corresponding MASM directories on installation of OA32. Did you experience any problems with that?
In the ObjMem32 directory is a .bat file I use to copy/update those files when I changed something in the library.

I count 60 lines including comments and empty lines on the word super simple demo application...
In my opinion, it is more a matter of taste which approach you choose to deal with COM & .NET.

Regards, Biterider

Title: Re: About Easy Code functionality
Post by: jj2007 on February 14, 2016, 03:33:46 AM
Hi Biterider,

The installation of the .lib was not automatic this time, and the make.bat just shouted "error" without explaining the cause. But opening \Masm32\ObjAsm32\Projects\Office\ExcelHost\ExcelHost.asm in RichMasm and hitting F6 gave me sufficient info to understand that I had to copy the lib to its Masm32 folder.

The Excelhost example itself is impressing, compliments :t

For my needs, DDE is enough, though ;-)

Jochen
Title: Re: About Easy Code functionality
Post by: Biterider on February 14, 2016, 04:16:08 AM
Hi Jochen
If you use the provided make.bat files, if an error happened, look for a file named make.txt. All messages (stdout) are echoed into this file, so you can follow most of the times where the problem lies.
I'll check the installation routine again to find where something could go wrong.
Thanks.  ;)

Biterider
Title: Re: About Easy Code functionality
Post by: rsala on February 18, 2016, 07:27:56 AM
Quote
Believe or not, it's posible and apparently not very dificult (using the work of Biterider, of course).
Quote
xlsConnect is another option; see \masm32\MasmBasic\Res\Masm2Excel.asc for a full example (needs MasmBasic).

Thanks, I did not know that.