About / What is LibBuild
------------------------

  LibBuild is
   - a Visual Basic 6 Addin to build/update a module with common functions;
   - A set of Visual Basic 6 source code 'snippets'/templates/information;

  The latest official version(s) can be found at http://www.ctuser.net. For
  suggestions, questions, requests or bug reports, send eMail to
  info@ctuser.net.

Requirements
------------

  The addon itself is completely optimized for ansi.

Copying / License / ...
-----------------------

  LibBuild and code 'snippets'/templates are free software; you can redistribute
  them and/or modify them under the terms of the GNU General Public License as
  published by the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful, but WITHOUT
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

  You should have received a copy of the GNU General Public License along with
  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
  Place, Suite 330, Boston, MA  02111-1307  USA

  If you have any questions, suggestions or bug reports about this product,
  contact me: info@ctuser.net; Please do not contact me about general B.A.S.I.C.
  language or A.P.I. issues.

  Files (depending on the package you downloaded, not all files may be included)
   - api\*.def                    API declarations
   - assembly\*.bin               Address-independent binary win32 x86 code
   - assembly\*.fasm              Source code
   - assembly\*.pb                PureBasic test project
   - compat\*.ver                 API compatibility list
   - inc\*.*                      Code 'snippets'/templates
   - legal\*.*                    Copyright, comments, legal stuff/info
   - DoReg.reg                    Import to setup the Add-in
   - LibBuild.*                   Addon, misc files, documentation
   - LibBuild.txt                 Documentation etc.
   - LibBuild_AddIn.*             Add-In source code
   - License.txt                  GNU General Public License
   - Test.*                       For testing in the VB6 ide
   - UnReg.reg                    Import to remove the Add-in

Installation / First time setup:
--------------------------------

  Build the clean addin dll from source.
  Import DoReg.reg to complete registry information.

  Start Visual Basic. Choose 'LibBuild' from the 'Add-Ins' Menu.
  The new toolwindow is VERY SMALL, so resize it now.
  Click 'IncludeDir' to set the LibBuild directoy.

