Solved

checking for shared folder access

Posted on 2003-12-07
4
147 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 86

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

734 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