|
I think I see the confusion now. Earlier you had refered to the "C function matctx" which made me believe you were using the C matctx builtins (the _MATCTX1 and _MATCTX2 in my previous note); but what you are actually using is the system API QusMaterializeContext which is not a C function (from my point of view) but rather a system API documented in the System API Reference. As such this API can also be called by other ILE languages (that can define an Open or System pointer anyway). This is not a breach of security. There are many system APIs that provide a function that is not directly available to user state application programs. This is simply one of them. In this particular case IBM knew of developers using the MI MATCTX, knew that it was in the best interest of everyone to allow these developers to work on level 40 and 50 systems, evaluated the specific inputs and outputs of MATCTX, considered the development cost to make developers change to a more formal API (Receiver variable, length, format, error code, etc.) and decided that a simple wrapper of the MATCTX MI instruction would be the most appropriate solution in this specific case. Bruce > >[Leif Svalgaard] Bruce, I've left the entire thread in this posting >to have >the complete context. >Here is first the C-program MATCTX: > >#include <qusmiapi.h> > >void main(int argc, char *argv[]) { >typedef struct { > _SYSPTR SystemPtr; >} s; s* SysPtr; >SysPtr = (s*) argv[2]; >QusMaterializeContext((_SPCPTR) argv[1], > SysPtr->SystemPtr, > ( void *) argv[3]); >} >> >> Interestingly enough, the C function matctx does not have >> that problem. ... >> > +--- | This is the MI Programmers Mailing List! | To submit a new message, send your mail to MI400@midrange.com. | To subscribe to this list send email to MI400-SUB@midrange.com. | To unsubscribe from this list send email to MI400-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: dr2@cssas400.com +---
As an Amazon Associate we earn from qualifying purchases.
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.