Intercepting resetting of vba editor as well as unhandled errors for safe subclassing

Jaafar Tribak

Well-known Member
Joined
Dec 5, 2002
Messages
9,806
Office Version
  1. 2016
Platform
  1. Windows
Hi all,

As you know, excel doesn't expose many useful events such as when activating excel or when moving or resizing its main window etc...

The way to catch these missing events is through subclassing or hooking excel. Both techniques work in compiled programs but they freeze office applications or make them unstable at best.

Probably the main issue with subclassing is when the vb editor is inadvertently reset or when an unhadled error occurs while excel is subclassed .When that happens the whole application crashes.

In an attempt to deal with the freezing and crashings issues, I have written this C++ dll (about 14 kb) which gracefully removes the subclassing right before the vbe is reset due to clicking on the vbe stopt button or due to an unhaded error.

The dll is not an activeX dll so it doesn't need registration before using it.

Also, in order to maintain the dll code self-contained with the workbook, I have extracted the dll file bytes and place them in seperate vba module so it can be rebuilt on the fly at runtime (kind of a resource).

Drawbacks I am aware of:
*When first loading the dll the vbe is reset behind the scenes. This will reset any already initialised variables and may cause the loss of data. So the recommendation is to install the subclassing at the start of the program.

*The only error that the dll is unable to catch is inside the window procedure so careful error handling is required there.


C++ dll code:
Code:
#include <windows.h>#define DLL_EXPORTS

BOOL bSub = NULL;
BOOL bUnsub = NULL;
BOOL bVBEreset = NULL;
BOOL bClosing = NULL;
BOOL bVBEvisible = NULL;
HWND lwkbHwnd = NULL;
HWND lVBEhwnd = NULL;
HWND lXLhwnd = NULL;
LONG lVBACallback = NULL;
LONG_PTR lOldProc = NULL;
LONG_PTR lOldProcWkb = NULL;
LONG_PTR lOldProcVBE = NULL;
HHOOK hookHandle = NULL;

extern "C" __declspec(dllexport) void SubClass(HWND, HWND, LONG);
extern "C" __declspec(dllexport) void UnSubClass(HWND);
void CALLBACK TimerProc(HWND, UINT, UINT, DWORD);
void CALLBACK TimerProc2(HWND, UINT, UINT, DWORD);
LRESULT CALLBACK WinProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK WinProcWkb(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK WinProcVBE(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK CBTProc(int, WPARAM, LPARAM);
void SetCBTHook();
void RemoveCBTHook();

extern "C" __declspec(dllexport) void SubClass(HWND hwnd, HWND wkbHwnd, LONG CallBackFunc)
    {
        if (bSub == FALSE) {
            bSub = TRUE;
            bUnsub = FALSE;
            bClosing = FALSE;
            bVBEreset = FALSE;
            lVBACallback = CallBackFunc;
            lXLhwnd = hwnd;
            lwkbHwnd = wkbHwnd;
            lVBEhwnd = FindWindow(L"wndclass_desked_gsk", 0);
            SetCBTHook();
            if (lVBEhwnd == 0) {
                SetForegroundWindow(lXLhwnd);
                keybd_event(VK_MENU, 0, 0, 0);
                keybd_event(VK_F11, 1, 0, 0);
                keybd_event(VK_F11, 0, KEYEVENTF_KEYUP, 0);
                keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0);
            }else {

                if (GetProp(lVBEhwnd,L"MsgPosted")==0){
                    bVBEvisible=IsWindowVisible(lVBEhwnd);
                    PostMessage(lVBEhwnd, WM_USER + 0xC44, 0x30, 0);
                    PostMessage(lVBEhwnd, WM_USER + 0xC44, 0x33, 0);
                    PostMessage(lVBEhwnd, WM_USER + 0xC44, 0x83, 0);
                    SetProp(lVBEhwnd, L"MsgPosted", HWND(1));
                    if (!bVBEvisible){
                        SetTimer(HWND(lVBEhwnd), 0, 0, (TIMERPROC)&TimerProc2);
                    }
                }
            }
            SetTimer(hwnd, 0, 0, (TIMERPROC)&TimerProc);
        }
    }

extern "C" __declspec(dllexport) void UnSubClass(HWND hwnd)
    {
        if (bUnsub == FALSE) {
            bSub = FALSE;
            bUnsub = TRUE;
            RemoveCBTHook();
            SetWindowLongPtr(lwkbHwnd, -4, lOldProcWkb);
            SetWindowLongPtr(lVBEhwnd, -4, lOldProcVBE);
            SetWindowLongPtr(lXLhwnd, -4, lOldProc);
            if ((!bClosing)&&(bVBEreset)){
                bVBEreset = FALSE;
                MessageBox(lXLhwnd, TEXT("The VBE was reset.") TEXT("\n") TEXT("Excel has been safely Un-Subclassed."), \
                    TEXT("Oops !!"), 0x00000040 + 0x00001000);
            }
        }
    }

void CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT timerId, DWORD dwTime)
    {
        KillTimer(lXLhwnd, 0);
        bSub = TRUE;
        bUnsub = FALSE;
        lOldProcWkb = (LONG_PTR)SetWindowLongPtr(lwkbHwnd, -4, (LONG_PTR)&WinProcWkb);
        lOldProc = (LONG_PTR)SetWindowLongPtr(lXLhwnd, -4, (LONG_PTR)&WinProc);
        lOldProcVBE = (LONG_PTR)SetWindowLongPtr(lVBEhwnd, -4, (LONG_PTR)&WinProcVBE);
    }

LRESULT CALLBACK WinProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
    {
        if (uMsg == WM_SYSCOMMAND) {
            if (wParam == SC_CLOSE) {
                bUnsub = FALSE;
                bClosing = TRUE;
                UnSubClass(lXLhwnd);
            }
        }
        LRESULT Ret = CallWindowProc((WNDPROC)lVBACallback, hwnd, uMsg, wParam, lParam);
        if (Ret == -1) {
            return Ret; /*abort message*/
        }
        return  CallWindowProc((WNDPROC)lOldProc, hwnd, uMsg, wParam, lParam);
    }

LRESULT CALLBACK WinProcWkb(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
    {
        if (uMsg == WM_SYSCOMMAND) {
            if (wParam == SC_CLOSE) {
                bUnsub = FALSE;
                bClosing = TRUE;
                RemoveProp(lVBEhwnd, L"MsgPosted");
                UnSubClass(lXLhwnd);
            }
        }
    return  CallWindowProc((WNDPROC)lOldProcWkb, hwnd, uMsg, wParam, lParam);
    }

LRESULT CALLBACK WinProcVBE(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
    {

        if (uMsg == WM_SETTEXT) {  /*The VBE was reset other by the user or than by an error !!*/
            bUnsub = FALSE;
            bVBEreset = TRUE;
            UnSubClass(lXLhwnd);
            SetActiveWindow(lVBEhwnd);
        }
        return  (LRESULT)CallWindowProc((WNDPROC)lOldProcVBE, hwnd, uMsg, wParam, lParam);
    }

LRESULT CALLBACK CBTProc(int nCode, WPARAM wParam, LPARAM lParam)
    {
        WCHAR className[MAX_PATH];
        if (nCode == HCBT_CREATEWND) {
            GetClassName(HWND(wParam), className, MAX_PATH);
            if (0 == lstrcmp(className, TEXT("wndclass_desked_gsk"))) {
                if (GetProp(lVBEhwnd, L"MsgPosted") == 0) {
                            SendMessage(HWND(wParam), WM_SETREDRAW, 0 , 0);
                            PostMessage(HWND(wParam), WM_USER + 0xC44, 0x30, 0);
                            PostMessage(HWND(wParam), WM_USER + 0xC44, 0x33, 0);
                            PostMessage(HWND(wParam), WM_USER + 0xC44, 0x83, 0);
                            SendMessage(HWND(wParam), WM_SETREDRAW, 1, 0);
                            lVBEhwnd = HWND(wParam);
                            SetProp(lVBEhwnd, L"MsgPosted", HWND(1));
                            SetTimer(HWND(wParam), 0, 0, (TIMERPROC)&TimerProc2);
                }
            }

        }

        if (nCode == HCBT_ACTIVATE) { /*Check if a VBA runtime or compile error occurred.*/
            GetClassName(HWND(wParam), className, MAX_PATH);
            if (0 == lstrcmp(className, TEXT("#32770"))) {
                CHAR buffer[MAX_PATH] = { 0 };
                GetWindowTextA(HWND(wParam), buffer, MAX_PATH);
                if (strncmp(buffer, "Microsoft Visual Basic", 22) == 0) {
                     HWND staticHwnd = 0;
                     staticHwnd  = GetDlgItem(HWND(wParam), 0x00000000000012C3); /*Error Static Control*/
                     GetWindowTextA(staticHwnd, buffer, MAX_PATH);\
                        /* English language office*/
                     if ((strncmp(buffer, "Run-time error", 14) == 0) || (strncmp(buffer, "Compile Error:", 14) == 0) ||\
                        /* French language office*/
                         (strncmp(buffer, "Erreur d'exécution", 18) == 0) || (strncmp(buffer, "Erreur de compilation:", 22) == 0) ||\
                        /* Spanish office*/
                         (strncmp(buffer, "Se ha producido el error", 24) == 0) || (strncmp(buffer, "Error de compilación:", 21) == 0)){
                         bUnsub = FALSE;
                         bVBEreset = TRUE;
                         UnSubClass(lXLhwnd);
                         SetActiveWindow(lVBEhwnd);
                     }
                }
            }
    }

    return CallNextHookEx(hookHandle, nCode, wParam, lParam);
}

void SetCBTHook()
    {
        HMODULE hInstance = NULL;
        hInstance = GetModuleHandle(L"XlSubClass.dll");
        hookHandle = SetWindowsHookEx(WH_CBT, (HOOKPROC)CBTProc, hInstance, 0);
    }

void RemoveCBTHook()
    {
        { UnhookWindowsHookEx(hookHandle); }
    }

void CALLBACK TimerProc2(HWND hwnd, UINT uMsg, UINT timerId, DWORD dwTime)
    {
        KillTimer(lVBEhwnd, 0);
        ShowWindow(lVBEhwnd, 0);
    }
</windows.h>
 
Re: Intercepting resetting of vba editor as well as unhadled errors for safe subclassing

Thanks for following this up ..

I think it might be required to add an entry in the registry at some point to have this working fully automated
I wouldn't mess with the registry .. The ideal method would be to load the dll directly from memory without having to crerate a temporary file on disk .. however loading the dll from memory requires some serious coding that is beyond me .
 
Upvote 0

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Jaafar, I would have a request for you: could you modify the DLL so that any window could be subclassed safely ? As is, it is XLMAIN (Application.Hwnd) that is subclassed with bas_WinProc.WinProc

I tried modifiying bas_Main.SubClassExcel to subclass EXCEL7 in order to catch WM_MOUSEMOVE and WM_MOUSEWHEEL, it works, but Excel crashes when hitting the Remove button to unsubclass

Plus, let's say I need to subclass 2 windows at the same time to catch specific messages for each: would it works if I used a class module to hold WinProc and 2 instances of that class ?
 
Upvote 0
Jaafar, I would have a request for you: could you modify the DLL so that any window could be subclassed safely ? As is, it is XLMAIN (Application.Hwnd) that is subclassed with bas_WinProc.WinProc

I tried modifiying bas_Main.SubClassExcel to subclass EXCEL7 in order to catch WM_MOUSEMOVE and WM_MOUSEWHEEL, it works, but Excel crashes when hitting the Remove button to unsubclass

Plus, let's say I need to subclass 2 windows at the same time to catch specific messages for each: would it works if I used a class module to hold WinProc and 2 instances of that class ?

I'll try to amend the dll code and see if I can make it work with any window ..If I come up with something, I'll post here.

Plus, let's say I need to subclass 2 windows at the same time to catch specific messages for each: would it works if I used a class module to hold WinProc and 2 instances of that class ?

One cannot have a window procedure in a class module plus one cannot load more than one instance of a dll in the same process... I guess one could in theory save two copies of the same dll each witha different file name ,load them into excel and pass the respective handles of the windows that we want to subclass but that sounds rather messy
 
Upvote 0
One cannot have a window procedure in a class module plus one cannot load more than one instance of a dll in the same process... I guess one could in theory save two copies of the same dll each witha different file name ,load them into excel and pass the respective handles of the windows that we want to subclass but that sounds rather messy

OK. So let's say I use a standard bas module to hold the WinProc.

Maybe I am completely wrong, so please correct me, but here is what I understand :

how DLL works:

1) the original Application-defined WindowProc is changed and redirected to the DLL WinProc by changing the GWL_WNDPROC pointer with SetWindowLong,
2) the DLL WinProc receives the Window Messages and then makes callback to the actual VBA WinProc,
3) the DLL WinProc finally makes a callback to the original DefWindowProc to provide default processing of the Messages (if the VBA WinProc does not return -1)

So I would expect to use something like this to subclass 2 different windows, :

Code:
SetXLSubClass pProcAddr, subclassHwnd1, CLng(wbkHwnd), AddressOf WinProc, 0
SetXLSubClass pProcAddr, subclassHwnd2, CLng(wbkHwnd), AddressOf WinProc, 0

or even :

Code:
SetXLSubClass pProcAddr, subclassHwnd1, CLng(wbkHwnd), AddressOf WinProc_1, 0
SetXLSubClass pProcAddr, subclassHwnd2, CLng(wbkHwnd), AddressOf WinProc_2, 0

Now, ** as is **, it does not work, of course. I found that the single VBA WinProc callback I used only catches Messages for the first window identified by subclassHwnd1

I understand that ** as is **, 2 instances of the DLL are required to subclass 2 different windows since the code does not allow to hold enough information (more precisely lVBACallback and lOldProc would need to be doubled, and the if/else statement based on the bSub boolean at the beginning of the DLL SubClass function prevents from subclassing another window).

But, if the code is modified a bit, it would be possible with a single instance of the DLL right ? It would (--just--) require to replace the Long variables with 3 arrays: lVBACallback(), lOldProc() and lSubClassHwnd() and have the DLL WinProc point to the correct lVBACallback depending on the passed hwnd parameter, then finally make the callback to the proper original WindowProc (if -1, again)!

Am I correct Jaafar ?

If so, I can't promise anything, but I will try adapting your solution :) I am a newbie with C++ !
 
Upvote 0
it seems it is, take a look here: https://foro.elhacker.net/programac...ion_dentro_de_un_form_o_class-t326036.20.html

for now I cannot make it work and I absolutely don't understand it :(

I am aware of similar code which I have successfully used before for putting the callback of the SetTimer API inside a Class module.
Unfortunately, the code borrows some obscure memory asm stuff that I don't quite understand so when I tried updating it in order to work for 64bit windows it gave me nice crash.
 
Upvote 0
OK. So let's say I use a standard bas module to hold the WinProc.

Maybe I am completely wrong, so please correct me, but here is what I understand :

how DLL works:

1) the original Application-defined WindowProc is changed and redirected to the DLL WinProc by changing the GWL_WNDPROC pointer with SetWindowLong,
2) the DLL WinProc receives the Window Messages and then makes callback to the actual VBA WinProc,
3) the DLL WinProc finally makes a callback to the original DefWindowProc to provide default processing of the Messages (if the VBA WinProc does not return -1)

So I would expect to use something like this to subclass 2 different windows, :

Code:
SetXLSubClass pProcAddr, subclassHwnd1, CLng(wbkHwnd), AddressOf WinProc, 0
SetXLSubClass pProcAddr, subclassHwnd2, CLng(wbkHwnd), AddressOf WinProc, 0

or even :

Code:
SetXLSubClass pProcAddr, subclassHwnd1, CLng(wbkHwnd), AddressOf WinProc_1, 0
SetXLSubClass pProcAddr, subclassHwnd2, CLng(wbkHwnd), AddressOf WinProc_2, 0

Now, ** as is **, it does not work, of course. I found that the single VBA WinProc callback I used only catches Messages for the first window identified by subclassHwnd1

I understand that ** as is **, 2 instances of the DLL are required to subclass 2 different windows since the code does not allow to hold enough information (more precisely lVBACallback and lOldProc would need to be doubled, and the if/else statement based on the bSub boolean at the beginning of the DLL SubClass function prevents from subclassing another window).

But, if the code is modified a bit, it would be possible with a single instance of the DLL right ? It would (--just--) require to replace the Long variables with 3 arrays: lVBACallback(), lOldProc() and lSubClassHwnd() and have the DLL WinProc point to the correct lVBACallback depending on the passed hwnd parameter, then finally make the callback to the proper original WindowProc (if -1, again)!

Am I correct Jaafar ?

If so, I can't promise anything, but I will try adapting your solution :) I am a newbie with C++ !

Hi hymced,

Just got around to modifying the DLL so that any window could be subclassed as well as more than one window simultaneously as per your requested.

Not sure how stable the code is when subclassing more than one window.. I tested the code in Win10 64bit Excel 2010 64 bit and worked well.

C++ Dll cpp code:
Code:
#include <windows.h>#define DLL_EXPORTS

