News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

About Easy Code functionality

Started by Daniel, February 12, 2016, 05:31:53 PM

Previous topic - Next topic

Daniel

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.


rsala

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.
EC coder

HSE

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
 
Equations in Assembly: SmplMath

jj2007

xlsConnect is another option; see \masm32\MasmBasic\Res\Masm2Excel.asc for a full example (needs MasmBasic).

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

include \masm32\MasmBasic\MasmBasic.inc      ; download
  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

HSE

Hi JJ!

The example is ObjAsm32\Projects\Office\ExcelHost
Equations in Assembly: SmplMath

mabdelouahab

Guys...
The man says "I am a vb6 programmer ... ", This means that it needs to MASM32REF  :biggrin:

jj2007

Quote from: HSE on February 13, 2016, 12:50:00 PMThe 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...

Biterider

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


jj2007

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

Biterider

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

rsala

QuoteBelieve or not, it's posible and apparently not very dificult (using the work of Biterider, of course).
QuotexlsConnect is another option; see \masm32\MasmBasic\Res\Masm2Excel.asc for a full example (needs MasmBasic).

Thanks, I did not know that.
EC coder