I hope someone can help me with this. I need to use the Ace Dll to extract some Files. I have written a little ASM Prog to test the functions. But I always got an abnormal program termination. I hope you can help me. If someone has a working example I would be glad if you would post it here. I despare with this kind of compression stuff ---------------------Begin unace.asm---------------------

;compiler directives
.386
.model flat,stdcall
option casemap:none

;Procedures
ProcessProc	PROTO :DWORD,:DWORD
VolumeProc	PROTO :DWORD,:DWORD

;standard includes
include ace.inc
include \masm32\include\windows.inc
include \masm32\include\masm32.inc
include \masm32\include\shell32.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\masm32.lib
includelib \masm32\lib\shell32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\user32.lib
.data
HMODULE     dd  0
error db "An Error has been detected",0
caption db	"AceTest V.0.1 by CyBerian",0
packedname	db "d:\test22\s3.ace",0
path		db " ",0
;DLL
ACEOpenArchiveData TACEOpenArchiveData <>
ACEHeaderData	TACEHeaderData <>

dllname db "unace.dll",0

;Functions
;TACEOpenArchive db "ACEOpenArchive",0
;TACECloseArchive db "ACECloseArchive",0
;TACEReadHeader db "ACEReadHeader",0
;TACEProcessFile db "ACEProcessFile",0
;TACESetPassword db "ACESetPassword",0

.data?
;commandline	db	512 dup(?)

hDLL	dd ?
hACE	dd ?

;DLL
ACEOpenArchive dd ?
ACECloseArchive dd ?
ACEReadHeader dd ?
ACEProcessFile dd ?
ACESetPassword dd ?

.code
main:

	invoke  GetModuleHandleA,0                          
	mov     HMODULE,eax                                 
	xor eax,eax

		invoke LoadLibrary,ADDR dllname
		mov hDLL,eax
		.IF eax == NULL
			invoke MessageBox,NULL,ADDR error,ADDR caption,MB_OK+MB_ICONEXCLAMATION		
		.ENDIF
		

	;retrieve Functions of DLL
		xor ebx,ebx
		mov bx,2
		invoke GetProcAddress,hDLL,ebx
		mov ACEOpenArchive,eax
		.IF eax == NULL
			invoke MessageBox,NULL,ADDR error,ADDR caption,MB_OK+MB_ICONEXCLAMATION		
		.ENDIF
		xor ebx,ebx
		mov bx,2
		invoke GetProcAddress,hDLL,ebx
		mov ACECloseArchive,eax
		.IF eax == NULL
			invoke MessageBox,NULL,ADDR error,ADDR caption,MB_OK+MB_ICONEXCLAMATION		
		.ENDIF

		xor ebx,ebx
		mov bx,3
		invoke GetProcAddress,hDLL,ebx
		mov ACEReadHeader,eax
		.IF eax == NULL
			invoke MessageBox,NULL,ADDR error,ADDR caption,MB_OK+MB_ICONEXCLAMATION		
		.ENDIF

		xor ebx,ebx
		mov bx,4
 		invoke GetProcAddress,hDLL,ebx
		mov ACEProcessFile,eax
		.IF eax == NULL
			invoke MessageBox,NULL,ADDR error,ADDR caption,MB_OK+MB_ICONEXCLAMATION		
		.ENDIF

		xor ebx,ebx
		mov bx,5
		invoke GetProcAddress,hDLL,ebx
		mov ACESetPassword,eax
		.IF eax == NULL
			invoke MessageBox,NULL,ADDR error,ADDR caption,MB_OK+MB_ICONEXCLAMATION		
		.ENDIF

		invoke RtlZeroMemory,ADDR ACEOpenArchiveData,SIZEOF ACEOpenArchiveData
		mov ACEOpenArchiveData.ArcName,OFFSET packedname
		mov ACEOpenArchiveData.OpenMode,ACEOPEN_EXTRACT
		mov ACEOpenArchiveData.ChangeVolProc,VolumeProc
		mov ACEOpenArchiveData.ProcessDataProc,ProcessProc
		push OFFSET ACEOpenArchiveData
		call ACEOpenArchive
		mov hACE,eax
		.IF eax == NULL
			invoke MessageBox,NULL,ADDR error,ADDR caption,MB_OK+MB_ICONEXCLAMATION		
		.ENDIF
		invoke RtlZeroMemory,ADDR ACEHeaderData,SIZEOF ACEHeaderData


		push OFFSET ACEHeaderData
		push hACE
		call ACEReadHeader
		
		push OFFSET path
		push ACECMD_EXTRACT
		push hACE
		call ACEProcessFile

		push hACE
		call ACECloseArchive

		invoke FreeLibrary,hDLL

	invoke  ExitProcess,0                               ;Exit Program

ProcessProc Proc Padress: DWORD, Psize: DWORD
	ret
ProcessProc endp