BOOL bEXCEL_CLOSING = NULL;
BOOL bVBEvisible = NULL;
HHOOK hookHandle = NULL;
HWND lVBEhwnd = NULL;
HWND lXLhwnd = NULL;
HWND lwkbHwnd = NULL;
HWND lSUBCLASSEDHwnd = NULL;
LONG lVBACallback = NULL;
LONG_PTR lOldProcVBE = NULL;
//LONG_PTR lOdl;
//LONG_PTR VBACALLBACKPROC;
LONG_PTR *oldProcArray = new LONG_PTR[10];
HWND *SubClassedHwndArray = new HWND[10];
LONG_PTR *VBACALLBACKPROCArray = new LONG_PTR[10];
int ArraySize = 0;
extern "C" __declspec(dllexport) void SubClass(HWND, LONG, HWND);
extern "C" __declspec(dllexport) void UnSubClass(HWND);
void CALLBACK TimerProc(HWND, UINT, UINT, DWORD);
void CALLBACK TimerProc2(HWND, UINT, UINT, DWORD);
LRESULT CALLBACK WinProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK WinProcVBE(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK CBTProc(int, WPARAM, LPARAM);
BOOL CALLBACK EnumThreadWndProc(HWND, LPARAM);
void SetCBTHook();
void RemoveCBTHook();
void RemoveVBEsubclass();
void UnSubclassALL();

extern "C" __declspec(dllexport) void SubClass(HWND hwnd, LONG CallBackFunc, HWND wkbHwnd)
{
        EnumThreadWindows(GetCurrentThreadId(), EnumThreadWndProc, 0);
        lVBACallback = CallBackFunc;
        lwkbHwnd = wkbHwnd;
        lSUBCLASSEDHwnd = hwnd;
        lVBEhwnd = FindWindow(L"wndclass_desked_gsk", 0);

        if (lVBEhwnd == 0) {
            SetForegroundWindow(lXLhwnd);
            keybd_event(VK_MENU, 0, 0, 0);
            keybd_event(VK_F11, 1, 0, 0);
            keybd_event(VK_F11, 0, KEYEVENTF_KEYUP, 0);
            keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0);
        }
        else {
            if (GetProp(lVBEhwnd, L"MsgPosted") == 0) {
                bVBEvisible = IsWindowVisible(lVBEhwnd);
                PostMessage(lVBEhwnd, WM_USER + 0xC44, 0x30, 0);
                PostMessage(lVBEhwnd, WM_USER + 0xC44, 0x33, 0);
                PostMessage(lVBEhwnd, WM_USER + 0xC44, 0x83, 0);
                SetProp(lVBEhwnd, L"MsgPosted", HANDLE(1));
                if (!bVBEvisible) {
                    SendMessage (HWND(lVBEhwnd), WM_SETREDRAW, 0, 0);
                    SetTimer(HWND(lVBEhwnd), 0, 0, (TIMERPROC)&TimerProc2);
                }
            }
        }
        
        if (GetProp(hwnd, L"HwndIsSubClassed") == 0) {
        UnSubClass(hwnd);
        RemoveCBTHook();
        SetCBTHook();
        KillTimer(lXLhwnd, 0);
        SetTimer(lXLhwnd, 0, 0, (TIMERPROC)&TimerProc);
    }

}

extern "C" __declspec(dllexport) void UnSubClass(HWND hwnd)

{
    for (int ArraySize = 0; ArraySize<10; ArraySize++) {
        if (hwnd == SubClassedHwndArray[ArraySize]) {
            SetProp(hwnd, L"HwndIsSubClassed", HANDLE(0));
            SetWindowLongPtr(hwnd, -4, oldProcArray[ArraySize]);
        }
    }
}

void CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT timerId, DWORD dwTime)
{
    LONG_PTR lOldProc = NULL;
    KillTimer(lXLhwnd, 0);

    if(GetProp(lVBEhwnd, L"VBESUBCLASSED")==0) {
        SetProp(lVBEhwnd, L"VBESUBCLASSED", HANDLE(1));
        lOldProcVBE = (LONG_PTR)SetWindowLongPtr(lVBEhwnd, -4, (LONG_PTR)&WinProcVBE);
    }
        SetProp(lSUBCLASSEDHwnd, L"HwndIsSubClassed", HANDLE(1));
        lOldProc = (LONG_PTR)SetWindowLongPtr(lSUBCLASSEDHwnd, -4, (LONG_PTR)&WinProc);
        oldProcArray[ArraySize] = lOldProc;
        SubClassedHwndArray[ArraySize] = lSUBCLASSEDHwnd;
        VBACALLBACKPROCArray[ArraySize] = lVBACallback;
        ArraySize = ArraySize + 1;
}

LRESULT CALLBACK WinProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    LONG_PTR lOdl;
    LONG_PTR VBACALLBACKPROC;

    for (int ArraySize = 0; ArraySize<10; ArraySize++) {
        if (hwnd == SubClassedHwndArray[ArraySize]) {
            lOdl = oldProcArray[ArraySize];
            VBACALLBACKPROC = VBACALLBACKPROCArray[ArraySize];
            break;
        }
    }

    LRESULT Ret = CallWindowProc((WNDPROC)VBACALLBACKPROC, hwnd, uMsg, wParam, lParam);

    if (Ret == -1) {
        return Ret; /*abort message*/
    }

    return  CallWindowProc((WNDPROC)lOdl, hwnd, uMsg, wParam, lParam);
}

LRESULT CALLBACK WinProcVBE(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    if (uMsg == WM_SETTEXT) {  /*The VBE was reset other by the user or than by an error !!*/

        bEXCEL_CLOSING = TRUE;
        UnSubclassALL();
        RemoveVBEsubclass();
        RemoveCBTHook();
        SetActiveWindow(lVBEhwnd);
    }
    return  (LRESULT)CallWindowProc((WNDPROC)lOldProcVBE, hwnd, uMsg, wParam, lParam);
}

LRESULT CALLBACK CBTProc(int nCode, WPARAM wParam, LPARAM lParam)
{
    WCHAR className[MAX_PATH];
    if (nCode == HCBT_CREATEWND) {
        GetClassName(HWND(wParam), className, MAX_PATH);
        if (0 == lstrcmp(className, TEXT("wndclass_desked_gsk"))) {
            if (GetProp(lVBEhwnd, L"MsgPosted") == 0) {
                SendMessage(HWND(wParam), WM_SETREDRAW, 0, 0);
                PostMessage(HWND(wParam), WM_USER + 0xC44, 0x30, 0);
                PostMessage(HWND(wParam), WM_USER + 0xC44, 0x33, 0);
                PostMessage(HWND(wParam), WM_USER + 0xC44, 0x83, 0);
                SendMessage(HWND(wParam), WM_SETREDRAW, 1, 0);
                lVBEhwnd = HWND(wParam);
                SetProp(lVBEhwnd, L"MsgPosted", HANDLE(1));
                SetTimer(HWND(wParam), 0, 0, (TIMERPROC)&TimerProc2);
            }
        }
    }
    
    if (nCode == HCBT_ACTIVATE) { /*Check if a VBA runtime or compile error occurred.*/
        GetClassName(HWND(wParam), className, MAX_PATH);
        if (0 == lstrcmp(className, TEXT("#32770"))) {
            CHAR buffer[MAX_PATH] = { 0 };
            GetWindowTextA(HWND(wParam), buffer, MAX_PATH);
            if (strncmp(buffer, "Microsoft Visual Basic", 22) == 0) {
                HWND staticHwnd = 0;
                staticHwnd = GetDlgItem(HWND(wParam), 0x00000000000012C3); /*Error Static Control*/
                GetWindowTextA(staticHwnd, buffer, MAX_PATH); \
                    /* English language office*/
                    if ((strncmp(buffer, "Run-time error", 14) == 0) || (strncmp(buffer, "Compile Error:", 14) == 0) || \
                        /* French language office*/
                        (strncmp(buffer, "Erreur d'exécution", 18) == 0) || (strncmp(buffer, "Erreur de compilation:", 22) == 0) || \
                        /* Spanish office*/
                        (strncmp(buffer, "Se ha producido el error", 24) == 0) || (strncmp(buffer, "Error de compilación:", 21) == 0)) {
                        UnSubclassALL();
                        RemoveVBEsubclass();
                        RemoveCBTHook();
                        SetActiveWindow(lVBEhwnd);
                    }
            }
        }
    }
    
    if (nCode == HCBT_SYSCOMMAND) {
        if (int(wParam) == SC_CLOSE) {
            if ((GetForegroundWindow() == lXLhwnd) || (GetForegroundWindow() == lwkbHwnd)) {
                RemoveVBEsubclass();
                UnSubclassALL();
                RemoveCBTHook();
            }
        }
    }
    return CallNextHookEx(hookHandle, nCode, wParam, lParam);
}

void UnSubclassALL()
{
    for (int ArraySize = 0; ArraySize<10; ArraySize++) {
        SetWindowLongPtr(SubClassedHwndArray[ArraySize], -4, oldProcArray[ArraySize]);
        SetProp(SubClassedHwndArray[ArraySize], L"HwndIsSubClassed", HANDLE(0));
    }

    if (bEXCEL_CLOSING==TRUE) {
        SetProp(lVBEhwnd, L"MsgPosted", HANDLE(0));
    }
    SetProp(lVBEhwnd, L"VBESUBCLASSED", HANDLE(0));
    KillTimer(lXLhwnd, 0);
}

void RemoveVBEsubclass()
{
    SetWindowLongPtr(lVBEhwnd, -4, lOldProcVBE);
    SetProp(lVBEhwnd, L"VBESUBCLASSED", HANDLE(0));
    ArraySize = 0;
}

void SetCBTHook()
{
    HMODULE hInstance = NULL;
    hInstance = GetModuleHandle(L"XlSubClass.dll");
    hookHandle = SetWindowsHookEx(WH_CBT, (HOOKPROC)CBTProc, hInstance, 0);
}

void RemoveCBTHook()
{
    { UnhookWindowsHookEx(hookHandle); }
}

void CALLBACK TimerProc2(HWND hwnd, UINT uMsg, UINT timerId, DWORD dwTime)
{
    KillTimer(lVBEhwnd, 0);
    SendMessage(HWND(lVBEhwnd), WM_SETREDRAW, 1, 0);
    ShowWindow(lVBEhwnd, 0);
}

BOOL CALLBACK EnumThreadWndProc(HWND hwnd, LPARAM lParam)
{
    WCHAR className[MAX_PATH];
    GetClassName(hwnd, className, MAX_PATH);
    if (0 == lstrcmp(className, TEXT("XLMAIN"))) {
        lXLhwnd = hwnd;
        return FALSE;
    }
    return TRUE;
}

I'll post the VBA code and a workbook example in a bit.

</windows.h>
 
Last edited:
Upvote 0
Ok- Here is the code for excel 64Bit .. I'll post the 32Bit version afterwards.

Workbook demo.

1- Code In a Standard Module:

DllBytes + dll creation :
Code:
Option Explicit

Private Declare PtrSafe Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As LongPtr)

Private arr1() As Variant, arr2() As Variant, arr3() As Variant, arr4() As Variant, arr5() As Variant
Private arr6() As Variant, arr7() As Variant, arr8() As Variant, arr9() As Variant, arr10() As Variant
Private arr11() As Variant, arr12() As Variant, arr13() As Variant, arr14() As Variant, arr15() As Variant
Private arr16() As Variant, arr17() As Variant, arr18() As Variant, arr19() As Variant, arr20() As Variant
Private arr21() As Variant, arr22() As Variant, arr23() As Variant, arr24() As Variant, arr25() As Variant
Private arr26() As Variant, arr27() As Variant, arr28() As Variant, arr29() As Variant, arr30() As Variant
Private arr31() As Variant, arr32() As Variant, arr33() As Variant, arr34() As Variant, arr35() As Variant
Private arr36() As Variant, arr37() As Variant, arr38() As Variant, arr39() As Variant, arr40() As Variant
Private arr41() As Variant, arr42() As Variant, arr43() As Variant, arr44() As Variant, arr45() As Variant
Private arr46() As Variant, arr47() As Variant, arr48() As Variant, arr49() As Variant

Private lPos As Long
Private sDllPathName As String

