Ferror() with MultiThread

This is a discussion on Ferror() with MultiThread within the xharbour forums in Programming Languages category; Hi, Everybody. In this program, ferror() returns 0 when "Multi Thread Support" is checked. The correct would be 2 (file doesnīt exist). FUNCTION MAIN() nHandle := FOPEN( 'teste.txt', 2 ) // 2 = read and write ALERT( 'nhandle = ' + CSTR( nHandle ) + ' ferror() = ' + CSTR( ferror() ) ) // results: // // MT = nhandle = -1 ferror() = 0 // ferror() wrong // Not MT = nhandle = -1 ferror() = 2 // ferror() ok return nil I use xHB Pro Novī97. Itīs necessary to use some command or function in programs to ...

Go Back   Application Development Forum > Programming Languages > xharbour

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-15-2008, 11:23 AM
FabioNery
Guest
 
Default Ferror() with MultiThread

Hi, Everybody.

In this program, ferror() returns 0 when "Multi Thread Support" is checked.
The correct would be 2 (file doesnīt exist).

FUNCTION MAIN()

nHandle := FOPEN( 'teste.txt', 2 ) // 2 = read and write

ALERT( 'nhandle = ' + CSTR( nHandle ) + ' ferror() = ' + CSTR(
ferror() ) )

// results:
//
// MT = nhandle = -1 ferror() = 0 // ferror() wrong
// Not MT = nhandle = -1 ferror() = 2 // ferror() ok

return nil

I use xHB Pro Novī97. Itīs necessary to use some command or function in
programs to use MT?

Other problem occurred: the QUIT don't close the DBF

TIA,
FabioNery







Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 09:08 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.