ReadFile and WriteFile retvals

The engine.
Post Reply
nikkne
Posts: 19
Joined: Tue Mar 18, 2008 8:03 pm

ReadFile and WriteFile retvals

Post by nikkne »

Hi,
I just started using SMILE, and I'm having some problems.

What are the return values of ReadFile and WriteFile? WriteFile returns 0, there is no file created, and I cannot figure out why. Is there any function/method for more diagnosis?

Thanks,
Nikola
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: ReadFile and WriteFile retvals

Post by shooltz[BayesFusion] »

nikkne wrote:What are the return values of ReadFile and WriteFile?
This entry has some basic information on error handling:

http://genie.sis.pitt.edu/wiki/Applicat ... r_Handling

DSL_OKAY is #defined to zero, so it seems that WriteFile does the job. Are you sure your filename isn't /dev/null? :)
Is there any function/method for more diagnosis?
You may also try to add the following line at the beginning of your program:
ErrorH.RedirectToFile(stdout);
nikkne
Posts: 19
Joined: Tue Mar 18, 2008 8:03 pm

Post by nikkne »

Thanks!

No, I was not using /dev/null :))
But I'm using SMILE from C code, so DSL_network creation silently failed. After fixing that problem, everything works fine.

Cheers,
Nikola
Post Reply