I have been trying to set BlueStacks window transparent:
DWORD MakeWindowTransparent(HWND hWnd, unsigned char factor)
{
    /* First, see if we can get the API call we need. If we've tried
     * once, we don't need to try again. */
    if (!initialized)
    {
        HMODULE hDLL = LoadLibrary(L"user32");
        pSetLayeredWindowAttributes =
            (PSLWA)GetProcAddress(hDLL, "SetLayeredWindowAttributes");
        initialized = TRUE;
    }
    if (pSetLayeredWindowAttributes == NULL)
        return FALSE;
    /* Windows need to be layered to be made transparent. This is done
     * by modifying the extended style bits to contain WS_EX_LAYARED. */
    SetLastError(0);
    auto winlong = SetWindowLong(hWnd,
    GWL_EXSTYLE,
    GetWindowLong(hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
    if ((winlong == 0) && (GetLastError() != 0)) { 
        auto error = GetLastErrorAsString(); 
        return FALSE;
    } 
    if (!pSetLayeredWindowAttributes(hWnd,RGB(255, 255, 255),factor, LWA_COLORKEY | LWA_ALPHA))
    { 
        auto error = GetLastErrorAsString(); 
        return FALSE; 
    } 
    return TRUE;
}
int main() {
  HWND hWnd = FindWindowA(NULL, L"BlueStacks");
  MakeWindowTransparent(hWnd, 0);
}
BlueStacks can run in opengl and directx, I have tested the code above, using both modes.
MakeWindowTransparent is returning 0
pSetLayeredWindowAttributes auto error = GetLastErrorAsString(); error returned is: wrong parameter.
I have tested the code with other OpenGL windows, and it did not pause in any of the errors, also the window got transparent correctly.
Some information I have collected about the window:
Appreciate any help.

