* contrib/hbwin/mapi.c
! fixed UNICODE conflict after recent LoadLibrary patch.
this file has forced UNICODE off due to MS idiocy so I had
to add more idiocy to interface with properly UNICODE setting
compliant local API
Note, I didn't test non-UNICODE build, if you're interested
in it, pls do it
* contrib/hbwin/tests/testmapi.prg
+ simpleio
* contrib/hbwin/hbwapi.h
* contrib/hbwin/wapi_misc.c
* hbwapi_FileNameAtSystemDir() made static
+ hbwapi_LoadLibrarySystem() public function added
this is safe version of LoadLibrary() when loading Windows
system dlls. it will avoid dll hijacking vulnerability.
! deleted HB_EXPORT from hbwapi_t*() functions, they are
public to this lib due to UNICODE setting dependance
; TODO: make hbwapi_LoadLibrarySystem() effective also for WinCE,
for now it will not add any system path under this platform.
* contrib/hbwin/axcore.c
* contrib/hbwin/mapi.c
* contrib/hbwin/win_prn2.c
* contrib/hbwin/win_prn3.c
* contrib/hbwin/wapi_shellapi.c
! LoadLibrary() -> hbwapi_LoadLibrarySystem()
thus fixing dll hijack vulnerability
* contrib/hbct/hbct.hbp
* raise c dialect to gnu90 on linux for stime()
* contrib/hbwin/wapi_winbase.c
! define WAPI_GET*PATHNAME() as noop functions on wce
* contrib/hbwin/win_shell.c
! made WIN_SHELLNOTIFYICON() a dummy on wce
* contrib/hbwin/mapi.c
! do not undef UNICODE for wce (results in missing LoadLibraryA() on link)
* contrib/hbwin/wapi_commctrl.c
! made WAPI_IMAGELIST_LOADIMAGE() a dummy on wce
* contrib/sddfb/sddfb.hbp
* contrib/hbfbird/hbfbird.hbp
* set c dialect to gnu90 for fbird headers
* contrib/hbpre.hbm
* set c dialect to gnu90 for wce/allmingw for cegcc Windows headers
* contrib/hbwin/mapi.c
! Disabled UNICODE support for WIN_MAPISENDMAIL(). Apparently this
is called "Simple MAPI" interface by Microsoft, it's deprecated
and _doesn't_ support U16 UNICODE. UTF-8 is supposed to be supported
to some extent, but in a weird way, so I'm leaving the implementation
to interested users. I recommend everyone to use hbcurl + hbtip for
sending e-mails.
* contrib/hbwin/win_prn1.c
* contrib/hbwin/hbwapi.h
+ Added public functions to return and retrieve HDC and HPEN
handles. This makes it possible to use these in 3rd party
code and other parts of hbwin lib. F.e. to create pure
wrappers for GDI functions.
+ win_prn1.c now uses hbwapi_ret_*() functions to return
HDC and HPEN handles.
* Renamed static GC related functions.
! WIN_SETPEN() fixed to retrieve pointer from _2nd_ param.
(it was 1st previously, pls review me)
! WIN_SETPEN() fixed to not allocate new GC pointer if
an existing GC pointer was passed as 2nd parameter.
(please review me)
* contrib/hbwin/mapi.c
* contrib/hbwin/wapi_commctrl.c
! Fixed to compile with Cygwin.
[TOMERGE 2.0]
* contrib/hbwin/win_prn1.c
- Deleted unnecessary winspool.h header.
* contrib/hbwin/win_prn2.c
* contrib/hbwin/win_prn3.c
- Deleted winspool.h header for LCC compiler.
We don't support LCC compiler in Harbour.
! Cleaned windows.h inclusion.
* contrib/hbfimage/fi_winfu.c
* contrib/hbfimage/fi_wrp.c
* Formatting.
+ TOFIX added to use GC collected pointers.
* contrib/hbwin/win_prn3.c
* ULONG -> HB_SIZE
! Fixed new warning in hb_tstrncat() (assigment in conditional).
I've now basically restored my original version taken from common lib.
* contrib/hbwin/mapi.c
* Formatting.
* INSTALL
+ Added note that at least QT 4.5.0 is required for Harbour.
[TOMERGE 2.0]
* package/winuni/mpkg_win_uni_extra_copy.bat
+ Copying full source of hbide to Windows binary release.
; TODO: Probably it'd be better to move this tool to examples to
avoid such exceptions.
[TOMERGE 2.0]
* package/winuni/RELNOTES
+ Added link to sf.net files.
* Next Windows binary release to not include HBQT libs
built against static QT libs.
[TOMERGE 2.0]
* contrib/hbwin/mapi.c
! Minor correction / optimization.
[TOMERGE 2.0]
* contrib/hbwin/mapi.c
! Fixed typo causing GPF when using 'long' calling form.
! Fixed not counting recipients when using 'simple' calling form.
; Toninho, could you pls retest?
* contrib/hbwin/hbwin.ch
* contrib/hbwin/tests/testmapi.prg
* contrib/hbwin/mapi.c
+ Added HB_WIN_MAPI_* constants for recipient types.
+ WIN_MAPISENDMAIL() now accept 8th (sender) as simple string,
this will be passed as sender name to Windows.
+ WIN_MAPISENDMAIL() now accept 9th (recipient) parameter
as simple list of strings. Values will be passed as
'TO' recipient names to Windows.
+ WIN_MAPISENDMAIL() now accept 10th (attachment) parameter
as simple list of strings. Values will be passed as
pathname to Windows.
% One minor optimization in WIN_MAPISENDMAIL().
+ Added example for simple form of WIN_MAPISENDMAIL() call.
* contrib/hbwin/mapi.c
* WIN_MAPISENDMAIL() fixed to set sender as MAPI_ORIG.
This is the default value (zero), but we shouldn't assume such things.
+ WIN_MAPISENDMAIL() recipient arrays elements third parameter
is optional.
! WIN_MAPISENDMAIL() fixed to set recipient address type as
MAPI_TO by default (if there is no 3rd element or 3rd element is
non-numeric). So far it was defaulting to MAPI_ORIG in these case,
which is wrong.
! WIN_MAPISENDMAIL() fixed to skip recipient if neither first
nor second element is a non-empty string. It may have caused
GPFs before.
* WIN_MAPISENDMAIL() changed to accept 1st element of file
attachment array list as pathname, and 2nd element as
optional filename. 2nd element is now truly optional, files
won't be skipped if omitted.
Original code accepted filename in 1st element, but it's
cleaner this way and also testmapi.prg calls it this way,
so it might have been a typo.
! WIN_MAPISENDMAIL() fixed file attachments handling to not
cause GPF is 1st array element (pathname) is non-string or
empty. These items will now be skipped.
; Please retest also with bad parameters. And I'd appreciate
if someone could review as it's blind coding.
* contrib/hbwin/mapi.c
+ Added support for unlimited number of recipients and
attached files. Please test and review.
* utils/hbmk2/hbmk2.prg
+ Added support for linux/open64. (Please test)
* INSTALL
+ Added open64.
* contrib/hbwin/mapi.c
+ Added support for UNICODE.
; Untested, I don't have a mailer on any Windows systems I have
access to to try it.
Please make tests with MSVC also, to check UNICODE.
! Fixed typo in prev modification.
! Added ( ULONG ) cast to -1 value.
+ Added copyright header.
* contrib/hbwin/tests/testmapi.prg
+ Added some test data to make it work.
(couldn't test it though, all I get is msgbox that I have no
mailer)
* contrib/hbwin/Makefile
* contrib/hbwin/mapi.c
+ Added to Makefile.
! Added SVN ID.
! Added License header. (pls add your name to copyright headers)
! Fixed to use simple quote to include Harbour headers.
! Fixed Windows header inclusion.
! Disabled for UNICODE.
! Fixed to not use return value on stack as temporary variable.
! Fixed to not use static variable.
! Fixed UNICODE literals (also for WinCE).
! Fixed to not create NULL "holes" in passed to Windows lists
if received arrays have wrong content.
! Fixed to check return value of GetProcAddress().
% Optimized to only do parameter processing if MAPISendMail is available.
* Cleaned string parameter defaulting to "".
* Castings added and changed.
* Optimizations.
* Formatting (indentation, deleted unnecessary {}, variable scopes, ' ;' endings)
* Variable scopes.
* Using HB_SIZE.
* Avoiding duplicating constants.
+ Added some provisions for UNICODE support. Otherwise whole
code is disabled until this gets fully implemented.
; TODO: It'd be probably beneficial to remove artificial limit of
100 recipients and file attachments.
; NOTE: I didn't make any functional tests, so please make some.
An example/test code would be nice in tests subdir.