|
From: Rick Raisley on 28 Jul 2008 14:00 Yes, it appears that by using Winsock, this is a single line function. But Winsock is not installed on most Windows PCs, and I'm really trying to limit the external runtimes I add. I've Googled this, and seen some /extremely/ complex code. I can't believe it's really that hard, so rather than trying every one I find, I thought I'd ask here, to see if someone has a favorite method I just need the PCs local IP address, not the router or whatever, just it's apparent IP. Thanks. -- Regards, Rick Raisley heavymetal-A-T-bellsouth-D-O-T-net
From: MikeD on 28 Jul 2008 14:46 "Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message news:O4p$uvN8IHA.4108(a)TK2MSFTNGP04.phx.gbl... > Yes, it appears that by using Winsock, this is a single line function. But Winsock is not installed on most Windows PCs, and I'm > really trying to limit the external runtimes I add. Do you mean the WinSock control (mswinsck.ocx)? If so, then yeah, I suppose not too many PCs already have that. But all Windows PC are going to have the Windows Sockets dll(s). > > I've Googled this, and seen some /extremely/ complex code. I can't believe it's really that hard, so rather than trying every one > I find, I thought I'd ask here, to see if someone has a favorite method I just need the PCs local IP address, not the router or > whatever, just it's apparent IP. > Did you try searching MS's Knowledge Base? I found this in about 5 seconds: How To Obtain the Host IP Address Using Windows Sockets http://support.microsoft.com/kb/160215/en-us The code's really not too bad (although it uses some conventions, such as type declaration characters) that I'd change. -- Mike Microsoft Visual Basic MVP
From: expvb on 28 Jul 2008 14:48 "Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message news:O4p$uvN8IHA.4108(a)TK2MSFTNGP04.phx.gbl... > Yes, it appears that by using Winsock, this is a single line function. But > Winsock is not installed on most Windows PCs, and I'm really trying to > limit the external runtimes I add. Winsock is part of the OS, but not Winsock.OCX. You can call the Winsock API directly like the following example without any additional dependencies other than what comes with the OS : http://vbnet.mvps.org/code/network/ipaddress.htm The code above should work fine on Windows 95+.
From: Rick Raisley on 28 Jul 2008 15:25 "MikeD" <nobody(a)nowhere.edu> wrote in message news:u20oEJO8IHA.1196(a)TK2MSFTNGP05.phx.gbl... > > "Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message > news:O4p$uvN8IHA.4108(a)TK2MSFTNGP04.phx.gbl... >> Yes, it appears that by using Winsock, this is a single line function. >> But Winsock is not installed on most Windows PCs, and I'm really trying >> to limit the external runtimes I add. > > Do you mean the WinSock control (mswinsck.ocx)? If so, then yeah, I > suppose not too many PCs already have that. But all Windows PC are going > to have the Windows Sockets dll(s). > > >> >> I've Googled this, and seen some /extremely/ complex code. I can't >> believe it's really that hard, so rather than trying every one I find, I >> thought I'd ask here, to see if someone has a favorite method I just need >> the PCs local IP address, not the router or whatever, just it's apparent >> IP. >> > > Did you try searching MS's Knowledge Base? I found this in about 5 > seconds: > > How To Obtain the Host IP Address Using Windows Sockets > http://support.microsoft.com/kb/160215/en-us > > The code's really not too bad (although it uses some conventions, such as > type declaration characters) that I'd change. > Actually, I did see that one, but thought a simpler solution might be available. You're right, though, the code is not that bad. Especially when you can just copy it. Thanks. ;-) -- Regards, Rick Raisley heavymetal-A-T-bellsouth-D-O-T-net
From: Rick Raisley on 28 Jul 2008 15:26 Thanks. That appears to be based on the MS solution, but it is VERY well documented, so is good to have. Thanks. ;-) -- Regards, Rick Raisley heavymetal-A-T-bellsouth-D-O-T-net "expvb" <nobody(a)cox.net> wrote in message news:u830oKO8IHA.3480(a)TK2MSFTNGP03.phx.gbl... > "Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message > news:O4p$uvN8IHA.4108(a)TK2MSFTNGP04.phx.gbl... >> Yes, it appears that by using Winsock, this is a single line function. >> But Winsock is not installed on most Windows PCs, and I'm really trying >> to limit the external runtimes I add. > > Winsock is part of the OS, but not Winsock.OCX. You can call the Winsock > API directly like the following example without any additional > dependencies other than what comes with the OS : > > http://vbnet.mvps.org/code/network/ipaddress.htm > > The code above should work fine on Windows 95+. > > >
|
Pages: 1 Prev: Null date in access db Next: "Invalid outside procedure" Subject was: Hi people |