Re: Write System Pointer to User Space
Leif Svalgaard <[email protected]>
| Newsgroups | gmane.comp.lang.as400.mi |
|---|---|
| Message-ID | <[email protected]> |
Peter you have to use the CPYBWP (copy bytes with pointers MI-instruction). That is the only thing that will work. Leif On 6/19/05, Steve Richter <[email protected]> wrote: > > -----Original Message----- > From: mi400-bounces-Zwy7GipZuJhWk0Htik3J/[email protected] [mailto:mi400-bounces-Zwy7GipZuJhWk0Htik3J/[email protected]]On > Behalf Of Peter Daransky > Sent: Friday, June 17, 2005 9:59 PM > To: c400-Zwy7GipZuJhWk0Htik3J/[email protected] > Cc: mi400-Zwy7GipZuJhWk0Htik3J/[email protected] > Subject: [MI400] Write System Pointer to User Space > > > >I try to write resolved system pointer of one object to user space ... > >But it doesn't work for me!? Better sayed i've a C structure with many variables and my wish is >write it complet as a block of data to user space, so that i can later read it with the resolved >pointer ... > >Do i need perform something special (API or MI instruction ...) ? > > Hi Peter, > > This should work. Make sure you are not doing a memcpy copy of the struct to the user space. That would invalidate the system pointer contained in the struct. Also, make sure of the alignment of the data members of the struct. Pointers need to be on a 16 byte boundary and it is possible in C to pack the struct, which might throw off the alignment of the pointers. > > -Steve > > > > _______________________________________________ > This is the MI Programming on the AS400 / iSeries (MI400) mailing list > To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected] > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/mi400 > or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected] > Before posting, please take a moment to review the archives > at http://archive.midrange.com/mi400. > > -- Leif [email protected] _______________________________________________ This is the MI Programming on the AS400 / iSeries (MI400) mailing list To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/mi400 or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected] Before posting, please take a moment to review the archives at http://archive.midrange.com/mi400.