Windows API constants and functions
Exemplo n.º 1
0
        public void InitLoader(string sContent, string sBaseUrl)
        {
            m_sBaseName = sBaseUrl;
            int hr = WinApis.CreateStreamOnHGlobal(Marshal.StringToHGlobalAuto(sContent), true, out m_stream);

            if ((hr != 0) || (m_stream == null))
            {
                return;
            }
        }
Exemplo n.º 2
0
        public static string GetWindowClass(IntPtr Hwnd)
        {
            if (Hwnd == IntPtr.Zero)
            {
                return(string.Empty);
            }
            // This function gets the name of a window class from a window handle
            StringBuilder Title = new StringBuilder((int)WinApis.MAX_PATH);

            WinApis.RealGetWindowClass(Hwnd, Title, (int)WinApis.MAX_PATH);

            return(Title.ToString().Trim());
        }