Sub BuildDll(ByVal DllPathName As String)

    sDllPathName = DllPathName
    
    arr1 = Array(77, 90, 144, 0, 3, 0, 0, 0, 4, 0, 0, 0, 255, 255, 0, 0, _
    184, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, _
    14, 31, 186, 14, 0, 180, 9, 205, 33, 184, 1, 76, 205, 33, 84, 104, _
    105, 115, 32, 112, 114, 111, 103, 114, 97, 109, 32, 99, 97, 110, 110, 111, _
    116, 32, 98, 101, 32, 114, 117, 110, 32, 105, 110, 32, 68, 79, 83, 32, _
    109, 111, 100, 101, 46, 13, 13, 10, 36, 0, 0, 0, 0, 0, 0, 0, _
    62, 226, 246, 28, 122, 131, 152, 79, 122, 131, 152, 79, 122, 131, 152, 79, _
    115, 251, 11, 79, 124, 131, 152, 79, 233, 227, 153, 78, 120, 131, 152, 79, _
    233, 227, 155, 78, 120, 131, 152, 79, 233, 227, 157, 78, 106, 131, 152, 79, _
    233, 227, 156, 78, 112, 131, 152, 79, 23, 222, 153, 78, 127, 131, 152, 79, _
    122, 131, 153, 79, 68, 131, 152, 79, 193, 226, 145, 78, 123, 131, 152, 79, _
    193, 226, 152, 78, 123, 131, 152, 79, 193, 226, 103, 79, 123, 131, 152, 79, _
    193, 226, 154, 78, 123, 131, 152, 79, 82, 105, 99, 104, 122, 131, 152, 79, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    80, 69, 0, 0, 100, 134, 6, 0, 24, 133, 39, 90, 0, 0, 0, 0, _
    0, 0, 0, 0, 240, 0, 34, 32, 11, 2, 14, 10, 0, 28, 0, 0, _
    0, 38, 0, 0, 0, 0, 0, 0, 232, 29, 0, 0, 0, 16, 0, 0, _
    0, 0, 0, 128, 1, 0, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0)
    
    arr2 = Array(6, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, _
    0, 144, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 2, 0, 96, 1, _
    0, 0, 16, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, _
    0, 0, 16, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 16, 0, 0, 0, 128, 61, 0, 0, 96, 0, 0, 0, _
    224, 61, 0, 0, 140, 0, 0, 0, 0, 112, 0, 0, 224, 1, 0, 0, _
    0, 96, 0, 0, 172, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 128, 0, 0, 68, 0, 0, 0, 128, 52, 0, 0, 112, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 240, 52, 0, 0, 160, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 248, 1, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 46, 116, 101, 120, 116, 0, 0, 0, _
    179, 27, 0, 0, 0, 16, 0, 0, 0, 28, 0, 0, 0, 4, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 96, _
    46, 114, 100, 97, 116, 97, 0, 0, 70, 21, 0, 0, 0, 48, 0, 0, _
    0, 22, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 64, 0, 0, 64, 46, 100, 97, 116, 97, 0, 0, 0, _
    48, 7, 0, 0, 0, 80, 0, 0, 0, 2, 0, 0, 0, 54, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 192, _
    46, 112, 100, 97, 116, 97, 0, 0, 172, 2, 0, 0, 0, 96, 0, 0, _
    0, 4, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 64, 0, 0, 64, 46, 114, 115, 114, 99, 0, 0, 0, _
    224, 1, 0, 0, 0, 112, 0, 0, 0, 2, 0, 0, 0, 60, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 64)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr2) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr2(0)), 24 * (UBound(arr2) + 1)
    
    
    arr3 = Array(46, 114, 101, 108, 111, 99, 0, 0, 68, 0, 0, 0, 0, 128, 0, 0, _
    0, 2, 0, 0, 0, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 64, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    72, 131, 236, 40, 185, 80, 0, 0, 0, 232, 150, 10, 0, 0, 72, 137, _
    5, 11, 71, 0, 0, 72, 131, 196, 40, 195, 204, 204, 204, 204, 204, 204)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr3) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr3(0)), 24 * (UBound(arr3) + 1)
    
    
    arr4 = Array(72, 131, 236, 40, 185, 80, 0, 0, 0, 232, 118, 10, 0, 0, 72, 137, _
    5, 219, 70, 0, 0, 72, 131, 196, 40, 195, 204, 204, 204, 204, 204, 204, _
    72, 131, 236, 40, 185, 80, 0, 0, 0, 232, 86, 10, 0, 0, 72, 137, _
    5, 195, 70, 0, 0, 72, 131, 196, 40, 195, 204, 204, 204, 204, 204, 204, _
    72, 137, 92, 36, 8, 72, 137, 116, 36, 16, 87, 72, 131, 236, 32, 73, _
    139, 248, 139, 218, 72, 139, 241, 255, 21, 131, 31, 0, 0, 69, 51, 192, _
    72, 141, 21, 121, 9, 0, 0, 139, 200, 255, 21, 73, 32, 0, 0, 51, _
    210, 137, 29, 89, 70, 0, 0, 72, 141, 13, 114, 34, 0, 0, 72, 137, _
    61, 67, 70, 0, 0, 72, 137, 53, 52, 70, 0, 0, 255, 21, 54, 32, _
    0, 0, 72, 137, 5, 23, 70, 0, 0, 72, 133, 192, 117, 84, 72, 139, _
    13, 51, 70, 0, 0, 255, 21, 101, 32, 0, 0, 69, 51, 201, 69, 51, _
    192, 51, 210, 177, 18, 255, 21, 205, 31, 0, 0, 69, 51, 201, 69, 51, _
    192, 178, 1, 177, 122, 255, 21, 189, 31, 0, 0, 69, 51, 201, 51, 210, _
    177, 122, 69, 141, 65, 2, 255, 21, 172, 31, 0, 0, 69, 51, 201, 51, _
    210, 177, 18, 69, 141, 65, 2, 255, 21, 155, 31, 0, 0, 233, 204, 0, _
    0, 0, 72, 141, 21, 31, 34, 0, 0, 72, 139, 200, 255, 21, 126, 31, _
    0, 0, 72, 133, 192, 15, 133, 179, 0, 0, 0, 72, 139, 13, 158, 69, _
    0, 0, 255, 21, 120, 31, 0, 0, 72, 139, 13, 145, 69, 0, 0, 69, _
    51, 201, 186, 68, 16, 0, 0, 137, 5, 167, 69, 0, 0, 69, 141, 65, _
    48, 255, 21, 97, 31, 0, 0, 72, 139, 13, 114, 69, 0, 0, 69, 51)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr4) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr4(0)), 24 * (UBound(arr4) + 1)
    
    
    arr5 = Array(201, 186, 68, 16, 0, 0, 69, 141, 65, 51, 255, 21, 72, 31, 0, 0, _
    72, 139, 13, 89, 69, 0, 0, 69, 51, 201, 186, 68, 16, 0, 0, 65, _
    184, 131, 0, 0, 0, 255, 21, 45, 31, 0, 0, 72, 139, 13, 62, 69, _
    0, 0, 72, 141, 21, 159, 33, 0, 0, 65, 184, 1, 0, 0, 0, 255, _
    21, 75, 31, 0, 0, 131, 61, 72, 69, 0, 0, 0, 117, 48, 72, 139, _
    13, 27, 69, 0, 0, 69, 51, 201, 69, 51, 192, 65, 141, 81, 11, 255, _
    21, 59, 31, 0, 0, 72, 139, 13, 4, 69, 0, 0, 76, 141, 13, 237, _
    7, 0, 0, 69, 51, 192, 51, 210, 255, 21, 58, 31, 0, 0, 72, 141, _
    21, 107, 33, 0, 0, 72, 139, 206, 255, 21, 178, 30, 0, 0, 72, 133, _
    192, 15, 133, 172, 0, 0, 0, 51, 219, 15, 31, 128, 0, 0, 0, 0, _
    72, 139, 5, 9, 69, 0, 0, 72, 59, 52, 3, 117, 44, 69, 51, 192, _
    72, 141, 21, 57, 33, 0, 0, 72, 139, 206, 255, 21, 208, 30, 0, 0, _
    76, 139, 5, 249, 68, 0, 0, 186, 252, 255, 255, 255, 72, 139, 206, 78, _
    139, 4, 3, 255, 21, 87, 30, 0, 0, 72, 131, 195, 8, 72, 131, 251, _
    80, 124, 189, 72, 139, 13, 190, 68, 0, 0, 255, 21, 168, 30, 0, 0, _
    72, 141, 13, 241, 33, 0, 0, 255, 21, 171, 29, 0, 0, 69, 51, 201, _
    72, 141, 21, 57, 3, 0, 0, 76, 139, 192, 65, 141, 73, 5, 255, 21, _
    92, 30, 0, 0, 72, 139, 13, 125, 68, 0, 0, 51, 210, 72, 137, 5, _
    132, 68, 0, 0, 255, 21, 174, 30, 0, 0, 72, 139, 13, 103, 68, 0, _
    0, 76, 141, 13, 136, 0, 0, 0, 69, 51, 192, 51, 210, 255, 21, 117)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr5) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr5(0)), 24 * (UBound(arr5) + 1)
    
    
    arr6 = Array(30, 0, 0, 72, 139, 92, 36, 48, 72, 139, 116, 36, 56, 72, 131, 196, _
    32, 95, 195, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, _
    72, 137, 92, 36, 8, 87, 72, 131, 236, 32, 72, 139, 249, 51, 219, 144, _
    72, 139, 5, 57, 68, 0, 0, 72, 59, 60, 3, 117, 44, 69, 51, 192, _
    72, 141, 21, 105, 32, 0, 0, 72, 139, 207, 255, 21, 0, 30, 0, 0, _
    76, 139, 5, 41, 68, 0, 0, 186, 252, 255, 255, 255, 72, 139, 207, 78, _
    139, 4, 3, 255, 21, 135, 29, 0, 0, 72, 131, 195, 8, 72, 131, 251, _
    80, 124, 189, 72, 139, 92, 36, 48, 72, 131, 196, 32, 95, 195, 204, 204, _
    72, 131, 236, 40, 72, 139, 13, 205, 67, 0, 0, 51, 210, 255, 21, 5, _
    30, 0, 0, 72, 139, 13, 150, 67, 0, 0, 72, 141, 21, 55, 32, 0, _
    0, 255, 21, 89, 29, 0, 0, 72, 133, 192, 117, 56, 72, 139, 13, 125, _
    67, 0, 0, 68, 141, 64, 1, 72, 141, 21, 26, 32, 0, 0, 255, 21, _
    140, 29, 0, 0, 72, 139, 13, 101, 67, 0, 0, 76, 141, 5, 110, 1, _
    0, 0, 186, 252, 255, 255, 255, 255, 21, 19, 29, 0, 0, 72, 137, 5, _
    124, 67, 0, 0, 72, 139, 13, 85, 67, 0, 0, 72, 141, 21, 190, 31, _
    0, 0, 65, 184, 1, 0, 0, 0, 255, 21, 82, 29, 0, 0, 72, 139, _
    13, 59, 67, 0, 0, 76, 141, 5, 100, 0, 0, 0, 186, 252, 255, 255, _
    255, 255, 21, 217, 28, 0, 0, 76, 99, 5, 30, 67, 0, 0, 72, 139, _
    13, 91, 67, 0, 0, 74, 141, 20, 197, 0, 0, 0, 0, 65, 255, 192, _
    72, 137, 4, 10, 72, 139, 5, 53, 67, 0, 0, 72, 139, 13, 254, 66)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr6) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr6(0)), 24 * (UBound(arr6) + 1)
    
    
    arr7 = Array(0, 0, 68, 137, 5, 243, 66, 0, 0, 72, 137, 12, 2, 72, 139, 5, _
    36, 67, 0, 0, 72, 99, 13, 245, 66, 0, 0, 72, 137, 12, 2, 72, _
    131, 196, 40, 195, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, _
    72, 137, 92, 36, 16, 72, 137, 108, 36, 24, 72, 137, 116, 36, 32, 65, _
    86, 72, 131, 236, 64, 69, 51, 210, 72, 137, 124, 36, 80, 72, 139, 217, _
    65, 139, 194, 72, 139, 13, 214, 66, 0, 0, 73, 139, 241, 73, 139, 232, _
    68, 139, 242, 72, 59, 28, 193, 116, 24, 65, 255, 194, 72, 255, 192, 72, _
    131, 248, 10, 124, 238, 72, 139, 124, 36, 48, 72, 139, 76, 36, 48, 235, _
    33, 73, 99, 194, 72, 141, 12, 197, 0, 0, 0, 0, 72, 139, 5, 173, _
    66, 0, 0, 72, 139, 60, 1, 72, 139, 5, 154, 66, 0, 0, 72, 139, _
    12, 1, 76, 139, 205, 72, 137, 116, 36, 32, 69, 139, 198, 72, 139, 211, _
    255, 21, 42, 28, 0, 0, 72, 131, 248, 255, 117, 5, 72, 11, 192, 235, _
    23, 76, 139, 205, 72, 137, 116, 36, 32, 69, 139, 198, 72, 139, 211, 72, _
    139, 207, 255, 21, 8, 28, 0, 0, 72, 139, 124, 36, 80, 72, 139, 92, _
    36, 88, 72, 139, 108, 36, 96, 72, 139, 116, 36, 104, 72, 131, 196, 64, _
    65, 94, 195, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, _
    72, 137, 92, 36, 8, 72, 137, 108, 36, 16, 72, 137, 116, 36, 24, 87, _
    72, 131, 236, 48, 73, 139, 249, 73, 139, 240, 139, 218, 72, 139, 233, 131, _
    250, 12, 117, 97, 199, 5, 202, 65, 0, 0, 1, 0, 0, 0, 232, 253, _
    3, 0, 0, 76, 139, 5, 230, 65, 0, 0, 141, 83, 240, 72, 139, 13, _
    172, 65, 0, 0, 255, 21, 102, 27, 0, 0, 72, 139, 13, 159, 65, 0, _
    0, 72, 141, 21, 64, 30, 0, 0, 69, 51, 192, 255, 21, 175, 27, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr7) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr7(0)), 24 * (UBound(arr7) + 1)
    
    
    arr8 = Array(0, 72, 139, 13, 192, 65, 0, 0, 199, 5, 138, 65, 0, 0, 0, 0, _
    0, 0, 255, 21, 160, 27, 0, 0, 72, 139, 13, 113, 65, 0, 0, 255, _
    21, 51, 27, 0, 0, 72, 139, 13, 148, 65, 0, 0, 76, 139, 206, 68, _
    139, 195, 72, 137, 124, 36, 32, 72, 139, 213, 255, 21, 64, 27, 0, 0, _
    72, 139, 92, 36, 64, 72, 139, 108, 36, 72, 72, 139, 116, 36, 80, 72, _
    131, 196, 48, 95, 195, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, _
    64, 83, 86, 87, 72, 129, 236, 80, 3, 0, 0, 72, 139, 5, 86, 58, _
    0, 0, 72, 51, 196, 72, 137, 132, 36, 64, 3, 0, 0, 73, 139, 240, _
    72, 139, 218, 139, 249, 131, 249, 3, 15, 133, 236, 0, 0, 0, 65, 184, _
    4, 1, 0, 0, 72, 141, 148, 36, 48, 1, 0, 0, 72, 139, 203, 255, _
    21, 251, 26, 0, 0, 72, 141, 21, 36, 29, 0, 0, 72, 141, 140, 36, _
    48, 1, 0, 0, 255, 21, 22, 26, 0, 0, 133, 192, 15, 133, 209, 2, _
    0, 0, 72, 139, 13, 199, 64, 0, 0, 72, 141, 21, 40, 29, 0, 0, _
    255, 21, 138, 26, 0, 0, 72, 133, 192, 15, 133, 180, 2, 0, 0, 69, _
    51, 201, 141, 87, 8, 69, 51, 192, 72, 139, 203, 255, 21, 207, 26, 0, _
    0, 69, 51, 201, 68, 141, 71, 45, 186, 68, 16, 0, 0, 72, 139, 203, _
    255, 21, 114, 26, 0, 0, 69, 51, 201, 68, 141, 71, 48, 186, 68, 16, _
    0, 0, 72, 139, 203, 255, 21, 93, 26, 0, 0, 69, 51, 201, 186, 68, _
    16, 0, 0, 65, 184, 131, 0, 0, 0, 72, 139, 203, 255, 21, 70, 26, _
    0, 0, 69, 51, 201, 141, 87, 8, 68, 141, 71, 254, 72, 139, 203, 255, _
    21, 123, 26, 0, 0, 68, 141, 71, 254, 72, 137, 29, 64, 64, 0, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr8) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr8(0)), 24 * (UBound(arr8) + 1)
    
    
    arr9 = Array(72, 141, 21, 161, 28, 0, 0, 72, 139, 203, 255, 21, 80, 26, 0, 0, _
    76, 141, 13, 25, 3, 0, 0, 69, 51, 192, 51, 210, 72, 139, 203, 255, _
    21, 99, 26, 0, 0, 233, 25, 2, 0, 0, 131, 255, 5, 15, 133, 153, _
    1, 0, 0, 65, 184, 4, 1, 0, 0, 72, 141, 148, 36, 48, 1, 0, _
    0, 72, 139, 203, 255, 21, 6, 26, 0, 0, 72, 141, 21, 183, 28, 0, _
    0, 72, 141, 140, 36, 48, 1, 0, 0, 255, 21, 33, 25, 0, 0, 133, _
    192, 15, 133, 220, 1, 0, 0, 51, 210, 72, 141, 76, 36, 32, 65, 184, _
    4, 1, 0, 0, 232, 41, 19, 0, 0, 65, 184, 4, 1, 0, 0, 72, _
    141, 84, 36, 32, 72, 139, 203, 255, 21, 243, 25, 0, 0, 68, 141, 71, _
    17, 72, 141, 21, 128, 28, 0, 0, 72, 141, 76, 36, 32, 255, 21, 181, _
    26, 0, 0, 133, 192, 15, 133, 152, 1, 0, 0, 186, 195, 18, 0, 0, _
    72, 139, 203, 255, 21, 127, 25, 0, 0, 65, 184, 4, 1, 0, 0, 72, _
    141, 84, 36, 32, 72, 139, 200, 255, 21, 179, 25, 0, 0, 68, 141, 71, _
    9, 72, 141, 21, 88, 28, 0, 0, 72, 141, 76, 36, 32, 255, 21, 117, _
    26, 0, 0, 133, 192, 15, 132, 134, 0, 0, 0, 68, 141, 71, 9, 72, _
    141, 21, 74, 28, 0, 0, 72, 141, 76, 36, 32, 255, 21, 87, 26, 0, _
    0, 133, 192, 116, 108, 68, 141, 71, 13, 72, 141, 21, 64, 28, 0, 0, _
    72, 141, 76, 36, 32, 255, 21, 61, 26, 0, 0, 133, 192, 116, 82, 68, _
    141, 71, 17, 72, 141, 21, 62, 28, 0, 0, 72, 141, 76, 36, 32, 255, _
    21, 35, 26, 0, 0, 133, 192, 116, 56, 68, 141, 71, 19, 72, 141, 21, _
    60, 28, 0, 0, 72, 141, 76, 36, 32, 255, 21, 9, 26, 0, 0, 133, _
    192, 116, 30, 68, 141, 71, 16, 72, 141, 21, 66, 28, 0, 0, 72, 141, _
    76, 36, 32, 255, 21, 239, 25, 0, 0, 133, 192, 15, 133, 210, 0, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr9) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr9(0)), 24 * (UBound(arr9) + 1)
    
    
    arr10 = Array(0, 232, 10, 1, 0, 0, 76, 139, 5, 243, 62, 0, 0, 186, 252, 255, _
    255, 255, 72, 139, 13, 183, 62, 0, 0, 255, 21, 113, 24, 0, 0, 72, _
    139, 13, 170, 62, 0, 0, 72, 141, 21, 75, 27, 0, 0, 69, 51, 192, _
    255, 21, 186, 24, 0, 0, 72, 139, 13, 203, 62, 0, 0, 199, 5, 149, _
    62, 0, 0, 0, 0, 0, 0, 255, 21, 171, 24, 0, 0, 72, 139, 13, _
    124, 62, 0, 0, 255, 21, 62, 24, 0, 0, 235, 119, 131, 255, 8, 117, _
    114, 129, 251, 96, 240, 0, 0, 117, 106, 255, 21, 153, 24, 0, 0, 72, _
    59, 5, 130, 62, 0, 0, 116, 15, 255, 21, 138, 24, 0, 0, 72, 59, _
    5, 99, 62, 0, 0, 117, 76, 76, 139, 5, 114, 62, 0, 0, 186, 252, _
    255, 255, 255, 72, 139, 13, 54, 62, 0, 0, 255, 21, 240, 23, 0, 0, _
    72, 139, 13, 41, 62, 0, 0, 72, 141, 21, 202, 26, 0, 0, 69, 51, _
    192, 255, 21, 57, 24, 0, 0, 199, 5, 27, 62, 0, 0, 0, 0, 0, _
    0, 232, 74, 0, 0, 0, 72, 139, 13, 59, 62, 0, 0, 255, 21, 37, _
    24, 0, 0, 72, 139, 13, 46, 62, 0, 0, 76, 139, 206, 76, 139, 195, _
    139, 215, 255, 21, 64, 24, 0, 0, 72, 139, 140, 36, 64, 3, 0, 0, _
    72, 51, 204, 232, 136, 1, 0, 0, 72, 129, 196, 80, 3, 0, 0, 95, _
    94, 91, 195, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, _
    64, 83, 72, 131, 236, 32, 51, 219, 15, 31, 132, 0, 0, 0, 0, 0, _
    76, 139, 5, 249, 61, 0, 0, 186, 252, 255, 255, 255, 72, 139, 13, 221, _
    61, 0, 0, 78, 139, 4, 3, 72, 139, 12, 11, 255, 21, 79, 23, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr10) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr10(0)), 24 * (UBound(arr10) + 1)
    
    
    Call BuildDll1


End Sub


