This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'--- mdSha2.bas | |
Option Explicit | |
DefObj A-Z | |
#Const HasSha512 = (CRYPT_HAS_SHA512 <> 0) | |
#Const HasPtrSafe = (VBA7 <> 0) | |
#Const HasOperators = (TWINBASIC <> 0) | |
#If HasPtrSafe Then | |
Private Declare PtrSafe Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As LongPtr) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'--- mdArgon2.bas | |
Option Explicit | |
DefObj A-Z | |
#Const HasPtrSafe = (VBA7 <> 0) | |
#Const HasOperators = (TWINBASIC <> 0) | |
#Const DebugMode = False | |
#If HasPtrSafe Then | |
Private Declare PtrSafe Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As LongPtr) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Attribute VB_Name = "fnc_CopyToClipWinApi" | |
Option Explicit | |
#If VBA7 Then | |
Private Declare PtrSafe Function OpenClipboard Lib "User32" (ByVal hWnd As LongPtr) As LongPtr | |
Private Declare PtrSafe Function EmptyClipboard Lib "User32" () As LongPtr | |
Private Declare PtrSafe Function CloseClipboard Lib "User32" () As LongPtr | |
Private Declare PtrSafe Function IsClipboardFormatAvailable Lib "User32" (ByVal wFormat As LongPtr) As LongPtr | |
Private Declare PtrSafe Function GetClipboardData Lib "User32" (ByVal wFormat As LongPtr) As LongPtr | |
Private Declare PtrSafe Function SetClipboardData Lib "User32" (ByVal wFormat As LongPtr, ByVal hMem As LongPtr) As LongPtr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Attribute VB_Name = "fnc_CopyToClipRunCmd" | |
' namespace=\ | |
' filename=fnc_CopyToClipRunCmd.bas | |
Option Explicit | |
'' ! This WinAPI solution doesn't work see notes at EOF | |
Private Declare PtrSafe Function OpenClipboard Lib "user32.dll" (ByVal hWnd As LongPtr) As LongPtr | |
Private Declare PtrSafe Function EmptyClipboard Lib "user32.dll" () As LongPtr | |
Private Declare PtrSafe Function CloseClipboard Lib "user32.dll" () As LongPtr | |
Private Declare PtrSafe Function IsClipboardFormatAvailable Lib "user32.dll" (ByVal wFormat As LongPtr) As LongPtr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Sub SaveAsUTF8CSV() | |
'============================== | |
' 使用しているデータ範囲の取得 | |
'============================== | |
Dim maxRow As Long | |
Dim maxCol As Long |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
DefObj A-Z | |
'--- for VirtualProtect | |
Private Const PAGE_EXECUTE_READWRITE As Long = &H40 | |
Private Const MEM_COMMIT As Long = &H1000 | |
'--- for CryptStringToBinary | |
Private Const CRYPT_STRING_BASE64 As Long = 1 | |
'--- for gdi+ | |
Private Const ImageLockModeRead As Long = &H1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
DefObj A-Z | |
'--- for VirtualProtect | |
Private Const PAGE_EXECUTE_READWRITE As Long = &H40 | |
Private Const MEM_COMMIT As Long = &H1000 | |
'--- for CryptStringToBinary | |
Private Const CRYPT_STRING_BASE64 As Long = 1 | |
'--- for GdipBitmapLockBits | |
Private Const ImageLockModeRead As Long = &H1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
#Const HasPtrSafe = (VBA7 <> 0) | |
#Const LargeAddressAware = (Win64 = 0 And VBA7 = 0 And VBA6 = 0 And VBA5 = 0) | |
'--- for CopyMemory | |
#If HasPtrSafe Then | |
Private Const NULL_PTR As LongPtr = 0 | |
#Else | |
Private Const NULL_PTR As Long = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
DefObj A-Z | |
Private Const MODULE_NAME As String = "mdJson" | |
#Const ImplScripting = JSON_USE_SCRIPTING <> 0 | |
#Const ImplUseShared = DebugMode <> 0 | |
#Const HasPtrSafe = (VBA7 <> 0) | |
#Const LargeAddressAware = (Win64 = 0 And VBA7 = 0 And VBA6 = 0 And VBA5 = 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Private Function pvPostFile(sUrl As String, sJSON As String, sFileName As String, Optional ByVal bAsync As Boolean) As String | |
Const STR_BOUNDARY As String = "864d391d-4097-44e0-92e1-71aff17094c1" | |
Dim nFile As Integer | |
Dim baBuffer() As Byte | |
Dim sPostData As String | |
'--- read file | |
nFile = FreeFile |