VolumeProc Proc Vadress: DWORD, Vsize: DWORD
	ret
VolumeProc endp

end main
---------------------End unace.asm--------------------- ---------------------Begin ace.inc---------------------

ACEERR_MEM equ     1
ACEERR_FILES equ   2
ACEERR_FOUND equ   3
ACEERR_FULL equ   4
ACEER
Posted on 2001-04-09 13:30:00 by CyBerian
Please help me
Posted on 2001-04-10 13:07:00 by CyBerian
hi im not going to be able to give you much help but i think i can get you started. the first part of this program flows well all the way until you reach call ACEOpenArchive. from there you need to figure out whats wrong.
.386
.model flat,stdcall
option casemap:none

;Procedures
ProcessProc PROTO :DWORD,:DWORD
VolumeProc PROTO :DWORD,:DWORD

;standard includes
include ace.inc
include \masm32\include\windows.inc
include \masm32\include\masm32.inc
include \masm32\include\shell32.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\masm32.lib
includelib \masm32\lib\shell32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\user32.lib

.data
HMODULE dd 0
error db "An Error has been detected",0
caption db "AceTest V.0.1 by CyBerian",0
packedname db "d:\test22\s3.ace",0
path db " ",0

;DLL
ACEOpenArchiveData TACEOpenArchiveData <>
ACEHeaderData TACEHeaderData <>

dllname db "unacev2.dll",0

;Functions
;TACEOpenArchive db "ACEOpenArchive",0
;TACECloseArchive db "ACECloseArchive",0
;TACEReadHeader db "ACEReadHeader",0
;TACEProcessFile db "ACEProcessFile",0
;TACESetPassword db "ACESetPassword",0

.data?
;commandline db 512 dup(?)

hDLL dd ?
hACE dd ?

;DLL
ACEOpenArchive dd ?
ACECloseArchive dd ?
ACEReadHeader dd ?
ACEProcessFile dd ?
ACESetPassword dd ?

.code
main:

invoke GetModuleHandle,0 
mov HMODULE,eax

invoke LoadLibrary,ADDR dllname
mov hDLL,eax
	.IF eax == NULL
		invoke MessageBox,NULL,ADDR error,ADDR caption,MB_OK+MB_ICONEXCLAMATION
		invoke ExitProcess, 0
	.ENDIF

;retrieve Functions of DLL
xor ebx,ebx
mov bx,2
invoke GetProcAddress,hDLL,ebx
mov ACEOpenArchive,eax
	.IF eax == NULL
		invoke MessageBox,NULL,ADDR error,ADDR caption,MB_OK+MB_ICONEXCLAMATION
		invoke ExitProcess,0
	.ENDIF

xor ebx,ebx
mov bx,2
invoke GetProcAddress,hDLL,ebx
mov ACECloseArchive,eax
      .IF eax == NULL
      	invoke MessageBox,NULL,ADDR error,ADDR caption,MB_OK+MB_ICONEXCLAMATION
		invoke ExitProcess,0
      .ENDIF

xor ebx,ebx
mov bx,2
invoke GetProcAddress,hDLL,ebx
mov ACEReadHeader,eax
      .IF eax == NULL
      	invoke MessageBox,NULL,ADDR error,ADDR caption,MB_OK+MB_ICONEXCLAMATION
		invoke ExitProcess,0
      .ENDIF

xor ebx,ebx
mov bx,2
invoke GetProcAddress,hDLL,ebx
mov ACEProcessFile,eax
      .IF eax == NULL
      	invoke MessageBox,NULL,ADDR error,ADDR caption,MB_OK+MB_ICONEXCLAMATION
		invoke ExitProcess,0
      .ENDIF

xor ebx,ebx
mov bx,2
invoke GetProcAddress,hDLL,ebx
mov ACESetPassword,eax
      .IF eax == NULL
      	invoke MessageBox,NULL,ADDR error,ADDR caption,MB_OK+MB_ICONEXCLAMATION
		invoke ExitProcess,0
      .ENDIF

invoke RtlZeroMemory,ADDR ACEOpenArchiveData,SIZEOF ACEOpenArchiveData
mov ACEOpenArchiveData.ArcName,OFFSET packedname
mov ACEOpenArchiveData.OpenMode,ACEOPEN_EXTRACT
mov ACEOpenArchiveData.ChangeVolProc,VolumeProc
mov ACEOpenArchiveData.ProcessDataProc,ProcessProc
push OFFSET ACEOpenArchiveData

call ACEOpenArchiveData   <--- start with this problem and work your way down.
This message was edited by smurf, on 4/10/2001 2:56:45 PM
Posted on 2001-04-10 14:55:00 by smurf
I already figured out that the problem is in the ACEReadHeader Function, but I am not sure why I hope anyone else can help me out with this anyway thx. sign CyBerian
Posted on 2001-04-11 00:13:00 by CyBerian