Sub BuildDll1(Optional ByVal Flag As Boolean)


    arr11 = Array(0, 72, 139, 13, 200, 61, 0, 0, 72, 141, 21, 1, 26, 0, 0, 69, _
    51, 192, 72, 139, 12, 11, 255, 21, 148, 23, 0, 0, 72, 131, 195, 8, _
    72, 131, 251, 80, 124, 186, 131, 61, 107, 61, 0, 0, 1, 117, 23, 72, _
    139, 13, 90, 61, 0, 0, 72, 141, 21, 187, 25, 0, 0, 69, 51, 192, _
    255, 21, 106, 23, 0, 0, 72, 139, 13, 67, 61, 0, 0, 72, 141, 21, _
    228, 25, 0, 0, 69, 51, 192, 255, 21, 83, 23, 0, 0, 72, 139, 13, _
    84, 61, 0, 0, 51, 210, 72, 131, 196, 32, 91, 72, 255, 37, 134, 23, _
    0, 0, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, _
    72, 131, 236, 40, 72, 139, 13, 5, 61, 0, 0, 51, 210, 255, 21, 101, _
    23, 0, 0, 72, 139, 13, 246, 60, 0, 0, 69, 51, 201, 65, 141, 81, _
    11, 69, 141, 65, 1, 255, 21, 21, 23, 0, 0, 72, 139, 13, 222, 60, _
    0, 0, 51, 210, 72, 131, 196, 40, 72, 255, 37, 33, 23, 0, 0, 204, _
    64, 83, 72, 129, 236, 64, 2, 0, 0, 72, 139, 5, 248, 53, 0, 0, _
    72, 51, 196, 72, 137, 132, 36, 48, 2, 0, 0, 65, 184, 4, 1, 0, _
    0, 72, 141, 84, 36, 32, 72, 139, 217, 255, 21, 177, 22, 0, 0, 72, _
    141, 21, 50, 26, 0, 0, 72, 141, 76, 36, 32, 255, 21, 207, 21, 0, _
    0, 133, 192, 117, 9, 72, 137, 29, 172, 60, 0, 0, 235, 5, 184, 1, _
    0, 0, 0, 72, 139, 140, 36, 48, 2, 0, 0, 72, 51, 204, 232, 29, _
    0, 0, 0, 72, 129, 196, 64, 2, 0, 0, 91, 195, 204, 204, 204, 204, _
    204, 204, 204, 204, 204, 204, 102, 102, 15, 31, 132, 0, 0, 0, 0, 0, _
    72, 59, 13, 129, 53, 0, 0, 242, 117, 18, 72, 193, 193, 16, 102, 247)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr11) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr11(0)), 24 * (UBound(arr11) + 1)
    
    
    arr12 = Array(193, 255, 255, 242, 117, 2, 242, 195, 72, 193, 201, 16, 233, 187, 3, 0, _
    0, 204, 204, 204, 233, 251, 4, 0, 0, 204, 204, 204, 72, 131, 236, 40, _
    133, 210, 116, 57, 131, 234, 1, 116, 40, 131, 234, 1, 116, 22, 131, 250, _
    1, 116, 10, 184, 1, 0, 0, 0, 72, 131, 196, 40, 195, 232, 214, 6, _
    0, 0, 235, 5, 232, 167, 6, 0, 0, 15, 182, 192, 72, 131, 196, 40, _
    195, 73, 139, 208, 72, 131, 196, 40, 233, 15, 0, 0, 0, 77, 133, 192, _
    15, 149, 193, 72, 131, 196, 40, 233, 20, 1, 0, 0, 72, 137, 92, 36, _
    8, 72, 137, 116, 36, 16, 72, 137, 124, 36, 32, 65, 86, 72, 131, 236, _
    32, 72, 139, 242, 76, 139, 241, 51, 201, 232, 74, 7, 0, 0, 132, 192, _
    117, 7, 51, 192, 233, 208, 0, 0, 0, 232, 202, 5, 0, 0, 138, 216, _
    136, 68, 36, 64, 64, 183, 1, 131, 61, 66, 59, 0, 0, 0, 116, 10, _
    185, 7, 0, 0, 0, 232, 62, 9, 0, 0, 199, 5, 44, 59, 0, 0, _
    1, 0, 0, 0, 232, 15, 6, 0, 0, 132, 192, 116, 79, 232, 110, 10, _
    0, 0, 232, 73, 5, 0, 0, 232, 112, 5, 0, 0, 72, 141, 21, 197, _
    22, 0, 0, 72, 141, 13, 182, 22, 0, 0, 232, 209, 14, 0, 0, 133, _
    192, 117, 41, 232, 172, 5, 0, 0, 132, 192, 116, 32, 72, 141, 21, 149, _
    22, 0, 0, 72, 141, 13, 110, 22, 0, 0, 232, 171, 14, 0, 0, 199, _
    5, 215, 58, 0, 0, 2, 0, 0, 0, 64, 50, 255, 138, 203, 232, 125, _
    8, 0, 0, 64, 132, 255, 15, 133, 102, 255, 255, 255, 232, 191, 8, 0, _
    0, 72, 139, 216, 72, 131, 56, 0, 116, 36, 72, 139, 200, 232, 194, 7, _
    0, 0, 132, 192, 116, 24, 72, 139, 27, 72, 139, 203, 232, 135, 10, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr12) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr12(0)), 24 * (UBound(arr12) + 1)
    
    
    arr13 = Array(0, 76, 139, 198, 186, 2, 0, 0, 0, 73, 139, 206, 255, 211, 255, 5, _
    236, 52, 0, 0, 184, 1, 0, 0, 0, 72, 139, 92, 36, 48, 72, 139, _
    116, 36, 56, 72, 139, 124, 36, 72, 72, 131, 196, 32, 65, 94, 195, 204, _
    72, 137, 92, 36, 8, 72, 137, 116, 36, 24, 87, 72, 131, 236, 32, 64, _
    138, 241, 139, 5, 184, 52, 0, 0, 51, 219, 133, 192, 127, 4, 51, 192, _
    235, 90, 255, 200, 137, 5, 166, 52, 0, 0, 232, 185, 4, 0, 0, 64, _
    138, 248, 136, 68, 36, 56, 131, 61, 51, 58, 0, 0, 2, 116, 10, 185, _
    7, 0, 0, 0, 232, 47, 8, 0, 0, 232, 198, 5, 0, 0, 232, 93, _
    4, 0, 0, 232, 180, 9, 0, 0, 137, 29, 18, 58, 0, 0, 232, 225, _
    5, 0, 0, 64, 138, 207, 232, 181, 7, 0, 0, 51, 210, 64, 138, 206, _
    232, 207, 7, 0, 0, 132, 192, 15, 149, 195, 139, 195, 72, 139, 92, 36, _
    48, 72, 139, 116, 36, 64, 72, 131, 196, 32, 95, 195, 72, 139, 196, 72, _
    137, 88, 32, 76, 137, 64, 24, 137, 80, 16, 72, 137, 72, 8, 86, 87, _
    65, 86, 72, 131, 236, 64, 73, 139, 240, 139, 250, 76, 139, 241, 133, 210, _
    117, 15, 57, 21, 24, 52, 0, 0, 127, 7, 51, 192, 233, 178, 0, 0, _
    0, 141, 66, 255, 131, 248, 1, 119, 42, 232, 182, 0, 0, 0, 139, 216, _
    137, 68, 36, 48, 133, 192, 15, 132, 141, 0, 0, 0, 76, 139, 198, 139, _
    215, 73, 139, 206, 232, 179, 253, 255, 255, 139, 216, 137, 68, 36, 48, 133, _
    192, 116, 118, 76, 139, 198, 139, 215, 73, 139, 206, 232, 124, 3, 0, 0, _
    139, 216, 137, 68, 36, 48, 131, 255, 1, 117, 43, 133, 192, 117, 39, 76, _
    139, 198, 51, 210, 73, 139, 206, 232, 96, 3, 0, 0, 76, 139, 198, 51, _
    210, 73, 139, 206, 232, 115, 253, 255, 255, 76, 139, 198, 51, 210, 73, 139)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr13) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr13(0)), 24 * (UBound(arr13) + 1)
    
    
    arr14 = Array(206, 232, 78, 0, 0, 0, 133, 255, 116, 5, 131, 255, 3, 117, 42, 76, _
    139, 198, 139, 215, 73, 139, 206, 232, 80, 253, 255, 255, 139, 216, 137, 68, _
    36, 48, 133, 192, 116, 19, 76, 139, 198, 139, 215, 73, 139, 206, 232, 33, _
    0, 0, 0, 139, 216, 137, 68, 36, 48, 235, 6, 51, 219, 137, 92, 36, _
    48, 139, 195, 72, 139, 92, 36, 120, 72, 131, 196, 64, 65, 94, 95, 94, _
    195, 204, 204, 204, 72, 137, 92, 36, 8, 72, 137, 108, 36, 16, 72, 137, _
    116, 36, 24, 87, 72, 131, 236, 32, 72, 139, 29, 177, 20, 0, 0, 73, _
    139, 248, 139, 242, 72, 139, 233, 72, 133, 219, 117, 5, 141, 67, 1, 235, _
    18, 72, 139, 203, 232, 159, 8, 0, 0, 76, 139, 199, 139, 214, 72, 139, _
    205, 255, 211, 72, 139, 92, 36, 48, 72, 139, 108, 36, 56, 72, 139, 116, _
    36, 64, 72, 131, 196, 32, 95, 195, 72, 137, 92, 36, 8, 72, 137, 116, _
    36, 16, 87, 72, 131, 236, 32, 73, 139, 248, 139, 218, 72, 139, 241, 131, _
    250, 1, 117, 5, 232, 215, 1, 0, 0, 76, 139, 199, 139, 211, 72, 139, _
    206, 72, 139, 92, 36, 48, 72, 139, 116, 36, 56, 72, 131, 196, 32, 95, _
    233, 119, 254, 255, 255, 204, 204, 204, 64, 83, 72, 131, 236, 32, 72, 139, _
    217, 51, 201, 255, 21, 39, 18, 0, 0, 72, 139, 203, 255, 21, 38, 18, _
    0, 0, 255, 21, 16, 18, 0, 0, 72, 139, 200, 186, 9, 4, 0, 192, _
    72, 131, 196, 32, 91, 72, 255, 37, 244, 17, 0, 0, 72, 137, 76, 36, _
    8, 72, 131, 236, 56, 185, 23, 0, 0, 0, 232, 29, 12, 0, 0, 133)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr14) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr14(0)), 24 * (UBound(arr14) + 1)
    
    
    arr15 = Array(192, 116, 7, 185, 2, 0, 0, 0, 205, 41, 72, 141, 13, 15, 51, 0, _
    0, 232, 170, 0, 0, 0, 72, 139, 68, 36, 56, 72, 137, 5, 246, 51, _
    0, 0, 72, 141, 68, 36, 56, 72, 131, 192, 8, 72, 137, 5, 134, 51, _
    0, 0, 72, 139, 5, 223, 51, 0, 0, 72, 137, 5, 80, 50, 0, 0, _
    72, 139, 68, 36, 64, 72, 137, 5, 84, 51, 0, 0, 199, 5, 42, 50, _
    0, 0, 9, 4, 0, 192, 199, 5, 36, 50, 0, 0, 1, 0, 0, 0, _
    199, 5, 46, 50, 0, 0, 1, 0, 0, 0, 184, 8, 0, 0, 0, 72, _
    107, 192, 0, 72, 141, 13, 38, 50, 0, 0, 72, 199, 4, 1, 2, 0, _
    0, 0, 184, 8, 0, 0, 0, 72, 107, 192, 0, 72, 139, 13, 6, 49, _
    0, 0, 72, 137, 76, 4, 32, 184, 8, 0, 0, 0, 72, 107, 192, 1, _
    72, 139, 13, 233, 48, 0, 0, 72, 137, 76, 4, 32, 72, 141, 13, 69, _
    19, 0, 0, 232, 0, 255, 255, 255, 72, 131, 196, 56, 195, 204, 204, 204, _
    64, 83, 86, 87, 72, 131, 236, 64, 72, 139, 217, 255, 21, 63, 17, 0, _
    0, 72, 139, 179, 248, 0, 0, 0, 51, 255, 69, 51, 192, 72, 141, 84, _
    36, 96, 72, 139, 206, 255, 21, 29, 17, 0, 0, 72, 133, 192, 116, 57, _
    72, 131, 100, 36, 56, 0, 72, 141, 76, 36, 104, 72, 139, 84, 36, 96, _
    76, 139, 200, 72, 137, 76, 36, 48, 76, 139, 198, 72, 141, 76, 36, 112, _
    72, 137, 76, 36, 40, 51, 201, 72, 137, 92, 36, 32, 255, 21, 222, 16, _
    0, 0, 255, 199, 131, 255, 2, 124, 177, 72, 131, 196, 64, 95, 94, 91, _
    195, 204, 204, 204, 64, 83, 72, 131, 236, 32, 72, 139, 217, 235, 33, 72)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr15) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr15(0)), 24 * (UBound(arr15) + 1)
    
    
    arr16 = Array(139, 203, 232, 159, 10, 0, 0, 133, 192, 117, 18, 72, 131, 251, 255, 117, _
    7, 232, 26, 8, 0, 0, 235, 5, 232, 243, 7, 0, 0, 72, 139, 203, _
    232, 135, 10, 0, 0, 72, 133, 192, 116, 213, 72, 131, 196, 32, 91, 195, _
    72, 137, 92, 36, 32, 85, 72, 139, 236, 72, 131, 236, 32, 72, 131, 101, _
    24, 0, 72, 187, 50, 162, 223, 45, 153, 43, 0, 0, 72, 139, 5, 5, _
    48, 0, 0, 72, 59, 195, 117, 111, 72, 141, 77, 24, 255, 21, 30, 16, _
    0, 0, 72, 139, 69, 24, 72, 137, 69, 16, 255, 21, 224, 15, 0, 0, _
    139, 192, 72, 49, 69, 16, 255, 21, 12, 16, 0, 0, 139, 192, 72, 141, _
    77, 32, 72, 49, 69, 16, 255, 21, 4, 16, 0, 0, 139, 69, 32, 72, _
    141, 77, 16, 72, 193, 224, 32, 72, 51, 69, 32, 72, 51, 69, 16, 72, _
    51, 193, 72, 185, 255, 255, 255, 255, 255, 255, 0, 0, 72, 35, 193, 72, _
    185, 51, 162, 223, 45, 153, 43, 0, 0, 72, 59, 195, 72, 15, 68, 193, _
    72, 137, 5, 145, 47, 0, 0, 72, 139, 92, 36, 72, 72, 247, 208, 72, _
    137, 5, 122, 47, 0, 0, 72, 131, 196, 32, 93, 195, 72, 131, 236, 40, _
    131, 250, 1, 117, 16, 72, 131, 61, 195, 17, 0, 0, 0, 117, 6, 255, _
    21, 131, 15, 0, 0, 184, 1, 0, 0, 0, 72, 131, 196, 40, 195, 204, _
    72, 141, 13, 169, 53, 0, 0, 72, 255, 37, 98, 15, 0, 0, 204, 204, _
    72, 141, 13, 153, 53, 0, 0, 233, 96, 9, 0, 0, 72, 141, 5, 157, _
    53, 0, 0, 195, 72, 141, 5, 157, 53, 0, 0, 195, 72, 131, 236, 40, _
    232, 231, 255, 255, 255, 72, 131, 8, 4, 232, 230, 255, 255, 255, 72, 131)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr16) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr16(0)), 24 * (UBound(arr16) + 1)
    
    
    arr17 = Array(8, 2, 72, 131, 196, 40, 195, 204, 72, 131, 236, 40, 232, 215, 8, 0, _
    0, 133, 192, 116, 33, 101, 72, 139, 4, 37, 48, 0, 0, 0, 72, 139, _
    72, 8, 235, 5, 72, 59, 200, 116, 20, 51, 192, 240, 72, 15, 177, 13, _
    100, 53, 0, 0, 117, 238, 50, 192, 72, 131, 196, 40, 195, 176, 1, 235, _
    247, 204, 204, 204, 72, 131, 236, 40, 232, 155, 8, 0, 0, 133, 192, 116, _
    7, 232, 206, 6, 0, 0, 235, 25, 232, 131, 8, 0, 0, 139, 200, 232, _
    20, 9, 0, 0, 133, 192, 116, 4, 50, 192, 235, 7, 232, 13, 9, 0, _
    0, 176, 1, 72, 131, 196, 40, 195, 72, 131, 236, 40, 51, 201, 232, 65, _
    1, 0, 0, 132, 192, 15, 149, 192, 72, 131, 196, 40, 195, 204, 204, 204, _
    72, 131, 236, 40, 232, 11, 9, 0, 0, 132, 192, 117, 4, 50, 192, 235, _
    18, 232, 254, 8, 0, 0, 132, 192, 117, 7, 232, 245, 8, 0, 0, 235, _
    236, 176, 1, 72, 131, 196, 40, 195, 72, 131, 236, 40, 232, 227, 8, 0, _
    0, 232, 222, 8, 0, 0, 176, 1, 72, 131, 196, 40, 195, 204, 204, 204, _
    72, 137, 92, 36, 8, 72, 137, 108, 36, 16, 72, 137, 116, 36, 24, 87, _
    72, 131, 236, 32, 73, 139, 249, 73, 139, 240, 139, 218, 72, 139, 233, 232, _
    244, 7, 0, 0, 133, 192, 117, 23, 131, 251, 1, 117, 18, 72, 139, 207, _
    232, 115, 4, 0, 0, 76, 139, 198, 51, 210, 72, 139, 205, 255, 215, 72, _
    139, 84, 36, 88, 139, 76, 36, 80, 72, 139, 92, 36, 48, 72, 139, 108, _
    36, 56, 72, 139, 116, 36, 64, 72, 131, 196, 32, 95, 233, 65, 8, 0, _
    0, 204, 204, 204, 72, 131, 236, 40, 232, 171, 7, 0, 0, 133, 192, 116)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr17) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr17(0)), 24 * (UBound(arr17) + 1)
    
    
    arr18 = Array(16, 72, 141, 13, 88, 52, 0, 0, 72, 131, 196, 40, 233, 57, 8, 0, _
    0, 232, 82, 8, 0, 0, 133, 192, 117, 5, 232, 49, 8, 0, 0, 72, _
    131, 196, 40, 195, 72, 131, 236, 40, 51, 201, 232, 53, 8, 0, 0, 72, _
    131, 196, 40, 233, 44, 8, 0, 0, 64, 83, 72, 131, 236, 32, 15, 182, _
    5, 75, 52, 0, 0, 133, 201, 187, 1, 0, 0, 0, 15, 68, 195, 136, _
    5, 59, 52, 0, 0, 232, 138, 5, 0, 0, 232, 5, 8, 0, 0, 132, _
    192, 117, 4, 50, 192, 235, 20, 232, 248, 7, 0, 0, 132, 192, 117, 9, _
    51, 201, 232, 237, 7, 0, 0, 235, 234, 138, 195, 72, 131, 196, 32, 91, _
    195, 204, 204, 204, 72, 137, 92, 36, 8, 85, 72, 139, 236, 72, 131, 236, _
    64, 128, 61, 188, 51, 0, 0, 0, 139, 217, 15, 133, 171, 0, 0, 0, _
    131, 249, 1, 15, 135, 175, 0, 0, 0, 232, 250, 6, 0, 0, 133, 192, _
    116, 45, 133, 219, 117, 41, 72, 141, 13, 163, 51, 0, 0, 232, 130, 7, _
    0, 0, 133, 192, 116, 7, 50, 192, 233, 128, 0, 0, 0, 72, 141, 13, _
    164, 51, 0, 0, 232, 107, 7, 0, 0, 133, 192, 116, 103, 235, 231, 72, _
    139, 21, 242, 44, 0, 0, 185, 64, 0, 0, 0, 139, 194, 131, 224, 63, _
    43, 200, 72, 131, 200, 255, 72, 211, 200, 72, 51, 194, 72, 137, 69, 224, _
    72, 137, 69, 232, 15, 16, 69, 224, 72, 137, 69, 240, 242, 15, 16, 77, _
    240, 15, 17, 5, 72, 51, 0, 0, 72, 137, 69, 224, 72, 137, 69, 232, _
    15, 16, 69, 224, 72, 137, 69, 240, 242, 15, 17, 13, 64, 51, 0, 0, _
    242, 15, 16, 77, 240, 15, 17, 5, 60, 51, 0, 0, 242, 15, 17, 13, _
    68, 51, 0, 0, 198, 5, 9, 51, 0, 0, 1, 176, 1, 72, 139, 92, _
    36, 80, 72, 131, 196, 64, 93, 195, 185, 5, 0, 0, 0, 232, 246, 0, _
    0, 0, 204, 204, 72, 131, 236, 24, 76, 139, 193, 184, 77, 90, 0, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr18) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr18(0)), 24 * (UBound(arr18) + 1)
    
    
    arr19 = Array(102, 57, 5, 89, 220, 255, 255, 117, 121, 72, 99, 5, 140, 220, 255, 255, _
    72, 141, 21, 73, 220, 255, 255, 72, 141, 12, 16, 129, 57, 80, 69, 0, _
    0, 117, 95, 184, 11, 2, 0, 0, 102, 57, 65, 24, 117, 84, 76, 43, _
    194, 15, 183, 65, 20, 72, 141, 81, 24, 72, 3, 208, 15, 183, 65, 6, _
    72, 141, 12, 128, 76, 141, 12, 202, 72, 137, 20, 36, 73, 59, 209, 116, _
    24, 139, 74, 12, 76, 59, 193, 114, 10, 139, 66, 8, 3, 193, 76, 59, _
    192, 114, 8, 72, 131, 194, 40, 235, 223, 51, 210, 72, 133, 210, 117, 4, _
    50, 192, 235, 20, 131, 122, 36, 0, 125, 4, 50, 192, 235, 10, 176, 1, _
    235, 6, 50, 192, 235, 2, 50, 192, 72, 131, 196, 24, 195, 204, 204, 204, _
    64, 83, 72, 131, 236, 32, 138, 217, 232, 155, 5, 0, 0, 51, 210, 133, _
    192, 116, 11, 132, 219, 117, 7, 72, 135, 21, 58, 50, 0, 0, 72, 131, _
    196, 32, 91, 195, 64, 83, 72, 131, 236, 32, 128, 61, 95, 50, 0, 0, _
    0, 138, 217, 116, 4, 132, 210, 117, 14, 138, 203, 232, 36, 6, 0, 0, _
    138, 203, 232, 29, 6, 0, 0, 176, 1, 72, 131, 196, 32, 91, 195, 204, _
    72, 141, 5, 161, 50, 0, 0, 195, 72, 137, 92, 36, 8, 85, 72, 141, _
    172, 36, 64, 251, 255, 255, 72, 129, 236, 192, 5, 0, 0, 139, 217, 185, _
    23, 0, 0, 0, 232, 227, 5, 0, 0, 133, 192, 116, 4, 139, 203, 205, _
    41, 131, 37, 12, 50, 0, 0, 0, 72, 141, 77, 240, 51, 210, 65, 184, _
    208, 4, 0, 0, 232, 105, 5, 0, 0, 72, 141, 77, 240, 255, 21, 173, _
    11, 0, 0, 72, 139, 157, 232, 0, 0, 0, 72, 141, 149, 216, 4, 0, _
    0, 72, 139, 203, 69, 51, 192, 255, 21, 139, 11, 0, 0, 72, 133, 192)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr19) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr19(0)), 24 * (UBound(arr19) + 1)
    
    
    arr20 = Array(116, 60, 72, 131, 100, 36, 56, 0, 72, 141, 141, 224, 4, 0, 0, 72, _
    139, 149, 216, 4, 0, 0, 76, 139, 200, 72, 137, 76, 36, 48, 76, 139, _
    195, 72, 141, 141, 232, 4, 0, 0, 72, 137, 76, 36, 40, 72, 141, 77, _
    240, 72, 137, 76, 36, 32, 51, 201, 255, 21, 66, 11, 0, 0, 72, 139, _
    133, 200, 4, 0, 0, 72, 141, 76, 36, 80, 72, 137, 133, 232, 0, 0, _
    0, 51, 210, 72, 141, 133, 200, 4, 0, 0, 65, 184, 152, 0, 0, 0, _
    72, 131, 192, 8, 72, 137, 133, 136, 0, 0, 0, 232, 210, 4, 0, 0, _
    72, 139, 133, 200, 4, 0, 0, 72, 137, 68, 36, 96, 199, 68, 36, 80, _
    21, 0, 0, 64, 199, 68, 36, 84, 1, 0, 0, 0, 255, 21, 150, 10, _
    0, 0, 131, 248, 1, 72, 141, 68, 36, 80, 72, 137, 68, 36, 64, 72, _
    141, 69, 240, 15, 148, 195, 72, 137, 68, 36, 72, 51, 201, 255, 21, 189, _
    10, 0, 0, 72, 141, 76, 36, 64, 255, 21, 186, 10, 0, 0, 133, 192, _
    117, 10, 246, 219, 27, 192, 33, 5, 8, 49, 0, 0, 72, 139, 156, 36, _
    208, 5, 0, 0, 72, 129, 196, 192, 5, 0, 0, 93, 195, 204, 204, 204, _
    72, 137, 92, 36, 8, 72, 137, 116, 36, 16, 87, 72, 131, 236, 32, 72, _
    141, 29, 210, 20, 0, 0, 72, 141, 53, 203, 20, 0, 0, 235, 22, 72, _
    139, 59, 72, 133, 255, 116, 10, 72, 139, 207, 232, 105, 0, 0, 0, 255, _
    215, 72, 131, 195, 8, 72, 59, 222, 114, 229, 72, 139, 92, 36, 48, 72, _
    139, 116, 36, 56, 72, 131, 196, 32, 95, 195, 204, 204, 72, 137, 92, 36, _
    8, 72, 137, 116, 36, 16, 87, 72, 131, 236, 32, 72, 141, 29, 150, 20, _
    0, 0, 72, 141, 53, 143, 20, 0, 0, 235, 22, 72, 139, 59, 72, 133, _
    255, 116, 10, 72, 139, 207, 232, 29, 0, 0, 0, 255, 215, 72, 131, 195)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr20) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr20(0)), 24 * (UBound(arr20) + 1)
        
    Call BuildDll2
    
    End Sub
    
    Sub BuildDll2(Optional ByVal Flag As Boolean)
    
    arr21 = Array(8, 72, 59, 222, 114, 229, 72, 139, 92, 36, 48, 72, 139, 116, 36, 56, _
    72, 131, 196, 32, 95, 195, 204, 204, 72, 255, 37, 137, 11, 0, 0, 204, _
    64, 83, 72, 131, 236, 32, 72, 139, 217, 72, 139, 194, 72, 141, 13, 253, _
    11, 0, 0, 72, 137, 11, 72, 141, 83, 8, 51, 201, 72, 137, 10, 72, _
    137, 74, 8, 72, 141, 72, 8, 232, 156, 3, 0, 0, 72, 141, 5, 13, _
    12, 0, 0, 72, 137, 3, 72, 139, 195, 72, 131, 196, 32, 91, 195, 204, _
    51, 192, 72, 137, 65, 16, 72, 141, 5, 3, 12, 0, 0, 72, 137, 65, _
    8, 72, 141, 5, 232, 11, 0, 0, 72, 137, 1, 72, 139, 193, 195, 204, _
    64, 83, 72, 131, 236, 32, 72, 139, 217, 72, 139, 194, 72, 141, 13, 157, _
    11, 0, 0, 72, 137, 11, 72, 141, 83, 8, 51, 201, 72, 137, 10, 72, _
    137, 74, 8, 72, 141, 72, 8, 232, 60, 3, 0, 0, 72, 141, 5, 213, _
    11, 0, 0, 72, 137, 3, 72, 139, 195, 72, 131, 196, 32, 91, 195, 204, _
    51, 192, 72, 137, 65, 16, 72, 141, 5, 203, 11, 0, 0, 72, 137, 65, _
    8, 72, 141, 5, 176, 11, 0, 0, 72, 137, 1, 72, 139, 193, 195, 204, _
    64, 83, 72, 131, 236, 32, 72, 139, 217, 72, 139, 194, 72, 141, 13, 61, _
    11, 0, 0, 72, 137, 11, 72, 141, 83, 8, 51, 201, 72, 137, 10, 72, _
    137, 74, 8, 72, 141, 72, 8, 232, 220, 2, 0, 0, 72, 139, 195, 72, _
    131, 196, 32, 91, 195, 204, 204, 204, 72, 141, 5, 17, 11, 0, 0, 72, _
    137, 1, 72, 131, 193, 8, 233, 195, 2, 0, 0, 204, 72, 137, 92, 36, _
    8, 87, 72, 131, 236, 32, 72, 141, 5, 243, 10, 0, 0, 72, 139, 249, _
    72, 137, 1, 139, 218, 72, 131, 193, 8, 232, 160, 2, 0, 0, 246, 195)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr21) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr21(0)), 24 * (UBound(arr21) + 1)
    
    
    arr22 = Array(1, 116, 13, 186, 24, 0, 0, 0, 72, 139, 207, 232, 56, 2, 0, 0, _
    72, 139, 199, 72, 139, 92, 36, 48, 72, 131, 196, 32, 95, 195, 204, 204, _
    72, 131, 236, 72, 72, 141, 76, 36, 32, 232, 226, 254, 255, 255, 72, 141, _
    21, 187, 20, 0, 0, 72, 141, 76, 36, 32, 232, 101, 2, 0, 0, 204, _
    72, 131, 236, 72, 72, 141, 76, 36, 32, 232, 34, 255, 255, 255, 72, 141, _
    21, 35, 21, 0, 0, 72, 141, 76, 36, 32, 232, 69, 2, 0, 0, 204, _
    72, 131, 121, 8, 0, 72, 141, 5, 132, 10, 0, 0, 72, 15, 69, 65, _
    8, 195, 204, 204, 72, 137, 92, 36, 16, 72, 137, 108, 36, 24, 86, 87, _
    65, 86, 72, 131, 236, 16, 51, 201, 199, 5, 242, 39, 0, 0, 2, 0, _
    0, 0, 51, 192, 199, 5, 226, 39, 0, 0, 1, 0, 0, 0, 15, 162, _
    68, 139, 209, 68, 139, 202, 129, 241, 99, 65, 77, 68, 129, 242, 101, 110, _
    116, 105, 139, 235, 69, 51, 219, 129, 245, 65, 117, 116, 104, 68, 139, 240, _
    11, 234, 65, 129, 241, 105, 110, 101, 73, 11, 233, 65, 129, 242, 110, 116, _
    101, 108, 68, 139, 195, 65, 141, 67, 1, 51, 201, 65, 129, 240, 71, 101, _
    110, 117, 15, 162, 69, 11, 209, 137, 4, 36, 69, 11, 208, 137, 92, 36, _
    4, 68, 139, 5, 48, 46, 0, 0, 139, 241, 139, 248, 137, 76, 36, 8, _
    137, 84, 36, 12, 117, 82, 72, 131, 13, 106, 39, 0, 0, 255, 65, 131, _
    200, 4, 37, 240, 63, 255, 15, 68, 137, 5, 10, 46, 0, 0, 61, 192, _
    6, 1, 0, 116, 40, 61, 96, 6, 2, 0, 116, 33, 61, 112, 6, 2, _
    0, 116, 26, 5, 176, 249, 252, 255, 131, 248, 32, 119, 27, 72, 185, 1, _
    0, 1, 0, 1, 0, 0, 0, 72, 15, 163, 193, 115, 11, 65, 131, 200)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr22) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr22(0)), 24 * (UBound(arr22) + 1)
    
    
    arr23 = Array(1, 68, 137, 5, 208, 45, 0, 0, 133, 237, 117, 25, 129, 231, 0, 15, _
    240, 15, 129, 255, 0, 15, 96, 0, 114, 11, 65, 131, 200, 4, 68, 137, _
    5, 179, 45, 0, 0, 184, 7, 0, 0, 0, 68, 59, 240, 124, 39, 51, _
    201, 15, 162, 137, 4, 36, 68, 139, 219, 137, 92, 36, 4, 137, 76, 36, _
    8, 137, 84, 36, 12, 15, 186, 227, 9, 115, 11, 65, 131, 200, 2, 68, _
    137, 5, 130, 45, 0, 0, 15, 186, 230, 20, 115, 110, 199, 5, 202, 38, _
    0, 0, 2, 0, 0, 0, 199, 5, 196, 38, 0, 0, 6, 0, 0, 0, _
    15, 186, 230, 27, 115, 84, 15, 186, 230, 28, 115, 78, 51, 201, 15, 1, _
    208, 72, 193, 226, 32, 72, 11, 208, 72, 137, 84, 36, 48, 72, 139, 68, _
    36, 48, 36, 6, 60, 6, 117, 50, 139, 5, 150, 38, 0, 0, 131, 200, _
    8, 199, 5, 133, 38, 0, 0, 3, 0, 0, 0, 137, 5, 131, 38, 0, _
    0, 65, 246, 195, 32, 116, 19, 131, 200, 32, 199, 5, 108, 38, 0, 0, _
    5, 0, 0, 0, 137, 5, 106, 38, 0, 0, 72, 139, 92, 36, 56, 51, _
    192, 72, 139, 108, 36, 64, 72, 131, 196, 16, 65, 94, 95, 94, 195, 204, _
    184, 1, 0, 0, 0, 195, 204, 204, 51, 192, 57, 5, 80, 38, 0, 0, _
    15, 149, 192, 195, 194, 0, 0, 204, 233, 51, 0, 0, 0, 204, 204, 204, _
    64, 83, 72, 131, 236, 32, 72, 141, 5, 11, 9, 0, 0, 72, 139, 217, _
    72, 137, 1, 246, 194, 1, 116, 10, 186, 24, 0, 0, 0, 232, 214, 255, _
    255, 255, 72, 139, 195, 72, 131, 196, 32, 91, 195, 204, 204, 204, 204, 204, _
    233, 97, 0, 0, 0, 204, 255, 37, 68, 7, 0, 0, 255, 37, 22, 7, _
    0, 0, 255, 37, 24, 7, 0, 0, 255, 37, 26, 7, 0, 0, 255, 37)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr23) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr23(0)), 24 * (UBound(arr23) + 1)
    
    
    arr24 = Array(28, 7, 0, 0, 255, 37, 30, 7, 0, 0, 255, 37, 104, 7, 0, 0, _
    255, 37, 90, 7, 0, 0, 255, 37, 44, 7, 0, 0, 255, 37, 46, 7, _
    0, 0, 255, 37, 104, 7, 0, 0, 255, 37, 58, 7, 0, 0, 255, 37, _
    44, 7, 0, 0, 255, 37, 94, 7, 0, 0, 255, 37, 72, 7, 0, 0, _
    255, 37, 58, 7, 0, 0, 255, 37, 244, 6, 0, 0, 255, 37, 182, 5, _
    0, 0, 204, 204, 176, 1, 195, 204, 51, 192, 195, 204, 72, 131, 236, 40, _
    77, 139, 65, 56, 72, 139, 202, 73, 139, 209, 232, 13, 0, 0, 0, 184, _
    1, 0, 0, 0, 72, 131, 196, 40, 195, 204, 204, 204, 64, 83, 69, 139, _
    24, 72, 139, 218, 65, 131, 227, 248, 76, 139, 201, 65, 246, 0, 4, 76, _
    139, 209, 116, 19, 65, 139, 64, 8, 77, 99, 80, 4, 247, 216, 76, 3, _
    209, 72, 99, 200, 76, 35, 209, 73, 99, 195, 74, 139, 20, 16, 72, 139, _
    67, 16, 139, 72, 8, 72, 3, 75, 8, 246, 65, 3, 15, 116, 10, 15, _
    182, 65, 3, 131, 224, 240, 76, 3, 200, 76, 51, 202, 73, 139, 201, 91, _
    233, 107, 239, 255, 255, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, _
    204, 204, 204, 204, 204, 204, 102, 102, 15, 31, 132, 0, 0, 0, 0, 0, _
    255, 224, 64, 85, 72, 131, 236, 32, 72, 139, 234, 138, 77, 64, 72, 131, _
    196, 32, 93, 233, 232, 248, 255, 255, 204, 64, 85, 72, 131, 236, 32, 72, _
    139, 234, 232, 253, 246, 255, 255, 138, 77, 56, 72, 131, 196, 32, 93, 233, _
    204, 248, 255, 255, 204, 64, 85, 72, 131, 236, 48, 72, 139, 234, 72, 139, _
    1, 139, 16, 72, 137, 76, 36, 40, 137, 84, 36, 32, 76, 141, 13, 41, _
    239, 255, 255, 76, 139, 69, 112, 139, 85, 104, 72, 139, 77, 96, 232, 45, _
    246, 255, 255, 144, 72, 131, 196, 48, 93, 195, 204, 64, 85, 72, 139, 234)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr24) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr24(0)), 24 * (UBound(arr24) + 1)
    
    
    arr25 = Array(72, 139, 1, 51, 201, 129, 56, 5, 0, 0, 192, 15, 148, 193, 139, 193, _
    93, 195, 204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    104, 64, 0, 0, 0, 0, 0, 0, 126, 64, 0, 0, 0, 0, 0, 0, _
    146, 64, 0, 0, 0, 0, 0, 0, 50, 69, 0, 0, 0, 0, 0, 0, _
    28, 69, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, _
    230, 68, 0, 0, 0, 0, 0, 0, 208, 68, 0, 0, 0, 0, 0, 0, _
    182, 68, 0, 0, 0, 0, 0, 0, 154, 68, 0, 0, 0, 0, 0, 0, _
    134, 68, 0, 0, 0, 0, 0, 0, 114, 68, 0, 0, 0, 0, 0, 0, _
    84, 68, 0, 0, 0, 0, 0, 0, 56, 68, 0, 0, 0, 0, 0, 0, _
    36, 68, 0, 0, 0, 0, 0, 0, 10, 68, 0, 0, 0, 0, 0, 0, _
    246, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    168, 65, 0, 0, 0, 0, 0, 0, 188, 65, 0, 0, 0, 0, 0, 0, _
    206, 65, 0, 0, 0, 0, 0, 0, 218, 65, 0, 0, 0, 0, 0, 0, _
    232, 65, 0, 0, 0, 0, 0, 0, 250, 65, 0, 0, 0, 0, 0, 0, _
    10, 66, 0, 0, 0, 0, 0, 0, 206, 64, 0, 0, 0, 0, 0, 0, _
    220, 64, 0, 0, 0, 0, 0, 0, 240, 64, 0, 0, 0, 0, 0, 0, _
    4, 65, 0, 0, 0, 0, 0, 0, 20, 65, 0, 0, 0, 0, 0, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr25) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr25(0)), 24 * (UBound(arr25) + 1)
    
    
    arr26 = Array(34, 65, 0, 0, 0, 0, 0, 0, 46, 65, 0, 0, 0, 0, 0, 0, _
    152, 65, 0, 0, 0, 0, 0, 0, 68, 65, 0, 0, 0, 0, 0, 0, _
    90, 65, 0, 0, 0, 0, 0, 0, 108, 65, 0, 0, 0, 0, 0, 0, _
    120, 65, 0, 0, 0, 0, 0, 0, 134, 65, 0, 0, 0, 0, 0, 0, _
    172, 64, 0, 0, 0, 0, 0, 0, 194, 64, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 64, 66, 0, 0, 0, 0, 0, 0, _
    96, 66, 0, 0, 0, 0, 0, 0, 106, 66, 0, 0, 0, 0, 0, 0, _
    130, 66, 0, 0, 0, 0, 0, 0, 156, 66, 0, 0, 0, 0, 0, 0, _
    40, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    138, 67, 0, 0, 0, 0, 0, 0, 232, 66, 0, 0, 0, 0, 0, 0, _
    244, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    42, 67, 0, 0, 0, 0, 0, 0, 16, 67, 0, 0, 0, 0, 0, 0, _
    218, 66, 0, 0, 0, 0, 0, 0, 206, 66, 0, 0, 0, 0, 0, 0, _
    128, 67, 0, 0, 0, 0, 0, 0, 104, 67, 0, 0, 0, 0, 0, 0, _
    254, 66, 0, 0, 0, 0, 0, 0, 76, 67, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 196, 66, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 228, 41, 0, 128, 1, 0, 0, 0, _
    48, 43, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 16, 0, 128, 1, 0, 0, 0, 32, 16, 0, 128, 1, 0, 0, 0, _
    64, 16, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr26) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr26(0)), 24 * (UBound(arr26) + 1)
    
    
    arr27 = Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 240, 80, 0, 128, 1, 0, 0, 0, _
    144, 81, 0, 128, 1, 0, 0, 0, 144, 53, 0, 128, 1, 0, 0, 0, _
    124, 39, 0, 128, 1, 0, 0, 0, 0, 40, 0, 128, 1, 0, 0, 0, _
    85, 110, 107, 110, 111, 119, 110, 32, 101, 120, 99, 101, 112, 116, 105, 111, _
    110, 0, 0, 0, 0, 0, 0, 0, 8, 54, 0, 128, 1, 0, 0, 0, _
    124, 39, 0, 128, 1, 0, 0, 0, 0, 40, 0, 128, 1, 0, 0, 0, _
    98, 97, 100, 32, 97, 108, 108, 111, 99, 97, 116, 105, 111, 110, 0, 0, _
    136, 54, 0, 128, 1, 0, 0, 0, 124, 39, 0, 128, 1, 0, 0, 0, _
    0, 40, 0, 128, 1, 0, 0, 0, 98, 97, 100, 32, 97, 114, 114, 97, _
    121, 32, 110, 101, 119, 32, 108, 101, 110, 103, 116, 104, 0, 0, 0, 0, _
    16, 55, 0, 128, 1, 0, 0, 0, 240, 41, 0, 128, 1, 0, 0, 0, _
    119, 0, 110, 0, 100, 0, 99, 0, 108, 0, 97, 0, 115, 0, 115, 0, _
    95, 0, 100, 0, 101, 0, 115, 0, 107, 0, 101, 0, 100, 0, 95, 0, _
    103, 0, 115, 0, 107, 0, 0, 0, 77, 0, 115, 0, 103, 0, 80, 0, _
    111, 0, 115, 0, 116, 0, 101, 0, 100, 0, 0, 0, 0, 0, 0, 0, _
    72, 0, 119, 0, 110, 0, 100, 0, 73, 0, 115, 0, 83, 0, 117, 0, _
    98, 0, 67, 0, 108, 0, 97, 0, 115, 0, 115, 0, 101, 0, 100, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 86, 0, 66, 0, 69, 0, 83, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr27) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr27(0)), 24 * (UBound(arr27) + 1)
    
    
    arr28 = Array(85, 0, 66, 0, 67, 0, 76, 0, 65, 0, 83, 0, 83, 0, 69, 0, _
    68, 0, 0, 0, 0, 0, 0, 0, 35, 0, 51, 0, 50, 0, 55, 0, _
    55, 0, 48, 0, 0, 0, 0, 0, 77, 105, 99, 114, 111, 115, 111, 102, _
    116, 32, 86, 105, 115, 117, 97, 108, 32, 66, 97, 115, 105, 99, 0, 0, _
    82, 117, 110, 45, 116, 105, 109, 101, 32, 101, 114, 114, 111, 114, 0, 0, _
    67, 111, 109, 112, 105, 108, 101, 32, 69, 114, 114, 111, 114, 58, 0, 0, _
    69, 114, 114, 101, 117, 114, 32, 100, 39, 101, 120, 233, 99, 117, 116, 105, _
    111, 110, 0, 0, 0, 0, 0, 0, 69, 114, 114, 101, 117, 114, 32, 100, _
    101, 32, 99, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 58, 0, 0, _
    83, 101, 32, 104, 97, 32, 112, 114, 111, 100, 117, 99, 105, 100, 111, 32, _
    101, 108, 32, 101, 114, 114, 111, 114, 0, 0, 0, 0, 0, 0, 0, 0, _
    69, 114, 114, 111, 114, 32, 100, 101, 32, 99, 111, 109, 112, 105, 108, 97, _
    99, 105, 243, 110, 58, 0, 0, 0, 88, 0, 108, 0, 83, 0, 117, 0, _
    98, 0, 67, 0, 108, 0, 97, 0, 115, 0, 115, 0, 46, 0, 100, 0, _
    108, 0, 108, 0, 0, 0, 0, 0, 88, 0, 76, 0, 77, 0, 65, 0, _
    73, 0, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 24, 133, 39, 90, 0, 0, 0, 0, 2, 0, 0, 0, _
    120, 0, 0, 0, 132, 55, 0, 0, 132, 39, 0, 0, 0, 0, 0, 0, _
    24, 133, 39, 90, 0, 0, 0, 0, 12, 0, 0, 0, 20, 0, 0, 0, _
    252, 55, 0, 0, 252, 39, 0, 0, 0, 0, 0, 0, 24, 133, 39, 90)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr28) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr28(0)), 24 * (UBound(arr28) + 1)
    
    
    arr29 = Array(0, 0, 0, 0, 13, 0, 0, 0, 160, 2, 0, 0, 16, 56, 0, 0, _
    16, 40, 0, 0, 0, 0, 0, 0, 24, 133, 39, 90, 0, 0, 0, 0, _
    14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 8, 80, 0, 128, 1, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    248, 49, 0, 128, 1, 0, 0, 0, 0, 50, 0, 128, 1, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 80, 0, 0, _
    184, 53, 0, 0, 144, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    1, 0, 0, 0, 208, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    224, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    96, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, _
    0, 0, 0, 0, 64, 0, 0, 0, 184, 53, 0, 0, 0, 0, 0, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr29) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr29(0)), 24 * (UBound(arr29) + 1)
    
    
    arr30 = Array(0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 56, 80, 0, 0, 48, 54, 0, 0, 8, 54, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 72, 54, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 96, 54, 0, 0, 224, 53, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    56, 80, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, _
    0, 0, 0, 0, 64, 0, 0, 0, 48, 54, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 136, 80, 0, 0, 176, 54, 0, 0, 136, 54, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 200, 54, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 232, 54, 0, 0, 96, 54, 0, 0, _
    224, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 136, 80, 0, 0, 2, 0, 0, 0, _
    0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 64, 0, 0, 0, _
    176, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 184, 80, 0, 0, _
    56, 55, 0, 0, 16, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    1, 0, 0, 0, 80, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    96, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr30) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr30(0)), 24 * (UBound(arr30) + 1)
    
    
    Call BuildDll3

