ClientSendHandler(PipeConnection * connection, Message * message, void * userData, OnMessageCompleted onCompletion)
 : connection(connection)
 , message(new (std::nothrow) std::vector<BYTE>())
 , userData(userData)
 , onCompletion(onCompletion)        
 {
     ConvertToBuffer(message);
 }
Exemple #2
0
EFI_STATUS
FormlizeParameters(
  UINTN  Argc,
  UINT16 **Argv,
  UINT8  *CmdBuffer
  )
{
  UINTN         ArgcIndex;
  UINT16        *String;
  UINT8         Data;
  EFI_STATUS    Status;

  for(ArgcIndex = 1; ArgcIndex < Argc; ArgcIndex++){ 
    String = Argv[ArgcIndex];
    Status = ConvertToBuffer(String, &Data);
    if(EFI_ERROR(Status)){
      return EFI_INVALID_PARAMETER;
    }
    CmdBuffer[ArgcIndex-1] = Data;
  }
  return EFI_SUCCESS;
}
Exemple #3
0
WHeapString StringParser::ToW(const StringRef& str)
{
	WHeapString tempBuffer;
	ConvertToBuffer(str.c_str(), str.Length(), tempBuffer);
	return tempBuffer;
}
Exemple #4
0
intp StringParser::ConvertToBuffer(const WStringRef& inBuffer, HeapString& outBuffer)
{
	return ConvertToBuffer(inBuffer.Buffer(), inBuffer.Length(), outBuffer);
}