Jump to content
  • Advertisement
Sign in to follow this  
Spawned218

VB6 Starting/Restarting Messenger Service

This topic is 3591 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How would you go about Starting or Restarting the Messenger Service (NET SEND) from within VB6? Also how can you retrieve the IP address of your computer also via VB6? Thanks in advance. Spawned218.

Share this post


Link to post
Share on other sites
Advertisement
Have you tried using win32 api?

http://visualbasic.about.com/od/usevb6/l/aa103002a.htm
E.g. Private Declare Function GetActiveWindow Lib "user32" () As Long

I am sorry I could not find the right functions, though... :(

Share this post


Link to post
Share on other sites
The messenger service has been effectively (and thankfully) killed since XP SP2, and is not available in Vista. You will probably need to find an alternative route to what you wish to do.

As for retrieving the local IP address, I don't have VB6 installed but here's some VBScript that works here using WMI:
Function GetLocalIP()
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled=True")
For Each objItem In colItems
For Each objValue In objItem.IPAddress
GetLocalIP = objValue
Exit Function
Next
Next
End Function

MsgBox(GetLocalIP())
See here for more info.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!