This problem has now been resolved. Stephen Cheesman found that the problem in OPPI 5 is that the SetLineNum_DB() function has a erroneous error check for negative values. He says this will be fixed in the next release of OPPI.
The reason I was having a problem is that my test program was reading an existing Geosoft database and attempting to change the line numbers to negative values using the SetLineNum_DB() function. Because of the bug mentioned above it was crashing. If I create a new line in a new database using OPPI 5 I am able to set its line number string to be negative values and even contain arbitrary letters. Thanks for the help. Cheers, Anthony. ----- Original Message ----- From: "Anthony Dunk" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, August 12, 2002 9:31 AM Subject: OPPI problem with negative line numbers > > I've been using both OPPI 4 and OPPI 5 (with the C progamming language) and > have found that neither supports the creation of line symbols with strings > containing negative line numbers. Also, the SetLineNum_DB() function fails > if a negative integer is passed in as the new line number. > > I have encountered Geosoft databases which contain negative line numbers, so > they are obviously allowed, but why doesn't OPPI support setting negative > line numbers ? Is this a bug. And is there a work-around ? > > Here's a sample piece of code which works fine if line numbers are positive > but fails if they're negative: > > // Create line symbol > vnLineHandle[nLine] = > CreateSymbEx_DB(pGeo, &hDB, linenum_str, _l(DB_SYMB_LINE), > _l(DB_OWN_SHARED), _l(DB_CATEGORY_LINE_FLIGHT),&nTemp); > long nLineHandle = vnLineHandle[nLine]; > > // Lock the symbol > LockSymb_DB(pGeo, &hDB, &nLineHandle,_l(DB_LOCK_READWRITE), > _l(DB_WAIT_NONE)); > > // Generate a negative line number - just for testing. This causes the > SetLineNum_DB() function to fail ! > long nNewLineNum = -100+nLine; > SetLineNum_DB(pGeo, &hDB, &nLineHandle, &nNewLineNum); > > // Unlock the symbol > UnLockSymb_DB(pGeo, &hDB, &nLineHandle); > GEO_ERROR; > > Thanks, > Anthony. > > _______________________________________________________ More mailing list info http://www.geosoft.com/support/listserv/index.html
