Home > Archive > MSDN > June 2004 > FreeLibrary() and DeleteFile() Windows API's functions
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
FreeLibrary() and DeleteFile() Windows API's functions
|
|
| Alessandro Costa 2004-06-29, 8:55 am |
| Hi,
Into a my library called my_library.dll I use another dll called other_library.dll loaded with the function LoadLibrary(), at the end of my cicle I use the FreeLeibrary() for release the other_library.dll and after I delete the library with the DeleteFile
() function, but the reply code returned from the GetLastError() is ERROR_ACCESS_DENIED.
Question:
How I can delete a library.dll after released it with FreeLibrary() ?
thanks
Alessandro
| |
| Patrick Philippot 2004-06-29, 3:56 pm |
| Alessandro Costa wrote:
> Into a my library called my_library.dll I use another dll called
> other_library.dll loaded with the function LoadLibrary(), at the end
> of my cicle I use the FreeLeibrary() for release the
> other_library.dll and after I delete the library with the
> DeleteFile() function, but the reply code returned from the
> GetLastError() is ERROR_ACCESS_DENIED.
>
> Question:
> How I can delete a library.dll after released it with FreeLibrary() ?
Hi Alessandro,
This is not the right place for discussing this topic. You should post
to microsoft.public.win32.programmer.kernel for example.
Anyway, I guess that the DLL is probably in use by another (or the same)
process. You can verify this easily with tools like Process Explorer or
ModuleList. I guess you have a favorite tool for enumerating the loaded
DLLs and their client processes.
--
Patrick Philippot - Microsoft MVP [.Net]
MainSoft Consulting Services
www.mainsoft.fr
| |
| Alessandro Costa 2004-06-29, 3:56 pm |
| Hi Patrick,
thanks for the answer, but I have check with the tool ProceXp.exe and the my loaded dll isn't more in use, but I can't delete it !
"Patrick Philippot" wrote:
> Alessandro Costa wrote:
>
> Hi Alessandro,
>
> This is not the right place for discussing this topic. You should post
> to microsoft.public.win32.programmer.kernel for example.
>
> Anyway, I guess that the DLL is probably in use by another (or the same)
> process. You can verify this easily with tools like Process Explorer or
> ModuleList. I guess you have a favorite tool for enumerating the loaded
> DLLs and their client processes.
>
> --
> Patrick Philippot - Microsoft MVP [.Net]
> MainSoft Consulting Services
> www.mainsoft.fr
>
>
>
|
|
|
|
|