End Sub


Sub BuildDll3(Optional ByVal Flag As Boolean)


    arr31 = Array(184, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, _
    0, 0, 0, 0, 64, 0, 0, 0, 56, 55, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 82, 83, 68, 83, 12, 189, 98, 240, 236, 46, 225, 72, _
    157, 173, 224, 124, 166, 2, 208, 11, 141, 2, 0, 0, 67, 58, 92, 85, _
    115, 101, 114, 115, 92, 73, 110, 102, 111, 45, 72, 112, 92, 68, 111, 99, _
    117, 109, 101, 110, 116, 115, 92, 86, 105, 115, 117, 97, 108, 32, 83, 116, _
    117, 100, 105, 111, 32, 50, 48, 49, 55, 92, 80, 114, 111, 106, 101, 99, _
    116, 115, 92, 88, 108, 83, 117, 98, 67, 108, 97, 115, 115, 72, 89, 77, _
    92, 120, 54, 52, 92, 82, 101, 108, 101, 97, 115, 101, 92, 88, 108, 83, _
    117, 98, 67, 108, 97, 115, 115, 46, 112, 100, 98, 0, 0, 0, 0, 0, _
    27, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, _
    71, 67, 84, 76, 0, 16, 0, 0, 96, 0, 0, 0, 46, 116, 101, 120, _
    116, 36, 100, 105, 0, 0, 0, 0, 96, 16, 0, 0, 192, 26, 0, 0, _
    46, 116, 101, 120, 116, 36, 109, 110, 0, 0, 0, 0, 32, 43, 0, 0, _
    18, 0, 0, 0, 46, 116, 101, 120, 116, 36, 109, 110, 36, 48, 48, 0, _
    50, 43, 0, 0, 129, 0, 0, 0, 46, 116, 101, 120, 116, 36, 120, 0, _
    0, 48, 0, 0, 248, 1, 0, 0, 46, 105, 100, 97, 116, 97, 36, 53, _
    0, 0, 0, 0, 248, 49, 0, 0, 16, 0, 0, 0, 46, 48, 48, 99, _
    102, 103, 0, 0, 8, 50, 0, 0, 8, 0, 0, 0, 46, 67, 82, 84, _
    36, 88, 67, 65, 0, 0, 0, 0, 16, 50, 0, 0, 24, 0, 0, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr31) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr31(0)), 24 * (UBound(arr31) + 1)
    
    
    arr32 = Array(46, 67, 82, 84, 36, 88, 67, 85, 0, 0, 0, 0, 40, 50, 0, 0, _
    8, 0, 0, 0, 46, 67, 82, 84, 36, 88, 67, 90, 0, 0, 0, 0, _
    48, 50, 0, 0, 8, 0, 0, 0, 46, 67, 82, 84, 36, 88, 73, 65, _
    0, 0, 0, 0, 56, 50, 0, 0, 8, 0, 0, 0, 46, 67, 82, 84, _
    36, 88, 73, 90, 0, 0, 0, 0, 64, 50, 0, 0, 8, 0, 0, 0, _
    46, 67, 82, 84, 36, 88, 80, 65, 0, 0, 0, 0, 72, 50, 0, 0, _
    8, 0, 0, 0, 46, 67, 82, 84, 36, 88, 80, 90, 0, 0, 0, 0, _
    80, 50, 0, 0, 8, 0, 0, 0, 46, 67, 82, 84, 36, 88, 84, 65, _
    0, 0, 0, 0, 88, 50, 0, 0, 8, 0, 0, 0, 46, 67, 82, 84, _
    36, 88, 84, 90, 0, 0, 0, 0, 96, 50, 0, 0, 48, 3, 0, 0, _
    46, 114, 100, 97, 116, 97, 0, 0, 144, 53, 0, 0, 244, 1, 0, 0, _
    46, 114, 100, 97, 116, 97, 36, 114, 0, 0, 0, 0, 132, 55, 0, 0, _
    44, 3, 0, 0, 46, 114, 100, 97, 116, 97, 36, 122, 122, 122, 100, 98, _
    103, 0, 0, 0, 176, 58, 0, 0, 8, 0, 0, 0, 46, 114, 116, 99, _
    36, 73, 65, 65, 0, 0, 0, 0, 184, 58, 0, 0, 8, 0, 0, 0, _
    46, 114, 116, 99, 36, 73, 90, 90, 0, 0, 0, 0, 192, 58, 0, 0, _
    8, 0, 0, 0, 46, 114, 116, 99, 36, 84, 65, 65, 0, 0, 0, 0, _
    200, 58, 0, 0, 8, 0, 0, 0, 46, 114, 116, 99, 36, 84, 90, 90, _
    0, 0, 0, 0, 208, 58, 0, 0, 192, 1, 0, 0, 46, 120, 100, 97, _
    116, 97, 0, 0, 144, 60, 0, 0, 240, 0, 0, 0, 46, 120, 100, 97, _
    116, 97, 36, 120, 0, 0, 0, 0, 128, 61, 0, 0, 96, 0, 0, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr32) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr32(0)), 24 * (UBound(arr32) + 1)
    
    
    arr33 = Array(46, 101, 100, 97, 116, 97, 0, 0, 224, 61, 0, 0, 120, 0, 0, 0, _
    46, 105, 100, 97, 116, 97, 36, 50, 0, 0, 0, 0, 88, 62, 0, 0, _
    24, 0, 0, 0, 46, 105, 100, 97, 116, 97, 36, 51, 0, 0, 0, 0, _
    112, 62, 0, 0, 248, 1, 0, 0, 46, 105, 100, 97, 116, 97, 36, 52, _
    0, 0, 0, 0, 104, 64, 0, 0, 222, 4, 0, 0, 46, 105, 100, 97, _
    116, 97, 36, 54, 0, 0, 0, 0, 0, 80, 0, 0, 56, 0, 0, 0, _
    46, 100, 97, 116, 97, 0, 0, 0, 56, 80, 0, 0, 168, 0, 0, 0, _
    46, 100, 97, 116, 97, 36, 114, 0, 224, 80, 0, 0, 80, 6, 0, 0, _
    46, 98, 115, 115, 0, 0, 0, 0, 0, 96, 0, 0, 172, 2, 0, 0, _
    46, 112, 100, 97, 116, 97, 0, 0, 0, 112, 0, 0, 96, 0, 0, 0, _
    46, 114, 115, 114, 99, 36, 48, 49, 0, 0, 0, 0, 96, 112, 0, 0, _
    128, 1, 0, 0, 46, 114, 115, 114, 99, 36, 48, 50, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    1, 4, 1, 0, 4, 66, 0, 0, 1, 15, 6, 0, 15, 100, 7, 0, _
    15, 52, 6, 0, 15, 50, 11, 112, 1, 10, 4, 0, 10, 52, 6, 0, _
    10, 50, 6, 112, 1, 29, 10, 0, 29, 116, 10, 0, 21, 100, 13, 0, _
    21, 84, 12, 0, 21, 52, 11, 0, 21, 114, 17, 224, 1, 20, 8, 0, _
    20, 100, 10, 0, 20, 84, 9, 0, 20, 52, 8, 0, 20, 82, 16, 112)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr33) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr33(0)), 24 * (UBound(arr33) + 1)
    
    
    arr34 = Array(25, 29, 5, 0, 11, 1, 106, 0, 4, 112, 3, 96, 2, 48, 0, 0, _
    156, 42, 0, 0, 64, 3, 0, 0, 1, 6, 2, 0, 6, 50, 2, 48, _
    25, 27, 3, 0, 9, 1, 72, 0, 2, 48, 0, 0, 156, 42, 0, 0, _
    48, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 17, 21, 8, 0, _
    21, 116, 9, 0, 21, 100, 7, 0, 21, 52, 6, 0, 21, 50, 17, 224, _
    38, 42, 0, 0, 1, 0, 0, 0, 55, 27, 0, 0, 172, 27, 0, 0, _
    50, 43, 0, 0, 0, 0, 0, 0, 17, 15, 6, 0, 15, 100, 8, 0, _
    15, 52, 6, 0, 15, 50, 11, 112, 38, 42, 0, 0, 1, 0, 0, 0, _
    70, 28, 0, 0, 110, 28, 0, 0, 73, 43, 0, 0, 0, 0, 0, 0, _
    1, 6, 2, 0, 6, 50, 2, 80, 1, 20, 8, 0, 20, 100, 8, 0, _
    20, 84, 7, 0, 20, 52, 6, 0, 20, 50, 16, 112, 9, 26, 6, 0, _
    26, 52, 15, 0, 26, 114, 22, 224, 20, 112, 19, 96, 38, 42, 0, 0, _
    1, 0, 0, 0, 209, 28, 0, 0, 123, 29, 0, 0, 101, 43, 0, 0, _
    123, 29, 0, 0, 1, 6, 2, 0, 6, 82, 2, 80, 1, 9, 1, 0, _
    9, 98, 0, 0, 1, 8, 4, 0, 8, 114, 4, 112, 3, 96, 2, 48, _
    1, 13, 4, 0, 13, 52, 9, 0, 13, 50, 6, 80, 9, 4, 1, 0, _
    4, 34, 0, 0, 38, 42, 0, 0, 1, 0, 0, 0, 155, 35, 0, 0, _
    38, 36, 0, 0, 155, 43, 0, 0, 38, 36, 0, 0, 1, 2, 1, 0, _
    2, 80, 0, 0, 1, 13, 4, 0, 13, 52, 10, 0, 13, 114, 6, 80, _
    1, 21, 5, 0, 21, 52, 186, 0, 21, 1, 184, 0, 6, 80, 0, 0, _
    1, 4, 1, 0, 4, 130, 0, 0, 1, 18, 8, 0, 18, 84, 8, 0, _
    18, 52, 7, 0, 18, 18, 14, 224, 12, 112, 11, 96, 0, 0, 0, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr34) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr34(0)), 24 * (UBound(arr34) + 1)
    
    
    arr35 = Array(1, 0, 0, 0, 1, 2, 1, 0, 2, 48, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 104, 39, 0, 0, 0, 0, 0, 0, 176, 60, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    2, 0, 0, 0, 200, 60, 0, 0, 240, 60, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 56, 80, 0, 0, _
    0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 24, 0, 0, 0, _
    112, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 96, 80, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, _
    0, 0, 0, 0, 24, 0, 0, 0, 48, 39, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 104, 39, 0, 0, _
    0, 0, 0, 0, 56, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 88, 61, 0, 0, _
    200, 60, 0, 0, 240, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 80, 0, 0, _
    0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 24, 0, 0, 0, _
    208, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 24, 133, 39, 90, 0, 0, 0, 0, 188, 61, 0, 0, _
    1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 168, 61, 0, 0, _
    176, 61, 0, 0, 184, 61, 0, 0, 96, 16, 0, 0, 192, 18, 0, 0, _
    203, 61, 0, 0, 212, 61, 0, 0, 0, 0, 1, 0, 88, 108, 83, 117, _
    98, 67, 108, 97, 115, 115, 46, 100, 108, 108, 0, 83, 117, 98, 67, 108, _
    97, 115, 115, 0, 85, 110, 83, 117, 98, 67, 108, 97, 115, 115, 0, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr35) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr35(0)), 24 * (UBound(arr35) + 1)
    
    
    arr36 = Array(112, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 158, 64, 0, 0, _
    0, 48, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    28, 66, 0, 0, 144, 48, 0, 0, 184, 63, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 178, 66, 0, 0, 72, 49, 0, 0, 88, 64, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 146, 67, 0, 0, 232, 49, 0, 0, _
    16, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, 67, 0, 0, _
    160, 49, 0, 0, 240, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    214, 67, 0, 0, 128, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    104, 64, 0, 0, 0, 0, 0, 0, 126, 64, 0, 0, 0, 0, 0, 0, _
    146, 64, 0, 0, 0, 0, 0, 0, 50, 69, 0, 0, 0, 0, 0, 0, _
    28, 69, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, _
    230, 68, 0, 0, 0, 0, 0, 0, 208, 68, 0, 0, 0, 0, 0, 0, _
    182, 68, 0, 0, 0, 0, 0, 0, 154, 68, 0, 0, 0, 0, 0, 0, _
    134, 68, 0, 0, 0, 0, 0, 0, 114, 68, 0, 0, 0, 0, 0, 0, _
    84, 68, 0, 0, 0, 0, 0, 0, 56, 68, 0, 0, 0, 0, 0, 0, _
    36, 68, 0, 0, 0, 0, 0, 0, 10, 68, 0, 0, 0, 0, 0, 0, _
    246, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    168, 65, 0, 0, 0, 0, 0, 0, 188, 65, 0, 0, 0, 0, 0, 0, _
    206, 65, 0, 0, 0, 0, 0, 0, 218, 65, 0, 0, 0, 0, 0, 0, _
    232, 65, 0, 0, 0, 0, 0, 0, 250, 65, 0, 0, 0, 0, 0, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr36) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr36(0)), 24 * (UBound(arr36) + 1)
    
    
    arr37 = Array(10, 66, 0, 0, 0, 0, 0, 0, 206, 64, 0, 0, 0, 0, 0, 0, _
    220, 64, 0, 0, 0, 0, 0, 0, 240, 64, 0, 0, 0, 0, 0, 0, _
    4, 65, 0, 0, 0, 0, 0, 0, 20, 65, 0, 0, 0, 0, 0, 0, _
    34, 65, 0, 0, 0, 0, 0, 0, 46, 65, 0, 0, 0, 0, 0, 0, _
    152, 65, 0, 0, 0, 0, 0, 0, 68, 65, 0, 0, 0, 0, 0, 0, _
    90, 65, 0, 0, 0, 0, 0, 0, 108, 65, 0, 0, 0, 0, 0, 0, _
    120, 65, 0, 0, 0, 0, 0, 0, 134, 65, 0, 0, 0, 0, 0, 0, _
    172, 64, 0, 0, 0, 0, 0, 0, 194, 64, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 64, 66, 0, 0, 0, 0, 0, 0, _
    96, 66, 0, 0, 0, 0, 0, 0, 106, 66, 0, 0, 0, 0, 0, 0, _
    130, 66, 0, 0, 0, 0, 0, 0, 156, 66, 0, 0, 0, 0, 0, 0, _
    40, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    138, 67, 0, 0, 0, 0, 0, 0, 232, 66, 0, 0, 0, 0, 0, 0, _
    244, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    42, 67, 0, 0, 0, 0, 0, 0, 16, 67, 0, 0, 0, 0, 0, 0, _
    218, 66, 0, 0, 0, 0, 0, 0, 206, 66, 0, 0, 0, 0, 0, 0, _
    128, 67, 0, 0, 0, 0, 0, 0, 104, 67, 0, 0, 0, 0, 0, 0, _
    254, 66, 0, 0, 0, 0, 0, 0, 76, 67, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 196, 66, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 29, 2, 71, 101, 116, 67, 117, 114, _
    114, 101, 110, 116, 84, 104, 114, 101, 97, 100, 73, 100, 0, 0, 118, 2)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr37) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr37(0)), 24 * (UBound(arr37) + 1)
    
    
    arr38 = Array(71, 101, 116, 77, 111, 100, 117, 108, 101, 72, 97, 110, 100, 108, 101, 87, _
    0, 0, 45, 6, 108, 115, 116, 114, 99, 109, 112, 87, 0, 0, 75, 69, _
    82, 78, 69, 76, 51, 50, 46, 100, 108, 108, 0, 0, 8, 3, 83, 101, _
    116, 70, 111, 114, 101, 103, 114, 111, 117, 110, 100, 87, 105, 110, 100, 111, _
    119, 0, 50, 2, 75, 105, 108, 108, 84, 105, 109, 101, 114, 0, 67, 1, _
    71, 101, 116, 68, 108, 103, 73, 116, 101, 109, 0, 0, 79, 3, 83, 101, _
    116, 87, 105, 110, 100, 111, 119, 115, 72, 111, 111, 107, 69, 120, 87, 0, _
    0, 1, 69, 110, 117, 109, 84, 104, 114, 101, 97, 100, 87, 105, 110, 100, _
    111, 119, 115, 0, 42, 1, 71, 101, 116, 67, 108, 97, 115, 115, 78, 97, _
    109, 101, 87, 0, 13, 1, 70, 105, 110, 100, 87, 105, 110, 100, 111, 119, _
    87, 0, 38, 3, 83, 101, 116, 80, 114, 111, 112, 87, 0, 0, 123, 3, _
    85, 110, 104, 111, 111, 107, 87, 105, 110, 100, 111, 119, 115, 72, 111, 111, _
    107, 69, 120, 0, 76, 1, 71, 101, 116, 70, 111, 114, 101, 103, 114, 111, _
    117, 110, 100, 87, 105, 110, 100, 111, 119, 0, 222, 1, 71, 101, 116, 87, _
    105, 110, 100, 111, 119, 84, 101, 120, 116, 65, 0, 0, 54, 3, 83, 101, _
    116, 84, 105, 109, 101, 114, 0, 0, 87, 3, 83, 104, 111, 119, 87, 105, _
    110, 100, 111, 119, 0, 0, 30, 0, 67, 97, 108, 108, 78, 101, 120, 116, _
    72, 111, 111, 107, 69, 120, 0, 0, 236, 2, 83, 101, 110, 100, 77, 101, _
    115, 115, 97, 103, 101, 87, 0, 0, 67, 3, 83, 101, 116, 87, 105, 110, _
    100, 111, 119, 76, 111, 110, 103, 80, 116, 114, 87, 0, 239, 2, 83, 101, _
    116, 65, 99, 116, 105, 118, 101, 87, 105, 110, 100, 111, 119, 0, 160, 1)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr38) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr38(0)), 24 * (UBound(arr38) + 1)
    
    
    arr39 = Array(71, 101, 116, 80, 114, 111, 112, 87, 0, 0, 177, 3, 107, 101, 121, 98, _
    100, 95, 101, 118, 101, 110, 116, 0, 47, 2, 73, 115, 87, 105, 110, 100, _
    111, 119, 86, 105, 115, 105, 98, 108, 101, 0, 137, 2, 80, 111, 115, 116, _
    77, 101, 115, 115, 97, 103, 101, 87, 0, 0, 32, 0, 67, 97, 108, 108, _
    87, 105, 110, 100, 111, 119, 80, 114, 111, 99, 87, 0, 85, 83, 69, 82, _
    51, 50, 46, 100, 108, 108, 0, 0, 8, 0, 95, 95, 67, 95, 115, 112, _
    101, 99, 105, 102, 105, 99, 95, 104, 97, 110, 100, 108, 101, 114, 0, 0, _
    37, 0, 95, 95, 115, 116, 100, 95, 116, 121, 112, 101, 95, 105, 110, 102, _
    111, 95, 100, 101, 115, 116, 114, 111, 121, 95, 108, 105, 115, 116, 0, 0, _
    62, 0, 109, 101, 109, 115, 101, 116, 0, 0, 33, 0, 95, 95, 115, 116, _
    100, 95, 101, 120, 99, 101, 112, 116, 105, 111, 110, 95, 99, 111, 112, 121, _
    0, 0, 34, 0, 95, 95, 115, 116, 100, 95, 101, 120, 99, 101, 112, 116, _
    105, 111, 110, 95, 100, 101, 115, 116, 114, 111, 121, 0, 1, 0, 95, 67, _
    120, 120, 84, 104, 114, 111, 119, 69, 120, 99, 101, 112, 116, 105, 111, 110, _
    0, 0, 86, 67, 82, 85, 78, 84, 73, 77, 69, 49, 52, 48, 46, 100, _
    108, 108, 0, 0, 142, 0, 115, 116, 114, 110, 99, 109, 112, 0, 54, 0, _
    95, 105, 110, 105, 116, 116, 101, 114, 109, 0, 55, 0, 95, 105, 110, 105, _
    116, 116, 101, 114, 109, 95, 101, 0, 8, 0, 95, 99, 97, 108, 108, 110, _
    101, 119, 104, 0, 25, 0, 109, 97, 108, 108, 111, 99, 0, 0, 63, 0, _
    95, 115, 101, 104, 95, 102, 105, 108, 116, 101, 114, 95, 100, 108, 108, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr39) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr39(0)), 24 * (UBound(arr39) + 1)
    
    
    arr40 = Array(24, 0, 95, 99, 111, 110, 102, 105, 103, 117, 114, 101, 95, 110, 97, 114, _
    114, 111, 119, 95, 97, 114, 103, 118, 0, 0, 51, 0, 95, 105, 110, 105, _
    116, 105, 97, 108, 105, 122, 101, 95, 110, 97, 114, 114, 111, 119, 95, 101, _
    110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 0, 0, 52, 0, 95, 105, _
    110, 105, 116, 105, 97, 108, 105, 122, 101, 95, 111, 110, 101, 120, 105, 116, _
    95, 116, 97, 98, 108, 101, 0, 0, 34, 0, 95, 101, 120, 101, 99, 117, _
    116, 101, 95, 111, 110, 101, 120, 105, 116, 95, 116, 97, 98, 108, 101, 0, _
    22, 0, 95, 99, 101, 120, 105, 116, 0, 0, 24, 0, 102, 114, 101, 101, _
    0, 0, 97, 112, 105, 45, 109, 115, 45, 119, 105, 110, 45, 99, 114, 116, _
    45, 115, 116, 114, 105, 110, 103, 45, 108, 49, 45, 49, 45, 48, 46, 100, _
    108, 108, 0, 0, 97, 112, 105, 45, 109, 115, 45, 119, 105, 110, 45, 99, _
    114, 116, 45, 114, 117, 110, 116, 105, 109, 101, 45, 108, 49, 45, 49, 45, _
    48, 46, 100, 108, 108, 0, 97, 112, 105, 45, 109, 115, 45, 119, 105, 110, _
    45, 99, 114, 116, 45, 104, 101, 97, 112, 45, 108, 49, 45, 49, 45, 48, _
    46, 100, 108, 108, 0, 0, 194, 4, 82, 116, 108, 67, 97, 112, 116, 117, _
    114, 101, 67, 111, 110, 116, 101, 120, 116, 0, 201, 4, 82, 116, 108, 76, _
    111, 111, 107, 117, 112, 70, 117, 110, 99, 116, 105, 111, 110, 69, 110, 116, _
    114, 121, 0, 0, 208, 4, 82, 116, 108, 86, 105, 114, 116, 117, 97, 108, _
    85, 110, 119, 105, 110, 100, 0, 0, 169, 5, 85, 110, 104, 97, 110, 100)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr40) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr40(0)), 24 * (UBound(arr40) + 1)
    
    
    Call BuildDll4

