Page 1 of 1

CloseLibrary()

Posted: Fri Jul 30, 2004 7:24 pm
by Codemonger
when End is called is that equivelant to ExitProcess ... If so then I guess it would close all DLL's that are opened by the program using Open Library ? or no because OpenLibrary is opening DLL's @ runtime ?

If not does PB go through all opened libraries and close them at the end ?

Just curious if anyone knows ?

Posted: Fri Jul 30, 2004 9:06 pm
by Moonshine
While it may not apply to the library functions, the help file description for CloseFile() says:

Close the specified #File and it can't be used anymore for later use. Closing a file ensure the buffer will be put effictively on the disk. Note: when the program ends, PureBasic is smart enough to close all the opened files, so it's useless to do it.

If it is smart enough to close opened files, I dont see why it cant close opened libraries.

Re: CloseLibrary()

Posted: Fri Jul 30, 2004 9:26 pm
by NoahPhense
Codemonger wrote:when End is called is that equivelant to ExitProcess ... If so then I guess it would close all DLL's that are opened by the program using Open Library ? or no because OpenLibrary is opening DLL's @ runtime ?

If not does PB go through all opened libraries and close them at the end ?

Just curious if anyone knows ?
It's always good habit to ClostLibrary(lib#) before End ..

- np