Thanks for your notes. I'll move HB_EXPORT to the beginning of declaration.
Truth is that I totally forgot which scenario and which compiler was the complaining one, so I cannot test if HB_EXPORT is enough in the definition. I remember the warning said that a 'declaration' was missing, so that's what I did. I hope someone can jump in for these .dll things, as it's still a grey area for me. My last thought, but I didn't continue experimenting, was that pcode .dlls will need different liblist in hbmk2 in order to succeed. But the whole thing is trial and error for me. Rdgs, Viktor On Thu, Mar 19, 2009 at 6:49 PM, Przemyslaw Czerpak <dru...@acn.waw.pl>wrote: > On Thu, 19 Mar 2009, Szak�ts Viktor wrote: > > I've added it for one of them... maybe it was ICC, or MSVC, otherwise it > > warned that the entry point won't be exported. > > OK. Only one note: > > BOOL HB_EXPORT WINAPI DllEntryPoint( HINSTANCE hInstance, DWORD > fdwReason, PVOID pvReserved ); > > always add HB_EXPORT before return type otherwise you may have > unexpected behavior, f.e.: > > MYTYPE HBEXPORT func( void ); > > can be compiled if MYTYPE is defined as: > typdef char * MYTYPE > but if you make: > #define MYTYPE char * > then some compiler refuse compilation because they do not accept export > function attribute after * in return type. > > So this should be changed to: > > HB_EXPORT BOOL WINAPI DllEntryPoint( HINSTANCE hInstance, DWORD > fdwReason, PVOID pvReserved ); > > AFAIK it's the only one portable method which will not cause some > wrong results when different compilers are used. > And if possible please check if setting attribute directly in function is > not enough in this case. > In summary it's exception. > > HB_EXPORT BOOL WINAPI DllEntryPoint( HINSTANCE hInstance, DWORD fdwReason, > PVOID pvReserved ) > { > ... > } > > best regards, > Przemek > _______________________________________________ > Harbour mailing list > Harbour@harbour-project.org > http://lists.harbour-project.org/mailman/listinfo/harbour >
_______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour