Solved

checking for shared folder access

Posted on 2003-12-07
4
146 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 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBS file using code from 2nd file (txt or vbs) 4 47
Run code from text file in vb 1 87
TT Auto Dashboard 13 101
VBA - If Bookmark = "XXBOOKMARKXX" then 15 51
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

749 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