当我单独粘贴以下文本时,它会崩溃控制台窗口。在Taskmanager中,'cmd.exe'仍然显示,但我在事件视图中注意到'conhost.exe'同时存在应用程序错误。是否有一些已知的irb或Windows 7错误导致这种情况?
ruby 1.9.3p392(2013-02-22)[i386-mingw32]
粘贴的文字:
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