From 9892e25452a226d87a2c358f20b17d90abff0923 Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Mon, 4 Mar 2013 21:31:31 +0000 Subject: [PATCH] Tentando resolver problemas na carga da libhllapi.dll --- po/pt_BR.po | 246 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------- pw3270.nsi.in | 8 ++------ src/include/pw3270/hllapi.h | 1 + src/plugins/remotectl/calls.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------- 4 files changed, 180 insertions(+), 154 deletions(-) diff --git a/po/pt_BR.po b/po/pt_BR.po index 083e145..7ea36d7 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: pw3270 5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-01 08:21-0300\n" +"POT-Creation-Date: 2013-03-04 18:26-0300\n" "PO-Revision-Date: 2013-02-25 14:46-0300\n" "Last-Translator: Perry Werneck \n" "Language-Team: Português <>\n" @@ -200,7 +200,7 @@ msgstr "Sobre a segurança" msgid "Action failed" msgstr "Ação falhou" -#: ui/00default.xml:286 +#: ui/00default.xml:64 msgid "Add to copy" msgstr "Adicionar à cópia" @@ -208,7 +208,7 @@ msgstr "Adicionar à cópia" msgid "Add/Remove _CR at end of line" msgstr "Adicionar/Remover _CR no final da linha" -#: ui/00default.xml:354 +#: ui/00default.xml:132 msgid "Alert sound" msgstr "Aviso sonoro" @@ -221,7 +221,7 @@ msgstr "" msgid "Application name" msgstr "Nome da aplicação" -#: ui/10keypad.xml:155 +#: ui/10keypad.xml:467 msgid "Attn" msgstr "Attn" @@ -238,7 +238,7 @@ msgstr "Authority and issuer serial number mismatch" msgid "Authority and subject key identifier mismatch" msgstr "Authority and subject key identifier mismatch" -#: ui/00default.xml:349 +#: ui/00default.xml:127 msgid "Auto-Reconnect" msgstr "Reconectar automaticamente" @@ -262,11 +262,11 @@ msgstr "Versão winsock inválida" msgid "Black" msgstr "Preto" -#: ui/00default.xml:347 +#: ui/00default.xml:125 msgid "Blank Fill" msgstr "Completar com espaços" -#: ui/00default.xml:340 +#: ui/00default.xml:118 msgid "Blinking Cursor" msgstr "Cursor piscante" @@ -274,7 +274,7 @@ msgstr "Cursor piscante" msgid "Blue" msgstr "Azul" -#: ui/00default.xml:350 +#: ui/00default.xml:128 msgid "Bold" msgstr "Negrito" @@ -282,7 +282,7 @@ msgstr "Negrito" msgid "Brazilian Public Software Portal" msgstr "Portal do Software Público Brasileiro" -#: ui/10keypad.xml:156 +#: ui/10keypad.xml:468 msgid "Break" msgstr "Break" @@ -474,7 +474,7 @@ msgstr "Tabela de tradução tem %d entradas, precisa de 256" msgid "Charset has more than 256 entries" msgstr "Tabela de tradução tem mais de 256 caracteres" -#: ui/10keypad.xml:147 +#: ui/00default.xml:79 msgid "Clear" msgstr "Limpar" @@ -486,7 +486,7 @@ msgstr "Tema de cores:" msgid "Color setup" msgstr "Configuração de cores" -#: ui/00default.xml:329 +#: ui/00default.xml:107 msgid "Colors" msgstr "Cores" @@ -494,7 +494,7 @@ msgstr "Cores" msgid "Complete" msgstr "Completo" -#: ui/00default.xml:339 +#: ui/00default.xml:117 msgid "Connect on startup" msgstr "Conectar ao iniciar" @@ -502,19 +502,19 @@ msgstr "Conectar ao iniciar" msgid "Connection reset by peer" msgstr "Conexão foi cancelada pelo servidor" -#: ui/00default.xml:283 +#: ui/00default.xml:61 msgid "Copy" msgstr "Copiar" -#: ui/99debug.xml:200 +#: ui/99debug.xml:566 msgid "Copy as HTML" msgstr "Copiar como HTML" -#: ui/00default.xml:284 +#: ui/00default.xml:62 msgid "Copy as table" msgstr "Copiar como tabela" -#: colors.c:418 ui/00default.xml:346 +#: colors.c:418 ui/00default.xml:124 msgid "Cross hair cursor" msgstr "Cursor mira" @@ -527,7 +527,7 @@ msgstr "Atual (%s)" msgid "Custom colors" msgstr "Cores personalizadas" -#: ui/00default.xml:287 +#: ui/00default.xml:65 msgid "Cut" msgstr "Recortar" @@ -539,7 +539,7 @@ msgstr "Cilindros" msgid "DFT B_uffer size:" msgstr "Tamanho do b_uffer DFT:" -#: ui/99debug.xml:205 +#: ui/99debug.xml:571 msgid "DS Trace" msgstr "DS Trace" @@ -555,11 +555,11 @@ msgstr "Verde Escuro" msgid "Data conversion error" msgstr "Erro na conversão de dados" -#: ui/99debug.xml:213 +#: ui/99debug.xml:579 msgid "Debug" msgstr "Depuração" -#: ui/99debug.xml:215 +#: ui/99debug.xml:581 msgid "Debug window updates" msgstr "Mostrar atualizações de janela" @@ -567,7 +567,7 @@ msgstr "Mostrar atualizações de janela" msgid "Default" msgstr "Padrão" -#: ui/00default.xml:303 +#: ui/00default.xml:81 msgid "Delete field" msgstr "Apagar campo" @@ -599,7 +599,7 @@ msgstr "Nome do servidor em branco" msgid "Empty port name" msgstr "Porta em branco" -#: ui/10keypad.xml:151 +#: ui/10keypad.xml:463 msgid "" "Erase\n" "EOF" @@ -607,7 +607,7 @@ msgstr "" "Apagar\n" "Campo" -#: ui/10keypad.xml:152 +#: ui/10keypad.xml:464 msgid "" "Erase\n" "Input" @@ -615,15 +615,15 @@ msgstr "" "Apagar\n" "Campos" -#: ui/00default.xml:302 +#: ui/00default.xml:80 msgid "Erase input" msgstr "Apagar campos" -#: ui/00default.xml:304 +#: ui/00default.xml:82 msgid "Erase to end of field" msgstr "Apagar até o final do campo" -#: ui/00default.xml:305 +#: ui/00default.xml:83 msgid "Erase to end of line" msgstr "Apagar até o final da linha" @@ -666,7 +666,7 @@ msgstr "Erro lendo %s" msgid "Error resolving %s: %s" msgstr "Erro ao resolver %s: %s" -#: ui/99debug.xml:207 +#: ui/99debug.xml:573 msgid "Event Trace" msgstr "Trace de eventos" @@ -714,11 +714,11 @@ msgstr "Format error in certificate's notAfter field" msgid "Format error in certificate's notBefore field" msgstr "Format error in certificate's notBefore field" -#: ui/00default.xml:343 +#: ui/00default.xml:121 msgid "Full Screen" msgstr "Tela cheia" -#: ui/10functions.xml:35 +#: ui/10functions.xml:347 msgid "Function bar" msgstr "Barra de funções" @@ -763,7 +763,7 @@ msgstr "HTTP Proxy: EOF inesperado" msgid "HTTP Proxy: unrecognized reply" msgstr "HTTP Proxy: Resposta desconhecida" -#: ui/00default.xml:364 +#: ui/00default.xml:142 msgid "Help" msgstr "Ajuda" @@ -824,7 +824,7 @@ msgstr "Comprimento de frame inválido" msgid "Informations" msgstr "Informações" -#: ui/00default.xml:359 +#: ui/00default.xml:137 msgid "Input method" msgstr "Método de entrada" @@ -871,7 +871,7 @@ msgstr "Sintaxe de proxy inválida" msgid "Invalid proxy type '%.*s'" msgstr "Tipo de proxy invalido '%.*s'" -#: ui/00default.xml:352 +#: ui/00default.xml:130 msgid "Keep selected" msgstr "Manter selecionado" @@ -887,7 +887,7 @@ msgstr "Teclado está bloqueado" msgid "LRECL:" msgstr "LRECL:" -#: ui/10keypad.xml:101 +#: ui/10keypad.xml:413 msgid "Lateral keypad" msgstr "Barra lateral" @@ -904,7 +904,7 @@ msgstr "Faltando ']'" msgid "Model %d (%s)" msgstr "Modelo %d (%s)" -#: ui/00default.xml:341 +#: ui/00default.xml:119 msgid "Monocase" msgstr "Só Maiúsculas" @@ -940,7 +940,7 @@ msgstr "Erro de rede" msgid "Network startup error" msgstr "Erro ao iniciar a rede" -#: ui/00default.xml:411 +#: ui/00default.xml:189 msgid "Next field" msgstr "Próximo campo" @@ -1017,111 +1017,111 @@ msgstr "Other (VM/CMS)" msgid "Out of memory" msgstr "Out of memory" -#: ui/10keypad.xml:138 +#: ui/10keypad.xml:450 msgid "PA1" msgstr "PA1" -#: ui/10keypad.xml:139 +#: ui/10keypad.xml:451 msgid "PA2" msgstr "PA2" -#: ui/10keypad.xml:140 +#: ui/10keypad.xml:452 msgid "PA3" msgstr "PA3" -#: ui/10functions.xml:36 +#: ui/10functions.xml:348 msgid "PF1" msgstr "PF1" -#: ui/10functions.xml:45 +#: ui/10functions.xml:357 msgid "PF10" msgstr "PF10" -#: ui/10functions.xml:46 +#: ui/10functions.xml:358 msgid "PF11" msgstr "PF11" -#: ui/10functions.xml:47 +#: ui/10functions.xml:359 msgid "PF12" msgstr "PF12" -#: ui/10functions.xml:50 +#: ui/10functions.xml:362 msgid "PF13" msgstr "PF13" -#: ui/10functions.xml:51 +#: ui/10functions.xml:363 msgid "PF14" msgstr "PF14" -#: ui/10functions.xml:52 +#: ui/10functions.xml:364 msgid "PF15" msgstr "PF15" -#: ui/10functions.xml:53 +#: ui/10functions.xml:365 msgid "PF16" msgstr "PF16" -#: ui/10functions.xml:54 +#: ui/10functions.xml:366 msgid "PF17" msgstr "PF17" -#: ui/10functions.xml:55 +#: ui/10functions.xml:367 msgid "PF18" msgstr "PF18" -#: ui/10functions.xml:56 +#: ui/10functions.xml:368 msgid "PF19" msgstr "PF19" -#: ui/10functions.xml:37 +#: ui/10functions.xml:349 msgid "PF2" msgstr "PF2" -#: ui/10functions.xml:57 +#: ui/10functions.xml:369 msgid "PF20" msgstr "PF20" -#: ui/10functions.xml:58 +#: ui/10functions.xml:370 msgid "PF21" msgstr "PF21" -#: ui/10functions.xml:59 +#: ui/10functions.xml:371 msgid "PF22" msgstr "PF22" -#: ui/10functions.xml:60 +#: ui/10functions.xml:372 msgid "PF23" msgstr "PF23" -#: ui/10functions.xml:61 +#: ui/10functions.xml:373 msgid "PF24" msgstr "PF24" -#: ui/10functions.xml:38 +#: ui/10functions.xml:350 msgid "PF3" msgstr "PF3" -#: ui/10functions.xml:39 +#: ui/10functions.xml:351 msgid "PF4" msgstr "PF4" -#: ui/10functions.xml:40 +#: ui/10functions.xml:352 msgid "PF5" msgstr "PF5" -#: ui/10functions.xml:41 +#: ui/10functions.xml:353 msgid "PF6" msgstr "PF6" -#: ui/10functions.xml:42 +#: ui/10functions.xml:354 msgid "PF7" msgstr "PF7" -#: ui/10functions.xml:43 +#: ui/10functions.xml:355 msgid "PF8" msgstr "PF8" -#: ui/10functions.xml:44 +#: ui/10functions.xml:356 msgid "PF9" msgstr "PF9" @@ -1138,15 +1138,15 @@ msgstr "Erro de interpretação em %s" msgid "Passthru Proxy: send error" msgstr "Passthru Proxy: Erro ao enviar" -#: ui/00default.xml:288 +#: ui/00default.xml:66 msgid "Paste" msgstr "Colar" -#: ui/00default.xml:289 +#: ui/00default.xml:67 msgid "Paste next" msgstr "Colar próximo" -#: ui/00default.xml:292 +#: ui/00default.xml:70 msgid "Paste text file" msgstr "Colar arquivo texto" @@ -1154,7 +1154,7 @@ msgstr "Colar arquivo texto" msgid "Paste text file contents" msgstr "Colar conteúdo de arquivo texto" -#: ui/00default.xml:345 +#: ui/00default.xml:123 msgid "Paste with left margin" msgstr "Colar com margem esquerda" @@ -1170,7 +1170,7 @@ msgstr "Path to application data files" msgid "Pink" msgstr "Rosa" -#: ui/00default.xml:410 +#: ui/00default.xml:188 msgid "Previous field" msgstr "Campo anterior" @@ -1178,11 +1178,11 @@ msgstr "Campo anterior" msgid "Primary space:" msgstr "Primary space:" -#: ui/00default.xml:271 +#: ui/00default.xml:49 msgid "Print" msgstr "Imprimir" -#: ui/00default.xml:273 +#: ui/00default.xml:51 msgid "Print copy" msgstr "Imprimir cópia" @@ -1190,7 +1190,7 @@ msgstr "Imprimir cópia" msgid "Print operation failed" msgstr "Operação de impressão falhou" -#: ui/00default.xml:272 +#: ui/00default.xml:50 msgid "Print selected" msgstr "Imprimir seleção" @@ -1198,7 +1198,7 @@ msgstr "Imprimir seleção" msgid "Print selection box" msgstr "Imprimir marca de seleção" -#: print.c:743 ui/00default.xml:330 +#: print.c:743 ui/00default.xml:108 msgid "Print settings" msgstr "Configurações de impressão" @@ -1286,7 +1286,7 @@ msgstr "RPQ: can't resolve '%s': %s" msgid "RPQ: gethostbyname error" msgstr "RPQ: Erro em gethostbyname" -#: ui/00default.xml:276 +#: ui/00default.xml:54 msgid "Receive file" msgstr "Receber arquivo" @@ -1302,27 +1302,27 @@ msgstr "Formato de registro" msgid "Red" msgstr "Vermelho" -#: ui/99debug.xml:214 +#: ui/99debug.xml:580 msgid "Reload buffer contents" msgstr "Recarregar conteúdo do buffer" -#: ui/00default.xml:297 +#: ui/00default.xml:75 msgid "Remove selection" msgstr "Remover seleção" -#: ui/00default.xml:298 +#: ui/00default.xml:76 msgid "Reselect" msgstr "Reselecionar" -#: ui/10keypad.xml:148 +#: ui/10keypad.xml:460 msgid "Reset" msgstr "Reset" -#: ui/00default.xml:344 +#: ui/00default.xml:122 msgid "Resize on alternate screen" msgstr "Mudar tamanho do terminal em tela alternativa" -#: ui/00default.xml:412 +#: ui/00default.xml:190 msgid "Return" msgstr "Return" @@ -1483,7 +1483,7 @@ msgstr "" "SSL_write:\n" "%s" -#: ui/00default.xml:268 +#: ui/00default.xml:46 msgid "Save copy" msgstr "Salvar cópia" @@ -1491,7 +1491,7 @@ msgstr "Salvar cópia" msgid "Save copy to file" msgstr "Salvar cópia para arquivo" -#: ui/00default.xml:266 +#: ui/00default.xml:44 msgid "Save screen" msgstr "Salvar tela" @@ -1499,7 +1499,7 @@ msgstr "Salvar tela" msgid "Save screen to file" msgstr "Salvar tela para arquivo" -#: ui/00default.xml:267 +#: ui/00default.xml:45 msgid "Save selected" msgstr "Salvar seleção" @@ -1507,15 +1507,20 @@ msgstr "Salvar seleção" msgid "Save selection to file" msgstr "Salvar seleção para arquivo" -#: ui/99debug.xml:206 +#: ui/99debug.xml:572 msgid "Screen Trace" msgstr "Trace de tela" -#: ui/00default.xml:336 +#: ui/00default.xml:114 msgid "Screen size" msgstr "Tamanho da tela" -#: ui/00default.xml:311 +#: ui/09scripts.xml:297 +#, fuzzy +msgid "Script" +msgstr "Scripts" + +#: ui/00default.xml:89 msgid "Scripts" msgstr "Scripts" @@ -1527,15 +1532,15 @@ msgstr "Secondary space:" msgid "Secure connection was successful." msgstr "Conexão segura efetuada com sucesso." -#: ui/00default.xml:296 +#: ui/00default.xml:74 msgid "Select Field" msgstr "Selecionar campo" -#: ui/00default.xml:295 +#: ui/00default.xml:73 msgid "Select all" msgstr "Selecionar tudo" -#: ui/00default.xml:348 +#: ui/00default.xml:126 msgid "Select by rectangles" msgstr "Seleção retangular" @@ -1547,7 +1552,7 @@ msgstr "Selecione arquivo a receber" msgid "Select file to send" msgstr "Selecione arquivo a enviar" -#: ui/00default.xml:333 +#: ui/00default.xml:111 msgid "Select font" msgstr "Selecione fonte" @@ -1571,7 +1576,7 @@ msgstr "Self signed certificate" msgid "Self signed certificate in certificate chain" msgstr "Self signed certificate in certificate chain" -#: ui/00default.xml:277 +#: ui/00default.xml:55 msgid "Send file" msgstr "Enviar arquivo" @@ -1583,7 +1588,7 @@ msgstr "Enviar arquivo para o servidor" msgid "Send messages to syslog" msgstr "Send messages to syslog" -#: ui/00default.xml:276 +#: ui/00default.xml:54 msgid "Send/Receive" msgstr "Enviar/Receber" @@ -1591,7 +1596,7 @@ msgstr "Enviar/Receber" msgid "Session name" msgstr "Nome da sessão" -#: ui/00default.xml:314 +#: ui/00default.xml:92 msgid "Set hostname" msgstr "Selecione servidor" @@ -1599,19 +1604,19 @@ msgstr "Selecione servidor" msgid "Set reported colors (8/16)" msgstr "Define número de cores informadas (8/16)" -#: ui/00default.xml:329 +#: ui/00default.xml:107 msgid "Settings" msgstr "Configurações" -#: ui/00default.xml:351 +#: ui/00default.xml:129 msgid "Show Underline" msgstr "Mostrar sublinhado" -#: ui/99debug.xml:213 +#: ui/99debug.xml:579 msgid "Show test pattern" msgstr "Mostrar padrão de teste" -#: ui/00default.xml:353 +#: ui/00default.xml:131 msgid "Smart paste" msgstr "Colar inteligente" @@ -1659,6 +1664,18 @@ msgstr "T_otal" msgid "Terminal colors" msgstr "Cores do terminal" +#: ui/09scripts.xml:298 +msgid "Teste01" +msgstr "Teste01" + +#: ui/09scripts.xml:302 +msgid "Teste02" +msgstr "Teste02" + +#: ui/09scripts.xml:306 +msgid "Teste03" +msgstr "Teste03" + #: host.c:216 msgid "Text before '['" msgstr "Texto antes de '['" @@ -1885,15 +1902,15 @@ msgid "" "This version of %s was built without support for secure sockets layer (SSL)." msgstr "Esta versão do %s foi gerada sem suporte para conexões seguras (SSL)." -#: ui/00default.xml:370 +#: ui/00default.xml:148 msgid "Toolbar" msgstr "Barra de ferramentas" -#: ui/99debug.xml:205 +#: ui/99debug.xml:571 msgid "Trace" msgstr "Trace" -#: ui/00default.xml:342 +#: ui/00default.xml:120 msgid "Track Cursor" msgstr "Mostrar posição do cursor" @@ -2100,7 +2117,7 @@ msgstr "Unsupported passthru host session" msgid "Unsupported socks 4 proxy" msgstr "Unsupported socks 4 proxy" -#: ui/00default.xml:355 +#: ui/00default.xml:133 msgid "Use +/- for field navigation" msgstr "Usar teclas +/- para navegar por campos" @@ -2113,7 +2130,7 @@ msgstr "Variável" msgid "Version %s - Revision %s" msgstr "Versão %s - Revisão %s" -#: ui/99debug.xml:208 +#: ui/99debug.xml:574 msgid "View Field Delimiters" msgstr "Mostrar delimitadores de campo" @@ -2141,7 +2158,7 @@ msgstr "Europa ocidental (ISO 8859-1)" msgid "White" msgstr "Branco" -#: ui/00default.xml:381 +#: ui/00default.xml:159 msgid "Window" msgstr "Janela" @@ -2209,19 +2226,19 @@ msgstr "_Procurar" msgid "_Color table:" msgstr "Tabela de cores:" -#: ui/00default.xml:324 +#: ui/00default.xml:102 msgid "_Connect" msgstr "_Conectar" -#: ui/00default.xml:325 +#: ui/00default.xml:103 msgid "_Disconnect" msgstr "_Desconectar" -#: ui/99debug.xml:200 +#: ui/00default.xml:61 msgid "_Edit" msgstr "_Editar" -#: ui/00default.xml:258 +#: ui/00default.xml:36 msgid "_File" msgstr "_Arquivo" @@ -2249,11 +2266,11 @@ msgstr "Nome do _Host:" msgid "_Local file name:" msgstr "Arquivo _local:" -#: ui/00default.xml:314 +#: ui/00default.xml:92 msgid "_Network" msgstr "_Rede" -#: ui/00default.xml:339 +#: ui/00default.xml:117 msgid "_Options" msgstr "_Opções" @@ -2281,7 +2298,7 @@ msgstr "Arquivo _texto" msgid "_To" msgstr "_Para" -#: ui/00default.xml:309 +#: ui/00default.xml:87 msgid "_View" msgstr "_Exibir" @@ -2328,19 +2345,6 @@ msgid "unknown error" msgstr "Erro desconhecido" #, fuzzy -#~ msgid "Script" -#~ msgstr "Scripts" - -#~ msgid "Teste01" -#~ msgstr "Teste01" - -#~ msgid "Teste02" -#~ msgstr "Teste02" - -#~ msgid "Teste03" -#~ msgstr "Teste03" - -#, fuzzy #~ msgid "Cross hair Cursor" #~ msgstr "Cursor mira" diff --git a/pw3270.nsi.in b/pw3270.nsi.in index 33c5400..d5eca42 100644 --- a/pw3270.nsi.in +++ b/pw3270.nsi.in @@ -60,6 +60,8 @@ SubSection "@PACKAGE@" SecMain # Binary files file "/oname=$INSTDIR\@PACKAGE@.exe" ".bin\Release\@PACKAGE@.exe" file "/oname=$INSTDIR\@PACKAGE@.ico" "src\pw3270\@PACKAGE@.ico" + file "/oname=$INSTDIR\lib3270.dll.@PACKAGE_VERSION@" ".bin\Release\lib3270.dll.@PACKAGE_VERSION@" + file "/oname=$INSTDIR\libpw3270.dll.@PACKAGE_VERSION@" ".bin\Release\libpw3270.dll.@PACKAGE_VERSION@" # Configuration files file "/oname=$INSTDIR\@PACKAGE@-logo.png" "src\pw3270\@PACKAGE@-logo.png" @@ -107,10 +109,6 @@ SubSection "@PACKAGE@" SecMain # Save instalation dir WriteRegStr HKCU "Software\@PACKAGE@" "" $INSTDIR - # Main library - file "/oname=$SYSDIR\lib3270.dll.@PACKAGE_VERSION@" ".bin\Release\lib3270.dll.@PACKAGE_VERSION@" - file "/oname=$SYSDIR\libpw3270.dll.@PACKAGE_VERSION@" ".bin\Release\libpw3270.dll.@PACKAGE_VERSION@" - sectionEnd SubSection "Plugins" SecPLugin @@ -202,8 +200,6 @@ section "Uninstall" DeleteRegKey HKLM "Software\@PACKAGE@" # Delete System libraries - delete $SYSDIR\lib3270.dll.@PACKAGE_VERSION@ - delete $SYSDIR\libpw3270.dll.@PACKAGE_VERSION@ delete $SYSDIR\libhllapi.dll # Delete extension libraries diff --git a/src/include/pw3270/hllapi.h b/src/include/pw3270/hllapi.h index 0bf63b3..a9b324f 100644 --- a/src/include/pw3270/hllapi.h +++ b/src/include/pw3270/hllapi.h @@ -85,6 +85,7 @@ extern "C" { __declspec (dllexport) DWORD __stdcall hllapi_deinit(void); __declspec (dllexport) DWORD __stdcall hllapi_get_revision(void); + __declspec (dllexport) DWORD __stdcall hllapi_get_datadir(LPSTR datadir); __declspec (dllexport) DWORD __stdcall hllapi_connect(LPSTR uri, WORD wait); __declspec (dllexport) DWORD __stdcall hllapi_disconnect(void); diff --git a/src/plugins/remotectl/calls.c b/src/plugins/remotectl/calls.c index 32b83ba..a310edf 100644 --- a/src/plugins/remotectl/calls.c +++ b/src/plugins/remotectl/calls.c @@ -89,11 +89,15 @@ { NULL, NULL } }; +// http://msdn.microsoft.com/en-us/library/windows/desktop/ms684179(v=vs.85).aspx #ifndef LOAD_LIBRARY_SEARCH_DEFAULT_DIRS - // http://msdn.microsoft.com/en-us/library/windows/desktop/ms684179(v=vs.85).aspx #define LOAD_LIBRARY_SEARCH_DEFAULT_DIRS 0x00001000 #endif // LOAD_LIBRARY_SEARCH_DEFAULT_DIRS +#ifndef LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR + #define LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR 0x00000100 +#endif // LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR + /*--[ Implement ]------------------------------------------------------------------------------------*/ __declspec (dllexport) DWORD __stdcall hllapi_init(LPSTR mode) @@ -119,7 +123,6 @@ static const char *dllname = "lib3270.dll." PACKAGE_VERSION; int f; - HKEY hKey = 0; HMODULE kernel; HANDLE cookie = NULL; DWORD rc; @@ -132,7 +135,6 @@ if(hModule) return EBUSY; - *datadir = 0; kernel = LoadLibrary("kernel32.dll"); AddDllDirectory = (HANDLE (*)(PCWSTR)) GetProcAddress(kernel,"AddDllDirectory"); RemoveDllDirectory = (BOOL (*)(HANDLE)) GetProcAddress(kernel,"RemoveDllDirectory"); @@ -140,33 +142,19 @@ // Notify user in case of error loading protocol DLL errorMode = SetErrorMode(0); - if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\pw3270",0,KEY_QUERY_VALUE,&hKey) == ERROR_SUCCESS) - { - unsigned long datalen = sizeof(datadir); // data field length(in), data returned length(out) - unsigned long datatype; // #defined in winnt.h (predefined types 0-11) - if(RegQueryValueExA(hKey,"datadir",NULL,&datatype,(LPBYTE) datadir,&datalen) == ERROR_SUCCESS) - { - // Datadir is set, add it to DLL load path - wchar_t path[4096]; - mbstowcs(path, datadir, 4095); - trace("Datadir=[%s] AddDllDirectory=%p RemoveDllDirectory=%p\n",datadir,AddDllDirectory,RemoveDllDirectory); - if(AddDllDirectory) - cookie = AddDllDirectory(path); - } - RegCloseKey(hKey); - } + memset(datadir,' ',4095); + datadir[4095] = 0; -// hModule = LoadLibraryEx("lib3270.dll.5.0",NULL,LOAD_LIBRARY_SEARCH_DEFAULT_DIRS|LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR); - hModule = LoadLibrary(dllname); - rc = GetLastError(); - - SetErrorMode(errorMode); + if(hllapi_get_datadir(datadir)) + { + char buffer[4096]; + wchar_t path[4096]; - trace("%s hModule=%p rc=%d",dllname,hModule,(int) rc); + mbstowcs(path, datadir, 4095); + trace("Datadir=[%s] AddDllDirectory=%p RemoveDllDirectory=%p\n",datadir,AddDllDirectory,RemoveDllDirectory); + if(AddDllDirectory) + cookie = AddDllDirectory(path); - if(rc == ERROR_MOD_NOT_FOUND && *datadir) - { - char buffer[4096]; #ifdef DEBUG snprintf(buffer,4096,"%s\\.bin\\Debug\\%s",datadir,dllname); #else @@ -174,8 +162,26 @@ #endif // DEBUG hModule = LoadLibrary(buffer); + + trace("%s hModule=%p rc=%d",buffer,hModule,(int) GetLastError()); + + if(hModule == NULL) + hModule = LoadLibraryEx(buffer,NULL,LOAD_LIBRARY_SEARCH_DEFAULT_DIRS|LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR); + + rc = GetLastError(); + trace("%s hModule=%p rc=%d",buffer,hModule,(int) rc); } + else + { + hModule = LoadLibrary(dllname); + rc = GetLastError(); + } +// hModule = LoadLibraryEx("lib3270.dll.5.0",NULL,LOAD_LIBRARY_SEARCH_DEFAULT_DIRS|LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR); + + SetErrorMode(errorMode); + + trace("%s hModule=%p rc=%d",dllname,hModule,(int) rc); if(cookie && RemoveDllDirectory) RemoveDllDirectory(cookie); @@ -355,3 +361,22 @@ return (DWORD) pakey(hSession,key); } + + __declspec (dllexport) DWORD __stdcall hllapi_get_datadir(LPSTR datadir) + { + HKEY hKey = 0; + unsigned long datalen = strlen(datadir); + + *datadir = 0; + + if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\pw3270",0,KEY_QUERY_VALUE,&hKey) == ERROR_SUCCESS) + { + unsigned long datatype; // #defined in winnt.h (predefined types 0-11) + if(RegQueryValueExA(hKey,"datadir",NULL,&datatype,(LPBYTE) datadir,&datalen) != ERROR_SUCCESS) + *datadir = 0; + RegCloseKey(hKey); + } + + return *datadir; + } + -- libgit2 0.21.2