It is currently Tue, 30 Nov 2021 18:31:11 GMT



 
Author Message
 Main function calling another main function
 We have developed an MQSERIES utility that is a function that calls
many related functions and its purpose is to perform a variety of
MQSeries functions with minimal interaction required by the user.  The
user provides the message, an activity code (pd for puts, gd for gets,
pr for putting requests for replies, etc.) and a couple other
parameters.  The user gets back the message, a return flag (good, bad,
truncated, etc).  The coding is done in C/C++.  We developed this on a
Sun Solaris system using workshop.  Our MQSERIES function is a function
of the calling module.  Our function has it's series of includes with
classes, functions, etc.  The calling program needs a couple includes
(to define the passed data areas) and a function prototype of our
function (void mqcmd090(typefilefdi &, typefilemsg &, typefilemdi &);)
and after the user does string copies and so forth into the passed data
areas they currently call the function (mqcmd090(currpassarea,
currmessage, currquetable);) After our function is called these passed
data areas are manipulated by the user's module.  They inquire into the
return code, they may do activity (with message ids, etc), they
manipulate the message and may send it back (replies, etc).  Our dilemma
is this.  The users want our module to be stand-alone.  It should be
compiled and linked by itself.  Their module should be compiled and
linked by it.  They don't mind having a couple includes for the common
passed structures but our modules should not be a function in theirs.

How can I compile our function (and how can they call it) so that we can
keep the communications going both ways between modules?  A system call
can't do it because they can send us information but they can't receive
information back.  If our module needs an upgrade we should just be able
to change and recompile ours and their next execution should get the
changes.

I am at a loss and would greatly appreciate any assistance on this
matter.

Thanks,

Sent via Deja.com http://www.**-**.com/
Before you buy.



 Sun, 27 Apr 2003 08:33:34 GMT   
 
   [ 1 post ] 

Similar Threads

1. Get argv[0] from function!=main

2. ksh functions/main

3. function return string to main script (ksh)

4. I'm looking for main function for kernel Image ( bzImage )

5. Browser calls CGI C function which sets an env var and call a c function crashes

6. C functions calling C++ functions on Solaris

7. function calls versus function pointers ?

8. Tree of Functions calling Functions etc.

9. Call function within a function

10. Non-__init functions calling __init functions


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software