× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Dynamic Program
  • From: "Jevgeni Astanovski" <jevgeni@xxxxxxxxx>
  • Date: Mon, 26 Jun 2000 11:30:48 +0200 (EET)


> #pragma linkage(somepgm_t, OS)                                defines a 
>connection

> In my application I need to invoke a program which requires 3 parameters.
> Each parameter is in fact declared as an external DS via the #PRAGMA mapinc
> declaration. Do I therefore amend the typedef to look like ......typedef
> void(somepgm_t) (char *a, char *b, char *c)? where a,b, and c are the
> structure names assigned by the compiler?

Mike,
I've nevere used dynamic calls, but often use "static" calls of 
external programs from C. I do not believe, that what you propose is 
correct (may be mistaken). I do not either believe, that you can call 
dynamically programs with different sets of arguments (again...).
What actually the staff with actualization does, is substitutes what 
I write as
#pragma map(MyName, "SOMELIB/SOMENAME")
Now MyName can be used anywhere in a program, as a C-function call.
But for this to be correct, you must prototype it so that compiler 
accept it.
But that mean, that you must know, what parameters does the calling 
program want, so the way you propose - don't believe.
May be you should try void *
typedef void(somepgm_t) (void *, voi *, void *).
There is absolutely no reason using names, assigned by pragma mapinc.
They are absolutely stupid and mean nothing. Valid only inside your 
program and for your convenience.


Jevgeni Astanovski, 
IT Hooldusosakonna juhataja                                
Optiva Pank.
+---
| This is the C/400 Mailing List!
| To submit a new message, send your mail to C400-L@midrange.com.
| To subscribe to this list send email to C400-L-SUB@midrange.com.
| To unsubscribe from this list send email to C400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: bob@cstoneindy.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.