Changeset 141


Ignore:
Timestamp:
Mar 8, 2007, 10:42:50 AM (17 years ago)
Author:
イグトランス (egtra)
Message:

#50 API宣言の変更完了

Location:
Include
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • Include/api_commctrl.sbp

    r7 r141  
    22#ifndef _INC_COMMCTRL
    33#define _INC_COMMCTRL
     4
     5#ifdef UNICODE
     6Const _FuncName_CreateStatusWindow = "CreateStatusWindowW"
     7#else
     8Const _FuncName_CreateStatusWindow = "CreateStatusWindowA"
     9#endif
    410
    511
     
    2834    dwICC As DWord
    2935End Type
    30 Declare Function InitCommonControlsEx Lib "comctl32" (ByRef lpInitCtrls As INITCOMMONCONTROLSEX) As BOOL
     36Declare Function InitCommonControlsEx Lib "comctl32" (ByRef InitCtrls As INITCOMMONCONTROLSEX) As BOOL
    3137
    3238Declare Sub InitCommonControls Lib "comctl32" ()
     
    481487Const SBN_SIMPLEMODECHANGE = 880
    482488
    483 Declare Function CreateStatusWindow Lib "comctl32" Alias "CreateStatusWindowA" (style As Long, lpszText As LPSTR, hwndParent As HWND, wID As DWord) As HWND
     489Declare Function CreateStatusWindow Lib "comctl32" Alias _FuncName_CreateStatusWindow (style As Long, lpszText As LPCTSTR, hwndParent As HWND, wID As DWord) As HWND
    484490
    485491
  • Include/api_commdlg.sbp

    r1 r141  
    33#ifndef _INC_COMMDLG
    44#define _INC_COMMDLG
     5
     6#ifdef UNICODE
     7Const _FuncName_ChooseColor = "ChooseColorW"
     8Const _FuncName_ChooseFont = "ChooseFontW"
     9Const _FuncName_FindText = "FindTextW"
     10Const _FuncName_GetOpenFileName = "GetOpenFileNameW"
     11Const _FuncName_GetSaveFileName = "GetSaveFileNameW"
     12Const _FuncName_GetFileTitle = "GetFileTitleW"
     13Const _FuncName_PageSetupDlg = "PageSetupDlgW"
     14Const _FuncName_PrintDlg = "PrintDlgW"
     15#else
     16Const _FuncName_ChooseColor = "ChooseColorA"
     17Const _FuncName_ChooseFont = "ChooseFontA"
     18Const _FuncName_FindText = "FindTextA"
     19Const _FuncName_GetOpenFileName = "GetOpenFileNameA"
     20Const _FuncName_GetSaveFileName = "GetSaveFileNameA"
     21Const _FuncName_GetFileTitle = "GetFileTitleA"
     22Const _FuncName_PageSetupDlg = "PageSetupDlgA"
     23Const _FuncName_PrintDlg = "PrintDlgA"
     24#endif
    525
    626TypeDef LPCOMMDLGHOOKPROC = *Function(hdlg As HWND, uiMsg As DWord, wp As WPARAM, lp As LPARAM) As ULONG_PTR
     
    6686Const CC_ANYCOLOR =             &H00000100
    6787TypeDef LPCCHOOKPROC = LPCOMMDLGHOOKPROC
    68 Type CHOOSECOLOR
     88Type CHOOSECOLORW
     89    lStructSize    As DWord
     90    hwndOwner      As HWND
     91    hInstance      As HINSTANCE
     92    rgbResult      As DWord
     93    lpCustColors   As *DWord
     94    Flags          As DWord
     95    lCustData      As DWord
     96    lpfnHook       As LPCCHOOKPROC
     97    lpTemplateName As LPCWSTR
     98End Type
     99Type CHOOSECOLORA
    69100    lStructSize    As DWord
    70101    hwndOwner      As HWND
     
    77108    lpTemplateName As LPCSTR
    78109End Type
    79 Declare Function ChooseColor Lib "comdlg32" Alias "ChooseColorA" (ByRef lpcc As CHOOSECOLOR) As BOOL
     110#ifdef UNICODE
     111TypeDef CHOOSECOLOR = CHOOSECOLORW
     112#else
     113TypeDef CHOOSECOLOR = CHOOSECOLORA
     114#endif
     115Declare Function ChooseColor Lib "comdlg32" Alias _FuncName_ChooseColor (ByRef cc As CHOOSECOLOR) As BOOL
    80116
    81117
     
    118154Const REGULAR_FONTTYPE =    &H0400
    119155TypeDef LPCFHOOKPROC = LPCOMMDLGHOOKPROC
    120 Type CHOOSEFONT
     156Type CHOOSEFONTW
    121157    lStructSize            As DWord
    122158    hwndOwner              As HWND
    123159    hDC                    As HDC
    124     lpLogFont              As *LOGFONT
     160    lpLogFont              As *LOGFONTW
     161    iPointSize             As Long
     162    Flags                  As DWord
     163    rgbColors              As DWord
     164    lCustData              As LPARAM
     165    lpfnHook               As LPCFHOOKPROC
     166    lpTemplateName         As LPCWSTR
     167    hInstance              As HINSTANCE
     168    lpszStyle              As LPWSTR
     169    nFontType              As Word
     170    ___MISSING_ALIGNMENT__ As Word
     171    nSizeMin               As Long
     172    nSizeMax               As Long
     173End Type
     174Type CHOOSEFONTA
     175    lStructSize            As DWord
     176    hwndOwner              As HWND
     177    hDC                    As HDC
     178    lpLogFont              As *LOGFONTA
    125179    iPointSize             As Long
    126180    Flags                  As DWord
     
    136190    nSizeMax               As Long
    137191End Type
    138 Declare Function ChooseFont Lib "comdlg32" Alias "ChooseFontA" (ByRef lpcf As CHOOSEFONT) As BOOL
     192#ifdef UNICODE
     193TypeDef CHOOSEFONT = CHOOSEFONTW
     194#else
     195TypeDef CHOOSEFONT = CHOOSEFONTA
     196#endif
     197Declare Function ChooseFont Lib "comdlg32" Alias _FuncName_ChooseFont (ByRef cf As CHOOSEFONT) As BOOL
    139198
    140199
     
    160219Const FR_HIDEWHOLEWORD =              &H00010000
    161220TypeDef LPFRHOOKPROC = LPCOMMDLGHOOKPROC
    162 Type FINDREPLACE
     221Type FINDREPLACEW
     222    lStructSize      As DWord
     223    hwndOwner        As HWND
     224    hInstance        As HINSTANCE
     225    Flags            As DWord
     226    lpstrFindWhat    As LPWSTR
     227    lpstrReplaceWith As LPWSTR
     228    wFindWhatLen     As Word
     229    wReplaceWithLen  As Word
     230    lCustData        As LPARAM
     231    lpfnHook         As LPFRHOOKPROC
     232    lpTemplateName   As LPCWSTR
     233End Type
     234Type FINDREPLACEA
    163235    lStructSize      As DWord
    164236    hwndOwner        As HWND
     
    173245    lpTemplateName   As LPCSTR
    174246End Type
    175 Declare Function FindText Lib "comdlg32" Alias "FindTextA" (ByRef lpfr As FINDREPLACE) As BOOL
     247#ifdef UNICODE
     248TypeDef FINDREPLACE = FINDREPLACEW
     249#else
     250TypeDef FINDREPLACE = FINDREPLACEA
     251#endif
     252Declare Function FindText Lib "comdlg32" Alias _FuncName_FindText (ByRef fr As FINDREPLACE) As BOOL
    176253
    177254
     
    204281Const OFN_ENABLESIZING =           &H00800000
    205282TypeDef LPOFNHOOKPROC = LPCOMMDLGHOOKPROC
    206 Type OPENFILENAME
     283Type OPENFILENAMEW
     284    lStructSize       As DWord
     285    hwndOwner         As HWND
     286    hInstance         As HINSTANCE
     287    lpstrFilter       As LPCWSTR
     288    lpstrCustomFilter As LPWSTR
     289    nMaxCustFilter    As DWord
     290    nFilterIndex      As DWord
     291    lpstrFile         As LPWSTR
     292    nMaxFile          As DWord
     293    lpstrFileTitle    As LPWSTR
     294    nMaxFileTitle     As DWord
     295    lpstrInitialDir   As LPCWSTR
     296    lpstrTitle        As LPCWSTR
     297    Flags             As DWord
     298    nFileOffset       As Word
     299    nFileExtension    As Word
     300    lpstrDefExt       As LPCWSTR
     301    lCustData         As LPARAM
     302    lpfnHook          As LPOFNHOOKPROC
     303    lpTemplateName    As LPCWSTR
     304End Type
     305Type OPENFILENAMEA
    207306    lStructSize       As DWord
    208307    hwndOwner         As HWND
     
    226325    lpTemplateName    As LPCSTR
    227326End Type
    228 Declare Function GetOpenFileName Lib "comdlg32" Alias "GetOpenFileNameA" (ByRef lpofn As OPENFILENAME) As BOOL
    229 Declare Function GetSaveFileName Lib "comdlg32" Alias "GetSaveFileNameA" (ByRef lpofn As OPENFILENAME) As BOOL
    230 Declare Function GetFileTitle Lib "comdlg32" Alias "GetFileTitleA" (lpszFile As LPCSTR, lpszTitle As LPSTR, cbBuf As Word) As Integer
     327#ifdef UNICODE
     328TypeDef OPENFILENAME = OPENFILENAMEW
     329#else
     330TypeDef OPENFILENAME = OPENFILENAMEA
     331#endif
     332Declare Function GetOpenFileName Lib "comdlg32" Alias _FuncName_GetOpenFileName (ByRef ofn As OPENFILENAME) As BOOL
     333Declare Function GetSaveFileName Lib "comdlg32" Alias _FuncName_GetSaveFileName (ByRef ofn As OPENFILENAME) As BOOL
     334Declare Function GetFileTitle Lib "comdlg32" Alias _FuncName_GetFileTitle (lpszFile As LPCTSTR, lpszTitle As LPTSTR, cbBuf As Word) As Integer
    231335
    232336
     
    255359TypeDef LPPAGESETUPHOOK = LPCOMMDLGHOOKPROC
    256360TypeDef LPPAGEPAINTHOOK = LPCOMMDLGHOOKPROC
    257 Type PAGESETUPDLG
     361Type PAGESETUPDLGW
     362    lStructSize             As DWord
     363    hwndOwner               As HWND
     364    hDevMode                As HGLOBAL
     365    hDevNames               As HGLOBAL
     366    Flags                   As DWord
     367    ptPaperSize             As POINTAPI
     368    rtMinMargin             As RECT
     369    rtMargin                As RECT
     370    hInstance               As HINSTANCE
     371    lCustData               As LPARAM
     372    lpfnPageSetupHook       As LPPAGESETUPHOOK
     373    lpfnPagePaintHook       As LPPAGEPAINTHOOK
     374    lpPageSetupTemplateName As LPCWSTR
     375    hPageSetupTemplate      As HGLOBAL
     376End Type
     377Type PAGESETUPDLGA
    258378    lStructSize             As DWord
    259379    hwndOwner               As HWND
     
    271391    hPageSetupTemplate      As HGLOBAL
    272392End Type
    273 Declare Function PageSetupDlg Lib "comdlg32" Alias "PageSetupDlgA" (ByRef lppsd As PAGESETUPDLG) As BOOL
     393#ifdef UNICODE
     394TypeDef PAGESETUPDLG = PAGESETUPDLGW
     395#else
     396TypeDef PAGESETUPDLG = PAGESETUPDLGA
     397#endif
     398
     399Declare Function PageSetupDlg Lib "comdlg32" Alias _FuncName_PageSetupDlg (ByRef psd As PAGESETUPDLG) As BOOL
    274400
    275401
     
    304430TypeDef LPSETUPHOOKPROC = LPCOMMDLGHOOKPROC
    305431#ifdef _WIN64
    306 Type PRINTDLG
    307 #else
    308 Type Align(1) PRINTDLG
     432Type PRINTDLGW
     433#else
     434Type Align(1) PRINTDLGW
     435#endif
     436    lStructSize         As DWord
     437    hwndOwner           As HWND
     438    hDevMode            As HGLOBAL
     439    hDevNames           As HGLOBAL
     440    hDC                 As HDC
     441    Flags               As DWord
     442    nFromPage           As Word
     443    nToPage             As Word
     444    nMinPage            As Word
     445    nMaxPage            As Word
     446    nCopies             As Word
     447    hInstance           As HINSTANCE
     448    lCustData           As LPARAM
     449    lpfnPrintHook       As LPPAGEPAINTHOOK
     450    lpfnSetupHook       As LPSETUPHOOKPROC
     451    lpPrintTemplateName As LPCWSTR
     452    lpSetupTemplateName As LPCWSTR
     453    hPrintTemplate      As HGLOBAL
     454    hSetupTemplate      As HGLOBAL
     455End Type
     456#ifdef _WIN64
     457Type PRINTDLGA
     458#else
     459Type Align(1) PRINTDLGA
    309460#endif
    310461    lStructSize         As DWord
     
    328479    hSetupTemplate      As HGLOBAL
    329480End Type
    330 Declare Function PrintDlg Lib "comdlg32" Alias "PrintDlgA" (ByRef lppd As PRINTDLG) As BOOL
     481#ifdef UNICODE
     482TypeDef PRINTDLG = PRINTDLGW
     483#else
     484TypeDef PRINTDLG = PRINTDLGA
     485#endif
     486Declare Function PrintDlg Lib "comdlg32" Alias _FuncName_PrintDlg (ByRef pd As PRINTDLG) As BOOL
    331487
    332488
  • Include/api_console.sbp

    r122 r141  
    9898Type CHAR_INFO
    9999'   Union Char
    100 '       UnicodeChar As Word
     100'       UnicodeChar As WCHAR
    101101        AsciiChar[1] As SByte
    102102'   End Union
  • Include/api_gdi.sbp

    r137 r141  
    66
    77#ifdef UNICODE
     8Const _FuncName_CopyEnhMetaFile = "CopyEnhMetaFileW"
     9Const _FuncName_CopyMetaFile = "CopyMetaFileW"
     10Const _FuncName_CreateDC = "CreateDCW"
     11Const _FuncName_CreateEnhMetaFile = "CreateEnhMetaFileW"
     12Const _FuncName_CreateMetaFile = "CreateMetaFileW"
     13Const _FuncName_CreateFont = "CreateFontW"
    814Const _FuncName_CreateFontIndirect = "CreateFontIndirectW"
     15Const _FuncName_GetEnhMetaFile = "GetEnhMetaFileW"
     16Const _FuncName_GetEnhMetaFileDescription = "GetEnhMetaFileDescriptionW"
     17Const _FuncName_GetObject = "GetObjectW"
     18Const _FuncName_GetTextMetrics = "GetTextMetricsW"
     19Const _FuncName_ResetDC = "ResetDCW"
     20Const _FuncName_StartDoc = "StartDocW"
     21Const _FuncName_wglUseFontBitmaps = "wglUseFontBitmapsW"
     22Const _FuncName_wglUseFontOutlines = "wglUseFontOutlinesW"
    923#else
     24Const _FuncName_CopyEnhMetaFile = "CopyEnhMetaFileA"
     25Const _FuncName_CopyMetaFile = "CopyMetaFileA"
     26Const _FuncName_CreateDC = "CreateDCA"
     27Const _FuncName_CreateEnhMetaFile = "CreateEnhMetaFileA"
     28Const _FuncName_CreateMetaFile = "CreateMetaFileA"
     29Const _FuncName_CreateFont = "CreateFontA"
    1030Const _FuncName_CreateFontIndirect = "CreateFontIndirectA"
     31Const _FuncName_GetEnhMetaFile = "GetEnhMetaFileA"
     32Const _FuncName_GetEnhMetaFileDescription = "GetEnhMetaFileDescriptionA"
     33Const _FuncName_GetObject = "GetObjectA"
     34Const _FuncName_GetTextMetrics = "GetTextMetricsA"
     35Const _FuncName_ResetDC = "ResetDCA"
     36Const _FuncName_StartDoc = "StartDocA"
     37Const _FuncName_wglUseFontBitmaps = "wglUseFontBitmapsA"
     38Const _FuncName_wglUseFontOutlines = "wglUseFontOutlinesA"
    1139#endif
    1240
     
    402430Const CCHDEVICENAME = 32
    403431Const CCHFORMNAME = 32
    404 Type _devicemodeA
    405     dmDeviceName[ELM(CCHDEVICENAME)] As Byte
     432Type DEVMODEW
     433    dmDeviceName[ELM(CCHDEVICENAME)] As WCHAR
    406434    dmSpecVersion As Word
    407435    dmDriverVersion As Word
     
    422450    dmTTOption As Integer
    423451    dmCollate As Integer
    424     dmFormName[ELM(CCHFORMNAME)] As Byte
     452    dmFormName[ELM(CCHFORMNAME)] As WCHAR
    425453    dmLogPixels As Word
    426454    dmBitsPerPel As DWord
     
    438466    dmPanningHeight As DWord
    439467End Type
    440 TypeDef DEVMODEA = _devicemodeA
     468Type DEVMODEA
     469    dmDeviceName[ELM(CCHDEVICENAME)] As SByte
     470    dmSpecVersion As Word
     471    dmDriverVersion As Word
     472    dmSize As Word
     473    dmDriverExtra As Word
     474    dmFields As DWord
     475    dmOrientation As Integer
     476    dmPaperSize As Integer
     477    dmPaperLength As Integer
     478    dmPaperWidth As Integer
     479    dmScale As Integer
     480    dmCopies As Integer
     481    dmDefaultSource As Integer
     482    dmPrintQuality As Integer
     483    dmColor As Integer
     484    dmDuplex As Integer
     485    dmYResolution As Integer
     486    dmTTOption As Integer
     487    dmCollate As Integer
     488    dmFormName[ELM(CCHFORMNAME)] As SByte
     489    dmLogPixels As Word
     490    dmBitsPerPel As DWord
     491    dmPelsWidth As DWord
     492    dmPelsHeight As DWord
     493    dmDisplayFlags As DWord
     494    dmDisplayFrequency As DWord
     495    dmICMMethod As DWord
     496    dmICMIntent As DWord
     497    dmMediaType As DWord
     498    dmDitherType As DWord
     499    dmReserved1 As DWord
     500    dmReserved2 As DWord
     501    dmPanningWidth As DWord
     502    dmPanningHeight As DWord
     503End Type
     504#ifdef UNICODE
     505TypeDef DEVMODE = DEVMODEW
     506#else
    441507TypeDef DEVMODE = DEVMODEA
    442 
     508#endif
    443509
    444510' Binary raster ops
     
    480546End Type
    481547
    482 Type DOCINFO
     548Type DOCINFOW
     549    cbSize As Long
     550    lpszDocName As LPCWSTR
     551    lpszOutput As LPCWSTR
     552    lpszDatatype As LPCWSTR
     553    fwType As DWord
     554End Type
     555Type DOCINFOA
    483556    cbSize As Long
    484557    lpszDocName As LPCSTR
     
    487560    fwType As DWord
    488561End Type
     562#ifdef UNICODE
     563TypeDef DOCINFO = DOCINFOW
     564#else
     565TypeDef DOCINFO = DOCINFOA
     566#endif
    489567
    490568'-------------------
     
    508586Const RGN_COPY = 5
    509587Declare Function CombineRgn Lib "gdi32" (hrgnDest As HRGN, hrgnSrc1 As HRGN, hrgnSrc2 As HRGN, fnCombineMode As Long) As Long
    510 Declare Function CopyEnhMetaFile Lib "gdi32" Alias "CopyEnhMetaFileA" (hemfSrc As HENHMETAFILE, pszFile As PCSTR) As HENHMETAFILE
    511 Declare Function CopyMetaFile Lib "gdi32" Alias "CopyMetaFileA" (hmfSrc As HMETAFILE, pszFile As PCSTR) As HMETAFILE
     588Declare Function CopyEnhMetaFile Lib "gdi32" Alias _FuncName_CopyEnhMetaFile (hemfSrc As HENHMETAFILE, pszFile As PCTSTR) As HENHMETAFILE
     589Declare Function CopyMetaFile Lib "gdi32" Alias _FuncName_CopyMetaFile (hmfSrc As HMETAFILE, pszFile As PCTSTR) As HMETAFILE
    512590Declare Function CreateBitmap Lib "gdi32" (nWidth As Long, nHeight As Long, cPlanes As Long, cBitsPerPel As Long, lpvBits As VoidPtr) As HBITMAP
    513 Declare Function CreateBitmapIndirect Lib "gdi32" (ByRef lpbm As BITMAP) As HBITMAP
     591Declare Function CreateBitmapIndirect Lib "gdi32" (ByRef bm As BITMAP) As HBITMAP
    514592
    515593Const BS_SOLID =          0
     
    541619Declare Function CreateCompatibleBitmap Lib "gdi32" (hdc As HDC, nWidth As Long, nHeight As Long) As HBITMAP
    542620Declare Function CreateCompatibleDC Lib "gdi32" (hdc As HDC) As HDC
    543 Declare Function CreateDC Lib "gdi32" Alias "CreateDCA" (lpszDriver As PCSTR, lpszDevice As PCSTR, lpszOutput As PCSTR, ByRef lpInitData As DEVMODE) As HDC
     621Declare Function CreateDC Lib "gdi32" Alias _FuncName_CreateDC (pszDriver As PCTSTR, pszDevice As PCTSTR, pszOutput As PCTSTR, ByRef InitData As DEVMODE) As HDC
    544622
    545623Const CBM_INIT = &H04
    546 Declare Function CreateDIBitmap Lib "gdi32" (hdc As HDC, ByRef lpbmih As BITMAPINFOHEADER, fdwInit As Long, lpbInit As VoidPtr, ByRef lpbmi As BITMAPINFO, fuUsage As Long) As HBITMAP
     624Declare Function CreateDIBitmap Lib "gdi32" (hdc As HDC, ByRef bmih As BITMAPINFOHEADER, fdwInit As Long, lpbInit As VoidPtr, ByRef bmi As BITMAPINFO, fuUsage As Long) As HBITMAP
    547625
    548626Declare Function CreateDIBPatternBrushPt Lib "gdi32" (lpPackedDIB As VoidPtr, iUsage As Long) As HBRUSH
     
    550628Declare Function CreateEllipticRgn Lib "gdi32" (nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As HRGN
    551629Declare Function CreateEllipticRgnIndirect Lib "gdi32" (ByRef lpRect As RECT) As HRGN
    552 Declare Function CreateEnhMetaFile Lib "gdi32" Alias "CreateEnhMetaFileA" (hdcRef As HDC, pFileName As PCTSTR, ByRef Rect As RECT, pDescription As PCTSTR) As HDC
    553 Declare Function CreateMetaFile Lib "gdi32" Alias "CreateMetaFileA" (pFileName As PCTSTR) As HDC
     630Declare Function CreateEnhMetaFile Lib "gdi32" Alias _FuncName_CreateEnhMetaFile (hdcRef As HDC, pFileName As PCTSTR, ByRef Rect As RECT, pDescription As PCTSTR) As HDC
     631Declare Function CreateMetaFile Lib "gdi32" Alias _FuncName_CreateMetaFile (pFileName As PCTSTR) As HDC
    554632
    555633Const FW_DONTCARE =       0
     
    625703Const FF_SCRIPT =         &H00040000
    626704Const FF_DECORATIVE =     &H00050000
    627 Declare Function CreateFont Lib "gdi32" Alias "CreateFontA" (nHeight As Long, nWidth As Long, nEscapement As Long, nOrientation As Long, fnWeight As Long, fdwItalic As DWord, fdwUnderline As DWord, fdwStrikeOut As DWord, fdwCharSet As DWord, fdwOutputPrecision As DWord, fdwClipPrecision As DWord, fdwQuality As DWord, fdwPitchAndFamily As DWord, lpszFace As PCSTR) As HFONT
     705Declare Function CreateFont Lib "gdi32" Alias _FuncName_CreateFont (nHeight As Long, nWidth As Long, nEscapement As Long, nOrientation As Long, fnWeight As Long, fdwItalic As DWord, fdwUnderline As DWord, fdwStrikeOut As DWord, fdwCharSet As DWord, fdwOutputPrecision As DWord, fdwClipPrecision As DWord, fdwQuality As DWord, fdwPitchAndFamily As DWord, lpszFace As PCTSTR) As HFONT
    628706
    629707Const LF_FACESIZE = 32
     
    642720    lfQuality As Byte
    643721    lfPitchAndFamily As Byte
    644     lfFaceName[ELM(LF_FACESIZE)] As Byte
     722    lfFaceName[ELM(LF_FACESIZE)] As SByte
    645723End Type
    646724Type LOGFONTW
     
    726804Declare Function ExtTextOutW Lib "gdi32" (hdc As HDC, x As Long, y As Long, fuOptions As DWord, ByRef rc As RECT, lpString As PCWSTR, cbCount As Long, pDx As *Long) As Long
    727805#ifdef UNICODE
    728 Declare Function ExtTextOut Lib "gdi32" Alias "ExtTextOutW" (hdc As HDC, x As Long, y As Long, fuOptions As DWord, ByRef rc As RECT, lpString As PCTSTR, cbCount As Long, pDx As *Long) As Long
     806Declare Function ExtTextOut Lib "gdi32" Alias "ExtTextOutW" (hdc As HDC, x As Long, y As Long, fuOptions As DWord, ByRef rc As RECT, pString As PCWSTR, cbCount As Long, pDx As *Long) As Long
    729807#else
    730 Declare Function ExtTextOut Lib "gdi32" Alias "ExtTextOutA" (hdc As HDC, x As Long, y As Long, fuOptions As DWord, ByRef rc As RECT, lpString As PCTSTR, cbCount As Long, pDx As *Long) As Long
     808Declare Function ExtTextOut Lib "gdi32" Alias "ExtTextOutA" (hdc As HDC, x As Long, y As Long, fuOptions As DWord, ByRef rc As RECT, pString As PCSTR, cbCount As Long, pDx As *Long) As Long
    731809#endif
    732810Declare Function FillPath Lib "gdi32" (hdc As HDC) As Long
     
    738816Declare Function GetBkMode Lib "gdi32" (hdc As HDC) As Long
    739817Declare Function GetBrushOrgEx Lib "gdi32" (hdc As HDC, ByRef lppt As POINTAPI) As Long
    740 Declare Function GetCharWidth32 Lib "gdi32" Alias "GetCharWidth32A" (hdc As HDC, iFirstChar As Long, iLastChar As Long, lpBuffer As DWordPtr) As Long
     818' only WinNT
     819'Declare Function GetCharWidth32 Lib "gdi32" Alias "GetCharWidth32A" (hdc As HDC, iFirstChar As DWord, iLastChar As DWord, pBuffer As *DWord) As Long
    741820Declare Function GetClipBox Lib "gdi32" (hdc As HDC, ByRef lpRect As RECT) As Long
    742821Declare Function GetClipRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN) As Long
    743822Declare Function GetCurrentObject Lib "gdi32" (hdc As HDC, dwObjectType As DWord) As HANDLE
    744 Declare Function GetCurrentPositionEx Lib "gdi32" (hdc As HDC, ByRef lpPoint As POINTAPI) As Long
     823Declare Function GetCurrentPositionEx Lib "gdi32" (hdc As HDC, ByRef Point As POINTAPI) As Long
    745824
    746825Const DRIVERVERSION =   0
     
    864943
    865944Declare Function GetDIBits Lib "gdi32" (hdc As HDC, hbmp As HBITMAP, uStartScan As DWord, cScanLines As DWord, lpvBits As VoidPtr, ByRef lpbi As BITMAPINFO, uUsage As DWord) As Long
    866 Declare Function GetEnhMetaFile Lib "gdi32" Alias "GetEnhMetaFileA" (pszMetaFile As PCSTR) As HENHMETAFILE
     945Declare Function GetEnhMetaFile Lib "gdi32" Alias _FuncName_GetEnhMetaFile (pszMetaFile As PCTSTR) As HENHMETAFILE
    867946Declare Function GetEnhMetaFileBits Lib "gdi32" (hemf As HENHMETAFILE, cbBuffer As DWord, pbBuffer As *Byte) As DWord
    868 Declare Function GetEnhMetaFileDescription Lib "gdi32" Alias "GetEnhMetaFileDescriptionA" (hemf As HENHMETAFILE, cbBuffer As DWord, pszDescription As PTSTR) As DWord
     947Declare Function GetEnhMetaFileDescription Lib "gdi32" Alias _FuncName_GetEnhMetaFileDescription (hemf As HENHMETAFILE, cbBuffer As DWord, pszDescription As PTSTR) As DWord
    869948Declare Function GetEnhMetaFileHeader Lib "gdi32" (hemf As HENHMETAFILE, cbBuffer As DWord, ByRef emh As ENHMETAHEADER) As DWord
    870949Declare Function GetEnhMetaFilePaletteEntries Lib "gdi32" (hemf As HENHMETAFILE, cEntries As DWord, ByRef pe As PALETTEENTRY) As DWord
     
    881960Declare Function GetMetaFileBitsEx Lib "gdi32" (hmf As HMETAFILE, nSize As DWord, pvData As VoidPtr) As DWord
    882961Declare Function GetMiterLimit Lib "gdi32" (hdc As HDC, peLimit As SinglePtr) As Long
    883 Declare Function GetObject Lib "gdi32" Alias "GetObjectA" (hgdiobj As HANDLE, cbBuffer As Long, ByRef lpvObject As Any) As Long
     962Declare Function GetObject Lib "gdi32" Alias _FuncName_GetObject (hgdiobj As HANDLE, cbBuffer As Long, ByRef pvObject As Any) As Long
    884963Declare Function GetObjectType Lib "gdi32" (hObject As HANDLE) As Long
    885964
     
    9311010Declare Function GetTextExtentPoint32W Lib "gdi32" (hdc As HDC, pString As PCWSTR, cbString As Long, ByRef Size As SIZE) As Long
    9321011#ifdef UNICODE
    933 Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32W" (hdc As HDC, pString As PCTSTR, cbString As Long, ByRef Size As SIZE) As Long
     1012Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32W" (hdc As HDC, pString As PCWSTR, cbString As Long, ByRef Size As SIZE) As Long
    9341013#else
    935 Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32A" (hdc As HDC, pString As PCTSTR, cbString As Long, ByRef Size As SIZE) As Long
     1014Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32A" (hdc As HDC, pString As PCSTR, cbString As Long, ByRef Size As SIZE) As Long
    9361015#endif
    9371016
     
    9401019Const TMPF_DEVICE =      &H08
    9411020Const TMPF_TRUETYPE =    &H04
    942 Type TEXTMETRIC
     1021Type TEXTMETRICW
    9431022    tmHeight As Long
    9441023    tmAscent As Long
     
    9521031    tmDigitizedAspectX As Long
    9531032    tmDigitizedAspectY As Long
    954     tmFirstChar As Byte
    955     tmLastChar As Byte
    956     tmDefaultChar As Byte
    957     tmBreakChar As Byte
     1033    tmFirstChar As WCHAR
     1034    tmLastChar As WCHAR
     1035    tmDefaultChar As WCHAR
     1036    tmBreakChar As WCHAR
    9581037    tmItalic As Byte
    9591038    tmUnderlined As Byte
     
    9621041    tmCharSet As Byte
    9631042End Type
    964 Declare Function GetTextMetrics Lib "gdi32" Alias "GetTextMetricsA" (hdc As HDC, ByRef lptm As TEXTMETRIC) As Long
     1043Type TEXTMETRICA
     1044    tmHeight As Long
     1045    tmAscent As Long
     1046    tmDescent As Long
     1047    tmInternalLeading As Long
     1048    tmExternalLeading As Long
     1049    tmAveCharWidth As Long
     1050    tmMaxCharWidth As Long
     1051    tmWeight As Long
     1052    tmOverhang As Long
     1053    tmDigitizedAspectX As Long
     1054    tmDigitizedAspectY As Long
     1055    tmFirstChar As SByte
     1056    tmLastChar As SByte
     1057    tmDefaultChar As SByte
     1058    tmBreakChar As SByte
     1059    tmItalic As Byte
     1060    tmUnderlined As Byte
     1061    tmStruckOut As Byte
     1062    tmPitchAndFamily As Byte
     1063    tmCharSet As Byte
     1064End Type
     1065#ifdef UNICODE
     1066TypeDef TEXTMETRIC = TEXTMETRICW
     1067#else
     1068TypeDef TEXTMETRIC = TEXTMETRICA
     1069#endif
     1070Declare Function GetTextMetrics Lib "gdi32" Alias _FuncName_GetTextMetrics (hdc As HDC, ByRef tm As TEXTMETRIC) As Long
    9651071
    9661072Declare Function GetViewportExtEx Lib "gdi32" (hdc As HDC, ByRef lpSize As SIZE) As Long
     
    9981104Declare Function RectInRegion Lib "gdi32" (hRgn As HRGN, ByRef lpRect As RECT) As Long
    9991105Declare Function RectVisible Lib "gdi32" (hdc As HDC, ByRef lpRect As RECT) As Long
    1000 Declare Function ResetDC Lib "gdi32" Alias "ResetDCA" (hdc As HDC, ByRef lpInitData As DEVMODE) As HDC
     1106Declare Function ResetDC Lib "gdi32" Alias _FuncName_ResetDC (hdc As HDC, ByRef InitData As DEVMODE) As HDC
    10011107Declare Function RestoreDC Lib "gdi32" (hdc As HDC, nSavedDC As Long) As Long
    10021108Declare Function RoundRect Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long, nWidth As Long, nHeight As Long) As Long
     
    10421148Declare Function SetWindowOrgEx Lib "gdi32" (hdc As HDC, x As Long, y As Long, ByRef lpPoint As POINTAPI) As Long
    10431149Declare Function SetWinMetaFileBits Lib "gdi32" (cbBuffer As DWord, pbBuffer As *Byte, hdcRef As HDC, ByRef mfp As METAFILEPICT) As HENHMETAFILE
    1044 Declare Function StartDoc Lib "gdi32" Alias "StartDocA" (hdc As HDC, ByRef ref_di As DOCINFO) As Long
     1150Declare Function StartDoc Lib "gdi32" Alias _FuncName_StartDoc (hdc As HDC, ByRef di As DOCINFO) As Long
    10451151Declare Function StartPage Lib "gdi32" (hdc As HDC) As Long
    10461152Declare Function StretchBlt Lib "gdi32" (hdcDest As HDC, nXOriginDest As Long, nYOriginDest As Long, nWidthDest As Long, nHeightDest As Long, hdcSrc As HDC, nXOriginSrc As Long, nYOriginSrc As Long, nWidthSrc As Long, nHeightSrc As Long, dwRop As DWord) As Long
     
    10511157Declare Function TextOutW Lib "gdi32" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCWSTR, cbString As Long) As Long
    10521158#ifdef UNICODE
    1053 Declare Function TextOut Lib "gdi32" Alias "TextOutW" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCTSTR, cbString As Long) As Long
     1159Declare Function TextOut Lib "gdi32" Alias "TextOutW" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCWSTR, cbString As Long) As Long
    10541160#else
    1055 Declare Function TextOut Lib "gdi32" Alias "TextOutA" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCTSTR, cbString As Long) As Long
     1161Declare Function TextOut Lib "gdi32" Alias "TextOutA" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCSTR, cbString As Long) As Long
    10561162#endif
    10571163
     
    11331239Declare Function wglMakeCurrent Lib "opengl32" (hdc As HDC, hglrc As HGLRC) As BOOL
    11341240Declare Function wglShareLists Lib "opengl32" (hglrc1 As HGLRC, hglrc2 As HGLRC) As BOOL
    1135 Declare Function wglUseFontBitmaps Lib "opengl32" Alias "wglUseFontBitmapsA" (hdc As HDC, first As DWord, count As DWord, listbase As DWord) As BOOL
     1241Declare Function wglUseFontBitmaps Lib "opengl32" Alias _FuncName_wglUseFontBitmaps (hdc As HDC, first As DWord, count As DWord, listbase As DWord) As BOOL
    11361242Declare Function SwapBuffers Lib "gdi32" (hdc As HDC) As BOOL
    11371243
     
    11551261Const WGL_FONT_POLYGONS = 1
    11561262
    1157 Declare Function wglUseFontOutlines Lib "opengl32" Alias "wglUseFontOutlinesA" (hdc As HDC, first As DWord, count As DWord, listbase As DWord, deviation As Single, extrusion As Single, format As Long, ByRef lpgmf As GLYPHMETRICSFLOAT) As BOOL
     1263Declare Function wglUseFontOutlines Lib "opengl32" Alias _FuncName_wglUseFontOutlines (hdc As HDC, first As DWord, count As DWord, listbase As DWord, deviation As Single, extrusion As Single, format As Long, ByRef lpgmf As GLYPHMETRICSFLOAT) As BOOL
    11581264
    11591265Type LAYERPLANEDESCRIPTOR
  • Include/api_mmsys.sbp

    r95 r141  
    66#define _INC_MMSYS
    77
     8#ifdef UNICODE
     9Const _FuncName_sndPlaySound = "sndPlaySoundW"
     10Const _FuncName_PlaySound = "PlaySoundW"
     11Const _FuncName_waveOutGetDevCaps = "waveOutGetDevCapsW"
     12Const _FuncName_waveOutGetErrorText = "waveOutGetErrorTextW"
     13Const _FuncName_waveInGetDevCaps = "waveInGetDevCapsW"
     14Const _FuncName_waveInGetErrorText = "waveInGetErrorTextW"
     15Const _FuncName_midiOutGetDevCaps = "midiOutGetDevCapsW"
     16Const _FuncName_midiOutGetErrorText = "midiOutGetErrorTextW"
     17Const _FuncName_midiInGetDevCaps = "midiInGetDevCapsW"
     18Const _FuncName_midiInGetErrorText = "midiInGetErrorTextW"
     19Const _FuncName_auxGetDevCaps = "auxGetDevCapsW"
     20Const _FuncName_mixerGetDevCaps = "mixerGetDevCapsW"
     21Const _FuncName_mixerGetLineInfo = "mixerGetLineInfoW"
     22Const _FuncName_mixerGetLineControls = "mixerGetLineControlsW"
     23Const _FuncName_mixerGetControlDetails = "mixerGetControlDetailsW"
     24Const _FuncName_joyGetDevCaps = "joyGetDevCapsW"
     25Const _FuncName_mmioStringToFOURCC = "mmioStringToFOURCCW"
     26Const _FuncName_mmioInstallIOProc = "mmioInstallIOProcW"
     27Const _FuncName_mmioOpen = "mmioOpenW"
     28Const _FuncName_mmioRename = "mmioRenameW"
     29Const _FuncName_mciSendCommand = "mciSendCommandW"
     30Const _FuncName_mciSendString = "mciSendStringW"
     31Const _FuncName_mciGetDeviceID = "mciGetDeviceIDW"
     32Const _FuncName_mciGetErrorString = "mciGetErrorStringW"
     33#else
     34Const _FuncName_sndPlaySound = "sndPlaySoundA"
     35Const _FuncName_PlaySound = "PlaySoundA"
     36Const _FuncName_waveOutGetDevCaps = "waveOutGetDevCapsA"
     37Const _FuncName_waveOutGetErrorText = "waveOutGetErrorTextA"
     38Const _FuncName_waveInGetDevCaps = "waveInGetDevCapsA"
     39Const _FuncName_waveInGetErrorText = "waveInGetErrorTextA"
     40Const _FuncName_midiOutGetDevCaps = "midiOutGetDevCapsA"
     41Const _FuncName_midiOutGetErrorText = "midiOutGetErrorTextA"
     42Const _FuncName_midiInGetDevCaps = "midiInGetDevCapsA"
     43Const _FuncName_midiInGetErrorText = "midiInGetErrorTextA"
     44Const _FuncName_auxGetDevCaps = "auxGetDevCapsA"
     45Const _FuncName_mixerGetDevCaps = "mixerGetDevCapsA"
     46Const _FuncName_mixerGetLineInfo = "mixerGetLineInfoA"
     47Const _FuncName_mixerGetLineControls = "mixerGetLineControlsA"
     48Const _FuncName_mixerGetControlDetails = "mixerGetControlDetailsA"
     49Const _FuncName_joyGetDevCaps = "joyGetDevCapsA"
     50Const _FuncName_mmioStringToFOURCC = "mmioStringToFOURCCA"
     51Const _FuncName_mmioInstallIOProc = "mmioInstallIOProcA"
     52Const _FuncName_mmioOpen = "mmioOpenA"
     53Const _FuncName_mmioRename = "mmioRenameA"
     54Const _FuncName_mciSendCommand = "mciSendCommandA"
     55Const _FuncName_mciSendString = "mciSendStringA"
     56Const _FuncName_mciGetDeviceID = "mciGetDeviceIDA"
     57Const _FuncName_mciGetErrorString = "mciGetErrorStringA"
     58#endif
    859
    960' general constants
     
    261312' Sound support
    262313
    263 Declare Function sndPlaySound Lib "winmm" Alias "sndPlaySoundA" (pszSound As PCSTR, fuSound As DWord) As BOOL
     314Declare Function sndPlaySound Lib "winmm" Alias _FuncName_sndPlaySound (pszSound As PCTSTR, fuSound As DWord) As BOOL
    264315
    265316Const SND_SYNC = &H0000
     
    289340Const SND_ALIAS_SYSTEMDEFAULT = sndAlias(&H53, &H44)
    290341
    291 Declare Function PlaySound Lib "winmm" Alias "PlaySoundA" (pszSound As PCSTR, hmod As HMODULE, fdwSound As DWord) As BOOL
     342Declare Function PlaySound Lib "winmm" Alias _FuncName_PlaySound (pszSound As PCTSTR, hmod As HMODULE, fdwSound As DWord) As BOOL
    292343
    293344
     
    353404
    354405' waveform output device capabilities structure
     406Type WAVEOUTCAPSW
     407    wMid As Word
     408    wPid As Word
     409    vDriverVersion As MMVERSION
     410    szPname[ELM(MAXPNAMELEN)] As WCHAR
     411    dwFormats As DWord
     412    wChannels As Word
     413    wReserved1 As Word
     414    dwSupport As DWord
     415End Type
     416TypeDef PWAVEOUTCAPSW = *WAVEOUTCAPSW
     417TypeDef LPWAVEOUTCAPSW = *WAVEOUTCAPSW
    355418Type WAVEOUTCAPSA
    356419    wMid As Word
    357420    wPid As Word
    358421    vDriverVersion As MMVERSION
    359     szPname[ELM(MAXPNAMELEN)] As Char
     422    szPname[ELM(MAXPNAMELEN)] As SByte
    360423    dwFormats As DWord
    361424    wChannels As Word
     
    365428TypeDef PWAVEOUTCAPSA = *WAVEOUTCAPSA
    366429TypeDef LPWAVEOUTCAPSA = *WAVEOUTCAPSA
    367 
     430#ifdef UNICODE
     431TypeDef WAVEOUTCAPS = WAVEOUTCAPSW
     432#else
    368433TypeDef WAVEOUTCAPS = WAVEOUTCAPSA
    369 TypeDef PWAVEOUTCAPS = PWAVEOUTCAPSA
    370 TypeDef LPWAVEOUTCAPS = LPWAVEOUTCAPSA
     434#endif
     435TypeDef PWAVEOUTCAPS = *WAVEOUTCAPS
     436TypeDef LPWAVEOUTCAPS = *WAVEOUTCAPS
    371437
    372438' flags for dwSupport field of WAVEOUTCAPS
     
    380446
    381447' waveform input device capabilities structure
     448Type WAVEINCAPSW
     449    wMid As Word
     450    wPid As Word
     451    vDriverVersion As MMVERSION
     452    szPname[ELM(MAXPNAMELEN)] As WCHAR
     453    dwFormats As DWord
     454    wChannels As Word
     455    wReserved1 As Word
     456End Type
     457TypeDef PWAVEINCAPSW = *WAVEINCAPSW
     458TypeDef LPWAVEINCAPSW = *WAVEINCAPSW
    382459Type WAVEINCAPSA
    383460    wMid As Word
    384461    wPid As Word
    385462    vDriverVersion As MMVERSION
    386     szPname[ELM(MAXPNAMELEN)] As Char
     463    szPname[ELM(MAXPNAMELEN)] As SByte
    387464    dwFormats As DWord
    388465    wChannels As Word
     
    391468TypeDef PWAVEINCAPSA = *WAVEINCAPSA
    392469TypeDef LPWAVEINCAPSA = *WAVEINCAPSA
    393 
     470#ifdef UNICODE
     471TypeDef WAVEINCAPS = WAVEINCAPSW
     472#else
    394473TypeDef WAVEINCAPS = WAVEINCAPSA
    395 TypeDef PWAVEINCAPS = PWAVEINCAPSA
    396 TypeDef LPWAVEINCAPS = LPWAVEINCAPSA
     474#endif
     475TypeDef PWAVEINCAPS = *WAVEINCAPS
     476TypeDef LPWAVEINCAPS = *WAVEINCAPS
    397477
    398478' defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS
    399479Const WAVE_INVALIDFORMAT     = &H00000000       ' invalid format
    400 Const WAVE_FORMAT_1M08       = &H00000001       ' 11.025 kHz, Mono,   8-bit 
    401 Const WAVE_FORMAT_1S08       = &H00000002       ' 11.025 kHz, Stereo, 8-bit 
     480Const WAVE_FORMAT_1M08       = &H00000001       ' 11.025 kHz, Mono,   8-bit
     481Const WAVE_FORMAT_1S08       = &H00000002       ' 11.025 kHz, Stereo, 8-bit
    402482Const WAVE_FORMAT_1M16       = &H00000004       ' 11.025 kHz, Mono,   16-bit
    403483Const WAVE_FORMAT_1S16       = &H00000008       ' 11.025 kHz, Stereo, 16-bit
    404 Const WAVE_FORMAT_2M08       = &H00000010       ' 22.05  kHz, Mono,   8-bit 
    405 Const WAVE_FORMAT_2S08       = &H00000020       ' 22.05  kHz, Stereo, 8-bit 
     484Const WAVE_FORMAT_2M08       = &H00000010       ' 22.05  kHz, Mono,   8-bit
     485Const WAVE_FORMAT_2S08       = &H00000020       ' 22.05  kHz, Stereo, 8-bit
    406486Const WAVE_FORMAT_2M16       = &H00000040       ' 22.05  kHz, Mono,   16-bit
    407487Const WAVE_FORMAT_2S16       = &H00000080       ' 22.05  kHz, Stereo, 16-bit
    408 Const WAVE_FORMAT_4M08       = &H00000100       ' 44.1   kHz, Mono,   8-bit 
    409 Const WAVE_FORMAT_4S08       = &H00000200       ' 44.1   kHz, Stereo, 8-bit 
     488Const WAVE_FORMAT_4M08       = &H00000100       ' 44.1   kHz, Mono,   8-bit
     489Const WAVE_FORMAT_4S08       = &H00000200       ' 44.1   kHz, Stereo, 8-bit
    410490Const WAVE_FORMAT_4M16       = &H00000400       ' 44.1   kHz, Mono,   16-bit
    411491Const WAVE_FORMAT_4S16       = &H00000800       ' 44.1   kHz, Stereo, 16-bit
     
    448528' waveform audio function prototypes
    449529Declare Function waveOutGetNumDevs Lib "winmm" () As DWord
    450 Declare Function waveOutGetDevCaps Lib "winmm" Alias "waveOutGetDevCapsA" (uDeviceID As DWord, ByRef pwoc As WAVEOUTCAPS, cbwoc As DWord) As MMRESULT
     530Declare Function waveOutGetDevCaps Lib "winmm" Alias _FuncName_waveOutGetDevCaps (uDeviceID As DWord, ByRef woc As WAVEOUTCAPS, cbwoc As DWord) As MMRESULT
    451531Declare Function waveOutGetVolume Lib "winmm" (hwo As HWAVEOUT, ByRef pdwVolume As DWord) As MMRESULT
    452532Declare Function waveOutSetVolume Lib "winmm" (hwo As HWAVEOUT, dwVolume As DWord) As MMRESULT
    453 Declare Function waveOutGetErrorText Lib "winmm" Alias "waveOutGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
     533Declare Function waveOutGetErrorText Lib "winmm" Alias _FuncName_waveOutGetErrorText (mmrError As MMRESULT, pszText As LPTSTR, cchText As DWord) As MMRESULT
    454534Declare Function waveOutOpen Lib "winmm" (ByRef phwo As HWAVEOUT, uDeviceID As DWord, ByRef pwfx As WAVEFORMATEX, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
    455535Declare Function waveOutClose Lib "winmm" (hwo As HWAVEOUT) As MMRESULT
     
    470550
    471551Declare Function waveInGetNumDevs Lib "winmm" () As DWord
    472 Declare Function waveInGetDevCaps Lib "winmm" Alias "waveInGetDevCapsA" (uDeviceID As DWord, ByRef pwic As WAVEINCAPS, cbwic As DWord) As MMRESULT
    473 Declare Function waveInGetErrorText Lib "winmm" Alias "waveInGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
     552Declare Function waveInGetDevCaps Lib "winmm" Alias _FuncName_waveInGetDevCaps (uDeviceID As DWord, ByRef pwic As WAVEINCAPS, cbwic As DWord) As MMRESULT
     553Declare Function waveInGetErrorText Lib "winmm" Alias _FuncName_waveInGetErrorText (mmrError As MMRESULT, pszText As LPTSTR, cchText As DWord) As MMRESULT
    474554Declare Function waveInOpen Lib "winmm" (ByRef phwi As HWAVEIN, uDeviceID As DWord, ByRef pwfx As WAVEFORMATEX, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
    475555Declare Function waveInClose Lib "winmm" (hwi As HWAVEIN) As MMRESULT
     
    544624
    545625' MIDI output device capabilities structure
    546 Type MIDIOUTCAPSA
     626Type MIDIOUTCAPSW
    547627    wMid As Word
    548628    wPid As Word
    549629    vDriverVersion As MMVERSION
    550     szPname[ELM(MAXPNAMELEN)] As Char
     630    szPname[ELM(MAXPNAMELEN)] As WCHAR
    551631    wTechnology As Word
    552632    wVoices As Word
     
    555635    dwSupport As DWord
    556636End Type
     637TypeDef PMIDIOUTCAPSW = *MIDIOUTCAPSW
     638TypeDef LPMIDIOUTCAPSW = *MIDIOUTCAPSW
     639Type MIDIOUTCAPSA
     640    wMid As Word
     641    wPid As Word
     642    vDriverVersion As MMVERSION
     643    szPname[ELM(MAXPNAMELEN)] As SByte
     644    wTechnology As Word
     645    wVoices As Word
     646    wNotes As Word
     647    wChannelMask As Word
     648    dwSupport As DWord
     649End Type
    557650TypeDef PMIDIOUTCAPSA = *MIDIOUTCAPSA
    558651TypeDef LPMIDIOUTCAPSA = *MIDIOUTCAPSA
    559652
     653#ifdef UNICODE
     654TypeDef MIDIOUTCAPS = MIDIOUTCAPSW
     655#else
    560656TypeDef MIDIOUTCAPS = MIDIOUTCAPSA
    561 TypeDef PMIDIOUTCAPS = PMIDIOUTCAPSA
    562 TypeDef LPMIDIOUTCAPS = LPMIDIOUTCAPSA
     657#endif
     658TypeDef PMIDIOUTCAPS = *MIDIOUTCAPS
     659TypeDef LPMIDIOUTCAPS = *MIDIOUTCAPS
    563660
    564661' flags for wTechnology field of MIDIOUTCAPS structure
     
    576673
    577674' MIDI input device capabilities structure
     675Type MIDIINCAPSW
     676    wMid As Word
     677    wPid As Word
     678    vDriverVersion As MMVERSION
     679    szPname[ELM(MAXPNAMELEN)] As WCHAR
     680    dwSupport As DWord
     681End Type
     682TypeDef PMIDIINCAPSW = *MIDIINCAPSW
     683TypeDef LPMIDIINCAPSW = *MIDIINCAPSW
    578684Type MIDIINCAPSA
    579685    wMid As Word
    580686    wPid As Word
    581687    vDriverVersion As MMVERSION
    582     szPname[ELM(MAXPNAMELEN)] As Char
     688    szPname[ELM(MAXPNAMELEN)] As SByte
    583689    dwSupport As DWord
    584690End Type
    585691TypeDef PMIDIINCAPSA = *MIDIINCAPSA
    586692TypeDef LPMIDIINCAPSA = *MIDIINCAPSA
    587 
     693#ifdef UNICODE
     694TypeDef MIDIINCAPS = MIDIINCAPSW
     695#else
    588696TypeDef MIDIINCAPS = MIDIINCAPSA
    589 TypeDef PMIDIINCAPS = PMIDIINCAPSA
    590 TypeDef LPMIDIINCAPS = LPMIDIINCAPSA
     697#endif
     698TypeDef PMIDIINCAPS = *MIDIINCAPS
     699TypeDef LPMIDIINCAPS = *MIDIINCAPS
    591700
    592701' MIDI data block header
     
    670779Declare Function midiConnect Lib "winmm" (hmi As HMIDI, hmo As HMIDIOUT, pReserved As VoidPtr) As MMRESULT
    671780Declare Function midiDisconnect Lib "winmm" (hmi As HMIDI, hmo As HMIDIOUT, pReserved As VoidPtr) As MMRESULT
    672 Declare Function midiOutGetDevCaps Lib "winmm" Alias "midiOutGetDevCapsA" (uDeviceID As DWord, ByRef pmoc As MIDIOUTCAPS, cbmoc As DWord) As MMRESULT
     781Declare Function midiOutGetDevCaps Lib "winmm" Alias _FuncName_midiOutGetDevCaps (uDeviceID As DWord, ByRef moc As MIDIOUTCAPS, cbmoc As DWord) As MMRESULT
    673782Declare Function midiOutGetVolume Lib "winmm" (hmo As HMIDIOUT, ByRef pdwVolume As DWord) As MMRESULT
    674783Declare Function midiOutSetVolume Lib "winmm" (hmo As HMIDIOUT, dwVolume As DWord) As MMRESULT
    675 Declare Function midiOutGetErrorText Lib "winmm" Alias "midiOutGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
     784Declare Function midiOutGetErrorText Lib "winmm" Alias _FuncName_midiOutGetErrorText (mmrError As MMRESULT, pszText As LPTSTR, cchText As DWord) As MMRESULT
    676785Declare Function midiOutOpen Lib "winmm" (ByRef phmo As HMIDIOUT, uDeviceID As DWord, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
    677786Declare Function midiOutClose Lib "winmm" (hmo As HMIDIOUT) As MMRESULT
     
    687796
    688797Declare Function midiInGetNumDevs Lib "winmm" () As DWord
    689 Declare Function midiInGetDevCaps Lib "winmm" Alias "midiInGetDevCapsA" (uDeviceID As DWord, ByRef pmic As MIDIINCAPS, cbmic As DWord) As MMRESULT
    690 Declare Function midiInGetErrorText Lib "winmm" Alias "midiInGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
     798Declare Function midiInGetDevCaps Lib "winmm" Alias _FuncName_midiInGetDevCaps (uDeviceID As DWord, ByRef pmic As MIDIINCAPS, cbmic As DWord) As MMRESULT
     799Declare Function midiInGetErrorText Lib "winmm" Alias _FuncName_midiInGetErrorText (mmrError As MMRESULT, pszText As LPCTSTR, cchText As DWord) As MMRESULT
    691800Declare Function midiInOpen Lib "winmm" (ByRef phmi As HMIDIIN, uDeviceID As DWord, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
    692801Declare Function midiInClose Lib "winmm" (hmi As HMIDIIN) As MMRESULT
     
    708817
    709818' Auxiliary audio device capabilities structure
     819Type AUXCAPSW
     820    wMid As Word
     821    wPid As Word
     822    vDriverVersion As MMVERSION
     823    szPname[ELM(MAXPNAMELEN)] As WCHAR
     824    wTechnology As Word
     825    wReserved1 As Word
     826    dwSupport As DWord
     827End Type
     828TypeDef PAUXCAPSW = *AUXCAPSW
     829TypeDef NPAUXCAPSW = *AUXCAPSW
     830TypeDef LPAUXCAPSW = *AUXCAPSW
    710831Type AUXCAPSA
    711832    wMid As Word
    712833    wPid As Word
    713834    vDriverVersion As MMVERSION
    714     szPname[ELM(MAXPNAMELEN)] As Char
     835    szPname[ELM(MAXPNAMELEN)] As SByte
    715836    wTechnology As Word
    716837    wReserved1 As Word
     
    720841TypeDef NPAUXCAPSA = *AUXCAPSA
    721842TypeDef LPAUXCAPSA = *AUXCAPSA
    722 
     843#ifdef UNICODE
    723844TypeDef AUXCAPS = AUXCAPSA
    724 TypeDef PAUXCAPS = PAUXCAPSA
    725 TypeDef NPAUXCAPS = NPAUXCAPSA
    726 TypeDef LPAUXCAPS = LPAUXCAPSA
     845#else
     846TypeDef AUXCAPS = AUXCAPSA
     847#endif
     848TypeDef PAUXCAPS = *AUXCAPS
     849TypeDef NPAUXCAPS = *AUXCAPS
     850TypeDef LPAUXCAPS = *AUXCAPS
    727851
    728852Const AUXCAPS_CDAUDIO = 1
     
    734858' auxiliary audio function prototypes
    735859Declare Function auxGetNumDevs Lib "winmm" () As DWord
    736 Declare Function auxGetDevCaps Lib "winmm" Alias "auxGetDevCapsA" (uDeviceID As DWord, pac As *AUXCAPS, cbac As DWord) As MMRESULT
     860Declare Function auxGetDevCaps Lib "winmm" Alias _FuncName_auxGetDevCaps (uDeviceID As DWord, pac As *AUXCAPS, cbac As DWord) As MMRESULT
    737861Declare Function auxSetVolume Lib "winmm" (uDeviceID As DWord, dwVolume As DWord) As MMRESULT
    738862Declare Function auxGetVolume Lib "winmm" (uDeviceID As DWord, pdwVolume As *DWord) As MMRESULT
     
    771895Declare Function mixerGetNumDevs Lib "winmm" () As DWord
    772896
     897Type MIXERCAPSW
     898    wMid As Word
     899    wPid As Word
     900    vDriverVersion As MMVERSION
     901    szPname[ELM(MAXPNAMELEN)] As WCHAR
     902    fdwSupport As DWord
     903    cDestinations As DWord
     904End Type
     905TypeDef PMIXERCAPSW = *MIXERCAPSW
     906TypeDef LPMIXERCAPSW = *MIXERCAPSW
    773907Type MIXERCAPSA
    774908    wMid As Word
     
    781915TypeDef PMIXERCAPSA = *MIXERCAPSA
    782916TypeDef LPMIXERCAPSA = *MIXERCAPSA
    783 
     917#ifdef UNICODE
     918TypeDef MIXERCAPS = MIXERCAPSW
     919#else
    784920TypeDef MIXERCAPS = MIXERCAPSA
    785 TypeDef PMIXERCAPS = PMIXERCAPSA
    786 TypeDef LPMIXERCAPS = LPMIXERCAPSA
    787 
    788 Declare Function mixerGetDevCaps Lib "winmm" Alias "mixerGetDevCapsA" (uMxId As DWord, pmxcaps As *MIXERCAPS, cbmxcaps As DWord) As MMRESULT
     921#endif
     922TypeDef PMIXERCAPS = *MIXERCAPS
     923TypeDef LPMIXERCAPS = *MIXERCAPS
     924
     925Declare Function mixerGetDevCaps Lib "winmm" Alias _FuncName_mixerGetDevCaps (uMxId As DWord, pmxcaps As *MIXERCAPS, cbmxcaps As DWord) As MMRESULT
    789926Declare Function mixerOpen Lib "winmm" (phmx As *HMIXER, uMxId As DWord, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
    790927Declare Function mixerClose Lib "winmm" (hmx As HMIXER) As MMRESULT
    791928Declare Function mixerMessage Lib "winmm" (hmx As HMIXER, uMsg As DWord, dwParam1 As DWord, dwParam2 As DWord) As DWord
    792929
    793 Type TARGET
     930Type _MMSYSTEM_TARGETW
    794931    dwType As DWord
    795932    dwDeviceID As DWord
     
    797934    wPid As Word
    798935    vDriverVersion As MMVERSION
    799     szPname[ELM(MAXPNAMELEN)] As Char
     936    szPname[ELM(MAXPNAMELEN)] As WCHAR
     937End Type
     938
     939Type MIXERLINEW
     940    cbStruct As DWord
     941    dwDestination As DWord
     942    dwSource As DWord
     943    dwLineID As DWord
     944    fdwLine As DWord
     945    dwUser As DWord
     946    dwComponentType As DWord
     947    cChannels As DWord
     948    cConnections As DWord
     949    cControls As DWord
     950    szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As WCHAR
     951    szName[ELM(MIXER_LONG_NAME_CHARS)] As WCHAR
     952    Target As _MMSYSTEM_TARGETW
     953End Type
     954TypeDef PMIXERLINEW = *MIXERLINEW
     955TypeDef LPMIXERLINEW = *MIXERLINEW
     956
     957Type _MMSYSTEM_TARGETA
     958    dwType As DWord
     959    dwDeviceID As DWord
     960    wMid As Word
     961    wPid As Word
     962    vDriverVersion As MMVERSION
     963    szPname[ELM(MAXPNAMELEN)] As SByte
    800964End Type
    801965
     
    811975    cConnections As DWord
    812976    cControls As DWord
    813     szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As Char
    814     szName[ELM(MIXER_LONG_NAME_CHARS)] As Char
    815     Target As TARGET
     977    szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As SByte
     978    szName[ELM(MIXER_LONG_NAME_CHARS)] As SByte
     979    Target As _MMSYSTEM_TARGETA
    816980End Type
    817981TypeDef PMIXERLINEA = *MIXERLINEA
    818982TypeDef LPMIXERLINEA = *MIXERLINEA
    819 
     983#ifdef UNICODE
     984TypeDef MIXERLINE = MIXERLINEW
     985#else
    820986TypeDef MIXERLINE = MIXERLINEA
    821 TypeDef PMIXERLINE = PMIXERLINEA
    822 TypeDef LPMIXERLINE = LPMIXERLINEA
     987#endif
     988TypeDef PMIXERLINE = *MIXERLINE
     989TypeDef LPMIXERLINE = *MIXERLINE
    823990
    824991' MIXERLINE.fdwLine
     
    8621029Const MIXERLINE_TARGETTYPE_AUX = 5
    8631030
    864 Declare Function mixerGetLineInfo Lib "winmm" Alias "mixerGetLineInfoA" (hmxobj As HMIXEROBJ, pmxl As *MIXERLINE, fdwInfo As DWord) As MMRESULT
     1031Declare Function mixerGetLineInfo Lib "winmm" Alias _FuncName_mixerGetLineInfo (hmxobj As HMIXEROBJ, pmxl As *MIXERLINE, fdwInfo As DWord) As MMRESULT
    8651032
    8661033Const MIXER_GETLINEINFOF_DESTINATION = &H00000000
     
    8731040Declare Function mixerGetID Lib "winmm" (hmxobj As HMIXEROBJ, puMxId As *DWord, fdwId As DWord) As MMRESULT
    8741041
     1042Type MIXERCONTROLW
     1043    cbStruct As DWord
     1044    dwControlID As DWord
     1045    dwControlType As DWord
     1046    fdwControl As DWord
     1047    cMultipleItems As DWord
     1048    szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As WCHAR
     1049    szName[ELM(MIXER_LONG_NAME_CHARS)] As WCHAR
     1050    Bounds[ELM(6)] As DWord
     1051    Metrics[ELM(6)] As DWord
     1052End Type
     1053TypeDef PMIXERCONTROLW = *MIXERCONTROLW
     1054TypeDef LPMIXERCONTROLW = *MIXERCONTROLW
    8751055Type MIXERCONTROLA
    8761056    cbStruct As DWord
     
    8791059    fdwControl As DWord
    8801060    cMultipleItems As DWord
    881     szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As Char
    882     szName[ELM(MIXER_LONG_NAME_CHARS)] As Char
     1061    szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As SByte
     1062    szName[ELM(MIXER_LONG_NAME_CHARS)] As SByte
    8831063    Bounds[ELM(6)] As DWord
    8841064    Metrics[ELM(6)] As DWord
     
    8861066TypeDef PMIXERCONTROLA = *MIXERCONTROLA
    8871067TypeDef LPMIXERCONTROLA = *MIXERCONTROLA
    888 
     1068#ifdef UNICODE
     1069TypeDef MIXERCONTROL = MIXERCONTROLW
     1070#else
    8891071TypeDef MIXERCONTROL = MIXERCONTROLA
    890 TypeDef PMIXERCONTROL = PMIXERCONTROLA
    891 TypeDef LPMIXERCONTROL = LPMIXERCONTROLA
     1072#endif
     1073TypeDef PMIXERCONTROL = *MIXERCONTROL
     1074TypeDef LPMIXERCONTROL = *MIXERCONTROL
    8921075
    8931076' MIXERCONTROL.fdwControl
     
    9541137Const MIXERCONTROL_CONTROLTYPE_MILLITIME = (MIXERCONTROL_CT_CLASS_TIME OR MIXERCONTROL_CT_SC_TIME_MILLISECS OR MIXERCONTROL_CT_UNITS_UNSIGNED)
    9551138
     1139Type MIXERLINECONTROLSW
     1140    cbStruct As DWord
     1141    dwLineID As DWord
     1142    dwControl_ID_Type As DWord
     1143    cControls As DWord
     1144    cbmxctrl As DWord
     1145    pamxctrl As *MIXERCONTROLW
     1146End Type
     1147TypeDef PMIXERLINECONTROLSW = *MIXERLINECONTROLSW
     1148TypeDef LPMIXERLINECONTROLSW = *MIXERLINECONTROLSW
    9561149Type MIXERLINECONTROLSA
    9571150    cbStruct As DWord
     
    9601153    cControls As DWord
    9611154    cbmxctrl As DWord
    962     pamxctrl As *MIXERCONTROL
     1155    pamxctrl As *MIXERCONTROLA
    9631156End Type
    9641157TypeDef PMIXERLINECONTROLSA = *MIXERLINECONTROLSA
    9651158TypeDef LPMIXERLINECONTROLSA = *MIXERLINECONTROLSA
    966 
     1159#ifdef UNICODE
    9671160TypeDef MIXERLINECONTROLS = MIXERLINECONTROLSA
    968 TypeDef PMIXERLINECONTROLS = PMIXERLINECONTROLSA
    969 TypeDef LPMIXERLINECONTROLS = LPMIXERLINECONTROLSA
    970 
    971 Declare Function mixerGetLineControls Lib "winmm" Alias "mixerGetLineControlsA" (hmxobj As HMIXEROBJ, pmxlc As *MIXERLINECONTROLS, fdwControls As DWord) As MMRESULT
     1161#else
     1162TypeDef MIXERLINECONTROLS = MIXERLINECONTROLSA
     1163#endif
     1164TypeDef PMIXERLINECONTROLS = *MIXERLINECONTROLS
     1165TypeDef LPMIXERLINECONTROLS = *MIXERLINECONTROLS
     1166
     1167Declare Function mixerGetLineControls Lib "winmm" Alias _FuncName_mixerGetLineControls (hmxobj As HMIXEROBJ, pmxlc As *MIXERLINECONTROLS, fdwControls As DWord) As MMRESULT
    9721168
    9731169Const MIXER_GETLINECONTROLSF_ALL = &H00000000
     
    9871183TypeDef LPMIXERCONTROLDETAILS = *MIXERCONTROLDETAILS
    9881184
     1185Type MIXERCONTROLDETAILS_LISTTEXTW
     1186    dwParam1 As DWord
     1187    dwParam2 As DWord
     1188    szName[ELM(MIXER_LONG_NAME_CHARS)] As WCHAR
     1189End Type
     1190TypeDef PMIXERCONTROLDETAILS_LISTTEXTW = *MIXERCONTROLDETAILS_LISTTEXTW
     1191TypeDef LPMIXERCONTROLDETAILS_LISTTEXTW = *MIXERCONTROLDETAILS_LISTTEXTW
    9891192Type MIXERCONTROLDETAILS_LISTTEXTA
    9901193    dwParam1 As DWord
    9911194    dwParam2 As DWord
    992     szName[ELM(MIXER_LONG_NAME_CHARS)] As Char
     1195    szName[ELM(MIXER_LONG_NAME_CHARS)] As SByte
    9931196End Type
    9941197TypeDef PMIXERCONTROLDETAILS_LISTTEXTA = *MIXERCONTROLDETAILS_LISTTEXTA
    9951198TypeDef LPMIXERCONTROLDETAILS_LISTTEXTA = *MIXERCONTROLDETAILS_LISTTEXTA
    996 
     1199#ifdef UNICODE
     1200TypeDef MIXERCONTROLDETAILS_LISTTEXT = MIXERCONTROLDETAILS_LISTTEXTW
     1201#else
    9971202TypeDef MIXERCONTROLDETAILS_LISTTEXT = MIXERCONTROLDETAILS_LISTTEXTA
    998 TypeDef PMIXERCONTROLDETAILS_LISTTEXT = PMIXERCONTROLDETAILS_LISTTEXTA
    999 TypeDef LPMIXERCONTROLDETAILS_LISTTEXT = LPMIXERCONTROLDETAILS_LISTTEXTA
     1203#endif
     1204TypeDef PMIXERCONTROLDETAILS_LISTTEXT = *MIXERCONTROLDETAILS_LISTTEXT
     1205TypeDef LPMIXERCONTROLDETAILS_LISTTEXT = *MIXERCONTROLDETAILS_LISTTEXT
    10001206
    10011207Type MIXERCONTROLDETAILS_BOOLEAN
     
    10191225Declare Function mixerGetControlDetailsA Lib "winmm" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
    10201226Declare Function mixerGetControlDetailsW Lib "winmm" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
    1021 Declare Function mixerGetControlDetails Lib "winmm" Alias "mixerGetControlDetailsA" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
     1227Declare Function mixerGetControlDetails Lib "winmm" Alias _FuncName_mixerGetControlDetails (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
    10221228
    10231229Const MIXER_GETCONTROLDETAILSF_VALUE = &H00000000
     
    11631369Const JOYCAPS_POVCTS = &H0040
    11641370
    1165 Type JOYCAPSA
     1371Type JOYCAPSW
    11661372    wMid As Word
    11671373    wPid As Word
    1168     szPname[ELM(MAXPNAMELEN)] As Char
     1374    szPname[ELM(MAXPNAMELEN)] As WCHAR
    11691375    wXmin As DWord
    11701376    wXmax As DWord
     
    11861392    wNumAxes As DWord
    11871393    wMaxButtons As DWord
    1188     szRegKey[ELM(MAXPNAMELEN)] As Char
    1189     szOEMVxD[ELM(MAX_JOYSTICKOEMVXDNAME)] As Char
     1394    szRegKey[ELM(MAXPNAMELEN)] As WCHAR
     1395    szOEMVxD[ELM(MAX_JOYSTICKOEMVXDNAME)] As WCHAR
     1396End Type
     1397TypeDef PJOYCAPSW = *JOYCAPSW
     1398TypeDef NPJOYCAPSW = *JOYCAPSW
     1399TypeDef LPJOYCAPSW = *JOYCAPSW
     1400Type JOYCAPSA
     1401    wMid As Word
     1402    wPid As Word
     1403    szPname[ELM(MAXPNAMELEN)] As SByte
     1404    wXmin As DWord
     1405    wXmax As DWord
     1406    wYmin As DWord
     1407    wYmax As DWord
     1408    wZmin As DWord
     1409    wZmax As DWord
     1410    wNumButtons As DWord
     1411    wPeriodMin As DWord
     1412    wPeriodMax As DWord
     1413    wRmin As DWord
     1414    wRmax As DWord
     1415    wUmin As DWord
     1416    wUmax As DWord
     1417    wVmin As DWord
     1418    wVmax As DWord
     1419    wCaps As DWord
     1420    wMaxAxes As DWord
     1421    wNumAxes As DWord
     1422    wMaxButtons As DWord
     1423    szRegKey[ELM(MAXPNAMELEN)] As SByte
     1424    szOEMVxD[ELM(MAX_JOYSTICKOEMVXDNAME)] As SByte
    11901425End Type
    11911426TypeDef PJOYCAPSA = *JOYCAPSA
    11921427TypeDef NPJOYCAPSA = *JOYCAPSA
    11931428TypeDef LPJOYCAPSA = *JOYCAPSA
    1194 
     1429#ifdef UNICODE
     1430TypeDef JOYCAPS = JOYCAPSW
     1431#else
    11951432TypeDef JOYCAPS = JOYCAPSA
     1433#endif
    11961434TypeDef PJOYCAPS = PJOYCAPSA
    11971435TypeDef NPJOYCAPS = NPJOYCAPSA
     
    12291467' joystick function prototypes
    12301468Declare Function joyGetNumDevs Lib "winmm" () As DWord
    1231 Declare Function joyGetDevCaps Lib "winmm" Alias "joyGetDevCapsA" (uJoyID As DWord, pjc As *JOYCAPS, cbjc As DWord) As MMRESULT
     1469Declare Function joyGetDevCaps Lib "winmm" Alias _FuncName_joyGetDevCaps (uJoyID As DWord, pjc As *JOYCAPS, cbjc As DWord) As MMRESULT
    12321470Declare Function joyGetPos Lib "winmm" (uJoyID As DWord, pji As *JOYINFO) As MMRESULT
    12331471Declare Function joyGetPosEx Lib "winmm" (uJoyID As DWord, pji As *JOYINFOEX) As MMRESULT
     
    13591597
    13601598' MMIO function prototypes
    1361 Declare Function mmioStringToFOURCC Lib "winmm" Alias "mmioStringToFOURCCA" (sz As LPSTR, uFlags As DWord) As FOURCC
    1362 Declare Function mmioInstallIOProc Lib "winmm" Alias "mmioInstallIOProcA" (fccIOProc As FOURCC, pIOProc As LPMMIOPROC, dwFlags As DWord) As LPMMIOPROC
    1363 Declare Function mmioOpen Lib "winmm" Alias "mmioOpenA" (pszFileName As LPSTR, pmmioinfo As *MMIOINFO, fdwOpen As DWord) As HMMIO
    1364 Declare Function mmioRename Lib "winmm" Alias "mmioRenameA" (pszFileName As LPSTR, pszNewFileName As LPSTR, pmmioinfo As *MMIOINFO, fdwRename As DWord) As MMRESULT
     1599Declare Function mmioStringToFOURCC Lib "winmm" Alias _FuncName_mmioStringToFOURCC (sz As LPCTSTR, uFlags As DWord) As FOURCC
     1600Declare Function mmioInstallIOProc Lib "winmm" Alias _FuncName_mmioInstallIOProc (fccIOProc As FOURCC, pIOProc As LPMMIOPROC, dwFlags As DWord) As LPMMIOPROC
     1601Declare Function mmioOpen Lib "winmm" Alias _FuncName_mmioOpen (pszFileName As LPTSTR, pmmioinfo As *MMIOINFO, fdwOpen As DWord) As HMMIO
     1602Declare Function mmioRename Lib "winmm" Alias _FuncName_mmioRename (pszFileName As LPCTSTR, pszNewFileName As LPCTSTR, pmmioinfo As *MMIOINFO, fdwRename As DWord) As MMRESULT
    13651603Declare Function mmioClose Lib "winmm" (hmmio As HMMIO, fuClose As DWord) As MMRESULT
    13661604Declare Function mmioRead Lib "winmm" (hmmio As HMMIO, pch As HPSTR, cch As Long) As Long
     
    13861624
    13871625' MCI Functions
    1388 Declare Function mciSendCommand Lib "winmm" Alias "mciSendCommandA" (mciId As MCIDEVICEID, uMsg As DWord, dwParam1 As DWord, ByRef dwParam2 As Any) As MCIERROR
    1389 Declare Function mciSendString Lib "winmm" Alias "mciSendStringA" (lpstrCommand As LPSTR, lpstrReturnString As LPSTR, uReturnLength As DWord, hwndCallback As HWND) As MCIERROR
    1390 Declare Function mciGetDeviceID Lib "winmm" Alias "mciGetDeviceIDA" (pszDevice As LPSTR) As MCIDEVICEID
    1391 
    1392 Declare Function mciGetErrorString Lib "winmm" Alias "mciGetErrorStringA" (mcierr As MCIERROR, pszText As LPSTR, cchText As DWord) As BOOL
     1626Declare Function mciSendCommand Lib "winmm" Alias _FuncName_mciSendCommand (mciId As MCIDEVICEID, uMsg As DWord, dwParam1 As ULONG_PTR, ByRef dwParam2 As Any) As MCIERROR
     1627Declare Function mciSendString Lib "winmm" Alias _FuncName_mciSendString (lpstrCommand As LPTSTR, lpstrReturnString As LPTSTR, uReturnLength As DWord, hwndCallback As HWND) As MCIERROR
     1628Declare Function mciGetDeviceID Lib "winmm" Alias _FuncName_mciGetDeviceID (pszDevice As LPCTSTR) As MCIDEVICEID
     1629
     1630Declare Function mciGetErrorString Lib "winmm" Alias _FuncName_mciGetErrorString (mcierr As MCIERROR, pszText As LPSTR, cchText As DWord) As BOOL
    13931631Declare Function mciSetYieldProc Lib "winmm" (mciId As MCIDEVICEID, fpYieldProc As YIELDPROC, dwYieldData As DWord) As BOOL
    13941632Declare Function mciGetCreatorTask Lib "winmm" (mciId As MCIDEVICEID) As HTASK
     
    17041942TypeDef LPMCI_GENERIC_PARMS = *MCI_GENERIC_PARMS
    17051943
    1706 Type MCI_OPEN_PARMS
     1944Type MCI_OPEN_PARMSW
    17071945    dwCallback As DWord
    17081946    wDeviceID As DWord
    1709     lpstrDeviceType As LPSTR
    1710     lpstrElementName As LPSTR
    1711     lpstrAlias As LPSTR
    1712 End Type
     1947    lpstrDeviceType As LPCWSTR
     1948    lpstrElementName As LPCWSTR
     1949    lpstrAlias As LPCWSTR
     1950End Type
     1951TypeDef PMCI_OPEN_PARMSW = *MCI_OPEN_PARMSW
     1952TypeDef LPMCI_OPEN_PARMSW = *MCI_OPEN_PARMSW
     1953Type MCI_OPEN_PARMSA
     1954    dwCallback As DWord
     1955    wDeviceID As DWord
     1956    lpstrDeviceType As LPCSTR
     1957    lpstrElementName As LPCSTR
     1958    lpstrAlias As LPCSTR
     1959End Type
     1960TypeDef PMCI_OPEN_PARMSA = *MCI_OPEN_PARMSA
     1961TypeDef LPMCI_OPEN_PARMSA = *MCI_OPEN_PARMSA
     1962#ifdef UNICODE
     1963TypeDef MCI_OPEN_PARMS = MCI_OPEN_PARMSW
     1964#else
     1965TypeDef MCI_OPEN_PARMS = MCI_OPEN_PARMSA
     1966#endif
    17131967TypeDef PMCI_OPEN_PARMS = *MCI_OPEN_PARMS
    17141968TypeDef LPMCI_OPEN_PARMS = *MCI_OPEN_PARMS
     
    17381992TypeDef LPMCI_STATUS_PARMS = *MCI_STATUS_PARMS
    17391993
     1994Type MCI_INFO_PARMSW
     1995    dwCallback As DWord
     1996    lpstrReturn As LPWSTR
     1997    dwRetSize As DWord
     1998End Type
     1999TypeDef PMCI_INFO_PARMSW = *MCI_INFO_PARMSW
     2000TypeDef LPMCI_INFO_PARMSW = *MCI_INFO_PARMSW
    17402001Type MCI_INFO_PARMSA
    17412002    dwCallback As DWord
     
    17452006TypeDef PMCI_INFO_PARMSA = *MCI_INFO_PARMSA
    17462007TypeDef LPMCI_INFO_PARMSA = *MCI_INFO_PARMSA
     2008#ifdef UNICODE
     2009TypeDef MCI_INFO_PARMS = MCI_INFO_PARMSW
     2010#else
    17472011TypeDef MCI_INFO_PARMS = MCI_INFO_PARMSA
    1748 TypeDef PMCI_INFO_PARMS = PMCI_INFO_PARMSA
    1749 TypeDef LPMCI_INFO_PARMS = LPMCI_INFO_PARMSA
     2012#endif
     2013TypeDef PMCI_INFO_PARMS = *MCI_INFO_PARMS
     2014TypeDef LPMCI_INFO_PARMS = *MCI_INFO_PARMS
    17502015
    17512016Type MCI_GETDEVCAPS_PARMS
     
    17572022TypeDef LPMCI_GETDEVCAPS_PARMS = *MCI_GETDEVCAPS_PARMS
    17582023
     2024Type MCI_SYSINFO_PARMSW
     2025    dwCallback As DWord
     2026    lpstrReturn As LPWSTR
     2027    dwRetSize As DWord
     2028    dwNumber As DWord
     2029    wDeviceType As DWord
     2030End Type
     2031TypeDef PMCI_SYSINFO_PARMSW = *MCI_SYSINFO_PARMSW
     2032TypeDef LPMCI_SYSINFO_PARMSW = *MCI_SYSINFO_PARMSW
    17592033Type MCI_SYSINFO_PARMSA
    17602034    dwCallback As DWord
     
    17662040TypeDef PMCI_SYSINFO_PARMSA = *MCI_SYSINFO_PARMSA
    17672041TypeDef LPMCI_SYSINFO_PARMSA = *MCI_SYSINFO_PARMSA
     2042#ifdef UNICODE
    17682043TypeDef MCI_SYSINFO_PARMS = MCI_SYSINFO_PARMSA
    1769 TypeDef PMCI_SYSINFO_PARMS = PMCI_SYSINFO_PARMSA
    1770 TypeDef LPMCI_SYSINFO_PARMS = LPMCI_SYSINFO_PARMSA
     2044#else
     2045TypeDef MCI_SYSINFO_PARMS = MCI_SYSINFO_PARMSW
     2046#endif
     2047TypeDef PMCI_SYSINFO_PARMS = *MCI_SYSINFO_PARMS
     2048TypeDef LPMCI_SYSINFO_PARMS = *MCI_SYSINFO_PARMS
    17712049
    17722050Type MCI_SET_PARMS
     
    17862064TypeDef LPMCI_BREAK_PARMS = *MCI_BREAK_PARMS
    17872065
     2066Type MCI_SAVE_PARMSW
     2067    dwCallback As DWord
     2068    lpfilename As LPCWSTR
     2069End Type
     2070TypeDef PMCI_SAVE_PARMSW = *MCI_SAVE_PARMSW
     2071TypeDef LPMCI_SAVE_PARMSW = *MCI_SAVE_PARMSW
    17882072Type MCI_SAVE_PARMSA
    17892073    dwCallback As DWord
    1790     lpfilename As LPSTR
     2074    lpfilename As LPCSTR
    17912075End Type
    17922076TypeDef PMCI_SAVE_PARMSA = *MCI_SAVE_PARMSA
    17932077TypeDef LPMCI_SAVE_PARMSA = *MCI_SAVE_PARMSA
     2078#ifdef UNICODE
     2079TypeDef MCI_SAVE_PARMS = MCI_SAVE_PARMSW
     2080#else
    17942081TypeDef MCI_SAVE_PARMS = MCI_SAVE_PARMSA
    1795 TypeDef PMCI_SAVE_PARMS = PMCI_SAVE_PARMSA
    1796 TypeDef LPMCI_SAVE_PARMS = LPMCI_SAVE_PARMSA
    1797 
     2082#endif
     2083TypeDef PMCI_SAVE_PARMS = *MCI_SAVE_PARMS
     2084TypeDef LPMCI_SAVE_PARMS = *MCI_SAVE_PARMS
     2085
     2086Type MCI_LOAD_PARMSW
     2087    dwCallback As DWord
     2088    lpfilename As LPCWSTR
     2089End Type
     2090TypeDef PMCI_LOAD_PARMSW = *MCI_LOAD_PARMSW
     2091TypeDef LPMCI_LOAD_PARMSW = *MCI_LOAD_PARMSW
    17982092Type MCI_LOAD_PARMSA
    17992093    dwCallback As DWord
    1800     lpfilename As LPSTR
     2094    lpfilename As LPCSTR
    18012095End Type
    18022096TypeDef PMCI_LOAD_PARMSA = *MCI_LOAD_PARMSA
    18032097TypeDef LPMCI_LOAD_PARMSA = *MCI_LOAD_PARMSA
     2098#ifdef UNICODE
     2099TypeDef MCI_LOAD_PARMS = MCI_LOAD_PARMSW
     2100#else
    18042101TypeDef MCI_LOAD_PARMS = MCI_LOAD_PARMSA
    1805 TypeDef PMCI_LOAD_PARMS = PMCI_LOAD_PARMSA
    1806 TypeDef LPMCI_LOAD_PARMS = LPMCI_LOAD_PARMSA
     2102#endif
     2103TypeDef PMCI_LOAD_PARMS = *MCI_LOAD_PARMS
     2104TypeDef LPMCI_LOAD_PARMS = *MCI_LOAD_PARMS
    18072105
    18082106Type MCI_RECORD_PARMS
     
    18592157TypeDef LPMCI_VD_STEP_PARMS = *MCI_VD_STEP_PARMS
    18602158
     2159Type MCI_VD_ESCAPE_PARMSW
     2160    dwCallback As DWord
     2161    lpstrCommand As LPCWSTR
     2162End Type
     2163TypeDef PMCI_VD_ESCAPE_PARMSW = *MCI_VD_ESCAPE_PARMSW
     2164TypeDef LPMCI_VD_ESCAPE_PARMSW = *MCI_VD_ESCAPE_PARMSW
    18612165Type MCI_VD_ESCAPE_PARMSA
    18622166    dwCallback As DWord
    1863     lpstrCommand As LPSTR
     2167    lpstrCommand As LPCSTR
    18642168End Type
    18652169TypeDef PMCI_VD_ESCAPE_PARMSA = *MCI_VD_ESCAPE_PARMSA
    18662170TypeDef LPMCI_VD_ESCAPE_PARMSA = *MCI_VD_ESCAPE_PARMSA
     2171#ifdef UNICODE
     2172TypeDef MCI_VD_ESCAPE_PARMS = MCI_VD_ESCAPE_PARMSW
     2173#else
    18672174TypeDef MCI_VD_ESCAPE_PARMS = MCI_VD_ESCAPE_PARMSA
    1868 TypeDef PMCI_VD_ESCAPE_PARMS = PMCI_VD_ESCAPE_PARMSA
    1869 TypeDef LPMCI_VD_ESCAPE_PARMS = LPMCI_VD_ESCAPE_PARMSA
     2175#endif
     2176TypeDef PMCI_VD_ESCAPE_PARMS = *MCI_VD_ESCAPE_PARMS
     2177TypeDef LPMCI_VD_ESCAPE_PARMS = *MCI_VD_ESCAPE_PARMS
    18702178
    18712179' MCI extensions for CD audio devices
     
    18982206Const MCI_WAVE_GETDEVCAPS_OUTPUTS =    &H00004002
    18992207
     2208Type MCI_WAVE_OPEN_PARMSW
     2209    dwCallback As DWord
     2210    wDeviceID As MCIDEVICEID
     2211    lpstrDeviceType As LPCWSTR
     2212    lpstrElementName As LPCWSTR
     2213    lpstrAlias As LPCWSTR
     2214    dwBufferSeconds As DWord
     2215End Type
     2216TypeDef PMCI_WAVE_OPEN_PARMSW = *MCI_WAVE_OPEN_PARMSW
     2217TypeDef LPMCI_WAVE_OPEN_PARMSW = *MCI_WAVE_OPEN_PARMSW
    19002218Type MCI_WAVE_OPEN_PARMSA
    19012219    dwCallback As DWord
    19022220    wDeviceID As MCIDEVICEID
    1903     lpstrDeviceType As LPSTR
    1904     lpstrElementName As LPSTR
    1905     lpstrAlias As LPSTR
     2221    lpstrDeviceType As LPCSTR
     2222    lpstrElementName As LPCSTR
     2223    lpstrAlias As LPCSTR
    19062224    dwBufferSeconds As DWord
    19072225End Type
    19082226TypeDef PMCI_WAVE_OPEN_PARMSA = *MCI_WAVE_OPEN_PARMSA
    19092227TypeDef LPMCI_WAVE_OPEN_PARMSA = *MCI_WAVE_OPEN_PARMSA
     2228#ifdef UNICODE
     2229TypeDef MCI_WAVE_OPEN_PARMS = MCI_WAVE_OPEN_PARMSW
     2230#else
    19102231TypeDef MCI_WAVE_OPEN_PARMS = MCI_WAVE_OPEN_PARMSA
    1911 TypeDef PMCI_WAVE_OPEN_PARMS = PMCI_WAVE_OPEN_PARMSA
    1912 TypeDef LPMCI_WAVE_OPEN_PARMS = LPMCI_WAVE_OPEN_PARMSA
     2232#endif
     2233TypeDef PMCI_WAVE_OPEN_PARMS = *MCI_WAVE_OPEN_PARMS
     2234TypeDef LPMCI_WAVE_OPEN_PARMS = *MCI_WAVE_OPEN_PARMS
    19132235
    19142236Type MCI_WAVE_DELETE_PARMS
     
    20182340Const MCI_ANIM_UPDATE_HDC =             &H00020000
    20192341
    2020 Type MCI_ANIM_OPEN_PARMSA
     2342Type MCI_ANIM_OPEN_PARMSW
    20212343    dwCallback As DWord
    20222344    wDeviceID As MCIDEVICEID
    2023     lpstrDeviceType As LPSTR
    2024     lpstrElementName As LPSTR
    2025     lpstrAlias As LPSTR
     2345    lpstrDeviceType As LPCWSTR
     2346    lpstrElementName As LPCWSTR
     2347    lpstrAlias As LPCWSTR
    20262348    dwStyle As DWord
    20272349    hWndParent As HWND
    20282350End Type
     2351TypeDef PMCI_ANIM_OPEN_PARMSW = *MCI_ANIM_OPEN_PARMSW
     2352TypeDef LPMCI_ANIM_OPEN_PARMSW = *MCI_ANIM_OPEN_PARMSW
     2353Type MCI_ANIM_OPEN_PARMSA
     2354    dwCallback As DWord
     2355    wDeviceID As MCIDEVICEID
     2356    lpstrDeviceType As LPCSTR
     2357    lpstrElementName As LPCSTR
     2358    lpstrAlias As LPCSTR
     2359    dwStyle As DWord
     2360    hWndParent As HWND
     2361End Type
    20292362TypeDef PMCI_ANIM_OPEN_PARMSA = *MCI_ANIM_OPEN_PARMSA
    20302363TypeDef LPMCI_ANIM_OPEN_PARMSA = *MCI_ANIM_OPEN_PARMSA
     2364#ifdef UNICODE
     2365TypeDef MCI_ANIM_OPEN_PARMS = MCI_ANIM_OPEN_PARMSW
     2366#else
    20312367TypeDef MCI_ANIM_OPEN_PARMS = MCI_ANIM_OPEN_PARMSA
    2032 TypeDef PMCI_ANIM_OPEN_PARMS = PMCI_ANIM_OPEN_PARMSA
    2033 TypeDef LPMCI_ANIM_OPEN_PARMS = LPMCI_ANIM_OPEN_PARMSA
     2368#endif
     2369TypeDef PMCI_ANIM_OPEN_PARMS = *MCI_ANIM_OPEN_PARMS
     2370TypeDef LPMCI_ANIM_OPEN_PARMS = *MCI_ANIM_OPEN_PARMS
    20342371
    20352372Type MCI_ANIM_PLAY_PARMS
     
    20492386TypeDef LPMCI_ANIM_STEP_PARMS = *MCI_ANIM_STEP_PARMS
    20502387
    2051 Type MCI_ANIM_WINDOW_PARMSA
     2388Type MCI_ANIM_WINDOW_PARMSW
    20522389    dwCallback As DWord
    20532390    hWnd As HWND
    20542391    nCmdShow As DWord
    2055     lpstrText As LPSTR
     2392    lpstrText As LPCWSTR
     2393End Type
     2394TypeDef PMCI_ANIM_WINDOW_PARMSW = *MCI_ANIM_WINDOW_PARMSW
     2395TypeDef LPMCI_ANIM_WINDOW_PARMSW = *MCI_ANIM_WINDOW_PARMSW
     2396Type MCI_ANIM_WINDOW_PARMSA
     2397    dwCallback As DWord
     2398    hWnd As HWND
     2399    nCmdShow As DWord
     2400    lpstrText As LPCSTR
    20562401End Type
    20572402TypeDef PMCI_ANIM_WINDOW_PARMSA = *MCI_ANIM_WINDOW_PARMSA
    20582403TypeDef LPMCI_ANIM_WINDOW_PARMSA = *MCI_ANIM_WINDOW_PARMSA
     2404#ifdef UNICODE
     2405TypeDef MCI_ANIM_WINDOW_PARMS = MCI_ANIM_WINDOW_PARMSW
     2406#else
    20592407TypeDef MCI_ANIM_WINDOW_PARMS = MCI_ANIM_WINDOW_PARMSA
    2060 TypeDef PMCI_ANIM_WINDOW_PARMS = PMCI_ANIM_WINDOW_PARMSA
    2061 TypeDef LPMCI_ANIM_WINDOW_PARMS = LPMCI_ANIM_WINDOW_PARMSA
     2408#endif
     2409TypeDef PMCI_ANIM_WINDOW_PARMS = *MCI_ANIM_WINDOW_PARMS
     2410TypeDef LPMCI_ANIM_WINDOW_PARMS = *MCI_ANIM_WINDOW_PARMS
    20622411
    20632412Type MCI_ANIM_RECT_PARMS
     
    21012450Const MCI_OVLY_WHERE_VIDEO =            &H00100000
    21022451
    2103 Type MCI_OVLY_OPEN_PARMSA
     2452Type MCI_OVLY_OPEN_PARMSAW
    21042453    dwCallback As DWord
    21052454    wDeviceID As MCIDEVICEID
    2106     lpstrDeviceType As LPSTR
    2107     lpstrElementName As LPSTR
    2108     lpstrAlias As LPSTR
     2455    lpstrDeviceType As LPCWSTR
     2456    lpstrElementName As LPCWSTR
     2457    lpstrAlias As LPCWSTR
    21092458    dwStyle As DWord
    21102459    hWndParent As HWND
    21112460End Type
     2461TypeDef PMCI_OVLY_OPEN_PARMSW = *MCI_OVLY_OPEN_PARMSW
     2462TypeDef LPMCI_OVLY_OPEN_PARMSW = *MCI_OVLY_OPEN_PARMSW
     2463Type MCI_OVLY_OPEN_PARMSA
     2464    dwCallback As DWord
     2465    wDeviceID As MCIDEVICEID
     2466    lpstrDeviceType As LPCSTR
     2467    lpstrElementName As LPCSTR
     2468    lpstrAlias As LPCSTR
     2469    dwStyle As DWord
     2470    hWndParent As HWND
     2471End Type
    21122472TypeDef PMCI_OVLY_OPEN_PARMSA = *MCI_OVLY_OPEN_PARMSA
    21132473TypeDef LPMCI_OVLY_OPEN_PARMSA = *MCI_OVLY_OPEN_PARMSA
     2474#ifdef UNICODE
     2475TypeDef MCI_OVLY_OPEN_PARMS = MCI_OVLY_OPEN_PARMSW
     2476#else
    21142477TypeDef MCI_OVLY_OPEN_PARMS = MCI_OVLY_OPEN_PARMSA
    2115 TypeDef PMCI_OVLY_OPEN_PARMS = PMCI_OVLY_OPEN_PARMSA
    2116 TypeDef LPMCI_OVLY_OPEN_PARMS = LPMCI_OVLY_OPEN_PARMSA
    2117 
    2118 Type MCI_OVLY_WINDOW_PARMSA
     2478#endif
     2479TypeDef PMCI_OVLY_OPEN_PARMS = *MCI_OVLY_OPEN_PARMS
     2480TypeDef LPMCI_OVLY_OPEN_PARMS = *MCI_OVLY_OPEN_PARMS
     2481
     2482Type MCI_OVLY_WINDOW_PARMSW
    21192483    dwCallback As DWord
    21202484    hWnd As HWND
    21212485    nCmdShow As DWord
    2122     lpstrText As LPSTR
     2486    lpstrText As LPCWSTR
     2487End Type
     2488TypeDef PMCI_OVLY_WINDOW_PARMSW = *MCI_OVLY_WINDOW_PARMSW
     2489TypeDef LPMCI_OVLY_WINDOW_PARMSW = *MCI_OVLY_WINDOW_PARMSW
     2490Type MCI_OVLY_WINDOW_PARMSA
     2491    dwCallback As DWord
     2492    hWnd As HWND
     2493    nCmdShow As DWord
     2494    lpstrText As LPCSTR
    21232495End Type
    21242496TypeDef PMCI_OVLY_WINDOW_PARMSA = *MCI_OVLY_WINDOW_PARMSA
    21252497TypeDef LPMCI_OVLY_WINDOW_PARMSA = *MCI_OVLY_WINDOW_PARMSA
     2498#ifdef UNICODE
     2499TypeDef MCI_OVLY_WINDOW_PARMS = MCI_OVLY_WINDOW_PARMSW
     2500#else
    21262501TypeDef MCI_OVLY_WINDOW_PARMS = MCI_OVLY_WINDOW_PARMSA
    2127 TypeDef PMCI_OVLY_WINDOW_PARMS = PMCI_OVLY_WINDOW_PARMSA
    2128 TypeDef LPMCI_OVLY_WINDOW_PARMS = LPMCI_OVLY_WINDOW_PARMSA
     2502#endif
     2503TypeDef PMCI_OVLY_WINDOW_PARMS = *MCI_OVLY_WINDOW_PARMS
     2504TypeDef LPMCI_OVLY_WINDOW_PARMS = *MCI_OVLY_WINDOW_PARMS
    21292505
    21302506Type MCI_OVLY_RECT_PARMS
     
    21352511TypeDef LPMCI_OVLY_RECT_PARMS = *MCI_OVLY_RECT_PARMS
    21362512
     2513Type MCI_OVLY_SAVE_PARMSW
     2514    dwCallback As DWord
     2515    lpfilename As LPCWSTR
     2516    rc As RECT
     2517End Type
     2518TypeDef PMCI_OVLY_SAVE_PARMSW = *MCI_OVLY_SAVE_PARMSW
     2519TypeDef LPMCI_OVLY_SAVE_PARMSW = *MCI_OVLY_SAVE_PARMSW
    21372520Type MCI_OVLY_SAVE_PARMSA
    21382521    dwCallback As DWord
    2139     lpfilename As LPSTR
     2522    lpfilename As LPCSTR
    21402523    rc As RECT
    21412524End Type
    21422525TypeDef PMCI_OVLY_SAVE_PARMSA = *MCI_OVLY_SAVE_PARMSA
    21432526TypeDef LPMCI_OVLY_SAVE_PARMSA = *MCI_OVLY_SAVE_PARMSA
     2527#ifdef UNICODE
     2528TypeDef MCI_OVLY_SAVE_PARMS = MCI_OVLY_SAVE_PARMSW
     2529#else
    21442530TypeDef MCI_OVLY_SAVE_PARMS = MCI_OVLY_SAVE_PARMSA
    2145 TypeDef PMCI_OVLY_SAVE_PARMS = PMCI_OVLY_SAVE_PARMSA
    2146 TypeDef LPMCI_OVLY_SAVE_PARMS = LPMCI_OVLY_SAVE_PARMSA
     2531#endif
     2532TypeDef PMCI_OVLY_SAVE_PARMS = *MCI_OVLY_SAVE_PARMS
     2533TypeDef LPMCI_OVLY_SAVE_PARMS = *MCI_OVLY_SAVE_PARMS
    21472534
    21482535Type MCI_OVLY_LOAD_PARMSA
     
    21632550' DIB Driver extensions
    21642551Const SELECTDIB = 41
    2165 Const DIBINDEX(n) = MAKELONG(n,&H10FF)
     2552Const DIBINDEX(n) = MAKELONG(n, &H10FF)
    21662553
    21672554#endif '_INC_MMSYS
  • Include/api_msg.sbp

    r120 r141  
    612612    PowerSetting As GUID
    613613    DataLength As DWord
    614     Data[1] As Byte
     614    Data[ELM(1)] As Byte
    615615End Type
    616616'#endif
  • Include/api_psapi.sbp

    r96 r141  
     1' api_psapi.sbp
     2
    13#ifndef _INC_PSAPI_
    24#define _INC_PSAPI_
    35
     6#ifdef UNICODE
     7Const _FuncName_GetModuleBaseName = "GetModuleBaseNameW"
     8Const _FuncName_GetModuleFileNameEx = "GetModuleFileNameExW"
     9Const _FuncName_GetMappedFileName = "GetMappedFileNameW"
     10Const _FuncName_GetDeviceDriverBaseName = "GetDeviceDriverBaseNameW"
     11Const _FuncName_GetDeviceDriverFileName = "GetDeviceDriverFileNameW"
     12Const _FuncName_GetProcessImageFileName = "GetProcessImageFileNameW"
     13Const _FuncName_EnumPageFiles = "EnumPageFilesW"
     14#else
     15Const _FuncName_GetModuleBaseName = "GetModuleBaseNameA"
     16Const _FuncName_GetModuleFileNameEx = "GetModuleFileNameExA"
     17Const _FuncName_GetMappedFileName = "GetMappedFileNameA"
     18Const _FuncName_GetDeviceDriverBaseName = "GetDeviceDriverBaseNameA"
     19Const _FuncName_GetDeviceDriverFileName = "GetDeviceDriverFileNameA"
     20Const _FuncName_GetProcessImageFileName = "GetProcessImageFileNameA"
     21Const _FuncName_EnumPageFiles = "EnumPageFilesA"
     22#endif
     23
    424Declare Function EnumProcesses Lib "psapi" (lpidProcess As *DWord, cb As DWord, ByRef cbNeeded As DWord) As BOOL
    525Declare Function EnumProcessModules Lib "psapi" (hProcess As HANDLE, lphModule As *HANDLE, cb As DWord, ByRef lpcbNeeded As DWord) As BOOL
    6 Declare Function GetModuleBaseName Lib "psapi" Alias "GetModuleBaseNameA" (hProcess As HANDLE, hModule As HANDLE, lpBaseName As LPSTR, nSize As DWord) As DWORD
    7 Declare Function GetModuleFileNameEx Lib "psapi" Alias "GetModuleFileNameExA" (hProcess As HANDLE, hModule As HANDLE, lpFilename As LPSTR, nSize As DWord) As DWORD
     26Declare Function GetModuleBaseName Lib "psapi" Alias _FuncName_GetModuleBaseName (hProcess As HANDLE, hModule As HANDLE, lpBaseName As LPTSTR, nSize As DWord) As DWORD
     27Declare Function GetModuleFileNameEx Lib "psapi" Alias _FuncName_GetModuleFileNameEx (hProcess As HANDLE, hModule As HANDLE, lpFilename As LPTSTR, nSize As DWord) As DWORD
    828
    929Type MODULEINFO
     
    2747
    2848Declare Function GetWsChanges Lib "psapi" (hProcess As HANDLE, lpWatchInfo As PPSAPI_WS_WATCH_INFORMATION, cb As DWord) As BOOL
    29 Declare Function GetMappedFileName Lib "psapi" Alias "GetMappedFileNameA" (hProcess As HANDLE, lpv As VoidPtr, lpFilename As LPSTR, nSize As DWord) As DWORD
     49Declare Function GetMappedFileName Lib "psapi" Alias _FuncName_GetMappedFileName (hProcess As HANDLE, lpv As VoidPtr, lpFilename As LPTSTR, nSize As DWord) As DWORD
    3050Declare Function EnumDeviceDrivers Lib "psapi" (ByRef lpImageBase As VoidPtr, cb As DWord, ByRef lpcbNeeded As DWord) As BOOL
    31 Declare Function GetDeviceDriverBaseName Lib "psapi" Alias "GetDeviceDriverBaseNameA" (ImageBase As VoidPtr, lpBaseName As LPSTR, nSize As DWord) As DWORD
    32 Declare Function GetDeviceDriverFileName Lib "psapi" Alias "GetDeviceDriverFileNamA" (ImageBase As VoidPtr, lpFilename As LPSTR, nSize As DWord) As DWORD
     51Declare Function GetDeviceDriverBaseName Lib "psapi" Alias _FuncName_GetDeviceDriverBaseName (ImageBase As VoidPtr, lpBaseName As LPTSTR, nSize As DWord) As DWORD
     52Declare Function GetDeviceDriverFileName Lib "psapi" Alias _FuncName_GetDeviceDriverFileName (ImageBase As VoidPtr, lpFilename As LPTSTR, nSize As DWord) As DWORD
    3353
    3454' Structure for GetProcessMemoryInfo()
     
    100120TypeDef PENUM_PAGE_FILE_CALLBACKW = *Function(pContext As VoidPtr, pPageFileInfo As PENUM_PAGE_FILE_INFORMATION, lpFilename As LPCWSTR) As BOOL
    101121TypeDef PENUM_PAGE_FILE_CALLBACKA = *Function(pContext As VoidPtr, pPageFileInfo As PENUM_PAGE_FILE_INFORMATION, lpFilename As LPCSTR) As BOOL
     122#ifdef UNICODE
     123TypeDef PENUM_PAGE_FILE_CALLBACK = PENUM_PAGE_FILE_CALLBACKW
     124#else
     125TypeDef PENUM_PAGE_FILE_CALLBACK = PENUM_PAGE_FILE_CALLBACKA
     126#endif
    102127
    103 Declare Function EnumPageFiles Lib "psapi" Alias "EnumPageFilesA" (pCallBackRoutine As PENUM_PAGE_FILE_CALLBACKA, pContext As VoidPtr) As BOOL
    104 Declare Function GetProcessImageFileName Lib "psapi" Alias "GetProcessImageFileNameA" (hProcess As HANDLE, lpImageFileName As LPSTR, nSize As DWord) As DWORD
     128Declare Function EnumPageFiles Lib "psapi" Alias _FuncName_EnumPageFiles (pCallBackRoutine As PENUM_PAGE_FILE_CALLBACK, pContext As VoidPtr) As BOOL
     129Declare Function GetProcessImageFileName Lib "psapi" Alias _FuncName_GetProcessImageFileName (hProcess As HANDLE, lpImageFileName As LPTSTR, nSize As DWord) As DWORD
    105130
    106131#endif '_INC_PSAPI
  • Include/api_reg.sbp

    r35 r141  
    55#ifndef _INC_REG
    66#define _INC_REG
     7
     8#ifdef UNICODE
     9Const _FuncName_RegConnectRegistry = "RegConnectRegistryW"
     10Const _FuncName_RegCreateKeyEx = "RegCreateKeyExW"
     11Const _FuncName_RegDeleteKey = "RegDeleteKeyW"
     12Const _FuncName_RegDeleteValue = "RegDeleteValueW"
     13Const _FuncName_RegEnumKeyEx = "RegEnumKeyExW"
     14Const _FuncName_RegEnumValue = "RegEnumValueW"
     15Const _FuncName_RegLoadKey = "RegLoadKeyW"
     16Const _FuncName_RegOpenKeyEx = "RegOpenKeyExW"
     17Const _FuncName_RegQueryInfoKey = "RegQueryInfoKeyW"
     18Const _FuncName_RegQueryMultipleValues = "RegQueryMultipleValuesW"
     19Const _FuncName_RegQueryValueEx = "RegQueryValueExW"
     20Const _FuncName_RegSaveKey = "RegSaveKeyW"
     21Const _FuncName_RegSetValueEx = "RegSetValueExW"
     22Const _FuncName_RegUnLoadKey = "RegUnLoadKeyW"
     23#else
     24Const _FuncName_RegConnectRegistry = "RegConnectRegistryA"
     25Const _FuncName_RegCreateKeyEx = "RegCreateKeyExA"
     26Const _FuncName_RegDeleteKey = "RegDeleteKeyA"
     27Const _FuncName_RegDeleteValue = "RegDeleteValueA"
     28Const _FuncName_RegEnumKeyEx = "RegEnumKeyExA"
     29Const _FuncName_RegEnumValue = "RegEnumValueA"
     30Const _FuncName_RegLoadKey = "RegLoadKeyA"
     31Const _FuncName_RegOpenKeyEx = "RegOpenKeyExA"
     32Const _FuncName_RegQueryInfoKey = "RegQueryInfoKeyA"
     33Const _FuncName_RegQueryMultipleValues = "RegQueryMultipleValuesA"
     34Const _FuncName_RegQueryValueEx = "RegQueryValueExA"
     35Const _FuncName_RegSaveKey = "RegSaveKeyA"
     36Const _FuncName_RegSetValueEx = "RegSetValueExA"
     37Const _FuncName_RegUnLoadKey = "RegUnLoadKeyA"
     38#endif
    739
    840
     
    5789Const REG_RESOURCE_LIST =       8
    5890
     91Type VALENTW
     92    ve_valuename As PWSTR
     93    ve_valuelen As DWord
     94    ve_valueptr As ULONG_PTR
     95    ve_type As DWord
     96End Type
     97Type VALENTA
     98    ve_valuename As PSTR
     99    ve_valuelen As DWord
     100    ve_valueptr As ULONG_PTR
     101    ve_type As DWord
     102End Type
     103
     104#ifdef UNICODE
     105TypeDef VALENT = VALENTW
     106#else
     107TypeDef VALENT = VALENTA
     108#endif
    59109
    60110'------------------------
     
    62112
    63113Declare Function RegCloseKey Lib "advapi32" (hKey As HKEY) As Long
    64 Declare Function RegConnectRegistry Lib "advapi32" Alias "RegConnectRegistryA" (pMachineName As PCSTR, hKey As HKEY, ByRef hkResult As HKEY) As Long
    65 Declare Function RegCreateKeyEx Lib "advapi32" Alias "RegCreateKeyExA" (hKey As HKEY, lpSubKey As PCSTR, Reserved As DWord, lpClass As PSTR, dwOptions As DWord, samDesired As Long, ByRef lpSecurityAttributes As SECURITY_ATTRIBUTES, ByRef phkResult As HKEY, lpdwDisposition As *DWord) As Long
    66 Declare Function RegDeleteKey Lib "advapi32" Alias "RegDeleteKeyA" (hKey As HKEY, lpSubKey As PCSTR) As Long
    67 Declare Function RegDeleteValue Lib "advapi32" Alias "RegDeleteValueA" (hKey As HKEY, lpValueName As PCSTR) As Long
    68 Declare Function RegEnumKeyEx Lib "advapi32" Alias "RegEnumKeyExA" (hKey As HKEY, dwIndex As DWord, pName As PSTR, ByRef cName As DWord, pReserved As *DWord, pClass As PSTR, ByRef cClass As DWord, pftLastWriteTime As *FILETIME) As Long
    69 Declare Function RegEnumValue Lib "advapi32" Alias "RegEnumValueA" (hKey As HKEY, dwIndex As DWord, pValueName As PSTR, ByRef cValueName As DWord, pReserved As *DWord, pType As *DWord, pData As *Byte, pcbData As *DWord) As Long
     114Declare Function RegConnectRegistry Lib "advapi32" Alias _FuncName_RegConnectRegistry (pMachineName As PCTSTR, hKey As HKEY, ByRef hkResult As HKEY) As Long
     115Declare Function RegCreateKeyEx Lib "advapi32" Alias _FuncName_RegCreateKeyEx (hKey As HKEY, lpSubKey As PCTSTR, Reserved As DWord, lpClass As PTSTR, dwOptions As DWord, samDesired As Long, ByRef lpSecurityAttributes As SECURITY_ATTRIBUTES, ByRef phkResult As HKEY, lpdwDisposition As *DWord) As Long
     116Declare Function RegDeleteKey Lib "advapi32" Alias _FuncName_RegDeleteKey (hKey As HKEY, lpSubKey As PCTSTR) As Long
     117Declare Function RegDeleteValue Lib "advapi32" Alias _FuncName_RegDeleteValue (hKey As HKEY, lpValueName As PCTSTR) As Long
     118Declare Function RegEnumKeyEx Lib "advapi32" Alias _FuncName_RegEnumKeyEx (hKey As HKEY, dwIndex As DWord, pName As PTSTR, ByRef cName As DWord, pReserved As *DWord, pClass As PTSTR, ByRef cClass As DWord, pftLastWriteTime As *FILETIME) As Long
     119Declare Function RegEnumValue Lib "advapi32" Alias _FuncName_RegEnumValue (hKey As HKEY, dwIndex As DWord, pValueName As PTSTR, ByRef cValueName As DWord, pReserved As *DWord, pType As *DWord, pData As *Byte, pcbData As *DWord) As Long
    70120Declare Function RegFlushKey Lib "advapi32"(hKey As HKEY) As Long
    71 Declare Function RegLoadKey Lib "advapi32" Alias "RegLoadKeyA" (hKey As HKEY, pSubKey As PCSTR, pFile As PCSTR) As Long
    72 Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (hKey As HKEY, lpSubKey As PCSTR, ulOptions As DWord, samDesired As Long, ByRef phkResult As HKEY) As Long
    73 Declare Function RegQueryInfoKey Lib "advapi32" Alias "RegQueryInfoKeyA" (hKey As HKEY, pClass As PSTR, pcClass As *DWord, pReserved As *DWord, pcSubKeys As *DWord, pcMaxSubKeyLen As *DWord, pcMaxClassLen As *DWord, pcValues As *DWord, pcMaxValueNameLen As *DWord, pcMaxValueLen As *DWord, pcbSecurityDescriptor As *DWord, pftLastWriteTime As *FILETIME) As Long
    74 Declare Function RegQueryMultipleValues Lib "advapi32" Alias "RegQueryMultipleValuesA" (hKey As HKEY, val_list As *VALENT, num_vals As DWord, pValueBuf As PSTR, ByRef dwTotsize As DWord) As Long
    75 Declare Function RegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA" (hKey As HKEY, lpValueName As PCSTR, lpReserved As DWord, lpType As *DWord, lpData As VoidPtr, lpcbData As *DWord) As Long
    76 Declare Function RegSaveKey Lib "advapi32" Alias "RegSaveKeyA" (hKey As HKEY, pFile As PCSTR, pSecurityAttributes As *SECURITY_ATTRIBUTES) As Long
    77 Declare Function RegSetValueEx Lib "advapi32" Alias "RegSetValueExA" (hKey As HKEY, lpValueName As PCSTR, Reserved As DWord, dwType As DWord, lpData As VoidPtr, cbData As DWord) As Long
    78 Declare Function RegUnLoadKey Lib "advapi32" Alias "RegUnLoadKeyA" (hKey As HKEY, pSubKey As PCSTR) As Long
    79 
    80 Type VALENT
    81     ve_valuename As PSTR
    82     ve_valuelen As DWord
    83     ve_valueptr As ULONG_PTR
    84     ve_type As DWord
    85 End Type
    86 #endif '_INC_REG
     121/*
     122Declare Function RegLoadKey Lib "advapi32" Alias _FuncName_RegLoadKey (hKey As HKEY, pSubKey As PCTSTR, pFile As PCTSTR) As Long
     123Declare Function RegOpenKeyEx Lib "advapi32" Alias _FuncName_RegOpenKeyEx (hKey As HKEY, lpSubKey As PCTSTR, ulOptions As DWord, samDesired As Long, ByRef phkResult As HKEY) As Long
     124Declare Function RegQueryInfoKey Lib "advapi32" Alias _FuncName_RegQueryInfoKey (hKey As HKEY, pClass As PTSTR, pcClass As *DWord, pReserved As *DWord, pcSubKeys As *DWord, pcMaxSubKeyLen As *DWord, pcMaxClassLen As *DWord, pcValues As *DWord, pcMaxValueNameLen As *DWord, pcMaxValueLen As *DWord, pcbSecurityDescriptor As *DWord, pftLastWriteTime As *FILETIME) As Long
     125Declare Function RegQueryMultipleValues Lib "advapi32" Alias _FuncName_RegQueryMultipleValues (hKey As HKEY, val_list As *VALENT, num_vals As DWord, pValueBuf As PTSTR, ByRef dwTotsize As DWord) As Long
     126Declare Function RegQueryValueEx Lib "advapi32" Alias _FuncName_RegQueryValueEx (hKey As HKEY, lpValueName As PCTSTR, lpReserved As DWord, lpType As *DWord, lpData As VoidPtr, lpcbData As *DWord) As Long
     127Declare Function RegSaveKey Lib "advapi32" Alias _FuncName_RegSaveKey (hKey As HKEY, pFile As PCTSTR, pSecurityAttributes As *SECURITY_ATTRIBUTES) As Long
     128Declare Function RegSetValueEx Lib "advapi32" Alias _FuncName_RegSetValueEx (hKey As HKEY, lpValueName As PCTSTR, Reserved As DWord, dwType As DWord, lpData As VoidPtr, cbData As DWord) As Long
     129Declare Function RegUnLoadKey Lib "advapi32" Alias _FuncName_RegUnLoadKey (hKey As HKEY, pSubKey As PCTSTR) As Long
     130*/
     131'_INC_REG
  • Include/api_richedit.sbp

    r1 r141  
    3030Const CFE_AUTOCOLOR = &H40000000
    3131
    32 Type CHARFORMAT
     32Type CHARFORMATW
    3333    cbSize As DWord
    3434    dwMask As DWord
     
    3636    yHeight As Long
    3737    yOffset As Long
    38     crTextColor As DWord
     38    crTextColor As COLORREF
    3939    bCharSet As Byte
    4040    bPitchAndFamily As Byte
    41     szFaceName[ELM(LF_FACESIZE)] As Byte
    42 End Type
    43 
     41    szFaceName[ELM(LF_FACESIZE)] As WCHAR
     42End Type
     43Type CHARFORMATA
     44    cbSize As DWord
     45    dwMask As DWord
     46    dwEffects As DWord
     47    yHeight As Long
     48    yOffset As Long
     49    crTextColor As COLORREF
     50    bCharSet As Byte
     51    bPitchAndFamily As Byte
     52    szFaceName[ELM(LF_FACESIZE)] As SByte
     53End Type
     54#ifdef UNICODE
     55TypeDef CHARFORMAT = CHARFORMATW
     56#else
     57TypeDef CHARFORMAT = CHARFORMATA
     58#endif
    4459
    4560'CHARFORMAT2 struct
     
    85100Const CFU_UNDERLINENONE =   0
    86101
    87 Type CHARFORMAT2
     102Type CHARFORMAT2W
    88103    cbSize As DWord
    89104    dwMask As DWord
     
    94109    bCharSet As Byte
    95110    bPitchAndFamily As Byte
    96     szFaceName[ELM(LF_FACESIZE)] As Byte
     111    szFaceName[ELM(LF_FACESIZE)] As WCHAR
    97112    wWeight As Word
    98113    sSpacing As Integer
     
    107122    bReserved1 As Byte
    108123End Type
     124Type CHARFORMAT2A
     125    cbSize As DWord
     126    dwMask As DWord
     127    dwEffects As DWord
     128    yHeight As Long
     129    yOffset As Long
     130    crTextColor As DWord
     131    bCharSet As Byte
     132    bPitchAndFamily As Byte
     133    szFaceName[ELM(LF_FACESIZE)] As SByte
     134    wWeight As Word
     135    sSpacing As Integer
     136    crBackColor As DWord
     137    lcid As DWord
     138    dwReserved As DWord
     139    sStyle As Integer
     140    wKerning As Word
     141    bUnderlineType As Byte
     142    bAnimation As Byte
     143    bRevAuthor As Byte
     144    bReserved1 As Byte
     145End Type
     146#ifdef UNICODE
     147TypeDef CHARFORMAT2 = CHARFORMAT2W
     148#else
     149TypeDef CHARFORMAT2 = CHARFORMAT2A
     150#endif
    109151
    110152
  • Include/api_shell.sbp

    r35 r141  
    55#define _INC_SHELL
    66
     7#ifdef UNICODE
     8Const _FuncName_DoEnvironmentSubst = "DoEnvironmentSubstW"
     9Const _FuncName_DragQueryFile = "DragQueryFileW"
     10Const _FuncName_ExtractAssociatedIcon = "ExtractAssociatedIconW"
     11Const _FuncName_ExtractIcon = "ExtractIconW"
     12Const _FuncName_ExtractIconEx = "ExtractIconExW"
     13Const _FuncName_FindExecutable = "FindExecutableW"
     14Const _FuncName_GUIDFromString = "GUIDFromStringW"
     15Const _FuncName_SHBrowseForFolder = "SHBrowseForFolderW"
     16Const _FuncName_ShellAbout = "ShellAboutW"
     17Const _FuncName_ShellExecute = "ShellExecuteW"
     18Const _FuncName_SHFileOperation = "SHFileOperationW"
     19Const _FuncName_SHGetPathFromIDList = "SHGetPathFromIDListW"
     20#else
     21Const _FuncName_DoEnvironmentSubst = "DoEnvironmentSubstA"
     22Const _FuncName_DragQueryFile = "DragQueryFileA"
     23Const _FuncName_ExtractAssociatedIcon = "ExtractAssociatedIconA"
     24Const _FuncName_ExtractIcon = "ExtractIconA"
     25Const _FuncName_ExtractIconEx = "ExtractIconExA"
     26Const _FuncName_FindExecutable = "FindExecutableA"
     27Const _FuncName_GUIDFromString = "GUIDFromStringA"
     28Const _FuncName_SHBrowseForFolder = "SHBrowseForFolderA"
     29Const _FuncName_ShellAbout = "ShellAboutA"
     30Const _FuncName_ShellExecute = "ShellExecuteA"
     31Const _FuncName_SHFileOperation = "SHFileOperationA"
     32Const _FuncName_SHGetPathFromIDList = "SHGetPathFromIDListA"
     33#endif
    734
    835'-----------
    936' Shell API
    1037
    11 Declare Function DoEnvironmentSubst Lib "shell32" Alias "DoEnvironmentSubstA" (
     38Declare Function DoEnvironmentSubst Lib "shell32" Alias _FuncName_DoEnvironmentSubst (
    1239    pszString As PSTR,
    1340    cchString As DWord
     
    1643Declare Sub DragAcceptFiles Lib "shell32" (hWnd As HWND, bAccept As BOOL)
    1744Declare Sub DragFinish Lib "shell32" (hDrop As HDROP)
    18 Declare Function DragQueryFile Lib "shell32" Alias "DragQueryFileA" (hDrop As HDROP, iFile As Long, lpszFile As PSTR, cch As DWord) As DWord
     45Declare Function DragQueryFile Lib "shell32" Alias _FuncName_DragQueryFile (hDrop As HDROP, iFile As Long, lpszFile As LPTSTR, cch As DWord) As DWord
    1946Declare Function DragQueryPoint Lib "shell32" (hDrop As HDROP, ByRef lpPoint As POINTAPI) As Long
    20 Declare Function ExtractAssociatedIcon Lib "shell32" Alias "ExtractAssociatedIconA" (hInst As HINSTANCE, lpIconPath As PSTR, lpiIcon As *Word) As HICON
    21 Declare Function ExtractIcon Lib "shell32" Alias "ExtractIconA" (hInst As HINSTANCE, lpszExeFileName As PCSTR, nIconIndex As Long) As HICON
    22 Declare Function ExtractIconEx Lib "shell32" Alias "ExtractIconExA" (lpszFile As PCSTR, nIconIndex As Long, phiconLarge As *DWord, phiconSmall As *DWord, nIcons As Long) As HICON
    23 
    24 Declare Function FindExecutable Lib "shell32" Alias "FindExecutableA" (
    25     pFile As PCSTR,
    26     pDirectory As PCSTR,
    27     pResult As PCSTR
     47Declare Function ExtractAssociatedIcon Lib "shell32" Alias _FuncName_ExtractAssociatedIcon (hInst As HINSTANCE, lpIconPath As LPTSTR, lpiIcon As *Word) As HICON
     48Declare Function ExtractIcon Lib "shell32" Alias _FuncName_ExtractIcon (hInst As HINSTANCE, lpszExeFileName As LPCTSTR, nIconIndex As Long) As HICON
     49Declare Function ExtractIconEx Lib "shell32" Alias _FuncName_ExtractIconEx (lpszFile As PCSTR, nIconIndex As Long, phiconLarge As *DWord, phiconSmall As *DWord, nIcons As Long) As HICON
     50
     51Declare Function FindExecutable Lib "shell32" Alias _FuncName_FindExecutable (
     52    pFile As PCTSTR,
     53    pDirectory As PCTSTR,
     54    pResult As PCTSTR
    2855) As Long
    2956
    30 Declare Function GUIDFromString Lib "shell32" Alias "GUIDFromStringA" (
    31     ByVal psz As PCSTR,
     57Declare Function GUIDFromString Lib "shell32" Alias _FuncName_GUIDFromString (
     58    ByVal psz As PCTSTR,
    3259    ByRef guid As GUID
    3360) As BOOL
     
    3865Declare Function MIMEAssociationDialog Lib "url" (
    3966    hwndParent As HWND,
    40     dwInFlags As DWord,
    41     pcszFile As PCSTR,
    42     pcszMIMEContentType As PCSTR,
    43     pszAppBuf As PSTR,
    44     ucAppBufLen As DWord
     67    dwInFlags As DWord,
     68    pcszFile As PCTSTR,
     69    pcszMIMEContentType As PCTSTR,
     70    pszAppBuf As PTSTR,
     71    ucAppBufLen As DWord
    4572) As HRESULT
    4673
     
    95122Typedef BFFCALLBACK = *Function(hwnd As HWND, uMsg As DWord, lParam As LPARAM, lpData As LPARAM) As Long
    96123
    97 Type BROWSEINFO
     124Type BROWSEINFOW
    98125    hwndOwner      As HWND
    99126    pidlRoot       As VoidPtr
    100     pszDisplayName As PSTR
    101     lpszTitle      As PCSTR
     127    pszDisplayName As LPWSTR
     128    lpszTitle      As LPCWSTR
    102129    ulFlags        As DWord
    103130    lpfn           As BFFCALLBACK
     
    105132    iImage         As Long
    106133End Type
     134Type BROWSEINFOA
     135    hwndOwner      As HWND
     136    pidlRoot       As VoidPtr
     137    pszDisplayName As LPSTR
     138    lpszTitle      As LPCSTR
     139    ulFlags        As DWord
     140    lpfn           As BFFCALLBACK
     141    lParam         As LPARAM
     142    iImage         As Long
     143End Type
     144#ifdef UNICODE
     145TypeDef BROWSEINFO = BROWSEINFOW
     146#else
     147TypeDef BROWSEINFO = BROWSEINFOA
     148#endif
    107149
    108150Type SHITEMID
     
    114156    mkid As SHITEMID
    115157End Type
    116 Declare Function SHBrowseForFolder Lib "shell32" Alias "SHBrowseForFolderA" (ByRef lpbi As BROWSEINFO) As *ITEMIDLIST
     158Declare Function SHBrowseForFolder Lib "shell32" Alias _FuncName_SHBrowseForFolder (ByRef bi As BROWSEINFO) As *ITEMIDLIST
    117159
    118160Const SHCNE_RENAMEITEM          = &h00000001
     
    175217
    176218' ShellApi.h
    177 Declare Function ShellAbout Lib "shell32" Alias "ShellAboutA" (hWnd As HWND, szApp As PCSTR, szOtherStuff As PCSTR, hIcon As HICON) As Long
     219Declare Function ShellAbout Lib "shell32" Alias _FuncName_ShellAbout (hWnd As HWND, szApp As PCTSTR, szOtherStuff As PCTSTR, hIcon As HICON) As Long
    178220
    179221Const SE_ERR_FNF =             2
     
    189231Const SE_ERR_NOASSOC =         31
    190232' ShellApi.h
    191 Declare Function ShellExecute Lib "shell32" Alias "ShellExecuteA" (hWnd As HWND, lpOperation As PCSTR, lpFile As PCSTR, lpParameters As PCSTR, lpDirectory As PCSTR, nShowCmd As Long) As HINSTANCE
     233Declare Function ShellExecute Lib "shell32" Alias _FuncName_ShellExecute (hWnd As HWND, lpOperation As LPCTSTR, lpFile As LPCTSTR, lpParameters As LPCTSTR, lpDirectory As LPCTSTR, nShowCmd As Long) As HINSTANCE
    192234
    193235Const FO_MOVE =   &H0001
     
    207249Const FOF_NOERRORUI =             &H0400
    208250Const FOF_NOCOPYSECURITYATTRIBS = &H0800
    209 Type SHFILEOPSTRUCT
     251Type SHFILEOPSTRUCTW
     252    hWnd As HWND
     253    wFunc As DWord
     254    pFrom As PCWSTR
     255    pTo As PCWSTR
     256    fFlags As Word
     257    fAnyOperationsAborted As BOOL
     258    hNameMappings As VoidPtr
     259    lpszProgressTitle As LPCWSTR
     260End Type
     261Type SHFILEOPSTRUCTA
    210262    hWnd As HWND
    211263    wFunc As DWord
     
    215267    fAnyOperationsAborted As BOOL
    216268    hNameMappings As VoidPtr
    217     lpszProgressTitle As PCSTR
    218 End Type
    219 ' ShellApi.h
    220 Declare Function SHFileOperation Lib "shell32" Alias "SHFileOperationA" (ByRef lpFileOp As SHFILEOPSTRUCT) As Long
     269    lpszProgressTitle As LPCSTR
     270End Type
     271#ifdef UNICODE
     272TypeDef SHFILEOPSTRUCT = SHFILEOPSTRUCTW
     273#else
     274TypeDef SHFILEOPSTRUCT = SHFILEOPSTRUCTA
     275#endif
     276
     277' ShellApi.h
     278Declare Function SHFileOperation Lib "shell32" Alias _FuncName_SHFileOperation (ByRef FileOp As SHFILEOPSTRUCT) As Long
    221279
    222280' ShellApi.h
     
    225283'SHGetDataFromIDList
    226284
    227 Declare Function SHGetPathFromIDList Lib "shell32" Alias "SHGetPathFromIDListA" (pidl As *ITEMIDLIST, pszPath As PSTR) As Long
     285Declare Function SHGetPathFromIDList Lib "shell32" Alias _FuncName_SHGetPathFromIDList (pidl As *ITEMIDLIST, pszPath As PTSTR) As Long
    228286
    229287#endif '_INC_SHELL
  • Include/api_shlwapi.sbp

    r15 r141  
    66
    77
    8 Declare Function PathGetArgs Lib "shlwapi" Alias "PathGetArgsA" (pszPath As LPSTR) As LPSTR
    9 Declare Function StrFormatByteSize64  Lib "shlwapi" Alias "StrFormatByteSize64A" (ll As Int64, pszBuf As *Byte, BufSize As DWord) As *Byte
     8Declare Function PathGetArgsA Lib "shlwapi" Alias (pszPath As LPCWSTR) As LPWSTR
     9Declare Function PathGetArgsW Lib "shlwapi" Alias (pszPath As LPCSTR) As LPSTR
     10#ifdef UNICODE
     11Declare Function PathGetArgs Lib "shlwapi" Alias "PathGetArgsW" (pszPath As LPCWSTR) As LPWSTR
     12#else
     13Declare Function PathGetArgs Lib "shlwapi" Alias "PathGetArgsA" (pszPath As LPCSTR) As LPSTR
     14#endif
     15
     16Declare Function StrFormatByteSize64 Lib "shlwapi" Alias (ll As Int64, pszBuf As PWSTR, BufSize As DWord) As PWSTR
     17Declare Function StrFormatByteSize64 Lib "shlwapi" Alias (ll As Int64, pszBuf As PSTR, BufSize As DWord) As PSTR
     18#ifdef UNICODE
     19Declare Function StrFormatByteSize64 Lib "shlwapi" Alias "StrFormatByteSize64W" (ll As Int64, pszBuf As PWSTR, BufSize As DWord) As PWSTR
     20#else
     21Declare Function StrFormatByteSize64 Lib "shlwapi" Alias "StrFormatByteSize64A" (ll As Int64, pszBuf As PSTR, BufSize As DWord) As PSTR
     22#endif
    1023
    1124#endif '_INC_SHLWAPI
  • Include/api_system.sbp

    r137 r141  
    55
    66#ifdef UNICODE
     7Const _FuncName_CompareString = "CompareStringW"
     8Const _FuncName_CopyFile = "CopyFileW"
     9Const _FuncName_CreateDirectory = "CreateDirectoryW"
     10Const _FuncName_CreateEvent = "CreateEventW"
     11Const _FuncName_CreateMutex = "CreateMutexW"
     12Const _FuncName_CreateSemaphore = "CreateSemaphoreW"
     13Const _FuncName_CreateWaitableTimer = "CreateWaitableTimerW"
     14Const _FuncName_CreateFile = "CreateFileW"
     15Const _FuncName_CreateFileMapping = "CreateFileMappingW"
     16Const _FuncName_OpenFileMapping = "OpenFileMappingW"
     17Const _FuncName_CreateMailslot = "CreateMailslotW"
     18Const _FuncName_CreateProcess = "CreateProcessW"
     19Const _FuncName_DeleteFile = "DeleteFileW"
     20Const _FuncName_FatalAppExit = "FatalAppExitW"
     21Const _FuncName_FindFirstChangeNotification = "FindFirstChangeNotificationW"
     22Const _FuncName_FindFirstFile = "FindFirstFileW"
     23Const _FuncName_FindNextFile = "FindNextFileW"
     24Const _FuncName_FormatMessage = "FormatMessageW"
     25Const _FuncName_FreeEnvironmentStrings = "FreeEnvironmentStringsW"
     26Const _FuncName_GetCompressedFileSize = "GetCompressedFileSizeW"
     27Const _FuncName_GetComputerName = "GetComputerNameW"
     28Const _FuncName_GetCurrentDirectory = "GetCurrentDirectoryW"
     29Const _FuncName_GetDateFormat = "GetDateFormatW"
     30Const _FuncName_GetDiskFreeSpace = "GetDiskFreeSpaceW"
     31Const _FuncName_GetDiskFreeSpaceEx = "GetDiskFreeSpaceExW"
     32Const _FuncName_GetVolumeInformation = "GetVolumeInformationW"
     33Const _FuncName_GetDriveType = "GetDriveTypeW"
     34Const _FuncName_GetEnvironmentVariable = "GetEnvironmentVariableW"
     35Const _FuncName_GetEnvironmentStrings = "GetEnvironmentStringsW"
     36Const _FuncName_GetFileAttributes = "GetFileAttributesW"
     37Const _FuncName_GetFullPathName = "GetFullPathNameW"
     38Const _FuncName_GetLogicalDriveStrings = "GetLogicalDriveStringsW"
     39Const _FuncName_GetModuleFileName = "GetModuleFileNameW"
     40Const _FuncName_GetModuleHandle = "GetModuleHandleW"
     41Const _FuncName_GetShortPathName = "GetShortPathNameW"
     42Const _FuncName_GetStartupInfo = "GetStartupInfoW"
     43Const _FuncName_GetSystemDirectory = "GetSystemDirectoryW"
     44Const _FuncName_GetTempFileName = "GetTempFileNameW"
     45Const _FuncName_GetTempPath = "GetTempPathW"
     46Const _FuncName_GetTimeFormat = "GetTimeFormatW"
     47Const _FuncName_GetUserName = "GetUserNameW"
     48Const _FuncName_GetVersionEx = "GetVersionExW"
     49Const _FuncName_GetWindowsDirectory = "GetWindowsDirectoryW"
     50Const _FuncName_LCMapString = "LCMapStringW"
     51Const _FuncName_LoadLibrary = "LoadLibraryW"
     52Const _FuncName_LoadLibraryEx = "LoadLibraryExW"
     53Const _FuncName_lstrcat = "lstrcatW"
     54Const _FuncName_lstrcmp = "lstrcmpW"
     55Const _FuncName_lstrcmpi = "lstrcmpiW"
    756Const _FuncName_lstrcpy = "lstrcpyW"
     57Const _FuncName_MoveFile = "MoveFileW"
     58Const _FuncName_OpenEvent = "OpenEventW"
     59Const _FuncName_OpenMutex = "OpenMutexW"
     60Const _FuncName_OpenSemaphore = "OpenSemaphoreW"
     61Const _FuncName_OpenWaitableTimer = "OpenWaitableTimerW"
     62Const _FuncName_RemoveDirectory = "RemoveDirectoryW"
     63Const _FuncName_SetComputerName = "SetComputerNameW"
     64Const _FuncName_SetCurrentDirectory = "SetCurrentDirectoryW"
     65Const _FuncName_SearchPath = "SearchPathW"
     66Const _FuncName_SetEnvironmentVariable = "SetEnvironmentVariableW"
     67Const _FuncName_SetFileAttributes = "SetFileAttributesW"
    868#else
     69Const _FuncName_CompareString = "CompareStringA"
     70Const _FuncName_CopyFile = "CopyFileA"
     71Const _FuncName_CreateDirectory = "CreateDirectoryA"
     72Const _FuncName_CreateEvent = "CreateEventA"
     73Const _FuncName_CreateMutex = "CreateMutexA"
     74Const _FuncName_CreateSemaphore = "CreateSemaphoreA"
     75Const _FuncName_CreateWaitableTimer = "CreateWaitableTimerA"
     76Const _FuncName_CreateFile = "CreateFileA"
     77Const _FuncName_CreateFileMapping = "CreateFileMappingA"
     78Const _FuncName_OpenFileMapping = "OpenFileMappingA"
     79Const _FuncName_CreateMailslot = "CreateMailslotA"
     80Const _FuncName_CreateProcess = "CreateProcessA"
     81Const _FuncName_DeleteFile = "DeleteFileA"
     82Const _FuncName_FatalAppExit = "FatalAppExitA"
     83Const _FuncName_FindFirstChangeNotification = "FindFirstChangeNotificationA"
     84Const _FuncName_FindFirstFile = "FindFirstFileA"
     85Const _FuncName_FindNextFile = "FindNextFileA"
     86Const _FuncName_FormatMessage = "FormatMessageA"
     87Const _FuncName_FreeEnvironmentStrings = "FreeEnvironmentStringsA"
     88Const _FuncName_GetCompressedFileSize = "GetCompressedFileSizeA"
     89Const _FuncName_GetComputerName = "GetComputerNameA"
     90Const _FuncName_GetCurrentDirectory = "GetCurrentDirectoryA"
     91Const _FuncName_GetDateFormat = "GetDateFormatA"
     92Const _FuncName_GetDiskFreeSpace = "GetDiskFreeSpaceA"
     93Const _FuncName_GetDiskFreeSpaceEx = "GetDiskFreeSpaceExA"
     94Const _FuncName_GetVolumeInformation = "GetVolumeInformationA"
     95Const _FuncName_GetDriveType = "GetDriveTypeA"
     96Const _FuncName_GetEnvironmentVariable = "GetEnvironmentVariableA"
     97Const _FuncName_GetEnvironmentStrings = "GetEnvironmentStringsA"
     98Const _FuncName_GetFileAttributes = "GetFileAttributesA"
     99Const _FuncName_GetFullPathName = "GetFullPathNameA"
     100Const _FuncName_GetLogicalDriveStrings = "GetLogicalDriveStringsA"
     101Const _FuncName_GetModuleFileName = "GetModuleFileNameA"
     102Const _FuncName_GetModuleHandle = "GetModuleHandleA"
     103Const _FuncName_GetShortPathName = "GetShortPathNameA"
     104Const _FuncName_GetStartupInfo = "GetStartupInfoA"
     105Const _FuncName_GetSystemDirectory = "GetSystemDirectoryA"
     106Const _FuncName_GetTempFileName = "GetTempFileNameA"
     107Const _FuncName_GetTempPath = "GetTempPathA"
     108Const _FuncName_GetTimeFormat = "GetTimeFormatA"
     109Const _FuncName_GetUserName = "GetUserNameA"
     110Const _FuncName_GetVersionEx = "GetVersionExA"
     111Const _FuncName_GetWindowsDirectory = "GetWindowsDirectoryA"
     112Const _FuncName_LCMapString = "LCMapStringA"
     113Const _FuncName_LoadLibrary = "LoadLibraryA"
     114Const _FuncName_LoadLibraryEx = "LoadLibraryExA"
     115Const _FuncName_lstrcat = "lstrcatA"
     116Const _FuncName_lstrcmp = "lstrcmpA"
     117Const _FuncName_lstrcmpi = "lstrcmpiA"
    9118Const _FuncName_lstrcpy = "lstrcpyA"
     119Const _FuncName_MoveFile = "MoveFileA"
     120Const _FuncName_OpenEvent = "OpenEventA"
     121Const _FuncName_OpenMutex = "OpenMutexA"
     122Const _FuncName_OpenSemaphore = "OpenSemaphoreA"
     123Const _FuncName_OpenWaitableTimer = "OpenWaitableTimerA"
     124Const _FuncName_RemoveDirectory = "RemoveDirectoryA"
     125Const _FuncName_SetComputerName = "SetComputerNameA"
     126Const _FuncName_SetCurrentDirectory = "SetCurrentDirectoryA"
     127Const _FuncName_SearchPath = "SearchPathA"
     128Const _FuncName_SetEnvironmentVariable = "SetEnvironmentVariableA"
     129Const _FuncName_SetFileAttributes = "SetFileAttributesA"
    10130#endif
    11131
     
    357477Const CSTR_EQUAL =        2
    358478Const CSTR_GREATER_THAN = 3
    359 Declare Function CompareString Lib "kernel32" Alias "CompareStringA" (Locale As LCID, dwCmpFlags As DWord, pString1 As PCSTR, cchCount1 As Long, pString2 As PCSTR, cchCount2 As Long) As Long
    360 
    361 Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (lpExistingFileName As LPCSTR, lpNewFileName As LPCSTR, bFailIfExists As BOOL) As BOOL
    362 Declare Function CreateDirectory Lib "kernel32" Alias "CreateDirectoryA" (lpPathName As LPCSTR, lpSecurityAttributes As *SECURITY_ATTRIBUTES) As BOOL
    363 Declare Function CreateEvent Lib "kernel32" Alias "CreateEventA" (pEventAttributes As *SECURITY_ATTRIBUTES, bManualReset As BOOL, bInitialState As BOOL, pName As PCSTR) As HANDLE
    364 Declare Function CreateMutex Lib "kernel32" Alias "CreateMutexA" (lpMutexAttributes As *SECURITY_ATTRIBUTES, bInitialOwner As BOOL, lpName As PCSTR) As HANDLE
    365 Declare Function CreateSemaphore Lib "kernel32" Alias "CreateSemaphoreA" (lpSemaphoreAttributes As *SECURITY_ATTRIBUTES, lInitialCount As Long, lMaximumCount As Long, lpName As LPSTR) As HANDLE
     479Declare Function CompareString Lib "kernel32" Alias _FuncName_CompareString (Locale As LCID, dwCmpFlags As DWord, pString1 As PCTSTR, cchCount1 As Long, pString2 As PCTSTR, cchCount2 As Long) As Long
     480
     481Declare Function CopyFile Lib "kernel32" Alias _FuncName_CopyFile (pExistingFileName As PCTSTR, pNewFileName As PCTSTR, bFailIfExists As BOOL) As BOOL
     482Declare Function CreateDirectory Lib "kernel32" Alias _FuncName_CreateDirectory (pPathName As PCTSTR, pSecurityAttributes As *SECURITY_ATTRIBUTES) As BOOL
     483Declare Function CreateEvent Lib "kernel32" Alias _FuncName_CreateEvent (pEventAttributes As *SECURITY_ATTRIBUTES, bManualReset As BOOL, bInitialState As BOOL, pName As PCTSTR) As HANDLE
     484Declare Function CreateMutex Lib "kernel32" Alias _FuncName_CreateMutex (lpMutexAttributes As *SECURITY_ATTRIBUTES, bInitialOwner As BOOL, lpName As PCTSTR) As HANDLE
     485Declare Function CreateSemaphore Lib "kernel32" Alias _FuncName_CreateSemaphore (pSemaphoreAttributes As *SECURITY_ATTRIBUTES, lInitialCount As Long, lMaximumCount As Long, pName As PCTSTR) As HANDLE
    366486
    367487TypeDef PTIMERAPCROUTINE = *Sub(lpArgToCompletionRoutine As VoidPtr, dwTimerLowValue As DWord, dwTimerHighValue As DWord)
    368 Declare Function CreateWaitableTimer Lib "kernel32" Alias "CreateWaitableTimerA" (lpTimerAttributes As *SECURITY_ATTRIBUTES, bManualReset As BOOL, lpTimerName As LPSTR) As HANDLE
    369 Declare Function OpenWaitableTimer Lib "kernel32" Alias "OpenWaitableTimerA" (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpTimerName As LPSTR) As HANDLE
    370 Declare Function SetWaitableTimer Lib "kernel32" (hTimer As HANDLE, lpDueTime As *LARGE_INTEGER, lPeriod As Long, pfnCompletionRoutine As PTIMERAPCROUTINE, lpArgToCompletionRoutine As VoidPtr, fResume As BOOL) As BOOL
     488Declare Function CreateWaitableTimer Lib "kernel32" Alias _FuncName_CreateWaitableTimer (pTimerAttributes As *SECURITY_ATTRIBUTES, bManualReset As BOOL, pTimerName As PCTSTR) As HANDLE
     489Declare Function OpenWaitableTimer Lib "kernel32" Alias _FuncName_OpenWaitableTimer (dwDesiredAccess As DWord, bInheritHandle As BOOL, pTimerName As PCTSTR) As HANDLE
     490Declare Function SetWaitableTimer Lib "kernel32" (hTimer As HANDLE, pDueTime As *LARGE_INTEGER, lPeriod As Long, pfnCompletionRoutine As PTIMERAPCROUTINE, pArgToCompletionRoutine As VoidPtr, fResume As BOOL) As BOOL
    371491Declare Function CancelWaitableTimer Lib "kernel32" (hTimer As HANDLE) As BOOL
    372492
     
    403523Const FILE_FLAG_OPEN_REPARSE_POINT =  &H00200000
    404524Const FILE_FLAG_OPEN_NO_RECALL =      &H00100000
    405 Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (lpFileName As *Byte, dwDesiredAccess As DWord, dwShareMode As DWord, ByRef lpSecurityAttributes As SECURITY_ATTRIBUTES, dwCreationDisposition As DWord, dwFlagsAndAttributes As DWord, hTemplateFile As HANDLE) As HANDLE
     525Declare Function CreateFile Lib "kernel32" Alias _FuncName_CreateFile (pFileName As PCTSTR, dwDesiredAccess As DWord, dwShareMode As DWord, ByRef lpSecurityAttributes As SECURITY_ATTRIBUTES, dwCreationDisposition As DWord, dwFlagsAndAttributes As DWord, hTemplateFile As HANDLE) As HANDLE
    406526
    407527Const SECTION_QUERY = &H0001
     
    416536Const FILE_MAP_READ   = SECTION_MAP_READ
    417537Const FILE_MAP_ALL_ACCESS  =  SECTION_ALL_ACCESS
    418 Declare Function CreateFileMapping Lib "kernel32" Alias "CreateFileMappingA" (hFile As HANDLE, lpFileMappingAttributes As *SECURITY_ATTRIBUTES, flProtect As DWord, dwMaximumSizeHigh As DWord, dwMaximumSizeLow As DWord, lpName As LPSTR) As HANDLE
    419 Declare Function OpenFileMapping Lib "kernel32" Alias "OpenFileMappingA" (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpName As LPSTR) As HANDLE
     538Declare Function CreateFileMapping Lib "kernel32" Alias _FuncName_CreateFileMapping (hFile As HANDLE, pFileMappingAttributes As *SECURITY_ATTRIBUTES, flProtect As DWord, dwMaximumSizeHigh As DWord, dwMaximumSizeLow As DWord, pName As PCSTR) As HANDLE
     539Declare Function OpenFileMapping Lib "kernel32" Alias _FuncName_OpenFileMapping (dwDesiredAccess As DWord, bInheritHandle As BOOL, pName As PCSTR) As HANDLE
    420540Declare Function MapViewOfFile Lib "kernel32" (hFileMappingObject As HANDLE, dwDesiredAccess As DWord, dwFileOffsetHigh As DWord, dwFileOffsetLow As DWord, dwNumberOfBytesToMap As DWord) As VoidPtr
    421541Declare Function MapViewOfFileEx Lib "kernel32" (hFileMappingObject As HANDLE, dwDesiredAccess As DWord, dwFileOffsetHigh As DWord, dwFileOffsetLow As DWord, dwNumberOfBytesToMap As DWord, lpBaseAddress As VoidPtr) As VoidPtr
     
    424544
    425545Const MAILSLOT_WAIT_FOREVER = &HFFFFFFFF
    426 Declare Function CreateMailslot Lib "kernel32" Alias "CreateMailslotA" (lpName As *Byte, nMaxMessageSize As DWord, lReadTimeout As DWord, ByRef lpSecurityAttributes As SECURITY_ATTRIBUTES) As HANDLE
     546Declare Function CreateMailslot Lib "kernel32" Alias _FuncName_CreateMailslot (pName As PCTSTR, nMaxMessageSize As DWord, lReadTimeout As DWord, pSecurityAttributes As *SECURITY_ATTRIBUTES) As HANDLE
    427547
    428548Const DEBUG_PROCESS =              &H00000001
     
    456576Const STARTF_USESTDHANDLES =    &H00000100
    457577Const STARTF_USEHOTKEY =        &H00000200
    458 Type STARTUPINFO
     578Type STARTUPINFOW
    459579    cb As DWord
    460     lpReserved As *Byte
    461     lpDesktop As *Byte
    462     lpTitle As *Byte
     580    lpReserved As LPWSTR
     581    lpDesktop As LPWSTR
     582    lpTitle As LPWSTR
    463583    dwX As DWord
    464584    dwY As DWord
     
    476596    hStdError As HANDLE
    477597End Type
     598Type STARTUPINFOA
     599    cb As DWord
     600    lpReserved As LPSTR
     601    lpDesktop As LPSTR
     602    lpTitle As LPSTR
     603    dwX As DWord
     604    dwY As DWord
     605    dwXSize As DWord
     606    dwYSize As DWord
     607    dwXCountChars As DWord
     608    dwYCountChars As DWord
     609    dwFillAttribute As DWord
     610    dwFlags As DWord
     611    wShowWindow As Word
     612    cbReserved2 As Word
     613    lpReserved2 As *Byte
     614    hStdInput As HANDLE
     615    hStdOutput As HANDLE
     616    hStdError As HANDLE
     617End Type
     618#ifdef UNICODE
     619TypeDef STARTUPINFO = STARTUPINFOW
     620#else
     621TypeDef STARTUPINFO = STARTUPINFOA
     622#endif
    478623Type PROCESS_INFORMATION
    479624    hProcess As HANDLE
     
    482627    dwThreadId As DWord
    483628End Type
    484 Declare Function CreateProcess Lib "kernel32" Alias "CreateProcessA" (lpApplicationName As BytePtr, lpCommandLine As BytePtr, ByRef lpProcessAttributes As SECURITY_ATTRIBUTES, ByRef lpThreadAttributes As SECURITY_ATTRIBUTES, bInheritHandles As BOOL, dwCreationFlags As DWord, lpEnvironment As VoidPtr, lpCurrentDirectory As BytePtr, ByRef lpStartupInfo As STARTUPINFO, ByRef lpProcessInformation As PROCESS_INFORMATION) As BOOL
     629Declare Function CreateProcess Lib "kernel32" Alias _FuncName_CreateProcess (pApplicationName As PCTSTR, pCommandLine As PTSTR, ByRef ProcessAttributes As SECURITY_ATTRIBUTES, ByRef ThreadAttributes As SECURITY_ATTRIBUTES, bInheritHandles As BOOL, dwCreationFlags As DWord, lpEnvironment As VoidPtr, pCurrentDirectory As PCTSTR, ByRef lpStartupInfo As STARTUPINFO, ByRef lpProcessInformation As PROCESS_INFORMATION) As BOOL
    485630
    486631TypeDef LPTHREAD_START_ROUTINE = *Function(lpThreadParameter As VoidPtr) As DWord
    487 Declare Function CreateThread Lib "kernel32" Alias "CreateThread" (lpThreadAttributes As *SECURITY_ATTRIBUTES, dwStackSize As DWord, lpStartAddress As LPTHREAD_START_ROUTINE, lpParameter As VoidPtr, dwCreationFlags As DWord, ByRef lpThreadId As DWord) As HANDLE
     632Declare Function CreateThread Lib "kernel32" (lpThreadAttributes As *SECURITY_ATTRIBUTES, dwStackSize As DWord, lpStartAddress As LPTHREAD_START_ROUTINE, pParameter As VoidPtr, dwCreationFlags As DWord, ByRef ThreadId As DWord) As HANDLE
    488633
    489634Declare Sub DebugBreak Lib "kernel32" ()
    490 Declare Sub DeleteCriticalSection Lib "kernel32" (ByRef lpCriticalSection As CRITICAL_SECTION)
    491 Declare Function DeleteFile Lib "kernel32" Alias "DeleteFileA" (pFileName As PCSTR) As BOOL
     635Declare Sub DeleteCriticalSection Lib "kernel32" (ByRef CriticalSection As CRITICAL_SECTION)
     636Declare Function DeleteFile Lib "kernel32" Alias _FuncName_DeleteFile (pFileName As PCTSTR) As BOOL
    492637Declare Function DeviceIoControl Lib "Kernel32" (
    493638    hDevice As HANDLE,
     
    510655Declare Sub ExitProcess Lib "kernel32" (dwExitCode As DWord)
    511656Declare Sub ExitThread Lib "kernel32" (dwExitCode As DWord)
    512 Declare Sub FatalAppExit Lib "kernel32" Alias "FatalAppExitA" (Action As DWord, pMessageText As PCSTR)
     657Declare Sub FatalAppExit Lib "kernel32" Alias _FuncName_FatalAppExit (Action As DWord, pMessageText As PCTSTR)
    513658Declare Function FileTimeToDosDateTime Lib "kernel32" (ByRef lpFileTime As FILETIME, ByRef lpFatDate As Word, ByRef lpFatTime As Word) As BOOL
    514659Declare Function FileTimeToLocalFileTime Lib "kernel32" (ByRef lpFileTime As FILETIME, ByRef lpLocalFileTime As FILETIME) As BOOL
     
    517662Declare Function FindClose Lib "kernel32" (hFindFile As HANDLE) As BOOL
    518663Declare Function FindCloseChangeNotification Lib "kernel32" (hChangeHandle As HANDLE) As BOOL
    519 Declare Function FindFirstChangeNotification Lib "kernel32" Alias "FindFirstChangeNotificationA" (
    520     pPathName As PCSTR,
     664Declare Function FindFirstChangeNotification Lib "kernel32" Alias _FuncName_FindFirstChangeNotification (
     665    pPathName As PCTSTR,
    521666    bWatchSubtree As BOOL,
    522667    dwNotifyFilter As DWord
    523668) As HANDLE
    524669
    525 Type WIN32_FIND_DATA
     670Type WIN32_FIND_DATAW
    526671    dwFileAttributes As DWord
    527672    ftCreationTime As FILETIME
     
    532677    dwReserved0 As DWord
    533678    dwReserved1 As DWord
    534     cFileName[ELM(MAX_PATH)] As Byte
    535     cAlternateFileName[13] As Byte
    536 End Type
     679    cFileName[ELM(MAX_PATH)] As WCHAR
     680    cAlternateFileName[13] As WCHAR
     681End Type
     682Type WIN32_FIND_DATAA
     683    dwFileAttributes As DWord
     684    ftCreationTime As FILETIME
     685    ftLastAccessTime As FILETIME
     686    ftLastWriteTime As FILETIME
     687    nFileSizeHigh As DWord
     688    nFileSizeLow As DWord
     689    dwReserved0 As DWord
     690    dwReserved1 As DWord
     691    cFileName[ELM(MAX_PATH)] As SByte
     692    cAlternateFileName[13] As SByte
     693End Type
     694#ifdef UNICODE
     695TypeDef WIN32_FIND_DATA = WIN32_FIND_DATAW
     696#else
     697TypeDef WIN32_FIND_DATA = WIN32_FIND_DATAA
     698#endif
    537699TypeDef LPWIN32_FIND_DATA = *WIN32_FIND_DATA
    538 Declare Function FindFirstFile Lib "kernel32" Alias "FindFirstFileA" (lpFileName As BytePtr, ByRef lpFindFildData As WIN32_FIND_DATA) As HANDLE
     700Declare Function FindFirstFile Lib "kernel32" Alias _FuncName_FindFirstFile (pFileName As PCTSTR, ByRef FindFildData As WIN32_FIND_DATA) As HANDLE
    539701Declare Function FindNextChangeNotification Lib "kernel32" (hChangeHandle As HANDLE) As BOOL
    540 Declare Function FindNextFile Lib "kernel32" Alias "FindNextFileA" (hFindFile As HANDLE, ByRef lpFindFildData As WIN32_FIND_DATA) As BOOL
     702Declare Function FindNextFile Lib "kernel32" Alias _FuncName_FindNextFile (hFindFile As HANDLE, ByRef FindFildData As WIN32_FIND_DATA) As BOOL
    541703Declare Function FlushFileBuffers Lib "kernel32" (hFile As HANDLE) As BOOL
    542704Declare Function FlushInstructionCache Lib "kernel32"(hProcess As HANDLE, pBaseAddress As VoidPtr, Size As SIZE_T) As BOOL
     
    548710Const FORMAT_MESSAGE_FROM_SYSTEM =     &H00001000
    549711Const FORMAT_MESSAGE_ARGUMENT_ARRAY =  &H00002000
    550 Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" (dwFlags As DWord, lpSource As VoidPtr, dwMessageId As DWord, dwLanguageId As DWord, lpBuffer As BytePtr, nSize As DWord, Arguments As DWordPtr) As DWord
    551 Declare Function FreeEnvironmentStrings Lib "kernel32" Alias "FreeEnvironmentStringsA" (pszEnvironmentBlock As PCSTR) As BOOL
     712Declare Function FormatMessage Lib "kernel32" Alias _FuncName_FormatMessage (dwFlags As DWord, lpSource As VoidPtr, dwMessageId As DWord, dwLanguageId As DWord, pBuffer As PTSTR, nSize As DWord, Arguments As *DWord) As DWord
     713Declare Function FreeEnvironmentStrings Lib "kernel32" Alias _FuncName_FreeEnvironmentStrings (pszEnvironmentBlock As PCTSTR) As BOOL
    552714Declare Function FreeLibrary Lib "kernel32" (hLibModule As HINSTANCE) As BOOL
    553715Declare Sub FreeLibraryAndExitThread Lib "kernel32" (hModule As HANDLE, dwExitCode As DWord)
     
    559721Declare Function GetCommandLine Lib "kernel32" Alias "GetCommandLineA" () As PCSTR
    560722#endif
    561 Declare Function GetCompressedFileSize Lib "kernel32" Alias "GetCompressedFileSizeA" (lpFileName As BytePtr, ByRef lpFileSizeHigh As DWord) As DWord
    562 
    563 Const MAX_COMPUTERNAME_LENGTH=15
    564 Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (lpBuffer As BytePtr, ByRef nSize As Long) As Long
    565 
    566 Declare Function GetCurrentDirectory Lib "kernel32" Alias "GetCurrentDirectoryA" (nBufferLength As DWord, lpBuffer As BytePtr) As DWord
     723Declare Function GetCompressedFileSize Lib "kernel32" Alias _FuncName_GetCompressedFileSize (pFileName As PCTSTR, ByRef FileSizeHigh As DWord) As DWord
     724
     725Const MAX_COMPUTERNAME_LENGTH = 15
     726Declare Function GetComputerName Lib "kernel32" Alias _FuncName_GetComputerName (pBuffer As PTSTR, ByRef nSize As Long) As Long
     727
     728Declare Function GetCurrentDirectory Lib "kernel32" Alias _FuncName_GetCurrentDirectory (nBufferLength As DWord, pBuffer As PTSTR) As DWord
    567729Declare Function GetCurrentProcess Lib "kernel32" () As HANDLE
    568730Declare Function GetCurrentProcessId Lib "kernel32" () As DWord
     
    573735Const DATE_LONGDATE =         &H00000002
    574736Const DATE_USE_ALT_CALENDAR = &H00000004
    575 Declare Function GetDateFormat Lib "kernel32" Alias "GetDateFormatA" (Locale As LCID, dwFlags As DWord, ByRef lpDate As SYSTEMTIME, lpFormat As BytePtr, lpDateStr As BytePtr, cchDate As Long) As Long
    576 
    577 Declare Function GetDiskFreeSpace Lib "kernel32" Alias "GetDiskFreeSpaceA" (lpRootPathName As BytePtr, lpSectorsPerCluster As *DWord, lpBytesPerSector As *DWord, lpNumberOfFreeClusters As *DWord, lpTotalNumberOfClusters As *DWord) As BOOL
    578 Declare Function GetDiskFreeSpaceEx Lib "kernel32" Alias "GetDiskFreeSpaceExA" (lpDirectoryName As BytePtr, ByRef lpFreeBytesAvailableToCaller As ULARGE_INTEGER, ByRef lpTotalNumberOfBytes As ULARGE_INTEGER, ByRef lpTotalNumberOfFreeBytes As ULARGE_INTEGER) As BOOL
     737Declare Function GetDateFormat Lib "kernel32" Alias _FuncName_GetDateFormat (Locale As LCID, dwFlags As DWord, ByRef Date As SYSTEMTIME, pFormat As PCTSTR, pDateStr As PTSTR, cchDate As Long) As Long
     738
     739Declare Function GetDiskFreeSpace Lib "kernel32" Alias _FuncName_GetDiskFreeSpace (pRootPathName As PCTSTR, lpSectorsPerCluster As *DWord, pBytesPerSector As *DWord, pNumberOfFreeClusters As *DWord, pTotalNumberOfClusters As *DWord) As BOOL
     740Declare Function GetDiskFreeSpaceEx Lib "kernel32" Alias _FuncName_GetDiskFreeSpaceEx (pDirectoryName As PCTSTR, ByRef lpFreeBytesAvailableToCaller As ULARGE_INTEGER, ByRef TotalNumberOfBytes As ULARGE_INTEGER, ByRef TotalNumberOfFreeBytes As ULARGE_INTEGER) As BOOL
    579741
    580742Const DRIVE_UNKNOWN =     0
     
    585747Const DRIVE_CDROM =       5
    586748Const DRIVE_RAMDISK =     6
    587 Declare Function GetVolumeInformation Lib "kernel32" Alias "GetVolumeInformationA" (lpRootPathName As LPCSTR, lpVolumeNameBuffer As LPSTR, nVolumeNameSize As DWord, lpVolumeSerialNumber As *Word, lpMaximumComponentLength As *Word, lpFileSystemFlags As *Word, lpFileSystemNameBuffer As LPSTR, nFileSystemNameSize As DWord) As BOOL
    588 Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (lpRootPathName As BytePtr) As DWord
    589 
    590 Declare Function GetEnvironmentVariable Lib "kernel32" Alias "GetEnvironmentVariableA" (lpName As BytePtr, lpBuffer As BytePtr, nSize As DWord) As DWord
    591 Declare Function GetEnvironmentStrings Lib "kernel32" Alias "GetEnvironmentStringsA" () As VoidPtr
     749Declare Function GetVolumeInformation Lib "kernel32" Alias _FuncName_GetVolumeInformation (pRootPathName As PCTSTR, pVolumeNameBuffer As PTSTR, nVolumeNameSize As DWord, lpVolumeSerialNumber As *Word, lpMaximumComponentLength As *Word, lpFileSystemFlags As *Word, pFileSystemNameBuffer As PTSTR, nFileSystemNameSize As DWord) As BOOL
     750Declare Function GetDriveType Lib "kernel32" Alias _FuncName_GetDriveType (lpRootPathName As PCTSTR) As DWord
     751
     752Declare Function GetEnvironmentVariable Lib "kernel32" Alias _FuncName_GetEnvironmentVariable (lpName As PCTSTR, lpBuffer As PTSTR, nSize As DWord) As DWord
     753Declare Function GetEnvironmentStrings Lib "kernel32" Alias _FuncName_GetEnvironmentStrings () As VoidPtr
    592754Const STILL_ACTIVE = &H00000103
    593755Declare Function GetExitCodeProcess Lib "kernel32" (hProcess As HANDLE, ByRef lpExitCode As DWord) As BOOL
    594756Declare Function GetExitCodeThread Lib "kernel32" (hThread As HANDLE, ByRef lpExitCode As DWord) As BOOL
    595757
    596 Declare Function GetFileAttributes Lib "kernel32" Alias "GetFileAttributesA" (lpFileName As BytePtr) As DWord
     758Declare Function GetFileAttributes Lib "kernel32" Alias _FuncName_GetFileAttributes (lpFileName As PCTSTR) As DWord
    597759Type BY_HANDLE_FILE_INFORMATION
    598760    dwFileAttributes As DWord
     
    621783Declare Function GetFileType Lib "kernel32" (hFile As HANDLE) As DWord
    622784
    623 Declare Function GetFullPathName Lib "kernel32" Alias "GetFullPathNameA" (lpFileName As PCSTR, nBufferLength As DWord, pBuffer As PSTR, lpFilePart As *DWord) As DWord
     785Declare Function GetFullPathName Lib "kernel32" Alias _FuncName_GetFullPathName (lpFileName As PCSTR, nBufferLength As DWord, pBuffer As PSTR, lpFilePart As *DWord) As DWord
    624786Declare Function GetLastError Lib "kernel32" () As DWord
    625787Declare Sub GetLocalTime Lib "kernel32" (ByRef lpSystemTime As SYSTEMTIME)
    626788Declare Function GetLogicalDrives Lib "kernel32" () As DWord
    627 Declare Function GetLogicalDriveStrings Lib "kernel32" Alias "GetLogicalDriveStringsA" (nBufferLength As DWord, pBuffer As PSTR) As DWord
    628 Declare Function GetModuleFileName Lib "kernel32" Alias "GetModuleFileNameA" (hModule As HINSTANCE, lpFileName As BytePtr, nSize As DWord) As DWord
    629 Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (lpModuleName As BytePtr) As HINSTANCE
     789Declare Function GetLogicalDriveStrings Lib "kernel32" Alias _FuncName_GetLogicalDriveStrings (nBufferLength As DWord, pBuffer As PTSTR) As DWord
     790Declare Function GetModuleFileName Lib "kernel32" Alias _FuncName_GetModuleFileName (hModule As HINSTANCE, lpFileName As PTSTR, nSize As DWord) As DWord
     791Declare Function GetModuleHandle Lib "kernel32" Alias _FuncName_GetModuleHandle (lpModuleName As PTSTR) As HINSTANCE
    630792Declare Function GetOverlappedResult Lib "kernel32" (
    631793    hFile As HANDLE,
     
    642804) As BOOL
    643805Declare Function GetProcessHeap Lib "kernel32" () As HANDLE
    644 Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (
    645     pszLongPath As PCSTR,
    646     pszShortPath As PSTR,
     806Declare Function GetShortPathName Lib "kernel32" Alias _FuncName_GetShortPathName (
     807    pszLongPath As PCTSTR,
     808    pszShortPath As PTSTR,
    647809    cchBuffer As DWord
    648810) As DWord
    649811
    650 Declare Sub GetStartupInfo Lib "kernel32" Alias "GetStartupInfoA" (ByRef StartupInfo As STARTUPINFO)
     812Declare Sub GetStartupInfo Lib "kernel32" Alias _FuncName_GetStartupInfo (ByRef StartupInfo As STARTUPINFO)
    651813
    652814Const STD_INPUT_HANDLE  = -10
     
    655817Declare Function GetStdHandle Lib "kernel32" (nStdHandle As DWord) As HANDLE
    656818
    657 Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (pBuffer As PSTR, uSize As DWord) As DWord
     819Declare Function GetSystemDirectory Lib "kernel32" Alias _FuncName_GetSystemDirectory (pBuffer As PTSTR, uSize As DWord) As DWord
    658820
    659821Type SYSTEM_INFO
     
    674836Declare Sub GetSystemTimeAsFileTime Lib "kernel32" (ByRef SystemTimeAsFileTime As FILETIME)
    675837
    676 Declare Function GetTempFileName Lib "kernel32" Alias "GetTempFileNameA" (
    677     pPathName As PCSTR,
    678     pPrefixString As PCSTR,
     838Declare Function GetTempFileName Lib "kernel32" Alias _FuncName_GetTempFileName (
     839    pPathName As PCTSTR,
     840    pPrefixString As PCTSTR,
    679841    uUnique As DWord,
    680     pTempFileName As PSTR
     842    pTempFileName As PTSTR
    681843) As DWord
    682 Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (nBufferLength As DWord, lpBuffer As PSTR) As DWord
     844Declare Function GetTempPath Lib "kernel32" Alias _FuncName_GetTempPath (nBufferLength As DWord, lpBuffer As PTSTR) As DWord
    683845Declare Function GetThreadContext Lib "kernel32" (hThread As HANDLE, ByRef Context As CONTEXT) As BOOL
    684846
     
    705867Const TIME_NOTIMEMARKER        = &H00000004
    706868Const TIME_FORCE24HOURFORMAT   = &H00000008
    707 Declare Function GetTimeFormat Lib "kernel32" Alias "GetTimeFormatA" (Locale As LCID, dwFlags As DWord, ByRef Time As SYSTEMTIME, lpFormat As BytePtr, lpTimeStr As BytePtr, cchTime As DWord) As BOOL
     869Declare Function GetTimeFormat Lib "kernel32" Alias _FuncName_GetTimeFormat (Locale As LCID, dwFlags As DWord, ByRef Time As SYSTEMTIME, lpFormat As PCTSTR, lpTimeStr As PTSTR, cchTime As DWord) As BOOL
    708870
    709871Declare Function GetUserDefaultLCID Lib "kernel32" () As LCID
    710 Declare Function GetUserName Lib "advapi32" Alias "GetUserNameA" (pBuffer As PSTR, ByRef nSize As DWord) As BOOL
     872Declare Function GetUserName Lib "advapi32" Alias _FuncName_GetUserName (pBuffer As PTSTR, ByRef nSize As DWord) As BOOL
    711873
    712874Const VER_PLATFORM_WIN32s        = 0
    713875Const VER_PLATFORM_WIN32_WINDOWS = 1
    714876Const VER_PLATFORM_WIN32_NT      = 2
    715 Type OSVERSIONINFO
     877Type OSVERSIONINFOW
    716878    dwOSVersionInfoSize As DWord
    717879    dwMajorVersion As DWord
     
    719881    dwBuildNumber As DWord
    720882    dwPlatformId As DWord
    721     szCSDVersion[127] As Byte
    722 End Type
    723 Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (ByRef VersionInformation As OSVERSIONINFO) As BOOL
    724 
    725 Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (pBuffer As PSTR, uSize As DWord) As DWord
     883    szCSDVersion[ELM(128)] As WCHAR
     884End Type
     885Type OSVERSIONINFOA
     886    dwOSVersionInfoSize As DWord
     887    dwMajorVersion As DWord
     888    dwMinorVersion As DWord
     889    dwBuildNumber As DWord
     890    dwPlatformId As DWord
     891    szCSDVersion[ELM(128)] As SByte
     892End Type
     893#ifdef UNICODE
     894TypeDef OSVERSIONINFO = OSVERSIONINFOW
     895#else
     896TypeDef OSVERSIONINFO = OSVERSIONINFOA
     897#endif
     898Declare Function GetVersionEx Lib "kernel32" Alias _FuncName_GetVersionEx (ByRef VersionInformation As OSVERSIONINFO) As BOOL
     899
     900Declare Function GetWindowsDirectory Lib "kernel32" Alias _FuncName_GetWindowsDirectory (pBuffer As PTSTR, uSize As DWord) As DWord
    726901Declare Function GlobalAlloc Lib "kernel32" (uFlags As DWord, dwBytes As SIZE_T) As HGLOBAL
    727902Declare Function GlobalFrags Lib "kernel32" (hMem As HGLOBAL) As DWord
     
    771946Const LCMAP_SIMPLIFIED_CHINESE  = &H02000000  ' map traditional chinese to simplified chinese
    772947Const LCMAP_TRADITIONAL_CHINESE = &H04000000  ' map simplified chinese to traditional chinese
    773 Declare Function LCMapString Lib "kernel32" Alias "LCMapStringA" (Locale As LCID, dwMapFlags As DWord, lpSrcStr As LPCSTR, cchSrc As Long, lpDestStr As LPSTR, cchDest As Long) As Long
     948Declare Function LCMapString Lib "kernel32" Alias _FuncName_LCMapString (Locale As LCID, dwMapFlags As DWord, lpSrcStr As LPCTSTR, cchSrc As Long, lpDestStr As LPTSTR, cchDest As Long) As Long
    774949
    775950Declare Sub LeaveCriticalSection Lib "kernel32" (ByRef lpCriticalSection As CRITICAL_SECTION)
     
    783958Declare Function LocalUnlock Lib "kernel32" (hMem As HLOCAL) As BOOL
    784959Declare Function LockFile Lib "kernel32" (hFile As DWord, dwFileOffsetLow As DWord, dwFileOffsetHigh As DWord, nNumberOfBytesToLockLow As DWord, nNumberOfBytesToLockHigh As DWord) As BOOL
    785 Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (pLibFileName As PCSTR) As HINSTANCE
     960Declare Function LoadLibrary Lib "kernel32" Alias _FuncName_LoadLibrary (pLibFileName As PCTSTR) As HINSTANCE
    786961
    787962Const DONT_RESOLVE_DLL_REFERENCES   = &h00000001
     
    789964Const LOAD_WITH_ALTERED_SEARCH_PATH = &h00000008
    790965Const LOAD_IGNORE_CODE_AUTHZ_LEVEL  = &h00000010
    791 Declare Function LoadLibraryEx Lib "kernel32" Alias "LoadLibraryExA" (pLibFileName As PCSTR, hFile As HANDLE, dwFlags As DWord) As HINSTANCE
    792 
    793 Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" (pString1 As PSTR, pString2 As PCSTR) As PSTR
    794 Declare Function lstrcmp Lib "kernel32" Alias "lstrcmpA" (pString1 As PCSTR, pString2 As PCSTR) As Long
    795 Declare Function lstrcmpi Lib "kernel32" Alias "lstrcmpiA" (pString1 As PCSTR, pString2 As PCSTR) As Long
     966Declare Function LoadLibraryEx Lib "kernel32" Alias _FuncName_LoadLibraryEx (pLibFileName As PCTSTR, hFile As HANDLE, dwFlags As DWord) As HINSTANCE
     967
     968Declare Function lstrcat Lib "kernel32" Alias _FuncName_lstrcat (pString1 As PTSTR, pString2 As PCTSTR) As PSTR
     969Declare Function lstrcmp Lib "kernel32" Alias _FuncName_lstrcmp (pString1 As PCTSTR, pString2 As PCTSTR) As Long
     970Declare Function lstrcmpi Lib "kernel32" Alias _FuncName_lstrcmpi (pString1 As PCTSTR, pString2 As PCTSTR) As Long
    796971Declare Function lstrcpy Lib "kernel32" Alias _FuncName_lstrcpy (pString1 As PTSTR, pString2 As PCTSTR) As PSTR
    797972Declare Function lstrlenA Lib "kernel32" (pString As PCSTR) As Long
    798973Declare Function lstrlenW Lib "kernel32" (pString As PCWSTR) As Long
    799974#ifdef UNICODE
    800 Declare Function lstrlen Lib "kernel32" Alias "lstrlenW" (pString As PCTSTR) As Long
     975Declare Function lstrlen Lib "kernel32" Alias "lstrlenW" (pString As PCWSTR) As Long
    801976#else
    802 Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (pString As PCTSTR) As Long
     977Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (pString As PCSTR) As Long
    803978#endif
    804979Declare Sub memcpy Lib "kernel32" Alias "RtlMoveMemory" (pDest As VoidPtr, pSrc As VoidPtr, length As SIZE_T)
    805 Declare Function MoveFile Lib "kernel32" Alias "MoveFileA" (lpExistingFileName As BytePtr, lpNewFileName As BytePtr) As BOOL
     980Declare Function MoveFile Lib "kernel32" Alias _FuncName_MoveFile (lpExistingFileName As LPCTSTR, lpNewFileName As LPCTSTR) As BOOL
    806981Declare Sub MoveMemory Lib "kernel32" Alias "RtlMoveMemory" (pDest As VoidPtr, pSrc As VoidPtr, length As SIZE_T)
    807982
     
    822997Declare Function MultiByteToWideChar Lib "kernel32" (CodePage As DWord, dwFlags As DWord, pMultiByteStr As PCSTR, cchMultiByte As Long, pWideCharStr As PWSTR, cchWideChar As Long) As Long
    823998
    824 Declare Function OpenEvent Lib "kernel32" Alias "OpenEventA" (dwDesiredAccess As DWord, bInheritHandle As BOOL, pName As PCSTR) As HANDLE
    825 Declare Function OpenMutex Lib "kernel32" Alias "OpenMutexA" (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpName As LPSTR) As HANDLE
    826 Declare Function OpenSemaphore Lib "kernel32" Alias "OpenSemaphoreA" (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpName As LPSTR) As HANDLE
     999Declare Function OpenEvent Lib "kernel32" Alias _FuncName_OpenEvent (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpName As LPCTSTR) As HANDLE
     1000Declare Function OpenMutex Lib "kernel32" Alias _FuncName_OpenMutex (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpName As LPCTSTR) As HANDLE
     1001Declare Function OpenSemaphore Lib "kernel32" Alias _FuncName_OpenSemaphore (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpName As LPCTSTR) As HANDLE
    8271002
    8281003Const PROCESS_TERMINATE =         &H0001
     
    8431018Declare Sub OutputDebugStringW Lib "kernel32" (pOutputString As PCWSTR)
    8441019#ifdef UNICODE
    845 Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringW" (pOutputString As PCTSTR)
     1020Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringW" (pOutputString As PCWSTR)
    8461021#else
    847 Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringA" (pOutputString As PCTSTR)
     1022Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringA" (pOutputString As PCSTR)
    8481023#endif
    8491024Declare Function PulseEvent Lib "kernel32" (hEvent As HANDLE) As BOOL
     
    8561031Declare Function ReleaseMutex Lib "kernel32" (hMutex As HANDLE) As BOOL
    8571032Declare Function ReleaseSemaphore Lib "kernel32" (hSemaphore As HANDLE, lReleaseCount As Long, ByRef lpPreviousCount As Long) As BOOL
    858 Declare Function RemoveDirectory Lib "kernel32" Alias "RemoveDirectoryA" (lpPathName As BytePtr) As BOOL
     1033Declare Function RemoveDirectory Lib "kernel32" Alias _FuncName_RemoveDirectory (lpPathName As LPCTSTR) As BOOL
    8591034Declare Function ResetEvent Lib "kernel32" (hEvent As HANDLE) As BOOL
    8601035Declare Function ResumeThread Lib "kernel32" (hThread As HANDLE) As DWord
    861 Declare Function SetComputerName Lib "kernel32" Alias "SetComputerNameA" (lpComputerName As BytePtr) As BOOL
    862 Declare Function SetCurrentDirectory Lib "kernel32" Alias "SetCurrentDirectoryA" (lpPathName As BytePtr) As BOOL
    863 Declare Function SearchPath Lib "kernel32" Alias "SearchPathA" (pPath As PCSTR, pFileName As PCSTR, pExtension As PCSTR, BufferLength As DWord, pBuffer As PSTR, ByRef pFilePart As PSTR) As DWord
     1036Declare Function SetComputerName Lib "kernel32" Alias _FuncName_SetComputerName (lpComputerName As LPCTSTR) As BOOL
     1037Declare Function SetCurrentDirectory Lib "kernel32" Alias _FuncName_SetCurrentDirectory (lpPathName As LPCTSTR) As BOOL
     1038Declare Function SearchPath Lib "kernel32" Alias _FuncName_SearchPath (pPath As PCSTR, pFileName As PCTSTR, pExtension As PCTSTR, BufferLength As DWord, pBuffer As PTSTR, ByRef pFilePart As PTSTR) As DWord
    8641039Declare Function SetEndOfFile Lib "kernel32" (hFile As HANDLE) As BOOL
    865 Declare Function SetEnvironmentVariable Lib "kernel32" Alias "SetEnvironmentVariableA" (lpName As BytePtr, lpValue As BytePtr) As BOOL
     1040Declare Function SetEnvironmentVariable Lib "kernel32" Alias _FuncName_SetEnvironmentVariable (lpName As LPCTSTR, lpValue As LPTSTR) As BOOL
    8661041
    8671042Const SEM_FAILCRITICALERRORS = &h0001
     
    8711046Declare Function SetErrorMode Lib "kernel32" (uMode As DWord) As DWord
    8721047Declare Function SetEvent Lib "kernel32" (hEvent As HANDLE) As BOOL
    873 Declare Function SetFileAttributes Lib "kernel32" Alias "SetFileAttributesA" (lpFileName As BytePtr, dwFileAttributes As DWord) As BOOL
     1048Declare Function SetFileAttributes Lib "kernel32" Alias _FuncName_SetFileAttributes (lpFileName As LPCTSTR, dwFileAttributes As DWord) As BOOL
    8741049
    8751050Const FILE_BEGIN =   0
  • Include/api_window.sbp

    r137 r141  
    55#define _INC_WINDOW
    66
     7'-------------
     8' Window API Function Names
    79#ifdef UNICODE
    810Const _FuncName_CreateWindowEx = "CreateWindowExW"
     11Const _FuncName_CallWindowProc = "CallWindowProcW"
     12Const _FuncName_CharLower = "CharLowerW"
     13Const _FuncName_CharUpper = "CharUpperW"
     14Const _FuncName_DefWindowProc = "DefWindowProcW"
     15Const _FuncName_DispatchMessage = "DispatchMessageW"
     16Const _FuncName_DrawText = "DrawTextW"
     17Const _FuncName_DrawTextEx = "DrawTextExW"
     18Const _FuncName_FindWindow = "FindWindowW"
     19Const _FuncName_FindWindowEx = "FindWindowExW"
     20Const _FuncName_GetClassInfoEx = "GetClassInfoExW"
     21Const _FuncName_GetClassLong = "GetClassLongW"
     22Const _FuncName_GetClassLongPtr = "GetClassLongPtrW"
     23Const _FuncName_GetClassName = "GetClassNameW"
     24Const _FuncName_GetClipboardFormatName = "GetClipboardFormatNameW"
     25Const _FuncName_GetDlgItemText = "GetDlgItemTextW"
     26Const _FuncName_GetMenuItemInfo = "GetMenuItemInfoW"
     27Const _FuncName_GetMessage = "GetMessageW"
     28Const _FuncName_GetProp = "GetPropW"
     29Const _FuncName_GetWindowLong = "GetWindowLongW"
     30Const _FuncName_GetWindowLongPtr = "GetWindowLongPtrW"
     31Const _FuncName_GetWindowText = "GetWindowTextW"
     32Const _FuncName_GetWindowTextLength = "GetWindowTextLengthW"
     33Const _FuncName_InsertMenuItem = "InsertMenuItemW"
     34Const _FuncName_IsCharAlpha = "IsCharAlphaW"
     35Const _FuncName_IsCharAlphaNumeric = "IsCharAlphaNumericW"
     36Const _FuncName_IsCharLower = "IsCharLowerW"
     37Const _FuncName_IsCharUpper = "IsCharUpperW"
     38Const _FuncName_IsDialogMessage = "IsDialogMessageW"
     39Const _FuncName_LoadBitmap = "LoadBitmapW"
     40Const _FuncName_LoadCursor = "LoadCursorW"
     41Const _FuncName_LoadCursorFromFile = "LoadCursorFromFileW"
     42Const _FuncName_LoadIcon = "LoadIconW"
     43Const _FuncName_LoadImage = "LoadImageW"
     44Const _FuncName_PeekMessage = "PeekMessageW"
     45Const _FuncName_PostMessage = "PostMessageW"
     46Const _FuncName_PostThreadMessage = "PostThreadMessageW"
    947Const _FuncName_RegisterClassEx = "RegisterClassExW"
     48Const _FuncName_RegisterClipboardFormat = "RegisterClipboardFormatW"
     49Const _FuncName_RegisterWindowMessage = "RegisterWindowMessageW"
     50Const _FuncName_RemoveProp = "RemovePropW"
     51Const _FuncName_SendDlgItemMessage = "SendDlgItemMessageW"
     52Const _FuncName_SendMessage = "SendMessageW"
     53Const _FuncName_SendNotifyMessage = "SendNotifyMessageW"
     54Const _FuncName_SetDlgItemText = "SetDlgItemTextW"
     55Const _FuncName_SetClassLong = "SetClassLongW"
     56Const _FuncName_SetClassLong = "SetClassLongW"
     57Const _FuncName_SetMenuItemInfo = "SetMenuItemInfoW"
     58Const _FuncName_SetProp = "SetPropW"
     59Const _FuncName_SetWindowLong = "SetWindowLongW"
     60Const _FuncName_SetWindowLongPtr = "SetWindowLongPtrW"
     61Const _FuncName_SetWindowText = "SetWindowTextW"
     62Const _FuncName_SystemParametersInfo = "SystemParametersInfoW"
     63Const _FuncName_UnregisterClass = "UnregisterClassW"
     64Const _FuncName_wsprintf = "wsprintfW"
     65Const _FuncName_wvsprintf = "wvsprintfW"
    1066#else
    1167Const _FuncName_CreateWindowEx = "CreateWindowExA"
     68Const _FuncName_CallWindowProc = "CallWindowProcA"
     69Const _FuncName_CharLower = "CharLowerA"
     70Const _FuncName_CharUpper = "CharUpperA"
     71Const _FuncName_DefWindowProc = "DefWindowProcA"
     72Const _FuncName_DispatchMessage = "DispatchMessageA"
     73Const _FuncName_DrawText = "DrawTextA"
     74Const _FuncName_DrawTextEx = "DrawTextExA"
     75Const _FuncName_FindWindow = "FindWindowA"
     76Const _FuncName_FindWindowEx = "FindWindowExA"
     77Const _FuncName_GetClassInfoEx = "GetClassInfoExA"
     78Const _FuncName_GetClassLong = "GetClassLongA"
     79Const _FuncName_GetClassLongPtr = "GetClassLongPtrA"
     80Const _FuncName_GetClassName = "GetClassNameA"
     81Const _FuncName_GetClipboardFormatName = "GetClipboardFormatNameA"
     82Const _FuncName_GetDlgItemText = "GetDlgItemTextA"
     83Const _FuncName_GetMenuItemInfo = "GetMenuItemInfoA"
     84Const _FuncName_GetMessage = "GetMessageA"
     85Const _FuncName_GetProp = "GetPropA"
     86Const _FuncName_GetWindowLong = "GetWindowLongA"
     87Const _FuncName_GetWindowLongPtr = "GetWindowLongPtrA"
     88Const _FuncName_GetWindowText = "GetWindowTextA"
     89Const _FuncName_GetWindowTextLength = "GetWindowTextLengthA"
     90Const _FuncName_InsertMenuItem = "InsertMenuItemA"
     91Const _FuncName_IsCharAlpha = "IsCharAlphaA"
     92Const _FuncName_IsCharAlphaNumeric = "IsCharAlphaNumericA"
     93Const _FuncName_IsCharLower = "IsCharLowerA"
     94Const _FuncName_IsCharUpper = "IsCharUpperA"
     95Const _FuncName_IsDialogMessage = "IsDialogMessageA"
     96Const _FuncName_LoadBitmap = "LoadBitmapA"
     97Const _FuncName_LoadCursor = "LoadCursorA"
     98Const _FuncName_LoadCursorFromFile = "LoadCursorFromFileA"
     99Const _FuncName_LoadIcon = "LoadIconA"
     100Const _FuncName_LoadImage = "LoadImageA"
     101Const _FuncName_PeekMessage = "PeekMessageA"
     102Const _FuncName_PostMessage = "PostMessageA"
     103Const _FuncName_PostThreadMessage = "PostThreadMessageA"
    12104Const _FuncName_RegisterClassEx = "RegisterClassExA"
     105Const _FuncName_RegisterClipboardFormat = "RegisterClipboardFormatA"
     106Const _FuncName_RegisterWindowMessage = "RegisterWindowMessageA"
     107Const _FuncName_RemoveProp = "RemovePropA"
     108Const _FuncName_SendDlgItemMessage = "SendDlgItemMessageA"
     109Const _FuncName_SendMessage = "SendMessageA"
     110Const _FuncName_SendNotifyMessage = "SendNotifyMessageA"
     111Const _FuncName_SetDlgItemText = "SetDlgItemTextA"
     112Const _FuncName_SetClassLong = "SetClassLongA"
     113Const _FuncName_SetClassLongPtr = "SetClassLongPtrA"
     114Const _FuncName_SetMenuItemInfo = "SetMenuItemInfoA"
     115Const _FuncName_SetProp = "SetPropA"
     116Const _FuncName_SetWindowLong = "SetWindowLongA"
     117Const _FuncName_SetWindowLongPtr = "SetWindowLongPtrA"
     118Const _FuncName_SetWindowText = "SetWindowTextA"
     119Const _FuncName_SystemParametersInfo = "SystemParametersInfoA"
     120Const _FuncName_UnregisterClass = "UnregisterClassA"
     121Const _FuncName_wsprintf = "wsprintfA"
     122Const _FuncName_wvsprintf = "wvsprintfA"
    13123#endif
    14124
     
    26136
    27137
    28 Const MAKEINTRESOURCE(i) = i As PCSTR
     138Const MAKEINTRESOURCEW(i) = i As PCWSTR
     139Const MAKEINTRESOURCEA(i) = i As PCSTR
     140Const MAKEINTRESOURCE(i) = i As PCTSTR
    29141
    30142TypeDef WNDENUMPROC = *Function(ByVal hwnd As HWND, ByVal lParam As LPARAM) As BOOL
     
    152264Const MFT_RIGHTJUSTIFY =  MF_RIGHTJUSTIFY
    153265
    154 Type MENUITEMINFO
     266Type MENUITEMINFOW
     267    cbSize        As DWord
     268    fMask         As DWord
     269    fType         As DWord
     270    fState        As DWord
     271    wID           As DWord
     272    hSubMenu      As HMENU
     273    hbmpChecked   As HBITMAP
     274    hbmpUnchecked As HBITMAP
     275    dwItemData    As ULONG_PTR
     276    dwTypeData    As LPWSTR
     277    cch           As DWord
     278End Type
     279Type MENUITEMINFOA
    155280    cbSize        As DWord
    156281    fMask         As DWord
     
    165290    cch           As DWord
    166291End Type
    167 
     292#ifdef UNICODE
     293TypeDef MENUITEMINFO = MENUITEMINFOW
     294#else
     295TypeDef MENUITEMINFO = MENUITEMINFOA
     296#endif
    168297
    169298'------------
     
    226355
    227356'-------------
    228 ' Window API Function Names
    229 
    230 /*
    231 CreateWindowEx
    232 CallWindowProc
    233 DefWindowProc
    234 DispatchMessage
    235 DrawText
    236 DrawTextEx
    237 FindWindow
    238 FindWindowEx
    239 GetClassInfoEx
    240 GetClassLong
    241 GetClassLongPtr
    242 GetClassName
    243 GetClipboardFormatName
    244 GetDlgItemText
    245 GetMenuItemInfo
    246 GetMessage
    247 GetWindowLong
    248 GetWindowLongPtr
    249 GetWindowText
    250 GetWindowTextLength
    251 InsertMenuItem
    252 IsCharAlpha
    253 IsCharAlphaNumeric
    254 IsDialogMessage
    255 LoadBitmap
    256 LoadCursor
    257 LoadCursorFromFile
    258 LoadIcon
    259 LoadImage
    260 PeekMessage
    261 PostMessage
    262 PostThreadMessage
    263 RegisterClassEx
    264 RegisterClipboardFormat
    265 RegisterWindowMessage
    266 RemoveProp
    267 SendDlgItemMessage
    268 SendMessage
    269 SendNotifyMessage
    270 SetDlgItemText
    271 SetClassLong
    272 SetClassLong
    273 SetMenuItemInfo
    274 SetWindowLong
    275 SetWindowLongPtr
    276 SetWindowText
    277 SystemParametersInfo
    278 UnregisterClass
    279 wsprintf
    280 wvsprintf
    281 */
    282 
    283 '-------------
    284357' Window API
    285358
     
    295368    fRestore As BOOL
    296369    fIncUpdate As BOOL
    297     rgbReserved(31) As Byte
     370    rgbReserved[ELM(32)] As Byte
    298371End Type
    299372Declare Function BeginPaint Lib "user32" (hWnd As HWND, ByRef Paint As PAINTSTRUCT) As HDC
    300373
    301374Declare Function BringWindowToTop Lib "user32" (hWnd As HWND) As Long
    302 Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (lpPrevWndFunc As WNDPROC, hWnd As HWND, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
    303 Declare Function CharLower Lib "user32" Alias "CharLowerA" (lpsz As BytePtr) As DWord
    304 Declare Function CharUpper Lib "user32" Alias "CharUpperA" (lpsz As BytePtr) As DWord
     375Declare Function CallWindowProc Lib "user32" Alias _FuncName_CallWindowProc (lpPrevWndFunc As WNDPROC, hWnd As HWND, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
     376Declare Function CharLower Lib "user32" Alias _FuncName_CharLower (psz As PTSTR) As DWord
     377Declare Function CharUpper Lib "user32" Alias _FuncName_CharUpper (psz As PTSTR) As DWord
    305378Declare Function CheckMenuItem Lib "user32" (hMenu As HMENU, uIDCheckItem As DWord, uCheck As DWord) As DWord
    306379Declare Function CheckMenuRadioItem Lib "user32" (hMenu As HMENU, idFirst As DWord, idLast As DWord, idCheck As DWord, uFlags As DWord) As BOOL
     
    338411Declare Function CreateWindowEx Lib "user32" Alias _FuncName_CreateWindowEx (dwExStyle As DWord, pClassName As PCTSTR, lpWindowName As PCTSTR, dwStyle As DWord, x As Long, y As Long, nWidth As Long, nHeight As Long, hwndParent As HWND, hmenu As HMENU, hInstance As HINSTANCE, pParm As VoidPtr) As HWND
    339412
    340 Declare Function DefWindowProc Lib "user32" Alias "DefWindowProcA" (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
     413Declare Function DefWindowProc Lib "user32" Alias _FuncName_DefWindowProc (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
    341414Declare Function DeleteMenu Lib "user32" (hMenu As HMENU, uPosition As DWord, uFlags As DWord) As BOOL
    342415Declare Function DestroyCaret Lib "user32" () As BOOL
     
    345418Declare Function DestroyMenu Lib "user32" (hMenu As HMENU) As BOOL
    346419Declare Function DestroyWindow Lib "user32" (hWnd As HWND) As BOOL
    347 Declare Function DispatchMessage Lib "user32" Alias "DispatchMessageA" (ByRef lpMsg As MSG) As LRESULT
     420Declare Function DispatchMessage Lib "user32" Alias _FuncName_DispatchMessage (ByRef Msg As MSG) As LRESULT
    348421
    349422Const BDR_RAISEDOUTER = &H0001
     
    447520Const DT_RTLREADING =     &H00020000
    448521Const DT_WORD_ELLIPSIS =  &H00040000
    449 Declare Function DrawText Lib "user32" Alias "DrawTextA" (hdc As HDC, lpStr As PCSTR, nCount As Long, ByRef lpRect As RECT, dwFormat As DWord) As BOOL
     522Declare Function DrawText Lib "user32" Alias _FuncName_DrawText (hdc As HDC, lpStr As PCTSTR, nCount As Long, ByRef Rect As RECT, dwFormat As DWord) As BOOL
    450523
    451524Type DRAWTEXTPARAMS
     
    456529    uiLengthDrawn As DWord
    457530End Type
    458 Declare Function DrawTextEx Lib "user32" Alias "DrawTextExA" (hdc As HDC, lpchText As PCSTR, cchText As Long, ByRef lpRect As RECT, dwDTFormat As DWord, ByRef lpDTParams As DRAWTEXTPARAMS) As BOOL
     531Declare Function DrawTextEx Lib "user32" Alias _FuncName_DrawTextEx (hdc As HDC, pchText As PCTSTR, cchText As Long, ByRef Rect As RECT, dwDTFormat As DWord, ByRef DTParams As DRAWTEXTPARAMS) As BOOL
    459532
    460533Declare Function EmptyClipboard Lib "user32" () As BOOL
     
    478551Declare Function EnumWindows Lib "user32" (pEnumFunc As WNDENUMPROC, lParam As LPARAM) As BOOL
    479552Declare Function FillRect Lib "user32" (hdc As HDC, ByRef lpRect As RECT, hBrush As HBRUSH) As BOOL
    480 Declare Function FindWindow Lib "user32" Alias "FindWindowA" (lpClassName As PCSTR, lpWindowName As PCSTR) As HWND
    481 Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (hwndParent As HWND, hwndChildAfter As HWND, pszClass As PCSTR, pszWindow As PCSTR) As HWND
     553Declare Function FindWindow Lib "user32" Alias _FuncName_FindWindow (pClassName As PCTSTR, lpWindowName As PCTSTR) As HWND
     554Declare Function FindWindowEx Lib "user32" Alias _FuncName_FindWindowEx (hwndParent As HWND, hwndChildAfter As HWND, pszClass As PCTSTR, pszWindow As PCTSTR) As HWND
    482555Declare Function FlashWindow Lib "user32" (hWnd As HWND, bInvert As BOOL) As BOOL
    483556Declare Function FrameRect Lib "user32" (hdc As HDC, ByRef lpRect As RECT, hBrush As HBRUSH) As Long
     
    486559Declare Function GetCapture Lib "user32" () As HWND
    487560Declare Function GetCaretPos Lib "user32" (ByRef lpPoint As POINTAPI) As BOOL
    488 Declare Function GetClassInfoEx Lib "user32" Alias "GetClassInfoExA" (hInst As HINSTANCE, lpszClass As PCSTR, ByRef lpwcx As WNDCLASSEX) As BOOL
     561Declare Function GetClassInfoEx Lib "user32" Alias _FuncName_GetClassInfoEx (hInst As HINSTANCE, pszClass As PCTSTR, ByRef lpwcx As WNDCLASSEX) As BOOL
    489562
    490563Const GCL_MENUNAME =      -8
     
    500573Const GCL_HICONSM =       -34
    501574#ifdef _WIN64
    502 Declare Function GetClassLong Lib "user32" Alias "GetClassLongPtrA" (hWnd As HWND, nIndex As Long) As LONG_PTR
    503 Declare Function GetClassLongPtr Lib "user32" Alias "GetClassLongPtrA" (hWnd As HWND, nIndex As Long) As LONG_PTR
     575Declare Function GetClassLong Lib "user32" Alias _FuncName_GetClassLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
     576Declare Function GetClassLongPtr Lib "user32" Alias _FuncName_GetClassLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
    504577#else
    505 Declare Function GetClassLong Lib "user32" Alias "GetClassLongA" (hWnd As HWND, nIndex As Long) As LONG_PTR
    506 Declare Function GetClassLongPtr Lib "user32" Alias "GetClassLongA" (hWnd As HWND, nIndex As Long) As LONG_PTR
     578Declare Function GetClassLong Lib "user32" Alias _FuncName_GetClassLong (hWnd As HWND, nIndex As Long) As LONG_PTR
     579Declare Function GetClassLongPtr Lib "user32" Alias _FuncName_GetClassLong (hWnd As HWND, nIndex As Long) As LONG_PTR
    507580#endif
    508581
    509 Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (hWnd As HWND, lpClassName As PSTR, nMaxCount As Long) As Long
     582Declare Function GetClassName Lib "user32" Alias _FuncName_GetClassName (hWnd As HWND, lpClassName As PTSTR, nMaxCount As Long) As Long
    510583Declare Function GetClientRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
    511584Declare Function GetClipboardData Lib "user32" (uFormat As DWord) As HANDLE
    512 Declare Function GetClipboardFormatName Lib "user32" Alias "GetClipboardFormatNameA" (uFormat As DWord, lpszFormatName As BytePtr, cchMaxCount As Long) As BOOL
     585Declare Function GetClipboardFormatName Lib "user32" Alias _FuncName_GetClipboardFormatName (uFormat As DWord, pszFormatName As PTSTR, cchMaxCount As Long) As BOOL
    513586Declare Function GetClipCursor Lib "user32" (ByRef lpRect As RECT) As BOOL
    514587Declare Function GetCursor Lib "user32" () As HCURSOR
     
    533606Declare Function GetDlgCtrlID Lib "user32" (hWnd As HWND) As Long
    534607Declare Function GetDlgItem Lib "user32" (hDlg As HWND, nIDDlgItem As Long) As HWND
    535 Declare Function GetDlgItemText Lib "user32" Alias "GetDlgItemTextA" (hDlg As HWND, nIDDlgItem As Long, lpString As PSTR, nMaxCount As Long) As Long
     608Declare Function GetDlgItemText Lib "user32" Alias _FuncName_GetDlgItemText (hDlg As HWND, nIDDlgItem As Long, pString As PTSTR, nMaxCount As Long) As Long
    536609Declare Function GetDoubleClickTime Lib "user32" () As DWord
    537610Declare Function GetFocus Lib "user32" () As HWND
     
    549622Declare Function GetMenuItemID Lib "user32" (hMenu As HMENU, nPos As Long) As DWord
    550623Declare Function GetMenuItemCount Lib "user32" (hMenu As HMENU) As Long
    551 Declare Function GetMenuItemInfo Lib "user32" Alias "GetMenuItemInfoA" (hMenu As HMENU, uItem As DWord, fByPosition As DWord, ByRef lpmii As MENUITEMINFO) As BOOL
    552 Declare Function GetMessage Lib "user32" Alias "GetMessageA" (ByRef lpMsg As MSG, hWnd As HWND, wMsgFilterMin As DWord, wMsgFilterMax As DWord) As Long
     624Declare Function GetMenuItemInfo Lib "user32" Alias _FuncName_GetMenuItemInfo (hMenu As HMENU, uItem As DWord, fByPosition As DWord, ByRef mii As MENUITEMINFO) As BOOL
     625Declare Function GetMessage Lib "user32" Alias _FuncName_GetMessage (ByRef Msg As MSG, hWnd As HWND, wMsgFilterMin As DWord, wMsgFilterMax As DWord) As Long
    553626Declare Function GetParent Lib "user32" (hWnd As HWND) As HWND
    554 Declare Function GetProp Lib "user32" Alias "GetPropA" (hWnd As HWND, pString As PCSTR) As HANDLE
     627Declare Function GetProp Lib "user32" Alias _FuncName_GetProp (hWnd As HWND, pString As PCTSTR) As HANDLE
    555628Declare Function GetScrollInfo Lib "user32" (hWnd As HWND, fnBar As Long, ByRef lpsi As SCROLLINFO) As BOOL
    556629Declare Function GetSubMenu Lib "user32" (hMenu As HMENU, nPos As Long) As HMENU
     
    708781
    709782#ifdef _WIN64
    710 Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongPtrA" (hWnd As HWND, nIndex As Long) As LONG_PTR
    711 Declare Function GetWindowLongPtr Lib "user32" Alias "GetWindowLongPtrA" (hWnd As HWND, nIndex As Long) As LONG_PTR
     783Declare Function GetWindowLong Lib "user32" Alias _FuncName_GetWindowLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
     784Declare Function GetWindowLongPtr Lib "user32" Alias _FuncName_GetWindowLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
    712785#else
    713 Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (hWnd As HWND, nIndex As Long) As LONG_PTR
    714 Declare Function GetWindowLongPtr Lib "user32" Alias "GetWindowLongA" (hWnd As HWND, nIndex As Long) As LONG_PTR
     786Declare Function GetWindowLong Lib "user32" Alias _FuncName_GetWindowLong (hWnd As HWND, nIndex As Long) As LONG_PTR
     787Declare Function GetWindowLongPtr Lib "user32" Alias _FuncName_GetWindowLong (hWnd As HWND, nIndex As Long) As LONG_PTR
    715788#endif
    716789
     
    729802Declare Function GetWindowRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
    730803Declare Function GetWindowRgn Lib "user32" (hWnd As HWND, hRgn As HRGN) As Long
    731 Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (hWnd As HWND, lpString As PSTR, nMaxCount As Long) As Long
    732 Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (hWnd As HWND) As Long
    733 Declare Function GetWindowThreadProcessId Lib "user32" (hWnd As HWND, lpdwProcessId As DWordPtr) As DWord
     804Declare Function GetWindowText Lib "user32" Alias _FuncName_GetWindowText (hWnd As HWND, lpString As PTSTR, nMaxCount As Long) As Long
     805Declare Function GetWindowTextLength Lib "user32" Alias _FuncName_GetWindowTextLength (hWnd As HWND) As Long
     806Declare Function GetWindowThreadProcessId Lib "user32" (hWnd As HWND, pdwProcessId As *DWord) As DWord
    734807Declare Function HideCaret Lib "user32" (hWnd As HWND) As BOOL
    735 Declare Function InsertMenuItem Lib "user32" Alias "InsertMenuItemA" (hMenu As HMENU, uItem As DWord, fByPosition As BOOL, ByRef lpmii As MENUITEMINFO) As BOOL
    736 Declare Function InvalidateRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT, bErase As BOOL) As BOOL
     808Declare Function InsertMenuItem Lib "user32" Alias _FuncName_InsertMenuItem (hMenu As HMENU, uItem As DWord, fByPosition As BOOL, ByRef mii As MENUITEMINFO) As BOOL
     809Declare Function InvalidateRect Lib "user32" (hWnd As HWND, ByRef Rect As RECT, bErase As BOOL) As BOOL
    737810Declare Function InvalidateRgn Lib "user32" (hWnd As HWND, hRgn As HRGN, bErase As BOOL) As BOOL
    738811Declare Function InvertRect Lib "user32" (hdc As HDC, ByRef lpRect As RECT) As BOOL
    739 Declare Function IsCharAlpha Lib "user32" Alias "IsCharAlphaA" (ch As Byte) As BOOL
    740 Declare Function IsCharAlphaNumeric Lib "user32" Alias "IsCharAlphaNumericA" (ch As Byte) As BOOL
    741 Declare Function IsCharLower Lib "user32" Alias "IsCharLowerA" (ch As Byte) As BOOL
    742 Declare Function IsCharUpper Lib "user32" Alias "IsCharUpperA" (ch As Byte) As BOOL
     812Declare Function IsCharAlpha Lib "user32" Alias _FuncName_IsCharAlpha (ch As TCHAR) As BOOL
     813Declare Function IsCharAlphaNumeric Lib "user32" Alias _FuncName_IsCharAlphaNumeric (ch As TCHAR) As BOOL
     814Declare Function IsCharLower Lib "user32" Alias _FuncName_IsCharLower (ch As TCHAR) As BOOL
     815Declare Function IsCharUpper Lib "user32" Alias _FuncName_IsCharUpper (ch As TCHAR) As BOOL
    743816Declare Function IsChild Lib "user32" (hWndParent As HWND, hWnd As HWND) As BOOL
    744 Declare Function IsDialogMessage Lib "user32" Alias "IsDialogMessageA" (hDlg As HWND, ByRef ref_msg As MSG) As BOOL
     817Declare Function IsDialogMessage Lib "user32" Alias _FuncName_IsDialogMessage (hDlg As HWND, ByRef msg As MSG) As BOOL
    745818Declare Function IsIconic Lib "user32" (hWnd As HWND) As BOOL
    746819Declare Function IsWindow Lib "user32" (hWnd As HWND) As BOOL
     
    755828
    756829Declare Function KillTimer Lib "user32" (hWnd As HWND, nIDEvent As ULONG_PTR) As BOOL
    757 Declare Function LoadBitmap Lib "user32" Alias "LoadBitmapA" (hInst As HINSTANCE, lpBitmapName As PCSTR) As HBITMAP
     830Declare Function LoadBitmap Lib "user32" Alias _FuncName_LoadBitmap (hInst As HINSTANCE, pBitmapName As PCTSTR) As HBITMAP
    758831
    759832Const IDC_ARROW =         32512
     
    773846Const IDC_APPSTARTING =   32650
    774847Const IDC_HELP =          32651
    775 Declare Function LoadCursor Lib "user32" Alias "LoadCursorA" (hInst As HINSTANCE, lpCursorName As PCSTR) As HCURSOR
    776 
    777 Declare Function LoadCursorFromFile Lib "user32" Alias "LoadCursorFromFileA" (lpFileName As PCSTR) As HCURSOR
     848Declare Function LoadCursor Lib "user32" Alias _FuncName_LoadCursor (hInst As HINSTANCE, pCursorName As PCTSTR) As HCURSOR
     849
     850Declare Function LoadCursorFromFile Lib "user32" Alias _FuncName_LoadCursorFromFile (pFileName As PCTSTR) As HCURSOR
    778851
    779852Const IDI_APPLICATION =   32512
     
    783856Const IDI_ASTERISK =      32516
    784857Const IDI_WINLOGO =       32517
    785 Declare Function LoadIcon Lib "user32" Alias "LoadIconA" (hInst As HINSTANCE, lpIconName As PCSTR) As HICON
     858Declare Function LoadIcon Lib "user32" Alias _FuncName_LoadIcon (hInst As HINSTANCE, pIconName As PCTSTR) As HICON
    786859
    787860Const IMAGE_BITMAP =      0
     
    802875Const LR_COPYFROMRESOURCE = &H4000
    803876Const LR_SHARED =           &H8000
    804 Declare Function LoadImage Lib "user32" Alias "LoadImageA" (hInst As HINSTANCE, lpszName As PCSTR, dwImageType As DWord, cxDesired As Long, cyDesired As Long, dwFlags As DWord) As HANDLE
     877Declare Function LoadImage Lib "user32" Alias _FuncName_LoadImage (hinst As HINSTANCE, pszName As PCTSTR, dwImageType As DWord, cxDesired As Long, cyDesired As Long, dwFlags As DWord) As HANDLE
    805878
    806879Declare Function LockWindowUpdate Lib "user32" (hWnd As HWND) As BOOL
     
    842915Const MB_RTLREADING =             &H00100000
    843916#ifdef UNICODE
    844 Declare Function MessageBox Lib "user32" Alias "MessageBoxW" (hWnd As HWND, pText As PCWSTR, pCaption As PCWSTR, uType As DWord) As Long
     917Declare Function MessageBox Lib "user32" Alias "MessageBoxW" (hwnd As HWND, pText As PCWSTR, pCaption As PCWSTR, uType As DWord) As Long
    845918#else
    846 Declare Function MessageBox Lib "user32" Alias "MessageBoxA" (hWnd As HWND, pText As PCSTR, pCaption As PCSTR, uType As DWord) As Long
     919Declare Function MessageBox Lib "user32" Alias "MessageBoxA" (hwnd As HWND, pText As PCSTR, pCaption As PCSTR, uType As DWord) As Long
    847920#endif
    848921Declare Function MessageBoxW Lib "user32" (hWnd As HWND, pText As PCWSTR, pCaption As PCWSTR, uType As DWord) As Long
     
    865938Const PM_NOREMOVE = &H0000
    866939Const PM_REMOVE =   &H0001
    867 Declare Function PeekMessage Lib "user32" Alias "PeekMessageA" (ByRef lpMsg As MSG, hWnd As HWND, wMsgFilterMin As DWord, wMsgFilterMax As DWord, wRemoveMsg As DWord) As BOOL
     940Declare Function PeekMessage Lib "user32" Alias _FuncName_PeekMessage (ByRef Msg As MSG, hWnd As HWND, wMsgFilterMin As DWord, wMsgFilterMax As DWord, wRemoveMsg As DWord) As BOOL
    868941
    869942Const HWND_BROADCAST = &HFFFF
    870 Declare Function PostMessage Lib "user32" Alias "PostMessageA" (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As BOOL
     943Declare Function PostMessage Lib "user32" Alias _FuncName_PostMessage (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As BOOL
    871944
    872945Declare Sub PostQuitMessage Lib "user32" (nExitCode As Long)
    873 Declare Function PostThreadMessage Lib "user32" Alias "PostThreadMessageA" (idThread As DWord, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As BOOL
     946Declare Function PostThreadMessage Lib "user32" Alias _FuncName_PostThreadMessage (idThread As DWord, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As BOOL
    874947
    875948Const RDW_INVALIDATE =        &H0001
     
    888961
    889962Declare Function RegisterClassEx Lib "user32" Alias _FuncName_RegisterClassEx (ByRef wcx As WNDCLASSEX) As ATOM
    890 Declare Function RegisterClipboardFormat Lib "user32" Alias "RegisterClipboardFormatA" (lpszFormat As PCSTR) As DWord
    891 Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" (lpString As PCSTR) As DWord
     963Declare Function RegisterClipboardFormat Lib "user32" Alias _FuncName_RegisterClipboardFormat (pszFormat As PCTSTR) As DWord
     964Declare Function RegisterWindowMessage Lib "user32" Alias _FuncName_RegisterWindowMessage (pString As PCTSTR) As DWord
    892965Declare Function ReleaseCapture Lib "user32" () As BOOL
    893966Declare Function ReleaseDC Lib "user32" (hWnd As HWND, hdc As HDC) As BOOL
    894967Declare Function RemoveMenu Lib "user32" (hMenu As HMENU, uPosition As DWord, uFlags As DWord) As BOOL
    895 Declare Function RemoveProp Lib "user32" Alias "RemovePropA" (hWnd As HWND, lpString As PCSTR) As HANDLE
     968Declare Function RemoveProp Lib "user32" Alias _FuncName_RemoveProp (hWnd As HWND, pString As PCTSTR) As HANDLE
    896969Declare Function TranslateMessage Lib "user32" (ByRef lpMsg As MSG) As Long
    897970Declare Function ScreenToClient Lib "user32" (hWnd As HWND, ByRef lpPoint As POINTAPI) As BOOL
     
    903976Declare Function ScrollWindowEx Lib "user32" (hWnd As HWND, dx As Long, dy As Long, ByRef rcScroll As RECT, ByRef rcClip As RECT, hrgnUpdate As HRGN, ByRef rcUpdate As RECT, flags As DWord) As BOOL
    904977
    905 Declare Function SendDlgItemMessage Lib "user32" Alias "SendDlgItemMessageA" (hDlg As HWND, nIDDlgItem As Long, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
    906 Declare Function SendMessage Lib "user32" Alias "SendMessageA" (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
    907 Declare Function SendNotifyMessage Lib "user32" Alias "SendNotifyMessageA" (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
     978Declare Function SendDlgItemMessage Lib "user32" Alias _FuncName_SendDlgItemMessage (hDlg As HWND, nIDDlgItem As Long, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
     979Declare Function SendMessage Lib "user32" Alias _FuncName_SendMessage (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
     980Declare Function SendNotifyMessage Lib "user32" Alias _FuncName_SendNotifyMessage (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
    908981Declare Function SetActiveWindow Lib "user32" (hWnd As HWND) As HWND
    909 Declare Function SetDlgItemText Lib "user32" Alias "SetDlgItemTextA" (hDlg As HWND, nIDDlgItem As Long, lpString As PCSTR) As BOOL
     982Declare Function SetDlgItemText Lib "user32" Alias _FuncName_SetDlgItemText (hDlg As HWND, nIDDlgItem As Long, lpString As PCTSTR) As BOOL
    910983Declare Function SetCapture Lib "user32" (hWnd As HWND) As HWND
    911984Declare Function SetCaretPos Lib "user32" (x As Long, y As Long) As BOOL
    912985
    913986#ifdef _WIN64
    914 Declare Function SetClassLong Lib "user32" Alias "SetClassLongPtrA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
    915 Declare Function SetClassLongPtr Lib "user32" Alias "SetClassLongPtrA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
     987Declare Function SetClassLong Lib "user32" Alias _FuncName_SetClassLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
     988Declare Function SetClassLongPtr Lib "user32" Alias _FuncName_SetClassLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
    916989#else
    917 Declare Function SetClassLong Lib "user32" Alias "SetClassLongA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
    918 Declare Function SetClassLongPtr Lib "user32" Alias "SetClassLongA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
     990Declare Function SetClassLong Lib "user32" Alias _FuncName_SetClassLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
     991Declare Function SetClassLongPtr Lib "user32" Alias _FuncName_SetClassLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
    919992#endif
    920993
     
    9291002Declare Function SetMenuContextHelpId Lib "user32" (hmenu As HMENU, dwContextHelpId As DWord) As BOOL
    9301003Declare Function SetMenuDefaultItem Lib "user32" (hMenu As HMENU, uItem As DWord, fByPos As DWord) As BOOL
    931 Declare Function SetMenuItemInfo Lib "user32" Alias "SetMenuItemInfoA" (hMenu As HMENU, uItem As DWord, fByPosition As BOOL, ByRef lpmii As MENUITEMINFO) As BOOL
     1004Declare Function SetMenuItemInfo Lib "user32" Alias _FuncName_SetMenuItemInfo (hMenu As HMENU, uItem As DWord, fByPosition As BOOL, ByRef mii As MENUITEMINFO) As BOOL
    9321005Declare Function SetParent Lib "user32" (hWndChild As HWND, hWndNewParent As HWND) As HWND
    933 Declare Function SetProp Lib "user32" Alias "SetPropA" (hWnd As HWND, pString As PCSTR, hData As HANDLE) As BOOL
     1006Declare Function SetProp Lib "user32" Alias _FuncName_SetProp (hWnd As HWND, pString As PCTSTR, hData As HANDLE) As BOOL
    9341007Declare Function SetScrollInfo Lib "user32" (hWnd As HWND, fnBar As Long, ByRef lpsi As SCROLLINFO, bRedraw As Long) As BOOL
    9351008Declare Function SetSysColors Lib "user32" (cElements As Long, lpaElements As *DWord, lpaRgbValues As *DWord) As BOOL
     
    9411014
    9421015#ifdef _WIN64
    943 Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongPtrA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
    944 Declare Function SetWindowLongPtr Lib "user32" Alias "SetWindowLongPtrA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
     1016Declare Function SetWindowLong Lib "user32" Alias _FuncName_SetWindowLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
     1017Declare Function SetWindowLongPtr Lib "user32" Alias _FuncName_SetWindowLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
    9451018#else
    946 Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
    947 Declare Function SetWindowLongPtr Lib "user32" Alias "SetWindowLongA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
     1019Declare Function SetWindowLong Lib "user32" Alias _FuncName_SetWindowLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
     1020Declare Function SetWindowLongPtr Lib "user32" Alias _FuncName_SetWindowLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
    9481021#endif
    9491022
     
    9721045
    9731046Declare Function SetWindowRgn Lib "user32" (hWnd As HWND, hRgn As HRGN, bRedraw As BOOL) As BOOL
    974 Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (hWnd As HWND, pString As PCSTR) As BOOL
     1047Declare Function SetWindowText Lib "user32" Alias _FuncName_SetWindowText (hWnd As HWND, pString As PCTSTR) As BOOL
    9751048Declare Function ShowCaret Lib "user32" (hWnd As HWND) As BOOL
    9761049Declare Function ShowCursor Lib "user32" (bShow As Long) As BOOL
     
    9951068Declare Function ShowWindowAsync Lib "user32" (hWnd As HWND, nCmdShow As Long) As BOOL
    9961069
    997 Type NONCLIENTMETRICS
     1070Type NONCLIENTMETRICSW
    9981071    cbSize As DWord
    9991072    iBorderWidth As Long
     
    10021075    iCaptionWidth As Long
    10031076    iCaptionHeight As Long
    1004     lfCaptionFont As LOGFONT
     1077    lfCaptionFont As LOGFONTW
    10051078    iSmCaptionWidth As Long
    10061079    iSmCaptionHeight As Long
    1007     lfSmCaptionFont As LOGFONT
     1080    lfSmCaptionFont As LOGFONTW
    10081081    iMenuWidth As Long
    10091082    iMenuHeight As Long
    1010     lfMenuFont As LOGFONT
    1011     lfStatusFont As LOGFONT
    1012     lfMessageFont As LOGFONT
     1083    lfMenuFont As LOGFONTW
     1084    lfStatusFont As LOGFONTW
     1085    lfMessageFont As LOGFONTW
    10131086End Type
     1087Type NONCLIENTMETRICSA
     1088    cbSize As DWord
     1089    iBorderWidth As Long
     1090    iScrollWidth As Long
     1091    iScrollHeight As Long
     1092    iCaptionWidth As Long
     1093    iCaptionHeight As Long
     1094    lfCaptionFont As LOGFONTA
     1095    iSmCaptionWidth As Long
     1096    iSmCaptionHeight As Long
     1097    lfSmCaptionFont As LOGFONTA
     1098    iMenuWidth As Long
     1099    iMenuHeight As Long
     1100    lfMenuFont As LOGFONTA
     1101    lfStatusFont As LOGFONTA
     1102    lfMessageFont As LOGFONTA
     1103End Type
     1104#ifdef
     1105TypeDef NONCLIENTMETRICS = NONCLIENTMETRICSW
     1106#else
     1107TypeDef NONCLIENTMETRICS = NONCLIENTMETRICSA
     1108#endif
    10141109Const SPI_GETBEEP =               1
    10151110Const SPI_SETBEEP =               2
     
    11411236Const SPIF_SENDWININICHANGE = &H0002
    11421237Const SPIF_SENDCHANGE =       SPIF_SENDWININICHANGE
    1143 Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (uiAction As DWord, uiParam As DWord, pvParam As VoidPtr, fWinIni As DWord) As BOOL
     1238Declare Function SystemParametersInfo Lib "user32" Alias _FuncName_SystemParametersInfo (uiAction As DWord, uiParam As DWord, pvParam As VoidPtr, fWinIni As DWord) As BOOL
    11441239
    11451240Const TME_HOVER       = &H00000001
     
    11721267Declare Function TrackPopupMenu Lib "user32" (hMenu As HMENU, uFlags As DWord, x As Long, y As Long, nReserved As Long, hWnd As HWND, ByRef prcRect As RECT) As BOOL
    11731268
    1174 Declare Function UnregisterClass Lib "user32" Alias "UnregisterClassA" (lpClassName As BytePtr, hInst As HINSTANCE) As BOOL
     1269Declare Function UnregisterClass Lib "user32" Alias _FuncName_UnregisterClass (pClassName As PCTSTR, hinst As HINSTANCE) As BOOL
    11751270Declare Function UpdateWindow Lib "user32" (hWnd As HWND) As BOOL
    11761271Declare Function ValidateRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
     
    11811276Declare Function WindowFromDC Lib "user32" (hDC As HDC) As HWND
    11821277Declare Function WindowFromPoint Lib "user32" (ptX As Long, ptY As Long) As HWND
    1183 Declare Function wsprintf cdecl Lib "user32" Alias "wsprintfA" (pText As PSTR, pFormat As PCSTR, ...) As Long
    1184 Declare Function wvsprintf Lib "user32" Alias "wvsprintfA" (pOutput As PSTR, pFormat As PCSTR, arglist As DWordPtr) As Long
     1278Declare Function wsprintf cdecl Lib "user32" Alias _FuncName_wsprintf (pText As PTSTR, pFormat As PCTSTR, ...) As Long
     1279Declare Function wvsprintf Lib "user32" Alias _FuncName_wvsprintf (pOutput As PTSTR, pFormat As PCTSTR, arglist As DWordPtr) As Long
    11851280
    11861281
  • Include/api_wininet.sbp

    r1 r141  
    55#define _INC_WININET
    66
     7#ifdef UNICODE
     8Const _FuncName_InternetOpen = "InternetOpenW"
     9Const _FuncName_InternetConnect = "InternetConnectW"
     10Const _FuncName_FtpGetFile = "FtpGetFileW"
     11Const _FuncName_FtpGetCurrentDirectory = "FtpGetCurrentDirectoryW"
     12Const _FuncName_FtpSetCurrentDirectory = "FtpSetCurrentDirectoryW"
     13Const _FuncName_FtpFindFirstFile = "FtpFindFirstFileW"
     14Const _FuncName_InternetFindNextFile = "InternetFindNextFileW"
     15#else
     16Const _FuncName_InternetOpen = "InternetOpenA"
     17Const _FuncName_InternetConnect = "InternetConnectA"
     18Const _FuncName_FtpGetFile = "FtpGetFileA"
     19Const _FuncName_FtpGetCurrentDirectory = "FtpGetCurrentDirectoryA"
     20Const _FuncName_FtpSetCurrentDirectory = "FtpSetCurrentDirectoryA"
     21Const _FuncName_FtpFindFirstFile = "FtpFindFirstFileA"
     22Const _FuncName_InternetFindNextFile = "InternetFindNextFileA"
     23#endif
    724
    825TypeDef HINTERNET = VoidPtr
     
    2441Const INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY = 4   'prevent using java/script/INS
    2542
    26 Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" (
    27     lpszAgent As LPCSTR,
     43Declare Function InternetOpen Lib "wininet.dll" Alias _FuncName_InternetOpen (
     44    lpszAgent As LPCTSTR,
    2845    dwAccessType As DWord,
    29     lpszProxy As LPCSTR,
    30     lpszProxyBypass As LPCSTR,
     46    lpszProxy As LPCTSTR,
     47    lpszProxyBypass As LPCTSTR,
    3148    dwFlags As DWord) As HINTERNET
    3249
     
    4461Const INTERNET_DEFAULT_SOCKS_PORT    = 1080        'default for SOCKS firewall servers.
    4562
    46 Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" (
     63Declare Function InternetConnect Lib "wininet.dll" Alias _FuncName_InternetConnect (
    4764    hInternet As HINTERNET,
    48     lpszServerName As LPCSTR,
     65    lpszServerName As LPCTSTR,
    4966    nServerPort As INTERNET_PORT,
    50     lpszUserName As LPCSTR,
    51     lpszPassword As LPCSTR,
     67    lpszUserName As LPCTSTR,
     68    lpszPassword As LPCTSTR,
    5269    dwService As DWord,
    5370    dwFlags As DWord,
     
    6279'----------------
    6380
    64 Declare Function FtpGetFile Lib "wininet.dll" Alias "FtpGetFileA" (
     81Declare Function FtpGetFile Lib "wininet.dll" Alias _FuncName_FtpGetFile (
    6582    hConnect As HINTERNET,
    66     lpszRemoteFile As LPCSTR,
    67     lpszNewFile As LPCSTR,
     83    lpszRemoteFile As LPCTSTR,
     84    lpszNewFile As LPCTSTR,
    6885    fFailIfExists As BOOL,
    6986    dwFlagsAndAttributes As DWord,
     
    7188    dwContext As DWORD_PTR) As BOOL
    7289
    73 Declare Function FtpGetCurrentDirectory Lib "wininet.dll" Alias "FtpGetCurrentDirectoryA" (
     90Declare Function FtpGetCurrentDirectory Lib "wininet.dll" Alias _FuncName_FtpGetCurrentDirectory (
    7491    hConnect As HINTERNET,
    75     lpszCurrentDirectory As LPSTR,
     92    lpszCurrentDirectory As LPTSTR,
    7693    lpdwCurrentDirectory As DWord) As BOOL
    7794
    78 Declare Function FtpSetCurrentDirectory Lib "wininet.dll" Alias "FtpSetCurrentDirectoryA" (
     95Declare Function FtpSetCurrentDirectory Lib "wininet.dll" Alias _FuncName_FtpSetCurrentDirectory (
    7996    hConnect As HINTERNET,
    80     lpszDirectory As LPCSTR) As BOOL
     97    lpszDirectory As LPCTSTR) As BOOL
    8198
    82 Declare Function FtpFindFirstFile Lib "wininet.dll" Alias "FtpFindFirstFileA" (
     99Declare Function FtpFindFirstFile Lib "wininet.dll" Alias _FuncName_FtpFindFirstFile (
    83100    hConnect As HINTERNET,
    84     lpszSearchFile As LPCSTR,
    85     lpFindFileData As LPWIN32_FIND_DATA,
     101    lpszSearchFile As LPCTSTR,
     102    ByRef FindFileData As WIN32_FIND_DATA,
    86103    dwFlags As DWord,
    87104    dwContext As DWORD_PTR) As HINTERNET
    88105
    89 Declare Function InternetFindNextFile Lib "wininet.dll" Alias "InternetFindNextFileA" (
     106Declare Function InternetFindNextFile Lib "wininet.dll" Alias _FuncName_InternetFindNextFile (
    90107    hFind As HINTERNET,
    91     lpvFindData As VoidPtr) As BOOL
     108    ByREf vFindData As Any) As BOOL
    92109
    93110
  • Include/api_winspool.sbp

    r1 r141  
    55#define _INC_WINSPOOL
    66
     7#ifdef UNICODE
     8Const _FuncName_EnumPrinters = "EnumPrintersW"
     9#else
     10Const _FuncName_EnumPrinters = "EnumPrintersA"
     11#endif
    712
    8 Type PRINTER_INFO_5
     13Type PRINTER_INFO_5W
     14    pPrinterName As LPWSTR
     15    pPortName As LPWSTR
     16    Attributes As DWord
     17    DeviceNotSelectedTimeout As DWord
     18    TransmissionRetryTimeout As DWord
     19End Type
     20
     21Type PRINTER_INFO_5A
    922    pPrinterName As LPSTR
    1023    pPortName As LPSTR
     
    1427End Type
    1528
     29#ifdef UNICODE
     30TypeDef PRINTER_INFO_5 = PRINTER_INFO_5W
     31#else
     32TypeDef PRINTER_INFO_5 = PRINTER_INFO_5A
     33#endif
    1634
    17 Declare Function EnumPrinters Lib "winspool.drv" Alias "EnumPrintersA" (Flags As DWord, Name As LPSTR, Level As DWord, pPrinterEnum As *Byte, cbBuf As DWord, ByRef rer_cbNeeded As DWord, ByRef ref_cReturned As DWord) As BOOL
     35Declare Function EnumPrinters Lib "winspool.drv" Alias _FuncName_EnumPrinters (Flags As DWord, Name As LPTSTR, Level As DWord, pPrinterEnum As *Byte, cbBuf As DWord, ByRef cbNeeded As DWord, ByRef cReturned As DWord) As BOOL
    1836
    1937Const PRINTER_ENUM_DEFAULT     = &H00000001
Note: See TracChangeset for help on using the changeset viewer.