I search how to connect the internet using the connections dialog box that have all the needed paramaters in them.
Is someone have an idea or a source code ?
ToutEnMasm
Which dialog box?
It's the dialog box that appear with "InternetGoOnline",the function don't use the defaut url that is defined in the "networks connexions ".
The dialog box ask you if you want to connect or not.
I am searching how to connect using the defaut url.
ToutEnMasm
I think the url will be stored in the registry along with the other settings for the connection through your internet service provider. If you get the string for the url then you can pass it to the InternetGoOnline function and it will use that url - which will be what internet explorer does if it tries to open a (different) url but finds the computer is not online. So if you open a url and the computer is not online, this dialog should pop-up automatically?
As for finding the isp-url, I don't know where to start. I assume there will be a standard key that points to the current internet connection settings (for the isp), so you follow that and get the correct keys/settings that way. Hmmm..
seem to be in
Quote
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
value Start Page
If anyone have the same it must be good
ToutEnMasm
This code open an internet communication with ..... No parameters.
.data
starturl db INTERNET_MAX_URL_LENGTH dup (0) ;2048
.code
debut:
invoke LireBaseRegistre,addr starturl
invoke InternetGoOnline,addr starturl,NULL,NULL
invoke ExitProcess,NULL
;--------------------------------- SUB --------------------------
;################################################################
LireBaseRegistre PROC uses esi edi preponse:DWORD
Local reponse:DWORD,dwtype:DWORD
Local Hkey:DWORD,NbValues:DWORD
Local Hsubkey:DWORD
Local TailleClassCle:DWORD,NbBytes
LOCAL SousCle[MAX_PATH]:BYTE
Local retour:DWORD
ZEROLOCALES retour
;KeyPath db "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main",0
;KeyValue db "Start Page",0
invoke RegCreateKeyEx,HKEY_CURRENT_USER,SADR ("Software"),NULL,\
NULL,REG_OPTION_NON_VOLATILE,KEY_READ, \
NULL,addr Hkey,addr reponse
.if eax != ERROR_SUCCESS
mov Hkey,0
jmp FindeLireBaseRegistre
.endif
invoke RegCreateKeyEx,Hkey,SADR ("Microsoft"),NULL,\
NULL,REG_OPTION_NON_VOLATILE,KEY_READ, \
NULL,addr Hsubkey,addr reponse
.if eax != ERROR_SUCCESS
jmp FindeLireBaseRegistre
.endif
invoke RegCloseKey,Hkey
PuPo Hkey,Hsubkey
invoke RegCreateKeyEx,Hkey,SADR ("Internet Explorer"),NULL,\
NULL,REG_OPTION_NON_VOLATILE,KEY_READ, \
NULL,addr Hsubkey,addr reponse
.if eax != ERROR_SUCCESS
jmp FindeLireBaseRegistre
.endif
invoke RegCloseKey,Hkey
PuPo Hkey,Hsubkey
invoke RegCreateKeyEx,Hkey,SADR ("Main"),NULL,\
NULL,REG_OPTION_NON_VOLATILE,KEY_READ, \
NULL,addr Hsubkey,addr reponse
.if eax != ERROR_SUCCESS
jmp FindeLireBaseRegistre
.endif
invoke RegCloseKey,Hkey
PuPo Hkey,Hsubkey
mov NbBytes,INTERNET_MAX_URL_LENGTH
invoke RegQueryValueEx,Hkey,SADR("Start Page"),NULL,addr dwtype,\
preponse,addr NbBytes
FindeLireBaseRegistre:
.if Hkey != 0
invoke RegCloseKey,Hkey
.endif
mov eax,retour
ret
LireBaseRegistre endp
That key gives the "Homepage" url, set by internet explorer.
Often this is set by the isp setup installer, but can easily be changed. I don't think it should be taken as the default 'connect' url.
another Idea ?
ToutEnmasm
Sorry, my connection doesn't work the same way, so I can't check.
See if you can find the isp 'connection' url in another registry key? Or parts of it (which will be concatenated.)
There will be a place for isp settings, and it must be locatable in a standard way -- just need to find out where.
See if the isp cd-rom (or whatever they supllied) installer/sign-up stuff has any clues -- if this is what sets the keys, then you can try to find which ones it creates/modifies.
Hello,
I have a .isp that send me to the key HKEY_CLASSES_ROOT\x-internet-signup
and the associated program is
%ProgramFiles%\Internet Explorer\Connection Wizard\ICWCONN1.EXE,0
Perhaps if you have a partial key name ?
ToutEnMasm
Check if there are any settings in: Software\Microsoft\Internet Connection Wizard ?
Also check your windows directory (and subs) for files that might contain the settings from your isp.. (maybe "oemcust.*")
Sorry, not much clue ::)
Ok,
The file exist,perhaps something can be made with it but I don't know what ?.They are not readable
ToutEnMasm
Quote
C:\WINDOWS\system32\oobe\html>dir /B
ispsgnup
mouse
oemcust
oemhw
oemreg
iconnect
dslmain
isptype
sconnect
hi ToutEnMasm
wanted you a Dial-Up connection source??
Hello,
Ok post it ,it can be useful for many people.
If the source can be independant from the explorer ( not very easy to do) it would be perfect.
ToutEnMasm
here is the source works with adsl
greetz ragdog
[attachment deleted by admin]
Thanks,
This enum the dial-up connections ,There is a little problem here :
;modify code
invoke RasEnumEntries, NULL, NULL, lpRasEntryName, ADDR dwCb, ADDR dwEntries
.if eax == ERROR_BUFFER_TOO_SMALL
jmp AllocateRasEntryNameLoop
.elseif eax == ERROR_NOT_ENOUGH_MEMORY
jmp RetFail
.elseif eax != 0
jmp RetFail
.endif
yes i say it :U
i wanted a RasHangUp source for adsl can help you?
i have tested this works
[attachment deleted by admin]
Hello,
There is something strange with the size of the structure RASENTRYNAME.
Yours,that work
Quote
RASENTRYNAME5A STRUCT
dwSize dd ?
szEntryName db 260 dup(?)
dwFlags dd ?
szPhonebookPath db 264 dup(?)
RASENTRYNAME5A ENDS
and the one of the sdk , don't work
Quote
RASENTRYNAME STRUCT
dwSize DWORD ?
szEntryName BYTE RAS_MaxEntryName + 1 dup (?) ;256+1=257
IF (COMPARE (WINVER,GE,0500h)) ;exclude 95 98
dwFlags DWORD ?
szPhonebookPath BYTE MAX_PATH + 1 dup (?) ;260 +1 =261
ENDIF
RASENTRYNAME ENDS
MSDN say there is a bug for that only on windows CE (use of 10 structures to avoid it)
Where did you find the correct answer ?.
ToutEnMasm
Found what is the problem,
The structure must be align 4 ,SDK (ras.h) and must be write as this
Quote
RASENTRYNAME STRUCT 4
dwSize DWORD ?
szEntryName BYTE RAS_MaxEntryName + 1 dup (?)
;IF (COMPARE (WINVER,GE,0500h)) ;exclus 95 98
dwFlags DWORD ?
szPhonebookPath BYTE MAX_PATH + 1 dup (?) ;260
ENDIF
TRASENTRYNAME ENDS
write like that sizeof RASENTRYNAME return the correct size and the function RasEnumEntries don't return an ERROR_INVALID_SIZE (278h).
ToutEnMasm