Version history
---------------

  2014.04.01:
    Snippets:
     - Added: CollectionSort_String_IgnoreCase,
              CollectionSort_String_CaseSensitive
     - Added: ListView_Item_GetFirstSelected
              ListView_Item_GetFocused
     - Added: MySQL_IsConnectionAlive
     - Added: MySQL_Reconnect
     - Added: OSIsWin64
     - TrackListBox: Fixed return type from integer to long to avoid crashes;
                     Fixed positioning issue with lists containing more than
                     65535 items
     - MySQL_EscapeValue: % and _ escaping optional, default off (just needed
                          for LIKE statements!)
     - MySQL_EscapeVarValue: % and _ escaping optional, default off (just needed
                             for LIKE statements!)
    API:
     - Added: IsWow64Process

  2013.07.08:
    Important changes:
     - LoadResEx_Image is split. Direct successor is LoadResEx_Image_MultiOS!
       Alternatively you can switch to LoadResEx_Image_MultiColor for high color
       handling (ID-> 16 color, ID/+1 for full color screen mode support), or
       LoadResEx_Image_Classic if only one icon is available.
     - HyperLinkList: Icons are now optionally discardably ('IconDiscardable'),
       means HyperLinkList manages freeing. Will also free if adding an item
       fails!
     - HyperLinkList_InfoDialog uses new interface!
    API:
     - Added: LoadAcceleratorsA / LoadAcceleratorsW
              CreateAcceleratorTableA / CreateAcceleratorTableW
              CopyAcceleratorTableA / CopyAcceleratorTableW
              DestroyAcceleratorTable
     - Added: GetTempPathA / GetTempPathW
     - Added: COORD, SMALL_RECT
     - Added: GetStdHandle
              GetConsoleCP, GetConsoleOutputCP
              WriteConsoleA / WriteConsoleW
              CONSOLE_SCREEN_BUFFER_INFO
              GetConsoleScreenBufferInfo
              FillConsoleOutputCharacterA / FillConsoleOutputCharacterW
              FillConsoleOutputAttribute
              SetConsoleCursorPosition
     - Added: MSG
              GetMessageA / GetMessageW
              IsDialogMessageA / IsDialogMessageW
              TranslateMessage
              DispatchMessageA / DispatchMessageW
              PostQuitMessage
              TranslateAcceleratorA / TranslateAcceleratorW
     - Added: ChangeWindowMessageFilterEx
     - Added: ReadConsoleOutputCharacterA / ReadConsoleOutputCharacterW,
              SetConsoleTitleA / SetConsoleTitleW
     - Added: IsIconic
     - Added: DragAcceptFiles
    Snippets:
     - Added: LoadResEx_Accelerator
     - Added: LoadResEx_ApplyAcceleratorsToMenu
     - Added: ListView_Item_GetImage, ListView_Item_SetImage
              ListView_Item_GetData,
              ListView_Item_SetGhosted, ListView_Item_GetGhosted,
              ListView_Item_SetSingleSelected, ListView_Item_GetSingleSelected,
              ListView_Item_EnsureVisible,
              ListView_Item_SelectInvert,
              ListView_Item_SelectAll,
              ListView_Item_SelectByImage_Dual
     - Added: OEMEncode, OEMDecode
     - Added: CPEncode, CPDecode
     - Added: WriteConsole,
              GetConsoleOutput_Raw,
              ClearConsoleOutput,
              SetConsoleTitle
     - Added: GetTempPath
     - Added: MessageLoop, MessageLoopAccel
     - Added: DropFilesCopy
     - Added: EnableLowPrivDropFiles
     - Added: ctInterpretA, ctInterpretA_CompareVals
     - Added: CreateWindowEx_MainDeskSize, CreateWindowEx_LeftDeskSize
     - Added: EventTimeToFileTime
     - Added: MySQL_Select_GetVarValue
     - Added: MySQL_MultiInsert
     - LoadResEx_Image: Superseed by LoadResEx_Image_MultiOS
                        Also added LoadResEx_Image_MultiColor
                        and LoadResEx_Image_Classic
     - HyperLinkList: New parameter 'IconDiscardable'
     - HyperLinkList_InfoDialog:
        - Fixed an issue with closing brakets
        - New api interface; destroy callback; etc
     - TxtFile_ReadCompleteString: Fixed issue in TxtFile_ReadOpen regarding
                                   TxtFile_ReadCompleteString
     - GetFullFromRelativeFilename: Support for absolute filenames.
     - MySQL_Escape: Now split to MySQL_EscapeField, MySQL_EscapeValue and
                     MySQL_EscapeVarValue
     - LongToDateTripple: Fixed End Function to End Sub
    Assemblies:
     - Added: EventTimeToFileTime

  2013.02.17:
    Add-In:
     - Autogenerating some assembly code blocks within 'Application'
     - [PATCH] section to define procedure assembly patching
    API:
     - Added: SendMessageTimeoutA / SendMessageTimeoutW
    Snippets:
     - Added: FindSplitStrVB_Cr_Lf_CrLf
     - Added: ListView_SetImageList (from MySQL Explorer)
     - Added: ImageList_AddIcon (from MySQL Explorer)
     - Added: PercentEncode / PercentDecode
     - Added: IsGregYear, GetMonthDays, GetMonthDaysFromString
     - Added: GetWeekDayFromLong
     - Added: DateTripleToLong, LongToDateTripple
     - Added: DateStringToLong, LongToDateString
     - Added: VBDateToLong, LongToVBDate
     - Added: MySQL_GetClientInfo, MySQL_GetServerInfo and MySQL_GetHostInfo
              (from MySQL Explorer)
     - Added: UTF8Decode
     - Added: FileExists
     - Added: OLEInterface_CallFunction (use interface functions using interface
              pointer and function offset)
     - Added: OLEInterface_Release (release interface via pointer)
     - Added: OLELoadPictureFromFile (load images using OLE/IPicture)
     - Added: OLELoadPictureFromString (load images using OLE/IPicture)
     - Added: DrawBitmap
     - Added: RawBitmapToBitmapTransparent
     - DrawRawBitmap: Removed
     - IPictureFromFile: Removed. Switch to OLELoadPictureFromFile.
     - IPictureFromString: Removed. Switch to OLELoadPictureFromString.
     - ListView: ListView_Header_Add seperated
     - MkHtml: Renamed to HTMLEncode
     - RawBitmapToBitmapEx: Removed; Switch to RawBitmapToBitmapTransparent or
                            RawBitmapToBitmap
     - TxtFile_ReadLine: Fixed last line not parsed
     - UnHtml: Renamed to HTMLDecode
     - URLEncode/ URLDecode: proper plus sign (de)coding
     - Unicode: Now done by ApplicationStart if OSVersionDependent is not
       included
    Assemblies:
     - Added: FindSplitStrVB_Cr_Lf_CrLf (Returns parameters for Left() and Mid()
              to split string.

  2012.11.08:
    Add-In:
     - Fixed missing include file error when assemblies are used
    Snippets:
     - TxtFile_ReadLine: Now also supporting Mac / Unix text files (Cr / Lf
                         instead of CrLf)
    Assemblies:
     - Added: StrStrW_Cr_Lf_CrLf (Returns first found CR / CRLF / LF, and Bytes
              to skip for next search call

  2012.11.07:
    Add-In:
     - Support for external include/definition files (relative to main .def
       file) using relative paths:
          ".\moreincs.def"
          "..\moreincs.inc"
          "\somedir\moreincs.inc"
          "C:\somedir\moreincs.inc"
       You may choose .inc or .def as extension. Default is .inc;
       If you choose .def, api declarations will be public!
     - Support for custom include dirs (within LibBuild dir)
          "mylibs\myinclude" (mylibs is relative to the LibBuild dir, not the
          'inc' include directory)
    API:
     - Added: CLSIDFromString, CoCreateInstance, GUID
     - Added: DeviceIoControl, STORAGE_HOTPLUG_INFO
     - Added: GrayStringA, GrayStringW
     - Added: SystemTimeToFileTime, CompareFileTime, FileTimeToSystemTime
     - Added: InvalidateRect
    Snippets:
     - Added: TaskbarProgress (LightWeight ITaskbarList3, SetProgressState /
              SetProgressValue only)
     - Added: IsRemoveableDrive
     - RemovableDevices_RegisterAll: Added IsRemoveableDrive for fixed drives
     - Added: GrayString_DrawText
     - Added: GetFullFromRelativeFilename
  
  2012.08.29:
    Add-In:
     - Assembly functionality finally finished. This interface may change in
       later versions.
     - Support for copyright notes via [LEGAL] snippets and [LEGALTEXT] custom
       text
    API:
     - Added: some Winsock (ws2_32) declarations
     - Added: StrStrW (shlwapi)
     - Added: MultiByteToWideChar and WideCharToMultiByte
     - Added: FormatMessageA/FormatMessageW
     - Added: OFNOTIFY
     - Added: SetStretchBltMode
     - Added: hhctrl.ocx declarations
     - WinHelp: Changed params
    Assemblies:
     - Added: StrStrW_CrLf; StrStrW requires shlwapi which is not present in
              early Windows versions, wcsstr would be cdecl (so cdecl will be
              supported eventually)
     - Added: ctCompressA_Decompress (Optimized assembly which previously had
              to be a resource)
    Snippets:
     - Added: GetLocaleInfo (max 16 characters supported currently)
     - Added: DoubleToLocalString (CStr strips decimal seperator to one char)
     - Added: DrawProgressBar, DrawProgressBarEx and DrawProgressBarVB
     - Added: ProgressBar
     - Added: HyperLinkList_InfoDialog, HyperLinkList_InfoDialog_OpenURL (both
              from Calaym aka QuickPlayer)
     - Added: HyperlinkList_GetURLPointerFromItem
     - Added: WinSock, Winsock_GetHostByName, Winsock_Connect, Winsock_Send,
              Winsock_Webserver_ConnectAndRequestHTTP,
              Winsock_HTTPReceiver (Create, GetStatus, Destroy),
              Winsock_WebServer_DiscardAndClose (from AbyChat)
     - Added: ListView, ListView_Clear, ListView_Item_Count,
              ListView_Item_GetText, ListView_Item_IsSelected,
              ListView_Item_Remove, ListView_Item_SelCount, 
              ListView_Item_SetText and ListView_ModifyExStyle (from MySQL
              Explorer)
     - Added: FormatMessage
     - Added: UIntSubUInt
     - Added: HtmlHelp
     - CommonDLG_OpenFiles: Splitted to GetOpenFileName_*,
       GetOpenFileName_Single and GetSaveFileName; GetSaveFileName now
       supports Extensions longer then 3 characters!
     - TxtFile: Rewritten/Renamed, new interface
        - Better encoding support;
        - Can now have multiple files open
        - Added UTF8 bom detection plus (e.g. Winamp m3u8)
        - TxtFile_SetEncode can be appied right during reading (will reencode
                            and preserve position)
     - HyperlinkList_GetURLFromItem is now a seperate snippet
     - GenericInit replaced with Application, TemporaryMemory and
       OSVersionDependent
     - HyperlinkList: Left round brackets preceding URLs now longer selected
     - HyperlinkList: Enhanced padding support; parameter order changed!!!
     - MySQL: MySQL_Init is now obsolete
     - Renamed SetIsVistaOrXP/IsVistaOrXP to SetIsMinWindowsXP/IsMinWindowsXP
     - Added SetIsMinWindows2000W/IsMinWindows2000W
     - Fixed some missing include statements
     - Usage of proper link hilight color for HyperLinkList
     - Added SetIsMinWindows982000/IsMinWindows982000
     - CommonDLG_OpenFiles: FilterIndex parameter (optional byref)
     - GetStrippedCommandLine: Now completely parsed in vb (again); PathGetArgsA
       and PathGetArgsW where quite incomplete and require shlwapi, which is not
       found on early Windows versions.
     - WinHelp: Support for strings as 4th parameter
     - GetFileVersionField: Support for other translations

  2011.11.07:
    Add-In:
     - Renamed lots of variables,
       optimized for speed,
       fixed some case sensitiveness issues
     - Fixed a crash with api definitions without space char after sub/function
       name (or caused by the new 'Lib' statement)
     - Now multiple definition files api\*.def
     - Added 'Lib "<DLLName>"' keyword, stripped 'lib "<DLLName>"' from the
       declarations
    API:
     - Added: some libMySQL declarations
    Snippets:
     - Added: GetBitmapPixelSize
     - Added: RegionSet_Free
     - Added: RegionSet_FromBitmap
     - Added: RegionSet_Load
     - Added: RegionSet_Save
     - Added: RegionSet_ToRegion
     - Added: RawIconToIcon
     - Added: RawIconEntryToIcon
     - Added: RawBitmapToBitmap
     - Added: RawBitmapToBitmapEx
     - Added: BitmapToSpecificBitmap
     - Added: WordWrapText
     - Added: GetTextExtentExPoint_FitInWidth
     - Added: DrawTextGetHeight
     - Added: DrawTextGetWidth
     - Added: MkHtml (from MySQL Explorer)
     - Added: UnHtml (from MySQL Explorer)
     - Added: HyperlinkList (experimental)
     - RegQueryValueEx_DWord: totally changed 'API interface'
     - RegQueryValueEx_DWord_Bool: totally changed 'API interface'
     - TxtFile_Open renamed to TxtFile_ReadOpen (just function name, not include
       file)
     - DrawRawBMP renamed to DrawRawBitmap
     - ApplicationStart / GenericInit / LoadResEx_Icon_Shared:
       LoadResEx_IsHighColor is now set properly even if MaxIconSupport is not
       used
     - CreateDialogIndirectParam: Added hModule parameter
     - GetBuildNumber: Added missing AppBase include definition
     - LoadResEx_SetLanguageFile: Added LoadResEx_String include
     - DialogBoxIndirectParam: Added hModule parameter
     - LoadResEx_StringFromDLL: Removed (previously renamed to
       LoadResEx_StringEx)

  2011.08.27:
    Add-In:
     - Fixed issue with spaces in includes etc
    Snippets:
     - Added: LoadResEx_SetThemeFile
     - Added: Ellipsis_PathSmartStart from QuickPlayer
     - Added: Ellipsis_TextEnd from QuickPlayer
     - Added: DrawTextMod (So not recommend in most eclipsing cases!)
     - Added: AutoSizeXBox_CreateLite
     - Added: AutoSizeXBox_Resize
     - Added: RegisterFileTypes_GetRegistered
     - Added: RegisterFileTypes_SetRegistered
     - Added: RegisterFileTypes_RemoveRegistered
     - Added: ctSSLayer (with lots of directives)
     - Added: ctSSLayer_Devices
     - Added: ctSSLayer_Misc
     - Added: ctSSLayer_Music
     - Added: ctSSLayer_ReadSongInfo
     - Added: LoadResEx_StringEx
     - LoadResEx_WindowIcon: fixed possible endless loop if same theme and
       language file used
     - CallFunction: Fixed missing CallWindowProcAnsi api declaration
     - Lots of changes related to LoadResEx_SetThemeFile
     - minor fixes/cleanups

  2011.01.28
    Snippets:
     - Added: AutoInfo from MySQL Explorer
     - Added: RemovableDevices
     - Added: ToolTip snippets
     - ArraySort snippets have "Shell Sort algorithm!" comment (again)
     - CallFunction snippets: Large changes; now DEP compatible
     - LoadResEx_Dialog_SpinnerHelper: Fixed issue with updown controls with
       values out of range
     - GetAPIPopupMenu: Added conditional code to prevent tooltips
     - GenericInit: Added conditional code to prepare tooltips

  2010.12.16
    Add-In:
     - Now Visual Basic Add-In
    Snippets:
     - DoEventsEx_IsTickCountElapsed triggered if FirstTickCountValue is 0
     - DoEventsEx_GetTickCount will never return 0

