Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #9047
| From | Martin <Martin@spam.spam> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Strange issue with Item API |
| Date | 2016-02-26 10:24 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <nap8ua$m2f$1@dont-email.me> (permalink) |
This is some code from our routine to read a string from a 2D array. And
we are getting a very stange issue
If the string contains a ; everything goes mad
The text on screen or report in C is blank, but hard reading the string
letters gices text from a different array and element.
This is totally wierd, the code has been like this since we started in
Windows and then that code was migrated from the Clipper ITEM API
Does anyone have any ideas why we are getting strange behavior when
reading an array in C when there is a ;?
Thanks
Martin
ITEM subarr;
ITEM elem;
LPSTR str2;
UINT Type1, Type2;
// Get the sub array
subarr = ItemArrayGet(array, (UINT) row );
G3itemRegister(&subarr);
// Get the element
elem = ItemArrayGet(&subarr, (UINT) element );
G3itemRegister(&elem);
// Get the contents of element
Type1 = ItemType(&elem);
str2 = ItemGetC( &elem );
//wcscpy( (wchar_t *) str, (wchar_t *) str2 );
strcpy(str, (char *)str2);
// Release string
ItemFreeC( (LPBYTE) str2 );
// Free sub array
G3itemRelease( &elem );
// Free main array
G3itemRelease( &subarr );
Back to comp.lang.clipper.visual-objects | Previous | Next — Next in thread | Find similar | Unroll thread
Strange issue with Item API Martin <Martin@spam.spam> - 2016-02-26 10:24 +0000
Re: Strange issue with Item API "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-02-26 11:39 +0100
Re: Strange issue with Item API Martin <Martin@spam.spam> - 2016-02-29 10:13 +0000
Re: Strange issue with Item API Martin <Martin@spam.spam> - 2016-03-21 10:35 +0000
csiph-web