[Migrated content. Thread originally posted on 15 January 2004]
After many struggle of trying to translate VB codes, I figured that it would be better if we could use the VB codes as they are. So I started to learn the VB and downloaded many free VB codes what was written by many talented programmers, especially people who are maintaing the vbSendMail.dll.Anyway, after many trial and error, I am able to call dll from cobol programs. I've created CobolVBDll.dll with two classes (hope to add more useful routines in future):
clsMail - to send mails
clsGUID - to create Globally Unique Identifier (I needed them for interfacing with one of my customer's xml Database)
I've seen many posts here where people wanted to know how to send emails via Cobol, so I decided to put together a VB dll which I can send email using SMTP, Outlook, or plain MAPI with option to add as many attachments as possible.
Since I've gotten many help from VB programmers who posted their creations in many VB forums, I've decided to share my little creation with my fellow AcuCobol users; so feel free to use them and hopfully, some of you would do the same.
Attached zip file contains:
AcuCobol.def -
AcuGui.def
CallVBDll.cbl - Example Cobol program that call the CobolVBLib.dll
CobolVBLib.def - created by axdefgen.exe for CobolVBLib.dll
test.bat - to compile CallVBDll.cbl
run.bat - to run cobol program CallVBDll.exe
CobolVBLib.dll - VB dll
vbSendMail.dll - VB dll used by CobolVBLib.dll for SMTP mail
CobolVBLib.zip - contain all related VB codes.
(i'm not a seasoned vb programmer... so be easy on me)
Added clsPrintScreen - allows to print the current active screen to the default prn device.
Hope to add more useful routines through out the year and I'll try to post them. If this is usefull, let me know...