From a0ff50d69e2bc48272eba3a6fbe8f197cdc06234 Mon Sep 17 00:00:00 2001 From: Antonio Linares Date: Mon, 10 Dec 2001 16:40:33 +0000 Subject: [PATCH] some enhancements --- harbour/source/vm/maindll.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/harbour/source/vm/maindll.c b/harbour/source/vm/maindll.c index f3cdcc8352..4a252b2624 100644 --- a/harbour/source/vm/maindll.c +++ b/harbour/source/vm/maindll.c @@ -58,6 +58,7 @@ #define HB_OS_WIN_32_USED #include "hbvm.h" +#include "hbapiitm.h" #if defined(HB_OS_WIN_32) @@ -75,12 +76,21 @@ WINAPI DllEntryPoint( HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved ) HB_SYMBOL_UNUSED( fdwReason ); HB_SYMBOL_UNUSED( pvReserved ); - hb_vmInit( FALSE ); /* Don't execute first linked symbol */ + switch( fdwReason ) + { + case DLL_PROCESS_ATTACH: + hb_vmInit( FALSE ); /* Don't execute first linked symbol */ + break; + + case DLL_PROCESS_DETACH: + /* hb_vmQuit(); */ + break; + } return TRUE; } -LONG PASCAL _export HBENTRY( char * cProcName ) +LONG PASCAL _export HBDLLENTRY( char * cProcName ) { hb_itemDoC( cProcName, 0, 0 );