Pessoal, quero compactar/descompactar arquivos sem utilizar o CMD . Estou usando a xZip.dll - http://www.xstandard.com/en/documentation/xzip/ , porem se alguém conhecer outra e estiver funcionando melhor. Meu código: Código: DEFINE VARIABLE ghCall AS HANDLE NO-UNDO. &SCOPED-DEFINE ZIP-LIB 'objectx\zip\XZip.dll' PROCEDURE Compactar : /*------------------------------------------------------------------------------ Purpose: Parameters: <none> Notes: Add file or folder to an archive. Compression level 1 is minimum, level 9 is maximum, all other values default to level 6. ------------------------------------------------------------------------------*/ DEFINE INPUT PARAMETER pcArquivo AS CHARACTER NO-UNDO. DEFINE INPUT PARAMETER pcDestino AS CHARACTER NO-UNDO. IF NOT VALID-HANDLE(ghCall) THEN CREATE CALL ghCall. ASSIGN ghCall:LIBRARY = SEARCH({&ZIP-LIB}) ghCall:CALL-NAME = 'Pack' ghCall:CALL-TYPE = dll-call-type ghCall:NUM-PARAMETERS = 2. ghCall:SET-PARAMETER(1, 'CHARACTER', 'INPUT', pcArquivo). ghCall:SET-PARAMETER(2, 'CHARACTER', 'INPUT', pcDestino). ghCall:INVOKE. ghCall:CLEAR(). END PROCEDURE. RUN Compactar(INPUT 'D:\temp\asd.txt', INPUT 'X:\usuarios\matheus\a.zip'). Porem ocorre o seguinte erro: Alguem tem alguma ideia? Edit: Melhorar imagem.
Table 68: Keyword constants for the CALL-TYPE attribute Keyword constant Integer value PROCEDURE-CALL-TYPE 1 FUNCTION-CALL-TYPE 2 GET-ATTR-CALL-TYPE 3 SET-ATTR-CALL-TYPE 4 DLL-CALL-TYPE 5 The default is PROCEDURE-CALL-TYPE. To get the value of an attribute or to invoke a method, set CALL-TYPE to GET-ATTR-CALL-TYPE. In this example, the SESSION:NUMERIC-FORMAT attribute is assigned, indicated by the CALL-TYPE value of SET-ATTR-CALL-TYPE: /* Set SESSION:NUMERIC-FORMAT to "european" */ ASSIGN hCall:IN-HANDLE = "session" hCall:CALL-TYPE = SET-ATTR-CALL-TYPE hCall:CALL-NAME = "numeric-format" hCall:NUM-PARAMETERS = 1. hCall:SET-PARAMETER(1, "CHARACTER", "INPUT", "european").hCall:INVOKE. PROCURE USAR IGUAL O EXEMPLO DO HELP,SÓ PARA TESTE, PORQUE ELE FUNCIONOU.