Using Win32 functions in Visual FoxPro Image Gallery
Network Management
..msdn
NetApiBufferFree
NetApiBufferSize
NetConnectionEnum
NetFileClose
NetFileEnum
NetFileGetInfo
NetGetDCName
NetGroupEnum
NetLocalGroupEnum
NetMessageBufferSend
NetMessageNameAdd
NetMessageNameDel
NetMessageNameEnum
NetScheduleJobAdd
NetScheduleJobDel
NetScheduleJobEnum
NetServerEnum
NetServerGetInfo
NetSessionEnum
NetShareAdd
NetShareDel
NetShareEnum
NetShareSetInfo
NetUserAdd
NetUserChangePassword
NetUserDel
NetUserEnum
NetUserGetGroups
NetUserGetInfo
NetUserGetLocalGroups
NetUserSetInfo
NetWkstaGetInfo
NetWkstaTransportEnum
NetWkstaUserEnum
Code examples:
Adding and deleting Scheduled Tasks using NetScheduleJob API functions
Adding and deleting User Accounts
Enumerating global and local group accounts on a server (WinNT/XP/2K)
Enumerating network sessions established on a server
Finding out if the current user is the Guest account
How to enumerate, add and delete shares on the local computer (WinNT/XP)
Obtaining names of local and global groups for current user (WinNT/XP/2K)
Retrieving configuration information for the specified server (Win2000/XP)
Retrieving configuration information for the specified workstation (Win2000/XP)
Retrieving the name of the primary domain controller (PDC) and join status information
Using NetWkstaTransportEnum to obtain MAC Address of remote server
Using the NetMessageBufferSend to send messages on the network
Adding and deleting Scheduled Tasks using NetScheduleJob API functions

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
Versions:
click to open
Before you begin:
With Scheduled Tasks, you can schedule any script, program, or document to run at a time that is most convenient for you. This service starts each time you start Windows and runs in the background.



Four NetScheduleJob API calls implement functionality similar to what OS command AT gives:
  • NetScheduleJobAdd
  • NetScheduleJobDel
  • NetScheduleJobEnum
  • NetScheduleJobGetInfo



  •  
      Members area. Log in to view this example.
     
      User name:
      Password:
     
     
      Forgot your password?
     
      Sign up for
    the Membership
     
     


    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    7536 bytes  
    Created: 2005-07-26 14:45:04  
    Modified: 2011-12-10 09:20:22  
    Visits in 7 days: 122  
    Listed functions:
    GlobalAlloc
    GlobalFree
    GlobalSize
    NetApiBufferFree
    NetApiBufferSize
    NetScheduleJobAdd
    NetScheduleJobDel
    NetScheduleJobEnum
    Printer friendly API declarations
    My comment:
    Use the following code to test NetScheduleJobs and NetScheduleJob classes:

    LOCAL oJobs As NetScheduleJobs, oJob As NetScheduleJob
    oJobs = CREATEOBJECT("NetScheduleJobs")

    oJob = CREATEOBJECT("NetScheduleJob")
    WITH oJob
    *        .jobtime = 9.5 * 3600 * 1000 && 09:30 AM
    *        .SetDOM(5, 20) && payroll days :)
    *        .SetDOW(0, 3) && Monday to Thursday
            .jobtime = (60 + VAL(SYS(2))) * 1000 && now + 1 minute
            .jobcommand = "notepad.exe"
    ENDWITH

    IF NOT oJobs.AddJob(oJob)
            ? "Error:", oJobs.errorcode
    ENDIF

    FOR EACH oJob IN oJobs
            WITH oJob
                    ? "ID=" + TRANSFORM(.jobid) + ", " +;
                            .jobcommand
            ENDWITH
    NEXT
    Word Index links for this example:
    Translate this page:
      Spanish    Portuguese    German    French    Italian  
    FreeTranslation.com offers instant, free translations of text or web pages.
    User Contributed Notes:
    There are no notes on this subject.


    Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

    Privacy policy
    Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (54.198.134.32)
    7 sec.Function: 'waveOutPrepareHeader'
    Function group: 'Windows Multimedia'
    14 sec.Function: 'InternetAutodialHangup'
    Function group: 'Internet Functions (WinInet)'
    20 sec.Example: 'Dragging files from Explorer window and dropping them on FoxPro control (requires VFP9)'
    33 sec.Function: 'SQLAllocEnv'
    Function group: 'ODBC API'
    41 sec.Function: 'FtpDeleteFile'
    49 sec.Solutions
    58 sec.Function: 'GetFileAttributesEx'
    Function group: 'File Management'
    1.12 min.Gallery
    1.28 min.Function: 'FtpCommand'
    Function group: 'Internet Functions (WinInet)'
    1.5 min.Project
    Google
    Advertise here!