End Sub

Sub BuildDll4(Optional ByVal Flag As Boolean)

    arr41 = Array(108, 101, 100, 69, 120, 99, 101, 112, 116, 105, 111, 110, 70, 105, 108, 116, _
    101, 114, 0, 0, 105, 5, 83, 101, 116, 85, 110, 104, 97, 110, 100, 108, _
    101, 100, 69, 120, 99, 101, 112, 116, 105, 111, 110, 70, 105, 108, 116, 101, _
    114, 0, 24, 2, 71, 101, 116, 67, 117, 114, 114, 101, 110, 116, 80, 114, _
    111, 99, 101, 115, 115, 0, 135, 5, 84, 101, 114, 109, 105, 110, 97, 116, _
    101, 80, 114, 111, 99, 101, 115, 115, 0, 0, 126, 3, 73, 115, 80, 114, _
    111, 99, 101, 115, 115, 111, 114, 70, 101, 97, 116, 117, 114, 101, 80, 114, _
    101, 115, 101, 110, 116, 0, 65, 4, 81, 117, 101, 114, 121, 80, 101, 114, _
    102, 111, 114, 109, 97, 110, 99, 101, 67, 111, 117, 110, 116, 101, 114, 0, _
    25, 2, 71, 101, 116, 67, 117, 114, 114, 101, 110, 116, 80, 114, 111, 99, _
    101, 115, 115, 73, 100, 0, 232, 2, 71, 101, 116, 83, 121, 115, 116, 101, _
    109, 84, 105, 109, 101, 65, 115, 70, 105, 108, 101, 84, 105, 109, 101, 0, _
    30, 1, 68, 105, 115, 97, 98, 108, 101, 84, 104, 114, 101, 97, 100, 76, _
    105, 98, 114, 97, 114, 121, 67, 97, 108, 108, 115, 0, 97, 3, 73, 110, _
    105, 116, 105, 97, 108, 105, 122, 101, 83, 76, 105, 115, 116, 72, 101, 97, _
    100, 0, 119, 3, 73, 115, 68, 101, 98, 117, 103, 103, 101, 114, 80, 114, _
    101, 115, 101, 110, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr41) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr41(0)), 24 * (UBound(arr41) + 1)
    
    
    arr42 = Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    205, 93, 32, 210, 102, 212, 255, 255, 50, 162, 223, 45, 153, 43, 0, 0, _
    255, 255, 255, 255, 0, 0, 0, 0, 47, 32, 0, 0, 0, 0, 0, 0, _
    1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    1, 0, 0, 0, 0, 0, 0, 0, 8, 51, 0, 128, 1, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 46, 63, 65, 86, 98, 97, 100, 95, _
    97, 108, 108, 111, 99, 64, 115, 116, 100, 64, 64, 0, 0, 0, 0, 0, _
    8, 51, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    46, 63, 65, 86, 101, 120, 99, 101, 112, 116, 105, 111, 110, 64, 115, 116, _
    100, 64, 64, 0, 0, 0, 0, 0, 8, 51, 0, 128, 1, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 46, 63, 65, 86, 98, 97, 100, 95, _
    97, 114, 114, 97, 121, 95, 110, 101, 119, 95, 108, 101, 110, 103, 116, 104, _
    64, 115, 116, 100, 64, 64, 0, 0, 8, 51, 0, 128, 1, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 46, 63, 65, 86, 116, 121, 112, 101)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr42) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr42(0)), 24 * (UBound(arr42) + 1)
    
    
    arr43 = Array(95, 105, 110, 102, 111, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 16, 0, 0, 26, 16, 0, 0, 208, 58, 0, 0, 32, 16, 0, 0, _
    58, 16, 0, 0, 208, 58, 0, 0, 64, 16, 0, 0, 90, 16, 0, 0, _
    208, 58, 0, 0, 96, 16, 0, 0, 179, 18, 0, 0, 216, 58, 0, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr43) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr43(0)), 24 * (UBound(arr43) + 1)
    
    
    arr44 = Array(192, 18, 0, 0, 30, 19, 0, 0, 232, 58, 0, 0, 32, 19, 0, 0, _
    4, 20, 0, 0, 208, 58, 0, 0, 16, 20, 0, 0, 211, 20, 0, 0, _
    244, 58, 0, 0, 224, 20, 0, 0, 149, 21, 0, 0, 12, 59, 0, 0, _
    160, 21, 0, 0, 3, 25, 0, 0, 32, 59, 0, 0, 16, 25, 0, 0, _
    178, 25, 0, 0, 56, 59, 0, 0, 192, 25, 0, 0, 255, 25, 0, 0, _
    208, 58, 0, 0, 0, 26, 0, 0, 108, 26, 0, 0, 64, 59, 0, 0, _
    128, 26, 0, 0, 161, 26, 0, 0, 88, 59, 0, 0, 172, 26, 0, 0, _
    252, 26, 0, 0, 208, 58, 0, 0, 252, 26, 0, 0, 15, 28, 0, 0, _
    92, 59, 0, 0, 16, 28, 0, 0, 156, 28, 0, 0, 136, 59, 0, 0, _
    156, 28, 0, 0, 145, 29, 0, 0, 204, 59, 0, 0, 148, 29, 0, 0, _
    232, 29, 0, 0, 184, 59, 0, 0, 232, 29, 0, 0, 37, 30, 0, 0, _
    216, 58, 0, 0, 40, 30, 0, 0, 92, 30, 0, 0, 56, 59, 0, 0, _
    92, 30, 0, 0, 45, 31, 0, 0, 252, 59, 0, 0, 48, 31, 0, 0, _
    161, 31, 0, 0, 4, 60, 0, 0, 164, 31, 0, 0, 224, 31, 0, 0, _
    56, 59, 0, 0, 224, 31, 0, 0, 140, 32, 0, 0, 16, 60, 0, 0, _
    140, 32, 0, 0, 175, 32, 0, 0, 208, 58, 0, 0, 220, 32, 0, 0, _
    247, 32, 0, 0, 208, 58, 0, 0, 248, 32, 0, 0, 49, 33, 0, 0, _
    208, 58, 0, 0, 52, 33, 0, 0, 104, 33, 0, 0, 208, 58, 0, 0, _
    104, 33, 0, 0, 125, 33, 0, 0, 208, 58, 0, 0, 128, 33, 0, 0, _
    168, 33, 0, 0, 208, 58, 0, 0, 168, 33, 0, 0, 189, 33, 0, 0, _
    208, 58, 0, 0, 192, 33, 0, 0, 33, 34, 0, 0, 184, 59, 0, 0, _
    36, 34, 0, 0, 84, 34, 0, 0, 208, 58, 0, 0, 84, 34, 0, 0, _
    104, 34, 0, 0, 208, 58, 0, 0, 104, 34, 0, 0, 177, 34, 0, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr44) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr44(0)), 24 * (UBound(arr44) + 1)
    
    
    arr45 = Array(56, 59, 0, 0, 180, 34, 0, 0, 147, 35, 0, 0, 68, 60, 0, 0, _
    148, 35, 0, 0, 45, 36, 0, 0, 28, 60, 0, 0, 48, 36, 0, 0, _
    84, 36, 0, 0, 56, 59, 0, 0, 84, 36, 0, 0, 127, 36, 0, 0, _
    56, 59, 0, 0, 136, 36, 0, 0, 205, 37, 0, 0, 80, 60, 0, 0, _
    208, 37, 0, 0, 26, 38, 0, 0, 216, 58, 0, 0, 28, 38, 0, 0, _
    102, 38, 0, 0, 216, 58, 0, 0, 112, 38, 0, 0, 175, 38, 0, 0, _
    56, 59, 0, 0, 208, 38, 0, 0, 15, 39, 0, 0, 56, 59, 0, 0, _
    48, 39, 0, 0, 101, 39, 0, 0, 56, 59, 0, 0, 124, 39, 0, 0, _
    190, 39, 0, 0, 232, 58, 0, 0, 192, 39, 0, 0, 224, 39, 0, 0, _
    96, 60, 0, 0, 224, 39, 0, 0, 0, 40, 0, 0, 96, 60, 0, 0, _
    20, 40, 0, 0, 207, 41, 0, 0, 104, 60, 0, 0, 240, 41, 0, 0, _
    27, 42, 0, 0, 56, 59, 0, 0, 156, 42, 0, 0, 185, 42, 0, 0, _
    208, 58, 0, 0, 188, 42, 0, 0, 21, 43, 0, 0, 132, 60, 0, 0, _
    48, 43, 0, 0, 50, 43, 0, 0, 128, 60, 0, 0, 50, 43, 0, 0, _
    73, 43, 0, 0, 176, 59, 0, 0, 73, 43, 0, 0, 101, 43, 0, 0, _
    176, 59, 0, 0, 101, 43, 0, 0, 155, 43, 0, 0, 244, 59, 0, 0, _
    155, 43, 0, 0, 179, 43, 0, 0, 60, 60, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr45) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr45(0)), 24 * (UBound(arr45) + 1)
    
    
    arr46 = Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, _
    24, 0, 0, 0, 24, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 48, 0, 0, 128, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr46) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr46(0)), 24 * (UBound(arr46) + 1)
    
    
    arr47 = Array(9, 4, 0, 0, 72, 0, 0, 0, 96, 112, 0, 0, 125, 1, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    60, 63, 120, 109, 108, 32, 118, 101, 114, 115, 105, 111, 110, 61, 39, 49, _
    46, 48, 39, 32, 101, 110, 99, 111, 100, 105, 110, 103, 61, 39, 85, 84, _
    70, 45, 56, 39, 32, 115, 116, 97, 110, 100, 97, 108, 111, 110, 101, 61, _
    39, 121, 101, 115, 39, 63, 62, 13, 10, 60, 97, 115, 115, 101, 109, 98, _
    108, 121, 32, 120, 109, 108, 110, 115, 61, 39, 117, 114, 110, 58, 115, 99, _
    104, 101, 109, 97, 115, 45, 109, 105, 99, 114, 111, 115, 111, 102, 116, 45, _
    99, 111, 109, 58, 97, 115, 109, 46, 118, 49, 39, 32, 109, 97, 110, 105, _
    102, 101, 115, 116, 86, 101, 114, 115, 105, 111, 110, 61, 39, 49, 46, 48, _
    39, 62, 13, 10, 32, 32, 60, 116, 114, 117, 115, 116, 73, 110, 102, 111, _
    32, 120, 109, 108, 110, 115, 61, 34, 117, 114, 110, 58, 115, 99, 104, 101, _
    109, 97, 115, 45, 109, 105, 99, 114, 111, 115, 111, 102, 116, 45, 99, 111, _
    109, 58, 97, 115, 109, 46, 118, 51, 34, 62, 13, 10, 32, 32, 32, 32, _
    60, 115, 101, 99, 117, 114, 105, 116, 121, 62, 13, 10, 32, 32, 32, 32, _
    32, 32, 60, 114, 101, 113, 117, 101, 115, 116, 101, 100, 80, 114, 105, 118, _
    105, 108, 101, 103, 101, 115, 62, 13, 10, 32, 32, 32, 32, 32, 32, 32, _
    32, 60, 114, 101, 113, 117, 101, 115, 116, 101, 100, 69, 120, 101, 99, 117)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr47) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr47(0)), 24 * (UBound(arr47) + 1)
    
    
    arr48 = Array(116, 105, 111, 110, 76, 101, 118, 101, 108, 32, 108, 101, 118, 101, 108, 61, _
    39, 97, 115, 73, 110, 118, 111, 107, 101, 114, 39, 32, 117, 105, 65, 99, _
    99, 101, 115, 115, 61, 39, 102, 97, 108, 115, 101, 39, 32, 47, 62, 13, _
    10, 32, 32, 32, 32, 32, 32, 60, 47, 114, 101, 113, 117, 101, 115, 116, _
    101, 100, 80, 114, 105, 118, 105, 108, 101, 103, 101, 115, 62, 13, 10, 32, _
    32, 32, 32, 60, 47, 115, 101, 99, 117, 114, 105, 116, 121, 62, 13, 10, _
    32, 32, 60, 47, 116, 114, 117, 115, 116, 73, 110, 102, 111, 62, 13, 10, _
    60, 47, 97, 115, 115, 101, 109, 98, 108, 121, 62, 13, 10, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 48, 0, 0, 52, 0, 0, 0, 248, 161, 0, 162, 16, 162, 24, 162, _
    32, 162, 104, 162, 112, 162, 120, 162, 128, 162, 136, 162, 168, 162, 176, 162, _
    184, 162, 208, 162, 216, 162, 224, 162, 0, 163, 8, 163, 72, 165, 96, 165, _
    104, 165, 0, 0, 0, 80, 0, 0, 16, 0, 0, 0, 56, 160, 96, 160, _
    136, 160, 184, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr48) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr48(0)), 24 * (UBound(arr48) + 1)
    
    
    arr49 = Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
    
        lPos = UBound(arr1)
        ReDim Preserve arr1(UBound(arr1) + UBound(arr49) + 1)
        CopyMemory ByVal VarPtr(arr1(lPos + 1)), ByVal VarPtr(arr49(0)), 24 * (UBound(arr49) + 1)
    
    
       Call SaveDllToDisk(ByVal arr1)
