hi all,
i'm trying from some hours to estabilish a RAS connection. But function fail.
Could someone show me an example ?
THX B7
i'm trying from some hours to estabilish a RAS connection. But function fail.
Could someone show me an example ?
THX B7
create a new file called : rasapi32.inc and fill it with :
; ..\LIB\RASAPI32.LIB PROTOTYPES
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DDMGetPhonebookInfo PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasAutodialAddressToNetwork PROTO :DWORD,:DWORD,:DWORD
RasAutodialEntryToNetwork PROTO :DWORD,:DWORD,:DWORD
RasConnectionNotificationA PROTO :DWORD,:DWORD,:DWORD
RasConnectionNotification equ <RasConnectionNotificationA>
RasCreatePhonebookEntryA PROTO :DWORD,:DWORD
RasCreatePhonebookEntry equ <RasCreatePhonebookEntryA>
RasDeleteEntryA PROTO :DWORD,:DWORD
RasDeleteEntry equ <RasDeleteEntryA>
RasDialA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasDial equ <RasDialA>
RasDialWow PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasEditPhonebookEntryA PROTO :DWORD,:DWORD,:DWORD
RasEditPhonebookEntry equ <RasEditPhonebookEntryA>
RasEnumAutodialAddressesA PROTO :DWORD,:DWORD,:DWORD
RasEnumAutodialAddresses equ <RasEnumAutodialAddressesA>
RasEnumConnectionsA PROTO :DWORD,:DWORD,:DWORD
RasEnumConnections equ <RasEnumConnectionsA>
RasEnumConnectionsWow PROTO :DWORD,:DWORD,:DWORD
RasEnumDevicesA PROTO :DWORD,:DWORD,:DWORD
RasEnumDevices equ <RasEnumDevicesA>
RasEnumEntriesA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasEnumEntries equ <RasEnumEntriesA>
RasEnumEntriesWow PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasGetAutodialAddressA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasGetAutodialAddress equ <RasGetAutodialAddressA>
RasGetAutodialEnableA PROTO :DWORD,:DWORD
RasGetAutodialEnable equ <RasGetAutodialEnableA>
RasGetAutodialParamA PROTO :DWORD,:DWORD,:DWORD
RasGetAutodialParam equ <RasGetAutodialParamA>
RasGetConnectResponse PROTO :DWORD,:DWORD
RasGetConnectStatusA PROTO :DWORD,:DWORD
RasGetConnectStatus equ <RasGetConnectStatusA>
RasGetConnectStatusWow PROTO :DWORD,:DWORD
RasGetCountryInfoA PROTO :DWORD,:DWORD
RasGetCountryInfo equ <RasGetCountryInfoA>
RasGetCredentialsA PROTO :DWORD,:DWORD,:DWORD
RasGetCredentials equ <RasGetCredentialsA>
RasGetEntryDialParamsA PROTO :DWORD,:DWORD,:DWORD
RasGetEntryDialParams equ <RasGetEntryDialParamsA>
RasGetEntryPropertiesA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasGetEntryProperties equ <RasGetEntryPropertiesA>
RasGetErrorStringA PROTO :DWORD,:DWORD,:DWORD
RasGetErrorString equ <RasGetErrorStringA>
RasGetErrorStringWow PROTO :DWORD,:DWORD,:DWORD
RasGetHport PROTO :DWORD
RasGetProjectionInfoA PROTO :DWORD,:DWORD,:DWORD,:DWORD
RasGetProjectionInfo equ <RasGetProjectionInfoA>
RasGetSubEntryHandleA PROTO :DWORD,:DWORD,:DWORD
RasGetSubEntryHandle equ <RasGetSubEntryHandleA>
RasGetSubEntryPropertiesA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasGetSubEntryProperties equ <RasGetSubEntryPropertiesA>
RasHangUpA PROTO :DWORD
RasHangUp equ <RasHangUpA>
RasHangUpWow PROTO :DWORD
RasIsRouterConnection PROTO :DWORD
RasRenameEntryA PROTO :DWORD,:DWORD,:DWORD
RasRenameEntry equ <RasRenameEntryA>
RasSetAutodialAddressA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasSetAutodialAddress equ <RasSetAutodialAddressA>
RasSetAutodialEnableA PROTO :DWORD,:DWORD
RasSetAutodialEnable equ <RasSetAutodialEnableA>
RasSetAutodialParamA PROTO :DWORD,:DWORD,:DWORD
RasSetAutodialParam equ <RasSetAutodialParamA>
RasSetCredentialsA PROTO :DWORD,:DWORD,:DWORD,:DWORD
RasSetCredentials equ <RasSetCredentialsA>
RasSetEntryDialParamsA PROTO :DWORD,:DWORD,:DWORD
RasSetEntryDialParams equ <RasSetEntryDialParamsA>
RasSetEntryPropertiesA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasSetEntryProperties equ <RasSetEntryPropertiesA>
RasSetOldPassword PROTO :DWORD,:DWORD
RasSetSubEntryPropertiesA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasSetSubEntryProperties equ <RasSetSubEntryPropertiesA>
RasValidateEntryNameA PROTO :DWORD,:DWORD
RasValidateEntryName equ <RasValidateEntryNameA>
>-------------next---------------<
TITLE JejeConex.asm
; by n u M I T_o r, 2k
; http://members.xoom.com/numit_or/asm.html
.386
.Model Flat,Stdcall
INCLUDE Windows.Inc
INCLUDE Kernel32.inc
INCLUDE User32.inc
INCLUDE Rasapi32.inc
INCLUDELIB Kernel32.Lib
INCLUDELIB User32.Lib
INCLUDELIB Rasapi32.Lib
.DATA
iError db "Error",0
iErrorAlloc db "Error de localizaci?n de memoria", 13, 10, 13, 10
db "Error to alloc memory", 0
iErrorLock db "Error de Bloqueo", 13, 10, 13, 10
db "Error to block memory", 0
iErrorGetP db "Error recuperando informaci?n", 13, 10, 13, 10
db "Error getting info", 0
iErrorSmallBuff db "ERROR_BUFFER_TOO_SMALL", 0
iErrorNoBook db "ERROR_CANNOT_OPEN_PHONEBOOK", 0
iErrorNoEntry db "ERROR_CANNOT_FIND_PHONEBOOK_ENTRY", 0
iErrorBadBuffer db "ERROR_BUFFER_INVALID", 0
iConecting db "Conectando - Conecting", 0
CapStr db "Jeje Conex...", 0
UNStr db 'Username: '
UNbuff db UNLEN dup (0)
PWStr db 13, 10, 'Password: '
PWBuff db PWLEN+2 dup (0)
Msg01 db 13, 10, 13, 10, '?Deseas conectarte?'
db 13, 10, 13, 10, 'Do you want to connect?', 0
temp1 db 'N?mero de entradas: %ld', 13, 10, 13, 10
db 'Number of entries: %ld', 0
.DATA?
hInstance dd ?
password dd ?
buffer db UNLEN+PWLEN+4+100*2 dup (?)
uEntriesStr db 200 dup (?)
.CODE
Begin:
Push 0h
Call GetModuleHandleA
push eax
Call MyConnect
call ExitProcess
MyConnect Proc uses esi edi ebx
LOCAL RasCon:RASCONNA, ren:RASENTRYNAMEA
LOCAL TrueSize:DWORD, uEntries:DWORD
Mov RasCon.hrasconn,NULL
; -------------------------------------------------------
; Get the number of entries in a phone book
; Obtiene el n?mero de entradas en la libreta telef?nica
; -------------------------------------------------------
lea esi, ren
invoke RtlZeroMemory, esi, sizeof RASENTRYNAME
mov dword ptr , 108h
invoke RasEnumEntries, 0, 0, esi, addr TrueSize, addr uEntries
push eax
xor edx, edx
mov eax, TrueSize
mov ecx, 108h
div ecx
; ----------------------------------------------------------
; eax has the number of entries, display it in a messagebox
; eax tiene el n?mero de entradas, desplegarlo
; ----------------------------------------------------------
invoke wsprintf, addr uEntriesStr, addr temp1, eax, eax
Invoke MessageBox, NULL, addr uEntriesStr, addr CapStr, MB_ICONINFORMATION
; -----------------------------------------------------------
; if there are more than 1 entry, get the name of the first
; si hay m?s de una enrtada, obtener el nombre de la primera
; -----------------------------------------------------------
pop eax
push eax
.if eax==ERROR_BUFFER_TOO_SMALL
mov ebx, TrueSize
invoke GlobalAlloc, 0, ebx
mov esi, eax
invoke RtlZeroMemory, esi, ebx
mov dword ptr , 108h
invoke RasEnumEntries, 0, 0, esi, addr TrueSize, addr uEntries
.endif
push esi
push edi
lea edi, ren
mov ecx, sizeof RASENTRYNAME
rep movsb
pop edi
pop esi
pop eax
.if eax==ERROR_BUFFER_TOO_SMALL
invoke GlobalFree, esi
.endif
; -----------------------------------------
; Get the data of the first entry
; Obtener los datos de la primera entrada
; -----------------------------------------
; -------------------------------------------------
; Alloc and block RASDIALPARAMSA strcture
; Localizar y bloquear la estrcutura RASDIALPARAMSA
; -------------------------------------------------
invoke GlobalAlloc, 0, sizeof RASDIALPARAMSA
.IF eax==NULL
Invoke MessageBox, NULL, ADDR iErrorAlloc, ADDR iError, 30h
xor eax, eax
ret
.ENDIF
push eax
; ------------------------------------
; Clean the structure buffer
; Limpiar el buffer de la estructura
; ------------------------------------
mov edi, eax
mov ecx, sizeof RASDIALPARAMSA
xor eax, eax
rep stosb
pop edi
; ---------------------------------
; Set the entry name
; Poner el nombre de la estructura
; ---------------------------------
assume edi: ptr RASDIALPARAMSA
mov dword ptr , 041Ch
invoke lstrcpy, addr .szEntryName, addr ren.szEntryName
invoke GlobalLock, edi
.IF eax==NULL
Invoke MessageBox,NULL,ADDR iErrorLock,ADDR iError,30h
xor eax, eax
ret
.ENDIF
mov edi, eax
; -----------------------
; Get the info
; Obtener la informaci?n
; -----------------------
Invoke RasGetEntryDialParams, NULL, edi, addr password
.IF eax==ERROR_CANNOT_OPEN_PHONEBOOK
Invoke MessageBox,NULL,ADDR iErrorNoBook,ADDR iError,30h
.ELSEIF eax==ERROR_CANNOT_FIND_PHONEBOOK_ENTRY
invoke MessageBox,NULL,ADDR iErrorNoEntry,ADDR iError,30h
.ELSEIF eax==ERROR_BUFFER_INVALID
invoke MessageBox,NULL,ADDR iErrorBadBuffer,ADDR iError,30h
.ELSEIF eax==0
; -------------------------
; Display the info
; Desplegar la informaci?n
; -------------------------
invoke lstrcat, addr UNStr, addr .szUserName
invoke lstrcat, addr buffer, addr UNStr
invoke lstrcat, addr PWStr, addr .szPassword
invoke lstrcat, addr buffer, addr PWStr
invoke lstrcat, addr buffer, addr Msg01
Invoke MessageBox,NULL, addr buffer, addr CapStr, MB_ICONINFORMATION or MB_YESNO
.if eax==IDYES
; -----------------------------------
; Conect with that entry
; Conectarse a trav?s de esa entrada
; -----------------------------------
Invoke RasDial, 0, NULL, edi, 0, 0, ADDR RasCon.hrasconn
Invoke MessageBox,NULL, addr .szEntryName, addr CapStr, MB_ICONINFORMATION
.endif
.ENDIF
; -------------------------------
; Free a unlock buffer
; Liberar y desbloquar el buffer
; -------------------------------
invoke GlobalUnlock, edi
invoke GlobalFree, edi
assume edi:nothing
ret
MyConnect endp
End Begin
>------------------have some fun------------------<
; ..\LIB\RASAPI32.LIB PROTOTYPES
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DDMGetPhonebookInfo PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasAutodialAddressToNetwork PROTO :DWORD,:DWORD,:DWORD
RasAutodialEntryToNetwork PROTO :DWORD,:DWORD,:DWORD
RasConnectionNotificationA PROTO :DWORD,:DWORD,:DWORD
RasConnectionNotification equ <RasConnectionNotificationA>
RasCreatePhonebookEntryA PROTO :DWORD,:DWORD
RasCreatePhonebookEntry equ <RasCreatePhonebookEntryA>
RasDeleteEntryA PROTO :DWORD,:DWORD
RasDeleteEntry equ <RasDeleteEntryA>
RasDialA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasDial equ <RasDialA>
RasDialWow PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasEditPhonebookEntryA PROTO :DWORD,:DWORD,:DWORD
RasEditPhonebookEntry equ <RasEditPhonebookEntryA>
RasEnumAutodialAddressesA PROTO :DWORD,:DWORD,:DWORD
RasEnumAutodialAddresses equ <RasEnumAutodialAddressesA>
RasEnumConnectionsA PROTO :DWORD,:DWORD,:DWORD
RasEnumConnections equ <RasEnumConnectionsA>
RasEnumConnectionsWow PROTO :DWORD,:DWORD,:DWORD
RasEnumDevicesA PROTO :DWORD,:DWORD,:DWORD
RasEnumDevices equ <RasEnumDevicesA>
RasEnumEntriesA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasEnumEntries equ <RasEnumEntriesA>
RasEnumEntriesWow PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasGetAutodialAddressA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasGetAutodialAddress equ <RasGetAutodialAddressA>
RasGetAutodialEnableA PROTO :DWORD,:DWORD
RasGetAutodialEnable equ <RasGetAutodialEnableA>
RasGetAutodialParamA PROTO :DWORD,:DWORD,:DWORD
RasGetAutodialParam equ <RasGetAutodialParamA>
RasGetConnectResponse PROTO :DWORD,:DWORD
RasGetConnectStatusA PROTO :DWORD,:DWORD
RasGetConnectStatus equ <RasGetConnectStatusA>
RasGetConnectStatusWow PROTO :DWORD,:DWORD
RasGetCountryInfoA PROTO :DWORD,:DWORD
RasGetCountryInfo equ <RasGetCountryInfoA>
RasGetCredentialsA PROTO :DWORD,:DWORD,:DWORD
RasGetCredentials equ <RasGetCredentialsA>
RasGetEntryDialParamsA PROTO :DWORD,:DWORD,:DWORD
RasGetEntryDialParams equ <RasGetEntryDialParamsA>
RasGetEntryPropertiesA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasGetEntryProperties equ <RasGetEntryPropertiesA>
RasGetErrorStringA PROTO :DWORD,:DWORD,:DWORD
RasGetErrorString equ <RasGetErrorStringA>
RasGetErrorStringWow PROTO :DWORD,:DWORD,:DWORD
RasGetHport PROTO :DWORD
RasGetProjectionInfoA PROTO :DWORD,:DWORD,:DWORD,:DWORD
RasGetProjectionInfo equ <RasGetProjectionInfoA>
RasGetSubEntryHandleA PROTO :DWORD,:DWORD,:DWORD
RasGetSubEntryHandle equ <RasGetSubEntryHandleA>
RasGetSubEntryPropertiesA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasGetSubEntryProperties equ <RasGetSubEntryPropertiesA>
RasHangUpA PROTO :DWORD
RasHangUp equ <RasHangUpA>
RasHangUpWow PROTO :DWORD
RasIsRouterConnection PROTO :DWORD
RasRenameEntryA PROTO :DWORD,:DWORD,:DWORD
RasRenameEntry equ <RasRenameEntryA>
RasSetAutodialAddressA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasSetAutodialAddress equ <RasSetAutodialAddressA>
RasSetAutodialEnableA PROTO :DWORD,:DWORD
RasSetAutodialEnable equ <RasSetAutodialEnableA>
RasSetAutodialParamA PROTO :DWORD,:DWORD,:DWORD
RasSetAutodialParam equ <RasSetAutodialParamA>
RasSetCredentialsA PROTO :DWORD,:DWORD,:DWORD,:DWORD
RasSetCredentials equ <RasSetCredentialsA>
RasSetEntryDialParamsA PROTO :DWORD,:DWORD,:DWORD
RasSetEntryDialParams equ <RasSetEntryDialParamsA>
RasSetEntryPropertiesA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasSetEntryProperties equ <RasSetEntryPropertiesA>
RasSetOldPassword PROTO :DWORD,:DWORD
RasSetSubEntryPropertiesA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
RasSetSubEntryProperties equ <RasSetSubEntryPropertiesA>
RasValidateEntryNameA PROTO :DWORD,:DWORD
RasValidateEntryName equ <RasValidateEntryNameA>
>-------------next---------------<
TITLE JejeConex.asm
; by n u M I T_o r, 2k
; http://members.xoom.com/numit_or/asm.html
.386
.Model Flat,Stdcall
INCLUDE Windows.Inc
INCLUDE Kernel32.inc
INCLUDE User32.inc
INCLUDE Rasapi32.inc
INCLUDELIB Kernel32.Lib
INCLUDELIB User32.Lib
INCLUDELIB Rasapi32.Lib
.DATA
iError db "Error",0
iErrorAlloc db "Error de localizaci?n de memoria", 13, 10, 13, 10
db "Error to alloc memory", 0
iErrorLock db "Error de Bloqueo", 13, 10, 13, 10
db "Error to block memory", 0
iErrorGetP db "Error recuperando informaci?n", 13, 10, 13, 10
db "Error getting info", 0
iErrorSmallBuff db "ERROR_BUFFER_TOO_SMALL", 0
iErrorNoBook db "ERROR_CANNOT_OPEN_PHONEBOOK", 0
iErrorNoEntry db "ERROR_CANNOT_FIND_PHONEBOOK_ENTRY", 0
iErrorBadBuffer db "ERROR_BUFFER_INVALID", 0
iConecting db "Conectando - Conecting", 0
CapStr db "Jeje Conex...", 0
UNStr db 'Username: '
UNbuff db UNLEN dup (0)
PWStr db 13, 10, 'Password: '
PWBuff db PWLEN+2 dup (0)
Msg01 db 13, 10, 13, 10, '?Deseas conectarte?'
db 13, 10, 13, 10, 'Do you want to connect?', 0
temp1 db 'N?mero de entradas: %ld', 13, 10, 13, 10
db 'Number of entries: %ld', 0
.DATA?
hInstance dd ?
password dd ?
buffer db UNLEN+PWLEN+4+100*2 dup (?)
uEntriesStr db 200 dup (?)
.CODE
Begin:
Push 0h
Call GetModuleHandleA
push eax
Call MyConnect
call ExitProcess
MyConnect Proc uses esi edi ebx
LOCAL RasCon:RASCONNA, ren:RASENTRYNAMEA
LOCAL TrueSize:DWORD, uEntries:DWORD
Mov RasCon.hrasconn,NULL
; -------------------------------------------------------
; Get the number of entries in a phone book
; Obtiene el n?mero de entradas en la libreta telef?nica
; -------------------------------------------------------
lea esi, ren
invoke RtlZeroMemory, esi, sizeof RASENTRYNAME
mov dword ptr , 108h
invoke RasEnumEntries, 0, 0, esi, addr TrueSize, addr uEntries
push eax
xor edx, edx
mov eax, TrueSize
mov ecx, 108h
div ecx
; ----------------------------------------------------------
; eax has the number of entries, display it in a messagebox
; eax tiene el n?mero de entradas, desplegarlo
; ----------------------------------------------------------
invoke wsprintf, addr uEntriesStr, addr temp1, eax, eax
Invoke MessageBox, NULL, addr uEntriesStr, addr CapStr, MB_ICONINFORMATION
; -----------------------------------------------------------
; if there are more than 1 entry, get the name of the first
; si hay m?s de una enrtada, obtener el nombre de la primera
; -----------------------------------------------------------
pop eax
push eax
.if eax==ERROR_BUFFER_TOO_SMALL
mov ebx, TrueSize
invoke GlobalAlloc, 0, ebx
mov esi, eax
invoke RtlZeroMemory, esi, ebx
mov dword ptr , 108h
invoke RasEnumEntries, 0, 0, esi, addr TrueSize, addr uEntries
.endif
push esi
push edi
lea edi, ren
mov ecx, sizeof RASENTRYNAME
rep movsb
pop edi
pop esi
pop eax
.if eax==ERROR_BUFFER_TOO_SMALL
invoke GlobalFree, esi
.endif
; -----------------------------------------
; Get the data of the first entry
; Obtener los datos de la primera entrada
; -----------------------------------------
; -------------------------------------------------
; Alloc and block RASDIALPARAMSA strcture
; Localizar y bloquear la estrcutura RASDIALPARAMSA
; -------------------------------------------------
invoke GlobalAlloc, 0, sizeof RASDIALPARAMSA
.IF eax==NULL
Invoke MessageBox, NULL, ADDR iErrorAlloc, ADDR iError, 30h
xor eax, eax
ret
.ENDIF
push eax
; ------------------------------------
; Clean the structure buffer
; Limpiar el buffer de la estructura
; ------------------------------------
mov edi, eax
mov ecx, sizeof RASDIALPARAMSA
xor eax, eax
rep stosb
pop edi
; ---------------------------------
; Set the entry name
; Poner el nombre de la estructura
; ---------------------------------
assume edi: ptr RASDIALPARAMSA
mov dword ptr , 041Ch
invoke lstrcpy, addr .szEntryName, addr ren.szEntryName
invoke GlobalLock, edi
.IF eax==NULL
Invoke MessageBox,NULL,ADDR iErrorLock,ADDR iError,30h
xor eax, eax
ret
.ENDIF
mov edi, eax
; -----------------------
; Get the info
; Obtener la informaci?n
; -----------------------
Invoke RasGetEntryDialParams, NULL, edi, addr password
.IF eax==ERROR_CANNOT_OPEN_PHONEBOOK
Invoke MessageBox,NULL,ADDR iErrorNoBook,ADDR iError,30h
.ELSEIF eax==ERROR_CANNOT_FIND_PHONEBOOK_ENTRY
invoke MessageBox,NULL,ADDR iErrorNoEntry,ADDR iError,30h
.ELSEIF eax==ERROR_BUFFER_INVALID
invoke MessageBox,NULL,ADDR iErrorBadBuffer,ADDR iError,30h
.ELSEIF eax==0
; -------------------------
; Display the info
; Desplegar la informaci?n
; -------------------------
invoke lstrcat, addr UNStr, addr .szUserName
invoke lstrcat, addr buffer, addr UNStr
invoke lstrcat, addr PWStr, addr .szPassword
invoke lstrcat, addr buffer, addr PWStr
invoke lstrcat, addr buffer, addr Msg01
Invoke MessageBox,NULL, addr buffer, addr CapStr, MB_ICONINFORMATION or MB_YESNO
.if eax==IDYES
; -----------------------------------
; Conect with that entry
; Conectarse a trav?s de esa entrada
; -----------------------------------
Invoke RasDial, 0, NULL, edi, 0, 0, ADDR RasCon.hrasconn
Invoke MessageBox,NULL, addr .szEntryName, addr CapStr, MB_ICONINFORMATION
.endif
.ENDIF
; -------------------------------
; Free a unlock buffer
; Liberar y desbloquar el buffer
; -------------------------------
invoke GlobalUnlock, edi
invoke GlobalFree, edi
assume edi:nothing
ret
MyConnect endp
End Begin
>------------------have some fun------------------<
Max
many thanks, that's what i was lookin for.
B7
many thanks, that's what i was lookin for.
B7
MAX, thanks again, you gave me everything to do the connection...
It's missing just a little thing to complete my little prog... how can i check if a connection is already active, before do RasDial... ?
Thanks B7
It's missing just a little thing to complete my little prog... how can i check if a connection is already active, before do RasDial... ?
Thanks B7
hossa
look at this treath from this section: http://www.asmcommunity.net/board/showthread.php?threadid=2406
why need your tool to know if there is a connection before it open a new df? ?
hope you dont code a dialer :)
look at this treath from this section: http://www.asmcommunity.net/board/showthread.php?threadid=2406
why need your tool to know if there is a connection before it open a new df? ?
hope you dont code a dialer :)
thanks again,
i've looked @the code.
Seems the state can be returned by RasEnumConnections funct.
many thx, B7
i've looked @the code.
Seems the state can be returned by RasEnumConnections funct.
many thx, B7