Module: VRDdePokeServer

Includes:
VRDdeServer
Defined in:
lib/vr/vrdde.rb

Overview

by yukimi_sake

Constant Summary collapse

EXECUTEMETHOD =
"ddepoke"

Constants included from DDElParam

DDElParam::FreeDDElParam, DDElParam::PackDDElParam, DDElParam::ReuseDDElParam, DDElParam::UnpackDDElParam

Constants included from VRDdeConversation

VRDdeConversation::WM_DDE_ACK, VRDdeConversation::WM_DDE_ADVISE, VRDdeConversation::WM_DDE_DATA, VRDdeConversation::WM_DDE_EXECUTE, VRDdeConversation::WM_DDE_INITIATE, VRDdeConversation::WM_DDE_POKE, VRDdeConversation::WM_DDE_REQUEST, VRDdeConversation::WM_DDE_TERMINATE, VRDdeConversation::WM_DDE_UNADVISE

Constants included from VRMessageHandler

VRMessageHandler::PREHANDLERSTR

Instance Method Summary collapse

Methods included from VRDdeServer

#addDDEAppTopic, #ddeserverinit, #delDDEAppTopic, #self__ddeInitiate, #self__ddeTerminate, #self_ddeinitiate, #self_ddeterminate

Methods included from DDElParam

#freeDDElParam, #packDDElParam, #reuseDDElParam, #unpackDDElParam

Methods included from VRDdeConversation

#sendDDEAck

Methods included from VRMessageHandler

#acceptEvents, #addHandler, #addNoRelayMessages, #controlmsg_dispatching, #deleteHandler, #msghandlerinit, #selfmsg_dispatching

Instance Method Details

#ddepokeserverinitObject



281
282
283
284
# File 'lib/vr/vrdde.rb', line 281

def ddepokeserverinit
  addEvent WM_DDE_POKE
  addHandler WM_DDE_POKE,"_ddepokeinternal",MSGTYPE::ARGINTINT,nil
end

#self__ddepokeinternal(shwnd, lparam) ⇒ Object



291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
# File 'lib/vr/vrdde.rb', line 291

def self__ddepokeinternal(shwnd,lparam)
  cl=@_vr_clients[shwnd]
  raise "unknown dde client (not initiated)" unless cl
  hdata,aitem = unpackDDElParam(WM_DDE_POKE,lparam)
  item = GAtom::GetName(aitem)
  datastr = GMEM::Get(hdata)
  flag,cfmt,data = datastr.unpack("SsA*")
  if (flag&0x2000) > 0 then  # fRelease is asserted
    GMEM::Free(hdata)
  end
  ret=nil
  ret=selfmsg_dispatching(EXECUTEMETHOD,item,data,cfmt,*cl)
  freeDDElParam(WM_DDE_POKE, lparam)
  if ret.is_a?(DDEAckFlags) then
    sendDDEAck shwnd,aitem,(ret.retcode || 0),ret.ack,ret.busy
  else
    sendDDEAck shwnd,aitem
  end
end

#self_ddepoke(item, data, cfmt, shwnd, app, topic) ⇒ Object



310
# File 'lib/vr/vrdde.rb', line 310

def self_ddepoke(item,data,cfmt,shwnd,app,topic) end

#vrinitObject



286
287
288
289
# File 'lib/vr/vrdde.rb', line 286

def vrinit
  super
  ddepokeserverinit
end