End Sub


Private Sub SaveDllToDisk(ByVal Ar As Variant)
    Dim i As Long, FileNum As Long
    Dim bytes() As Byte
    ReDim bytes(LBound(Ar) To UBound(Ar))
    For i = LBound(Ar) To UBound(Ar)
        bytes(i) = CByte((Ar(i)))
    Next
    FileNum = FreeFile
    Open sDllPathName For Binary As [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FileNum]#FileNum[/URL] 
        Put [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FileNum]#FileNum[/URL] , 1, bytes
    Close FileNum
End Sub

2- Code in a Standard Module :

Subclassing code :
Code:
Option Explicit

Private Declare PtrSafe Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As LongPtr, ByVal hWnd2 As LongPtr, ByVal lpsz1 As String, ByVal lpsz2 As String) As LongPtr
Private Declare PtrSafe Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As LongPtr
Private Declare PtrSafe Function GetProcAddress Lib "kernel32" (ByVal hModule As LongPtr, ByVal lpProcName As String) As LongPtr
Private Declare PtrSafe Function SetXLSubClass Lib "user32" Alias "CallWindowProcA" (ByVal dllProcAddr As LongPtr, ByVal hwnd As LongPtr, ByVal VBAWindProcAddr As Long, ByVal hwndWbk As LongPtr, ByVal Null_ As LongPtr) As LongPtr
Private Declare PtrSafe Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As LongPtr
Private Declare PtrSafe Function FreeLibrary Lib "kernel32" (ByVal hLibModule As LongPtr) As Long
Private Declare PtrSafe Function SetProp Lib "user32" Alias "SetPropA" (ByVal hwnd As LongPtr, ByVal lpString As String, ByVal hData As LongPtr) As Long
Private Declare PtrSafe Function GetProp Lib "user32" Alias "GetPropA" (ByVal hwnd As LongPtr, ByVal lpString As String) As LongPtr
Private Declare PtrSafe Function RemoveProp Lib "user32" Alias "RemovePropA" (ByVal hwnd As LongPtr, ByVal lpString As String) As LongPtr
   
