private void getEmpregador(out string PessoaTipo, out string Cnpj, out string Nome, out string Cei, out string Endereco) { PessoaTipo = ""; Cnpj = ""; Nome = ""; Cei = ""; Endereco = ""; StringBuilder Tipo = new StringBuilder(1); StringBuilder Identificacao = new StringBuilder(14); StringBuilder CEI = new StringBuilder(12); StringBuilder RazaoSocial = new StringBuilder(150); StringBuilder LocalTrabalho = new StringBuilder(100); StringBuilder MensagemErro = new StringBuilder(256); REPZPM_DLL.ID_Comando = REPZPM_DLL.DLLREP_BuscaEmpregador(REPZPM_DLL.Handle); if (REPZPM_DLL.ID_Comando > 0) { REPZPM_DLL.Retorno = REPZPM_DLL.DLLREP_RetornoEmpregador(REPZPM_DLL.Handle, Tipo, Identificacao, CEI, RazaoSocial, LocalTrabalho); /*Sucesso na leitura do empregador*/ if (REPZPM_DLL.Retorno == 1) { /*Mostra as informações do Empregador*/ PessoaTipo = Tipo.ToString(); Cnpj = Identificacao.ToString(); Nome = RazaoSocial.ToString(); Cei = CEI.ToString(); Endereco = LocalTrabalho.ToString(); } else { /*Houve erro na leitura do empregador*/ log.AddLog(REPZPM_DLL.Trata_Retorno_REP(REPZPM_DLL.Retorno), true); return; } } else { /*Trata o erro na inicialização do Handle*/ log.AddLog(REPZPM_DLL.Trata_Retorno_DLL(REPZPM_DLL.ID_Comando)); return; } }