Статьи по Assembler


Main.asm для mycall (ассемблер) - часть 9


ec_txt1 db "HangUp",0

.code

disable_controls PROC disable

mov eax,win_height

@if(disable)

add eax,12

@endif

invoke SetWindowPos,main_window,NULL,NULL,NULL,win_width,eax,SWP_NOMOVE OR SWP_NOZORDER

@if(disable)

mov eax,offset ec_txt1

@else

mov eax,offset ec_txt0

@endif

invoke SendMessageA,butt_window,WM_SETTEXT,0,eax

mov eax,disable

xor eax,1h

push eax

invoke EnableWindow,conn_window,eax

pop eax

push eax

invoke EnableWindow,phon_window,eax

pop eax

invoke EnableWindow,user_window,eax

ret

disable_controls ENDP


;ДОЗВОН

;///////////////////////////////////////////////////////////// Дозвон

.data?

ras_dial_params RASDIALPARAMS{}

.code

ras_dial PROC

;Подготовка структуры RASDIALPARAMS

mov ras_dial_params.dwSize,sizeof(RASDIALPARAMS)

mov ras_dial_params.szCallbackNumber,0

mov ras_dial_params.szDomain,0

mov esi,dat_buffer

xor ebx,ebx

@while(ebx!=current_con)

xor ecx,ecx

@while(ecx<3)

call skip_nz2

inc ecx

@endw

inc ebx

@endw

mov ras_dial_params.szEntryName,0

push esi

invoke lstrcpy,offset ras_dial_params.szEntryName,esi

pop esi

call skip_nz

mov ras_dial_params.szPhoneNumber,0

push esi

invoke lstrcpy,offset ras_dial_params.szPhoneNumber,esi

pop esi

call skip_nz

dec esi

@while(byte ptr[esi]==0)

inc esi

@endw

xor ecx,ecx

mov ebx,current_con

@while(con_phone[ebx]!=cl)

call skip_nz

inc ecx

@endw

push esi

invoke lstrcat,offset ras_dial_params.szPhoneNumber,esi

pop esi

call skip_nz2

xor ecx,ecx

mov ebx,current_con

@while(con_user[ebx]!=cl)

call skip_nz

call skip_nz

inc ecx

@endw

mov ras_dial_params.szUserName,0

push esi

invoke lstrcat,offset ras_dial_params.szUserName,esi

pop esi

call skip_nz

mov ras_dial_params.szPassword,0

push esi

invoke lstrcat,offset ras_dial_params.szPassword,esi

pop esi

;Дозвон

mov ras_conn,0

invoke RasDialA,0,0,offset ras_dial_params,0,ras_dial_func,offset ras_conn

@if(eax)

call ras_hangup

invoke fatal,FATAL_RAS

invoke ExitProcess,EXIT_RAS_ERROR

@else

mov online,TRUE




- Начало -  - Назад -  - Вперед -



Книжный магазин