Re: check if a API exists in dll.

From: Ndi (Ndi_at_Ndi_dot_ro)
Date: 11/11/03


Date: Tue, 11 Nov 2003 06:29:21 +0200


> Be careful with those exits, you dont unload the DLL ;)

  I thought about the first one, if handle is zero there is no DLL, thus
there is no need to free the library. I couldn't even if I wanted to, hDll
is zero.

  I didn't think about the second one though :)

  Insert a FreeLibrary just before the second Exit, properly idented, please
...

  Heh. Oh well, it works if you test less then a million APIs ... No, I'm
not feeling OK, why do you ask? :)

-- 
Andrei "Ndi" Dobrin
Brainbench MVP
www.Brainbench.com


Relevant Pages

  • Re: check if a API exists in dll.
    ... > I thought about the first one, if handle is zero there is no DLL, thus ... > Insert a FreeLibrary just before the second Exit, properly idented, please ... Since an Exit is no better than a "Goto", ...
    (borland.public.delphi.nativeapi)
  • Re: This is a classic case of broken by design ;)The fact that your shared memory
    ... We have a DLL, very old, and being used by hundreds of applications. ... When the host exe exits, ... designed to be safe to terminate at any time... ...
    (microsoft.public.win32.programmer.kernel)
  • Unable to call external program/dll
    ... This lead me to try ShellExecute by using a Declare statement. ... It turns out I cannot call any external Dll. ... Return value is always zero. ... is this a "security" fix in xp or office? ...
    (microsoft.public.excel.programming)
  • Re: IMediaControl::Stop() is blocking application during exit.
    ... >>-the object is actually within a DLL for a host application. ... >>Is it illegal to call Stopduring a program exits? ... > function in the DLL before it starts using it, and an uninitialize ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: PowerBASIC
    ... Minimum as in zero, or minimum as in something more than that? ... The minimum that I was able to get for a simple DLL that exports a simple ... statically link to the CRT, ...
    (microsoft.public.vb.general.discussion)