News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Using the connections dialog box , Help

Started by ToutEnMasm, November 20, 2006, 04:46:04 PM

Previous topic - Next topic

ToutEnMasm


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

Tedd

No snowflake in an avalanche feels responsible.

ToutEnMasm


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

                   

Tedd

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..
No snowflake in an avalanche feels responsible.

ToutEnMasm


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

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

Tedd

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.
No snowflake in an avalanche feels responsible.

ToutEnMasm


Tedd

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.
No snowflake in an avalanche feels responsible.

ToutEnMasm


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

Tedd

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 ::)
No snowflake in an avalanche feels responsible.

ToutEnMasm

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

ragdog

hi ToutEnMasm

wanted you a Dial-Up connection source??

ToutEnMasm

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

ragdog

here is the source works with adsl

greetz ragdog

[attachment deleted by admin]