From: DH Date: Tue, 31 May 2005 08:33:27 +0000 (-0700) Subject: DynaLoader dl_unload_file for win32 ( dl_win32.xs ) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6a57da8629f93682a21ef339fb8f5aaa7cd6a98d;p=p5sagit%2Fp5-mst-13.2.git DynaLoader dl_unload_file for win32 ( dl_win32.xs ) Message-ID: <20050531153327.85145.qmail@unknown-209-73-178-237.yahoo.com> (with a couple of minor tweaks) p4raw-id: //depot/perl@24679 --- diff --git a/win32/dl_win32.xs b/win32/dl_win32.xs index 4ff00a1..b69ad27 100644 --- a/win32/dl_win32.xs +++ b/win32/dl_win32.xs @@ -129,6 +129,18 @@ dl_load_file(filename,flags=0) sv_setiv( ST(0), (IV)RETVAL); } +int +dl_unload_file(libref) + void * libref + CODE: + DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dl_unload_file(%lx):\n", PTR2ul(libref))); + RETVAL = FreeLibrary(libref); + if (!RETVAL) + SaveError(aTHX_ "unload_file:%s", OS_Error_String(aTHX)) ; + DLDEBUG(2,PerlIO_printf(Perl_debug_log, " retval = %d\n", RETVAL)); + OUTPUT: + RETVAL + void * dl_find_symbol(libhandle, symbolname) void * libhandle