Статьи по Assembler


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


@endif

ret

ras_dial ENDP


;ФУНКЦИЯ КОНТРОЛЯ СОСТОЯНИЯ СОЕДИНЕНИЯ

;============================================================= RAS Callback function

.const

ras_state_text db "OpenPort",0

db "PortOpened",0

db "ConnectDevice",0

db "DeviceConnected",0

db "AllDevicesConnected",0

db "Authenticate",0

db "AuthNotify",0

db "AuthRetry",0

db "AuthCallback",0

db "AuthChangePassword",0

db "AuthProject",0

db "AuthLinkSpeed",0

db "AuthAck",0

db "ReAuthenticate",0

db "Authenticated",0

db "PrepareForCallback",0

db "WaitForModemReset",0

db "WaitForCallback",0

db "Projected",0

db "StartAuthentication",0

db "CallbackComplete",0

db "LogonNetwork",0

db "SubEntryConnected",0

db "SubEntryDisconnected",0

db "Interactive",0

db "RetryAuthentication",0

db "CallbackSetByCaller",0

db "PasswordExpired",0

db "Connected",0

db "Disconnected",0

db "Unknown state",0

.data?

ras_monitor_id dd ?

.code

ras_dial_func PROC PUBLIC type_of_event,rasconnstate,ras_error

push esi

@if(online)

;Показ состояния соединения в строке статуса

mov edx,rasconnstate

@if(edx>=RASCS_Connected)

sub edx,RASCS_Connected-28

@else

@if(edx>=RASCS_Interactive)

sub edx,RASCS_Interactive-24

@endif

@endif

@if(edx>30)

mov edx,30

@endif

push edx

mov esi,offset ras_state_text

@while(edx)

call skip_nz

dec edx

@endw

invoke SendMessageA,stat_window,WM_SETTEXT,0,esi

pop edx

;Если соединение установлено - запуск нити контроля

@if(rasconnstate==RASCS_Connected)

invoke CreateThread,NULL,0,offset ras_monitor_func,0,0,offset ras_monitor_id

;Если соединение не установлено - передача сообщения WM_USER для

;повтора дозвона

@elseif(rasconnstate==RASCS_Disconnected)




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



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