Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

interacting with an ACUCOBOL application
Good day,

I am writing an application in Delphi. I want it to interact with
another application. The ACUCOBOL application is successfully calling
a DLL passing my application a string and a number. I want to be able
to send him the same. Can ACUCOBOL "listen" for DLL messages? Anybody
have any code on that. The ACUCOBOL team that I am working with is
relatively new to windows programming.

Thanks for any info.

-Markus

Report this thread to moderator Post Follow-up to this message
Old Post
Mark_R
06-30-04 01:55 AM


Re: interacting with an ACUCOBOL application
By "DLL messages", you mean sending messages to the Acucobol window - you
could do that, but it's not the easiest or best way.  (If I recall, Acucobol
provides hooks where you can subclass the main window so you can intercept
messages, but this requires writing some C code and relinking the runtime.)

They can just pass you additional variables in their CALL of your DLL and
your DLL can just put the values you want to pass back using the pointers to
those variables.  Or if they want, you can overwrite the values in the
variables they are passing to you.  Have them take a look at the docs on the
CALL verb.

"Mark_R" <mrissmann@yahoo.com> wrote in message
news:7a1f4dab.0406291440.170f3425@posting.google.com...
> Good day,
>
> I am writing an application in Delphi. I want it to interact with
> another application. The ACUCOBOL application is successfully calling
> a DLL passing my application a string and a number. I want to be able
> to send him the same. Can ACUCOBOL "listen" for DLL messages? Anybody
> have any code on that. The ACUCOBOL team that I am working with is
> relatively new to windows programming.
>
> Thanks for any info.
>
> -Markus



Report this thread to moderator Post Follow-up to this message
Old Post
JJ
06-30-04 08:55 AM


Re: interacting with an ACUCOBOL application
Thanks for the suggestion but their current calls to my DLL are
unrelated to what I want to do here. When ever an certain event occurs
in my application I need to notify their application of the event and
pass some information over.

I am not set on a using a DLL. Are there any other options? ActiveX?

Thanks,

-Markus


"JJ" <jj@nospam.com> wrote in message news:<R6qdnRNAQY1Tg3_dRVn-hg@comcast.com>...
> By "DLL messages", you mean sending messages to the Acucobol window - you
> could do that, but it's not the easiest or best way.  (If I recall, Acucob
ol
> provides hooks where you can subclass the main window so you can intercept
> messages, but this requires writing some C code and relinking the runtime.
)
>
> They can just pass you additional variables in their CALL of your DLL and
> your DLL can just put the values you want to pass back using the pointers 
to
> those variables.  Or if they want, you can overwrite the values in the
> variables they are passing to you.  Have them take a look at the docs on t
he
> CALL verb.

Report this thread to moderator Post Follow-up to this message
Old Post
Mark_R
06-30-04 08:55 PM


Re: interacting with an ACUCOBOL application
mrissmann@yahoo.com (Mark_R) wrote in message news:<7a1f4dab.0406300656.fd4c35d@posting.goo
gle.com>...
> Thanks for the suggestion but their current calls to my DLL are
> unrelated to what I want to do here. When ever an certain event occurs
> in my application I need to notify their application of the event and
> pass some information over.
>
> I am not set on a using a DLL. Are there any other options? ActiveX?
>
> Thanks,
>
> -Markus
>

It sounds like what you want to do is in your ACUCOBOL main program is
create what in C or C++ would be a CALLBACK function. I have no idea
if ACUCOBOL provides that facility.

A quick Google search reveals a bit of discussion on linking external
C/C++ routines to the COBOL runtime, which of course isn't what you
want.

Report this thread to moderator Post Follow-up to this message
Old Post
E P Chandler
07-01-04 01:55 AM


Re: interacting with an ACUCOBOL application
Well, I am not entirely clear what platform you are on, but have you
looked into the platform's IPC capabilities?

For example, under UNIX or (I think!) Windows, you should be able to
build message queues and have a thread sitting there waiting on input
to the queue.
This is basically now 'event' notification works under Windows and X.
There are several other possibilities- message queues, shared memory,
semaphores, mutexs and so on.

All of which, however, involve calling an operating system resource,
which may or may not be easily done from modern AcuCobol. I tend to
think
it may be done with little effort, but I won't guarantee that.

I can give you samples of how to do it under UNIX, but the samples are
in C. :)

-Paul


mrissmann@yahoo.com (Mark_R) wrote in message news:<7a1f4dab.0406300656.fd4c35d@posting.goo
gle.com>...
> Thanks for the suggestion but their current calls to my DLL are
> unrelated to what I want to do here. When ever an certain event occurs
> in my application I need to notify their application of the event and
> pass some information over.
>
> I am not set on a using a DLL. Are there any other options? ActiveX?
>
> Thanks,
>
> -Markus
>
>
> "JJ" <jj@nospam.com> wrote in message news:<R6qdnRNAQY1Tg3_dRVn-hg@comcast
.com>... 

Report this thread to moderator Post Follow-up to this message
Old Post
Paul Raulerson
07-01-04 01:55 AM


Re: interacting with an ACUCOBOL application
You might be able to do it by making your DLL an ActiveX control, and then
firing an event when you want to pass back data, but their Acucobol program
will need to be in an ACCEPT of a screen section entry containing that
control to get the event.  It's not just going to asynchronously interrupt
their program - there has to be an active ACCEPT.

The only other way I can think of is that they could use the mswinsub.c,
which has a startup function that gets called after the main window is
created and you might be able to use that to subclass (or is it superclass?)
the window so it could intercept the messages in the message loop - but then
I'm not sure what they would do with them....


"Mark_R" <mrissmann@yahoo.com> wrote in message
news:7a1f4dab.0406300656.fd4c35d@posting.google.com...
> Thanks for the suggestion but their current calls to my DLL are
> unrelated to what I want to do here. When ever an certain event occurs
> in my application I need to notify their application of the event and
> pass some information over.
>
> I am not set on a using a DLL. Are there any other options? ActiveX?
>
> Thanks,
>
> -Markus
>
>
> "JJ" <jj@nospam.com> wrote in message
news:<R6qdnRNAQY1Tg3_dRVn-hg@comcast.com>... 
you 
Acucobol 
intercept 
runtime.) 
and 
pointers to 
the 



Report this thread to moderator Post Follow-up to this message
Old Post
JJ
07-01-04 08:55 AM


Re: interacting with an ACUCOBOL application
Hey Guys,

Thanks for the help. I will look into all the suggestions! I will try
to get the AcuCobol team to post their findings here.

-Markus


"JJ" <jj@nospam.com> wrote in message news:<BoKdndBlCrLu8n7d4p2dnA@comcast.com>...
> You might be able to do it by making your DLL an ActiveX control, and then
> firing an event when you want to pass back data, but their Acucobol progra
m
> will need to be in an ACCEPT of a screen section entry containing that
> control to get the event.  It's not just going to asynchronously interrupt
> their program - there has to be an active ACCEPT.
>
> The only other way I can think of is that they could use the mswinsub.c,
> which has a startup function that gets called after the main window is
> created and you might be able to use that to subclass (or is it superclass
?)
> the window so it could intercept the messages in the message loop - but th
en
> I'm not sure what they would do with them....
>

Report this thread to moderator Post Follow-up to this message
Old Post
Mark_R
07-01-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:04 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.