>Would it be possible to record somebody's IP address if they access a certain file on a shared drive. For example if the user opens the shared file it will record their IP address in a Table. Subsequently if the user closes down the file it removes the ipaddress?
>
Neil, your program will have to record and store the users IP address as and when he enters/exits your application. The following code from
www.news2news.com shows how to get the IP address:
DECLARE INTEGER GetAdaptersInfo IN iphlpapi;
STRING @pAdapterInfo, LONG @pOutBufLen
LOCAL lcBuffer, lnBufsize
lnBufsize = 4096
lcBuffer = Repli(Chr(0), lnBufsize)
IF GetAdaptersInfo(@lcBuffer, @lnBufsize) = 0
? "Current IP address:", STRTRAN(SUBSTR(lcBuffer, 433,15), Chr(0),"")
? "Gateway:", STRTRAN(SUBSTR(lcBuffer, 473,15), Chr(0),'')
ENDIF
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.