1

When I paste in the following text by itself it crashes the console window. In the Taskmanager 'cmd.exe' still shows up, but I've noticed in the event view an Application Error for 'conhost.exe' at the same time. Is there some known irb or windows 7 error that can cause this?

ruby 1.9.3p392 (2013-02-22) [i386-mingw32]

text pasted in:

  ffi_convention :stdcall

  enum :lvm, [:LVM_GETITEMCOUNT, 4100,
          :LVM_DELETEALLITEMS, 4105,
          :LVM_GETNEXTITEM, 4108,
          :LVM_SETITEMPOSITION, 4111,
          :LVM_GETITEMPOSITION, 4112,
          :LVM_ARRANGE, 4118,
          :LVM_UPATE, 4138,
          :LVM_GETITEMTEXTA, 4141,
          :LVM_SETITEMTEXTA, 4142,
          :LVM_SETEXTENDEDLISTVIEWSTYLE, 4150,
          :LVM_GETEXTENDEDLISTVIEWSTYLE, 4151 ]

  enum :parameter, [:GW_CHILD, 5,
                :LVA_SNAPTOGRID, 5,
                :LVS_ALIGNLEFT, 2048,
                :LVS_EX_SNAPTOGRID, 524288,
                :SNAPTOGRID_ON, 365521968,
                :SNAPTOGRID_OFF, 364997680,
                :WS_POPUP, 0x80000000L ]

# Uses C Function to find the window handle(HWND) of a window with the specified text, in this case 'ProgMan'
attach_function :findWindow,
 :FindWindowA, [ :string, :parameter ], :int

# Gets passed in window handle's child window
attach_function :getChildWindow,
 :GetWindow, [ :ulong, :parameter], :int

# Sends a message to the passed in window long format
attach_function :SendMessageLong,
:SendMessageA, [ :ulong, :lvm, :parameter, :parameter ], :long
4

0 回答 0