Win32 Extensions Reference

Python Objects

  • Modules
  • Objects

    Overviews and other documentation

  • Recursive directory deletes and special files
  • Windows NT Eventlog
  • Windows NT Eventlog and Threading
  • Windows NT Files -- Locking
  • Windows NT Security -- Impersonation
  • Directory permissions with GetNamedSecurityInfo
  • Windows NT/2000 Networking with the win32net module
  • Constants

    Help file built: 07/26/01


Overviews

  • Recursive directory deletes and special files
  • Windows NT Eventlog
  • Windows NT Eventlog and Threading
  • Windows NT Files -- Locking
  • Windows NT Security -- Impersonation
  • Directory permissions with GetNamedSecurityInfo
  • Windows NT/2000 Networking with the win32net module


Recursive directory deletes and special files

Python's win32 access for file properties to enable deletes

Sometimes you may want to do something like remove entire directory trees. Python has some great utilities to do that, except files with special attributes cannot be typically deleted.

To get around this problem you need to use the win32 call to SetFileAttributes to be a normal file.

The C++ call looks like this:

BOOL SetFileAttributes( LPCTSTR lpFileName, DWORD dwFileAttributes );

You provide it 2 arguments the filename and the specific attributes and it returns whether or not it succeeded.

The corresponding python call is: int = win32api.SetFileAttributes( pathName, attrs )

The only question is where do you get attrs. It is included in the ever handy win32con module specifically -- win32con.FILE_ATTRIBUTE_*. You can set a file to be read only, archive, hidden, etc. We are concerned with setting it back to normal, so we want: win32con.FILE_ATTRIBUTE_NORMAL

The example below can be useful, but, of course, be careful with it, since it deletes a lot of stuff. It is a recursive function The example also makes use of some handy functions from the os module.

Example

Here is a basic example of how to remove a directory tree:

import win32con

import win32api

import os

def del_dir(self,path):

    for file in os.listdir(path):

        file_or_dir = os.path.join(path,file)

        if os.path.isdir(file_or_dir) and not os.path.islink(file_or_dir):

            del_dir(file_or_dir) #it's a directory reucursive call to function again

        else:

            try:

                os.remove(file_or_dir) #it's a file, delete it

            except:

                #probably failed because it is not a normal file

                win32api.SetFileAttributes(file_or_dir, win32con.FILE_ATTRIBUTE_NORMAL)

                os.remove(file_or_dir) #it's a file, delete it

        os.rmdir(path) #delete the directory here
Have a great time with programming with python!

John Nielsen   nielsenjf@my-deja.com


Windows NT Eventlog

Python's win32 access for the Eventlog

If you need to scan the eventlog of many servers or do specific filtering based off of the event log, python's win32evtlog win32evtlogutil libraries give you an means to do it efficiently.

The library of primary importance is win32evtlog. With it you can connect to a server's eventlog with the call.

Example

Here is the basic call:

logtype='System'

hand=win32evtlog.OpenEventLog(server,logtype)
This returns a handle from which you can make calls such as one that will give you the total number of events or another examine the details for each event. The logtype variable is set to the type of log you want to look at. The default ones are: Application, Security, and System.

After you have the handle you can get ask for things such as the number of records, or the specific event records:

total=win32evtlog.GetNumberOfEventLogRecords(hand)

flags = win32evtlog.EVENTLOG_BACKWARDS_READ|win32evtlog.EVENTLOG_SEQUENTIAL_READ

events=win32evtlog.ReadEventLog(hand,flags,0)
ReadEventLog returns a number of event objects which may not be all of them. You need to continously check in a loop until there are no more events returned by ReadEventLog. You may notice that ReadEventLog has a flags argument. The flags (which are convinently available with the win32evtlog library) specify how to read the event log.

Here is a simple loop getting the data from the events that ReadEventLog returned:

for ev_obj in events:

    the_time=ev_obj.TimeGenerated.Format() #'12/23/99 15:54:09'

    evt_id=str(winerror.HRESULT_CODE(ev_obj.EventID))

    computer=str(ev_obj.ComputerName)

    cat=ev_obj.EventCategory

    seconds=date2sec(the_time)

    record=ev_obj.RecordNumber

    msg=str(win32evtlogutil.SafeFormatMessage(ev_obj, logtype))

    source=str(ev_obj.SourceName)
We use the library win32evtlogutil to get the actual text body for the event. To get a easily readable date for the event, you need to specify the 'Format' method for the TimeGenerated part of the event object.

The win32evtlogutil comes in handy to give us the actual text body of the eventlog message. If you want to do any sorting based of off time, here is a handy function that converts the eventlog's time format into seconds using's python's time and regexp library:

def date2sec(self,evt_date):

    '''

    converts '12/23/99 15:54:09' to seconds

    print '333333',evt_date

    '''

    regexp=re.compile('(.*)\\s(.*)')

    reg_result=regexp.search(evt_date)

    date=reg_result.group(1)

    the_time=reg_result.group(2)

    (mon,day,yr)=map(lambda x: string.atoi(x),string.split(date,'/'))

    (hr,min,sec)=map(lambda x: string.atoi(x),string.split(the_time,':'))

    tup=[yr,mon,day,hr,min,sec,0,0,0]

    sec=time.mktime(tup)

    return sec
If you want to get the current localtime in seconds, you can make the call: begin_sec=time.time(). To convert that to a date use: begin_time=str(time.strftime('%H:%M:%S ',time.localtime( begin_sec )))

Finally here is all the code that puts together an application which looks for all events for a server since a certain time.

Find events:

import win32evtlog

import win32evtlogutil

import win32security

import win32con

import winerror

import time

import re

import string

import sys

import traceback

def date2sec(evt_date):

    '''

    This function converts dates with format

    '12/23/99 15:54:09' to seconds since 1970.

    '''

    regexp=re.compile('(.*)\\s(.*)') #store result in site

    reg_result=regexp.search(evt_date)

    date=reg_result.group(1)

    the_time=reg_result.group(2)

    (mon,day,yr)=map(lambda x: string.atoi(x),string.split(date,'/'))

    (hr,min,sec)=map(lambda x: string.atoi(x),string.split(the_time,':'))

    tup=[yr,mon,day,hr,min,sec,0,0,0]

    sec=time.mktime(tup)

    return sec

####Main program

#initialize variables

flags = win32evtlog.EVENTLOG_BACKWARDS_READ|\\

        win32evtlog.EVENTLOG_SEQUENTIAL_READ

#This dict converts the event type into a human readable form

evt_dict={win32con.EVENTLOG_AUDIT_FAILURE:'EVENTLOG_AUDIT_FAILURE',\\

          win32con.EVENTLOG_AUDIT_SUCCESS:'EVENTLOG_AUDIT_SUCCESS',\\

          win32con.EVENTLOG_INFORMATION_TYPE:'EVENTLOG_INFORMATION_TYPE',\\

          win32con.EVENTLOG_WARNING_TYPE:'EVENTLOG_WARNING_TYPE',\\

          win32con.EVENTLOG_ERROR_TYPE:'EVENTLOG_ERROR_TYPE'}

computer='bedrock'

logtype='System'

begin_sec=time.time()

begin_time=time.strftime('%H:%M:%S  ',time.localtime(begin_sec))

#open event log

hand=win32evtlog.OpenEventLog(computer,logtype)

print logtype,' events found in the last 8 hours since:',begin_time

try:

  events=1

  while events:

    events=win32evtlog.ReadEventLog(hand,flags,0)

      for ev_obj in events:

    #check if the event is recent enough

    #only want data from last 8hrs

    the_time=ev_obj.TimeGenerated.Format()

    seconds=date2sec(the_time)

    if seconds < begin_sec-28800: break

    #data is recent enough, so print it out

    computer=str(ev_obj.ComputerName)

    cat=str(ev_obj.EventCategory)

    src=str(ev_obj.SourceName)

    record=str(ev_obj.RecordNumber)

    evt_id=str(winerror.HRESULT_CODE(ev_obj.EventID))

    evt_type=str(evt_dict[ev_obj.EventType])

    msg = str(win32evtlogutil.SafeFormatMessage(ev_obj, logtype))

    print string.join((the_time,computer,src,cat,record,evt_id,evt_type,msg[0:15]),':')

    if seconds < begin_sec-28800: break #get out of while loop as well

  win32evtlog.CloseEventLog(hand)

except:

    print traceback.print_exc(sys.exc_info())

    Some useful additions to this would be to make it

multi-threaded and deploy it as a web application, to look at many servers.
Have a great time with programming with python!

John Nielsen   nielsenjf@my-deja.com


Windows NT Eventlog and Threading

Python's threading to manage access access to many Eventlogs

If you need to access the eventlog of many servers, it can take quite some time if you go through a list sequentially -- since you need to wait for each operation to complete. There are a few ways you can do this in python. You can spawn many processes, use python's win32 libraries for win32 style-threading, or use python's native libraries.

In NT spawning a process is slow (though in this case that may not matter) and it can be a little cumbersome to get them to share data. Since python's win32 libraries are thread-safe, you can use python's win32 libraries to do win32-style threading or use python's native threading library to spawn threads. Win32 style threading is available via python's win32process library. It gives you excellent control and ability to do some sophisticated stuff, however raw win32 threaded programming can be tricky. The final option is Python's native high-level threading library which is built on top of a lower level thread library. It turns out that it is easy to use and cross-platform (well at least to platforms that support threading). It's only disadvantage is that your thread control(synchronization, giving them priorities, suspending them, etc.) is limited. In many cases, however, that is not important, you just need the ability to _easily_ do a few things at once. Thus, we'll focus on Python's native threading.

One final note, the python interpreter has a global lock for threads forcing them to run serially. Which means only one thread can intrepret python code at any given time. After a certain amount of python code has been run, then control is switched to another thread. Thus, this means you can't have things like many threads running on many processors. Fortunately, in cases with I/O and extension modules (in which you can manipulate the interpreter lock), this isn't an issue. In our case (accessing the eventlog of many servers) the global lock shouldn't be a bottleneck(i/o will be).

There are a couple of ways to use the threading library. We'll look at the case in which you override the run method of the threading.Thread class. The run method will contain the actual code you want to run many times.

The basic procedure to follow is this. For every server in the list: 1)create a thread class 2)call start method in thread class(which invokes your run method) 3)call join method to force main thread to wait for threads to complete 4)compile data together from all thread classes created.

Since you don't use the return values of the thread, you need to store data with the thread object that you create. Furthermore, you'll notice we use the join method to force the calling thread to wait for the other threads to finish.

Example

Here is the skeleton of that:

#We are overiding run() method of the threading.Thread class.

class thread_it ( threading.Thread ) :

  def __init__ ( self, server) :

    threading.Thread.__init__(self)

    self.data=[] #store data here to get later

    self.server=server

# the start() method invokes run

  def run ( self ): #overridden from threading library

    try:

      pass #get event information here and store in data

    except:

      #append any errors to self.data, to get later

      self.data.append('Error for '+self.server+':'+str(traceback.print_exc(sys.exc_info())))

######main here

try:

    l_servers=('fred','barney','wilma','betty')

    for server in l_servers: #make a thread for each server

        thread = thread_it (server)

        threads.append ( thread ) #append to the a threads list

    for thread in threads: #now go thru list and start threads running

        thread.start()

    for thread in threads: #make main thread wait for all in list to complete

    thread.join()

    for thread in threads: #print thread results

      for event in thread.data:

    print event

except:

    print traceback.print_exc(sys.exc_info())
Looking at the skeleton, all one really needs to do is put the eventlog code in the run function and have it store results in the data variable. The main part is almost boilerplate code. So you can see multi-threading at work, I've added a 'now' column to the eventlog printout which tells you the current time, and easily shows that the data was gathered simultaneously on the servers.

Filling out the skeleton we get code like this:

import win32evtlog

import win32evtlogutil

import win32security

import win32con

import winerror

import time

import re

import string

import sys

import threading

import traceback

#We are overiding run() method of the threading.Thread class.

class thread_it ( threading.Thread ) :

    def __init__ ( self, server) :

        threading.Thread.__init__(self)

        self.data=[] #store data here to get later

        self.server=server

# the start() method invokes run

    def run ( self): #overridden from threading library

        flags = win32evtlog.EVENTLOG_BACKWARDS_READ|\\

        win32evtlog.EVENTLOG_SEQUENTIAL_READ

        #This dict converts the event type into a human readable form

        evt_dict={win32con.EVENTLOG_AUDIT_FAILURE:'EVENTLOG_AUDIT_FAILURE',\\

        win32con.EVENTLOG_AUDIT_SUCCESS:'EVENTLOG_AUDIT_SUCCESS',\\

        win32con.EVENTLOG_INFORMATION_TYPE:'EVENTLOG_INFORMATION_TYPE',\\

        win32con.EVENTLOG_WARNING_TYPE:'EVENTLOG_WARNING_TYPE',\\

        win32con.EVENTLOG_ERROR_TYPE:'EVENTLOG_ERROR_TYPE'}

        logtype='System'

        begin_sec=time.time()

        begin_time=time.strftime('%H:%M:%S  ',time.localtime(begin_sec))

        try:

            hand=win32evtlog.OpenEventLog(self.server,logtype) #open event log here

            self.data.append('events found in the last 8 hours since:'+begin_time+'for '+self.server)

            events=1

            while events:

                events=win32evtlog.ReadEventLog(hand,flags,0)

                for ev_obj in events:

                    now_sec=time.time()

                    now_time=time.strftime('now=%H:%M:%S  ',time.localtime(now_sec))

                    #check if the event is recent enough

                    #only want data from last 8hrs

                    the_time=ev_obj.TimeGenerated.Format()

                    seconds=self.date2sec(the_time)

                    if seconds < begin_sec-28800: break

                    #data is recent enough, so print it out

                    computer=str(ev_obj.ComputerName)

                    cat=str(ev_obj.EventCategory)

                    src=str(ev_obj.SourceName)

                    record=str(ev_obj.RecordNumber)

                    evt_id=str(winerror.HRESULT_CODE(ev_obj.EventID))

                    evt_type=str(evt_dict[ev_obj.EventType])

                    msg = str(win32evtlogutil.SafeFormatMessage(ev_obj, logtype))

                    results=string.join((now_time,the_time,computer,src,cat,record,evt_id,evt_type,msg[0:15]),':')

                    self.data.append(results)

                if seconds < begin_sec-28800: break

            win32evtlog.CloseEventLog(hand)

        except:

            self.data.append('Error for '+self.server+':'+str(traceback.print_exc(sys.exc_info())))

    def date2sec(self,evt_date):

        '''

        This function converts dates with format

        '12/23/99 15:54:09' to seconds since 1970.

        '''

        regexp=re.compile('(.*)\\s(.*)') #store result in site

        reg_result=regexp.search(evt_date)

        date=reg_result.group(1)

        the_time=reg_result.group(2)

        (mon,day,yr)=map(lambda x: string.atoi(x),string.split(date,'/'))

        (hr,min,sec)=map(lambda x: string.atoi(x),string.split(the_time,':'))

        tup=[yr,mon,day,hr,min,sec,0,0,0]

        sec=time.mktime(tup)

        return sec

######main here

try:

    threads=[]

    data=[]

    l_servers=['barney','betty','fred','wilma']

    for server in l_servers: #make a thread for each server

            thread = thread_it (server)

            threads.append ( thread ) #append to the a threads list

    for thread in threads: #now go thru list and start threads running

            thread.start()

    for thread in threads: #make main thread wait for all in list to complete

        thread.join()

    for thread in threads: #compile all of the threads' data together.

        print '###############'

        for event in thread.data:

            print event

except:

    print traceback.print_exc(sys.exc_info())
A very nice addition to this would be to convert it to a web application. HTMLgen is a useful tool in this context.

Have a great time with programming with python!

John Nielsen   nielsenjf@my-deja.com


Windows NT Files -- Locking

Python's win32 access for file locking -- flock style

The need for file locking tends arise every so often. Some people may be used to flock style locking, which has 4 basic cases: shared,exclusive,blocking and non-blocking. Shared locking is typically used when multiple people want to read a file. Exclusive is for writing. Blocking means that the process will wait until it is able to lock the file. Non-blocking will return immediately and tell you the lock failed. In win32 the standard CreateFile api gives you the ability to do exclusive or shared locking. However, what it does not give you is the ability to switch between blocking/non-blocking (it fails immediately -- does not block) To do that, you need to use LockfileEx -- which can even lock a specific part of a file.

The basic procedure for doing this is to first call Createfile to give you a filehandle. Then call LockfileEx with the filehandle. Do whatever to the file. Call UnlockfileEx. Then close the filehandle. (Some of you may want to close the filehandle to kill the locks, it doesn't work that way with win32, at least according to the msdn)

Below is a class called Flock, which gives you exclusive/shared locking with non-blocking/blocking abilities. If you can think of any optimizations or changes, be sure to let me know.

CreateFile provides many options. It can be used for files,directories,mailslots,sockets, etc. In this case, we're only interested in standard files.

The C++ call looks like this:

HANDLE CreateFile( LPCTSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile );

The python call is virtually the same with:

PyHANDLE = CreateFile( fileName, desiredAccess , shareMode , attributes , creationDisposition , flagsAndAttributes , hTemplateFile )

The module win32con in python is invaluable for setting most of these attributes. Besides win32con, you need win32security to create a security attribute.

Example

Here is a basic example of the raw program:

import win32file

import win32con

import win32security

import win32api

import pywintypes

highbits=0xffff0000 #high-order 32 bits of byte range to lock

file="c:\\\\wilma.txt"

secur_att = win32security.SECURITY_ATTRIBUTES()

secur_att.Initialize()

hfile=win32file.CreateFile( file,\\

                win32con.GENERIC_READ|win32con.GENERIC_WRITE,\\

                win32con.FILE_SHARE_READ|win32con.FILE_SHARE_WRITE,\\

                secur_att,\\  #default

                win32con.OPEN_ALWAYS,\\

                win32con.FILE_ATTRIBUTE_NORMAL , 0 )

ov=pywintypes.OVERLAPPED() #used to indicate starting region to lock

win32file.LockFileEx(hfile,win32con.LOCKFILE_EXCLUSIVE_LOCK,0,highbits,ov)

win32api.Sleep(4000) #do something here

win32file.UnlockFileEx(hfile,0,highbits,ov)

hfile.Close()

<nl>Below, I have fleshed it out with a more useable Flock class.  The

code below works like this: You create an instance of the class,

providing a filename. It will create/access the file in a default way

and provide an hfile filehandle.  If you don't want the

default(shared/blocking), you can then specify in a dictionary what

type of locking you want.  Call the lock method on the file. Do

whatever you want with the hfile filehandle, then call the unlock

method which will remove the locks and close the filehandle.

Looking at the code below, for desiredAccess and shareMode, I have

both read and write on for most flexibility. The OPEN_ALWAYS means

that it will either use the current file or create a new one if none

is to be found. I use default security for the security attributes

option. The lock method basically determines what lock flags should be

used, depending on the type of locking you want and then calls

LockFileEx. An interesting option to LockFileEx is self.highbits.  You

can use that to specify portions of a file to lock instead of the

entire thing. When you're done with whatever you need to do, using the

hfile, filehandle, if necessary, then call the unlock method, to

remove the lock and close the filehandle.

<nl>Now for some code|

class Flock:

    def __init__(self,file):

        self.file=file

        self.type={'LOCK_EX':0,'LOCK_NB':0}

        secur_att = win32security.SECURITY_ATTRIBUTES()

        secur_att.Initialize()

        self.highbits=0xffff0000 #high-order 32 bits of byte range to lock

        #make a handel with read/write and open or create if doesn't exist

        self.hfile=win32file.CreateFile( self.file,\\

                    win32con.GENERIC_READ|win32con.GENERIC_WRITE,\\

                    win32con.FILE_SHARE_READ|win32con.FILE_SHARE_WRITE,\\

                    secur_att,\\

                    win32con.OPEN_ALWAYS,\\

                    win32con.FILE_ATTRIBUTE_NORMAL , 0 )

    def lock(self):

        if self.type['LOCK_EX']:  #exclusive locking

            if self.type['LOCK_NB']: #don't wait, non-blocking

                lock_flags=win32con.LOCKFILE_EXCLUSIVE_LOCK|win32con.LOCKFILE_FAIL_IMMEDIATELY

            else: #wait for lock to free

                lock_flags=win32con.LOCKFILE_EXCLUSIVE_LOCK

        else: #shared locking

            if self.type['LOCK_NB']: #don't wait, non-blocking

                lock_flags=win32con.LOCKFILE_FAIL_IMMEDIATELY

            else:#shared lock wait for lock to free

                lock_flags=0

        self.ov=pywintypes.OVERLAPPED() #used to indicate starting region to lock

        win32file.LockFileEx(self.hfile,lock_flags,0,self.highbits,self.ov)

    def unlock(self):

        win32file.UnlockFileEx(self.hfile,0,self.highbits,self.ov) #remove locks

        self.hfile.Close()

l=Flock("c:\\\\a3.txt")

l.type['LOCK_EX']=0

l.type['LOCK_NB']=0

print 'calling lock'

l.lock()

print 'now locked '

win32api.Sleep(1000)

l.unlock()

print 'now unlocked'
Have a great time with programming with python!

John Nielsen   nielsenjf@my-deja.com


Extending Python: directory permissions with GetNamedSecurityInfo

Extending Python (directory permisisions w/GetNamedSecurityInfo)

  • SUMMARY
    • Introduction
    • Extending Python
    • GetNamedSecurityInfo
    • Extending Python for Directory Permissions
      • C code
      • Python code
    • In Conclusion
  • Further Info
  • Author

SUMMARY

Python has a good framework in place to extend it's capabilites with C or C++. Often this is done for reasons of performance or to give it capabilities that aren't present in it's standard libraries. For example, standard python does not provide a way to acquire file and directory permissions on windows. However, Microsoft's GetSecurityInfo/GetNamedSecurityInfo does and is accessible via C++. We'll look at how one can build a small module that uses GetNamedSecurityInfo to return to python permission information for a file or directory.

Introduction

Extending python, though not nearly as simple as pure python, is reasonably straightforward. The most convenient method of doing this is to seperate the extension into it's own module which would act like any other python module one uses. It is straightforward enough that one can limit the need to use C++ to narrow well-defined extensions and have python manage the rest. Extending python to use Microsoft's Security API is an excellent candidate for this. Of the four security functions that allow one to deal with security descriptors, we're going to look at GetNamedSecurityInfo. Specifically, python is going to be extended so it can get permissions from a filesystem.

Extending Python

There are several ways one can extend python. You can take a raw wrapping approach, SWIG or BPL (Boost Python Libraries) . This extension is simple enough that we're going to wrap the C++ w/out the help of SWIG of BPL. This won't be an extensive discussion about extending python, just enough to serve as a starting point to deciphering and making your own win32 extensions. The approach to wrap has a few standard todos. You need a to:

  • define whatever functions you want to expose
  • manipulate C and python data types
  • create a structure that has references to the functions
  • initialize the module.
Python has helper objects and functions to make this as painless as possible. You need to include Python.h to get access to these.
To define the the function, you need to follow a specific format: static PyObject * module_function
PyObject is the base type of Python Object. The name of the function needs to be the module followed by an '_' followed by the function.

To manipulate data types, there are numerous "Py" functions. The ones used in this extension are:

  • PyList_New(),PyList_Append -- make and add to a python list
  • PyDict_New(),PyDict_SetItem -- make a dictionary and add to a python dictionary
  • PyArg_ParseTuple -- process arguments sent to module
  • PyString_FromString/PyLong_FromUnsignedLong -- convert C datatypes to Python
  • PyArg_ParseTuple -- accept data from python and convert to C

You also need to create a structure of all the functions that you want the Python interpreter to see. To do this you make an array of arrays of type static PyMethodDef. The array needs to end w/a NULL entry to mark it's end.

Finally, you need to initialize the module (which is what happens when the module is imported). This uses another "Py" function called Py_InitModule.

These steps should become clearer once you see all the details of an actual extension.

GetNamedSecurityInfo

GetNamedSecurityInfo retrieves a security descriptor from a string that specifies the object. This works well for strings that contain filenames. A Security Descriptor contains the security information about an object. Of that information, we're primarily concerned with the DACL (discretionary access control list), which contains a list of things that are allowed to interact with the object(in our case the file or directory). Specifically, we will process the ACEs in the DACL, each of which contains the removal/addition of permissions and what SIDs they are assigned to. To get and process the DACL, you need to follow these steps:
  1. GetNamedSecurityInfo -- Get the DACL
  2. GetAclInformation -- get the list of the ACL's in the DACL to go through
  3. GetAce -- get an ACE (which contains the access mask and the SID) from the list
  4. LookupAccountSid-- gives you the domain and name for the SID
The following code goes through those 4 steps in greater detail. Refer to Microsoft MSDN references for info about the various win32 calls made.

Extending Python for Directory Permissions

To setup Visual Studio correctly for building an extension, it is easiest to use a program called compile.py which builds the project for you. The Extension creates a dictionary of user or group plus the access mask. To Python it will look like:
import fileperm
all_perms=fileperm.get_perms(r'\\Simon\share\db\a.txt')

And if you print the perms you'll get something like:

print all_perms
{'\\Everyone': 2032127L, 'Domain\\fred': 1179817L, 'BUILTIN\\Users': 1179817L}

C code

#include

//win32 security
#include
#include
#include

struct file_perms {
  char user_domain[2050];
  unsigned long user_mask;
};

//This function determines the username and domain
void lookup_sid ( ACCESS_ALLOWED_ACE* pACE, char user_domain[] ) {
    char username[1024]="";
    char domain[1024]="";

    ULONG len_username = sizeof(username);
    ULONG len_domain = sizeof(domain);
    PSID pSID =(PSID)(&(pACE->SidStart));
    SID_NAME_USE sid_name_use;

    if (!LookupAccountSid(NULL, pSID,
        username, &len_username, domain, &len_domain, &sid_name_use)){
        strcpy(user_domain, "unknown");
    } else {
        strcat(user_domain,domain);
        strcat(user_domain,"\\");
        strcat(user_domain,username);
    }

}

//Store the mask and username in the file_perms structure.
//call lookup_sid to get the username
void acl_info( PACL pACL, ULONG AceCount, file_perms fp[]){
    for (ULONG acl_index = 0;acl_index < AceCount;acl_index++){
        ACCESS_ALLOWED_ACE* pACE;

        if (GetAce(pACL, acl_index, (PVOID*)&pACE))
        {
            char user_domain[2050]="";
            lookup_sid(pACE,user_domain);
            strcpy(fp[acl_index].user_domain,user_domain);
            fp[acl_index].user_mask=(ULONG)pACE->Mask;
        }
    }
}

static PyObject *get_perms(PyObject *self, PyObject *args)
{

    PyObject *py_perms = PyDict_New();
    //get file or directory name
    char *file;

    if (!PyArg_ParseTuple(args, "s", &file))
        return NULL;

    //setup security code
    PSECURITY_DESCRIPTOR pSD;
    PACL pDACL;
    //GetNamedSecurityInfo() will give you the DACL when you ask for
    //DACL_SECURITY_INFORMATION. At this point, you have SIDs in the ACEs contained in the DACL.
    ULONG result = GetNamedSecurityInfo(file,SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL,
    &pDACL, NULL, &pSD);

    if (result != ERROR_SUCCESS){ return NULL;}
    if (result == ERROR_SUCCESS){
        ACL_SIZE_INFORMATION aclSize = {0};
        if(pDACL != NULL){
            if(!GetAclInformation(pDACL, &aclSize, sizeof(aclSize),
                AclSizeInformation)){
                return NULL;
            }
        }

        file_perms *fp = new file_perms[aclSize.AceCount];
        acl_info(pDACL, aclSize.AceCount, fp );

        //Dict
        for (ULONG i=0;i

//Boilerplate functions

//3 parts
//name of python function
//C++ function
//flags METH_VARARGS means function takes variable number of args
static PyMethodDef fileperm_methods[] = {
    { "get_perms", get_perms, METH_VARARGS },
    { NULL }
};

void initfileperm()
{

Py_InitModule("fileperm",fileperm_methods);

}

Python code

One thing the extension doesn't do is process the access mask into human
readable names. Python can easily do that as shown in the program below.

This program looks down a directory tree, takes the access mask and the login/group information,
processes the access mask to produce human readable names and prints out the
permission structure for the tree.

import os
import sys
import win32net
import string
import time
import copy
import getopt

#the extension module
import fileperm

All_perms={
    1:"ACCESS_READ",            #0x00000001
    2:"ACCESS_WRITE",           #0x00000002
    4:"ACCESS_CREATE",          #0x00000004
    8:"ACCESS_EXEC",            #0x00000008
    16:"ACCESS_DELETE",         #0x00000010
    32:"ACCESS_ATRIB [sic]",    #0x00000020
    64:"ACCESS_PERM",           #0x00000040
    32768:"ACCESS_GROUP",       #0x00008000
    65536:"DELETE",             #0x00010000
    131072:"READ_CONTROL",      #0x00020000
    262144:"WRITE_DAC",         #0x00040000
    524288:"WRITE_OWNER",       #0x00080000
    1048576:"SYNCHRONIZE",      #0x00100000
    16777216:"ACCESS_SYSTEM_SECURITY",#0x01000000
    33554432:"MAXIMUM_ALLOWED", #0x02000000
    268435456:"GENERIC_ALL",    #0x10000000
    536870912:"GENERIC_EXECUTE",#0x20000000
    1073741824:"GENERIC_WRITE", #0x40000000
    65535:"SPECIFIC_RIGHTS_ALL",#0x0000ffff
    983040:"STANDARD_RIGHTS_REQUIRED",#0x000f0000
    2031616:"STANDARD_RIGHTS_ALL",#0x001f0000
    }

Typical_perms={
    2032127L:"Full Control(All)",
    1179817L:"Read(RX)",
    1180086L:"Add",
    1180095L:"Add&Read",
    1245631L:"Change"
}

def get_mask(mask):
    a=2147483648L
    if Typical_perms.has_key(mask):
        return Typical_perms[mask]
    else:
        result=''
        while a>>1:
            a=a>>1
            masked=mask&a
            if masked:
                if All_perms.has_key(masked):
                    result=All_perms[masked]+':'+result
    return result

def is_group(sys_id):
    #get the server for the domain -- it has to be a primary dc
    group=0
    resume=0
    sys_id=string.strip(sys_id)
    if D_group.has_key(sys_id):
        group=1
    elif D_except.has_key(sys_id):
        group=0
    else:
        try:
            #info returns a dictionary of information
            info = win32net.NetGroupGetInfo(Server, sys_id, 0)
            group=1
        except:
            try:
                win32net.NetLocalGroupGetMembers(Server, sys_id, 0,resume,4096)
                group=1
            except:
                pass
    return group

def get_perm_base(file):
    all_perms=fileperm.get_perms(file)
    for (domain_id,mask) in all_perms.items():
        (domain,sys_id)=string.split(domain_id,'\\',1)
        mask_name=get_mask(mask)
        Results.append(file+','+sys_id+','+mask_name)

def get_perm(file):
    perm_list=[]
    perm_list.append(file)
    all_perms=fileperm.get_perms(file)
    for (domain_id,mask) in all_perms.items():
        (domain,sys_id)=string.split(domain_id,'\\',1)
        print domain,sys_id
        sys_id=str(sys_id)
        mask_name=get_mask(mask)
        if len(sys_id)<7:
            perm_list.append(sys_id+'\t\t\t'+mask_name)
        elif len(sys_id)>14:
            perm_list.append(sys_id+'\t'+mask_name)
        else:
            perm_list.append(sys_id+'\t\t'+mask_name)
    return perm_list
def get_perms(arg, d, files):
    a=2147483648L #1L<<31L
    print 'Now at ',d
    for i in files:
        file=d+'\\'+i
        if opts['-d']:
            if not os.path.isdir(file): # skip non-directories
                continue
        all_perms=fileperm.get_perms(file)
        for (domain_id,mask) in all_perms.items():
            if string.find(domain_id,'\\')!=-1:
                (domain,sys_id)=string.split(domain_id,'\\',1)
            else:
                sys_id=domain_id
            mask_name=get_mask(mask)
            Results.append(file+','+sys_id+','+mask_name)
    Results.sort()
    return Results
######################################################################################################
#h - help
#r - recursive
#o - output file
#d - directories only

domain='bedrock'

Server=str(win32net.NetGetDCName("",domain))
print '************************ Using domain ',domain

only_dir=0
D_group={}
D_except={}
if len(sys.argv)==1:
    print sys.argv[0]," file or directory"
    print "-r for recursive mode \n-o for output file (default screen) \n-d for directories only"
    print 'Example:',sys.argv[0],'-o a.txt -r c:\\junk  \n ----goes down dir tree in c:\\junk and saves in a.txt'
    sys.exit(0)
else:
    try:
        optlist, args = getopt.getopt(sys.argv[1:], 'dho:r')
    except getopt.error:
       print "invalid option.  available options are: -d -h -r -o "
       print "-r for recursive mode \n-o for output file (default screen) \n-d for directories only"

       sys.exit(0)

    opts = {'-d':0,'-h':0,'-o':0,'-r':0}
    for key, value in optlist:
        opts[key]=1
        if key == '-o':
            opts[key]=value
    init=time.clock()

    Results=[]
    if opts['-r']:
        if os.path.isdir(args[0]):
            print 'walking thru',args[0]
            get_perm_base(args[0])
            os.path.walk(args[0],get_perms,opts['-d'])
        else:
            print 'Directory',args[0],'does not exist'
            sys.exit(0)
    else:
        if os.path.exists(args[0]):
            Results=get_perm(args[0])
        else:
            print 'Directory or file',args[0],'does not exist'
            sys.exit(0)

    #now print out the results
    if opts['-o']:
        #send to a file
        print 'Storing results in',opts['-o']
        f=open(opts['-o'],'w')
        for i in Results:
            f.write(i)
            f.write('\n')
    else:
        for i in Results:
            print i
        end = time.clock()-init

In Conclusion

Extending python isn't as simple as writing python, but it greatly expands
python's capabilities. There are many details not covered here like
reference counting, threading, and error handeling. The python website has documentation about
Extending Python.

Further Info

  • Microsoft MSDN references
    •

  • Extending Python
    •

  • compile.py
    •

  • SWIG
    •

  • BPL (Boost Python Libraries)
    •

Author

John Nielsen, jn@who.net

-- Have a great time with programming with python!

                Extending Python  (directory permisisions w/GetNamedSecurityInfo)


Windows Network Management: win32net

  • SUMMARY
    • Introduction
    • Managing Servers/Workstations
      • Listing logins on workstation: NetWkstaUserEnum
      • Listing all user accounts: NetUserEnum
      • Listing all machines in a Domain: NetServerEnum
      • Adding shares
    • Managing Users
      • Changing the full name
      • Changing password expiration
    • In Conclusion
  • Further Info
  • Author

SUMMARY

Python's win32 access to Network Management functions are very clean and simple. It exposes to python what normally is available to C++. There are several examples of this:

  • NetWkstaUserEnum/NetUserEnum -- Enumerate users on a machine or in a domain
  • NetUserGetInfo/NetUserSetInfo -- manage user attributes
  • NetShareAdd -- manage shares
  • NetServerEnum/NetGetDCName -- list available servers/get Domain Controller info

Introduction

The python api for the win32net module closely mirrors the C++ functions documented in the msdn. This makes it convenient to look at the Microsoft MSDN for further information if necessary. There is a sister module to win32net called win32netcon that houses all of the constants needed by the win32net modules.

Because of unicode support in python2.0, some of the string handling done w/the examples are no longer necessary. Before one needed to convert PyUnicode to a regular python string, before you could use string functions with it. The examples will work w/both versions of python, the string conversions are not necessary in 2.0.

In the calls which require a server, you need a string that looks like \\servername, a simple way to create that is to use raw strings like: r'\\rubble'.

And finally, python's exception handling makes it convenient to catch win32net errors. I use the following format:

try:
  #win32net calls
except win32net.error:
  print traceback.format_tb(sys.exc_info()[2]),'\n',sys.exc_type,'\n',sys.exc_value
The traceback and sys modules are used to extract the error information.

Managing Servers/Workstations

Listing Logins on a workstation

If you want to get the logins currently present on a workstation you
need to use NetWkstaUserEnum api call.

In c++ the call looks like this: |

NET_API_STATUS NetWkstaUserEnum(
  LPWSTR servername,
  DWORD level,
  LPBYTE *bufptr,
  DWORD prefmaxlen,
  LPDWORD entriesread,
  LPDWORD totalentries,
  LPDWORD resumehandle
);

The python documentation says this: | ([dict, ...], total, resumeHandle)
= NetWkstaUserEnum( server, level , resumeHandle , prefLen )

Notice that the api call is split in 2 pieces with python, instead of
being all combined in one call.  So, how do they relate to each
other. In c++, you check the NET_API_STATUS to determine the result of
the call and if you have more data. You also have to extract from
structures like LPWKSTA_USER_INFO_0 to get the user data keeping track
of entriesread and the totalentries. Rather tedious. Thankfully, this
is easy in python. With python a list containing a user dictionary is
returned which trivial to parse and if resumeHandel is true you make
the win32 call again.

Now for some code:

def getusers(server):
  res=1  #initially set it to true
  pref=win32netcon.MAX_PREFERRED_LENGTH
  level=0 #setting it to 1 will provide more detailed info
  total_list=[]
  try:
    while res: #loop until res2
      (user_list,total,res2)=win32net.NetWkstaUserEnum(server,level,res,pref)
      for i in user_list:
          total_list.append(i['username'])
      res=res2
      return total_list
  except win32net.error:
    print traceback.format_tb(sys.exc_info()[2]),'\n',sys.exc_type,'\n',sys.exc_value

print getusers(r'\\betty')

Listing all user accounts

Sometimes it can be handy to get a list of everyone in your domain. Python exposes NetUserEnum which returns among other things a list of dictionary of users. There are various different accounts you can look for. In this case, we use the constant in win32netcon to look for 'normal' accounts. Another win32net function, NetUserGetInfo described later gets the full_name for the login.
def getall_users(server):
   'This functions returns a list of id and full_names on an NT server'
   j=1
   res=1
   users=[]
   user_list=[]
   try:
       while res:
          (users,total,res) = win32net.NetUserEnum(server,3,win32netcon.FILTER_NORMAL_ACCOUNT,res,win32netcon.MAX_PREFERRED_LENGTH)
          for i in users:
             add=0
             login=str(i['name'])
             info_dict=win32net.NetUserGetInfo(server, login, 3)
             full_name=str(info_dict['full_name'])
             j=j+1
             user_list.append(login+'\t'+full_name)
       return user_list
   except win32net.error:
        print traceback.format_tb(sys.exc_info()[2]),'\n',sys.exc_type,'\n',sys.exc_value

print getall_users(r'\\dino')

Listing all machines in Domain

If you need to touch every machine in your domain, NetServerEnum can help you out. Based off of the constants defined in win32netcon, you can look for different classes of machines. For example, win32netcon.SV_TYPE_DOMAIN_BAKCTRL, will single out backup domain controllers. Here we use SV_TYPE_ALL to get everything.
def getall_boxes(domain='',server=''):
    res=1
    wrk_lst=[]
    try:
        while res: #loop until res2
          (wrk_list2,total,res2)=win32net.NetServerEnum('',100,win32netcon.SV_TYPE_ALL,server,res,win32netcon.MAX_PREFERRED_LENGTH)
          wrk_lst.extend(wrk_list2)
          res=res2
    except win32net.error:
        print traceback.format_tb(sys.exc_info()[2]),'\n',sys.exc_type,'\n',sys.exc_value

    final_lst=[]
    for i in wrk_lst:
      final_lst.append(str(i['name']))
    return final_lst

print getall_boxes('bedrock',r'\\rubble')

Creating a share

If we want to add a new share, the help documentation says is that I
need a dictionary holding the share data, in the format of
PySHARE_INFO_*.

Selecting that link will show a number of different PySHARE_INFO
structures; lets assume we want to use the PySHARE_INFO_2 structure.

So do you create this PySHARE_INFO_2 Object? It is really quite simple:

In c++, for example, the SHARE_INFO_2 structure looks like:
typedef struct _SHARE_INFO_2 {
LPWSTR shi2_netname;
DWORD shi2_type;
LPWSTR shi2_remark;
DWORD shi2_permissions;
DWORD shi2_max_uses;
DWORD shi2_current_uses;
LPWSTR shi2_path;
LPWSTR shi2_passwd;
} SHARE_INFO_2, *PSHARE_INFO_2, *LPSHARE_INFO_2;

What does that mean in python?

You simply make a dictionary with the entries matching the structure
above, except you remove the "shi2_" prefix. In general, not all of
the structure items will be required; you will need to consult the
Win32 SDK for more information on these structures, and exactly what
elements are required for what operation.

The final trick is knowing where to get the constant values for some
of these items. For example, the "shi2_type" element is defined as an
integer - what values are valid? If we consult the Win32
documentation, we will find valid values include STYPE_DISKTREE,
STYPE_PRINTQ and a number of others. In general, you can find these
constants in the win32netcon module. The Pythonwin object browser can
show you what's available in this module.

Example

Given this knowledge, we could then write the following Python code to
add a new share.

import win32net
import win32netcon

shinfo={}

shinfo['netname']='python test'
shinfo['type']=win32netcon.STYPE_DISKTREE
shinfo['remark']='bedrock_rubbel'
shinfo['permissions']=0
shinfo['max_uses']=-1
shinfo['current_uses']=0
shinfo['path']='c:\\rubbel_share'
shinfo['passwd']=''
server='betty_server'

try:
  win32net.NetShareAdd(server,2,shinfo)
  return "success"
except win32net.error:
  print traceback.format_tb(sys.exc_info()[2]),'\n',sys.exc_type,'\n',sys.exc_value

Manage Users

Changing the full name

If you want to get or set attributes about a user in NT you can
use NetUserGetInfo and NetUserSetInfo, respectively.

Example
In c++ the setinfo call looks like this:

NET_API_STATUS NetUserSetInfo(

  LPCWSTR servername,

  LPCWSTR username,

  DWORD level,

  LPBYTE buf,

  LPDWORD parm_err

);

It's reasonably self explanatory except for level. It turns out there
are many levels. One of the most useful one is USER_INFO_3 this
structure lets you change just about anything you want for a
user.Also, not all levels are available for both NetUserSetInfo and
NetUserGetInfo. NetUserGetInfo has about 7 available to it. (btw, Microsoft MSDN  would have more
information about this). I'll show an example with NetUserSetInfo
using USER_INFO_1008 that has no corresponding NetUserGetInfo.

The python call looks like this:

NetUserSetInfo( server , username ,level , data )

For it the most interesting parts are server, level, and data.  Server
is only interesting because the server name has to be prepended with
\\. It is not obvious from the python api description, but very
important. Luckily, as we'll see later, some functions in python
return the server already in the correct format.

Level is similar to the C++ level except that you simply use a
number. In our case we would use 3.

For data the documentation says you need a dictionary holding the user
data in the format of PyUSER_INFO_*. If you check out that object you
will see many available levels and find the level 3 we are interested
in. It is simply a very long python dictionary with all sorts of user
attributes. Of these attributes, one can be confusing: flags. If you
want to change flags for a user, you need to have all of the
appropriate flags bitwise OR'ed together. The second example below
will better explain what is happening.

Now for some code:

In the example below, you will notice a couple of things. First,
win32net.NetGetDCName returns the primary domain controller already in
the correct format with double backslashes prepended. Also, python
exception handling is a very powerful asset. The try block explicitly
catches and win32net errors from your system calls. And, we can
extract what happened with sys.exc_type and sys.exc_value.

import sys
import win32net
import win32netcon

domain="bedrock"
login="slate"

try:
    #get the server for the domain -- it has to be a primary dc
    server=str(win32net.NetGetDCName("",domain))
    #info returns a dictionary of information

    info = win32net.NetUserGetInfo(server, login, 3)
    print info['full_name']
    info['full_name']="Mr. Slate"
    win32net.NetUserSetInfo(server,login,3,info)
    info = win32net.NetUserGetInfo(server, login, 3)
    print info['full_name']
except win32net.error:
    print traceback.format_tb(sys.exc_info()[2]),'\n',sys.exc_type,'\n',sys.exc_value

Changing password expiration

A trickier 2nd example.

The example below deals with the 1008 structure and flags. The python
documentation says the structure is a dictionary holding the
information in a Win32 USER_INFO_1008 structure.  with properties: int
flags. What that means is you have something like
dict={'flags':int_value}.  In our case, each flag represents a bit
that is turned off or on. The constants in win32netcon come in very
handy here. Make sure you have all of the bits included even if you
are only going to change one of the values. For example, if you want
to tell NT to not expire a password for a user, you need to use:
win32netcon.UF_DONT_EXPIRE_PASSWD. However, if you only use that, then
all the remaining bits aren't set. You have 2 options, either bitwise
OR the appropriate options together, or  do a bitwise OR of the flag with
the current user flags To remove a flag use the bitwise compliment ~.
This will be more clear in the example below.

Here is some code that turns on the

UF_DONT_EXPIRE_PASSWD bit for a user.

import sys
import win32net
import win32netcon

domain="bedrock"
login="slate"

try:

    #get the server for the domain -- it has to be a primary dc
    server=str(win32net.NetGetDCName("",domain))

    #Commented out here is a typical flag setting
    #flag=win32netcon.UF_NORMAL_ACCOUNT|win32netcon.UF_SCRIPT|win32netcon.UF_DONT_EXPIRE_PASSWD
    #however, if you want to preserve any non-standard flags then do the following
    d=win32net.NetUserGetInfo(server,login,3) #get the current flags, note, I didn't use 1008 here!
    flag=d['flags']| win32netcon.UF_DONT_EXPIRE_PASSWD  #this adds the flag
    # flag=d['flags']& ~win32netcon.UF_DONT_EXPIRE_PASSWD  #this removes the flag

    flag_dict={'flags':flag}
    win32net.NetUserSetInfo(server,login,1008,flag_dict)
except win32net.error:
    print traceback.format_tb(sys.exc_info()[2]),'\n',sys.exc_type,'\n',sys.exc_value

In Conclusion

Python's win32net library module offers most of the Windows NT Networking API from Python. Several examples are touched upon to show the simple access python gives one to the underlying api.

Further Info

  • Microsoft MSDN references
  • Relevant Python libraries: win32net and win32netcon

Author

John Nielsen, jn@who.net
-- Have a great time with programming with python!

Windows Network Management: win32net


Modules

  • dde
  • odbc
  • perfmon
  • pywintypes
  • servicemanager
  • win2kras
  • win32api
  • win32clipboard
  • win32event
  • win32evtlog
  • win32file
  • win32gui
  • win32help
  • win32lz
  • win32net
  • win32pdh
  • win32pipe
  • win32print
  • win32process
  • win32ras
  • win32security
  • win32service
  • win32wnet
  • wincerapi


dde

Module dde

A module for DDE support


odbc

Module odbc

A Python wrapper around the ODBC API.

Methods

odbc
Creates an connection object. Sentinel


odbc.odbc

connection = odbc(connectionString)

Creates an ODBC connection

Parameters

connectionString : string

An ODBC connection string.


perfmon

Module perfmon

A module which supports common Windows types.

Methods

LoadPerfCounterTextStrings

UnloadPerfCounterTextStrings

CounterDefinition
Creates a new PyPERF_COUNTER_DEFINITION object

ObjectType
Creates a new PyPERF_OBJECT_TYPE object

PerfMonManager
Creates a new PyPerfMonManager objects>


perfmon.CounterDefinition

PyPERF_COUNTER_DEFINITION = CounterDefinition()

Creates a new PyPERF_COUNTER_DEFINITION object


perfmon.LoadPerfCounterTextStrings

LoadPerfCounterTextStrings()


perfmon.ObjectType

PyPERF_OBJECT_TYPE = ObjectType()

Creates a new PERF_OBJECT_TYPE object


perfmon.PerfMonManager

PyPerfMonManager = PerfMonManager(serviceName, seqPerfObTypes , mappingName , eventSourceName )

Creates a new PERF_OBJECT_TYPE object

Parameters

serviceName : PyUnicode

The name of the service for which data is being provided.

seqPerfObTypes : [PyPERF_OBJECT_TYPE, ...]

A sequence of objects to use in the performance monitor. At this stage, len(seqPerfObTypes) must == 1.

mappingName=None : PyUnicode

The name of the mapping to open. This must be the same as the DLL name providing the information. If None, the serviceName is used.

eventSourceName=None : PyUnicode

The name used by the DLL for error messages in the registry. If None, the serviceName is used.

Comments

The application need not be a service, but it must have an entry in the Services section of the registry. This limits the performance monitor to being able to provide only one 'counter type', but still many counters within that type. See the documentation for the Performance Monitor API for more details.


perfmon.UnloadPerfCounterTextStrings

UnloadPerfCounterTextStrings()


pywintypes

Module pywintypes

A module which supports common Windows types.

Methods

DosDateTimeToTime
Converts an MS-DOS Date/Time to a standard Time object

Unicode
Creates a new PyUnicode object

UnicodeFromRaw
Creates a new PyUnicode object from raw binary data

IsTextUnicode
Determines whether a buffer probably contains a form of Unicode text.

OVERLAPPED
Creates a new PyOVERLAPPED object

IID
Makes an PyIID object from a string.

Time
Makes a PyTime object from the argument. Argument can be an integer/float or a tuple (as returned by time module functions).

CreateGuid
Creates a new, unique GUIID.

ACL
Creates a new PyACL object.

SID
Creates a new PySID object.

SECURITY_ATTRIBUTES
Creates a new PySECURITY_ATTRIBUTES object.

SECURITY_DESCRIPTOR
Creates a new PySECURITY_DESCRIPTOR object.

HANDLE
Creates a new PyHANDLE object.

HKEY
Creates a new PyHKEY object.


pywintypes.ACL

PyACL = ACL(bufSize)

Creates a new ACL object

Parameters

bufSize=64 : int

The size for the ACL.


pywintypes.CreateGuid

PyIID = CreateGuid()

Creates a new, unique GUIID.


pywintypes.DosDateTimeToTime

PyTime = DosDateTimeToTime()

Converts an MS-DOS Date/Time to a standard Time object.


pywintypes.HANDLE

PyHANDLE = HANDLE()

Creates a new HANDLE object


pywintypes.HKEY

PyHKEY = HKEY()

Creates a new HKEY object


pywintypes.IID

PyIID = IID(iidString)

Creates a new IID object

Parameters

iidString : string/Unicode

A string representation of an IID, or a ProgID.


pywintypes.IsTextUnicode

int, int = IsTextUnicode(str, flags )

Determines whether a buffer probably contains a form of Unicode text.

Parameters

str : string

The string containing the binary data.

flags : int

Determines the specific tests to make

Return Value

The function returns (result, flags), both integers.
result is nonzero if the data in the buffer passes the specified tests.
result is zero if the data in the buffer does not pass the specified tests.
In either case, flags contains the results of the specific tests the function applied to make its determination.


pywintypes.OVERLAPPED

PyOVERLAPPED = OVERLAPPED()

Creates a new OVERLAPPED object


pywintypes.SECURITY_ATTRIBUTES

PySECURITY_ATTRIBUTES = SECURITY_ATTRIBUTES()

Creates a new SECURITY_ATTRIBUTES object


pywintypes.SECURITY_DESCRIPTOR

PySECURITY_DESCRIPTOR = SECURITY_DESCRIPTOR(cb)

Creates a new SECURITY_DESCRIPTOR object

Parameters

cb=0 : int

The number of bytes to allocate, or 0 for the default.

Alternative Parameters

data

A buffer (eg, a string) with the raw bytes for the security descriptor.


pywintypes.SID

PySID = SID(bufSize)

Creates a new SID object

Parameters

bufSize=32 : int

Size for the SID buffer

Alternative Parameters

buffer

A raw data buffer, assumed to hold the SID data.

Alternative Parameters

idAuthority

The identifier authority.

subAuthorities

A list of sub authorities.


pywintypes.Time

PyTime = Time(timeRepr)

Creates a new time object.

Parameters

timeRepr : object

An integer/float/tuple time representation.

Comments

Note that the parameter can be any object that supports int(object) - for example , another PyTime object.
The integer should be as defined by the Python time module. See the description of the PyTime object for more information.
If the object is a floating point object, then the value should be the value of float(t) from another PyTime object (it represents the Win32 DATE value).


pywintypes.Unicode

PyUnicode = Unicode(str)

Creates a new Unicode object

Parameters

str : string

The string to convert.


pywintypes.UnicodeFromRaw

PyUnicode = UnicodeFromRaw(str)

Creates a new Unicode object from raw binary data

Parameters

str : string

The string containing the binary data.


servicemanager

Module servicemanager

A module built in to PythonService.exe (and therefore only available to Python service programs).
The module win32service provides other service facilities.

Methods

CoInitializeEx

CoUninitialize

RegisterServiceCtrlHandler
Registers a function to retrieve service control notification messages.

LogMsg
Write an specific message to the log.

LogInfoMsg
Write an informational message to the log.

LogErrorMsg
Write an error message to the log.

LogWarningMsg
Logs a generic warning message to the event log

PumpWaitingMessages
Pumps waiting window messages for the service.

Debugging
Indicates if the service is running in debug mode.


servicemanager.CoInitializeEx

CoInitializeEx()

Initialize OLE with additional options.


servicemanager.CoUninitialize

CoUninitialize()

Unitialize OLE


servicemanager.Debugging

Debugging()

Indicates if the service is running in debug mode.


servicemanager.LogErrorMsg

LogErrorMsg(msg)

Logs a generic error message to the event log

Parameters

msg : PyUnicode

The message to write.


servicemanager.LogInfoMsg

LogInfoMsg(msg)

Logs a generic informational message to the event log

Parameters

msg : PyUnicode

The message to write.


servicemanager.LogMsg

LogMsg(errorType, eventId, inserts)

Logs a specific message

Parameters

errorType : int

eventId : int

inserts=None : (string, )


servicemanager.LogWarningMsg

LogWarningMsg(msg)

Logs a generic warning message to the event log

Parameters

msg : PyUnicode

The message to write.


servicemanager.PumpWaitingMessages

int = PumpWaitingMessages()

Pumps all waiting messages.

Return Value

Returns 1 if a WM_QUIT message was received, else 0


servicemanager.RegisterServiceCtrlHandler

int/None = RegisterServiceCtrlHandler(serviceName, callback )

Registers the Python service control handler function.

Parameters

serviceName : PyUnicode

The name of the service. This is provided in args[0] of the service class __init__ method.

callback : object

The Python function that performs as the control function. This will be called with an integer status argument.

Return Value

If the service manager is in debug mode, this returns None, indicating there is no service control manager handle, otherwise the handle to the Win32 service manager.


win2kras

Module win2kras

A module encapsulating the Windows 2000 extensions to the Remote Access Service (RAS) API.

Methods

RasGetEapUserIdentity
Retrieves identity information for the current user. Use this information to call RasDial with a phone-book entry that requires Extensible Authentication Protocol (EAP).


win2kras.PyRasGetEapUserIdentity

PyRasGetEapUserIdentity(phoneBook, entry, flags, hwnd)

Sets the dial parameters for the specified entry.

Parameters

phoneBook : string

string containing the full path of the phone-book (PBK) file. If this parameter is None, the function will use the system phone book.

entry : string

string containing an existing entry name.

flags : int

Specifies zero or more of the following flags that qualify the authentication process.

Flag | Description
RASEAPF_NonInteractive | Specifies that the authentication protocol should not bring up a graphical user-interface. If this flag is not present, it is okay for the protocol to display a user interface.
RASEAPF_Logon | Specifies that the user data is obtained from Winlogon.
RASEAPF_Preview | Specifies that the user should be prompted for identity information before dialing.

hwnd=0 : int

Handle to the parent window for the UI dialog.

Win32 API References

RasGetEapUserIdentity


RASEAPF_Logon

const win2kras.RASEAPF_Logon;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN2KRASMODULE.CPP

Specifies that the user data is obtained from Winlogon.


RASEAPF_NonInteractive

const win2kras.RASEAPF_NonInteractive;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN2KRASMODULE.CPP

Specifies that the authentication protocol should not bring up a graphical user-interface. If this flag is not present, it is okay for the protocol to display a user interface.


RASEAPF_Preview

const win2kras.RASEAPF_Preview;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN2KRASMODULE.CPP

Specifies that the user should be prompted for identity information before dialing.


win32api

Module win32api

A module, encapsulating the Windows Win32 API.

Methods

AbortSystemShutdown
Aborts a system shutdown

Apply
Calls a Python function, but traps Win32 exceptions.

Beep
Generates a simple tone on the speaker.

BeginUpdateResource
Begins an update cycle for a PE file.

ClipCursor
Confines the cursor to a rectangular area on the screen.

CloseHandle
Closes an open handle.

CopyFile
Copy a file.

DebugBreak
Breaks into the C debugger.

DeleteFile
Deletes the specified file.

DragQueryFile
Retrieve the file names for dropped files.

DragFinish
Free memory associated with dropped files.

DuplicateHandle
Duplicates a handle.

EndUpdateResource
Ends a resource update cycle of a PE file.

EnumResourceNames
Enumerates all the resources of the specified type from the nominated file.

ExpandEnvironmentStrings
Expands environment-variable strings and replaces them with their defined values.

ExitWindows
Logs off the current user

ExitWindowsEx
either logs off the current user, shuts down the system, or shuts down and restarts the system.

FindFiles
Find files matching a file spec.

FindFirstChangeNotification
Creates a change notification handle and sets up initial change notification filter conditions.

FindNextChangeNotification
Requests that the operating system signal a change notification handle the next time it detects an appropriate change.

FindCloseChangeNotification
Closes the change notification handle.

FindExecutable
Find an executable associated with a document.

FormatMessage
Return an error message string.

FormatMessageW
Return an error message string (as a Unicode object).

FreeLibrary
Decrements the reference count of the loaded dynamic-link library (DLL) module.

GetAsyncKeyState
Retrieves the asynch state of a virtual key code.

GetCommandLine
Return the application's command line.

GetComputerName
Returns the local computer name

GetUserName
Returns the current user name.

GetCursorPos
Returns the position of the cursor, in screen co-ordinates.

GetCurrentThread
Returns a pseudohandle for the current thread.

GetCurrentThreadId
Returns the thread ID for the current thread.

GetCurrentProcessId
Returns the thread ID for the current thread.

GetCurrentProcess
Returns a pseudohandle for the current process.

GetConsoleTitle
Return the application's console title.

GetDiskFreeSpace
Retrieves information about a disk.

GetDomainName
Returns the current domain name

GetEnvironmentVariable
Retrieves the value of an environment variable.

GetFileAttributes
Retrieves the attributes for the named file.

GetFocus
Retrieves the handle of the keyboard focus window associated with the thread that called the method.

GetFullPathName
Returns the full path of a (possibly relative) path

GetKeyState
Retrives the last known key state for a key.

GetLastError
Retrieves the last error code known by the system.

GetLocalTime
Returns the current local time.

GetLogicalDrives
Returns a bitmask representing the currently available disk drives.

GetLogicalDriveStrings
Returns a list of strings for all the drives.

GetModuleFileName
Retrieves the filename of the specified module.

GetModuleHandle
Returns the handle of an already loaded DLL.

GetProfileSection
Returns a list of entries in an INI file.

GetProcAddress
Returns the address of the specified exported dynamic-link library (DLL) function.

GetProfileVal
Returns a value from an INI file.

GetShortPathName
Returns the 8.3 version of a pathname.

GetStdHandle
Returns a handle for the standard input, standard output, or standard error device

GetSysColor
Returns the system colors.

GetSystemDefaultLangID
Retrieves the system default language identifier.

GetSystemDefaultLCID
Retrieves the system default locale identifier.

GetSystemDirectory
Returns the Windows system directory.

GetSystemInfo
Retrieves information about the current system.

GetSystemMetrics
Returns the specified system metrics.

GetSystemTime
Returns the current system time.

GetTempFileName
Creates a temporary file.

GetTempPath
Returns the path designated as holding temporary files.

GetTickCount
Returns the milliseconds since windows started.

GetTimeZoneInformation
Returns the system time-zone information.

GetVersion
Returns Windows version information.

GetVersionEx
Returns Windows version information as a tuple.

GetVolumeInformation
Returns information about a volume and file system attached to the system.

GetWindowsDirectory
Returns the windows directory.

GetWindowLong
Retrieves a long value at the specified offset into the extra window memory of the given window.

GetUserDefaultLangID
Retrieves the user default language identifier.

GetUserDefaultLCID
Retrieves the user default locale identifier.

InitiateSystemShutdown
Initiates a shutdown and optional restart of the specified computer.

LoadCursor
Loads a cursor.

LoadLibrary
Loads the specified DLL, and returns the handle.

LoadLibraryEx
Loads the specified DLL, and returns the handle.

LoadResource
Finds and loads a resource from a PE file.

LoadString
Loads a string from a resource file.

MessageBeep
Plays a predefined waveform sound.

MessageBox
Display a message box.

MoveFile
Moves or renames a file.

MoveFileEx
Moves or renames a file.

OpenProcess
Retrieves a handle to an existing process.

OutputDebugString
Writes output to the Windows debugger.

PostMessage
Post a message to a window.

PostQuitMessage
Posts a quit message.

PostThreadMessage
Post a message to a thread.

RegCloseKey
Closes a registry key.

RegConnectRegistry
Establishes a connection to a predefined registry handle on another computer.

RegCreateKey
Creates the specified key, or opens the key if it already exists.

RegDeleteKey
Deletes the specified key.

RegDeleteValue
Removes a named value from the specified registry key.

RegEnumKey
Enumerates subkeys of the specified open registry key.

RegEnumValue
Enumerates values of the specified open registry key.

RegFlushKey
Writes all the attributes of the specified key to the registry.

RegGetKeySecurity
Retrieves the security on the specified registry key.

RegLoadKey
Creates a subkey under HKEY_USER or HKEY_LOCAL_MACHINE and stores registration information from a specified file into that subkey.

RegOpenKey
Alias for win32api::RegOpenKeyEx

RegOpenKeyEx
Opens the specified key.

RegQueryValue
Retrieves the value associated with the unnamed value for a specified key in the registry.

RegQueryValueEx
Retrieves the type and data for a specified value name associated with an open registry key.

RegQueryInfoKey
Returns information about the specified key.

RegSaveKey
Saves the specified key, and all its subkeys to the specified file.

RegSetKeySecurity
Sets the security on the specified registry key.

RegSetValue
Associates a value with a specified key. Currently, only strings are supported.

RegSetValueEx
Stores data in the value field of an open registry key.

RegUnLoadKey
Unloads the specified registry key and its subkeys from the registry. The keys must have been loaded previously by a call to RegLoadKey.

RegisterWindowMessage
Given a string, return a system wide unique message ID.

SearchPath
Searches a path for a file.

SendMessage
Send a message to a window.

SetConsoleTitle
Sets the title for the current console.

SetCursorPos
The SetCursorPos function moves the cursor to the specified screen coordinates.

SetErrorMode
Controls whether the system will handle the specified types of serious errors, or whether the process will handle them.

SetFileAttributes
Sets the named file's attributes.

SetSystemTime
Sets the system time.

SetClassLong
Replaces the specified 32-bit (long) value at the specified offset into the extra class memory for the window.

SetClassWord
Replaces the specified 32-bit (long) value at the specified offset into the extra class memory for the window.

SetWindowWord

SetCursor
Set the cursor to the HCURSOR object.

SetStdHandle
Sets a handle for the standard input, standard output, or standard error device

SetThreadLocale
Sets the current thread's locale.

SetWindowLong
Places a long value at the specified offset into the extra window memory of the given window.

ShellExecute
Executes an application.

ShowCursor
The ShowCursor method displays or hides the cursor.

Sleep
Suspends current application execution

TerminateProcess
Terminates a process.

Unicode
Creates a new PyUnicode object

UpdateResource
Updates a resource in a PE file.

WinExec
Execute a program.

WinHelp
Invokes the Windows Help engine.

WriteProfileSection
Writes a complete section to an INI file or registry.

WriteProfileVal
Write a value to a Windows INI file.

HIBYTE
An interface to the win32api HIBYTE macro.

LOBYTE
An interface to the win32api LOBYTE macro.

HIWORD
An interface to the win32api HIWORD macro.

LOWORD
An interface to the win32api LOWORD macro.

RGB
An interface to the win32api RGB macro.

MAKELANGID
Creates a language identifier from a primary language identifier and a sublanguage identifier.


win32api.AbortSystemShutdown

AbortSystemShutdown(computerName)

Aborts a system shutdown

Parameters

computerName : string/PyUnicode

Specifies the name of the computer where the shutdown is to be stopped.

Win32 API References

AbortSystemShutdown


win32api.Apply

object = Apply(exceptionHandler, func , args )

Calls a Python function, but traps Win32 exceptions.

Parameters

exceptionHandler : object

An object which will be called when a win32 exception occurs.

func : object

The function call call under the protection of the Win32 exception handler.

args : tuple

Args for the function.

Comments

Calls the specified function in a manner similar to the built-in function apply(), but allows Win32 exceptions to be handled by Python. If a Win32 exception occurs calling the function, the specified exceptionHandler is called, and its return value determines the action taken.

Return value | Description
Tuple of (exc_type, exc_value) | This exception is raised to the Python caller of Apply() - This is conceptually similar to "raise exc_type, exc_value", although exception handlers must not themselves raise exceptions (see below).
Integer | Must be one of the win32 exception constants, and this value is returned to Win32. See the Win32 documentation for details.
None | The exception is considered not handled (ie, it is as if no exception handler exists). If a Python exception occurs in the Win32 exception handler, it is as if None were returned (ie, no tracebacks or other diagnostics are printed)


win32api.Beep

Beep(freq, dur)

Generates simple tones on the speaker.

Parameters

freq : int

Specifies the frequency, in hertz, of the sound. This parameter must be in the range 37 through 32,767 (0x25 through 0x7FFF).

dur : int

Specifies the duration, in milliseconds, of the sound.~ One value has a special meaning: If dwDuration is - 1, the function operates asynchronously and produces sound until called again.

Win32 API References

Beep


win32api.BeginUpdateResource

BeginUpdateResource(filename, delete)

Begins an update cycle for a PE file.

Parameters

filename : string

File in which to update resources.

delete : int

Flag to indicate that all existing resources should be deleted.


win32api.ClipCursor

ClipCursor(left, top, right, bottom)

Confines the cursor to a rectangular area on the screen.

Parameters

left, top, right, bottom : (int, int, int, int)

contains the screen coordinates of the upper-left and lower-right corners of the confining rectangle. If this parameter is omitted or (0,0,0,0), the cursor is free to move anywhere on the screen.

Win32 API References

ClipCursor


win32api.CloseHandle

CloseHandle(handle)

Closes an open handle.

Parameters

handle : PyHANDLE/int

A previously opened handle.


win32api.CopyFile

CopyFile(src, dest, bFailOnExist)

Copies an existing file to a new file

Parameters

src : stringPyUnicode

Name of an existing file.

dest : string/PyUnicode

Name of file to copy to.

bFailOnExist=0 : int

Indicates if the operation should fail if the file exists.

Win32 API References

CopyFile


win32api.DebugBreak

DebugBreak()

Breaks into the C debugger

Win32 API References

DebugBreak


win32api.DeleteFile

DeleteFile(fileName)

Deletes the specified file.

Parameters

fileName : string/PyUnicode

File to delete.

Win32 API References

DeleteFile


win32api.DragFinish

DragFinish(hDrop)

Releases the memory stored by Windows for the filenames.

Parameters

hDrop : int

Handle identifying the structure containing the file names.

Win32 API References

DragFinish


win32api.DragQueryFile

string/int = DragQueryFile(hDrop, fileNum )

Retrieves the file names of dropped files.

Parameters

hDrop : int

Handle identifying the structure containing the file names.

fileNum=0xFFFFFFFF : int

Specifies the index of the file to query.

Win32 API References

DragQueryFile

Return Value

If the fileNum parameter is 0xFFFFFFFF (the default) then the return value is an integer with the count of files dropped. If fileNum is between 0 and Count, the return value is a string containing the filename.
If an error occurs, and exception is raised.


win32api.DuplicateHandle

PyHANDLE = DuplicateHandle(hSourceProcess, hSource , hTargetProcessHandle , desiredAccess , bInheritHandle , options )

Duplicates a handle.

Parameters

hSourceProcess : PyHANDLE

Identifies the process containing the handle to duplicate.

hSource : PyHANDLE

Identifies the handle to duplicate. This is an open object handle that is valid in the context of the source process.

hTargetProcessHandle : PyHANDLE

Identifies the process that is to receive the duplicated handle. The handle must have PROCESS_DUP_HANDLE access.

desiredAccess : int

Specifies the access requested for the new handle. This parameter is ignored if the dwOptions parameter specifies the DUPLICATE_SAME_ACCESS flag. Otherwise, the flags that can be specified depend on the type of object whose handle is being duplicated. For the flags that can be specified for each object type, see the following Remarks section. Note that the new handle can have more access than the original handle.

bInheritHandle : int

Indicates whether the handle is inheritable. If TRUE, the duplicate handle can be inherited by new processes created by the target process. If FALSE, the new handle cannot be inherited.

options : int

Specifies optional actions. This parameter can be zero, or any combination of the following flags

DUPLICATE_CLOSE_SOURCE loses the source handle. This occurs regardless of any error status returned. DUPLICATE_SAME_ACCESS Ignores the dwDesiredAccess parameter. The duplicate handle has the same access as the source handle.


win32api.EndUpdateResource

EndUpdateResource(handle, discard)

Ends a resource update cycle of a PE file.

Parameters

handle : int

The update-file handle.

discard : int

Flag to discard all writes.


win32api.EnumResourceNames

[string, ...] = EnumResourceNames(hmodule, resType )

Enumerates all the resources of the specified type from the nominated file.

Parameters

hmodule : int

The handle to the module to enumerate.

resType : int

The type of resource to enumerate as an integer (eg, win32con.RT_DIALOG)

Return Value

The result is a list of string or integers, one for each resource enumerated.


win32api.ExitWindows

ExitWindows(reserved1, reserved2)

Logs off the current user

Parameters

reserved1=0 : int

reserved2=0 : int

Win32 API References

AbortSystemShutdown


win32api.ExitWindowsEx

ExitWindowsEx(flags, reserved)

either logs off the current user, shuts down the system, or shuts down and restarts the system.

Parameters

flags : int

The shutdown operation

reserved=0 : int

Comments

It sends the WM_QUERYENDSESSION message to all applications to determine if they can be terminated.

Win32 API References

AbortSystemShutdown


win32api.ExpandEnvironmentStrings

string = ExpandEnvironmentStrings(in)

Expands environment-variable strings and replaces them with their defined values.

Parameters

in : string

String to expand

Comments

On Windows 95, the string is limited to 1024 bytes. On other platforms, there is no (practical) limit

Win32 API References

ExpandEnvironmentStrings


win32api.FindCloseChangeNotification

FindCloseChangeNotification(handle)

Closes the change notification handle.

Parameters

handle : int

The handle returned from win32api::FindFirstChangeNotification


win32api.FindExecutable

(int, string) = FindExecutable(filename, dir )

Retrieves the name and handle of the executable (.EXE) file associated with the specified filename.

Parameters

filename : string

A file name. This can be either a document or executable file.

dir : string

The default directory.

Comments

The function will raise an exception if it fails.

Win32 API References

FixedExecutable

Return Value

The return value is a tuple of (integer, string)
The integer is the instance handle of the executable file associated with the specified filename. (This handle could also be the handle of a dynamic data exchange [DDE] server application.)
The may contain the path to the DDE server started if no server responds to a request to initiate a DDE conversation.


win32api.FindFiles

list = FindFiles(fileSpec)

Retrieves a list of matching filenames. An interface to the API FindFirstFile/FindNextFile/Find close functions.

Parameters

fileSpec : string

A string that specifies a valid directory or path and filename, which can contain wildcard characters (* and ?).

Win32 API References

FindFirstFile

FindNextFile

FindClose

Return Value

The return value is a list of tuples, in the same format as the WIN32_FIND_DATA structure:

Items

[0] int : attributes

File Attributes. A combination of the win32com.FILE_ATTRIBUTE_* flags.

[1] PyTime : createTime

File creation time.

[2] PyTime : accessTime

File access time.

[3] PyTime : writeTime

Time of last file write

[4] int : nFileSizeHigh

high order word of file size.

[5] int : nFileSizeLow

low order word of file size.

[6] int : reserved0

Reserved.

[7] int : reserved1

Reserved.

[8] string : fileName

The name of the file.

[9] string : alternateFilename

Alternative name of the file, expressed in 8.3 format.


win32api.FindFirstChangeNotification

int = FindFirstChangeNotification(pathName, bSubDirs , filter )

Creates a change notification handle and sets up initial change notification filter conditions.

Parameters

pathName : string

Specifies the path of the directory to watch.

bSubDirs : int

Specifies whether the function will monitor the directory or the directory tree. If this parameter is TRUE, the function monitors the directory tree rooted at the specified directory; if it is FALSE, it monitors only the specified directory

filter : int

Specifies the filter conditions that satisfy a change notification wait. This parameter can be one or more of the following values:

Value | Meaning
FILE_NOTIFY_CHANGE_FILE_NAME | Any file name change in the watched directory or subtree causes a change notification wait operation to return. Changes include renaming, creating, or deleting a file name.
FILE_NOTIFY_CHANGE_DIR_NAME | Any directory-name change in the watched directory or subtree causes a change notification wait operation to return. Changes include creating or deleting a directory.
FILE_NOTIFY_CHANGE_ATTRIBUTES | Any attribute change in the watched directory or subtree causes a change notification wait operation to return.
FILE_NOTIFY_CHANGE_SIZE | Any file-size change in the watched directory or subtree causes a change notification wait operation to return. The operating system detects a change in file size only when the file is written to the disk. For operating systems that use extensive caching, detection occurs only when the cache is sufficiently flushed.
FILE_NOTIFY_CHANGE_LAST_WRITE | Any change to the last write-time of files in the watched directory or subtree causes a change notification wait operation to return. The operating system detects a change to the last write-time only when the file is written to the disk. For operating systems that use extensive caching, detection occurs only when the cache is sufficiently flushed.
FILE_NOTIFY_CHANGE_SECURITY | Any security-descriptor change in the watched directory or subtree causes a change notification wait operation to return

Return Value

Although the result is a handle, the handle can not be closed via CloseHandle() - therefore a PyHandle object is not used.


win32api.FindNextChangeNotification

FindNextChangeNotification(handle)

Requests that the operating system signal a change notification handle the next time it detects an appropriate change.

Parameters

handle : int

The handle returned from win32api::FindFirstChangeNotification


win32api.FormatMessage

string = FormatMessage(errCode)

Returns an error message from the system error file.

Parameters

errCode=0 : int

The error code to return the message for, If this value is 0, then GetLastError() is called to determine the error code.

Alternative Parameters

flags

Flags for the call. Note that FORMAT_MESSAGE_ALLOCATE_BUFFER and FORMAT_MESSAGE_ARGUMENT_ARRAY will always be added.

source

The source object. If flags contain FORMAT_MESSAGE_FROM_HMODULE it should be an int, if flags contain FORMAT_MESSAGE_FROM_STRING, otherwise it is ignored.

messageId

The message ID.

languageID

The language ID.

inserts

The string inserts to insert.

bufSize

Win32 API References

GetLastError

FormatMessage


win32api.FormatMessageW

PyUnicode = FormatMessageW()

Returns an error message from the system error file.

Alternative Parameters

flags

Flags for the call. Note that FORMAT_MESSAGE_ALLOCATE_BUFFER and FORMAT_MESSAGE_ARGUMENT_ARRAY will always be added.

source

The source object. If flags contain FORMAT_MESSAGE_FROM_HMODULE it should be an int, if flags contain FORMAT_MESSAGE_FROM_STRING, otherwise it is ignored.

messageId

The message ID.

languageID

The language ID.

inserts

The string inserts to insert.

bufSize


win32api.FreeLibrary

FreeLibrary(hModule)

Decrements the reference count of the loaded dynamic-link library (DLL) module.

Parameters

hModule : int

Specifies the handle to the module.

Win32 API References

FreeLibrary


win32api.GetAsyncKeyState

int = GetAsyncKeyState(key)

Retrieves the status of the specified key.

Parameters

key : int

Specifies one of 256 possible virtual-key codes.

Comments

An application can use the virtual-key code constants win32con.VK_SHIFT, win32con.VK_CONTROL, and win32con.VK_MENU as values for the key parameter. This gives the state of the SHIFT, CTRL, or ALT keys without distinguishing between left and right. An application can also use the following virtual-key code constants as values for key to distinguish between the left and right instances of those keys:
win32con.VK_LSHIFT
win32con.VK_RSHIFT
win32con.VK_LCONTROL
win32con.VK_RCONTROL
win32con.VK_LMENU
win32con.VK_RMENU
The GetAsyncKeyState method works with mouse buttons. However, it checks on the state of the physical mouse buttons, not on the logical mouse buttons that the physical buttons are mapped to.

Win32 API References

GetAsyncKeyState

Return Value

The return value specifies whether the key was pressed since the last call to GetAsyncKeyState, and whether the key is currently up or down. If the most significant bit is set, the key is down, and if the least significant bit is set, the key was pressed after the previous call to GetAsyncKeyState.
The return value is zero if a window in another thread or process currently has the keyboard focus.


win32api.GetCommandLine

string = GetCommandLine()

Retrieves the current application's command line.

Win32 API References

GetCommandLine


win32api.GetComputerName

string = GetComputerName()

Returns the local computer name

Win32 API References

GetComputerName


win32api.GetConsoleTitle

string = GetConsoleTitle()

Returns the title for the current console.

Win32 API References

GetConsoleTitle

Return Value

The title for the current console window. This function will raise an exception if the current application does not have a console.


win32api.GetCurrentProcess

int = GetCurrentProcess()

Returns a pseudohandle for the current process.

Comments

A pseudohandle is a special constant that is interpreted as the current thread handle. The calling thread can use this handle to specify itself whenever a thread handle is required. Pseudohandles are not inherited by child processes. The method win32api::DuplicateHandle can be used to create a handle that other threads and processes can use. As this handle can not be closed, and integer is returned rather than a PyHANDLE object, which would attempt to automatically close the handle.

Win32 API References

GetCurrentProcess


win32api.GetCurrentProcessId

int = GetCurrentProcessId()

Returns the thread ID for the current process.

Win32 API References

GetCurrentProcessId


win32api.GetCurrentThread

int = GetCurrentThread()

Returns a pseudohandle for the current thread.

Comments

A pseudohandle is a special constant that is interpreted as the current thread handle. The calling thread can use this handle to specify itself whenever a thread handle is required. Pseudohandles are not inherited by child processes. The method win32api::DuplicateHandle can be used to create a handle that other threads and processes can use. As this handle can not be closed, and integer is returned rather than a PyHANDLE object, which would attempt to automatically close the handle.

Win32 API References

GetCurrentThread


win32api.GetCurrentThreadId

int = GetCurrentThreadId()

Returns the thread ID for the current thread.

Win32 API References

GetCurrentThreadId


win32api.GetCursorPos

int, int = GetCursorPos()

Returns the position of the cursor, in screen co-ordinates.

Win32 API References

GetCursorPos


win32api.GetDiskFreeSpace

tuple = GetDiskFreeSpace(rootPath)

Retrieves information about the specified disk, including the amount of free space available.

Parameters

rootPath : string

Specifies the root directory of the disk to return information about. If rootPath is None, the method uses the root of the current directory.

Win32 API References

GetDiskFreeSpace

Return Value

The return value is a tuple of 4 integers, containing the number of sectors per cluster, the number of bytes per sector, the total number of free clusters on the disk and the total number of clusters on the disk.
If the function fails, an error is returned.


win32api.GetDomainName

string = GetDomainName()

Returns the current domain name


win32api.GetEnvironmentVariable

string = GetEnvironmentVariable(variable)

Retrieves the value of an environment variable.

Parameters

variable : string

The variable to get

Win32 API References

GetEnvironmentVariable


win32api.GetFileAttributes

int = GetFileAttributes(pathName)

Retrieves the attributes for the named file.

Parameters

pathName : string

The name of the file whose attributes are to be returned.

Win32 API References

GetFileAttributes

Return Value

The return value is a combination of the win32con.FILE_ATTRIBUTE_* constants.
An exception is raised on failure.


win32api.GetFocus

int = GetFocus()

Retrieves the handle of the keyboard focus window associated with the thread that called the method.

Win32 API References

GetFocus

Return Value

The method raises an exception if no window with the focus exists.


win32api.GetFullPathName

string = GetFullPathName(fileName)

Returns the full path of a (possibly relative) path

Parameters

fileName : string

The file name.


win32api.GetKeyState

int = GetKeyState(key)

Retrieves the status of the specified key.

Parameters

key : int

Specifies a virtual key. If the desired virtual key is a letter or digit (A through Z, a through z, or 0 through 9), key must be set to the ASCII value of that character. For other keys, it must be a virtual-key code.

Comments

The key status returned from this function changes as a given thread reads key messages from its message queue. The status does not reflect the interrupt-level state associated with the hardware. Use the win32api::GetAsyncKeyState method to retrieve that information.

Win32 API References

GetKeyState

Return Value

The return value specifies the status of the given virtual key. If the high-order bit is 1, the key is down; otherwise, it is up. If the low-order bit is 1, the key is toggled. A key, such as the CAPS LOCK key, is toggled if it is turned on. The key is off and untoggled if the low-order bit is 0. A toggle key's indicator light (if any) on the keyboard will be on when the key is toggled, and off when the key is untoggled.


win32api.GetLastError

int = GetLastError()

Retrieves the calling threads last error code value.

Win32 API References

GetLastError


win32api.GetLocalTime

tuple = GetLocalTime()

Returns the current local time


win32api.GetLogicalDriveStrings

string = GetLogicalDriveStrings()

Returns a string with all logical drives currently mapped.

Win32 API References

GetLogicalDriveStrings

Return Value

The return value is a single string, with each drive letter NULL terminated.
Use "string.splitfields (s, '\\000')" to split into components.


win32api.GetLogicalDrives

int = GetLogicalDrives()

Returns a bitmask representing the currently available disk drives.

Win32 API References

GetLogicalDrives


win32api.GetModuleFileName

string = GetModuleFileName(hModule)

Retrieves the filename of the specified module.

Parameters

hModule : int

Specifies the handle to the module.

Win32 API References

GetModuleFileName


win32api.GetModuleHandle

int = GetModuleHandle(fileName)

Returns the handle of an already loaded DLL.

Parameters

fileName=None : string

Specifies the file name of the module to load.

Win32 API References

GetModuleHandle


win32api.GetProcAddress

int = GetProcAddress(hModule, functionName )

Returns the address of the specified exported dynamic-link library (DLL) function.

Parameters

hModule : int

Specifies the handle to the module.

functionName : string

Specifies the name of the procedure.

Win32 API References

GetProcAddress


win32api.GetProfileSection

list = GetProfileSection(section, iniName )

Retrieves all entries from a section in an INI file.

Parameters

section : string

The section in the INI file to retrieve a entries for.

iniName=None : string

The name of the INI file. If None, the system INI file is used.

Win32 API References

GetProfileString

GetProfileInt

GetPrivateProfileString

GetPrivateProfileInt

Return Value

The return value is a list of strings.


win32api.GetProfileVal

int/string = GetProfileVal(section, entry , defValue , iniName )

Retrieves entries from a windows INI file. This method encapsulates GetProfileString, GetProfileInt, GetPrivateProfileString and GetPrivateProfileInt.

Parameters

section : string

The section in the INI file to retrieve a value for.

entry : string

The entry within the section in the INI file to retrieve a value for.

defValue : int/string

The default value. The type of this parameter determines the methods return type.

iniName=None : string

The name of the INI file. If None, the system INI file is used.

Win32 API References

GetProfileString

GetProfileInt

GetPrivateProfileString

GetPrivateProfileInt

Return Value

The return value is the same type as the default parameter.


win32api.GetShortPathName

string = GetShortPathName()

Obtains the short path form of the specified path.

Comments

The short path name is an 8.3 compatible file name. As the input path does not need to be absolute, the returned name may be longer than the input path.

Win32 API References

GetShortPathName


win32api.GetStdHandle

GetStdHandle(handle)

Returns a handle for the standard input, standard output, or standard error device

Parameters

handle : int

input, output, or error device


win32api.GetSysColor

int = GetSysColor(index)

Returns the current system color for the specified element.

Parameters

index : int

The Id of the element to return. See the API for full details.

Win32 API References

GetSysColor

Return Value

The return value is a windows RGB color representation.


win32api.GetSystemDefaultLCID

int = GetSystemDefaultLCID()

Retrieves the system default locale identifier.

Win32 API References

GetSystemDefaultLCID


win32api.GetSystemDefaultLangID

int = GetSystemDefaultLangID()

Retrieves the system default language identifier.

Win32 API References

GetSystemDefaultLangID


win32api.GetSystemDirectory

string = GetSystemDirectory()

Returns the path of the Windows system directory.

Win32 API References

GetSystemDirectory


win32api.GetSystemInfo

tuple = GetSystemInfo()

Retrieves information about the current system.

Win32 API References

GetSystemInfo

Return Value

The return value is a tuple of 9 values, which corresponds to the Win32 SYSTEM_INFO structure. The element names are:
dwOemId
dwPageSize
lpMinimumApplicationAddress
lpMaximumApplicationAddress
, dwActiveProcessorMask
dwNumberOfProcessors
dwProcessorType
dwAllocationGranularity
(wProcessorLevel,wProcessorRevision)


win32api.GetSystemMetrics

int = GetSystemMetrics(index)

Retrieves various system metrics and system configuration settings.

Parameters

index : int

Which metric is being requested. See the API documentation for a fill list.

Win32 API References

GetSystemMetrics


win32api.GetSystemTime

tuple = GetSystemTime()

Returns the current system time


win32api.GetTempFileName

tuple = GetTempFileName(path, prefix , nUnique )

Returns creates a temporary filename of the following form: path\\preuuuu.tmp.

Parameters

path : string

Specifies the path where the method creates the temporary filename. Applications typically specify a period (.) or the result of the GetTempPath function for this parameter.

prefix : string

Specifies the temporary filename prefix.

nUnique : int

Specifies an nteger used in creating the temporary filename. If this parameter is nonzero, it is appended to the temporary filename. If this parameter is zero, Windows uses the current system time to create a number to append to the filename.

Win32 API References

GetTempFileName

Return Value

The return value is a tuple of (string, int), where string is the filename, and rc is the unique number used to generate the filename.


win32api.GetTempPath

string = GetTempPath()

Retrieves the path of the directory designated for temporary files.


win32api.GetTickCount

string = GetTickCount()

Returns the number of milliseconds since windows started.


win32api.GetTimeZoneInformation

tuple = GetTimeZoneInformation()

Retrieves the system time-zone information.

Return Value

The return value is a tuple of format "ls(iiiiiiii)ls(iiiiiiii)l", which contains the information in a win32api TIME_ZONE_INFORMATION structure.


win32api.GetUserDefaultLCID

int = GetUserDefaultLCID()

Retrieves the user default locale identifier.

Win32 API References

GetUserDefaultLCID


win32api.GetUserDefaultLangID

int = GetUserDefaultLangID()

Retrieves the user default language identifier.

Win32 API References

GetUserDefaultLangID


win32api.GetUserName

string = GetUserName()

Returns the current user name

Win32 API References

GetUserName


win32api.GetVersion

int = GetVersion()

Returns the current version of Windows, and information about the environment.

Return Value

The return value's low word is the major/minor version of Windows. The high word is 0 if the platform is Windows NT, or 1 if Win32s on Windows 3.1


win32api.GetVersionEx

(int,int,int,int,string) = GetVersionEx()

Returns the current version of Windows, and information about the environment.

Return Value

The return value is a tuple with the following information.

Items

[0] int : majorVersion

Identifies the major version number of the operating system.

[1] int : minorVersion

Identifies the minor version number of the operating system.

[2] int : buildNumber

Identifies the build number of the operating system in the low-order word. (The high-order word contains the major and minor version numbers.)

[3] int : platformId

Identifies the platform supported by the operating system. May be one of VER_PLATFORM_WIN32s, VER_PLATFORM_WIN32_WINDOWS or VER_PLATFORM_WIN32_NT

[4] string : version

Contains arbitrary additional information about the operating system.


win32api.GetVolumeInformation

tuple = GetVolumeInformation(path)

Returns information about a file system and colume whose root directory is specified.

Parameters

path : string

The root path of the volume on which information is being requested.

Return Value

The return is a tuple of:
string - Volume Name
long - Volume serial number.
long - Maximum Component Length of a file name.
long - Sys Flags - other flags specific to the file system. See the api for details.
string - File System Name


win32api.GetWindowLong

int = GetWindowLong(hwnd, offset )

Retrieves a long value at the specified offset into the extra window memory of the given window.

Parameters

hwnd : int

The handle to the window.

offset : int

Specifies the zero-based byte offset of the value to change. Valid values are in the range zero through the number of bytes of extra window memory, minus four (for example, if 12 or more bytes of extra memory were specified, a value of 8 would be an index to the third long integer), or one of the GWL_ constants.


win32api.GetWindowsDirectory

string = GetWindowsDirectory()

Returns the path of the Windows directory.


win32api.HIBYTE

int = HIBYTE(val)

An interface to the win32api HIBYTE macro.

Parameters

val : int

The value to retrieve the HIBYTE from.

Comments

This is simply a wrapper to a C++ macro.


win32api.HIWORD

int = HIWORD(val)

An interface to the win32api HIWORD macro.

Parameters

val : int

The value to retrieve the HIWORD from.

Comments

This is simply a wrapper to a C++ macro.


win32api.InitiateSystemShutdown

InitiateSystemShutdown(computerName, message, timeOut, bForceClose, bRebootAfterShutdown)

Initiates a shutdown and optional restart of the specified computer.

Parameters

computerName : string/PyUnicode

Specifies the name of the computer to shut-down, or None

message : string/PyUnicode

Message to display in a dialog box

timeOut : int

Specifies the time (in seconds) that the dialog box should be displayed. While this dialog box is displayed, the shutdown can be stopped by the AbortSystemShutdown function. If dwTimeout is zero, the computer shuts down without displaying the dialog box, and the shutdown cannot be stopped by AbortSystemShutdown.

bForceClose : int

Specifies whether applications with unsaved changes are to be forcibly closed. If this parameter is TRUE, such applications are closed. If this parameter is FALSE, a dialog box is displayed prompting the user to close the applications.

bRebootAfterShutdown : int

Specifies whether the computer is to restart immediately after shutting down. If this parameter is TRUE, the computer is to restart. If this parameter is FALSE, the system flushes all caches to disk, clears the screen, and displays a message indicating that it is safe to power down.

Win32 API References

InitiateSystemShutdown


win32api.LOBYTE

int = LOBYTE(val)

An interface to the win32api LOBYTE macro.

Parameters

val : int

The value to retrieve the LOBYTE from.

Comments

This is simply a wrapper to a C++ macro.


win32api.LOWORD

int = LOWORD(val)

An interface to the win32api LOWORD macro.

Parameters

val : int

The value to retrieve the LOWORD from.

Comments

This is simply a wrapper to a C++ macro.


win32api.LoadCursor

int = LoadCursor(hInstance, cursorid )

Loads a cursor.

Parameters

hInstance : int

Handle to the instance to load the resource from.

cursorid : int

The ID of the cursor.

Win32 API References

LoadCursor


win32api.LoadLibrary

int = LoadLibrary(fileName)

Loads the specified DLL, and returns the handle.

Parameters

fileName : string

Specifies the file name of the module to load.

Win32 API References

LoadLibrary


win32api.LoadLibraryEx

int = LoadLibraryEx(fileName, handle , handle )

Loads the specified DLL, and returns the handle.

Parameters

fileName : string

Specifies the file name of the module to load.

handle : int

Reserved - must be zero

handle : flags

Specifies the action to take when loading the module.

Win32 API References

LoadLibraryEx


win32api.LoadResource

string = LoadResource(handle, type , name , language )

Finds and loads a resource from a PE file.

Parameters

handle : int

The handle of the module containing the resource.

type : object

The type of resource to load.

name : object

The name of the resource to load.

language=NEUTRAL : int

Language to use, defaults to LANG_NEUTRAL.


win32api.LoadString

PyUnicode = LoadString(handle, stringId , numChars )

Loads a string from a resource file.

Parameters

handle : int

The handle of the module containing the resource.

stringId : int

The ID of the string to load.

numChars=1024 : int

Number of characters to allocate for the return buffer.


win32api.MAKELANGID

int = MAKELANGID(PrimaryLanguage, SubLanguage )

Creates a language identifier from a primary language identifier and a sublanguage identifier.

Parameters

PrimaryLanguage : int

Primary language identifier

SubLanguage : int

The sublanguage identifier

Comments

This is simply a wrapper to a C++ macro.


win32api.MessageBeep

int = MessageBeep(type)

Plays a predefined waveform sound.

Parameters

type=win32con.MB_OK : int

Specifies the sound type, as identified by an entry in the [sounds] section of the registry. This parameter can be one of MB_ICONASTERISK, MB_ICONEXCLAMATION, MB_ICONHAND, MB_ICONQUESTION or MB_OK.

Comments

The waveform sound for each sound type is identified by an entry in the [sounds] section of the registry.


win32api.MessageBox

int = MessageBox(hwnd, message , title , style , language )

Display a message box.

Parameters

hwnd : int

The handle of the parent window. See the comments section.

message : string

The message to be displayed in the message box.

title : string/None

The title for the message box. If None, the applications title will be used.

style=win32con.MB_OK : int

The style of the message box.

language=win32api.MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT) : int

The language ID to use.

Comments

Normally, a program in a GUI environment will use one of the MessageBox methods supplied by the GUI (eg, win32ui::MessageBox or PyCWnd::MessageBox )

Return Value

An integer identifying the button pressed to dismiss the dialog.


win32api.MoveFile

MoveFile(srcName, destName)

Renames a file, or a directory (including its children).

Parameters

srcName : string

The name of the source file.

destName : string

The name of the destination file.

Comments

This method can not move files across volumes.

Win32 API References

MoveFile.


win32api.MoveFileEx

MoveFileEx(srcName, destName, flag)

Renames a file.

Parameters

srcName : string

The name of the source file.

destName : string

The name of the destination file. May be None.

flag : int

Flags indicating how the move is to be performed. See the API for full details.

Comments

This method can move files across volumes.
If destName is None, and flags contains win32con.MOVEFILE_DELAY_UNTIL_REBOOT, the file will be deleted next reboot.

Win32 API References

MoveFileEx


win32api.OpenProcess

PyHANDLE = OpenProcess(reqdAccess, bInherit , pid )

Retrieves a handle to an existing process

Parameters

reqdAccess : int

The required access.

bInherit : int

Specifies whether the returned handle can be inherited by a new process created by the current process. If TRUE, the handle is inheritable.

pid : int

The process ID


win32api.OutputDebugString

OutputDebugString(msg)

Sends a string to the Windows debugging device.

Parameters

msg : string

The string to write.


win32api.PostMessage

PostMessage(hwnd, idMessage, wParam, lParam)

Post a message to a window.

Parameters

hwnd : int

The hWnd of the window to receive the message.

idMessage : int

The ID of the message to post.

wParam : int

The wParam for the message

lParam : int

The lParam for the message

Win32 API References

PostMessage


win32api.PostQuitMessage

PostQuitMessage(exitCode)

Post a quit message to an app.

Parameters

exitCode=0 : int

The exit code

Win32 API References

PostQuitMessage


win32api.PostThreadMessage

PostThreadMessage(tid, idMessage, wParam, lParam)

Post a message to the specified thread.

Parameters

tid : int

Identifier of the thread to which the message will be posted.

idMessage : int

The ID of the message to post.

wParam : int

The wParam for the message

lParam : int

The lParam for the message

Win32 API References

PostThreadMessage


win32api.RGB

int = RGB(red, green , blue )

An interface to the win32api RGB macro.

Parameters

red : int

The red value

green : int

The green value

blue : int

The blue value

Comments

This is simply a wrapper to a C++ macro.


win32api.RegCloseKey

RegCloseKey(key)

Closes a previously opened registry key.

Parameters

key : PyHKEY/int

The key to be closed.

Win32 API References

RegCloseKey


win32api.RegConnectRegistry

int = RegConnectRegistry(computerName, key )

Establishes a connection to a predefined registry handle on another computer.

Parameters

computerName : string

The name of the remote computer, of the form \\\\computername. If None, the local computer is used.

key : int

The predefined handle. May be win32con.HKEY_LOCAL_MACHINE or win32con.HKEY_USERS.

Win32 API References

RegConnectRegistry

Return Value

The return value is the handle of the opened key. If the function fails, an exception is raised.


win32api.RegCreateKey

PyHKEY = RegCreateKey(key, subKey )

Creates the specified key, or opens the key if it already exists.

Parameters

key : PyHKEY/int

An already open key, or any one of the following win32con constants:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS

subKey : string

The name of a key that this method opens or creates. This key must be a subkey of the key identified by the key parameter. If key is one of the predefined keys, subKey may be None. In that case, the handle returned is the same hkey handle passed in to the function.

Win32 API References

RegCreateKey

Return Value

The return value is the handle of the opened key. If the function fails, an exception is raised.


win32api.RegDeleteKey

RegDeleteKey(key, subKey)

Deletes the specified key. This method can not delete keys with subkeys.

Parameters

key : PyHKEY/int

An already open key, or any one of the following win32con constants:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS

subKey : string

The name of the key to delete. This key must be a subkey of the key identified by the key parameter. This value must not be None, and the key may not have subkeys.

Comments

If the method succeeds, the entire key, including all of its values, is removed. If the method fails, and exception is raised.

Win32 API References

RegDeleteKey


win32api.RegDeleteValue

RegDeleteValue(key, value)

Removes a named value from the specified registry key.

Parameters

key : PyHKEY/int

An already open key, or any one of the following win32con constants:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS

value : string

The name of the value to remove.

Win32 API References

RegDeleteValue


win32api.RegEnumKey

string = RegEnumKey(key, index )

Enumerates subkeys of the specified open registry key. The function retrieves the name of one subkey each time it is called.

Parameters

key : PyHKEY/int

An already open key, or any one of the following win32con constants:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS

index : int

The index of the key to retrieve.

Win32 API References

RegEnumKey


win32api.RegEnumValue

(string,object,type) = RegEnumValue(key, index )

Enumerates values of the specified open registry key. The function retrieves the name of one subkey each time it is called.

Parameters

key : PyHKEY/int

An already open key, or any one of the following win32con constants:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS

index : int

The index of the key to retrieve.

Comments

This function is typically called repeatedly, until an exception is raised, indicating no more values.

Win32 API References

PyRegEnumValue


win32api.RegFlushKey

RegFlushKey(key)

Writes all the attributes of the specified key to the registry.

Parameters

key : PyHKEY/int

An already open key, or any one of the following win32con constants:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS

Comments

It is not necessary to call RegFlushKey to change a key. Registry changes are flushed to disk by the registry using its lazy flusher. Registry changes are also flushed to disk at system shutdown.
Unlike win32api::RegCloseKey, the RegFlushKey method returns only when all the data has been written to the registry.
An application should only call RegFlushKey if it requires absolute certainty that registry changes are on disk. If you don't know whether a RegFlushKey call is required, it probably isn't.

Win32 API References

RegFlushKey


win32api.RegGetKeySecurity

PySECURITY_DESCRIPTOR = RegGetKeySecurity(key, security_info )

Retrieves the security on the specified registry key.

Parameters

key : PyHKEY/int

Handle to an open key for which the security descriptor is set.

security_info : int

Specifies the components of the security descriptor to retrieve. The value can be a combination of the *_SECURITY_INFORMATION constants.

Win32 API References

PyRegGetKeySecurity


win32api.RegLoadKey

RegLoadKey(key, subKey, filename)

The RegLoadKey method creates a subkey under HKEY_USER or HKEY_LOCAL_MACHINE and stores registration information from a specified file into that subkey.

Parameters

key : PyHKEY/int

An already open key, or any one of the following win32con constants:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS

subKey : string

The name of the key to delete. This key must be a subkey of the key identified by the key parameter. This value must not be None, and the key may not have subkeys.

filename : string

The name of the file to load registry data from. This file must have been created with the win32api::RegSaveKey function. Under the file allocation table (FAT) file system, the filename may not have an extension.

Comments

A call to RegLoadKey fails if the calling process does not have the SE_RESTORE_PRIVILEGE privilege.
If hkey is a handle returned by win32api::RegConnectRegistry, then the path specified in fileName is relative to the remote computer.

Win32 API References

RegLoadKey


win32api.RegOpenKey

PyHKEY = RegOpenKey()

Opens the specified key.

Comments

This funcion is implemented using win32api::RegOpenKeyEx, by taking advantage of default parameters. See win32api::RegOpenKeyEx for more details.


win32api.RegOpenKeyEx

PyHKEY = RegOpenKeyEx(key, subKey , reserved , sam )

Opens the specified key.

Parameters

key : PyHKEY/int

An already open key, or any one of the following win32con constants:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS

subKey : string

The name of a key that this method opens. This key must be a subkey of the key identified by the key parameter. If key is one of the predefined keys, subKey may be None. In that case, the handle returned is the same key handle passed in to the function.

reserved=0 : int

Reserved. Must be zero.

sam=KEY_READ : int

Specifies an access mask that describes the desired security access for the new key. This parameter can be a combination of the following win32con constants:
KEY_ALL_ACCESS
KEY_CREATE_LINK
KEY_CREATE_SUB_KEY
KEY_ENUMERATE_SUB_KEYS
KEY_EXECUTE
KEY_NOTIFY
KEY_QUERY_VALUE
KEY_READ
KEY_SET_VALUE
KEY_WRITE

Win32 API References

RegOpenKeyEx

Return Value

The return value is the handle of the opened key. If the function fails, an exception is raised.


win32api.RegQueryInfoKey

(int, int, long) = RegQueryInfoKey(key)

Returns the number of subkeys, the number of values a key has, and if available the last time the key was modified as 100's of nanoseconds since Jan 1, 1600.

Parameters

key : PyHKEY/int

An already open key, or or any one of the following win32con constants:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS

Win32 API References

RegQueryInfoKey


win32api.RegQueryValue

string = RegQueryValue(key, subKey )

The RegQueryValue method retrieves the value associated with the unnamed value for a specified key in the registry.

Parameters

key : PyHKEY/int

An already open key, or any one of the following win32con constants:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS

subKey : string

The name of the subkey with which the value is associated. If this parameter is None or empty, the function retrieves the value set by the win32api::RegSetValue method for the key identified by key.

Comments

Values in the registry have name, type, and data components. This method retrieves the data for a key's first value that has a NULL name. But the underlying API call doesn't return the type, Lame Lame Lame, DONT USE THIS!!!

Win32 API References

RegQueryValue


win32api.RegQueryValueEx

(object,type) = RegQueryValueEx(key, valueName )

Retrieves the type and data for a specified value name associated with an open registry key.

Parameters

key : PyHKEY/int

An already open key, or any one of the following win32con constants:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS

valueName : string

The name of the value to query.

Comments

Values in the registry have name, type, and data components. This method retrieves the data for the given value.

Win32 API References

RegQueryValueEx


win32api.RegSaveKey

RegSaveKey(key, filename, sa)

The RegSaveKey method saves the specified key, and all its subkeys to the specified file.

Parameters

key : PyHKEY/int

An already open key, or any one of the following win32con constants:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS

filename : string

The name of the file to save registry data to. This file cannot already exist. If this filename includes an extension, it cannot be used on file allocation table (FAT) file systems by the win32api::RegLoadKey, win32api::RegReplaceKey , or win32api::RegRestoreKey methods.

sa=None : PySECURITY_ATTRIBUTES

The security attributes of the created file.

Comments

If key represents a key on a remote computer, the path described by fileName is relative to the remote computer.
The caller of this method must possess the SeBackupPrivilege security privilege.

Win32 API References

RegSaveKey


win32api.RegSetKeySecurity

RegSetKeySecurity(key, security_info, sd)

Sets the security on the specified registry key.

Parameters

key : PyHKEY/int

Handle to an open key for which the security descriptor is set.

security_info : int

] Specifies the components of the security descriptor to set. The value can be a combination of the *_SECURITY_INFORMATION constants.

sd : PySECURITY_DESCRIPTOR

The new security descriptor for the key

Comments

If key is one of the predefined keys, the predefined key should be closed with win32api::RegCloseKey. That ensures that the new security information is in effect the next time the predefined key is referenced.

Win32 API References

PyRegSetKeySecurity


win32api.RegSetValue

RegSetValue(key, subKey, type, value)

Associates a value with a specified key. Currently, only strings are supported.

Parameters

key : PyHKEY/int

An already open key, or any one of the following win32con constants:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS

subKey : string

The name of the subkey with which the value is associated. This parameter can be None or empty, in which case the value will be added to the key identified by the key parameter.

type : int

Type of data. Must be win32con.REG_SZ

value : string

The value to associate with the key.

Comments

If the key specified by the lpszSubKey parameter does not exist, the RegSetValue function creates it.
Value lengths are limited by available memory. Long values (more than 2048 bytes) should be stored as files with the filenames stored in the configuration registry. This helps the registry perform efficiently.
The key identified by the key parameter must have been opened with KEY_SET_VALUE access.

Win32 API References

RegSetValue


win32api.RegSetValueEx

RegSetValueEx(key, valueName, reserved, type, value)

Stores data in the value field of an open registry key.

Parameters

key : PyHKEY/int

An already open key, or any one of the following win32con constants:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS

valueName : string

The name of the value to set. If a value with this name is not already present in the key, the method adds it to the key.
If this parameter is None or an empty string and the type parameter is the win32api.REG_SZ type, this function sets the same value the win32api::RegSetValue method would set.

reserved : any

Place holder for reserved argument. Zero will always be passed to the API function.

type : int

Type of data.

Value | Meaning
REG_BINARY | Binary data in any form.
REG_DWORD | A 32-bit number.
REG_DWORD_LITTLE_ENDIAN A 32-bit number in little-endian format. This is equivalent to REG_DWORD.
In little-endian format, a multi-byte value is stored in memory from the lowest byte (the little end) to the highest byte. For example, the value 0x12345678 is stored as (0x78 0x56 0x34 0x12) in little-endian format. Windows NT and Windows 95 are designed to run on little-endian computer architectures. A user may connect to computers that have big-endian architectures, such as some UNIX systems.
REG_DWORD_BIG_ENDIAN | A 32-bit number in big-endian format. In big-endian format, a multi-byte value is stored in memory from the highest byte (the big end) to the lowest byte. For example, the value 0x12345678 is stored as (0x12 0x34 0x56 0x78) in big-endian format.
REG_EXPAND_SZ | A null-terminated string that contains unexpanded references to environment variables (for example, %PATH%). It will be a Unicode or ANSI string depending on whether you use the Unicode or ANSI functions.
REG_LINK | A Unicode symbolic link.
REG_MULTI_SZ | An array of null-terminated strings, terminated by two null characters.
REG_NONE | No defined value type.
REG_RESOURCE_LIST | A device-driver resource list.
REG_SZ | A null-terminated string. It will be a Unicode or ANSI string depending on whether you use the Unicode or ANSI functions

value : registry data

The value to be stored with the specified value name.

Comments

This method can also set additional value and type information for the specified key.
The key identified by the key parameter must have been opened with KEY_SET_VALUE access. To open the key, use the win32api::RegCreateKeyEx or win32api::RegOpenKeyEx methods.
Value lengths are limited by available memory. Long values (more than 2048 bytes) should be stored as files with the filenames stored in the configuration registry. This helps the registry perform efficiently.
The key identified by the key parameter must have been opened with KEY_SET_VALUE access.

Win32 API References

RegSetValueEx


win32api.RegUnLoadKey

RegUnLoadKey(key, subKey)

The RegUnLoadKey function unloads the specified registry key and its subkeys from the registry. The key should have been created by a previous call to win32api::RegLoadKey.

Parameters

key : PyHKEY/int

An already open key, or any one of the following win32con constants:
HKEY_USERS
HKEY_LOCAL_MACHINE

subKey : string

The name of the key to unload. This key must be a subkey of the key identified by the key parameter. This value must not be None.

Comments

A call to RegUnLoadKey fails if the calling process does not have the SE_RESTORE_PRIVILEGE privilege.
If hkey is a handle returned by win32api::RegConnectRegistry, then the path specified in fileName is relative to the remote computer.

Win32 API References

RegUnLoadKey


win32api.RegisterWindowMessage

RegisterWindowMessage(msgString)

The RegisterWindowMessage method, given a string, returns a system wide unique message ID, suitable for sending messages between applications who both register the same string.

Parameters

msgString : string

The name of the message to register. All applications that register this message string will get the same message. ID back. It will be unique in the system and suitable for applications to use to exchange messages.

Comments

Only use RegisterWindowMessage when more than one application must process the
same message. For sending private messages within a window class, an application
can use any integer in the range WM_USER through 0x7FFF. (Messages in this range
are private to a window class, not to an application. For example, predefined
control classes such as BUTTON, EDIT, LISTBOX, and COMBOBOX may use values in
this range.)

Win32 API References

RegisterWindowMessage


win32api.SearchPath

int = SearchPath(path, fileName , fileExt )

Searches a path for the specified file.

Parameters

path : string

The path to search. If None, searches the standard paths.

fileName : string

The name of the file to search for.

fileExt=None : string

specifies an extension to be added to the filename when searching for the file. The first character of the filename extension must be a period (.). The extension is added only if the specified filename does not end with an extension. If a filename extension is not required or if the filename contains an extension, this parameter can be None.

Win32 API References

SearchPath

Return Value

The return value is a tuple of (string, int). string is the full path name located. int is the offset in the string of the base name of the file.


win32api.SendMessage

SendMessage(hwnd, idMessage, wParam, lParam)

Send a message to a window.

Parameters

hwnd : int

The hWnd of the window to receive the message.

idMessage : int

The ID of the message to send.

wParam : int

The wParam for the message

lParam : int

The lParam for the message

Win32 API References

SendMessage


win32api.SetClassLong

int = SetClassLong(hwnd, offset , val )

Replaces the specified 32-bit (long) value at the specified offset into the extra class memory for the window.

Parameters

hwnd : int

The handle to the window.

offset : int

Specifies the zero-based byte offset of the value to change. Valid values are in the range zero through the number of bytes of extra window memory, minus four (for example, if 12 or more bytes of extra memory were specified, a value of 8 would be an index to the third long integer), or one of the GWL_ constants.

val : int

Specifies the long value to place in the window's reserved memory.


win32api.SetClassWord

int = SetClassWord(hwnd, offset , val )

Parameters

hwnd : int

The handle to the window.

offset : int

Specifies the zero-based byte offset of the value to change. Valid values are in the range zero through the number of bytes of extra window memory, minus four (for example, if 12 or more bytes of extra memory were specified, a value of 8 would be an index to the third long integer), or one of the GWL_ constants.

val : int

Specifies the long value to place in the window's reserved memory.


win32api.SetConsoleTitle

SetConsoleTitle(title)

Sets the title for the current console.

Parameters

title : string

The new title

Win32 API References

SetConsoleTitle


win32api.SetCursor

int = SetCursor(hCursor)

Set the cursor to the HCURSOR object.

Parameters

hCursor : long

The new cursor.

Win32 API References

SetCursor

Return Value

The result is the previous cursor if there was one.


win32api.SetCursorPos

SetCursorPos(x,y)

The SetCursorPos function moves the cursor to the specified screen coordinates.

Parameters

x,y : (int, int)

The new position.

Win32 API References

SetCursorPos


win32api.SetErrorMode

int = SetErrorMode(errorMode)

Controls whether the system will handle the specified types of serious errors, or whether the process will handle them.

Parameters

errorMode : int

A set of bit flags that specify the process error mode

Win32 API References

SetErrorMode

Return Value

The result is an integer containing the old error flags.


win32api.SetFileAttributes

int = SetFileAttributes(pathName, attrs )

Sets the named file's attributes.

Parameters

pathName : string

The name of the file.

attrs : int

The attributes to set. Must be a combination of the win32con.FILE_ATTRIBUTE_* constants.


win32api.SetStdHandle

SetStdHandle(handle, handle)

Set the handle for the standard input, standard output, or standard error device

Parameters

handle : int

input, output, or error device

handle : PyHANDLE/int

A previously opened handle to be a standard handle


win32api.SetSystemTime

int = SetSystemTime(year, month , dayOfWeek , day , hour , minute , second , millseconds )

Returns the current system time

Parameters

year : int

month : int

dayOfWeek : int

day : int

hour : int

minute : int

second : int

millseconds : int


win32api.SetThreadLocale

SetThreadLocale(lcid)

Sets the current thread's locale.

Parameters

lcid : int

The new LCID


win32api.SetWindowLong

int = SetWindowLong(hwnd, offset , val )

Places a long value at the specified offset into the extra window memory of the given window.

Parameters

hwnd : int

The handle to the window.

offset : int

Specifies the zero-based byte offset of the value to change. Valid values are in the range zero through the number of bytes of extra window memory, minus four (for example, if 12 or more bytes of extra memory were specified, a value of 8 would be an index to the third long integer), or one of the GWL_ constants.

val : int

Specifies the long value to place in the window's reserved memory.


win32api.SetWindowWord

int = SetWindowWord(hwnd, offset , val )

Parameters

hwnd : int

The handle to the window.

offset : int

Specifies the zero-based byte offset of the value to change. Valid values are in the range zero through the number of bytes of extra window memory, minus four (for example, if 12 or more bytes of extra memory were specified, a value of 8 would be an index to the third long integer), or one of the GWL_ constants.

val : int

Specifies the long value to place in the window's reserved memory.


win32api.ShellExecute

int = ShellExecute(hwnd, op , file , params , dir , bShow )

Opens or prints a file.

Parameters

hwnd : int

The handle of the parent window, or 0 for no parent. This window receives any message boxes an application produces (for example, for error reporting).

op : string

The operation to perform. May be "open", "print", or None, which defaults to "open".

file : string

The name of the file to open.

params : string

The parameters to pass, if the file name contains an executable. Should be None for a document file.

dir : string

The initial directory for the application.

bShow : int

Specifies whether the application is shown when it is opened. If the lpszFile parameter specifies a document file, this parameter is zero.

Win32 API References

ShellExecute

Return Value

The instance handle of the application that was run. (This handle could also be the handle of a dynamic data exchange [DDE] server application.) If there is an error, the method raises an exception.


win32api.ShowCursor

int = ShowCursor(show)

The ShowCursor method displays or hides the cursor.

Parameters

show : int

Visiblilty flag

Comments

This function sets an internal display counter that determines whether the cursor should be displayed. The cursor is displayed only if the display count is greater than or equal to 0. If a mouse is installed, the initial display count is 0. If no mouse is installed, the display count is -1.

Win32 API References

ShowCursor

Return Value

The return value specifies the new display counter


win32api.Sleep

int = Sleep(time, bAlterable )

Suspends execution of the current thread for the specified time.

Parameters

time : int

The number of milli-seconds to sleep for,

bAlterable=0 : int

Specifies whether the function may terminate early due to an I/O completion callback function.

Win32 API References

Sleep

SleepEx

Return Value

The return value is zero if the specified time interval expired.


win32api.TerminateProcess

TerminateProcess(handle, exitCode)

Kills a process

Parameters

handle : PyHANDLE

The handle of the process to terminate.

exitCode : int

The exit code for the process.

Comments

See also win32api::OpenProcess


win32api.Unicode

PyUnicode = Unicode()

Creates a new Unicode object


win32api.UpdateResource

UpdateResource(handle, type, name, data, language)

Updates a resource in a PE file.

Parameters

handle : int

The update-file handle.

type : object

The type of resource to load.

name : object

The name of the resource to load.

data : string

The data to place into the resource.

language=NEUTRAL : int

Language to use, defaults to LANG_NEUTRAL.


win32api.WinExec

WinExec(cmdLine, show)

Runs the specified application.

Parameters

cmdLine : string

The command line to execute.

show=win32con.SW_SHOWNORMAL : int

The initial state of the applications window.

Win32 API References

WinExec


win32api.WinHelp

WinHelp(hwnd, hlpFile, cmd, data)

Invokes the Windows Help system.

Parameters

hwnd : int

The handle of the window requesting help.

hlpFile : string

The name of the help file.

cmd : int

The type of help. See the api for full details.

data=0 : int/string

Additional data specific to the help call.

Win32 API References

WinHelp

Return Value

The method raises an exception if an error occurs.


win32api.WriteProfileSection

list = WriteProfileSection(section, data )

Writes a complete section to an INI file or registry.

Parameters

section : string

The section in the INI file to retrieve a entries for.

data : string

The data to write. This must be string, with each entry terminated with '\\0', followed by another terminating '\\0'


win32api.WriteProfileVal

WriteProfileVal(section, entry, value, iniName)

Writes a value to a Windows INI file.

Parameters

section : string

The section in the INI file to write to.

entry : string

The entry within the section in the INI file to write to.

value : int/string

The value to write.

iniName=None : string

The name of the INI file. If None, the system INI file is used.

Win32 API References

WritePrivateProfileString

WriteProfileString


win32clipboard

Module win32clipboard

A module which supports the Windows Clipboard API.

Methods

ChangeClipboardChain
Removes a specified window from the chain of clipboard viewers.

CloseClipboard
Closes the clipboard.

CountClipboardFormats
Retrieves the number of different data formats currently on the clipboard.

EmptyClipboard
Empties the clipboard and frees handles to data in the clipboard.

EnumClipboardFormats
Lets you enumerate the data formats that are currently available on the clipboard.

GetClipboardData
Retrieves data from the clipboard in a specified format.

GetClipboardFormatName
Retrieves from the clipboard the name of the specified registered format.

GetClipboardOwner
Retrieves the window handle of the current owner of the clipboard.

GetClipboardSequenceNumber
Returns the clipboard sequence number for the current window station.

GetClipboardViewer
Retrieves the handle of the first window in the clipboard viewer chain.

GetOpenClipboardWindow
Retrieves the handle of the window that currently has the clipboard open.

GetPriorityClipboardFormat
Returns the first available clipboard format in the specified list.

IsClipboardFormatAvailable
Determines whether the clipboard contains data in the specified format.

OpenClipboard
Opens the clipboard for examination.

RegisterClipboardFormat
Registers a new clipboard format.

SetClipboardData
Places data on the clipboard in a specified clipboard format.

SetClipboardText
Places text on the clipboard .

SetClipboardViewer
Adds the specified window to the chain of clipboard viewers


win32clipboard.ChangeClipboardChain

int = ChangeClipboardChain(hWndRemove, hWndNewNext )

The ChangeClipboardChain function removes a specified window from the chain of clipboard viewers.

Parameters

hWndRemove : int

Integer handle to the window to be removed from the chain. The handle must have been passed to the SetClipboardViewer function.

hWndNewNext : int

Integer handle to the window that follows the hWndRemove window in the clipboard viewer chain. (This is the handle returned by SetClipboardViewer, unless the sequence was changed in response to a WM_CHANGECBCHAIN message.)

Comments

The window identified by hWndNewNext replaces the hWndRemove window in the chain. The SetClipboardViewer function sends a WM_CHANGECBCHAIN message to the first window in the clipboard viewer chain.

Win32 API References

ChangeClipboardChain

Return Value

The return value indicates the result of passing the WM_CHANGECBCHAIN message to the windows in the clipboard viewer chain. Because a window in the chain typically returns FALSE when it processes WM_CHANGECBCHAIN, the return value from ChangeClipboardChain is typically FALSE. If there is only one window in the chain, the return value is typically TRUE.


win32clipboard.CloseClipboard

None = CloseClipboard()

The CloseClipboard function closes the clipboard.

Comments

When the window has finished examining or changing the clipboard, close the clipboard by calling CloseClipboard. This enables other windows to access the clipboard.
Do not place an object on the clipboard after calling CloseClipboard.

Win32 API References

CloseClipboard

Return Value

If the function succeeds, the return value is None.
If the function fails, win32api.error is raised with the GetLastError info.


win32clipboard.CountClipboardFormats

int = CountClipboardFormats()

The CountClipboardFormats function retrieves the number of different data formats currently on the clipboard.

Win32 API References

CountClipboardFormats

Return Value

If the function succeeds, the return value is the number of different data formats currently on the clipboard. If the function fails, win32api.error is raised with the GetLastError info.


win32clipboard.EmptyClipboard

None = EmptyClipboard()

The EmptyClipboard function empties the clipboard and frees handles to data in the clipboard. The function then assigns ownership of the clipboard to the window that currently has the clipboard open.

Comments

Before calling EmptyClipboard, an application must open the clipboard by using the OpenClipboard function. If the application specifies a NULL window handle when opening the clipboard, EmptyClipboard succeeds but sets the clipboard owner to NULL.

Win32 API References

EmptyClipboard

Return Value

If the function succeeds, the return value is None.
If the function fails, win32api.error is raised with the GetLastError info.


win32clipboard.EnumClipboardFormats

int = EnumClipboardFormats(format)

The EnumClipboardFormats function lets you enumerate the data formats that are currently available on the clipboard.

Parameters

format=0 : int

Specifies a clipboard format that is known to be available.
To start an enumeration of clipboard formats, set format to zero. When format is zero, the function retrieves the first available clipboard format. For subsequent calls during an enumeration, set format to the result of the previous EnumClipboardFormat call.

Comments

Clipboard data formats are stored in an ordered list. To perform an enumeration of clipboard data formats, you make a series of calls to the EnumClipboardFormats function. For each call, the format parameter specifies an available clipboard format, and the function returns the next available clipboard format.
You must open the clipboard before enumerating its formats. Use the OpenClipboard function to open the clipboard. The EnumClipboardFormats function fails if the clipboard is not open.
The EnumClipboardFormats function enumerates formats in the order that they were placed on the clipboard. If you are copying information to the clipboard, add clipboard objects in order from the most descriptive clipboard format to the least descriptive clipboard format. If you are pasting information from the clipboard, retrieve the first clipboard format that you can handle. That will be the most descriptive clipboard format that you can handle.
The system provides automatic type conversions for certain clipboard formats. In the case of such a format, this function enumerates the specified format, then enumerates the formats to which it can be converted. For more information, see Standard Clipboard Formats and Synthesized Clipboard Formats.

Win32 API References

EnumClipboardFormats

Return Value

If the function succeeds, the return value is the clipboard format that follows the specified format. In other words, the next available clipboard format.
If there are no more clipboard formats to enumerate, the return value is zero.
If the function fails, win32api.error is raised with the GetLastError info.


win32clipboard.GetClipboardData

string/unicode = GetClipboardData(format)

The GetClipboardData function retrieves data from the clipboard in a specified format. The clipboard must have been opened previously.

Parameters

format=CF_TEXT : int

Specifies a clipboard format. For a description of the standard clipboard formats, see Standard Clipboard Formats.

Comments

An application can enumerate the available formats in advance by using the EnumClipboardFormats function.
The clipboard controls the handle that the GetClipboardData function returns, not the application. The application should copy the data immediately. The application cannot rely on being able to make long-term use of the handle. The application must not free the handle nor leave it locked.
The system performs implicit data format conversions between certain clipboard formats when an application calls the GetClipboardData function. For example, if the CF_OEMTEXT format is on the clipboard, a window can retrieve data in the CF_TEXT format. The format on the clipboard is converted to the requested format on demand. For more information, see Synthesized Clipboard Formats.

Win32 API References

GetClipboardData

Standard Clipboard Formats

Return Value

If the function succeeds, the return value is the handle of a clipboard object in the specified format.
If the function fails, win32api.error is raised with the GetLastError info.


win32clipboard.GetClipboardFormatName

string = GetClipboardFormatName(format)

The GetClipboardFormatName function retrieves from the clipboard the name of the specified registered format.

Parameters

format : int

Specifies the type of format to be retrieved. This parameter must not specify any of the predefined clipboard formats.

Win32 API References

GetClipboardFormatName

Return Value

If the function succeeds, the return value is the string containing the format.
If the function fails, win32api.error is raised with the GetLastError info.


win32clipboard.GetClipboardOwner

int = GetClipboardOwner()

The GetClipboardOwner function retrieves the window handle of the current owner of the clipboard.

Comments

The clipboard can still contain data even if the clipboard is not currently owned.
In general, the clipboard owner is the window that last placed data in clipboard. The EmptyClipboard function assigns clipboard ownership.

Win32 API References

GetClipboardOwner

Return Value

If the function succeeds, the return value is the handle of the window that owns the clipboard. If the function fails, win32api.error is raised with the GetLastError info.


win32clipboard.GetClipboardSequenceNumber

int = GetClipboardSequenceNumber()

The GetClipboardSequenceNumber function returns the clipboard sequence number for the current window station.

Comments

This method is not available on some early Windows (eg 95) machines.

[This is preliminary documentation and subject to change.]
The system keeps a 32-bit serial number for the clipboard for each window station. This number is incremented whenever the contents of the clipboard change or the clipboard is emptied. You can track this value to determine whether the clipboard contents have changed and optimize creating DataObjects. If clipboard rendering is delayed, the sequence number is not incremented until the changes are rendered.

Win32 API References

GetClipboardSequenceNumber

Return Value

The return value is the clipboard sequence number. If you do not have WINSTA_ACCESSCLIPBOARD access to the window station, the function returns zero.


win32clipboard.GetClipboardViewer

int = GetClipboardViewer()

The GetClipboardViewer function retrieves the handle of the first window in the clipboard viewer chain.

Win32 API References

GetClipboardViewer

Return Value

If the function succeeds, the return value is the handle of the first window in the clipboard viewer chain. If the function fails, win32api.error is raised with the GetLastError info.


win32clipboard.GetOpenClipboardWindow

int = GetOpenClipboardWindow()

The GetOpenClipboardWindow function retrieves the handle of the window that currently has the clipboard open.

Comments

If an application or dynamic-link library (DLL) specifies a NULL window handle when calling the OpenClipboard function, the clipboard is opened but is not associated with a window. In such a case, GetOpenClipboardWindow returns NULL.

Win32 API References

GetOpenClipboardWindow

Return Value

If the function succeeds, the return value is the handle of the window that has the clipboard open. If the function fails, win32api.error is raised with the GetLastError info.


win32clipboard.GetPriorityClipboardFormat

int = GetPriorityClipboardFormat(formats)

The GetPriorityClipboardFormat function returns the first available clipboard format in the specified list.

Parameters

formats : tuple

Tuple of integers identifying clipboard formats, in priority order. For a description of the standard clipboard formats, see Standard Clipboard Formats.

Win32 API References

GetPriorityClipboardFormat

Standard Clipboard Formats

Return Value

If the function succeeds, the return value is the first clipboard format in the list for which data is available. If the clipboard is empty, the return value is NULL. If the clipboard contains data, but not in any of the specified formats, the return value is -1.


win32clipboard.IsClipboardFormatAvailable

int = IsClipboardFormatAvailable(format)

The IsClipboardFormatAvailable function determines whether the clipboard contains data in the specified format.

Parameters

format : int

Specifies a clipboard format. For a description of the standard clipboard formats, see Standard Clipboard Formats.

Comments

Typically, an application that recognizes only one clipboard format would call this function when processing the WM_INITMENU or WM_INITMENUPOPUP message. The application would then enable or disable the Paste menu item, depending on the return value. Applications that recognize more than one clipboard format should use the GetPriorityClipboardFormat function for this purpose.

Win32 API References

IsClipboardFormatAvailable

Standard Clipboard Formats

Return Value

If the clipboard format is available, the return value is nonzero.


win32clipboard.OpenClipboard

None = OpenClipboard(hWnd)

The OpenClipboard function opens the clipboard for examination and prevents other applications from modifying the clipboard content.

Parameters

hWnd : int

Integer handle to the window to be associated with the open clipboard. If this parameter is 0, the open clipboard is associated with the current task.

Comments

OpenClipboard fails if another window has the clipboard open.
An application should call the CloseClipboard function after every successful call to OpenClipboard.
The window identified by the hWnd parameter does not become the clipboard owner unless the EmptyClipboard function is called.

Win32 API References

OpenClipboard

Return Value

If the function succeeds, the return value is None.
If the function fails, win32api.error is raised with the GetLastError info.


win32clipboard.RegisterClipboardFormat

None = RegisterClipboardFormat(name)

The RegisterClipboardFormat function registers a new clipboard format. This format can then be used as a valid clipboard format.

Parameters

name : string

String that names the new format.

Comments

If a registered format with the specified name already exists, a new format is not registered and the return value identifies the existing format. This enables more than one application to copy and paste data using the same registered clipboard format. Note that the format name comparison is case-insensitive.
Registered clipboard formats are identified by values in the range 0xC000 through 0xFFFF.

Win32 API References

RegisterClipboardFormat

Return Value

If the function succeeds, the return value identifies the registered clipboard format. If the function fails, win32api.error is raised with the GetLastError info.


win32clipboard.SetClipboardData

int = SetClipboardData(format, hMem )

The SetClipboardData function places data on the clipboard in a specified clipboard format. The window must be the current clipboard owner, and the application must have called the OpenClipboard function. (When responding to the WM_RENDERFORMAT and WM_RENDERALLFORMATS messages, the clipboard owner must not call OpenClipboard before calling SetClipboardData.)

Parameters

format : int

Specifies a clipboard format. For a description of the standard clipboard formats, see Standard Clipboard Formats.

hMem : int

Integer handle to the data in the specified format. This parameter can be 0, indicating that the window provides data in the specified clipboard format (renders the format) upon request. If a window delays rendering, it must process the WM_RENDERFORMAT and WM_RENDERALLFORMATS messages.
After SetClipboardData is called, the system owns the object identified by the hMem parameter. The application can read the data, but must not free the handle or leave it locked. If the hMem parameter identifies a memory object, the object must have been allocated using the GlobalAlloc function with the GMEM_MOVEABLE and GMEM_DDESHARE flags.

Alternative Parameters

format

Specifies a clipboard format. For a description of the standard clipboard formats, see Standard Clipboard Formats.

ob

An object that has a read-buffer interface. A global memory object is allocated, and the objects buffer is copied to the new memory.

Comments

The uFormat parameter can identify a registered clipboard format, or it can be one of the standard clipboard formats. For more information, see Registered Clipboard Formats and Standard Clipboard Formats.
The system performs implicit data format conversions between certain clipboard formats when an application calls the GetClipboardData function. For example, if the CF_OEMTEXT format is on the clipboard, a window can retrieve data in the CF_TEXT format. The format on the clipboard is converted to the requested format on demand. For more information, see Synthesized Clipboard Formats.

Win32 API References

SetClipboardData

Return Value

If the function succeeds, the return value is integer handle of the data.
If the function fails, win32api.error is raised with the GetLastError info.


win32clipboard.SetClipboardText

int = SetClipboardText(text)

Convienience function to call SetClipboardData with text.

Parameters

text : string

The text to place on the clipboard.

Win32 API References

SetClipboardData

Return Value

If the function succeeds, the return value is integer handle of the data.
If the function fails, win32api.error is raised with the GetLastError info.


win32clipboard.SetClipboardViewer

int = SetClipboardViewer(hWndNewViewer)

The SetClipboardViewer function adds the specified window to the chain of clipboard viewers. Clipboard viewer windows receive a WM_DRAWCLIPBOARD message whenever the content of the clipboard changes.

Parameters

hWndNewViewer : int

Integer handle to the window to be added to the clipboard chain.

Comments

The windows that are part of the clipboard viewer chain, called clipboard viewer windows, must process the clipboard messages WM_CHANGECBCHAIN and WM_DRAWCLIPBOARD. Each clipboard viewer window calls the SendMessage function to pass these messages to the next window in the clipboard viewer chain.
A clipboard viewer window must eventually remove itself from the clipboard viewer chain by calling the ChangeClipboardChain function -- for example, in response to theWM_DESTROY message.

Win32 API References

SetClipboardViewer

Return Value

If the function succeeds, the return value identifies the next window in the clipboard viewer chain.
If an error occurs or there are no other windows in the clipboard viewer chain, win32api.error is raised with the GetLastError info.


win32event

Module win32event

A module which provides an interface to the win32 event/wait API

Methods

CreateEvent
Creates a waitable event

CreateMutex
Creates a mutex

CreateSemaphore
Creates a Semaphore

MsgWaitForMultipleObjects
Returns when a message arrives of an event is signalled

MsgWaitForMultipleObjectsEx
Returns when a message arrives of an event is signalled

OpenEvent
Returns a handle of an existing named event object.

OpenMutex
Returns a handle of an existing named mutex object.

OpenSemaphore
Returns a handle of an existing named semaphore object.

PulseEvent
Provides a single operation that sets (to signaled) the state of the specified event object and then resets it (to nonsignaled) after releasing the appropriate number of waiting threads.

ReleaseMutex
Releases a mutex.

ReleaseSemaphore
Releases a semaphore.

ResetEvent
Resets an event

SetEvent
Sets an event

WaitForMultipleObjects
Returns when an event is signalled

WaitForMultipleObjectsEx
Returns when an event is signalled

WaitForSingleObject
Returns when an event is signalled

WaitForSingleObjectEx
Returns when an event is signalled


win32event.CreateEvent

PyHANDLE = CreateEvent(sa, bManualReset , bInitialState , objectName )

Creates a waitable event

Parameters

sa : PySECURITY_ATTRIBUTES

The security attributes, or None

bManualReset : int

flag for manual-reset event

bInitialState : int

flag for initial state

objectName : PyIUnicode

event-object name, or None

Return Value

The result is a handle to the created object


win32event.CreateMutex

PyHANDLE = CreateMutex(securityAttributes, bInitialOwner , mutexName )

Creates a mutex

Parameters

securityAttributes : object

Placeholder for furture security object, or None

bInitialOwner : int

flag for initial ownership

mutexName : PyIUnicode

mutex-object name, or None

Return Value

The result is a handle to the created object


win32event.CreateSemaphore

PyHANDLE = CreateSemaphore(initialCount, semaphoreName , bManualReset )

Creates a Semaphore

Parameters

initialCount : int

initial count

semaphoreName : PyIUnicode

semaphore-object name, or None

bManualReset : int

flag for manual reset state

Return Value

The result is a handle to the created object


win32event.MsgWaitForMultipleObjects

int = MsgWaitForMultipleObjects(handleList, bWaitAll , milliseconds , wakeMask )

Returns when a message arrives of an event is signalled

Parameters

handleList : [PyHANDLE, ...]

A sequence of handles to wait on.

bWaitAll : int

If true, waits for all handles in the list.

milliseconds : int

time-out interval in milliseconds

wakeMask : int

type of input events to wait for. One of the win32event.QS_ constants. comm Note that if bWaitAll is TRUE, the function will return when there is input in the queue, and all events are signalled. This is rarely what you want! If input is waiting, the result is win32event.WAIT_OBJECT_0+len(handles))


win32event.MsgWaitForMultipleObjectsEx

int = MsgWaitForMultipleObjectsEx(handleList, fWaitAll , milliseconds , wakeMask , waitFlags )

Returns when a message arrives of an event is signalled

Parameters

handleList : [PyHANDLE, ...]

A sequence of handles to wait on.

fWaitAll : int

wait for all or wait for one

milliseconds : int

time-out interval in milliseconds

wakeMask : int

type of input events to wait for

waitFlags : int

wait flags

Comments

This method does not exist on NT3.5x or Win95. If there is an attempt to use it on these platforms, a COM error with E_NOTIMPL will be raised.


win32event.OpenEvent

PyHANDLE = OpenEvent(desiredAccess, bInheritHandle , name )

Returns a handle of an existing named event object.

Parameters

desiredAccess : int

access flag - one of win32event::EVENT_ALL_ACCESS , win32event::EVENT_MODIFY_STATE , or (NT only) win32event::SYNCHRONIZE

bInheritHandle : int

inherit flag

name : PyUnicode

name of event to open.


win32event.OpenMutex

PyHANDLE = OpenMutex(desiredAccess, bInheritHandle , name )

Returns a handle of an existing named mutex object.

Parameters

desiredAccess : int

access flag

bInheritHandle : int

inherit flag

name : PyUnicode

name of mutex to open.


win32event.OpenSemaphore

PyHANDLE = OpenSemaphore(desiredAccess, bInheritHandle , name )

Returns a handle of an existing named semaphore object.

Parameters

desiredAccess : int

access flag

bInheritHandle : int

inherit flag

name : PyUnicode

name of semaphore to open.


win32event.PulseEvent

PulseEvent(hEvent)

Provides a single operation that sets (to signaled) the state of the specified event object and then resets it (to nonsignaled) after releasing the appropriate number of waiting threads.

Parameters

hEvent : PyHANDLE

handle of event object


win32event.ReleaseMutex

ReleaseMutex(hEvent)

Releases a mutex.

Parameters

hEvent : PyHANDLE

handle of mutex object


win32event.ReleaseSemaphore

int = ReleaseSemaphore(hEvent, lReleaseCount )

Releases a semaphore.

Parameters

hEvent : PyHANDLE

handle of the semaphore object

lReleaseCount : int

amount to add to current count

Return Value

The result is the previous count of the semaphore.


win32event.ResetEvent

ResetEvent(hEvent)

Resets an event

Parameters

hEvent : PyHANDLE

handle of event object


win32event.SetEvent

SetEvent(hEvent)

Sets an event

Parameters

hEvent : PyHANDLE

handle of event object


win32event.WaitForMultipleObjects

int = WaitForMultipleObjects(handleList, bWaitAll , milliseconds )

Returns when an event is signalled

Parameters

handleList : [PyHANDLE, ...]

A sequence of handles to wait on.

bWaitAll : int

wait flag

milliseconds : int

time-out interval in milliseconds


win32event.WaitForMultipleObjectsEx

int = WaitForMultipleObjectsEx(handleList, bWaitAll , milliseconds , bAlertable )

Returns when an event is signalled

Parameters

handleList : [PyHANDLE, ...]

A sequence of handles to wait on.

bWaitAll : int

wait flag

milliseconds : int

time-out interval in milliseconds

bAlertable : int

alertable wait flag.


win32event.WaitForSingleObject

int = WaitForSingleObject(hHandle, milliseconds )

Returns when an event is signalled

Parameters

hHandle : PyHANDLE

handle of object to wait for

milliseconds : int

time-out interval in milliseconds

Return Value

If the function succeeds, the return value indicates the event that caused the function to return. This value can be one of the following.

Value | Meaning
WAIT_ABANDONED | The specified object is a mutex object that was not released by the thread that owned the mutex object before the owning thread terminated. Ownership of the mutex object is granted to the calling thread, and the mutex is set to nonsignaled.
WAIT_OBJECT_0 | The state of the specified object is signaled.
WAIT_TIMEOUT | The time-out interval elapsed, and the object's state is nonsignaled.


win32event.WaitForSingleObjectEx

int = WaitForSingleObjectEx(hHandle, milliseconds , bAlertable )

Returns when an event is signalled

Parameters

hHandle : PyHANDLE

handle of object to wait for

milliseconds : int

time-out interval in milliseconds

bAlertable : int

alertable wait flag.

Return Value

See win32event::WaitForSingleObject for return values.


win32evtlog

Module win32evtlog

A module, encapsulating the Windows Win32 event log API.

Methods

ClearEventLog
Clears the event log

BackupEventLog
Backs up the event log

CloseEventLog
Closes the eventlog

DeregisterEventSource
Deregisters an Event Source

NotifyChangeEventLog
Lets an application receive notification when an event is written to the event log file specified by the hEventLog parameter. When the event is written to the event log file, the function causes the event object specified by the hEvent parameter to become signaled.

GetNumberOfEventLogRecords
Returns the number of event log records.

GetOldestEventLogRecord
Returns the number of event log records.

OpenEventLog
Opens an event log.

RegisterEventSource
Registers an Event Source

OpenBackupEventLog
Opens a previously saved event log.

ReadEventLog
Reads some event log records.

ReportEvent
Reports an event


win32evtlog.BackupEventLog

BackupEventLog(handle, eventLogName)

Backs up the event log

Parameters

handle : int

Handle to the event log to backup.

eventLogName : PyUnicode

The name of the event log to save to


win32evtlog.ClearEventLog

ClearEventLog(handle, eventLogName)

Clears the event log

Parameters

handle : int

Handle to the event log to clear.

eventLogName : PyUnicode

The name of the event log to save to, or None


win32evtlog.CloseEventLog

CloseEventLog(handle)

Closes the eventlog

Parameters

handle : int

Handle to the event log to close


win32evtlog.DeregisterEventSource

DeregisterEventSource(handle)

Deregisters an Event Source

Parameters

handle : int

Identifies the event log whose handle was returned by win32evtlog::RegisterEventSource


win32evtlog.GetNumberOfEventLogRecords

int = GetNumberOfEventLogRecords(handle)

Returns the number of event log records.

Parameters

handle : int

Handle to the event log to query.


win32evtlog.GetOldestEventLogRecord

int = GetOldestEventLogRecord()

Returns the number of event log records.

Return Value

The result is the absolute record number of the oldest record in the given event log.


win32evtlog.NotifyChangeEventLog

NotifyChangeEventLog(handle, handle)

Lets an application receive notification when an event is written to the event log file specified by the hEventLog parameter. When the event is written to the event log file, the function causes the event object specified by the hEvent parameter to become signaled.

Parameters

handle : int

Handle to an event log file, obtained by calling win32evtlog::OpenEventLog function. When an event is written to this log file, the event specified by hEvent becomes signaled.

handle : int

A handle to a Win32 event. This is the event that becomes signaled when an event is written to the event log file specified by the hEventLog parameter.


win32evtlog.OpenBackupEventLog

int = OpenBackupEventLog(serverName, fileName )

Opens a previously saved event log.

Parameters

serverName : PyUnicode

The server name, or None

fileName : PyUnicode

The filename to open


win32evtlog.OpenEventLog

int = OpenEventLog(serverName, sourceName )

Opens an event log.

Parameters

serverName : PyUnicode

The server name, or None

sourceName : PyUnicode

specifies the name of the source that the returned handle will reference. The source name must be a subkey of a logfile entry under the EventLog key in the registry.


win32evtlog.ReadEventLog

[object,...] = ReadEventLog(handle, flags , offset )

Reads some event log records.

Parameters

handle : int

The handle of the event log to read.

flags : int

The read flags

offset : int

The offset

Return Value

If there are no event log records available, then an empty list is returned.


win32evtlog.RegisterEventSource

int = RegisterEventSource(serverName, sourceName )

Registers an Event Source

Parameters

serverName : PyUnicode

The server name, or None

sourceName : PyUnicode

The source name


win32evtlog.ReportEvent

ReportEvent()

Reports an event


win32file

Module win32file

An interface to the win32 File API's

Methods

AreFileApisANSI
Determines whether a set of Win32 file functions is using the ANSI or OEM character set code page. This function is useful for 8-bit console input and output operations.

CopyFile
Copies a file

CopyFileW
Copies a file (NT/2000 Unicode specific version)

CreateDirectory
Creates a directory

CreateDirectoryW
Creates a directory (NT/2000 Unicode specific version)

CreateDirectoryEx
Creates a directory

CreateDirectoryExW
Creates a directory (NT/2000 Unicode specific version)

CreateFile
Creates or opens the a file or other object and returns a handle that can be used to access the object.

CreateFileW
An NT/2000 specific Unicode version of CreateFile - see win32file::CreateFile for more information.

CreateIoCompletionPort
Can associate an instance of an opened file with a newly created or an existing input/output (I/O) completion port; or it can create an I/O completion port without associating it with a file.

DefineDosDevice
Lets an application define, redefine, or delete MS-DOS device names.

DefineDosDeviceW
Lets an application define, redefine, or delete MS-DOS device names. (NT/2000 Unicode specific version)

DeleteFile
Deletes a file.

DeleteFileW
Deletes a file (NT/2000 Unicode specific version)

DeviceIoControl
Call DeviceIoControl

FindClose
Closes a handle opened with win32file::FindOpen

FindCloseChangeNotification
Closes a handle.

FindFirstChangeNotification
Creates a change notification handle and sets up initial change notification filter conditions. A wait on a notification handle succeeds when a change matching the filter conditions occurs in the specified directory or subtree.

FindNextChangeNotification
Requests that the operating system signal a change notification handle the next time it detects an appropriate change,

FindFilesW
Retrieves a list of matching filenames, using the Windows Unicode API. An interface to the API FindFirstFileW/FindNextFileW/Find close functions.

FlushFileBuffers
Clears the buffers for the specified file and causes all buffered data to be written to the file.

GetBinaryType
Determines whether a file is executable, and if so, what type of executable file it is. That last property determines which subsystem an executable file runs under.

GetDiskFreeSpace
Determines the free space on a device.

GetDiskFreeSpaceEx
Determines the free space on a device.

GetDriveType
Determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive.

GetDriveTypeW
Determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive. (NT/2000 Unicode specific version).

GetFileAttributes
Determines a files attributes.

GetFileAttributesW
Determines a files attributes (NT/2000 Unicode specific version).

GetFileTime
Determine a file access/modification times.

GetCompressedFileSize
Determines the compressed size of a file.

GetFileSize
Determines the size of a file.

AllocateReadBuffer
Allocated a buffer which can be used with an overlapped Read operation using win32file::Read

ReadFile
Reads a string from a file

WriteFile
Writes a string to a file

CloseHandle
Closes an open handle.

LockFileEx
locks a file. Wrapper for LockFileEx win32 API.

UnlockFileEx
Unlocks a file. Wrapper for UnlockFileEx win32 API.

GetQueuedCompletionStatus
Attempts to dequeue an I/O completion packet from a specified input/output completion port.

GetFileType
Determines the type of a file.

GetLogicalDrives
Returns a bitmaks of the logical drives installed.

GetOverlappedResult
Determines the result of the most recent call with an OVERLAPPED object.

LockFile
Determines the type of a file.

MoveFile
Renames an existing file or a directory (including all its children).

MoveFileW
Renames an existing file or a directory (including all its children). (NT/2000 Unicode specific version).

MoveFileEx
Renames an existing file or a directory (including all its children).

MoveFileExW
Renames an existing file or a directory (including all its children). (NT/2000 Unicode specific version).

PostQueuedCompletionStatus
lets you post an I/O completion packet to an I/O completion port. The I/O completion packet will satisfy an outstanding call to the GetQueuedCompletionStatus function.

RemoveDirectory
Removes an existing directory

SetCurrentDirectory
Sets the current directory.

SetEndOfFile
Moves the end-of-file (EOF) position for the specified file to the current position of the file pointer.

SetFileApisToANSI
Causes a set of Win32 file functions to use the ANSI character set code page. This function is useful for 8-bit console input and output operations.

SetFileApisToOEM
Causes a set of Win32 file functions to use the OEM character set code page. This function is useful for 8-bit console input and output operations.

SetFileAttributes
Changes a file's attributes.

SetFileAttributesW
Changes a file's attributes (NT/2000 Unicode specific version)

SetFilePointer
Moves the file pointer of an open file.

SetVolumeLabel
Sets a volume label for a disk drive.

UnlockFile
Determines the type of a file.

_get_osfhandle
Gets operating-system file handle associated with existing stream

_open_osfhandle
Associates a C run-time file handle with a existing operating-system file handle.

AcceptEx
Version of accept that uses Overlapped I/O

GetAcceptExSockaddrs
Parses the connection endpoints from the buffer passed into AcceptEx

WSAEventSelect
Specifies an event object to be associated with the supplied set of FD_XXXX network events.

WSASend
Winsock send() equivalent function for Overlapped I/O.

WSARecv
Winsock recv() equivalent function for Overlapped I/O.

BuildCommDCB
Fills the specified DCB structure with values specified in a device-control string. The device-control string uses the syntax of the mode command

ClearCommError
retrieves information about a communications error and reports the current status of a communications device.

EscapeCommFunction
directs a specified communications device to perform an extended function.

GetCommState
Returns a device-control block (a DCB structure) with the current control settings for a specified communications device.

SetCommState
Configures a communications device according to the specifications in a device-control block.

ClearCommBreak
Restores character transmission for a specified communications device and places the transmission line in a nonbreak state

GetCommMask
Retrieves the value of the event mask for a specified communications device.

SetCommMask
Sets the value of the event mask for a specified communications device.

GetCommModemStatus
Retrieves modem control-register values.

GetCommTimeouts
Retrieves the time-out parameters for all read and write operations on a specified communications device.

SetCommTimeouts
Sets the time-out parameters for all read and write operations on a specified communications device.

PurgeComm
Discards all characters from the output or input buffer of a specified communications resource. It can also terminate pending read or write operations on the resource.

SetCommBreak
Suspends character transmission for a specified communications device and places the transmission line in a break state until the win32file::ClearCommBreak function is called.

SetupComm
Initializes the communications parameters for a specified communications device.

TransmitCommChar
Transmits a specified character ahead of any pending data in the output buffer of the specified communications device.


win32file.AcceptEx

AcceptEx(sListening, sAccepting, buffer, ol)

Version of accept that uses Overlapped I/O

Parameters

sListening : PySocket /int

Socket that had listen() called on.

sAccepting : PySocket /int

Socket that will be used as the incoming connection.

buffer : buffer

Buffer to read incoming data and connection point information into. This buffer MUST be big enough to recieve your connection endpoints... AF_INET sockets need to be at least 64 bytes. The correct minimum of the buffer is determined by the protocol family that the listening socket is using.

ol : PyOVERLAPPED

An overlapped structure

Comments

In order to make sure the connection has been accepted, either use the hEvent in PyOVERLAPPED, GetOverlappedResult, or GetQueuedCompletionStatus.

To use this with I/O completion ports, don't forget to attach sAccepting to your completion port.

To have sAccepting inherit the properties of sListening, you need to do the following after a connection is successfully accepted:

import struct

sAccepting.setsockopt(socket.SOL_SOCKET, win32file.SO_UPDATE_ACCEPT_CONTEXT, struct.pack("I", sListening.fileno()))


win32file.AllocateReadBuffer

PyOVERLAPPEDReadBuffer = AllocateReadBuffer(bufSize)

Allocated a buffer which can be used with an overlapped Read operation using win32file::Read

Parameters

bufSize : int

The size of the buffer to allocate.


win32file.AreFileApisANSI

int = AreFileApisANSI()

Determines whether a set of Win32 file functions is using the ANSI or OEM character set code page. This function is useful for 8-bit console input and output operations.


win32file.BuildCommDCB

PyDCB = BuildCommDCB(def, dcb )

Fills the specified DCB structure with values specified in a device-control string. The device-control string uses the syntax of the mode command

Parameters

def : string

device-control string

dcb : PyDCB

The device-control block


win32file.ClearCommBreak

ClearCommBreak(handle)

Restores character transmission for a specified communications device and places the transmission line in a nonbreak state

Parameters

handle : PyHANDLE

The handle to the communications device.


win32file.ClearCommError

int, PyCOMSTAT = ClearCommError(PyHANDLE)

retrieves information about a communications error and reports the current status of a communications device.

Parameters

PyHANDLE : handle

A handle to the device.


win32file.CloseHandle

CloseHandle(handle)

Closes an open handle.

Parameters

handle : PyHANDLE/int

A previously opened handle.


win32file.CopyFile

CopyFile(from, to, bFailIfExists)

Copies a file

Parameters

from : PyUnicode

The name of the file to copy from

to : PyUnicode

The name of the file to copy to

bFailIfExists : int

Indicates if the operation should fail if the file exists.


win32file.CopyFileW

CopyFileW(from, to, bFailIfExists)

Copies a file (NT/2000 Unicode specific version)

Parameters

from : PyUnicode

The name of the file to copy from

to : PyUnicode

The name of the file to copy to

bFailIfExists : int

Indicates if the operation should fail if the file exists.


win32file.CreateDirectory

CreateDirectory(name, sa)

Creates a directory

Parameters

name : PyUnicode

The name of the directory to create

sa : PySECURITY_ATTRIBUTES

The security attributes, or None


win32file.CreateDirectoryEx

CreateDirectoryEx(templateName, newDirectory, sa)

Creates a directory

Parameters

templateName : PyUnicode

Specifies the path of the directory to use as a template when creating the new directory.

newDirectory : PyUnicode

Specifies the name of the new directory

sa : PySECURITY_ATTRIBUTES

The security attributes, or None


win32file.CreateDirectoryExW

CreateDirectoryExW(templateName, newDirectory, sa)

Creates a directory (NT/2000 Unicode specific version)

Parameters

templateName : PyUnicode

Specifies the path of the directory to use as a template when creating the new directory.

newDirectory : PyUnicode

Specifies the name of the new directory

sa : PySECURITY_ATTRIBUTES

The security attributes, or None


win32file.CreateDirectoryW

CreateDirectoryW(name, sa)

Creates a directory (NT/2000 Unicode specific version)

Parameters

name : PyUnicode

The name of the directory to create

sa : PySECURITY_ATTRIBUTES

The security attributes, or None


win32file.CreateFile

PyHANDLE = CreateFile(fileName, desiredAccess , shareMode , attributes , creationDisposition , flagsAndAttributes , hTemplateFile )

Creates or opens the a file or other object and returns a handle that can be used to access the object.

Parameters

fileName : PyUnicode

The name of the file

desiredAccess : int

access (read-write) mode Specifies the type of access to the object. An application can obtain read access, write access, read-write access, or device query access. This parameter can be any combination of the following values.

Value | Meaning
0 | Specifies device query access to the object. An application can query device attributes without accessing the device.
GENERIC_READ | Specifies read access to the object. Data can be read from the file and the file pointer can be moved. Combine with GENERIC_WRITE for read-write access.
GENERIC_WRITE | Specifies write access to the object. Data can be written to the file and the file pointer can be moved. Combine with GENERIC_READ for read-write access.

shareMode : int

Set of bit flags that specifies how the object can be shared. If dwShareMode is 0, the object cannot be shared. Subsequent open operations on the object will fail, until the handle is closed. To share the object, use a combination of one or more of the following values:

Value | Meaning
FILE_SHARE_DELETE | Windows NT: Subsequent open operations on the object will succeed only if delete access is requested.
FILE_SHARE_READ | Subsequent open operations on the object will succeed only if read access is requested.
FILE_SHARE_WRITE | Subsequent open operations on the object will succeed only if write access is requested.

attributes : PySECURITY_ATTRIBUTES

The security attributes, or None

creationDisposition : int

Specifies which action to take on files that exist, and which action to take when files do not exist. For more information about this parameter, see the Remarks section. This parameter must be one of the following values:

Value | Meaning
CREATE_NEW | Creates a new file. The function fails if the specified file already exists.
CREATE_ALWAYS | Creates a new file. If the file exists, the function overwrites the file and clears the existing attributes.
OPEN_EXISTING | Opens the file. The function fails if the file does not exist. See the Remarks section for a discussion of why you should use the OPEN_EXISTING flag if you are using the CreateFile function for devices, including the console.
OPEN_ALWAYS | Opens the file, if it exists. If the file does not exist, the function creates the file as if dwCreationDisposition were CREATE_NEW.
TRUNCATE_EXISTING | Opens the file. Once opened, the file is truncated so that its size is zero bytes. The calling process must open the file with at least GENERIC_WRITE access. The function fails if the file does not exist.

flagsAndAttributes : int

file attributes

hTemplateFile : PyHANDLE

Specifies a handle with GENERIC_READ access to a template file. The template file supplies file attributes and extended attributes for the file being created. Under Win95, this must be 0, else an exception will be raised.

Comments

The following objects can be opened:
files
pipes
mailslots
communications resources
disk devices (Windows NT only)
consoles
directories (open only)


win32file.CreateFileW

PyHANDLE = CreateFileW(fileName, desiredAccess , shareMode , attributes , creationDisposition , flagsAndAttributes , hTemplateFile )

An NT/2000 specific Unicode version of CreateFile - see win32file::CreateFile for more information.

Parameters

fileName : PyUnicode

The name of the file

desiredAccess : int

access (read-write) mode

shareMode : int

Set of bit flags that specifies how the object can be shared. If dwShareMode is 0, the object cannot be shared. Subsequent open operations on the object will fail, until the handle is closed.

attributes : PySECURITY_ATTRIBUTES

The security attributes, or None

creationDisposition : int

Specifies which action to take on files that exist, and which action to take when files do not exist. For more information about this parameter, see win32file::CreateFile

flagsAndAttributes : int

file attributes

hTemplateFile : PyHANDLE

Specifies a handle with GENERIC_READ access to a template file. The template file supplies file attributes and extended attributes for the file being created.


win32file.CreateIoCompletionPort

PyHANDLE = CreateIoCompletionPort(handle, existing , completionKey , numThreads )

Can associate an instance of an opened file with a newly created or an existing input/output (I/O) completion port; or it can create an I/O completion port without associating it with a file.

Parameters

handle : PyHANDLE

file handle to associate with the I/O completion port

existing : PyHANDLE

handle to the I/O completion port

completionKey : int

per-file completion key for I/O completion packets

numThreads : int

number of threads allowed to execute concurrently


win32file.DefineDosDevice

DefineDosDevice(flags, deviceName, targetPath)

Lets an application define, redefine, or delete MS-DOS device names.

Parameters

flags : int

flags specifying aspects of device definition

deviceName : PyUnicode

MS-DOS device name string

targetPath : PyUnicode

MS-DOS or path string for 32-bit Windows.


win32file.DefineDosDeviceW

DefineDosDeviceW(flags, deviceName, targetPath)

Lets an application define, redefine, or delete MS-DOS device names. (NT/2000 Unicode specific version)

Parameters

flags : int

flags specifying aspects of device definition

deviceName : PyUnicode

MS-DOS device name string

targetPath : PyUnicode

MS-DOS or path string for 32-bit Windows.


win32file.DeleteFile

DeleteFile(fileName)

Deletes a file.

Parameters

fileName : PyUnicode

The filename to delete


win32file.DeleteFileW

DeleteFileW(fileName)

Deletes a file (NT/2000 Unicode specific version)

Parameters

fileName : PyUnicode

The filename to delete


win32file.DeviceIoControl

int = DeviceIoControl(hFile, dwIoControlCode , data , readSize , ol )

Call DeviceIoControl

Parameters

hFile : int

Handle to the file

dwIoControlCode : int

IOControl Code to use.

data : string

The data to write.

readSize : int

Size of the buffer to create for the read.

ol=None : PyOVERLAPPED

An overlapped structure


win32file.EscapeCommFunction

EscapeCommFunction(handle)

directs a specified communications device to perform an extended function.

Parameters

handle : PyHANDLE

The handle to the communications device.

Value | Meaning
CLRDTR | Clears the DTR (data-terminal-ready) signal.
CLRRTS | Clears the RTS (request-to-send) signal.
SETDTR | Sends the DTR (data-terminal-ready) signal.
SETRTS | Sends the RTS (request-to-send) signal.
SETXOFF | Causes transmission to act as if an XOFF character has been received.
SETXON | Causes transmission to act as if an XON character has been received.
SETBREAK | Suspends character transmission and places the transmission line in a break state until the ClearCommBreak function is called (or EscapeCommFunction is called with the CLRBREAK extended function code). The SETBREAK extended function code is identical to the SetCommBreak function. Note that this extended function does not flush data that has not been transmitted.
CLRBREAK | Restores character transmission and places the transmission line in a nonbreak state. The CLRBREAK extended function code is identical to the ClearCommBreak function.


win32file.FindClose

FindClose(hFindFile)

Closes a handle opened with win32file::FindOpen

Parameters

hFindFile : int

file search handle


win32file.FindCloseChangeNotification

FindCloseChangeNotification(hChangeHandle)

Closes a handle.

Parameters

hChangeHandle : int

handle to change notification to close


win32file.FindFilesW

list = FindFilesW(fileSpec)

Retrieves a list of matching filenames, using the Windows Unicode API. An interface to the API FindFirstFileW/FindNextFileW/Find close functions.

Parameters

fileSpec : string

A string that specifies a valid directory or path and filename, which can contain wildcard characters (* and ?).

Win32 API References

FindFirstFile

FindNextFile

FindClose

Return Value

The return value is a list of tuples, in the same format as the WIN32_FIND_DATA structure:

Items

[0] int : attributes

File Attributes. A combination of the win32com.FILE_ATTRIBUTE_* flags.

[1] PyTime : createTime

File creation time.

[2] PyTime : accessTime

File access time.

[3] PyTime : writeTime

Time of last file write

[4] int : nFileSizeHigh

high order word of file size.

[5] int : nFileSizeLow

low order word of file size.

[6] int : reserved0

Reserved.

[7] int : reserved1

Reserved.

[8] Unicode : fileName

The name of the file.

[9] Unicode : alternateFilename

Alternative name of the file, expressed in 8.3 format.


win32file.FindFirstChangeNotification

int = FindFirstChangeNotification(pathName, bWatchSubtree , notifyFilter )

Creates a change notification handle and sets up initial change notification filter conditions. A wait on a notification handle succeeds when a change matching the filter conditions occurs in the specified directory or subtree.

Parameters

pathName : PyUnicode

Name of directory to watch

bWatchSubtree : int

flag for monitoring directory or directory tree

notifyFilter : int

filter conditions to watch for. See win32api::FindFirstChangeNotification for details.


win32file.FindNextChangeNotification

int = FindNextChangeNotification()

Requests that the operating system signal a change notification handle the next time it detects an appropriate change,


win32file.FlushFileBuffers

FlushFileBuffers(hFile)

Clears the buffers for the specified file and causes all buffered data to be written to the file.

Parameters

hFile : PyHANDLE

open handle to file whose buffers are to be flushed


win32file.GetAcceptExSockaddrs

(iFamily, LocalSockAddr , RemoteSockAddr ) = GetAcceptExSockaddrs(sAccepting, buffer )

Parses the connection endpoints from the buffer passed into AcceptEx

Parameters

sAccepting : PySocket /int

Socket that was passed into the sAccepting parameter of AcceptEx

buffer : PyOVERLAPPEDReadBuffer

Buffer you passed into AcceptEx


win32file.GetBinaryType

int = GetBinaryType(appName)

Determines whether a file is executable, and if so, what type of executable file it is. That last property determines which subsystem an executable file runs under.

Parameters

appName : PyUnicode

Fully qualified path of file to test


win32file.GetCommMask

int = GetCommMask(handle)

Retrieves the value of the event mask for a specified communications device.

Parameters

handle : PyHANDLE

The handle to the communications device.


win32file.GetCommModemStatus

int = GetCommModemStatus(handle)

Retrieves modem control-register values.

Parameters

handle : PyHANDLE

The handle to the communications device.


win32file.GetCommState

PyDCB = GetCommState(handle)

Returns a device-control block (a DCB structure) with the current control settings for a specified communications device.

Parameters

handle : PyHANDLE

The handle to the communications device.


win32file.GetCommTimeouts

PyCOMMTIMEOUTS = GetCommTimeouts(handle)

Retrieves the time-out parameters for all read and write operations on a specified communications device.

Parameters

handle : PyHANDLE

The handle to the communications device.


win32file.GetCompressedFileSize

PyLARGE_INTEGER = GetCompressedFileSize()

Determines the compressed size of a file.


win32file.GetDiskFreeSpace

(int, int, int, int) = GetDiskFreeSpace(rootPathName)

Determines the free space on a device.

Parameters

rootPathName : PyUnicode

address of root path

Return Value

The result is a tuple of integers representing (sectors per cluster, bytes per sector, number of free clusters, total number of clusters)


win32file.GetDiskFreeSpaceEx

long, long, long = GetDiskFreeSpaceEx(rootPathName)

Determines the free space on a device.

Parameters

rootPathName : PyUnicode

address of root path

Return Value

The result is a tuple of long integers:

Items

[0] long integer : freeBytes

The total number of free bytes on the disk that are available to the user associated with the calling thread.

[1] long integer : totalBytes

The total number of bytes on the disk that are available to the user associated with the calling thread. Windows 2000: If per-user quotas are in use, this value may be less than the total number of bytes on the disk.

[2] long integer : totalFreeBytes

The total number of free bytes on the disk.


win32file.GetDriveType

int = GetDriveType()

Determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive.

Return Value

The result is one of the DRIVE_* constants.


win32file.GetDriveTypeW

int = GetDriveTypeW()

Determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive. (NT/2000 Unicode specific version).

Return Value

The result is one of the DRIVE_* constants.


win32file.GetFileAttributes

int = GetFileAttributes(fileName)

Determines a files attributes.

Parameters

fileName : PyUnicode

Name of the file to retrieve attributes for.


win32file.GetFileAttributesW

int = GetFileAttributesW(fileName)

Determines a files attributes (NT/2000 Unicode specific version).

Parameters

fileName : PyUnicode

Name of the file to retrieve attributes for.


win32file.GetFileSize

PyLARGE_INTEGER = GetFileSize()

Determines the size of a file.


win32file.GetFileTime

int = GetFileTime(handle, creationTime , accessTime , writeTime )

Determine a file access/modification times.

Parameters

handle : PyHANDLE

Handle to the file.

creationTime : PyTime

accessTime : PyTime

writeTime : PyTime


win32file.GetFileType

int = GetFileType(hFile)

Determines the type of a file.

Parameters

hFile : PyHANDLE

The handle to the file.


win32file.GetLogicalDrives

int = GetLogicalDrives()

Returns a bitmaks of the logical drives installed.


win32file.GetOverlappedResult

int = GetOverlappedResult(hFile, overlapped , bWait )

Determines the result of the most recent call with an OVERLAPPED object.

Parameters

hFile : PyHANDLE

The handle to the pipe or file

overlapped : PyOVERLAPPED

The overlapped object to check.

bWait : int

Indicates if the function should wait for data to become available.

Comments

The result is the number of bytes transferred. The overlapped object's attributes will be changed during this call.


win32file.GetQueuedCompletionStatus

(int, int, PyOVERLAPPED) = GetQueuedCompletionStatus(hPort, timeOut )

Attempts to dequeue an I/O completion packet from a specified input/output completion port.

Parameters

hPort : PyHANDLE

The handle to the completion port.

timeOut : int

Timeout in milli-seconds.

Comments

This method never throws an API error.
The result is a tuple of (rc, numberOfBytesTransferred, completionKey, overlapped)


win32file.LockFile

LockFile(hFile, offsetLow, offsetHigh, nNumberOfBytesToLockLow, nNumberOfBytesToLockHigh)

Determines the type of a file.

Parameters

hFile : PyHANDLE

handle of file to lock

offsetLow : int

low-order word of lock region offset

offsetHigh : int

high-order word of lock region offset

nNumberOfBytesToLockLow : int

low-order word of length to lock

nNumberOfBytesToLockHigh : int

high-order word of length to lock


win32file.LockFileEx

LockFileEx(hFile, int, int, int, ol)

locks a file. Wrapper for LockFileEx win32 API.

Parameters

hFile : PyHANDLE/int

Handle to the file

int : dwFlags

Flags that specify exclusive/shared and blocking/non-blocking mode

int : nbytesLow

low-order part of number of bytes to lock

int : nbytesHigh

high-order part of number of bytes to lock

ol=None : PyOVERLAPPED

An overlapped structure


win32file.MoveFile

MoveFile(existingFileName, newFileName)

Renames an existing file or a directory (including all its children).

Parameters

existingFileName : PyUnicode

Name of the existing file

newFileName : PyUnicode

New name for the file


win32file.MoveFileEx

MoveFileEx(existingFileName, newFileName, flags)

Renames an existing file or a directory (including all its children).

Parameters

existingFileName : PyUnicode

Name of the existing file

newFileName : PyUnicode

New name for the file

flags : int

flag to determine how to move file


win32file.MoveFileExW

MoveFileExW(existingFileName, newFileName, flags)

Renames an existing file or a directory (including all its children). (NT/2000 Unicode specific version).

Parameters

existingFileName : PyUnicode

Name of the existing file

newFileName : PyUnicode

New name for the file

flags : int

flag to determine how to move file


win32file.MoveFileW

MoveFileW(existingFileName, newFileName)

Renames an existing file or a directory (including all its children). (NT/2000 Unicode specific version).

Parameters

existingFileName : PyUnicode

Name of the existing file

newFileName : PyUnicode

New name for the file


win32file.PostQueuedCompletionStatus

PyOVERLAPPED = PostQueuedCompletionStatus(handle, numberOfbytes , overlapped )

lets you post an I/O completion packet to an I/O completion port. The I/O completion packet will satisfy an outstanding call to the GetQueuedCompletionStatus function.

Parameters

handle : PyHANDLE

handle to an I/O completion port

numberOfbytes : int

value to return via GetQueuedCompletionStatus' first result

overlapped : PyOVERLAPPED

value to return via GetQueuedCompletionStatus' third result


win32file.PurgeComm

PurgeComm(handle, action)

Discards all characters from the output or input buffer of a specified communications resource. It can also terminate pending read or write operations on the resource.

Parameters

handle : PyHANDLE

The handle to the communications device.

action : int

The action to perform. This parameter can be one or more of the following values.

Value | Meaning
PURGE_TXABORT | Terminates all outstanding overlapped write operations and returns immediately, even if the write operations have not been completed.
PURGE_RXABORT | Terminates all outstanding overlapped read operations and returns immediately, even if the read operations have not been completed.
PURGE_TXCLEAR | Clears the output buffer (if the device driver has one).
PURGE_RXCLEAR | Clears the input buffer (if the device driver has one).


win32file.ReadFile

(int, string) = ReadFile(hFile, buffer/bufSize , ol )

Reads a string from a file

Parameters

hFile : PyHANDLE/int

Handle to the file

buffer/bufSize : PyOVERLAPPEDReadBuffer/int

Size of the buffer to create for the read. If a multi-threaded overlapped operation is performed, a buffer object can be passed. If a buffer object is passed, the result is the buffer itself.

ol=None : PyOVERLAPPED

An overlapped structure

Comments

in a multi-threaded overlapped environment, it is likely to be necessary to pre-allocate the read buffer using the win32file::AllocateReadBuffer method, otherwise the I/O operation may complete before you can assign to the resulting buffer.

Return Value

The result is a tuple of (hr, string/PyOVERLAPPEDReadBuffer), where hr may be 0, ERROR_MORE_DATA or ERROR_IO_PENDING. If the overlapped param is not None, then the result is a PyOVERLAPPEDReadBuffer. Once the overlapped IO operation has completed, you can convert this to a string (str(object))to obtain the data. While the operation is in progress, you can use the slice operations (object[:end]) to obtain the data read so far. You must use the OVERLAPPED API functions to determine how much of the data is valid.


win32file.RemoveDirectory

RemoveDirectory(lpPathName)

Removes an existing directory

Parameters

lpPathName : PyUnicode

Name of the path to remove.


win32file.SetCommBreak

SetCommBreak(handle)

Suspends character transmission for a specified communications device and places the transmission line in a break state until the win32file::ClearCommBreak function is called.

Parameters

handle : PyHANDLE

The handle to the communications device.


win32file.SetCommMask

int = SetCommMask(handle, val )

Sets the value of the event mask for a specified communications device.

Parameters

handle : PyHANDLE

The handle to the communications device.

val : int

The new mask value.


win32file.SetCommState

SetCommState(handle, dcb)

Configures a communications device according to the specifications in a device-control block.

Parameters

handle : PyHANDLE

The handle to the communications device.

dcb : PyDCB

The control settings.


win32file.SetCommTimeouts

int = SetCommTimeouts(handle, val )

Sets the time-out parameters for all read and write operations on a specified communications device.

Parameters

handle : PyHANDLE

The handle to the communications device.

val : PyCOMMTIMEOUTS

The new time-out parameters.


win32file.SetCurrentDirectory

SetCurrentDirectory(lpPathName)

Sets the current directory.

Parameters

lpPathName : PyUnicode

Name of the path to set current.


win32file.SetEndOfFile

SetEndOfFile(hFile)

Moves the end-of-file (EOF) position for the specified file to the current position of the file pointer.

Parameters

hFile : PyHANDLE

handle of file whose EOF is to be set


win32file.SetFileApisToANSI

SetFileApisToANSI()

Causes a set of Win32 file functions to use the ANSI character set code page. This function is useful for 8-bit console input and output operations.


win32file.SetFileApisToOEM

SetFileApisToOEM()

Causes a set of Win32 file functions to use the OEM character set code page. This function is useful for 8-bit console input and output operations.


win32file.SetFileAttributes

SetFileAttributes(filename, newAttributes)

Changes a file's attributes.

Parameters

filename : PyUnicode

filename

newAttributes : int

attributes to set


win32file.SetFileAttributesW

SetFileAttributesW(filename, newAttributes)

Changes a file's attributes (NT/2000 Unicode specific version)

Parameters

filename : PyUnicode

filename

newAttributes : int

attributes to set


win32file.SetFilePointer

SetFilePointer(handle, offset, moveMethod)

Moves the file pointer of an open file.

Parameters

handle : PyHANDLE

The file to perform the operation on.

offset : Py_LARGEINTEGER

Offset to move the file pointer.

moveMethod : int

Starting point for the file pointer move. This parameter can be one of the following values.

Value | Meaning
FILE_BEGIN | The starting point is zero or the beginning of the file.
FILE_CURRENT | The starting point is the current value of the file pointer.
FILE_END | The starting point is the current end-of-file position.


win32file.SetVolumeLabel

SetVolumeLabel(rootPathName, volumeName)

Sets a volume label for a disk drive.

Parameters

rootPathName : PyUnicode

address of name of root directory for volume

volumeName : PyUnicode

name for the volume


win32file.SetupComm

SetupComm(handle, dwInQueue, dwOutQueue)

Initializes the communications parameters for a specified communications device.

Parameters

handle : PyHANDLE

The handle to the communications device.

dwInQueue : int

Specifies the recommended size, in bytes, of the device's internal input buffer.

dwOutQueue : int

Specifies the recommended size, in bytes, of the device's internal output buffer.


win32file.TransmitCommChar

TransmitCommChar(handle, cChar, handle, overlapped)

Transmits a specified character ahead of any pending data in the output buffer of the specified communications device.

Parameters

handle : PyHANDLE

The handle to the communications device.

cChar : char

The character to transmit.

handle : PyHANDLE

The handle to the communications device.

overlapped : PyOVERLAPPED

This structure is required if hFile was opened with FILE_FLAG_OVERLAPPED.
If hFile was opened with FILE_FLAG_OVERLAPPED, the lpOverlapped parameter must not be NULL. It must point to a valid OVERLAPPED structure. If hFile was opened with FILE_FLAG_OVERLAPPED and lpOverlapped is NULL, the function can incorrectly report that the operation is complete.
If hFile was opened with FILE_FLAG_OVERLAPPED and lpOverlapped is not NULL, WaitCommEvent is performed as an overlapped operation. In this case, the OVERLAPPED structure must contain a handle to a manual-reset event object (created by using the CreateEvent function).
If hFile was not opened with FILE_FLAG_OVERLAPPED, WaitCommEvent does not return until one of the specified events or an error occurs.

Comments

The TransmitCommChar function is useful for sending an interrupt character (such as a CTRL+C) to a host system.
If the device is not transmitting, TransmitCommChar cannot be called repeatedly. Once TransmitCommChar places a character in the output buffer, the character must be transmitted before the function can be called again. If the previous character has not yet been sent, TransmitCommChar returns an error.


win32file.UnlockFile

UnlockFile(hFile, offsetLow, offsetHigh, nNumberOfBytesToUnlockLow, nNumberOfBytesToUnlockHigh)

Determines the type of a file.

Parameters

hFile : PyHANDLE

handle of file to unlock

offsetLow : int

low-order word of lock region offset

offsetHigh : int

high-order word of lock region offset

nNumberOfBytesToUnlockLow : int

low-order word of length to unlock

nNumberOfBytesToUnlockHigh : int

high-order word of length to unlock


win32file.UnlockFileEx

UnlockFileEx(hFile, int, int, ol)

Unlocks a file. Wrapper for UnlockFileEx win32 API.

Parameters

hFile : PyHANDLE/int

Handle to the file

int : nbytesLow

low-order part of number of bytes to lock

int : nbytesLow

high-order part of number of bytes to lock

ol=None : PyOVERLAPPED

An overlapped structure


win32file.WSAEventSelect

WSAEventSelect(socket, hEvent, networkEvents)

Specifies an event object to be associated with the supplied set of FD_XXXX network events.

Parameters

socket : PySocket

socket to attach to the event

hEvent : PyHandle

Event handle for the socket to become attached to.

networkEvents : int

A bitmask of network events that will cause hEvent to be signaled. e.g. (FD_CLOSE | FD_READ)


win32file.WSARecv

(rc, cBytesRecvd) = WSARecv(s, buffer , ol , dwFlags )

Winsock recv() equivalent function for Overlapped I/O.

Parameters

s : PySocket /int

Socket to send data on.

buffer : buffer

Buffer to send data from.

ol : PyOVERLAPPED

An overlapped structure

dwFlags : int

Optional reception flags.


win32file.WSASend

(rc, cBytesSent) = WSASend(s, buffer , ol , dwFlags )

Winsock send() equivalent function for Overlapped I/O.

Parameters

s : PySocket /int

Socket to send data on.

buffer : string/buffer

Buffer to send data from.

ol : PyOVERLAPPED

An overlapped structure

dwFlags : int

Optional send flags.


win32file.WriteFile

int, int = WriteFile(hFile, data , ol )

Writes a string to a file

Parameters

hFile : PyHANDLE/int

Handle to the file

data : string/PyOVERLAPPEDReadBuffer

The data to write.

ol=None : PyOVERLAPPED

An overlapped structure

Comments

If you use an overlapped buffer, then it is your responsibility to ensure the string object passed remains valid until the operation comletes. If Python garbage collection reclaims the buffer before the win32 API has finished with it, the results are unpredictable.

Return Value

The result is a tuple of (errCode, nBytesWritten). If errCode is not zero, it will be ERROR_IO_PENDING (ie, it is an overlapped request).
Any other error will raise an exception.


win32file._get_osfhandle

long = _get_osfhandle()

Gets operating-system file handle associated with existing stream


win32file._open_osfhandle

int = _open_osfhandle()

Associates a C run-time file handle with a existing operating-system file handle.


win32gui

Module win32gui

A module which provides an interface to the native win32 GUI

Methods

EnumFontFamilies
Enumerates the available font families.

LOGFONT
Creates a LOGFONT object.

GetObject

PyMakeBuffer
Returns a buffer object from addr,len or just len

PyGetString
Returns a string object from an address (null terminated)

PySetString
Copies a string to an address (null terminated)

PyGetArraySignedLong
Returns a signed long from an array object at specified index

PyGetBufferAddressAndLen
Returns a buffer object address and len

SetWindowLong

CallWindowProc

SendMessage
Sends a message to the window.

SendMessageTimeout
Sends a message to the window.

PostMessage

PostThreadMessage

DefWindowProc

EnumWindows
Enumerates all top-level windows on the screen by passing the handle to each window, in turn, to an application-defined callback function. EnumWindows continues until the last top-level window is enumerated or the callback function returns FALSE

EnumChildWindows
Enumerates the child windows that belong to the specified parent window by passing the handle to each child window, in turn, to an application-defined callback function. EnumChildWindows continues until the last child window is enumerated or the callback function returns FALSE.

DialogBox
Creates a modal dialog box.

DialogBoxParam
See win32gui::DialogBox

DialogBoxIndirect
Creates a modal dialog box from a template, see win32ui::CreateDialogIndirect

DialogBoxIndirectParam
See win32gui::DialogBoxIndirect

CreateDialogIndirect
Creates a modeless dialog box from a template, see win32ui::CreateDialogIndirect

DialogBoxIndirectParam
See win32gui::CreateDialogIndirect

EndDialog
Ends a dialog box.

GetDlgItem
Retrieves the handle to a control in the specified dialog box.

SetDlgItemText
Sets the text for a window or control

SetWindowText
Sets the window text.

GetWindowText
Get the window text.

InitCommonControls
Initializes the common controls.

LoadCursor
Loads a cursor.

SetCursor

LoadMenu
Loads a menu

DestroyMenu
Destroys a previously loaded menu.

SetMenu
Sets the window for the specified window.

LoadIcon
Loads an icon

LoadImage
Loads a bitmap, cursor or icon

ImageList_Create
Create an image list

ImageList_Destroy
Destroy an imagelist

ImageList_Draw
Draw an image on an HDC

ImageList_GetIcon
Extract an icon from an imagelist

ImageList_GetImageCount
Return count of images in imagelist

ImageList_LoadImage
Loads bitmaps, cursors or icons, creates imagelist

ImageList_Remove
Remove an image from an imagelist

ImageList_Replace
Replace an image in an imagelist with a bitmap image

ImageList_ReplaceIcon
Replace an image in an imagelist with an icon image

ImageList_SetBkColor
Set the background color for the imagelist

MessageBox
Displays a message box

MessageBeep
Plays a waveform sound.

CreateWindow
Creates a new window.

DestroyWindow

EnableWindow

FindWindow
Retrieves a handle to the top-level window whose class name and window name match the specified strings.

FindWindowEx
Retrieves a handle to the top-level window whose class name and window name match the specified strings.

HideCaret

SetCaretPos

ShowCaret

ShowWindow

IsWindowVisible
Indicates if the window has the WS_VISIBLE style.

SetFocus
Sets focus to the specified window.

UpdateWindow

BringWindowToTop

SetActiveWindow

GetActiveWindow

SetForegroundWindow

GetForegroundWindow

GetClientRect

GetDC
Gets the device context for the window.

GetWindowRect

GetStockObject

PostQuitMessage

WaitMessage
Waits for a message

SetWindowPos

RegisterClass
Registers a window class.

UnregisterClass

PumpMessages
Runs a message loop until a WM_QUIT message is received.

PumpWaitingMessages
Pumps all waiting messages for the current thread.

Shell_NotifyIcon
Adds, removes or modifies a taskbar icon,

GetSystemMenu

DrawMenuBar

MoveWindow

CloseWindow

DeleteMenu

RemoveMenu

CreateMenu

CreatePopupMenu

TrackPopupMenu
Display popup shortcut menu

CommDlgExtendedError

ExtractIcon

DestroyIcon

ScreenToClient
Convert screen coordinates to client coords

ClientToScreen
Convert client coordinates to screen coords

GetOpenFileName
Creates an Open dialog box that lets the user specify the drive, directory, and the name of a file or set of files to open.

CreateWindowEx
Creates a new window with Extended Style.

GetParent
Retrieves a handle to the specified child window's parent window.

SetParent
changes the parent window of the specified child window.

GetCursorPos
retrieves the cursor's position, in screen coordinates.

GetDesktopWindow
returns the desktop window

GetWindow
returns a window that has the specified relationship (Z order or owner) to the specified window.

GetWindowDC
returns the device context (DC) for the entire window, including title bar, menus, and scroll bars.

IsIconic
determines whether the specified window is minimized (iconic).

IsWindow
determines whether the specified window handle identifies an existing window.

ReleaseCapture
Releases the moust capture for a window.

GetCapture
Returns the window with the mouse capture.

SetCapture
Captures the mouse for the specified window.

ReleaseDC
Releases a device context.

CreateCaret

DestroyCaret

ScrollWindowEx
scrolls the content of the specified window's client area.

SetScrollInfo
Sets information about a scroll-bar

GetScrollInfo
Returns information about a scroll bar


win32gui.BringWindowToTop

BringWindowToTop(hwnd)

Parameters

hwnd : int

The handle to the window


win32gui.CallWindowProc

int = CallWindowProc()


win32gui.ClientToScreen

ClientToScreen()

Convert client coordinates to screen coords


win32gui.CloseWindow

CloseWindow()


win32gui.CommDlgExtendedError

int = CommDlgExtendedError()


win32gui.CreateCaret

CreateCaret(hWnd, hBitmap, nWidth, nHeight)

Parameters

hWnd : int

handle to owner window

hBitmap : int

handle to bitmap for caret shape

nWidth : int

caret width

nHeight : int

caret height


win32gui.CreateDialogIndirect

int = CreateDialogIndirect()

Creates a modeless dialog box from a template, see win32ui::CreateDialogIndirect


win32gui.CreateMenu

int = CreateMenu()

Return Value

The result is a HMENU to the new menu.


win32gui.CreatePopupMenu

int = CreatePopupMenu()

Return Value

The result is a HMENU to the new menu.


win32gui.CreateWindow

int = CreateWindow(className, windowTitle , style , x , y , width , height , parent , menu , hinstance , reserved )

Creates a new window.

Parameters

className : int/string

windowTitle : string

style : int

The style for the window.

x : int

y : int

width : int

height : int

parent : int

Handle to the parent window.

menu : int

Handle to the menu to use for this window.

hinstance : int

reserved : None

Must be None


win32gui.CreateWindowEx

int = CreateWindowEx(dwExStyle, className , windowTitle , style , x , y , width , height , parent , menu , hinstance , reserved )

Creates a new window with Extended Style.

Parameters

dwExStyle : int

extended window style

className : int/string

windowTitle : string

style : int

The style for the window.

x : int

y : int

width : int

height : int

parent : int

Handle to the parent window.

menu : int

Handle to the menu to use for this window.

hinstance : int

reserved : None

Must be None


win32gui.DefWindowProc

int = DefWindowProc(hwnd, message , wparam , lparam )

Parameters

hwnd : int

The handle to the Window

message : int

The ID of the message to send

wparam : int

An integer whose value depends on the message

lparam : int

An integer whose value depends on the message


win32gui.DeleteMenu

DeleteMenu(hmenu, position, flags)

Parameters

hmenu : int

The handle to the menu

position : int

The position to delete.

flags : int


win32gui.DestroyCaret

DestroyCaret()


win32gui.DestroyIcon

DestroyIcon(hicon)

Parameters

hicon : int

The icon to destroy.


win32gui.DestroyMenu

DestroyMenu()

Destroys a previously loaded menu.


win32gui.DestroyWindow

DestroyWindow(hwnd)

Parameters

hwnd : int

The handle to the window


win32gui.DialogBox

int = DialogBox()

Creates a modal dialog box.


win32gui.DialogBoxIndirect

int = DialogBoxIndirect()

Creates a modal dialog box from a template, see win32ui::CreateDialogIndirect


win32gui.DialogBoxIndirectParam

int = DialogBoxIndirectParam()

See win32gui::DialogBoxIndirect


win32gui.DialogBoxIndirectParam

int = DialogBoxIndirectParam()

See win32gui::CreateDialogIndirect


win32gui.DialogBoxParam

int = DialogBoxParam()

See win32gui::DialogBox


win32gui.DrawMenuBar

DrawMenuBar(hwnd)

Parameters

hwnd : int

The handle to the window


win32gui.EnableWindow

int = EnableWindow()


win32gui.EndDialog

EndDialog()

Ends a dialog box.


win32gui.EnumChildWindows

EnumChildWindows(hwnd, callback, extra)

Enumerates the child windows that belong to the specified parent window by passing the handle to each child window, in turn, to an application-defined callback function. EnumChildWindows continues until the last child window is enumerated or the callback function returns FALSE.

Parameters

hwnd : int

The handle to the window to enumerate.

callback : object

A Python function to be used as the callback.

extra : object

Any python object - this is passed to the callback function as the second param (first is the hwnd).


win32gui.EnumFontFamilies

int = EnumFontFamilies(hdc, family , proc , extra )

Enumerates the available font families.

Parameters

hdc : int

family : string/PyUnicode

proc : function

The Python function called with each font family. This function is called with 4 arguments.

extra : object

An extra param passed to the enum procedure.


win32gui.EnumWindows

EnumWindows(callback, extra)

Enumerates all top-level windows on the screen by passing the handle to each window, in turn, to an application-defined callback function. EnumWindows continues until the last top-level window is enumerated or the callback function returns FALSE

Parameters

callback : object

A Python function to be used as the callback.

extra : object

Any python object - this is passed to the callback function as the second param (first is the hwnd).


win32gui.ExtractIcon

int = ExtractIcon(hinstance, moduleName , index )

Parameters

hinstance : int

moduleName : string/PyUnicode

index : int

Comments

You must destroy the icon handle returned by calling the win32gui::DestroyIcon function.

Return Value

The result is a HICON.


win32gui.FindWindow

int = FindWindow(className, WindowName )

Retrieves a handle to the top-level window whose class name and window name match the specified strings.

Parameters

className : int/string

WindowName : string


win32gui.FindWindowEx

int = FindWindowEx(hwnd, childAfter , className , WindowName )

Retrieves a handle to the top-level window whose class name and window name match the specified strings.

Parameters

hwnd : int

childAfter : int

className : int/string

WindowName : string


win32gui.GetActiveWindow

HWND = GetActiveWindow()


win32gui.GetCapture

int = GetCapture()

Returns the window with the mouse capture.


win32gui.GetClientRect

(left, top, right, bottom) = GetClientRect(hwnd)

Parameters

hwnd : int

The handle to the window


win32gui.GetCursorPos

GetCursorPos(point)

retrieves the cursor's position, in screen coordinates.

Parameters

point : int, int

address of structure for cursor position


win32gui.GetDC

HDC = GetDC(hwnd)

Gets the device context for the window.

Parameters

hwnd : int

The handle to the window


win32gui.GetDesktopWindow

int = GetDesktopWindow()

returns the desktop window


win32gui.GetDlgItem

HWND = GetDlgItem()

Retrieves the handle to a control in the specified dialog box.


win32gui.GetForegroundWindow

HWND = GetForegroundWindow()


win32gui.GetObject

object = GetObject(handle)

Parameters

handle : int

Handle to the object.

Comments

The result depends on the type of the handle. For example, if the handle identifies a Font, a LOGFONT object is returned.


win32gui.GetOpenFileName

int = GetOpenFileName()

Creates an Open dialog box that lets the user specify the drive, directory, and the name of a file or set of files to open.

Return Value

If the user presses OK, the function returns TRUE. Otherwise, use CommDlgExtendedError for error details.


win32gui.GetParent

int = GetParent(child)

Retrieves a handle to the specified child window's parent window.

Parameters

child : int

handle to child window


win32gui.GetScrollInfo

PySCROLLINFO = GetScrollInfo(nBar, mask )

Returns information about a scroll bar

Parameters

nBar : int

The scroll bar to examine. Can be one of win32con.SB_BOTH, win32con.SB_VERT or win32con.SB_HORZ

mask=SIF_ALL : int

The mask for attributes to retrieve.


win32gui.GetStockObject

int = GetStockObject()


win32gui.GetSystemMenu

int = GetSystemMenu(hwnd, bRevert )

Parameters

hwnd : int

The handle to the window

bRevert : int

Return Value

The result is a HMENU to the menu.


win32gui.GetWindow

int = GetWindow(hWnd, uCmd )

returns a window that has the specified relationship (Z order or owner) to the specified window.

Parameters

hWnd : int

handle to original window

uCmd : int

relationship flag


win32gui.GetWindowDC

int = GetWindowDC(hWnd)

returns the device context (DC) for the entire window, including title bar, menus, and scroll bars.

Parameters

hWnd : int

handle of window


win32gui.GetWindowRect

(left, top, right, bottom) = GetWindowRect(hwnd)

Parameters

hwnd : int

The handle to the window


win32gui.GetWindowText

string = GetWindowText(hwnd)

Get the window text.

Parameters

hwnd : int

The handle to the window


win32gui.HideCaret

HideCaret()


win32gui.ImageList_Create

HIMAGELIST = ImageList_Create()

Create an image list


win32gui.ImageList_Destroy

BOOL = ImageList_Destroy()

Destroy an imagelist


win32gui.ImageList_Draw

BOOL = ImageList_Draw()

Draw an image on an HDC


win32gui.ImageList_GetIcon

HICON = ImageList_GetIcon()

Extract an icon from an imagelist


win32gui.ImageList_GetImageCount

int = ImageList_GetImageCount()

Return count of images in imagelist


win32gui.ImageList_LoadImage

HANDLE = ImageList_LoadImage()

Loads bitmaps, cursors or icons, creates imagelist


win32gui.ImageList_Remove

BOOL = ImageList_Remove()

Remove an image from an imagelist


win32gui.ImageList_Replace

BOOL = ImageList_Replace()

Replace an image in an imagelist with a bitmap image


win32gui.ImageList_ReplaceIcon

BOOL = ImageList_ReplaceIcon()

Replace an image in an imagelist with an icon image


win32gui.ImageList_SetBkColor

COLORREF = ImageList_SetBkColor()

Set the background color for the imagelist


win32gui.InitCommonControls

InitCommonControls()

Initializes the common controls.


win32gui.IsIconic

IsIconic(hWnd)

determines whether the specified window is minimized (iconic).

Parameters

hWnd : int

handle to window


win32gui.IsWindow

IsWindow(hWnd)

determines whether the specified window handle identifies an existing window.

Parameters

hWnd : int

handle to window


win32gui.IsWindowVisible

int = IsWindowVisible(hwnd)

Indicates if the window has the WS_VISIBLE style.

Parameters

hwnd : int

The handle to the window


win32gui.LOGFONT

PyLOGFONT = LOGFONT()

Creates a LOGFONT object.


win32gui.LoadCursor

HCURSOR = LoadCursor(hinstance, resid )

Loads a cursor.

Parameters

hinstance : int

The module to load from

resid : int

The resource ID


win32gui.LoadIcon

HCURSOR = LoadIcon()

Loads an icon


win32gui.LoadImage

HANDLE = LoadImage()

Loads a bitmap, cursor or icon


win32gui.LoadMenu

HMENU = LoadMenu()

Loads a menu


win32gui.MessageBeep

MessageBeep(type)

Plays a waveform sound.

Parameters

type : int

The type of the beep


win32gui.MessageBox

int = MessageBox(parent, text , caption , flags )

Displays a message box

Parameters

parent : int

The parent window

text : string/PyUnicode

The text for the message box

caption : string/PyUnicode

The caption for the message box

flags : int


win32gui.MoveWindow

MoveWindow(hwnd, x, y, width, height, bRepaint)

Parameters

hwnd : int

The handle to the window

x : int

y : int

width : int

height : int

bRepaint : int


win32gui.PostMessage

PostMessage(hwnd, message, wparam, lparam)

Parameters

hwnd : int

The handle to the Window

message : int

The ID of the message to post

wparam : int

An integer whose value depends on the message

lparam : int

An integer whose value depends on the message


win32gui.PostQuitMessage

PostQuitMessage(rc)

Parameters

rc : int


win32gui.PostThreadMessage

PostThreadMessage(threadId, message, wparam, lparam)

Parameters

threadId : int

The ID of the thread to post the message to.

message : int

The ID of the message to post

wparam : int

An integer whose value depends on the message

lparam : int

An integer whose value depends on the message


win32gui.PumpMessages

PumpMessages()

Runs a message loop until a WM_QUIT message is received.

See Also

win32gui::PumpWaitingMessages

Return Value

Returns exit code from PostQuitMessage when a WM_QUIT message is received


win32gui.PumpWaitingMessages

int = PumpWaitingMessages()

Pumps all waiting messages for the current thread.

See Also

win32gui::PumpMessages

Win32 API References

PeekMessage and DispatchMessage

Return Value

Returns non-zero (exit code from PostQuitMessage) if a WM_QUIT message was received, else 0


win32gui.PyGetArraySignedLong

object = PyGetArraySignedLong(array, index )

Returns a signed long from an array object at specified index

Parameters

array : array

array object to use

index : int

index of offset


win32gui.PyGetBufferAddressAndLen

object = PyGetBufferAddressAndLen(obj)

Returns a buffer object address and len

Parameters

obj : int

the buffer object


win32gui.PyGetString

object = PyGetString(addr)

Returns a string object from an address (null terminated)

Parameters

addr : int

Address of the memory to reference (must be null terminated)


win32gui.PyMakeBuffer

object = PyMakeBuffer(len, addr )

Returns a buffer object from addr,len or just len

Parameters

len : int

length of the buffer object

addr : int

Address of the memory to reference


win32gui.PySetString

object = PySetString(addr, String , maxLen )

Copies a string to an address (null terminated)

Parameters

addr : int

Address of the memory to reference

String : str

The string to copy

maxLen : int

Maximum number of chars to copy (optional)


win32gui.RegisterClass

int = RegisterClass(wndClass)

Registers a window class.

Parameters

wndClass : PyWNDCLASS

An object describing the window class.


win32gui.ReleaseCapture

ReleaseCapture()

Releases the moust capture for a window.


win32gui.ReleaseDC

int = ReleaseDC(hWnd, hDC , uiAction , uiParam , pvParam , fWinIni )

Releases a device context.

Parameters

hWnd : int

handle to window

hDC : int

handle to device context

uiAction : int

system parameter to query or set

uiParam : int

depends on action to be taken

pvParam : int

depends on action to be taken

fWinIni : int

user profile update flag


win32gui.RemoveMenu

RemoveMenu(hmenu, position, flags)

Parameters

hmenu : int

The handle to the menu

position : int

The position to delete.

flags : int


win32gui.ScreenToClient

ScreenToClient()

Convert screen coordinates to client coords


win32gui.ScrollWindowEx

int = ScrollWindowEx(hWnd, dx , dy , prcScroll , prcClip , hrgnUpdate , prcUpdate , flags )

scrolls the content of the specified window's client area.

Parameters

hWnd : int

handle to window to scroll

dx : int

amount of horizontal scrolling

dy : int

amount of vertical scrolling

prcScroll : int

address of structure with scroll rectangle

prcClip : int

address of structure with clip rectangle

hrgnUpdate : int

handle to update region

prcUpdate : int

address of structure for update rectangle

flags : int

scrolling flags


win32gui.SendMessage

int = SendMessage(hwnd, message , wparam , lparam )

Sends a message to the window.

Parameters

hwnd : int

The handle to the Window

message : int

The ID of the message to post

wparam=0 : int

An integer whose value depends on the message

lparam=0 : int

An integer whose value depends on the message


win32gui.SendMessageTimeout

int,int = SendMessageTimeout(hwnd, message , wparam , lparam , flags , timeout )

Sends a message to the window.

Parameters

hwnd : int

The handle to the Window

message : int

The ID of the message to post

wparam : int

An integer whose value depends on the message

lparam : int

An integer whose value depends on the message

flags : int

Send options

timeout : int

Timeout duration in milliseconds.

Return Value

The result is the result of the SendMessageTimeout call, plus the last 'result' param. If the timeout period expires, a pywintypes.error exception will be thrown, with zero as the error code. See the Microsoft documentation for more information.


win32gui.SetActiveWindow

HWND = SetActiveWindow(hwnd)

Parameters

hwnd : int

The handle to the window


win32gui.SetCapture

SetCapture()

Captures the mouse for the specified window.


win32gui.SetCaretPos

SetCaretPos(x, y)

Parameters

x : int

horizontal position

y : int

vertical position


win32gui.SetCursor

HCURSOR = SetCursor(hcursor)

Parameters

hcursor : int


win32gui.SetDlgItemText

HWND = SetDlgItemText()

Sets the text for a window or control


win32gui.SetFocus

SetFocus(hwnd)

Sets focus to the specified window.

Parameters

hwnd : int

The handle to the window


win32gui.SetForegroundWindow

HWND = SetForegroundWindow(hwnd)

Parameters

hwnd : int

The handle to the window


win32gui.SetMenu

SetMenu()

Sets the window for the specified window.


win32gui.SetParent

int = SetParent(child, child )

changes the parent window of the specified child window.

Parameters

child : int

handle to window whose parent is changing

child : int

handle to new parent window


win32gui.SetScrollInfo

SetScrollInfo(hwnd, nBar, scollInfo, bRedraw)

Sets information about a scroll-bar

Parameters

hwnd : int

The handle to the window.

nBar : int

Identifies the bar.

scollInfo : PySCROLLINFO

Scollbar info.

bRedraw=1 : int

Should the bar be redrawn?


win32gui.SetWindowLong

int = SetWindowLong(hwnd, index , value )

Parameters

hwnd : int

The handle to the window

index : int

The index of the item to set.

value : object

The value to set.

Comments

If index is GWL_WNDPROC, then the value parameter must be a callable object (or a dictionary) to use as the new window procedure.


win32gui.SetWindowPos

int = SetWindowPos()


win32gui.SetWindowText

SetWindowText()

Sets the window text.


win32gui.Shell_NotifyIcon

Shell_NotifyIcon()

Adds, removes or modifies a taskbar icon,


win32gui.ShowCaret

ShowCaret()


win32gui.ShowWindow

int = ShowWindow(hwnd, cmdShow )

Parameters

hwnd : int

The handle to the window

cmdShow : int


win32gui.TrackPopupMenu

int = TrackPopupMenu(hmenu, flags , x , y , reserved , hwnd , prcRect )

Display popup shortcut menu

Parameters

hmenu : int

The handle to the menu

flags : uint

flags

x : int

x pos

y : int

y pos

reserved : int

reserved

hwnd : hwnd

owner window

prcRect : REC

Pointer to rec (can be None)


win32gui.UnregisterClass

UnregisterClass(atom, hinst)

Parameters

atom : int

The atom identifying the class previously registered.

hinst : int

The handle to the instance unregistering the class.


win32gui.UpdateWindow

UpdateWindow(hwnd)

Parameters

hwnd : int

The handle to the window


win32gui.WaitMessage

WaitMessage()

Waits for a message


win32help

Module win32help

A module, encapsulating the Win32 help API's.

Methods

WinHelp
Invokes the Windows Help system.

HH_AKLINK
Create and returns an HH_AKLINK structure

HH_FTS_QUERY
Create and returns an HH_FTS_QUERY structure

HH_POPUP
Create and returns an HH_POPUP structure

HH_WINTYPE
Create and returns an HH_WINTYPE structure

NMHDR
Create and returns an NMHDR structure

HHN_NOTIFY
Create and returns an HHN_NOTIFY structure

HHNTRACK
Create and returns an HHNTRACK structure

HtmlHelp
Invokes the Windows HTML Help system.


win32help.HHNTRACK

PyHHNTRACK = HHNTRACK()

Creates a new HHNTRACK object.


win32help.HHN_NOTIFY

PyHHN_NOTIFY = HHN_NOTIFY()

Creates a new HHN_NOTIFY object.


win32help.HH_AKLINK

PyHH_AKLINK = HH_AKLINK()

Creates a new HH_AKLINK object.


win32help.HH_FTS_QUERY

PyHH_FTS_QUERY = HH_FTS_QUERY()

Creates a new HH_FTS_QUERY object.


win32help.HH_POPUP

PyHH_POPUP = HH_POPUP()

Creates a new HH_POPUP object.


win32help.HH_WINTYPE

PyHH_WINTYPE = HH_WINTYPE()

Creates a new HH_WINTYPE object.


win32help.HtmlHelp

int = HtmlHelp(hwnd, file , cmd , data )

Invokes the Windows Html Help system.

Parameters

hwnd : int

The handle of the window requesting help.

file : string/None

The name of the help file, or None.

cmd : int

The type of help. Valid values are:

HH_ALINK_LOOKUP : Looks up one or more Associative link (ALink) names in a compiled help (.chm) file.
The ALink names to search for, and the action to be taken if no matches are found, are specified in the win32help::HH_AKLINK structure.

file : Specifies a compiled help (.chm) file, or a specific topic within a compiled help file.
data : Specifies NULL or a pointer to a topic within a compiled help file.

HH_CLOSE_ALL : Closes all windows opened directly or indirectly by the calling program. The args are not checked for type, values are set as they "Must" be.

hwnd : Must be None.
file : Must be None.
data : Must be zero.

HH_DISPLAY_INDEX : Selects the Index tab in the Navigation pane of the HTML Help Viewer and searches for the keyword specified in the data parameter.

file : Specifies a compiled help (.chm) file, or a specific topic within a compiled help file.
data : Specifies the keyword to select in the index (.hhk) file.

HH_DISPLAY_SEARCH : Selects the Search tab in the Navigation pane of the HTML Help Viewer and performs a search for the term specified in the searchQuery parameter of the win32help::HH_FTS_QUERY structure.

file : Specifies a compiled help (.chm) file, or a specific topic within a compiled help file.
data : Specifies a pointer to an win32help::HH_FTS_QUERY structure.

HH_DISPLAY_TEXT_POPUP : Opens a pop-up window that displays the contents of one of the following:
An explicit text string.
A text string based on a resource ID.
A text string ID based on a text file contained in a compiled help (.chm) file.

file : To use an explicit text string, use None. To use a text string from a resource, use None. To use text string from a text file contained in a compiled help file, specify the .chm file and the text file within the .chm file.
data : Specifies a pointer to an win32help::HH_POPUP structure.

HH_DISPLAY_TOC : Selects the Contents tab in the Navigation pane of the HTML Help Viewer.

file : Specifies a compiled help (.chm) file, or a specific topic within a compiled help file.
data : Specifies None or a pointer to a topic within a compiled help file.

HH_DISPLAY_TOPIC : Opens a help topic in a specified help window.
If a window type is not specified, a default window type is used. If the window type or default window type is open, the help topic replaces the current topic in the window.

file : Specifies a compiled help (.chm) file, or a specific topic within a compiled help file. To specify a defined window type, insert a greater-than (>) character followed by the name of the window type.
data : Specifies None or a pointer to a topic within a compiled help file.

HH_GET_LAST_ERROR : Returns information about the last error that occurred in the HTML Help ActiveX control (Hhctrl.ocx).

file : Must be None
data : A pointer to a HH_LAST_ERROR structure.

Has not been implemented by Microsoft yet

HH_GET_WIN_HANDLE : Returns the handle (hwnd) of a specified window type.

file : Specifies the name of the compiled help (.chm) file in which the window type is defined.
data : Specifies the name of the window type whose handle you want to return.

HH_GET_WIN_TYPE : Retrieves a pointer to the win32help::HH_WINTYPE structure associated with a specified window type.

file : Specifies the name of the window type whose information you want to get and the name of the compiled help (.chm) file in which the window type is defined. The window name must begin with a greater-than (>) character and must be preceded by the name of the compiled help file it is defined in.
data : Ignored.

HH_HELP_CONTEXT : Displays a help topic based on a mapped topic ID. If a window type is not specified, a default window type is used. If the window type or default window type is open, the help topic replaces the current topic in the window.

file : Specifies the compiled help (.chm) file that contains the mapping information. To specify a defined window type, insert a greater-than (>) character followed by the name of the window type.
data : Specifies the numeric ID of the topic to display. You must map symbolic IDs of dialog boxes to numeric IDs in the [MAP] section of your project (.hhp) file.

HH_INITIALIZE : This command initializes the help system for use and must be the first HTML Help command called. It returns a cookie which must be used in the HH_UNINITIALIZE call. HH_INITIALIZE configures HTML Help to run on the same thread as the calling application instead of a secondary thread by setting the global property HH_GPROPID_SINGLETHREAD to VARIANT_TRUE. Running HTML Help on the same thread as the calling application requires the calling application to send messages to HTML Help by calling the HH_PRETRANSLATEMESSAGE command.

file : Must be None.
data : Ignored.

HH_KEYWORD_LOOKUP : Looks up one or more keywords in a compiled help (.chm) file. The keywords to search for and the action to be taken if no matches are found are specified in the win32help::HH_AKLINK structure.

file : Specifies the compiled help (.chm) file that contains keywords.
data : Points to an win32help::HH_AKLINK structure.

HH_PRETRANSLATEMESSAGE : This command is called in the message loop of your Windows application to ensure proper handling of Windows messages, especially keyboard messages when running HTML Help single thread. The HTML Help API is not thread safe and must be called from one and only one thread in a process.

file data : Points to a Win32 MSG structure.

Has not been implemented yet

HH_SET_WIN_TYPE : Creates a new help window or modifies an existing help window at run time.

file : Specifies the name of the window type that you want to create or modify and the name of the compiled help (.chm) file in which the window type is defined. The window type name must begin with a greater-than (>) character and must be preceded by the name of the compiled help file in which it is defined.
data : Points to an win32help::HH_WINTYPE structure.

HH_SYNC : Locates and selects the contents entry for the help topic that is open in the Topic pane of the HTML Help Viewer.

file : Specifies the name of the window type that you want to sync and the name of the compiled help (.chm) file in which the window type is defined. The window type name must begin with a greater-than (>) character and must be preceded by the name of the compiled help file in which it is defined.
data : Specifies a pointer to a topic within a compiled help file. This value is the topic file to which the contents will synchronize.

HH_TP_HELP_CONTEXTMENU : Opens a pop-up context menu. Generally used in response to the Windows WM_CONTEXTMENU message. For example, this message is sent when a user right-clicks a dialog box control.

hwnd : Specifies the window handle of the dialog box control for which you want pop-up help to appear. This is typically the control that has focus.
file : Specifies the compiled help (.chm) file, and the text file that contains the pop-up help topics. By default, the text file is named Cshelp.txt. If Cshelp.txt is located in the root of the compiled help file, then you only need to specify the help file name. If not, you must also specify the relative path.
data : Specifies an array of DWORDs containing pairs of dialog box control IDs and help topic IDs. The array must be terminated by zero, as in the following example:
DWORD ids[3];
ids[0] = ControlId;
ids[1] = HelpId;
ids[2] = 0;

HH_TP_HELP_WM_HELP : Opens a pop-up help topic. Generally used in response to the Windows WM_HELP message. For example, this message is sent when a user presses F1.

hwnd : Specifies the window handle of the dialog box control for which you want pop-up help to appear. This is typically the control that has focus.
file : Specifies the compiled help (.chm) file, and the text file that contains the pop-up help topics. By default, the text file is named Cshelp.txt. If Cshelp.txt is located in the root of the compiled help file, then you only need to specify the help file name. If not, you must also specify the relative path.
data : Specifies an array of DWORDs containing pairs of dialog box control IDs and help topic IDs. The array must be terminated by 0, as in the following example:
DWORD ids[3];
ids[0] = ControlId;
ids[1] = HelpId;
ids[2] = 0;

HH_UNINITIALIZE : This command is called to properly shut down HTML Help. This function should be the last help command the application calls. HH_UNINITIALIZE should not be called during DLL process detach, but during the normal application shutdown process. The type of the file arg is not checked, just set to the value it "Must" be.

file : Must be None.
data : Specifies a cookie. This is the cookie returned by HH_INITIALIZE .

data=0 : None/int/string/int tuple/win32help::HH_AKLINK/ win32help::HH_FTS_QUERY/win32help::HH_POPUP/ win32help::HH_WINTYPE

Additional data specific to the help call.

Win32 API References

HtmlHelp

Return Value

Depending on the specified cmd and the result:

HH_GET_WIN_TYPE :
tuple: (hwnd as below, and the win32help::HH_WINTYPE object).
Deep copy the structure to which dwData points before modifying the structure.

HH_INITIALIZE :
tuple: (hwnd as below, and the cookie).
This call returns a cookie that you must pass as the value of data when you call HH_UNINITIALIZE .

All other commands :

HtmlHelp() returns one or both of the following:
The handle (hwnd) of the help window.
NULL. In some cases, NULL indicates failure; in other cases, NULL indicates that the help window has not yet been created.


win32help.NMHDR

PyNMHDR = NMHDR()

Creates a new NMHDR object.


win32help.WinHelp

WinHelp(hwnd, hlpFile, cmd, data)

Invokes the Windows Help system.

Parameters

hwnd : int

The handle of the window requesting help.

hlpFile : string

The name of the help file.

cmd : int

The type of help. See the api for full details.

data=0 : None/int/string

Additional data specific to the help call.

Win32 API References

WinHelp

Return Value

The method raises an exception if an error occurs.


win32lz

Module win32lz

A module encapsulating the Windows LZ compression routines.

Methods

GetExpandedName
Retrieves the original name of an expanded file,

Close
Closes a handle to an LZ file.

Copy
Copies a source file to a destination file.

Init
Allocates memory for the internal data structures required to decompress files, and then creates and initializes them.

OpenFile
Creates, opens, reopens, or deletes the specified file.


win32lz.Close

Close(handle)

Closes a handle to an LZ file.

Parameters

handle : int

The handle of the LZ file to close.

Win32 API References

LZClose


win32lz.Copy

int = Copy(hSrc, hDest )

Copies a source file to a destination file.

Parameters

hSrc : int

The handle of the source file to copy.

hDest : int

The handle of the destination file.

Comments

If the source file is compressed with the Microsoft File Compression Utility (COMPRESS.EXE), this function creates a decompressed destination file. If the source file is not compressed, this function duplicates the original file.

Win32 API References

LZCopy


win32lz.GetExpandedName

string = GetExpandedName(idControl)

Retrieves the original name of an expanded file,

Parameters

idControl : int

The Id of the control to be retrieved.

Win32 API References

GetExpandedName


win32lz.Init

Init(handle)

Allocates memory for the internal data structures required to decompress files, and then creates and initializes them.

Parameters

handle : int

handle of source file

Win32 API References

LZInit


win32lz.OpenFile

int,(tuple) = OpenFile(fileName, action )

Creates, opens, reopens, or deletes the specified file.

Parameters

fileName : string

Name of file to open

action : int

Can be one of the wi32con.OF_ constants (OF_CREATE, OF_DELETE, etc)

Win32 API References

LZOpenFile


win32net

Module win32net

A module encapsulating the Windows Network API.

Methods

NetGroupGetInfo
Retrieves information about a particular group on a server.

NetGroupGetUsers
Enumerates the users in a group.

NetGroupSetUsers
Sets the users in a group on server.

NetGroupSetInfo
Sets information about a particular group account on a server.

NetGroupAdd
Creates a new group.

NetGroupAddUser
Adds a user to a group

NetGroupDel
Deletes a group.

NetGroupDelUser
Deletes a user from the group

NetGroupEnum
Enumerates the groups.

NetGroupAdd
Creates a new group.

NetLocalGroupAddMembers
Adds users to a local group.

NetLocalGroupDelMembers
Deletes users from a local group.

NetGroupDel
Deletes a group.

NetGroupEnum
Enumerates the groups.

NetGroupGetInfo
Retrieves information about a particular group on a server.

NetLocalGroupGetMembers
Enumerates the members in a local group.

NetGroupSetInfo
Sets information about a particular group account on a server.

NetLocalGroupSetMembers
Sets the members of a local group. Any existing members not listed are removed.

NetMessageBufferSend
sends a string to a registered message alias.

NetServerEnum
Retrieves information about all servers of a specific type

NetServerGetInfo
Retrieves information about a particular server.

NetServerSetInfo
Sets information about a particular server.

NetShareAdd
Creates a new share.

NetShareDel
Deletes a share

NetShareCheck
Checks if server is sharing a device

NetShareEnum
Retrieves information about each shared resource on a server.

NetShareGetInfo
Retrieves information about a particular share on a server.

NetShareSetInfo
Sets information about a particular share on a server.

NetUserAdd
Creates a new user.

NetUserChangePassword
Changes a users password on the specified domain.

NetUserEnum
Enumerates all users.

NetUserGetGroups
Returns a list of groups,attributes for all groups for the user.

NetUserGetInfo
Retrieves information about a particular user account on a server.

NetUserGetLocalGroups
Retrieves a list of local groups to which a specified user belongs.

NetUserSetInfo
Sets information about a particular user account on a server.

NetUserDel
Deletes a user.

NetUserModalsGet
Retrieves global user information on a server.

NetUserModalsSet
Sets global user information on a server.

NetWkstaUserEnum
Retrieves information about all users currently logged on to the workstation.

NetWkstaGetInfo
returns information about the configuration elements for a workstation.

NetWkstaSetInfo
Sets information about the configuration elements for a workstation.

NetWkstaTransportEnum
Retrieves information about transport protocols that are currently managed by the redirector.

NetWkstaTransportAdd
binds the redirector to a transport.

NetWkstaTransportDel
unbinds transport protocol from the redirector.

NetServerDiskEnum
Retrieves the list of disk drives on a server.

NetUseAdd
Establishes connection between local or NULL device name and a shared resource through redirector.

NetUseDel
Ends connection to a shared resource.

NetUseEnum
Enumerates connection between local machine and shared resources on remote computers.

NetUseGetInfo
Get information about locally mapped shared resource on remote computer.

NetGetAnyDCName
Returns the name of any domain controller trusted by the specified server.

NetGetDCName
Returns the name of the primary domain controller (PDC).

NetSessionEnum
Returns network session for the server, limited to single client and/or user if specified.

NetSessionDel
Delete network session for specified server, client computer and user. Returns None on success.

NetFileEnum
Returns open file resources for server (single client and/or user may also be passed as criteria).

NetFileClose
Closes file for specified server and file id.


win32net::NetGetAnyDCName

win32net::NetGetAnyDCName method

PyUnicode NetGetAnyDCName()

Returns the name of any domain controller trusted by the specified server.

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32NET/WIN32NETMODULE.CPP

Parameters

server=None : PyUnicode

Specifies the name of the remote server on which the function is to execute. If this parameter is None, the local computer is used.

domain=None : PyUnicode

Specifies the name of the domain. If this parameter is None, the name of the domain controller for the primary domain is used.


win32net::NetGetDCName

win32net::NetGetDCName method

PyUnicode NetGetDCName()

Returns the name of the primary domain controller (PDC).

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32NET/WIN32NETMODULE.CPP

Parameters

server=None : PyUnicode

Specifies the name of the remote server on which the function is to execute. If this parameter is None, the local computer is used.

domain=None : PyUnicode

Specifies the name of the domain. If this parameter is None, the name of the domain controller for the primary domain is used.


win32net.NetGroupAdd

NetGroupAdd(server, level, data)

Creates a new group.

Parameters

server : string/PyUnicode

The name of the server, or None.

level : int

The information level contained in the data

data : mapping

A dictionary holding the group data.

Win32 API References

NetGroupAdd


win32net.NetGroupAddUser

NetGroupAddUser(server, group, username)

Adds a user to the group

Parameters

server : string/PyUnicode

The name of the server, or None.

group : string/PyUnicode

The group name

username : string/PyUnicode

The user to add to the group.

Win32 API References

NetGroupAddUser


win32net.NetGroupDel

NetGroupDel(server, groupname)

Deletes a group.

Parameters

server : string/PyUnicode

The name of the server, or None.

groupname : string/PyUnicode

The group name

Win32 API References

NetGroupDel


win32net.NetGroupDelUser

NetGroupDelUser(server, group, username)

Deletes a user from the group

Parameters

server : string/PyUnicode

The name of the server, or None.

group : string/PyUnicode

The group name

username : string/PyUnicode

The user to delete from the group.

Win32 API References

NetGroupDelUser


win32net.NetGroupEnum

([dict, ...], total, resumeHandle) = NetGroupEnum(server, level , resumeHandle , prefLen )

Enumerates all groups.

Parameters

server : string/PyUnicode

The name of the server, or None.

level : int

The level of data required.

resumeHandle=0 : int

A resume handle. See the return description for more information.

prefLen=MAX_PREFERRED_LENGTH : int

The preferred length of the data buffer.

Win32 API References

NetGroupEnum

Return Value

The result is a list of items read (with each item being a dictionary of format PyGROUP_INFO_*, depending on the level parameter), the total available, and a "resume handle". If the result handle is true, you should call this function again to fetch more data, passing this handle in the resumeHandle param.


win32net.NetGroupGetInfo

dict = NetGroupGetInfo(server, groupname , level )

Retrieves information about a particular group on a server.

Parameters

server : string/PyUnicode

The name of the server, or None.

groupname : string/PyUnicode

The group name

level : int

The information level contained in the data

Win32 API References

NetGroupGetInfo

Return Value

The result will be a dictionary in one of the PyGROUP_INFO_* formats, depending on the level parameter.


win32net.NetGroupGetUsers

([dict, ...], total, resumeHandle) = NetGroupGetUsers(server, groupName , level , resumeHandle , prefLen )

Enumerates the users in a group.

Parameters

server : string/PyUnicode

The name of the server, or None.

groupName : string/PyUnicode

The name of the local group.

level : int

The level of data required.

resumeHandle=0 : int

A resume handle. See the return description for more information.

prefLen=4096 : int

The preferred length of the data buffer.

Win32 API References

NetGroupGetUsers

Return Value

The result is a list of items read (with each item being a dictionary of format PyGROUP_USERS_INFO_*, depending on the level parameter), the total available, and a "resume handle". If the result handle is true, you should call this function again to fetch more data, passing this handle in the resumeHandle param.


win32net.NetGroupSetInfo

NetGroupSetInfo(server, groupname, level, data)

Sets information about a particular group account on a server.

Parameters

server : string/PyUnicode

The name of the server, or None.

groupname : string/PyUnicode

The group name

level : int

The information level contained in the data

data : mapping

A dictionary holding the group data.

Win32 API References

NetGroupSetInfo


win32net.NetGroupSetUsers

NetGroupSetUsers(server, group, level, members)

Sets the members of a local group. Any existing members not listed are removed.

Parameters

server : string/PyUnicode

The name of the server, or None.

group : string/PyUnicode

The group name

level : int

The level of information in the data. Must be 0

members : [PyGROUP_USERS_INFO_0, ..]

The list of new members to add.

Win32 API References

NetGroupSetUsers


win32net.NetLocalGroupAddMembers

NetLocalGroupAddMembers(server, group, level, members)

Adds users to a local group.

Parameters

server : string/PyUnicode

The name of the server, or None.

group : string/PyUnicode

The group name

level : int

The level of information in the data.

members : [PyLOCALGROUP_MEMBERS_INFO_*, ]

The new members to add.

Win32 API References

NetLocalGroupAddMembers


win32net.NetLocalGroupDelMembers

NetLocalGroupDelMembers(server, group, members)

Deletes users from a local group.

Parameters

server : string/PyUnicode

The name of the server, or None.

group : string/PyUnicode

The group name

members : [PyLOCALGROUP_MEMBERS_INFO_*, .. ]

The list of members to delete from a local group.

Win32 API References

NetLocalGroupDelMembers


win32net.NetLocalGroupGetMembers

([dict, ...], total, resumeHandle) = NetLocalGroupGetMembers(server, groupName , level , resumeHandle , prefLen )

Enumerates the members in a local group.

Parameters

server : string/PyUnicode

The name of the server, or None.

groupName : string/PyUnicode

The name of the local group.

level : int

The level of data required.

resumeHandle=0 : int

A resume handle. See the return description for more information.

prefLen=4096 : int

The preferred length of the data buffer.

Win32 API References

NetLocalGroupGetMembers

Return Value

The result is a list of items read (with each item being a dictionary of format PyLOCALGROUP_MEMBERS_INFO_*, depending on the level parameter), the total available, and a "resume handle". If the result handle is true, you should call this function again to fetch more data, passing this handle in the resumeHandle param.


win32net.NetLocalGroupSetMembers

NetLocalGroupSetMembers(server, group, level, members)

Sets the members of a local group. Any existing members not listed are removed.

Parameters

server : string/PyUnicode

The name of the server, or None.

group : string/PyUnicode

The group name

level : int

The level of information in the data.

members : [PyLOCALGROUP_MEMBERS_INFO_*, ..]

The list of new members to add.

Win32 API References

NetLocalGroupSetMembers


win32net.NetMessageBufferSend

NetMessageBufferSend(domain, userName, fromName, message)

sends a string to a registered message alias.

Parameters

domain : string

Specifies the name of the remote server on which the function is to execute. None or empty string the local computer.

userName : string

Specifies the message name to which the message buffer should be sent.

fromName : string

The user the message is to come from, or None for the current user.

message : string

The message text

Win32 API References

NetMessageBufferSend


win32net.NetServerDiskEnum

([dict, ...], total, resumeHandle) = NetServerDiskEnum(server, level , resumeHandle , prefLen )

Retrieves the list of disk drives on a server.

Parameters

server : string/PyUnicode

The name of the server to execute on, or None.

level : int

The level of data required. Must be None or 0.

resumeHandle=0 : int

A resume handle. See the return description for more information.

prefLen=4096 : int

The preferred length of the data buffer.

Win32 API References

NetServerDiskEnum

Return Value

The result is a list of items read (with each item being a dictionary of format PyUnicode, depending on the level parameter), the total available, and a "resume handle". If the result handle is true, you should call this function again to fetch more data, passing this handle in the resumeHandle param.


win32net.NetServerEnum

([dict, ...], total, resumeHandle) = NetServerEnum(server, level , type , domain , resumeHandle , prefLen )

Retrieves information about each server of a particular type

Parameters

server : string/PyUnicode

The name of the server to execute on, or None.

level : int

The level of data required.

type=SV_TYPE_ALL : int

Type of server to return - one of the SV_TYPE_* constants.

domain=None : string/PyUnicode

The domain to enumerate, or None for the current domain.

resumeHandle=0 : int

A resume handle. See the return description for more information.

prefLen=MAX_PREFERRED_LENGTH : int

The preferred length of the data buffer.

Win32 API References

NetServerEnum

Return Value

The result is a list of items read (with each item being a dictionary of format PySERVER_INFO_*, depending on the level parameter), the total available, and a "resume handle". If the result handle is true, you should call this function again to fetch more data, passing this handle in the resumeHandle param.


win32net.NetServerGetInfo

dict = NetServerGetInfo(server, level )

Retrieves information about a particular server.

Parameters

server : string/PyUnicode

The name of the server to execute on, or None.

level : int

The information level contained in the data

Win32 API References

NetServerGetInfo

Return Value

The result will be a dictionary in one of the PySERVER_INFO_* formats, depending on the level parameter.


win32net.NetServerSetInfo

NetServerSetInfo(server, level, data)

Sets information about a particular server.

Parameters

server : string/PyUnicode

The name of the server, or None.

level : int

The information level contained in the data

data : mapping

A dictionary holding the share data.

Win32 API References

NetServerSetInfo


win32net.NetShareAdd

NetShareAdd(server, level, data)

Creates a new share.

Parameters

server : string/PyUnicode

The name of the server, or None.

level : int

The information level contained in the data. Must be level 2 or 502.

data : mapping

A dictionary holding the share data, in the format of SHARE_INFO_*

Win32 API References

NetShareAdd


win32net.NetShareCheck

(ret, type) = NetShareCheck(server, deviceName )

Checks if server is sharing a device

Parameters

server : string/PyUnicode

The name of the server, or None.

deviceName : string/PyUnicode

The share name

Win32 API References

NetShareCheck

Return Value

The result is (1, type-of-device) if device is shared, (0, None) if it is not shared.


win32net.NetShareDel

NetShareDel(server, shareName, reserved)

Deletes a share

Parameters

server : string/PyUnicode

The name of the server, or None.

shareName : string/PyUnicode

The share name

reserved=0 : int

Must be zero.

Win32 API References

NetShareDel


win32net.NetShareEnum

([dict, ...], total, resumeHandle) = NetShareEnum(server, level , resumeHandle , prefLen )

Retrieves information about each shared resource on a server.

Parameters

server : string/PyUnicode

The name of the server, or None.

level : int

The level of data required.

resumeHandle=0 : int

A resume handle. See the return description for more information.

prefLen=MAX_PREFERRED_LENGTH : int

The preferred length of the data buffer.

Alternative Parameters

serverName

The name of the server on which the call should execute, or None for the local computer.

Comments

If the old style is used, the result is a list of [(shareName, type, remarks), ...]

Win32 API References

NetShareEnum param 1 is not declared as const :-(

Return Value

The result is a list of items read (with each item being a dictionary of format PySHARE_INFO_*, depending on the level parameter), the total available, and a "resume handle". If the result handle is true, you should call this function again to fetch more data, passing this handle in the resumeHandle param.


win32net.NetShareGetInfo

dict = NetShareGetInfo(server, netname , level )

Retrieves information about a particular share on a server.

Parameters

server : string/PyUnicode

The name of the server, or None.

netname : string/PyUnicode

The network name

level : int

The information level contained in the data

Win32 API References

NetShareGetInfo

Return Value

The result will be a dictionary in one of the PySHARE_INFO_* formats, depending on the level parameter.


win32net.NetShareSetInfo

NetShareSetInfo(server, netname, level, data)

Sets information about a particular share on a server.

Parameters

server : string/PyUnicode

The name of the server, or None.

netname : string/PyUnicode

The network name

level : int

The information level contained in the data

data : mapping

A dictionary holding the share data.

Win32 API References

NetShareSetInfo


win32net.NetUseAdd

NetUseAdd(server, level, data)

Establishes connection between local or NULL device name and a shared resource through redirector

Parameters

server : string/PyUnicode

The name of the server, or None.

level : int

The information level contained in the data

data : mapping

A dictionary holding the share data.

Win32 API References

NetUseAdd


win32net.NetUseDel

NetUseDel(server, useName, forceCond)

Ends connection to a shared resource.

Parameters

server : string/PyUnicode

The name of the server, or None.

useName : string/PyUnicode

The share name

forceCond=0 : int

Level of force to use. Can be USE_FORCE or USE_NOFORCE or USE_LOTS_OF_FORCE

Win32 API References

NetUseDel


win32net.NetUseEnum

([dict, ...], total, resumeHandle) = NetUseEnum(server, level , resumeHandle , prefLen )

Retrieves information about transport protocols that are currently managed by the redirector

Parameters

server : string/PyUnicode

The name of the server to execute on, or None.

level : int

The level of data required. Currently levels 0, 1 and 2 are supported.

resumeHandle=0 : int

A resume handle. See the return description for more information.

prefLen=MAX_PREFERRED_LENGTH : int

The preferred length of the data buffer.

Win32 API References

NetUseEnum

Return Value

The result is a list of items read (with each item being a dictionary of format PyUSE_INFO_* , depending on the level parameter), the total available, and a "resume handle". If the result handle is true, you should call this function again to fetch more data, passing this handle in the resumeHandle param.


win32net.NetUseGetInfo

dict = NetUseGetInfo(server, usename , level )

Retrieves information about the configuration elements for a workstation

Parameters

server : string/PyUnicode

The name of the server to execute on, or None.

usename : string/PyUnicode

The name of the locally mapped resource.

level=0 : int

The information level contained in the data. NOTE: levels 302 and 402 don't seem to work correctly. They return error 124. So currently these info levels are not available.

Win32 API References

NetUseGetInfo

Return Value

The result will be a dictionary in one of the PyWKSTA_INFO_* formats, depending on the level parameter.


win32net.NetUserAdd

NetUserAdd(server, level, data)

Creates a new user.

Parameters

server : string/PyUnicode

The name of the server, or None.

level : int

The information level contained in the data

data : mapping

A dictionary holding the user data in the format of PyUSER_INFO_*.

Win32 API References

NetUserAdd


win32net.NetUserChangePassword

NetUserChangePassword(server, username, oldPassword, newPassword)

Changes the password for a user.

Parameters

server : string/PyUnicode

The name of the server, or None.

username : string/PyUnicode

The user name, or None for the current username.

oldPassword : string/PyUnicode

The old password

newPassword : string/PyUnicode

The new password

Comments

A server or domain can be configured to require that a user log on to change the password on a user account. If that is the case, you need administrator or account operator access to change the password for another user acount. If logging on is not required, you can change the password for any user account, so long as you know the current password.

Win32 API References

NetUserChangePassword


win32net.NetUserDel

NetUserDel(server, username)

Deletes a user.

Parameters

server : string/PyUnicode

The name of the server, or None.

username : string/PyUnicode

The user name

Win32 API References

NetUserDel


win32net.NetUserEnum

([dict, ...], total, resumeHandle) = NetUserEnum(server, level , filter , resumeHandle , prefLen )

Enumerates all users.

Parameters

server : string/PyUnicode

The name of the server, or None.

level : int

The level of data required.

filter=win32netcon.FILTER_NORMAL_ACCOUNT : int

The types of accounts to enumerate.

resumeHandle=0 : int

A resume handle. See the return description for more information.

prefLen=MAX_PREFERRED_LENGTH : int

The preferred length of the data buffer.

Win32 API References

NetUserEnum

Return Value

The result is a list of items read (with each item being a dictionary of format PyUSER_INFO_*, depending on the level parameter), the total available, and a "resume handle". If the result handle is true, you should call this function again to fetch more data, passing this handle in the resumeHandle param.


win32net.NetUserGetGroups

[(groupName, attribute), ...] = NetUserGetGroups(serverName, userName )

Returns a list of groups,attributes for all groups for the user.

Parameters

serverName : string

The name of the remote server on which the function is to execute. None or an empty string specifies the server program running on the local computer.

userName : string

The name of the user to search for in each group account.

To Do

This needs to be extended to support the new model, while not breaking existing code. A default arg would be perfect.

Return Value

Always makes the level 1 call and returns all data. Data return format is a Python List. Each "Item" is a tuple of (groupname, attributes). "(s,i)" respectively. In NT 4 the attributes seem to be hardcoded to 7. Earlier version of NT have not been tested.


win32net.NetUserGetInfo

dict = NetUserGetInfo(server, username , level )

Retrieves information about a particular user account on a server.

Parameters

server : string/PyUnicode

The name of the server, or None.

username : string/PyUnicode

The user name

level : int

The information level contained in the data

Win32 API References

NetUserGetInfo

Return Value

The result will be a dictionary in one of the PyUSER_INFO_* formats, depending on the level parameter.


win32net.NetUserGetLocalGroups

[groupName, ...] = NetUserGetLocalGroups(serverName, userName , flags )

Retrieves a list of local groups to which a specified user belongs.

Parameters

serverName : string

The name of the remote server on which the function is to execute. None or an empty string specifies the server program running on the local computer.

userName : string

The name of the user to search for in each group account. This parameter can be of the form <UserName>, in which case the username is expected to be found on servername. The user name can also be of the form <DomainName>\\<UserName> in which case <DomainName> is associated with servername and <UserName> is expected to be to be found on that domain.

flags=LG_INCLUDE_INDIRECT : int

Flags for the call.

To Do

This needs to be extended to support the new model, while not breaking existing code. A default arg would be perfect.


win32net.NetUserModalsGet

dict = NetUserModalsGet(server, level )

Retrieves global user information on a server.

Parameters

server : string/PyUnicode

The name of the server, or None.

level : int

The information level contained in the data

Win32 API References

NetUserModalsGet

Return Value

The result will be a dictionary in one of the PyUSER_MODALS_INFO_* formats, depending on the level parameter.


win32net.NetUserModalsGet

dict = NetUserModalsGet(server, level , data )

Retrieves global user information on a server.

Parameters

server : string/PyUnicode

The name of the server, or None.

level : int

The information level contained in the data

data : mapping

A dictionary holding the data in the format of PyUSER_MODALS_INFO_*.

Win32 API References

NetUserModalsGet


win32net.NetUserSetInfo

NetUserSetInfo(server, username, level, data)

Sets information about a particular user account on a server.

Parameters

server : string/PyUnicode

The name of the server, or None.

username : string/PyUnicode

The user name

level : int

The information level contained in the data

data : mapping

A dictionary holding the user data in the format of PyUSER_INFO_*

Win32 API References

NetUserSetInfo


win32net.NetWkstaGetInfo

dict = NetWkstaGetInfo(server, level )

Retrieves information about the configuration elements for a workstation

Parameters

server : string/PyUnicode

The name of the server to execute on, or None.

level : int

The information level contained in the data. NOTE: levels 302 and 402 don't seem to work correctly. They return error 124. So currently these info levels are not available.

Win32 API References

NetWkstaGetInfo

Return Value

The result will be a dictionary in one of the PyWKSTA_INFO_* formats, depending on the level parameter.


win32net.NetWkstaSetInfo

NetWkstaSetInfo(server, level, data)

Sets information about the configuration elements for a workstation

Parameters

server : string/PyUnicode

The name of the server, or None.

level : int

The information level contained in the data

data : mapping

A dictionary holding the share data.

Win32 API References

NetWkstaSetInfo


win32net.NetWkstaTransportAdd

NetWkstaTransportAdd(server, level, data)

binds the redirector to a transport

Parameters

server : string/PyUnicode

The name of the server, or None.

level : int

The information level contained in the data

data : mapping

A dictionary holding the share data.

Win32 API References

NetWkstaTransportAdd


win32net.NetWkstaTransportDel

NetWkstaTransportDel(server, TransportName, ucond)

unbinds the transport protocol from redirector

Parameters

server : string/PyUnicode

The name of the server, or None.

TransportName : string/PyUnicode

The name of the transport to delete.

ucond=0 : int

Level of force to use. Can be USE_FORCE or USE_NOFORCE or USE_LOTS_OF_FORCE

Win32 API References

NetWkstaTransportDel


win32net.NetWkstaTransportEnum

([dict, ...], total, resumeHandle) = NetWkstaTransportEnum(server, level , resumeHandle , prefLen )

Retrieves information about transport protocols that are currently managed by the redirector

Parameters

server : string/PyUnicode

The name of the server to execute on, or None.

level : int

The level of data required.

resumeHandle=0 : int

A resume handle. See the return description for more information.

prefLen=MAX_PREFERRED_LENGTH : int

The preferred length of the data buffer.

Win32 API References

NetWkstaTransportEnum

Return Value

The result is a list of items read (with each item being a dictionary of format PyWKSTA_TRANSPORT_INFO_*, depending on the level parameter), the total available, and a "resume handle". If the result handle is true, you should call this function again to fetch more data, passing this handle in the resumeHandle param.


win32net.NetWkstaUserEnum

([dict, ...], total, resumeHandle) = NetWkstaUserEnum(server, level , resumeHandle , prefLen )

Retrieves information about all users currently logged on to the workstation.

Parameters

server : string/PyUnicode

The name of the server to execute on, or None.

level : int

The level of data required.

resumeHandle=0 : int

A resume handle. See the return description for more information.

prefLen=MAX_PREFERRED_LENGTH : int

The preferred length of the data buffer.

Win32 API References

NetWkstaUserEnum

Return Value

The result is a list of items read (with each item being a dictionary of format PyWKSTA_USER_INFO_*, depending on the level parameter), the total available, and a "resume handle". If the result handle is true, you should call this function again to fetch more data, passing this handle in the resumeHandle param.


win32pdh

Module win32pdh

A module, encapsulating the Windows Performance Data Helpers API

Methods

AddCounter
Adds a new counter

RemoveCounter
Removes an open counter.

EnumObjectItems
Enumerates an object's items

EnumObjects
Enumerates objects

OpenQuery
Opens a new query

CloseQuery
Closes an open query.

MakeCounterPath
Makes a fully resolved counter path

GetCounterInfo
Retrieves information about a counter, such as data size, counter type, path, and user-supplied data values.

GetFormattedCounterValue
Retrieves a formatted counter value

CollectQueryData
Collects the current raw data value for all counters in the specified query and updates the status code of each counter.

ValidatePath
Validates that the specified counter is present on the machine specified in the counter path.

ExpandCounterPath
Examines the specified machine (or local machine if none is specified) for counters and instances of counters that match the wild card strings in the counter path.

ParseCounterPath
Parses the elements of the counter path.

ParseInstanceName
Parses the elements of the instance name

SetCounterScaleFactor
Sets the scale factor that is applied to the calculated value of the specified counter when you request the formatted counter value.

BrowseCounters
Displays the counter browsing dialog box so that the user can select the counters to be returned to the caller.

ConnectMachine
connects to the specified machine, and creates and initializes a machine entry in the PDH DLL.


win32pdh.AddCounter

int = AddCounter(hQuery, path , userData )

Adds a new counter

Parameters

hQuery : int

Handle to an open query.

path : string

Full path to the performance data

userData=0 : int

User data associated with the counter.

Comments

See also win32pdh::RemoveCounter


win32pdh.BrowseCounters

string = BrowseCounters(flags, hWnd , callback , defDetailLevel , dlgCaption )

Displays the counter browsing dialog box so that the user can select the counters to be returned to the caller.

Parameters

flags : tuple

Tuple describing the bitmasks, or None.

hWnd : int

parent for the dialog.

callback : object

A callable object to function as the callback.

defDetailLevel : int

The default detail level to show on startup in the Detail Level combo box. If the Detail Level combo box is not shown, this is the detail level to use in filtering the displayed performance counters and objects.

dlgCaption : string

The dialog coption, or None for default.


win32pdh.CloseQuery

CloseQuery(handle)

Closes a query

Parameters

handle : int

Handle to an open query.

Comments

See also win32pdh::OpenQuery


win32pdh.CollectQueryData

CollectQueryData(hQuery)

Collects the current raw data value for all counters in the specified query and updates the status code of each counter.

Parameters

hQuery : int

Handle to an open query.


win32pdh.ConnectMachine

string = ConnectMachine(machineName)

connects to the specified machine, and creates and initializes a machine entry in the PDH DLL.

Parameters

machineName : string

The machine name.


win32pdh.EnumObjectItems

tuple = EnumObjectItems(reserved, machine , object , detailLevel , flags )

Enumerates an object's items

Parameters

reserved : string

Should be None

machine : string

The machine to use, or None

object : string

The type of object

detailLevel : int

The level of data required.

flags=0 : int

Flags - must be zero


win32pdh.EnumObjects

list = EnumObjects(reserved, machine , detailLevel , refresh )

Enumerates objects

Parameters

reserved : string

Should be None

machine : string

The machine to use, or None

detailLevel : int

The level of data required.

refresh=1 : int

Should the list be refreshed.


win32pdh.ExpandCounterPath

[string,] = ExpandCounterPath(wildCardPath)

Examines the specified machine (or local machine if none is specified) for counters and instances of counters that match the wild card strings in the counter path.

Parameters

wildCardPath : string

The counter path to expand.

Comments

The result is limited to 4096 bytes!

The counter path format is assumed to be:
\\machine\\object(parent/instance#index)\\countername
and the parent, instance, index, and countername elements may contain either a valid name or a wild card character.


win32pdh.GetCounterInfo

GetCounterInfo(handle, bRetrieveExplainText)

Retrieves information about a counter, such as data size, counter type, path, and user-supplied data values.

Parameters

handle : int

The handle of the item to query

bRetrieveExplainText : int

Should explain text be retrieved?


win32pdh.GetFormattedCounterValue

(int,object) = GetFormattedCounterValue(handle, format )

Retrieves a formatted counter value

Parameters

handle : int

Handle to the counter

format : int

Format of result. Can be PDH_FMT_DOUBLE, PDH_FMT_LARGE, PDH_FMT_LONG and or'd with PDH_FMT_NOSCALE, PDH_FMT_1000


win32pdh.MakeCounterPath

MakeCounterPath(elements, flags)

Makes a fully resolved counter path

Parameters

elements : (machineName, objectName, instanceName, parentInstance, instanceIndex, counterName)

The elements to use to create the path.

flags : int

reserved.


win32pdh.OpenQuery

int = OpenQuery(reserved, userData )

Opens a new query

Parameters

reserved=None : object

Must be None

userData=0 : int

User data associated with the query.

Comments

See also win32pdh::CloseQuery


win32pdh.ParseCounterPath

(machineName, objectName, instanceName, parentInstance, instanceIndex, counterName) = ParseCounterPath(path, flags )

Parses the elements of the counter path.

Parameters

path : string

The counter path to parse.

flags=0 : int

Reserved - must be zero.


win32pdh.ParseInstanceName

(name, parent, instance) = ParseInstanceName(instanceName)

Parses the elements of the instance name

Parameters

instanceName : string

The instance name to parse.


win32pdh.RemoveCounter

RemoveCounter(handle)

Removes a previously opened counter

Parameters

handle : int

Handle to an open counter.

Comments

See also win32pdh::AddCounter


win32pdh.SetCounterScaleFactor

SetCounterScaleFactor(hCounter, factor)

Sets the scale factor that is applied to the calculated value of the specified counter when you request the formatted counter value.

Parameters

hCounter : int

Handle to the counter.

factor : int

power of ten used to multiply value.


win32pdh.ValidatePath

int = ValidatePath(path)

Validates that the specified counter is present on the machine specified in the counter path.

Parameters

path : string

The counter path to validate.

Comments

This method returns an integer result code. No exception is ever thrown. Zero result indicates success.


win32pipe

Module win32pipe

An interface to the win32 pipe API's

Methods

GetNamedPipeHandleState
Determines the state of the named pipe.

ConnectNamedPipe
Connects to a named pipe

CallNamedPipe
Opens and performs a transaction on a named pipe.

CreatePipe
Creates an anonymous pipe, and returns handles to the read and write ends of the pipe

FdCreatePipe
As CreatePipe but returns file descriptors

CreateNamedPipe
Creates an instance of a named pipe and returns a handle for subsequent pipe operations

DisconnectNamedPipe
Disconnects the server end of a named pipe instance from a client process.

GetOverlappedResult
Determines the result of the most recent call with an OVERLAPPED object.

WaitNamedPipe
Waits until either a time-out interval elapses or an instance of the specified named pipe is available to be connected to (that is, the pipe's server process has a pending win32pipe::ConnectNamedPipe operation on the pipe).

PeekNamedPipe
Copies data from a named or anonymous pipe into a buffer without removing it from the pipe. It also returns information about data in the pipe.

popen
Version of popen that works in a GUI

popen2
Variation on popen - returns 2 pipes

popen3
Variation on popen - returns 3 pipes

popen4
Like popen2, but stdout/err are combined.

GetNamedPipeHandleState
Returns the state of a named pipe.

ConnectNamedPipe
Connects to a named pipe

CallNamedPipe
Calls a named pipe


win32pipe.CallNamedPipe

string = CallNamedPipe(pipeName, data , bufSize , timeOut )

Opens and performs a transaction on a named pipe.

Parameters

pipeName : PyUNICODE

The name of the pipe.

data : string

The data to write.

bufSize : int

The size of the result buffer to allocate for the read.

timeOut : int

The timeout


win32pipe.ConnectNamedPipe

int = ConnectNamedPipe(hPipe, overlapped )

Connects to a named pipe

Parameters

hPipe : PyHANDLE

The handle to the pipe.

overlapped=None : PyOVERLAPPED

An overlapped object to use, else None

Comments

The result is the HRESULT from the underlying function. If an overlapped object is passed, the result may be ERROR_IO_PENDING or ERROR_PIPE_CONNECTED.


win32pipe.CreateNamedPipe

PyHANDLE = CreateNamedPipe(pipeName, openMode , pipeMode , nMaxInstances , nOutBufferSize , nInBufferSize , nDefaultTimeOut , sa )

Creates an instance of a named pipe and returns a handle for subsequent pipe operations

Parameters

pipeName : PyUnicode

The name of the pipe

openMode : int

OpenMode of the pipe

pipeMode : int

nMaxInstances : int

nOutBufferSize : int

nInBufferSize : int

nDefaultTimeOut : int

sa : PySECURITY_ATTRIBUTES


win32pipe.CreatePipe

(PyHANDLE, PyHANDLE) = CreatePipe(sa, nSize )

Creates an anonymous pipe, and returns handles to the read and write ends of the pipe

Parameters

sa : PySECURITY_ATTRIBUTES

nSize : int


win32pipe.DisconnectNamedPipe

DisconnectNamedPipe(hFile)

Disconnects the server end of a named pipe instance from a client process.

Parameters

hFile : PyHANDLE

The handle to the pipe to disconnect.


win32pipe.FdCreatePipe

(int, int) = FdCreatePipe(sa, nSize , mode )

As CreatePipe but returns file descriptors

Parameters

sa : PySECURITY_ATTRIBUTES

nSize : int

mode : int


win32pipe.GetNamedPipeHandleState

(int, int, int/None, int/None, PyUnicode = GetNamedPipeHandleState(hPipe, bGetCollectionData )

Determines the state of the named pipe.

Parameters

hPipe : PyHANDLE

The handle to the pipe.

bGetCollectionData=0 : int

Determines of the collection data should be returned. If not, None is returned in their place.


win32pipe.GetOverlappedResult

int = GetOverlappedResult(hFile, overlapped , bWait )

Determines the result of the most recent call with an OVERLAPPED object.

Parameters

hFile : PyHANDLE

The handle to the pipe or file

overlapped : PyOVERLAPPED

The overlapped object to check.

bWait : int

Indicates if the function should wait for data to become available.

Comments

The result is the number of bytes transferred. The overlapped object's attributes will be changed during this call.


win32pipe.PeekNamedPipe

(string, int, int) = PeekNamedPipe(hPipe, size )

Copies data from a named or anonymous pipe into a buffer without removing it from the pipe. It also returns information about data in the pipe.

Parameters

hPipe : PyHANDLE

The handle to the pipe.

size : int

The size of the buffer.


win32pipe.WaitNamedPipe

WaitNamedPipe(pipeName, timeout)

Waits until either a time-out interval elapses or an instance of the specified named pipe is available to be connected to (that is, the pipe's server process has a pending win32pipe::ConnectNamedPipe operation on the pipe).

Parameters

pipeName : PyUnicode

The name of the pipe

timeout : int

The number of milliseconds the function will wait. instead of a literal value, you can specify one of the following values for the timeout:

Value | Meaning
NMPWAIT_USE_DEFAULT_WAIT | The time-out interval is the default value specified by the server process in the CreateNamedPipe function.
NMPWAIT_WAIT_FOREVER | The function does not return until an instance of the named pipe is available


win32pipe.popen

pipe = popen(cmdstring, mode )

Popen that works from a GUI.

Parameters

cmdstring : string

The cmdstring to pass to the shell

mode : string

Either 'r' or 'w'

Return Value

The result of this function is a pipe (file) connected to the processes stdin or stdout, depending on the requested mode.


win32pipe.popen2

(pipe, pipe) = popen2(cmdstring, mode )

Variation on win32pipe::popen

Parameters

cmdstring : string

The cmdstring to pass to the shell

mode : string

Either 't' or 'b'

Return Value

The result of this function is a pipe (file) connected to the processes stdin, and a pipe connected to the processes stdout.


win32pipe.popen3

(pipe, pipe, pipe) = popen3(cmdstring, mode )

Variation on win32pipe::popen

Parameters

cmdstring : string

The cmdstring to pass to the shell

mode : string

Either 't' or 'b'

Return Value

The result of this function is 3 pipes - the processes stdin, stdout and stderr


win32pipe.popen4

(pipe, pipe) = popen4(cmdstring, mode )

Variation on win32pipe::popen

Parameters

cmdstring : string

The cmdstring to pass to the shell

mode : string

Either 't' or 'b'

Return Value

The result of this function is 2 pipes - the processes stdin, and stdout+stderr combined as a single pipe.


win32print

Module win32print

A module, encapsulating the Windows Win32 API.

Methods

OpenPrinter
Retrieves a handle to a printer.

GetPrinter
Retrieves information about a printer

ClosePrinter
Closes a handle to a printer.

AddPrinterConnection
Connects to a network printer.

DeletePrinterConnection
Disconnects from a network printer.

EnumPrinters
Enumerates printers, print servers, domains and print providers.

GetDefaultPrinter
Returns the default printer.

SetDefaultPrinter
Sets the default printer.

StartDocPrinter
Notifies the print spooler that a document is to be spooled for printing. Returns the Jobid of the started job.

EndDocPrinter
The EndDocPrinter function ends a print job for the specified printer.

WritePrinter
Copies the specified bytes to the specified printer. StartDocPrinter and EndDocPrinter should be called before and after. Returns number of bytes written to printer.

EnumJobs
Enumerates print jobs on specified printer.

GetJob
Returns dictionary of information about a specified print job.

SetJob
Pause, cancel, resume, set priority levels on a print job.


win32print.AddPrinterConnection

None = AddPrinterConnection(printer)

Connects to remote printer

Parameters

printer : string

printer to connect to (eg: \\server\\printer).


win32print.ClosePrinter

ClosePrinter(handle)

Closes a handle to a printer.

Parameters

handle : int

handle to printer object


win32print.DeletePrinterConnection

None = DeletePrinterConnection(printer)

Removes connection to remote printer

Parameters

printer : string

printer to disconnect from (eg: \\server\\printer).


win32print.EndDocPrinter

None = EndDocPrinter(hprinter)

The EndDocPrinter function ends a print job for the specified printer. To be used after using WritePrinter.

Parameters

hprinter : int

handle to printer (from OpenPrinter)


win32print.EnumJobs

tuple = EnumJobs(hPrinter, FirstJob , NoJobs , Level )

Enumerates print jobs on specified printer.

Parameters

hPrinter : int

Handle of printer.

FirstJob : int

location of first job in print queue to enumerate.

NoJobs : int

Number of jobs to enumerate.

Level=1 : int

Level of information to return (only JOB_INFO_1 is supported).


win32print.EnumPrinters

tuple = EnumPrinters(flag, name , level )

Enumerates printers, print servers, domains and print providers.

Parameters

flag : int

types of printer objects to enumerate (PRINTER_ENUM_*).

name=None : string

name of printer object.

level=1 : int

type of printer info structure (only PRINTER_INFO_1 is supported)


win32print.GetDefaultPrinter

string = GetDefaultPrinter()

Returns the default printer.


win32print.GetJob

dictionary = GetJob(hPrinter, JobID , Level )

Returns dictionary of information about a specified print job.

Parameters

hPrinter : int

Handle of printer.

JobID : int

Job Identifier.

Level=1 : int

Level of information to return (only JOB_INFO_1 is supported).


win32print.GetPrinter

tuple = GetPrinter(handle)

Retrieves information about a printer

Parameters

handle : int

handle to printer object


win32print.OpenPrinter

int = OpenPrinter(printer)

Retrieves a handle to a printer.

Parameters

printer : string

printer or print server name.


win32print.SetDefaultPrinter

None = SetDefaultPrinter(printer)

Sets the default printer.

Parameters

printer : string

printer to set as default


win32print.SetJob

None = SetJob(hPrinter, JobID , Level , JobInfo , Command )

Pause, cancel, resume, set priority levels on a print job.

Parameters

hPrinter : int

Handle of printer.

JobID : int

Job Identifier.

Level=1 : int

Level of information to return (only 0 and JOB_INFO_1 are supported).

JobInfo : dict

JOB_INFO_1 Dictionary (can be None if Level is 0). Position should be JOB_POSITION_UNSPECIFIED.

Command : int

Job command value (JOB_CONTROL_*).


win32print.StartDocPrinter

int = StartDocPrinter(hprinter, level , (DocName, OutputFile, DataType) )

Notifies the print spooler that a document is to be spooled for printing. To be used before using WritePrinter. Returns the Jobid of the started job.

Parameters

hprinter : int

handle to printer (from OpenPrinter)

level=1 : int

type of docinfo structure (only docinfo level 1 supported)

(DocName, OutputFile, DataType) : (string, string, string)

Sequence of document name, output file, data type


win32print.WritePrinter

int = WritePrinter(hprinter, buf )

Copies the specified bytes to the specified printer. Suitable for copying raw Postscript or HPGL files to a printer. StartDocPrinter and EndDocPrinter should be called before and after. Returns number of bytes written to printer.

Parameters

hprinter : int

Handle to printer (from OpenPrinter)

buf : string

String to send to printer. Embedded NULL bytes are allowed.


win32process

Module win32process

An interface to the win32 Process and Thread API's

Methods

STARTUPINFO
Creates a new STARTUPINFO object.

beginthreadex
Creates a new thread

CreateProcess
Creates a new process and its primary thread. The new process executes the specified executable file.

CreateProcessAsUser
Creates a new process in the context of the specified user.

GetProcessAffinityMask
Gets a processor affinity mask for a specified thread.

GetProcessVersion
Obtains the major and minor version numbers of the system on which a specified process expects to run.

GetStartupInfo
Retrieves the contents of the STARTUPINFO structure that was specified when the calling process was created.

GetPriorityClass

GetExitCodeThread

GetExitCodeProcess

SetThreadPriority

SetPriorityClass

SetThreadAffinityMask
Sets a processor affinity mask for a specified thread.

SetThreadIdealProcessor
Used to specify a preferred processor for a thread. The system schedules threads on their preferred processors whenever possible.

SetProcessAffinityMask
Sets a processor affinity mask for a specified process.

SuspendThread
Suspends the specified thread.

ResumeThread
Resumes the specified thread. When the suspend count is decremented to zero, the execution of the thread is resumed.

TerminateProcess
Terminates the specified process and all of its threads.


win32process.CreateProcess

PyHANDLE, PyHANDLE, int, int = CreateProcess(appName, commandLine , processAttributes , threadAttributes , bInheritHandles , dwCreationFlags , newEnvironment , currentDirectory , startupinfo )

Creates a new process and its primary thread. The new process executes the specified executable file.

Parameters

appName : string

name of executable module, or None

commandLine : string

command line string, or None

processAttributes : PySECURITY_ATTRIBUTES

process security attributes, or None

threadAttributes : PySECURITY_ATTRIBUTES

thread security attributes, or None

bInheritHandles : int

handle inheritance flag

dwCreationFlags : int

creation flags. May be a combination of the following values:

Value | Meaning
CREATE_BREAKAWAY_FROM_JOB | Windows 2000: The child processes of a process associated with a job are not associated with the job. If the calling process is not associated with a job, this flag has no effect. If the calling process is associated with a job, the job must set the JOB_OBJECT_LIMIT_BREAKAWAY_OK limit or CreateProcess will fail.
CREATE_DEFAULT_ERROR_MODE | The new process does not inherit the error mode of the calling process. Instead, CreateProcess gives the new process the current default error mode. An application sets the current default error mode by calling SetErrorMode. This flag is particularly useful for multi-threaded shell applications that run with hard errors disabled. The default behavior for CreateProcess is for the new process to inherit the error mode of the caller. Setting this flag changes that default behavior.
CREATE_FORCE_DOS | Windows NT/2000: This flag is valid only when starting a 16-bit bound application. If set, the system will force the application to run as an MS-DOS-based application rather than as an OS/2-based application.
CREATE_NEW_CONSOLE | The new process has a new console, instead of inheriting the parent's console. This flag cannot be used with the DETACHED_PROCESS flag.
CREATE_NEW_PROCESS_GROUP | The new process is the root process of a new process group. The process group includes all processes that are descendants of this root process. The process identifier of the new process group is the same as the process identifier, which is returned in the lpProcessInformation parameter. Process groups are used by the GenerateConsoleCtrlEvent function to enable sending a CTRL+C or CTRL+BREAK signal to a group of console processes.
CREATE_NO_WINDOW | Windows NT/2000: This flag is valid only when starting a console application. If set, the console application is run without a console window.
CREATE_SEPARATE_WOW_VDM | Windows NT/2000: This flag is valid only when starting a 16-bit Windows-based application. If set, the new process runs in a private Virtual DOS Machine (VDM). By default, all 16-bit Windows-based applications run as threads in a single, shared VDM. The advantage of running separately is that a crash only terminates the single VDM; any other programs running in distinct VDMs continue to function normally. Also, 16-bit Windows-based applications that are run in separate VDMs have separate input queues. That means that if one application stops responding momentarily, applications in separate VDMs continue to receive input. The disadvantage of running separately is that it takes significantly more memory to do so. You should use this flag only if the user requests that 16-bit applications should run in them own VDM.
CREATE_SHARED_WOW_VDM | Windows NT/2000: The flag is valid only when starting a 16-bit Windows-based application. If the DefaultSeparateVDM switch in the Windows section of WIN.INI is TRUE, this flag causes the CreateProcess function to override the switch and run the new process in the shared Virtual DOS Machine.
CREATE_SUSPENDED | The primary thread of the new process is created in a suspended state, and does not run until the ResumeThread function is called.
CREATE_UNICODE_ENVIRONMENT | Indicates the format of the lpEnvironment parameter. If this flag is set, the environment block pointed to by lpEnvironment uses Unicode characters. Otherwise, the environment block uses ANSI characters.
DEBUG_PROCESS | If this flag is set, the calling process is treated as a debugger, and the new process is debugged. The system notifies the debugger of all debug events that occur in the process being debugged. If you create a process with this flag set, only the calling thread (the thread that called CreateProcess) can call the WaitForDebugEvent function. Windows 95/98: This flag is not valid if the new process is a 16-bit application.
DEBUG_ONLY_THIS_PROCESS | If this flag is not set and the calling process is being debugged, the new process becomes another process being debugged by the calling process's debugger. If the calling process is not a process being debugged, no debugging-related actions occur.
DETACHED_PROCESS | For console processes, the new process does not have access to the console of the parent process. The new process can call the AllocConsole function at a later time to create a new console. This flag cannot be used with the CREATE_NEW_CONSOLE flag.
ABOVE_NORMAL_PRIORITY_CLASS | Windows 2000: Indicates a process that has priority higher than NORMAL_PRIORITY_CLASS but lower than HIGH_PRIORITY_CLASS.
BELOW_NORMAL_PRIORITY_CLASS | Windows 2000: Indicates a process that has priority higher than IDLE_PRIORITY_CLASS but lower than NORMAL_PRIORITY_CLASS.
HIGH_PRIORITY_CLASS | Indicates a process that performs time-critical tasks. The threads of a high-priority class process preempt the threads of normal-priority or idle-priority class processes. An example is the Task List, which must respond quickly when called by the user, regardless of the load on the system. Use extreme care when using the high-priority class, because a CPU-bound application with a high-priority class can use nearly all available cycles.
IDLE_PRIORITY_CLASS | Indicates a process whose threads run only when the system is idle and are preempted by the threads of any process running in a higher priority class. An example is a screen saver. The idle priority class is inherited by child processes.
NORMAL_PRIORITY_CLASS | Indicates a normal process with no special scheduling needs.
REALTIME_PRIORITY_CLASS | Indicates a process that has the highest possible priority. The threads of a real-time priority class process preempt the threads of all other processes, including operating system processes performing important tasks. For example, a real-time process that executes for more than a very brief interval can cause disk caches not to flush or cause the mouse to be unresponsive.

newEnvironment : dictionary/None

A dictionary of string or Unicode pairs to define the environment for the process, or None to inherit the current environment.

currentDirectory : string

current directory name, or None

startupinfo : PySTARTUPINFO

a STARTUPINFO object that specifies how the main window for the new process should appear.

Comments

The result is a tuple of (hProcess, hThread, dwProcessId, dwThreadId)


win32process.CreateProcessAsUser

PyHANDLE, PyHANDLE, int, int = CreateProcessAsUser(hToken, appName , commandLine , processAttributes , threadAttributes , bInheritHandles , dwCreationFlags , newEnvironment , currentDirectory , startupinfo )

Creates a new process in the context of the specified user.

Parameters

hToken : PyHANDLE

Handle to a token that represents a logged-on user

appName : string

name of executable module, or None

commandLine : string

command line string, or None

processAttributes : PySECURITY_ATTRIBUTES

process security attributes, or None

threadAttributes : PySECURITY_ATTRIBUTES

thread security attributes, or None

bInheritHandles : int

handle inheritance flag

dwCreationFlags : int

creation flags

newEnvironment : None

A dictionary of stringor Unicode pairs to define the environment for the process, or None to inherit the current environment.

currentDirectory : string

current directory name, or None

startupinfo : PySTARTUPINFO

a STARTUPINFO object that specifies how the main window for the new process should appear.

Comments

The result is a tuple of (hProcess, hThread, dwProcessId, dwThreadId)


win32process.GetExitCodeProcess

int = GetExitCodeProcess(handle)

Parameters

handle : PyHANDLE

handle to the process


win32process.GetExitCodeThread

int = GetExitCodeThread(handle)

Parameters

handle : PyHANDLE

handle to the thread


win32process.GetPriorityClass

int = GetPriorityClass(handle)

Parameters

handle : PyHANDLE

handle to the thread


win32process.GetProcessAffinityMask

int, int = GetProcessAffinityMask(hProcess)

Gets a processor affinity mask for a specified thread.

Parameters

hProcess : PyHANDLE

handle to the process of interest

Return Value

The result is a tuple of (process affinity mask, system affinity mask)


win32process.GetProcessVersion

int = GetProcessVersion(processId)

Obtains the major and minor version numbers of the system on which a specified process expects to run.

Parameters

processId : int

identifier specifying the process of interest.


win32process.GetStartupInfo

PySTARTUPINFO = GetStartupInfo()

Retrieves the contents of the STARTUPINFO structure that was specified when the calling process was created.


win32process.ResumeThread

int = ResumeThread(handle)

Resumes the specified thread. When the suspend count is decremented to zero, the execution of the thread is resumed.

Parameters

handle : PyHANDLE

handle to the thread

Return Value

The return value is the thread's previous suspend count


win32process.STARTUPINFO

PySTARTUPINFO = STARTUPINFO()

Creates a new STARTUPINFO object.


win32process.SetPriorityClass

SetPriorityClass(handle, dwPriorityClass)

Parameters

handle : PyHANDLE

handle to the thread

dwPriorityClass : int

priority class value


win32process.SetProcessAffinityMask

SetProcessAffinityMask(handle, mask)

Sets a processor affinity mask for a specified process.

Parameters

handle : PyHANDLE

handle to the process of interest

mask : int

a thread affinity mask


win32process.SetThreadAffinityMask

int = SetThreadAffinityMask(handle, mask )

Sets a processor affinity mask for a specified thread.

Parameters

handle : PyHANDLE

handle to the thread of interest

mask : int

a thread affinity mask


win32process.SetThreadIdealProcessor

int = SetThreadIdealProcessor(handle, dwIdealProcessor )

Used to specify a preferred processor for a thread. The system schedules threads on their preferred processors whenever possible.

Parameters

handle : PyHANDLE

handle to the thread of interest

dwIdealProcessor : int

ideal processor number


win32process.SetThreadPriority

SetThreadPriority(handle, nPriority)

Parameters

handle : PyHANDLE

handle to the thread

nPriority : int

thread priority level


win32process.SuspendThread

int = SuspendThread(handle)

Suspends the specified thread.

Parameters

handle : PyHANDLE

handle to the thread

Return Value

The return value is the thread's previous suspend count


win32process.TerminateProcess

TerminateProcess(handle, exitCode)

Terminates the specified process and all of its threads.

Parameters

handle : PyHANDLE

handle to the process

exitCode : int

The exit code for the process.


win32process.beginthreadex

PyHANDLE, int = beginthreadex(sa, stackSize , entryPoint , args , flags )

Creates a new thread

Parameters

sa : PySECURITY_ATTRIBUTES

The security attributes, or None

stackSize : int

Stack size for the new thread, or zero for the default size.

entryPoint : function

The thread function.

args : tuple

Args passed to the function.

flags : int

Comments

The result is a tuple of the thread handle and thread ID.


win32ras

Module win32ras

A module encapsulating the Windows Remote Access Service (RAS) API.

Methods

CreatePhonebookEntry
Creates a new phonebook entry. The function displays a dialog box into which the user can enter information about the entry.

Dial
Establishes a RAS connection to a RAS server.

EditPhonebookEntry
Creates a new phonebook entry. The function displays a dialog box into which the user can enter information about the entry

EnumConnections
Returns a list of tuples, one for each active connection.

EnumEntries
Returns a list of tuples, one for each phonebook entry.

GetConnectStatus
Returns a tuple with connection information.

GetEntryDialParams
Returns a tuple with the most recently set dial parameters for the specified entry.

GetErrorString
Returns an error string for a RAS error code.

HangUp
Terminates a remote access session.

IsHandleValid
Indicates if the given RAS handle is valid.

SetEntryDialParams
Sets the dial parameters for the specified entry.

RASDIALEXTENSIONS
Creates a new RASDIALEXTENSIONS object


win32ras.CreatePhonebookEntry

CreatePhonebookEntry(hWnd, fileName)

Creates a new phonebook entry. The function displays a dialog box into which the user can enter information about the entry

Parameters

hWnd : int

Handle to the parent window of the dialog box.

fileName=None : string

Specifies the filename of the phonebook entry. Currently this is ignored.

Win32 API References

RasCreatePhonebookEntry


win32ras.Dial

int, int = Dial(dialExtensions, fileName , RasDialParams , callback )

Establishes a RAS connection to a RAS server.

Parameters

dialExtensions : PyRASDIALEXTENSIONS

An object providing the RASDIALEXTENSIONS information, or None

fileName : string

Specifies the filename of the phonebook entry, or None. Ignored on Win95.

RasDialParams : RASDIALPARAMS

A tuple describing a RASDIALPARAMS structure.

callback : method or hwnd

The method to be called when RAS events occur, or None. If not None, the function must have the signature of win32ras::RasDialFunc1

Comments

Note - this handle must be closed using win32ras::HangUp, or else the RAS port will remain open, even after the program has terminated. Your operating system may need rebooting to clean up otherwise!

Win32 API References

RasDial

Return Value

The return value is (handle, retCode).
It is possible for a valid handle to be returned even on failure.
If the returned handle is = 0, then it can be assumed invalid.


win32ras.EditPhonebookEntry

EditPhonebookEntry(hWnd, fileName, entryName)

Creates a new phonebook entry. The function displays a dialog box into which the user can enter information about the entry

Parameters

hWnd : int

Handle to the parent window of the dialog box.

fileName : string

Specifies the filename of the phonebook entry, or None. Currently this is ignored.

entryName=None : string

Specifies the name of the phonebook entry to edit

Win32 API References

RasEditPhonebookEntry


win32ras.EnumConnections

list = EnumConnections()

Returns a list of tuples, one for each active connection.

Win32 API References

RasEnumConnections

Return Value

Each tuple is of format (handle, entryName, deviceType, deviceName)


win32ras.EnumEntries

EnumEntries(reserved, fileName)

Returns a list of tuples, one for each phonebook entry.

Parameters

reserved=None : string

Reserved - must be None

fileName=None : string

The name of the phonebook file, or None.

Win32 API References

RasEnumEntries


win32ras.GetConnectStatus

(int, int, string, string) = GetConnectStatus(hrasconn)

Returns a tuple with connection information.

Parameters

hrasconn : int

Handle to the RAS session.

Win32 API References

RasGetConnectStatus

RasGetConnectStatus


win32ras.GetEntryDialParams

(s,s,s,s,s,s),i = GetEntryDialParams(fileName, entryName )

Returns a tuple with the most recently set dial parameters for the specified entry.

Parameters

fileName : string

The filename of the phonebook, or None.

entryName : string

The name of the entry to retrieve the params for.

Win32 API References

RasGetEntryDialParams

RasGetConnectStatus

Return Value

The return value is a tuple describing the params retrieved, plus a BOOL integer indicating if the password was also retrieved.


win32ras.GetErrorString

string = GetErrorString(error)

Returns an error string for a RAS error code.

Parameters

error : int

The error value being queried.

Win32 API References

RasGetErrorString


win32ras.HangUp

HangUp(hras)

Terminates a remote access session.

Parameters

hras : int

The handle to the RAS connection to be terminated.

Win32 API References

RasHangUp


win32ras.IsHandleValid

IsHandleValid(hras)

Indicates if the given RAS handle is valid.

Parameters

hras : int

The handle to the RAS connection being checked.


win32ras.SetEntryDialParams

SetEntryDialParams(fileName, RasDialParams, bSavePassword)

Sets the dial parameters for the specified entry.

Parameters

fileName : string

The filename of the phonebook, or None.

RasDialParams : (tuple)

A tuple describing a RASDIALPARAMS structure.

bSavePassword : int

Indicates whether to remove password from entry's parameters.

Win32 API References

SetEntryDialParams

RasGetConnectStatus


win32security

Module win32security

An interface to the win32 security API's

Methods

ACL
Creates a new PyACL object.

SID
Creates a new PySID object.

SECURITY_ATTRIBUTES
Creates a new PySECURITY_ATTRIBUTES object.

SECURITY_DESCRIPTOR
Creates a new PySECURITY_DESCRIPTOR object.

ImpersonateNamedPipeClient
Impersonates a named-pipe client application.

ImpersonateLoggedOnUser
Impersonates a logged on user.

RevertToSelf
Terminates the impersonation of a client application.

LogonUser
Attempts to log a user on to the local computer, that is, to the computer from which LogonUser was called. You cannot use LogonUser to log on to a remote computer.

LookupAccountName
Accepts the name of a system and an account as input. It retrieves a security identifier (SID) for the account and the name of the domain on which the account was found.

LookupAccountSid
Accepts a security identifier (SID) as input. It retrieves the name of the account for this SID and the name of the first domain on which this SID is found.

OpenProcessToken

LookupPrivilegeValue

AdjustTokenPrivileges

GetTokenInformation
Retrieves a specified type of information about an access token. The calling process must have appropriate access rights to obtain the information.

OpenThreadToken
Opens the access token associated with a thread.

GetFileSecurity
Obtains specified information about the security of a file or directory. The information obtained is constrained by the caller's access rights and privileges.

SetFileSecurity
Sets information about the security of a file or directory. The information obtained is constrained by the caller's access rights and privileges.

GetUserObjectSecurity
Obtains specified information about the security of a user object. The information obtained is constrained by the caller's access rights and privileges.

SetUserObjectSecurity
Sets information about the security of a user object. The information obtained is constrained by the caller's access rights and privileges.

GetKernelObjectSecurity
Obtains specified information about the security of a kernel object. The information obtained is constrained by the caller's access rights and privileges.

SetKernelObjectSecurity
Sets information about the security of a kernel object. The information obtained is constrained by the caller's access rights and privileges.


win32security.ACL

PyACL = ACL(bufSize)

Creates a new PyACL object.

Parameters

bufSize=64 : int

The size of the buffer for the ACL.


win32security.AdjustTokenPrivileges

AdjustTokenPrivileges(handle, bDisableAllPrivileges, NewState)

Parameters

handle : int

handle to token that contains privileges

bDisableAllPrivileges : int

Flag for disabling all privileges

NewState : PyTOKEN_PRIVILEGES

The new state


win32security.GetFileSecurity

PySECURITY_DESCRIPTOR = GetFileSecurity(filename, info )

Obtains specified information about the security of a file or directory. The information obtained is constrained by the caller's access rights and privileges.

Parameters

filename : string

The name of the file

info=OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION : int

Flags that specify the information requested.


win32security.GetKernelObjectSecurity

PySECURITY_DESCRIPTOR = GetKernelObjectSecurity(handle, info )

Obtains specified information about the security of a kernel object. The information obtained is constrained by the caller's access rights and privileges.

Parameters

handle : PyHANDLE

The handle to the object

info=OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION : int

Flags that specify the information requested.


win32security.GetTokenInformation

object = GetTokenInformation(handle, TokenInformationClass , bufSize )

Retrieves a specified type of information about an access token. The calling process must have appropriate access rights to obtain the information.

Parameters

handle : PyHANDLE

The handle to query the information for.

TokenInformationClass : int

Specifies a value from the TOKEN_INFORMATION_CLASS enumerated type identifying the type of information the function retrieves.

bufSize=1024 : int

The buffer size to use to query the information

Return Value

The following types are supported

TokenInformationClass | Return type
TokenUser | (PySID,int)


win32security.GetUserObjectSecurity

PySECURITY_DESCRIPTOR = GetUserObjectSecurity(handle, info )

Obtains specified information about the security of a user object. The information obtained is constrained by the caller's access rights and privileges.

Parameters

handle : PyHANDLE

The handle to the object

info=OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION : int

Flags that specify the information requested.


win32security.ImpersonateLoggedOnUser

ImpersonateLoggedOnUser(handle)

Impersonates a logged on user.

Parameters

handle : PyHANDLE

Handle to a token that represents a logged-on user


win32security.ImpersonateNamedPipeClient

ImpersonateNamedPipeClient(handle)

Impersonates a named-pipe client application.

Parameters

handle : int

handle of a named pipe.


win32security.LogonUser

PyHANDLE = LogonUser(userName, domain , password , logonType , logonProvider )

Attempts to log a user on to the local computer, that is, to the computer from which LogonUser was called. You cannot use LogonUser to log on to a remote computer.

Parameters

userName : string

The name of the user account to log on to.

domain : string

The name of the domain, or None for the current domain

password : string

The password to use.

logonType : int

Specifies the type of logon operation to perform. Must be a combination of the LOGON32_LOGON* constants.

logonProvider : int

Specifies the logon provider to use.


win32security.LookupAccountName

PySID, string, int = LookupAccountName(systemName, accountName )

Accepts the name of a system and an account as input. It retrieves a security identifier (SID) for the account and the name of the domain on which the account was found.

Parameters

systemName : string

The system name, or None

accountName : string

The account name

Return Value

The result is a tuple of new SID object, the domain name where the account was found, and the type of account the SID is for.


win32security.LookupAccountSid

string, string, int = LookupAccountSid(systemName, sid )

Accepts a security identifier (SID) as input. It retrieves the name of the account for this SID and the name of the first domain on which this SID is found.

Parameters

systemName : string

The system name, or None

sid : PySID

The SID

Return Value

The result is a tuple of the name, the domain name where the account was found, and the type of account the SID is for.


win32security.LookupPrivilegeValue

LARGE_INTEGER = LookupPrivilegeValue(systemName, privilegeName )

Parameters

systemName : string

String specifying the system

privilegeName : string

String specifying the privilege


win32security.OpenProcessToken

int = OpenProcessToken(processHandle, desiredAccess )

Parameters

processHandle : int

The handle of the process to open.

desiredAccess : int

Desired access to process


win32security.OpenThreadToken

PyHandle = OpenThreadToken(handle, desiredAccess , openAsSelf )

Opens the access token associated with a thread.

Parameters

handle : PyHANDLE

handle to thread

desiredAccess : int

access to process

openAsSelf : int

Flag for process or thread security


win32security.RevertToSelf

RevertToSelf()

Terminates the impersonation of a client application.


win32security.SECURITY_ATTRIBUTES

PySECURITY_ATTRIBUTES = SECURITY_ATTRIBUTES()

Creates a new PySECURITY_ATTRIBUTES object.


win32security.SECURITY_DESCRIPTOR

PySECURITY_DESCRIPTOR = SECURITY_DESCRIPTOR()

Creates a new PySECURITY_DESCRIPTOR object.


win32security.SID

PySID = SID()

Creates a new PySID object.


win32security.SetFileSecurity

SetFileSecurity(filename, info, security)

Sets information about the security of a file or directory. The information obtained is constrained by the caller's access rights and privileges.

Parameters

filename : string

The name of the file

info : int

The type of information to set.

security : PySECURITY_DESCRIPTOR

The security information


win32security.SetKernelObjectSecurity

SetKernelObjectSecurity(handle, info, security)

Sets information about the security of a kernel object. The information obtained is constrained by the caller's access rights and privileges.

Parameters

handle : PyHANDLE

The handle to set.

info : int

The type of information to set.

security : PySECURITY_DESCRIPTOR

The security information


win32security.SetUserObjectSecurity

SetUserObjectSecurity(handle, info, security)

Sets information about the security of a user object. The information obtained is constrained by the caller's access rights and privileges.

Parameters

handle : PyHANDLE

The handle to set.

info : int

The type of information to set.

security : PySECURITY_DESCRIPTOR

The security information


win32service

Module win32service

An interface to the Windows NT Service API

Methods

StartService
Starts the specified service

OpenService
Returns a handle to the specified service.

OpenSCManager
Returns a handle to the service control manager

CloseServiceHandle
Closes a service handle

QueryServiceStatus
Queries a service status

SetServiceStatus
Sets a service status

ControlService
Sends a control message to a service.

DeleteService
Deletes the specified service

CreateService
Creates a new service.

ChangeServiceConfig
Changes the configuration of an existing service.

LockServiceDatabase
Locks the service database.

UnlockServiceDatabase
Unlocks the service database.

QueryServiceLockStatus
Retrieves the lock status of the specified service control manager database.


win32service.ChangeServiceConfig

int/None = ChangeServiceConfig(scHandle, serviceType , startType , errorControl , binaryFile , loadOrderGroup , bFetchTag , serviceDeps , acctName , password , displayName )

Changes the configuration of an existing service.

Parameters

scHandle : int

handle to service control manager database

serviceType : int

type of service, or SERVICE_NO_CHANGE

startType : int

When/how to start service, or SERVICE_NO_CHANGE

errorControl : int

severity if service fails to start, or SERVICE_NO_CHANGE

binaryFile : PyUnicode

name of binary file, or None

loadOrderGroup : PyUnicode

name of load ordering group , or None

bFetchTag : int

Should the tag be fetched and returned? If TRUE, the result is the tag, else None.

serviceDeps : [PyUnicode,...]

sequence of dependency names

acctName : PyUnicode

account name of service, or None

password : PyUnicode

password for service account , or None

displayName : PyUnicode

Display name


win32service.CloseServiceHandle

CloseServiceHandle(scHandle)

Closes a service handle

Parameters

scHandle : int

Handle to close


win32service.ControlService

statusObject = ControlService(scHandle, code )

Sends a control message to a service.

Parameters

scHandle : int

Handle to control

code : int

The service control code.

Return Value

The result is the new service status.


win32service.CreateService

int/(int, int) = CreateService(scHandle, name , displayName , desiredAccess , serviceType , startType , errorControl , binaryFile , loadOrderGroup , bFetchTag , serviceDeps , acctName , password )

Creates a new service.

Parameters

scHandle : int

handle to service control manager database

name : PyUnicode

Name of service

displayName : PyUnicode

Display name

desiredAccess : int

type of access to service

serviceType : int

type of service

startType : int

When/how to start service

errorControl : int

severity if service fails to start

binaryFile : PyUnicode

name of binary file

loadOrderGroup : PyUnicode

name of load ordering group , or None

bFetchTag : int

Should the tag be fetched and returned? If TRUE, the result is a tuple of (handle, tag), otherwise just handle.

serviceDeps : [PyUnicode,...]

sequence of dependency names

acctName : PyUnicode

account name of service, or None

password : PyUnicode

password for service account , or None


win32service.DeleteService

DeleteService(scHandle)

Deletes the specified service

Parameters

scHandle : int

Handle to delete


win32service.LockServiceDatabase

int = LockServiceDatabase(sc_handle)

Locks the service database.

Parameters

sc_handle : int

A handle to the SCM.


win32service.OpenSCManager

int = OpenSCManager(machineName, dbName , desiredAccess )

Returns a handle to the service control manager

Parameters

machineName : PyUnicode

The name of the computer, or None

dbName : PyUnicode

The name of the service database, or None

desiredAccess : int

The access desired.


win32service.OpenService

int = OpenService(scHandle, name , desiredAccess )

Returns a handle to the specified service.

Parameters

scHandle : int

Handle to the Service Control Mananger

name : PyUnicode

The name of the service to open.

desiredAccess : int

The access desired.


win32service.QueryServiceLockStatus

(int, PyUnicode, int) = QueryServiceLockStatus(handle)

Retrieves the lock status of the specified service control manager database.

Parameters

handle : int

Handle to the SCM.

Return Value

The result is a tuple of (bIsLocked, userName, lockDuration)


win32service.QueryServiceStatus

statusObject = QueryServiceStatus(scHandle)

Queries a service status

Parameters

scHandle : int

Handle to query


win32service.SetServiceStatus

statusObject = SetServiceStatus(scHandle, serviceStatus )

Sets a service status

Parameters

scHandle : int

Handle to set

serviceStatus : object

The new status


win32service.StartService

StartService(scHandle, args)

Starts the specified service

Parameters

scHandle : int

Handle to the Service Control Mananger

args : [string, ...]

Arguments to the service.


win32service.UnlockServiceDatabase

int = UnlockServiceDatabase(lock)

Unlocks the service database.

Parameters

lock : int

A lock provided by win32service::LockServiceDatabase


win32wnet

Module win32wnet

A module that exposes the Windows Networking API.

Methods

NETRESOURCE
Creates a new NETRESOURCE object

NCB
Creates a new NCB object

NCBBuffer
Creates a new buffer

Netbios
Executes a Netbios call.

WNetAddConnection2
Creates a connection to a network resource.

WNetCancelConnection2
Closes network connections made by WNetAddConnection2 or 3

WNetOpenEnum
Opens an Enumeration Handle for Enumerating Resources with win32wnet::WNetEnumResource

WNetCloseEnum
Closes a PyHANDLE that represents an Open Enumeration (from win32wnet::WNetOpenEnum)

WNetEnumResource
Enumerates a list of resources

WNetGetUser
Retrieves the current default user name, or the user name used to establish a network connection.

WNetGetUniversalName
Takes a drive-based path for a network resource and returns an information structure that contains a more universal form of the name.


win32wnet.NCB

NCB = NCB()

Creates a new NCB object.


win32wnet.NCBBuffer

buffer = NCBBuffer(size)

Creates an NCB buffer of the relevant size.

Parameters

size : int

The number of bytes to allocate.


win32wnet.NETRESOURCE

NETRESOURCE = NETRESOURCE()

Creates a new NETRESOURCE object.


win32wnet.Netbios

int = Netbios(ncb)

Executes a Netbios call.

Parameters

ncb : NCB

The NCB object to use for the call.


win32wnet.WNetAddConnection2

WNetAddConnection2(type, localName, remoteName, ProviderName, userName, password, flags)

Creates a connection to a network resource. The function can redirect a local device to the network resource.

Parameters

type : int

The resource type. May be either RESOURCETYPE_DISK, RESOURCETYPE_PRINT, or RESOURCETYPE_ANY (from win32netcon)

localName : string

holds the name of a local device to map connection to; may be NULL

remoteName : string

holds the passed in remote machine\\service name.

ProviderName=None : string

holds name of network provider to use (if any): NULL lets OS handle it

userName=None : string

The user name to connect as.

password=None : string

The password to use.

flags=0 : int

Specifies a DWORD value that describes connection options. The following value is currently defined.

Value Meaning
CONNECT_UPDATE_PROFILE The network resource connection should be remembered.
If this bit flag is set, the operating system automatically attempts to restore the connection when the user logs on.
The operating system remembers only successful connections that redirect local devices. It does not remember connections that are unsuccessful or deviceless connections. (A deviceless connection occurs when the lpLocalName member is NULL or points to an empty string.)
If this bit flag is clear, the operating system does not automatically restore the connection at logon.

To Do

Eventually should update this to use a NETRESOURCE object (it was written before PyNETRESOURCE)


win32wnet.WNetCancelConnection2

WNetCancelConnection2(name, flags, force)

Closes network connections made by WNetAddConnection2 or 3

Parameters

name : string

Name of existing connection to be closed

flags : int

Currently determines if the persisent connection information will be updated as a result of this call.

force : int

indicates if the close operation should be forced. (i.e. ignore open files and connections)


win32wnet.WNetCloseEnum

WNetCloseEnum(handle)

Closes a PyHANDLE that represents an Open Enumeration (from win32wnet::WNetOpenEnum)

Parameters

handle : PyHANDLE

The handle to close, as obtained from win32wnet::WNetOpenEnum

Comments

You should perform a WNetClose for each handle returned from win32wnet::WNetOpenEnum.


win32wnet.WNetEnumResource

[NETRESOURCE, ...] = WNetEnumResource(handle, maxExtries )

Enumerates a list of resources

Parameters

handle : PyHANDLE

A handle to an open Enumeration Object (from win32wnet::WNetOpenEnum)

maxExtries=64 : int

The maximum number of entries to return. enforce the PyHANDLEType, Count is optional

Comments

Successive calls to win32wnet.WNetEnumResource will enumerate starting where the previous call stopped. That is, the enumeration is not reset on successive calls UNLESS the enumeration handle is closed and reopened. This lets you process an enumeration in small chunks (as small as 1 item at a time) and still fully enumerate a network object!

Return Value

The list contains PyNETRESOURCE entries. The total number of PyNETRESOURCE entries will be <= number requested (excepting the default behavior of requesting 0, which returns up to 64)


win32wnet.WNetGetUniversalName

string/tuple = WNetGetUniversalName(localPath, infoLevel )

Takes a drive-based path for a network resource and returns an information structure that contains a more universal form of the name.

Parameters

localPath : string

A string that is a drive-based path for a network resource.
For example, if drive H has been mapped to a network drive share, and the network resource of interest is a file named SAMPLE.DOC in the directory \\WIN32\\EXAMPLES on that share, the drive-based path is H:\\WIN32\\EXAMPLES\\SAMPLE.DOC.

infoLevel=UNIVERSAL_NAME_INFO_LEVEL : int

Specifies the type of structure that the function stores in the buffer pointed to by the lpBuffer parameter. This parameter can be one of the following values.

Value | Meaning
UNIVERSAL_NAME_INFO_LEVEL (=1) | The function returns a simple string with the UNC name.
REMOTE_NAME_INFO_LEVEL (=2) | The function returns a tuple based in the Win32 REMOTE_NAME_INFO data structure.

Return Value

If the infoLevel parameter is REMOTE_NAME_INFO_LEVEL, the result is a tuple of 3 strings: (UNCName, connectionName, remainingPath)


win32wnet.WNetGetUser

string = WNetGetUser(connection)

Retrieves the current default user name, or the user name used to establish a network connection.

Parameters

connection=None : string

A string that specifies either the name of a local device that has been redirected to a network resource, or the remote name of a network resource to which a connection has been made without redirecting a local device. If this parameter is None, the system returns the name of the current user for the process.


win32wnet.WNetOpenEnum

PyHANDLE = WNetOpenEnum(scope, type , usage , resource )

Opens an Enumeration Handle for Enumerating Resources with win32wnet::WNetEnumResource

Parameters

scope : int

Specifies the scope of the enumeration.

type : int

Specifies the resource types to enumerate.

usage : int

Specifies the resource usage to be enumerated.

resource : NETRESOURCE

Python NETRESOURCE object.

Comments

See the Microsoft SDK for complete information on WNetOpenEnum.

Return Value

PyHANDLE representing the Win32 HANDLE for the open resource. This handle will be automatically be closed via win32wnet::WNetCloseEnum, but good style dictates it still be closed manually.


wincerapi

Module wincerapi

A module which provides an interface to the win32 CE Remote API

Methods

CeRapiInit
Initializes the remote API.

CeRapiUninit
UnInitializes the remote API.

CreateProcess
Creates a new process and its primary thread. The new process executes the specified executable file.

CeRapiInitEx
Initializes the remote API asynchronously.

CeCopyFile
Copies a file

CeCheckPassword
This function compares a specified string to the system password.

CeCreateFile
Creates or opens the a file or other object and returns a handle that can be used to access the object.

CeDeleteFile
Deletes a file.

CeMoveFile
Renames an existing file or a directory (including all its children).

CeCreateDirectory
Creates a directory

CeRemoveDirectory
Removes an existing directory

CeGetTempPath
Obtains the temp path on the device.

CeGetSystemInfo
Retrieves information about the CE device.

CeGetDesktopDeviceCaps
Retrieves information about the CE desktop.

CeGetSystemMetrics
Retrieves information about the CE system.

CeGetSpecialFolderPath
Retrieves the location of special folders on the CE device.

CeGetStoreInformation
Retrieves information about store on the CE system.

CeGetSystemPowerStatusEx
Retrieves the power status of the CE device.

CeSHCreateShortcut
Creates a shortcut on the remote device.

CeSHGetShortcutTarget
Retrieves the target of a shortcut.

CeGetVersionEx
Returns the current version of Windows, and information about the environment for the CE device.

CeGlobalMemoryStatus
Returns information about current memory availability.

FindFiles
Retrieves a list of matching filenames on the CE device. An interface to the API CeFindFirstFile/CeFindNextFile functions.

CeGetFileAttributes
Determines a files attributes.

CeSetFileAttributes
Changes a file's attributes.

CeGetFileSize
Determines the size of a file.

CeReadFile
Reads a file from the CE device.

WriteFile
Writes a string to a file


wincerapi.CeCheckPassword

CeCheckPassword(password)

This function compares a specified string to the system password.

Parameters

password : PyUnicode

The password to compare.


wincerapi.CeCopyFile

CeCopyFile(from, to, bFailIfExists)

Copies a file

Parameters

from : PyUnicode

The name of the file to copy from

to : PyUnicode

The name of the file to copy to

bFailIfExists : int

Indicates if the operation should fail if the file exists.


wincerapi.CeCreateDirectory

CeCreateDirectory(name, sa)

Creates a directory

Parameters

name : PyUnicode

The name of the directory to create

sa : PySECURITY_ATTRIBUTES

The security attributes, or None


wincerapi.CeCreateFile

PyCEHANDLE = CeCreateFile(fileName, desiredAccess , shareMode , attributes , creationDisposition , flagsAndAttributes , hTemplateFile )

Creates or opens the a file or other object and returns a handle that can be used to access the object.

Parameters

fileName : PyUnicode

The name of the file

desiredAccess : int

access (read-write) mode Specifies the type of access to the object. An application can obtain read access, write access, read-write access, or device query access. This parameter can be any combination of the following values.

Value | Meaning
0 | Specifies device query access to the object. An application can query device attributes without accessing the device.
GENERIC_READ | Specifies read access to the object. Data can be read from the file and the file pointer can be moved. Combine with GENERIC_WRITE for read-write access.
GENERIC_WRITE | Specifies write access to the object. Data can be written to the file and the file pointer can be moved. Combine with GENERIC_READ for read-write access.

shareMode : int

Set of bit flags that specifies how the object can be shared. If dwShareMode is 0, the object cannot be shared. Subsequent open operations on the object will fail, until the handle is closed. To share the object, use a combination of one or more of the following values:

Value | Meaning
FILE_SHARE_DELETE | Windows NT: Subsequent open operations on the object will succeed only if delete access is requested.
FILE_SHARE_READ | Subsequent open operations on the object will succeed only if read access is requested.
FILE_SHARE_WRITE | Subsequent open operations on the object will succeed only if write access is requested.

attributes : PySECURITY_ATTRIBUTES

The security attributes, or None

creationDisposition : int

Specifies which action to take on files that exist, and which action to take when files do not exist. For more information about this parameter, see the Remarks section. This parameter must be one of the following values:

Value | Meaning
CREATE_NEW | Creates a new file. The function fails if the specified file already exists.
CREATE_ALWAYS | Creates a new file. If the file exists, the function overwrites the file and clears the existing attributes.
OPEN_EXISTING | Opens the file. The function fails if the file does not exist. See the Remarks section for a discussion of why you should use the OPEN_EXISTING flag if you are using the CreateFile function for devices, including the console.
OPEN_ALWAYS | Opens the file, if it exists. If the file does not exist, the function creates the file as if dwCreationDisposition were CREATE_NEW.
TRUNCATE_EXISTING | Opens the file. Once opened, the file is truncated so that its size is zero bytes. The calling process must open the file with at least GENERIC_WRITE access. The function fails if the file does not exist.

flagsAndAttributes : int

file attributes

hTemplateFile : PyHANDLE

Specifies a handle with GENERIC_READ access to a template file. The template file supplies file attributes and extended attributes for the file being created. Under Win95, this must be 0, else an exception will be raised.

Comments

The following objects can be opened:
files
pipes
mailslots
communications resources
disk devices (Windows NT only)
consoles
directories (open only)


wincerapi.CeDeleteFile

CeDeleteFile(fileName)

Deletes a file.

Parameters

fileName : PyUnicode

The filename to delete


wincerapi.CeGetDesktopDeviceCaps

int = CeGetDesktopDeviceCaps()

Retrieves information about the CE desktop.


wincerapi.CeGetFileAttributes

int = CeGetFileAttributes(fileName)

Determines a files attributes.

Parameters

fileName : PyUnicode

Name of the file to retrieve attributes for.


wincerapi.CeGetFileSize

PyLARGE_INTEGER = CeGetFileSize()

Determines the size of a file.


wincerapi.CeGetSpecialFolderPath

PyUnicode = CeGetSpecialFolderPath()

Retrieves the location of special folders on the CE device.


wincerapi.CeGetStoreInformation

int, int = CeGetStoreInformation()

Retrieves information about store on the CE system.

Return Value

The result is a tuple of (storeSize, freeSize)


wincerapi.CeGetSystemInfo

tuple = CeGetSystemInfo()

Retrieves information about the CE device.

Win32 API References

GetSystemInfo

Return Value

The return value is a tuple of 9 values, which corresponds to the Win32 SYSTEM_INFO structure. The element names are:
dwOemId
dwPageSize
lpMinimumApplicationAddress
lpMaximumApplicationAddress
, dwActiveProcessorMask
dwNumberOfProcessors
dwProcessorType
dwAllocationGranularity
(wProcessorLevel,wProcessorRevision)


wincerapi.CeGetSystemMetrics

int = CeGetSystemMetrics()

Retrieves information about the CE system.


wincerapi.CeGetSystemPowerStatusEx

tuple = CeGetSystemPowerStatusEx()

Retrieves the power status of the CE device.

Return Value

The result is a tuple of (ACLineStatus, BatteryFlag, BatteryLifePercent, BatteryLifeTime, BatteryFullLifeTime, BackupBatteryFlag, BackupBatteryLifePercent, BackupBatteryLifeTime, BackupBatteryLifeTime);


wincerapi.CeGetTempPath

PyUnicode = CeGetTempPath()

Obtains the temp path on the device.


wincerapi.CeGetVersionEx

(int,int,int,int,string) = CeGetVersionEx()

Returns the current version of Windows, and information about the environment for the CE device.

Return Value

The return value is a tuple with the following information.


wincerapi.CeGlobalMemoryStatus

tuple = CeGlobalMemoryStatus()

Returns information about current memory availability.

Return Value

The return value is a tuple with the following information.


wincerapi.CeMoveFile

CeMoveFile(existingFileName, newFileName)

Renames an existing file or a directory (including all its children).

Parameters

existingFileName : PyUnicode

Name of the existing file

newFileName : PyUnicode

New name for the file


wincerapi.CeRapiInit

CeRapiInit()

Initializes the remote API.


wincerapi.CeRapiInitEx

int = CeRapiInitEx()

Initializes the remote API asynchronously.


wincerapi.CeRapiUninit

CeRapiUninit()

UnInitializes the remote API.


wincerapi.CeReadFile

string = CeReadFile(hFile, bufSize )

Reads a file from the CE device.

Parameters

hFile : PyHANDLE/int

Handle to the file

bufSize : int

Size of the buffer to create for the read.


wincerapi.CeRemoveDirectory

CeRemoveDirectory(lpPathName)

Removes an existing directory

Parameters

lpPathName : PyUnicode

Name of the path to remove.


wincerapi.CeSHCreateShortcut

CeSHCreateShortcut()

Creates a shortcut on the remote device.


wincerapi.CeSHGetShortcutTarget

tuple = CeSHGetShortcutTarget()

Retrieves the target of a shortcut.


wincerapi.CeSetFileAttributes

CeSetFileAttributes(filename, newAttributes)

Changes a file's attributes.

Parameters

filename : PyUnicode

filename

newAttributes : int

attributes to set


wincerapi.CreateProcess

PyHANDLE, PyHANDLE, int, int = CreateProcess(appName, commandLine , processAttributes , threadAttributes , bInheritHandles , dwCreationFlags , newEnvironment , currentDirectory , startupinfo )

Creates a new process and its primary thread. The new process executes the specified executable file.

Parameters

appName : string

name of executable module, or None

commandLine : string

command line string, or None

processAttributes : PySECURITY_ATTRIBUTES

process security attributes, or None

threadAttributes : PySECURITY_ATTRIBUTES

thread security attributes, or None

bInheritHandles : int

handle inheritance flag

dwCreationFlags : int

creation flags

newEnvironment : None

A dictionary of stringor Unicode pairs to define the environment for the process, or None to inherit the current environment.

currentDirectory : string

current directory name, or None

startupinfo : PySTARTUPINFO

a STARTUPINFO object that specifies how the main window for the new process should appear.

Comments

The result is a tuple of (hProcess, hThread, dwProcessId, dwThreadId)


wincerapi.FindFiles

list = FindFiles(fileSpec)

Retrieves a list of matching filenames on the CE device. An interface to the API CeFindFirstFile/CeFindNextFile functions.

Parameters

fileSpec : PyUnicode

A string that specifies a valid directory or path and filename, which can contain wildcard characters (* and ?).

Win32 API References

CeFindFirstFile

FindNextFile

CloseHandle

Return Value

The return value is a list of tuples, in the same format as the WIN32_FIND_DATA structure:

Items

[0] int : attributes

File Attributes. A combination of the win32com.FILE_ATTRIBUTE_* flags.

[1] PyTime : createTime

File creation time.

[2] PyTime : accessTime

File access time.

[3] PyTime : writeTime

Time of last file write

[4] int : nFileSizeHigh

high order word of file size.

[5] int : nFileSizeLow

low order word of file size.

[6] int : OID

The object identifier for the file

[7] int : zero

Filler

[8] string : fileName

The name of the file.

[9] None : altName

Always None


wincerapi.WriteFile

int, int = WriteFile(hFile, data )

Writes a string to a file

Parameters

hFile : PyHANDLE/int

Handle to the file

data : string

The data to write.

Return Value

The result is a tuple of (errCode, nBytesWritten). errCode will always be zero (until overlapped IO is supported!)


Objects

  • COMMTIMEOUTS
  • connection
  • cursor
  • Dialog Header Tuple
  • Dialog Item Tuple
  • LARGE_INTEGER
  • NCB
  • NETRESOURCE
  • PyACL
  • PyCEHANDLE
  • PyCOMSTAT
  • PyDCB
  • PyDDEConv
  • PyDDEServer
  • PyDDEStringItem
  • PyDDETopic
  • PyEventLogRecord
  • PyGROUP_INFO_*
  • PyGROUP_INFO_0
  • PyGROUP_INFO_1
  • PyGROUP_INFO_1002
  • PyGROUP_INFO_1005
  • PyGROUP_INFO_2
  • PyGROUP_USERS_INFO_*
  • PyGROUP_USERS_INFO_0
  • PyGROUP_USERS_INFO_1
  • PyHANDLE
  • PyHH_AKLINK
  • PyHH_FTS_QUERY
  • PyHH_POPUP
  • PyHH_WINTYPE
  • PyHHN_NOTIFY
  • PyHHNTRACK
  • PyHKEY
  • PyIID
  • PyLOCALGROUP_INFO_*
  • PyLOCALGROUP_INFO_0
  • PyLOCALGROUP_INFO_1
  • PyLOCALGROUP_INFO_1002
  • PyLOCALGROUP_MEMBERS_INFO_*
  • PyLOCALGROUP_MEMBERS_INFO_0
  • PyLOCALGROUP_MEMBERS_INFO_1
  • PyLOCALGROUP_MEMBERS_INFO_2
  • PyLOCALGROUP_MEMBERS_INFO_3
  • PyLOGFONT
  • PyNMHDR
  • PyOVERLAPPED
  • PyOVERLAPPEDReadBuffer
  • PyPERF_COUNTER_DEFINITION
  • PyPERF_OBJECT_TYPE
  • PyPerfMonManager
  • PySCROLLINFO
  • PySECURITY_ATTRIBUTES
  • PySECURITY_DESCRIPTOR
  • PySERVER_INFO_*
  • PySERVER_INFO_100
  • PySERVER_INFO_101
  • PySERVER_INFO_102
  • PySERVER_INFO_402
  • PySERVER_INFO_403
  • PySERVER_INFO_502
  • PySERVER_INFO_503
  • PySHARE_INFO_*
  • PySHARE_INFO_0
  • PySHARE_INFO_1
  • PySHARE_INFO_2
  • PySHARE_INFO_501
  • PySHARE_INFO_502
  • PySID
  • PySTARTUPINFO
  • PyTime
  • PyTOKEN_PRIVILEGES
  • PyUnicode
  • PyUSE_INFO*
  • PyUSE_INFO_0
  • PyUSE_INFO_1
  • PyUSE_INFO_2
  • PyUSE_INFO_3
  • PyUSER_INFO_*
  • PyUSER_INFO_0
  • PyUSER_INFO_1
  • PyUSER_INFO_10
  • PyUSER_INFO_1003
  • PyUSER_INFO_1005
  • PyUSER_INFO_1006
  • PyUSER_INFO_1007
  • PyUSER_INFO_1008
  • PyUSER_INFO_1009
  • PyUSER_INFO_1010
  • PyUSER_INFO_1011
  • PyUSER_INFO_11
  • PyUSER_INFO_2
  • PyUSER_INFO_20
  • PyUSER_INFO_3
  • PyUSER_MODALS_INFO_*
  • PyUSER_MODALS_INFO_0
  • PyUSER_MODALS_INFO_1
  • PyUSER_MODALS_INFO_2
  • PyUSER_MODALS_INFO_3
  • PyWKSTA_INFO_*
  • PyWKSTA_INFO_100
  • PyWKSTA_INFO_101
  • PyWKSTA_INFO_102
  • PyWKSTA_INFO_302
  • PyWKSTA_INFO_402
  • PyWKSTA_INFO_502
  • PyWKSTA_TRANSPORT_INFO_*
  • PyWKSTA_TRANSPORT_INFO_0
  • PyWKSTA_USER_INFO_*
  • PyWKSTA_USER_INFO_0
  • PyWKSTA_USER_INFO_1
  • PyWNDCLASS
  • RASDIALEXTENSIONS
  • RASDIALPARAMS
  • ULARGE_INTEGER


COMMTIMEOUTS

COMMTIMEOUTS Object

A tuple representing a COMMTIMEOUTS structure.

Items

[0] int : ReadIntervalTimeout

[1] int : ReadTotalTimeoutMultiplier

[2] int : ReadTotalTimeoutConstant

[3] int : WriteTotalTimeoutMultiplier

[4] int : WriteTotalTimeoutConstant


Dialog Header Tuple

Dialog Header Tuple Object

A tuple describing a dialog box, that can be used to create the dialog.

Comments

For further information, see the win32 SDK for documentation on the DLGTEMPLATE structure.

Items

[0] string : caption

The caption for the window

[1] (int,int,int,int) : (x,y,cx,cy)

The bounding rectange for the dialog.

[2] int : style

The style bits for the dialog. Combination of WS_* and DS_* constants. Note that the DS_SETFONT style need never be specified - it is determined by the font item (below)
The following dialog style flags can be used.

DS_3DLOOK Gives the dialog box a nonbold font and draws three-dimensional borders around control windows in the dialog box.
The DS_3DLOOK style is required only by Win32-based applications compiled for versions of Windows earlier than Windows 95 or Windows NT 4.0. The system automatically applies the three-dimensional look to dialog boxes created by applications compiled for current versions of Windows. DS_ABSALIGN Indicates that the coordinates of the dialog box are screen coordinates. If this style is not specified, Windows assumes they are client coordinates. DS_CENTER Centers the dialog box in the working area; that is, the area not obscured by the tray. DS_CENTERMOUSE Centers the mouse cursor in the dialog box. DS_CONTEXTHELP Includes a question mark in the title bar of the dialog box. When the user clicks the question mark, the cursor changes to a question mark with a pointer. If the user then clicks a control in the dialog box, the control receives a WM_HELP message. The control should pass the message to the dialog box procedure, which should call the WinHelp function using the HELP_WM_HELP command. The Help application displays a pop-up window that typically contains help for the control.
Note that DS_CONTEXTHELP is only a placeholder. When the dialog box is created, the system checks for DS_CONTEXTHELP and, if it is there, adds WS_EX_CONTEXTHELP to the extended style of the dialog box. WS_EX_CONTEXTHELP cannot be used with the WS_MAXIMIZEBOX or WS_MINIMIZEBOX styles. DS_CONTROL Creates a dialog box that works well as a child window of another dialog box, much like a page in a property sheet. This style allows the user to tab among the control windows of a child dialog box, use its accelerator keys, and so on. DS_FIXEDSYS Causes the dialog box to use the SYSTEM_FIXED_FONT instead of the default SYSTEM_FONT. SYSTEM_FIXED_FONT is a monospace font compatible with the System font in Windows versions earlier than 3.0. DS_LOCALEDIT Applies to 16-bit applications only. This style directs edit controls in the dialog box to allocate memory from the application's data segment. Otherwise, edit controls allocate storage from a global memory object. DS_MODALFRAME Creates a dialog box with a modal dialog-box frame that can be combined with a title bar and System menu by specifying the WS_CAPTION and WS_SYSMENU styles. DS_NOFAILCREATE Windows 95 only: Creates the dialog box even if errors occur - for example, if a child window cannot be created or if the system cannot create a special data segment for an edit control. DS_NOIDLEMSG Suppresses WM_ENTERIDLE messages that Windows would otherwise send to the owner of the dialog box while the dialog box is displayed. DS_SETFOREGROUND Causes the system to use the SetForegroundWindow function to bring the dialog box to the foreground. DS_SYSMODAL Creates a system-modal dialog box. This style causes the dialog box to have the WS_EX_TOPMOST style, but otherwise has no effect on the dialog box or the behavior of other windows in the system when the dialog box is displayed.
[3] int : extStyle

The extended style bits for the dialog.

[4] (int, string) : (fontSize, fontName)

A tuple describing the font, or None if the system default font is to be used.

[5] string/int : menuResource

The resource ID of the menu to be used for the dialog, or None for no menu.

[6] string/int : windowClass

The window class for the dialog, or None. If an int, the value must be an atom returned from RegisterWindowClass.


Dialog Item Tuple

Dialog Item Tuple Object

A tuple describing a control in a dialog box.

Comments

For further information, see the win32 SDK for documentation on the DLGITEMTEMPLATE structure.

Items

[0] string/int : windowClass

The window class. If not a string, it must be in integer defining one of the built-in Windows controls. If a string, it must be a pre-registered windows class name, a built-in class, or the CLSID of an OLE controls. Built-in classes include:

Control Type | String Class Name
Check Box | Button
Combo Box | ComboBox
Command Button | Button
Header | SysHeader32
Label | Static
List Box | ListBox SysListView32
Option Button | Button
Tab | SysTabControl32
Text Box | Edit RICHEDIT
Tool Bar | ToolbarWindow32
Tool Tips | tooltips_class32 tooltips_class
Tree View | SysTreeView32 The built-in windows controls are:

Integer Value | Window Type
0x0080 | Button
0x0081 | Edit
0x0082 | Static
0x0083 | List box
0x0084 | Scroll bar
0x0085 | Combo box

[1] text : caption

Caption for the control, or None

[2] int : ID

The child ID of this control. All children should have unique IDs. This ID can be used by PyCDialog::GetDlgItem to retrieve the actual control object at runtime.

[3] (int,int,int,int) : (x,y,cx,cy)

The bounding rectange for the control, relative to the upper left of the dialog, in dialog units..

[4] int : style

The window style of the control (WS_* constants). Depending on the type of control, other constants may also be valid (eg, BS_* for Button, ES_* for Edit controls, etc).

[5] int : extStyle

The extended style of the control.

[6] string : extraData

A string of bytes used as extra data for the control. The value depends on the control.


LARGE_INTEGER

LARGE_INTEGER Object

A Python object used wherever a COM LARGE_INTEGER is used.

Comments

Please see pywintypes::ULARGE_INTEGER for a description.


NCB

NCB Object

A Python object that encapsulates a Win32 NCB structure.

Properties

int Command

int Retcode

int Lsn

int Num

int Bufflen
read-only

string Callname
- The strings need to be space padded to 16 chars exactly

string Name
- The strings need to be space padded to 16 chars exactly

string Rto
- The strings need to be space padded to 16 chars exactly

string Sto
- The strings need to be space padded to 16 chars exactly

int Lana_num

int Cmd_cplt

int Event

int Post


NETRESOURCE

NETRESOURCE Object

A Python object that encapsulates a Win32 NETRESOURCE structure.

Properties

integer dwScope

integer dwType

integer dwDisplayType

integer dwUsage

string localName

string remoteName

string comment

string provider


PyACL

PyACL Object

A Python object, representing a ACL structure

Methods

Initialize
Initialize the ACL.

AddAccessAllowedAce
Adds an access-allowed ACE to an ACL object.

AddAccessDeniedAce
Adds an access-denied ACE to an ACL object.


PyACL.AddAccessAllowedAce

AddAccessAllowedAce(access, sid)

Adds an access-allowed ACE to an ACL object. The access is granted to a specified SID.

Parameters

access : int

Specifies the mask of access rights to be granted to the specified SID.

sid : PySID

A SID object representing a user, group, or logon account being granted access.


PyACL.AddAccessDeniedAce

AddAccessDeniedAce(access, sid)

Adds an access-denied ACE to an ACL object. The access is denied to a specified SID.

Parameters

access : int

Specifies the mask of access rights to be denied to the specified SID.

sid : PySID

A SID object representing a user, group, or logon account being denied access.


PyACL.Initialize

Initialize()

Initialize the ACL.

Comments

It should not be necessary to call this, as the ACL object is initialised by Python. This method gives you a chance to trap any errors that may occur.


PyCEHANDLE

PyCEHANDLE Object

A Python object, representing a remote Windows CE handle


PyCOMSTAT

PyCOMSTAT Object

A Python object, representing an COMSTAT structure

Properties

integer cbInQue
Specifies the number of bytes received by the serial provider but not yet read by a win32file::ReadFile operation

integer cbOutQue
Specifies the number of bytes of user data remaining to be transmitted for all write operations. This value will be zero for a nonoverlapped write.

integer fCtsHold
Specifies whether transmission is waiting for the CTS (clear-to-send) signal to be sent. If this member is TRUE, transmission is waiting.

integer fDsrHold
Specifies whether transmission is waiting for the DSR (data-set-ready) signal to be sent. If this member is TRUE, transmission is waiting.

integer fRlsdHold
Specifies whether transmission is waiting for the RLSD (receive-line-signal-detect) signal to be sent. If this member is TRUE, transmission is waiting.

integer fXoffHold
Specifies whether transmission is waiting because the XOFF character was received. If this member is TRUE, transmission is waiting.

integer fXoffSent
Specifies whether transmission is waiting because the XOFF character was transmitted. If this member is TRUE, transmission is waiting. Transmission halts when the XOFF character is transmitted to a system that takes the next character as XON, regardless of the actual character.

integer fEof
Specifies whether the end-of-file (EOF) character has been received. If this member is TRUE, the EOF character has been received.

integer fTxim
If this member is TRUE, there is a character queued for transmission that has come to the communications device by way of the TransmitCommChar function. The communications device transmits such a character ahead of other characters in the device's output buffer.

integer fReserved
Reserved; do not use.


PyDCB

PyDCB Object

A Python object, representing an DCB structure

Comments

Typically you query a device for its DCB using win32file::GetCommState, change any setting necessary, then call win32file::SetCommState with the new structure. TRUE*/)

Properties

integer BaudRate
current baud rate

integer wReserved
not currently used

integer XonLim
transmit XON threshold

integer XoffLim
transmit XOFF threshold

integer ByteSize
number of bits/byte, 4-8

integer Parity
0-4=no,odd,even,mark,space

integer StopBits
0,1,2 = 1, 1.5, 2

character XonChar
Tx and Rx XON character

character XoffChar
Tx and Rx XOFF character

character ErrorChar
error replacement character

character EofChar
end of input character

character EvtChar
received event character

integer wReserved1
reserved; do not use

integer fBinary
binary mode, no EOF check

integer fParity
enable parity checking

integer fOutxCtsFlow
CTS output flow control

integer fOutxDsrFlow
DSR output flow control

integer fDtrControl
DTR flow control type

integer fDsrSensitivity
DSR sensitivity

integer fTXContinueOnXoff
XOFF continues Tx

integer fOutX
XON/XOFF out flow control

integer fInX
XON/XOFF in flow control

integer fErrorChar
enable error replacement

integer fNull
enable null stripping

integer fRtsControl
RTS flow control

integer fAbortOnError
abort on error

integer fDummy2
reserved


PyDDEConv

PyDDEConv Object

A DDE topic.

Methods

ConnectTo
Connects to a server

Connected
Determines if a connection has been made.

Exec
Executes a command.

Request
Sends a request.

Poke
Sends a poke. sentinel


PyDDEConv.ConnectTo

ConnectTo(service, topic)

Connects to a server

Parameters

service : string

The service to connect to

topic : string

The topic to connect to


PyDDEConv.Connected

Connected()

Determines if the conversation is connected.


PyDDEConv.Exec

Exec(service, topic)

Executes a command.

Parameters

service : string

The service to connect to

topic : string

The topic to connect to


PyDDEConv.Poke

Poke()

Sends a poke.


PyDDEConv.Request

Request()

Sends a request.


PyDDEServer

PyDDEServer Object

A DDE server.

Methods

AddTopic
Adds a topic to the server.

Create
Creates a DDE server

Destroy
Destroys the underlying C++ object.

GetLastError
Returns the last DDE error.

Shutdown
Shutsdown the server. sentinel


PyDDEServer.AddTopic

AddTopic(topic)

Parameters

topic : PyDDETopic

The topic to add.


PyDDEServer.Create

Create(name, filterFlags)

Create a server

Parameters

name : string

Name of the server to start.

filterFlags=0 : int

Filter flags.

Comments

Note there can only be one server per application.


PyDDEServer.Destroy

Destroy()


PyDDEServer.GetLastError

int = GetLastError()


PyDDEServer.Shutdown

Shutdown()

Comments

Note the underlying DDE object (ie, Server, Topics and Items) are not cleaned up by this call.


PyDDEStringItem

PyDDEStringItem Object

A DDE string item.

Methods

SetData
Sets an items data, and causes any underlying notification. sentinel


PyDDEStringItem.Destroy

Destroy()

Destroys an item


PyDDEStringItem.SetData

SetData(data)

Sets an items data, and causes any underlying notification.

Parameters

data : string

The data to set.


PyDDETopic

PyDDETopic Object

A DDE topic.

Methods

AddItem
Add an item to the topic.

Destroy
Destroys an item sentinel


PyDDETopic.AddItem

AddItem(item)

Add an item to the topic.

Parameters

item : PyDDEItem

The item to add


PyDDETopic.Destroy

Destroy()

Destroys an item


PyEventLogRecord

PyEventLogRecord Object

An object containing the data in an EVENTLOGRECORD.

Properties

integer Reserved

integer RecordNumber

PyTime TimeGenerated

PyTime TimeWritten

integer EventID

integer EventType

integer EventCategory

integer ReservedFlags

integer ClosingRecordNumber

PyUnicode SourceName

(PyUnicode,...) StringInserts

PySID Sid

string Data

PyUnicode ComputerName


PyGROUP_INFO_*

PyGROUP_INFO_* Object

The following GROUP_INFO levels are supported.

Level | Data
0 | PyGROUP_INFO_0
1 | PyGROUP_INFO_1
2 | PyGROUP_INFO_2
1002 | PyGROUP_INFO_1002
1005 | PyGROUP_INFO_1005


PyGROUP_INFO_0

PyGROUP_INFO_0 Object

A dictionary holding the information in a Win32 GROUP_INFO_0 structure.

Properties

string/PyUnicode name
Name of the group


PyGROUP_INFO_1

PyGROUP_INFO_1 Object

A dictionary holding the information in a Win32 GROUP_INFO_1 structure.

Properties

string/PyUnicode name
Name of the group

string/PyUnicode comment
The group's comment.


PyGROUP_INFO_1002

PyGROUP_INFO_1002 Object

A dictionary holding the information in a Win32 GROUP_INFO_1002 structure.

Properties

string/PyUnicode comment


PyGROUP_INFO_1005

PyGROUP_INFO_1005 Object

A dictionary holding the information in a Win32 GROUP_INFO_1005 structure.

Properties

int attributes


PyGROUP_INFO_2

PyGROUP_INFO_2 Object

A dictionary holding the information in a Win32 GROUP_INFO_2 structure.

Properties

string/PyUnicode name
Name of the group

string/PyUnicode comment
The group's comment.

int group_id

int attributes


PyGROUP_USERS_INFO_*

PyGROUP_USERS_INFO_* Object

The following GROUP_USERS_INFO levels are supported.

Level | Data
0 | PyGROUP_USERS_INFO_0
1 | PyGROUP_USERS_INFO_1


PyGROUP_USERS_INFO_0

PyGROUP_USERS_INFO_0 Object

A dictionary holding the information in a Win32 GROUP_USERS_INFO_0 structure.

Properties

string/PyUnicode name
Name of the group or user


PyGROUP_USERS_INFO_1

PyGROUP_USERS_INFO_1 Object

A dictionary holding the information in a Win32 GROUP_USERS_INFO_1 structure.

Properties

string/PyUnicode name
Name of the group or user

int attributes


PyHANDLE

PyHANDLE Object

A Python object, representing a win32 HANDLE.

Comments

This object wraps a win32 HANDLE object, automatically closing it when the object is destroyed. To guarantee cleanup, you can call either PyHANDLE::Close, or win32api::CloseHandle.
Most functions which accept a handle object also accept an integer - however, use of the handle object is encouraged.

Methods

Close
Closes the handle

Detach
Detaches the Win32 handle from the handle object.

__nonzero__
Used for detecting true/false.

__int__
Used when an integer representation of the handle object is required.

__print__
Used when the object is printed. tp_print

__cmp__
Used when HANDLE objects are compared. tp_compare

__hash__
Used when the hash value of an object is required tp_hash

__str__
Used when a string representation is required tp_str

Properties

integer handle
The win32 handle itself, as an integer. Sentinel


PyHANDLE.Close

Close()

Closes the underlying Win32 handle.

Comments

If the handle is already closed, no error is raised.


PyHANDLE.Detach

int = Detach()

Detaches the Win32 handle from the handle object.

Comments

After calling this function, the handle is effectively invalidated, but the handle is not closed. You would call this function when you need the underlying win32 handle to exist beyond the lifetime of the handle object.

Return Value

The result is the value of the handle before it is detached. If the handle is already detached, this will return zero.


PyHANDLE.__cmp__

int = __cmp__()

Used when objects are compared.


PyHANDLE.__hash__

int = __hash__()

Used when the hash value of a HANDLE object is required


PyHANDLE.__int__

__int__()

Used when the handle as an integer is required.

Comments

To get the underling win32 handle from a PyHANDLE object, use int(handleObject)


PyHANDLE.__nonzero__

__nonzero__()

Used for detecting true/false.

Return Value

The result is 1 if the attached handle is non zero, else 0. static*/ int PyHANDLE::nonzeroFunc(PyObject *ob)


PyHANDLE.__print__

__print__()

Used when the HANDLE object is printed.


PyHANDLE.__str__

__str__()

Used when a string representation of the handle object is required.


PyHHNTRACK

PyHHNTRACK Object

A Python object, representing an HHNTRACK structure

Comments

Typically you create a PyHHNTRACK (via win32help::HHNTRACK) object, and set its properties. The object can then be passed to any function which takes an HHNTRACK object.

This structure returns the file name of the current topic and a constant that specfies the user action that is about to occur, such as hiding the Navigation pane by clicking the Hide button on the toolbar.

Used by
HHN_TRACK

Properties

int action
Specifies the action the user is about to take. This is an HHACT_ constant.

NMHDR hdr
Standard WM_NOTIFY header(win32help::NMHDR).

string curUrl
A multi-byte, zero-terminated string that specifies the topic navigated to, or the name of the help window being created.

HH_WINTYPE winType
A pointer to the current HH_WINTYPE structure (win32help::HH_WINTYPE).


PyHHN_NOTIFY

PyHHN_NOTIFY Object

A Python object, representing an HHN_NOTIFY structure

Comments

Typically you create a PyHHN_NOTIFY (via win32help::HHN_NOTIFY) object, and set its properties. The object can then be passed to any function which takes an HHN_NOTIFY object.

Use this structure to return the file name of the topic that has been navigated to, or to return the window type name of the help window that has been created.

Used by
HHN_NAVCOMPLETE
HHN_WINDOW_CREATE

Properties

NMHDR hdr
Standard WM_NOTIFY header.(win32help::NMHDR)

string url
A multi-byte, zero-terminated string that specifies the topic navigated to, or the name of the help window being created.


PyHH_AKLINK

PyHH_AKLINK Object

A Python object, representing an HH_AKLINK structure

Comments

Typically you create a PyHH_AKLINK (via win32help::HH_AKLINK) object, and set its properties. The object can then be passed to any function which takes an HH_AKLINK object.

Use this structure to specify one or more ALink names or KLink keywords that you want to search for.

If the lookup yields no matching topics, HtmlHelp() checks the values of the following HH_AKLINK members to determine what alternative action to take:

indexOnFail. If indexOnFail is TRUE, the Index tab is selected in the help window specified in window, and the keyword specified in keyword is selected in the entry field.

url. If indexOnFail is FALSE, the topic file specified in url appears in the help window specified in window.
msgText and msgTitle. If indexOnFail is FALSE and url is NULL, a message box appears using the text and caption specified in msgText and msgTitle.

Used by
HH_ALINK_LOOKUP
HH_KEYWORD_LOOKUP

Properties

int indexOnFail
Specifies whether to display the keyword in the Index tab of the HTML Help Viewer if the lookup fails. The value of window specifies the Help Viewer.

string keywords
Specifies one or more ALink names or KLink keywords to look up. Multiple entries are delimited by a semicolon.

string url
Specifies the topic file to navigate to if the lookup fails. url refers to a valid topic within the specified compiled help (.chm) file and does not support Internet protocols that point to an HTML file.

string msgText
Specifies the text to display in a message box if the lookup fails and indexOnFail is FALSE and url is NULL.

string msgTitle
Specifies the caption of the message box in which the msgText parameter appears.

string window
Specifies the name of the window type in which to display one of the following:

The selected topic, if the lookup yields one or more matching topics. The topic specified in url, if the lookup fails and a topic is specified in url.

The Index tab, if the lookup fails and indexOnFail is specified as TRUE.


PyHH_FTS_QUERY

PyHH_FTS_QUERY Object

A Python object, representing an HH_FTS_QUERY structure

Comments

Typically you create a PyHH_FTS_QUERY (via win32help::HH_FTS_QUERY) object, and set its properties. The object can then be passed to any function which takes an HH_FTS_QUERY object.

Use this structure for full-text search.

Properties

int uniCodeStrings
TRUE if all strings are Unicode.

long proximity
Word proximity.

int stemmedSearch
TRUE for StemmedSearch only.

int titleOnly
TRUE for Title search only.

int execute
TRUE to initiate the search.

string searchQuery
String containing the search query.


PyHH_POPUP

PyHH_POPUP Object

A Python object, representing an HH_POPUP structure

Comments

Typically you create a PyHH_POPUP (via win32help::HH_POPUP) object, and set its properties. The object can then be passed to any function which takes an HH_POPUP object.

Use this structure to specify or modify the attributes of a pop-up window.

Used by
HH_DISPLAY_TEXT_POPUP

Properties

long hinst
Instance handle of the program or DLL to retrieve the string resource from. Ignored if idString is zero.

unsigned int idString
Specifies zero, or a resource ID in the program or DLL specified in hinst.

int clrForeground
Specifies the RGB value to use for the foreground color of the pop-up window. To use the system color for the window text, specify -1.

int clrBackground
Specifies the RGB value to use for the background color of the pop-up window. To use the system color for the window background, specify -1.

string text
Specifies the text to display if idString is zero.

string font
Specifies the font attributes to use for the text in the pop-up window.
Use the following format to specify font family, point size, character set, and font format:
facename[, point size[, charset[ BOLD ITALIC UNDERLINE]]]
To omit an attribute, enter a comma. For example, to specify bold, 10-pt, MS Sans Serif font, font would be:
MS Sans Serif, 10, , BOLD

tuple pt
(x,y). Specifies (in pixels) where the top center of the pop-up window should be located.

tuple margins
(left,top,right,bottom). Specifies (in pixels) the margins to use on the left, top, right, and bottom sides of the pop-up window. The default for all rectangle members is -1.


PyHH_WINTYPE

PyHH_WINTYPE Object

A Python object, representing an HH_WINTYPE structure

Comments

Typically you create a PyHH_WINTYPE (via win32help::HH_WINTYPE) object, and set its properties. The object can then be passed to any function which takes an HH_WINTYPE object.

Use this structure to specify or modify the attributes of a window type. Window types can be defined by an author in a project (.hhp) file, or they can be defined programmatically using the HTML Help API.
When a HH_WINTYPE structure is passed to HtmlHelp() using the HH_SET_WIN_TYPE command, the HTML Help API makes a private copy of the contents of the structure. The help developer is therefore responsible for freeing memory used by the HH_WINTYPE structure or character arrays within it. The help developer can free memory after calling HH_SET_WIN_TYPE .

Used by
HH_SET_WIN_TYPE
HH_GET_WIN_TYPE

Properties

int uniCodeStrings
Specifies whether the strings used in this structure are UNICODE.

int validMembers
Specifies which members in the structure are valid.

int winProperties
Specifies the properties of the window, such as whether it is the standard HTML Help Viewer or whether it includes a Search tab.

int styles
Specifies the styles used to create the window. These styles can be ignored, combined with extended styles, or used exclusively depending on the value of the validMembers and winProperties parameters.

int exStyles
Specifies the extended styles used to create the window. These styles can be ignored, combined with default styles, or used exclusively depending on the value of the validMembers and winProperties parameters.

int showState
Specifies the initial display state of the window. Valid values are the same as those for the Win32 API ShowWindow function.

int hwndHelp
Specifies the handle of the window if the window has been created.

int hwndCaller
Specifies the window that will receive HTML Help notification messages. Notification messages are sent via Windows WM_NOTIFY messages.

int hwndToolBar
Specifies the handle of the toolbar.

int hwndNavigation
Specifies the handle of the Navigation pane.

int hwndHTML
Specifies the handle of the Topic pane, which hosts Shdocvw.dll.

int navWidth
Specifies the width of the Navigation pane when the Help Viewer is expanded.

int toolBarFlags
Specifies which buttons to include on the toolbar.

int notExpanded
Specifies that the Help Viewer open with the Navigation pane closed.

int curNavType
Specifies the default tab to display on the Navigation pane.

int idNotify
Specifies a non-zero ID for enabling HTML Help notification messages. This ID is passed as the wParam value of Windows WM_NOTIFY messages.

string typeName
A null-terminated string that specifies the name of the window type.

string caption
A null-terminated string that specifies the caption to display in the title bar of the window.

tuple windowPos
(left,top,right,bottom). Specifies the coordinates of the window in pixels.

tuple HTMLPos
(left,top,right,bottom). Specifies the coordinates of the Topic pane.

string toc
Specifies the contents (.hhc) file to display in the Navigation pane.

string index
Specifies the index (.hhk) file to display in the Navigation pane.

string file
Specifies the default HTML file to display in the Topic pane.

string home
Specifies the file or URL to display in the Topic pane when the Home button is clicked.

string jump1
Specifies the text to display underneath the Jump1 button.

string jump2
Specifies the text to display underneath the Jump2 button.

string urlJump1
Specifies the URL to jump to when the Jump1 button is clicked.

string urlJump2
Specifies the URL to jump to when the Jump2 button is clicked.


PyHKEY

PyHKEY Object

A Python object, representing a win32 HKEY (a HANDLE> to a registry key). See the PyHANDLE object for more details


PyIID

PyIID Object

A Python object, representing an IID/CLSID.
All pythoncom functions that return a CLSID/IID will return one of these objects. However, in almost all cases, functions that expect a CLSID/IID as a param will accept either a string object, or a native PyIID object.

Methods

__print__
Used when the IID object is printed. tp_print

__cmp__
Used when IID objects are compared. tp_compare

__hash__
Used when the hash value of an IID object is required tp_hash

__str__
Used whenever a string representation of the IID is required. tp_str


PyIID.__cmp__

int = __cmp__()

Used when IID objects are compared.


PyIID.__hash__

int = __hash__()

Used when the hash value of an IID object is required


PyIID.__print__

__print__()

Used when the IID object is printed.


PyIID.__str__

string = __str__()

Used whenever a string representation of the IID is required.


PyLOCALGROUP_INFO_*

PyLOCALGROUP_INFO_* Object

The following LOCALGROUP_INFO levels are supported.

Level | Data
0 | PyLOCALGROUP_INFO_0
1 | PyLOCALGROUP_INFO_1
1002 | PyLOCALGROUP_INFO_1002


PyLOCALGROUP_INFO_0

PyLOCALGROUP_INFO_0 Object

A dictionary holding the information in a Win32 LOCALGROUP_INFO_0 structure.

Properties

string/PyUnicode name
Name of the group


PyLOCALGROUP_INFO_1

PyLOCALGROUP_INFO_1 Object

A dictionary holding the information in a Win32 LOCALGROUP_INFO_1 structure.

Properties

string/PyUnicode name
Name of the group

string/PyUnicode comment
The group's comment.


PyLOCALGROUP_INFO_1002

PyLOCALGROUP_INFO_1002 Object

A dictionary holding the information in a Win32 LOCALGROUP_INFO_1002 structure.

Properties

string/PyUnicode comment


PyLOCALGROUP_MEMBERS_INFO_*

PyLOCALGROUP_MEMBERS_INFO_* Object

The following LOCALGROUP_MEMBER_INFO levels are supported.

Level | Data
0 | PyLOCALGROUP_MEMBERS_INFO_0
1 | PyLOCALGROUP_MEMBERS_INFO_1
2 | PyLOCALGROUP_MEMBERS_INFO_2
3 | PyLOCALGROUP_MEMBERS_INFO_3


PyLOCALGROUP_MEMBERS_INFO_0

PyLOCALGROUP_MEMBERS_INFO_0 Object

A dictionary holding the information in a Win32 LOCALGROUP_MEMBERS_INFO_0 structure.

Properties

PySID sid


PyLOCALGROUP_MEMBERS_INFO_1

PyLOCALGROUP_MEMBERS_INFO_1 Object

A dictionary holding the information in a Win32 LOCALGROUP_MEMBERS_INFO_1 structure.

Properties

PySID sid

int sidusage

string/PyUnicode name


PyLOCALGROUP_MEMBERS_INFO_2

PyLOCALGROUP_MEMBERS_INFO_2 Object

A dictionary holding the information in a Win32 LOCALGROUP_MEMBERS_INFO_2 structure.

Properties

PySID sid

int sidusage

string/PyUnicode domainandname
string containing the name of the member prefixed by the domain name and the "\\" separator character


PyLOCALGROUP_MEMBERS_INFO_3

PyLOCALGROUP_MEMBERS_INFO_3 Object

A dictionary holding the information in a Win32 LOCALGROUP_MEMBERS_INFO_3 structure.

Properties

string/PyUnicode domainandname
string containing the name of the member prefixed by the domain name and the "\\" separator character


PyLOGFONT

PyLOGFONT Object

A Python object, representing an PyLOGFONT structure

Comments

Typically you create a PyLOGFONT object, and set its properties. The object can then be passed to any function which takes an LOGFONT object

Properties

integer lfHeight

integer lfWidth

integer lfEscapement

integer lfOrientation

integer lfWeight

integer lfItalic

integer lfUnderline

integer lfStrikeOut

integer lfCharSet

integer lfOutPrecision

integer lfClipPrecision

integer lfQuality

integer lfPitchAndFamily


PyNMHDR

PyNMHDR Object

A Python object, representing an NMHDR structure

Comments

Typically you create a PyNMHDR (via win32help::NMHDR) object, and set its properties. The object can then be passed to any function which takes an NMHDR object.

Contains information about a notification message.

Properties

int hwndFrom
Window handle to the control sending a message.

unsigned int idFrom
Identifier of the control sending a message.

unsigned int code
Notification code. This member can be a control-specific notification code or it can be one of the common notification codes.


PyOVERLAPPED

PyOVERLAPPED Object

A Python object, representing an overlapped structure

Comments

Typically you create a PyOVERLAPPED object, and set its hEvent property. The object can then be passed to any function which takes an OVERLAPPED object, and the object attributes will be automatically updated. TRUE*/)

Methods

__cmp__
Used when OVERLAPPED objects are compared. tp_compare

Properties

integer Internal
Reserved for operating system use.

integer InternalHigh
Reserved for operating system use.

integer Offset
Specifies a file position at which to start the transfer. The file position is a byte offset from the start of the file. The calling process sets this member before calling the ReadFile or WriteFile function. This member is ignored when reading from or writing to named pipes and communications devices.

integer OffsetHigh
Specifies the high word of the byte offset at which to start the transfer.

integer/PyHANDLE hEvent
Identifies an event set to the signaled state when the transfer has been completed. The calling process sets this member before calling the win32file::ReadFile, win32file::WriteFile, win32pipe::ConnectNamedPipe, or win32pipe::TransactNamedPipe function.

object object
Any python object that you want to attach to your overlapped I/O request.


PyOVERLAPPED.__cmp__

int = __cmp__()

Used when objects are compared.

Properties

integer/PyHANDLE hEvent
Identifies an event set to the signaled state when the transfer has been completed. The calling process sets this member before calling the win32file::ReadFile, win32file::WriteFile, win32pipe::ConnectNamedPipe, or win32pipe::TransactNamedPipe function.

object object
Any python object that you want to attach to your overlapped I/O request.


PyOVERLAPPEDReadBuffer

PyOVERLAPPEDReadBuffer Object

An alias for a standard Python buffer object. Previous versions of the Windows extensions had a custom object for holding a read buffer. This has been replaced with the standard Python buffer object.
Python does not provide a method for creating a read-write buffer of arbitary size, so currently this can only be created by win32file::AllocateReadBuffer.


PyPERF_COUNTER_DEFINITION

PyPERF_COUNTER_DEFINITION Object

An object encapsulating a Windows NT Performance Monitor counter definition (PERF_COUNTER_DEFINITION).

Comments

Note that all the counter "set" functions will silently do nothing if the counter does not appear in a block. This is so the application can avoid excessive tests for lack of performance monitor functionality. However, the method PyPERF_COUNTER_DEFINITION::Get will raise a ValueError exception in this case.

Methods

Increment
Increments the value of the performance counter

Decrement
Decrements the value of the performance counter

Set
Sets the counter to a specific value

Get
Gets the current value of the counter

Properties

integer DefaultScale
The default scale of the counter.

integer DetailLevel
The detail level of the counter.

integer CounterType
The counter type.

integer CounterNameTitleIndex

integer CounterHelpTitleIndex
Sentinel


PyPERF_COUNTER_DEFINITION.Decrement

Decrement()

Decrements the value of the performance counter


PyPERF_COUNTER_DEFINITION.Get

Get()

Gets the current value of the counter


PyPERF_COUNTER_DEFINITION.Increment

Increment()

Increments the value of the performance counter


PyPERF_COUNTER_DEFINITION.Set

Set()

Sets the counter to a specific value


PyPERF_OBJECT_TYPE

PyPERF_OBJECT_TYPE Object

A Python object, representing a PERF_OBJECT_TYPE structure

Methods

Close
Closes all counters.

Properties

integer ObjectNameTitleIndex

integer ObjectHelpTitleIndex

integer DefaultCounterIndex
Sentinel


PyPERF_OBJECT_TYPE.Close

Close()

Closes the object.


PyPerfMonManager

PyPerfMonManager Object

A Python object

Methods

Close
Closes all counters.


PyPerfMonManager.Close

Close()

Closes the performance monitor manager.


PySCROLLINFO

PySCROLLINFO Object

A tuple representing a SCROLLINFO structure

Items

[0] int : addnMask

Additional mask information. Python automatically fills the mask for valid items, so currently the only valid values are zero, and win32con.SIF_DISABLENOSCROLL.

[1] int : min

The minimum scrolling position. Both min and max, or neither, must be provided.

[2] int : max

The maximum scrolling position. Both min and max, or neither, must be provided.

[3] int : page

Specifies the page size. A scroll bar uses this value to determine the appropriate size of the proportional scroll box.

[4] int : pos

Specifies the position of the scroll box.

[5] int : trackPos

Specifies the immediate position of a scroll box that the user is dragging. An application can retrieve this value while processing the SB_THUMBTRACK notification message. An application cannot set the immediate scroll position; the PyCWnd::SetScrollInfo function ignores this member.

Comments

When passed to Python, will always be a tuple of size 6, and items may be None if not available.

When passed from Python, it must have the addn mask attribute, but all other items may be None, or not exist.
userob is any Python object at all, but no reference count is kept, so you must ensure the object remains referenced throught the lists life.


PySECURITY_ATTRIBUTES

PySECURITY_ATTRIBUTES Object

A Python object, representing a SECURITY_ATTRIBUTES structure

Methods

Initialize
Initializes the object.

SetSecurityDescriptorDacl

Properties

integer bInheritHandle
Specifies whether the returned handle is inherited when a new process is created. If this member is TRUE, the new process inherits the handle. Sentinel


PySECURITY_ATTRIBUTES.Initialize

Initialize()

Initialize the ACL.

Comments

It should not be necessary to call this, as the ACL object is initialised by Python. This method gives you a chance to trap any errors that may occur.


PySECURITY_ATTRIBUTES.SetSecurityDescriptorDacl

SetSecurityDescriptorDacl()


PySECURITY_DESCRIPTOR

PySECURITY_DESCRIPTOR Object

A Python object, representing a SECURITY_DESCRIPTOR structure

Methods

Initialize
Initializes the object.

SetDacl
Sets information in a discretionary access-control list.

Comments

Note the PySECURITY_DESCRIPTOR object supports the buffer interface. Thus buffer(sd) can be used to obtain the raw bytes. tp_as_buffer


PySECURITY_DESCRIPTOR.Initialize

Initialize()

Initialize the SD.


PySECURITY_DESCRIPTOR.SetDacl

SetDacl(bPresent, acl, bDaclDefaulted)

Sets information in a discretionary access-control list.

Parameters

bPresent : int

A flag indicating if the SE_DACL_PRESENT flag should be set.

acl : PyACL

The ACL to set. If None, a NULL ACL will be created allowing world access.

bDaclDefaulted : int

A flag indicating if the SE_DACL_DEFAULTED flag should be set.

Comments

This method is also known by the alias SetSecurityDescriptorDacl


PySERVER_INFO_*

PySERVER_INFO_* Object

The following SERVER_INFO levels are supported.

Level | Data
100 | PySERVER_INFO_100
101 | PySERVER_INFO_101
102 | PySERVER_INFO_102
402 | PySERVER_INFO_402
403 | PySERVER_INFO_403
502 | PySERVER_INFO_502
503 | PySERVER_INFO_503


PySERVER_INFO_100

PySERVER_INFO_100 Object

A dictionary holding the information in a Win32 SERVER_INFO_100 structure.

Properties

int platform_id

string/PyUnicode name


PySERVER_INFO_101

PySERVER_INFO_101 Object

A dictionary holding the information in a Win32 SERVER_INFO_101 structure.

Properties

int platform_id

string/PyUnicode name

int version_major

int version_minor

int type
one of the SV_TYPE_* constants

string/PyUnicode comment


PySERVER_INFO_102

PySERVER_INFO_102 Object

A dictionary holding the information in a Win32 SERVER_INFO_102 structure.

Properties

int platform_id

string/PyUnicode name

int version_major

int version_minor

int type
one of the SV_TYPE_* constants

string/PyUnicode comment

int users

int disc

bool hidden

int announce

int anndelta

string/PyUnicode userpath


PySERVER_INFO_402

PySERVER_INFO_402 Object

A dictionary holding the information in a Win32 SERVER_INFO_402 structure.

Properties

int ulist_mtime

int glist_mtime

int alist_mtime

int security

int numadmin

int lanmask

string/PyUnicode guestacct

int chdevs

int chdevq

int chdevjobs

int connections

int shares

int openfiles

int sessopens

int sessvcs

int sessreqs

int opensearch

int activelocks

int numreqbuf

int sizreqbuf

int numbigbuf

int numfiletasks

int alertsched

int erroralert

int logonalert

int accessalert

int diskalert

int netioalert

int maxauditsz

string/PyUnicode srvheuristics


PySERVER_INFO_403

PySERVER_INFO_403 Object

A dictionary holding the information in a Win32 SERVER_INFO_403 structure.

Properties

int ulist_mtime

int glist_mtime

int alist_mtime

int security

int numadmin

int lanmask

string/PyUnicode guestacct

int chdevs

int chdevq

int chdevjobs

int connections

int shares

int openfiles

int sessopens

int sessvcs

int sessreqs

int opensearch

int activelocks

int numreqbuf

int sizreqbuf

int numbigbuf

int numfiletasks

int alertsched

int erroralert

int logonalert

int accessalert

int diskalert

int netioalert

int maxauditsz

string/PyUnicode srvheuristics

int auditedevents

int autoprofile

string/PyUnicode autopath


PySERVER_INFO_502

PySERVER_INFO_502 Object

A dictionary holding the information in a Win32 SERVER_INFO_502 structure.

Properties

int sessopens

int sessvcs

int opensearch

int sizreqbuf

int initworkitems

int maxworkitems

int rawworkitems

int irpstacksize

int maxrawbuflen

int sessusers

int sessconns

int maxpagedmemoryusage

int maxnonpagedmemoryusage

bool enableforcedlogoff

bool timesource

bool acceptdownlevelapis

bool lmannounce


PySERVER_INFO_503

PySERVER_INFO_503 Object

A dictionary holding the information in a Win32 SERVER_INFO_503 structure.

Properties

int sessopens

int sessvcs

int opensearch

int sizreqbuf

int initworkitems

int maxworkitems

int rawworkitems

int irpstacksize

int maxrawbuflen

int sessusers

int sessconns

int maxpagedmemoryusage

int maxnonpagedmemoryusage

bool enableforcedlogoff

bool timesource

bool acceptdownlevelapis

bool lmannounce

string/PyUnicode domain

int maxkeepsearch

int scavtimeout

int minrcvqueue

int minfreeworkitems

int xactmemsize

int threadpriority

int maxmpxct

int oplockbreakwait

int oplockbreakresponsewait

bool enableoplocks

bool enablefcbopens

bool enableraw

bool enablesharednetdrives

int minfreeconnections

int maxfreeconnections


PySHARE_INFO_*

PySHARE_INFO_* Object

The following SHARE_INFO levels are supported.

Level | Data
0 | PySHARE_INFO_0
1 | PySHARE_INFO_1
2 | PySHARE_INFO_2
501 | PySHARE_INFO_501
502 | PySHARE_INFO_502


PySHARE_INFO_0

PySHARE_INFO_0 Object

A dictionary holding the infomation in a Win32 SHARE_INFO_0 structure.

Properties

string/PyUnicode netname


PySHARE_INFO_1

PySHARE_INFO_1 Object

A dictionary holding the infomation in a Win32 SHARE_INFO_1 structure.

Properties

string/PyUnicode netname

int type

string/PyUnicode remark


PySHARE_INFO_2

PySHARE_INFO_2 Object

A dictionary holding the infomation in a Win32 SHARE_INFO_2 structure.

Properties

string/PyUnicode netname

int type

string/PyUnicode remark

int permissions

int max_uses

int current_uses

string/PyUnicode path

string/PyUnicode passwd


PySHARE_INFO_501

PySHARE_INFO_501 Object

A dictionary holding the infomation in a Win32 SHARE_INFO_501 structure.

Properties

string/PyUnicode netname

int type

string/PyUnicode remark

int flags


PySHARE_INFO_502

PySHARE_INFO_502 Object

A dictionary holding the infomation in a Win32 SHARE_INFO_502 structure.

Properties

string/PyUnicode netname

int type

string/PyUnicode remark

int permissions

int max_uses

int current_uses

string/PyUnicode path

string/PyUnicode passwd

int reserved

PySECURITY_DESCRIPTOR security_descriptor


PySID

PySID Object

A Python object, representing a SID structure

Methods

Initialize
Initialize the SID.

IsValid
Determines if the SID is valid.

SetSubAuthority
Sets a SID SubAuthority

__cmp__
Used when objects are compared. tp_compare

Comments

Note the PySID object supports the buffer interface. Thus buffer(sid) can be used to obtain the raw bytes. tp_as_buffer


PySID.Initialize

Initialize(idAuthority, numSubauthorities)

Initialize the SID.

Parameters

idAuthority : SID_IDENTIFIER_AUTHORITY

The identifier authority.

numSubauthorities : int

The number of sub authorities to allocate.


PySID.IsValid

IsValid()

Determines if the SID is valid.


PySID.SetSubAuthority

SetSubAuthority(index, val)

Sets a SID SubAuthority

Parameters

index : int

The index of the sub authority to set

val : int

The value for the sub authority

Comments

See the function GetSidSubAuthority


PySID.__cmp__

int = __cmp__()

Used when objects are compared.

Comments

This method calls the Win32 API function EqualSid


PySTARTUPINFO

PySTARTUPINFO Object

A Python object, representing an STARTUPINFO structure

Comments

Typically you create a PySTARTUPINFO (via win32process::STARTUPINFO) object, and set its properties. The object can then be passed to any function which takes an STARTUPINFO object.

Properties

integer dwX
Specifies the x offset, in pixels, of the upper left corner of a window if a new window is created. The offset is from the upper left corner of the screen.

integer dwY
Specifies the y offset, in pixels, of the upper left corner of a window if a new window is created. The offset is from the upper left corner of the screen.

integer dwXSize
Specifies the width, in pixels, of the window if a new window is created.

integer dwYSize
Specifies the height, in pixels, of the window if a new window is created.

integer dwXCountChars
For console processes, if a new console window is created, specifies the screen buffer width in character columns. This value is ignored in a GUI process.

integer dwYCountChars
For console processes, if a new console window is created, specifies the screen buffer height in character rows.

integer dwFillAttribute
Specifies the initial text and background colors if a new console window is created in a console application. These values are ignored in GUI applications

integer dwFlags
This is a bit field that determines whether certain STARTUPINFO attributes are used when the process creates a window. To use many of the additional attributes, you typically must set the appropriate mask in this attribute, and also set the attributes themselves. Any combination of the win32con.STARTF_* flags can be specified.

integer/PyHANDLE hStdInput

integer/PyHANDLE hStdOutput

integer/PyHANDLE hStdError

string/None lpDesktop

string/None lpTitle


PyTOKEN_PRIVILEGES

PyTOKEN_PRIVILEGES Object

An object representing Win32 token privileges.

Comments

This is a sequence (eg, list) of (id, attributes)


PyTime

PyTime Object

A Python object, representing an instant in time.

Comments

A PyTime object is used primarily when exchanging date/time information with other COM objects.
Using int(timeObject) will return an integer compatible with the time module.

Example

To return a simple string

time.ctime(int(timeObject))
To return a string formatted as the long date in control panel

time.strftime("%#c", time.localtime(int(timeObject)))

See Also

pywintypes::Time

Methods

Format
Formats the time value

__int__
Used when an integer representation of the time object is required.

__float__
Used when a floating point representation of the time object is required.

__print__
Used when the time object is printed. tp_print

__cmp__
Used when time objects are compared. tp_compare

__hash__
Used when the hash value of an time object is required tp_hash


PyTime.Format

PyUnicode = Format(format)

Formats the time value.

Parameters

format=%c : string

The format. See the comments section for a description of the supported flags.

Comments

The following format characters are supported.

%a Abbreviated weekday name %A Full weekday name %b Abbreviated month name %B Full month name %c Date and time representation appropriate for locale %d Day of month as decimal number (01 - 31) %H Hour in 24-hour format (00 - 23) %I Hour in 12-hour format (01 - 12) %j Day of year as decimal number (001 - 366) %m Month as decimal number (01 - 12) %M Minute as decimal number (00 - 59) %p Current locale's A.M./P.M. indicator for 12-hour clock %S Second as decimal number (00 - 59) %U Week of year as decimal number, with Sunday as first day of week (00 - 51) %w Weekday as decimal number (0 - 6; Sunday is 0) %W Week of year as decimal number, with Monday as first day of week (00 - 51) %x Date representation for current locale %X Time representation for current locale %y Year without century, as decimal number (00 - 99) %Y Year with century, as decimal number %z, %Z Time-zone name or abbreviation; no characters if time zone is unknown %% Percent sign As in the printf function, the # flag may prefix any formatting code. In that case, the meaning of the format code is changed as follows.

Format Code | Meaning
%#a, %#A, %#b, %#B, %#p, %#X, %#z, %#Z, %#% | # flag is ignored.
%#c | Long date and time representation, appropriate for current locale. For example: "Tuesday, March 14, 1995, 12:41:29".
%#x | Long date representation, appropriate to current locale. For example: "Tuesday, March 14, 1995".
%#d, %#H, %#I, %#j, %#m, %#M, %#S, %#U, %#w, %#W, %#y, %#Y | Remove leading zeros (if any).


PyTime.__cmp__

int = __cmp__()

Used when time objects are compared.


PyTime.__float__

__float__()

Used when a floating point representation of the time object is required.


PyTime.__hash__

int = __hash__()

Used when the hash value of an time object is required


PyTime.__int__

__int__()

Used when an integer representation of the time object is required.

Return Value

The integer result can be used with the time module. Please see the main description for the PyTime object.


PyTime.__print__

__print__()

Used when the time object is printed.


PyUSER_INFO_*

PyUSER_INFO_* Object

The following USER_INFO levels are supported.

Level | Data
0 | PyUSER_INFO_0
1 | PyUSER_INFO_1
2 | PyUSER_INFO_2
3 | PyUSER_INFO_3
10 | PyUSER_INFO_10
11 | PyUSER_INFO_11
20 | PyUSER_INFO_20
1003 | PyUSER_INFO_1003
1005 | PyUSER_INFO_1005
1006 | PyUSER_INFO_1006
1007 | PyUSER_INFO_1007
1008 | PyUSER_INFO_1008
1009 | PyUSER_INFO_1009
1010 | PyUSER_INFO_1010
1011 | PyUSER_INFO_1011


PyUSER_INFO_0

PyUSER_INFO_0 Object

A dictionary holding the information in a Win32 USER_INFO_0 structure.

Properties

string/PyUnicode name


PyUSER_INFO_1

PyUSER_INFO_1 Object

A dictionary holding the information in a Win32 USER_INFO_1 structure.

Properties

string/PyUnicode name

string/PyUnicode password

int password_age

int priv

string/PyUnicode home_dir

string/PyUnicode comment

int flags

string/PyUnicode script_path


PyUSER_INFO_10

PyUSER_INFO_10 Object

A dictionary holding the information in a Win32 USER_INFO_10 structure.

Properties

string/PyUnicode name

string/PyUnicode comment

string/PyUnicode usr_comment

string/PyUnicode full_name


PyUSER_INFO_1003

PyUSER_INFO_1003 Object

A dictionary holding the information in a Win32 USER_INFO_1003 structure.

Properties

string/PyUnicode password


PyUSER_INFO_1005

PyUSER_INFO_1005 Object

A dictionary holding the information in a Win32 USER_INFO_1005 structure.

Properties

int priv


PyUSER_INFO_1006

PyUSER_INFO_1006 Object

A dictionary holding the information in a Win32 USER_INFO_1006 structure.

Properties

string/PyUnicode home_dir


PyUSER_INFO_1007

PyUSER_INFO_1007 Object

A dictionary holding the information in a Win32 USER_INFO_1007 structure.

Properties

string/PyUnicode comment


PyUSER_INFO_1008

PyUSER_INFO_1008 Object

A dictionary holding the information in a Win32 USER_INFO_1008 structure.

Properties

int flags


PyUSER_INFO_1009

PyUSER_INFO_1009 Object

A dictionary holding the information in a Win32 USER_INFO_1009 structure.

Properties

string/PyUnicode script_path


PyUSER_INFO_1010

PyUSER_INFO_1010 Object

A dictionary holding the information in a Win32 USER_INFO_1010 structure.

Properties

int auth_flags


PyUSER_INFO_1011

PyUSER_INFO_1011 Object

A dictionary holding the information in a Win32 USER_INFO_1011 structure.

Properties

string/PyUnicode full_name


PyUSER_INFO_11

PyUSER_INFO_11 Object

A dictionary holding the information in a Win32 USER_INFO_11 structure.

Properties

string/PyUnicode name

string/PyUnicode comment

string/PyUnicode usr_comment

string/PyUnicode full_name

int priv

int auth_flags

int password_age

string/PyUnicode home_dir

string/PyUnicode parms

int last_logon

int last_logoff

int bad_pw_count

int num_logons

string/PyUnicode logon_server

int country_code

string/PyUnicode workstations

int max_storage

int units_per_week

string logon_hours

int code_page


PyUSER_INFO_2

PyUSER_INFO_2 Object

A dictionary holding the information in a Win32 USER_INFO_2 structure.

Properties

string/PyUnicode name

string/PyUnicode password

int password_age

int priv

string/PyUnicode home_dir

string/PyUnicode comment

int flags

string/PyUnicode script_path

int auth_flags

string/PyUnicode full_name

string/PyUnicode usr_comment

string/PyUnicode parms

string/PyUnicode workstations

int last_logon

int last_logoff

int acct_expires

int max_storage

int units_per_week

string logon_hours

int bad_pw_count

int num_logons

string/PyUnicode logon_server

int country_code

int code_page


PyUSER_INFO_20

PyUSER_INFO_20 Object

A dictionary holding the information in a Win32 USER_INFO_20 structure.

Properties

string/PyUnicode name

string/PyUnicode full_name

string/PyUnicode comment

int flags

int user_id


PyUSER_INFO_3

PyUSER_INFO_3 Object

A dictionary holding the information in a Win32 USER_INFO_3 structure.

Properties

string/PyUnicode name

string/PyUnicode password

int password_age

int priv

string/PyUnicode home_dir

string/PyUnicode comment

int flags

string/PyUnicode script_path

int auth_flags

string/PyUnicode full_name

string/PyUnicode usr_comment

string/PyUnicode parms

string/PyUnicode workstations

int last_logon

int last_logoff

int acct_expires

int max_storage

int units_per_week

string logon_hours

int bad_pw_count

int num_logons

string/PyUnicode logon_server

int country_code

int code_page

int user_id

int primary_group_id

string/PyUnicode profile

string/PyUnicode home_dir_drive

int password_expired


PyUSER_MODALS_INFO_*

PyUSER_MODALS_INFO_* Object

The following USER_MODALS_INFO levels are supported.

Level | Data
0 | PyUSER_MODALS_INFO_0
1 | PyUSER_MODALS_INFO_1
2 | PyUSER_MODALS_INFO_2
3 | PyUSER_MODALS_INFO_3


PyUSER_MODALS_INFO_0

PyUSER_MODALS_INFO_0 Object

A dictionary holding the information in a Win32 USER_MODALS_INFO_0 structure.

Properties

int min_passwd_len

int max_passwd_age

int min_passwd_age

int force_logoff

int password_hist_len


PyUSER_MODALS_INFO_1

PyUSER_MODALS_INFO_1 Object

A dictionary holding the information in a Win32 USER_MODALS_INFO_1 structure.

Properties

int role

string/PyUnicode primary


PyUSER_MODALS_INFO_2

PyUSER_MODALS_INFO_2 Object

A dictionary holding the information in a Win32 USER_MODALS_INFO_2 structure.

Properties

string/PyUnicode domain_name

int domain_id


PyUSER_MODALS_INFO_3

PyUSER_MODALS_INFO_3 Object

A dictionary holding the information in a Win32 USER_MODALS_INFO_3 structure.

Properties

int lockout_duration

int lockout_observation_window

int usrmod3_lockout_threshold


PyUSE_INFO*

PyUSE_INFO* Object

The following USE_INFO levels are supported.

Level | Data
0 | PyUSE_INFO_0
1 | PyUSE_INFO_1
2 | PyUSE_INFO_2
3 | PyUSE_INFO_3


PyUSE_INFO_0

PyUSE_INFO_0 Object

A dictionary holding the infomation in a Win32 USE_INFO_0 structure.

Properties

string/PyUnicode local

string/PyUnicode remote


PyUSE_INFO_1

PyUSE_INFO_1 Object

A dictionary holding the infomation in a Win32 USE_INFO_1 structure.

Properties

string/PyUnicode local

string/PyUnicode remote

strng/PyUnicode password

int status

int asg_type

int refcount

int usecount


PyUSE_INFO_2

PyUSE_INFO_2 Object

A dictionary holding the infomation in a Win32 USE_INFO_2 structure.

Properties

string/PyUnicode local

string/PyUnicode remote

strng/PyUnicode password

int status

int asg_type

int refcount

int usecount

string/PyUnicode username

string/PyUnicode domainname


PyUSE_INFO_3

PyUSE_INFO_3 Object

A dictionary holding the infomation in a Win32 USE_INFO_3 structure.

Properties

string/PyUnicode local

string/PyUnicode remote

strng/PyUnicode password

int status

int asg_type

int refcount

int usecount

string/PyUnicode username

string/PyUnicode domainname

int flags


PyUnicode

PyUnicode Object

A Python object, representing a Unicode string.

Comments

A PyUnicode object is used primarily when exchanging string information across a COM interface.

Methods

__print__
Used when the object is printed. tp_print

__cmp__
Used when Unicode objects are compared. tp_compare

__repr__
Used when repr(object) is used. tp_repr

__hash__
Used when the hash value of an object is required tp_hash

__str__
Used when an (8-bit) string representation is required tp_str


PyUnicode.__cmp__

int = __cmp__()

Used when objects are compared.


PyUnicode.__hash__

int = __hash__()

Used when the hash value of a Unicode object is required


PyUnicode.__print__

__print__()

Used when the Unicode object is printed.


PyUnicode.__repr__

__repr__()

Used when repr(object) is used.

Comments

Note the format is L'string' and that the string portion is currently not escaped, as Python does for normal strings.


PyUnicode.__str__

__str__()

Used when a (8-bit) string representation of the Unicode object is required.


PyWKSTA_INFO_*

PyWKSTA_INFO_* Object

The following WKSTA_INFO levels are supported.

Level | Data
100, | PyWKSTA_INFO_100
101, | PyWKSTA_INFO_101
102, | PyWKSTA_INFO_102
502, | PyWKSTA_INFO_502


PyWKSTA_INFO_100

PyWKSTA_INFO_100 Object

A dictionary holding the infomation in a Win32 WKSTA_INFO_100 structure.

Properties

int platform_id
Indicates platform level to use to retrieve platform specific information

string/PyUnicode computername
Name of the local computer

string/PyUnicode langroup
Name of the domain to which computer belongs

int ver_major
Major version number of operating system running on the computer

int ver_minor
Minor version number of operating system running on the computer


PyWKSTA_INFO_101

PyWKSTA_INFO_101 Object

A dictionary holding the infomation in a Win32 WKSTA_INFO_101 structure.

Properties

int platform_id
Indicates platform level to use to retrieve platform specific information

string/PyUnicode computername
Name of the local computer

string/PyUnicode langroup
Name of the domain to which computer belongs

int ver_major
Major version number of operating system running on the computer

int ver_minor
Minor version number of operating system running on the computer

string/PyUnicode lanroot
Path to the LANMAN directory


PyWKSTA_INFO_102

PyWKSTA_INFO_102 Object

A dictionary holding the infomation in a Win32 WKSTA_INFO_102 structure.

Properties

int platform_id
Indicate platform level to use to retrieve platform specific information

string/PyUnicode computername
Name of the local computer

string/PyUnicode langroup
Name of the domain to which computer belongs

int ver_major
Major version number of operating system running on the computer

int ver_minor
Minor version number of operating system running on the computer

string/PyUnicode lanroot
Path to the LANMAN directory

int logged_on_users
Number of users who are logged on to the local computer


PyWKSTA_INFO_302

PyWKSTA_INFO_302 Object

A dictionary holding the infomation in a Win32 WKSTA_INFO_302 structure.

Properties

int char_wait
number of seconds the computer will wait for a remote resource to become available

int collection_time
number of milliseconds the computer will collect data before sending the data to a character device resource. The workstation waits the specified time or collects the number of characters specified by wki302_maximum_collection_count, whichever comes first.

int maximum_collection_count
Specifies the number of bytes of information the computer will collect before sending the data to a character device resource. The workstation collects the specified number of bytes or waits the time specified by wki302_collection_time, whichever comes first.

int keep_conn
Specifies the number of seconds the server will maintain an inactive connection to a resource.

int keep_search
Defines the number of seconds an inactive search will continue.

int max_cmds
Specifies the number of simultaneous network device driver commands that can be sent to the network.

int num_work_buf
Specifies the number of internal buffers the computer has.

int siz_work_buf
Specifies the size, in bytes, of each internal buffer.

int max_wrk_cache
Specifies the maximum size, in bytes, of an internal cache buffer.

int max_wrk_cache
Indicates the number of seconds the server waits before disconnecting an inactive session.

int siz_error
Specifies the size, in bytes, of an internal error buffer.

int num_alerts
Specifies the maximum number of clients that can receive alert messages. (This member is not supported under MS-DOS.) The Alerter service registers at least three clients when it begins to run.

int num_services
Specifies the number of services that can be installed on the computer at any time.

int errlog_sz
Specifies the maximum size, in kilobytes, of the client's error log file.

int print_buf_time
Specifies the number of seconds the server waits before closing inactive compatibility-mode print jobs.

int num_char_buf
Specifies the number of character pipe buffers and device buffers the client can have.

int siz_char_buf
Specifies the maximum size, in bytes, of a character pipe buffer and device buffer.

string/PyUnicode wrk_heuristics
Pointer to a Unicode string of flags used to control a client's operation.

int mailslots
Specifies the maximum number of mailslots allowed.

int num_dgram_buf
Specifies the number of buffers to allocate for receiving datagrams.


PyWKSTA_INFO_402

PyWKSTA_INFO_402 Object

A dictionary holding the infomation in a Win32 WKSTA_INFO_402 structure.

Properties

int number of seconds the computer will wait for a remote resource to become available

int number of milliseconds the computer will collect data before sending the data to a character device resource. The workstation waits the specified time or collects the number of characters specified by wki402_maximum_collection_count, whichever comes first.

string/PyUnicode Name of the domain to which computer belongs

int Major version number of operating system running on the computer

int Minor version number of operating system running on the computer

int ..

int Number of users who are logged on to the local computer

int Number of users who are logged on to the local computer

int ..

int ..

int ..

int ..

int ..

int ..

int ..

int ..

int siz_char_buf
Specifies the maximum size, in bytes, of a character pipe buffer and device buffer.

string/PyUnicode ..

int ..

int ..

int Number of threads the computer can dedicate to the network


PyWKSTA_INFO_502

PyWKSTA_INFO_502 Object

A dictionary holding the infomation in a Win32 WKSTA_INFO_502 structure.

Properties

int char_wait
number of seconds the computer will wait for a remote resource to become available

int collection_time
number of milliseconds the computer will collect data before sending the data to a character device resource. The workstation waits the specified time or collects the number of characters specified by wki502_maximum_collection_count, whichever comes first.

int maximum_collection_count
Specifies the number of bytes of information the computer will collect before sending the data to a character device resource. The workstation collects the specified number of bytes or waits the time specified by wki302_collection_time, whichever comes first.

int keep_conn
Specifies the number of seconds the server will maintain an inactive connection to a resource.

int max_cmds
Specifies the number of simultaneous network device driver commands that can be sent to the network.

int max_wrk_cache
Indicates the number of seconds the server waits before disconnecting an inactive session.

int siz_char_buf
Specifies the maximum size, in bytes, of a character pipe buffer and device buffer.

int lock_quota
TODO

int lock_increment
TODO

int lock_maximum
TODO

int pipe_increment
TODO

int pipe_maximum
TODO

int cache_file_timeout
TODO

int dormant_file_limit
TODO

int read_ahead_throughput
TODO

int num_mailslot_buffers
TODO

int num_srv_announce_buffers
TODO

int max_illegal_datagram_events
TODO

int illegal_datagram_event_reset_frequency
TODO

bool log_election_packets
TODO

bool use_opportunistic_locking
TODO

bool use_unlock_behind
TODO

bool use_close_behind
TODO

bool buf_named_pipes
TODO

bool use_lock_read_unlock
TODO

bool utilize_nt_caching
TODO

bool use_raw_read
TODO

bool use_raw_write
TODO

bool use_write_raw_data
TODO

bool use_encryption
TODO

bool buf_files_deny_write
TODO

bool buf_read_only_files
TODO

bool force_core_create_mode
TODO

bool use_512_byte_max_transfer
TODO


PyWKSTA_TRANSPORT_INFO_*

PyWKSTA_TRANSPORT_INFO_* Object

The following WKSTA_TRANSPORT_INFO levels are supported.

Level | Data
0, | PyWKSTA_TRANSPORT_INFO_0


PyWKSTA_TRANSPORT_INFO_0

PyWKSTA_TRANSPORT_INFO_0 Object

A dictionary holding the infomation in a Win32 WKSTA_TRANSPORT_INFO_0 structure.

Properties

int quality_of_service
Supplies a value that specifies the search order of the transport protocol with respect to other transport protocols. The highest value is searched first.

int number_of_vcs
Specifies the number of clients communicating with the server using this transport protocol.

string/PyUnicode transport_name
Specifies the device name of the transport protocol.

string/PyUnicode transport_address
Specifies the address of the server on this transport protocol.

bool wan_ish
This member is ignored by the NetWkstaTransportAdd function. For the NetWkstaTransportEnum function, this member indicates that this transport protocol is a WAN transport protocol. This member is set TRUE for NetBIOS/TCIP; it is set FALSE for NetBEUI and NetBIOS/IPX.


PyWKSTA_USER_INFO_*

PyWKSTA_USER_INFO_* Object

The following WKSTA_USER_INFO levels are supported.

Level | Data
0, | PyWKSTA_USER_INFO_0
1, | PyWKSTA_USER_INFO_1


PyWKSTA_USER_INFO_0

PyWKSTA_USER_INFO_0 Object

A dictionary holding the infomation in a Win32 WKSTA_USER_INFO_0 structure.

Properties

string/PyUnicode username
Name of user currently logged on to the workstation


PyWKSTA_USER_INFO_1

PyWKSTA_USER_INFO_1 Object

A dictionary holding the infomation in a Win32 WKSTA_USER_INFO_1 structure.

Properties

string/PyUnicode username
Name of user currently logged on to the workstation

string/PyUnicode logon_domain
Returns the domain name of the user account of the user currently logged on to the workstation.

string/PyUnicode oth_domains
Returns the list of other operating system domains browsed by the workstation. The domain names are separated by blanks.

string/PyUnicode logon_server
Returns the name of the computer that authenticated the server.


PyWNDCLASS

PyWNDCLASS Object

A Python object, representing an WNDCLASS structure

Comments

Typically you create a PyWNDCLASS object, and set its properties. The object can then be passed to any function which takes an WNDCLASS object

Properties

integer style

integer cbWndExtra

integer hInstance

integer hIcon

integer hCursor

integer hbrBackground

Methods

SetDialogProc
Sets the WNDCLASS to be for a dialog box.

string/PyUnicode lpszMenuName

string/PyUnicode lpszClassName

function lpfnWndProc


RASDIALEXTENSIONS

RASDIALEXTENSIONS Object

An object that describes a Win32 RASDIALPARAMS structure TRUE*/)

Properties

integer dwfOptions
(fOptions may also be used)

integer hwndParent

integer reserved

integer reserved1

RASEAPINFO RasEapInfo


RASDIALPARAMS

RASDIALPARAMS Object

A tuple that describes a Win32 RASDIALPARAMS structure

Comments

When used as a parameter, RASDIALPARAMS must be a sequence, of up to 6 items long. All items must be strings - None is not allowed.
When this is returned from a RAS function, all six fields will exist.
RAS will often accept an empty string to mean "default" - ie, passing an empty string to phoneNumber uses the stored phone number.

Items

[0] string : entryName

name of RAS entry.

[1] string : phoneNumber

phone number to be used.

[2] string : callBackNumber

phone number to be used if callback is enabled.

[3] string : userName

username to log on with.

[4] string : password

password to use

[5] string : domain

Network domain to log on to.

Example

An example with win32ras.Dial

handle = win32ras.Dial(None, None, ("Entry Name",), None)


ULARGE_INTEGER

ULARGE_INTEGER Object

A Python object used wherever a COM ULARGE_INTEGER is used.

Comments

When passed into a Python function, this will always be a single object. It will either be an integer, or a long integer, depending on the size. When passed into a Pythoncom function, either a single integer object or a tuple of integers is supported.

To Do

Note that you can not pass a long integer into Pythoncom. This needs to be fixed. A work around is to pass a (int, int) tuple.


connection

connection Object

An object representing an ODBC connection

Methods

setautocommit
Sets the autocommit mode.

commit
Commits a transaction.

rollback
Rollsback a transaction.

cursor
Creates a cursor object

close
Closes the connection.


connection.close

close()

Closes the connection.


connection.commit

commit()

Commits a transaction.


connection.cursor

cursor()

Creates a cursor object


connection.rollback

rollback()

Rollsback a transaction.


connection.setautocommit

setautocommit(c)

Sets the autocommit mode.

Parameters

c : int

The boolean autocommit mode.


cursor

cursor Object

An object representing an ODBC cursor.

Methods

close
Closes the cursor

execute
Execute some SQL

fetchone
Fetch one row of data

fetchmany
Fetch many rows of data

fetchall
Fetch all the rows of data

setinputsizes

setoutputsize
Sentinel


cursor.close

close()

Closes the cursor

Comments

This method does nothing!! I presume it should!?!?!


cursor.execute

int = execute(sql, [var, ...] )

Execute some SQL

Parameters

sql : string

The SQL to execute

[var, ...]=[] : sequence

Input variables.


cursor.fetchall

[data, ...] = fetchall()

Fetch all rows of data


cursor.fetchmany

[data, ...] = fetchmany()

Fetch many rows of data


cursor.fetchone

data = fetchone()

Fetch one row of data


cursor.setinputsizes

setinputsizes()


cursor.setoutputsize

setoutputsize()


Constants

  • ABOVE_NORMAL_PRIORITY_CLASS
  • BELOW_NORMAL_PRIORITY_CLASS
  • CBR_110
  • CBR_115200
  • CBR_1200
  • CBR_128000
  • CBR_14400
  • CBR_19200
  • CBR_2400
  • CBR_256000
  • CBR_300
  • CBR_38400
  • CBR_4800
  • CBR_56000
  • CBR_57600
  • CBR_600
  • CBR_9600
  • CLR_NONE
  • CLRBREAK
  • CLRDTR
  • CLRRTS
  • CREATE_ALWAYS
  • CREATE_DEFAULT_ERROR_MODE
  • CREATE_NEW
  • CREATE_NEW_CONSOLE
  • CREATE_NEW_PROCESS_GROUP
  • CREATE_SEPARATE_WOW_VDM
  • CREATE_SHARED_WOW_VDM
  • CREATE_SUSPENDED
  • CREATE_UNICODE_ENVIRONMENT
  • CSIDL_BITBUCKET
  • CSIDL_COMMON_DESKTOPDIRECTORY
  • CSIDL_COMMON_PROGRAMS
  • CSIDL_COMMON_STARTMENU
  • CSIDL_COMMON_STARTUP
  • CSIDL_CONTROLS
  • CSIDL_DESKTOP
  • CSIDL_DESKTOPDIRECTORY
  • CSIDL_DRIVES
  • CSIDL_FONTS
  • CSIDL_NETHOOD
  • CSIDL_NETWORK
  • CSIDL_PERSONAL
  • CSIDL_PRINTERS
  • CSIDL_PROGRAMS
  • CSIDL_RECENT
  • CSIDL_SENDTO
  • CSIDL_STARTMENU
  • CSIDL_STARTUP
  • CSIDL_TEMPLATES
  • DACL_SECURITY_INFORMATION
  • debug
  • DEBUG_ONLY_THIS_PROCESS
  • DEBUG_PROCESS
  • DETACHED_PROCESS
  • DRIVE_CDROM
  • DRIVE_FIXED
  • DRIVE_NO_ROOT_DIR
  • DRIVE_RAMDISK
  • DRIVE_REMOTE
  • DRIVE_REMOVABLE
  • DRIVE_UNKNOWN
  • DTR_CONTROL_DISABLE
  • DTR_CONTROL_ENABLE
  • DTR_CONTROL_HANDSHAKE
  • EV_BREAK
  • EV_CTS
  • EV_DSR
  • EV_ERR
  • EV_RING
  • EV_RLSD
  • EV_RXCHAR
  • EV_RXFLAG
  • EV_TXEMPTY
  • EVENPARITY
  • EVENT_ALL_ACCESS
  • EVENT_MODIFY_STATE
  • EVENTLOG_AUDIT_FAILURE
  • EVENTLOG_AUDIT_SUCCESS
  • EVENTLOG_BACKWARDS_READ
  • EVENTLOG_END_ALL_PAIRED_EVENTS
  • EVENTLOG_END_PAIRED_EVENT
  • EVENTLOG_ERROR_TYPE
  • EVENTLOG_FORWARDS_READ
  • EVENTLOG_INFORMATION_TYPE
  • EVENTLOG_PAIRED_EVENT_ACTIVE
  • EVENTLOG_PAIRED_EVENT_INACTIVE
  • EVENTLOG_SEEK_READ
  • EVENTLOG_SEQUENTIAL_READ
  • EVENTLOG_START_PAIRED_EVENT
  • EVENTLOG_SUCCESS
  • EVENTLOG_WARNING_TYPE
  • FD_ACCEPT
  • FD_ADDRESS_LIST_CHANGE
  • FD_CLOSE
  • FD_CONNECT
  • FD_GROUP_QOS
  • FD_OOB
  • FD_QOS
  • FD_READ
  • FD_ROUTING_INTERFACE_CHANGE
  • FD_WRITE
  • FILE_ALL_ACCESS
  • FILE_ATTRIBUTE_ARCHIVE
  • FILE_ATTRIBUTE_COMPRESSED
  • FILE_ATTRIBUTE_HIDDEN
  • FILE_ATTRIBUTE_NORMAL
  • FILE_ATTRIBUTE_OFFLINE
  • FILE_ATTRIBUTE_READONLY
  • FILE_ATTRIBUTE_SYSTEM
  • FILE_ATTRIBUTE_TEMPORARY
  • FILE_BEGIN
  • FILE_CURRENT
  • FILE_END
  • FILE_FLAG_BACKUP_SEMANTICS
  • FILE_FLAG_DELETE_ON_CLOSE
  • FILE_FLAG_NO_BUFFERING
  • FILE_FLAG_OVERLAPPED
  • FILE_FLAG_POSIX_SEMANTICS
  • FILE_FLAG_RANDOM_ACCESS
  • FILE_FLAG_SEQUENTIAL_SCAN
  • FILE_FLAG_WRITE_THROUGH
  • FILE_GENERIC_READ
  • FILE_GENERIC_WRITE
  • FILE_SHARE_DELETE
  • FILE_SHARE_READ
  • FILE_SHARE_WRITE
  • FILE_TYPE_CHAR
  • FILE_TYPE_DISK
  • FILE_TYPE_PIPE
  • FILE_TYPE_UNKNOWN
  • GENERIC_EXECUTE
  • GENERIC_READ
  • GENERIC_WRITE
  • GROUP_SECURITY_INFORMATION
  • HH_ALINK_LOOKUP
  • HH_CLOSE_ALL
  • HH_DISPLAY_INDEX
  • HH_DISPLAY_SEARCH
  • HH_DISPLAY_TEXT_POPUP
  • HH_DISPLAY_TOC
  • HH_DISPLAY_TOPIC
  • HH_ENUM_CATEGORY
  • HH_ENUM_CATEGORY_IT
  • HH_ENUM_INFO_TYPE
  • HH_FTS_DEFAULT_PROXIMITY
  • HH_GET_LAST_ERROR
  • HH_GET_WIN_HANDLE
  • HH_GET_WIN_TYPE
  • HH_GPROPID_CONTENT_LANGUAGE
  • HH_GPROPID_CURRENT_SUBSET
  • HH_GPROPID_SINGLETHREAD
  • HH_GPROPID_TOOLBAR_MARGIN
  • HH_GPROPID_UI_LANGUAGE
  • HH_HELP_CONTEXT
  • HH_HELP_FINDER
  • HH_INITIALIZE
  • HH_KEYWORD_LOOKUP
  • HH_MAX_TABS_CUSTOM
  • HH_PRETRANSLATEMESSAGE
  • HH_RESERVED1
  • HH_RESERVED2
  • HH_RESERVED3
  • HH_RESET_IT_FILTER
  • HH_SET_EXCLUSIVE_FILTER
  • HH_SET_GLOBAL_PROPERTY
  • HH_SET_INCLUSIVE_FILTER
  • HH_SET_INFO_TYPE
  • HH_SET_WIN_TYPE
  • HH_SYNC
  • HH_TAB_AUTHOR
  • HH_TAB_CONTENTS
  • HH_TAB_CUSTOM_FIRST
  • HH_TAB_CUSTOM_LAST
  • HH_TAB_FAVORITES
  • HH_TAB_HISTORY
  • HH_TAB_INDEX
  • HH_TAB_SEARCH
  • HH_TP_HELP_CONTEXTMENU
  • HH_TP_HELP_WM_HELP
  • HH_UNINITIALIZE
  • HHACT_BACK
  • HHACT_CONTRACT
  • HHACT_CUSTOMIZE
  • HHACT_EXPAND
  • HHACT_FORWARD
  • HHACT_HIGHLIGHT
  • HHACT_HOME
  • HHACT_JUMP1
  • HHACT_JUMP2
  • HHACT_LAST_ENUM
  • HHACT_NOTES
  • HHACT_OPTIONS
  • HHACT_PRINT
  • HHACT_REFRESH
  • HHACT_STOP
  • HHACT_SYNC
  • HHACT_TAB_CONTENTS
  • HHACT_TAB_FAVORITES
  • HHACT_TAB_HISTORY
  • HHACT_TAB_INDEX
  • HHACT_TAB_SEARCH
  • HHACT_TOC_NEXT
  • HHACT_TOC_PREV
  • HHACT_ZOOM
  • HHN_FIRST
  • HHN_LAST
  • HHN_NAVCOMPLETE
  • HHN_TRACK
  • HHN_WINDOW_CREATE
  • HHWIN_BUTTON_BACK
  • HHWIN_BUTTON_BROWSE_BCK
  • HHWIN_BUTTON_BROWSE_FWD
  • HHWIN_BUTTON_CONTENTS
  • HHWIN_BUTTON_EXPAND
  • HHWIN_BUTTON_FAVORITES
  • HHWIN_BUTTON_FORWARD
  • HHWIN_BUTTON_HISTORY
  • HHWIN_BUTTON_HOME
  • HHWIN_BUTTON_INDEX
  • HHWIN_BUTTON_JUMP1
  • HHWIN_BUTTON_JUMP2
  • HHWIN_BUTTON_NOTES
  • HHWIN_BUTTON_OPTIONS
  • HHWIN_BUTTON_PRINT
  • HHWIN_BUTTON_REFRESH
  • HHWIN_BUTTON_SEARCH
  • HHWIN_BUTTON_STOP
  • HHWIN_BUTTON_SYNC
  • HHWIN_BUTTON_TOC_NEXT
  • HHWIN_BUTTON_TOC_PREV
  • HHWIN_BUTTON_ZOOM
  • HHWIN_DEF_BUTTONS
  • HHWIN_NAVTAB_BOTTOM
  • HHWIN_NAVTAB_LEFT
  • HHWIN_NAVTAB_TOP
  • HHWIN_PARAM_CUR_TAB
  • HHWIN_PARAM_EXPANSION
  • HHWIN_PARAM_EXSTYLES
  • HHWIN_PARAM_HISTORY_COUNT
  • HHWIN_PARAM_INFOTYPES
  • HHWIN_PARAM_NAV_WIDTH
  • HHWIN_PARAM_PROPERTIES
  • HHWIN_PARAM_RECT
  • HHWIN_PARAM_SHOWSTATE
  • HHWIN_PARAM_STYLES
  • HHWIN_PARAM_TABORDER
  • HHWIN_PARAM_TABPOS
  • HHWIN_PARAM_TB_FLAGS
  • HHWIN_PROP_AUTO_SYNC
  • HHWIN_PROP_CHANGE_TITLE
  • HHWIN_PROP_MENU
  • HHWIN_PROP_NAV_ONLY_WIN
  • HHWIN_PROP_NO_TOOLBAR
  • HHWIN_PROP_NODEF_EXSTYLES
  • HHWIN_PROP_NODEF_STYLES
  • HHWIN_PROP_NOTB_TEXT
  • HHWIN_PROP_NOTITLEBAR
  • HHWIN_PROP_ONTOP
  • HHWIN_PROP_POST_QUIT
  • HHWIN_PROP_TAB_ADVSEARCH
  • HHWIN_PROP_TAB_AUTOHIDESHOW
  • HHWIN_PROP_TAB_CUSTOM1
  • HHWIN_PROP_TAB_CUSTOM2
  • HHWIN_PROP_TAB_CUSTOM3
  • HHWIN_PROP_TAB_CUSTOM4
  • HHWIN_PROP_TAB_CUSTOM5
  • HHWIN_PROP_TAB_CUSTOM6
  • HHWIN_PROP_TAB_CUSTOM7
  • HHWIN_PROP_TAB_CUSTOM8
  • HHWIN_PROP_TAB_CUSTOM9
  • HHWIN_PROP_TAB_FAVORITES
  • HHWIN_PROP_TAB_HISTORY
  • HHWIN_PROP_TAB_SEARCH
  • HHWIN_PROP_TRACKING
  • HHWIN_PROP_TRI_PANE
  • HHWIN_PROP_USER_POS
  • HHWIN_TB_MARGIN
  • HIGH_PRIORITY_CLASS
  • IDLE_PRIORITY_CLASS
  • IDTB_BACK
  • IDTB_BROWSE_BACK
  • IDTB_BROWSE_FWD
  • IDTB_CONTENTS
  • IDTB_CONTRACT
  • IDTB_CUSTOMIZE
  • IDTB_EXPAND
  • IDTB_FAVORITES
  • IDTB_FORWARD
  • IDTB_HISTORY
  • IDTB_HOME
  • IDTB_INDEX
  • IDTB_JUMP1
  • IDTB_JUMP2
  • IDTB_NOTES
  • IDTB_OPTIONS
  • IDTB_PRINT
  • IDTB_REFRESH
  • IDTB_SEARCH
  • IDTB_STOP
  • IDTB_SYNC
  • IDTB_TOC_NEXT
  • IDTB_TOC_PREV
  • IDTB_ZOOM
  • ILC_COLOR
  • ILC_COLOR16
  • ILC_COLOR24
  • ILC_COLOR32
  • ILC_COLOR4
  • ILC_COLOR8
  • ILC_COLORDDB
  • ILC_MASK
  • ILD_BLEND
  • ILD_BLEND25
  • ILD_BLEND50
  • ILD_FOCUS
  • ILD_MASK
  • ILD_NORMAL
  • ILD_SELECTED
  • ILD_TRANSPARENT
  • IMAGE_BITMAP
  • IMAGE_CURSOR
  • IMAGE_ICON
  • INFINITE
  • INVALID_HANDLE_VALUE
  • LOGON32_LOGON_BATCH
  • LOGON32_LOGON_INTERACTIVE
  • LOGON32_LOGON_NETWORK
  • LOGON32_LOGON_SERVICE
  • LOGON32_PROVIDER_DEFAULT
  • LOGON32_PROVIDER_WINNT35
  • LOGON32_PROVIDER_WINNT40
  • LR_CREATEDIBSECTION
  • LR_DEFAULTCOLOR
  • LR_DEFAULTSIZE
  • LR_LOADFROMFILE
  • LR_LOADMAP3DCOLORS
  • LR_LOADTRANSPARENT
  • LR_MONOCHROME
  • LR_SHARED
  • LR_VGACOLOR
  • MARKPARITY
  • MAXIMUM_PROCESSORS
  • MAXIMUM_WAIT_OBJECTS
  • MOVEFILE_COPY_ALLOWED
  • MOVEFILE_DELAY_UNTIL_REBOOT
  • MOVEFILE_REPLACE_EXISTING
  • MOVEFILE_WRITE_THROUGH
  • NIF_ICON
  • NIF_MESSAGE
  • NIF_TIP
  • NIM_ADD
  • NIM_DELETE
  • NIM_MODIFY
  • NIM_SETFOCUS
  • NMPWAIT_NOWAIT
  • NMPWAIT_USE_DEFAULT_WAIT
  • NMPWAIT_WAIT_FOREVER
  • NOPARITY
  • NORMAL_PRIORITY_CLASS
  • ODDPARITY
  • ONE5STOPBITS
  • ONESTOPBIT
  • OPEN_ALWAYS
  • OPEN_EXISTING
  • OWNER_SECURITY_INFORMATION
  • PIPE_ACCESS_DUPLEX
  • PIPE_ACCESS_INBOUND
  • PIPE_ACCESS_OUTBOUND
  • PIPE_NOWAIT
  • PIPE_READMODE_BYTE
  • PIPE_READMODE_MESSAGE
  • PIPE_TYPE_BYTE
  • PIPE_TYPE_MESSAGE
  • PIPE_UNLIMITED_INSTANCES
  • PIPE_WAIT
  • PURGE_RXABORT
  • PURGE_RXCLEAR
  • PURGE_TXABORT
  • PURGE_TXCLEAR
  • QS_ALLEVENTS
  • QS_ALLINPUT
  • QS_HOTKEY
  • QS_INPUT
  • QS_KEY
  • QS_MOUSE
  • QS_MOUSEBUTTON
  • QS_MOUSEMOVE
  • QS_PAINT
  • QS_POSTMESSAGE
  • QS_SENDMESSAGE
  • QS_TIMER
  • RASCS_AllDevicesConnected
  • RASCS_AuthAck
  • RASCS_AuthCallback
  • RASCS_AuthChangePassword
  • RASCS_Authenticate
  • RASCS_Authenticated
  • RASCS_AuthLinkSpeed
  • RASCS_AuthNotify
  • RASCS_AuthProject
  • RASCS_AuthRetry
  • RASCS_CallbackComplete
  • RASCS_CallbackSetByCaller
  • RASCS_ConnectDevice
  • RASCS_Connected
  • RASCS_DeviceConnected
  • RASCS_Disconnected
  • RASCS_Interactive
  • RASCS_LogonNetwork
  • RASCS_OpenPort
  • RASCS_PasswordExpired
  • RASCS_PortOpened
  • RASCS_PrepareForCallback
  • RASCS_Projected
  • RASCS_ReAuthenticate
  • RASCS_RetryAuthentication
  • RASCS_StartAuthentication
  • RASCS_WaitForCallback
  • RASCS_WaitForModemReset
  • RASEAPF_Logon
  • RASEAPF_NonInteractive
  • RASEAPF_Preview
  • REALTIME_PRIORITY_CLASS
  • RTS_CONTROL_DISABLE
  • RTS_CONTROL_ENABLE
  • RTS_CONTROL_HANDSHAKE
  • RTS_CONTROL_TOGGLE
  • SACL_SECURITY_INFORMATION
  • SC_GROUP_IDENTIFIER
  • SC_MANAGER_ALL_ACCESS
  • SC_MANAGER_CONNECT
  • SC_MANAGER_CREATE_SERVICE
  • SC_MANAGER_ENUMERATE_SERVICE
  • SC_MANAGER_LOCK
  • SC_MANAGER_MODIFY_BOOT_CONFIG
  • SC_MANAGER_QUERY_LOCK_STATUS
  • SCS_32BIT_BINARY
  • SCS_DOS_BINARY
  • SCS_OS216_BINARY
  • SCS_PIF_BINARY
  • SCS_POSIX_BINARY
  • SCS_WOW_BINARY
  • SE_DS_OBJECT
  • SE_DS_OBJECT_ALL
  • SE_FILE_OBJECT
  • SE_KERNEL_OBJECT
  • SE_LMSHARE
  • SE_PRINTER
  • SE_PROVIDER_DEFINED_OBJECT
  • SE_REGISTRY_KEY
  • SE_SERVICE
  • SE_UNKNOWN_OBJECT_TYPE
  • SE_WINDOW_OBJECT
  • SECURITY_ANONYMOUS
  • SECURITY_CONTEXT_TRACKING
  • SECURITY_DELEGATION
  • SECURITY_EFFECTIVE_ONLY
  • SECURITY_IDENTIFICATION
  • SECURITY_IMPERSONATION
  • SERVICE_ACCEPT_PAUSE_CONTINUE
  • SERVICE_ACCEPT_SHUTDOWN
  • SERVICE_ACCEPT_STOP
  • SERVICE_ACTIVE
  • SERVICE_ALL_ACCESS
  • SERVICE_AUTO_START
  • SERVICE_BOOT_START
  • SERVICE_CHANGE_CONFIG
  • SERVICE_CONTINUE_PENDING
  • SERVICE_CONTROL_CONTINUE
  • SERVICE_CONTROL_INTERROGATE
  • SERVICE_CONTROL_PAUSE
  • SERVICE_CONTROL_SHUTDOWN
  • SERVICE_CONTROL_STOP
  • SERVICE_DEMAND_START
  • SERVICE_DISABLED
  • SERVICE_DRIVER
  • SERVICE_ENUMERATE_DEPENDENTS
  • SERVICE_ERROR_CRITICAL
  • SERVICE_ERROR_IGNORE
  • SERVICE_ERROR_NORMAL
  • SERVICE_ERROR_SEVERE
  • SERVICE_FILE_SYSTEM_DRIVER
  • SERVICE_INACTIVE
  • SERVICE_INTERACTIVE_PROCESS
  • SERVICE_INTERROGATE
  • SERVICE_KERNEL_DRIVER
  • SERVICE_NO_CHANGE
  • SERVICE_PAUSE_CONTINUE
  • SERVICE_PAUSE_PENDING
  • SERVICE_PAUSED
  • SERVICE_QUERY_CONFIG
  • SERVICE_QUERY_STATUS
  • SERVICE_RUNNING
  • SERVICE_SPECIFIC_ERROR
  • SERVICE_START
  • SERVICE_START_PENDING
  • SERVICE_STATE_ALL
  • SERVICE_STOP
  • SERVICE_STOP_PENDING
  • SERVICE_STOPPED
  • SERVICE_SYSTEM_START
  • SERVICE_USER_DEFINED_CONTROL
  • SERVICE_WIN32
  • SERVICE_WIN32_OWN_PROCESS
  • SERVICE_WIN32_SHARE_PROCESS
  • SETBREAK
  • SETDTR
  • SETRTS
  • SETXOFF
  • SETXON
  • SidTypeAlias
  • SidTypeDeletedAccount
  • SidTypeDomain
  • SidTypeGroup
  • SidTypeInvalid
  • SidTypeUnknown
  • SidTypeUser
  • SidTypeWellKnownGroup
  • SO_CONNECT_TIME
  • SO_UPDATE_ACCEPT_CONTEXT
  • SPACEPARITY
  • STARTF_FORCEOFFFEEDBACK
  • STARTF_FORCEONFEEDBACK
  • STARTF_RUNFULLSCREEN
  • STARTF_USECOUNTCHARS
  • STARTF_USEFILLATTRIBUTE
  • STARTF_USEPOSITION
  • STARTF_USESHOWWINDOW
  • STARTF_USESIZE
  • STARTF_USESTDHANDLES
  • SYNCHRONIZE
  • THREAD_PRIORITY_ABOVE_NORMAL
  • THREAD_PRIORITY_BELOW_NORMAL
  • THREAD_PRIORITY_HIGHEST
  • THREAD_PRIORITY_IDLE
  • THREAD_PRIORITY_LOWEST
  • THREAD_PRIORITY_NORMAL
  • THREAD_PRIORITY_TIME_CRITICAL
  • TOKEN_ADJUST_DEFAULT
  • TOKEN_ADJUST_GROUPS
  • TOKEN_ADJUST_PRIVILEGES
  • TOKEN_ALL_ACCESS
  • TOKEN_ASSIGN_PRIMARY
  • TOKEN_DUPLICATE
  • TOKEN_EXECUTE
  • TOKEN_IMPERSONATE
  • TOKEN_QUERY
  • TOKEN_QUERY_SOURCE
  • TOKEN_READ
  • TOKEN_WRITE
  • TPM_BOTTOMALIGN
  • TPM_CENTERALIGN
  • TPM_LEFTALIGN
  • TPM_LEFTBUTTON
  • TPM_NONOTIFY
  • TPM_RETURNCMD
  • TPM_RIGHTALIGN
  • TPM_RIGHTBUTTON
  • TPM_TOPALIGN
  • TPM_VCENTERALIGN
  • TRUNCATE_EXISTING
  • TWOSTOPBITS
  • WAIT_ABANDONED
  • WAIT_ABANDONED_0
  • WAIT_FAILED
  • WAIT_IO_COMPLETION
  • WAIT_OBJECT_0
  • WAIT_TIMEOUT
  • WSA_IO_PENDING
  • WSA_OPERATION_ABORTED
  • WSAECONNABORTED
  • WSAECONNRESET
  • WSAEDISCON
  • WSAEFAULT
  • WSAEINPROGRESS
  • WSAEINTR
  • WSAEINVAL
  • WSAEMSGSIZE
  • WSAENETDOWN
  • WSAENETRESET
  • WSAENOTCONN
  • WSAENOTSOCK
  • WSAEOPNOTSUPP
  • WSAESHUTDOWN
  • WSAEWOULDBLOCK


Objects and Module Methods

Object and Module Methods

  • connection.close
  • connection.commit
  • connection.cursor
  • connection.rollback
  • connection.setautocommit
  • cursor.close
  • cursor.execute
  • cursor.fetchall
  • cursor.fetchmany
  • cursor.fetchone
  • cursor.setinputsizes
  • cursor.setoutputsize
  • odbc.odbc
  • perfmon.CounterDefinition
  • perfmon.LoadPerfCounterTextStrings
  • perfmon.ObjectType
  • perfmon.PerfMonManager
  • perfmon.UnloadPerfCounterTextStrings
  • PyACL.AddAccessAllowedAce
  • PyACL.AddAccessDeniedAce
  • PyACL.Initialize
  • PyDDEConv.Connected
  • PyDDEConv.ConnectTo
  • PyDDEConv.Exec
  • PyDDEConv.Poke
  • PyDDEConv.Request
  • PyDDEServer.AddTopic
  • PyDDEServer.Create
  • PyDDEServer.Destroy
  • PyDDEServer.GetLastError
  • PyDDEServer.Shutdown
  • PyDDEStringItem.Destroy
  • PyDDEStringItem.SetData
  • PyDDETopic.AddItem
  • PyDDETopic.Destroy
  • PyHANDLE.__cmp__
  • PyHANDLE.__hash__
  • PyHANDLE.__int__
  • PyHANDLE.__nonzero__
  • PyHANDLE.__print__
  • PyHANDLE.__str__
  • PyHANDLE.Close
  • PyHANDLE.Detach
  • PyIID.__cmp__
  • PyIID.__hash__
  • PyIID.__print__
  • PyIID.__str__
  • PyOVERLAPPED.__cmp__
  • PyPERF_COUNTER_DEFINITION.Decrement
  • PyPERF_COUNTER_DEFINITION.Get
  • PyPERF_COUNTER_DEFINITION.Increment
  • PyPERF_COUNTER_DEFINITION.Set
  • PyPERF_OBJECT_TYPE.Close
  • PyPerfMonManager.Close
  • PySECURITY_ATTRIBUTES.Initialize
  • PySECURITY_ATTRIBUTES.SetSecurityDescriptorDacl
  • PySECURITY_DESCRIPTOR.Initialize
  • PySECURITY_DESCRIPTOR.SetDacl
  • PySID.__cmp__
  • PySID.Initialize
  • PySID.IsValid
  • PySID.SetSubAuthority
  • PyTime.__cmp__
  • PyTime.__float__
  • PyTime.__getattr__
  • PyTime.__hash__
  • PyTime.__int__
  • PyTime.__nonzero__
  • PyTime.__print__
  • PyTime.Format
  • PyUnicode.__cmp__
  • PyUnicode.__getattr__
  • PyUnicode.__hash__
  • PyUnicode.__print__
  • PyUnicode.__repr__
  • PyUnicode.__str__
  • pywintypes.ACL
  • pywintypes.CreateGuid
  • pywintypes.DosDateTimeToTime
  • pywintypes.HANDLE
  • pywintypes.HKEY
  • pywintypes.IID
  • pywintypes.IsTextUnicode
  • pywintypes.OVERLAPPED
  • pywintypes.SECURITY_ATTRIBUTES
  • pywintypes.SECURITY_DESCRIPTOR
  • pywintypes.SID
  • pywintypes.Time
  • pywintypes.Unicode
  • pywintypes.UnicodeFromRaw
  • servicemanager.CoInitializeEx
  • servicemanager.CoUninitialize
  • servicemanager.Debugging
  • servicemanager.LogErrorMsg
  • servicemanager.LogInfoMsg
  • servicemanager.LogMsg
  • servicemanager.LogWarningMsg
  • servicemanager.PumpWaitingMessages
  • servicemanager.RegisterServiceCtrlHandler
  • win2kras.PyRasGetEapUserIdentity
  • win32api.AbortSystemShutdown
  • win32api.Apply
  • win32api.Beep
  • win32api.BeginUpdateResource
  • win32api.ClipCursor
  • win32api.CloseHandle
  • win32api.CopyFile
  • win32api.DebugBreak
  • win32api.DeleteFile
  • win32api.DragFinish
  • win32api.DragQueryFile
  • win32api.DuplicateHandle
  • win32api.EndUpdateResource
  • win32api.EnumResourceNames
  • win32api.ExitWindows
  • win32api.ExitWindowsEx
  • win32api.ExpandEnvironmentStrings
  • win32api.FindCloseChangeNotification
  • win32api.FindExecutable
  • win32api.FindFiles
  • win32api.FindFirstChangeNotification
  • win32api.FindNextChangeNotification
  • win32api.FormatMessage
  • win32api.FormatMessageW
  • win32api.FreeLibrary
  • win32api.GetAsyncKeyState
  • win32api.GetCommandLine
  • win32api.GetComputerName
  • win32api.GetConsoleTitle
  • win32api.GetCurrentProcess
  • win32api.GetCurrentProcessId
  • win32api.GetCurrentThread
  • win32api.GetCurrentThreadId
  • win32api.GetCursorPos
  • win32api.GetDiskFreeSpace
  • win32api.GetDomainName
  • win32api.GetEnvironmentVariable
  • win32api.GetFileAttributes
  • win32api.GetFocus
  • win32api.GetFullPathName
  • win32api.GetKeyState
  • win32api.GetLastError
  • win32api.GetLocalTime
  • win32api.GetLogicalDrives
  • win32api.GetLogicalDriveStrings
  • win32api.GetModuleFileName
  • win32api.GetModuleHandle
  • win32api.GetProcAddress
  • win32api.GetProfileSection
  • win32api.GetProfileVal
  • win32api.GetShortPathName
  • win32api.GetStdHandle
  • win32api.GetSysColor
  • win32api.GetSystemDefaultLangID
  • win32api.GetSystemDefaultLCID
  • win32api.GetSystemDirectory
  • win32api.GetSystemInfo
  • win32api.GetSystemMetrics
  • win32api.GetSystemTime
  • win32api.GetTempFileName
  • win32api.GetTempPath
  • win32api.GetTickCount
  • win32api.GetTimeZoneInformation
  • win32api.GetUserDefaultLangID
  • win32api.GetUserDefaultLCID
  • win32api.GetUserName
  • win32api.GetVersion
  • win32api.GetVersionEx
  • win32api.GetVolumeInformation
  • win32api.GetWindowLong
  • win32api.GetWindowsDirectory
  • win32api.HIBYTE
  • win32api.HIWORD
  • win32api.InitiateSystemShutdown
  • win32api.LoadCursor
  • win32api.LoadLibrary
  • win32api.LoadLibraryEx
  • win32api.LoadResource
  • win32api.LoadString
  • win32api.LOBYTE
  • win32api.LOWORD
  • win32api.MAKELANGID
  • win32api.MessageBeep
  • win32api.MessageBox
  • win32api.MoveFile
  • win32api.MoveFileEx
  • win32api.OpenProcess
  • win32api.OutputDebugString
  • win32api.PostMessage
  • win32api.PostQuitMessage
  • win32api.PostThreadMessage
  • win32api.RegCloseKey
  • win32api.RegConnectRegistry
  • win32api.RegCreateKey
  • win32api.RegDeleteKey
  • win32api.RegDeleteValue
  • win32api.RegEnumKey
  • win32api.RegEnumValue
  • win32api.RegFlushKey
  • win32api.RegGetKeySecurity
  • win32api.RegisterWindowMessage
  • win32api.RegLoadKey
  • win32api.RegOpenKey
  • win32api.RegOpenKeyEx
  • win32api.RegQueryInfoKey
  • win32api.RegQueryValue
  • win32api.RegQueryValueEx
  • win32api.RegSaveKey
  • win32api.RegSetKeySecurity
  • win32api.RegSetValue
  • win32api.RegSetValueEx
  • win32api.RegUnLoadKey
  • win32api.RGB
  • win32api.SearchPath
  • win32api.SendMessage
  • win32api.SetClassLong
  • win32api.SetClassWord
  • win32api.SetConsoleTitle
  • win32api.SetCursor
  • win32api.SetCursorPos
  • win32api.SetErrorMode
  • win32api.SetFileAttributes
  • win32api.SetStdHandle
  • win32api.SetSystemTime
  • win32api.SetThreadLocale
  • win32api.SetWindowLong
  • win32api.SetWindowWord
  • win32api.ShellExecute
  • win32api.ShowCursor
  • win32api.Sleep
  • win32api.TerminateProcess
  • win32api.Unicode
  • win32api.UpdateResource
  • win32api.WinExec
  • win32api.WinHelp
  • win32api.WriteProfileSection
  • win32api.WriteProfileVal
  • win32clipboard.ChangeClipboardChain
  • win32clipboard.CloseClipboard
  • win32clipboard.CountClipboardFormats
  • win32clipboard.EmptyClipboard
  • win32clipboard.EnumClipboardFormats
  • win32clipboard.GetClipboardData
  • win32clipboard.GetClipboardFormatName
  • win32clipboard.GetClipboardOwner
  • win32clipboard.GetClipboardSequenceNumber
  • win32clipboard.GetClipboardViewer
  • win32clipboard.GetOpenClipboardWindow
  • win32clipboard.GetPriorityClipboardFormat
  • win32clipboard.IsClipboardFormatAvailable
  • win32clipboard.OpenClipboard
  • win32clipboard.RegisterClipboardFormat
  • win32clipboard.SetClipboardData
  • win32clipboard.SetClipboardText
  • win32clipboard.SetClipboardViewer
  • win32event.CreateEvent
  • win32event.CreateMutex
  • win32event.CreateSemaphore
  • win32event.MsgWaitForMultipleObjects
  • win32event.MsgWaitForMultipleObjectsEx
  • win32event.OpenEvent
  • win32event.OpenMutex
  • win32event.OpenSemaphore
  • win32event.PulseEvent
  • win32event.ReleaseMutex
  • win32event.ReleaseSemaphore
  • win32event.ResetEvent
  • win32event.SetEvent
  • win32event.WaitForMultipleObjects
  • win32event.WaitForMultipleObjectsEx
  • win32event.WaitForSingleObject
  • win32event.WaitForSingleObjectEx
  • win32evtlog.BackupEventLog
  • win32evtlog.ClearEventLog
  • win32evtlog.CloseEventLog
  • win32evtlog.DeregisterEventSource
  • win32evtlog.GetNumberOfEventLogRecords
  • win32evtlog.GetOldestEventLogRecord
  • win32evtlog.NotifyChangeEventLog
  • win32evtlog.OpenBackupEventLog
  • win32evtlog.OpenEventLog
  • win32evtlog.ReadEventLog
  • win32evtlog.RegisterEventSource
  • win32evtlog.ReportEvent
  • win32file._get_osfhandle
  • win32file._open_osfhandle
  • win32file.AcceptEx
  • win32file.AllocateReadBuffer
  • win32file.AreFileApisANSI
  • win32file.BuildCommDCB
  • win32file.ClearCommBreak
  • win32file.ClearCommError
  • win32file.CloseHandle
  • win32file.COMSTAT
  • win32file.CopyFile
  • win32file.CopyFileW
  • win32file.CreateDirectory
  • win32file.CreateDirectoryEx
  • win32file.CreateDirectoryExW
  • win32file.CreateDirectoryW
  • win32file.CreateFile
  • win32file.CreateFileW
  • win32file.CreateIoCompletionPort
  • win32file.DCB
  • win32file.DefineDosDevice
  • win32file.DefineDosDeviceW
  • win32file.DeleteFile
  • win32file.DeleteFileW
  • win32file.DeviceIoControl
  • win32file.EscapeCommFunction
  • win32file.FindClose
  • win32file.FindCloseChangeNotification
  • win32file.FindFilesW
  • win32file.FindFirstChangeNotification
  • win32file.FindNextChangeNotification
  • win32file.FlushFileBuffers
  • win32file.GetAcceptExSockaddrs
  • win32file.GetBinaryType
  • win32file.GetCommMask
  • win32file.GetCommModemStatus
  • win32file.GetCommState
  • win32file.GetCommTimeouts
  • win32file.GetCompressedFileSize
  • win32file.GetDiskFreeSpace
  • win32file.GetDiskFreeSpaceEx
  • win32file.GetDriveType
  • win32file.GetDriveTypeW
  • win32file.GetFileAttributes
  • win32file.GetFileAttributesW
  • win32file.GetFileSize
  • win32file.GetFileTime
  • win32file.GetFileType
  • win32file.GetLogicalDrives
  • win32file.GetOverlappedResult
  • win32file.GetQueuedCompletionStatus
  • win32file.LockFile
  • win32file.LockFileEx
  • win32file.MoveFile
  • win32file.MoveFileEx
  • win32file.MoveFileExW
  • win32file.MoveFileW
  • win32file.PostQueuedCompletionStatus
  • win32file.PurgeComm
  • win32file.ReadFile
  • win32file.RemoveDirectory
  • win32file.SetCommBreak
  • win32file.SetCommMask
  • win32file.SetCommState
  • win32file.SetCommTimeouts
  • win32file.SetCurrentDirectory
  • win32file.SetEndOfFile
  • win32file.SetFileApisToANSI
  • win32file.SetFileApisToOEM
  • win32file.SetFileAttributes
  • win32file.SetFileAttributesW
  • win32file.SetFilePointer
  • win32file.SetupComm
  • win32file.SetVolumeLabel
  • win32file.TransmitCommChar
  • win32file.UnlockFile
  • win32file.UnlockFileEx
  • win32file.WriteFile
  • win32file.WSAEventSelect
  • win32file.WSARecv
  • win32file.WSASend
  • win32gui.BringWindowToTop
  • win32gui.CallWindowProc
  • win32gui.ClientToScreen
  • win32gui.CloseWindow
  • win32gui.CommDlgExtendedError
  • win32gui.CreateCaret
  • win32gui.CreateDialogIndirect
  • win32gui.CreateMenu
  • win32gui.CreatePopupMenu
  • win32gui.CreateWindow
  • win32gui.CreateWindowEx
  • win32gui.DefWindowProc
  • win32gui.DeleteMenu
  • win32gui.DestroyCaret
  • win32gui.DestroyIcon
  • win32gui.DestroyMenu
  • win32gui.DestroyWindow
  • win32gui.DialogBox
  • win32gui.DialogBoxIndirect
  • win32gui.DialogBoxIndirectParam
  • win32gui.DialogBoxIndirectParam
  • win32gui.DialogBoxParam
  • win32gui.DrawMenuBar
  • win32gui.EnableWindow
  • win32gui.EndDialog
  • win32gui.EnumChildWindows
  • win32gui.EnumFontFamilies
  • win32gui.EnumWindows
  • win32gui.ExtractIcon
  • win32gui.FindWindow
  • win32gui.FindWindowEx
  • win32gui.GetActiveWindow
  • win32gui.GetCapture
  • win32gui.GetClientRect
  • win32gui.GetCursorPos
  • win32gui.GetDC
  • win32gui.GetDesktopWindow
  • win32gui.GetDlgItem
  • win32gui.GetForegroundWindow
  • win32gui.GetObject
  • win32gui.GetOpenFileName
  • win32gui.GetParent
  • win32gui.GetScrollInfo
  • win32gui.GetStockObject
  • win32gui.GetSystemMenu
  • win32gui.GetWindow
  • win32gui.GetWindowDC
  • win32gui.GetWindowRect
  • win32gui.GetWindowText
  • win32gui.HideCaret
  • win32gui.ImageList_Create
  • win32gui.ImageList_Destroy
  • win32gui.ImageList_Draw
  • win32gui.ImageList_GetIcon
  • win32gui.ImageList_GetImageCount
  • win32gui.ImageList_LoadImage
  • win32gui.ImageList_Remove
  • win32gui.ImageList_Replace
  • win32gui.ImageList_ReplaceIcon
  • win32gui.ImageList_SetBkColor
  • win32gui.InitCommonControls
  • win32gui.IsIconic
  • win32gui.IsWindow
  • win32gui.IsWindowVisible
  • win32gui.LoadCursor
  • win32gui.LoadIcon
  • win32gui.LoadImage
  • win32gui.LoadMenu
  • win32gui.LOGFONT
  • win32gui.MessageBeep
  • win32gui.MessageBox
  • win32gui.MoveWindow
  • win32gui.PostMessage
  • win32gui.PostQuitMessage
  • win32gui.PostThreadMessage
  • win32gui.PumpMessages
  • win32gui.PumpWaitingMessages
  • win32gui.PyGetArraySignedLong
  • win32gui.PyGetBufferAddressAndLen
  • win32gui.PyGetString
  • win32gui.PyMakeBuffer
  • win32gui.PySetString
  • win32gui.RegisterClass
  • win32gui.ReleaseCapture
  • win32gui.ReleaseDC
  • win32gui.RemoveMenu
  • win32gui.ScreenToClient
  • win32gui.ScrollWindowEx
  • win32gui.SendMessage
  • win32gui.SendMessageTimeout
  • win32gui.SetActiveWindow
  • win32gui.SetCapture
  • win32gui.SetCaretPos
  • win32gui.SetCursor
  • win32gui.SetDlgItemText
  • win32gui.SetFocus
  • win32gui.SetForegroundWindow
  • win32gui.SetMenu
  • win32gui.SetParent
  • win32gui.SetScrollInfo
  • win32gui.SetWindowLong
  • win32gui.SetWindowPos
  • win32gui.SetWindowText
  • win32gui.Shell_NotifyIcon
  • win32gui.ShowCaret
  • win32gui.ShowWindow
  • win32gui.TrackPopupMenu
  • win32gui.UnregisterClass
  • win32gui.UpdateWindow
  • win32gui.WaitMessage
  • win32help.HH_AKLINK
  • win32help.HH_FTS_QUERY
  • win32help.HH_POPUP
  • win32help.HH_WINTYPE
  • win32help.HHN_NOTIFY
  • win32help.HHNTRACK
  • win32help.HtmlHelp
  • win32help.NMHDR
  • win32help.WinHelp
  • win32lz.Close
  • win32lz.Copy
  • win32lz.GetExpandedName
  • win32lz.Init
  • win32lz.OpenFile
  • win32net.NetGroupAdd
  • win32net.NetGroupAddUser
  • win32net.NetGroupDel
  • win32net.NetGroupDelUser
  • win32net.NetGroupEnum
  • win32net.NetGroupGetInfo
  • win32net.NetGroupGetUsers
  • win32net.NetGroupSetInfo
  • win32net.NetGroupSetUsers
  • win32net.NetLocalGroupAdd
  • win32net.NetLocalGroupAddMembers
  • win32net.NetLocalGroupDel
  • win32net.NetLocalGroupDelMembers
  • win32net.NetLocalGroupEnum
  • win32net.NetLocalGroupGetInfo
  • win32net.NetLocalGroupGetMembers
  • win32net.NetLocalGroupSetInfo
  • win32net.NetLocalGroupSetMembers
  • win32net.NetMessageBufferSend
  • win32net.NetServerDiskEnum
  • win32net.NetServerEnum
  • win32net.NetServerGetInfo
  • win32net.NetServerSetInfo
  • win32net.NetShareAdd
  • win32net.NetShareCheck
  • win32net.NetShareDel
  • win32net.NetShareEnum
  • win32net.NetShareGetInfo
  • win32net.NetShareSetInfo
  • win32net.NetUseAdd
  • win32net.NetUseDel
  • win32net.NetUseEnum
  • win32net.NetUseGetInfo
  • win32net.NetUserAdd
  • win32net.NetUserChangePassword
  • win32net.NetUserDel
  • win32net.NetUserEnum
  • win32net.NetUserGetGroups
  • win32net.NetUserGetInfo
  • win32net.NetUserGetLocalGroups
  • win32net.NetUserModalsGet
  • win32net.NetUserModalsGet
  • win32net.NetUserSetInfo
  • win32net.NetWkstaGetInfo
  • win32net.NetWkstaSetInfo
  • win32net.NetWkstaTransportAdd
  • win32net.NetWkstaTransportDel
  • win32net.NetWkstaTransportEnum
  • win32net.NetWkstaUserEnum
  • win32pdh.AddCounter
  • win32pdh.BrowseCounters
  • win32pdh.CloseQuery
  • win32pdh.CollectQueryData
  • win32pdh.ConnectMachine
  • win32pdh.EnumObjectItems
  • win32pdh.EnumObjects
  • win32pdh.ExpandCounterPath
  • win32pdh.GetCounterInfo
  • win32pdh.GetFormattedCounterValue
  • win32pdh.MakeCounterPath
  • win32pdh.OpenQuery
  • win32pdh.ParseCounterPath
  • win32pdh.ParseInstanceName
  • win32pdh.RemoveCounter
  • win32pdh.SetCounterScaleFactor
  • win32pdh.ValidatePath
  • win32pipe.CallNamedPipe
  • win32pipe.ConnectNamedPipe
  • win32pipe.CreateNamedPipe
  • win32pipe.CreatePipe
  • win32pipe.DisconnectNamedPipe
  • win32pipe.FdCreatePipe
  • win32pipe.GetNamedPipeHandleState
  • win32pipe.GetOverlappedResult
  • win32pipe.PeekNamedPipe
  • win32pipe.popen
  • win32pipe.popen2
  • win32pipe.popen3
  • win32pipe.popen4
  • win32pipe.WaitNamedPipe
  • win32print.AddPrinterConnection
  • win32print.ClosePrinter
  • win32print.DeletePrinterConnection
  • win32print.EndDocPrinter
  • win32print.EnumJobs
  • win32print.EnumPrinters
  • win32print.GetDefaultPrinter
  • win32print.GetJob
  • win32print.GetPrinter
  • win32print.OpenPrinter
  • win32print.SetDefaultPrinter
  • win32print.SetJob
  • win32print.StartDocPrinter
  • win32print.WritePrinter
  • win32process.beginthreadex
  • win32process.CreateProcess
  • win32process.CreateProcessAsUser
  • win32process.GetExitCodeProcess
  • win32process.GetExitCodeThread
  • win32process.GetPriorityClass
  • win32process.GetProcessAffinityMask
  • win32process.GetProcessVersion
  • win32process.GetStartupInfo
  • win32process.ResumeThread
  • win32process.SetPriorityClass
  • win32process.SetProcessAffinityMask
  • win32process.SetThreadAffinityMask
  • win32process.SetThreadIdealProcessor
  • win32process.SetThreadPriority
  • win32process.STARTUPINFO
  • win32process.SuspendThread
  • win32process.TerminateProcess
  • win32ras.CreatePhonebookEntry
  • win32ras.Dial
  • win32ras.EditPhonebookEntry
  • win32ras.EnumConnections
  • win32ras.EnumEntries
  • win32ras.GetConnectStatus
  • win32ras.GetEntryDialParams
  • win32ras.GetErrorString
  • win32ras.HangUp
  • win32ras.IsHandleValid
  • win32ras.SetEntryDialParams
  • win32security.ACL
  • win32security.AdjustTokenPrivileges
  • win32security.GetFileSecurity
  • win32security.GetKernelObjectSecurity
  • win32security.GetTokenInformation
  • win32security.GetUserObjectSecurity
  • win32security.ImpersonateLoggedOnUser
  • win32security.ImpersonateNamedPipeClient
  • win32security.LogonUser
  • win32security.LookupAccountName
  • win32security.LookupAccountSid
  • win32security.LookupPrivilegeValue
  • win32security.OpenProcessToken
  • win32security.OpenThreadToken
  • win32security.RevertToSelf
  • win32security.SECURITY_ATTRIBUTES
  • win32security.SECURITY_DESCRIPTOR
  • win32security.SetFileSecurity
  • win32security.SetKernelObjectSecurity
  • win32security.SetUserObjectSecurity
  • win32security.SID
  • win32service.ChangeServiceConfig
  • win32service.CloseServiceHandle
  • win32service.ControlService
  • win32service.CreateService
  • win32service.DeleteService
  • win32service.LockServiceDatabase
  • win32service.OpenSCManager
  • win32service.OpenService
  • win32service.QueryServiceLockStatus
  • win32service.QueryServiceStatus
  • win32service.SetServiceStatus
  • win32service.StartService
  • win32service.UnlockServiceDatabase
  • win32wnet.NCB
  • win32wnet.NCBBuffer
  • win32wnet.Netbios
  • win32wnet.NETRESOURCE
  • win32wnet.WNetAddConnection2
  • win32wnet.WNetCancelConnection2
  • win32wnet.WNetCloseEnum
  • win32wnet.WNetEnumResource
  • win32wnet.WNetGetUniversalName
  • win32wnet.WNetGetUser
  • win32wnet.WNetOpenEnum
  • wincerapi.CeCheckPassword
  • wincerapi.CeCopyFile
  • wincerapi.CeCreateDirectory
  • wincerapi.CeCreateFile
  • wincerapi.CeDeleteFile
  • wincerapi.CeGetDesktopDeviceCaps
  • wincerapi.CeGetFileAttributes
  • wincerapi.CeGetFileSize
  • wincerapi.CeGetSpecialFolderPath
  • wincerapi.CeGetStoreInformation
  • wincerapi.CeGetSystemInfo
  • wincerapi.CeGetSystemMetrics
  • wincerapi.CeGetSystemPowerStatusEx
  • wincerapi.CeGetTempPath
  • wincerapi.CeGetVersionEx
  • wincerapi.CeGlobalMemoryStatus
  • wincerapi.CEHANDLE
  • wincerapi.CeMoveFile
  • wincerapi.CeRapiInit
  • wincerapi.CeRapiInitEx
  • wincerapi.CeRapiUninit
  • wincerapi.CeReadFile
  • wincerapi.CeRemoveDirectory
  • wincerapi.CeSetFileAttributes
  • wincerapi.CeSHCreateShortcut
  • wincerapi.CeSHGetShortcutTarget
  • wincerapi.CreateProcess
  • wincerapi.FindFiles
  • wincerapi.WriteFile
  • win32net::NetGetAnyDCName
  • win32net::NetGetDCName
  • win32ras::RasDialFunc1


Objects and Module Properties

Object and Module Properties


PyTime.__getattr__

__getattr__()

Used to get an attribute of the object. static*/ PyObject *PyTime::getattrFunc(PyObject *ob, char *attr)


PyTime.__nonzero__

__nonzero__()

Used for detecting true/false. static*/ int PyTime::nonzeroFunc(PyObject *ob)


PyUnicode.__getattr__

__getattr__()

Used to access attributes of the Unicode object.


EVENT_ALL_ACCESS

const win32event.EVENT_ALL_ACCESS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D

Specifies all possible access flags for the event object.


EVENT_MODIFY_STATE

const win32event.EVENT_MODIFY_STATE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D

Enables use of the event handle in the SetEvent and ResetEvent functions to modify the event’s state.


INFINITE

const win32event.INFINITE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D


MAXIMUM_WAIT_OBJECTS

const win32event.MAXIMUM_WAIT_OBJECTS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D


QS_ALLEVENTS

const win32event.QS_ALLEVENTS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D

An input, WM_TIMER, WM_PAINT, WM_HOTKEY, or posted message is in the queue.


QS_ALLINPUT

const win32event.QS_ALLINPUT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D

Any message is in the queue.


QS_HOTKEY

const win32event.QS_HOTKEY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D

A WM_HOTKEY message is in the queue.


QS_INPUT

const win32event.QS_INPUT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D

An input message is in the queue.


QS_KEY

const win32event.QS_KEY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D

A WM_KEYUP, WM_KEYDOWN, WM_SYSKEYUP, or WM_SYSKEYDOWN message is in the queue.


QS_MOUSE

const win32event.QS_MOUSE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D

A WM_MOUSEMOVE message or mouse-button message (WM_LBUTTONUP, WM_RBUTTONDOWN, and so on).


QS_MOUSEBUTTON

const win32event.QS_MOUSEBUTTON;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D

A mouse-button message (WM_LBUTTONUP, WM_RBUTTONDOWN, and so on).


QS_MOUSEMOVE

const win32event.QS_MOUSEMOVE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D

A WM_MOUSEMOVE message is in the queue.


QS_PAINT

const win32event.QS_PAINT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D

A WM_PAINT message is in the queue.


QS_POSTMESSAGE

const win32event.QS_POSTMESSAGE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D

A posted message (other than those just listed) is in the queue.


QS_SENDMESSAGE

const win32event.QS_SENDMESSAGE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D

A message sent by another thread or application is in the queue.


QS_TIMER

const win32event.QS_TIMER;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D

A WM_TIMER message is in the queue.


SYNCHRONIZE

const win32event.SYNCHRONIZE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D

Windows NT only: Enables use of the event handle in any of the wait functions to wait for the event’s state to be signaled.


WAIT_ABANDONED

const win32event.WAIT_ABANDONED;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D


WAIT_ABANDONED_0

const win32event.WAIT_ABANDONED_0;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D


WAIT_FAILED

const win32event.WAIT_FAILED;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D


WAIT_IO_COMPLETION

const win32event.WAIT_IO_COMPLETION;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D


WAIT_OBJECT_0

const win32event.WAIT_OBJECT_0;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D


WAIT_TIMEOUT

const win32event.WAIT_TIMEOUT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVENT.D


EVENTLOG_AUDIT_FAILURE

const win32evtlog.EVENTLOG_AUDIT_FAILURE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_AUDIT_SUCCESS

const win32evtlog.EVENTLOG_AUDIT_SUCCESS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_BACKWARDS_READ

const win32evtlog.EVENTLOG_BACKWARDS_READ;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_END_ALL_PAIRED_EVENTS

const win32evtlog.EVENTLOG_END_ALL_PAIRED_EVENTS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_END_PAIRED_EVENT

const win32evtlog.EVENTLOG_END_PAIRED_EVENT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_ERROR_TYPE

const win32evtlog.EVENTLOG_ERROR_TYPE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_FORWARDS_READ

const win32evtlog.EVENTLOG_FORWARDS_READ;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_INFORMATION_TYPE

const win32evtlog.EVENTLOG_INFORMATION_TYPE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_PAIRED_EVENT_ACTIVE

const win32evtlog.EVENTLOG_PAIRED_EVENT_ACTIVE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_PAIRED_EVENT_INACTIVE

const win32evtlog.EVENTLOG_PAIRED_EVENT_INACTIVE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_SEEK_READ

const win32evtlog.EVENTLOG_SEEK_READ;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_SEQUENTIAL_READ

const win32evtlog.EVENTLOG_SEQUENTIAL_READ;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_START_PAIRED_EVENT

const win32evtlog.EVENTLOG_START_PAIRED_EVENT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_SUCCESS

const win32evtlog.EVENTLOG_SUCCESS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_WARNING_TYPE

const win32evtlog.EVENTLOG_WARNING_TYPE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32EVTLOG.D


win32file.COMSTAT

PyCOMSTAT = COMSTAT()

Creates a new COMSTAT object


win32file.DCB

PyDCB = DCB()

Creates a new DCB object


CBR_110

const win32file.CBR_110;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


CBR_300

const win32file.CBR_300;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


CBR_600

const win32file.CBR_600;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


CBR_1200

const win32file.CBR_1200;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


CBR_2400

const win32file.CBR_2400;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


CBR_4800

const win32file.CBR_4800;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


CBR_9600

const win32file.CBR_9600;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


CBR_14400

const win32file.CBR_14400;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


CBR_19200

const win32file.CBR_19200;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


CBR_38400

const win32file.CBR_38400;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


CBR_56000

const win32file.CBR_56000;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


CBR_57600

const win32file.CBR_57600;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


CBR_115200

const win32file.CBR_115200;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


CBR_128000

const win32file.CBR_128000;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


CBR_256000

const win32file.CBR_256000;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


CLRBREAK

const win32file.CLRBREAK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Restores character transmission and places the transmission line in a nonbreak state. The CLRBREAK extended function code is identical to the ClearCommBreak function.


CLRDTR

const win32file.CLRDTR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Clears the DTR (data-terminal-ready) signal.


CLRRTS

const win32file.CLRRTS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Clears the RTS (request-to-send) signal.


CREATE_ALWAYS

const win32file.CREATE_ALWAYS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Creates a new file. The function overwrites the file if it exists.


CREATE_NEW

const win32file.CREATE_NEW;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Creates a new file. The function fails if the specified file already exists.


DRIVE_CDROM

const win32file.DRIVE_CDROM;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The drive is a CD-ROM drive.


DRIVE_FIXED

const win32file.DRIVE_FIXED;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The disk cannot be removed from the drive.


DRIVE_NO_ROOT_DIR

const win32file.DRIVE_NO_ROOT_DIR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The root directory does not exist.


DRIVE_RAMDISK

const win32file.DRIVE_RAMDISK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The drive is a RAM disk.


DRIVE_REMOTE

const win32file.DRIVE_REMOTE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The drive is a remote (network) drive.


DRIVE_REMOVABLE

const win32file.DRIVE_REMOVABLE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The disk can be removed from the drive.


DRIVE_UNKNOWN

const win32file.DRIVE_UNKNOWN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The drive type cannot be determined.


DTR_CONTROL_DISABLE

const win32file.DTR_CONTROL_DISABLE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Disables the DTR line when the device is opened and leaves it disabled.


DTR_CONTROL_ENABLE

const win32file.DTR_CONTROL_ENABLE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Enables the DTR line when the device is opened and leaves it on.


DTR_CONTROL_HANDSHAKE

const win32file.DTR_CONTROL_HANDSHAKE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Enables DTR handshaking. If handshaking is enabled, it is an error for the application to adjust the line by using the EscapeCommFunction function.


EV_BREAK

const win32file.EV_BREAK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

A break was detected on input.


EV_CTS

const win32file.EV_CTS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The CTS (clear-to-send) signal changed state.


EV_DSR

const win32file.EV_DSR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The DSR (data-set-ready) signal changed state.


EV_ERR

const win32file.EV_ERR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

A line-status error occurred. Line-status errors are CE_FRAME, CE_OVERRUN, and CE_RXPARITY.


EV_RING

const win32file.EV_RING;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

A ring indicator was detected.


EV_RLSD

const win32file.EV_RLSD;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The RLSD (receive-line-signal-detect) signal changed state.


EV_RXCHAR

const win32file.EV_RXCHAR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

A character was received and placed in the input buffer.


EV_RXFLAG

const win32file.EV_RXFLAG;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The event character was received and placed in the input buffer. The event character is specified in the device's DCB structure, which is applied to a serial port by using the SetCommState function.


EV_TXEMPTY

const win32file.EV_TXEMPTY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The last character in the output buffer was sent.


EVENPARITY

const win32file.EVENPARITY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


FD_ACCEPT

const win32file.FD_ACCEPT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


FD_ADDRESS_LIST_CHANGE

const win32file.FD_ADDRESS_LIST_CHANGE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


FD_CLOSE

const win32file.FD_CLOSE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


FD_CONNECT

const win32file.FD_CONNECT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


FD_GROUP_QOS

const win32file.FD_GROUP_QOS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


FD_OOB

const win32file.FD_OOB;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


FD_QOS

const win32file.FD_QOS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


FD_READ

const win32file.FD_READ;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


FD_ROUTING_INTERFACE_CHANGE

const win32file.FD_ROUTING_INTERFACE_CHANGE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


FD_WRITE

const win32file.FD_WRITE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


FILE_ALL_ACCESS

const win32file.FILE_ALL_ACCESS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


FILE_ATTRIBUTE_ARCHIVE

const win32file.FILE_ATTRIBUTE_ARCHIVE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The file should be archived. Applications use this attribute to mark files for backup or removal.


FILE_ATTRIBUTE_COMPRESSED

const win32file.FILE_ATTRIBUTE_COMPRESSED;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The file or directory is compressed. For a file, this means that all of the data in the file is compressed. For a directory, this means that compression is the default for newly created files and subdirectories.


FILE_ATTRIBUTE_HIDDEN

const win32file.FILE_ATTRIBUTE_HIDDEN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The file is hidden. It is not to be included in an ordinary directory listing.


FILE_ATTRIBUTE_NORMAL

const win32file.FILE_ATTRIBUTE_NORMAL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The file has no other attributes set. This attribute is valid only if used alone.


FILE_ATTRIBUTE_OFFLINE

const win32file.FILE_ATTRIBUTE_OFFLINE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The data of the file is not immediately available. Indicates that the file data has been physically moved to offline storage.


FILE_ATTRIBUTE_READONLY

const win32file.FILE_ATTRIBUTE_READONLY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The file is read only. Applications can read the file but cannot write to it or delete it.


FILE_ATTRIBUTE_SYSTEM

const win32file.FILE_ATTRIBUTE_SYSTEM;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The file is part of or is used exclusively by the operating system.


FILE_ATTRIBUTE_TEMPORARY

const win32file.FILE_ATTRIBUTE_TEMPORARY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The file is being used for temporary storage. File systems attempt to keep all of the data in memory for quicker access rather than flushing the data back to mass storage. A temporary file should be deleted by the application as soon as it is no longer needed.


FILE_BEGIN

const win32file.FILE_BEGIN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


FILE_CURRENT

const win32file.FILE_CURRENT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


FILE_END

const win32file.FILE_END;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


FILE_FLAG_BACKUP_SEMANTICS

const win32file.FILE_FLAG_BACKUP_SEMANTICS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Windows NT only: Indicates that the file is being opened or created for a backup or restore operation. The operating system ensures that the calling process overrides file security checks, provided it has the necessary permission to do so. The relevant permissions are SE_BACKUP_NAME and SE_RESTORE_NAME. You can also set this flag to obtain a handle to a directory. A directory handle can be passed to some Win32 functions in place of a file handle.


FILE_FLAG_DELETE_ON_CLOSE

const win32file.FILE_FLAG_DELETE_ON_CLOSE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Indicates that the operating system is to delete the file immediately after all of its handles have been closed, not just the handle for which you specified FILE_FLAG_DELETE_ON_CLOSE. Subsequent open requests for the file will fail, unless FILE_SHARE_DELETE is used.


FILE_FLAG_NO_BUFFERING

const win32file.FILE_FLAG_NO_BUFFERING;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Instructs the system to open the file with no intermediate buffering or caching. When combined with FILE_FLAG_OVERLAPPED, the flag gives maximum asynchronous performance, because the I/O does not rely on the synchronous operations of the memory manager. However, some I/O operations will take longer, because data is not being held in the cache. An application must meet certain requirements when working with files opened with FILE_FLAG_NO_BUFFERING:
- File access must begin at byte offsets within the file that are integer multiples of the volume's sector size.
- File access must be for numbers of bytes that are integer multiples of the volume's sector size. For example, if the sector size is 512 bytes, an application can request reads and writes of 512, 1024, or 2048 bytes, but not of 335, 981, or 7171 bytes.
- Buffer addresses for read and write operations must be aligned on addresses in memory that are integer multiples of the volume's sector size. One way to align buffers on integer multiples of the volume sector size is to use VirtualAlloc to allocate the buffers. It allocates memory that is aligned on addresses that are integer multiples of the operating system's memory page size. Because both memory page and volume sector sizes are powers of 2, this memory is also aligned on addresses that are integer multiples of a volume's sector size. An application can determine a volume's sector size by calling the GetDiskFreeSpace function.


FILE_FLAG_OVERLAPPED

const win32file.FILE_FLAG_OVERLAPPED;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Instructs the system to initialize the object, so that operations that take a significant amount of time to process return ERROR_IO_PENDING. When the operation is finished, the specified event is set to the signaled state. When you specify FILE_FLAG_OVERLAPPED, the ReadFile and WriteFile functions must specify an OVERLAPPED structure. That is, when FILE_FLAG_OVERLAPPED is specified, an application must perform overlapped reading and writing. When FILE_FLAG_OVERLAPPED is specified, the system does not maintain the file pointer. The file position must be passed as part of the lpOverlapped parameter (pointing to an OVERLAPPED structure) to the ReadFile and WriteFile functions. This flag also enables more than one operation to be performed simultaneously with the handle (a simultaneous read and write operation, for example).


FILE_FLAG_POSIX_SEMANTICS

const win32file.FILE_FLAG_POSIX_SEMANTICS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Indicates that the file is to be accessed according to POSIX rules. This includes allowing multiple files with names, differing only in case, for file systems that support such naming. Use care when using this option because files created with this flag may not be accessible by applications written for MS-DOS or Windows.


FILE_FLAG_RANDOM_ACCESS

const win32file.FILE_FLAG_RANDOM_ACCESS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Indicates that the file is accessed randomly. The system can use this as a hint to optimize file caching.


FILE_FLAG_SEQUENTIAL_SCAN

const win32file.FILE_FLAG_SEQUENTIAL_SCAN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Indicates that the file is to be accessed sequentially from beginning to end. The system can use this as a hint to optimize file caching. If an application moves the file pointer for random access, optimum caching may not occur; however, correct operation is still guaranteed. Specifying this flag can increase performance for applications that read large files using sequential access. Performance gains can be even more noticeable for applications that read large files mostly sequentially, but occasionally skip over small ranges of bytes.


FILE_FLAG_WRITE_THROUGH

const win32file.FILE_FLAG_WRITE_THROUGH;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Instructs the system to write through any intermediate cache and go directly to disk. Windows can still cache write operations, but cannot lazily flush them.


FILE_GENERIC_READ

const win32file.FILE_GENERIC_READ;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


FILE_GENERIC_WRITE

const win32file.FILE_GENERIC_WRITE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


FILE_SHARE_DELETE

const win32file.FILE_SHARE_DELETE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Windows NT only: Subsequent open operations on the object will succeed only if delete access is requested.


FILE_SHARE_READ

const win32file.FILE_SHARE_READ;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Subsequent open operations on the object will succeed only if read access is requested.


FILE_SHARE_WRITE

const win32file.FILE_SHARE_WRITE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Subsequent open operations on the object will succeed only if write access is requested.


FILE_TYPE_CHAR

const win32file.FILE_TYPE_CHAR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The specified file is a character file, typically an LPT device or a console.


FILE_TYPE_DISK

const win32file.FILE_TYPE_DISK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The specified file is a disk file.


FILE_TYPE_PIPE

const win32file.FILE_TYPE_PIPE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The specified file is either a named or anonymous pipe.


FILE_TYPE_UNKNOWN

const win32file.FILE_TYPE_UNKNOWN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

The type of the specified file is unknown.


GENERIC_EXECUTE

const win32file.GENERIC_EXECUTE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Specifies execute access.


GENERIC_READ

const win32file.GENERIC_READ;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Specifies read access to the object. Data can be read from the file and the file pointer can be moved. Combine with GENERIC_WRITE for read-write access.


GENERIC_WRITE

const win32file.GENERIC_WRITE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Specifies write access to the object. Data can be written to the file and the file pointer can be moved. Combine with GENERIC_READ for read-write access.


INVALID_HANDLE_VALUE

const win32file.INVALID_HANDLE_VALUE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


MARKPARITY

const win32file.MARKPARITY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


MOVEFILE_COPY_ALLOWED

const win32file.MOVEFILE_COPY_ALLOWED;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

If the file is to be moved to a different volume, the function simulates the move by using the CopyFile and DeleteFile functions. Cannot be combined with the MOVEFILE_DELAY_UNTIL_REBOOT flag.


MOVEFILE_DELAY_UNTIL_REBOOT

const win32file.MOVEFILE_DELAY_UNTIL_REBOOT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Windows NT only: The function does not move the file until the operating system is restarted. The system moves the file immediately after AUTOCHK is executed, but before creating any paging files. Consequently, this parameter enables the function to delete paging files from previous startups.


MOVEFILE_REPLACE_EXISTING

const win32file.MOVEFILE_REPLACE_EXISTING;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

If a file of the name specified by lpNewFileName already exists, the function replaces its contents with those specified by lpExistingFileName.


MOVEFILE_WRITE_THROUGH

const win32file.MOVEFILE_WRITE_THROUGH;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Windows NT only: The function does not return until the file has actually been moved on the disk. Setting this flag guarantees that a move perfomed as a copy and delete operation is flushed to disk before the function returns. The flush occurs at the end of the copy operation.
This flag has no effect if the MOVEFILE_DELAY_UNTIL_REBOOT flag is set.


NOPARITY

const win32file.NOPARITY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


ODDPARITY

const win32file.ODDPARITY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


ONE5STOPBITS

const win32file.ONE5STOPBITS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


ONESTOPBIT

const win32file.ONESTOPBIT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


OPEN_ALWAYS

const win32file.OPEN_ALWAYS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Opens the file, if it exists. If the file does not exist, the function creates the file as if dwCreationDistribution were CREATE_NEW.


OPEN_EXISTING

const win32file.OPEN_EXISTING;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Opens the file. The function fails if the file does not exist.


PURGE_RXABORT

const win32file.PURGE_RXABORT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Terminates all outstanding overlapped read operations and returns immediately, even if the read operations have not been completed.


PURGE_RXCLEAR

const win32file.PURGE_RXCLEAR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Clears the input buffer (if the device driver has one).


PURGE_TXABORT

const win32file.PURGE_TXABORT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Terminates all outstanding overlapped write operations and returns immediately, even if the write operations have not been completed.


PURGE_TXCLEAR

const win32file.PURGE_TXCLEAR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Clears the output buffer (if the device driver has one).


RTS_CONTROL_DISABLE

const win32file.RTS_CONTROL_DISABLE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Disables the RTS line when the device is opened and leaves it disabled.


RTS_CONTROL_ENABLE

const win32file.RTS_CONTROL_ENABLE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Enables the RTS line when the device is opened and leaves it on.


RTS_CONTROL_HANDSHAKE

const win32file.RTS_CONTROL_HANDSHAKE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Enables RTS handshaking. The driver raises the RTS line when the "type-ahead" (input) buffer is less than one-half full and lowers the RTS line when the buffer is more than three-quarters full. If handshaking is enabled, it is an error for the application to adjust the line by using the EscapeCommFunction function.


RTS_CONTROL_TOGGLE

const win32file.RTS_CONTROL_TOGGLE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Specifies that the RTS line will be high if bytes are available for transmission. After all buffered bytes have been sent, the RTS line will be low.


SCS_32BIT_BINARY

const win32file.SCS_32BIT_BINARY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

A Win32-based application


SCS_DOS_BINARY

const win32file.SCS_DOS_BINARY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

An MS-DOS - based application


SCS_OS216_BINARY

const win32file.SCS_OS216_BINARY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

A 16-bit OS/2-based application


SCS_PIF_BINARY

const win32file.SCS_PIF_BINARY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

A PIF file that executes an MS-DOS - based application


SCS_POSIX_BINARY

const win32file.SCS_POSIX_BINARY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

A POSIX - based application


SCS_WOW_BINARY

const win32file.SCS_WOW_BINARY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

A 16-bit Windows-based application


SECURITY_ANONYMOUS

const win32file.SECURITY_ANONYMOUS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Specifies to impersonate the client at the Anonymous impersonation level.


SECURITY_CONTEXT_TRACKING

const win32file.SECURITY_CONTEXT_TRACKING;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Specifies that the security tracking mode is dynamic. If this flag is not specified, Security Tracking Mode is static.


SECURITY_DELEGATION

const win32file.SECURITY_DELEGATION;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Specifies to impersonate the client at the Delegation impersonation level.


SECURITY_EFFECTIVE_ONLY

const win32file.SECURITY_EFFECTIVE_ONLY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Specifies that only the enabled aspects


SECURITY_IDENTIFICATION

const win32file.SECURITY_IDENTIFICATION;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Specifies to impersonate the client at the Identification impersonation level.


SECURITY_IMPERSONATION

const win32file.SECURITY_IMPERSONATION;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Specifies to impersonate the client at the Impersonation impersonation level.


SETBREAK

const win32file.SETBREAK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Suspends character transmission and places the transmission line in a break state until the ClearCommBreak function is called (or EscapeCommFunction is called with the CLRBREAK extended function code). The SETBREAK extended function code is identical to the SetCommBreak function. Note that this extended function does not flush data that has not been transmitted.


SETDTR

const win32file.SETDTR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Sends the DTR (data-terminal-ready) signal.


SETRTS

const win32file.SETRTS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Sends the RTS (request-to-send) signal.


SETXOFF

const win32file.SETXOFF;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Causes transmission to act as if an XOFF character has been received.


SETXON

const win32file.SETXON;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Causes transmission to act as if an XON character has been received.


SO_CONNECT_TIME

const win32file.SO_CONNECT_TIME;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


SO_UPDATE_ACCEPT_CONTEXT

const win32file.SO_UPDATE_ACCEPT_CONTEXT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


SPACEPARITY

const win32file.SPACEPARITY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


TRUNCATE_EXISTING

const win32file.TRUNCATE_EXISTING;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D

Opens the file. Once opened, the file is truncated so that its size is zero bytes. The calling process must open the file with at least GENERIC_WRITE access. The function fails if the file does not exist.


TWOSTOPBITS

const win32file.TWOSTOPBITS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


WSA_IO_PENDING

const win32file.WSA_IO_PENDING;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


WSA_OPERATION_ABORTED

const win32file.WSA_OPERATION_ABORTED;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


WSAECONNABORTED

const win32file.WSAECONNABORTED;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


WSAECONNRESET

const win32file.WSAECONNRESET;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


WSAEDISCON

const win32file.WSAEDISCON;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


WSAEFAULT

const win32file.WSAEFAULT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


WSAEINPROGRESS

const win32file.WSAEINPROGRESS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


WSAEINTR

const win32file.WSAEINTR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


WSAEINVAL

const win32file.WSAEINVAL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


WSAEMSGSIZE

const win32file.WSAEMSGSIZE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


WSAENETDOWN

const win32file.WSAENETDOWN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


WSAENETRESET

const win32file.WSAENETRESET;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


WSAENOTCONN

const win32file.WSAENOTCONN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


WSAENOTSOCK

const win32file.WSAENOTSOCK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


WSAEOPNOTSUPP

const win32file.WSAEOPNOTSUPP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


WSAESHUTDOWN

const win32file.WSAESHUTDOWN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


WSAEWOULDBLOCK

const win32file.WSAEWOULDBLOCK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32FILE.D


CLR_NONE

const win32gui.CLR_NONE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


ILC_COLOR

const win32gui.ILC_COLOR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


ILC_COLOR4

const win32gui.ILC_COLOR4;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


ILC_COLOR8

const win32gui.ILC_COLOR8;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


ILC_COLOR16

const win32gui.ILC_COLOR16;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


ILC_COLOR24

const win32gui.ILC_COLOR24;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


ILC_COLOR32

const win32gui.ILC_COLOR32;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


ILC_COLORDDB

const win32gui.ILC_COLORDDB;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


ILC_MASK

const win32gui.ILC_MASK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


ILD_BLEND

const win32gui.ILD_BLEND;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


ILD_BLEND25

const win32gui.ILD_BLEND25;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


ILD_BLEND50

const win32gui.ILD_BLEND50;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


ILD_FOCUS

const win32gui.ILD_FOCUS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


ILD_MASK

const win32gui.ILD_MASK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


ILD_NORMAL

const win32gui.ILD_NORMAL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


ILD_SELECTED

const win32gui.ILD_SELECTED;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


ILD_TRANSPARENT

const win32gui.ILD_TRANSPARENT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


IMAGE_BITMAP

const win32gui.IMAGE_BITMAP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


IMAGE_CURSOR

const win32gui.IMAGE_CURSOR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


IMAGE_ICON

const win32gui.IMAGE_ICON;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


LR_CREATEDIBSECTION

const win32gui.LR_CREATEDIBSECTION;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


LR_DEFAULTCOLOR

const win32gui.LR_DEFAULTCOLOR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


LR_DEFAULTSIZE

const win32gui.LR_DEFAULTSIZE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


LR_LOADFROMFILE

const win32gui.LR_LOADFROMFILE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


LR_LOADMAP3DCOLORS

const win32gui.LR_LOADMAP3DCOLORS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


LR_LOADTRANSPARENT

const win32gui.LR_LOADTRANSPARENT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


LR_MONOCHROME

const win32gui.LR_MONOCHROME;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


LR_SHARED

const win32gui.LR_SHARED;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


LR_VGACOLOR

const win32gui.LR_VGACOLOR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


NIF_ICON

const win32gui.NIF_ICON;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


NIF_MESSAGE

const win32gui.NIF_MESSAGE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


NIF_TIP

const win32gui.NIF_TIP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


NIM_ADD

const win32gui.NIM_ADD;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D

Adds an icon to the status area.


NIM_DELETE

const win32gui.NIM_DELETE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D

Deletes an icon from the status area.


NIM_MODIFY

const win32gui.NIM_MODIFY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D

Modifies an icon in the status area.


NIM_SETFOCUS

const win32gui.NIM_SETFOCUS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D

Give the icon focus.


TPM_BOTTOMALIGN

const win32gui.TPM_BOTTOMALIGN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


TPM_CENTERALIGN

const win32gui.TPM_CENTERALIGN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


TPM_LEFTALIGN

const win32gui.TPM_LEFTALIGN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


TPM_LEFTBUTTON

const win32gui.TPM_LEFTBUTTON;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


TPM_NONOTIFY

const win32gui.TPM_NONOTIFY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


TPM_RETURNCMD

const win32gui.TPM_RETURNCMD;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


TPM_RIGHTALIGN

const win32gui.TPM_RIGHTALIGN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


TPM_RIGHTBUTTON

const win32gui.TPM_RIGHTBUTTON;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


TPM_TOPALIGN

const win32gui.TPM_TOPALIGN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


TPM_VCENTERALIGN

const win32gui.TPM_VCENTERALIGN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32GUI.D


debug

const win32help.debug;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

1 if we are current using a _DEBUG build of win32help, else 0.


HH_ALINK_LOOKUP

const win32help.HH_ALINK_LOOKUP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

ALink version of HH_KEYWORD_LOOKUP


HH_CLOSE_ALL

const win32help.HH_CLOSE_ALL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

close all windows opened directly or indirectly by the caller


HH_DISPLAY_INDEX

const win32help.HH_DISPLAY_INDEX;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

not currently implemented


HH_DISPLAY_SEARCH

const win32help.HH_DISPLAY_SEARCH;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

not currently implemented


HH_DISPLAY_TEXT_POPUP

const win32help.HH_DISPLAY_TEXT_POPUP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

display string resource id or text in a popup window


HH_DISPLAY_TOC

const win32help.HH_DISPLAY_TOC;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

not currently implemented


HH_DISPLAY_TOPIC

const win32help.HH_DISPLAY_TOPIC;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HH_ENUM_CATEGORY

const win32help.HH_ENUM_CATEGORY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Get category name, call repeatedly to enumerate, -1 at end


HH_ENUM_CATEGORY_IT

const win32help.HH_ENUM_CATEGORY_IT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Get category info type members, call repeatedly to enumerate, -1 at end


HH_ENUM_INFO_TYPE

const win32help.HH_ENUM_INFO_TYPE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Get Info type name, call repeatedly to enumerate, -1 at end


HH_FTS_DEFAULT_PROXIMITY

const win32help.HH_FTS_DEFAULT_PROXIMITY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HH_GET_LAST_ERROR

const win32help.HH_GET_LAST_ERROR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

not currently implemented See HHERROR.h


HH_GET_WIN_HANDLE

const win32help.HH_GET_WIN_HANDLE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HH_GET_WIN_TYPE

const win32help.HH_GET_WIN_TYPE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HH_GPROPID_CONTENT_LANGUAGE

const win32help.HH_GPROPID_CONTENT_LANGUAGE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

long: LandId for desired content.


HH_GPROPID_CURRENT_SUBSET

const win32help.HH_GPROPID_CURRENT_SUBSET;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

BSTR: Current subset.


HH_GPROPID_SINGLETHREAD

const win32help.HH_GPROPID_SINGLETHREAD;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

VARIANT_BOOL: True for single thread


HH_GPROPID_TOOLBAR_MARGIN

const win32help.HH_GPROPID_TOOLBAR_MARGIN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

long: Provides a left/right margin around the toolbar.


HH_GPROPID_UI_LANGUAGE

const win32help.HH_GPROPID_UI_LANGUAGE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

long: LangId of the UI.


HH_HELP_CONTEXT

const win32help.HH_HELP_CONTEXT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

display mapped numeric value in dwData


HH_HELP_FINDER

const win32help.HH_HELP_FINDER;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

WinHelp equivalent


HH_INITIALIZE

const win32help.HH_INITIALIZE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Initializes the help system.


HH_KEYWORD_LOOKUP

const win32help.HH_KEYWORD_LOOKUP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HH_MAX_TABS_CUSTOM

const win32help.HH_MAX_TABS_CUSTOM;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HH_PRETRANSLATEMESSAGE

const win32help.HH_PRETRANSLATEMESSAGE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Pumps messages. (NULL, NULL, MSG*).


HH_RESERVED1

const win32help.HH_RESERVED1;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HH_RESERVED2

const win32help.HH_RESERVED2;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HH_RESERVED3

const win32help.HH_RESERVED3;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HH_RESET_IT_FILTER

const win32help.HH_RESET_IT_FILTER;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Clear the info type filter of all info types.


HH_SET_EXCLUSIVE_FILTER

const win32help.HH_SET_EXCLUSIVE_FILTER;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

set exclusive filtering method for untyped topics to be excluded from display


HH_SET_GLOBAL_PROPERTY

const win32help.HH_SET_GLOBAL_PROPERTY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Set a global property. (NULL, NULL, HH_GPROP).


HH_SET_INCLUSIVE_FILTER

const win32help.HH_SET_INCLUSIVE_FILTER;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

set inclusive filtering method for untyped topics to be included in display


HH_SET_INFO_TYPE

const win32help.HH_SET_INFO_TYPE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Add Info type to filter.


HH_SET_WIN_TYPE

const win32help.HH_SET_WIN_TYPE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HH_SYNC

const win32help.HH_SYNC;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HH_TAB_AUTHOR

const win32help.HH_TAB_AUTHOR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HH_TAB_CONTENTS

const win32help.HH_TAB_CONTENTS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HH_TAB_CUSTOM_FIRST

const win32help.HH_TAB_CUSTOM_FIRST;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HH_TAB_CUSTOM_LAST

const win32help.HH_TAB_CUSTOM_LAST;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HH_TAB_FAVORITES

const win32help.HH_TAB_FAVORITES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HH_TAB_HISTORY

const win32help.HH_TAB_HISTORY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HH_TAB_INDEX

const win32help.HH_TAB_INDEX;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HH_TAB_SEARCH

const win32help.HH_TAB_SEARCH;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HH_TP_HELP_CONTEXTMENU

const win32help.HH_TP_HELP_CONTEXTMENU;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

text popup help, same as WinHelp HELP_CONTEXTMENU


HH_TP_HELP_WM_HELP

const win32help.HH_TP_HELP_WM_HELP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

text popup help, same as WinHelp HELP_WM_HELP


HH_UNINITIALIZE

const win32help.HH_UNINITIALIZE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Uninitializes the help system.


HHACT_BACK

const win32help.HHACT_BACK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_CONTRACT

const win32help.HHACT_CONTRACT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_CUSTOMIZE

const win32help.HHACT_CUSTOMIZE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_EXPAND

const win32help.HHACT_EXPAND;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_FORWARD

const win32help.HHACT_FORWARD;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_HIGHLIGHT

const win32help.HHACT_HIGHLIGHT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_HOME

const win32help.HHACT_HOME;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_JUMP1

const win32help.HHACT_JUMP1;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_JUMP2

const win32help.HHACT_JUMP2;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_LAST_ENUM

const win32help.HHACT_LAST_ENUM;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_NOTES

const win32help.HHACT_NOTES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_OPTIONS

const win32help.HHACT_OPTIONS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_PRINT

const win32help.HHACT_PRINT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_REFRESH

const win32help.HHACT_REFRESH;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_STOP

const win32help.HHACT_STOP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_SYNC

const win32help.HHACT_SYNC;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_TAB_CONTENTS

const win32help.HHACT_TAB_CONTENTS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_TAB_FAVORITES

const win32help.HHACT_TAB_FAVORITES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_TAB_HISTORY

const win32help.HHACT_TAB_HISTORY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_TAB_INDEX

const win32help.HHACT_TAB_INDEX;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_TAB_SEARCH

const win32help.HHACT_TAB_SEARCH;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_TOC_NEXT

const win32help.HHACT_TOC_NEXT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_TOC_PREV

const win32help.HHACT_TOC_PREV;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_ZOOM

const win32help.HHACT_ZOOM;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHN_FIRST

const win32help.HHN_FIRST;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHN_LAST

const win32help.HHN_LAST;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHN_NAVCOMPLETE

const win32help.HHN_NAVCOMPLETE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHN_TRACK

const win32help.HHN_TRACK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHN_WINDOW_CREATE

const win32help.HHN_WINDOW_CREATE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_BUTTON_BACK

const win32help.HHWIN_BUTTON_BACK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Back button


HHWIN_BUTTON_BROWSE_BCK

const win32help.HHWIN_BUTTON_BROWSE_BCK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


HHWIN_BUTTON_BROWSE_FWD

const win32help.HHWIN_BUTTON_BROWSE_FWD;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


HHWIN_BUTTON_CONTENTS

const win32help.HHWIN_BUTTON_CONTENTS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


HHWIN_BUTTON_EXPAND

const win32help.HHWIN_BUTTON_EXPAND;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Expand/contract button


HHWIN_BUTTON_FAVORITES

const win32help.HHWIN_BUTTON_FAVORITES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


HHWIN_BUTTON_FORWARD

const win32help.HHWIN_BUTTON_FORWARD;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Forward button


HHWIN_BUTTON_HISTORY

const win32help.HHWIN_BUTTON_HISTORY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


HHWIN_BUTTON_HOME

const win32help.HHWIN_BUTTON_HOME;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Home button


HHWIN_BUTTON_INDEX

const win32help.HHWIN_BUTTON_INDEX;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


HHWIN_BUTTON_JUMP1

const win32help.HHWIN_BUTTON_JUMP1;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_BUTTON_JUMP2

const win32help.HHWIN_BUTTON_JUMP2;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_BUTTON_NOTES

const win32help.HHWIN_BUTTON_NOTES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


HHWIN_BUTTON_OPTIONS

const win32help.HHWIN_BUTTON_OPTIONS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Options button


HHWIN_BUTTON_PRINT

const win32help.HHWIN_BUTTON_PRINT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Print button


HHWIN_BUTTON_REFRESH

const win32help.HHWIN_BUTTON_REFRESH;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Refresh button


HHWIN_BUTTON_SEARCH

const win32help.HHWIN_BUTTON_SEARCH;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


HHWIN_BUTTON_STOP

const win32help.HHWIN_BUTTON_STOP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Stop button


HHWIN_BUTTON_SYNC

const win32help.HHWIN_BUTTON_SYNC;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Sync button


HHWIN_BUTTON_TOC_NEXT

const win32help.HHWIN_BUTTON_TOC_NEXT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_BUTTON_TOC_PREV

const win32help.HHWIN_BUTTON_TOC_PREV;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_BUTTON_ZOOM

const win32help.HHWIN_BUTTON_ZOOM;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_DEF_BUTTONS

const win32help.HHWIN_DEF_BUTTONS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_NAVTAB_BOTTOM

const win32help.HHWIN_NAVTAB_BOTTOM;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_NAVTAB_LEFT

const win32help.HHWIN_NAVTAB_LEFT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_NAVTAB_TOP

const win32help.HHWIN_NAVTAB_TOP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_PARAM_CUR_TAB

const win32help.HHWIN_PARAM_CUR_TAB;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

valid curNavType


HHWIN_PARAM_EXPANSION

const win32help.HHWIN_PARAM_EXPANSION;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

valid notExpanded


HHWIN_PARAM_EXSTYLES

const win32help.HHWIN_PARAM_EXSTYLES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

valid exStyles


HHWIN_PARAM_HISTORY_COUNT

const win32help.HHWIN_PARAM_HISTORY_COUNT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

valid cHistory


HHWIN_PARAM_INFOTYPES

const win32help.HHWIN_PARAM_INFOTYPES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

valid apInfoTypes


HHWIN_PARAM_NAV_WIDTH

const win32help.HHWIN_PARAM_NAV_WIDTH;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

valid navWidth


HHWIN_PARAM_PROPERTIES

const win32help.HHWIN_PARAM_PROPERTIES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

valid winProperties


HHWIN_PARAM_RECT

const win32help.HHWIN_PARAM_RECT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

valid windowPos


HHWIN_PARAM_SHOWSTATE

const win32help.HHWIN_PARAM_SHOWSTATE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

valid showState


HHWIN_PARAM_STYLES

const win32help.HHWIN_PARAM_STYLES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

valid styles


HHWIN_PARAM_TABORDER

const win32help.HHWIN_PARAM_TABORDER;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

valid taborder


HHWIN_PARAM_TABPOS

const win32help.HHWIN_PARAM_TABPOS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

valid tabpos


HHWIN_PARAM_TB_FLAGS

const win32help.HHWIN_PARAM_TB_FLAGS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

valid toolBarFlags


HHWIN_PROP_AUTO_SYNC

const win32help.HHWIN_PROP_AUTO_SYNC;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

automatically ssync contents and index


HHWIN_PROP_CHANGE_TITLE

const win32help.HHWIN_PROP_CHANGE_TITLE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Put current HTML title in title bar


HHWIN_PROP_MENU

const win32help.HHWIN_PROP_MENU;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Menu


HHWIN_PROP_NAV_ONLY_WIN

const win32help.HHWIN_PROP_NAV_ONLY_WIN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Only display the navigation window


HHWIN_PROP_NO_TOOLBAR

const win32help.HHWIN_PROP_NO_TOOLBAR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Don't display a toolbar


HHWIN_PROP_NODEF_EXSTYLES

const win32help.HHWIN_PROP_NODEF_EXSTYLES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

no default extended window styles (only HH_WINTYPE.exStyles)


HHWIN_PROP_NODEF_STYLES

const win32help.HHWIN_PROP_NODEF_STYLES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

no default window styles (only HH_WINTYPE.styles)


HHWIN_PROP_NOTB_TEXT

const win32help.HHWIN_PROP_NOTB_TEXT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

no text on toolbar buttons


HHWIN_PROP_NOTITLEBAR

const win32help.HHWIN_PROP_NOTITLEBAR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

no title bar


HHWIN_PROP_ONTOP

const win32help.HHWIN_PROP_ONTOP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Top-most window


HHWIN_PROP_POST_QUIT

const win32help.HHWIN_PROP_POST_QUIT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

post WM_QUIT message when window closes


HHWIN_PROP_TAB_ADVSEARCH

const win32help.HHWIN_PROP_TAB_ADVSEARCH;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Advanced FTS UI.


HHWIN_PROP_TAB_AUTOHIDESHOW

const win32help.HHWIN_PROP_TAB_AUTOHIDESHOW;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Automatically hide/show tri-pane window


HHWIN_PROP_TAB_CUSTOM1

const win32help.HHWIN_PROP_TAB_CUSTOM1;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Use custom tab #1


HHWIN_PROP_TAB_CUSTOM2

const win32help.HHWIN_PROP_TAB_CUSTOM2;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Use custom tab #2


HHWIN_PROP_TAB_CUSTOM3

const win32help.HHWIN_PROP_TAB_CUSTOM3;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Use custom tab #3


HHWIN_PROP_TAB_CUSTOM4

const win32help.HHWIN_PROP_TAB_CUSTOM4;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Use custom tab #4


HHWIN_PROP_TAB_CUSTOM5

const win32help.HHWIN_PROP_TAB_CUSTOM5;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Use custom tab #5


HHWIN_PROP_TAB_CUSTOM6

const win32help.HHWIN_PROP_TAB_CUSTOM6;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Use custom tab #6


HHWIN_PROP_TAB_CUSTOM7

const win32help.HHWIN_PROP_TAB_CUSTOM7;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Use custom tab #7


HHWIN_PROP_TAB_CUSTOM8

const win32help.HHWIN_PROP_TAB_CUSTOM8;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Use custom tab #8


HHWIN_PROP_TAB_CUSTOM9

const win32help.HHWIN_PROP_TAB_CUSTOM9;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

Use custom tab #9


HHWIN_PROP_TAB_FAVORITES

const win32help.HHWIN_PROP_TAB_FAVORITES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

include favorites tab in navigation pane


HHWIN_PROP_TAB_HISTORY

const win32help.HHWIN_PROP_TAB_HISTORY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

include history tab in navigation pane


HHWIN_PROP_TAB_SEARCH

const win32help.HHWIN_PROP_TAB_SEARCH;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

include search tab in navigation pane


HHWIN_PROP_TRACKING

const win32help.HHWIN_PROP_TRACKING;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

send tracking notification messages


HHWIN_PROP_TRI_PANE

const win32help.HHWIN_PROP_TRI_PANE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

use a tri-pane window


HHWIN_PROP_USER_POS

const win32help.HHWIN_PROP_USER_POS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

After initial creation, user controls window size/position


HHWIN_TB_MARGIN

const win32help.HHWIN_TB_MARGIN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

the window type has a margin


IDTB_BACK

const win32help.IDTB_BACK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_BROWSE_BACK

const win32help.IDTB_BROWSE_BACK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_BROWSE_FWD

const win32help.IDTB_BROWSE_FWD;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_CONTENTS

const win32help.IDTB_CONTENTS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


IDTB_CONTRACT

const win32help.IDTB_CONTRACT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_CUSTOMIZE

const win32help.IDTB_CUSTOMIZE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_EXPAND

const win32help.IDTB_EXPAND;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_FAVORITES

const win32help.IDTB_FAVORITES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


IDTB_FORWARD

const win32help.IDTB_FORWARD;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_HISTORY

const win32help.IDTB_HISTORY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


IDTB_HOME

const win32help.IDTB_HOME;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_INDEX

const win32help.IDTB_INDEX;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


IDTB_JUMP1

const win32help.IDTB_JUMP1;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_JUMP2

const win32help.IDTB_JUMP2;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_NOTES

const win32help.IDTB_NOTES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


IDTB_OPTIONS

const win32help.IDTB_OPTIONS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_PRINT

const win32help.IDTB_PRINT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_REFRESH

const win32help.IDTB_REFRESH;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_SEARCH

const win32help.IDTB_SEARCH;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


IDTB_STOP

const win32help.IDTB_STOP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_SYNC

const win32help.IDTB_SYNC;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_TOC_NEXT

const win32help.IDTB_TOC_NEXT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_TOC_PREV

const win32help.IDTB_TOC_PREV;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_ZOOM

const win32help.IDTB_ZOOM;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32HELPMODULE.CPP


win32net.NetLocalGroupAdd

NetLocalGroupAdd(server, level, data)

Creates a new group.

Parameters

server : string/PyUnicode

The name of the server, or None.

level : int

The information level contained in the data

data : mapping

A dictionary holding the group data.

Win32 API References

NetLocalGroupAdd


win32net.NetLocalGroupDel

NetLocalGroupDel(server, groupname)

Deletes a group.

Parameters

server : string/PyUnicode

The name of the server, or None.

groupname : string/PyUnicode

The group name

Win32 API References

NetLocalGroupDel


win32net.NetLocalGroupEnum

([dict, ...], total, resumeHandle) = NetLocalGroupEnum(server, level , resumeHandle , prefLen )

Enumerates all groups.

Parameters

server : string/PyUnicode

The name of the server, or None.

level : int

The level of data required.

resumeHandle=0 : int

A resume handle. See the return description for more information.

prefLen=MAX_PREFERRED_LENGTH : int

The preferred length of the data buffer.

Win32 API References

NetLocalGroupEnum

Return Value

The result is a list of items read (with each item being a dictionary of format PyGROUP_INFO_*, depending on the level parameter), the total available, and a "resume handle". If the result handle is true, you should call this function again to fetch more data, passing this handle in the resumeHandle param.


win32net.NetLocalGroupGetInfo

dict = NetLocalGroupGetInfo(server, groupname , level )

Retrieves information about a particular group on a server.

Parameters

server : string/PyUnicode

The name of the server, or None.

groupname : string/PyUnicode

The group name

level : int

The information level contained in the data

Win32 API References

NetLocalGroupGetInfo

Return Value

The result will be a dictionary in one of the PyLOCALGROUP_INFO_* formats, depending on the level parameter.


win32net.NetLocalGroupSetInfo

NetLocalGroupSetInfo(server, groupname, level, data)

Sets information about a particular group account on a server.

Parameters

server : string/PyUnicode

The name of the server, or None.

groupname : string/PyUnicode

The group name

level : int

The information level contained in the data

data : mapping

A dictionary holding the group data.

Win32 API References

NetLocalGroupSetInfo


NMPWAIT_NOWAIT

const win32pipe.NMPWAIT_NOWAIT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PIPE.D


NMPWAIT_USE_DEFAULT_WAIT

const win32pipe.NMPWAIT_USE_DEFAULT_WAIT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PIPE.D


NMPWAIT_WAIT_FOREVER

const win32pipe.NMPWAIT_WAIT_FOREVER;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_ACCESS_DUPLEX

const win32pipe.PIPE_ACCESS_DUPLEX;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_ACCESS_INBOUND

const win32pipe.PIPE_ACCESS_INBOUND;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_ACCESS_OUTBOUND

const win32pipe.PIPE_ACCESS_OUTBOUND;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_NOWAIT

const win32pipe.PIPE_NOWAIT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_READMODE_BYTE

const win32pipe.PIPE_READMODE_BYTE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_READMODE_MESSAGE

const win32pipe.PIPE_READMODE_MESSAGE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_TYPE_BYTE

const win32pipe.PIPE_TYPE_BYTE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_TYPE_MESSAGE

const win32pipe.PIPE_TYPE_MESSAGE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_UNLIMITED_INSTANCES

const win32pipe.PIPE_UNLIMITED_INSTANCES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_WAIT

const win32pipe.PIPE_WAIT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PIPE.D


ABOVE_NORMAL_PRIORITY_CLASS

const win32process.ABOVE_NORMAL_PRIORITY_CLASS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

Windows 2000: Indicates a process that has priority above NORMAL_PRIORITY_CLASS but below HIGH_PRIORITY_CLASS.


BELOW_NORMAL_PRIORITY_CLASS

const win32process.BELOW_NORMAL_PRIORITY_CLASS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

Windows 2000: Indicates a process that has priority above IDLE_PRIORITY_CLASS but below NORMAL_PRIORITY_CLASS.


CREATE_DEFAULT_ERROR_MODE

const win32process.CREATE_DEFAULT_ERROR_MODE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

The new process does not inherit the error mode of the calling process. Instead, CreateProcess gives the new process the current default error mode. An application sets the current default error mode by calling SetErrorMode. This flag is particularly useful for multi-threaded shell applications that run with hard errors disabled.


CREATE_NEW_CONSOLE

const win32process.CREATE_NEW_CONSOLE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

The new process has a new console, instead of inheriting the parent's console. This flag cannot be used with the DETACHED_PROCESS flag.


CREATE_NEW_PROCESS_GROUP

const win32process.CREATE_NEW_PROCESS_GROUP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

The new process is the root process of a new process group. The process group includes all processes that are descendants of this root process. The process identifier of the new process group is the same as the process identifier, which is returned in the lpProcessInformation parameter. Process groups are used by the GenerateConsoleCtrlEvent function to enable sending a ctrl+c or ctrl+break signal to a group of console processes.


CREATE_SEPARATE_WOW_VDM

const win32process.CREATE_SEPARATE_WOW_VDM;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

Windows NT: This flag is valid only when starting a 16-bit Windows-based application. If set, the new process is run in a private Virtual DOS Machine (VDM). By default, all 16-bit Windows-based applications are run as threads in a single, shared VDM. The advantage of running separately is that a crash only kills the single VDM; any other programs running in distinct VDMs continue to function normally. Also, 16-bit Windows-based applications that are run in separate VDMs have separate input queues. That means that if one application hangs momentarily, applications in separate VDMs continue to receive input. The disadvantage of running separately is that it takes significantly more memory to do so. You should use this flag only if the user requests that 16-bit applications should run in them own VDM.


CREATE_SHARED_WOW_VDM

const win32process.CREATE_SHARED_WOW_VDM;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

Windows NT: The flag is valid only when starting a 16-bit Windows-based application. If the DefaultSeparateVDM switch in the Windows section of WIN.INI is TRUE, this flag causes the CreateProcess function to override the switch and run the new process in the shared Virtual DOS Machine.


CREATE_SUSPENDED

const win32process.CREATE_SUSPENDED;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D


CREATE_UNICODE_ENVIRONMENT

const win32process.CREATE_UNICODE_ENVIRONMENT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

If set, the environment block pointed to by lpEnvironment uses Unicode characters. If clear, the environment block uses ANSI characters.


DEBUG_ONLY_THIS_PROCESS

const win32process.DEBUG_ONLY_THIS_PROCESS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

If not set and the calling process is being debugged, the new process becomes another process being debugged by the calling process's debugger. If the calling process is not a process being debugged, no debugging-related actions occur.


DEBUG_PROCESS

const win32process.DEBUG_PROCESS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

If this flag is set, the calling process is treated as a debugger, and the new process is a process being debugged. The system notifies the debugger of all debug events that occur in the process being debugged. If you create a process with this flag set, only the calling thread (the thread that called CreateProcess) can call the WaitForDebugEvent function. Windows 95 and Windows 98: This flag is not valid if the new process is a 16-bit application.


DETACHED_PROCESS

const win32process.DETACHED_PROCESS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

For console processes, the new process does not have access to the console of the parent process. The new process can call the AllocConsole function at a later time to create a new console. This flag cannot be used with the CREATE_NEW_CONSOLE flag.


HIGH_PRIORITY_CLASS

const win32process.HIGH_PRIORITY_CLASS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

Indicates a process that performs time-critical tasks that must be executed immediately for it to run correctly. The threads of a high-priority class process preempt the threads of normal-priority or idle-priority class processes. An example is the Task List, which must respond quickly when called by the user, regardless of the load on the system. Use extreme care when using the high-priority class, because a high-priority class CPU-bound application can use nearly all available cycles.


IDLE_PRIORITY_CLASS

const win32process.IDLE_PRIORITY_CLASS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

Indicates a process whose threads run only when the system is idle and are preempted by the threads of any process running in a higher priority class. An example is a screen saver. The idle priority class is inherited by child processes.


MAXIMUM_PROCESSORS

const win32process.MAXIMUM_PROCESSORS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D


NORMAL_PRIORITY_CLASS

const win32process.NORMAL_PRIORITY_CLASS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

Indicates a normal process with no special scheduling needs.


REALTIME_PRIORITY_CLASS

const win32process.REALTIME_PRIORITY_CLASS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

Indicates a process that has the highest possible priority. The threads of a real-time priority class process preempt the threads of all other processes, including operating system processes performing important tasks. For example, a real-time process that executes for more than a very brief interval can cause disk caches not to flush or cause the mouse to be unresponsive.


STARTF_FORCEOFFFEEDBACK

const win32process.STARTF_FORCEOFFFEEDBACK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

Indicates that the feedback cursor is forced off while the process is starting. The normal cursor is displayed.


STARTF_FORCEONFEEDBACK

const win32process.STARTF_FORCEONFEEDBACK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

Indicates that the cursor is in feedback mode for two seconds after CreateProcess is called. If during those two seconds the process makes the first GUI call, the system gives five more seconds to the process. If during those five seconds the process shows a window, the system gives five more seconds to the process to finish drawing the window. The system turns the feedback cursor off after the first call to GetMessage, regardless of whether the process is drawing.


STARTF_RUNFULLSCREEN

const win32process.STARTF_RUNFULLSCREEN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

Indicates that the process should be run in full-screen mode, rather than in windowed mode. This flag is only valid for console applications running on an x86 computer.


STARTF_USECOUNTCHARS

const win32process.STARTF_USECOUNTCHARS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

If this value is not specified, the dwXCountChars and dwYCountChars members are ignored.


STARTF_USEFILLATTRIBUTE

const win32process.STARTF_USEFILLATTRIBUTE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

If this value is not specified, the dwFillAttribute member is ignored.


STARTF_USEPOSITION

const win32process.STARTF_USEPOSITION;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

If this value is not specified, the dwX and dwY members are ignored.


STARTF_USESHOWWINDOW

const win32process.STARTF_USESHOWWINDOW;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

If this value is not specified, the wShowWindow member is ignored.


STARTF_USESIZE

const win32process.STARTF_USESIZE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

If this value is not specified, the dwXSize and dwYSize members are ignored.


STARTF_USESTDHANDLES

const win32process.STARTF_USESTDHANDLES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

Sets the standard input, standard output, and standard error handles for the process to the handles specified in the hStdInput, hStdOutput, and hStdError members of the STARTUPINFO structure. The CreateProcess function's fInheritHandles parameter must be set to TRUE for this to work properly. If this value is not specified, the hStdInput, hStdOutput, and hStdError members of the STARTUPINFO structure are ignored.


THREAD_PRIORITY_ABOVE_NORMAL

const win32process.THREAD_PRIORITY_ABOVE_NORMAL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

Indicates 1 point above normal priority for the priority class.


THREAD_PRIORITY_BELOW_NORMAL

const win32process.THREAD_PRIORITY_BELOW_NORMAL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

Indicates 1 point below normal priority for the priority class.


THREAD_PRIORITY_HIGHEST

const win32process.THREAD_PRIORITY_HIGHEST;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

Indicates 2 points above normal priority for the priority class.


THREAD_PRIORITY_IDLE

const win32process.THREAD_PRIORITY_IDLE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

Indicates a base priority level of 1 for IDLE_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS, or HIGH_PRIORITY_CLASS processes, and a base priority level of 16 for REALTIME_PRIORITY_CLASS processes.


THREAD_PRIORITY_LOWEST

const win32process.THREAD_PRIORITY_LOWEST;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

Indicates 2 points below normal priority for the priority class.


THREAD_PRIORITY_NORMAL

const win32process.THREAD_PRIORITY_NORMAL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

Indicates normal priority for the priority class.


THREAD_PRIORITY_TIME_CRITICAL

const win32process.THREAD_PRIORITY_TIME_CRITICAL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32PROCESS.D

Indicates a base priority level of 15 for IDLE_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS, or HIGH_PRIORITY_CLASS processes, and a base priority level of 31 for REALTIME_PRIORITY_CLASS processes.


win32ras::RasDialFunc1

win32ras::RasDialFunc1 method

RasDialFunc1()

A placeholder for a RAS callback.

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Comments

Certain RAS function require a callback function to be passed. This description describes the signature of the function you pass to these functions.

Parameters

hrascon : int

The handle to the RAS session.

msg : int

A message code identifying the reason for the callback.

rascs : int

Connection state about to be entered.

error : int

The error state of the connection

extendedError : int


RASCS_AllDevicesConnected

const win32ras.RASCS_AllDevicesConnected;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_AuthAck

const win32ras.RASCS_AuthAck;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_AuthCallback

const win32ras.RASCS_AuthCallback;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_AuthChangePassword

const win32ras.RASCS_AuthChangePassword;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_Authenticate

const win32ras.RASCS_Authenticate;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_Authenticated

const win32ras.RASCS_Authenticated;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_AuthLinkSpeed

const win32ras.RASCS_AuthLinkSpeed;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_AuthNotify

const win32ras.RASCS_AuthNotify;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_AuthProject

const win32ras.RASCS_AuthProject;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_AuthRetry

const win32ras.RASCS_AuthRetry;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_CallbackComplete

const win32ras.RASCS_CallbackComplete;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_CallbackSetByCaller

const win32ras.RASCS_CallbackSetByCaller;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_ConnectDevice

const win32ras.RASCS_ConnectDevice;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_Connected

const win32ras.RASCS_Connected;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_DeviceConnected

const win32ras.RASCS_DeviceConnected;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_Disconnected

const win32ras.RASCS_Disconnected;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_Interactive

const win32ras.RASCS_Interactive;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_LogonNetwork

const win32ras.RASCS_LogonNetwork;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_OpenPort

const win32ras.RASCS_OpenPort;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_PasswordExpired

const win32ras.RASCS_PasswordExpired;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_PortOpened

const win32ras.RASCS_PortOpened;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_PrepareForCallback

const win32ras.RASCS_PrepareForCallback;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_Projected

const win32ras.RASCS_Projected;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_ReAuthenticate

const win32ras.RASCS_ReAuthenticate;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_RetryAuthentication

const win32ras.RASCS_RetryAuthentication;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_StartAuthentication

const win32ras.RASCS_StartAuthentication;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_WaitForCallback

const win32ras.RASCS_WaitForCallback;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_WaitForModemReset

const win32ras.RASCS_WaitForModemReset;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


DACL_SECURITY_INFORMATION

const win32security.DACL_SECURITY_INFORMATION;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates the discretionary ACL of the object is being referenced.


GROUP_SECURITY_INFORMATION

const win32security.GROUP_SECURITY_INFORMATION;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates the primary group identifier of the object is being referenced.


LOGON32_LOGON_BATCH

const win32security.LOGON32_LOGON_BATCH;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

This logon type is intended for batch servers, where processes may be executing on behalf of a user without their direct intervention; or for higher performance servers that process many clear-text authentication attempts at a time, such as mail or web servers. LogonUser does not cache credentials for this logon type.


LOGON32_LOGON_INTERACTIVE

const win32security.LOGON32_LOGON_INTERACTIVE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

This logon type is intended for users who will be interactively using the machine, such as a user being logged on by a terminal server, remote shell, or similar process. This logon type has the additional expense of caching logon information for disconnected operation, and is therefore inappropriate for some client/server applications, such as a mail server.


LOGON32_LOGON_NETWORK

const win32security.LOGON32_LOGON_NETWORK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

This logon type is intended for high performance servers to authenticate clear text passwords. LogonUser does not cache credentials for this logon type. This is the fastest logon path, but there are two limitations. First, the function returns an impersonation token, not a primary token. You cannot use this token directly in the CreateProcessAsUser function. However, you can call the DuplicateTokenEx function to convert the token to a primary token, and then use it in CreateProcessAsUser. Second, if you convert the token to a primary token and use it in CreateProcessAsUser to start a process, the new process will not be able to access other network resources, such as remote servers or printers, through the redirector.


LOGON32_LOGON_SERVICE

const win32security.LOGON32_LOGON_SERVICE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates a service-type logon. The account provided must have the service privilege enabled.


LOGON32_PROVIDER_DEFAULT

const win32security.LOGON32_PROVIDER_DEFAULT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Use the standard logon provider for the system. This is the recommended value for the dwLogonProvider parameter. It provides maximum compatibility with current and future releases of Windows NT.


LOGON32_PROVIDER_WINNT35

const win32security.LOGON32_PROVIDER_WINNT35;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Use the Windows NT 3.5 logon provider.


LOGON32_PROVIDER_WINNT40

const win32security.LOGON32_PROVIDER_WINNT40;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Use the Windows NT 4.0 logon provider


OWNER_SECURITY_INFORMATION

const win32security.OWNER_SECURITY_INFORMATION;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates the owner identifier of the object is being referenced.


SACL_SECURITY_INFORMATION

const win32security.SACL_SECURITY_INFORMATION;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates the system ACL of the object is being referenced.


SE_DS_OBJECT

const win32security.SE_DS_OBJECT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_DS_OBJECT_ALL

const win32security.SE_DS_OBJECT_ALL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_FILE_OBJECT

const win32security.SE_FILE_OBJECT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_KERNEL_OBJECT

const win32security.SE_KERNEL_OBJECT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_LMSHARE

const win32security.SE_LMSHARE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_PRINTER

const win32security.SE_PRINTER;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_PROVIDER_DEFINED_OBJECT

const win32security.SE_PROVIDER_DEFINED_OBJECT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_REGISTRY_KEY

const win32security.SE_REGISTRY_KEY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_SERVICE

const win32security.SE_SERVICE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_UNKNOWN_OBJECT_TYPE

const win32security.SE_UNKNOWN_OBJECT_TYPE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_WINDOW_OBJECT

const win32security.SE_WINDOW_OBJECT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D


SidTypeAlias

const win32security.SidTypeAlias;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates an alias SID.


SidTypeDeletedAccount

const win32security.SidTypeDeletedAccount;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates an SID for a deleted account.


SidTypeDomain

const win32security.SidTypeDomain;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates a domain SID.


SidTypeGroup

const win32security.SidTypeGroup;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates a group SID.


SidTypeInvalid

const win32security.SidTypeInvalid;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates an invalid SID.


SidTypeUnknown

const win32security.SidTypeUnknown;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates an unknown SID type.


SidTypeUser

const win32security.SidTypeUser;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates a user SID.


SidTypeWellKnownGroup

const win32security.SidTypeWellKnownGroup;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates an SID for a well-known group.


TOKEN_ADJUST_DEFAULT

const win32security.TOKEN_ADJUST_DEFAULT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Required to change the default ACL, primary group, or owner of an access token.


TOKEN_ADJUST_GROUPS

const win32security.TOKEN_ADJUST_GROUPS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Required to change the groups specified in an access token.


TOKEN_ADJUST_PRIVILEGES

const win32security.TOKEN_ADJUST_PRIVILEGES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Required to change the privileges specified in an access token.


TOKEN_ALL_ACCESS

const win32security.TOKEN_ALL_ACCESS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Combines the STANDARD_RIGHTS_REQUIRED standard access rights and all individual access rights for tokens.


TOKEN_ASSIGN_PRIMARY

const win32security.TOKEN_ASSIGN_PRIMARY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Required to attach a primary token to a process in addition to the SE_CREATE_TOKEN_NAME privilege.


TOKEN_DUPLICATE

const win32security.TOKEN_DUPLICATE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Required to duplicate an access token.


TOKEN_EXECUTE

const win32security.TOKEN_EXECUTE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Combines the STANDARD_RIGHTS_EXECUTE standard access rights and the TOKEN_IMPERSONATE access right.


TOKEN_IMPERSONATE

const win32security.TOKEN_IMPERSONATE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Required to attach an impersonation access token to a process.


TOKEN_QUERY

const win32security.TOKEN_QUERY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Required to query the contents of an access token.


TOKEN_QUERY_SOURCE

const win32security.TOKEN_QUERY_SOURCE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Required to query the source of an access token.


TOKEN_READ

const win32security.TOKEN_READ;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Combines the STANDARD_RIGHTS_READ standard access rights and the TOKEN_QUERY access right.


TOKEN_WRITE

const win32security.TOKEN_WRITE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SECURITY.D

Combines the STANDARD_RIGHTS_WRITE standard access rights and the TOKEN_ADJUST_PRIVILEGES, TOKEN_ADJUST_GROUPS, and TOKEN_ADJUST_DEFAULT access rights.


SC_GROUP_IDENTIFIER

const win32service.SC_GROUP_IDENTIFIER;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D


SC_MANAGER_ALL_ACCESS

const win32service.SC_MANAGER_ALL_ACCESS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Includes STANDARD_RIGHTS_REQUIRED, in addition to all of the access types listed in this table.


SC_MANAGER_CONNECT

const win32service.SC_MANAGER_CONNECT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Enables connecting to the service control manager.


SC_MANAGER_CREATE_SERVICE

const win32service.SC_MANAGER_CREATE_SERVICE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Enables calling of the CreateService function to create a service object and add it to the database.


SC_MANAGER_ENUMERATE_SERVICE

const win32service.SC_MANAGER_ENUMERATE_SERVICE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Enables calling of the EnumServicesStatus function to list the services that are in the database.


SC_MANAGER_LOCK

const win32service.SC_MANAGER_LOCK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Enables calling of the LockServiceDatabase function to acquire a lock on the database.


SC_MANAGER_MODIFY_BOOT_CONFIG

const win32service.SC_MANAGER_MODIFY_BOOT_CONFIG;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D


SC_MANAGER_QUERY_LOCK_STATUS

const win32service.SC_MANAGER_QUERY_LOCK_STATUS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Enables calling of the QueryServiceLockStatus function to retrieve the lock status information for the database.


SERVICE_ACCEPT_PAUSE_CONTINUE

const win32service.SERVICE_ACCEPT_PAUSE_CONTINUE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

The service can be paused and continued. This enables the SERVICE_CONTROL_PAUSE and SERVICE_CONTROL_CONTINUE values.


SERVICE_ACCEPT_SHUTDOWN

const win32service.SERVICE_ACCEPT_SHUTDOWN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

The service is notified when system shutdown occurs. This enables the system to send a SERVICE_CONTROL_SHUTDOWN value to the service. The ControlService function cannot send this control


SERVICE_ACCEPT_STOP

const win32service.SERVICE_ACCEPT_STOP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

The service can be stopped. This enables the SERVICE_CONTROL_STOP value.


SERVICE_ACTIVE

const win32service.SERVICE_ACTIVE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D


SERVICE_ALL_ACCESS

const win32service.SERVICE_ALL_ACCESS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Includes STANDARD_RIGHTS_REQUIRED in addition to all of the access types listed in this table.


SERVICE_AUTO_START

const win32service.SERVICE_AUTO_START;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Specifies a device driver or Win32 service started by the service control manager automatically during system startup.


SERVICE_BOOT_START

const win32service.SERVICE_BOOT_START;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Specifies a device driver started by the operating system loader. This value is valid only if the service type is SERVICE_KERNEL_DRIVER or SERVICE_FILE_SYSTEM_DRIVER.


SERVICE_CHANGE_CONFIG

const win32service.SERVICE_CHANGE_CONFIG;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Enables calling of the ChangeServiceConfig function to change the service configuration.


SERVICE_CONTINUE_PENDING

const win32service.SERVICE_CONTINUE_PENDING;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

The service continue is pending.


SERVICE_CONTROL_CONTINUE

const win32service.SERVICE_CONTROL_CONTINUE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Requests the paused service to resume. The hService handle must have SERVICE_PAUSE_CONTINUE access.


SERVICE_CONTROL_INTERROGATE

const win32service.SERVICE_CONTROL_INTERROGATE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Requests the service to update immediately its current status information to the service control manager. The hService handle must have SERVICE_INTERROGATE access.


SERVICE_CONTROL_PAUSE

const win32service.SERVICE_CONTROL_PAUSE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Requests the service to pause. The hService handle must have SERVICE_PAUSE_CONTINUE access.


SERVICE_CONTROL_SHUTDOWN

const win32service.SERVICE_CONTROL_SHUTDOWN;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

The ControlService function fails if this control code is specified.


SERVICE_CONTROL_STOP

const win32service.SERVICE_CONTROL_STOP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Requests the service to stop. The hService handle must have SERVICE_STOP access.


SERVICE_DEMAND_START

const win32service.SERVICE_DEMAND_START;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Specifies a device driver or Win32 service started by the service control manager when a process calls the StartService function.


SERVICE_DISABLED

const win32service.SERVICE_DISABLED;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Specifies a device driver or Win32 service that can no longer be started.


SERVICE_DRIVER

const win32service.SERVICE_DRIVER;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D


SERVICE_ENUMERATE_DEPENDENTS

const win32service.SERVICE_ENUMERATE_DEPENDENTS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Enables calling of the EnumDependentServices function to enumerate all the services dependent on the service.


SERVICE_ERROR_CRITICAL

const win32service.SERVICE_ERROR_CRITICAL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

The startup program logs the error, if possible. If the last-known good configuration is being started, the startup operation fails. Otherwise, the system is restarted with the last-known good configuration.


SERVICE_ERROR_IGNORE

const win32service.SERVICE_ERROR_IGNORE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

The startup (boot) program logs the error but continues the startup operation.


SERVICE_ERROR_NORMAL

const win32service.SERVICE_ERROR_NORMAL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

The startup program logs the error and displays a message box pop-up but continues the startup operation.


SERVICE_ERROR_SEVERE

const win32service.SERVICE_ERROR_SEVERE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

The startup program logs the error. If the last-known good configuration is being started, the startup operation continues. Otherwise, the system is restarted with the last-known-good configuration.


SERVICE_FILE_SYSTEM_DRIVER

const win32service.SERVICE_FILE_SYSTEM_DRIVER;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

A service type flag that indicates a Windows NT file system driver.


SERVICE_INACTIVE

const win32service.SERVICE_INACTIVE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D


SERVICE_INTERACTIVE_PROCESS

const win32service.SERVICE_INTERACTIVE_PROCESS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

A flag that indicates a Win32 service process that can interact with the desktop.


SERVICE_INTERROGATE

const win32service.SERVICE_INTERROGATE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Enables calling of the ControlService function to ask the service to report its status immediately.


SERVICE_KERNEL_DRIVER

const win32service.SERVICE_KERNEL_DRIVER;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

A service type flag that indicates a Windows NT device driver.


SERVICE_NO_CHANGE

const win32service.SERVICE_NO_CHANGE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Indicates the parameter should not be changed.


SERVICE_PAUSE_CONTINUE

const win32service.SERVICE_PAUSE_CONTINUE;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Enables calling of the ControlService function to pause or continue the service.


SERVICE_PAUSE_PENDING

const win32service.SERVICE_PAUSE_PENDING;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

The service pause is pending.


SERVICE_PAUSED

const win32service.SERVICE_PAUSED;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

The service is paused.


SERVICE_QUERY_CONFIG

const win32service.SERVICE_QUERY_CONFIG;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Enables calling of the QueryServiceConfig function to query the service configuration.


SERVICE_QUERY_STATUS

const win32service.SERVICE_QUERY_STATUS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Enables calling of the QueryServiceStatus function to ask the service control manager about the status of the service.


SERVICE_RUNNING

const win32service.SERVICE_RUNNING;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

The service is running.


SERVICE_SPECIFIC_ERROR

const win32service.SERVICE_SPECIFIC_ERROR;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

A service specific error has occurred.


SERVICE_START

const win32service.SERVICE_START;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Enables calling of the StartService function to start the service.


SERVICE_START_PENDING

const win32service.SERVICE_START_PENDING;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

The service is starting.


SERVICE_STATE_ALL

const win32service.SERVICE_STATE_ALL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D


SERVICE_STOP

const win32service.SERVICE_STOP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Enables calling of the ControlService function to stop the service.


SERVICE_STOP_PENDING

const win32service.SERVICE_STOP_PENDING;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

The service is stopping.


SERVICE_STOPPED

const win32service.SERVICE_STOPPED;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

The service is not running.


SERVICE_SYSTEM_START

const win32service.SERVICE_SYSTEM_START;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Specifies a device driver started by the IoInitSystem function. This value is valid only if the service type is SERVICE_KERNEL_DRIVER or SERVICE_FILE_SYSTEM_DRIVER.


SERVICE_USER_DEFINED_CONTROL

const win32service.SERVICE_USER_DEFINED_CONTROL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

Enables calling of the ControlService function to specify a user-defined control code.


SERVICE_WIN32

const win32service.SERVICE_WIN32;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D


SERVICE_WIN32_OWN_PROCESS

const win32service.SERVICE_WIN32_OWN_PROCESS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

A service type flag that indicates a Win32 service that runs in its own process.


SERVICE_WIN32_SHARE_PROCESS

const win32service.SERVICE_WIN32_SHARE_PROCESS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WIN32SERVICE.D

A service type flag that indicates a Win32 service that shares a process with other services.


wincerapi.CEHANDLE

PyCEHANDLE = CEHANDLE()

Creates a new CEHANDLE object


CSIDL_BITBUCKET

const wincerapi.CSIDL_BITBUCKET;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

Recycle bin-file system directory containing file objects in the user's recycle bin. The location of this directory is not in the registry; it is marked with the hidden and system attributes to prevent the user from moving or deleting it.


CSIDL_COMMON_DESKTOPDIRECTORY

const wincerapi.CSIDL_COMMON_DESKTOPDIRECTORY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

File system directory that contains files and folders that appear on the desktop for all users.


CSIDL_COMMON_PROGRAMS

const wincerapi.CSIDL_COMMON_PROGRAMS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

File system directory that contains the directories for the common program groups that appear on the Start menu for all users.


CSIDL_COMMON_STARTMENU

const wincerapi.CSIDL_COMMON_STARTMENU;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

File system directory that contains the programs and folders that appear on the Start menu for all users.


CSIDL_COMMON_STARTUP

const wincerapi.CSIDL_COMMON_STARTUP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

File system directory that contains the programs that appear in the Startup folder for all users. The system starts these programs whenever any user logs on to a Windows desktop platform.


CSIDL_CONTROLS

const wincerapi.CSIDL_CONTROLS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

Control Panel-virtual folder containing icons for the control panel applications.


CSIDL_DESKTOP

const wincerapi.CSIDL_DESKTOP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

Windows desktop-virtual folder at the root of the name space.


CSIDL_DESKTOPDIRECTORY

const wincerapi.CSIDL_DESKTOPDIRECTORY;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

File system directory used to physically store file objects on the desktop - not to be confused with the desktop folder itself.


CSIDL_DRIVES

const wincerapi.CSIDL_DRIVES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

My Computer-virtual folder containing everything on the local computer: storage devices, printers, and Control Panel. The folder can also contain mapped network drives.


CSIDL_FONTS

const wincerapi.CSIDL_FONTS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

Virtual folder containing fonts.


CSIDL_NETHOOD

const wincerapi.CSIDL_NETHOOD;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

File system directory containing objects that appear in the network neighborhood.


CSIDL_NETWORK

const wincerapi.CSIDL_NETWORK;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

Network Neighborhood-virtual folder representing the top level of the network hierarchy.


CSIDL_PERSONAL

const wincerapi.CSIDL_PERSONAL;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

File system directory that serves as a common repository for documents.


CSIDL_PRINTERS

const wincerapi.CSIDL_PRINTERS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

Printers folder-virtual folder containing installed printers.


CSIDL_PROGRAMS

const wincerapi.CSIDL_PROGRAMS;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

File system directory that contains the user's program groups which are also file system directories.


CSIDL_RECENT

const wincerapi.CSIDL_RECENT;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

File system directory containing the user's most recently used documents.


CSIDL_SENDTO

const wincerapi.CSIDL_SENDTO;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

File system directory containing Send To menu items.


CSIDL_STARTMENU

const wincerapi.CSIDL_STARTMENU;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

File system directory containing Start menu items.


CSIDL_STARTUP

const wincerapi.CSIDL_STARTUP;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

File system directory that corresponds to the user's Startup program group.


CSIDL_TEMPLATES

const wincerapi.CSIDL_TEMPLATES;

Defined in: C:/BUILD/DEPOT/MAIN/APPS/ACTIVEPYTHON-2_1/SRC/PYWIN32/BUILD/TEMP/HELP/WINCERAPI.D

File system directory that serves as a common repository for document templates.


Windows NT Security -- Impersonation

Python's win32 access to help to simplify providing privileged access.

There may be times when you want to give specific access to someone with NT. One mechanism to do this is with the win32 calls: LogonUser and ImpersonateLoggedOnUser. LogonUser gives you a handel which ImpersonateLoggedOnUser can then use to "become" the user. To do this the thread calling, LogonUser, needs SE_TCB_NAME, SE_CHANGE_NOTIFY_NAME, and SE_ASSIGNPRIMARYTOKEN_NAME privileges. If you plan to do this with something like IIS and cgi, be careful, the anonymous account IIS uses is already impersonated from the system account. You will need to use the RevertToSelf, api call to first terminate the impersonation. And, the system account, a local account, ultimately limits you, regardless of who you log in as (COM/MTS can provide an alternative security solution).

Example

The c++ api call for Logonasuser looks like:

BOOL LogonUser(

  LPTSTR lpszUsername,

  LPTSTR lpszDomain,

  LPTSTR lpszPassword,

  DWORD dwLogonType,

  DWORD dwLogonProvider,

  PHANDLE phToken

);
The python documentation says this:

PyHANDLE = LogonUser( userName, domain , password , logonType , logonProvider )
The api call is very similar in both cases except in python the handel is returned seperately to the caller. The interesting options in this case are logonType and logonProvider. To give values for these, you need to use the constants present in win32con (you can use the browser in pythonwin->tools to list the constants in win32con). Unless you have unusual server requirements, for logonType, win32con.LOGON32_LOGON_INTERACTIVE should be fine. With regards to logonProvider, generally use win32con.LOGON32_PROVIDER_DEFAULT -- it's for specifiying the type of logon NT 3.5, 4.0, win2000. Generally, default is fine.

ImpersonateLoggedOnUser is extremely simple and you'll see it's usage in the examples.

Now for some code

#A raw example looks like this:

handel=win32security.LogonUser('barney','bedrock','bambam'\\

    ,win32con.LOGON32_LOGON_INTERACTIVE,win32con.LOGON32_PROVIDER_DEFAULT)

win32security.ImpersonateLoggedOnUser(handel)

#do stuff here

print win32api.GetUserName() #show you're someone else

win32security.RevertToSelf() #terminates impersonation

handel.Close()

#The impersonate code can be encapsulated in a class, which then makes it even more

#trivial to use

import win32security

import win32con

import win32api

class Impersonate:

    def __init__(self,login,password):

    self.domain='bedrock'

    self.login=login

    self.password=password

    def logon(self):

    self.handel=win32security.LogonUser(self.login,self.domain,self.password,\\

    win32con.LOGON32_LOGON_INTERACTIVE,win32con.LOGON32_PROVIDER_DEFAULT)

    win32security.ImpersonateLoggedOnUser(self.handel)

    def logoff(self):

    win32security.RevertToSelf() #terminates impersonation

    self.handel.Close() #guarantees cleanup

a=Impersonate('barney','bambam')

try:

    a.logon() #become the user

    #do whatever here

    print win32api.GetUserName() #show you're someone else

    a.logoff() #return to normal

except:

    print sys.exc_type , sys.exc_value
Have a great time with programming with python!

John Nielsen   nielsenjf@my-deja.com


Getting process info: Win32 and COM with python and C++

  • SUMMARY
    • Introduction
    • Getting the process list: PdhEnumObjectItems
    • Getting the process ids: Several Pdh Calls
    • The COM client
    • Making the COM objects
    • The Python COM object
    • The C++ COM object
    • In Conclusion
  • Further Info
  • Author

SUMMARY

Python is a rich scripting language offering a lot of the power of C++ while retaining the ease of use of VBscript. With it's simplified C++ style, win32 access, and ability to make COM servers, it's a natural rapid development environment for the developer.

When working with an unfamiliar API, python is great for helping you understand how to solve the problem without getting in the way. Even if you have to supply a C++ COM object, it is often easier to first figure out the details with python and then compose the C++ solution. Python is very similar to C++ pseudo-code, so you can follow it as an outline for the C++. In this case, we're going to talk about how to use both python and C++ to expose a list of processes and their corresponding ids with a COM object.

Introduction

To get process information for both NT and W2K (but not the 9x family) you can use the Performance Data Helper library(PDH) available in the SDK at microsoft's ftp site. It provides a convenient interface to performance information stored fundamentally in the registry. The basic process of using the PDH encompasses the following:

  1. Get a list of all the objects you want
  2. Get a list of the object's instances and data available for each instance: called 'items' or 'counters'
  3. Get a group of performance data for each counter

In our case the object we want is the process object, the object's instances are it's list of processes, and the counter we want for the processes is 'ID Process'.

The specific set of API called are the following:

  1. PdhEnumObjectItems -- get the list of instances (processes) for the process object
  2. PdhOpenQuery -- initialize query handle which will contain all the counters (in our case only: ID Process)
  3. PdhMakeCounterPath -- Each counter has a specific path, kind of like like a url
  4. PdhAddCounter -- convert the path to a handle and group the counters paths(in this case only one) together for the query
  5. PdhCollectQueryData -- gathers the actual data
  6. PdhGetFormattedCounterValue -- call for each counter to convert the data to a typical format
  7. PdhCloseQuery -- close the counters and the query handle

We'll cover these points now in more depth.

Getting the process list: PdhEnumObjectItems

The MSDN describes the call as the following:

PDH_STATUS PdhEnumObjectItems(
  LPCTSTR szDataSource,
  LPCTSTR szMachineName,
  LPCTSTR szObjectName,
  LPTSTR mszCounterList,
  LPDWORD pcchCounterListLength,
  LPTSTR mszInstanceList,
  LPDWORD pcchInstanceListLength,
  DWORD dwDetailLevel,
  DWORD dwFlags
);

The python call is similar though simpler. For example, you do not need to bother with the list length -- it takes care of that for you. Both the python and C++ examples are taken from their COM components shown later.To call make with python would look like the following

    def proclist(self):
        try:
            junk, instances = win32pdh.EnumObjectItems(None,None,self.object, win32pdh.PERF_DETAIL_WIZARD)
            return instances
        except:
            raise COMException("Problem getting process list")

The variable instances contains the list of processes, and you'll find the item or counter than we want 'ID Process' present in the list of items. Since you can have multiple processes with the same name, in python it is convenient to use a dictionary to store a list of processes and how many you found for each type.

    for instance in instances:
        if proc_dict.has_key(instance):
            proc_dict[instance] = proc_dict[instance] + 1
        else:
            proc_dict[instance]=0

The C++ call though essentially the same in spirit is much more involved. To help, I use map(like a python dictionary) and string from Standard C++. The additional things you need to manage are:

  • strings -- convert to TCHAR for ansi/unicode support using ATL macros
  • the memory for the buffers that PdhEnumObjectItems needs
  • Parse it's NULL padded results.

HRESULT getinst (map < string,int > & m_inst) {

    map<string, int>::iterator iter;
    USES_CONVERSION;
    LPTSTR      szCountersBuf     = NULL;
    DWORD       dwCountersSize       = 0;
    LPTSTR      szInstancesBuf    = NULL;
    DWORD       dwInstancesSize      = 0;
    LPTSTR      szTemp          = NULL;

    PDH_STATUS status;

    std::string str_obj="Process";

    status = PdhEnumObjectItems(
        NULL,
        NULL,
        A2CT(str_obj.c_str()),
        NULL,
        &dwCountersSize,
        szInstancesBuf,
        &dwInstancesSize,
        PERF_DETAIL_WIZARD,
        0 );

    if ( ERROR_SUCCESS != status )
        return E_FAIL;

    if (dwCountersSize) {
        szCountersBuf = (LPTSTR)malloc (dwCountersSize * sizeof (TCHAR));
        if (szCountersBuf==NULL) {
            return E_FAIL;
        }
    } else
        szCountersBuf=NULL;

    if (dwInstancesSize) {
        szInstancesBuf = (LPTSTR)malloc (dwInstancesSize * sizeof (TCHAR));
        if (szInstancesBuf==NULL) {
            free(szCountersBuf);
            return E_FAIL;
        }
    } else
        szInstancesBuf = NULL;

    status = PdhEnumObjectItems(
        NULL,
        NULL,
        A2CT(str_obj.c_str()),
        szCountersBuf,
        &dwCountersSize,
        szInstancesBuf,
        &dwInstancesSize,
        PERF_DETAIL_WIZARD,
        0);

    if ( ERROR_SUCCESS != status )
        return E_FAIL;

    //it's a series of contingous NULL terminated strings, ending w/zero length string

    if (szInstancesBuf){
        for (szTemp = szInstancesBuf;*szTemp != 0;szTemp += lstrlen(szTemp) + 1) {
            m_inst[T2A(szTemp)]++; //increment instance counter
            //default value is zero for arith element
        }
    }

    return S_OK;

}

Getting the process ids: Several Pdh Calls

A whole sequence of calls are necessary once you get the process list. To refresh your memory, you need:

  1. PdhOpenQuery -- initialize query handle which will contain all the counters (in our case only: ID Process)
  2. PdhMakeCounterPath -- Each counter has a specific path, kind of like like a url
  3. PdhAddCounter -- convert the path to a handle and group the counters paths(in this case only one) together for the query
  4. PdhCollectQueryData -- gathers the actual data
  5. PdhGetFormattedCounterValue -- call for each counter to convert the data to a typical format
  6. PdhCloseQuery -- close the counters and the query handle
As usual the python code matches this very cleanly (like pseudocode that actually runs) -- you can figure out the basic meanings and sequences of the win32 calls without having to deal with other details.

        for instance, max_instances in proc_dict.items():
            for inum in xrange(max_instances+1):
                try:
                    hq = win32pdh.OpenQuery() # initializes the query handle
                    path = win32pdh.MakeCounterPath( (None,self.object,instance, None, inum, self.item) )
                    counter_handle=win32pdh.AddCounter(hq, path) #convert counter path to counter handle
                    win32pdh.CollectQueryData(hq) #collects data for the counter
                    type, val = win32pdh.GetFormattedCounterValue(counter_handle, win32pdh.PDH_FMT_LONG)
                    proc_ids.append(instance+'\t'+str(val))
                    win32pdh.CloseQuery(hq)
                except:
                    raise COMException("Problem getting process id")

Again, the C++ code is more involved and makes use of Standand C++, vector, map, and string. It converts a map of process names and the number for each name, to a vector of strings each which has tab-delimited process id entry. Also, the process id info is returned in the format of a double, which is converted to a string.

HRESULT getprocid (map<string,int>& m_inst, vector<string> &v_ids) {

    USES_CONVERSION;
    PDH_STATUS  status   = 0;
    HQUERY      hQuery      = NULL;
    HCOUNTER    hCounter    = NULL;
    DWORD       dwType      = 0;

    map<string,int> m_idinst;

    std::string objname="Process";
    std::string counter="ID Process";
    char *buffer;int junk,junk2;

    // initialize the query handle

    map < string, int>::iterator iter;
    for (iter=m_inst.begin();iter != m_inst.end();++iter) {

        for (int i=0;i<= iter->second;++i) {
            status = PdhOpenQuery( NULL, 0, &hQuery );
            if ( status != ERROR_SUCCESS )
                return status;

            TCHAR       szCounterPath[2048];
            DWORD       dwPathSize  = 2048;
            PDH_COUNTER_PATH_ELEMENTS pdh_elm;

            pdh_elm.szMachineName     = NULL;
            pdh_elm.szObjectName      = A2T(objname.c_str());
            pdh_elm.szInstanceName    = A2T(iter->first.c_str());
            pdh_elm.szParentInstance  = NULL;
            pdh_elm.dwInstanceIndex   = i;
            pdh_elm.szCounterName     = A2T(counter.c_str());

            status = PdhMakeCounterPath( &pdh_elm, szCounterPath, &dwPathSize, 0 );
            if ( status != ERROR_SUCCESS ) { return E_FAIL; }

            // Add the counter to the query
            //PdhAddCounter converts each counter path into a counter handle
            status = PdhAddCounter( hQuery, szCounterPath, 0, &hCounter );
            if ( status != ERROR_SUCCESS ) { return E_FAIL; }

            //PdhCollectQueryData gets raw data for the counters
            status = PdhCollectQueryData(hQuery);

            if ( status != ERROR_SUCCESS ) { return E_FAIL; }

            //PdhGetFormattedCounterValue  formats counter values for display
            DWORD           dwFormat = PDH_FMT_DOUBLE;
            PDH_FMT_COUNTERVALUE   fmtValue;
            status = PdhGetFormattedCounterValue (hCounter,
                dwFormat,
                (LPDWORD)NULL,
                &fmtValue);
            if (status == ERROR_SUCCESS) {
                buffer=_fcvt( fmtValue.doubleValue, 0, &junk,&junk2 );
                string id=buffer;
                v_ids.push_back(iter->first+'\t'+id);
            }

        }
        status = PdhCloseQuery (hQuery);
        //PdhCloseQuery closes the query handle and it's counters
    }
    return S_OK;
}

The COM client.

The Python COM client which will call the C++ COM object and Python COM object does the following:

     import win32com.client
     a=win32com.client.Dispatch('NtPerf.process') #C++ com object
     print a.procids()

     b=win32com.client.Dispatch('PyPerf.process') #python com object
     print b.procids()

As far as it is concerned, there is no difference between the 2 objects. Both returns a list of processes and their respective id's seperated by tab.

Making the COM objects.

From a 1000 mile perspective, ATL C++ and python offer a class based COM object approach. In both approaches, the methods of the com object are simply methods of a class. However, creating a COM object in python is much easier than C++, again allowing you to focus on the problem first while still retaining the C++ feel.

Much of the details with python COM objects are exposed through a default policy which leverages IDispatch. You simply add a few attributes your python class, to expose your methods, prog id, add a line to register your class, and you are done. The policy knows what to do. Thus, it's easy enough to take a simple win32 class you wrote and add a few attributes and convert it to a COM object. Creating and developing python COM objects is simple, all that is needed is notepad. You don't need a full blown IDE nor do you have to go back and find the source code that created the object, since the object is the source code. It lends itself to very rapid development.

ATL provides wizards and a lot of the basic implementation goo (like COM interfaces for IUnknown and IDispatch), and wrappers for data types. However, there still a big difference between a simple console based app and an ATL COM object. The COM world of Variants, SafeArrays, and BSTR's is (as we'll see below) unfriendly to C++.

Python behind the scenes converts back and forth between it's native types and BSTR, Variants, SafeArrays, etc. When you change your COM object, you don't have to worry about changing IDL and constructing new Variant structures, it is managed for you.

In C++, it is more messy. First of all: strings. Since the concept of what text is isn't consistent, COM standardizes with it's own OLECHAR. Also, for non-COM text, because of issues between using ansi and unicode, you need to use the TCHAR data type which is a generic type that maps at compile time to what is necessary. And, with regard to BSTRs (length-prefixed strings), you need to convert the OLECHAR to BSTR's with SysAllocString. You notice the COM object below uses the Standard C++ string (which I prefer to use). When necessary, it converts the string it to the necessary COM type leveraging ATL conversion macros and SysAllocString (another option is to use the CComBSTR class).

Secondly: arrays. Since we are returning a list of processes and their ids, to be friendly with all languages, everything needs to be converted to SafeArrays of Variants housing BSTRs. Python does the conversion for you. With C++, you'll need to make various Variant calls to create the necessary structure. In the C++ COM object, I've encapsulated all the necessary code in a single function that converts any vector of strings into a 1 dimensional safe array of variants.

Now for some code:

The Python COM object.

The Python COM object has 2 methods proclist and procids. Proclist is trivial, simply returning the list of processes from EnumObjectItems. Procids calls proclist, constructs a dictionary to count the number of processes with the same name, and then makes the necessary calls to their their ids. Each function simple returns the python list (which is then converted for you). If you later decide to only return a single string, simple change what you return, and python again will convert for you. Each method also uses the very cool function COMException which returns errors back to the client. In addition to the methods, there are 4 basic attributes, I set to define the COM object and a line to register it.

import win32pdh, string, win32api
from win32com.server.exception import COMException
import win32com.server.util
import win32com.client.dynamic

#to generate guids use:
#import pythoncom
#print pythoncom.CreateGuid()

class pyperf:
    # COM attributes.
    _reg_clsid_ = '{763AE791-1D6B-11D4-A38B-00902798B22B}'
               #guid for your class in registry
    _reg_desc_ = "get process list and ids"
    _reg_progid_ = "PyPerf.process" #The progid for this class

    _public_methods_ = ['procids','proclist' ]  #names of callable methods
    def __init__(self):
        self.object='process'
        self.item='ID Process'
    def proclist(self):
        try:
            junk, instances = win32pdh.EnumObjectItems(None,None,self.object, win32pdh.PERF_DETAIL_WIZARD)
            return instances
        except:
            raise COMException("Problem getting process list")
    def procids(self):
        #each instance is a process, you can have multiple processes w/same name
        instances=self.proclist()
        proc_ids=[]
        proc_dict={}
        for instance in instances:
            if proc_dict.has_key(instance):
                proc_dict[instance] = proc_dict[instance] + 1
            else:
                proc_dict[instance]=0
        for instance, max_instances in proc_dict.items():
            for inum in xrange(max_instances+1):
                try:
                    hq = win32pdh.OpenQuery() # initializes the query handle
                    path = win32pdh.MakeCounterPath( (None,self.object,instance, None, inum, self.item) )
                    counter_handle=win32pdh.AddCounter(hq, path) #convert counter path to counter handle
                    win32pdh.CollectQueryData(hq) #collects data for the counter
                    type, val = win32pdh.GetFormattedCounterValue(counter_handle, win32pdh.PDH_FMT_LONG)
                    proc_ids.append(instance+'\t'+str(val))
                    win32pdh.CloseQuery(hq)
                except:
                    raise COMException("Problem getting process id")

        proc_ids.sort()
        return proc_ids

if __name__=='__main__':
    import win32com.server.register
    win32com.server.register.UseCommandLine(pyperf)

The C++ COM object.

As you notice from the idl, C++ COM object also exposes 2 methods, proclist and procids. Proclist calls the getinst function returns returns a map of processes, converts that to a vector of strings, and the calls make_safe to convert that to a Safe array of Variants. Procids does much the same except that after calling getinst, it then calls getprocid, which returns a vector of strings containing the processes and their ids. The vector of strings is then converted to a SafeArray with make_safe. Unlike python, you don't actually return the SafeArray(since every COM method has to return an HRESULT). Instead, you store the values in a Variant pointer.

Here is the relevant excerpt from the IDL:

interface Iprocess : IDispatch
    {
        [id(1), helpstring("lists current processes")] HRESULT proclist([out, retval] VARIANT *plist);
        [id(2), helpstring("method procids")] HRESULT procids([out, retval] VARIANT *pids);
    }

Here is the source for the cpp file
#include "stdafx.h"
#include "Ntperf.h"
#include "process.h"

//MS stuff
#include "pdh.h"
#include "pdhmsg.h"

// fix problem with different versions of pdh.dll
#undef PdhOpenQuery      //          PdhOpenQueryA
extern "C" long __stdcall
PdhOpenQuery (
              IN      LPCSTR      szDataSource,
              IN      DWORD       dwUserData,
              IN      HQUERY      *phQuery
              );

//STD C++ stuff
#pragma warning(disable : 4786) //get rid of stl warnings
#include <string>
#include <vector>
#include <map>
using namespace std;

/////////////////////////////////////////////////////////////////////////////
// Cprocess

HRESULT make_safe(vector<string>& v_list, VARIANT *plist) {

    HRESULT hr = S_OK;

    USES_CONVERSION;

    VariantInit(plist);
    plist->vt = VT_ARRAY | VT_VARIANT; //set type of plist to variant array

    //now create the 1 dimensional safearray of variants
    LPSAFEARRAY psa;
    SAFEARRAYBOUND rgsabound[]  = { v_list.size(), 0 }; // size elements, 0-based
    psa = SafeArrayCreate(VT_VARIANT, 1, rgsabound);
        if (!psa) { return E_OUTOFMEMORY; }

    VARIANT * VarArray;
    //Increment lock count and get pointer to the array data
    if (FAILED(hr = SafeArrayAccessData(psa,(void **) &VarArray ))) {
        return hr;
    }

    for (int i =0; i<v_list.size();i++) {
        VarArray[i].vt = VT_BSTR;
        //convert ascii to olestr then bstr
        VarArray[i].bstrVal = SysAllocString(A2OLE(v_list[i].c_str()));
        if (!VarArray[i].bstrVal) {
            VariantClear(VarArray);
            return hr = E_OUTOFMEMORY;
        }

    }

        SafeArrayUnaccessData( psa );

        plist->parray = psa; //now set the array in plist to be the created array

    return S_OK;

}

HRESULT getprocid (map<string,int>& m_inst, vector<string> &v_ids) {

    USES_CONVERSION;
    PDH_STATUS  status   = 0;
    HQUERY      hQuery      = NULL;
    HCOUNTER    hCounter    = NULL;
    DWORD       dwType      = 0;

    map<string,int> m_idinst;

    std::string objname="Process";
    std::string counter="ID Process";
    char *buffer;int junk,junk2;

    // initialize the query handle

    map<string, int>::iterator iter;
    for (iter=m_inst.begin();iter != m_inst.end();++iter) {

        for (int i=0;i<= iter->second;++i) {
            status = PdhOpenQuery( NULL, 0, &hQuery );
            if ( status != ERROR_SUCCESS )
                return status;

            TCHAR       szCounterPath[2048];
            DWORD       dwPathSize  = 2048;
            PDH_COUNTER_PATH_ELEMENTS pdh_elm;

            pdh_elm.szMachineName     = NULL;
            pdh_elm.szObjectName      = A2T(objname.c_str());
            pdh_elm.szInstanceName    = A2T(iter->first.c_str());
            pdh_elm.szParentInstance  = NULL;
            pdh_elm.dwInstanceIndex   = i;
            pdh_elm.szCounterName     = A2T(counter.c_str());

            status = PdhMakeCounterPath( &pdh_elm, szCounterPath, &dwPathSize, 0 );
            if ( status != ERROR_SUCCESS ) { return E_FAIL; }

            // Add the counter to the query
            //PdhAddCounter converts each counter path into a counter handle
            status = PdhAddCounter( hQuery, szCounterPath, 0, &hCounter );
            if ( status != ERROR_SUCCESS ) { return E_FAIL; }

            //PdhCollectQueryData gets raw data for the counters
            status = PdhCollectQueryData(hQuery);

            if ( status != ERROR_SUCCESS ) { return E_FAIL; }

            //PdhGetFormattedCounterValue  formats counter values for display
            DWORD           dwFormat = PDH_FMT_DOUBLE;
            PDH_FMT_COUNTERVALUE   fmtValue;
            status = PdhGetFormattedCounterValue (hCounter,
                dwFormat,
                (LPDWORD)NULL,
                &fmtValue);

            if (status == ERROR_SUCCESS) {
                buffer=_fcvt( fmtValue.doubleValue, 0, &junk,&junk2 );
                string id=buffer;
                v_ids.push_back(iter->first+'\t'+id);
            }

        }
        status = PdhCloseQuery (hQuery);
        //PdhCloseQuery closes the query handle and it's counters
    }

    return S_OK;
}

HRESULT getinst (map<string,int>& m_inst) {

    map<string, int>::iterator iter;
    USES_CONVERSION;
    LPTSTR      szCountersBuf     = NULL;
    DWORD       dwCountersSize       = 0;
    LPTSTR      szInstancesBuf    = NULL;
    DWORD       dwInstancesSize      = 0;
    LPTSTR      szTemp          = NULL;

    PDH_STATUS status;

    std::string str_obj="Process";

    status = PdhEnumObjectItems(
        NULL,
        NULL,
        A2CT(str_obj.c_str()),
        NULL,
        &dwCountersSize,
        szInstancesBuf,
        &dwInstancesSize,
        PERF_DETAIL_WIZARD,
        0 );

    if ( ERROR_SUCCESS != status )
        return E_FAIL;

    if (dwCountersSize) {
        szCountersBuf = (LPTSTR)malloc (dwCountersSize * sizeof (TCHAR));
        if (szCountersBuf==NULL) {
            return E_FAIL;
        }
    } else
        szCountersBuf=NULL;

    if (dwInstancesSize) {
        szInstancesBuf = (LPTSTR)malloc (dwInstancesSize * sizeof (TCHAR));
        if (szInstancesBuf==NULL) {
            free(szCountersBuf);
            return E_FAIL;
        }
    } else
        szInstancesBuf = NULL;

    status = PdhEnumObjectItems(
        NULL,
        NULL,
        A2CT(str_obj.c_str()),
        szCountersBuf,
        &dwCountersSize,
        szInstancesBuf,
        &dwInstancesSize,
        PERF_DETAIL_WIZARD
        0);

    if ( ERROR_SUCCESS != status )
        return E_FAIL;

    //it's a series of contingous NULL terminated strings, ending w/zero length string

    if (szInstancesBuf){
        for (szTemp = szInstancesBuf;*szTemp != 0;szTemp += lstrlen(szTemp) + 1) {
            m_inst[T2A(szTemp)]++; //increment instance counter
            //default value is zero for arith element
        }
    }

    return S_OK;

}

STDMETHODIMP Cprocess::proclist(VARIANT *plist)
{

    if (!plist) { return E_INVALIDARG;}

    HRESULT hr = NOERROR;

    vector<string> test(50, "hello");

    map<string,int> m_inst;
    map<string, int>::iterator iter;

    hr=getinst(m_inst);
    if FAILED(hr) {return hr;}

    vector<string> v_inst;
    for (iter=m_inst.begin();iter != m_inst.end();++iter) {
        //go through index of processes
        for(int i=0;i<iter->second;i++){
            //put onto vector multiple procs w/same name
            v_inst.push_back(iter->first);
        }
    }

    //send a vector of strings  and a variant to make_safe
    hr = make_safe(v_inst, plist);

    //getprocid(m_inst);

    return hr;

}

STDMETHODIMP Cprocess::procids(VARIANT *pids)
{
    // TODO: Add your implementation code here
    if (!pids) { return E_INVALIDARG;}

    HRESULT hr = NOERROR;

    map<string,int> m_inst;
    map<string, int>::iterator iter;

    hr=getinst(m_inst);
    if FAILED(hr) {return hr;}

    vector<string> v_ids;
    getprocid(m_inst,v_ids);

    //send a vector of strings  and a variant to make_safe
    hr = make_safe(v_ids, pids);

    //getprocid(m_inst);

    return hr;

}

In Conclusion

That was a quick tour of Python and C++ in the win32 and COM world. Both languages have their strengths and weaknesses. With C++ you have ultimate granularity and power. It obviously comes at a cost of more details to keep track of. Python's strength is rich productivity. It is fast to write the win32 and COM sever code, yet still have a sophisticated language at your disposal. You lose some of the flexibility of C++, which often does not matter. And, when it does, python can help you understand how to solve the problem, before wading into the details.

Further Info

  • Pdh stuff found at ftp://ftp.microsoft.com in something similar to /developr/platformsdk/april2000/x86/redist/pdh
  • Mirosoft MSDN references at http://msdn.microsoft.com
  • Relevant Pdh Python libraries: win32pdh.py, win32pdhutil.py

Author

John Nielsen, jn@who.net
-- Have a great time with programming with python!

Getting process info: Win32 and COM with python and C++