send_query (Net::SSH::UserAuth::Pageant::Socket)

    # File lib/net/ssh/userauth/pageant.rb, line 130
              def send_query( query )
                res = nil
                filemap = 0
                ptr = nil
                id = DL::PtrData.malloc( DL.sizeof("L") )

                mapname = "PageantRequest%08x\000" % Win.getCurrentThreadId()
                filemap = Win.createFileMapping(Win::INVALID_HANDLE_VALUE,
                                                Win::NULL,
                                                Win::PAGE_READWRITE, 0,
                                                AGENT_MAX_MSGLEN, mapname)
                if filemap == 0
                  raise Net::SSH::Exception,
                    "Creation of file mapping failed"
                end

                ptr = Win.mapViewOfFile( filemap, Win::FILE_MAP_WRITE, 0, 0,
                                        AGENT_MAX_MSGLEN )

                if ptr.nil? || ptr.null?
                  raise Net::SSH::Exception, "Mapping of file failed"
                end

                ptr[0] = query

                cds = [AGENT_COPYDATA_ID, mapname.size + 1, mapname].
                  pack("LLp").to_ptr
                succ = Win.sendMessageTimeout( @win, Win::WM_COPYDATA, Win::NULL,
                  cds, Win::SMTO_NORMAL, 5000, id )

                if succ > 0
                  retlen = 4 + ptr.to_s(4).unpack("N")[0]
                  res = ptr.to_s(retlen)
                end

                return res
              ensure
                Win.unmapViewOfFile( ptr ) unless ptr.nil? || ptr.null?
                Win.closeHandle( filemap ) if filemap != 0
              end