I have to enter the file path in a text box of windows popup
I have tried a piece of the code which can return the handle of a window based on its name.
class Program
{
    private const int WM_GETTEXT = 13;
    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
    public static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
    private static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string lclassName, string windowTitle);
    [DllImport("user32.dll")]
    static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
    static void  Main(string[] args)
    {
        IntPtr Hwnd = FindWindow(null, "Choose File to Upload");
        // Alloc memory for the buffer that recieves the text
        IntPtr Handle = Marshal.AllocHGlobal(100);
        // send WM_GWTTEXT message to the notepad window
        int NumText = (int)SendMessage(Hwnd, WM_GETTEXT, (IntPtr)50, Handle);
        // copy the characters from the unmanaged memory to a managed string
        string Text = Marshal.PtrToStringUni(Handle);
    }
I need to set data in a text box of the window.

