Solved

checking for shared folder access

Posted on 2003-12-07
4
142 Views
Last Modified: 2010-05-03
i thinking of making a program that runs in the backgroud
and check for any user that is accessing my shared folder and let the program inform me.

i tried using NetSessionEnum . The tutorial that i found uses button to check everytime. I added a Do loop but it causes a high cpu usage.

example of my loop:

 Do While run 'start loop
       
       If currenttick + delay <= GetTickCount() Then
 
             [commands/check session]

            currenttick = GetTickCount()  'Reset the timer variable
        End If
       
        DoEvents
 Loop


i'm sure theres is a better way . Any idea ..??
0
Comment
Question by:jonathanx
4 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 100 total points
ID: 9894839
Use a timer and put your code in the timer event.

Idle_Mind
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now