Private hwndWbk As LongPtr
Private pProcAddr As LongPtr
Private sDllPathName As String
    
Public Sub SubclassWindow(ByVal hwnd As LongPtr, MyWindowProcedure As LongPtr)
        sDllPathName = Environ("temp") & "\XlSubClass.dll"
        If GetProp(Application.hwnd, "OnTimeDelay") = 0 Then
            If Len(Dir(sDllPathName)) = 0 Then
                Call BuildDll(sDllPathName)
            End If
            Call Application.OnTime(Now, "'SubclassWindow " & hwnd & "," & MyWindowProcedure & "'")
            Call SetProp(Application.hwnd, "OnTimeDelay", 1)
            Exit Sub
        End If
        Call SetProp(hwnd, "Subclassed", 1)
        hwndWbk = FindWindowEx(FindWindowEx(Application.hwnd, 0, "XLDESK", vbNullString), 0, "EXCEL7", vbNullString)
        Call LoadLibrary(sDllPathName)
        pProcAddr = GetProcAddress(GetModuleHandle(sDllPathName), "SubClass")
        Call SetXLSubClass(pProcAddr, hwnd, CLng(MyWindowProcedure), hwndWbk, 0)
        Call RemoveProp(Application.hwnd, "OnTimeDelay")
End Sub

Public Sub UnSubclassWindow(ByVal hwnd As LongPtr)

    sDllPathName = Environ("temp") & "\XlSubClass.dll"
    pProcAddr = GetProcAddress(GetModuleHandle(sDllPathName), "UnSubClass")
    SetXLSubClass pProcAddr, hwnd, 0, 0, 0
    Call SetProp(hwnd, "Subclassed", 0)
    
End Sub

3- Code in a Standard Module

Test code :
Code:
Option Explicit

Private Type POINTAPI
     x As Long
     y As Long
End Type

Private Type MINMAXINFO
     ptReserved As POINTAPI
     ptMaxSize As POINTAPI
     ptMaxPosition As POINTAPI
     ptMinTrackSize As POINTAPI
     ptMaxTrackSize As POINTAPI
End Type

Private Declare PtrSafe Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As LongPtr)
Private Declare PtrSafe Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As LongPtr, ByVal hWnd2 As LongPtr, ByVal lpsz1 As String, ByVal lpsz2 As String) As LongPtr

Private MMinfo As MINMAXINFO
Private Const WM_GETMINMAXINFO = &H24
Private Const MinWidth = 600
Private Const MinHeight = 600
Private Const WM_MOUSEWHEEL = &H20A

Sub Start_Test()
[B][COLOR=#008000]    'Subclass the excel and workbook windows.[/COLOR][/B]
[B][COLOR=#008000]    '***************************************[/COLOR][/B]
    Call SubclassWindow(Application.hwnd, AddressOf WinProc)
    Call SubclassWindow(WorkBook_Hwnd, AddressOf WinProc)
End Sub

Sub Finish_Test()
    Call UnSubclassWindow(Application.hwnd)
    Call UnSubclassWindow(WorkBook_Hwnd)
End Sub

Sub UnSubclassExcelMainWindow()
    Call UnSubclassWindow(Application.hwnd)
End Sub

Sub UnSubclassTheWorkbookWindow()
    Call UnSubclassWindow(WorkBook_Hwnd)
End Sub

Private Property Get WorkBook_Hwnd() As LongPtr
    WorkBook_Hwnd = FindWindowEx(FindWindowEx(Application.hwnd, 0, "XLDESK", vbNullString), 0, "EXCEL7", vbNullString)
End Property


[B][COLOR=#008000]'**************************************************************************************************************************[/COLOR][/B]
[B][COLOR=#008000]'Restrict the min size of the excel and workbook windows (Horz>=600 and Vert>=800) pixels + disable the workbook mousewheel.[/COLOR][/B]
[B][COLOR=#008000]'**************************************************************************************************************************[/COLOR][/B]
Public Function WinProc(ByVal hwnd As LongPtr, ByVal uMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr

  Select Case uMsg
  
    Case WM_GETMINMAXINFO
        CopyMemory MMinfo, ByVal lParam, LenB(MMinfo)
        MMinfo.ptMinTrackSize.x = 600
        MMinfo.ptMinTrackSize.y = 800
        CopyMemory ByVal lParam, MMinfo, LenB(MMinfo)
        WinProc = -1
        
    Case WM_MOUSEWHEEL
        If hwnd = WorkBook_Hwnd Then
            WinProc = -1
            MsgBox "The MouseWheel is Disabled !"
        End If

    End Select

    Debug.Print hwnd; uMsg; wParam; lParam
    
End Function

Public Sub RaiseErrorTest()
    Dim x As Long
    x = 1 / 0
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top