C#GlobalAddAtom GlobalDeleteAtom

  コール:SendFormMessage(1052176" 213 412 341 234 " )。
        

        [DLLIMPORT(" KERNEL32.DLL "、CallingConvention = CallingConvention.StdCall、項目CharSet = CharSet.Unicode)]
         パブリック 静的 にextern  INT GlobalAddAtom(文字列lpString)。

        [DLLIMPORT(" KERNEL32.DLL "、CallingConvention = CallingConvention.StdCall、項目CharSet = CharSet.Unicode)]
         パブリック 静的 にextern  int型 GlobalDeleteAtom(INT 原子)。

        [DLLIMPORT(" user32.dllの"、エントリーポイント= " のSendMessage " )]
         プライベート 静的 にextern  int型のSendMessage(INT HWND、INT WMSG、INT wParamに、INT lParamに)。

        プライベート 静的 無効 SendFormMessage(int型 pHandle、文字列STEXT)
        {
            INT原子= GlobalAddAtom(STEXT)。
            SendMessage(pHandle、10250 、原子);
            GlobalDeleteAtom(原子)。
        }

 

おすすめ

転載: www.cnblogs.com/onlyou13/p/12026106.html