What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Accessing registry in VB

Accessing registry in VB
Author: Message:
wipey
Full Member
***

Avatar
.oOo.

Posts: 310
37 / – / –
Joined: Jul 2003
O.P. Huh?  Accessing registry in VB
how do I read from the registry the plugin dir key, I've looked at a million examples and they've all just confused me:(

[Image: msgplus468banner2.gif]

www.wipey.tk 7210 days, 20 hours, 8 minutes, 31 seconds ago until my 18th birthday(b)

08-28-2003 08:39 PM
Profile PM Web Find Quote Report
Choli
Elite Member
*****

Avatar
Choli

Posts: 4714
Reputation: 42
43 / Male / Flag
Joined: Jan 2003
RE: Accessing registry in VB
You have to use the following API functions. Search them in Google where you'll sure find great examples of how to use them and detailed information about what each one does exactly.
code:
Private Declare Function RegOpenKeyEx Lib "advapi32.dll" _
        Alias "RegOpenKeyExA" ( _
    ByVal hKey As Long, _
    ByVal lpSubKey As String, _
    ByVal ulOptions As Long, _
    ByVal samDesired As Long, _
    phkResult As Long) _
As Long

Private Declare Function RegCloseKey Lib "advapi32.dll" ( _
    ByVal hKey As Long) _
As Long

Private Declare Function RegQueryValueEx Lib "advapi32.dll" _
        Alias "RegQueryValueExA" ( _
    ByVal hKey As Long, _
    ByVal lpValueName As String, _
    ByVal lpReserved As Long, _
    lpType As Long, _
    lpData As Any, _
    lpcbData As Long) _
As Long

Messenger Plus! en espaņol:
<< http://www.msgpluslive.es/ >>
<< http://foro.msgpluslive.es/ >>
:plus4:
08-29-2003 06:44 PM
Profile PM Find Quote Report
wipey
Full Member
***

Avatar
.oOo.

Posts: 310
37 / – / –
Joined: Jul 2003
O.P. RE: Accessing registry in VB
okay....thx, sorry for shoutin at u in the other post:$ unlike most ppl tho I'm learnin vb thro examples so it's pretty hard:@

[Image: msgplus468banner2.gif]

www.wipey.tk 7210 days, 20 hours, 8 minutes, 31 seconds ago until my 18th birthday(b)

08-29-2003 08:56 PM
Profile PM Web Find Quote Report
wipey
Full Member
***

Avatar
.oOo.

Posts: 310
37 / – / –
Joined: Jul 2003
O.P. RE: Accessing registry in VB
so let me get this straight, I open key using the first command, close it using the second and get it's value using the third:D?

why Ex tho?:S

This post was edited on 09-01-2003 at 06:31 PM by wipey.

[Image: msgplus468banner2.gif]

www.wipey.tk 7210 days, 20 hours, 8 minutes, 31 seconds ago until my 18th birthday(b)

09-01-2003 06:30 PM
Profile PM Web Find Quote Report
Choli
Elite Member
*****

Avatar
Choli

Posts: 4714
Reputation: 42
43 / Male / Flag
Joined: Jan 2003
RE: Accessing registry in VB
quote:
Originally posted by wipey
so let me get this straight, I open key using the first command, close it using the second and get it's value using the third?

Yes.
quote:
why Ex tho?

Ex? RegOpenKeyEx and RegQueryValueEx? That's the name of the API. Don't worry about that.
Messenger Plus! en espaņol:
<< http://www.msgpluslive.es/ >>
<< http://foro.msgpluslive.es/ >>
:plus4:
09-01-2003 06:58 PM
Profile PM Find Quote Report
wipey
Full Member
***

Avatar
.oOo.

Posts: 310
37 / – / –
Joined: Jul 2003
O.P. RE: Accessing registry in VB
cool thx I'm gonna try it:)
it's something to do with ansi/unicode aint it (I think:S)
is there any like database or anything which tells u what each api is for?

This post was edited on 09-01-2003 at 10:16 PM by wipey.

[Image: msgplus468banner2.gif]

www.wipey.tk 7210 days, 20 hours, 8 minutes, 31 seconds ago until my 18th birthday(b)

09-01-2003 10:10 PM
Profile PM Web Find Quote Report
Choli
Elite Member
*****

Avatar
Choli

Posts: 4714
Reputation: 42
43 / Male / Flag
Joined: Jan 2003
RE: RE: Accessing registry in VB
quote:
Originally posted by wipey
cool thx I'm gonna try it:)

;)
quote:
it's something to do with ansi/unicode aint it (I think:S)

If you want the unicode versions of those APIs (only for Windows NT/2000/XP/2003) change the "Alias <Name>A" and put "Alias <Name>W"
quote:
is there any like database or anything which tells u what each api is for?

Yes, of course. There are lots of sites where you can learn a lot of APIs and how to use them. In fact, all what I know about APIs, I learnt it reading tutorials on the Internet. I suggest you to see www.allapi.net and look for API information at www.microsoft.com. I've just found and updated version of an old guide I had. I think its url is http://www.pietschsoft.com/programming/vbapi/. I haven't read it yet, but if it's as good as the original one, I suggest you to view it. Really it's very good.
Messenger Plus! en espaņol:
<< http://www.msgpluslive.es/ >>
<< http://foro.msgpluslive.es/ >>
:plus4:
09-01-2003 10:47 PM
Profile PM Find Quote Report
wipey
Full Member
***

Avatar
.oOo.

Posts: 310
37 / – / –
Joined: Jul 2003
O.P. RE: Accessing registry in VB
cool I done it, I also learned a few new things:)
.bas files are for declaring constants and public functions yea(?) and generally making your code more organized:D

[Image: msgplus468banner2.gif]

www.wipey.tk 7210 days, 20 hours, 8 minutes, 31 seconds ago until my 18th birthday(b)

09-02-2003 12:50 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On