>>>>> #include "hbapi.h" >>>>> HB_EXPORT_ATTR PHB_FUNC dll_hb_vmProcAddress( const char * szFuncName ) >>>>> { >>>>> return hb_vmProcAddress( szFuncName ); >>>>> } >> I see. Can't it be added unconditionally for all Windows .exes? >> Is there any downside? > > It enables symbol exporting. It will increase final binaries due to > additional runtime code and DLL symbol table. In MinGW it's about 35Kb. > I know that it's not very much for current desktop computers but I do > not like to link unnecessary code. I do not know what if it cause some > noticeable startup speed overhead but I think it's minor. > > Alternatively we may not touch HBMK2 at all and users can add to their > main .prg code: > > #pragma begindump > #include "hbapi.h" > HB_EXPORT_ATTR PHB_FUNC dll_hb_vmProcAddress( const char * szFuncName ) > { > return hb_vmProcAddress( szFuncName ); > } > #pragma enddump > > I've already implemented the modification I was talking about and used > above code to test them,
Isn't it a solution if we move HB_LIBLOAD() to a separate .c file along with above trigger code, and in this way, if an executable uses this functionality, above stub is always included? Brgds, Viktor _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour