CloseLibrary()

Everything else that doesn't fall into one of the other PB categories.
Codemonger
Enthusiast
Enthusiast
Posts: 384
Joined: Sat May 24, 2003 8:02 pm
Location: Canada
Contact:

CloseLibrary()

Post 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 ?
<br>"I deliver Justice, not Mercy"

    - Codemonger, 2004 A.D.
Moonshine
Enthusiast
Enthusiast
Posts: 263
Joined: Tue May 25, 2004 12:13 am
Location: UK

Post 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.
Mark my words, when you least expect it, your uppance will come...
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Re: CloseLibrary()

Post 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
Post Reply