45,6 → 45,8 |
od_draw_window equ dword [ebp+28] ; Adress of procedure - draw_window |
od_status equ dword [ebp+32] ; 0-Cancel, 1-Get path OK, 2-Use alternatives |
od_openfile_pach equ dword [ebp+36] ; Getting path to file |
od_filename_area equ dword [ebp+40] ; Adress of file name area |
od_filter_area equ dword [ebp+44] ; Adress of filter area |
;***************************************************************************** |
.init: |
pusha |
99,7 → 101,29 |
mov esi,od_dir_default_pach ;communication_area_default_pach |
@@: |
call .copy |
;---------------------------------------------- |
; copy file name to shared area |
cmp od_type,dword 1 |
jne .4 |
mov edi,od_com_area |
add edi,4096-256 |
|
mov esi,od_filename_area |
; xor eax,eax |
; mov al,[esi] |
; test eax,eax |
test esi,esi |
jnz @f |
mov esi,.null |
@@: |
call .copy |
.4: |
;---------------------------------------------- |
cmp od_type,dword 2 |
je @f |
call .get_filter_data |
@@: |
;---------------------------------------------- |
mov eax,od_com_area_name |
mov [start_open_dialog.parameter],eax |
|
124,27 → 148,69 |
test ebx,ebx |
jz .still |
cmp ebx,3 |
je .2 ;still |
je .2 |
cmp ebx,1 |
jne .still |
|
mov esi,od_com_area |
add esi,4 |
mov edi,od_openfile_pach ;string |
mov edi,od_openfile_pach |
call .copy |
mov od_status,1 |
mov esi,od_openfile_pach |
mov edi,od_opendir_pach |
call .copy_dir_path |
jmp .3 ;kopen_1 |
;---------------------------------------------- |
; copy file name from shared area |
cmp od_type,dword 1 |
jne @f |
mov esi,od_com_area |
add esi,4096-256 |
mov edi,od_filename_area |
; xor eax,eax |
; mov al,[edi] |
; test eax,eax |
test edi,edi |
jz @f |
call .copy |
@@: |
;---------------------------------------------- |
jmp .3 |
.2: |
mov od_status,0 |
jmp .3 ; still |
jmp .3 |
.1: |
mov od_status,2 ; thread1 |
mov od_status,2 |
.3: |
OpenDialog_exit |
;---------------------------------------------- |
.null: |
dd 0 |
;---------------------------------------------- |
.get_filter_data: |
mov edi,od_com_area |
test edi,edi |
jnz @f |
; add esp,4 |
; jmp still |
ret |
@@: |
add edi,4096+4 |
mov esi,od_filter_area |
mov ecx,[esi] |
test ecx,ecx |
jnz @f |
mov edi,od_com_area |
mov [edi+4096],dword 0 |
ret |
@@: |
inc ecx |
cld |
rep movsb |
mov edi,od_com_area |
mov [edi+4096],dword 1 |
ret |
;---------------------------------------------- |
.copy: |
xor eax,eax |
cld |
170,6 → 236,10 |
stosb |
test eax,eax |
jnz @b |
cmp od_type,dword 2 |
jne @f |
ret |
@@: |
mov esi,edi |
dec esi |
@@: |
178,19 → 248,6 |
cmp al,'/' |
jnz @b |
|
; push esi |
; add esi,2 |
;; mov edi,ebx ;file_name |
;; xor ebx,ebx |
;@@: |
; cld |
; lodsb |
;; stosb |
; inc ebx |
; test eax,eax |
; jnz @b |
; pop esi |
|
mov [esi+1], byte 0 |
cld |
ret |