Python for Win32 Extensions Help

External Resources

  • Python Web Site
  • Python for Win32 Extensions Site
  • Python for Win32 mailing list
  • Paul Boddie's Python COM tutorial

    Python Objects

  • Modules
  • Objects

    Overviews and other documentation

  • ASP and Python
  • Keyboard Bindings
  • MTS and Python for NT
  • Python, C++, and COM
  • Recursive directory deletes and special files
  • Source code folding in the editor
  • Source Safe Integration
  • Tabs and indentation in the editor
  • win32com.shell and Windows Shell Links
  • Windows NT Eventlog
  • Windows NT Eventlog and Threading
  • Windows NT Files -- Locking
  • Windows NT Security -- Impersonation

    Win32 API

  • Directory permissions with GetNamedSecurityInfo
  • Getting process info (with some COM thrown it!)
  • Windows NT/2000 Networking with the win32net module

    Python COM

  • ADSI Python
  • Active Directory
  • Quick-Starts to Python and COM
  • win32com readme

    Pythonwin and win32ui

  • Pythonwin Debugger documentation
  • Pythonwin readme
  • The Pythonwin environment
  • Constants

    Help file built: 11/04/03


Win32 API

  • Overviews
  • Modules
  • Objects


Overviews

  • Directory permissions with GetNamedSecurityInfo
  • Getting process info (with some COM thrown it!)
  • Windows NT/2000 Networking with the win32net module
  • Recursive directory deletes and special files
  • Windows NT Eventlog
  • Windows NT Eventlog and Threading
  • Windows NT Files -- Locking


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)


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++


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. For backwards-compatibility, this parameter can be of the form DSN[/username[/password]] (e.g. "myDSN/myUserName/myPassword"). Alternatively, a full ODBC connection string can be used (e.g., "Driver={SQL Server};Server=(local);Database=myDatabase").


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()

Creates a new SECURITY_DESCRIPTOR object

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.


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.

StartServiceCtrlDispatcher
Starts the service by calling the win32 StartServiceCtrlDispatcher function.

Initialize

Finalize

PrepareToHostSingle

PrepareToHostMultiple


servicemanager.CoInitializeEx

CoInitializeEx()

Initialize OLE with additional options.


servicemanager.CoUninitialize

CoUninitialize()

Unitialize OLE


servicemanager.Debugging

True/False = Debugging()

Indicates if the service is running in debug mode.


servicemanager.Finalize

Finalize()


servicemanager.Initialize

Initialize(eventSourceName)

Initialize the module for hosting a service. This is generally called automatically

Parameters

eventSourceName=None : PyUnicode

The event source name


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.PrepareToHostMultiple

PrepareToHostMultiple(service_name, klass)

Prepare for hosting a multiple services in this EXE

Parameters

service_name : string/unicode

The name of the service hosted by the class

klass : object

The Python class to host.


servicemanager.PrepareToHostSingle

PrepareToHostSingle(klass)

Prepare for hosting a single service in this EXE

Parameters

klass=None : object

The Python class to host. If not specified, the service name is looked up in the registry and the specified class instantiated.


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: E:/SRC/PYTHONEX/WIN32/SRC/WIN2KRASMODULE.CPP

Specifies that the user data is obtained from Winlogon.


RASEAPF_NonInteractive

const win2kras.RASEAPF_NonInteractive;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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.

EnumResourceLanguages
List languages for specified resource

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

EnumResourceTypes
Return list of all resource types contained in module

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.

GenerateConsoleCtrlEvent
Send a specified signal to a console process group that shares the console associated with the calling process.

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.

GetUserNameEx
Returns the current user name in format specified by Name* constants

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.

GetDiskFreeSpaceEx
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.

GetFileVersionInfo
Retrieves string version info

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.

GetLongPathName
Converts the specified path to its long form.

GetLongPathNameW
Converts the specified path to its long form.

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.

GetThreadLocale
Returns the current thread's locale.

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.

keybd_event
Simulate a keyboard event

mouse_event
Simulate a mouse event

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.

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.

RegNotifyChangeKeyValue
Watch for registry changes

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.EnumResourceLanguages

[PyUnicode,...] = EnumResourceLanguages(hmodule, lpType , lpName )

List languages for a resource

Parameters

hmodule : PyHandle

Handle to the module that contains resource

lpType : string/unicode/int

Resource type, can be string or integer

lpName : string/unicode/int

Resource name, can be string or integer


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.EnumResourceTypes

[PyUnicode,...] = EnumResourceTypes(hmodule)

Return name or integer id of all resource types contained in module

Parameters

hmodule : PyHandle

The handle to the module to enumerate.


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.GenerateConsoleCtrlEvent

int = GenerateConsoleCtrlEvent(controlEvent, processGroupId )

Send a specified signal to a console process group that shares the console associated with the calling process.

Parameters

controlEvent : int

Signal to generate.

processGroupId : int

Process group to get signal.

Win32 API References

GenerateConsoleCtrlEvent


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.GetDiskFreeSpaceEx

tuple = GetDiskFreeSpaceEx(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

GetDiskFreeSpaceEx

Return Value

The return value is a tuple of 3 integers, containing the number of free bytes available the total number of bytes available on disk the total number of free bytes on disk the above values may be less, if user-quotas are in effect
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.GetLongPathName

string = GetLongPathName(fileName)

Converts the specified path to its long form.

Parameters

fileName : string

The file name.

Comments

This function may raise a NotImplementedError exception if the version of Windows does not support this function.


win32api.GetLongPathNameW

unicode = GetLongPathNameW(fileName)

Converts the specified path to its long form.

Parameters

fileName : string

The file name.

Comments

This function may raise a NotImplementedError exception if the version of Windows does not support this function.


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 full 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.GetThreadLocale

int = GetThreadLocale()

Returns the current thread's locale.


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 (rc, tzinfo), where rc is the integer return code from ::GetTimezoneInformation(), which may be

value | description
TIME_ZONE_ID_STANDARD | if in standard time
TIME_ZONE_ID_DAYLIGHT | if in daylight savings time
TIME_ZONE_ID_UNKNOWN | if the timezone in question doesn't use daylight savings time, (eg. indiana time).
tzinfo is a tuple of:

Items

[0] int : bias

Specifies the current bias, in minutes, for local time translation on this computer. The bias is the difference, in minutes, between Coordinated Universal Time (UTC) and local time. All translations between UTC and local time are based on the following formula:

UTC = local time + bias

[1] unicode : standardName

Specifies a string associated with standard time on this operating system. For example, this member could contain "EST" to indicate Eastern Standard Time. This string is not used by the operating system, so anything stored there using the SetTimeZoneInformation function is returned unchanged by the GetTimeZoneInformation function. This string can be empty.

[2] PyTime : standardTime

Specifies a SYSTEMTIME object that contains a date and local time when the transition from daylight saving time to standard time occurs on this operating system. If this date is not specified, the wMonth member in the SYSTEMTIME structure must be zero. If this date is specified, the DaylightDate value in the TIME_ZONE_INFORMATION structure must also be specified.
To select the correct day in the month, set the wYear member to zero, the wDayOfWeek member to an appropriate weekday, and the wDay member to a value in the range 1 through 5. Using this notation, the first Sunday in April can be specified, as can the last Thursday in October (5 is equal to "the last").

[3] int : standardBias

Specifies a bias value to be used during local time translations that occur during standard time. This member is ignored if a value for the StandardDate member is not supplied.
This value is added to the value of the Bias member to form the bias used during standard time. In most time zones, the value of this member is zero.

[4] unicode : daylightName

[5] PyTime : daylightTime

[6] int : daylightBias

Specifies a bias value to be used during local time translations that occur during daylight saving time. This member is ignored if a value for the DaylightDate member is not supplied.
This value is added to the value of the Bias member to form the bias used during daylight saving time. In most time zones, the value of this member is – 60.


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.GetUserNameEx

string = GetUserNameEx()

Returns the current user name in format from EXTENDED_NAME_FORMAT enum

Win32 API References

GetUserNameEx We always get into trouble with WinXP vs 2k error codes. Simply assume that if we have a size, the function gave us the correct one.


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.RegNotifyChangeKeyValue

RegNotifyChangeKeyValue(key, bWatchSubTree, dwNotifyFilter, hKey, fAsynchronous)

Receive notification of registry changes

Parameters

key : PyHKEY/int

Handle to an open registry key

bWatchSubTree : int

Boolean, notify of changes to subkeys if True

dwNotifyFilter : int

Combination of REG_NOTIFY_CHANGE_* constants

hKey : PyHANDLE

Event handle to be signalled, use None if fAsynchronous is False

fAsynchronous : int

Boolean, function returns immediately if True, waits for change if False


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


win32api.keybd_event

keybd_event(bVk, bScan, dwFlags, dwExtraInfo)

Simulate a keyboard event

Parameters

bVk : BYTE

Virtual-key code

bScan : BYTE

Hardware scan code

dwFlags=0 : DWORD

Flags specifying various function options

dwExtraInfo=0 : DWORD

Additional data associated with keystroke

Win32 API References

keybd_event


win32api.mouse_event

mouse_event(dwFlags, dx, dy, dwData, dwExtraInfo)

Simulate a mouse event

Parameters

dwFlags=0 : DWORD

Flags specifying various function options

dx : DWORD

Horizontal position of mouse

dy : DWORD

Vertical position of mouse

dwData : DWORD

Flag specific parameter

dwExtraInfo=0 : DWORD

Additional data associated with mouse event

Win32 API References

mouse_event


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 either a Unicode object (if format is CF_UNICODETEXT), otherwise a string object. Depending on format (eg, CF_METAFILEPICT) the string may contain raw data bytes.
If the function fails, the standard win32api.error exception is raised.


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

WaitForInputIdle
Waits until the given process is waiting for user input with no input pending, or until the time-out interval has elapsed


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.WaitForInputIdle

int = WaitForInputIdle(hProcess, milliseconds )

Waits until the given process is waiting for user input with no input pending, or until the time-out interval has elapsed

Parameters

hProcess : PyHANDLE

handle of process to wait for

milliseconds : int

time-out interval in milliseconds

Return Value

The return value indicates wether the process is ready or wether it timed out. This value can be one of the following.

Value | Meaning
0 | The process is ready.
WAIT_TIMEOUT | The time-out interval elapsed, and the process is not ready.


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.

CancelIo
Cancels pending IO requests for the object.

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.

GetFileAttributesEx
Retrieves attributes for a specified file or directory.

GetFileAttributesEx
Retrieves attributes for a specified file or directory using Unicode paths.

SetFileTime
Sets the date and time that a file was created, last accessed, or last modified.

GetFileInformationByHandle
Retrieves file information for a specified file.

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.

ReadDirectoryChangesW
retrieves information describing the changes occurring within a directory.

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.

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.

WaitCommEvent
Waits for an event to occur for a specified communications device. The set of events that are monitored by this function is contained in the event mask associated with the device handle.

SetVolumeMountPoint
Mounts the specified volume at the specified volume mount point.

DeleteVolumeMountPoint
Unmounts the volume from the specified volume mount point.

CreateHardLink
Establishes an NTFS hard link between an existing file and a new file.

GetVolumeNameForVolumeMountPoint
Returns unique volume name (Win2k or later)

EncryptFile
Encrypts specified file (requires Win2k or higher and NTFS)

DecryptFile
Decrypts specified file (requires Win2k or higher and NTFS)

EncryptionDisable
Enables/disables encryption for a directory (requires Win2k or higher and NTFS)


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.CancelIo

CancelIo(handle)

Cancels pending IO requests for the object.

Parameters

handle : PyHANDLE

The handle being cancelled.


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.CreateHardLink

CreateHardLink(fileName, existingName, security)

Establishes an NTFS hard link between an existing file and a new file.

Parameters

fileName : string

The name of the new directory entry to be created.

existingName : string

The name of the existing file to which the new link will point.

security : PySECURITY_ATTRIBUTES

a SECURITY_ATTRIBUTES structure that specifies a security descriptor for the new file. If this parameter is None, it leaves the file's existing security descriptor unmodified. If this parameter is not None, it modifies the file's security descriptor.

Comments

An NTFS hard link is similar to a POSIX hard link.
This function creates a second directory entry for an existing file, can be different name in same directory or any name in a different directory. Both file paths must be on the same NTFS volume.
To remove the link, simply delete it and the original file will still remain.

This method exists only on Windows 2000.If there is an attempt to use it on these platforms, an error with E_NOTIMPL will be raised.

Example

Usage

CreateHardLink('h:\\dir\\newfilename.txt','h:\\otherdir\\existingfile.txt')


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.DecryptFile

DecryptFile(filename)

Decrypts specified file (requires Win2k or higher and NTFS)

Parameters

filename : string/unicode

File to decrypt


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.DeleteVolumeMountPoint

DeleteVolumeMountPoint(mountPoint)

Unmounts the volume from the specified volume mount point.

Parameters

mountPoint : string

The mount point to delete - must have a trailing backslash.

Comments

Throws an error if it is not a valid mount point, returns None on success.
Use carefully - will remove drive letter assignment if no directory specified

This method exists only on Windows 2000.If there is an attempt to use it on these platforms, an error with E_NOTIMPL will be raised.

Example

Usage

DeleteVolumeMountPoint('h:\\tmp\\')


win32file.DeviceIoControl

string = 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.EncryptFile

EncryptFile(filename)

Encrypts specified file (requires Win2k or higher and NTFS)

Parameters

filename : string/unicode

File to encrypt


win32file.EncryptionDisable

EncryptionDisable(DirName, Disable)

Enables/disables encryption for a directory (requires Win2k or higher and NTFS)

Parameters

DirName : string/unicode

Directory to enable or disable

Disable : boolean

Set to False to enable encryption


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.GetFileAttributesEx

tuple = GetFileAttributesEx(filename, level )

Retrieves attributes for a specified file or directory.

Parameters

filename : string/unicode

String that specifies a file or directory. Windows NT/2000: In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to nearly 32,000 wide characters, call the Unicode version of the function (win32file::GetFileAttributesExW ) and prepend "\\?\\" to the path.

level=GetFileExInfoStandard : int

An integer that gives the set of attribute information to obtain. See the Win32 SDK documentation for more information.

Comments

Not all file systems can record creation and last access time and not all file systems record them in the same manner. For example, on Windows NT FAT, create time has a resolution of 10 milliseconds, write time has a resolution of 2 seconds, and access time has a resolution of 1 day (really, the access date). On NTFS, access time has a resolution of 1 hour. Furthermore, FAT records times on disk in local time, while NTFS records times on disk in UTC, so it is not affected by changes in time zone or daylight saving time.

Return Value

The result is a tuple of:

Items

[0] int : attributes

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

[1] PyTime : creationTime

Specifies when the file or directory was created.

[2] PyTime : lastAccessTime

For a file, specifies when the file was last read from or written to. For a directory, the structure specifies when the directory was created. For both files and directories, the specified date will be correct, but the time of day will always be set to midnight.

[3] PyTime : lastWriteTime

For a file, the structure specifies when the file was last written to. For a directory, the structure specifies when the directory was created.

[4] int/long : fileSize

The size of the file. This member has no meaning for directories.


win32file.GetFileAttributesEx

tuple = GetFileAttributesEx()

Retrieves attributes for a specified file or directory using Unicode paths.

Comments

See win32file::GetFileAttributesEx for a description of the arguments and return type.


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.GetFileInformationByHandle

tuple = GetFileInformationByHandle(handle)

Retrieves file information for a specified file.

Parameters

handle : PyHANDLE/int

Handle to the file for which to obtain information.
This handle should not be a pipe handle. The GetFileInformationByHandle function does not work with pipe handles.

Comments

Depending on the underlying network components of the operating system and the type of server connected to, the GetFileInformationByHandle function may fail, return partial information, or full information for the given file. In general, you should not use GetFileInformationByHandle unless your application is intended to be run on a limited set of operating system configurations.

Return Value

The result is a tuple of:

Items

[0] int : dwFileAttributes

[1] PyTime : ftCreationTime

[2] PyTime : ftLastAccessTime

[3] PyTime : ftLastWriteTime

[4] int : dwVolumeSerialNumber

[5] int : nFileSizeHigh

[6] int : nFileSizeLow

[7] int : nNumberOfLinks

[8] int : nFileIndexHigh

[9] int : nFileIndexLow


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, 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)
If the function succeeds, rc will be set to 1, otherwise it will be set to the win32 error code.


win32file.GetVolumeNameForVolumeMountPoint

PyUnicode = GetVolumeNameForVolumeMountPoint(mountPoint)

Returns unique volume name (Win2k or later)

Parameters

mountPoint : string

Volume mount point or root drive - trailing backslash required


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.ReadDirectoryChangesW

ReadDirectoryChangesW(handle, size, bWatchSubtree, dwNotifyFilter, overlapped)

retrieves information describing the changes occurring within a directory.

Parameters

handle : int

Handle to the directory to be monitored. This directory must be opened with the FILE_LIST_DIRECTORY access right.

size : int

Size of the buffer to allocate for the results.

bWatchSubtree : int

Specifies whether the ReadDirectoryChangesW function will monitor the directory or the directory tree. If TRUE is specified, the function monitors the directory tree rooted at the specified directory. If FALSE is specified, the function monitors only the directory specified by the hDirectory parameter.

dwNotifyFilter : int

Specifies filter criteria the function checks to determine if the wait operation has completed. This parameter can be one or more of the FILE_NOTIFY_CHANGE_* values.

overlapped=None : PyOVERLAPPED

Must be None


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.SetFileTime

None = SetFileTime(handle, CreatedTime , AccessTime , WrittenTime )

Sets the date and time that a file was created, last accessed, or last modified.

Parameters

handle : PyHANDLE/int

Previously opened handle (opened with GENERIC_WRITE access).

CreatedTime : PyTime

File created time. None for no change.

AccessTime : PyTime

File access time. None for no change.

WrittenTime : PyTime

File written time. None for no change.


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.SetVolumeMountPoint

PyUnicode = SetVolumeMountPoint(mountPoint, volumeName )

Mounts the specified volume at the specified volume mount point.

Parameters

mountPoint : string

The mount point - must be an existing empty directory on an NTFS volume

volumeName : string

The volume to mount there

Comments

Note that both parameters must have trailing backslashes.

This method exists only on Windows 2000.If there is an attempt to use it on these platforms, an error with E_NOTIMPL will be raised.

Example

Usage

SetVolumeMountPoint('h:\\tmp\\','c:\\')

Return Value

The result is the GUID of the volume mounted, as a string.


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)

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.

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.WSAEventSelect

WSAEventSelect(socket, hwnd, int, 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

hwnd : hwnd

Window handle for the socket to become attached to.

int : int

Window message that will be posted.

networkEvents : int

A bitmask of network events that will cause wMsg to be posted. 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.WaitCommEvent

WaitCommEvent(handle, overlapped)

Waits for an event to occur for a specified communications device. The set of events that are monitored by this function is contained in the event mask associated with the device handle.

Parameters

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

If an overlapped structure is passed, then the PyOVERLAPPED::dword address is passed to the Win32 API as the mask. This means that once the overlapped operation has completed, this dword attribute can be used to determine the type of event that occurred.

Return Value

The result is a tuple of (rc, mask_val), where rc is zero for success, or the result of calling GetLastError() otherwise. The mask_val is the new mask value once the function has returned, but if an Overlapped object is passed, this value will generally be meaningless. See the comments for more details.


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 completes. 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

ReplyMessage
Used to reply to a message sent through the SendMessage function without returning control to the function that called SendMessage.

RegisterWindowMessage
Defines a new window message that is guaranteed to be unique throughout the system. The message value can be used when sending or posting messages.

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

EnumThreadWindows
Enumerates all top-level windows associated with a thread on the screen by passing the handle to each window, in turn, to an application-defined callback function. EnumThreadWindows continues until the last top-level window associated with the thread 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

GetNextDlgTabItem
Retrieves a handle to the first control that has the WS_TABSTOP style that precedes (or follows) the specified control.

GetNextDlgGroupItem
Retrieves a handle to the first control in a group of controls that precedes (or follows) the specified control in a dialog box.

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

DeleteObject
Deletes a logical pen, brush, font, bitmap, region, or palette, freeing all system resources associated with the object. After the object is deleted, the specified handle is no longer valid.

ImageList_Add
Adds an image or images to an image list.

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_LoadBitmap
Creates an image list from the specified bitmap resource.

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.

InsertMenuItem
Inserts a menu item

SetMenuItemInfo
Sets menu information

GetMenuItemInfo
Gets menu information

GetMenuItemCount

GetMenuItemRect

GetMenuState

SetMenuDefaultItem

AppendMenu

InsertMenu

EnableMenuItem

CheckMenuItem

ModifyMenu
Changes an existing menu item. This function is used to specify the content, appearance, and behavior of the menu item.

GetMenuItemID
Retrieves the menu item identifier of a menu item located at the specified position in a menu.

SetMenuItemBitmaps
Associates the specified bitmap with a menu item. Whether the menu item is selected or clear, the system displays the appropriate bitmap next to the menu item.

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.

IsChild
Tests whether a window is a child window or descendant window of a specified parent 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

GetClassName
Retrieves the name of the class to which the specified window belongs.


win32gui.AppendMenu

AppendMenu()


win32gui.BringWindowToTop

BringWindowToTop(hwnd)

Parameters

hwnd : int

The handle to the window


win32gui.CallWindowProc

int = CallWindowProc()


win32gui.CheckMenuItem

int = CheckMenuItem()


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.DeleteObject

DeleteObject(handle)

Deletes a logical pen, brush, font, bitmap, region, or palette, freeing all system resources associated with the object. After the object is deleted, the specified handle is no longer valid.

Parameters

handle : int

handle to the object to delete.


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.EnableMenuItem

EnableMenuItem()


win32gui.EnableWindow

int = EnableWindow()


win32gui.EndDialog

EndDialog(hwnd, result)

Ends a dialog box.

Parameters

hwnd : int

Handle to the window.

result : int

result


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.EnumThreadWindows

EnumThreadWindows(dwThreadId, callback, extra)

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

Parameters

dwThreadId : int

The id of the thread for which the windows need to be enumerated.

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.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.GetClassName

string = GetClassName(hwnd)

Retrieves the name of the class to which the specified window belongs.

Parameters

hwnd : int

The handle to the window


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.GetMenuItemCount

int = GetMenuItemCount()


win32gui.GetMenuItemID

int = GetMenuItemID(hMenu, nPos )

Retrieves the menu item identifier of a menu item located at the specified position in a menu.

Parameters

hMenu : int

handle to menu

nPos : int

position of menu item


win32gui.GetMenuItemInfo

GetMenuItemInfo(hMenu, fByPosition, menuItem)

Gets menu information

Parameters

hMenu : int

fByPosition : int

menuItem : buffer

A string or buffer in the format of a MENUITEMINFO structure.


win32gui.GetMenuItemRect

int = GetMenuItemRect()


win32gui.GetMenuState

int = GetMenuState()


win32gui.GetNextDlgGroupItem

HWND = GetNextDlgGroupItem(hDlg, hCtl , bPrevious )

Retrieves a handle to the first control in a group of controls that precedes (or follows) the specified control in a dialog box.

Parameters

hDlg : int

handle to dialog box

hCtl : int

handle to known control

bPrevious : int

direction flag


win32gui.GetNextDlgTabItem

HWND = GetNextDlgTabItem(hDlg, hCtl , bPrevious )

Retrieves a handle to the first control that has the WS_TABSTOP style that precedes (or follows) the specified control.

Parameters

hDlg : int

handle to dialog box

hCtl : int

handle to known control

bPrevious : int

direction flag


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_Add

int = ImageList_Add(himl, hbmImage , hbmMask )

Adds an image or images to an image list.

Parameters

himl : int

Handle to the image list.

hbmImage : int

Handle to the bitmap that contains the image or images. The number of images is inferred from the width of the bitmap.

hbmMask : int

Handle to the bitmap that contains the mask. If no mask is used with the image list, this parameter is ignored

Return Value

Returns the index of the first new image if successful, or -1 otherwise.


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_LoadBitmap

HANDLE = ImageList_LoadBitmap()

Creates an image list from the specified bitmap resource.


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.InsertMenu

InsertMenu()


win32gui.InsertMenuItem

InsertMenuItem(hMenu, fByPosition, menuItem)

Inserts a menu item

Parameters

hMenu : int

fByPosition : int

menuItem : buffer

A string or buffer in the format of a MENUITEMINFO structure.


win32gui.IsChild

IsChild(hWndParent, hWnd)

Tests whether a window is a child window or descendant window of a specified parent window

Parameters

hWndParent : int

handle to parent window

hWnd : int

handle to window to test


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(hinst, name , type , cxDesired , cyDesired , fuLoad )

Loads a bitmap, cursor or icon

Parameters

hinst : int

Handle to an instance of the module that contains the image to be loaded. To load an OEM image, set this parameter to zero.

name : int/string

Specifies the image to load. If the hInst parameter is non-zero and the fuLoad parameter omits LR_LOADFROMFILE, name specifies the image resource in the hInst module. If the image resource is to be loaded by name, the name parameter is a string that contains the name of the image resource.

type : int

Specifies the type of image to be loaded.

cxDesired : int

Specifies the width, in pixels, of the icon or cursor. If this parameter is zero and the fuLoad parameter is LR_DEFAULTSIZE, the function uses the SM_CXICON or SM_CXCURSOR system metric value to set the width. If this parameter is zero and LR_DEFAULTSIZE is not used, the function uses the actual resource width.

cyDesired : int

Specifies the height, in pixels, of the icon or cursor. If this parameter is zero and the fuLoad parameter is LR_DEFAULTSIZE, the function uses the SM_CYICON or SM_CYCURSOR system metric value to set the height. If this parameter is zero and LR_DEFAULTSIZE is not used, the function uses the actual resource height.

fuLoad : int


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.ModifyMenu

ModifyMenu(hMnu, uPosition, uFlags, uIDNewItem, newItem)

Changes an existing menu item. This function is used to specify the content, appearance, and behavior of the menu item.

Parameters

hMnu : int

handle to menu

uPosition : int

menu item to modify

uFlags : int

options

uIDNewItem : int

identifier, menu, or submenu

newItem : string

menu item content


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.RegisterWindowMessage

int = RegisterWindowMessage(name)

Defines a new window message that is guaranteed to be unique throughout the system. The message value can be used when sending or posting messages.

Parameters

name : string/unicode

The string


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.ReplyMessage

int = ReplyMessage(result)

Used to reply to a message sent through the SendMessage function without returning control to the function that called SendMessage.

Parameters

result : int

Specifies the result of the message processing. The possible values are based on the message sent.


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.SetMenuDefaultItem

SetMenuDefaultItem()


win32gui.SetMenuItemBitmaps

SetMenuItemBitmaps(hMenu, uPosition, uFlags, hBitmapUnchecked, hBitmapChecked)

Associates the specified bitmap with a menu item. Whether the menu item is selected or clear, the system displays the appropriate bitmap next to the menu item.

Parameters

hMenu : int

handle to menu

uPosition : int

menu item

uFlags : int

options

hBitmapUnchecked : int

handle to unchecked bitmap

hBitmapChecked : int

handle to checked bitmap


win32gui.SetMenuItemInfo

SetMenuItemInfo(hMenu, fByPosition, menuItem)

Sets menu information

Parameters

hMenu : int

fByPosition : int

menuItem : buffer

A string or buffer in the format of a MENUITEMINFO structure.


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.

NetSessionGetInfo
Get network session information.

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.

NetFileGetInfo
Get info about files open on the server.

NetStatisticsGet
Return server or workstation stats


win32net::NetGetAnyDCName

win32net::NetGetAnyDCName method

PyUnicode NetGetAnyDCName()

Returns the name of any domain controller trusted by the specified server.

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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 : PyGROUP_INFO_*

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 : PyGROUP_INFO_*

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 : [string, ...]

A list of strings with fully qualified user names 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

(list = NetServerDiskEnum(server, level , server , service , level , options )

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 0.

server : string/PyUnicode

Name of server/workstation to retrieve statistics for (None or blank uses local).

service : string/PyUnicode

SERVICE_SERVER or SERVICE_WORKSTATION

level : int

Only 0 currently supported.

options : int

Must be zero.

Win32 API References

NetServerDiskEnum

Return Value

The result is a list of drives on the server


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 in the format of PyUSE_INFO_*.

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 PyUSE_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.

LookupPerfIndexByName
Returns the counter index corresponding to the specified counter name.

LookupPerfNameByIndex
Returns the performance object name corresponding to the specified index.


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.LookupPerfIndexByName

int = LookupPerfIndexByName(machineName, instanceName )

Returns the counter index corresponding to the specified counter name.

Parameters

machineName : string

The name of the machine where the specified counter is located. The machine name can be specified by the DNS name or the IP address.

instanceName : string

The full name of the counter.


win32pdh.LookupPerfNameByIndex

string = LookupPerfNameByIndex(machineName, index )

Returns the performance object name corresponding to the specified index.

Parameters

machineName : string

The name of the machine where the specified counter is located. The machine name can be specified by the DNS name or the IP address.

index : int

The index of the performance object.


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.

SetNamedPipeHandleState
Sets 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.

SetNamedPipeHandleState
Sets 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

Specifies the number of milliseconds to wait for the named pipe to be available. In addition to numeric values, the following special values can be specified.

Value | Meaning
win32pipe.NMPWAIT_NOWAIT | Does not wait for the named pipe. If the named pipe is not available, the function returns an error.
win32pipe.NMPWAIT_WAIT_FOREVER | Waits indefinitely.
win32pipe.NMPWAIT_USE_DEFAULT_WAIT | Uses the default time-out specified in a call to the CreateNamedPipe function.


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.SetNamedPipeHandleState

SetNamedPipeHandleState(hPipe, Mode, MaxCollectionCount, CollectDataTimeout)

Sets the state of the named pipe.

Parameters

hPipe : PyHANDLE

The handle to the pipe.

Mode : int

The pipe read mode.

MaxCollectionCount : int

Maximum bytes collected before transmission to the server.

CollectDataTimeout : int

Maximum time to wait, in milliseconds, before transmission to server.


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 , tuple )

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)

tuple : data

A tuple corresponding to the level parameter.

Comments

For level 1, the tuple is:

Items

[0] string : docName

Specifies the name of the document.

[1] string : outputFile

Specifies the name of an output file. To print to a printer, set this to None.

[2] string : dataType

Identifies the type of data used to record the document, such as "raw" or "emf", used to record the print job. This member can be None. If it is not None, the StartDoc function passes it to the printer driver. Note that the printer driver might ignore the requested 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.

GetCurrentProcess
Retrieves a pseudo handle for the current process.

GetCurrentProcessId
Retrieves the process identifier of the calling process.

GetStartupInfo
Retrieves the contents of the STARTUPINFO structure that was specified when the calling process was created.

GetPriorityClass

GetExitCodeThread

GetExitCodeProcess

GetWindowThreadProcessId
Retrieves the identifier of the thread and process that created the specified window.

SetThreadPriority

GetThreadPriority

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.

ExitProcess
Ends a process and all 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 from the win32con module:

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.ExitProcess

ExitProcess(exitCode)

Ends a process and all its threads

Parameters

exitCode : int

Specifies the exit code for the process, and for all threads that are terminated as a result of this call

Comments

ExitProcess is the preferred method of ending a process. This function provides a clean process shutdown. This includes calling the entry-point function of all attached dynamic-link libraries (DLLs) with a value indicating that the process is detaching from the DLL. If a process terminates by calling win32process::TerminateProcess, the DLLs that the process is attached to are not notified of the process termination.


win32process.GetCurrentProcess

int = GetCurrentProcess()

Retrieves a pseudo handle for the current process.


win32process.GetCurrentProcessId

int = GetCurrentProcessId()

Retrieves the process identifier of the calling process.


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.GetThreadPriority

int = GetThreadPriority(handle)

Parameters

handle : PyHANDLE

handle to the thread


win32process.GetWindowThreadProcessId

int, int = GetWindowThreadProcessId(hwnd)

Retrieves the identifier of the thread and process that created the specified window.

Parameters

hwnd : int

handle to the window

Return Value

The result is a tuple of (threadId, processId)


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 process

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.

GetBinarySid
Accepts a SID string (eg: S-1-5-32-544) and returns the SID as a PySID object.

OpenProcessToken

LookupPrivilegeValue

LookupPrivilegeName
return the text name for a privilege LUID

LookupPrivilegeDisplayName
returns long description for a privilege LUID

AdjustTokenPrivileges

AdjustTokenGroups
Sets the groups associated to an access token,returns previous group info

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.

SetTokenInformation
Set a specified type of information in an access token

LsaOpenPolicy
Opens a policy handle for the specified system

LsaClose
Closes a policy handle created by GetPolicyHandle

LsaQueryInformationPolicy
Retrieves information from the policy handle

LsaSetInformationPolicy
Sets policy options

LsaAddAccountRights
Adds a list of privliges to an account - account is created if it doesn't already exist

LsaRemoveAccountRights
Removes privs from an account - if AllRights parm is true, account is *deleted*

LsaEnumerateAccountRights
Lists privileges held by SID

LsaEnumerateAccountsWithUserRight
Return SIDs that hold specified priv

ConvertSidToStringSid
Return string representation of a SID

ConvertStringSidToSid
Creates a SID from a string representation

ConvertSecurityDescriptorToStringSecurityDescriptor
Return string representation of a SECURITY_DESCRIPTOR

ConvertStringSecurityDescriptorToSecurityDescriptor
Turns string representation of a SECURITY_DESCRIPTOR into the real thing

LsaStorePrivateData
Stores encrypted unicode data under specified Lsa registry key. Returns None on success

LsaRetrievePrivateData
Retreives encrypted unicode data from Lsa registry key.

LsaRegisterPolicyChangeNotification
Register an event handle to receive policy change events

LsaUnregisterPolicyChangeNotification
Stop receiving policy change notification

CryptEnumProviders
List cryptography providers


win32security.ACL

PyACL = ACL(bufSize)

Creates a new PyACL object.

Parameters

bufSize=64 : int

The size of the buffer for the ACL.


win32security.AdjustTokenGroups

PyTOKEN_GROUPS = AdjustTokenGroups(obHandle, ResetToDefault , NewState )

Sets the groups associated to an access token,returns previous group info

Parameters

obHandle : PyHANDLE

The handle to access token to be modified

ResetToDefault : int

Sets groups to default enabled/disabled states,

NewState : PyTOKEN_GROUPS

Groups and attributes to be set for token


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.ConvertSecurityDescriptorToStringSecurityDescriptor

string = ConvertSecurityDescriptorToStringSecurityDescriptor(SecurityDescriptor, RequestedStringSDRevision , SecurityInformation )

Return string representation of a SECURITY_DESCRIPTOR

Parameters

SecurityDescriptor : PySECURITY_DESCRIPTOR

PySECURITY_DESCRIPTOR object

RequestedStringSDRevision : int

Only SDDL_REVISION_1 currently valid

SecurityInformation : int

Combination of bit flags from SECURITY_INFORMATION enum


win32security.ConvertSidToStringSid

string = ConvertSidToStringSid(Sid)

Return string representation of a SID

Parameters

Sid : PySID

PySID object


win32security.ConvertStringSecurityDescriptorToSecurityDescriptor

PySECURITY_DESCRIPTOR = ConvertStringSecurityDescriptorToSecurityDescriptor(StringSecurityDescriptor, StringSDRevision )

Turns string representation of a SECURITY_DESCRIPTOR into the real thing

Parameters

StringSecurityDescriptor : string

String representation of a SECURITY_DESCRIPTOR

StringSDRevision : int

Only SDDL_REVISION_1 currently valid


win32security.ConvertStringSidToSid

PySID = ConvertStringSidToSid(StringSid)

Creates a SID from a string representation

Parameters

StringSid : string

String representation of a SID


win32security.CryptEnumProviders

object = CryptEnumProviders()

List cryptography providers


win32security.GetBinarySid

PySID = GetBinarySid(SID)

Accepts a SID string (eg: S-1-5-32-544) and returns the SID as a PySID object.

Parameters

SID : string

Textual representation of a SID. Textual SID example: S-1-5-32-544


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 )

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.

Return Value

The following types are supported

TokenInformationClass | Return type
TokenUser | (PySID,int)
TokenOwner | PySID
TokenGroups | ((PySID,int),) returns a list of tuples containing (group Sid, attribute flags)
TokenRestrictedSids | ((PySID,int),)
TokenPrivileges | ((int,int),) returns PyTOKEN_PRIVILEGES (tuple of LUID and attribute flags for each privilege) attributes are combination of SE_PRIVILEGE_ENABLED,SE_PRIVILEGE_ENABLED_BY_DEFAULT,SE_PRIVILEGE_USED_FOR_ACCESS
TokenSource | (string,LUID)


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.LookupPrivilegeDisplayName

PyUnicode = LookupPrivilegeDisplayName(obsystem_name, obpriv_name )

returns long description for a privilege LUID

Parameters

obsystem_name : string/PyUnicode

System name, local system assumed if not specified

obpriv_name : string/PyUnicode

Name of privilege, Se...Privilege string constants


win32security.LookupPrivilegeName

PyUnicode = LookupPrivilegeName(luid, obsystem_name , LUID )

return the text name for a privilege LUID

Parameters

luid : int

64 bit value representing a privilege

obsystem_name : string/PyUnicode

System name, local system assumed if not specified

LUID : LARGE_INTEGER

64 bit value representing a privilege


win32security.LookupPrivilegeValue

LARGE_INTEGER = LookupPrivilegeValue(systemName, privilegeName )

Parameters

systemName : string

String specifying the system

privilegeName : string

String specifying the privilege


win32security.LsaAddAccountRights

LsaAddAccountRights()

Adds a list of privliges to an account - account is created if it doesn't already exist


win32security.LsaClose

LsaClose()

Closes a policy handle created by GetPolicyHandle


win32security.LsaEnumerateAccountRights

LsaEnumerateAccountRights()

Lists privileges held by SID


win32security.LsaEnumerateAccountsWithUserRight

LsaEnumerateAccountsWithUserRight()

Return SIDs that hold specified priv


win32security.LsaOpenPolicy

PyHandle = LsaOpenPolicy(obsystem_name, access_mask )

Opens a policy handle for the specified system

Parameters

obsystem_name : string/PyUnicode

System name, local system assumed if not specified

access_mask : int

Bitmask of requested access types


win32security.LsaQueryInformationPolicy

LsaQueryInformationPolicy()

Retrieves information from the policy handle


win32security.LsaRegisterPolicyChangeNotification

object = LsaRegisterPolicyChangeNotification(InformationClass, NotificationEventHandle )

Register an event handle to receive policy change events

Parameters

InformationClass : int

One of POLICY_NOTIFICATION_INFORMATION_CLASS contants

NotificationEventHandle : PyHANDLE

Event handle to receives notification


win32security.LsaRemoveAccountRights

LsaRemoveAccountRights()

Removes privs from an account - if AllRights parm is true, account is *deleted*


win32security.LsaRetrievePrivateData

PyUnicode = LsaRetrievePrivateData(handle, KeyName )

Retreives encrypted unicode data from Lsa registry key.

Parameters

handle : PyHANDLE

Policy handle

KeyName : string

Registry key to read


win32security.LsaSetInformationPolicy

LsaSetInformationPolicy()

Sets policy options


win32security.LsaStorePrivateData

LsaStorePrivateData(handle, KeyName, PrivateData)

Stores encrypted unicode data under specified Lsa registry key. Returns None on success

Parameters

handle : PyHANDLE

Policy handle

KeyName : string

Registry key in which to store data

PrivateData : int

Unicode string to be encrypted and stored


win32security.LsaUnregisterPolicyChangeNotification

object = LsaUnregisterPolicyChangeNotification(InformationClass, NotificationEventHandle )

Stop receiving policy change notification

Parameters

InformationClass : int

POLICY_NOTIFICATION_INFORMATION_CLASS constant

NotificationEventHandle : PyHANDLE

Event handle previously registered to receive policy change events


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.SetTokenInformation

object = SetTokenInformation(handle, TokenInformationClass , obinfo )

Set a specified type of information in an access token

Parameters

handle : PyHANDLE

Handle to an access token to be modified

TokenInformationClass : int

Specifies a value from the TOKEN_INFORMATION_CLASS enumerated type identifying the type of information the function retrieves.

obinfo : PyACL

PyACL, PySID, or int depending on type parm


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

SERVICE_STATUS = 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

SERVICE_STATUS = QueryServiceStatus(scHandle)

Queries a service status

Parameters

scHandle : int

Handle to query


win32service.SetServiceStatus

SERVICE_STATUS = 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
  • 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
  • PyHHNTRACK
  • PyHHN_NOTIFY
  • PyHH_AKLINK
  • PyHH_FTS_QUERY
  • PyHH_POPUP
  • PyHH_WINTYPE
  • 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
  • PyTOKEN_PRIVILEGES
  • PyTime
  • 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
  • PyUSE_INFO_*
  • PyUSE_INFO_0
  • PyUSE_INFO_1
  • PyUSE_INFO_2
  • PyUSE_INFO_3
  • PyUnicode
  • 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
  • SERVICE_STATUS
  • ULARGE_INTEGER
  • connection
  • cursor


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.

IsValid
Validate the ACL.

AddAccessAllowedAce
Adds an access-allowed ACE to an ACL object.

AddAccessDeniedAce
Adds an access-denied ACE to an ACL object.

AddAuditAccessAce
Adds an audit entry to a system access control list (SACL)

GetAclSize
Returns the storage size of the ACL.

GetAclRevision
Returns the revision nbr of the ACL.

GetAceCount
Returns the number of ACEs in the ACL.

GetAce
Returns an ACE from the ACL.

DeleteAce
Delete an access-control entry (ACE) from an ACL

GetExplicitEntriesFromAcl
Retrieve list of EXPLICIT_ACCESSs from the ACL

SetEntriesInAcl
Adds a list of EXPLICIT_ACCESSs to an ACL


PyACL.AddAccessAllowedAce

AddAccessAllowedAce(revision, access, sid)

Adds an access-allowed ACE to an DACL object. The access is granted to a specified SID.

Parameters

revision : int

Pre-win2k, must be ACL_REVISION, otherwise also may be ACL_REVISION_DS.

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.

Alternative Parameters

access

Specifies the mask of access rights to be denied to the specified SID.

sid

A SID object representing a user, group, or logon account being denied access.

Comments

Note that early versions of this function supported only two arguments. This has been deprecated in preference of the three argument version, which reflects the win32 API and the new functions in this module.


PyACL.AddAccessDeniedAce

AddAccessDeniedAce(revision, access, sid)

Adds an access-denied ACE to an ACL object. The access is denied to a specified SID.

Parameters

revision : int

Pre-win2k, must be ACL_REVISION, otherwise also may be ACL_REVISION_DS.

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.

Alternative Parameters

access

Specifies the mask of access rights to be denied to the specified SID.

sid

A SID object representing a user, group, or logon account being denied access.

Comments

Note that early versions of this function supported only two arguments. This has been deprecated in preference of the three argument version, which reflects the win32 API and the new functions in this module.


PyACL.AddAuditAccessAce

AddAuditAccessAce(dwAceRevision, dwAccessMask, sid, bAuditSuccess, bAuditFailure)

Adds an audit ACE to a Sacl

Parameters

dwAceRevision : int

Revision of ACL: Pre-Win2k, must be ACL_REVISION. Win2K on up, can also be ACL_REVISION_DS

dwAccessMask : int

Bitmask of access types to be audited

sid : PySID

SID for whom system audit messages will be generated

bAuditSuccess : int

Set to 1 if access success should be audited, else 0

bAuditFailure : int

Set to 1 if access failure should be audited, else 0


PyACL.DeleteAce

DeleteAce(index)

Deletes specified Ace from an ACL.

Parameters

index : int

Zero-based index of the ACE to delete.


PyACL.GetAce

GetAce(index)

Gets an Ace from the ACL. Returns tuple ((aceType, AceFlags), Mask, SID). For details see the API documentation: http://msdn.microsoft.com/library/psdk/winbase/acctrlow_22r6.htm.

Parameters

index : int

Zero-based index of the ACE to retrieve.


PyACL.GetAceCount

GetAceCount()

Returns the number of ACEs in the ACL.


PyACL.GetAclSize

GetAclSize()

Returns the storage size of the ACL.


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.


PyACL.IsValid

IsValid()

Determines if the ACL is valid (IsValidAcl)


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

__cmp__
Used when IID objects are compared. tp_compare

__repr__
Used whenever a repr() is called for the object tp_repr

__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.__repr__

string = __repr__()


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.

int dword
An integer buffer that may be used by overlapped functions (eg, win32file::WaitCommEvent)


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

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.


PySECURITY_DESCRIPTOR

PySECURITY_DESCRIPTOR Object

A Python object, representing a SECURITY_DESCRIPTOR structure

Methods

Initialize
Initializes the object.

GetSecurityDescriptorOwner
Return the owner of the security descriptor. SID is returned.

GetSecurityDescriptorOwner
Return the group owning the security descriptor. SID is returned.

GetSecurityDescriptorDacl
Return the discretionary ACL of the security descriptor.

GetSecurityDescriptorSacl
Return the system ACL of the security descriptor.

GetSecurityDescriptorControl
Returns the control bit flags and revistion of the SD

SetSecurityDescriptorOwner
Set the owner of the security descriptor. Returns non-zero on success.

SetSecurityDescriptorGroup
Set the primary group of the security descriptor. Returns non-zero on success.

SetDacl
Sets information in a discretionary access-control list.

SetSecurityDescriptorSacl
Sets the system access control list in the security descriptor

IsValid
Determine if security descriptor is valid (IsValidSecurityDescriptor)

GetLength
Return length of security descriptor (GetSecurityDescriptorLength)

IsSelfRelative
Returns true if SD is self-relative, false if absolute

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.GetLength

GetLength()

return length of security descriptor (GetSecurityDescriptorLenght).


PySECURITY_DESCRIPTOR.GetSecurityDescriptorControl

(int,int) = GetSecurityDescriptorControl()

Returns tuple of Control bit flags and revision of SD.


PySECURITY_DESCRIPTOR.GetSecurityDescriptorDacl

PyACL = GetSecurityDescriptorDacl()

Return the discretionary ACL of the security descriptor.


PySECURITY_DESCRIPTOR.GetSecurityDescriptorOwner

PySID = GetSecurityDescriptorOwner()

Return the owner of the security descriptor.


PySECURITY_DESCRIPTOR.GetSecurityDescriptorSacl

PyACL = GetSecurityDescriptorSacl()

Return system access control list (SACL) of SD


PySECURITY_DESCRIPTOR.Initialize

Initialize()

Initialize the SD.


PySECURITY_DESCRIPTOR.IsSelfRelative

IsSelfRelative()

Returns 1 if security descriptor is self relative, 0 if absolute


PySECURITY_DESCRIPTOR.IsValid

IsValid()

Determines if the security descriptor is valid.


PySECURITY_DESCRIPTOR.SetSecurityDescriptorGroup

int = SetSecurityDescriptorGroup(sid, bOwnerDefaulted )

Set group SID.

Parameters

sid : PySID

The group sid to be set in the security descriptor.

bOwnerDefaulted : int

Normally set to false since this explicitely set the owner.


PySECURITY_DESCRIPTOR.SetSecurityDescriptorOwner

SetSecurityDescriptorOwner(sid, bOwnerDefaulted)

Set owner SID.

Parameters

sid : PySID

The sid to be set as owner in the security descriptor.

bOwnerDefaulted : int

Normally set to false since this explicitely set the owner.


PySECURITY_DESCRIPTOR.SetSecurityDescriptorSacl

SetSecurityDescriptorSacl(bSaclPresent, SACL, bSaclDefaulted)

Replaces system access control list (SACL) in the security descriptor.

Parameters

bSaclPresent : int

A flag indicating if SACL is to be used. If false, last 2 parms are ignored.

SACL : PyACL

The SACL to set in the security descriptor

bSaclDefaulted : int

Flag, set to false if user has specifically set the SACL.


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

GetLength
Return length of sid (GetLengthSid)

GetSubAuthorityCount
Return nbr of subauthorities from SID

GetSubAuthority
Return specified subauthory from SID

GetSidIdentifierAuthority
Return identifier for the authority who issued the SID (one of the SID_IDENTIFIER_AUTHORITY constants)

__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.GetLength

int = GetLength()

return length of SID (GetLengthSid).


PySID.GetSidIdentifierAuthority

(int,int,int,int,int,int) = GetSidIdentifierAuthority()

Returns a tuple of 6 SID_IDENTIFIER_AUTHORITY constants


PySID.GetSubAuthority

int = GetSubAuthority()

Returns specified subauthority from SID


PySID.GetSubAuthorityCount

int = GetSubAuthorityCount()

return nbr of subauthorities from SID


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 SetSidSubAuthority


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 COM objects or other win32 functions.
Using int(timeObject) will return an integer compatible with the standard Python time module.

Example

First import the time module

import time
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.

__cmp__
Used when time objects are compared. tp_compare

__repr__
Used for repr(ob) tp_repr

__hash__
Used when the hash value of an time object is required tp_hash

__str__
Used for str(ob) tp_str


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.

Character | Description
%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.__repr__

__repr__()


PyTime.__str__

string = __str__()

Used when a (8-bit) string representation of the time object is required.


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)


SERVICE_STATUS

SERVICE_STATUS Object

A Win32 service status object is represented by a tuple:

Items

[0] int : serviceType

The type of service.

[1] int : serviceState

The current state of the service.

[2] int : controlsAccepted

The controls the service accepts.

[3] int : win32ExitCode

The win32 error code for the service.

[4] int : serviceSpecificErrorCode

The service specific error code.

[5] int : checkPoint

The checkpoint reported by the service.

[6] int : waitHint

The wait hint reported by the service.


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

  • AB_NO_DIALOG
  • ABOVE_NORMAL_PRIORITY_CLASS
  • ACCESS_ALLOWED_ACE_TYPE
  • ACCESS_ALLOWED_OBJECT_ACE_TYPE
  • ACCESS_DENIED_ACE_TYPE
  • ACCESS_DENIED_OBJECT_ACE_TYPE
  • ACL_REVISION
  • ACL_REVISION_DS
  • AFX_IDW_PANE_FIRST
  • AFX_IDW_PANE_LAST
  • AFX_WS_DEFAULT_VIEW
  • APPBREAKFLAG_DEBUGGER_BLOCK
  • APPBREAKFLAG_DEBUGGER_HALT
  • APPBREAKFLAG_STEP
  • ATTACH_BY_REF_ONLY
  • ATTACH_BY_REF_RESOLVE
  • ATTACH_BY_REFERENCE
  • ATTACH_BY_VALUE
  • ATTACH_EMBEDDED_MSG
  • ATTACH_OLE
  • AuditCategoryAccountLogon
  • AuditCategoryAccountManagement
  • AuditCategoryDetailedTracking
  • AuditCategoryDirectoryServiceAccess
  • AuditCategoryLogon
  • AuditCategoryObjectAccess
  • AuditCategoryPolicyChange
  • AuditCategoryPrivilegeUse
  • AuditCategorySystem
  • BELOW_NORMAL_PRIORITY_CLASS
  • BMR_EQZ
  • BMR_NEZ
  • BOOKMARK_BEGINNING
  • BOOKMARK_CURRENT
  • BOOKMARK_END
  • BREAKPOINT_DELETED
  • BREAKPOINT_DISABLED
  • BREAKPOINT_ENABLED
  • BREAKREASON_BREAKPOINT
  • BREAKREASON_DEBUGGER_BLOCK
  • BREAKREASON_DEBUGGER_HALT
  • BREAKREASON_ERROR
  • BREAKREASON_HOST_INITIATED
  • BREAKREASON_LANGUAGE_INITIATED
  • BREAKREASON_STEP
  • BREAKRESUMEACTION_ABORT
  • BREAKRESUMEACTION_CONTINUE
  • BREAKRESUMEACTION_STEP_INTO
  • BREAKRESUMEACTION_STEP_OUT
  • BREAKRESUMEACTION_STEP_OVER
  • 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
  • CDocTemplate_Confidence_maybeAttemptForeign
  • CDocTemplate_Confidence_maybeAttemptNative
  • CDocTemplate_Confidence_noAttempt
  • CDocTemplate_Confidence_yesAlreadyOpen
  • CDocTemplate_Confidence_yesAttemptForeign
  • CDocTemplate_Confidence_yesAttemptNative
  • CDocTemplate_docName
  • CDocTemplate_fileNewName
  • CDocTemplate_filterExt
  • CDocTemplate_filterName
  • CDocTemplate_regFileTypeId
  • CDocTemplate_regFileTypeName
  • CDocTemplate_windowTitle
  • CLR_NONE
  • CLRBREAK
  • CLRDTR
  • CLRRTS
  • CLSID_DefaultDebugSessionProvider
  • CLSID_MachineDebugManager
  • CLSID_ProcessDebugManager
  • COleClientItem_activeState
  • COleClientItem_activeUIState
  • COleClientItem_emptyState
  • COleClientItem_loadedState
  • COleClientItem_openState
  • CONTAINER_INHERIT_ACE
  • CONVENIENT_DEPTH
  • 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
  • CRichEditView_WrapNone
  • CRichEditView_WrapToTargetDevice
  • CRichEditView_WrapToWindow
  • 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
  • DBGPROP_ATTRIB_ACCESS_FINAL
  • DBGPROP_ATTRIB_ACCESS_PRIVATE
  • DBGPROP_ATTRIB_ACCESS_PROTECTED
  • DBGPROP_ATTRIB_ACCESS_PUBLIC
  • DBGPROP_ATTRIB_HAS_EXTENDED_ATTRIBS
  • DBGPROP_ATTRIB_NO_ATTRIB
  • DBGPROP_ATTRIB_STORAGE_FIELD
  • DBGPROP_ATTRIB_STORAGE_GLOBAL
  • DBGPROP_ATTRIB_STORAGE_STATIC
  • DBGPROP_ATTRIB_STORAGE_VIRTUAL
  • DBGPROP_ATTRIB_TYPE_IS_CONSTANT
  • DBGPROP_ATTRIB_TYPE_IS_SYNCHRONIZED
  • DBGPROP_ATTRIB_TYPE_IS_VOLATILE
  • DBGPROP_ATTRIB_VALUE_IS_EXPANDABLE
  • DBGPROP_ATTRIB_VALUE_IS_INVALID
  • DBGPROP_ATTRIB_VALUE_READONLY
  • DBGPROP_INFO_ATTRIBUTES
  • DBGPROP_INFO_AUTOEXPAND
  • DBGPROP_INFO_DEBUGPROP
  • DBGPROP_INFO_FULLNAME
  • DBGPROP_INFO_NAME
  • DBGPROP_INFO_TYPE
  • DBGPROP_INFO_VALUE
  • debug
  • debug
  • DEBUG_ONLY_THIS_PROCESS
  • DEBUG_PROCESS
  • DEBUG_TEXT_ALLOWBREAKPOINTS
  • DEBUG_TEXT_ISEXPRESSION
  • DENY_ACCESS
  • DETACHED_PROCESS
  • DIR_BACKWARD
  • DOCUMENTNAMETYPE_APPNODE
  • DOCUMENTNAMETYPE_FILE_TAIL
  • DOCUMENTNAMETYPE_TITLE
  • DOCUMENTNAMETYPE_URL
  • 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
  • ERRORRESUMEACTION_AbortCallAndReturnErrorToCaller
  • ERRORRESUMEACTION_ReexecuteErrorStatement
  • ERRORRESUMEACTION_SkipErrorStatement
  • 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
  • EX_DBGPROP_INFO_DEBUGEXTPROP
  • EX_DBGPROP_INFO_ID
  • EX_DBGPROP_INFO_LOCKBYTES
  • EX_DBGPROP_INFO_NTYPE
  • EX_DBGPROP_INFO_NVALUE
  • FAILED_ACCESS_ACE_FLAG
  • 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
  • FL_FULLSTRING
  • FL_IGNORECASE
  • FL_IGNORENONSPACE
  • FL_LOOSE
  • FL_PREFIX
  • FL_SUBSTRING
  • FOLDER_GENERIC
  • FOLDER_SEARCH
  • FORCE_SAVE
  • FWS_ADDTOTITLE
  • FWS_PREFIXTITLE
  • FWS_SNAPTOBARS
  • GENERIC_EXECUTE
  • GENERIC_READ
  • GENERIC_WRITE
  • GRANT_ACCESS
  • 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
  • ID_APP_ABOUT
  • ID_APP_EXIT
  • ID_EDIT_CLEAR
  • ID_EDIT_CLEAR_ALL
  • ID_EDIT_COPY
  • ID_EDIT_CUT
  • ID_EDIT_FIND
  • ID_EDIT_GOTO_LINE
  • ID_EDIT_PASTE
  • ID_EDIT_REDO
  • ID_EDIT_REPEAT
  • ID_EDIT_REPLACE
  • ID_EDIT_SELECT_ALL
  • ID_EDIT_SELECT_BLOCK
  • ID_EDIT_UNDO
  • ID_FILE_CHECK
  • ID_FILE_CLOSE
  • ID_FILE_IMPORT
  • ID_FILE_LOCATE
  • ID_FILE_MRU_FILE1
  • ID_FILE_MRU_FILE2
  • ID_FILE_MRU_FILE3
  • ID_FILE_MRU_FILE4
  • ID_FILE_NEW
  • ID_FILE_OPEN
  • ID_FILE_PAGE_SETUP
  • ID_FILE_PRINT
  • ID_FILE_PRINT_PREVIEW
  • ID_FILE_PRINT_SETUP
  • ID_FILE_RUN
  • ID_FILE_SAVE
  • ID_FILE_SAVE_ALL
  • ID_FILE_SAVE_AS
  • ID_HELP_GUI_REF
  • ID_HELP_OTHER
  • ID_HELP_PYTHON
  • ID_INDICATOR_COLNUM
  • ID_INDICATOR_LINENUM
  • ID_NEXT_PANE
  • ID_PREV_PANE
  • ID_SEPARATOR
  • ID_VIEW_BROWSE
  • ID_VIEW_EOL
  • ID_VIEW_FIXED_FONT
  • ID_VIEW_FOLD_COLLAPSE
  • ID_VIEW_FOLD_COLLAPSE_ALL
  • ID_VIEW_FOLD_EXPAND
  • ID_VIEW_FOLD_EXPAND_ALL
  • ID_VIEW_FOLD_TOGGLE
  • ID_VIEW_INDENTATIONGUIDES
  • ID_VIEW_INTERACTIVE
  • ID_VIEW_OPTIONS
  • ID_VIEW_RIGHT_EDGE
  • ID_VIEW_STATUS_BAR
  • ID_VIEW_TOOLBAR
  • ID_VIEW_TOOLBAR_DBG
  • ID_VIEW_WHITESPACE
  • ID_WINDOW_ARRANGE
  • ID_WINDOW_CASCADE
  • ID_WINDOW_NEW
  • ID_WINDOW_SPLIT
  • ID_WINDOW_TILE_HORZ
  • ID_WINDOW_TILE_VERT
  • IDB_BROWSER_HIER
  • IDB_DEBUGGER_HIER
  • IDB_HIERFOLDERS
  • IDC_ABOUT_VERSION
  • IDC_AUTO_RELOAD
  • IDC_AUTOCOMPLETE
  • IDC_BUTTON1
  • IDC_BUTTON2
  • IDC_BUTTON3
  • IDC_BUTTON4
  • IDC_CALLTIPS
  • IDC_CHECK1
  • IDC_CHECK2
  • IDC_CHECK3
  • IDC_COMBO1
  • IDC_COMBO2
  • IDC_EDIT1
  • IDC_EDIT2
  • IDC_EDIT3
  • IDC_EDIT4
  • IDC_EDIT_COLOE
  • IDC_EDIT_TABS
  • IDC_INDENT_SIZE
  • IDC_KEYBOARD_CONFIG
  • IDC_LIST1
  • IDC_PROMPT1
  • IDC_PROMPT2
  • IDC_PROMPT3
  • IDC_PROMPT4
  • IDC_PROMPT_TABS
  • IDC_RADIO1
  • IDC_RADIO2
  • IDC_RIGHTEDGE_COLUMN
  • IDC_RIGHTEDGE_DEFINE
  • IDC_RIGHTEDGE_ENABLE
  • IDC_RIGHTEDGE_SAMPLE
  • IDC_SPIN1
  • IDC_SPIN2
  • IDC_TAB_SIZE
  • IDC_USE_SMART_TABS
  • IDC_USE_TABS
  • IDC_VIEW_WHITESPACE
  • IDC_VSS_INTEGRATE
  • IDD_ABOUTBOX
  • IDD_DUMMYPROPPAGE
  • IDD_GENERAL_STATUS
  • IDD_LARGE_EDIT
  • IDD_PP_DEBUGGER
  • IDD_PP_EDITOR
  • IDD_PP_FORMAT
  • IDD_PP_IDE
  • IDD_PP_TABS
  • IDD_PP_TOOLMENU
  • IDD_PROPDEMO1
  • IDD_PROPDEMO2
  • IDD_RUN_SCRIPT
  • IDD_SET_TABSTOPS
  • IDD_SIMPLE_INPUT
  • IDD_TREE
  • IDD_TREE_MB
  • IDLE_PRIORITY_CLASS
  • IDR_CNTR_INPLACE
  • IDR_DEBUGGER
  • IDR_MAINFRAME
  • IDR_PYTHONCONTYPE
  • IDR_PYTHONTYPE
  • IDR_PYTHONTYPE_CNTR_IP
  • IDR_TEXTTYPE
  • 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
  • INHERIT_ONLY_ACE
  • INHERITED_ACE
  • INVALID_HANDLE_VALUE
  • KEEP_OPEN_READONLY
  • KEEP_OPEN_READWRITE
  • LM_COMMIT
  • LM_HORZ
  • LM_HORZDOCK
  • LM_LENGTHY
  • LM_MRUWIDTH
  • LM_STRETCH
  • LM_VERTDOCK
  • 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
  • MAPI_ALLOW_OTHERS
  • MAPI_ASSOCIATED
  • MAPI_BCC
  • MAPI_BEST_ACCESS
  • MAPI_CC
  • MAPI_CREATE
  • MAPI_DEFAULT_SERVICES
  • MAPI_DEFERRED_ERRORS
  • MAPI_DIALOG
  • MAPI_E_ACCOUNT_DISABLED
  • MAPI_E_AMBIGUOUS_RECIP
  • MAPI_E_BAD_CHARWIDTH
  • MAPI_E_BAD_COLUMN
  • MAPI_E_BAD_VALUE
  • MAPI_E_BUSY
  • MAPI_E_CALL_FAILED
  • MAPI_E_CANCEL
  • MAPI_E_COLLISION
  • MAPI_E_COMPUTED
  • MAPI_E_CORRUPT_DATA
  • MAPI_E_CORRUPT_STORE
  • MAPI_E_DECLINE_COPY
  • MAPI_E_DISK_ERROR
  • MAPI_E_END_OF_SESSION
  • MAPI_E_EXTENDED_ERROR
  • MAPI_E_FAILONEPROVIDER
  • MAPI_E_FOLDER_CYCLE
  • MAPI_E_HAS_FOLDERS
  • MAPI_E_HAS_MESSAGES
  • MAPI_E_INTERFACE_NOT_SUPPORTED
  • MAPI_E_INVALID_ACCESS_TIME
  • MAPI_E_INVALID_BOOKMARK
  • MAPI_E_INVALID_ENTRYID
  • MAPI_E_INVALID_OBJECT
  • MAPI_E_INVALID_PARAMETER
  • MAPI_E_INVALID_TYPE
  • MAPI_E_INVALID_WORKSTATION_ACCOUNT
  • MAPI_E_LOGON_FAILED
  • MAPI_E_MISSING_REQUIRED_COLUMN
  • MAPI_E_NETWORK_ERROR
  • MAPI_E_NO_ACCESS
  • MAPI_E_NO_RECIPIENTS
  • MAPI_E_NO_SUPPORT
  • MAPI_E_NO_SUPPRESS
  • MAPI_E_NON_STANDARD
  • MAPI_E_NOT_ENOUGH_DISK
  • MAPI_E_NOT_ENOUGH_MEMORY
  • MAPI_E_NOT_ENOUGH_RESOURCES
  • MAPI_E_NOT_FOUND
  • MAPI_E_NOT_IN_QUEUE
  • MAPI_E_NOT_INITIALIZED
  • MAPI_E_NOT_ME
  • MAPI_E_OBJECT_CHANGED
  • MAPI_E_OBJECT_DELETED
  • MAPI_E_PASSWORD_CHANGE_REQUIRED
  • MAPI_E_PASSWORD_EXPIRED
  • MAPI_E_SESSION_LIMIT
  • MAPI_E_STRING_TOO_LONG
  • MAPI_E_SUBMITTED
  • MAPI_E_TABLE_EMPTY
  • MAPI_E_TABLE_TOO_BIG
  • MAPI_E_TIMEOUT
  • MAPI_E_TOO_BIG
  • MAPI_E_TOO_COMPLEX
  • MAPI_E_TYPE_NO_SUPPORT
  • MAPI_E_UNABLE_TO_ABORT
  • MAPI_E_UNABLE_TO_COMPLETE
  • MAPI_E_UNCONFIGURED
  • MAPI_E_UNEXPECTED_ID
  • MAPI_E_UNEXPECTED_TYPE
  • MAPI_E_UNKNOWN_CPID
  • MAPI_E_UNKNOWN_ENTRYID
  • MAPI_E_UNKNOWN_FLAGS
  • MAPI_E_UNKNOWN_LCID
  • MAPI_E_USER_CANCEL
  • MAPI_E_VERSION
  • MAPI_E_WAIT
  • MAPI_EXPLICIT_PROFILE
  • MAPI_EXTENDED
  • MAPI_FORCE_DOWNLOAD
  • MAPI_INIT_VERSION
  • MAPI_LOGON_UI
  • MAPI_MODIFY
  • MAPI_MULTITHREAD_NOTIFICATIONS
  • MAPI_NEW_SESSION
  • MAPI_NO_IDS
  • MAPI_NO_MAIL
  • MAPI_NO_STRINGS
  • MAPI_NT_SERVICE
  • MAPI_P1
  • MAPI_PASSWORD_UI
  • MAPI_SERVICE_UI_ALWAYS
  • MAPI_SUBMITTED
  • MAPI_TIMEOUT_SHORT
  • MAPI_TO
  • MAPI_UNICODE
  • MAPI_USE_DEFAULT
  • MAPI_W_APPROX_COUNT
  • MAPI_W_CANCEL_MESSAGE
  • MAPI_W_ERRORS_RETURNED
  • MAPI_W_NO_SERVICE
  • MAPI_W_PARTIAL_COMPLETION
  • MAPI_W_POSITION_CHANGED
  • MARKPARITY
  • MAXIMUM_PROCESSORS
  • MAXIMUM_WAIT_OBJECTS
  • MDB_NO_DIALOG
  • MDB_NO_MAIL
  • MDB_TEMPORARY
  • MDB_WRITE
  • MFS_4THICKFRAME
  • MFS_BLOCKSYSMENU
  • MFS_MOVEFRAME
  • MFS_SYNCACTIVE
  • MFS_THICKFRAME
  • MODRECIP_ADD
  • MODRECIP_MODIFY
  • MODRECIP_REMOVE
  • 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
  • NO_ATTACHMENT
  • NO_INHERITANCE
  • NO_PROPAGATE_INHERIT_ACE
  • NOPARITY
  • NORMAL_PRIORITY_CLASS
  • NOT_USED_ACCESS
  • OBJECT_INHERIT_ACE
  • ODDPARITY
  • OLE_CHANGED
  • OLE_CHANGED_ASPECT
  • OLE_CHANGED_STATE
  • OLE_CLOSED
  • OLE_RENAMED
  • OLE_SAVED
  • OLECLOSE_NOSAVE
  • OLECLOSE_PROMPTSAVE
  • OLECLOSE_SAVEIFDIRTY
  • ONE5STOPBITS
  • ONESTOPBIT
  • OPEN_ALWAYS
  • OPEN_EXISTING
  • OPEN_IF_EXISTS
  • OWNER_SECURITY_INFORMATION
  • PD_ALLPAGES
  • PD_COLLATE
  • PD_DISABLEPRINTTOFILE
  • PD_ENABLEPRINTHOOK
  • PD_ENABLEPRINTTEMPLATE
  • PD_ENABLEPRINTTEMPLATEHANDLE
  • PD_ENABLESETUPHOOK
  • PD_ENABLESETUPTEMPLATE
  • PD_ENABLESETUPTEMPLATEHANDLE
  • PD_HIDEPRINTTOFILE
  • PD_NONETWORKBUTTON
  • PD_NOPAGENUMS
  • PD_NOSELECTION
  • PD_NOWARNING
  • PD_PAGENUMS
  • PD_PRINTSETUP
  • PD_PRINTTOFILE
  • PD_RETURNDC
  • PD_RETURNDEFAULT
  • PD_RETURNIC
  • PD_SELECTION
  • PD_SHOWHELP
  • PD_USEDEVMODECOPIES
  • PD_USEDEVMODECOPIESANDCOLLATE
  • 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
  • POLICY_ALL_ACCESS
  • POLICY_AUDIT_EVENT_FAILURE
  • POLICY_AUDIT_EVENT_NONE
  • POLICY_AUDIT_EVENT_SUCCESS
  • POLICY_AUDIT_EVENT_UNCHANGED
  • POLICY_AUDIT_LOG_ADMIN
  • POLICY_CREATE_ACCOUNT
  • POLICY_CREATE_PRIVILEGE
  • POLICY_CREATE_SECRET
  • POLICY_EXECUTE
  • POLICY_GET_PRIVATE_INFORMATION
  • POLICY_LOOKUP_NAMES
  • POLICY_NOTIFICATION
  • POLICY_READ
  • POLICY_SERVER_ADMIN
  • POLICY_SET_AUDIT_REQUIREMENTS
  • POLICY_SET_DEFAULT_QUOTA_LIMITS
  • POLICY_TRUST_ADMIN
  • POLICY_VIEW_AUDIT_INFORMATION
  • POLICY_VIEW_LOCAL_INFORMATION
  • POLICY_WRITE
  • PolicyAccountDomainInformation
  • PolicyAuditEventsInformation
  • PolicyAuditFullQueryInformation
  • PolicyAuditFullSetInformation
  • PolicyAuditLogInformation
  • PolicyDefaultQuotaInformation
  • PolicyDnsDomainInformation
  • PolicyLsaServerRoleInformation
  • PolicyModificationInformation
  • PolicyNotifyAccountDomainInformation
  • PolicyNotifyAuditEventsInformation
  • PolicyNotifyDnsDomainInformation
  • PolicyNotifyDomainEfsInformation
  • PolicyNotifyDomainKerberosTicketInformation
  • PolicyNotifyMachineAccountPasswordInformation
  • PolicyNotifyServerRoleInformation
  • PolicyPdAccountInformation
  • PolicyPrimaryDomainInformation
  • PolicyReplicaSourceInformation
  • PolicyServerDisabled
  • PolicyServerDisabled
  • PolicyServerEnabled
  • PolicyServerEnabled
  • PolicyServerRoleBackup
  • PolicyServerRolePrimary
  • PROTECTED_DACL_SECURITY_INFORMATION
  • PROTECTED_SACL_SECURITY_INFORMATION
  • PSWIZB_BACK
  • PSWIZB_DISABLEDFINISH
  • PSWIZB_FINISH
  • PSWIZB_NEXT
  • 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
  • RELOP_EQ
  • RELOP_GE
  • RELOP_GT
  • RELOP_LE
  • RELOP_LT
  • RELOP_NE
  • RELOP_RE
  • RES_AND
  • RES_BITMASK
  • RES_COMMENT
  • RES_COMPAREPROPS
  • RES_CONTENT
  • RES_EXIST
  • RES_NOT
  • RES_OR
  • RES_PROPERTY
  • RES_SIZE
  • RES_SUBRESTRICTION
  • REVOKE_ACCESS
  • RTF_SYNC_BODY_CHANGED
  • RTF_SYNC_RTF_CHANGED
  • 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
  • SDDL_REVISION_1
  • SE_DACL_AUTO_INHERITED
  • SE_DACL_DEFAULTED
  • SE_DACL_PRESENT
  • SE_DACL_PROTECTED
  • SE_DS_OBJECT
  • SE_DS_OBJECT
  • SE_DS_OBJECT_ALL
  • SE_DS_OBJECT_ALL
  • SE_FILE_OBJECT
  • SE_GROUP_DEFAULTED
  • SE_GROUP_ENABLED
  • SE_GROUP_ENABLED_BY_DEFAULT
  • SE_GROUP_LOGON_ID
  • SE_GROUP_MANDATORY
  • SE_GROUP_OWNER
  • SE_GROUP_RESOURCE
  • SE_GROUP_USE_FOR_DENY_ONLY
  • SE_KERNEL_OBJECT
  • SE_LMSHARE
  • SE_OWNER_DEFAULTED
  • SE_PRINTER
  • SE_PRIVILEGE_ENABLED
  • SE_PRIVILEGE_ENABLED_BY_DEFAULT
  • SE_PRIVILEGE_USED_FOR_ACCESS
  • SE_PROVIDER_DEFINED_OBJECT
  • SE_PROVIDER_DEFINED_OBJECT
  • SE_REGISTRY_KEY
  • SE_REGISTRY_WOW64_32KEY
  • SE_SACL_AUTO_INHERITED
  • SE_SACL_DEFAULTED
  • SE_SACL_PRESENT
  • SE_SACL_PROTECTED
  • SE_SELF_RELATIVE
  • SE_SERVICE
  • SE_UNKNOWN_OBJECT_TYPE
  • SE_WINDOW_OBJECT
  • SE_WMIGUID_OBJECT
  • SECURITY_ANONYMOUS
  • SECURITY_CONTEXT_TRACKING
  • SECURITY_CREATOR_SID_AUTHORITY
  • SECURITY_DELEGATION
  • SECURITY_EFFECTIVE_ONLY
  • SECURITY_IDENTIFICATION
  • SECURITY_IMPERSONATION
  • SECURITY_LOCAL_SID_AUTHORITY
  • SECURITY_NON_UNIQUE_AUTHORITY
  • SECURITY_NT_AUTHORITY
  • SECURITY_NULL_SID_AUTHORITY
  • SECURITY_RESOURCE_MANAGER_AUTHORITY
  • SECURITY_WORLD_SID_AUTHORITY
  • SecurityAnonymous
  • SecurityDelegation
  • SecurityIdentification
  • SecurityImpersonation
  • 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_UI_ALLOWED
  • SERVICE_UI_ALWAYS
  • SERVICE_USER_DEFINED_CONTROL
  • SERVICE_WIN32
  • SERVICE_WIN32_OWN_PROCESS
  • SERVICE_WIN32_SHARE_PROCESS
  • SET_ACCESS
  • SET_AUDIT_FAILURE
  • SET_AUDIT_SUCCESS
  • SETBREAK
  • SETDTR
  • SETRTS
  • SETXOFF
  • SETXON
  • SidTypeAlias
  • SidTypeComputer
  • SidTypeDeletedAccount
  • SidTypeDomain
  • SidTypeGroup
  • SidTypeInvalid
  • SidTypeUnknown
  • SidTypeUser
  • SidTypeWellKnownGroup
  • SO_CONNECT_TIME
  • SO_UPDATE_ACCEPT_CONTEXT
  • SOURCETEXT_ATTR_COMMENT
  • SOURCETEXT_ATTR_FUNCTION_START
  • SOURCETEXT_ATTR_KEYWORD
  • SOURCETEXT_ATTR_NONSOURCE
  • SOURCETEXT_ATTR_NUMBER
  • SOURCETEXT_ATTR_OPERATOR
  • SOURCETEXT_ATTR_STRING
  • SPACEPARITY
  • STARTF_FORCEOFFFEEDBACK
  • STARTF_FORCEONFEEDBACK
  • STARTF_RUNFULLSCREEN
  • STARTF_USECOUNTCHARS
  • STARTF_USEFILLATTRIBUTE
  • STARTF_USEPOSITION
  • STARTF_USESHOWWINDOW
  • STARTF_USESIZE
  • STARTF_USESTDHANDLES
  • STATUS_DEFAULT_STORE
  • STYPE_DEVICE
  • STYPE_DISKTREE
  • STYPE_IPC
  • STYPE_PRINTQ
  • STYPE_SPECIAL
  • STYPE_TEMPORARY
  • SUB_CONTAINERS_AND_OBJECTS_INHERIT
  • SUB_CONTAINERS_ONLY_INHERIT
  • SUB_OBJECTS_ONLY_INHERIT
  • SUCCESSFUL_ACCESS_ACE_FLAG
  • SYNCHRONIZE
  • SYSTEM_AUDIT_ACE_TYPE
  • SYSTEM_AUDIT_OBJECT_ACE_TYPE
  • TABLE_SORT_ASCEND
  • TABLE_SORT_COMBINE
  • TABLE_SORT_DESCEND
  • TBL_ASYNC
  • TBL_BATCH
  • TEXT_DOC_ATTR_READONLY
  • 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
  • TokenDefaultDacl
  • TokenGroups
  • TokenGroupsAndPrivileges
  • TokenImpersonation
  • TokenImpersonationLevel
  • TokenOwner
  • TokenPrimary
  • TokenPrimaryGroup
  • TokenPrivileges
  • TokenRestrictedSids
  • TokenSandBoxInert
  • TokenSessionId
  • TokenSource
  • TokenStatistics
  • TokenType
  • TokenUser
  • TPM_BOTTOMALIGN
  • TPM_CENTERALIGN
  • TPM_LEFTALIGN
  • TPM_LEFTBUTTON
  • TPM_NONOTIFY
  • TPM_RETURNCMD
  • TPM_RIGHTALIGN
  • TPM_RIGHTBUTTON
  • TPM_TOPALIGN
  • TPM_VCENTERALIGN
  • TRUNCATE_EXISTING
  • TrustedControllersInformation
  • TrustedDomainAuthInformation
  • TrustedDomainAuthInformationInternal
  • TrustedDomainFullInformation
  • TrustedDomainFullInformation2Internal
  • TrustedDomainFullInformationInternal
  • TrustedDomainInformationBasic
  • TrustedDomainInformationEx
  • TrustedDomainInformationEx2Internal
  • TrustedDomainNameInformation
  • TrustedPasswordInformation
  • TrustedPosixOffsetInformation
  • TRUSTEE_BAD_FORM
  • TRUSTEE_IS_ALIAS
  • TRUSTEE_IS_COMPUTER
  • TRUSTEE_IS_DELETED
  • TRUSTEE_IS_DOMAIN
  • TRUSTEE_IS_GROUP
  • TRUSTEE_IS_INVALID
  • TRUSTEE_IS_NAME
  • TRUSTEE_IS_OBJECTS_AND_NAME
  • TRUSTEE_IS_OBJECTS_AND_SID
  • TRUSTEE_IS_SID
  • TRUSTEE_IS_UNKNOWN
  • TRUSTEE_IS_USER
  • TRUSTEE_IS_WELL_KNOWN_GROUP
  • TWOSTOPBITS
  • UNPROTECTED_DACL_SECURITY_INFORMATION
  • UNPROTECTED_SACL_SECURITY_INFORMATION
  • 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


Python COM

  • Overviews
  • Modules
  • Objects


Overviews

  • ADSI Python
  • Active Directory
  • Quick-Starts to Python and COM
  • win32com readme
  • ASP and Python
  • MTS and Python for NT
  • Python, C++, and COM


ASP and Python

How Python integrates w/ASP

Active Server Pages has been a useful addition to Microsoft's Web strategy. Because of the language neutral nature of COM, any language that is capable of "Active X" (meaning COM) scripting can integrate with it. Python, with it's excellent COM support, is one of those languages. When you install it, by default, it is not setup for the ASP enviroment with IIS. If you look at the html documentation in: C:\\Program Files\\Python\\win32com\\HTML\\index.html at the bottom of the page you'll see 'Active X Scripting Demos'. If you then click on that it will describe how to register the engire. Essentially, there is a program called pyscript.py in: C:\\Program Files\\Python\\win32comext\\axscript\\client and if you run that it should register python for the ASP environment.

Microsoft typically positions vbscript in the IIS role. Vbscript is adequate for many tasks, but is a very simplified language. Python is a very rich and powerful language offering things like true exception handleing, OOP style programming, excellent win32 access, easy persistence w/pickle, etc. And, being multi-platform, you can leverage the language in other web environments. You will also find many ASP code examples in Vbscript are easily converted into python. There is a slight difference with setting values with Application and Session Objects. In cases where you'd see: Session('Key')= TheValue, you'd translate to Session.SetValue('Key', TheValue) for python. This is because vbscript makes it look like you are assigning something to a function call which python does not support.

Another thing ASP allows you to do is to mix code and HTML. Thus, you need some way to tell the server that the following is code. Since python is not used by default, you need to set your page to use it. You can do that by having the first line say: <%@ LANGUAGE =Python%>. Then after that point, anything between '<%' and '%>' delimeters will run as python code. Everything else will be treated as HTML. It is important to note that a python loop ends in the python block -- they don't extend past intervening html to the next block. For me that normally isn't an issue, since I do not like mixing code and html. Prefering a clean split of code and html, I generally generate webpages using templates all in python w/HTMLgen. Take a look at: http://www.python.org/topics/web/HTML.html for available resources w/HTML. An very basic page would look like:

Example

Basic Python ASP page:

<%@ LANGUAGE = Python%>

<HTML>

<head></head>

<body>

<h1>Querying database</h1>

<%

#do some python stuff here

#import libraries, etc.

for i in query_database():

    Response.Write('output of results converted to a string')

%>

</body>

</html>
If you use HTMLgen's template, then it could look like:

<%@ LANGUAGE = Python%>

<%

#notice no raw HTML at all.  We instead use a template html file

#generated however you want (perhaps frontpage) that substitutes

#anything delimeted by {} for output from our python.  In this case

#text {mid} in the template is substituted for results.

import HTMLgen

import HTMLcolors

results='<h1>Querying database</h1>'

for i in query_database():

    results=results+str(i)

######################

#Here we are using a template dictionary

#to substitute the text {mid} found in the template file

#for results

T=HTMLgen.TemplateDocument(/path/template_file.html)

T.substitutions['mid']=results  # here is where our results went!!

webpage=str(T)

Response.Write(webpage)

%>
For one page this is overkill. However, for developing many pages, something like this allows you to ignore the grunt work of making pages and helps to keep them consistent. HTMLgen also gives you other useful tools worth looking into.

The ASP model has several 'collection' objects: Request, Response, Session, Application, and ObjectContext. The Request collection has things like data returned from web forms(GET or POST) and environment variables. The Response object is the opposite of the Request object it deals with sending data back to the client, since you cannot do a simple 'print'. Next, the Application collection allows programs to globally store/share information for your site. The Session object allows one to store per-user state. And, finally the Objectcontext object is for use with MTS. We'll focus on the basics, Request and Response.

Typically, you can treat these objects like simple versions of a python dictionary or list. A good way to get an idea of what they have is to print out their entire contents. Here is a simple function that converts your server (environment) variables into a python dictionary:

def getenv ():

    d_env={} #initialize dictionary

    for key in Request.ServerVariables:

        d_env[key]=str(Request.ServerVariables(key))

    return d_env
Request.ServerVariables responds to the python operator 'in' by returning a list. And, it can also take a key and return it's value. You notice the value is converted into a string, so it can be treated like a python string.

For a more complicated example, here is a python function that converts the Request.Form or Request.Querystring objects into a python dictionary. This would be a function you'd use to get back data from a form. It returns either the entire Request Collection as a python dictionary, a subset if you provide a list of keys, or a single value, if you provide a single key.

Get Request collection - 3 different ways to get Request data

def getdata (keys=''):

    '''

] possible ways to call this function:

    value=getdata('key')

    dict=getdata(('key1','key2')) #get subset

    dict=getdata() #return everything

    It assumes you don't have the same key for

    GET and POST methods

    '''

    import types

    key_type=type(keys)

    d_data={} #initialize dictionary

    if keys=='': #if they don't supply keys then return everything

        for key in Request.Form:

            d_data[key]=Request.Form(key)

        for key in Request.QueryString:

            d_data[key]=Request.QueryString(key)

        return d_data

    elif key_type == types.StringType: #if they provide a single string

        value=Request.Form(keys)

        if (value != 'None') and (str(value) == 'None'):

            return Request.QueryString(keys)

        else:

            return value

    #if they provide a list then return a dictionary with all the key/values

    elif key_type == types.TupleType or key_type == types.ListType:

        for key in keys:

            value=Request.Form(key)

            #now check if the data was empty, if so look at QueryString

            if (value != 'None') and (str(value) == 'None'):

                value=Request.QueryString(key)

            data[key]=value

        return d_data
To print out this data you will need to use the Response object which accepts python strings. A simple: Response.Write(str(d_data)) would suffice. A better looking way would be to do something like:

for pair in d_data.items():

    Response.Write(pair[0]+':'+pair[1]+'<br>')
Notice the adding of <br> to have a line break for each pair. If you want it more fancy you can convert it to table output.

HTMLgen can help with it's Table object:

Table=HTMLgen.Table('Key/Value pairs for Response object') #title

Table.heading=('Key','Value')

for pair in d_data.items() #get each key/val pair

  Table.body.append(list(pair))  #takes a list of lists

                 #[ [key1,val1], [key2,val2]]

                 #one pair for every table row

Response.Write(str(Table))
HTMLgen deserves an entire article to itself. You can use it to write web forms and manage other HTML elements. As a final example, here is a simple ASP application that uses the functions written above and a simple HTMLgen web form to spit data back. The typical idiom w/HTMLgen is to create a web object like a form and append things to it. In the code below, I append a textbox, radio buttons, and a checkbox.

<%@ LANGUAGE = Python%>

<%

from HTMLgen import *

from HTMLcolors import *

#import the file which has getenv and getdata from above

d_env=getenv() #get environment variables

#create a simple default document

webpage = SimpleDocument(title = 'Bedrock Housing')

#create form and append elements to it

F=Form(d_env['URL'])

F.append(Heading(1,'Rock Housing'))

F.append('What Street:',BR())

F.append( Input(type='text',name='street',size=30),BR())

F.append('Select your house type:',BR())

types=('limestone','granite','marble')

for i in types:

    F.append(Input(type='radio',name='house_type',rlabel=i,value=i),BR())

F.append('Select special features:',BR())

features=('stone roof','dishwasher','door bell')

for i in features:

    F.append(Input(type='checkbox',name='features',rlabel=i,value=i),BR())

#done with web form, now append it

webpage.append(F)

#get the data the user entered and return it

results=getdata() #get everything

webpage.append(str(results))

Response.Write(str(webpage))
Have a great time with programming with python!

John Nielsen   nielsenjf@my-deja.com


MTS and Python for NT

How to use python w/MTS on NT.

MTS represents microsoft's attempt to simplify computing for a distributed system. Where COM is all about identity, MTS manages state. It introduces new ideas and you'll find corresponding terminology like: object and state context, activity, causality. It also represents a push towards declarative programming -- where you declare how a class can exist and the operating system provides the services to handle that (instead of you having to deal with it). Windows 2000 offers a further set of refinements, though what's documented here will hopefully be backward compatible.

In this example, we'll specifically deal with a simple case that can show the transaction monitor in use. We have an active server page (using python of course) making calls to a python MTS component. The component then makes simple use of ObjectContext interfaces and decides whether or not the transaction is a success or failure.

To insert a python COM object into MTS, you want to register your COM object,setup an MTS package, and then add the python component to the package as a component that is already registered. After it is added, do not then register the component using python, as it will overwrite the changes MTS did. To create a package, open up the Transaction Server Explorer from the Option Pack, go to My Computer -> Packages Installed, right click and select new and create an empty package. From there you can call the package whatever you want and let it run as whomever. Then open up the package you created, right click on Components, select New Component, and finally select Import components that are already registered, from which you highlight your python component it provides in the list. You can also right click on Roles in your package to create a role you can put users or groups in. The last thing you need to do is right-click on your component in the package, select properties, and finally transaction. Then select the radio button next to: 'Requires a transaction'.

As stated before, this example is interested in ObjectContext. The ObjectContext interface is like a friend doing things on your behalf. You declare what you want, and it helps you with that, always acting as a buffer between you and the outside world. Many methods are available from this interface: CreateInstance, SetComplete, SetAbort, EnableCommit, DisableCommit, IsInTransaction, IsCallerInRole, etc.

In this example we will deal with: SetComplete and SetAbort, and IsCallerInRole. Invoking SetComplete will tell MTS that the object is done and it can go ahead and commit. In contrast, SetAbort means the object is done but for whatever the transaction must roll back. IsCallerInRole determines whether or not the client calling the object is in the role you created that has lists of users or groups.

Example

In python you setup the ObjectContext object in the following manner:

mtsobj = win32com.client.Dispatch("MTXAS.AppServer.1")

mts=mtsobj.GetObjectContext()
and can then make calls like:

if mts.IsCallerInRole('bedrock'):

    do_this()

<nl>Below is the active server page and python object that you can

watch at work using "Transaction Statistics" in the Transaction Server

Explorer. Anything but wilma and betty will cause the aborted list to

increment. If wila or betty are supplied from the ASP, you notice

Committed increasing.
Here is an extremely simple python active server page that calls the mts object:

<SCRIPT Language="Python" RunAt="Server">

import win32com

find_pebbles = win32com.client.dynamic.Dispatch("mts1")

a=find_pebbles('wilma')

Response.Write(a)

</SCRIPT>
Here is the mts COM object:

from win32com.server.exception import COMException

import win32com.server.util

import win32com.client.dynamic

#to generate guids use:

#import pythoncom

#print pythoncom.CreateGuid()

class Mts:

    # COM attributes.

    _reg_clsid_ = '{3D094770-B73E-11D3-99FC-00902776D585}'

               #guid for your class in registry

    _reg_desc_ = "test mts functions"

    _reg_progid_ = "mts1" #The progid for this class

    _reg_class_spec_ = "mts_test.Mts"

               #tells Python how to create the object: filename.class

    _public_methods_ = ['getkid' ]  #names of callable methods

    def __init__(self):

        pass

    def getkid(self, person):

        mtsobj = win32com.client.Dispatch("MTXAS.AppServer.1")

        mts=mtsobj.GetObjectContext()

        if mts is None:

            #com obj -- no mts

            result='error: mts not available'

        else:

            #mts is available

            #first check if they are in the right role

            if mts.IsCallerInRole('bedrock'):

                moms={'wilma':'bambam','betty':'pebbles'}

                person=str(person) #convert from unicode to string

                if moms.has_key(person):

                    mts.SetComplete()

                    result=moms[person]

                else:

                    result='not in bedrock'

                    mts.SetAbort()

            else:

                result='sorry can't let you know'

        return result

if __name__=='__main__':

    import win32com.server.register

    win32com.server.register.UseCommandLine(Mts)
Have a great time with programming with python!

John Nielsen   nielsenjf@my-deja.com


Python, C++, and COM

Python a helpful cousin to C++ COM development

Ever want to write your pseudo-code for C++ win32 or COM programming and be able to have it run? In many cases python offers just that.Python offers easy, fast development, yet is still close enough to C++ to be recognizable. For example, compare python's class mechanism and exception handeling. With the perspective of being a light overview, we'll look at some details of development of a raw C++ COM component and compare that to python development. What is interesting to focus on, is not how their different, but how they are similar, which is useful to leverage. For example, here's what abstract base classes (an idea used for COM interfaces) look like in python and C++.

Example

Abstract Base classes:

class IFlintstone

{

public:

  virtual TellWilma(long when)=0;

};

class IRubble

{

public:

  virtual AskBetty(long when)=0;

};

#Abtract Base classes for python

#not as formal as C++'s

class IFlintstone:

  def TellWilma(self,when=0):

    raise RuntimeError, 'virtual function'

class IRubble:

  def AskBetty(self,when=0):

    raise RuntimeError, 'virtual function'
Also, in the Win32 world, python and C++ are very similar. You'll notice that if you look at some of the other win32 examples in overviews. Python is capable of some sophisticated win32 programming allowing you to get the problem worked out before you have to write out the C++. For COM, like C++, python is multi-threaded and can live in any apartment. You even have at your disposal PyIUnknown.QueryInterface, pythoncom.CoInitializeEx, etc. much like in C++.. But don't have to worry about casting, reference counts, and such. Python has a translucent rather than black-box approach to COM.

Thus, in COM programming, you can quickly prototype a program, and then if necessary, work on a C++ solution. As already mentioned, a typical means in C++ to develop COM objects is with multiple inheritance. You create class that inherits whatever interfaces (abstract base classes), you want to expose. The only disadvantage to this is that it means that the interfaces can't have the same function names. These interfaces need to be defined using IDL to allow for proxies, resove any ambiguities C++ may have, and generate type libraries. A very simple IDL interface wouuld look like:

IDL interface:

import "unknwn.idl"

[object, uuid(11111111-2222-3333-4444-555555555555)]

interface IFlintstone : IUnknown

{

  HRESULT TellWilma([in] int when);

}

interface IRubble : IUnknown

{

  HRESULT AskBetty([in] int when);

}
After running it through the MIDL compiler, you include the header file created by MIDL and then inherit this just as with the class examples above. Then you define every method for each interface which includes IUnknown, as well as IFlintstone and IRubble. At this point, I'm ommitting some details like the metaclass which implements IClassFactory that creates Bedrock and errorhandeling , but from this class you can see the basic functions you'll have to write.

C++ definition:

#include "file_from_midl.h"

class BedRock : public IFlintstone, public IRubble {

    LONG m_references;

public:

   BedRock() : m_references(0){ } // constructor

   ~BedRock(void) { } //destructor

   // IUnknown Methods not shown in their entirety

   STDMETHODIMP QueryInterface(REFIID riid, void **ppv)

   STDMETHODIMP_(ULONG) AddRef(void)

   STDMETHODIMP_(ULONG) Release(void)

   // IBedRock Methods

   STDMETHODIMP TellWilma(long when)

   {

      write_to_cartoon(when,"Wilma!");

      return S_OK;

   }

   STDMETHODIMP AskBetty(long when)

   {

      write_to_cartoon(when,"Hey uh Betty!");

      return S_OK;

   }

};
How does python manage this? First of all, You do not bother to write IUnknown and IClassFactory (python, being a dynamic language, uses IDispatch to expose the methods you're interested in). Which also means there is no MIDL step you have to go through, if you change what interfaces are going to be used. Python's approach is for you to add attributes to your python class, defining the necessary COM specifics. For example, instead of defining the GUIDs in MIDL, you simply use the _reg_clsid_ attribute to define the class's GUID.

For the other methods, the basic idea is to create a python class and write class attributes that will expose what methods you want for COM. For interfaces which have native support you can include the list of interfaces in a _com_interfaces_ attribute for your class. And, for all interfaces, you simply add the interface's method calls to the list of in the _public_methods_ class attribute. In this case, neither IFlintstone nor IRubble have native support, so we don't bother with _com_interfaces_.

You'll notice the python COM class object is reasonably simple, but similar in spirit to the above.

Basic python COM code

##Abtract Base classes for python

class IFlintstone:

  def TellWilma(self,when=0):

    raise RuntimeError, 'virtual function'

class IRubble:

  def AskBetty(self,when=0):

    raise RuntimeError, 'virtual function'

class BedRock(IFlintstone, IRubble): #no need to use MIDL for these

    _public_methods_ = ['TellWilma', 'AskBetty']

    _reg_progid_ = "Python.Bedrock"

    _reg_clsid_ = "{12345678-1234-5678-1234-567812345678}"

    def __init__(self): #constructur

    pass #not doing anthing w/it

         #no need to keep track of reference counts

    def __del__(self): #destructor

    pass #not much going on here either

    def TellWilma(self,when=0):

    write_to_cartoon(when,"Wilma!")

    def AskBetty(self,when=0):

    write_to_cartoon(when,"Hey uh Betty")

if __name__=='__main__':

    UseCommandLine(BedRock)
Have a great time with programming with python!

John Nielsen   nielsenjf@my-deja.com


ADSI, Exchange, and Python

  • SUMMARY
    • Introduction
    • User Account Management
      • Adding a user
      • Getting/Modifying user info
      • Deleting a User
    • Distribution List
      • Adding to a list
      • Recursively listing all unique members
    • In Conclusion
  • Further Info
  • Author

SUMMARY

Python's adsi access works really well with Exchange (late or early binding since you can read microsoft's type library). To get started, you will need to download adsi from microsoft: Microsoft ADSI. Microsoft has documentation for using languages other than python in the sdk.

Introduction

Before doing anything else you need to go through the next two steps:
Acquiring ADSI object
Task | Description
Create Global Providers Object | adsi = win32com.client.Dispatch('ADsNameSpaces')
Create LDAP Provider Object | ldap = adsi.getobject("","LDAP:")

Now you have to decide how you want to access the exchange server.
I have chosen to authenticate, in which case you need to use OpenDSObject()
Method of access
Task | Description
Specify Login and Domain | logon_ex='cn=wilma, dc=bedrock'
Specify password | password='dino'
Login to Server | myDSObject = ldap.OpenDSObject(ex_path,logon_ex,password,0)

Note -- the fourth argument to opendsobject has various options for how to authenticate. For example, if you use 1 instead of zero, it should either use NTLM or Kerberos for authentication. For more information, check out: OpenDSObject

The ex_path in the above example specifies the resource you are trying to access. For example:

Types of paths
Task | Description
Specific User | ex_path="LDAP://server/cn=fredflintsone,cn=Recipients,ou=rubble,o=bedrock"
Mailing List | ex_path="LDAP://server/cn=bedrock,cn=Recipients,ou=rubble,o=bedrock"
All Recipients | ex_path="LDAP://server/cn=Recipients,ou=rubble,o=bedrock"

User Account Management

Adding a user to exchange

# Adding a new account to exchange is simple except for one thing.
# You need to associate an NT account with an exchange account.
# To do so at this point requires some c++ to produce some hex SID
# and trustee information that adsi can use.
# At this point assume we have C++ magic
#
# Note we are accessing Recipients directly now
ex_path="LDAP://server/cn=Recipients,ou=rubble,o=bedrock"
logon_ex='cn=wilma,dc=bedrock'
password='dino'
myDSObject = ldap.OpenDSObject(ex_path,logon_ex,password,0)

newobj = myDSObject.create("OrganizationalPerson", "cn=betty")
newobj.put('MailPreferenceOption', 0)
# etc . . . add whatever else you want. There are a few required fields.
# Now the part to get exchange associated with NT
# The Magic is here
import win32pipe
assoc_nt=win32pipe.popen('getsid bedrock\\fredflint')
nt_security=win32pipe.popen('gettrustee bedrock\\fredflint')
newobj.put('NT-Security-Descriptor',assoc_nt)
newobj.put('NT-Security-Descriptor',nt_security)

newobj.SetInfo

Getting/Modify user info

ex_path="LDAP://server/cn=fredflint,cn=Recipients,ou=rubble,o=bedrock"
myDSObject = ldap.OpenDSObject(ex_path,logon_ex,password,0)
myDSObject.Getinfo()
# To access a user's data try:
attribute = myDSObject.Get('Extension-Attribute-1')
print attribute
# To modify a user try:
myDSObject.Put('Extension-Attribute-1','barney was here')
myDSObject.Setinfo()
Comments

Note -- To make any changes permanent setinfo is required.

Deleting a user from exchange

#Here we connect to Recipients and then
#delete a user
#This is a more complete example.
#data is a dictionary that contains info
#that may be dynamic like the domain,
#admin login, or exchange server
#notice I am using a try/except clause here
#to catch any exceptions
try:
  #ADSI here
  # Create the Global Providers object
  logon_ex='cn='+data['NT_admin']+', dc='+data['NT_domain']+',cn=admin'
  ex_list_path="LDAP://"+data['EX_site_srv']+"/cn=Recipients,ou="\
  +data['ou']+",o="+data['o']
  adsi = win32com.client.Dispatch('ADsNameSpaces')
  #
  # Now get the LDAP Provider object
  ldap = adsi.getobject("","LDAP:")
  dsobj = ldap.OpenDSObject(ex_list_path,logon_ex,data['NT_password'],0);
  dsobj.Getinfo()
  dsobj.Delete("OrganizationalPerson", "cn="+login)
  dsobj.Setinfo()
except:
  print 'Error deleting '+login, sys.exc_type , sys.exc_value

Distribution List

Adding to a distribution list

# I used putex instead of put because it has more options
# The '3' value means append. The SDK has specific info on it
ex_list_path="LDAP://"+server+"/cn="+list+",cn=Recipients,ou="+ou+",o="+o
dsobj = ldap.OpenDSObject(ex_list_path,logon_ex,password,0);
dsobj.Getinfo()
list_member='cn='+user+',cn=Recipients,ou='+ou+',o='+o
append_list=[list_member]
dsobj.putEx(3,'Member',append_list);
dsobj.SetInfo()

Recursively listing all unique members of a distribution list

#This function looks for all Organizational persons to add to a dictionary
#If it gets a groupOfNames, it needs to parse that and call the function again
#to get the members of the groupOfNames
def getmembers(path=''):
  user_dict={}
  logon_ex='cn=fred, dc=bedrock'
  password='dino'
  server='flintstone'
  ldap = win32com.client.Dispatch('ADsNameSpaces').getobject("","LDAP:")
  dsobj = ldap.OpenDSObject(path,logon_ex,password,0)
  dsobj.Getinfo()
  if dsobj.Class=='organizationalPerson':
      user_dict[string.capitalize(dsobj.cn)]=dsobj.uid
  elif dsobj.Class=='groupOfNames':
      for i in dsobj.Members():
              if i.Class=='organizationalPerson':
                  user_dict[string.capitalize(i.cn)]=i.uid
              elif type(i.member)==types.TupleType:
                  for j in i.member:
                      newpath='LDAP://'+server+'/'+j
                      getmembers(newpath)
              elif type(i.member)==types.StringType:
                  newpath='LDAP://'+server+'/'+i.member
                  getmembers(newpath)
  elif dsobj.Class=='Remote-Address':
      User_dict[string.capitalize(dsobj.cn)]=dsobj.uid
  elif  dsobj.Class=='Public-Folder':
      pass
  else:
      print 'skipped',dsobj.Class,dsobj.uid
  return user_dict

In Conclusion

Microsoft's ADSI allows one to manage exchange w/out having to resort to the lower-level APIs. Python has no trouble accessing Microsoft's ADSI to help simplify user management.

Further Info

  • Microsoft MSDN references
  • Microsoft ADSI
  • Microsoft MSDN ADSI reference
  • Relevant Python libraries: win32com.client

Author

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

ADSI, Exchange, and Python


Active Directory

  • SUMMARY
    • Introduction
    • Getting Active Directory Objects
      • Discovery
      • Making the object
      • What properties does the object have?
      • The time property
    • Managing Users(to be added)
      • User Basics
      • Adding Exchange access
    • In Conclusion
  • Further Info
  • Author

SUMMARY

Active Directory combines all sorts of domain-wide information into one spot. Using Microsoft's COM LDAP provider, python has good access to Active Directory.

Introduction

To access active directory, it is easiest to put some boilerplate code into a functions for future use. This will be done w/python's COM access to Active Directory. If you use python's ldap library, you can do similar stuff. Unfortunately, Microsoft switched directions w/exchange. You used to be able to access a lot of exchange functionality with ldap which no longer exists. Now, COM is needed.
Here is a list of the functions

  • Discover your active directory environment.
  • Basic authenticated connections to objects for you.
  • Collect all the objects attributes into a dictionary
  • Convert Active Directory time to python time
Later we'll add information about managing users and computers.

Getting Active Directory Objects

Discovery

A tool that can be of a great help is ADSIedit which is in the Windows
2000 support tools on the Windows 2000 server cdrom. It gives you the
raw ldap view of active directory.

def discover():
    Here is a function that helps you determine the active directory ldap strings that you can actually use.
    #get base LDAP string
    ldap_loc=win32com.client.GetObject('LDAP://rootDSE').Get("defaultNamingContext")
    #container where users are put it, may be like:
    ldap_main_loc='OU=people,'+ldap_loc

    Finding out about exchange, it is a bit more complicated.
    #typical exchange string
    ex_loc='CN=Microsoft Exchange,CN=Services,CN=Configuration'

    #look for your exchange sites
    ex_sites=[]
    for i in win32com.client.GetObject('LDAP://'+ex_loc+','+ldap_loc):
    if i.cn!='Active Directory Connections': ex_sites.append(i.cn)

    #get an exchange server
    ex_admin_grps='CN=Administrative Groups,cn='+ex_site+','+ex_loc+','+ldap_loc
    admin_grp=win32com.client.GetObject('LDAP://'+ex_admin_grps)[0].cn

    ex_servers='LDAP://CN=Servers,'+'cn='+admin_grp+','+ex_admin_grps
    servers=win32com.client.GetObject(ex_servers)

    ex_servers=[]

    for i in servers:
        ex_servers.append(i.cn)
    print '\texchange servers',string.join(ex_servers)

    ex_first_store='CN=First Storage Group,CN=InformationStore,CN=%s,CN=Servers,CN=%s,%s'%(ex_servers[-1],admin_grp,ex_admin_grps)

    ex_stores=[]

    for i in win32com.client.GetObject('LDAP://'+ex_first_store):
        ex_stores.append('cn='+i.cn+','+ex_first_store)
    print '\tExchange stores:',string.join(ex_stores,"',")

Making the object

One such useful function is opends. Ultimately, you need some sort of "LDAP://" string. The opends function builds it for you, by going to a default container. It also automatically authenticates w/a specific account. If you just give the function an id like 'fred', it will wrap it with something like:
LDAP://cn=fred,OU=people,DC=ad,DC=company,DC=state,DC=oh,DC=us'

This then allows things like:
print 'The last name: ',opends('fred').sn #sn =surname
or to get the groups fred is a member of
print "groups=',opends('fred').memberOf

def opends(loc,server=''):
    '''automatically buoild ldap string and authenticate
    ldap=win32com.client.Dispatch('ADsNameSpaces').getobject("","LDAP:")
    ldap_main_loc='OU=people,DC=ad,DC=company,DC=state,DC=oh,DC=us'
    ldap_auth='CN=admin_account,'+ldap_main_loc

    #if there is no ","  then they are not providing a full url
    #so append the standard url for it
    #if there is no '=', assume they want a cn
    if loc.find(',')==-1:
        if loc.find('=')==-1: loc='cn='+loc+','+Ad.ldap_main_loc
        else: loc=loc+','+Ad.ldap_main_loc
    if loc.find('LDAP://')==-1: loc='LDAP://'+loc

    return ldap.OpenDSObject(loc,Ad.ldap_auth,Ad.pw,1)

What does the object have?

Now that you can connection to objects, how do you determine what properties you can get from the object. The following function, ad_dict, converts the avilable properties of the object to a python dictionary, that is then easily inspected. To do so is a little tricky. It first determines what schema the object has and uses the schema, to grab mandatory and optional properties of the object. For any value that evaluates to true, it builds a dictionary. It also uses a conv_time fuction that deals with the way active directory saves time information and converts it to something compatible with python's time library.

You would use ad_dict like a normal python dictionary.
for i in ad_dict('fred').items(): print i
A lot of things convert to automatic python data types. For others, you'll get stuff like COMObject. You need to do specific processing, like the one done for pwdLastSet below, to extract data from them.

def ad_dict(ldapobj,attr_dict={},recurse=0,auth=1,filter=()):
    if ldapobj.find(',')==-1: ldapobj='cn='+ldapobj+','+Ad.ldap_main_loc
    if auth: #setup authenticated connections
        if debug: print 'auth'
        adobj=opends(ldapobj)
        #if debug: print 'authenticated to',ldapobj
    else:
        adobj=win32com.client.GetObject('LDAP://'+ldapobj)
        if debug: print 'connected to',ldapobj

    if not(filter):
        #check for children
        for i in adobj:
            if debug: print '****at',i.cn,str(adobj.cn)
            if recurse:
                pass
                #get children's attributes too
                #attr_dict[i.distinguishedName]={}
                #get_all(i.distinguishedName,attr_dict[i.distinguishedName],recurse,auth)
        if debug: print 'getting schema'
        schema_obj=win32com.client.GetObject(adobj.schema)
        for i in schema_obj.MandatoryProperties:
            if i =='nTSecurityDescriptor':continue #takes a long time, skip it
            value=getattr(adobj,i)
            if value: attr_dict[i]=value

        for i in schema_obj.OptionalProperties:
            value=getattr(adobj,i)
            if i == 'pwdLastSet':
                #convert com object to sec since 1970
                attr_dict[i]=conv_time(adobj.pwdLastSet.lowpart,adobj.pwdLastSet.highpart)
            elif value: attr_dict[i]=value

    else:
        attr_dict={}
        #only get data that is available
        for item in filter:
            try:
                if item == 'pwdLastSet':
                    #convert com object to sec since 1970
                    attr_dict[item]=conv_time(adobj.pwdLastSet.lowpart,adobj.pwdLastSet.highpart)
                else: attr_dict[item]=getattr(adobj,item)
            except:
                pass
    return attr_dict

The time property

Time in active directory is stored in a 64 bit integer that keeps track of the number of 100-nanosecond intervals which have passed since January 1, 1601. The 64-bit value uses 2 32 bit parts to store the time. The following is a function that returns the time in the typical format the python time libraries use (seconds since 1970). Here's an example where you'd use it: user=opends('fred') print 'time in seconds',conv_time(user.pwdLastSet.lowpart,user.pwdLastSet.highpart) user.pwdLastSet returns a com object, not a python data type.
def conv_time(l,h):
    #converts 64-bit integer specifying the number of 100-nanosecond
    #intervals which have passed since January 1, 1601.
    #This 64-bit value is split into the
    #two 32 bits  stored in the structure.
    d=116444736000000000L #diference between 1601 and 1970
    #we divide by 10million to convert to seconds
    return (((long(h)<< 32) + long(l))-d)/10000000

Managing Users

User Basics

Adding Exchange Access

In Conclusion

So far we've only covered the basics of using Active Directory. Stay tuned for more.

Further Info

  • Microsoft MSDN references

Author

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

ADSI, Exchange, and Python


win32com Documentation Index

Python and COM - Blowing the others away

PythonCOM Documentation Index

The following documentation is available

A Quick Start to Client Side COM (including makepy)

A Quick Start to Server Side COM

Information on generated Python files (ie, what makepy generates)

A brief description of the win32com package structure

Python COM Implementation documentation

Misc stuff I don’t know where to put anywhere else

ActiveX Scripting

ActiveX Scripting Demos


win32com Readme

Python and COM - Blowing the others away

Python COM Extensions Readme

This is the readme for win32com. Please check out the win32com documentation index

The win32com/test directory contains some interesting scripts (and a new readme.txt). Although these are used for testing, they do show a variety of COM techniques.

Recent Changes

  • makepy generation 'for demand' has been fixed, particularly when using events
  • Unexpected exceptions in Python COM objects will generally now dump the exception and traceback to stdout. This is useful for debugging and testing - it means that in some cases there will be no need to register an object with --debug to see these tracebacks. Note that COM objects used by server processes (such as ASP) generally have no valid stdout, so will still need to use --debug as usual.
  • universal gateway support has been improved - we can now work as an Outlook Addin
  • Potential Breakage: makepy supported objects should now support named parameters correctly. However, previously if there was a ByRef param not marked as optional, it could still often be omitted. This param may now need to be supplied (depending on the implementation - it is true for VB implemented objects)

win32all-147/8

  • ActiveScripting bugs with ASP should have been fixed, including the dreaded KeyboardInterrupt problem. ASP should also be much faster second and subsequent loads of a page.
  • ActiveScripting now correctly registers all type libraries. This means that all ActiveScripting global variables should be using makepy supported early-bound objects.
  • Dynamic dispatch objects now have a method _FlagAsMethod, which allows you to 'declare' that certain attribute names are actually methods rather than properties. This is used for some objects that don't otherwise allow you to call these methods due to problems in their implementation. OpenOffice is one such program. For example, you may call ob._FlagAsMethod("AMethod"), after which calling ob.AMethod() will work correctly.

win32all-143

ActiveScripting inside IE has been disabled by default. This is due to a privacy concern discovered in the engine. If you wish to re-enable this feature, you must execute:
z:\> win32comext\axscript\client\pyscript_rexec.py

win32all-142

Build for Python 2.2. Note that ActiveDebugging will not work in this release - you will not be able to debug Python programs using the Microsoft Debuggers inside ActiveScripting apps (such as IE, ASP)

win32all-136/ActivePython 2.1

Universal gateway has arrived! You can now implement arbitrary vtable based interfaces, as long as they are defined in a type-library (and even if not if you bonkers :-). You simply add one extra statement to your COM server nominating the typelibrary with the interface. Your PythonCOM server then can list the interfaces in that typelibrary by name in _com_interfaces_. Note that you must still have _public_methods_, but it need not specify named vtable interface methods - ie, in most cases this list will be empty. See win32com\servers\test_pycomtest.py for an example. (Note the intent is for the list of interfaces passed to universal.RegisterInterfaces() will be optional)

win32all-133 changes

Bug fixes! We now have an option to honour the hidden attribute on objects. This currently defaults to off, so nothing should break.

win32all-130-132 changes

Bug fixes. Structures can be created quite simply, using win32com.client.Record() - see its docstring for details.

See also the older changes.

ActiveX Scripting

This release contains full support for Python as an ActiveX Scripting Engine and Host. Check out the ActiveX Scripting Demos (which includes information on registering the engine)

There is also support for Python as an ActiveX Scripting Host.

Active Debugging seems to be fully functional.

Known bugs and problems...

Certain servers may hang at shutdown if all COM client objects not released - notably, MSOffice. Eg, if a Python program that is talking to excel raises an exception and exits, the Python program will be hung. There are no known leaks in win32com, but there is also no attempt at automatic object cleanup. All standard Python caveats about references apply! Note this is a "feature" of COM, and not a bug in win32com. You can use the function pythoncom._GetInterfaceCount() to determine how many COM objects are held by Python as your program terminates - this should return zero.

Even Older Changes

win32all-129 changes

We now have complete support for COM structures. To take advantage of this, you need a late version of COM (Windows 2000, 98, Windows 95 with DCOM95 1.2, or Window NT 4.0 with Service Pack 4). You can receive structures from any COM object, and reference the structure's elements by name (eg,struct.int_val). Once you have a structure, you can pass it to any other function, but currently there is no simple way to create Record objects in Python. Records work with or without makepy support for an object.

We support demand-building of makepy files. When a makepy file is built in this way, instead of a single file being generated in the gencache, a Python package is created. In the package __init__ file is all the information you would normally find in a makepy file, except for the classes! As an object is needed at runtime, makepy is run again to generate only the specific class requested, into a separate file in the package. This has significant advantages when loading huge type libraries - you get all the benefits of makepy, but don't have to suffer the huge delay running makepy. Indeed, there are some type libraries that are too large to run makepy at all - this solves that problem.

This new demand-building feature is not enabled by default - you must runmakepy -d, or specify the new bForDemand parameter to the gencachefunctions. It is expected that in the future the existing code will be dropped in favour of this package mechanism (although we will always retain the option to generate the entire package at the start, as makepydoes now)

makepy generated code should be even faster now - many of the run-time type conversions that the previous version performed have been optimized away (makepy already knows the return type of many functions - there was no need for it to check these types at runtime)

win32all-128 changes

We now have events working pretty well. NOTE: This is still experimental – all feedback appreciated. See the docstring for win32com.client.DispatchWithEvents and win32com\test\testMSOfficeEvents.py for more details and samples.

Active Debugging support improved again.

win32all-127 fixes (includes win32all-126).

All Arrays of VARIANT's of type VT_UI1 are now converted to a buffer object rather than the previous list of integers. In addition, a buffer object can be passed to COM and an array of type VT_UI1 will be created. This type is often used when passing raw binary data, and this change is far more efficient for large data sets. For example, if you have a string or array.array object holding binary data, you can use the buffer() built-in on the object to create a buffer object that will force the new behaviour.Note: This may break some code that uses arrays of this type, but after much soul-searching it was decided this new behaviour is worth the pain.

A bug that caused the Active Scripting implementation to die has been fixed. (Specifically, the implementation of to IActiveScript::AddTypeLib() was buggy)

Active Scripting bug when using IE5 fixed (it has a method called "print" which messed us up)

Error handling when setting erroneous properties on COM objects fixed. There were cases where errors would not be reported.

Threading bug that was exposed when using MTS has been fixed. Minor (but regular) memory leak plugged. Can now run for (nearly :-) ever under MTS with huge thread numbers.

makepy has better support for objects that expose multiple IDispatch interfaces, Also sorts the list of type-libraries correctly, and hides libraries marked as hidden.

COM now supports byref date arguments.

win32all-125 fixes.

Better support for DCOM via win32com.client.DispathEx(progId, machineName=None, …). Small DCOM demo in win32com\test\testDCOM.py.

Registration of COM servers has been made a little simpler, and the QuickStart has been changed to reflect this. Classes no longer need _reg_class_spec_ or _reg_desc_ attributes - the registration process now provides sensible defaults. Also note that if _reg_class_spec_ is not specified, the PythonPath will also be modified when your server is loaded - this prevents the common problem of not having your COM server on the PythonPath. Note that if _reg_class_spec_ is specified, the original behaviour remains - you must ensure the path is correct yourself.

Type information has been upgraded. The Pythoncom core is now capable of creating COM Type Libraries. All left remaining is some Python programming, so expect this soon.

Robin Becker has dramatically increased the speed of COM accessing certain objects (notably MSOffice) when not using makepy.

Build 123 and earlier changes.

Active Debugging should now be nearly capable of debugging stand-alone Python scripts.
Note that to use this feature you will need an Active Scripting debugger installed. Visual Interdev version 6 is one such debugger, or a free debugger can be found at http://msdn.microsoft.com/scripting
To debug Python scripts, use the following commands:

from win32com.axscript import debugger
debugger.Break()

This currently has some problems – most notable is that modules imported after debugging has commenced does not work. It also occasionally crashes :-( So maybe using it isn't such a good idea after all :-)

Even older Changes

Active Debugging support has been improved greatly, and some bugs in Active Scripting have been resolved. Python scripts are fully debugging from MSIE, WSH, etc (havent tested ASP :-( Please let me know of any problems.)

Couple of minor interfaces added. win32com.shell.shell has been filled out some more.

pythoncom.CoUninitialize() is no longer called automatically at shutdown. This seems to fix more problems than it causes, but if your COM program is hanging at shutdown, try adding an explicit call to this method just before you exit.

Regressed back to the default COM threading model being "Apartment", as defaulting to "Free Threading" seems to break so many clients. sys.coinit_flags still allows you to dictate the behaviour before pythoncom is imported for the first time.

makepy generated files now have much better support for default values for arguments. Also attempted to remove some hacks related to "interface" descriptions in IDL file. Nothing should break, and my (now comprehensive) test suite runs to completion, but let me know of any problems with weird, custom IDL files.

More changes to makepy to better support COM Constants. All external COM constants (eg, MSWord related constants) should now be available inwin32com.client.constants. No old code should break, but in the future the "old style" of using COM constants will be removed. This is all documented in the Client Side Quick Start documentation. Also made a few minor changes to thebGuiProgress param.


Modules

  • IADsContainer
  • IADsUser
  • IDirectoryObject
  • axcontrol
  • axdebug
  • axscript
  • exchange
  • exchdapi
  • internet
  • mapi
  • pythoncom
  • shell


IADsContainer

Module IADsContainer

A COM interface to ADSI's IADsContainer interface.

Methods

get_Count

get_Filter

put_Filter

get_Hints

put_Hints


IADsContainer.get_Count

int = get_Count()


IADsContainer.get_Filter

object = get_Filter()


IADsContainer.get_Hints

object = get_Hints()


IADsContainer.put_Filter

put_Filter(val)

Parameters

val : object


IADsContainer.put_Hints

put_Hints(val)

Parameters

val : object


IADsUser

Module IADsUser

A COM interface to ADSI's IADsUser interface.

Methods

get_AccountDisabled

put_AccountDisabled

get_AccountExpirationDate

put_AccountExpirationDate

get_BadLoginAddress

get_BadLoginCount

get_Department

put_Department

get_Description

put_Description

get_Division

put_Division

get_EmailAddress

put_EmailAddress

get_EmployeeID

put_EmployeeID

get_FirstName

put_FirstName

get_FullName

put_FullName

get_HomeDirectory

put_HomeDirectory

get_HomePage

put_HomePage

get_LoginScript

put_LoginScript


IADsUser.get_AccountDisabled

int = get_AccountDisabled()


IADsUser.get_AccountExpirationDate

int = get_AccountExpirationDate()


IADsUser.get_BadLoginAddress

unicode = get_BadLoginAddress()


IADsUser.get_BadLoginCount

int = get_BadLoginCount()


IADsUser.get_Department

unicode = get_Department()


IADsUser.get_Description

unicode = get_Description()


IADsUser.get_Division

unicode = get_Division()


IADsUser.get_EmailAddress

unicode = get_EmailAddress()


IADsUser.get_EmployeeID

unicode = get_EmployeeID()


IADsUser.get_FirstName

unicode = get_FirstName()


IADsUser.get_FullName

unicode = get_FullName()


IADsUser.get_HomeDirectory

unicode = get_HomeDirectory()


IADsUser.get_HomePage

unicode = get_HomePage()


IADsUser.get_LoginScript

unicode = get_LoginScript()


IADsUser.put_AccountDisabled

put_AccountDisabled(val)

Parameters

val : int


IADsUser.put_AccountExpirationDate

put_AccountExpirationDate(val)

Parameters

val : PyTime


IADsUser.put_Department

put_Department(val)

Parameters

val : unicode


IADsUser.put_Description

put_Description(val)

Parameters

val : unicode


IADsUser.put_Division

put_Division(val)

Parameters

val : unicode


IADsUser.put_EmailAddress

put_EmailAddress(val)

Parameters

val : unicode


IADsUser.put_EmployeeID

put_EmployeeID(val)

Parameters

val : unicode


IADsUser.put_FirstName

put_FirstName(val)

Parameters

val : unicode


IADsUser.put_FullName

put_FullName(val)

Parameters

val : unicode


IADsUser.put_HomeDirectory

put_HomeDirectory(val)

Parameters

val : unicode


IADsUser.put_HomePage

put_HomePage(val)

Parameters

val : unicode


IADsUser.put_LoginScript

put_LoginScript(val)

Parameters

val : unicode


IDirectoryObject

Module IDirectoryObject

A COM interface to ADSI's IDirectoryObject interface.

Methods

GetObjectInformation
Retrieves an PyADS_OBJECT_INFO object that contains information about the identity and location of a directory service object.

GetObjectAttributes
Gets one or more specified attributes of the directory service object, as defined in the PyADS_ATTR_INFO structure.

SetObjectAttributes
Sets one or more specified attributes of the directory service object, as defined in the PyADS_ATTR_INFO structure.


IDirectoryObject.GetObjectAttributes

PyADS_OBJECT_INFO = GetObjectAttributes()

Gets one or more specified attributes of the directory service object, as defined in the PyADS_ATTR_INFO structure.


IDirectoryObject.GetObjectInformation

PyADS_OBJECT_INFO = GetObjectInformation()

Retrieves an PyADS_OBJECT_INFO object that contains information about the identity and location of a directory service object.


IDirectoryObject.SetObjectAttributes

int = SetObjectAttributes()

Sets one or more specified attributes of the directory service object, as defined in the PyADS_ATTR_INFO structure.


axcontrol

Module axcontrol

A module, encapsulating the ActiveX Control interfaces

Methods

OleCreate
Creates a new embedded object identified by a CLSID.

OleLoadPicture
Creates a new picture object and initializes it from the contents of a stream.

OleLoadPicturePath
Creates a new picture object and initializes it from the contents of a stream.


axcontrol.OleCreate

PyIOleObject = OleCreate(clsid, clsid , obCLSID , obIID , renderopt , obFormatEtc , obOleClientSite , obStorage )

Creates a new embedded object identified by a CLSID.

Parameters

clsid : IID

A CLSID in string or native format

clsid : IID

A IID in string or native format

obCLSID : PyIID

The PyIID CLSID for the OLE object to create.

obIID : PyIID

The PyIID for the interface to return.

renderopt : DWORD

The DWORD renderopt for redering the Display.

obFormatEtc : FORMATETC

The FORMATETC structure.

obOleClientSite : PyIOleClientSite

The PyIOleClientSite interface to the container.

obStorage : PyIStorage

The PyIStorage interface.


axcontrol.OleLoadPicture

PyIUnknown = OleLoadPicture(stream, size , runMode , , )

Creates a new picture object and initializes it from the contents of a stream.

Parameters

stream : PyIStream

The stream that contains picture's data.

size : int

Number of bytes read from the stream

runMode : int

The opposite of the initial value of the KeepOriginalFormat property. If TRUE, KeepOriginalFormat is set to FALSE and vice-versa.

=iid : PyIID

The identifier of the interface describing the type of interface pointer to return

=iidRet : PyIID

The IID to use for the return object - use only if pythoncom does not support the native interface requested.


axcontrol.OleLoadPicturePath

PyIUnknown = OleLoadPicturePath(url_or_path, unk , reserved , clr , , )

Creates a new picture object and initializes it from the contents of a stream.

Parameters

url_or_path : string/unicode

The path or url to the file you want to open.

unk : PyIUknown

The IUnknown for COM aggregation.

reserved : int

reserved

clr : int

The color you want to reserve to be transparent.

=iid : PyIID

The identifier of the interface describing the type of interface pointer to return

=iidRet : PyIID

The IID to use for the return object - use only if pythoncom does not support the native interface requested.


axdebug

Module axdebug

A module, encapsulating the ActiveX Debugging


APPBREAKFLAG_DEBUGGER_BLOCK

const axdebug.APPBREAKFLAG_DEBUGGER_BLOCK;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Languages should break immediately with BREAKREASON_DEBUGGER_BLOCK


APPBREAKFLAG_DEBUGGER_HALT

const axdebug.APPBREAKFLAG_DEBUGGER_HALT;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Languages should break immediately with BREAKREASON_DEBUGGER_HALT


APPBREAKFLAG_STEP

const axdebug.APPBREAKFLAG_STEP;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

ADD_CONSTANT(APPBREAKFLAG_APPBREAKFLAG_NESTED);


BREAKPOINT_DELETED

const axdebug.BREAKPOINT_DELETED;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


BREAKPOINT_DISABLED

const axdebug.BREAKPOINT_DISABLED;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


BREAKPOINT_ENABLED

const axdebug.BREAKPOINT_ENABLED;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


BREAKREASON_BREAKPOINT

const axdebug.BREAKREASON_BREAKPOINT;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Caused by an explicit breakpoint


BREAKREASON_DEBUGGER_BLOCK

const axdebug.BREAKREASON_DEBUGGER_BLOCK;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Caused by another thread breaking


BREAKREASON_DEBUGGER_HALT

const axdebug.BREAKREASON_DEBUGGER_HALT;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Caused by debugger IDE requested break


BREAKREASON_ERROR

const axdebug.BREAKREASON_ERROR;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Caused by an execution error


BREAKREASON_HOST_INITIATED

const axdebug.BREAKREASON_HOST_INITIATED;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Caused by host requested break


BREAKREASON_LANGUAGE_INITIATED

const axdebug.BREAKREASON_LANGUAGE_INITIATED;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Caused by a scripted break


BREAKREASON_STEP

const axdebug.BREAKREASON_STEP;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Caused by the stepping mode


BREAKRESUMEACTION_ABORT

const axdebug.BREAKRESUMEACTION_ABORT;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Abort the application


BREAKRESUMEACTION_CONTINUE

const axdebug.BREAKRESUMEACTION_CONTINUE;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Continue running


BREAKRESUMEACTION_STEP_INTO

const axdebug.BREAKRESUMEACTION_STEP_INTO;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Step into a procedure


BREAKRESUMEACTION_STEP_OUT

const axdebug.BREAKRESUMEACTION_STEP_OUT;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Step out of the current procedure


BREAKRESUMEACTION_STEP_OVER

const axdebug.BREAKRESUMEACTION_STEP_OVER;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Step over a procedure


CLSID_DefaultDebugSessionProvider

const axdebug.CLSID_DefaultDebugSessionProvider;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

An IID object


CLSID_MachineDebugManager

const axdebug.CLSID_MachineDebugManager;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

An IID object


CLSID_ProcessDebugManager

const axdebug.CLSID_ProcessDebugManager;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

An IID object


DBGPROP_ATTRIB_ACCESS_FINAL

const axdebug.DBGPROP_ATTRIB_ACCESS_FINAL;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_ATTRIB_ACCESS_PRIVATE

const axdebug.DBGPROP_ATTRIB_ACCESS_PRIVATE;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_ATTRIB_ACCESS_PROTECTED

const axdebug.DBGPROP_ATTRIB_ACCESS_PROTECTED;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_ATTRIB_ACCESS_PUBLIC

const axdebug.DBGPROP_ATTRIB_ACCESS_PUBLIC;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_ATTRIB_HAS_EXTENDED_ATTRIBS

const axdebug.DBGPROP_ATTRIB_HAS_EXTENDED_ATTRIBS;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_ATTRIB_NO_ATTRIB

const axdebug.DBGPROP_ATTRIB_NO_ATTRIB;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_ATTRIB_STORAGE_FIELD

const axdebug.DBGPROP_ATTRIB_STORAGE_FIELD;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_ATTRIB_STORAGE_GLOBAL

const axdebug.DBGPROP_ATTRIB_STORAGE_GLOBAL;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_ATTRIB_STORAGE_STATIC

const axdebug.DBGPROP_ATTRIB_STORAGE_STATIC;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_ATTRIB_STORAGE_VIRTUAL

const axdebug.DBGPROP_ATTRIB_STORAGE_VIRTUAL;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_ATTRIB_TYPE_IS_CONSTANT

const axdebug.DBGPROP_ATTRIB_TYPE_IS_CONSTANT;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_ATTRIB_TYPE_IS_SYNCHRONIZED

const axdebug.DBGPROP_ATTRIB_TYPE_IS_SYNCHRONIZED;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_ATTRIB_TYPE_IS_VOLATILE

const axdebug.DBGPROP_ATTRIB_TYPE_IS_VOLATILE;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_ATTRIB_VALUE_IS_EXPANDABLE

const axdebug.DBGPROP_ATTRIB_VALUE_IS_EXPANDABLE;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_ATTRIB_VALUE_IS_INVALID

const axdebug.DBGPROP_ATTRIB_VALUE_IS_INVALID;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_ATTRIB_VALUE_READONLY

const axdebug.DBGPROP_ATTRIB_VALUE_READONLY;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_INFO_ATTRIBUTES

const axdebug.DBGPROP_INFO_ATTRIBUTES;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_INFO_AUTOEXPAND

const axdebug.DBGPROP_INFO_AUTOEXPAND;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_INFO_DEBUGPROP

const axdebug.DBGPROP_INFO_DEBUGPROP;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_INFO_FULLNAME

const axdebug.DBGPROP_INFO_FULLNAME;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_INFO_NAME

const axdebug.DBGPROP_INFO_NAME;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_INFO_TYPE

const axdebug.DBGPROP_INFO_TYPE;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DBGPROP_INFO_VALUE

const axdebug.DBGPROP_INFO_VALUE;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


DEBUG_TEXT_ALLOWBREAKPOINTS

const axdebug.DEBUG_TEXT_ALLOWBREAKPOINTS;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Allow breakpoints during the evaluation of the text. If this flag is not set then breakpoints will be ignored during the evaluation of the text.


DEBUG_TEXT_ISEXPRESSION

const axdebug.DEBUG_TEXT_ISEXPRESSION;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Indicates that the text is an expression as opposed to a statement. This flag may affect the way in which the text is parsed by some languages.


DOCUMENTNAMETYPE_APPNODE

const axdebug.DOCUMENTNAMETYPE_APPNODE;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Gets the name as it appears in the app tree


DOCUMENTNAMETYPE_FILE_TAIL

const axdebug.DOCUMENTNAMETYPE_FILE_TAIL;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Gets the filename without a path (for save as...)


DOCUMENTNAMETYPE_TITLE

const axdebug.DOCUMENTNAMETYPE_TITLE;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Gets the name as it appears on the doc viewer title bar


DOCUMENTNAMETYPE_URL

const axdebug.DOCUMENTNAMETYPE_URL;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Gets the URL of the document, if any


ERRORRESUMEACTION_AbortCallAndReturnErrorToCaller

const axdebug.ERRORRESUMEACTION_AbortCallAndReturnErrorToCaller;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


ERRORRESUMEACTION_ReexecuteErrorStatement

const axdebug.ERRORRESUMEACTION_ReexecuteErrorStatement;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


ERRORRESUMEACTION_SkipErrorStatement

const axdebug.ERRORRESUMEACTION_SkipErrorStatement;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


EX_DBGPROP_INFO_DEBUGEXTPROP

const axdebug.EX_DBGPROP_INFO_DEBUGEXTPROP;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


EX_DBGPROP_INFO_ID

const axdebug.EX_DBGPROP_INFO_ID;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


EX_DBGPROP_INFO_LOCKBYTES

const axdebug.EX_DBGPROP_INFO_LOCKBYTES;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


EX_DBGPROP_INFO_NTYPE

const axdebug.EX_DBGPROP_INFO_NTYPE;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


EX_DBGPROP_INFO_NVALUE

const axdebug.EX_DBGPROP_INFO_NVALUE;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


SOURCETEXT_ATTR_COMMENT

const axdebug.SOURCETEXT_ATTR_COMMENT;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


SOURCETEXT_ATTR_FUNCTION_START

const axdebug.SOURCETEXT_ATTR_FUNCTION_START;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


SOURCETEXT_ATTR_KEYWORD

const axdebug.SOURCETEXT_ATTR_KEYWORD;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


SOURCETEXT_ATTR_NONSOURCE

const axdebug.SOURCETEXT_ATTR_NONSOURCE;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


SOURCETEXT_ATTR_NUMBER

const axdebug.SOURCETEXT_ATTR_NUMBER;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


SOURCETEXT_ATTR_OPERATOR

const axdebug.SOURCETEXT_ATTR_OPERATOR;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


SOURCETEXT_ATTR_STRING

const axdebug.SOURCETEXT_ATTR_STRING;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP


TEXT_DOC_ATTR_READONLY

const axdebug.TEXT_DOC_ATTR_READONLY;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXDEBUG/SRC/AXDEBUG.CPP

Indicates that the document is read-only.


axscript

Module axscript

A module, encapsulating the ActiveX Scripting interfaces


exchange

Module exchange

A COM interface to Exchange's API

Methods

HrGetExchangeStatus
Obtains the current state of the server on a computer.

HrGetMailboxDN
Retrieves the distinguished name (DN) for a mailbox

HrGetServerDN
Retrieves the distinguished name (DN) for a server

HrMAPIFindDefaultMsgStore
Retrieves the entry identifier of the default information store.

HrMAPIFindIPMSubtree
Retrieves the entry ID of the IPM (interpersonal message) subtree folder

HrMAPIFindInbox
Retrieves the Entry ID of the IPM inbox folder

HrMAPIFindSubfolderEx
Retrieves a subfolder in an information store using the hierarchical path name of the folder.

HrMAPIFindFolder
Retrieves the entry ID for a folder in an information store using the hierarchical path name of the folder.

HrMAPIFindFolderEx
Retrieves the entry ID of a folder in an information store using the hierarchical path name of the folder.

HrMAPIFindStore
Retrieves a pointer to the entry identifier of an information store from the display name of the store.

HrCreateProfileName
Creates a profile with the specified name

HrCreateDirEntryIdEx
Creates a directory identifier for a MAPI object, given the address of the object in the directory

HrFindExchangeGlobalAddressList
Retrieves the entry identifier of the global address list (GAL) container in the address book.

HrMailboxLogon
Logs on a server and mailbox.

HrMailboxLogoff
Logs off a server and mailbox.

HrMAPIOpenFolderEx
Opens a folder in the information store from the hierarchical path name of the folder.

HrMAPISetPropBoolean
Sets a boolean property.

HrMAPISetPropLong
Sets a long property.

HrOpenExchangePublicStore
Retrieves an interface to the public information store provider.

HrOpenExchangePrivateStore
Locates the primary user information store provider.

HrOpenExchangePublicFolders
Opens the root of the public folder hierarchy in the public information store.

HrOpenSessionObject
Retrieves a MAPI PyIMAPIProp object for the current session object.

HrOpenSiteContainer
Retrieves a MAPI PyIMAPIProp object for a site object.

HrOpenSiteContainerAddressing
Retrieves a MAPI PyIMAPIProp object for a site-addressing object.


exchange.HrCreateDirEntryIdEx

string = HrCreateDirEntryIdEx(addrBook, distinguishedName )

Creates a directory identifier for a MAPI object, given the address of the object in the directory

Parameters

addrBook : PyIAddrBook

The address book interface

distinguishedName : string

The dn of the object to obtain the entry ID for.


exchange.HrCreateProfileName

PyUnicode = HrCreateProfileName(profPrefix)

Creates a profile with the specified name

Parameters

profPrefix : string/PyUnicode

A prefix for the new profile.


exchange.HrFindExchangeGlobalAddressList

string = HrFindExchangeGlobalAddressList(addrBook)

Retrieves the entry identifier of the global address list (GAL) container in the address book.

Parameters

addrBook : PyIAddrBook

The interface containing the address book


exchange.HrGetExchangeStatus

int, int = HrGetExchangeStatus(server)

Obtains the current state of the server on a computer.

Parameters

server : string/PyUnicode

The name of the server to query.

Return Value

The result is a tuple of serviceState, serverState


exchange.HrGetMailboxDN

string = HrGetMailboxDN(session)

Retrieves the distinguished name (DN) for a mailbox

Parameters

session : IMAPISession

The root folder.


exchange.HrGetServerDN

string = HrGetServerDN(session)

Retrieves the distinguished name (DN) for a server

Parameters

session : IMAPISession

The root folder.


exchange.HrMAPIFindDefaultMsgStore

string = HrMAPIFindDefaultMsgStore(session)

Retrieves the entry identifier of the default information store.

Parameters

session : PyIMAPISession


exchange.HrMAPIFindFolder

string = HrMAPIFindFolder(folder, name )

Retrieves the entry ID for a folder in an information store using the hierarchical path name of the folder.

Parameters

folder : PyIMAPIFolder

The folder to search

name : string

Name of the folder


exchange.HrMAPIFindFolderEx

string = HrMAPIFindFolderEx(msgStore, sepString , path )

Retrieves the entry ID of a folder in an information store using the hierarchical path name of the folder.

Parameters

msgStore : PyIMsgStore

The folder to search

sepString : string

The character seperating the folder names - eg '\\'

path : string

Path to the folder


exchange.HrMAPIFindIPMSubtree

string = HrMAPIFindIPMSubtree(msgStore)

Retrieves the entry ID of the IPM (interpersonal message) subtree folder

Parameters

msgStore : PyIMsgStore


exchange.HrMAPIFindInbox

string = HrMAPIFindInbox(msgStore)

Retrieves the Entry ID of the IPM inbox folder

Parameters

msgStore : PyIMsgStore


exchange.HrMAPIFindStore

PyIMsgStore = HrMAPIFindStore(session, name )

Retrieves a pointer to the entry identifier of an information store from the display name of the store.

Parameters

session : PyIMAPISession

name : string


exchange.HrMAPIFindSubfolderEx

PyIMsgStore = HrMAPIFindSubfolderEx(rootFolder, sep , name )

Retrieves a subfolder in an information store using the hierarchical path name of the folder.

Parameters

rootFolder : PyIMAPIFolder

The root folder.

sep : string/PyUnicode

The folder seperator character.

name : string/PyUnicode

The folder name


exchange.HrMAPIOpenFolderEx

PyIMAPIFolder = HrMAPIOpenFolderEx(msgStore, sep , name )

Opens a folder in the information store from the hierarchical path name of the folder.

Parameters

msgStore : PyIMsgStore

sep : string/PyUnicode

The folder seperator character.

name : string/PyUnicode

The folder name


exchange.HrMAPISetPropBoolean

HrMAPISetPropBoolean(obj, tag)

Sets a boolean property.

Parameters

obj : PyIMAPIProp

The object to set

tag : int

The property tag


exchange.HrMAPISetPropLong

HrMAPISetPropLong(obj, tag)

Sets a long property.

Parameters

obj : PyIMAPIProp

The object to set

tag : int

The property tag


exchange.HrMailboxLogoff

HrMailboxLogoff(inbox)

Logs off a server and mailbox.

Parameters

inbox : PyIMsgStore

The open inbox.


exchange.HrMailboxLogon

PyIMsgStore = HrMailboxLogon(session, msgStore , msgStoreDN , mailboxDN )

Logs on a server and mailbox.

Parameters

session : PyIMAPISession

The session object

msgStore : PyIMsgStore

msgStoreDN : string/PyUnicode

mailboxDN : string/PyUnicode


exchange.HrOpenExchangePrivateStore

PyIMsgStore = HrOpenExchangePrivateStore(session)

Locates the primary user information store provider.

Parameters

session : PyIMAPISession

The MAPI session object


exchange.HrOpenExchangePublicFolders

PyIMAPIFolder = HrOpenExchangePublicFolders(store)

Opens the root of the public folder hierarchy in the public information store.

Parameters

store : PyIMsgStore


exchange.HrOpenExchangePublicStore

PyIMsgStore = HrOpenExchangePublicStore(session)

Retrieves an interface to the public information store provider.

Parameters

session : PyIMAPISession

The MAPI session object


exchange.HrOpenSessionObject

PyIMAPIProp = HrOpenSessionObject(session)

Retrieves a MAPI PyIMAPIProp object for the current session object.

Parameters

session : PyIMAPISession

The MAPI session object


exchange.HrOpenSiteContainer

PyIMAPIProp = HrOpenSiteContainer(session)

Retrieves a MAPI PyIMAPIProp object for a site object.

Parameters

session : PyIMAPISession

The MAPI session object


exchange.HrOpenSiteContainerAddressing

PyIMAPIProp = HrOpenSiteContainerAddressing(session)

Retrieves a MAPI PyIMAPIProp object for a site-addressing object.

Parameters

session : PyIMAPISession

The MAPI session object


exchdapi

Module exchdapi

An COM interface to Exchange's DAPI

Methods

HrInstallService

HrInstallMailboxAgent

HrCreateMailboxAgentProfile

HrCreateGatewayProfile

HrMailboxAgentExists

HrAdminProgramExists

HrRemoveMailboxAgent
Removes a Mailbox Agent

HrRemoveProfile
Removes a profile

HrEnumOrganizations
Lists the names of the organizations on the server.

HrEnumSites
Lists the names of the sites in an organization.

HrEnumContainers
Lists the names of the containers on the server

HrEnumSiteAdmins
Lists the administrators for a site.

HrGetServiceAccountName
Obtains the account name for a service.


exchdapi.HrAdminProgramExists

HrAdminProgramExists()


exchdapi.HrCreateGatewayProfile

HrCreateGatewayProfile(serviceName, profile)

Parameters

serviceName : string

The name of the service.

profile : string

The profile.


exchdapi.HrCreateMailboxAgentProfile

HrCreateMailboxAgentProfile(serviceName, profile)

Parameters

serviceName : string

The name of the service.

profile : string

The profile.


exchdapi.HrEnumContainers

[string, ...] = HrEnumContainers(server, siteDN , fSubtree )

Lists the names of the containers on the server

Parameters

server : string

The name of the server

siteDN : string

Distinguished name (DN) of the site.

fSubtree : int


exchdapi.HrEnumOrganizations

[string, ...] = HrEnumOrganizations(rootDN, server )

Lists the names of the organizations on the server.

Parameters

rootDN : string

Contains the distinguished name (DN) of the directory information tree (DIT) root.

server : string

The name of the server


exchdapi.HrEnumSiteAdmins

[string, ...] = HrEnumSiteAdmins(server, siteDN )

Lists the administrators for a site.

Parameters

server : string

The name of the server

siteDN : string

Distinguished name (DN) of the site.


exchdapi.HrEnumSites

[string, ...] = HrEnumSites(server, organizationDN )

Lists the names of the sites in an organization.

Parameters

server : string

The name of the server

organizationDN : string

Contains the distinguished name (DN) of the organization.


exchdapi.HrGetServiceAccountName

string = HrGetServiceAccountName(serviceName, serviceName )

Obtains the account name for a service.

Parameters

serviceName : string

The name of the service

serviceName : string

The name of the service


exchdapi.HrInstallMailboxAgent

HrInstallMailboxAgent()


exchdapi.HrInstallService

HrInstallService()


exchdapi.HrMailboxAgentExists

HrMailboxAgentExists(server, siteDN, rdn)

Parameters

server : string

The name of the server

siteDN : string

Contains the distinguished name (DN) of the site.

rdn : string

RDN of the site where the mailbox agent might exist.


exchdapi.HrRemoveMailboxAgent

HrRemoveMailboxAgent(server, siteDN, rdn)

Removes a Mailbox Agent

Parameters

server : string

The name of the server

siteDN : string

Contains the distinguished name (DN) of the site.

rdn : string

RDN of the site where the mailbox agent exists.


exchdapi.HrRemoveProfile

HrRemoveProfile(profile)

Removes a profile

Parameters

profile : string

The profile to delete.


internet

Module internet

A module, encapsulating the ActiveX Internet interfaces


mapi

Module mapi

A COM interface to MAPI

Methods

HexFromBin
converts a binary number into a string representation of a hexadecimal number.

BinFromHex
converts a hexadecimal number into a binary string

MAPIUninitialize
Decrements the reference count, cleans up, and deletes per-instance global data for the MAPI DLL.

MAPIInitialize
Increments the MAPI subsystem reference count and initializes global data for the MAPI DLL.

MAPILogonEx

MAPIAdminProfiles

HrQueryAllRows

RTFSync

WrapCompressedRTFStream

OpenIMsgSession

CloseIMsgSession

OpenIMsgOnIStg
Builds a new IMessage object on top of an existing OLE IStorage object, to be used within a message session.

RTFStreamToHTML


mapi.BinFromHex

PyUnicode = BinFromHex(val)

converts a hexadecimal number into a binary string

Parameters

val : string/PyUnicode

The string to be converted.


mapi.CloseIMsgSession

CloseIMsgSession()


mapi.HexFromBin

PyUnicode = HexFromBin(val)

converts a binary number into a string representation of a hexadecimal number.

Parameters

val : string

Converts an EntryID into a hex string representation.

Comments

Note: This function may not be supported in future versions of MAPI.


mapi.HrQueryAllRows

SRowSet = HrQueryAllRows(table, properties , restrictions , sortOrderSet , rowsMax )

Parameters

table : PyIMAPITable

properties : PySPropTagArray

A sequence of property tags indicating table columns. These tags are used to select the specific columns to be retrieved. If this parameter is None, HrQueryAllRows retrieves the entire column set of the current table view passed in the table parameter.

restrictions : PySRestriction

Defines the retrieval restrictions. If this parameter is None, HrQueryAllRows makes no restrictions.

sortOrderSet : PySSortOrderSet

Identifies the sort order of the columns to be retrieved. If this parameter is None, the default sort order for the table is used.

rowsMax : int

Maximum number of rows to be retrieved. If the value of the rowsMax parameter is zero, no limit on the number of rows retrieved is set.


mapi.MAPIAdminProfiles

PyIProfAdmin = MAPIAdminProfiles(fFlags)

Parameters

fFlags : int


mapi.MAPIInitialize

MAPIInitialize(init)

Increments the MAPI subsystem reference count and initializes global data for the MAPI DLL.

Parameters

init : MAPIINIT_0

MAPI Initialization flags.


mapi.MAPILogonEx

PyIMAPISession = MAPILogonEx(hWnd, profileName , password , uiFlags )

Parameters

hWnd : int

Handle to the window to which the logon dialog box is modal. If no dialog box is displayed during the call, the hWnd parameter is ignored. This parameter can be zero.

profileName : PyUnicode

A string containing the name of the profile to use when logging on. This string is limited to 64 characters.

password : PyUnicode

A string containing the password of the profile. This parameter can be None whether or not the profileName parameter is None. This string is limited to 64 characters.

uiFlags : int

Bitmask of flags used to control how logon is performed. See the MAPI documentation for details.


mapi.MAPIUninitialize

MAPIUninitialize()

Decrements the reference count, cleans up, and deletes per-instance global data for the MAPI DLL.


mapi.OpenIMsgOnIStg

PyIMessage = OpenIMsgOnIStg(session, support , storage , callback , callbackData , flags )

Builds a new IMessage object on top of an existing OLE IStorage object, to be used within a message session.

Parameters

session : object

support : PyIMAPISupport

May be None

storage : PyIStorage

A PyIStorage object that is open and has read-only or read/write access. Because IMessage does not support write-only access, OpenIMsgOnIStg does not accept a storage object opened in write-only mode.

callback=None : object

Only None is supported.

callbackData=0 : int

flags=0 : int


mapi.OpenIMsgSession

object = OpenIMsgSession()


mapi.RTFStreamToHTML

RTFStreamToHTML(The stream to read the uncompressed RTF from)

Parameters

The stream to read the uncompressed RTF from : PyIStream


mapi.RTFSync

int = RTFSync(message, flags )

Parameters

message : PyIMessage

The message.

flags : int


mapi.WrapCompressedRTFStream

PyIStream = WrapCompressedRTFStream(stream, flags )

Parameters

stream : PyIStream

Message stream

flags : int


pythoncom

Module pythoncom

A module, encapsulating the OLE automation API

Methods

_GetInterfaceCount
Retrieves the number of interface objects currently in existance

_GetInterfaceCount
Retrieves the number of gateway objects currently in existance

CoCreateFreeThreadedMarshaler
Creates an aggregatable object capable of context-dependent marshaling.

CoCreateInstanceEx
Create a new instance of an OLE automation server possibly on a remote machine. MS_WINCE

CoCreateInstance
Create a new instance of an OLE automation server.

CoFreeUnusedLibraries
Unloads any DLLs that are no longer in use and that, when loaded, were specified to be freed automatically.

CoInitialize
Initialize the COM libraries for the calling thread.

CoInitializeEx
Initialize the COM libraries for the calling thread.

CoInitializeSecurity
Registers security and sets the default security values.

CoGetInterfaceAndReleaseStream
Unmarshals a buffer containing an interface pointer and releases the stream when an interface pointer has been marshaled from another thread to the calling thread.

CoMarshalInterThreadInterfaceInStream
Marshals an interface pointer from one thread to another thread in the same process. MS_WINCE

CoUninitialize
Uninitialize the COM libraries.

CoRegisterClassObject
Registers an EXE class object with OLE so other applications can connect to it.

CoResumeClassObjects
Called by a server that can register multiple class objects to inform the OLE SCM about all registered classes, and permits activation requests for those class objects.

CoRevokeClassObject
Informs OLE that a class object, previously registered with the pythoncom::CoRegisterClassObject method, is no longer available for use.

CoTreatAsClass
Establishes or removes an emulation, in which objects of one class are treated as objects of a different class.

Connect
Connects to a running instance of an OLE automation server.

CreateGuid
Creates a new, unique GUIID.

CreateBindCtx
Obtains a PyIBindCtx object.

CreateFileMoniker
Creates a file moniker given a file name.

CreatePointerMoniker
Creates a pointer moniker based on a pointer to an object.

CreateTypeLib
Provides access to a new object instance that supports the ICreateTypeLib interface. MS_WINCE

EnableQuitMessage
Indicates the thread PythonCOM should post a WM_QUIT message to.

FUNCDESC
Returns a new FUNCDESC object.

GetActiveObject
Retrieves an object representing a running object registered with OLE

GetClassFile
Supplies the CLSID associated with the given filename. MS_WINCE

GetFacilityString
Returns the facility string, given an OLE scode.

GetRecordFromGuids
Creates a new record object from the given GUIDs

GetRunningObjectTable
Obtains a PyIRunningObjectTable object. MS_WINCE

GetScodeString
Returns the string for an OLE scode.

GetScodeRangeString
Returns the scode range string, given an OLE scode.

GetSeverityString
Returns the severity string, given an OLE scode.

IsGatewayRegistered
Returns 1 if the given IID has a registered gateway object.

LoadRegTypeLib
Loads a registered type library by CLSID

LoadTypeLib
Loads a type library by name

MakeIID
Makes an IID object from a string.

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

MakePyFactory
Creates a new PyIClassFactory object wrapping a PythonCOM Class Factory object.

MkParseDisplayName
Parses a moniker display name into a moniker object. The inverse of IMoniker::GetDisplayName. MS_WINCE

New
Create a new instance of an OLE automation server.

OleGetClipboard
Retrieves a data object that you can use to access the contents of the clipboard.

OleFlushClipboard
Carries out the clipboard shutdown sequence. It also releases the IDataObject pointer that was placed on the clipboard by the pythoncom::OleSetClipboard function.

OleIsCurrentClipboard
Determines whether the data object pointer previously placed on the clipboard by the OleSetClipboard function is still on the clipboard.

OleSetClipboard
Places a pointer to a specific data object onto the clipboard. This makes the data object accessible to the OleGetClipboard function.

OleLoadFromStream
Load an object from an IStream.

OleSaveToStream
Save an object to an IStream.

OleLoad
Loads into memory an object nested within a specified storage object.

ProgIDFromCLSID
Converts a CLSID string to a progID. MS_WINCE

PumpWaitingMessages
Pumps all waiting messages for the current thread.

PumpMessages
Pumps all messages for the current thread until a WM_QUIT message.

QueryPathOfRegTypeLib
Retrieves the path of a registered type library MS_WINCE

ReadClassStg
Reads a CLSID from a storage object

RegisterTypeLib
Adds information about a type library to the system registry.

UnRegisterTypeLib
Removes a type library from the system registry.

RegisterActiveObject
Register an object as the active object for its class

RevokeActiveObject
Ends an object’s status as active. MS_WINCE

StgCreateDocfile
Creates a new compound file storage object using the OLE-provided compound file implementation for the PyIStorage interface.

StgCreateDocfileOnILockBytes
Creates a new compound file storage object using the OLE-provided compound file implementation for the PyIStorage interface.

StgIsStorageFile
Indicates whether a particular disk file contains a storage object. MS_WINCE

STGMEDIUM
Creates a new PySTGMEDIUM object suitable for the PyIDataObject interface.

StgOpenStorage
Opens an existing root storage object in the file system.

StgOpenStorageEx
Access IStorage and IPropertySetStorage interfaces for normal files

TYPEATTR
Returns a new TYPEATTR object.

VARDESC
Returns a new VARDESC object.

WrapObject
Wraps an object in a gateway.

WriteClassStg
Stores a CLSID from a storage object

UnwrapObject
Unwraps a Python instance in a gateway object.

Unicode
Converts a string into a PyUnicode object.

Properties

int frozen
1 if the host is a frozen program, else 0

int dcom
1 if the system is DCOM aware, else 0. Only Win95 without DCOM extensions should return 0


pythoncom._GetGatewayCount

int = _GetGatewayCount()

Retrieves the number of gateway objects currently in existance

Comments

This is the number of Python object that implement COM servers which are still alive (ie, serving a client). The only way to reduce this count is to have the process which uses these PythonCOM servers release its references.


pythoncom.CoCreateFreeThreadedMarshaler

PyIUnknown = CoCreateFreeThreadedMarshaler(unk)

Creates an aggregatable object capable of context-dependent marshaling.

Parameters

unk : PyIUnknown

The unknown object to marshal.


pythoncom.CoCreateInstance

PyIUnknown = CoCreateInstance(clsid, unkOuter , context , iid )

Create a new instance of an OLE automation server.

Parameters

clsid : PyIID

Class identifier (CLSID) of the object

unkOuter : PyIUnknown

The outer unknown, or None

context : int

The create context for the object

iid : PyIID

The IID required from the object


pythoncom.CoCreateInstanceEx

PyIUnknown = CoCreateInstanceEx(clsid, unkOuter , context , serverInfo , iids )

Create a new instance of an OLE automation server possibly on a remote machine.

Parameters

clsid : PyIID

Class identifier (CLSID) of the object

unkOuter : PyIUnknown

The outer unknown, or None

context : int

The create context for the object

serverInfo : (server, authino=None, reserved1=0,reserved2=0)

May be None, or describes the remote server to execute on.

iids : [PyIID, ...]

A list of IIDs required from the object


pythoncom.CoFreeUnusedLibraries

CoFreeUnusedLibraries()

Unloads any DLLs that are no longer in use and that, when loaded, were specified to be freed automatically.


pythoncom.CoGetInterfaceAndReleaseStream

PyIUnknown = CoGetInterfaceAndReleaseStream(stream, iid )

Unmarshals a buffer containing an interface pointer and releases the stream when an interface pointer has been marshaled from another thread to the calling thread.

Parameters

stream : PyIStream

The stream to unmarshal the object from.

iid : PyIID

The IID if the interface to unmarshal.


pythoncom.CoInitialize

CoInitialize()

Initialize the COM libraries for the calling thread.

Comments

Equivilent to pythoncom::CoInitializeEx(pythoncom.COINIT_APARTMENTTHREADED). See pythoncom::CoInitializeEx for a description.


pythoncom.CoInitializeEx

CoInitializeEx(flags)

Initialize the COM libraries for the calling thread.

Parameters

flags : int

Flags for the initialization.

Comments

There is no need to call this for the main Python thread, as it is called automatically by pythoncom (using sys.coinit_flags as the param, or COINIT_APARTMENTTHREADED if sys.coinit_flags does not exist).
You must call this manually if you create a thread which wishes to use COM.


pythoncom.CoInitializeSecurity

CoInitializeSecurity(sd, authInfo, reserved1, authnLevel, impLevel, authInfo, capabilities, reserved2)

Registers security and sets the default security values.

Parameters

sd : PySECURITY_DESCRIPTOR

authInfo : object

A value of None tells COM to choose which authentication services to use. An empty list means use no services.

reserved1 : object

Must be None

authnLevel : int

The default authentication level for proxies. On the server side, COM will fail calls that arrive at a lower level. All calls to AddRef and Release are made at this level.

impLevel : int

The default impersonation level for proxies. This value is not checked on the server side. AddRef and Release calls are made with this impersonation level so even security aware apps should set this carefully. Setting IUnknown security only affects calls to QueryInterface, not AddRef or Release.

authInfo : object

Must be None

capabilities : int

Additional client and/or server-side capabilities. Any set of EOAC flags may be passed. Currently only EOAC_MUTUAL_AUTH, EOAC_SECURE_REFS, and EOAC_NONE are defined

reserved2 : object

Must be None


pythoncom.CoMarshalInterThreadInterfaceInStream

PyIStream = CoMarshalInterThreadInterfaceInStream(iid, unk )

Marshals an interface pointer from one thread to another thread in the same process.

Parameters

iid : PyIID

The IID of the interface to marshal.

unk : PyIUnknown

The interface to marshal.


pythoncom.CoRegisterClassObject

int = CoRegisterClassObject(iid, factory , context , flags )

Registers an EXE class object with OLE so other applications can connect to it.

Parameters

iid : PyIID

The IID of the object to register

factory : PyIUnknown

The class factory object. It is the Python programmers responsibility to ensure this object remains alive until the class is unregistered.

context : int

The create context for the server. Must be a combination of the CLSCTX_* flags.

flags : int

Create flags.

Comments

The class factory object should be PyIClassFactory object, but as per the COM documentation, only PyIUnknown is checked.

Return Value

The result is a handle which should be revoked using pythoncom::CoRevokeClassObject


pythoncom.CoResumeClassObjects

CoResumeClassObjects()

Called by a server that can register multiple class objects to inform the OLE SCM about all registered classes, and permits activation requests for those class objects.

Comments

This is not available on Window95. If it is called on that platform, a E_NOTIMPLEMENTED com_error is raised.


pythoncom.CoRevokeClassObject

CoRevokeClassObject(reg)

Informs OLE that a class object, previously registered with the pythoncom::CoRegisterClassObject method, is no longer available for use.

Parameters

reg : int

The value returned from pythoncom::CoRegisterClassObject


pythoncom.CoTreatAsClass

CoTreatAsClass(clsidold, clsidnew)

Establishes or removes an emulation, in which objects of one class are treated as objects of a different class.

Parameters

clsidold : PyIID

CLSID of the object to be emulated.

clsidnew=CLSID_NULL : PyIID

CLSID of the object that should emulate the original object. This replaces any existing emulation for clsidOld. Can be ommitted or CLSID_NULL, in which case any existing emulation for clsidOld is removed.


pythoncom.CoUninitialize

CoUninitialize()

Uninitialize the COM libraries for the calling thread.


pythoncom.Connect

PyIDispatch = Connect(cls)

Connect to an already running OLE automation server.

Parameters

cls : CLSID

An identifier for the program. Usually "program.item"

Comments

This function is equivilent to pythoncom::GetActiveObject(clsid).pythoncom::QueryInterace (pythoncom.IID_IDispatch)


pythoncom.CreateBindCtx

PyIBindCtx = CreateBindCtx()

Creates a new PyIBindCtx object.


pythoncom.CreateFileMoniker

PyIMoniker = CreateFileMoniker(filename)

Creates a new PyIMoniker object.

Parameters

filename : string

The name of the file.


pythoncom.CreateGuid

PyIID = CreateGuid()

Creates a new, unique GUIID.

Comments

Use the CreateGuid function when you need an absolutely unique number that you will use as a persistent identifier in a distributed environment.To a very high degree of certainty, this function returns a unique value – no other invocation, on the same or any other system (networked or not), should return the same value.


pythoncom.CreatePointerMoniker

PyIMoniker = CreatePointerMoniker(IUnknown)

Creates a new PyIMoniker object.

Parameters

IUnknown : PyIUnknown

The interface for the moniker.


pythoncom.CreateTypeLib

ICreateTypeLib = CreateTypeLib()

Provides access to a new object instance that supports the ICreateTypeLib interface.


pythoncom.EnableQuitMessage

EnableQuitMessage(threadId)

Indicates the thread PythonCOM should post a WM_QUIT message to.

Parameters

threadId : int

The thread ID.


pythoncom.FUNCDESC

FUNCDESC = FUNCDESC()

Creates a new FUNCDESC object


pythoncom.GetActiveObject

PyIUnknown = GetActiveObject(cls)

Retrieves an object representing a running object registered with OLE

Parameters

cls : CLSID

The IID for the program. As for all CLSID's in Python, a "program.name" or IID format string may be used, or a real PyIID object.


pythoncom.GetClassFile

PyIID = GetClassFile(fileName)

Supplies the CLSID associated with the given filename.

Parameters

fileName : string

The filename for which you are requesting the associated CLSID.


pythoncom.GetFacilityString

string = GetFacilityString(scode)

Returns the facility string, given an OLE scode.

Parameters

scode : int

The OLE error code for the facility string requested.


pythoncom.GetRecordFromGuids

PyRecord = GetRecordFromGuids(iid, verMajor , verMinor , lcid , infoIID , data )

Creates a new record object from the given GUIDs

Parameters

iid : PyIID

The GUID of the type library

verMajor : int

The major version number of the type lib.

verMinor : int

The minor version number of the type lib.

lcid : int

The LCID of the type lib.

infoIID : PyIID

The GUID of the record info in the library

data=None : string

The raw data to initialize the record with.


pythoncom.GetRunningObjectTable

PyIRunningObjectTable = GetRunningObjectTable(reserved)

Creates a new PyIRunningObjectTable object.

Parameters

reserved=0 : int

A reserved parameter. Should be zero unless you have inside information that I don't!


pythoncom.GetScodeRangeString

string = GetScodeRangeString(scode)

Returns the scode range string, given an OLE scode.

Parameters

scode : int

An OLE error code to return the scode range string for.


pythoncom.GetScodeString

string = GetScodeString(scode)

Returns the string for an OLE scode (HRESULT)

Parameters

scode : int

The OLE error code for the scode string requested.

Comments

This will obtain the COM Error message for a given HRESULT. Internally, PythonCOM uses this function to obtain the description when a com_error COM Exception is raised.


pythoncom.GetSeverityString

string = GetSeverityString(scode)

Returns the severity string, given an OLE scode.

Parameters

scode : int

The OLE error code for the severity string requested.


pythoncom.IsGatewayRegistered

int = IsGatewayRegistered(iid)

Returns true if a gateway has been registered for the given IID

Parameters

iid : PyIID

IID of the interface.


pythoncom.LoadRegTypeLib

PyITypeLib = LoadRegTypeLib(iid, versionMajor , versionMinor , lcid )

Loads a registered type library.

Parameters

iid : PyIID

The IID of the type library.

versionMajor : int

The major version number of the library

versionMinor : int

The minor version number of the library

lcid=LOCALE_USER_DEFAULT : int

The locale ID to use.

Comments

LoadRegTypeLib compares the requested version numbers against those found in the system registry, and takes one of the following actions:
If one of the registered libraries exactly matches both the requested major and minor version numbers, then that type library is loaded.
If one or more registered type libraries exactly match the requested major version number, and has a greater minor version number than that requested, the one with the greatest minor version number is loaded.
If none of the registered type libraries exactly match the requested major version number (or if none of those that do exactly match the major version number also have a minor version number greater than or equal to the requested minor version number), then LoadRegTypeLib returns an error.


pythoncom.LoadTypeLib

PyITypeLib = LoadTypeLib(libFileName)

Loads a registered type library.

Parameters

libFileName : string

The path to the file containing the type information.


pythoncom.MakeIID

PyIID = MakeIID()

Creates a new IID object.

Comments

This is simply an alias for pywintypes::IID. Please see that method for details.


pythoncom.MakePyFactory

PyIClassFactory = MakePyFactory(iid)

Creates a new PyIClassFactory object wrapping a PythonCOM Class Factory object.

Parameters

iid : PyIID

The IID of the object the class factory provides.


pythoncom.MakeTime

PyTime = MakeTime()

Creates a new time object.

Comments

This is simply an alias for pywintypes::Time. Please see that method for details.


pythoncom.MkParseDisplayName

PyIMoniker,int,PyIBindCtx = MkParseDisplayName(displayName, bindCtx )

Parses a moniker display name into a moniker object. The inverse of PyIMoniker::GetDisplayName

Parameters

displayName : string

The display name to parse

bindCtx=None : PyIBindCtx

The bind context object to use.

Comments

If a binding context is not provided, then one will be created. Any binding context created or passed in will be returned to the caller.


pythoncom.new

PyIDispatch = new(cls)

Create a new instance of an OLE automation server.

Parameters

cls : CLSID

An identifier for the program. Usually "program.item"

Comments

This is just a wrapper for the CoCreateInstance method. Specifically, this call is identical to:
pythoncom.CoCreateInstance(cls, None, pythoncom.CLSCTX_SERVER, pythoncom.IID_IDispatch)


pythoncom.OleFlushClipboard

OleFlushClipboard()

Carries out the clipboard shutdown sequence. It also releases the IDataObject pointer that was placed on the clipboard by the pythoncom::OleSetClipboard function.


pythoncom.OleGetClipboard

PyIDataObject = OleGetClipboard()

Retrieves a data object that you can use to access the contents of the clipboard.


pythoncom.OleIsCurrentClipboard

true/false = OleIsCurrentClipboard()

Determines whether the data object pointer previously placed on the clipboard by the OleSetClipboard function is still on the clipboard.


pythoncom.OleLoad

OleLoad(storage, iid, site)

Loads into memory an object nested within a specified storage object.

Parameters

storage : PyIStorage

The storage object from which to load

iid : PyIID

The IID if the interface to load.

site : PyIOleClientSite

The client site for the object.


pythoncom.OleLoadFromStream

OleLoadFromStream(stream, iid)

Load an object from an IStream.

Parameters

stream : PyIStream

The stream to load the object from.

iid : PyIID

The IID if the interface to load.


pythoncom.OleSaveToStream

OleSaveToStream(persist, stream)

Save an object to an IStream.

Parameters

persist : PyIPersistStream

The object to save

stream : PyIStream

The stream to save the object to.


pythoncom.OleSetClipboard

OleSetClipboard()

Places a pointer to a specific data object onto the clipboard. This makes the data object accessible to the OleGetClipboard function.


pythoncom.ProgIDFromCLSID

string = ProgIDFromCLSID(clsid)

Converts a CLSID to a progID.

Parameters

clsid : IID

A CLSID (either in a string, or in an PyIID object)


pythoncom.PumpMessages

PumpMessages()

Pumps all messages for the current thread until a WM_QUIT message.


pythoncom.PumpWaitingMessages

int = PumpWaitingMessages()

Pumps all waiting messages for the current thread.

Comments

It is sometimes necessary for a COM thread to have a message loop. This function can be used with win32event::MsgWaitForMultipleObjects to pump all messages when necessary. Please see the COM documentation for more details.

Win32 API References

PeekMessage and DispatchMessage

Return Value

Returns 1 if a WM_QUIT message was received, else 0


pythoncom.QueryPathOfRegTypeLib

PyUnicode = QueryPathOfRegTypeLib(iid, versionMajor , versionMinor , lcid )

Retrieves the path of a registered type library.

Parameters

iid : PyIID

The IID of the type library.

versionMajor : int

The major version number of the library

versionMinor : int

The minor version number of the library

lcid=LOCALE_USER_DEFAULT : int

The locale ID to use.


pythoncom.ReadClassStg

PyIID = ReadClassStg(storage)

Reads a CLSID from a storage object.

Parameters

storage : PyIStorage

The storage to read the CLSID from.


pythoncom.RegisterActiveObject

int = RegisterActiveObject(obUnknown, clsid , flags )

Register an object as the active object for its class

Parameters

obUnknown : PyIUnknown

The object to register.

clsid : PyIID

The CLSID for the object

flags : int

Flags to use.

Return Value

The result is a handle which should be pass to pythoncom::RevokeActiveObject


pythoncom.RegisterTypeLib

RegisterTypeLib(typelib, fullPath, helpDir, lcid)

Adds information about a type library to the system registry.

Parameters

typelib : PyITypeLib

The type library being registered.

fullPath : string

Fully qualified path specification for the type library being registered

helpDir=None : string

Directory in which the Help file for the library being registered can be found. Can be None.

lcid=LOCALE_USER_DEFAULT : int

The locale ID to use.

Comments

This function can be used during application initialization to register the application's type library correctly. When RegisterTypeLib is called to register a type library, both the minor and major version numbers are registered in hexadecimal.
In addition to filling in a complete registry entry under the type library key, RegisterTypeLib adds entries for each of the dispinterfaces and Automation-compatible interfaces, including dual interfaces. This information is required to create instances of these interfaces. Coclasses are not registered (that is, RegisterTypeLib does not write any values to the CLSID key of the coclass).


pythoncom.RevokeActiveObject

RevokeActiveObject(handle)

Ends an object’s status as active.

Parameters

handle : int

A handle obtained from pythoncom::RegisterActiveObject


pythoncom.STGMEDIUM

PySTGMEDIUM = STGMEDIUM()

Creates a new STGMEDIUM object


pythoncom.StgCreateDocfile

PyIStorage = StgCreateDocfile(name, mode , reserved )

Creates a new compound file storage object using the OLE-provided compound file implementation for the PyIStorage interface.

Parameters

name : string

the path of the compound file to create. It is passed uninterpreted to the file system. This can be a relative name or None. If None, a temporary stream is created.

mode : int

Specifies the access mode used to open the storage.

reserved=0 : int

A reserved value


pythoncom.StgCreateDocfileOnILockBytes

PyIStorage = StgCreateDocfileOnILockBytes(lockBytes, mode , reserved )

Creates a new compound file storage object using the OLE-provided compound file implementation for the PyIStorage interface.

Parameters

lockBytes : PyILockBytes

The PyILockBytes interface on the underlying byte array object on which to create a compound file.

mode : int

Specifies the access mode used to open the storage.

reserved=0 : int

A reserved value


pythoncom.StgIsStorageFile

int = StgIsStorageFile(name)

Indicates whether a particular disk file contains a storage object.

Parameters

name : string

The path to the file to check.

Return Value

The return value is 1 if a storage file, else 0


pythoncom.StgOpenStorage

PyIStorage = StgOpenStorage(name, other , mode , snbExclude , reserved )

Opens an existing root storage object in the file system.

Parameters

name : string

Name of the stream, or possibly None if storageOther is non None.

other : PyIStorage

Usually None, or another parent storage.

mode : int

Specifies the access mode used to open the storage. A combination of the storagecon.STGM_* constants.

snbExclude=None : object

Not yet supported - must be None

reserved=0 : int

A reserved value


pythoncom.StgOpenStorageEx

PyIStorage = StgOpenStorageEx(name, grfmode , stgfmt , grfAttrs , riid , pStgOptions )

Advanced version of StgOpenStorage, win2k or better

Parameters

name : string

Name of the stream or file to open

grfmode : int

open flags

stgfmt : int

Storage format (STGFMT_STORAGE,STGFMT_FILE,STGFMT_ANY, or STGFMT_DOCFILE)

grfAttrs : int

Reserved, must be 0

riid : IID

Interface id to return, IStorage or IPropertySetStorage

pStgOptions : dict

Dictionary representing STGOPTIONS struct (only used with STGFMT_DOCFILE)


pythoncom.TYPEATTR

TYPEATTR = TYPEATTR()

Creates a new TYPEATTR object


pythoncom.UnRegisterTypeLib

PyUnicode = UnRegisterTypeLib(iid, versionMajor , versionMinor , lcid , syskind )

Unregister a Type Library.

Parameters

iid : PyIID

The IID of the type library.

versionMajor : int

The major version number of the library

versionMinor : int

The minor version number of the library

lcid=LOCALE_USER_DEFAULT : int

The locale ID to use.

syskind=SYS_WIN32 : int

The target operating system.

Comments

Removes type library information from the system registry. Use this API to allow applications to properly uninstall themselves. In-process objects typically call this API from DllUnregisterServer.


pythoncom.Unicode

PyUnicode = Unicode(s)

Converts a string into a PyUnicode object.

Parameters

s : string

The string to convert into a Unicode object

Comments

As Python itself becomes Unicode aware, this function will not be necessary.


pythoncom.UnwrapObject

PyIDispatch = UnwrapObject(ob)

Unwraps a Python instance in a gateway object.

Parameters

ob : PyIUnknown

The object to unwrap.

Comments

If the object is not a PythonCOM object, then ValueError is raised.


pythoncom.VARDESC

VARDESC = VARDESC()

Creates a new VARDESC object


pythoncom.WrapObject

PyIUnknown = WrapObject(ob, gatewayIID , interfaceIID )

Wraps a Python instance in a gateway object.

Parameters

ob : object

The object to wrap.

gatewayIID=IID_IDispatch : PyIID

The IID of the gateway object to create (ie, the interface of the server object wrapped by the return value)

interfaceIID=IID_IDispatch : PyIID

The IID of the interface object to create (ie, the interface of the returned object)

Return Value

Note that there are 2 objects created by this call - a gateway (server) object, suitable for use by other external COM clients/hosts, as well as the returned Python interface (client) object, which maps to the new gateway.
There are some unusual cases where the 2 IID parameters will not be identical. If you need to do this, you should know exactly what you are doing, and why!


pythoncom.WriteClassStg

WriteClassStg(storage, iid)

Writes a CLSID to a storage.

Parameters

storage : PyIStorage

The storage to read the CLSID from.

iid : PyIID

The IID to write


pythoncom._GetInterfaceCount

int = _GetInterfaceCount()

Retrieves the number of interface objects currently in existance

Comments

If is occasionally a good idea to call this function before your Python program terminates. If this function returns non-zero, then you still have PythonCOM objects alive in your program (possibly in global variables).


pythoncom.dcom

pythoncom.dcom property

Data Type

int

Description

1 if the system is DCOM aware, else 0. Only Win95 without DCOM extensions should return 0

Defined in: E:/SRC/PYTHONEX/COM/WIN32COM/SRC/PYTHONCOM.CPP


pythoncom.frozen

pythoncom.frozen property

Data Type

int

Description

1 if the host is a frozen program, else 0

Defined in: E:/SRC/PYTHONEX/COM/WIN32COM/SRC/PYTHONCOM.CPP


shell

Module shell

A module, encapsulating the ActiveX Control interfaces

Methods

DragQueryFile
Retrieves the file names of dropped files that have resulted from a successful drag-and-drop operation.

DragQueryPoint
Retrieves the position of the mouse pointer at the time a file was dropped during a drag-and-drop operation.

SHGetPathFromIDList
Converts an PyIDL to a path.

SHBrowseForFolder
Displays a dialog box that enables the user to select a shell folder.

SHGetFolderPath
Retrieves the path of a folder.

SHGetFolderLocation
Retrieves the PyIDL of a folder.

SHGetSpecialFolderPath
Retrieves the path of a special folder.

SHGetSpecialFolderLocation
Retrieves the PyIDL of a special folder.

SHAddToRecentDocs
Adds a document to the shell's list of recently used documents or clears all documents from the list. The user gains access to the list through the Start menu of the Windows taskbar.

SHChangeNotify
Notifies the system of an event that an application has performed. An application should use this function if it performs an action that may affect the shell.

SHEmptyRecycleBin
Empties the recycle bin on the specified drive.

SHGetDesktopFolder
Retrieves the PyIShellFolder interface for the desktop folder, which is the root of the shell's namespace.

SHUpdateImage
Notifies the shell that an image in the system image list has changed.

SHChangeNotify
Notifies the system of an event that an application has performed.


shell.DragQueryFile

string/int = DragQueryFile(hglobal, index )

Notifies the shell that an image in the system image list has changed.

Parameters

hglobal : int

The HGLOBAL object - generally obtained via the 'data_handle' property of a PySTGMEDIUM object.

index : int

The index to retrieve. If -1, the result if an integer representing the valid index values.

Return Value

If the value for index is -1, the result is the number of filenames available, otherwise the result is a string with the requested filename.


shell.DragQueryPoint

int, (int,int) = DragQueryPoint(hglobal)

Retrieves the position of the mouse pointer at the time a file was dropped during a drag-and-drop operation.

Parameters

hglobal : int

The HGLOBAL object - generally obtained the 'data_handle' property of a PySTGMEDIUM

Comments

The window for which coordinates are returned is the window that received the WM_DROPFILES message

Return Value

The first item of the return tuple is True if the drop occurred in the client area of the window, or False if the drop did not occur in the client area of the window.


shell.SHAddToRecentDocs

SHAddToRecentDocs(flags, whatever)

Adds a document to the shell's list of recently used documents or clears all documents from the list. The user gains access to the list through the Start menu of the Windows taskbar.

Parameters

flags : int

Flag that indicates the meaning of the whatever parameter

whatever : string

A path or PyIDL


shell.SHBrowseForFolder

(PyIDL, string displayName, iImage) = SHBrowseForFolder(hwndOwner, pidlRoot , title , flags , callback , callbackParam )

Displays a dialog box that enables the user to select a shell folder.

Parameters

hwndOwner=0 : int

pidlRoot=None : PyIDL

title=None : Unicode /string

flags=0 : int

callback : object

Not yet supported - must be None

callbackParam=0 : int

Return Value

The result is ALWAYS a tuple of 3 items. If the user cancels the dialog, all items are None. If the dialog is closed normally, the result is a tuple of (PIDL, DisplayName, iImageList)


shell.SHChangeNotify

SHChangeNotify()

Notifies the system of an event that an application has performed. An application should use this function if it performs an action that may affect the shell.


shell.SHEmptyRecycleBin

PyIDL = SHEmptyRecycleBin(hwnd, path , flags )

Empties the recycle bin on the specified drive.

Parameters

hwnd : int

path : string

A NULL-terminated string that contains the path of the root drive on which the recycle bin is located. This parameter can contain the address of a string formatted with the drive, folder, and subfolder names (c:\\windows\\system . . .). It can also contain an empty string or NULL. If this value is an empty string or NULL, all recycle bins on all drives will be emptied.

flags : int

One of the SHERB_* values.

Comments

This method is only available in shell version 4.71. If the function is not available, a COM Exception with HRESULT=E_NOTIMPL will be raised.


shell.SHGetDesktopFolder

PyIShellFolder = SHGetDesktopFolder()

Retrieves the PyIShellFolder interface for the desktop folder, which is the root of the shell's namespace.


shell.SHGetFolderLocation

PyIDL = SHGetFolderLocation(hwndOwner, nFolder , handle , reserved )

Retrieves the PIDL of a folder.

Parameters

hwndOwner : int

nFolder : int

One of the CSIDL_* constants specifying the path.

handle : PyHANDLE

An access token that can be used to represent a particular user, or None

reserved : int

Must be 0

Comments

This method is only available if you have a late version of shfolder.dll installed, included with certain shell updates.


shell.SHGetFolderPath

string/PyUnicode = SHGetFolderPath(hwndOwner, nFolder , handle , flags )

Retrieves the path of a folder.

Parameters

hwndOwner : int

nFolder : int

One of the CSIDL_* constants specifying the path.

handle : PyHANDLE

An access token that can be used to represent a particular user, or None

flags : int

Controls which path is returned. May be SHGFP_TYPE_CURRENT or SHGFP_TYPE_DEFAULT

Comments

This method is only available if you have shfolder.dll installed, included with certain shell updates.


shell.SHGetPathFromIDList

string/PyUnicode = SHGetPathFromIDList(idl)

Converts an IDLIST to a path.

Parameters

idl : PyIDL

The ITEMIDLIST


shell.SHGetSpecialFolderLocation

PyIDL = SHGetSpecialFolderLocation(hwndOwner, nFolder )

Retrieves the PIDL of a special folder.

Parameters

hwndOwner : int

nFolder : int

One of the CSIDL_* constants specifying the path.


shell.SHGetSpecialFolderPath

string/PyUnicode = SHGetSpecialFolderPath(hwndOwner, nFolder , bCreate )

Retrieves the path of a special folder.

Parameters

hwndOwner : int

nFolder : int

One of the CSIDL_* constants specifying the path.

bCreate=0 : int

Should the path be created.

Comments

This method is only available in shell version 4.71. If the function is not available, a COM Exception with HRESULT=E_NOTIMPL will be raised. If the function fails, a COM Exception with HRESULT=E_FAIL will be raised.


shell.SHUpdateImage

SHUpdateImage()

Notifies the shell that an image in the system image list has changed.


Objects

  • ELEMDESC
  • FUNCDESC
  • IDLDESC
  • MAPIINIT_0
  • PyADS_ATTR_INFO
  • PyADS_OBJECT_INFO
  • PyIABContainer
  • PyIActiveScriptDebug
  • PyIActiveScriptError
  • PyIActiveScriptErrorDebug
  • PyIActiveScriptParseProcedure
  • PyIActiveScriptSite
  • PyIActiveScriptSiteDebug
  • PyIAddrBook
  • PyIApplicationDebugger
  • PyIAttach
  • PyIBindCtx
  • PyIBrowserFrameOptions
  • PyICatInformation
  • PyICatRegister
  • PyIClassFactory
  • PyIConnectionPoint
  • PyIConnectionPointContainer
  • PyIContextMenu
  • PyICopyHook
  • PyICreateTypeInfo
  • PyICreateTypeLib
  • PyIDL
  • PyIDataObject
  • PyIDebugApplication
  • PyIDebugApplicationNode
  • PyIDebugApplicationNodeEvents
  • PyIDebugApplicationThread
  • PyIDebugCodeContext
  • PyIDebugDocument
  • PyIDebugDocumentContext
  • PyIDebugDocumentHelper
  • PyIDebugDocumentHost
  • PyIDebugDocumentInfo
  • PyIDebugDocumentProvider
  • PyIDebugDocumentText
  • PyIDebugDocumentTextAuthor
  • PyIDebugDocumentTextEvents
  • PyIDebugDocumentTextExternalAuthor
  • PyIDebugExpression
  • PyIDebugExpressionCallBack
  • PyIDebugExpressionContext
  • PyIDebugProperty
  • PyIDebugSessionProvider
  • PyIDebugStackFrame
  • PyIDebugStackFrameSniffer
  • PyIDebugStackFrameSnifferEx
  • PyIDebugSyncOperation
  • PyIDispatch
  • PyIDispatchEx
  • PyIDistList
  • PyIEnumCATEGORYINFO
  • PyIEnumConnectionPoints
  • PyIEnumConnections
  • PyIEnumDebugApplicationNodes
  • PyIEnumDebugCodeContexts
  • PyIEnumDebugExpressionContexts
  • PyIEnumDebugPropertyInfo
  • PyIEnumDebugStackFrames
  • PyIEnumFORMATETC
  • PyIEnumGUID
  • PyIEnumIDList
  • PyIEnumMoniker
  • PyIEnumRemoteDebugApplicationThreads
  • PyIEnumRemoteDebugApplications
  • PyIEnumSTATPROPSETSTG
  • PyIEnumSTATPROPSTG
  • PyIEnumSTATSTG
  • PyIErrorLog
  • PyIExternalConnection
  • PyIExtractIcon
  • PyIInternetBindInfo
  • PyIInternetPriority
  • PyIInternetProtocol
  • PyIInternetProtocolInfo
  • PyIInternetProtocolRoot
  • PyIInternetProtocolSink
  • PyILockBytes
  • PyIMAPIContainer
  • PyIMAPIFolder
  • PyIMAPIProp
  • PyIMAPISession
  • PyIMAPITable
  • PyIMachineDebugManager
  • PyIMachineDebugManagerEvents
  • PyIMailUser
  • PyIMessage
  • PyIMoniker
  • PyIMsgServiceAdmin
  • PyIMsgStore
  • PyIOleClientSite
  • PyIOleControl
  • PyIOleInPlaceObject
  • PyIOleInPlaceSite
  • PyIOleInPlaceSiteEx
  • PyIOleInPlaceSiteWindowless
  • PyIOleObject
  • PyIOleWindow
  • PyIPersist
  • PyIPersistFile
  • PyIPersistFolder
  • PyIPersistPropertyBag
  • PyIPersistStorage
  • PyIPersistStream
  • PyIPersistStreamInit
  • PyIProcessDebugManager
  • PyIProfAdmin
  • PyIProfSect
  • PyIPropertyBag
  • PyIPropertySetStorage
  • PyIPropertyStorage
  • PyIProvideClassInfo
  • PyIProvideClassInfo2
  • PyIProvideExpressionContexts
  • PyIRemoteDebugApplication
  • PyIRemoteDebugApplicationEvents
  • PyIRemoteDebugApplicationThread
  • PyIRunningObjectTable
  • PyIServiceProvider
  • PyIShellBrowser
  • PyIShellExtInit
  • PyIShellFolder
  • PyIShellLink
  • PyIShellView
  • PyISpecifyPropertyPages
  • PyIStorage
  • PyIStream
  • PyITypeComp
  • PyITypeInfo
  • PyITypeLib
  • PyIUnknown
  • PyIViewObject
  • PyIViewObject2
  • PyMAPINAMEIDArray
  • PyRecord
  • PySAndRestriction
  • PySBinaryArray
  • PySBitMaskRestriction
  • PySContentRestriction
  • PySExistRestriction
  • PySNotRestriction
  • PySOrRestriction
  • PySPropTagArray
  • PySPropValue
  • PySPropValueArray
  • PySPropertyRestriction
  • PySRestriction
  • PySRow
  • PySRowSet
  • PySSortOrderItem
  • PySSortOrderSet
  • PySTGMEDIUM
  • STATSTG
  • TLIBATTR
  • TYPEATTR
  • TYPEDESC
  • VARDESC


ELEMDESC

ELEMDESC Object

An ELEMDESC is respresented as a tuple of

Items

[0] TYPEDESC : typeDesc

The type description.

[1] int : idlFlags

[2] object : default

If PARAMFLAG_FHASDEFAULT are set, then this is the default value.


FUNCDESC

FUNCDESC Object

A FUNCDESC object represents a COM TYPEATTR structure.

Properties

integer memid

(int, ...) scodeArray

(ELEMDESC, ...) args

int funckind

int invkind

int callconv

int cParamsOpt

int oVft

ELEMDESC rettype

int wFuncFlags

Items

[0] int : memid

[1] (int, ...) : scodeArray

[2] (ELEMDESC, ...) : args

[3] int : funckind

[4] int : invkind

[5] int : callconv

[6] int : cParamsOpt

[7] int : oVft

[8] ELEMDESC : rettype

[9] int : wFuncFlags


IDLDESC

IDLDESC Object

An IDLDESC is respresented as

Items

[0] int : reserved

A reserved value!

[1] int : flags

IDL flags.


MAPIINIT_0

MAPIINIT_0 Object

A MAPIINIT_0 is represented as a tuple of:

Items

[0] int : version

This must be MAPI_INIT_VERSION.

[1] int : flags

MAPI initlization flags.

Value | Meaning
MAPI_MULTITHREAD_NOTIFICATIONS | MAPI should generate notifications using a thread dedicated to notification handling rather than the first thread used to call mapi::MAPIInitialize.
MAPI_NT_SERVICE | The caller is running as a NT service. Callers that are not running in a Windows NT service should not set this flag; callers that are running as a service must set this flag.

Comments

Multithreaded clients should set MAPI_MULTITHREAD_NOTIFICATIONS flag so that they can receive notifications on threads other than the first thread to call mapi::MAPIInitialize.


PyADS_ATTR_INFO

PyADS_ATTR_INFO Object

Represents a ADS_ATTR_INFO structure.

Properties

unicode AttrName
The name

integer ControlCode

integer ADsType


PyADS_OBJECT_INFO

PyADS_OBJECT_INFO Object

Represents a ADS_OBJECT_INFO structure.

Properties

unicode RDN
The name

unicode ObjectDN

unicode ParentDN

unicode ClassName


PyIABContainer

PyIABContainer Object

An COM interface to MAPI
Derived from PyIMAPIContainer


PyIActiveScriptDebug

PyIActiveScriptDebug Object

Description of the interface

Methods

GetScriptTextAttributes
Description of GetScriptTextAttributes

GetScriptletTextAttributes
Description of GetScriptletTextAttributes

EnumCodeContextsOfPosition
Description of EnumCodeContextsOfPosition


PyIActiveScriptDebug.EnumCodeContextsOfPosition

EnumCodeContextsOfPosition(dwSourceContext, uCharacterOffset, uNumChars)

Description of EnumCodeContextsOfPosition.

Parameters

dwSourceContext : int

Description for dwSourceContext

uCharacterOffset : int

Description for uCharacterOffset

uNumChars : int

Description for uNumChars


PyIActiveScriptDebug.GetScriptTextAttributes

(int,...) = GetScriptTextAttributes(pstrCode, pstrDelimiter , dwFlags )

Returns the text attributes for an arbitrary block of script text.

Parameters

pstrCode : string

The script block text.

pstrDelimiter : string

See PyIActiveScriptParse::ParseScriptText for a description of this argument.

dwFlags : int

See PyIActiveScriptParse::ParseScriptText for a description of this argument.

Comments

Smart hosts use this call to delegate GetText calls made on their axscript::PyIDebugDocumentText


PyIActiveScriptDebug.GetScriptletTextAttributes

GetScriptletTextAttributes(pstrCode, pstrDelimiter, dwFlags)

Description of GetScriptletTextAttributes.

Parameters

pstrCode : string

The script block text.

pstrDelimiter : string

See PyIActiveScriptParse::ParseScriptText for a description of this argument.

dwFlags : int

See PyIActiveScriptParse::ParseScriptText for a description of this argument.


PyIActiveScriptError

PyIActiveScriptError Object

Description of the interface

Methods

GetExceptionInfo
Description of GetExceptionInfo

GetSourcePosition
Description of GetSourcePosition

GetSourceLineText
Description of GetSourceLineText


PyIActiveScriptError.GetExceptionInfo

GetExceptionInfo()

Description of GetExceptionInfo.


PyIActiveScriptError.GetSourceLineText

GetSourceLineText()

Description of GetSourceLineText.


PyIActiveScriptError.GetSourcePosition

GetSourcePosition()

Description of GetSourcePosition.


PyIActiveScriptErrorDebug

PyIActiveScriptErrorDebug Object

Description of the interface

Methods

GetDocumentContext
Description of GetDocumentContext

GetStackFrame
Description of GetStackFrame


PyIActiveScriptErrorDebug.GetDocumentContext

GetDocumentContext()

Description of GetDocumentContext.


PyIActiveScriptErrorDebug.GetStackFrame

GetStackFrame()

Description of GetStackFrame.


PyIActiveScriptParseProcedure

PyIActiveScriptParseProcedure Object

Description of the interface

Methods

ParseProcedureText
Description of ParseProcedureText


PyIActiveScriptParseProcedure.ParseProcedureText

ParseProcedureText(pstrCode, pstrFormalParams, pstrProcedureName, pstrItemName, punkContext, pstrDelimiter, dwSourceContextCookie, ulStartingLineNumber, dwFlags)

Description of ParseProcedureText.

Parameters

pstrCode : unicode

Description for pstrCode

pstrFormalParams : unicode

Description for pstrFormalParams

pstrProcedureName : unicode

Description for pstrProcedureName

pstrItemName : unicode

Description for pstrItemName

punkContext : PyIUnknown

Description for punkContext

pstrDelimiter : unicode

Description for pstrDelimiter

dwSourceContextCookie : int

Description for dwSourceContextCookie

ulStartingLineNumber : int

Description for ulStartingLineNumber

dwFlags : int

Description for dwFlags


PyIActiveScriptSite

PyIActiveScriptSite Object

An object providing the IActiveScriptSite interface

Methods

GetLCID

GetItemInfo

GetDocVersionString

OnStateChange

OnEnterScript

OnLeaveScript

OnScriptError

OnScriptTerminate


PyIActiveScriptSite.GetDocVersionString

int = GetDocVersionString()


PyIActiveScriptSite.GetItemInfo

int = GetItemInfo()


PyIActiveScriptSite.GetLCID

int = GetLCID()


PyIActiveScriptSite.OnEnterScript

int = OnEnterScript()


PyIActiveScriptSite.OnLeaveScript

int = OnLeaveScript()


PyIActiveScriptSite.OnScriptError

int = OnScriptError()


PyIActiveScriptSite.OnScriptTerminate

int = OnScriptTerminate()


PyIActiveScriptSite.OnStateChange

int = OnStateChange()


PyIActiveScriptSiteDebug

PyIActiveScriptSiteDebug Object

Description of the interface

Methods

GetDocumentContextFromPosition
Description of GetDocumentContextFromPosition

GetApplication
Description of GetApplication

GetRootApplicationNode
Description of GetRootApplicationNode

OnScriptErrorDebug
Allows a smart host to control the handling of runtime errors


PyIActiveScriptSiteDebug.GetApplication

GetApplication()

Description of GetApplication.


PyIActiveScriptSiteDebug.GetDocumentContextFromPosition

GetDocumentContextFromPosition(dwSourceContext, uCharacterOffset, uNumChars)

Description of GetDocumentContextFromPosition.

Parameters

dwSourceContext : int

Description for dwSourceContext

uCharacterOffset : int

Description for uCharacterOffset

uNumChars : int

Description for uNumChars


PyIActiveScriptSiteDebug.GetRootApplicationNode

GetRootApplicationNode()

Description of GetRootApplicationNode.


PyIActiveScriptSiteDebug.OnScriptErrorDebug

int, int = OnScriptErrorDebug()

Allows a smart host to control the handling of runtime errors

Return Value

The result is a tuple of (bCallDebugger, bCallOnScriptErrorWhenContinuing)


PyIAddrBook

PyIAddrBook Object

An COM interface to MAPI's IAddrBook interface.
Derived from PyIMAPIProp

Methods

ResolveName
Performs name resolution, assigning entry identifiers to recipients in a recipient list.

OpenEntry
Opens a folder or message and returns an interface object for further access.

CompareEntryIDs
Compares two entry identifiers belonging to a particular address book provider to determine if they refer to the same address book object


PyIAddrBook.CompareEntryIDs

int = CompareEntryIDs(entryId, entryId , flags )

Compares two entry identifiers belonging to a particular address book provider to determine if they refer to the same address book object

Parameters

entryId : string

The first entry ID to be compared

entryId : string

The second entry ID to be compared

flags=0 : int

Reserved - must be zero.

Return Value

The result is set to TRUE if the two entry identifiers refer to the same object, and FALSE otherwise.


PyIAddrBook.OpenEntry

PyIInterface = OpenEntry(entryId, iid , flags )

Opens a folder or message and returns an interface object for further access.

Parameters

entryId : string

The entryID of the object

iid : PyIID

The IID of the object to return, or None for the default IID

flags : int

Bitmask of flags that controls how the object is opened.


PyIAddrBook.ResolveName

ResolveName(uiParm, flags, entryTitle, ADRLIST)

Performs name resolution, assigning entry identifiers to recipients in a recipient list.

Parameters

uiParm : int

hwnd of a dialogs parent.

flags : int

Bitmask of flags that controls whether a dialog box can be displayed.

entryTitle : string

ADRLIST : PyADRLIST

Partial addresses to resolve.


PyIApplicationDebugger

PyIApplicationDebugger Object

Description of the interface

Methods

QueryAlive
Returns true if alive, else false.

CreateInstanceAtDebugger
Create objects in the application process address space.

onDebugOutput
Called when PyIDebugApplication::DebugOutput is called.

onHandleBreakPoint
Called when a breakpoint is hit.

onClose
Called when PyIDebugApplication::Close is called.

onDebuggerEvent
Handle a custom event.


PyIApplicationDebugger.CreateInstanceAtDebugger

CreateInstanceAtDebugger(rclsid, pUnkOuter, dwClsContext, riid)

Create objects in the application process address space.

Parameters

rclsid : PyIID

Description for rclsid

pUnkOuter : PyIUnknown

Description for pUnkOuter

dwClsContext : int

Description for dwClsContext

riid : PyIID

Description for riid

Comments

Provides a mechanism for the debugger IDE, running out-of-process to the application, to create objects in the application process. This method simply delegates to CoCreateInstance.


PyIApplicationDebugger.QueryAlive

QueryAlive()

Returns true if alive, else false.


PyIApplicationDebugger.onClose

onClose()

Called when PyIDebugApplication::Close is called.


PyIApplicationDebugger.onDebugOutput

onDebugOutput(pstr)

Called when PyIDebugApplication::DebugOutput is called.

Parameters

pstr : unicode

Description for pstr

Comments

The debugger can use this to display the string in an output window.


PyIApplicationDebugger.onDebuggerEvent

onDebuggerEvent(guid, uUnknown)

Description of onDebuggerEvent.

Parameters

guid : PyIID

uUnknown : PyIUnknown

Comments

The semantics of guid and unknown are entirely application/debugger defined
This method may return E_NOTIMPL.


PyIApplicationDebugger.onHandleBreakPoint

onHandleBreakPoint(prpt, br, pError)

Called when a breakpoint is hit.

Parameters

prpt : PyIRemoteDebugApplicationThread

Description for prpt

br : int

Description for br

pError : IActiveScriptErrorDebug

Description for pError

Comments

The application will remain suspended until the debugger IDE calls PyIDebugApplication::ResumeFromBreakPoint .


PyIAttach

PyIAttach Object

An COM interface to MAPI
Derived from PyIMAPIProp


PyIBindCtx

PyIBindCtx Object

A Python interface to IBindCtx. Derived from PyIUnknown

Methods

GetRunningObjectTable
Retrieves the running object table.


PyIBindCtx.GetRunningObjectTable

PyIRunningObjectTable = GetRunningObjectTable()

Retrieves an object interfacing to the Running Object Table.


PyIBrowserFrameOptions

PyIBrowserFrameOptions Object

Description of the interface

Methods

GetFrameOptions
Description of GetFrameOptions


PyIBrowserFrameOptions.GetFrameOptions

GetFrameOptions(dwMask)

Description of GetFrameOptions.

Parameters

dwMask : int

Description for dwMask


PyICatInformation

PyICatInformation Object

A Python interface to ICatInformation

Methods

EnumCategories
Returns an enumerator for the component categories registered on the system.

GetCategoryDesc
Retrieves the localized description string for a specific category ID.

EnumClassesOfCategories
Returns an enumerator over the classes that implement one or more interfaces.


PyICatInformation.EnumCategories

PyIEnumCATEGORYINFO = EnumCategories(lcid)

Returns an enumerator for the component categories registered on the system.

Parameters

lcid=0 : int

lcid


PyICatInformation.EnumClassesOfCategories

PyIEnumGUID = EnumClassesOfCategories(listIIdImplemented, listIIdRequired )

Returns an enumerator over the classes that implement one or more interfaces.

Parameters

listIIdImplemented=None : [PyIID, ...]

A sequence of PyIID objects, or None.

listIIdRequired=None : list iid

A sequence of PyIID objects, or None.


PyICatInformation.GetCategoryDesc

string = GetCategoryDesc(lcid)

Retrieves the localized description string for a specific category ID.

Parameters

lcid=0 : int

lcid

Comments

The return type is a true PyString, not a Uniocode object.

To Do

Upgrade the return type to be Unicode.


PyICatRegister

PyICatRegister Object

An interface to a COM ICatRegister interface.

Methods

RegisterCategories
Registers one or more component categories. Each component category consists of a CATID and a list of locale-dependent description strings.

UnRegisterCategories
Unregister one or more previously registered categories.

RegisterClassImplCategories
Registers the class as implementing one or more component categories.

UnRegisterClassImplCategories
Unregisters the class as implementing one or more component categories.

RegisterClassReqCategories
Registers the class as requiring one or more component categories.

UnRegisterClassReqCategories
Unregisters the class as requiring one or more component categories.


PyICatRegister.RegisterCategories

RegisterCategories([ (catId, lcid, description), ...])

Registers one or more component categories. Each component category consists of a CATID and a list of locale-dependent description strings.

Parameters

[ (catId, lcid, description), ...] : [ (PyIID, int, string), ...]

A sequence of category descriptions.


PyICatRegister.RegisterClassImplCategories

RegisterClassImplCategories(clsid, [catId, ...])

Registers the class as implementing one or more component categories.

Parameters

clsid : PyIID

Class ID of the relevent class

[catId, ...] : [PyIID, ...]

A sequence of category IDs to be associated with the class.


PyICatRegister.RegisterClassReqCategories

RegisterClassReqCategories(clsid, [catId, ...])

Registers the class as requiring one or more component categories.

Parameters

clsid : PyIID

Class ID of the relevent class

[catId, ...] : [PyIID, ...]

A sequence of category IDs to be associated with the class.


PyICatRegister.UnregisterCategories

UnregisterCategories([catId, ...])

Unregister one or more previously registered categories.

Parameters

[catId, ...] : [PyIID, ...]

The list of category IDs to be unregistered.


PyICatRegister.UnRegisterClassImplCategories

UnRegisterClassImplCategories(clsid, [catId, ...])

Unregisters the class as implementing one or more component categories.

Parameters

clsid : PyIID

Class ID of the relevent class

[catId, ...] : [PyIID, ...]

A sequence of category IDs to be unregistered from the class.


PyICatRegister.UnRegisterClassReqCategories

UnRegisterClassReqCategories(clsid, [catId, ...])

Unregisters the class as requiring one or more component categories.

Parameters

clsid : PyIID

Class ID of the relevent class

[catId, ...] : [PyIID, ...]

A sequence of category IDs to be unregistered for the class.


PyIClassFactory

PyIClassFactory Object

An object which represents the IClassFactory interface. Derived from PyIUnknown

Methods

CreateInstance
Creates an uninitialized object.

LockServer
Called by the client of a class object to keep a server open in memory, allowing instances to be created more quickly.


PyIClassFactory.CreateInstance

PyIUnknown = CreateInstance(outerUnknown, iid )

Creates an uninitialized object.

Parameters

outerUnknown : PyIUnknown

Usually None, otherwise the outer unknown if the object is being created as part of an aggregate.

iid : PyIID

The IID of the resultant object.

Return Value

The result object will always be derived from PyIUnknown, but will be of the type specified by iid.


PyIClassFactory.LockServer

LockServer(bInc)

Called by the client of a class object to keep a server open in memory, allowing instances to be created more quickly.

Parameters

bInc : int

1 of the server should be locked, 0 if the server should be unlocked.


PyIConnectionPoint

PyIConnectionPoint Object

A Python wrapper of a COM IConnectionPoint interface.

Methods

GetConnectionInterface
Retrieves the IID of the interface represented by the connection point.

GetConnectionPointContainer
Gets the connection point container for the object.

Advise
Establishes a connection between the connection point object and the client's sink.

Unadvise
Terminates an advisory connection previously established through PyIConnectionPoint::Advise.

EnumConnections
Creates an enumerator to iterate through the connections for the connection point


PyIConnectionPoint.Advise

int = Advise(unk)

Establishes a connection between the connection point object and the client's sink.

Parameters

unk : PyIUnknown

The client's advise sink

Return Value

The result is the connection point identifier used by PyIConnectionPoint::Unadvise


PyIConnectionPoint.EnumConnections

PyIEnumConnections = EnumConnections()

Creates an enumerator to iterate through the connections for the connection point


PyIConnectionPoint.GetConnectionInterface

PyIID = GetConnectionInterface()

Retrieves the IID of the interface represented by the connection point.


PyIConnectionPoint.GetConnectionPointContainer

PyIConnectionPointContainer = GetConnectionPointContainer()

Gets the connection point container for the object.


PyIConnectionPoint.Unadvise

Unadvise(cookie)

Terminates an advisory connection previously established through IConnectionPoint::Advise. The dwCookie parameter identifies the connection to terminate.

Parameters

cookie : int

The connection token


PyIConnectionPointContainer

PyIConnectionPointContainer Object

A Python wrapper of a COM IConnectionPointContainer interface.

Methods

EnumConnectionPoints
Creates an enumerator object to iterate through all the connection points supported in the connectable object, one connection point per outgoing IID.

FindConnectionPoint
Finds a connection point for the given IID.


PyIConnectionPointContainer.EnumConnectionPoints

PyIEnumConnectionPoints = EnumConnectionPoints()

Creates an enumerator object to iterate through all the connection points supported in the connectable object, one connection point per outgoing IID.


PyIConnectionPointContainer.FindConnectionPoint

PyIConnectionPoint = FindConnectionPoint(iid)

Finds a connection point for the given IID

Parameters

iid : PyIID

The IID of the requested connection.


PyIContextMenu

PyIContextMenu Object

Description of the interface

Methods

QueryContextMenu
Description of QueryContextMenu

InvokeCommand
Description of InvokeCommand

GetCommandString
Description of GetCommandString


PyIContextMenu.GetCommandString

GetCommandString(idCmd, uType, cchMax)

Description of GetCommandString.

Parameters

idCmd : int

Description for idCmd

uType : int

Description for uType

cchMax=2048 : int

Description for cchMax


PyIContextMenu.InvokeCommand

InvokeCommand()

Description of InvokeCommand.


PyIContextMenu.QueryContextMenu

QueryContextMenu(hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags)

Description of QueryContextMenu.

Parameters

hmenu : int

Description for hmenu

indexMenu : int

Description for indexMenu

idCmdFirst : int

Description for idCmdFirst

idCmdLast : int

Description for idCmdLast

uFlags : int

Description for uFlags


PyICopyHook

PyICopyHook Object

Description of the interface

Methods

CopyCallback
Description of CopyCallback


PyICopyHook.CopyCallback

CopyCallback(hwnd, wFunc, wFlags, srcFile, srcAttribs, destFile, destAttribs)

Description of CopyCallback.

Parameters

hwnd : HWND

Description for hwnd

wFunc : int

Description for wFunc

wFlags : int

Description for wFlags

srcFile : string/unicode

Description for srcFile

srcAttribs : int

Description for srcAttribs

destFile : string/unicode

Description for destFile

destAttribs : int

Description for destAttribs


PyICreateTypeInfo

PyICreateTypeInfo Object

Description of the interface

Methods

SetGuid
Description of SetGuid

SetTypeFlags
Description of SetTypeFlags

SetDocString
Description of SetDocString

SetHelpContext
Description of SetHelpContext

SetVersion
Description of SetVersion

AddRefTypeInfo
Description of AddRefTypeInfo

AddFuncDesc
Description of AddFuncDesc

AddImplType
Description of AddImplType

SetImplTypeFlags
Description of SetImplTypeFlags

SetAlignment
Description of SetAlignment

SetSchema
Description of SetSchema

AddVarDesc
Description of AddVarDesc

SetFuncAndParamNames
Description of SetFuncAndParamNames

SetVarName
Description of SetVarName

SetTypeDescAlias
Description of SetTypeDescAlias

DefineFuncAsDllEntry
Description of DefineFuncAsDllEntry

SetFuncDocString
Description of SetFuncDocString

SetVarDocString
Description of SetVarDocString

SetFuncHelpContext
Description of SetFuncHelpContext

SetVarHelpContext
Description of SetVarHelpContext

SetMops
Description of SetMops

LayOut
Description of LayOut


PyICreateTypeInfo.AddFuncDesc

AddFuncDesc(index)

Description of AddFuncDesc.

Parameters

index : int

Description for index


PyICreateTypeInfo.AddImplType

AddImplType(index, hRefType)

Description of AddImplType.

Parameters

index : int

Description for index

hRefType : int

A hRefType


PyICreateTypeInfo.AddRefTypeInfo

AddRefTypeInfo(pTInfo)

Description of AddRefTypeInfo.

Parameters

pTInfo : PyITypeInfo

Description for pTInfo


PyICreateTypeInfo.AddVarDesc

AddVarDesc(index)

Description of AddVarDesc.

Parameters

index : int

Description for index


PyICreateTypeInfo.DefineFuncAsDllEntry

DefineFuncAsDllEntry(index, szDllName, szProcName)

Description of DefineFuncAsDllEntry.

Parameters

index : int

Description for index

szDllName : unicode

Description for szDllName

szProcName : unicode

Description for szProcName


PyICreateTypeInfo.LayOut

LayOut()

Description of LayOut.


PyICreateTypeInfo.SetAlignment

SetAlignment(cbAlignment)

Description of SetAlignment.

Parameters

cbAlignment : int

Description for cbAlignment


PyICreateTypeInfo.SetDocString

SetDocString(pStrDoc)

Description of SetDocString.

Parameters

pStrDoc : unicode

Description for pStrDoc


PyICreateTypeInfo.SetFuncAndParamNames

SetFuncAndParamNames(index, rgszNames)

Description of SetFuncAndParamNames.

Parameters

index : int

Index of the item to set.

rgszNames : (unicode , ...)

A sequence of unicode or String objects.


PyICreateTypeInfo.SetFuncDocString

SetFuncDocString(index, szDocString)

Description of SetFuncDocString.

Parameters

index : int

Description for index

szDocString : unicode

Description for szDocString


PyICreateTypeInfo.SetFuncHelpContext

SetFuncHelpContext(index, dwHelpContext)

Description of SetFuncHelpContext.

Parameters

index : int

Description for index

dwHelpContext : int

Description for dwHelpContext


PyICreateTypeInfo.SetGuid

SetGuid(guid)

Description of SetGuid.

Parameters

guid : PyIID

Description for guid


PyICreateTypeInfo.SetHelpContext

SetHelpContext(dwHelpContext)

Description of SetHelpContext.

Parameters

dwHelpContext : int

Description for dwHelpContext


PyICreateTypeInfo.SetImplTypeFlags

SetImplTypeFlags(index, implTypeFlags)

Description of SetImplTypeFlags.

Parameters

index : int

Description for index

implTypeFlags : int

Description for implTypeFlags


PyICreateTypeInfo.SetMops

SetMops(index, bstrMops)

Description of SetMops.

Parameters

index : int

Description for index

bstrMops : unicode

Description for bstrMops


PyICreateTypeInfo.SetSchema

SetSchema(pStrSchema)

Description of SetSchema.

Parameters

pStrSchema : unicode

Description for pStrSchema


PyICreateTypeInfo.SetTypeDescAlias

SetTypeDescAlias()

Description of SetTypeDescAlias.


PyICreateTypeInfo.SetTypeFlags

SetTypeFlags(uTypeFlags)

Description of SetTypeFlags.

Parameters

uTypeFlags : int

Description for uTypeFlags


PyICreateTypeInfo.SetVarDocString

SetVarDocString(index, szDocString)

Description of SetVarDocString.

Parameters

index : int

Description for index

szDocString : unicode

Description for szDocString


PyICreateTypeInfo.SetVarHelpContext

SetVarHelpContext(index, dwHelpContext)

Description of SetVarHelpContext.

Parameters

index : int

Description for index

dwHelpContext : int

Description for dwHelpContext


PyICreateTypeInfo.SetVarName

SetVarName(index, szName)

Description of SetVarName.

Parameters

index : int

Description for index

szName : unicode

Description for szName


PyICreateTypeInfo.SetVersion

SetVersion(wMajorVerNum, wMinorVerNum)

Description of SetVersion.

Parameters

wMajorVerNum : int

Description for wMajorVerNum

wMinorVerNum : int

Description for wMinorVerNum


PyICreateTypeLib

PyICreateTypeLib Object

Description of the interface

Methods

CreateTypeInfo
Description of CreateTypeInfo

SetName
Description of SetName

SetVersion
Description of SetVersion

SetGuid
Description of SetGuid

SetDocString
Description of SetDocString

SetHelpFileName
Description of SetHelpFileName

SetHelpContext
Description of SetHelpContext

SetLcid
Description of SetLcid

SetLibFlags
Description of SetLibFlags

SaveAllChanges
Description of SaveAllChanges


PyICreateTypeLib.CreateTypeInfo

CreateTypeInfo(szName)

Description of CreateTypeInfo.

Parameters

szName : unicode

Description for szName


PyICreateTypeLib.SaveAllChanges

SaveAllChanges()

Description of SaveAllChanges.


PyICreateTypeLib.SetDocString

SetDocString(szDoc)

Description of SetDocString.

Parameters

szDoc : unicode

Description for szDoc


PyICreateTypeLib.SetGuid

SetGuid(guid)

Description of SetGuid.

Parameters

guid : PyIID

Description for guid


PyICreateTypeLib.SetHelpContext

SetHelpContext(dwHelpContext)

Description of SetHelpContext.

Parameters

dwHelpContext : int

Description for dwHelpContext


PyICreateTypeLib.SetHelpFileName

SetHelpFileName(szHelpFileName)

Description of SetHelpFileName.

Parameters

szHelpFileName : unicode

Description for szHelpFileName


PyICreateTypeLib.SetLcid

SetLcid()

Description of SetLcid.


PyICreateTypeLib.SetLibFlags

SetLibFlags(uLibFlags)

Description of SetLibFlags.

Parameters

uLibFlags : int

Description for uLibFlags


PyICreateTypeLib.SetName

SetName(szName)

Description of SetName.

Parameters

szName : unicode

Description for szName


PyICreateTypeLib.SetVersion

SetVersion(wMajorVerNum, wMinorVerNum)

Description of SetVersion.

Parameters

wMajorVerNum : int

Description for wMajorVerNum

wMinorVerNum : int

Description for wMinorVerNum


PyIDL

PyIDL Object

A Python representation of an IDL. Implemented as a Python string. FALSE*/)

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.


PyIDataObject

PyIDataObject Object

Description of the interface

Methods

GetData
Description of GetData

GetDataHere
Description of GetDataHere

QueryGetData
Description of QueryGetData

GetCanonicalFormatEtc
Description of GetCanonicalFormatEtc

SetData
Description of SetData

EnumFormatEtc
Description of EnumFormatEtc

DAdvise
Description of DAdvise

DUnadvise
Description of DUnadvise

EnumDAdvise
Description of EnumDAdvise


PyIDataObject.DAdvise

int = DAdvise(pformatetc, advf , pAdvSink )

Description of DAdvise.

Parameters

pformatetc : PyFORMATETC

Description for pformatetc

advf : int

Description for advf

pAdvSink : PyIAdviseSink *

Description for pAdvSink


PyIDataObject.DUnadvise

DUnadvise(dwConnection)

Description of DUnadvise.

Parameters

dwConnection : int

Description for dwConnection


PyIDataObject.EnumDAdvise

PyIEnumSTATDATA = EnumDAdvise()

Description of EnumDAdvise.


PyIDataObject.EnumFormatEtc

PyIEnumFORMATETC = EnumFormatEtc(dwDirection)

Description of EnumFormatEtc.

Parameters

dwDirection=DATADIR_GET : int

Description for dwDirection


PyIDataObject.GetCanonicalFormatEtc

GetCanonicalFormatEtc(pformatectIn)

Description of GetCanonicalFormatEtc.

Parameters

pformatectIn : PyFORMATETC *

Description for pformatectIn


PyIDataObject.GetData

PySTGMEDIUM = GetData(pformatetcIn)

Description of GetData.

Parameters

pformatetcIn : PyFORMATETC

Description for pformatetcIn


PyIDataObject.GetDataHere

PySTGMEDIUM = GetDataHere(pformatetcIn)

Description of GetDataHere.

Parameters

pformatetcIn : PyFORMATETC

Description for pformatetcIn


PyIDataObject.QueryGetData

QueryGetData(pformatetc)

Description of QueryGetData.

Parameters

pformatetc : PyFORMATETC

Description for pformatetc


PyIDataObject.SetData

SetData(pformatetc, pmedium, fRelease)

Description of SetData.

Parameters

pformatetc : PyFORMATETC

Description for pformatetc

pmedium : PySTGMEDIUM *

Description for pmedium

fRelease : int

Description for fRelease


PyIDebugApplication

PyIDebugApplication Object

This interface is an extension of PyIRemoteDebugApplication, exposing non-remotable methods for use by language engines and hosts.

Methods

SetName
Sets the name of the application.

StepOutComplete
Called by language engines, in single step mode, just before they return to their caller.

DebugOutput
Causes the given string to be displayed by the debugger IDE.

StartDebugSession
Causes a default debugger IDE to be started.

HandleBreakPoint
Called by the language engine in the context of a thread that has hit a breakpoint.

Close
Causes this application to release all references and enter a zombie state.

GetBreakFlags
Returns the current break flags for the application.

GetCurrentThread
Returns the application thread object associated with the currently running thread.

CreateAsyncDebugOperation
Creates an IDebugAsyncOperation object to wrap a provided PyIDebugSyncOperation object.

AddStackFrameSniffer
Adds a stack frame sniffer to this application.

RemoveStackFrameSniffer
Removes a stack frame sniffer from this application.

QueryCurrentThreadIsDebuggerThread
Determines if the current running thread is the debugger thread.

SynchronousCallInDebuggerThread
Provides a mechanism for the caller to run code in the debugger thread.

CreateApplicationNode
Creates a new application node which is associated with a specific document provider.

FireDebuggerEvent
Fire a generic event to the IApplicationDebugger (if any)

HandleRuntimeError
Description of HandleRuntimeError

FCanJitDebug
Description of FCanJitDebug

FIsAutoJitDebugEnabled
Description of FIsAutoJitDebugEnabled

AddGlobalExpressionContextProvider
Description of AddGlobalExpressionContextProvider

RemoveGlobalExpressionContextProvider
Description of RemoveGlobalExpressionContextProvider


PyIDebugApplication.AddGlobalExpressionContextProvider

AddGlobalExpressionContextProvider(pdsfs)

Description of AddGlobalExpressionContextProvider.

Parameters

pdsfs : PyIProvideExpressionContexts

Description for pdsfs


PyIDebugApplication.AddStackFrameSniffer

int = AddStackFrameSniffer(pdsfs)

Adds a stack frame sniffer to this application.

Parameters

pdsfs : PyIDebugStackFrameSniffer

Description for pdsfs

Comments

Generally called by a language engine to expose its stack frames to the debugger. It is possible for other entities to expose stack frames.

Return Value

The result is an integer cookie, to be passed to PyIDebugApplication::RemoveStackFrameSniffer


PyIDebugApplication.Close

Close()

Causes this application to release all references and enter a zombie state.

Comments

Called by the owner of the application generally on shut down.


PyIDebugApplication.CreateApplicationNode

PyIDebugApplicationNode = CreateApplicationNode()

Creates a new application node which is associated with a specific document provider.

Comments

Before it is visible, the new node must be attached to a parent node.


PyIDebugApplication.CreateAsyncDebugOperation

CreateAsyncDebugOperation(psdo)

Creates an IDebugAsyncOperation object to wrap a provided PyIDebugSyncOperation object.

Parameters

psdo : PyIDebugSyncOperation

Description for psdo

Comments

This provides a mechanism for language engines to implement asynchronous expression and evaluation, etc. without having to know the details of synchronization with the debugger thread. See the descriptions for PyIDebugSyncOperation and PyIDebugAsyncOperation for more details.


PyIDebugApplication.DebugOutput

DebugOutput(pstr)

Causes the given string to be displayed by the debugger IDE, normally in an output window.

Parameters

pstr : unicode

Description for pstr

Comments

This mechanism provides the means for a language engine to implement language specific debugging output support. Example: Debug.writeln("Help") in JavaScript.


PyIDebugApplication.FCanJitDebug

FCanJitDebug()

Description of FCanJitDebug.


PyIDebugApplication.FIsAutoJitDebugEnabled

FIsAutoJitDebugEnabled()

Description of FIsAutoJitDebugEnabled.


PyIDebugApplication.FireDebuggerEvent

FireDebuggerEvent(guid, unknown)

Fire a generic event to the IApplicationDebugger (if any)

Parameters

guid : PyIIID

A GUID.

unknown : PyIUnknown

An unknown object.


PyIDebugApplication.GetBreakFlags

int = GetBreakFlags()

Returns the current break flags for the application.


PyIDebugApplication.GetCurrentThread

PyIDebugApplicationThread = GetCurrentThread()

Returns the application thread object associated with the currently running thread.


PyIDebugApplication.HandleBreakPoint

int = HandleBreakPoint(br)

Called by the language engine in the context of a thread that has hit a breakpoint.

Parameters

br : int

Break reason - one of the BREAKREASON_* constants.

Comments

This method causes the current thread to block and a notification of the breakpoint to be sent to the debugger IDE. When the debugger IDE resumes the application this method returns with the action to be taken.

Note: While in the breakpoint the language engine may be called in this thread to do various things such as enumerating stack frames or evaluating expressions.

Return Value

The result is the break resume action - one of the BREAKRESUMEACTION contsants.


PyIDebugApplication.HandleRuntimeError

HandleRuntimeError(pErrorDebug, pScriptSite)

Description of HandleRuntimeError.

Parameters

pErrorDebug : PyIActiveScriptErrorDebug

Description for pErrorDebug

pScriptSite : PyIActiveScriptSite

Description for pScriptSite


PyIDebugApplication.QueryCurrentThreadIsDebuggerThread

QueryCurrentThreadIsDebuggerThread()

Determines if the current running thread is the debugger thread.

Return Value

Returns S_OK if the current running thread is the debugger thread. Otherwise, returns S_FALSE.


PyIDebugApplication.RemoveGlobalExpressionContextProvider

RemoveGlobalExpressionContextProvider(dwCookie)

Description of RemoveGlobalExpressionContextProvider.

Parameters

dwCookie : int

Description for dwCookie


PyIDebugApplication.RemoveStackFrameSniffer

RemoveStackFrameSniffer(dwCookie)

Removes a stack frame sniffer from this application.

Parameters

dwCookie : int

A cookie obtained from PyIDebugApplication::AddStackFrameSniffer


PyIDebugApplication.SetName

SetName(pstrName)

Sets the name of the application.

Parameters

pstrName : unicode

The name of the application.

Comments

The provided name will be returned in subsequent calls to >om PyIRemoteDebugApplication.GetName>.


PyIDebugApplication.StartDebugSession

StartDebugSession()

Causes a default debugger IDE to be started and a debug session to be attached to this application if one does not already exist.

Comments

This is used to implement just-in-time debugging.


PyIDebugApplication.StepOutComplete

StepOutComplete()

Called by language engines, in single step mode, just before they return to their caller.

Comments

The process debug manager uses this opportunity to notify all other script engines that they should break at the first opportunity. This is how cross language step modes are implemented.


PyIDebugApplication.SynchronousCallInDebuggerThread

SynchronousCallInDebuggerThread(pptc, dwParam1, dwParam2, dwParam3)

Provides a mechanism for the caller to run code in the debugger thread.

Parameters

pptc : PyIDebugThreadCall

Description for pptc

dwParam1 : int

Description for dwParam1

dwParam2 : int

Description for dwParam2

dwParam3 : int

Description for dwParam3

Comments

This is generally used so that language engines and hosts can implement free threaded objects on top of their single threaded implementations.


PyIDebugApplicationNode

PyIDebugApplicationNode Object

Provides the functionality of IDebugDocumentProvider, plus a context within a project tree. Derived from PyIDebugDocumentProvider

Methods

EnumChildren
Description of EnumChildren

GetParent
Description of GetParent

SetDocumentProvider
Description of SetDocumentProvider

Close
Description of Close

Attach
Attach a node to its parent.

Detach
Detach a node from its parent.


PyIDebugApplicationNode.Attach

Attach(pdanParent)

Attach a node to its parent.

Parameters

pdanParent : PyIDebugApplicationNode

The parent node. None is not acceptable.


PyIDebugApplicationNode.Close

Close()

Description of Close.


PyIDebugApplicationNode.Detach

Detach()

Detach a node from its parent.


PyIDebugApplicationNode.EnumChildren

EnumChildren()

Description of EnumChildren.


PyIDebugApplicationNode.GetParent

PyIDebugApplicationNode = GetParent()

Returns the parent node.


PyIDebugApplicationNode.SetDocumentProvider

SetDocumentProvider(pddp)

Description of SetDocumentProvider.

Parameters

pddp : PyIDebugDocumentProvider

Description for pddp


PyIDebugApplicationNodeEvents

PyIDebugApplicationNodeEvents Object

Description of the interface

Methods

onAddChild
Description of onAddChild

onRemoveChild
Description of onRemoveChild

onDetach
Description of onDetach

onAttach
Description of onAttach


PyIDebugApplicationNodeEvents.onAddChild

onAddChild(prddpChild)

Description of onAddChild.

Parameters

prddpChild : PyIDebugApplicationNode

Description for prddpChild


PyIDebugApplicationNodeEvents.onAttach

onAttach(prddpParent)

Description of onAttach.

Parameters

prddpParent : PyIDebugApplicationNode

Description for prddpParent


PyIDebugApplicationNodeEvents.onDetach

onDetach()

Description of onDetach.


PyIDebugApplicationNodeEvents.onRemoveChild

onRemoveChild(prddpChild)

Description of onRemoveChild.

Parameters

prddpChild : PyIDebugApplicationNode

Description for prddpChild


PyIDebugApplicationThread

PyIDebugApplicationThread Object

Description of the interface

Methods

SynchronousCallIntoThread
Description of SynchronousCallIntoThread

QueryIsCurrentThread
Description of QueryIsCurrentThread

QueryIsDebuggerThread
Description of QueryIsDebuggerThread

QueryIsDebuggerThread
Description of SetDescription

QueryIsDebuggerThread
Description of SetStateString


PyIDebugApplicationThread.QueryIsCurrentThread

QueryIsCurrentThread()

Description of QueryIsCurrentThread.


PyIDebugApplicationThread.QueryIsDebuggerThread

QueryIsDebuggerThread()

Description of QueryIsDebuggerThread.


PyIDebugApplicationThread.SynchronousCallIntoThread

SynchronousCallIntoThread(pstcb, dwParam1, dwParam2, dwParam3)

Description of SynchronousCallIntoThread.

Parameters

pstcb : PyIDebugThreadCall

Description for pstcb

dwParam1 : int

Description for dwParam1

dwParam2 : int

Description for dwParam2

dwParam3 : int

Description for dwParam3


PyIDebugCodeContext

PyIDebugCodeContext Object

Description of the interface

Methods

GetDocumentContext
Description of GetDocumentContext

SetBreakPoint
Description of SetBreakPoint


PyIDebugCodeContext.GetDocumentContext

GetDocumentContext()

Description of GetDocumentContext.


PyIDebugCodeContext.SetBreakPoint

SetBreakPoint(bps)

Description of SetBreakPoint.

Parameters

bps : int

Description for bps


PyIDebugDocument

PyIDebugDocument Object

The base interface to all debug documents. Derived from PyIDebugDocumentInfo


PyIDebugDocumentContext

PyIDebugDocumentContext Object

Description of the interface

Methods

GetDocument
Description of GetDocument

EnumCodeContexts
Description of EnumCodeContexts


PyIDebugDocumentContext.EnumCodeContexts

EnumCodeContexts()

Description of EnumCodeContexts.


PyIDebugDocumentContext.GetDocument

GetDocument()

Description of GetDocument.


PyIDebugDocumentHelper

PyIDebugDocumentHelper Object

Description of the interface

Methods

Init
Description of Init

Attach
Add the document to the doc tree

Detach
Description of Detach

AddUnicodeText
Description of AddUnicodeText

AddDBCSText
Description of AddDBCSText

SetDebugDocumentHost
Description of SetDebugDocumentHost

AddDeferredText
Description of AddDeferredText

DefineScriptBlock
Description of DefineScriptBlock

SetDefaultTextAttr
Description of SetDefaultTextAttr

SetTextAttributes
Description of SetTextAttributes

SetLongName
Description of SetLongName

SetShortName
Description of SetShortName

SetDocumentAttr
Description of SetDocumentAttr

GetDebugApplicationNode
Description of GetDebugApplicationNode

GetScriptBlockInfo
Description of GetScriptBlockInfo

CreateDebugDocumentContext
Description of CreateDebugDocumentContext

BringDocumentToTop
Description of BringDocumentToTop

BringDocumentContextToTop
Description of BringDocumentContextToTop


PyIDebugDocumentHelper.AddDBCSText

AddDBCSText()

Description of AddDBCSText.


PyIDebugDocumentHelper.AddDeferredText

AddDeferredText(cChars, dwTextStartCookie)

Description of AddDeferredText.

Parameters

cChars : int

Description for cChars

dwTextStartCookie : int

Description for dwTextStartCookie


PyIDebugDocumentHelper.AddUnicodeText

AddUnicodeText(pszText)

Description of AddUnicodeText.

Parameters

pszText : unicode

Description for pszText


PyIDebugDocumentHelper.Attach

Attach(pddhParent)

Add the document to the doc tree

Parameters

pddhParent : PyIDebugDocumentHelper

Parent item. If none, this item is top level.


PyIDebugDocumentHelper.BringDocumentContextToTop

BringDocumentContextToTop(pddc)

Description of BringDocumentContextToTop.

Parameters

pddc : PyIDebugDocumentContext

Description for pddc


PyIDebugDocumentHelper.BringDocumentToTop

BringDocumentToTop()

Description of BringDocumentToTop.


PyIDebugDocumentHelper.CreateDebugDocumentContext

CreateDebugDocumentContext(iCharPos, cChars)

Description of CreateDebugDocumentContext.

Parameters

iCharPos : int

Description for iCharPos

cChars : int

Description for cChars


PyIDebugDocumentHelper.DefineScriptBlock

DefineScriptBlock(ulCharOffset, cChars, pas, fScriptlet)

Description of DefineScriptBlock.

Parameters

ulCharOffset : int

Description for ulCharOffset

cChars : int

Description for cChars

pas : PyIActiveScript

Description for pas

fScriptlet : int

Description for fScriptlet


PyIDebugDocumentHelper.Detach

Detach()

Description of Detach.


PyIDebugDocumentHelper.GetDebugApplicationNode

GetDebugApplicationNode()

Description of GetDebugApplicationNode.


PyIDebugDocumentHelper.GetScriptBlockInfo

GetScriptBlockInfo(dwSourceContext)

Description of GetScriptBlockInfo.

Parameters

dwSourceContext : int

Description for dwSourceContext


PyIDebugDocumentHelper.Init

Init(pda, pszShortName, pszLongName, docAttr)

Description of Init.

Parameters

pda : PyIDebugApplication

Description for pda

pszShortName : unicode

Description for pszShortName

pszLongName : unicode

Description for pszLongName

docAttr : int

Description for docAttr


PyIDebugDocumentHelper.SetDebugDocumentHost

SetDebugDocumentHost(pddh)

Description of SetDebugDocumentHost.

Parameters

pddh : PyIDebugDocumentHost

Description for pddh


PyIDebugDocumentHelper.SetDefaultTextAttr

SetDefaultTextAttr(staTextAttr)

Description of SetDefaultTextAttr.

Parameters

staTextAttr : int

Description for staTextAttr


PyIDebugDocumentHelper.SetDocumentAttr

SetDocumentAttr(pszAttributes)

Description of SetDocumentAttr.

Parameters

pszAttributes : int

Description for pszAttributes


PyIDebugDocumentHelper.SetLongName

SetLongName(pszLongName)

Description of SetLongName.

Parameters

pszLongName : unicode

Description for pszLongName


PyIDebugDocumentHelper.SetShortName

SetShortName(pszShortName)

Description of SetShortName.

Parameters

pszShortName : unicode

Description for pszShortName


PyIDebugDocumentHelper.SetTextAttributes

SetTextAttributes(ulCharOffset, obAttr)

Description of SetTextAttributes.

Parameters

ulCharOffset : int

Description for ulCharOffset

obAttr : object

A sequence of attributes.


PyIDebugDocumentHost

PyIDebugDocumentHost Object

Description of the interface

Methods

GetDeferredText
Description of GetDeferredText

GetScriptTextAttributes
Description of GetScriptTextAttributes

OnCreateDocumentContext
Description of OnCreateDocumentContext

GetPathName
Description of GetPathName

GetFileName
Description of GetFileName

NotifyChanged
Description of NotifyChanged


PyIDebugDocumentHost.GetDeferredText

GetDeferredText(dwTextStartCookie, cMaxChars)

Description of GetDeferredText.

Parameters

dwTextStartCookie : int

Description for dwTextStartCookie

cMaxChars : int

Description for cMaxChars


PyIDebugDocumentHost.GetFileName

GetFileName()

Description of GetFileName.


PyIDebugDocumentHost.GetPathName

GetPathName()

Description of GetPathName.


PyIDebugDocumentHost.GetScriptTextAttributes

GetScriptTextAttributes(pstrCode, pstrDelimiter, dwFlags)

Description of GetScriptTextAttributes.

Parameters

pstrCode : unicode

Description for pstrCode

pstrDelimiter : unicode

Description for pstrDelimiter

dwFlags : int

Description for dwFlags


PyIDebugDocumentHost.NotifyChanged

NotifyChanged()

Description of NotifyChanged.


PyIDebugDocumentHost.OnCreateDocumentContext

OnCreateDocumentContext()

Description of OnCreateDocumentContext.


PyIDebugDocumentInfo

PyIDebugDocumentInfo Object

Provides information on a document, which may or may not be instantiated.

Methods

GetName
Returns the specified name for the document.

GetDocumentClassId
Returns a CLSID describing the document type.


PyIDebugDocumentInfo.GetDocumentClassId

PyIID = GetDocumentClassId()

Returns a CLSID describing the document type.


PyIDebugDocumentInfo.GetName

GetName()

Returns the specified name for the document.


PyIDebugDocumentProvider

PyIDebugDocumentProvider Object

Provides the means for instanciating a document on demand. Derived from PyIDebugDocumentInfo.

Methods

GetDocument
Causes the document to be instantiated if it does not already exist.


PyIDebugDocumentProvider.GetDocument

PyIDebugDocument = GetDocument()

Causes the document to be instantiated if it does not already exist.


PyIDebugDocumentText

PyIDebugDocumentText Object

The interface to a text only debug document. Derived from PyIDebugDocument

Methods

GetDocumentAttributes
Description of GetDocumentAttributes

GetSize
Description of GetSize

GetPositionOfLine
Description of GetPositionOfLine

GetLineOfPosition
Description of GetLineOfPosition

GetText
Description of GetText

GetPositionOfContext
Description of GetPositionOfContext

GetContextOfPosition
Description of GetContextOfPosition


PyIDebugDocumentText.GetContextOfPosition

GetContextOfPosition(cCharacterPosition, cNumChars)

Description of GetContextOfPosition.

Parameters

cCharacterPosition : int

Description for cCharacterPosition

cNumChars : int

Description for cNumChars


PyIDebugDocumentText.GetDocumentAttributes

GetDocumentAttributes()

Description of GetDocumentAttributes.


PyIDebugDocumentText.GetLineOfPosition

GetLineOfPosition(cCharacterPosition)

Description of GetLineOfPosition.

Parameters

cCharacterPosition : int

Description for cCharacterPosition


PyIDebugDocumentText.GetPositionOfContext

GetPositionOfContext(psc)

Description of GetPositionOfContext.

Parameters

psc : PyIDebugDocumentContext

Description for psc


PyIDebugDocumentText.GetPositionOfLine

GetPositionOfLine(cLineNumber)

Description of GetPositionOfLine.

Parameters

cLineNumber : int

Description for cLineNumber


PyIDebugDocumentText.GetSize

GetSize()

Description of GetSize.


PyIDebugDocumentText.GetText

GetText(cCharacterPosition, cMaxChars, bWantAttr)

Description of GetText.

Parameters

cCharacterPosition : int

cMaxChars : int

Max chars to return

bWantAttr=1 : int

Should the attributes be returned?


PyIDebugDocumentTextAuthor

PyIDebugDocumentTextAuthor Object

This preliminary interface is provided by text documents that support editing. Derived from PyIDebugDocumentText

Methods

InsertText
Description of InsertText

RemoveText
Description of RemoveText

ReplaceText
Description of ReplaceText


PyIDebugDocumentTextAuthor.InsertText

InsertText(cCharacterPosition, cNumToInsert, pcharText)

Description of InsertText.

Parameters

cCharacterPosition : int

Description for cCharacterPosition

cNumToInsert : int

Description for cNumToInsert

pcharText : unicode

Description for pcharText


PyIDebugDocumentTextAuthor.RemoveText

RemoveText(cCharacterPosition, cNumToRemove)

Description of RemoveText.

Parameters

cCharacterPosition : int

Description for cCharacterPosition

cNumToRemove : int

Description for cNumToRemove


PyIDebugDocumentTextAuthor.ReplaceText

ReplaceText(cCharacterPosition, cNumToReplace, pcharText)

Description of ReplaceText.

Parameters

cCharacterPosition : int

Description for cCharacterPosition

cNumToReplace : int

Description for cNumToReplace

pcharText : unicode

Description for pcharText


PyIDebugDocumentTextEvents

PyIDebugDocumentTextEvents Object

Description of the interface

Methods

onDestroy
Description of onDestroy

onInsertText
Description of onInsertText

onRemoveText
Description of onRemoveText

onReplaceText
Description of onReplaceText

onUpdateTextAttributes
Description of onUpdateTextAttributes

onUpdateDocumentAttributes
Description of onUpdateDocumentAttributes


PyIDebugDocumentTextEvents.onDestroy

onDestroy()

Description of onDestroy.


PyIDebugDocumentTextEvents.onInsertText

onInsertText(cCharacterPosition, cNumToInsert)

Description of onInsertText.

Parameters

cCharacterPosition : int

Description for cCharacterPosition

cNumToInsert : int

Description for cNumToInsert


PyIDebugDocumentTextEvents.onRemoveText

onRemoveText(cCharacterPosition, cNumToRemove)

Description of onRemoveText.

Parameters

cCharacterPosition : int

Description for cCharacterPosition

cNumToRemove : int

Description for cNumToRemove


PyIDebugDocumentTextEvents.onReplaceText

onReplaceText(cCharacterPosition, cNumToReplace)

Description of onReplaceText.

Parameters

cCharacterPosition : int

Description for cCharacterPosition

cNumToReplace : int

Description for cNumToReplace


PyIDebugDocumentTextEvents.onUpdateDocumentAttributes

onUpdateDocumentAttributes(textdocattr)

Description of onUpdateDocumentAttributes.

Parameters

textdocattr : int

Description for textdocattr


PyIDebugDocumentTextEvents.onUpdateTextAttributes

onUpdateTextAttributes(cCharacterPosition, cNumToUpdate)

Description of onUpdateTextAttributes.

Parameters

cCharacterPosition : int

Description for cCharacterPosition

cNumToUpdate : int

Description for cNumToUpdate


PyIDebugDocumentTextExternalAuthor

PyIDebugDocumentTextExternalAuthor Object

Description of the interface

Methods

GetPathName
Description of GetPathName

GetFileName
Description of GetFileName

NotifyChanged
Description of NotifyChanged


PyIDebugDocumentTextExternalAuthor.GetFileName

GetFileName()

Description of GetFileName.


PyIDebugDocumentTextExternalAuthor.GetPathName

GetPathName()

Description of GetPathName.


PyIDebugDocumentTextExternalAuthor.NotifyChanged

NotifyChanged()

Description of NotifyChanged.


PyIDebugExpression

PyIDebugExpression Object

Description of the interface

Methods

Start
Description of Start

Abort
Description of Abort

QueryIsComplete
Description of QueryIsComplete

GetResultAsString
Description of GetResultAsString

GetResultAsDebugProperties
Description of GetResultAsDebugProperties


PyIDebugExpression.Abort

Abort()

Description of Abort.


PyIDebugExpression.GetResultAsDebugProperties

GetResultAsDebugProperties()

Description of GetResultAsDebugProperty.


PyIDebugExpression.GetResultAsString

GetResultAsString()

Description of GetResultAsString.


PyIDebugExpression.QueryIsComplete

QueryIsComplete()

Description of QueryIsComplete.


PyIDebugExpression.Start

Start(pdecb)

Description of Start.

Parameters

pdecb : PyIDebugExpressionCallBack

Description for pdecb


PyIDebugExpressionCallBack

PyIDebugExpressionCallBack Object

Description of the interface

Methods

onComplete
Description of onComplete


PyIDebugExpressionCallBack.onComplete

onComplete()

Description of onComplete.


PyIDebugExpressionContext

PyIDebugExpressionContext Object

Description of the interface

Methods

ParseLanguageText
Description of ParseLanguageText

GetLanguageInfo
Description of GetLanguageInfo


PyIDebugExpressionContext.GetLanguageInfo

GetLanguageInfo()

Description of GetLanguageInfo.


PyIDebugExpressionContext.ParseLanguageText

ParseLanguageText(pstrCode, nRadix, pstrDelimiter, dwFlags)

Description of ParseLanguageText.

Parameters

pstrCode : unicode

Description for pstrCode

nRadix : int

Description for nRadix

pstrDelimiter : unicode

Description for pstrDelimiter

dwFlags : int

Description for dwFlags


PyIDebugProperty

PyIDebugProperty Object

Description of the interface

Methods

GetPropertyInfo
Description of GetPropertyInfo

GetExtendedInfo
Description of GetExtendedInfo

SetValueAsString
Description of SetValueAsString

EnumMembers
Description of EnumMembers

GetParent
Description of GetParent


PyIDebugProperty.EnumMembers

EnumMembers(dwFieldSpec, nRadix, refiid)

Description of EnumMembers.

Parameters

dwFieldSpec : int

Description for dwFieldSpec

nRadix : int

Description for nRadix

refiid : PyIID

Description for refiid


PyIDebugProperty.GetExtendedInfo

GetExtendedInfo()

Description of GetExtendedInfo.


PyIDebugProperty.GetParent

GetParent()

Description of GetParent.


PyIDebugProperty.GetPropertyInfo

GetPropertyInfo(dwFieldSpec, nRadix)

Description of GetPropertyInfo.

Parameters

dwFieldSpec : int

Description for dwFieldSpec

nRadix : int

Description for nRadix


PyIDebugProperty.SetValueAsString

SetValueAsString(pszValue, nRadix)

Description of SetValueAsString.

Parameters

pszValue : unicode

Description for pszValue

nRadix : int

Description for nRadix


PyIDebugSessionProvider

PyIDebugSessionProvider Object

Description of the interface

Methods

StartDebugSession
Description of StartDebugSession


PyIDebugSessionProvider.StartDebugSession

StartDebugSession(pda)

Description of StartDebugSession.

Parameters

pda : PyIRemoteDebugApplication

Description for pda


PyIDebugStackFrame

PyIDebugStackFrame Object

Description of the interface

Methods

GetCodeContext
Returns the current code context associated with the stack frame.

GetDescriptionString
Returns a short or long textual description of the stack frame.

GetLanguageString
Returns a short or long textual description of the language.

GetThread
Returns the thread associated with this stack frame.

GetThread
Returns the debug property object associated with this stack frame.


PyIDebugStackFrame.GetCodeContext

GetCodeContext()

Returns the current code context associated with the stack frame.


PyIDebugStackFrame.GetDescriptionString

unicode = GetDescriptionString(fLong)

Returns a short or long textual description of the stack frame.

Parameters

fLong : int

If false, provide only the name of the function associated with the stack frame. When true it may also provide the parameter(s) to the function or whatever else is relevant.


PyIDebugStackFrame.GetLanguageString

unicode = GetLanguageString(fLong)

Returns a short or long textual description of the language.

Parameters

fLong : int

If False, just the language name should be provided, eg, "Python". If True a full product description may be provided (eg, "Python 1.4 ActiveX Debugging Host")


PyIDebugStackFrame.GetThread

PyIDebugApplicationThread = GetThread()

Returns the thread associated with this stack frame.


PyIDebugStackFrameSniffer

PyIDebugStackFrameSniffer Object

Description of the interface

Methods

EnumStackFrames
Description of EnumStackFrames


PyIDebugStackFrameSniffer.EnumStackFrames

EnumStackFrames()

Description of EnumStackFrames.


PyIDebugStackFrameSnifferEx

PyIDebugStackFrameSnifferEx Object

Derived from PyIDebugStackFrameSniffer

Methods

EnumStackFramesEx
Description of EnumStackFramesEx


PyIDebugStackFrameSnifferEx.EnumStackFramesEx

EnumStackFramesEx()

Description of EnumStackFrames.


PyIDebugSyncOperation

PyIDebugSyncOperation Object

Description of the interface

Methods

GetTargetThread
Description of GetTargetThread

Execute
Description of Execute

InProgressAbort
Description of InProgressAbort


PyIDebugSyncOperation.Execute

Execute()

Description of Execute.


PyIDebugSyncOperation.GetTargetThread

GetTargetThread()

Description of GetTargetThread.


PyIDebugSyncOperation.InProgressAbort

InProgressAbort()

Description of InProgressAbort.


PyIDispatch

PyIDispatch Object

A OLE automation client object.

Methods

Invoke
Invokes a DISPID, using the passed arguments.

InvokeTypes
Invokes a DISPID, using the passed arguments and type descriptions.

GetIDsOfNames
Get the DISPID for the passed names.

GetTypeInfo
Get type information for the object.

GetTypeInfoCount
Retrieves the number of PyITypeInfos the object provides.


PyIDispatch.GetIDsOfNames

(int, ...)/int = GetIDsOfNames(name)

Get the DISPID for the passed names.

Parameters

name : string

A name to query for

Alternative Parameters

[name, ...]

A sequence of string names to query

Comments

Currently the LCID can not be specified, and LOCALE_SYSTEM_DEFAULT is used.

Return Value

If the first parameter is a sequence, the result will be a tuple of integers for each name in the sequence. If the first parameter is a single string, the result is a single integer with the ID of requested item.


PyIDispatch.GetTypeInfo

PyITypeInfo = GetTypeInfo(locale)

Get type information for the object.

Parameters

locale=LOCALE_USER_DEFAULT : int

The locale to use.


PyIDispatch.GetTypeInfoCount

int = GetTypeInfoCount()

Retrieves the number of PyITypeInfos the object provides.


PyIDispatch.Invoke

object = Invoke(dispid, lcid , flags , bResultWanted , params, ... )

Invokes a DISPID, using the passed arguments.

Parameters

dispid : int

The dispid to use. Typically this value will come from PyIDispatch::GetIDsOfNames or from a type library.

lcid : int

The locale id to use.

flags : int

The flags for the call. The following flags can be used.

Flag | Description
DISPATCH_METHOD | The member is invoked as a method. If a property has the same name, both this and the DISPATCH_PROPERTYGET flag may be set.
DISPATCH_PROPERTYGET | The member is retrieved as a property or data member.
DISPATCH_PROPERTYPUT | The member is changed as a property or data member.
DISPATCH_PROPERTYPUTREF | The member is changed by a reference assignment, rather than a value assignment. This flag is valid only when the property accepts a reference to an object.

bResultWanted : int

Indicates if the result of the call should be requested.

params, ... : object, ...

The parameters to pass.

Return Value

If the bResultWanted parameter is False, then the result will be None. Otherwise, the result is determined by the COM object itself (and may still be None)


PyIDispatch.InvokeTypes

object = InvokeTypes(dispid, lcid , wFlags , typeDesc , resultTypeDesc , args )

Invokes a DISPID, using the passed arguments and type descriptions.

Parameters

dispid : int

The dispid to use. Please see PyIDispatch::Invoke.

lcid : int

The locale ID. Please see PyIDispatch::Invoke.

wFlags : int

Flags for the call. Please see PyIDispatch::Invoke.

typeDesc : (tuple, ...)

A sequence of tuples describing the types of the parameters for the function.

resultTypeDesc : tuple

A tuple describing the type of the result.

args : object, ...

The args to the function.


PyIDispatchEx

PyIDispatchEx Object

A OLE automation client object that uses the IDispatchEx scripting interface..

Methods

GetDispID

InvokeEx
Provides access to properties and methods exposed by a PyIDispatchEx object.

DeleteMemberByName

DeleteMemberByDispID

GetMemberProperties

GetMemberName

GetNextDispID


PyIDispatchEx::DeleteMemberByDispID

PyIDispatchEx::DeleteMemberByDispID method

DeleteMemberByDispID()

Defined in: E:/SRC/PYTHONEX/COM/WIN32COM/SRC/PYIDISPATCH.CPP

Parameters

dispid : int


PyIDispatchEx::DeleteMemberByName

PyIDispatchEx::DeleteMemberByName method

DeleteMemberByName()

Defined in: E:/SRC/PYTHONEX/COM/WIN32COM/SRC/PYIDISPATCH.CPP

Parameters

name : PyUnicode

Passed in name to be mapped

fdex : int

Determines the options


PyIDispatchEx::GetDispID

PyIDispatchEx::GetDispID method

int GetDispID()

Defined in: E:/SRC/PYTHONEX/COM/WIN32COM/SRC/PYIDISPATCH.CPP

Parameters

name : PyUnicode

Passed in name to be mapped

fdex : int

Determines the options for obtaining the member identifier. This can be a combination of the fdex* constants:


PyIDispatchEx::GetMemberName

PyIDispatchEx::GetMemberName method

int GetMemberName()

Defined in: E:/SRC/PYTHONEX/COM/WIN32COM/SRC/PYIDISPATCH.CPP

Parameters

dispid : int

fdex : int

Determines the options


PyIDispatchEx::GetMemberProperties

PyIDispatchEx::GetMemberProperties method

int GetMemberProperties()

Defined in: E:/SRC/PYTHONEX/COM/WIN32COM/SRC/PYIDISPATCH.CPP

Parameters

dispid : int

fdex : int

Determines the options


PyIDispatchEx::GetNextDispID

PyIDispatchEx::GetNextDispID method

int GetNextDispID()

Defined in: E:/SRC/PYTHONEX/COM/WIN32COM/SRC/PYIDISPATCH.CPP

Parameters

fdex : int

Determines the options

dispid : int

Identifies the current member. GetNextDispID will retrieve the item in the enumeration after this one.


PyIDispatchEx::InvokeEx

PyIDispatchEx::InvokeEx method

object InvokeEx()

Provides access to properties and methods exposed by a PyIDispatchEx object.

Defined in: E:/SRC/PYTHONEX/COM/WIN32COM/SRC/PYIDISPATCH.CPP

Parameters

dispid : int

lcid : int

flags : int

args : [object, ...]

The arguments.

types=None : [object, ...]

A tuple of type description object, or None if type descriptions are not available.

returnDesc=1 : object|int

If types==None, should be a BOOL indicating if the result is needed. If types is a tuple, then should a be type description.

serviceProvider=None : PyIServiceProvider

A service provider object supplied by the caller which allows the object to obtain services from the caller. Can be None.


PyIDistList

PyIDistList Object

An COM interface to MAPI
Derived from PyIMAPIProp


PyIEnumCATEGORYINFO

PyIEnumCATEGORYINFO Object

A Python interface to IEnumCATEGORYINFO

Methods

Next
Retrieves a specified number of items in the enumeration sequence.

Skip
Skips over the next specified elementes.

Reset
Resets the enumeration sequence to the beginning.

Clone
Creates another enumerator that contains the same enumeration state as the current one.


PyIEnumCATEGORYINFO.Clone

PyIEnumCATEGORYINFO = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumCATEGORYINFO.Next

( (PyIID, int, string), ...) = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.

Return Value

The result is a tuple of (IID object, LCID, string description) tuples, one for each element returned.


PyIEnumCATEGORYINFO.Reset

Reset()

Resets the enumeration sequence to the beginning.


PyIEnumCATEGORYINFO.Skip

Skip(num)

Skips over the next specified elementes.

Parameters

num : int

The number of elements being requested.


PyIEnumConnectionPoints

PyIEnumConnectionPoints Object

A Python interface to IEnumConnectionPoints

Methods

Next
Retrieves a specified number of items in the enumeration sequence.

Skip
Skips over the next specified elementes.

Reset
Resets the enumeration sequence to the beginning.

Clone
Creates another enumerator that contains the same enumeration state as the current one.


PyIEnumConnectionPoints.Clone

PyIEnumConnectionPoints = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumConnectionPoints.Next

(PyIConnectionPoint, ...) = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.


PyIEnumConnectionPoints.Reset

Reset()

Resets the enumeration sequence to the beginning.


PyIEnumConnectionPoints.Skip

Skip()

Skips over the next specified elementes.


PyIEnumConnections

PyIEnumConnections Object

A Python interface to IEnumConnections

Methods

Next
Retrieves a specified number of items in the enumeration sequence.

Skip
Skips over the next specified elementes.

Reset
Resets the enumeration sequence to the beginning.

Clone
Creates another enumerator that contains the same enumeration state as the current one.


PyIEnumConnections.Clone

PyIEnumConnections = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumConnections.Next

object = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.


PyIEnumConnections.Reset

Reset()

Resets the enumeration sequence to the beginning.


PyIEnumConnections.Skip

Skip()

Skips over the next specified elementes.


PyIEnumDebugApplicationNodes

PyIEnumDebugApplicationNodes Object

A Python interface to IEnumDebugApplicationNodes

Methods

Next
Retrieves a specified number of items in the enumeration sequence.

Skip
Skips over the next specified elementes.

Reset
Resets the enumeration sequence to the beginning.

Clone
Creates another enumerator that contains the same enumeration state as the current one.


PyIEnumDebugApplicationNodes.Clone

PyIEnumDebugApplicationNodes = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumDebugApplicationNodes.Next

object = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.


PyIEnumDebugApplicationNodes.Reset

Reset()

Resets the enumeration sequence to the beginning.


PyIEnumDebugApplicationNodes.Skip

Skip()

Skips over the next specified elementes.


PyIEnumDebugCodeContexts

PyIEnumDebugCodeContexts Object

A Python interface to IEnumDebugCodeContexts

Methods

Next
Retrieves a specified number of items in the enumeration sequence.

Skip
Skips over the next specified elementes.

Reset
Resets the enumeration sequence to the beginning.

Clone
Creates another enumerator that contains the same enumeration state as the current one.


PyIEnumDebugCodeContexts.Clone

PyIEnumDebugCodeContexts = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumDebugCodeContexts.Next

object = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.


PyIEnumDebugCodeContexts.Reset

Reset()

Resets the enumeration sequence to the beginning.


PyIEnumDebugCodeContexts.Skip

Skip()

Skips over the next specified elementes.


PyIEnumDebugExpressionContexts

PyIEnumDebugExpressionContexts Object

A Python interface to IEnumDebugExpressionContexts

Methods

Next
Retrieves a specified number of items in the enumeration sequence.

Skip
Skips over the next specified elementes.

Reset
Resets the enumeration sequence to the beginning.

Clone
Creates another enumerator that contains the same enumeration state as the current one.


PyIEnumDebugExpressionContexts.Clone

PyIEnumDebugExpressionContexts = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumDebugExpressionContexts.Next

object = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.


PyIEnumDebugExpressionContexts.Reset

Reset()

Resets the enumeration sequence to the beginning.


PyIEnumDebugExpressionContexts.Skip

Skip()

Skips over the next specified elementes.


PyIEnumDebugPropertyInfo

PyIEnumDebugPropertyInfo Object

A Python interface to IEnumDebugPropertyInfo

Methods

Next
Retrieves a specified number of items in the enumeration sequence.

Skip
Skips over the next specified elementes.

Reset
Resets the enumeration sequence to the beginning.

Clone
Creates another enumerator that contains the same enumeration state as the current one.

GetCount
Obtains the number of items


PyIEnumDebugPropertyInfo.Clone

PyIEnumDebugPropertyInfo = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumDebugPropertyInfo.GetCount

int = GetCount()

Obtains the number of items


PyIEnumDebugPropertyInfo.Next

object = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.


PyIEnumDebugPropertyInfo.Reset

Reset()

Resets the enumeration sequence to the beginning.


PyIEnumDebugPropertyInfo.Skip

Skip()

Skips over the next specified elementes.


PyIEnumDebugStackFrames

PyIEnumDebugStackFrames Object

A Python interface to IEnumDebugStackFrames

Methods

Next
Retrieves a specified number of items in the enumeration sequence.

Skip
Skips over the next specified elementes.

Reset
Resets the enumeration sequence to the beginning.

Clone
Creates another enumerator that contains the same enumeration state as the current one.


PyIEnumDebugStackFrames.Clone

PyIEnumDebugStackFrames = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumDebugStackFrames.Next

object = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.


PyIEnumDebugStackFrames.Reset

Reset()

Resets the enumeration sequence to the beginning.


PyIEnumDebugStackFrames.Skip

Skip()

Skips over the next specified elementes.


PyIEnumFORMATETC

PyIEnumFORMATETC Object

A Python interface to IEnumFORMATETC

Methods

Next
Retrieves a specified number of items in the enumeration sequence.

Skip
Skips over the next specified elementes.

Reset
Resets the enumeration sequence to the beginning.

Clone
Creates another enumerator that contains the same enumeration state as the current one.


PyIEnumFORMATETC.Clone

PyIEnumFORMATETC = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumFORMATETC.Next

object = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.


PyIEnumFORMATETC.Reset

Reset()

Resets the enumeration sequence to the beginning.


PyIEnumFORMATETC.Skip

Skip()

Skips over the next specified elementes.


PyIEnumGUID

PyIEnumGUID Object

A Python interface to IEnumGUID

Methods

Next
Retrieves a specified number of items in the enumeration sequence.

Skip
Skips over the next specified elementes.

Reset
Resets the enumeration sequence to the beginning.

Clone
Creates another enumerator that contains the same enumeration state as the current one.


PyIEnumGUID.Clone

PyIEnumGUID = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumGUID.Next

(PyIID, ...) = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.

Return Value

The result is a tuple of PyIID objects, one for each element returned. Note that if zero elements are returned, it is not considered an error condition - an empty tuple is simply returned.


PyIEnumGUID.Reset

Reset()

Resets the enumeration sequence to the beginning.


PyIEnumGUID.Skip

Skip(num)

Skips over the next specified elementes.

Parameters

num : int

The number of elements being requested.


PyIEnumIDList

PyIEnumIDList Object

A Python interface to IEnumIDList

Methods

Next
Retrieves a specified number of items in the enumeration sequence.

Skip
Skips over the next specified elementes.

Reset
Resets the enumeration sequence to the beginning.

Clone
Creates another enumerator that contains the same enumeration state as the current one.


PyIEnumIDList.Clone

PyIEnumIDList = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumIDList.Next

object = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.


PyIEnumIDList.Reset

Reset()

Resets the enumeration sequence to the beginning.


PyIEnumIDList.Skip

Skip()

Skips over the next specified elementes.


PyIEnumMoniker

PyIEnumMoniker Object

A Python interface to IEnumMoniker

Methods

Next
Retrieves a specified number of items in the enumeration sequence.

Skip
Skips over the next specified elementes.

Reset
Resets the enumeration sequence to the beginning.

Clone
Creates another enumerator that contains the same enumeration state as the current one.


PyIEnumMoniker.Clone

PyIEnumMoniker = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumMoniker.Next

PyIMoniker = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.

Return Value

The result is a tuple of PyIID objects, one for each element returned. Note that if zero elements are returned, it is not considered an error condition - an empty tuple is simply returned.


PyIEnumMoniker.Reset

Reset()

Resets the enumeration sequence to the beginning.


PyIEnumMoniker.Skip

Skip(num)

Skips over the next specified elementes.

Parameters

num : int

The number of elements being requested.


PyIEnumRemoteDebugApplicationThreads

PyIEnumRemoteDebugApplicationThreads Object

A Python interface to IEnumRemoteDebugApplicationThreads

Methods

Next
Retrieves a specified number of items in the enumeration sequence.

Skip
Skips over the next specified elementes.

Reset
Resets the enumeration sequence to the beginning.

Clone
Creates another enumerator that contains the same enumeration state as the current one.


PyIEnumRemoteDebugApplicationThreads.Clone

PyIEnumRemoteDebugApplicationThreads = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumRemoteDebugApplicationThreads.Next

object = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.


PyIEnumRemoteDebugApplicationThreads.Reset

Reset()

Resets the enumeration sequence to the beginning.


PyIEnumRemoteDebugApplicationThreads.Skip

Skip()

Skips over the next specified elementes.


PyIEnumRemoteDebugApplications

PyIEnumRemoteDebugApplications Object

A Python interface to IEnumRemoteDebugApplications

Methods

Next
Retrieves a specified number of items in the enumeration sequence.

Skip
Skips over the next specified elementes.

Reset
Resets the enumeration sequence to the beginning.

Clone
Creates another enumerator that contains the same enumeration state as the current one.


PyIEnumRemoteDebugApplications.Clone

PyIEnumRemoteDebugApplications = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumRemoteDebugApplications.Next

object = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.


PyIEnumRemoteDebugApplications.Reset

Reset()

Resets the enumeration sequence to the beginning.


PyIEnumRemoteDebugApplications.Skip

Skip()

Skips over the next specified elementes.


PyIEnumSTATPROPSETSTG

PyIEnumSTATPROPSETSTG Object

A Python interface to IEnumSTATPROPSETSTG

Methods

Next
Retrieves a specified number of items in the enumeration sequence.

Skip
Skips over the next specified elementes.

Reset
Resets the enumeration sequence to the beginning.

Clone
Creates another enumerator that contains the same enumeration state as the current one.


PyIEnumSTATPROPSETSTG.Clone

PyIEnumSTATPROPSETSTG = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumSTATPROPSETSTG.Next

object = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.


PyIEnumSTATPROPSETSTG.Reset

Reset()

Resets the enumeration sequence to the beginning.


PyIEnumSTATPROPSETSTG.Skip

Skip()

Skips over the next specified elementes.


PyIEnumSTATPROPSTG

PyIEnumSTATPROPSTG Object

A Python interface to IEnumSTATPROPSTG

Methods

Next
Retrieves a specified number of items in the enumeration sequence.

Skip
Skips over the next specified elementes.

Reset
Resets the enumeration sequence to the beginning.

Clone
Creates another enumerator that contains the same enumeration state as the current one.


PyIEnumSTATPROPSTG.Clone

PyIEnumSTATPROPSTG = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumSTATPROPSTG.Next

object = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.


PyIEnumSTATPROPSTG.Reset

Reset()

Resets the enumeration sequence to the beginning.


PyIEnumSTATPROPSTG.Skip

Skip()

Skips over the next specified elementes.


PyIEnumSTATSTG

PyIEnumSTATSTG Object

A Python interface to IEnumVARIANT

Methods

Next
Retrieves a specified number of items in the enumeration sequence.

Skip
Skips over the next specified elementes.

Reset
Resets the enumeration sequence to the beginning.

Clone
Creates another enumerator that contains the same enumeration state as the current one.


PyIEnumSTATSTG.Clone

PyIEnumSTATSTG = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumSTATSTG.Next

object = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.


PyIEnumSTATSTG.Reset

Reset()

Resets the enumeration sequence to the beginning.


PyIEnumSTATSTG.Skip

Skip()

Skips over the next specified elementes.


PyIErrorLog

PyIErrorLog Object

A Python wrapper for a COM IErrorLog interface.

Comments

The IErrorLog interface is an abstraction for an error log that is used to communicate detailed error information between a client and an object. The caller of the single interface method, PyIErrorLog::AddError, simply logs an error where the error is an EXCEPINFO structure related to a specific property. The implementer of the interface is responsible for handling the error in whatever way it desires.
IErrorLog is used in the protocol between a client that implements PyIPropertyBag and an object that implements PyIPersistPropertyBag.

Methods

AddError
Adds an error to the error log.


PyIErrorLog.AddError

AddError(propName, excepInfo)

Adds an error to the error log.

Parameters

propName : string

The name of the error

excepInfo=None : exception

A COM exception. Must be a complete COM exception (ie, pythoncom.com_error, or win32com.server.exceptions.COMException())


PyIExternalConnection

PyIExternalConnection Object

A Python wrapper for a COM IExternalConnection interface.

Comments

The IExternalConnection interface manages a server object's count of marshaled, or external, connections. A server that maintains such a count can detect when it has no external connections and shut itself down in an orderly fashion.

Methods

AddConnection
Increments an object's count of its strong external connections (links).

ReleaseConnection
Decrements an object's count of its strong external connections (references).


PyIExternalConnection.AddConnection

int = AddConnection(extconn, reserved )

Increments an object's count of its strong external connections (links).

Parameters

extconn : int

Type of external connection to the object. The only type of external connection currently supported by this interface is strong, which means that the object must remain alive as long as this external connection exists. Strong external connections are represented by the value EXTCONN_STRONG = 0x0001, which is defined in the enumeration EXTCON

reserved=0 : int

A reserved parameter

Return Value

The result is the number of reference counts on the object; used for debugging purposes only.


PyIExternalConnection.ReleaseConnection

int = ReleaseConnection(extconn, reserved , fLastReleaseCloses )

Decrements an object's count of its strong external connections (references).

Parameters

extconn : int

Type of external connection

reserved : int

A reserved parameter.

fLastReleaseCloses : int

TRUE specifies that if the connection being released is the last external lock on the object, the object should close. FALSE specifies that the object should remain open until closed by the user or another process.

Return Value

The result is the number of reference counts on the object; used for debugging purposes only.


PyIExtractIcon

PyIExtractIcon Object

Description of the interface

Methods

Extract
Description of Extract

GetIconLocation
Description of GetIconLocation


PyIExtractIcon.Extract

Extract(pszFile, nIconIndex, nIconSize)

Description of Extract.

Parameters

pszFile : unicode

Description for pszFile

nIconIndex : int

Description for nIconIndex

nIconSize : int

Description for nIconIndex


PyIExtractIcon.GetIconLocation

GetIconLocation(uFlags, cchMax)

Description of GetIconLocation.

Parameters

uFlags : int

Description for uFlags

cchMax=MAX_PATH+MAX_FNAME : int

Buffer size to allocate for file name


PyIInternetBindInfo

PyIInternetBindInfo Object

Description of the interface

Methods

GetBindInfo
Description of GetBindInfo

GetBindString
Description of GetBindString


PyIInternetBindInfo.GetBindInfo

GetBindInfo()

Description of GetBindInfo.


PyIInternetBindInfo.GetBindString

GetBindString()

Description of GetBindString.


PyIInternetPriority

PyIInternetPriority Object

Description of the interface

Methods

SetPriority
Description of SetPriority

GetPriority
Description of GetPriority


PyIInternetPriority.GetPriority

GetPriority()

Description of GetPriority.


PyIInternetPriority.SetPriority

SetPriority(nPriority)

Description of SetPriority.

Parameters

nPriority : int

Description for nPriority


PyIInternetProtocol

PyIInternetProtocol Object

Description of the interface

Methods

Read
Description of Read

Seek
Description of Seek

LockRequest
Description of LockRequest

UnlockRequest
Description of UnlockRequest


PyIInternetProtocol.LockRequest

LockRequest(dwOptions)

Description of LockRequest.

Parameters

dwOptions : int

Description for dwOptions


PyIInternetProtocol.Read

Read(cb)

Description of Read.

Parameters

cb : int

Description for cb


PyIInternetProtocol.Seek

Seek(dlibMove, dwOrigin)

Description of Seek.

Parameters

dlibMove : LARGE_INTEGER

Description for dlibMove

dwOrigin : int

Description for dwOrigin


PyIInternetProtocol.UnlockRequest

UnlockRequest()

Description of UnlockRequest.


PyIInternetProtocolInfo

PyIInternetProtocolInfo Object

Description of the interface

Methods

ParseUrl
Description of ParseUrl

CombineUrl
Description of CombineUrl

CompareUrl
Description of CompareUrl

QueryInfo
Description of QueryInfo


PyIInternetProtocolInfo.CombineUrl

CombineUrl(pwzBaseUrl, pwzRelativeUrl, dwCombineFlags, cchResult, dwReserved)

Description of CombineUrl.

Parameters

pwzBaseUrl : unicode

Description for pwzBaseUrl

pwzRelativeUrl : unicode

Description for pwzRelativeUrl

dwCombineFlags : int

Description for dwCombineFlags

cchResult : int

Description for cchResult

dwReserved : int

Description for dwReserved


PyIInternetProtocolInfo.CompareUrl

CompareUrl(pwzUrl1, pwzUrl2, dwCompareFlags)

Description of CompareUrl.

Parameters

pwzUrl1 : unicode

Description for pwzUrl1

pwzUrl2 : unicode

Description for pwzUrl2

dwCompareFlags : int

Description for dwCompareFlags


PyIInternetProtocolInfo.ParseUrl

ParseUrl(pwzUrl, ParseAction, dwParseFlags, cchResult, dwReserved)

Description of ParseUrl.

Parameters

pwzUrl : unicode

Description for pwzUrl

ParseAction : int

Description for ParseAction

dwParseFlags : int

Description for dwParseFlags

cchResult : int

Description for cchResult

dwReserved : int

Description for dwReserved


PyIInternetProtocolInfo.QueryInfo

int|string = QueryInfo(pwzUrl, OueryOption , dwQueryFlags , cbBuffer , dwReserved )

Description of QueryInfo.

Parameters

pwzUrl : unicode

Description for pwzUrl

OueryOption : int

Description for OueryOption

dwQueryFlags : int

Description for dwQueryFlags

cbBuffer : int

Description for cbBuffer

dwReserved : int

Description for dwReserved

Comments

If the buffer size is the size of an integer, an integer will be returned, otherwise a string.


PyIInternetProtocolRoot

PyIInternetProtocolRoot Object

Description of the interface

Methods

Start
Description of Start

Continue
Description of Continue

Abort
Description of Abort

Terminate
Description of Terminate

Suspend
Description of Suspend

Resume
Description of Resume


PyIInternetProtocolRoot.Abort

Abort(hrReason, dwOptions)

Description of Abort.

Parameters

hrReason : int

Description for hrReason

dwOptions : int

Description for dwOptions


PyIInternetProtocolRoot.Continue

Continue()

Description of Continue.


PyIInternetProtocolRoot.Resume

Resume()

Description of Resume.


PyIInternetProtocolRoot.Start

Start(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved)

Description of Start.

Parameters

szUrl : unicode

Description for szUrl

pOIProtSink : PyIInternetProtocolSink

Description for pOIProtSink

pOIBindInfo : PyIInternetBindInfo

Description for pOIBindInfo

grfPI : int

Description for grfPI

dwReserved : int

Description for dwReserved


PyIInternetProtocolRoot.Suspend

Suspend()

Description of Suspend.


PyIInternetProtocolRoot.Terminate

Terminate(dwOptions)

Description of Terminate.

Parameters

dwOptions : int

Description for dwOptions


PyIInternetProtocolSink

PyIInternetProtocolSink Object

Description of the interface

Methods

Switch
Description of Switch

ReportProgress
Description of ReportProgress

ReportData
Description of ReportData

ReportResult
Description of ReportResult


PyIInternetProtocolSink.ReportData

ReportData(grfBSCF, ulProgress, ulProgressMax)

Description of ReportData.

Parameters

grfBSCF : int

Description for grfBSCF

ulProgress : int

Description for ulProgress

ulProgressMax : int

Description for ulProgressMax


PyIInternetProtocolSink.ReportProgress

ReportProgress(ulStatusCode, szStatusText)

Description of ReportProgress.

Parameters

ulStatusCode : int

Description for ulStatusCode

szStatusText : unicode

Description for szStatusText


PyIInternetProtocolSink.ReportResult

ReportResult(hrResult, dwError, szResult)

Description of ReportResult.

Parameters

hrResult : int

Description for hrResult

dwError : int

Description for dwError

szResult : unicode

Description for szResult


PyIInternetProtocolSink.Switch

Switch()

Description of Switch.


PyILockBytes

PyILockBytes Object

Description of the interface

Methods

ReadAt
Reads a specified number of bytes starting at a specified offset from the beginning of the byte array object.

WriteAt
Writes the specified number of bytes starting at a specified offset from the beginning of the byte array.

Flush
Ensures that any internal buffers maintained by the byte array object are written out to the backing storage.

SetSize
Changes the size of the byte array.

LockRegion
Restricts access to a specified range of bytes in the byte array.

UnlockRegion
Removes the access restriction on a range of bytes previously restricted with PyILockBytes::LockRegion.

Stat
Retrieves a STATSTG structure for this byte array object.


PyILockBytes.Flush

Flush()

Ensures that any internal buffers maintained by the byte array object are written out to the backing storage.


PyILockBytes.LockRegion

LockRegion(libOffset, cb, dwLockType)

Restricts access to a specified range of bytes in the byte array.

Parameters

libOffset : ULARGE_INTEGER

The beginning of the region to lock.

cb : ULARGE_INTEGER

The number of bytes to lock.

dwLockType : int

Specifies the restrictions being requested on accessing the range.


PyILockBytes.ReadAt

string = ReadAt(ulOffset, cb )

Reads a specified number of bytes starting at a specified offset from the beginning of the byte array object.

Parameters

ulOffset : ULARGE_INTEGER

Offset to start reading

cb : int

Number of bytes to read

Comments

The result is a binary buffer returned in a string.


PyILockBytes.SetSize

SetSize(cb)

Changes the size of the byte array.

Parameters

cb : ULARGE_INTEGER

The new size.


PyILockBytes.Stat

STATSTG = Stat(grfStatFlag)

Retrieves a STATSTG structure for this byte array object.

Parameters

grfStatFlag : int

Specifies that this method does not return some of the fields in the STATSTG structure, thus saving a memory allocation operation. Values are taken from the STATFLAG enumerationg


PyILockBytes.UnlockRegion

UnlockRegion(libOffset, cb, dwLockType)

Removes the access restriction on a range of bytes previously restricted with PyILockBytes::LockRegion.

Parameters

libOffset : ULARGE_INTEGER

The beginning of the region to unlock.

cb : ULARGE_INTEGER

The number of bytes to lock.

dwLockType : int

Specifies the restrictions being requested on accessing the range.


PyILockBytes.WriteAt

int = WriteAt(ulOffset, data )

Writes the specified number of bytes starting at a specified offset from the beginning of the byte array.

Parameters

ulOffset : ULARGE_INTEGER

Offset to write at.

data : string

Data to write

Return Value

The result is the number of bytes actually written.


PyIMAPIContainer

PyIMAPIContainer Object

An COM interface to MAPI's IMAPIContainer interface.
Derived from PyIMAPIProp

Methods

OpenEntry
Opens an object and returns an interface object for further access.

GetContentsTable
Returns an object representing the container's contents table.

GetHierarchyTable
Returns an object representing the container's hierarchy table.


PyIMAPIContainer.GetContentsTable

PyIMAPITable = GetContentsTable(flags)

Returns an object representing the container's contents table.

Parameters

flags : int

The flags to use.


PyIMAPIContainer.GetHierarchyTable

PyIMAPITable = GetHierarchyTable(flags)

Returns an object representing the container's hierarchy table.

Parameters

flags : int

The flags to use.


PyIMAPIContainer.OpenEntry

PyIInterface = OpenEntry(entryId, iid , flags )

Opens an object and returns an interface object for further access.

Parameters

entryId : string

The EntryID to open.

iid : PyIID

The IID of the returned interface, or None for the default interface.

flags : int

Flags for the call. May include MAPI_BEST_ACCESS, MAPI_DEFERRED_ERRORS, MAPI_MODIFY and possibly others (see the MAPI documentation)


PyIMAPIFolder

PyIMAPIFolder Object

An COM interface to MAPI
Derived from PyIMAPIProp

Methods

GetLastError
Returns the last error associated with this object

CreateFolder
Creates a folder object.

CreateMessage
Creates a message in a folder

CopyMessages
Copies the specified messages

DeleteMessages
Deletes the specified messages.

EmptyFolder
deletes all messages and subfolders from a folder without deleting the folder itself.


PyIMAPIFolder.CopyMessages

CopyMessages(msgs, iid, folder, ulUIParam, progress, flags)

Copies the specified messages

Parameters

msgs : PySBinaryArray

iid : PyIID

IID representing the interface to be used to access the destination folder. Should usually be None.

folder : PyIMAPIFolder

The destination folder

ulUIParam : long

Handle of the parent window for any dialog boxes or windows this method displays.

progress : PyIMAPIProgress

A progress object, or None

flags : int

A bitmask of

Mask | Description
MAPI_DECLINE_OK | Informs the message store provider to immediately return MAPI_E_DECLINE_COPY if it implements CopyMessage by calling the support object's IMAPISupport::DoCopyTo or IMAPISupport::DoCopyProps method.
MESSAGE_DIALOG | Displays a progress indicator as the operation proceeds.
MESSAGE_MOVE | The message or messages are to be moved rather than copied. If MESSAGE_MOVE is not set, the messages are copied.


PyIMAPIFolder.CreateFolder

PyIMAPIFolder = CreateFolder(folderType, folderName , folderComment , iid , flags )

Creates a folder object.

Parameters

folderType : int

The type of folder to create

folderName : string

The name of the folder.

folderComment : string

A comment for the folder or None

iid : PyIID

The IID of the object to return. Should usually be None.

flags : int


PyIMAPIFolder.CreateMessage

PyIMessage = CreateMessage(iid, flags )

Creates a message in a folder

Parameters

iid : PyIID

The IID of the object to return. Should usually be None.

flags : int


PyIMAPIFolder.DeleteMessages

DeleteMessages(msgs, uiParam, progress, flags)

Deletes the specified messages.

Parameters

msgs : PySBinaryArray

uiParam : int

A HWND for the progress

progress : PyIMAPIProgress

A progress object, or None

flags : int


PyIMAPIFolder.EmptyFolder

EmptyFolder(uiParam, progress, flags)

deletes all messages and subfolders from a folder without deleting the folder itself.

Parameters

uiParam : int

A HWND for the progress

progress : PyIMAPIProgress

A progress object, or None

flags : int


PyIMAPIFolder.GetLastError

PyMAPIError = GetLastError(hr, flags )

Returns the last error associated with this object

Parameters

hr : int

The HRESULT

flags : int


PyIMAPIProp

PyIMAPIProp Object

An COM interface to MAPI
Derived from PyIUnknown

Methods

GetProps
Returns a list of property values.

DeleteProps
Deletes a set of properties.

SetProps
Sets a set of properties.

CopyTo
Copies an object to another

CopyProps
Copies a set of properties to another object

OpenProperty
Returns an interface object to be used to access a property.

GetIDsFromNames
Determines property IDs

GetNamesFromIDs
Determines property names

GetLastError
Returns the last error code for the object.

SaveChanges
Saves pending changes to the object

GetPropList
Gets a list of properties


PyIMAPIProp.CopyProps

int, [problems, ] = CopyProps(propTags, uiFlags , progress , resultIID , dest , flags )

Copies a set of properties to another object

Parameters

propTags : PySPropTagArray

The property tags to copy

uiFlags : int

Flags for the progress object

progress : None

Reserved - must pass None

resultIID : PyIID

IID of the destination object

dest : PyIMAPIProp

The destination object

flags : int

flags


PyIMAPIProp.CopyTo

int, [problems, ] = CopyTo(IIDExcludeList, propTags , uiFlags , progress , resultIID , dest , flags )

Copies an object to another

Parameters

IIDExcludeList : [PyIID, ]

A sequence of IIDs to exclude.

propTags : PySPropTagArray

The property tags to copy

uiFlags : int

Flags for the progress object

progress : None

Reserved - must pass None

resultIID : PyIID

IID of the destination object

dest : PyIMAPIProp

The destination object

flags : int

flags


PyIMAPIProp.DeleteProps

int, [problems, ] = DeleteProps(propList)

Deletes a set of properties.

Parameters

propList : PySPropTagArray

The list of properties


PyIMAPIProp.GetIDsFromNames

PySPropTagArray = GetIDsFromNames(nameIds, flags )

Determines property IDs

Parameters

nameIds : PyMAPINAMEIDArray

Sequence of name ids

flags=0 : int


PyIMAPIProp.GetLastError

MAPIERROR = GetLastError(hr, flags )

Returns the last error code for the object.

Parameters

hr : int

Contains the error code generated in the previous method call.

flags : int

Indicates for format for the output.


PyIMAPIProp.GetNamesFromIDs

HRESULT, PySPropTagArray, PyMAPINAMEIDArray = GetNamesFromIDs(propTags, propSetGuid , flags )

Determines property names

Parameters

propTags : PySPropTagArray

Sequence of property tags, or None

propSetGuid=None : PyIID

a globally unique identifier, identifying a property set, or None

flags=0 : int


PyIMAPIProp.GetPropList

PySPropTagArray = GetPropList(flags)

Gets a list of properties

Parameters

flags : int

flags


PyIMAPIProp.GetProps

int, [items, ] = GetProps(propList, flags )

Returns a list of property values.

Parameters

propList : PySPropTagArray

The list of properties

flags=0 : int


PyIMAPIProp.OpenProperty

PyIUnknown = OpenProperty(propTag, iid , interfaceOptions , flags )

Returns an interface object to be used to access a property.

Parameters

propTag : int

The property tag to open

iid : PyIID

The IID of the resulting interface.

interfaceOptions : int

Data that relates to the interface identified by the lpiid parameter.

flags : int

flags


PyIMAPIProp.SaveChanges

SaveChanges(flags)

Saves pending changes to the object

Parameters

flags : int

flags


PyIMAPIProp.SetProps

int, [problems, ] = SetProps(propList)

Sets a set of properties.

Parameters

propList : [PySPropValue, ]

The list of properties


PyIMAPISession

PyIMAPISession Object

An COM interface to MAPI's ISession interface.
Derived from PyIUnknown

Methods

OpenEntry
Opens an object and returns an interface object for further access.

OpenMsgStore
Opens a message store.

QueryIdentity
Returns the entry identifier of the object that provides the primary identity for the session.

CompareEntryIDs
Compares two entry identifiers belonging to a particular address book provider to determine if they refer to the same address book object

GetMsgStoresTable
Provides access to the message store table - a table with information about all of the message stores in the session profile.

GetStatusTable
Provides access to the status table - a table with information about all of the MAPI resources in the session.

Logoff
Ends a MAPI session.

OpenAddressBook
Opens the integrated address book.

OpenProfileSection
Opens a section of the current profile and returns an object for futher access


PyIMAPISession.CompareEntryIDs

int = CompareEntryIDs(entryId, entryId , flags )

Compares two entry identifiers belonging to a particular address book provider to determine if they refer to the same address book object

Parameters

entryId : string

The first entry ID to be compared

entryId : string

The second entry ID to be compared

flags=0 : int

Reserved - must be zero.

Return Value

The result is set to TRUE if the two entry identifiers refer to the same object, and FALSE otherwise.


PyIMAPISession.GetMsgStoresTable

PyIMAPITable = GetMsgStoresTable(flags)

Provides access to the message store table - a table with information about all of the message stores in the session profile.

Parameters

flags : int

Flags that control the opening.


PyIMAPISession.GetStatusTable

PyIMAPITable = GetStatusTable(flags)

Provides access to the status table - a table with information about all of the MAPI resources in the session.

Parameters

flags : int

Flags that control the opening.


PyIMAPISession.Logoff

Logoff(uiParm, flags, reserved)

Ends a MAPI session.

Parameters

uiParm : int

hwnd of a dialog is to be displayed.

flags : int

Bitmask of flags that control the logoff operation.

reserved : int

Reserved; must be zero.


PyIMAPISession.OpenAddressBook

PyIAddrBook = OpenAddressBook(uiParm, iid , flags )

Opens the integrated address book.

Parameters

uiParm : int

hwnd of a dialog is to be displayed.

iid : PyIID

The IID of the interface, or None.

flags : int

Flags that control the opening - AB_NO_DIALOG.


PyIMAPISession.OpenEntry

PyIInterface = OpenEntry(entryId, iid , flags )

Opens an object and returns an interface object for further access.

Parameters

entryId : string

The EntryID to open.

iid : PyIID

The IID of the returned interface, or None for the default interface.

flags : int

Flags for the call. May include MAPI_BEST_ACCESS, MAPI_DEFERRED_ERRORS, MAPI_MODIFY and possibly others (see the MAPI documentation)


PyIMAPISession.OpenMsgStore

PyIUnknown = OpenMsgStore(uiParam, entryId , iid , flags )

Opens a message store.

Parameters

uiParam : int

Handle to the parent window for dialogs.

entryId : string

The entry ID of the message store to open.

iid : PyIID

The IID of the interface returned, or None

flags : int

Options for the call.

Comments

The result is the interface specified by the IID, or IID_IMsgStore if None is used.


PyIMAPISession.OpenProfileSection

PyIProfSection = OpenProfileSection(iidSection, iid , flags )

Opens a section of the current profile and returns an object for futher access

Parameters

iidSection : PyIID

The MAPIIID of the profile section

iid : PyIID

The IID of the interface, or None.

flags : int

Flags that control the opening.


PyIMAPISession.QueryIdentity

string = QueryIdentity()

Returns the entry identifier of the object that provides the primary identity for the session.


PyIMAPITable

PyIMAPITable Object

An COM interface to MAPI
Derived from PyIUnknown

Methods

Advise
Registers to receive notification of specified events affecting the table.

SeekRow
Moves the cursor to a specific position in the table.

SeekRowApprox
Moves the cursor to an approximate fractional position in the table.

GetRowCount
Returns the total number of rows in the table.

QueryRows
Returns one or more rows from a table, beginning at the current cursor position.

SetColumns
Defines the particular properties and order of properties to appear as columns in the table.

GetStatus
Returns the table's status and type.

QueryPosition
Retrieves the current table row position of the cursor, based on a fractional value.

QueryColumns
Returns a list of columns for the table.

Abort
Stops any asynchronous operations currently in progress for the table.

FreeBookmark
Releases the memory associated with a bookmark.

CreateBookmark
Marks the table's current position.

Restrict
Applies a filter to a table, reducing the row set to only those rows matching the specified criteria.

FindRow
Finds the next row in a table that matches specific search criteria.

SortTable
Orders the rows of the table based on sort criteria.


PyIMAPITable.Abort

Abort()

Stops any asynchronous operations currently in progress for the table.


PyIMAPITable.Advise

int = Advise(eventMask, adviseSink )

Registers to receive notification of specified events affecting the table.

Parameters

eventMask : int

adviseSink : PyIMAPIAdviseSink


PyIMAPITable.CreateBookmark

int = CreateBookmark()

Marks the table's current position.


PyIMAPITable.FindRow

FindRow(restriction, bookmarkOrigin, flags)

Finds the next row in a table that matches specific search criteria.

Parameters

restriction : PySRestriction

bookmarkOrigin : int

flags : int


PyIMAPITable.FreeBookmark

FreeBookmark(bookmark)

Releases the memory associated with a bookmark.

Parameters

bookmark : int


PyIMAPITable.GetRowCount

int = GetRowCount(flags)

Returns the total number of rows in the table.

Parameters

flags : int

Reserved - must be zero


PyIMAPITable.GetStatus

GetStatus()

Returns the table's status and type.

Return Value

Result is a tuple of (tableStatus, tableType)


PyIMAPITable.QueryColumns

SPropTagArray = QueryColumns(flags)

Returns a list of columns for the table.

Parameters

flags : int


PyIMAPITable.QueryPosition

QueryPosition()

Retrieves the current table row position of the cursor, based on a fractional value.

Return Value

Result is a tuple of (row, numerator, denominator)


PyIMAPITable.QueryRows

SRowSet = QueryRows(rowCount, flags )

Returns one or more rows from a table, beginning at the current cursor position.

Parameters

rowCount : int

Number of rows to retrieve

flags : int

Flags.


PyIMAPITable.Restrict

Restrict(restriction, flags)

Applies a filter to a table, reducing the row set to only those rows matching the specified criteria.

Parameters

restriction : PySRestriction

flags : int


PyIMAPITable.SeekRow

int = SeekRow(bookmark, rowCount )

Moves the cursor to a specific position in the table.

Parameters

bookmark : int

The bookmark.

rowCount : int

Return Value

The result is the number of rows processed.


PyIMAPITable.SeekRowApprox

SeekRowApprox(numerator, denominator)

Moves the cursor to an approximate fractional position in the table.

Parameters

numerator : int

The numerator of the fraction representing the table position

denominator : int

The denominator of the fraction representing the table position. This must not be zero.


PyIMAPITable.SetColumns

SetColumns(propTags, flags)

Defines the particular properties and order of properties to appear as columns in the table.

Parameters

propTags : SPropTagArray

Sequence of property tags identifying properties to be included as columns in the table.

flags : int


PyIMAPITable.SortTable

SortTable(sortOrderSet, flags)

Orders the rows of the table based on sort criteria.

Parameters

sortOrderSet : PySSortOrderSet

flags : int


PyIMachineDebugManager

PyIMachineDebugManager Object

Description of the interface

Methods

AddApplication
Description of AddApplication

RemoveApplication
Description of RemoveApplication

EnumApplications
Description of EnumApplications


PyIMachineDebugManager.AddApplication

AddApplication(pda)

Description of AddApplication.

Parameters

pda : PyIRemoteDebugApplication

Description for pda


PyIMachineDebugManager.EnumApplications

EnumApplications()

Description of EnumApplications.


PyIMachineDebugManager.RemoveApplication

RemoveApplication(dwAppCookie)

Description of RemoveApplication.

Parameters

dwAppCookie : int

Description for dwAppCookie


PyIMachineDebugManagerEvents

PyIMachineDebugManagerEvents Object

Description of the interface

Methods

onAddApplication
Description of onAddApplication

onRemoveApplication
Description of onRemoveApplication


PyIMachineDebugManagerEvents.onAddApplication

onAddApplication(pda, dwAppCookie)

Description of onAddApplication.

Parameters

pda : PyIRemoteDebugApplication

Description for pda

dwAppCookie : int

Description for dwAppCookie


PyIMachineDebugManagerEvents.onRemoveApplication

onRemoveApplication(pda, dwAppCookie)

Description of onRemoveApplication.

Parameters

pda : PyIRemoteDebugApplication

Description for pda

dwAppCookie : int

Description for dwAppCookie


PyIMailUser

PyIMailUser Object

An COM interface to MAPI
Derived from PyIMAPIContainer


PyIMessage

PyIMessage Object

An COM interface to MAPI
Derived from PyIMAPIProp

Methods

SetReadFlag
Sets the read flags for a message

GetAttachmentTable
Returns the message's attachment table.

OpenAttach
Opens an attachment

CreateAttach
Creates an attachment

DeleteAttach
Deletes an attachment

ModifyRecipients
adds, deletes, or modifies message recipients.

GetRecipientTable
Returns the message's recipient table.

SubmitMessage
Saves all of the message's properties and marks the message as ready to be sent.


PyIMessage.CreateAttach

int, PyIAttach = CreateAttach(interface, flags )

Creates an attachment

Parameters

interface : PyIID

The interface to use, or None

flags : int

Bitmask of flags that controls how the attachment is created.

Return Value

The result is a tuple of (attachmentNum, attachmentObject)


PyIMessage.DeleteAttach

DeleteAttach(attachmentNum, ulUIParam, interface, flags)

Deletes an attachment

Parameters

attachmentNum : int

ulUIParam : int

interface : PyIMAPIProgress

The interface to use, or None

flags : int

Bitmask of flags that controls the display of a user interface.


PyIMessage.GetAttachmentTable

PyIMAPITable = GetAttachmentTable(flags)

Returns the message's attachment table.

Parameters

flags : int

Bitmask of flags that relate to the creation of the table.


PyIMessage.GetRecipientTable

PyIMAPITable = GetRecipientTable(flags)

Returns the message's recipient table.

Parameters

flags : int

Bitmask of flags that relate to the creation of the table.


PyIMessage.ModifyRecipients

ModifyRecipients(flags, mods)

adds, deletes, or modifies message recipients.

Parameters

flags : int

Bitmask of flags that controls the recipient changes. If zero is passed for the ulFlags parameter, ModifyRecipients replaces all existing recipients with the recipient list in the mods parameter.

mods : object

The list of recipients.


PyIMessage.OpenAttach

PyIAttach = OpenAttach(attachmentNum, interface , flags )

Opens an attachment

Parameters

attachmentNum : int

interface : PyIID

The interface to use, or None

flags : int

Bitmask of flags that controls how the attachment is opened.


PyIMessage.SetReadFlag

SetReadFlag(flag)

Sets the read flags for a message

Parameters

flag : int

Bitmask of flags that controls the setting of a message's read flag - that is, the message's MSGFLAG_READ flag in its PR_MESSAGE_FLAGS property and the processing of read reports.


PyIMessage.SubmitMessage

SubmitMessage(flags)

Saves all of the message's properties and marks the message as ready to be sent.

Parameters

flags : int

Flags which specify how the message is submitted.


PyIMoniker

PyIMoniker Object

A Python interface to IMoniker

Methods

BindToObject
Uses the moniker to bind to the object it identifies.

BindToStorage
Retrieves an interface object to the storage that contains the object identified by the moniker.

GetDisplayName
Gets the display name , which is a user-readable representation of this moniker.

ComposeWith
Combines the current moniker with another moniker, creating a new composite moniker.

Enum
Supplies an enumerator that can enumerate the components of a composite moniker.

IsEqual
Compares this moniker with a specified moniker and indicates whether they are identical.

IsSystemMoniker
Indicates whether this moniker is of one of the system-supplied moniker classes.

Hash
Calculates a 32-bit integer using the internal state of the moniker.


PyIMoniker.BindToObject

PyIUnknown = BindToObject(bindCtx, moniker , iidResult )

Uses the moniker to bind to the object it identifies.

Parameters

bindCtx : PyIBindCtx

bind context object to be used.

moniker : PyIMoniker

If the moniker is part of a composite moniker, otherwise None

iidResult : IID

IID of the result object.


PyIMoniker.BindToStorage

PyIUnknown = BindToStorage(bindCtx, moniker , iidResult )

Retrieves an interface object to the storage that contains the object identified by the moniker.

Parameters

bindCtx : PyIBindCtx

bind context object to be used.

moniker : PyIMoniker

If the moniker is part of a composite moniker, otherwise None

iidResult : IID

IID of the result object.


PyIMoniker.ComposeWith

PyIMoniker = ComposeWith(mkRight, fOnlyIfNotGeneric )

Combines the current moniker with another moniker, creating a new composite moniker.

Parameters

mkRight : PyIMoniker

The IMoniker interface on the moniker to compose onto the end of this moniker.

fOnlyIfNotGeneric : int

If TRUE, the caller requires a non-generic composition, so the operation should proceed only if pmkRight is a moniker class that this moniker can compose with in some way other than forming a generic composite. If FALSE, the method can create a generic composite if necessary.


PyIMoniker.Enum

PyIEnumMoniker = Enum(fForward)

Supplies an enumerator that can enumerate the components of a composite moniker.

Parameters

fForward=True : int

If TRUE, enumerates the monikers from left to right. If FALSE, enumerates from right to left.


PyIMoniker.GetDisplayName

string = GetDisplayName(bindCtx, moniker )

Gets the display name , which is a user-readable representation of this moniker.

Parameters

bindCtx : PyIBindCtx

bind context object to be used.

moniker : PyIMoniker

If the moniker is part of a composite moniker, otherwise None


PyIMoniker.Hash

int = Hash()

Calculates a 32-bit integer using the internal state of the moniker.


PyIMoniker.IsEqual

int = IsEqual(other)

Compares this moniker with a specified moniker and indicates whether they are identical.

Parameters

other : PyIMoniker

The moniker to compare


PyIMoniker.IsSystemMoniker

int = IsSystemMoniker()

Indicates whether this moniker is of one of the system-supplied moniker classes.


PyIMsgServiceAdmin

PyIMsgServiceAdmin Object

An COM interface to MAPI's IMsgServiceAdmin interface.
Derived from PyIUnknown

Methods

CreateMsgService
Creates a message service.

ConfigureMsgService
Reconfigures a message service.

GetMsgServiceTable
Retrieves a table of services.

GetProviderTable
Retrieves a table of service providers.

DeleteMsgService
Deletes the specified service

RenameMsgService
Renames the specified service

OpenProfileSection
Opens a profile section


PyIMsgServiceAdmin.ConfigureMsgService

ConfigureMsgService(iid, ulUIParam, ulFlags, [SPropValue, ...])

Reconfigures a message service.

Parameters

iid : PyIID

The unique identifier for the message service to configure.

ulUIParam : int

Handle of the parent window for the configuration property sheet.

ulFlags : int

Bitmask of flags that controls the display of the property sheet.

[SPropValue, ...] : [values, ...]

Property values describing the properties to display in the property sheet. Should not be None if the service is to be configured without a message service.


PyIMsgServiceAdmin.CreateMsgService

CreateMsgService(serviceName, displayName, ulUIParam, ulFlags)

Creates a message service.

Parameters

serviceName : string

The name of the service.

displayName : string

Display name of the service, or None

ulUIParam : int

Handle of the parent window for the configuration property sheet.

ulFlags : int

Bitmask of flags that controls the display of the property sheet.


PyIMsgServiceAdmin.DeleteMsgService

DeleteMsgService(uuid)

Deletes the specified service

Parameters

uuid : PyIID

The ID of the service


PyIMsgServiceAdmin.GetMsgServiceTable

PyIMAPITable = GetMsgServiceTable(flags)

Retrieves a table of services.

Parameters

flags : int


PyIMsgServiceAdmin.GetProviderTable

PyIMAPITable = GetProviderTable(flags)

Retrieves a table of service providers.

Parameters

flags : int


PyIMsgServiceAdmin.OpenProfileSection

PyIProfSect = OpenProfileSection(uuid, iid , flags )

Opens a profile section

Parameters

uuid : PyIID

The ID of the service

iid : PyIID

The IID of the resulting object, or None for the default

flags : int


PyIMsgServiceAdmin.RenameMsgService

RenameMsgService(uuid, flags, newName)

Renames the specified service

Parameters

uuid : PyIID

The ID of the service

flags : int

newName : string

The new name for the service.


PyIMsgStore

PyIMsgStore Object

An COM interface to MAPI
Derived from PyIMAPIProp

Methods

OpenEntry
Opens a folder or message and returns an interface object for further access.

GetReceiveFolder
Obtains the folder that was established as the destination for incoming messages of a specified message class or the default receive folder for the message store.

GetReceiveFolderTable
provides access to the receive folder table, a table that includes information about all of the receive folders for the message store.

CompareEntryIDs
Compares two entry identifiers belonging to a particular address book provider to determine if they refer to the same address book object

GetLastError
Returns the last error associated with this object

AbortSubmit
Attempts to remove a message from the outgoing queue.


PyIMsgStore.AbortSubmit

int = AbortSubmit(entryId, flags )

Attempts to remove a message from the outgoing queue.

Parameters

entryId : string

The entry ID of the item to be aborted.

flags=0 : int

Reserved - must be zero.


PyIMsgStore.CompareEntryIDs

int = CompareEntryIDs(entryId, entryId , flags )

Compares two entry identifiers belonging to a particular address book provider to determine if they refer to the same address book object

Parameters

entryId : string

The first entry ID to be compared

entryId : string

The second entry ID to be compared

flags=0 : int

Reserved - must be zero.

Return Value

The result is set to TRUE if the two entry identifiers refer to the same object, and FALSE otherwise.


PyIMsgStore.GetLastError

PyMAPIError = GetLastError(hr, flags )

Returns the last error associated with this object

Parameters

hr : int

The HRESULT

flags : int


PyIMsgStore.GetReceiveFolder

PyIID, string = GetReceiveFolder(, flags )

Obtains the folder that was established as the destination for incoming messages of a specified message class or the default receive folder for the message store.

Parameters

: string

Message class that is associated with a receive folder. If thid parameter is set to None or an empty string, GetReceiveFolder returns the default receive folder for the message store.

flags : int


PyIMsgStore.GetReceiveFolderTable

PyIMAPITable = GetReceiveFolderTable(flags)

provides access to the receive folder table, a table that includes information about all of the receive folders for the message store.

Parameters

flags : int

Bitmask of flags that controls table access


PyIMsgStore.OpenEntry

PyIInterface = OpenEntry(entryId, iid , flags )

Opens a folder or message and returns an interface object for further access.

Parameters

entryId : string

The entryID of the object

iid : PyIID

The IID of the object to return, or None for the default IID

flags : int

Bitmask of flags that controls how the object is opened.


PyIOleClientSite

PyIOleClientSite Object

Description of the interface

Methods

SaveObject
Description of SaveObject

GetMoniker
Description of GetMoniker

GetContainer
Description of GetContainer

ShowObject
Description of ShowObject

OnShowWindow
Description of OnShowWindow

RequestNewObjectLayout
Description of RequestNewObjectLayout


PyIOleClientSite.GetContainer

GetContainer()

Description of GetContainer.


PyIOleClientSite.GetMoniker

GetMoniker(dwAssign, dwWhichMoniker)

Description of GetMoniker.

Parameters

dwAssign : int

Description for dwAssign

dwWhichMoniker : int

Description for dwWhichMoniker


PyIOleClientSite.OnShowWindow

OnShowWindow(fShow)

Description of OnShowWindow.

Parameters

fShow : int

Description for fShow


PyIOleClientSite.RequestNewObjectLayout

RequestNewObjectLayout()

Description of RequestNewObjectLayout.


PyIOleClientSite.SaveObject

SaveObject()

Description of SaveObject.


PyIOleClientSite.ShowObject

ShowObject()

Description of ShowObject.


PyIOleControl

PyIOleControl Object

Description of the interface

Methods

GetControlInfo
Description of GetControlInfo

OnMnemonic
Description of OnMnemonic

OnAmbientPropertyChange
Description of OnAmbientPropertyChange

FreezeEvents
Description of FreezeEvents


PyIOleControl.FreezeEvents

FreezeEvents(bFreeze)

Description of FreezeEvents.

Parameters

bFreeze : int

Description for bFreeze


PyIOleControl.GetControlInfo

GetControlInfo()

Description of GetControlInfo.


PyIOleControl.OnAmbientPropertyChange

OnAmbientPropertyChange(dispID)

Description of OnAmbientPropertyChange.

Parameters

dispID : long

Description for dispID


PyIOleControl.OnMnemonic

OnMnemonic(msg)

Description of OnMnemonic.

Parameters

msg : iiiii(ii)

A tuple representing a MSG structure.


PyIOleInPlaceObject

PyIOleInPlaceObject Object

Description of the interface

Methods

InPlaceDeactivate
Description of InPlaceDeactivate

UIDeactivate
Description of UIDeactivate

SetObjectRects
Description of SetObjectRects

ReactivateAndUndo
Description of ReactivateAndUndo


PyIOleInPlaceObject.InPlaceDeactivate

InPlaceDeactivate()

Description of InPlaceDeactivate.


PyIOleInPlaceObject.ReactivateAndUndo

ReactivateAndUndo()

Description of ReactivateAndUndo.


PyIOleInPlaceObject.SetObjectRects

SetObjectRects()

Description of SetObjectRects.


PyIOleInPlaceObject.UIDeactivate

UIDeactivate()

Description of UIDeactivate.


PyIOleInPlaceSite

PyIOleInPlaceSite Object

Description of the interface

Methods

CanInPlaceActivate
Description of CanInPlaceActivate

OnInPlaceActivate
Description of OnInPlaceActivate

OnUIActivate
Description of OnUIActivate

GetWindowContext
Description of GetWindowContext

Scroll
Description of Scroll

OnUIDeactivate
Description of OnUIDeactivate

OnInPlaceDeactivate
Description of OnInPlaceDeactivate

DiscardUndoState
Description of DiscardUndoState

DeactivateAndUndo
Description of DeactivateAndUndo

OnPosRectChange
Description of OnPosRectChange


PyIOleInPlaceSite.CanInPlaceActivate

CanInPlaceActivate()

Description of CanInPlaceActivate.


PyIOleInPlaceSite.DeactivateAndUndo

DeactivateAndUndo()

Description of DeactivateAndUndo.


PyIOleInPlaceSite.DiscardUndoState

DiscardUndoState()

Description of DiscardUndoState.


PyIOleInPlaceSite.GetWindowContext

GetWindowContext()

Description of GetWindowContext.


PyIOleInPlaceSite.OnInPlaceActivate

OnInPlaceActivate()

Description of OnInPlaceActivate.


PyIOleInPlaceSite.OnInPlaceDeactivate

OnInPlaceDeactivate()

Description of OnInPlaceDeactivate.


PyIOleInPlaceSite.OnPosRectChange

OnPosRectChange()

Description of OnPosRectChange.


PyIOleInPlaceSite.OnUIActivate

OnUIActivate()

Description of OnUIActivate.


PyIOleInPlaceSite.OnUIDeactivate

OnUIDeactivate(fUndoable)

Description of OnUIDeactivate.

Parameters

fUndoable : int

Description for fUndoable


PyIOleInPlaceSite.Scroll

Scroll()

Description of Scroll.


PyIOleInPlaceSiteEx

PyIOleInPlaceSiteEx Object

Description of the interface

Methods

OnInPlaceActivateEx
Description of OnInPlaceActivateEx

OnInPlaceDeactivateEx
Description of OnInPlaceDeactivateEx

RequestUIActivate
Description of RequestUIActivate


PyIOleInPlaceSiteEx.OnInPlaceActivateEx

OnInPlaceActivateEx(dwFlags)

Description of OnInPlaceActivateEx.

Parameters

dwFlags : int

Description for dwFlags


PyIOleInPlaceSiteEx.OnInPlaceDeactivateEx

OnInPlaceDeactivateEx(fNoRedraw)

Description of OnInPlaceDeactivateEx.

Parameters

fNoRedraw : int

Description for fNoRedraw


PyIOleInPlaceSiteEx.RequestUIActivate

RequestUIActivate()

Description of RequestUIActivate.


PyIOleInPlaceSiteWindowless

PyIOleInPlaceSiteWindowless Object

Description of the interface

Methods

CanWindowlessActivate
Description of CanWindowlessActivate

GetCapture
Description of GetCapture

SetCapture
Description of SetCapture

GetFocus
Description of GetFocus

SetFocus
Description of SetFocus

GetDC
Description of GetDC

ReleaseDC
Description of ReleaseDC

InvalidateRect
Description of InvalidateRect

InvalidateRgn
Description of InvalidateRgn

ScrollRect
Description of ScrollRect

AdjustRect
Description of AdjustRect

OnDefWindowMessage
Description of OnDefWindowMessage


PyIOleInPlaceSiteWindowless.AdjustRect

AdjustRect()

Description of AdjustRect.


PyIOleInPlaceSiteWindowless.CanWindowlessActivate

CanWindowlessActivate()

Description of CanWindowlessActivate.


PyIOleInPlaceSiteWindowless.GetCapture

GetCapture()

Description of GetCapture.


PyIOleInPlaceSiteWindowless.GetDC

GetDC(grfFlags, rect)

Description of GetDC.

Parameters

grfFlags : int

Description for grfFlags

rect : (int, int, int, int)


PyIOleInPlaceSiteWindowless.GetFocus

GetFocus()

Description of GetFocus.


PyIOleInPlaceSiteWindowless.InvalidateRect

InvalidateRect(rect, fErase)

Description of InvalidateRect.

Parameters

rect : (int, int, int, int)

fErase : int

Description for fErase


PyIOleInPlaceSiteWindowless.InvalidateRgn

InvalidateRgn(hRgn, fErase)

Description of InvalidateRgn.

Parameters

hRgn : int

Handle to a region

fErase : int

Description for fErase


PyIOleInPlaceSiteWindowless.OnDefWindowMessage

OnDefWindowMessage(msg, wParam, lParam)

Description of OnDefWindowMessage.

Parameters

msg : int

Description for msg

wParam : int

Description for wParam

lParam : long

Description for lParam


PyIOleInPlaceSiteWindowless.ReleaseDC

ReleaseDC(hDC)

Description of ReleaseDC.

Parameters

hDC : HDC

Description for hDC


PyIOleInPlaceSiteWindowless.ScrollRect

ScrollRect(dx, dy)

Description of ScrollRect.

Parameters

dx : int

Description for dx

dy : int

Description for dy


PyIOleInPlaceSiteWindowless.SetCapture

SetCapture(fCapture)

Description of SetCapture.

Parameters

fCapture : int

Description for fCapture


PyIOleInPlaceSiteWindowless.SetFocus

SetFocus(fFocus)

Description of SetFocus.

Parameters

fFocus : int

Description for fFocus


PyIOleObject

PyIOleObject Object

Description of the interface

Methods

SetClientSite
Description of SetClientSite

GetClientSite
Description of GetClientSite

SetHostNames
Description of SetHostNames

Close
Description of Close

SetMoniker
Description of SetMoniker

GetMoniker
Description of GetMoniker

InitFromData
Description of InitFromData

GetClipboardData
Description of GetClipboardData

DoVerb
Description of DoVerb

EnumVerbs
Description of EnumVerbs

Update
Description of Update

IsUpToDate
Description of IsUpToDate

GetUserClassID
Description of GetUserClassID

GetUserType
Description of GetUserType

SetExtent
Description of SetExtent

GetExtent
Description of GetExtent

Advise
Description of Advise

Unadvise
Description of Unadvise

EnumAdvise
Description of EnumAdvise

GetMiscStatus
Description of GetMiscStatus

SetColorScheme
Description of SetColorScheme


PyIOleObject.Advise

Advise(pAdvSink)

Description of Advise.

Parameters

pAdvSink : PyIAdviseSink

Description for pAdvSink


PyIOleObject.Close

Close(dwSaveOption)

Description of Close.

Parameters

dwSaveOption : int

Description for dwSaveOption


PyIOleObject.DoVerb

DoVerb(iVerb, pActiveSite, lindex, hwndParent)

Description of DoVerb.

Parameters

iVerb : int

Description for iVerb The input argument lpmsg of type "LPMSG" was not processed *** The type 'LPMSG' (lpmsg) is unknown.

pActiveSite : PyIOleClientSite

Description for pActiveSite

lindex : int

Description for lindex

hwndParent : HWND

Description for hwndParent The input argument lprcPosRect of type "LPCRECT" was not processed *** The type 'LPCRECT' (lprcPosRect) is unknown.


PyIOleObject.EnumAdvise

EnumAdvise()

Description of EnumAdvise.


PyIOleObject.EnumVerbs

EnumVerbs()

Description of EnumVerbs.


PyIOleObject.GetClientSite

GetClientSite()

Description of GetClientSite.


PyIOleObject.GetClipboardData

GetClipboardData(dwReserved)

Description of GetClipboardData.

Parameters

dwReserved : int

Description for dwReserved


PyIOleObject.GetExtent

GetExtent(dwDrawAspect, size)

Description of GetExtent.

Parameters

dwDrawAspect : int

Description for dwDrawAspect

size : (int, int)

Size limit for the object.


PyIOleObject.GetMiscStatus

GetMiscStatus(dwAspect)

Description of GetMiscStatus.

Parameters

dwAspect : int

Description for dwAspect


PyIOleObject.GetMoniker

GetMoniker(dwAssign, dwWhichMoniker)

Description of GetMoniker.

Parameters

dwAssign : int

Description for dwAssign

dwWhichMoniker : int

Description for dwWhichMoniker


PyIOleObject.GetUserClassID

GetUserClassID()

Description of GetUserClassID.


PyIOleObject.GetUserType

GetUserType(dwFormOfType)

Description of GetUserType.

Parameters

dwFormOfType : int

Description for dwFormOfType


PyIOleObject.InitFromData

InitFromData(pDataObject, fCreation, dwReserved)

Description of InitFromData.

Parameters

pDataObject : PyIDataObject

Description for pDataObject

fCreation : int

Description for fCreation

dwReserved : int

Description for dwReserved


PyIOleObject.IsUpToDate

IsUpToDate()

Description of IsUpToDate.


PyIOleObject.SetClientSite

SetClientSite(pClientSite)

Description of SetClientSite.

Parameters

pClientSite : PyIOleClientSite

Description for pClientSite


PyIOleObject.SetColorScheme

SetColorScheme()

Description of SetColorScheme.


PyIOleObject.SetExtent

SetExtent(dwDrawAspect, size)

Description of SetExtent.

Parameters

dwDrawAspect : int

Description for dwDrawAspect

size : (int, int)

Size limit for the object.


PyIOleObject.SetHostNames

SetHostNames(szContainerApp, szContainerObj)

Description of SetHostNames.

Parameters

szContainerApp : unicode

Description for szContainerApp

szContainerObj : unicode

Description for szContainerObj


PyIOleObject.SetMoniker

SetMoniker(dwWhichMoniker, pmk)

Description of SetMoniker.

Parameters

dwWhichMoniker : int

Description for dwWhichMoniker

pmk : PyIMoniker

Description for pmk


PyIOleObject.Unadvise

Unadvise(dwConnection)

Description of Unadvise.

Parameters

dwConnection : int

Description for dwConnection


PyIOleObject.Update

Update()

Description of Update.


PyIOleWindow

PyIOleWindow Object

Description of the interface

Methods

GetWindow
Description of GetWindow

ContextSensitiveHelp
Description of ContextSensitiveHelp


PyIOleWindow.ContextSensitiveHelp

ContextSensitiveHelp(fEnterMode)

Description of ContextSensitiveHelp.

Parameters

fEnterMode : int

Description for fEnterMode


PyIOleWindow.GetWindow

GetWindow()

Description of GetWindow.


PyIPersist

PyIPersist Object

A Python interface to IPersist

Methods

GetClassID
Returns the class identifier (CLSID) for the component object.


PyIPersist.GetClassID

PyIID = GetClassID()

Returns the class identifier (CLSID) for the component object.


PyIPersistFile

PyIPersistFile Object

Description of the interface

Methods

IsDirty
Checks an object for changes since it was last saved to its current file.

Load
Opens the specified file and initializes an object from the file contents.

Save
Saves the object into the specified file.

SaveCompleted
Notifies the object that it can revert from NoScribble mode to Normal mode.

GetCurFile
Gets the current name of the file associated with the object.


PyIPersistFile.GetCurFile

unicode = GetCurFile()

Gets the current name of the file associated with the object.


PyIPersistFile.IsDirty

IsDirty()

Checks an object for changes since it was last saved to its current file.

Return Value

This method returns the raw COM error code without raising the normal COM exception. You should treat any error return codes as an indication that the object has changed. Unless this method explicitly returns S_FALSE, assume that the object must be saved.


PyIPersistFile.Load

Load(pszFileName, dwMode)

Opens the specified file and initializes an object from the file contents.

Parameters

pszFileName : unicode

Absolute path of the file to open

dwMode=STGM_READ : int

Specifies the access mode from the STGM enumeration.


PyIPersistFile.Save

Save(pszFileName, fRemember)

Saves the object into the specified file.

Parameters

pszFileName : unicode

absolute path of the file where the object is saved.

fRemember : int

Specifies whether the file is to be the current working file or not.


PyIPersistFile.SaveCompleted

SaveCompleted(pszFileName)

Notifies the object that it can revert from NoScribble mode to Normal mode.

Parameters

pszFileName : unicode

Absolute path of the file where the object was saved.


PyIPersistFolder

PyIPersistFolder Object

Description of the interface

Methods

Initialize
Description of Initialize


PyIPersistFolder.Initialize

Initialize(pidl)

Description of Initialize.

Parameters

pidl : PyIDL

Description for pidl


PyIPersistPropertyBag

PyIPersistPropertyBag Object

A Python wrapper for a COM IPersistPropertyBag interface.

Methods

InitNew
Called by the container when the control is initialized to initialize the property bag.

Load
Called by the container to load the control's properties.

Save
Called by the container to save the object's properties.


PyIPersistPropertyBag.InitNew

InitNew()

Called by the container when the control is initialized to initialize the property bag.


PyIPersistPropertyBag.Load

Load(bag, log)

Called by the container to load the control's properties.

Parameters

bag : PyIPropertyBag

the caller's property bag.

log=None : PyIErrorLog

the caller's error log, or None


PyIPersistPropertyBag.Save

Save(bag, clearDirty, saveProperties)

Called by the container to save the object's properties.

Parameters

bag : PyIPropertyBag

the caller's property bag.

clearDirty : int

Specifies whether to clear the dirty flag.

saveProperties : int

Specifies whether to save all properties or just those that have changed


PyIPersistStorage

PyIPersistStorage Object

A Python wrapper of a COM IPersistStorage interface.

Comments

The IPersistStorage interface defines methods that enable a container application to pass a storage object to one of its contained objects and to load and save the storage object. This interface supports the structured storage model, in which each contained object has its own storage that is nested within the container's storage.

Methods

IsDirty
Checks the object for changes since it was last saved.

InitNew
Initializes a new object, providing a storage object to be used for the object.

Load
Loads an object from its existing storage.

Save
Saves an object, and any nested objects that it contains, into the specified storage.

SaveCompleted
Notifies the object that it can revert from NoScribble or HandsOff mode.

HandsOffStorage
Instructs the object to release all storage objects that have been passed to it by its container and to enter HandsOff mode.


PyIPersistStorage.HandsOffStorage

HandsOffStorage()

Instructs the object to release all storage objects that have been passed to it by its container and to enter HandsOff mode, in which the object cannot do anything and the only operation that works is a close operation.


PyIPersistStorage.InitNew

InitNew(PyIStorage)

Initializes a new object, providing a storage object to be used for the object.

Parameters

PyIStorage : PyIStorage

PyIStorage for the new storage object to be initialized. The container creates a nested storage object in its storage object (see PyIStorage::CreateStorage). Then, the container calls the PyIPersistStorage::WriteClassStg function to initialize the new storage object with the object class identifier (CLSID).


PyIPersistStorage.IsDirty

int = IsDirty()

Checks the object for changes since it was last saved.

Return Value | Description
S_OK (ie, 0) | The object has changed since it was last saved.
S_FALSE (ie, 1) | The object has not changed since the last save.


PyIPersistStorage.Load

Load(storage)

Loads an object from its existing storage.

Parameters

storage : PyIStorage

Existing storage for the object.


PyIPersistStorage.Save

Save(PyIStorage, int)

Saves an object, and any nested objects that it contains, into the specified storage. The object is placed in NoScribble mode, and it must not write to the specified storage until it receives a call to its PyIPersistStorage::SaveCompleted method.

Parameters

PyIStorage : PyIStorage

Storage for the object

int : fSameAsLoad

Indicates whether the specified storage object is the current one.
This parameter is set to FALSE when performing a Save As or Save A Copy To operation or when performing a full save. In the latter case, this method saves to a temporary file, deletes the original file, and renames the temporary file.
This parameter is set to TRUE to perform a full save in a low-memory situation or to perform a fast incremental save in which only the dirty components are saved.


PyIPersistStorage.SaveCompleted

SaveCompleted(PyIStorage)

Notifies the object that it can revert from NoScribble or HandsOff mode, in which it must not write to its storage object, to Normal mode, in which it can. The object enters NoScribble mode when it receives an PyIPersistStorage::Save call.

Parameters

PyIStorage : PyIStorage

The current storage object


PyIPersistStream

PyIPersistStream Object

A Python interface to IPersistStream

Methods

IsDirty
Checks the object for changes since it was last saved.

Load
Initializes an object from the stream where it was previously saved.

Save
Saves an object to the specified stream.

GetSizeMax
Returns the size in bytes of the stream needed to save the object.


PyIPersistStream.GetSizeMax

ULARGE_INTEGER = GetSizeMax()

Returns the size in bytes of the stream needed to save the object.


PyIPersistStream.IsDirty

int = IsDirty()

Checks the object for changes since it was last saved.

Return Value | Description
S_OK (ie, 0) | The object has changed since it was last saved.
S_FALSE (ie, 1) | The object has not changed since the last save.


PyIPersistStream.Load

Load(stream)

Initializes an object from the stream where it was previously saved.

Parameters

stream : PyIStream

Stream object to load from.

Comments

This method loads an object from its associated stream. The seek pointer is set as it was in the most recent PyIPersistStream::Save method. This method can seek and read from the stream, but cannot write to it.

On exit, the seek pointer must be in the same position it was in on entry, immediately past the end of the data.


PyIPersistStream.Save

Save(stream, bClearDirty)

Saves an object to the specified stream.

Parameters

stream : PyIStream

The stream to save to.

bClearDirty : int

Indicates whether to clear the dirty flag after the save is complete


PyIPersistStreamInit

PyIPersistStreamInit Object

A Python interface to IPersistStreamInit

Methods

InitNew
Initializes the object to a default state.


PyIPersistStreamInit.InitNew

InitNew()

Initializes the object to a default state.


PyIProcessDebugManager

PyIProcessDebugManager Object

Description of the interface

Methods

CreateApplication
Description of CreateApplication

GetDefaultApplication
Description of GetDefaultApplication

AddApplication
Description of AddApplication

RemoveApplication
Description of RemoveApplication

CreateDebugDocumentHelper
Description of CreateDebugDocumentHelper.


PyIProcessDebugManager.AddApplication

AddApplication(pda)

Description of AddApplication.

Parameters

pda : PyIDebugApplication

Description for pda


PyIProcessDebugManager.CreateApplication

CreateApplication()

Description of CreateApplication.


PyIProcessDebugManager.CreateDebugDocumentHelper

CreateDebugDocumentHelper(unkOuter)

Description of CreateDebugDocumentHelper.

Parameters

unkOuter : PyIIUnknown

The outer object for aggregation, or (usually!) None


PyIProcessDebugManager.GetDefaultApplication

GetDefaultApplication()

Description of GetDefaultApplication.


PyIProcessDebugManager.RemoveApplication

RemoveApplication(dwAppCookie)

Description of RemoveApplication.

Parameters

dwAppCookie : int

Description for dwAppCookie


PyIProfAdmin

PyIProfAdmin Object

An COM interface to MAPI
Derived from PyIUnknown


PyIProfSect

PyIProfSect Object

An interface for accessing profile sections
Derived from PyIMAPIProp


PyIPropertyBag

PyIPropertyBag Object

A Python wrapper for a COM IPropertyBag interface.

Comments

The IPropertyBag interface provides an object with a property bag in which the object can persistently save its properties.
When a client wishes to have exact control over how individually named properties of an object are saved, it would attempt to use an object's IPersistPropertyBag interface as a persistence mechanism. In that case the client supplies a property bag to the object in the form of an IPropertyBag interface.

Methods

Read
Called by the control to read a property from the storage provided by the container.

Write
Called by the control to write each property in turn to the storage provided by the container.


PyIPropertyBag.Read

object = Read(propName, propType , errorLog )

Called by the control to read a property from the storage provided by the container.

Parameters

propName : string

Name of the property to read.

propType : int

The type of the object to read. Must be a VT_* Variant Type constant.

errorLog=None : PyIErrorLog

The caller's PyIErrorLog object in which the property bag stores any errors that occur during reads. Can be None in which case the caller is not interested in errors.

Comments

The result is a Python object, mapped from a COM VARIANT of type as specified in the propType parameter.


PyIPropertyBag.Write

Write(propName, value)

Called by the control to write each property in turn to the storage provided by the container.

Parameters

propName : string

Name of the property to read.

value : object

The value for the property. The value must be able to be converted to a COM VARIANT.


PyIPropertySetStorage

PyIPropertySetStorage Object

Description of the interface

Methods

Create
Description of Create

Open
Description of Open

Delete
Description of Delete

Enum
Description of Enum


PyIPropertySetStorage.Create

Create(fmtid, clsid>, grfFlags, grfMode)

Description of Create.

Parameters

fmtid : PyIID

Description for fmtid

clsid> : PyIID

Description for clsid

grfFlags : int

Description for grfFlags

grfMode : int

Description for grfMode


PyIPropertySetStorage.Delete

Delete(fmtid)

Description of Delete.

Parameters

fmtid : PyIID

Description for fmtid


PyIPropertySetStorage.Enum

Enum()

Description of Enum.


PyIPropertySetStorage.Open

Open(fmtid, grfMode)

Description of Open.

Parameters

fmtid : PyIID

Description for fmtid

grfMode=STGM_READ | STGM_SHARE_EXCLUSIVE : int

Description for grfMode


PyIPropertyStorage

PyIPropertyStorage Object

Description of the interface

Methods

ReadMultiple
Reads specified properties from the current property set.

WriteMultiple
Description of WriteMultiple

DeleteMultiple
Description of DeleteMultiple

ReadPropertyNames
Retrieves any existing string names for the specified property identifiers.

WritePropertyNames
Assigns string names to a specified array of property IDs in the current property set.

DeletePropertyNames
Description of DeletePropertyNames

Commit
Description of Commit

Revert
Description of Revert

Enum
Description of Enum

SetTimes
Description of SetTimes

SetClass
Description of SetClass

Stat
Description of Stat


PyIPropertyStorage.Commit

Commit(grfCommitFlags)

Description of Commit.

Parameters

grfCommitFlags : int

Description for grfCommitFlags


PyIPropertyStorage.DeleteMultiple

DeleteMultiple(props)

Description of DeleteMultiple.

Parameters

props : (PROPSPEC , ...)

The property IDs.


PyIPropertyStorage.DeletePropertyNames

DeletePropertyNames(props)

Description of DeletePropertyNames.

Parameters

props : (PROPSPEC , ...)

The property IDs.


PyIPropertyStorage.Enum

Enum()

Description of Enum.


PyIPropertyStorage.ReadMultiple

ReadMultiple(props)

Reads specified properties from the current property set.

Parameters

props : (PROPSPEC , ...)

The property IDs.


PyIPropertyStorage.ReadPropertyNames

ReadPropertyNames(props)

Retrieves any existing string names for the specified property identifiers.

Parameters

props : (PROPSPEC , ...)

The property IDs.


PyIPropertyStorage.Revert

Revert()

Description of Revert.


PyIPropertyStorage.SetClass

SetClass(clsid)

Description of SetClass.

Parameters

clsid : PyIID

Description for clsid


PyIPropertyStorage.SetTimes

SetTimes(pctime, patime, pmtime)

Description of SetTimes.

Parameters

pctime : PyTime

Description for pctime

patime : PyTime

Description for patime

pmtime : PyTime

Description for pmtime


PyIPropertyStorage.Stat

Stat()

Description of Stat.


PyIPropertyStorage.WriteMultiple

WriteMultiple(props, values)

Description of WriteMultiple.

Parameters

props : (PROPSPEC , ...)

The property IDs.

values : (PROPVARIANT , ...)

The values for the properties.


PyIPropertyStorage.WritePropertyNames

WritePropertyNames(props, names)

Assigns string names to a specified array of property IDs in the current property set.

Parameters

props : (PROPSPEC , ...)

The property IDs.

names : (string, ...)

The property names.


PyIProvideClassInfo

PyIProvideClassInfo Object

A Python interface to IProvideClassInfo

Methods

GetClassInfo
Gets information about the CO_CLASS.


PyIProvideClassInfo.GetClassInfo

PyITypeInfo = GetClassInfo()

Gets information about the CO_CLASS.


PyIProvideClassInfo2

PyIProvideClassInfo2 Object

Methods

GetGUID
Gets the default event sink IID for the object (if any).


PyIProvideClassInfo2.GetGUID

PyIID = GetGUID(flags)

Gets the GUID for the object.

Parameters

flags : int

The flags for the GUID.


PyIProvideExpressionContexts

PyIProvideExpressionContexts Object

Description of the interface

Methods

EnumExpressionContexts
Description of EnumExpressionContexts


PyIProvideExpressionContexts.EnumExpressionContexts

EnumExpressionContexts()

Description of EnumStackFrames.


PyIRemoteDebugApplication

PyIRemoteDebugApplication Object

Description of the interface

Methods

ResumeFromBreakPoint
Continue an application which is currently in a breakpoint.

CauseBreak
Causes the application to break into the debugger at the earliest opportunity.

ConnectDebugger
Connects a debugger to the application.

DisconnectDebugger
Disconnects the current debugger from the application.

GetDebugger
Returns the current debugger connected to the application.

CreateInstanceAtApplication
Create objects in the application process address space.

QueryAlive
Indicates if the application is alive.

EnumThreads
Enumerates all threads known to be associated with the application.

GetName
Description of GetName

GetRootNode
Returns the application node under which all nodes associated with the application are added.

EnumGlobalExpressionContexts
Enumerates all global expression contexts.


PyIRemoteDebugApplication.CauseBreak

CauseBreak()

Causes the application to break into the debugger at the earliest opportunity.

Comments

Note that a long time may elapse before the application actually breaks, particularly if the application is not currently executing script code.


PyIRemoteDebugApplication.ConnectDebugger

ConnectDebugger(pad)

Connects a debugger to the application.

Parameters

pad : PyIApplicationDebugger

Description for pad

Comments

Only one debugger may be connected at a time; this method fails if there is already a debugger connected.


PyIRemoteDebugApplication.CreateInstanceAtApplication

PyIUnknown = CreateInstanceAtApplication(rclsid, pUnkOuter , dwClsContext , riid )

Create objects in the application process address space.

Parameters

rclsid : PyIID

Description for rclsid

pUnkOuter : PyIUnknown

Description for pUnkOuter

dwClsContext : int

Description for dwClsContext

riid : PyIID

Description for riid

Comments

Provides a mechanism for the debugger IDE, running out-of-process to the application, to create objects in the application process. This method simply delegates to CoCreateInstance.


PyIRemoteDebugApplication.DisconnectDebugger

DisconnectDebugger()

Disconnects the current debugger from the application.


PyIRemoteDebugApplication.EnumGlobalExpressionContexts

IEnumDebugExpressionContexts = EnumGlobalExpressionContexts()

Enumerates all global expression contexts


PyIRemoteDebugApplication.EnumThreads

PyIEnumRemoteDebugApplicationThreads = EnumThreads()

Enumerates all threads known to be associated with the application.

Comments

New threads may be added at any time.


PyIRemoteDebugApplication.GetDebugger

PyIApplicationDebugger = GetDebugger()

Returns the current debugger connected to the application.


PyIRemoteDebugApplication.GetName

GetName()

Description of GetName.


PyIRemoteDebugApplication.GetRootNode

PyIDebugApplicationNode = GetRootNode()

Returns the application node under which all nodes associated with the application are added.


PyIRemoteDebugApplication.QueryAlive

QueryAlive()

Returns True if alive, else False.


PyIRemoteDebugApplication.ResumeFromBreakPoint

ResumeFromBreakPoint(prptFocus, bra, era)

Continue an application which is currently in a breakpoint.

Parameters

prptFocus : PyIRemoteDebugApplicationThread

Description for prptFocus

bra : int

Break resume action

era : int

Error resume action


PyIRemoteDebugApplicationEvents

PyIRemoteDebugApplicationEvents Object

Description of the interface

Methods

OnConnectDebugger
Description of OnConnectDebugger

OnDisconnectDebugger
Description of OnDisconnectDebugger

OnSetName
Description of OnSetName

OnDebugOutput
Description of OnDebugOutput

OnClose
Description of OnClose

OnEnterBreakPoint
Description of OnEnterBreakPoint

OnLeaveBreakPoint
Description of OnLeaveBreakPoint

OnCreateThread
Description of OnCreateThread

OnDestroyThread
Description of OnDestroyThread

OnBreakFlagChange
Description of OnBreakFlagChange


PyIRemoteDebugApplicationEvents.OnBreakFlagChange

OnBreakFlagChange(abf, prdatSteppingThread)

Description of OnBreakFlagChange.

Parameters

abf : int

Description for abf

prdatSteppingThread : PyIRemoteDebugApplicationThread

Description for prdatSteppingThread


PyIRemoteDebugApplicationEvents.OnClose

OnClose()

Description of OnClose.


PyIRemoteDebugApplicationEvents.OnConnectDebugger

OnConnectDebugger(pad)

Description of OnConnectDebugger.

Parameters

pad : PyIApplicationDebugger

Description for pad


PyIRemoteDebugApplicationEvents.OnCreateThread

OnCreateThread(prdat)

Description of OnCreateThread.

Parameters

prdat : PyIRemoteDebugApplicationThread

Description for prdat


PyIRemoteDebugApplicationEvents.OnDebugOutput

OnDebugOutput(pstr)

Description of OnDebugOutput.

Parameters

pstr : unicode

Description for pstr


PyIRemoteDebugApplicationEvents.OnDestroyThread

OnDestroyThread(prdat)

Description of OnDestroyThread.

Parameters

prdat : PyIRemoteDebugApplicationThread

Description for prdat


PyIRemoteDebugApplicationEvents.OnDisconnectDebugger

OnDisconnectDebugger()

Description of OnDisconnectDebugger.


PyIRemoteDebugApplicationEvents.OnEnterBreakPoint

OnEnterBreakPoint(prdat)

Description of OnEnterBreakPoint.

Parameters

prdat : PyIRemoteDebugApplicationThread

Description for prdat


PyIRemoteDebugApplicationEvents.OnLeaveBreakPoint

OnLeaveBreakPoint(prdat)

Description of OnLeaveBreakPoint.

Parameters

prdat : PyIRemoteDebugApplicationThread

Description for prdat


PyIRemoteDebugApplicationEvents.OnSetName

OnSetName(pstrName)

Description of OnSetName.

Parameters

pstrName : unicode

Description for pstrName


PyIRemoteDebugApplicationThread

PyIRemoteDebugApplicationThread Object

Description of the interface

Methods

GetSystemThreadId
Description of GetSystemThreadId

GetApplication
Description of GetApplication

EnumStackFrames
Description of EnumStackFrames

GetDescription
Description of GetDescription

SetNextStatement
Description of SetNextStatement

GetState
Description of GetState

Suspend
Description of Suspend

Resume
Description of Resume

GetSuspendCount
Description of GetSuspendCount


PyIRemoteDebugApplicationThread.EnumStackFrames

EnumStackFrames()

Description of EnumStackFrames.


PyIRemoteDebugApplicationThread.GetApplication

GetApplication()

Description of GetApplication.


PyIRemoteDebugApplicationThread.GetDescription

GetDescription()

Description of GetDescription.


PyIRemoteDebugApplicationThread.GetState

GetState()

Description of GetState.


PyIRemoteDebugApplicationThread.GetSuspendCount

GetSuspendCount()

Description of GetSuspendCount.


PyIRemoteDebugApplicationThread.GetSystemThreadId

GetSystemThreadId()

Description of GetSystemThreadId.


PyIRemoteDebugApplicationThread.Resume

Resume()

Description of Resume.


PyIRemoteDebugApplicationThread.SetNextStatement

SetNextStatement(pStackFrame, pCodeContext)

Description of SetNextStatement.

Parameters

pStackFrame : PyIDebugStackFrame

Description for pStackFrame

pCodeContext : PyIDebugCodeContext

Description for pCodeContext


PyIRemoteDebugApplicationThread.Suspend

Suspend()

Description of Suspend.


PyIRunningObjectTable

PyIRunningObjectTable Object

A Python interface to IRunningObjectTable

Methods

IsRunning
Checks whether an object is running.

GetObject
Checks whether an object is running.

EnumRunning
Creates an enumerator that can list the monikers of all the objects currently registered in the Running Object Table (ROT).


PyIRunningObjectTable.EnumRunning

PyIEnumMoniker = EnumRunning()

Creates an enumerator that can list the monikers of all the objects currently registered in the Running Object Table (ROT).


PyIRunningObjectTable.GetObject

PyIUnknown = GetObject(objectName)

Checks whether an object is running.

Parameters

objectName : PyIMoniker

The PyIMoniker interface on the moniker to search for in the Running Object Table.


PyIRunningObjectTable.IsRunning

int = IsRunning(objectName)

Checks whether an object is running.

Parameters

objectName : PyIMoniker

The PyIMoniker interface on the moniker to search for in the Running Object Table.

Return Value | Description
S_OK (ie, 0) | The object identified by objectName is running.
S_FALSE (ie, 1) | There is no entry for objectName in the ROT, or that the object it identifies is no longer running (in which case, the entry is revoked).


PyIServiceProvider

PyIServiceProvider Object

A Python interface to IServiceProvider

Methods

QueryService
Creates or accesses the specified service and returns an interface object to the specified interface for the service.


PyIServiceProvider.QueryService

PyIUnknown = QueryService(clsid, iid )

Creates or accesses the specified service and returns an interface object to the specified interface for the service.

Parameters

clsid : PyIID

Unique identifier for the requested service.

iid : PyIID

Unique identifier for the requested interface on the service.


PyIShellBrowser

PyIShellBrowser Object

Description of the interface

Methods

SetMenuSB
Description of SetMenuSB

RemoveMenusSB
Description of RemoveMenusSB

SetStatusTextSB
Description of SetStatusTextSB

EnableModelessSB
Description of EnableModelessSB

TranslateAcceleratorSB
Description of TranslateAcceleratorSB

BrowseObject
Description of BrowseObject

GetViewStateStream
Description of GetViewStateStream

GetControlWindow
Description of GetControlWindow

SendControlMsg
Description of SendControlMsg

QueryActiveShellView
Description of QueryActiveShellView

OnViewWindowActive
Description of OnViewWindowActive


PyIShellBrowser.BrowseObject

BrowseObject(pidl, wFlags)

Description of BrowseObject.

Parameters

pidl : PyIDL

Description for pidl

wFlags : int

Description for wFlags


PyIShellBrowser.EnableModelessSB

EnableModelessSB(fEnable)

Description of EnableModelessSB.

Parameters

fEnable : int

Description for fEnable


PyIShellBrowser.GetControlWindow

GetControlWindow(id)

Description of GetControlWindow.

Parameters

id : int

Description for id


PyIShellBrowser.GetViewStateStream

GetViewStateStream(grfMode)

Description of GetViewStateStream.

Parameters

grfMode : int

Description for grfMode


PyIShellBrowser.OnViewWindowActive

OnViewWindowActive(pshv)

Description of OnViewWindowActive.

Parameters

pshv : PyIShellView

Description for pshv


PyIShellBrowser.QueryActiveShellView

QueryActiveShellView()

Description of QueryActiveShellView.


PyIShellBrowser.RemoveMenusSB

RemoveMenusSB(hmenuShared)

Description of RemoveMenusSB.

Parameters

hmenuShared : int

Description for hmenuShared


PyIShellBrowser.SendControlMsg

SendControlMsg(id, uMsg, wParam, lParam)

Description of SendControlMsg.

Parameters

id : int

Description for id

uMsg : int

Description for uMsg

wParam : int

Description for wParam

lParam : long

Description for lParam


PyIShellBrowser.SetMenuSB

SetMenuSB(hmenuShared, holemenuRes, hwndActiveObject)

Description of SetMenuSB.

Parameters

hmenuShared : int

Description for hmenuShared

holemenuRes : int

Description for holemenuRes

hwndActiveObject : HWND

Description for hwndActiveObject


PyIShellBrowser.SetStatusTextSB

SetStatusTextSB(pszStatusText)

Description of SetStatusTextSB.

Parameters

pszStatusText : unicode

Description for pszStatusText


PyIShellBrowser.TranslateAcceleratorSB

TranslateAcceleratorSB(pmsg, wID)

Description of TranslateAcceleratorSB.

Parameters

pmsg : PyMSG

Description for pmsg

wID : int

Description for wID


PyIShellExtInit

PyIShellExtInit Object

Description of the interface

Methods

Initialize
Description of Initialize


PyIShellExtInit.Initialize

Initialize(pFolder, pDataObject, hkey)

Description of Initialize.

Parameters

pFolder : PyIDL

Description for pFolder

pDataObject : PyIDataObject

Description for pDataObject

hkey : PyHANDLE

Description for hkey


PyIShellFolder

PyIShellFolder Object

Description of the interface

Methods

ParseDisplayName
Description of ParseDisplayName

EnumObjects
Description of EnumObjects

BindToObject
Description of BindToObject

BindToStorage
Description of BindToStorage

CompareIDs
Description of CompareIDs

CreateViewObject
Description of CreateViewObject

GetAttributesOf
Description of GetAttributesOf

GetUIObjectOf
Description of GetUIObjectOf

GetDisplayNameOf
Description of GetDisplayNameOf

SetNameOf
Description of SetNameOf

__iter__
Enumerates all objects in this folder.


PyIShellFolder.BindToObject

BindToObject(pidl, pbcReserved, riid)

Description of BindToObject.

Parameters

pidl : PyIDL

Description for pidl

pbcReserved : PyIBindCtx

Description for pbcReserved

riid : PyIID

Description for riid


PyIShellFolder.BindToStorage

BindToStorage(pidl, pbcReserved, riid)

Description of BindToStorage.

Parameters

pidl : PyIDL

Description for pidl

pbcReserved : PyIBindCtx

Description for pbcReserved

riid : PyIID

Description for riid


PyIShellFolder.CompareIDs

int = CompareIDs(lparam, pidl1 , pidl2 )

Description of CompareIDs.

Parameters

lparam : int

Description for lparam

pidl1 : PyIDL

Description for pidl1

pidl2 : PyIDL

Description for pidl2


PyIShellFolder.CreateViewObject

CreateViewObject(hwndOwner, riid)

Description of CreateViewObject.

Parameters

hwndOwner : HWND

Description for hwndOwner

riid : PyIID

Description for riid


PyIShellFolder.EnumObjects

EnumObjects(hwndOwner, grfFlags)

Description of EnumObjects.

Parameters

hwndOwner=0 : HWND

Description for hwndOwner

grfFlags=SHCONTF_FOLDERS|SHCONTF_NONFOLDERS|SHCONTF_INCLUDEHIDDEN : int

Description for grfFlags


PyIShellFolder.GetAttributesOf

GetAttributesOf(pidl, rgfInOut)

Description of GetAttributesOf.

Parameters

pidl : PyIDL

Description for pidl

rgfInOut : int

Description for rgfInOut


PyIShellFolder.GetDisplayNameOf

GetDisplayNameOf(pidl, uFlags)

Description of GetDisplayNameOf.

Parameters

pidl : PyIDL

Description for pidl

uFlags : int

Description for uFlags


PyIShellFolder.GetUIObjectOf

GetUIObjectOf(hwndOwner, pidl, riid, rgfInOut)

Description of GetUIObjectOf.

Parameters

hwndOwner : HWND

Description for hwndOwner

pidl : PyIDL

Description for pidl

riid : PyIID

Description for riid

rgfInOut : int

Description for rgfInOut


PyIShellFolder.ParseDisplayName

ParseDisplayName(hwndOwner, pbcReserved, lpszDisplayName)

Description of ParseDisplayName.

Parameters

hwndOwner : HWND

Description for hwndOwner

pbcReserved : PyIBindCtx

Description for pbcReserved

lpszDisplayName : unicode

Description for lpszDisplayName


PyIShellFolder.SetNameOf

SetNameOf(hwndOwner, pidl, lpszName)

Description of SetNameOf.

Parameters

hwndOwner : HWND

Description for hwndOwner

pidl : PyIDL

Description for pidl

lpszName : unicode

Description for lpszName


PyIShellLink

PyIShellLink Object

Description of the interface

Methods

GetPath
Retrieves the path and file name of a shell link object.

GetIDList
Retrieves the list of item identifiers for a shell link object.

SetIDList
Sets the list of item identifiers for a shell link object.

GetDescription
Description of GetDescription

SetDescription
Description of SetDescription

GetWorkingDirectory
Description of GetWorkingDirectory

SetWorkingDirectory
Description of SetWorkingDirectory

GetArguments
Retrieves the command-line arguments associated with a shell link object.

SetArguments
Sets the command-line arguments associated with a shell link object.

GetHotkey
Retrieves the hot key for a shell link object.

SetHotkey
Sets the hot key for a shell link object.

GetShowCmd
Retrieves the show (SW_) command for a shell link object.

SetShowCmd
Sets the show (SW_) command for a shell link object.

GetIconLocation
Retrieves the location (path and index) of the icon for a shell link object.

SetIconLocation
Sets the location (path and index) of the icon for a shell link object.

SetRelativePath
Sets the relative path for a shell link object.

Resolve
Resolves a shell link

SetPath
Sets the path and file name of a shell link object.


PyIShellLink.GetArguments

string = GetArguments(cchMaxName)

Retrieves the command-line arguments associated with a shell link object.

Parameters

cchMaxName=1024 : int

Number of characters to fetch.


PyIShellLink.GetDescription

GetDescription(cchMaxName)

Description of GetDescription.

Parameters

cchMaxName=1024 : int

Description for cchMaxName


PyIShellLink.GetHotkey

int = GetHotkey()

Retrieves the hot key for a shell link object.

Comments

Note: My tests do not seem to be working. at least, the values returned seem not to match what the documentation says should be returned. I would expect with a Hotkey of CTRL-ALT-T, to get an integer where integer & 256 == ord('T'), i.e. 116 or 84, instead I get 1620


PyIShellLink.GetIDList

string = GetIDList()

Retrieves the list of item identifiers for a shell link object.


PyIShellLink.GetIconLocation

string = GetIconLocation(cchMaxPath)

Retrieves the location (path and index) of the icon for a shell link object.

Parameters

cchMaxPath=_MAX_PATH : int

Number of characters to allocate for the result string.


PyIShellLink.GetPath

name, WIN32_FIND_DATA = GetPath(fFlags, cchMaxPath )

Retrieves the path and file name of a shell link object.

Parameters

fFlags : int

One of the following values:

Value | Description
SLGP_SHORTPATH | Retrieves the standard short (8.3 format) file name.
SLGP_UNCPRIORITY | Retrieves the Universal Naming Convention (UNC) path name of the file.
SLGP_RAWPATH | Retrieves the raw path name. A raw path is something that might not exist and may include environment variables that need to be expanded.

cchMaxPath=_MAX_PATH : int

Description for cchMaxPath


PyIShellLink.GetShowCmd

int = GetShowCmd()

Retrieves the show (SW_) command for a shell link object.


PyIShellLink.GetWorkingDirectory

GetWorkingDirectory(cchMaxName)

Description of GetWorkingDirectory.

Parameters

cchMaxName=1024 : int

Description for cchMaxName


PyIShellLink.Resolve

Resolve(hwnd, fFlags)

Resolves a shell link by searching for the shell link object and updating the shell link path and its list of identifiers (if necessary)

Parameters

hwnd : HWND

The parent window of a dialog which will pop up if resolution fails.

fFlags : int

One of the following constants:

Value | Description
SLR_INVOKE_MSI | Call the Microsoft Windows Installer.
SLR_NOLINKINFO | Disable distributed link tracking. By default, distributed link tracking tracks removable media across multiple devices based on the volume name. It also uses the UNC path to track remote file systems whose drive letter has changed. Setting SLR_NOLINKINFO disables both types of tracking.
SLR_NO_UI | Do not display a dialog box if the link cannot be resolved. When SLR_NO_UI is set, the high-order word of fFlags can be set to a time-out value that specifies the maximum amount of time to be spent resolving the link. The function returns if the link cannot be resolved within the time-out duration. If the high-order word is set to zero, the time-out duration will be set to the default value of 3,000 milliseconds (3 seconds). To specify a value, set the high word of fFlags to the desired time-out duration, in milliseconds.
SLR_NOUPDATE | Do not update the link information.
SLR_NOSEARCH | Do not execute the search heuristics.
SLR_NOTRACK | Do not use distributed link tracking.
SLR_UPDATE | If the link object has changed, update its path and list of identifiers. If SLR_UPDATE is set, you do not need to call IPersistFile::IsDirty to determine whether or not the link object has changed.


PyIShellLink.SetArguments

SetArguments(args)

Sets the command-line arguments associated with a shell link object.

Parameters

args : string

The new arguments.


PyIShellLink.SetDescription

SetDescription()

Description of SetDescription.


PyIShellLink.SetHotkey

SetHotkey(wHotkey)

Sets the hot key for a shell link object.

Parameters

wHotkey : int

The virtual key code is in the low-order byte, and the modifier flags are in the high-order byte. The modifier flags can be a combination of the values specified in the description of the PyIShellLink::GetHotkey method.


PyIShellLink.SetIDList

SetIDList()

Sets the list of item identifiers for a shell link object.


PyIShellLink.SetIconLocation

SetIconLocation(iconPath, iIcon)

Sets the location (path and index) of the icon for a shell link object.

Parameters

iconPath : string

Path to the file with the icon.

iIcon : int

Index of the icon.


PyIShellLink.SetPath

SetPath(path)

Sets the path and file name of a shell link object.

Parameters

path : string

The path and filename of the link.


PyIShellLink.SetRelativePath

SetRelativePath(relPath, reserved)

Sets the relative path for a shell link object.

Parameters

relPath : string

The relative path.

reserved=0 : int

Reserved - must be zero.

Comments

This mechanism allows for moved link files to reestablish connection with relative files through similar-prefix comparisons


PyIShellLink.SetShowCmd

SetShowCmd(iShowCmd)

Sets the show (SW_) command for a shell link object.

Parameters

iShowCmd : int

The new show command value.


PyIShellLink.SetWorkingDirectory

SetWorkingDirectory()

Description of SetWorkingDirectory.


PyIShellView

PyIShellView Object

Description of the interface

Methods

TranslateAccelerator
Description of TranslateAccelerator

EnableModeless
Description of EnableModeless

UIActivate
Description of UIActivate

Refresh
Description of Refresh

CreateViewWindow
Description of CreateViewWindow

DestroyViewWindow
Description of DestroyViewWindow

GetCurrentInfo
Description of GetCurrentInfo

SaveViewState
Description of SaveViewState

SelectItem
Description of SelectItem

GetItemObject
Description of GetItemObject


PyIShellView.CreateViewWindow

CreateViewWindow(psvPrevious, pfs, psb, prcView)

Description of CreateViewWindow.

Parameters

psvPrevious : PyIShellView

Description for psvPrevious

pfs : (int, int)

Description for pfs

psb : PyIShellBrowser

Description for psb

prcView : (int, int, int, int)

Description for prcView


PyIShellView.DestroyViewWindow

DestroyViewWindow()

Description of DestroyViewWindow.


PyIShellView.EnableModeless

EnableModeless(fEnable)

Description of EnableModeless.

Parameters

fEnable : int

Description for fEnable


PyIShellView.GetCurrentInfo

GetCurrentInfo()

Description of GetCurrentInfo.


PyIShellView.GetItemObject

GetItemObject(uItem, riid)

Description of GetItemObject.

Parameters

uItem : int

Description for uItem

riid : PyIID

Description for riid


PyIShellView.Refresh

Refresh()

Description of Refresh.


PyIShellView.SaveViewState

SaveViewState()

Description of SaveViewState.


PyIShellView.SelectItem

SelectItem(pidlItem, uFlags)

Description of SelectItem.

Parameters

pidlItem : PyIDL

Description for pidlItem

uFlags : int

Description for uFlags


PyIShellView.TranslateAccelerator

TranslateAccelerator(pmsg)

Description of TranslateAccelerator.

Parameters

pmsg : tuple

Description for pmsg


PyIShellView.UIActivate

UIActivate(uState)

Description of UIActivate.

Parameters

uState : int

Description for uState


PyISpecifyPropertyPages

PyISpecifyPropertyPages Object

Description of the interface

Methods

GetPages
Description of GetPages


PyISpecifyPropertyPages.GetPages

GetPages()

Description of GetPages.


PyIStorage

PyIStorage Object

Description of the interface

Methods

CreateStream
Creates and opens a stream object with the specified name contained in this storage object.

OpenStream
Opens an existing stream object.

CreateStorage
Creates and opens a new storage object nested within this storage object.

OpenStorage
Opens an existing storage object with the specified name in the specified access mode.

CopyTo
Copies the entire contents of an open storage object to another storage object.

MoveElementTo
Copies or moves a substorage or stream from this storage object to another storage object.

Commit
Ensures that any changes made to a storage object open in transacted mode are reflected in the parent storage.

Revert
Discards all changes that have been made to the storage object since the last commit.

EnumElements
Retrieves an enumerator object that can be used to enumerate the storage and stream objects contained within this storage object.

DestroyElement
Removes the specified storage or stream from this storage object.

RenameElement
Renames the specified substorage or stream in this storage object.

SetElementTimes
Sets the modification, access, and creation times of the specified storage element, if supported by the underlying file system.

SetClass
Assigns the specified CLSID to this storage object.

SetStateBits
Stores up to 32 bits of state information in this storage object.

Stat
Retrieves the STATSTG structure for this open storage object.


PyIStorage.Commit

Commit(grfCommitFlags)

Ensures that any changes made to a storage object open in transacted mode are reflected in the parent storage; for a root storage, reflects the changes in the actual device, for example, a file on disk. For a root storage object opened in direct mode, this method has no effect except to flush all memory buffers to the disk. For non-root storage objects in direct mode, this method has no effect.

Parameters

grfCommitFlags : int

Controls how the changes are committed to the storage object. See the STGC enumeration for a definition of these values.


PyIStorage.CopyTo

CopyTo(rgiidExclude, snbExclude, stgDest)

Copies the entire contents of an open storage object to another storage object.

Parameters

rgiidExclude : [PyIID,]

List of IID's to be excluded.

snbExclude : SNB

Reserved for later - Must be None

stgDest : PyIStorage

The open storage object into which this storage object is to be copied. The destination storage object can be a different implementation of the PyIStorage interface from the source storage object. Thus, IStorage::CopyTo can only use publicly available methods of the destination storage object. If stgDest is open in transacted mode, it can be reverted by calling its PyIStorage::Revert method.


PyIStorage.CreateStorage

PyIStorage = CreateStorage(pwcsName, grfMode , dwStgFmt , reserved2 )

Creates and opens a new storage object nested within this storage object.

Parameters

pwcsName : string

The name of the newly created stream.

grfMode : int

Specifies the access mode to use when opening the newly created storage object.

dwStgFmt : int

Documented as "reserved"!

reserved2=0 : int

Description for reserved2


PyIStorage.CreateStream

PyIStream = CreateStream(pwcsName, grfMode , reserved1 , reserved2 )

Creates and opens a stream object with the specified name contained in this storage object. All elements within a storage object — both streams and other storage objects — are kept in the same name space.

Parameters

pwcsName : string

Name of the new stream

grfMode : int

Specifies the access mode to use when opening the newly created stream.

reserved1=0 : int

Reserved - must be zero.

reserved2=0 : int

Reserved - must be zero.


PyIStorage.DestroyElement

DestroyElement(name)

Removes the specified storage or stream from this storage object.

Parameters

name : string

The name of the element to be removed.


PyIStorage.EnumElements

PyIEnumSTATSTG = EnumElements(reserved1, reserved2 , reserved3 )

Retrieves an enumerator object that can be used to enumerate the storage and stream objects contained within this storage object.

Parameters

reserved1=0 : int

Reserved - must be zero.

reserved2=None : object

A reserved param. Always pass None. NULL is always passed to the COM function

reserved3=0 : int

Reserved - must be zero.


PyIStorage.MoveElementTo

MoveElementTo(name, stgDest, newName, grfFlags)

Copies or moves a substorage or stream from this storage object to another storage object.

Parameters

name : string

A string that contains the name of the element in this storage object to be moved or copied.

stgDest : PyIStorage

PyIStorage for the destination storage object.

newName : string

A string that contains the new name for the element in its new storage object.

grfFlags : int

Specifies whether the operation should be a move (STGMOVE_MOVE) or a copy (STGMOVE_COPY). See the STGMOVE enumeration.


PyIStorage.OpenStorage

PyIStorage = OpenStorage(pwcsName, pstgPriority , grfMode , snbExclude , reserved )

Opens an existing storage object with the specified name in the specified access mode.

Parameters

pwcsName : string

Name of the storage, or None.

pstgPriority : PyIStorage

If the pstgPriority parameter is not None, it is a PyIStorage object to a previous opening of an element of the storage object, usually one that was opened in priority mode. The storage object should be closed and re-opened according to grfMode. When the PyIStorage::OpenStorage method returns, pstgPriority is no longer valid - use the result value. If the pstgPriority parameter is None, it is ignored.

grfMode : int

Specifies the access mode to use when opening the storage object. See the STGM enumeration values for descriptions of the possible values. Whatever other modes you may choose, you must at least specify STGM_SHARE_EXCLUSIVE when calling this method.

snbExclude : SNB

Reserved for later - Must be None

reserved=0 : int

Reserved integer param.


PyIStorage.OpenStream

PyIStream = OpenStream(pwcsName, reserved1 , grfMode , reserved2 )

Opens an existing stream object within this storage object in the specified access mode.

Parameters

pwcsName : string

Description for pwcsName

reserved1 : object

A reserved param. Always pass None. NULL is always passed to the COM function

grfMode : int

Specifies the access mode to be assigned to the open stream. See the STGM enumeration values for descriptions of the possible values. . Whatever other modes you may choose, you must at least specify STGM_SHARE_EXCLUSIVE when calling this method.

reserved2=0 : int

Reserved - must be zero.


PyIStorage.RenameElement

RenameElement(oldName, newName)

Renames the specified substorage or stream in this storage object.

Parameters

oldName : string

The name of the substorage or stream to be changed.

newName : string

The new name for the specified sustorage or stream.


PyIStorage.Revert

Revert()

Discards all changes that have been made to the storage object since the last commit.


PyIStorage.SetClass

SetClass(clsid)

Assigns the specified CLSID to this storage object.

Parameters

clsid : PyIID

The class identifier (CLSID) that is to be associated with the storage object.


PyIStorage.SetElementTimes

SetElementTimes(name, ctime, atime, mtime)

Sets the modification, access, and creation times of the specified storage element, if supported by the underlying file system.

Parameters

name : string

The name of the storage object element whose times are to be modified. If NULL, the time is set on the root storage rather than one of its elements.

ctime : PyTime

Either the new creation time for the element or None if the creation time is not to be modified.

atime : PyTime

Either the new access time for the element or None if the access time is not to be modified.

mtime : PyTime

Either the new modification time for the element or None if the modification time is not to be modified.


PyIStorage.SetStateBits

SetStateBits(grfStateBits, grfMask)

Stores up to 32 bits of state information in this storage object.

Parameters

grfStateBits : int

Specifies the new values of the bits to set. No legal values are defined for these bits; they are all reserved for future use and must not be used by applications.

grfMask : int

A binary mask indicating which bits in grfStateBits are significant in this call.


PyIStorage.Stat

STATSTG = Stat(grfStatFlag)

Retrieves the STATSTG structure for this open storage object.

Parameters

grfStatFlag : int

Specifies that some of the fields in the STATSTG structure are not returned, thus saving a memory allocation operation. Values are taken from the STATFLAG enumeration.


PyIStream

PyIStream Object

A Python interface to IStream

Methods

Read
Read the specified number of bytes from the string.

read
Alias for PyIStream::Read

Write
Write data from a stream.

write
Alias for PyIStream::Write

Seek
Changes the seek pointer to a new location.

SetSize
Changes the size of the stream object.

CopyTo
Copies a specified number of bytes from the current seek pointer in the stream to the current seek pointer in another stream.

Commit
Ensures that any changes made to a stream object open in transacted mode are reflected in the parent storage.

Revert
Discards all changes that have been made to a transacted stream since the last PyIStream::Commit call.

LockRegion
Restricts access to a specified range of bytes in the stream.

UnLockRegion
Removes the access restriction on a range of bytes previously restricted with PyIStream::LockRegion.

Clone
Creates a new stream object with its own seek pointer that references the same bytes as the original stream.

Stat
Returns information about a stream


PyIStream.Clone

PyIStream = Clone()

Creates a new stream object with its own seek pointer that references the same bytes as the original stream.


PyIStream.Commit

Commit(flags)

Ensures that any changes made to a stream object open in transacted mode are reflected in the parent storage.

Parameters

flags=STGC_DEFAULT : int

Controls how changes are performed.


PyIStream.CopyTo

ULARGE_INTEGER = CopyTo(stream, cb )

Copies a specified number of bytes from the current seek pointer in the stream to the current seek pointer in another stream.

Parameters

stream : PyIStream

The stream to write to.

cb : ULARGE_INTEGER

The number of bytes to write.

Return Value

The return value is the number of bytes actually written.


PyIStream.LockRegion

LockRegion(offset, cb, lockType)

Restricts access to a specified range of bytes in the stream.

Parameters

offset : ULARGE_INTEGER

Integer that specifies the byte offset for the beginning of the range.

cb : ULARGE_INTEGER

The number of bytes to restrict.

lockType : int

Restrictions requested.


PyIStream.Read

string = Read(numBytes)

Read the specified number of bytes from the string.

Parameters

numBytes : int

The number of bytes to read from the stream. Must not be zero.

Return Value

The result is a string containing binary data.


PyIStream.Revert

Revert()

Discards all changes that have been made to a transacted stream since the last PyIStream::Commit call.


PyIStream.Seek

ULARGE_INTEGER = Seek(offset, origin )

Changes the seek pointer to a new location.

Parameters

offset : int

The new location

origin : int

Relative to where?


PyIStream.SetSize

SetSize(newSize)

Changes the size of the stream object.

Parameters

newSize : ULARGE_INTEGER

The new size


PyIStream.Stat

STATSTG = Stat(grfStatFlag)

Returns information about the stream

Parameters

grfStatFlag=0 : int

Flags.


PyIStream.UnlockRegion

UnlockRegion(offset, cb, lockType)

Removes the access restriction on a range of bytes previously restricted with PyIStream::LockRegion.

Parameters

offset : ULARGE_INTEGER

Integer that specifies the byte offset for the beginning of the range.

cb : ULARGE_INTEGER

The number of bytes to restrict.

lockType : int

Restrictions requested.


PyIStream.Write

Write(data)

Write data to a stream

Parameters

data : string

The binary data to write.


PyITypeComp

PyITypeComp Object

An object that implements the ITypeComp interface.

Methods

Bind
Retrieves specified binding description.

BindType
Retrieves specified binding description for a type sentinel


PyITypeComp.Bind

DESCKIND = Bind(szName, wflags )

binds to a variable/type

Parameters

szName : string

The name to bind to

wflags=0 : int

the bind flags


PyITypeComp.BindType

DESCKIND = BindType(szName)

binds to a type

Parameters

szName : string

The name to bind to


PyITypeInfo

PyITypeInfo Object

An OLE automation type info object. Derived from PyIUnknown

Methods

GetContainingTypeLib
Retrieves the containing type library and the index of the type description within that type library.

GetDocumentation
Retrieves the documentation string, the complete Help file name and path, and the context ID for the Help topic for a specified type description.

GetFuncDesc
Retrieves the FUNCDESC object that contains information about a specified function.

GetImplTypeFlags
Retrieves the IMPLTYPEFLAGS enumeration for one implemented interface or base interface in a type description.

GetIDsOfNames
Maps between member names and member IDs, and parameter names and parameter IDs.

GetNames
Retrieves the variable with the specified member ID (or the name of the property or method and its parameters) that correspond to the specified function ID.

GetTypeAttr
Retrieves a TYPEATTR object that contains the attributes of the type description.

GetRefTypeInfo
If a type description references other type descriptions, it retrieves the referenced type descriptions.

GetRefTypeOfImplType
Retrieves the type description of the implemented interface types.

GetVarDesc
Retrieves a VARDESC object that describes the specified variable.

GetTypeComp
Retrieves a ITypeComp object for Name to VARDESC/FUNCDESC mapping.


PyITypeInfo.GetContainingTypeLib

PyITypeLib, int = GetContainingTypeLib()

Retrieves the containing type library and the index of the type description within that type library.


PyITypeInfo.GetDocumentation

(name, docstring, helpContext, helpFile) = GetDocumentation(memberId)

Retrieves the documentation string, the complete Help file name and path, and the context ID for the Help topic for a specified type description.

Parameters

memberId : int


PyITypeInfo.GetFuncDesc

FUNCDESC = GetFuncDesc(memberId)

Retrieves the FUNCDESC object that contains information about a specified function.

Parameters

memberId : int


PyITypeInfo.GetIDsOfNames

int = GetIDsOfNames()

Maps between member names and member IDs, and parameter names and parameter IDs.


PyITypeInfo.GetImplTypeFlags

int = GetImplTypeFlags(index)

Retrieves the IMPLTYPEFLAGS enumeration for one implemented interface or base interface in a type description.

Parameters

index : int


PyITypeInfo.GetNames

(tuple of strings) = GetNames(memberId)

Retrieves the variable with the specified member ID (or the name of the property or method and its parameters) that correspond to the specified function ID.

Parameters

memberId : int


PyITypeInfo.GetRefTypeInfo

PyITypeInfo = GetRefTypeInfo(hRefType)

If a type description references other type descriptions, it retrieves the referenced type descriptions.

Parameters

hRefType : int


PyITypeInfo.GetRefTypeOfImplType

int = GetRefTypeOfImplType(hRefType)

Retrieves the type description of the implemented interface types.

Parameters

hRefType : int

Comments

If a type description describes a COM class, it retrieves the type description of the implemented interface types. For an interface, GetRefTypeOfImplType returns the type information for inherited interfaces, if any exist.


PyITypeInfo.GetTypeAttr

TYPEATTR = GetTypeAttr()

Retrieves a TYPEATTR object that contains the attributes of the type description.


PyITypeInfo.GetTypeComp

PyITypeComp = GetTypeComp()

Retrieves a ITypeComp object for Name to VARDESC/FUNCDESC mapping.


PyITypeInfo.GetVarDesc

VARDESC = GetVarDesc(memberId)

Retrieves a VARDESC object that describes the specified variable.

Parameters

memberId : int


PyITypeLib

PyITypeLib Object

An object that implements the ITypeLib interface.

Methods

GetDocumentation
Retrieves documentation information about the library.

GetLibAttr
Retrieves the libraries attributes

GetTypeComp
Retrieves a ITypeComp object for Name to VARDESC/FUNCDESC mapping.

GetTypeInfo
Retrieves the specified type description in the library.

GetTypeInfoCount
Retrieves the number of PyITypeInfos in the type library.

GetTypeInfoOfGuid
Retrieves the type info of the specified GUID.

GetTypeInfoType
Retrieves the type of a type description. sentinel


PyITypeLib.GetDocumentation

tuple = GetDocumentation(index)

Retrieves documentation information about the library.

Parameters

index : int

The index of the type description within the library

Return Value

The return type is a tuple of (name of item, documentation string, help context integer, help file name)


PyITypeLib.GetLibAttr

TLIBATTR = GetLibAttr()

Retrieves the libraries attributes


PyITypeLib.GetTypeComp

PyITypeComp = GetTypeComp()

Retrieves a ITypeComp object for Name to VARDESC/FUNCDESC mapping.


PyITypeLib.GetTypeInfo

PyITypeInfo = GetTypeInfo(index)

Retrieves the specified type description in the library.

Parameters

index : int

The index of the type description within the library


PyITypeLib.GetTypeInfoCount

int = GetTypeInfoCount()

Retrieves the number of PyITypeInfos in the type library.


PyITypeLib.GetTypeInfoOfGuid

PyITypeInfo = GetTypeInfoOfGuid(iid)

Retrieves the type info of the specified GUID.

Parameters

iid : PyIID

GUID of the type description.


PyITypeLib.GetTypeInfoType

TYPEKIND = GetTypeInfoType(index)

Retrieves the type of a type description.

Parameters

index : int

The index of the type description within the library


PyIUnknown

PyIUnknown Object

The base object for all PythonCOM objects. Wraps a COM IUnknown object.

Methods

QueryInterface
Queries the object for an interface.

Comments

Note that there are no reference counting functions that are typically exposed via COM. This is because COM reference counts are automatically handled by PythonCOM - each interface object keeps exactly one COM reference, regardless of how many Python references. When the Python object destructs due to its reference count hitting zero, the COM reference is then released. It is not possible for force the closure of a PythonCOM object - the only way to ensure cleanup is to remove all Python references.


PyIUnknown.__cmp__

int = __cmp__()

Implements COM rules for object identity.

Comments

As per the COM rules for object identity, both objects are queried for IUnknown, and these values compared. The only meaningful test is for equality - the result of other comparisons is undefined (ie, determined by the object's relative addresses in memory.


PyIUnknown::__repr__

PyIUnknown::__repr__ method

string __repr__()

Called to create a representation of a PyIUnknown object

Defined in: E:/SRC/PYTHONEX/COM/WIN32COM/SRC/PYIUNKNOWN.CPP

Comments

The repr of this object displays both the object's address, and its attached IUnknown's address


PyIUnknown.QueryInterface

PyIUnknown = QueryInterface(iid, useIID )

Queries an object for a specific interface.

Parameters

iid : IID

The IID requested.

useIID=None : IID

If provided and not None, will return an interface for the specified IID if (and only if) a native interface can not be supported. If the interface specified by iid is natively supported, this option is ignored.

Comments

The useIID parameter is a very dangerous option, and should only be used when you are sure you need it! By specifying this parameter, you are telling the COM framework that regardless of the true type of the result (as specified by iid), a Python wrapper of type useIID will be created. If iid does not derive from useIID, then it is almost certain that using the object will cause an Access Violation.
For example, this option can be used to obtain a PyIUnknown object if pythoncom does not natively support the interface. Another example might be to return an unsupported persistence interface as a PyIPersist instance.
For backwards compatibility: the integer 0 implies None, and the integer 1 implies IID_IUnknown.

Return Value

The result is always an object derived from PyIUnknown. Any error (including E_NOINTERFACE) will generate a com_error exception.


PyIViewObject

PyIViewObject Object

Description of the interface

Methods

Draw
Description of Draw

GetColorSet
Description of GetColorSet

Freeze
Description of Freeze

Unfreeze
Description of Unfreeze

SetAdvise
Description of SetAdvise

GetAdvise
Description of GetAdvise


PyIViewObject.Draw

Draw(dwDrawAspect, lindex, aspectFlags, hdcTargetDev, hdcDraw, left, top, right, bottom, left, top, right, bottom, funcContinue, obContinue)

Description of Draw.

Parameters

dwDrawAspect : int

Description for dwDrawAspect

lindex : int

Description for lindex

aspectFlags : int

Integer value for the dwFlags item of the DVASPECTINFO structure.

hdcTargetDev : HDC

Description for hdcTargetDev

hdcDraw : HDC

Description for hdcDraw

left, top, right, bottom : int, int, int, int

Bounds rectangle.

left, top, right, bottom : int, int, int, int

WBounds rectangle.

funcContinue : object

A continue function.

obContinue : object

Value passed to the function.


PyIViewObject.Freeze

Freeze(dwDrawAspect, lindex, aspectFlags)

Description of Freeze.

Parameters

dwDrawAspect : int

Description for dwDrawAspect

lindex : int

Description for lindex

aspectFlags : int

Integer value for the dwFlags item of the DVASPECTINFO structure.


PyIViewObject.GetAdvise

GetAdvise()

Description of GetAdvise.


PyIViewObject.GetColorSet

GetColorSet(dwDrawAspect, lindex, aspectFlags, hicTargetDev)

Description of GetColorSet.

Parameters

dwDrawAspect : int

Description for dwDrawAspect

lindex : int

Description for lindex

aspectFlags : int

Integer value for the dwFlags item of the DVASPECTINFO structure.

hicTargetDev : HDC

Description for hicTargetDev


PyIViewObject.SetAdvise

SetAdvise(aspects, advf, pAdvSink)

Description of SetAdvise.

Parameters

aspects : int

Description for aspects

advf : int

Description for advf

pAdvSink : PyIAdviseSink

Description for pAdvSink


PyIViewObject.Unfreeze

Unfreeze(dwFreeze)

Description of Unfreeze.

Parameters

dwFreeze : int

Description for dwFreeze


PyIViewObject2

PyIViewObject2 Object

Description of the interface

Methods

GetExtent
Description of GetExtent


PyIViewObject2.GetExtent

GetExtent(dwDrawAspect, lindex, targetDevice)

Description of GetExtent.

Parameters

dwDrawAspect : int

Description for dwDrawAspect

lindex : int

Description for lindex

targetDevice : PyDVTARGETDEVICE

Description for lindex


PyMAPINAMEIDArray

PyMAPINAMEIDArray Object

A sequence (PyIID, string/int) objects FALSE*/ )


PyRecord

PyRecord Object

An object that represents a COM User Defined Type.

Comments

Once created or obtained from other methods, you can simply get and set attributes.


PySAndRestriction

PySAndRestriction Object

Parameters

restriction : [PySRestriction, ...]

A sequence of PySRestriction objects.


PySBinaryArray

PySBinaryArray Object

A sequence of strings containing binary data.


PySBitMaskRestriction

PySBitMaskRestriction Object

Parameters

relBMR : int

propTag : int

The property ID.

ulMask=0 : int


PySContentRestriction

PySContentRestriction Object

Parameters

fuzzyLevel : int

propTag : int

The property ID.

propertyValue : PySPropValue


PySExistRestriction

PySExistRestriction Object

Parameters

propTag : int

The property ID to check for existance.

reserved1=0 : int

reserved2=0 : int


PySNotRestriction

PySNotRestriction Object

Parameters

restriction : PySRestriction

reserved=0 : int


PySOrRestriction

PySOrRestriction Object

Parameters

restriction : [PySRestriction, ...]

A sequence of PySRestriction objects.


PySPropTagArray

PySPropTagArray Object

A sequence of integers


PySPropValue

PySPropValue Object

A MAPI property value. Property values can either be passed from python into MAPI functions, or returned from MAPI functions to Python.

Parameters

propType : int

The type of the MAPI property

value : object

The property value

Comments

The parameters can be one of the following pairs of values.

propType | value
PT_I2 | An integer case PT_SHORT:
PT_MV_I2 | A sequence of integers
PT_I4 | An integer case PT_LONG:
PT_MV_I4 | A sequence of integers
PT_R4 | A float case PT_FLOAT:
PT_MV_R4 | A sequence of floats
PT_R8 | A float case PT_DOUBLE:
PT_MV_R8 | A sequence of floats
PT_BOOLEAN | A boolean value (or an int)
PT_APPTIME | A PyTime object
PT_MV_APPTIME | An sequence of PyTime object
PT_SYSTIME | A PyTime object
PT_MV_APPTIME | An sequence of PyTime object
PT_STRING8 | A string or PyUnicode
PT_STRING8 | A sequence of string or PyUnicode objects.
PT_UNICODE | A string or PyUnicode
PT_MV_UNICODE | A sequence of string or PyUnicode
PT_BINARY | A string containing binary data
PT_MV_BINARY | A sequence of strings containing binary data
PT_CLSID | A PyIID
PT_MV_CLSID | A sequence of PyIID objects
PT_I8 | A PyLARGE_INTEGER
PT_MV_I8 | A sequence of PyLARGE_INTEGER
PT_ERROR | An integer error code.
PT_NULL | Anything!


PySPropValueArray

PySPropValueArray Object

A sequence of PySPropValue, as passed to many MAPI functions.


PySPropertyRestriction

PySPropertyRestriction Object

Parameters

relOp : int

propTag : int

The property ID.

propertyValue : PySPropValue


PySRestriction

PySRestriction Object

Parameters

restrictionType : int

An integer describing the contents of the second parameter.

restriction : object

An object in one of the formats describe below.

Comments

The parameters can be one of the following pairs of values.

restrictionType | restrictionValue
RES_AND | PySAndRestriction
RES_OR | PySOrRestriction
RES_PROPERTY | PySPropertyRestriction
RES_EXIST | PySExistRestriction
RES_NOT | PySNotRestriction
RES_CONTENT | PySContentRestriction
RES_BITMASK | PySBitMaskRestriction


PySRow

PySRow Object

Identical to a PySValue object


PySRowSet

PySRowSet Object

A sequence of PySRow objects, as passed to many MAPI functions.


PySSortOrderItem

PySSortOrderItem Object

An item in a SortOrderSet.

Parameters

propTag : int

A property tag.

order : int

The order in which the data is to be sorted. Possible values are: mapi.TABLE_SORT_ASCEND, mapi.TABLE_SORT_COMBINE and mapi.TABLE_SORT_DESCEND


PySSortOrderSet

PySSortOrderSet Object

An object describing a SortOrderSet.

Parameters

sortItems : ( PySSortOrderItem, ...)

The items to sort by

cCategories=0 : int

cExpanded=0 : int

TRUE */)


PySTGMEDIUM

PySTGMEDIUM Object

A STGMEDIUM object represents a COM STGMEDIUM structure.

Methods

set
Sets the type and data of the object

Properties

int tymed
An integer indicating the type of data in the stgmedium

object data
The data in the stgmedium. The result depends on the value of the 'tymed' property of the PySTGMEDIUM object.

tymed | Result Type
TYMED_GDI | An integer GDI handle
TYMED_MFPICT | An integer METAFILE handle
TYMED_ENHMF | An integer ENHMETAFILE handle
TYMED_HGLOBAL | A string with the bytes of the global memory object.
TYMED_FILE | A string/unicode filename
TYMED_ISTREAM | A PyIStream object
TYMED_ISTORAGE | A PyIStorage object

int data_handle
The raw 'integer' representation of the data. For TYMED_HGLOBAL, this is the handle rather than the string data. For the string and interface types, this is an integer holding the pointer.


PySTGMEDIUM.set

set(tymed, data)

Sets the type and data of the object.

Parameters

tymed : int

The type of the data

data : object


STATSTG

STATSTG Object

A tuple representing a STATSTG structure

Items

[0] string : name

The name of the storage object

[1] int : type

Indicates the type of storage object. This is one of the values from the storagecon.STGTY_* values.

[2] ULARGE_INTEGER : size

Specifies the size in bytes of the stream or byte array.

[3] PyTime : modificationTime

Indicates the last modification time for this storage, stream, or byte array.

[4] PyTime : creationTime

Indicates the creation time for this storage, stream, or byte array.

[5] PyTime : accessTime

Indicates the last access time for this storage, stream or byte array.

[6] int : mode

Indicates the access mode specified when the object was opened. This member is only valid in calls to Stat methods.

[7] int : locksSupported

Indicates the types of region locking supported by the stream or byte array. See the storagecon.LOCKTYPES_* constants for the values available. This member is not used for storage objects.

[8] PyIID : clsid

Indicates the class identifier for the storage object; set to CLSID_NULL for new storage objects. This member is not used for streams or byte arrays.

[9] int : stateBits

Indicates the current state bits of the storage object, that is, the value most recently set by the PyIStorage::SetStateBits method. This member is not valid for streams or byte arrays.

[10] int : storageFormat

Indicates the format of the storage object. This is one of the values from the STGFMT_* constants. In some Win32 API documentation, this member is known as 'reserved'


TLIBATTR

TLIBATTR Object

Type library attributes are represented as a tuple of:

Items

[0] PyIID : IID

The IID for the library

[1] int : lcid

The default locale ID for the library

[2] int : syskind

Identifies the target operating system platform

[3] int : majorVersion

The major version number of the library

[4] int : minorVersion

The minor version number of the library

[5] int : flags

Flags for the library.


TYPEATTR

TYPEATTR Object

A TYPEATTR object represents a COM TYPEATTR structure.

Properties

PyIID IID
The IID

int lcid
The lcid

int memidConstructor
ID of constructor

int memidDestructor
ID of destructor

int cbSizeInstance
The size of an instance of this type

int typekind
The kind of type this information describes. One of the win32con.TKIND_* constants.

int cFuncs
Number of functions.

int cVars
Number of variables/data members.

int cImplTypes
Number of implemented interfaces.

int cbSizeVft
The size of this type's VTBL

int cbAlignment
Byte alignment for an instance of this type.

int wTypeFlags
One of the pythoncom TYPEFLAG_

int wMajorVerNum
Major version number.

int wMinorVerNum
Minor version number.

TYPEDESC obDescAlias
If TypeKind == pythoncom.TKIND_ALIAS, specifies the type for which this type is an alias.

IDLDESC obIDLDesc
IDL attributes of the described type.

Items

[0] PyIID : IID

The IID

[1] int : lcid

The lcid

[2] int : memidConstructor

ID of constructor

[3] int : memidDestructor

ID of destructor,

[4] int : cbSizeInstance

The size of an instance of this type

[5] int : typekind

The kind of type this information describes. One of the win32con.TKIND_* constants.

[6] int : cFuncs

Number of functions.

[7] int : cVars

Number of variables/data members.

[8] int : cImplTypes

Number of implemented interfaces.

[9] int : cbSizeVft

The size of this type's VTBL

[10] int : cbAlignment

Byte alignment for an instance of this type.

[11] int : wTypeFlags

One of the pythoncom TYPEFLAG_* constants

[12] int : wMajorVerNum

Major version number.

[13] int : wMinorVerNum

Minor version number.

[14] TYPEDESC : obDescAlias

If TypeKind == pythoncom.TKIND_ALIAS, specifies the type for which this type is an alias.

[15] IDLDESC : obIDLDesc

IDL attributes of the described type.


TYPEDESC

TYPEDESC Object

A typedesc is a complicated, recursive object, It may be either a simple Python type, or a tuple of (indirectType, object), where object may be a simple Python type, or a tuple of etc ...


VARDESC

VARDESC Object

A VARDESC object represents a COM VARDESC structure.

Properties

int memid
The dispid of the member

int/object value
A value for the variant. If PERINSTANCE then an offset into the instance, otherwise a variant converted to a Python object.

ELEMDESC elemdescVar
Object describing the member.

int varFlags
Variable flags

int varkind
Kind flags.

Items

[0] int : memid

The id of the member

[1] int/object : value

A value for the variant. If PERINSTANCE then an offset into the instance, otherwise a variant converted to a Python object.

[2] ELEMDESC : elemdescVar

Object describing the member.

[3] int : varFlags

Variable flags

[4] int : varKind

Kind flags.


Pythonwin and win32ui

  • Overviews
  • Modules
  • Objects


Overviews

  • Pythonwin Debugger documentation
  • Pythonwin readme
  • The Pythonwin environment
  • Keyboard Bindings
  • Source Safe Integration
  • Source code folding in the editor
  • Tabs and indentation in the editor


Keyboard Bindings

Pythonwin has a new, flexible keyboard binding mechanism. Bindings (and even code) can be defined in a configuration file, stored in the pywin directory.

Many bindings are still builtin to Python using Window's accelerators - see the Pythonwin menus for the specific keyboard shortcuts.

The default configuration file is named default.cfg. You can view this file with a text editor (eg, Pythonwin) This file has extensive comments, including how to create your own configuration based on the default. An example configuration which provides keyboard bindings similar to IDLE exists in IDLE.cfg, and this makes a good example of a custom configuration.

Please see default.cfg for a complete list, but the default bindings provided with Pythonwin are:

Common Keystrokes | Description
Alt+Q | Reformat the current paragraph/comment block. Note this does NOT reformat code correctly - use only within comment blocks!
Ctrl+W | Toggle view whitespace.
Alt+/ | Expand the word at the cursor. Eg, pressing "st<Alt+/>" will complete based on all words in the current file - eg, "string" would be likely to result assuming the code has an "import string" statement. Pressing the key again expands to the next match.
. | Auto expand the attribute. Eg, typing "string." will display a listbox with the contents of the string module. Select an item with TAB or the mouse.
Alt+I | Toggle focus to/from the interactive window.

Builtin Keystrokes | Keystrokes built into Scintilla
Ctrl+Keypad+Plus | Zoom-in for the current window. Non True-Type fonts may require multiple presses.
Ctrl+Keypad+Minus | Zoom-out for the current window. Non True-Type fonts may require multiple presses.
Ctrl+Backspace | Delete the word to the left of the cursor.
Ctrl+Z | Undo
Ctrl+Y | Redo
Ctrl+X | Cut
Ctrl+C | Copy
Ctrl+V | Paste
Ctrl+A | Select All
Ctrl+Shift+L | Delete the current line
Ctrl+T | Transpose (swap) the current line with the line above
Ctrl+U | Convert the selection to lower case
Ctrl+Shift+U | Convert the selection to upper case

Editor Specific Keystrokes | Description
F2 | Move to the next bookmark.
Ctrl+F2 | Add or remove a bookmark on the current line.
Ctrl+G | Prompt for and goto a specific line number.
Alt+B | Adds a simple comment banner at the current location.
Alt+3 | Block comment the selected region.
Shift+Alt+3 | Uncomment the selected region.
Alt+4 | Uncomment the selected region (IDLE default keystroke)
Alt+5 | Tabify the selected region.
Alt+6 | Untabify the selected region.
BackSpace | Remove selected region or one character or indent to the left.
Ctrl+T | Toggle the use of tabs for the current file (after confirmation)
Alt+U | Change the indent width for the current file.
Enter | Insert a newline and indent.
Tab | Insert an indent, perform a block indent if a selection exists, or accept an attribute selection.
Shift-Tab | Block dedent the selection
F6 | Toggle view when editor splitter is open.
Keypad-Plus | If the current line is a collapsed fold, expand it (see Folding )
Alt-Keypad-Plus | Expand all folds in the current file (see Folding )
Keypad-Minus | If the current line is an expanded fold, collapse it (see Folding )
Alt-Keypad-Minus | Collapse all folds in the current file. regardless of how deep the fold becomes. (see Folding )
Keypad-Multiply | Expand or collapse all top-level folds in the current file. No second level or deeper folds are changed. If the first fold in the file is collapsed, all top-level folds are opened. Otherwise, all top-level folds are collapsed (see Folding )

Debugger Keystrokes | Description
F9 | Toggle breakpoint
F5 | Run (ie, go)
Shift+F5 | Stop debugging
F11 | Single step into functions
F10 | Step over functions
Shift+F11 | Step out of the current function

Interactive Window Specific Keystrokes | Description
Ctrl+Up | Recall the previous command in the history list.
Ctrl+Down | Recall the next command in the history list.


Source Safe Integration

Note you will need to restart Pythonwin for this option to take effect.

Before using the VSS integration, you must create a "mssccprj.scc" file in the directory, or a parent directory, of the files you wish to integrate. There are no limits on how many of these files exist. This is the same name and format as VB uses for VSS integration - a Windows INI file.

This file must have a section [Python] with entry "Project=ProjectName". The project name is the name of the VSS project used to check the out the file. If the .scc file is in a parent directory, the correct relative VSS path is built - so if your file system matches your VSS structure, you only need a single .scc file in the VSS "root" directory.

For example, assuming you have the file c:\\src\\mssccprj.scc with the contents:
[Python]
Project=OurProject
-eof-
The file c:\\src\\source1.py will be checked out from project OurProject, c:\\src\\sub\\source2.py will be checked out from project OurProject\\sub, etc.


Source code folding in the editor

Thanks to Scintilla (http://www.scintilla.org), Pythonwin supports source code folding. Folding is the ability to collapse sections of your source-code into a single line, making it easier to navigate around large files. Any Python statement which introduces a new block can be folded either by clicking on the indicator in the folding margin (if enabled via the View->Options->Editor dialog), by selecting one of the folding keystrokes (see Keyboard Bindings, or by using View->Folding menu.)

All find/replace or 'goto linenumber' functions work correctly when code is folded - the code is simply unfolded if necessary before the relevant operation.

You may configure Pythonwin so that all files have their top-levels folded when opened. Only the first level folds are collapsed using this function, so expanding the top-level fold reveals the entire class/method that was folded. Alternatively, you can use the Keypad-Multiply key to toggle the first level folds for the entire file at any time.


Tabs and indentation in the editor

The use of tabs and the meanings of the tab defaults is not completely clear. Unfortunately, this is very hard to fix without losing the smart indentation (eg, when indenting lists or function parameters).
If the use of smart indentation has been disabled (the default is enabled) then the indentation should always follow your preferences, regardless of any existing indentation in the source.
Otherwise, the preferences for tab settings are only used when a new file is created. If smart-tabs are enabled and an existing file is opened, its first block is located, and the indentation it uses overrides the default. Thus, regardless of your preferences, if the first indent in the file is a tab, Pythonwin uses tabs for the entire file (and similarly, uses spaces if the first block is indented with spaces)
Things can appear to get wierd when editing a file with mixed tabs and spaces. Although mixed tabs and spaces in the same indent is evil, there are a number of source files that have certain classes/functions indented with spaces, and others that use tabs. The editor will not correctly adjust to the current block - whatever was used for the first block is used for the entire file.
Another common scenario where things go wrong is when pasting code into a new file. You create a new file (which sets the tabs to your defaults), then paste in a huge chunk of code that is indented differently. The editor is still using the defaults, which dont reflect the code that now exists in the buffer.
The "tab-timmy" shows up these problems very quickly, and you can quickly toggle the current tab settings by pressing Ctrl+T, or change the indent width by pressing Ctrl+U.


Win32 Debugger Overview

Pythonwin Debugger Overview

News Flash:

We take full advantage of Scintilla from Neil Hodgson (see scintilla.org) This offers a much better interface, including Visual C++/VB type indicators for breakpoints in the left column, etc

This document gives a general overview of the Pythonwin Debugger package.

  • If you are using or looking at this package for the first time, you should check out the debugger tutorial.
  • For reference information, check out the general debugger documentation
  • If something doesn't work, please read the known problems with the debugger before mailing me!

Introduction

This package is a general-purpose debugger for Python on Win32 platforms. It is a full-blown GUI debugger with the following features:

  • Works from almost any Python program - be it inside Pythonwin, a console "Python.exe" program - even from within a COM object hosted by Visual Basic or Microsoft Internet Explorer (but not from a Tkinter app, apparently?)
  • MSVC style debugging interface, including breakpoint etc indicators in the margin, and dockable debugging windows.
  • Call-stack display lets you see each individual stack entry, and examine the local and global variables.
  • Iinteractive window fully operarable in the context of the code being debugged!

There used to be more out-of-date stuff here, but not any more :-) The tutorial is also a little out of date, but is worth following along with (but as you notice the old screen shots, say a praise for Scintilla!)

  • For questions or comments about the debugger, send email to MarkH@ActiveState.com (Mark Hammond).


Pythonwin Readme.

Introduction

There are a few known problems (and probably lots of unknown ones!)

Pythonwin is a Windows only IDE and GUI framework for Python. It has an integrated debugger, and a rich Python editing environment.

Pythonwin is implemented as a 'wrapper' for the Microsoft Foundation Class library. With it, you can use MFC in an interactive, interpreted environment, or write full blown stand-alone applications tightly coupled with the Windows environment. Over 30 MFC objects are exposed, including Common Controls, Property Pages/Sheets, Control/Toolbars, Threads, etc.

Pythonwin could almost be considered a sample program for the MFC UI environment. This Python UI environment can be embedded in almost any other application - such as OLE clients/servers, Netscape plugins, as a Macro language etc.

Recent changes can be found at the end of this document.

Demos

There are many demos in the pywin\demos directory. To see a list of all the demos, run the program "pywin\demos\guidemo.py" from inside Pythonwin.

Documentation

Almost all win32ui methods are document in the Pythonwin Help file. This is available from the Help Menu in the Pythonwin enviroment.

Below is a list of external Pythonwin specific documentation.

  • There is separate documentation for the debugger
  • Check out documentation on the Pythonwin GUI environment
  • For a brief description of how to embed win32ui.pyd into your MFC application see the embedding win32ui documentation.
  • There is some general documentation on the MFC Architecture and more specifically, document and view architecture.
  • A Reference Manual of all available MFC functions etc. is released as a Windows Help file with the main Pythonwin release.
  • Check out the demos, and the source code to the Pythonwin environment.

Known Problems

  • Some of the configuration options (eg, "Docking Windows") do not take affect until you restart Pythonwin.
  • Under Windows 9x, any attempt to use Pythonwin features from an MS-DOS prompt seems to cause immediate death. This means that you can not use the Pythonwin debugger for programs running under Python.exe on Windows 9x. You should still be able to use the debugger normally from inside Pythonwin itself.
  • Pythonwin will occasionally crash upon exiting under Windows 9x. The crash is in "user.exe" (old 16 bit code) which makes debugging difficult. It does not happen on Windows NT, so I'm stumped on this one. If someone could even just narrow it down to exactly what code will cause the crash at exit I would really appreciate it.
  • Some of the menu items are always grey. This functionality is simply not yet implemented in Pythonwin.

Recent Changes

Fixed alot of the interactive window formatting problems. Pythonwin now always prints output as it receives it - this should stop Pythonwin from looking like it has completely hung when infact it is just waiting for some code to finish.

Support for Scintilla's indentation guides, that gives a nice indication of the block structure.

New, improved color editor, using the Scintilla control by Neil Hodgson (see http://hare.net.au/~neilh/ScintillaTide.html). The debugger now requires use of this editor.

Much better printing support from Roger Burnham. Pythonwin itself still can't print anything, but the framework can (meaning some kind soul could now add the support to Pythonwin :-)

DDE support is complete.

Reference helpfile is far more complete.

Lots of new methods from Kleanthis Kleanthous.

Better tool-tip and region support


Pythonwin GUI Environment

This document describes the Pythonwin GUI environment. There are quite a few little features hidden away!

It has a discussion on the General Environment (including the Interactive Window and Menu and Toolbar), and the Command Line Arguments supported.

General Environment

Interactive Window

The Interactive Window is a little Python program which simulates the built-in Python interpreter. It is implemented in intpyapp.py (which in turn uses winout.py - a general purpose "output window".)

Pressing Enter

Whenever you press Enter, the interactive window has a look at the context, to try and decide what to do.

If the line is recognised as a "block" (ie, the first line starts with ">>> ", and the rest start with "… "), it checks to see if we are at the end of the window. If not, the block is copied to the end of the buffer - nothing is executed - enter must be pressed again to force execution.

If we are at the end of the buffer, it always attempts to execute the line. If Python indicates "unexpected end of file", then it assumes the block should continue, and emits the "… " for the next line.

If the line is recognised as part of a Python exception, then some special processing is done. If the line contains a filename and line number, it locates that file, and jumps to the offending line.

If the line is recognised as being an exception generated by COM (aka OLE), and the exception contains reference to a WinHelp file, the help topic is opened.

Menu and Toolbar

File Open/Close/Save/Print/etc.

All perform the obvious file operations. Pythonwin follows the standard MFC framework, and allows Python programs to plug-in support for other file types.

Locate File

Allows quick location of a Python scripts. Typing in the base name of a file will force a search of all the directories on sys.path, until a match is found.

To locate a module in a package, use a (back) slash instead of a dot - eg, to locate "win32com.client.dynamic", type in "win32com\client/dynamic"

Import Script

Imports or reloads a script - just like "import scriptname"/"reload(scriptname)" - (Pythonwin determines if the operation is an import or reload, It also handles "ni" modules with some success!)

If you select this (or use <Ctrl-I>) when a .py file is open, that file is saved and imported. If a current file can not be located, it will ask for a file to import via a File dialog.

If a syntax error occurs, the location will be moved to in the editor.

Run Script

Runs a script, as if the file was passed on the command line. A dialog is opened, asking the script name and arguments (unless the <Shift> key is held down)

Command Line Arguments

The following command line arguments are recognised. Note that these are implemented in "intpyapp.py", so should be pretty easy to change!

/run scriptname args

Runs the named script. Works just like "Python.exe scriptname args", except it is run in the GUI environment, and output goes to the interactive window.

/runargs scriptname args

As above, except the normal Pythonwin 'Run Script' dialog is shown.

/edit filename.py

Edits the filename. The /edit is currently optional, but in the future, the "default argument handling" may be changed.

/app specialscriptname args

Runs a special "application script". The application script can change the entire look and feel of a Pythonwin program - almost as much flexibility as the C++ programmer has when they first start their application). An example of this is "dlgapp.py" in the Pythonwin distribution.


Modules

  • win32ui
  • win32uiole


win32ui

Module win32ui

A module, encapsulating the Microsoft Foundation Classes.

Methods

AddToRecentFileList
Add a file name to the Recent File List.

ComparePath
Compares 2 paths.

CreateMDIFrame
Creates an MDI Frame window.

CreateMDIChild
Creates an MDI Child window.

CreateBitmap
Create a bitmap object.

CreateBitmapFromHandle
Creates a bitmap object from a HBITMAP.

CreateBrush
Creates a new GDI brush object. Returns a PyCBrush object.

CreateButton
Creates a button object. PyCButton::CreateWindow creates the actual control.

CreateColorDialog
Creates a color selection dialog box.

CreateControl
Creates an OLE control.

CreateControlBar
Creates an ControlBar

CreateCtrlView
Creates a control view object.

CreateDC
Creates a PyCDC object.

CreateDCFromHandle
Creates a PyCDC object from an integer handle.

CreateDialog
Creates a PyCDialog object.

CreateDialogBar
Creates a PyCDialogBar object.

CreateDialogIndirect
Creates a PyCDialog object from a template.

CreatePrintDialog
Creates a PyCPrintDialog object.

CreateDocTemplate
Create a PyCDocTemplate object.

CreateEdit
Creates an edit object. PyCEdit::CreateWindow creates the actual control.

CreateFileDialog
Creates a FileOpen common dialog.

CreateFontDialog
Creates a font selection dialog box.

CreateFormView
Creates a form view object.

CreateFrame
Creates a frame window.

CreateImageList
Creates an PyCImageList object.

CreateListCtrl
Creates a list control.

CreateListView
Creates a PyCListView object.

CreateTreeCtrl
Creates a tree control.

CreateTreeView
Creates a PyCTreeView object.

CreatePalette
Returns a HPALETTE

CreatePopupMenu
Creates a popup menu.

CreateMenu
Creates a menu

CreatePen
Creates a PyCPen object.

CreateProgressCtrl
Creates a progress bar object. PyCProgressCtrl::CreateWindow creates the actual control.

CreatePropertyPage
Creates a PyCPropertyPage object.

CreatePropertyPageIndirect
Creates a PyCPropertyPage object from a template.

CreatePropertySheet
Creates a PyCPropertySheet object

CreateRectRgn
Initializes a Mo PyCRgn> to a rectangle

CreateRgn
Creates a new PyCRgn object.

CreateRichEditCtrl
Creates a rich edit control.

CreateRichEditDocTemplate
Create a PyCRichEditDocTemplate object.

CreateRichEditView
Creates a PyCRichEditView object.

CreateSliderCtrl
Creates a slider control object. PyCSliderCtrl::CreateWindow creates the actual control.

CreateSplitter
Creates a splitter window.

CreateStatusBar
Creates a status bar object.

CreateStatusBarCtrl
Creates a new status bar control object. PyCStatusBarCtrl::CreateWindow creates the actual control.

CreateFont
Creates a PyCFont object.

CreateToolBar
Creates a toolbar object.

CreateToolBar
Creates a toolbar object.

CreateToolTip
Creates a tooltip control object.

CreateThread
Creates a PyCWinThread object.

CreateView
Creates a PyCView object.

CreateEditView
Creates an PyCEditView object.

CreateDebuggerThread
Starts a debugging thread.

CreateWindowFromHandle
Creates a PyCWnd from an integer containing a HWND

CreateWnd
Create a new unitialized PyCWnd object

DestroyDebuggerThread
Cleans up the debugger thread.

DoWaitCursor
Changes the cursor to/from a wait cursor.

Enable3dControls
Enables 3d controls for the application.

FindWindow
Searches for the specified top-level window

FindWindowEx
Searches for the specified top-level or child window

FullPath
Returns the full path name of the file.

GetActiveWindow
Retrieves the active window.

GetApp
Retrieves the application object.

GetAppName
Retrieves the name of the current application.

GetAppRegistryKey
Returns the registry key for the application.

GetBytes
Gets raw bytes from memory

GetCommandLine
Returns the command line for hte application.

GetDeviceCaps
Calls the API version of GetDeviceCaps. See also PyCDC::GetDeviceCaps

GetFileTitle
Given a file name, return its title

GetFocus
Retrieves the window with the focus.

GetForegroundWindow
Retrieves the foreground window.

GetHalftoneBrush
Returns a halftone brush.

GetInitialStateRequest
Returns the requested state that the application start in. This is the same as the parameter available to PyCWnd::ShowWindow

GetMainFrame
Returns a window object for the main application frame.

GetName
Returns the name of the current application.

GetProfileFileName
Returns the name of the INI file used by the application.

GetProfileVal
Returns a value from the applications INI file.

GetRecentFileList
Returns the recent file list.

GetResource
Gets a resource.

GetThread
Retrieves the current thread object.

GetType
Retrieves a Python Type object given its name

InitRichEdit
Initializes the rich edit framework.

InstallCallbackCaller
Installs a callback caller.

IsDebug
Returns a flag indicating if the current win32ui build is a DEBUG build.

IsWin32s
Determines if the application is running under Win32s.

IsObject
Determines if the passed object is a win32ui object.

LoadDialogResource
Loads a dialog resource, and returns a list detailing the objects.

LoadLibrary
Creates a PyDLL object.

LoadMenu
Loads a menu.

LoadStdProfileSettings
Loads standard application profile settings.

LoadString
Loads a string from a resource file.

MessageBox
Displays a message box.

OutputDebugString
Writes output to the Windows debugger.

EnableControlContainer
Call this function in your application object's InitInstance function to enable support for containment of OLE controls.

PrintTraceback
Prints a Traceback using the default Python traceback printer.

PumpWaitingMessages
Pumps all waiting messages to the application.

RegisterWndClass
Registers a window class

RemoveRecentFile
Removes the recent file at list index.

SetAppHelpPath
Sets the application help file path, i.e. the pApp->m_pszHelpFilePath member variable.

SetAppName
Sets the application name.

SetCurrentInstanceHandle
Sets the MFC variable afxCurrentInstanceHandle.

SetCurrentResourceHandle
Sets the MFC variable afxCurrentResourceHandle.

SetDialogBkColor
Sets the default background and text color for dialog boxes and message boxes within the application.

SetProfileFileName
Sets the INI file name used by the application.

SetRegistryKey
Causes application settings to be stored in the registry instead of INI files.

SetResource
Specifies the default DLL object for application resources.

SetStatusText
Sets the text in the status bar.

StartDebuggerPump
Starts the debugger message pump.

StopDebuggerPump
Stops the debugger message pump.

TranslateMessage
Calls ::TranslateMessage.

TranslateVirtualKey
Translates a virtual key.

WinHelp
Invokes the Window Help engine.

WriteProfileVal
Writes a value to the INI file.


win32ui.AddToRecentFileList

AddToRecentFileList(fileName)

Adds an entry to the applications Recent File List.

Parameters

fileName : string

The file name to be added to the list.

MFC References

CWinApp::AddToRecentFileList


win32ui.ComparePath

int = ComparePath(path1, path2 )

Compares 2 paths.

Parameters

path1 : string

The path name.

path2 : string

The path name.


win32ui.CreateBitmap

PyBitMap = CreateBitmap()

Creates a bitmap object.


win32ui.CreateBitmapFromHandle

PyBitMap = CreateBitmapFromHandle()

Creates a bitmap object from a HBITMAP.


win32ui.CreateBrush

PyCBrush = CreateBrush()

Creates a new brush object.

Alternative Parameters

style

The brush style.

color

The brush color.

hatch

The brush hatching.

Comments

If called with no arguments, an uninitialized brush is created.


win32ui.CreateButton

PyCButton = CreateButton()

Creates a button object. PyCButton::CreateWindow creates the actual control.


win32ui.CreateColorDialog

PyCColorDialog = CreateColorDialog(initColor, flags , parent )

Creates a color selection dialog box. self*/, PyObject *args )

Parameters

initColor=0 : int

The initial color.

flags=0 : int

The choose-color flags to use.

parent=None : PyCWnd

The parent or owner window of the dialog.


win32ui.CreateControl

PyCWnd = CreateControl(classId, windowName , style , rect , parent , id , obPersist , bStorage , licKey )

Creates an OLE control.

Parameters

classId : string

The class ID for the window.

windowName : string

The title for the window.

style : int

The style for the control.

rect : (left, top, right, bottom)

The default position of the window.

parent : PyCWnd

The parent window

id : int

The child ID for the view

obPersist=None : object

Place holder for future support.

bStorage=FALSE : int

Not used.

licKey=None : string

The licence key for the control.

Return Value

The result is a PyCWnd (or derived) object, or a win32ui.error exception is raised.


win32ui.CreateControlBar

PyCControlBar = CreateControlBar()

Creates a control bar object.


win32ui.CreateCtrlView

PyCCtrlView = CreateCtrlView(doc, className , style )

Creates a control view object.

Parameters

doc : PyCDocument

The document.

className : string

The class name of the control

style=0 : int

Additional style bits


win32ui.CreateDC

CreateDC()

Creates an uninitialised device context.


win32ui.CreateDCFromHandle

CreateDCFromHandle()

Creates a DC object from an integer handle.


win32ui.CreateDebuggerThread

CreateDebuggerThread()

Starts a debugging thread (ie, creates the "break" button).

Comments

This allows an application which is performing a long operation to dispatch paint messages during the operation.


win32ui.CreateDialog

PyCDialog = CreateDialog(idRes, dll )

Creates a dialog object.

Parameters

idRes : int

The ID of the dialog resource to load.

dll=None : PyDLL

The DLL object to load the dialog from.


win32ui.CreateDialogBar

PyCDialogBar = CreateDialogBar()

Creates a PyCDialogBar object.


win32ui.CreateDialogIndirect

PyCDialog = CreateDialogIndirect(obList)

Creates a dialog object from a template.

Parameters

obList : list

A list of [Dialog Header Tuple, Dialog Item Tuple, ...], which describe the dialog to be created.


win32ui.CreateDocTemplate

PyCDocTemplate = CreateDocTemplate(idRes)

Creates a document template object.

Parameters

idRes : int

The ID for resources for documents of this type.


win32ui.CreateEdit

PyCEdit = CreateEdit()

Creates an Edit object. PyCEdit::CreateWindow creates the actual control.


win32ui.CreateEditView

PyCEditView = CreateEditView(doc)

Creates a PyEditView object.

Parameters

doc : PyCDocument

The document to use with the view.


win32ui.CreateFileDialog

PyCFileDialog = CreateFileDialog(bFileOpen, defExt , fileName , flags , filter , parent )

Creates a File Open/Save/etc Common Dialog. self*/, PyObject *args )

Parameters

bFileOpen : int

A flag indicating if the Dialog is a FileOpen or FileSave dialog.

defExt=None : string

The default file extension for saved files. If None, no extension is supplied.

fileName=None : string

The initial filename that appears in the filename edit box. If None, no filename initially appears.

flags=win32con.OFN_HIDEREADONLY|win32con.OFN_OVERWRITEPROMPT : int

The flags for the dialog. See the API documentation for full details.

filter=None : string

A series of string pairs that specify filters you can apply to the file. If you specify file filters, only selected files will appear in the Files list box. The first string in the string pair describes the filter; the second string indicates the file extension to use. Multiple extensions may be specified using ';' as the delimiter. The string ends with two '|' characters. May be None.

parent=None : PyCWnd

The parent or owner window of the dialog.


win32ui.CreateFont

PyCFont = CreateFont(properties)

Creates a PyCFont object.

Parameters

properties : dict

A dictionary containing the font properties. Valid dictionary keys are:
name
width
height
weight
italic
underline
pitch and family
charset

Comments

The code for the PyCFont was contributed by Dave Brennan (Last known address is brennan@hal.com, but I hear he is now at Microsoft) args contains a dict of font properties


win32ui.CreateFontDialog

PyCFontDialog = CreateFontDialog(font, flags , dcPrinter , parent )

Creates a font selection dialog box. self*/, PyObject *args )

Parameters

font=None : dict/tuple

A dictionary describing a LOGFONT, or a tuple describing a CHARFORMAT.

flags=win32con.CF_EFFECTS|win32con.CF_SCREENFONTS : int

The choose-font flags to use.

dcPrinter=None : PyCDC

Show fonts available for the specified device.

parent=None : PyCWnd

The parent or owner window of the dialog.


win32ui.CreateFormView

PyCFormView = CreateFormView(doc, iTemplate )

Creates a form view object.

Parameters

doc : PyCDocument

The document to use with the view.

iTemplate : int

The ID of the dialog control.

Alternative Parameters

doc

The document to use with the view.

template

The ID of the dialog control.


win32ui.CreateFrame

PyFrameWnd = CreateFrame()

Creates a Frame window.

Return Value

The window object (not the OS window) created. An exception is raised if an error occurs.


win32ui.CreateImageList

int = CreateImageList(cx, cy , mask , initial , grow )

Creates an image list.

Parameters

cx : int

Dimension of each image, in pixels.

cy : int

Dimension of each image, in pixels.

mask : int

TRUE if the image contains a mask; otherwise FALSE.

initial : int

Number of images that the image list initially contains.

grow : int

Number of images by which the image list can grow when the system needs to resize the list to make room for new images. This parameter represents the number of new images the resized image list can contain.

Alternative Parameters

bitmapId

Resource ID of the bitmap to be associated with the image list.

cx

Dimension of each image, in pixels.

grow

Number of images by which the image list can grow when the system needs to resize the list to make room for new images. This parameter represents the number of new images the resized image list can contain.

crMask

Color used to generate a mask. Each pixel of this color in the specified bitmap is changed to black, and the corresponding bit in the mask is set to one.

Alternative Parameters

bitmapId

Resource ID of the bitmap to be associated with the image list.

cx

Dimension of each image, in pixels.

grow

Number of images by which the image list can grow when the system needs to resize the list to make room for new images. This parameter represents the number of new images the resized image list can contain.

crMask

Color used to generate a mask. Each pixel of this color in the specified bitmap is changed to black, and the corresponding bit in the mask is set to one.


win32ui.CreateListCtrl

PyCListCtrl = CreateListCtrl()

Creates a list control.


win32ui.CreateListView

PyCListView = CreateListView(doc)

Creates a PyCListView object.

Parameters

doc : PyCDocument

The document to use with the view.


win32ui.CreateMDIChild

PyCMDIChildWnd = CreateMDIChild()

Creates an MDI Child window.

Return Value

The window object created. An exception is raised if an error occurs.


win32ui.CreateMDIFrame

PyCMDIFrameWnd = CreateMDIFrame()

Creates an MDI Frame window.

Comments

An MDI Frame Window is usually the main application window. Therefore there is uaually only one of these windows per application.

An application can only hae one main window. This method will fail if the application window already exists.

Return Value

The window object created. An exception is raised if an error occurs.


win32ui.CreateMenu

PyCMenu = CreateMenu()

Creates a menu object.


win32ui.CreatePalette

int = CreatePalette(lp)

Creates a HPALETTE

Parameters

lp : LOGPALETTE

The entries for the palette.


win32ui.CreatePen

PyCPen = CreatePen(style, width , color )

Creates a PyCPen object. static*/ PyObject *

Parameters

style : int

The pen style.

width : int

The pen width.

color : long

The pen color.


win32ui.CreatePopupMenu

PyCMenu = CreatePopupMenu()

Creates a popup menu object.


win32ui.CreatePrintDialog

PyCPrintDialog = CreatePrintDialog(idRes, bPrintSetupOnly , dwFlags , parent , dll )

Creates a print dialog object.

Parameters

idRes : int

The ID of the dialog resource to load.

bPrintSetupOnly=FALSE : int

Specifies whether the standard Windows Print dialog box or Print Setup dialog box is displayed.

dwFlags=PD_ALLPAGES|PD_USEDEVMODECOPIES|PD_NOPAGENUMS|PD_HIDEPRINTTOFILE|PD_NOSELECTION : int

One or more flags you can use to customize the settings of the dialog box, combined using the bitwise OR operator.

parent=None : PyCWnd

A pointer to the dialog box parent or owner window.

dll=None : PyDLL

The DLL object to load the dialog from.


win32ui.CreateProgressCtrl

PyCProgressCtrl = CreateProgressCtrl()

Creates a progress control object. PyProgressCtrl::Create creates the actual control.


win32ui.CreatePropertyPage

PyCPropertyPage = CreatePropertyPage(resource, caption )

Creates a property page object.

Parameters

resource : int/string

The resource ID to use for the page.

caption=0 : int

The ID if the string resource to use for the caption.


win32ui.CreatePropertyPageIndirect

PyCPropertyPage = CreatePropertyPageIndirect(resourceList, caption )

Creates a property page object from a template.

Parameters

resourceList : list

A list of [Dialog Header Tuple, Dialog Item Tuple, ...], which describe the page to be created.

caption=0 : int

The ID if the string resource to use for the caption.


win32ui.CreatePropertySheet

PyCPropertySheet = CreatePropertySheet(caption, parent , select )

Creates a property sheet object.

Parameters

caption : string

The caption for the property sheet.

parent=None : PyCWnd

The parent window of the property sheet.

select=0 : int

The index of the first page to be selected.


win32ui.CreateRgn

PyCRgn = CreateRgn()

Creates a new rgn object. Return Values: a PyCRgn object


win32ui.CreateRichEditCtrl

PyCRichEditCtrl = CreateRichEditCtrl()

Creates a rich edit control.

Comments

This method only creates the RichEdit object. To create the window, (ie, the control itself), call PyCRichEdit::CreateWindow


win32ui.CreateRichEditDocTemplate

PyCRichEditDocTemplate = CreateRichEditDocTemplate(idRes)

Creates a document template object.

Parameters

idRes : int

The ID for resources for documents of this type.


win32ui.CreateRichEditView

PyCRichEditView = CreateRichEditView(doc)

Creates a PyRichEditView object.

Parameters

doc=None : PyCDocument

The document to use with the view, or None for NULL.


win32ui.CreateSliderCtrl

PyCSliderCtrl = CreateSliderCtrl()

Creates a Slider control object.

Comments

The method PySliderCtrl::CreateWindow is used to create the actual control.


win32ui.CreateSplitter

PyCSplitterWnd = CreateSplitter()

Creates a splitter window object.


win32ui.CreateStatusBar

PyCStatusBar = CreateStatusBar(parent, style , windowId )

Creates a statusbar object.

Parameters

parent : PyCWnd

The parent window for the status bar.

style=afxres.WS_CHILD | afxres.WS_VISIBLE | afxres.CBRS_BOTTOM : int

The style for the status bar.

windowId=afxres.AFX_IDW_STATUS_BAR : int

The child window ID.

Comments

You must ensure no 2 status bars share the same ID.


win32ui.CreateStatusBarCtrl

PyCStatusBarCtrl = CreateStatusBarCtrl()

Creates a progress control object. PyStatusBarCtrl::Create creates the actual control.


win32ui.CreateThread

win32ui = CreateThread()

Creates a new PyCWinThread object


win32ui.CreateToolBar

PyCToolBar = CreateToolBar(parent, style , windowId )

Creates a toolbar object.

Parameters

parent : PyCWnd

The parent window for the toolbar.

style : int

The style for the toolbar.

windowId=afxres.AFX_IDW_TOOLBAR : int

The child window ID.

Comments

You must ensure no 2 toolbars share the same ID.


win32ui.CreateTreeCtrl

PyCTreeCtrl = CreateTreeCtrl()

Creates a tree control.


win32ui.CreateTreeView

PyCTreeView = CreateTreeView(doc)

Creates a PyCTreeView object.

Parameters

doc : PyCDocument

The document to use with the view.


win32ui.CreateView

PyCScrollView = CreateView(doc)

Creates a generic view object.

Parameters

doc : PyCDocument

The document to use with the view.


win32ui.CreateWindowFromHandle

PyCWnd = CreateWindowFromHandle(hwnd)

Creates a PyCWnd from an integer containing a HWND

Parameters

hwnd : int

The window handle.

Return Value

The result is a PyCWnd (or derived) object, or a win32ui.error exception is raised.


win32ui.CreateWnd

PyCWnd = CreateWnd()

Creates an unitialized PyCWnd


win32ui.DestroyDebuggerThread

DestroyDebuggerThread()

Cleans up the debugger thread. See win32ui::CreateDebuggerThread.


win32ui.DoWaitCursor

DoWaitCursor(code)

Dispay a wait cursor.

Parameters

code : int

If this parameter is 0, the original cursor is restored. If 1, a wait cursor appears. If -1, the wait cursor ends.


win32ui.Enable3dControls

int = Enable3dControls()

Enables 3d controls for the application.

Return Value

True if 3d controls could be enabled, false otherwise.


win32ui.EnableControlContainer

int = EnableControlContainer()

Enables support for containment of OLE controls.


win32ui.FindWindow

PyCWnd = FindWindow(className, windowName )

Searches for the specified top-level window

Parameters

className : string

The window class name to find, else None

windowName : string

The window name (ie, title) to find, else None

Return Value

The result is a PyCWnd (or derived) object, or a win32ui.error exception is raised.


win32ui.FindWindowEx

PyCWnd = FindWindowEx(parentWindow, childAfter , className , windowName )

Searches for the specified top-level or child window

Parameters

parentWindow : PyCWnd

The parent whose children will be searched. If None, the desktops window will be used.

childAfter : PyCWnd

The search begins with the next window in the Z order. If None, all children are searched.

className : string

The window class name to find, else None

windowName : string

The window name (ie, title) to find, else None

Return Value

The result is a PyCWnd (or derived) object, or a win32ui.error exception is raised.


win32ui.FullPath

string = FullPath(path)

Return the fully qualified path of a file name.

Parameters

path : string

The path name.


win32ui.GetActiveWindow

PyCWnd = GetActiveWindow()

Retrieves the active window.

Return Value

The result is a PyCWnd (or derived) object, or a win32ui.error exception is raised.


win32ui.GetApp

PyCWinApp = GetApp()

Retrieves the application object.

Comments

There will only ever be one application object per application.


win32ui.GetAppName

int = GetAppName()

Returns the application name.


win32ui.GetAppRegistryKey

GetAppRegistryKey()

Returns the registry key for the application.


win32ui.GetBytes

string = GetBytes(address, size )

Gets raw bytes from memory

Parameters

address : int

The memory address

size : int

The size to get.

Comments

This method is useful to help decode unknown notify messages. You must be very carefull when using this method.

Return Value

The result is a string with a length of size.


win32ui.GetCommandLine

string = GetCommandLine()

Returns the application's command line.

Win32 API References

GetCommandLine


win32ui.GetDeviceCaps

int = GetDeviceCaps(hdc, index )

Calls the API version of GetDeviceCaps. See also PyCDC::GetDeviceCaps

Parameters

hdc : int

index : int


win32ui.GetFileTitle

string = GetFileTitle(fileName)

Given a file name, return its title

Parameters

fileName : string

The file name.


win32ui.GetFocus

PyCWnd = GetFocus()

Retrieves the window with the focus.

Return Value

The result is a PyCWnd (or derived) object, or a win32ui.error exception is raised.


win32ui.GetForegroundWindow

PyCWnd = GetForegroundWindow()

Retrieves the foreground window.

Return Value

The result is a PyCWnd (or derived) object, or a win32ui.error exception is raised.


win32ui.GetHalftoneBrush

PyCBrush = GetHalftoneBrush()

Creates a new halftone brush object.


win32ui.GetInitialStateRequest

int = GetInitialStateRequest()

Returns the requested state that the application start in. This is the same as the parameter available to PyCWnd::ShowWindow

Comments

In some cases, it may not be possible to start in the requested mode. An application may start in its default mode, then set its mode to match the value returned from this method.


win32ui.GetMainFrame

PyCWnd = GetMainFrame()

Returns a window object for the main application frame.


win32ui.GetName

string = GetName()

Returns the name of the current executable.


win32ui.GetProfileFileName

string = GetProfileFileName()

Returns the name of the INI file used by the application.


win32ui.GetProfileVal

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

Returns a value from the application's INI file.

Parameters

section : string

The section in the INI file to read from.

entry : string

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

defValue : int/string

The default value. The type of this parameter determines the method's return type.


win32ui.GetRecentFileList

list = GetRecentFileList()

Returns the entries in the applications Recent File List.

Return Value

A list of strings containing the fully qualified file names.


win32ui.GetResource

PyDLL = GetResource()

Retrieve the object associated with the applications resources.


win32ui.GetThread

PyCWinApp = GetThread()

Retrieves the current thread object.


win32ui.GetType

object = GetType()

Retrieves a Python Type object given its name


win32ui.InitRichEdit

string = InitRichEdit()

Initializes the rich edit framework.


win32ui.InstallCallBackCaller

object = InstallCallBackCaller()

Install a Python method which will dispatch all callbacks into Python.

Return Value

The previous callback caller.


win32ui.IsDebug

int = IsDebug()

Returns a flag indicating if the current win32ui build is a DEBUG build.

Comments

This should not normally be of relevance to the Python programmer. However, under certain circumstances Python code may wish to detect this.


win32ui.IsObject

int = IsObject(o)

Determines if the passed object is a win32ui object.

Parameters

o : object

The object to check.


win32ui.IsWin32s

int = IsWin32s()

Determines if the application is running under Win32s.


win32ui.LoadDialogResource

list = LoadDialogResource(idRes, dll )

Loads a dialog resource, and returns a list detailing the objects.

Parameters

idRes : int

The ID of the dialog resource to load.

dll=None : PyDLL

The DLL object to load the dialog from.


win32ui.LoadLibrary

PyDLL = LoadLibrary(fileName)

Creates a DLL object, and loads a Windows DLL into the object.

Parameters

fileName : string

The name of the DLL file to load.


win32ui.LoadMenu

PyCMenu = LoadMenu(id, dll )

Creates and loads a menu resource from a DLL.

Parameters

id : int

The Id of the menu to load.

dll=None : PyDLL

The DLL to load from.


win32ui.LoadStdProfileSettings

LoadStdProfileSettings(maxFiles)

Loads MFC standard settings from the applications INI file. This includes the Recent File List, etc.

Parameters

maxFiles=_AFX_MRU_COUNT : int

The maximum number of files to maintain on the Recently Used File list.

Comments

This function can only be called once in an applications lifetime, else an exception is raised.


win32ui.LoadString

PyUnicode = LoadString(stringId)

Loads a string from a resource file.

Parameters

stringId : int

The ID of the string to load.


win32ui.MessageBox

int = MessageBox(message, title , style )

Display a message box.

Parameters

message : string

The message to be displayed in the message box.

title=None : 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.

Return Value

An integer identifying the button pressed to dismiss the dialog.


win32ui.OutputDebugString

OutputDebugString(msg)

Sends a string to the Windows debugging device.

Parameters

msg : string

The string to write.


win32ui.PrintTraceback

PrintTraceback(tb, output)

Prints a traceback using the internal Python mechanism.

Parameters

tb : object

The traceback to print.

output : object

The object to write the traceback to.


win32ui.PumpWaitingMessages

int = PumpWaitingMessages(firstMessage, lastMessage )

Recursively start a new message dispatching loop while any message remain in the queue.

Parameters

firstMessage=WM_PAINT : int

The lowest message ID to retrieve

lastMessage=WM_PAINT : int

The highest message ID to retrieve

Comments

This allows an application which is performing a long operation to dispatch paint messages during the operation.

Return Value

The result is 1 if a WM_QUIT message was processed, otherwise 0.


win32ui.RegisterWndClass

string = RegisterWndClass(style, hCursor , hBrush , hIcon )

Registers a window class

Parameters

style : int

Specifies the Windows class style or combination of styles

hCursor=0 : int

hBrush=0 : int

hIcon=0 : int

Comments

The Microsoft Foundation Class Library automatically registers several standard window classes for you. Call this function if you want to register your own window classes.


win32ui.RemoveRecentFile

RemoveRecentFile(index)

Removes the entry in the applications Recent File List at index.

Parameters

index=0 : int

Zero-based index of the file to be removed from the MRU (most recently used) file list.


win32ui.SetAppHelpPath

int = SetAppHelpPath()

Set the pApp->m_pszHelpFilePath variable.


win32ui.SetAppName

int = SetAppName(appName)

Sets the name of the application.

Parameters

appName : string

The new name for the application. This is used for the default registry key, and the title bar of the application.

MFC References

CWinApp::m_pszAppName


win32ui.SetCurrentInstanceHandle

int = SetCurrentInstanceHandle(newVal)

Sets the MFC variable afxCurrentInstanceHandle

Parameters

newVal : int

The new value for afxCurrentInstanceHandle

Return Value

The result is the previous value of afxCurrentInstanceHandle


win32ui.SetCurrentResourceHandle

int = SetCurrentResourceHandle(newVal)

Sets the MFC variable afxCurrentResourceHandle

Parameters

newVal : int

The new value for afxCurrentResourceHandle

Return Value

The result is the previous value of afxCurrentResourceHandle


win32ui.SetDialogBkColor

int = SetDialogBkColor(clrCtlBk, clrCtlText )

Sets the default background and text color for dialog boxes and message boxes within the application.

Parameters

clrCtlBk=win32ui.RGB(192, 192, 192) : int

The color for the controls background.

clrCtlText=win32ui.RGB(0, 0, 0) : int

The color for the controls text.

MFC References

CWinApp::SetDialogBkColor


win32ui.SetProfileFilename

SetProfileFilename(filename)

Sets the name of the INI file used by the application.

Parameters

filename : string

The name of the ini file.


win32ui.SetRegistryKey

SetRegistryKey(key)

Causes application settings to be stored in the registry instead of INI files.

Parameters

key : string

A string containing the name of the key.

Comments

Causes application settings to be stored in the registry instead of INI files. This function sets m_pszRegistryKey, which is then used by the GetProfileXXX and WriteProfileXXX member functions of CWinApp. If this function has been called, the list of most recently-used (MRU) files is also stored in the registry. The registry key is usually the name of a company. It is stored in a key of the following form: HKEY_CURRENT_USER\\Software\\<company name>\\<application name>\\<section name>\\<value name>.


win32ui.SetResource

PyDLL = SetResource(dll)

Specifies the default DLL object for application resources.

Parameters

dll : PyDll

The dll object to use for default resources.

Return Value

The previous default DLL object.


win32ui.SetStatusText

SetStatusText(msg, bForce)

Sets the text in the status bar of the application.

Parameters

msg : string

The message to write to the status bar.

bForce=0 : int

A flag indicating if the message should be forced to the status bar, or written in idle time.


win32ui.StartDebuggerPump

StartDebuggerPump()

Starts a recursive message loop, waiting for an application close message.

Comments

This function is used by the debugger. It allows the debugger to interact with the user, even while the Python code is stopped. As the Python code may be responding to a Windows Event, this function works around the inherent message queue problems.


win32ui.StopDebuggerPump

StopDebuggerPump()

Stops the debugger pump. See win32ui::StartDebuggerPump.


win32ui.TranslateMessage

int = TranslateMessage()

Calls the API version of TranslateMessage.


win32ui.TranslateVirtualKey

string/None = TranslateVirtualKey(vk)

Parameters

vk : int

The key to translate


win32ui.WinHelp

WinHelp(cmd, data)

Invokes the Windows Help system.

Parameters

cmd=win32con.HELP_CONTEXT : int

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

data : int/string

Additional data specific to the help call.


win32ui.WriteProfileVal

WriteProfileVal(section, entry, value)

Writes a value to the application's 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. The type of this parameter determines the method's return type.


win32uiole

Module win32uiole

A module, encapsulating the Microsoft Foundation Classes OLE functionality.

Methods

CreateInsertDialog
Creates a InsertObject dialog.

CreateOleClientItem
Creates a PyCOleClientItem object.

CreateOleDocument
Creates a PyCOleDocument object.

DaoGetEngine

GetIDispatchForWindow
Gets an OCX IDispatch pointer, if the window has one!

OleGetUserCtrl
Retrieves the current user-control flag.

OleSetUserCtrl
Sets the current user-control flag.


win32uiole.CreateInsertDialog

PyCOleInsertDialog = CreateInsertDialog()

Creates a InsertObject dialog. self*/, PyObject *args )


win32uiole.CreateOleClientItem

PyCOleClientItem = CreateOleClientItem()

Creates a PyCOleClientItem object.


win32uiole.CreateOleDocument

PyCOleDocument = CreateOleDocument(template, fileName )

Creates an OLE document.

Parameters

template : PyCDocTemplate

The template to be attached to this document.

fileName=None : string

The filename for the document.


win32uiole.DaoGetEngine

PyIDispatch = DaoGetEngine()


win32uiole.GetIDispatchForWindow

PyIDispatch = GetIDispatchForWindow()

Gets an OCX IDispatch pointer, if the window has one!


win32uiole.OleGetUserCtrl

int = OleGetUserCtrl()

Returns the application name.


win32uiole.OleSetUserCtrl

int = OleSetUserCtrl(bUserCtrl)

Sets or clears the user control flag.

Parameters

bUserCtrl : int

Specifies whether the user-control flag is to be set or cleared.


Objects

  • CHARFORMAT
  • CREATESTRUCT
  • LV_COLUMN
  • LV_ITEM
  • PARAFORMAT
  • PyAssocCObject
  • PyAssocObject
  • PyBitmap
  • PyCBrush
  • PyCButton
  • PyCCmdTarget
  • PyCCmdUI
  • PyCColorDialog
  • PyCComboBox
  • PyCCommonDialog
  • PyCControl
  • PyCControlBar
  • PyCCtrlView
  • PyCDC
  • PyCDialog
  • PyCDialogBar
  • PyCDocTemplate
  • PyCDockContext
  • PyCDocument
  • PyCEdit
  • PyCEditView
  • PyCFileDialog
  • PyCFont
  • PyCFontDialog
  • PyCFormView
  • PyCFrameWnd
  • PyCGdiObject
  • PyCImageList
  • PyCListBox
  • PyCListCtrl
  • PyCListView
  • PyCMDIChildWnd
  • PyCMDIFrameWnd
  • PyCMenu
  • PyCOleClientItem
  • PyCOleDialog
  • PyCOleDocument
  • PyCOleInsertDialog
  • PyCPrintDialog
  • PyCPrintInfo
  • PyCProgressCtrl
  • PyCPropertyPage
  • PyCPropertySheet
  • PyCRect
  • PyCRgn
  • PyCRichEditCtrl
  • PyCRichEditDoc
  • PyCRichEditDocTemplate
  • PyCRichEditView
  • PyCScrollView
  • PyCSliderCtrl
  • PyCSpinButtonCtrl
  • PyCSplitterWnd
  • PyCStatusBar
  • PyCStatusBarCtrl
  • PyCTabCtrl
  • PyCToolBar
  • PyCToolBarCtrl
  • PyCToolTipCtrl
  • PyCTreeCtrl
  • PyCTreeView
  • PyCView
  • PyCWinApp
  • PyCWinThread
  • PyCWnd
  • PyDLL
  • TV_ITEM


CHARFORMAT

CHARFORMAT Object

Describes a CHARFORMAT tuple

Items

[0] int : mask

The mask to use. Bits in this mask indicate which of the following parameter are interpreted. Must be a combination the win32con.CFM_* constants.

[1] int : effects

The effects to use. Must be a combination the win32con.CFE_* constants.

[2] int : yHeight

The y height.

[3] int : yOffset

Character offset from the baseline. If this member is positive, the character is a superscript; if it is negative, the character is a subscript.

[4] int : colorText

The color to use.

[5] int : bCharSet

The charset. See the LOGFONT structure for details.

[6] int : bPitchAndFamily

The charset. See the LOGFONT structure for details.

[7] string : faceName

The font name.

Comments

Executing d=win32ui.CreateFontDialog(); d.DoModal(); print d.GetCharFormat() will print a valid CHARFORMAT tuple.


CREATESTRUCT

CREATESTRUCT Object

A representation of a Windows CREATESTRUCT structure.

Parameters

createParams : int

hInstance : int

hMenu : int

hwndParent : int

cy, cx, y, x : (int, int, int, int)

style : int

lpszName : int

A string cast to a long.

lpszClass : int

A string cast to a long!?

dwExStyle : int

Comments

Note that the strings are passed as longs, which are there address in memory. This is due to the internal mechanics of passing this structure around.


LV_COLUMN

LV_COLUMN Object

A tuple that describes a Win32 LV_COLUMN tuple. Used by the PyCListCtrl object. A tuple of 4 items, being fmt, cx, pszText, iSubItem

Items

[0] int : fmt

Alignment of the column header and the subitem text in the column.

[1] int : cx

Width of the column.

[2] string : text

Column header text.

[3] int : subItem

Index of subitem associated with the column.
When passed to Python, will always be a tuple of size 4, and items may be None if not available.
When passed from Python, the tuple may be any length up to 4, and any item may be None.


LV_ITEM

LV_ITEM Object

Describes an LV_ITEM tuple, used by the PyCListCtrl object.

Items

[0] int : item

The item number.

[1] int : subItem

The sub-item number.

[2] int : state

The items state. If specified, the stateMask must also be specified.

[3] int : stateMask

A mask indicating which of the state bits are valid..

[4] string : text

The text for the item

[5] int : iImage

The image offset for the item

[6] int : userObject

Any integer to be associated with the item.

Comments

When passed to Python, will always be a tuple of size 7, and items may be None if not available.
When passed from Python, the tuple must be at least 2 items long, and any item may be None.
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.


PARAFORMAT

PARAFORMAT Object

Describes a PARAFORMAT tuple

Items

[0] int : mask

The mask to use. Bits in this mask indicate which of the following parameters are interpreted. Must be a combination the win32con.PFM_* constants.

[1] int : numbering

The numbering style to use.

[2] int : yHeight

Reserved

[3] int : dxStartIndent

Indentation of the first line.

[4] int : dxRightIndent

Indentation from the right.

[5] int : dxOffset

The indent of second and subsequent lines.

[6] int : wAlignment

The alignment of the paragraph.

[7] [int ,...] : tabStops

The tabstops to use.


PyAssocCObject

PyAssocCObject Object

An internal class.


PyAssocObject

PyAssocObject Object

An internal class.

Methods

AttachObject
Attaches a Python object for lookup of "virtual" functions.


PyAssocObject.AttachObject

AttachObject()

Attaches a Python object for lookup of "virtual" functions.


PyBitmap

PyBitmap Object

A bitmap class, derived from a PyCGdiObject.

Methods

CreateCompatibleBitmap
Creates a bitmap compatible with the specified device context.

GetSize
Gets the size of the bitmap object, in pixels.

GetHandle
Returns the HBITMAP for a bitmap.

LoadBitmap
Loads a bitmap from a DLL object.

LoadBitmapFile
Loads a bitmap from a file object.

LoadPPMFile
Loads a bitmap from a file object containing a PPM format bitmap.

Paint
Paints a bitmap to a windows DC.

GetInfo
Returns the BITMAP structure info.

GetBitmapBits
Returns the bitmap bits.

SaveBitmapFile
Saves a bitmap to a file. sentinel


PyBitmap.CreateCompatibleBitmap

CreateCompatibleBitmap(dc, width, height)

Creates a bitmap compatible with the specified device context.

Parameters

dc : PyCDC

Specifies the device context.

width : int

The width (in bits) of the bitmap

height : int

The height (in bits) of the bitmap.


PyBitmap.GetBitmapBits

tuple = GetBitmapBits()

Returns the bitmap bits.


PyBitmap.GetHandle

int = GetHandle()

Returns the HBITMAP for a bitmap object


PyBitmap.GetInfo

dict = GetInfo()

Returns the BITMAP structure info

Return Value

A dictionary of integers, keyed by the following strings:
bmType
bmWidth
bmHeight
bmWidthBytes
bmPlanes
bmBitsPixel


PyBitmap.GetSize

(cx,cy) = GetSize()

Returns the size of the bitmap object.


PyBitmap.LoadBitmap

LoadBitmap(idRes, obDLL)

Loads a bitmap from a DLL object.

Parameters

idRes : int

The resource ID of the bitmap

obDLL=None : PyDLL

The DLL object to load from.


PyBitmap.LoadBitmapFile

LoadBitmapFile(fileObject)

Loads a bitmap (.BMP) format from a file object.

Parameters

fileObject : file[.read]

The file object to load the .BMP format file from.


PyBitmap.LoadPPMFile

LoadPPMFile(fileObject, cols, rows)

Loads a bitmap in Portable Pix Map (PPM) format from a file object.

Parameters

fileObject : file[.read]

The file object to load the PPM format file from.

cols : int

The number of columns in the bitmap.

rows : int

The number of rows in the bitmap.


PyBitmap.Paint

Paint(dcObject, rectDest, rectSrc)

Paint a bitmap.

Parameters

dcObject : PyCDC

The DC object to paint the bitmap to.

rectDest=(0,0,0,0) : (left,top,right,bottom)

The destination rectangle to paint to.

rectSrc=(0,0,0,0) : (left,top,right,bottom)

The source rectangle to paint from.


PyBitmap.SaveBitmapFile

None = SaveBitmapFile(dcObject, Filename )

Saves a bitmap to a file.

Parameters

dcObject : PyCDC

The DC object that has rendered the bitmap.

Filename : string

The file to save the bitmap to


PyCBrush

PyCBrush Object

An object encapsulating an MFC PyCBrush class.

Methods

CreateSolidBrush
Initializes a brush with a specified solid color.

GetSafeHandle
Retrieves the HBRUSH for the brush as an integer


PyCBrush.CreateSolidBrush

CreateSolidBrush()

Initializes a brush with a specified solid color.


PyCBrush.GetSafeHandle

int = GetSafeHandle()

Retrieves the HBRUSH for the brush as an integer


PyCButton

PyCButton Object

A windows button. Encapsulates an MFC CButton class. Derived from PyCControl.

Methods

CreateWindow
Creates the window for a new button object.

GetBitmap
Retrieves the bitmap associated with the button.

SetBitmap
Sets the bitmap of a button.

GetCheck
Retrieves the check state of a radio button or check box.

SetCheck
Sets the check state of a radio button or check box.

GetState
Retrieves the state of a radio button or check box.

SetState
Sets the state of a radio button or check box.

GetButtonStyle
Retrieves the style of a radio button or check box.

SetButtonStyle
Sets the state of a radio button or check box.


PyCButton.CreateWindow

CreateWindow(caption, style, rect, parent, id)

Creates the window for a new button object.

Parameters

caption : string

The caption (text) for the button.

style : int

The style for the button. Use any of the win32con.BS_* constants.

rect : (left, top, right, bottom)

The size and position of the button.

parent : PyCWnd

The parent window of the button. Usually a PyCDialog.

id : int

The buttons control ID.


PyCButton.GetBitmap

int = GetBitmap()

Get the button's bitmap


PyCButton.GetButtonStyle

int = GetButtonStyle()

Gets the style of the button.


PyCButton.GetCheck

int = GetCheck()

Retrieves the check state of a radio button or check box.


PyCButton.GetState

int = GetState()

Returns the state of the button.


PyCButton.SetBitmap

int = SetBitmap(hBitmap)

Set the button's bitmap

Parameters

hBitmap=1 : int

Handle of the new bitmap


PyCButton.SetButtonStyle

int = SetButtonStyle(style, bRedraw )

Sets the style of the button.

Parameters

style : int

The new style for the button.

bRedraw=1 : int

Should the button be redrawn?


PyCButton.SetCheck

SetCheck(idCheck)

Sets or resets the state of a radio button or check box.

Parameters

idCheck : int

The ID of the button.


PyCButton.SetState

int = SetState(bHighlight)

Sets the state of the button.

Parameters

bHighlight : int

The new state for the button.

Comments

Highlighting affects the exterior of a button control. It has no effect on the check state of a radio button or check box.


PyCCmdTarget

PyCCmdTarget Object

An abstract command target class. Encapsulates an MFC CCmdTarget class

Methods

BeginWaitCursor
Displays the cursor as an hourglass.

EndWaitCursor
End a wait cursor.

HookCommand
Hook a command handler.

HookCommandUpdate
Hook a windows command update handler.

HookOleEvent
Hooks an OLE event.

HookNotify
Hook a control notification handler.

RestoreWaitCursor
Restores the appropriate hourglass cursor after the system cursor has changed.


PyCCmdTarget.BeginWaitCursor

BeginWaitCursor()

Displays the cursor as an hourglass. This can be used when you expect a command to take a noticeable time to execute (eg, when a document loads or saves itself to a file.).
The actions of BeginWaitCursor are not always effective outside of a single message handler as other actions, such as OnSetCursor handling, could change the cursor.
Call EndWaitCursor to restore the previous cursor.

MFC References

CWnd::BeginWaitCursor


PyCCmdTarget.EndWaitCursor

EndWaitCursor()

Ends a wait cursor. Should only be called after PyCWnd::BeginWaitCursor .


PyCCmdTarget.HookCommand

object = HookCommand(obHandler, id )

Hook a windows command handler.

Parameters

obHandler : object

The handler for the command message. This must be a callable object.

id : int

The ID of the command to be handled, or zero to handle all command messages.

Comments

obHandler will be called as the application receives command notification messages with the specified ID. Command notification messages are usually sent in response to menu or toolbar commands.
When updating a user interface element, Pythonwin will first check if a handler has been installed via PyCCmdTarget::HookCommandUpdate. If so, this alone determines the state of the interface object. If no Update handler exists, PythonWin will automatically enable a menu/toolbar item if a command handler exists The handler will be called with 2 arguments
* The command id being handled.
* The command notification code.
If the handler returns TRUE, then the command will be passed on to the default handler, otherwise the message will be consumed.
This method is best suited to handling messages from user interface elements, such as menus, toolbars, etc. To handle notification messages from a control, you should use PyCCmdTarget::HookNotify

Return Value

The return value is the previous handler, or None.


PyCCmdTarget.HookCommandUpdate

object = HookCommandUpdate(obHandler, id )

Hook a windows command update handler.

Parameters

obHandler : object

The handler for the command message. This must be a callable object.

id : int

The ID of the command to be handled.

Comments

The handler object passed will be called as the application updates user interface elements with the specified ID. See PyCCmdTarget::HookCommand for a description of the rules used to determine command routing and updating.

Return Value

The return value is the previous handler, or None.


PyCCmdTarget.HookNotify

object = HookNotify(obHandler, id )

Hook a windows command handler.

Parameters

obHandler : object

The handler for the command message. This must be a callable object.

id : int

The ID of the command to be handled, or zero to handle all command messages.

Comments

obHandler will be called as the application receives control notification messages. These may also be handled via PyCCmdTarget::HookCommand, but this method is specific to control notifications, and therefore provides more information.

The handler will be called with 2 arguments
A tuple describing standard notification information.
A tuple describing extra notification params, or an integer containing the address of the first byte of the extended information.
If the handler returns TRUE, then the command will be passed on to the default handler, otherwise the message will be consumed.

Certain notification codes are recognised internally, and these are converted to a Python tuple. If the extra information is not recognised, the address is passed. These addresses could be extracted using win32ui::GetBytes and the struct module, or using Sam Rushing's calldll/dynwin module. (It would be possible to extend Pythonwin so a program can install certain knowledge about handlers, but this has not been implemented.)

Return Value

The return value is the previous handler, or None.


PyCCmdTarget.HookOleEvent

object = HookOleEvent()

Hook an OLE Event.

Return Value

The return value is the previous handler, or None.


PyCCmdTarget.RestoreWaitCursor

RestoreWaitCursor()

Restores the appropriate hourglass cursor after the system cursor has changed.

Comments

Call this function to restore the appropriate hourglass cursor after the system cursor has changed (for example, after a message box has opened and then closed while in the middle of a lengthy operation).


PyCCmdUI

PyCCmdUI Object

A class for manipulating user-interface elements. Encapsulates an MFC CCmdUI class

Methods

Enable
Enables or disables the user-interface item for this command.

SetCheck
Sets the check state of the user-interface item for this command.

SetRadio
Like the SetCheck member function, but operates on radio groups.

SetText
Sets the text for the user-interface item for this command.

ContinueRouting
Tells the command-routing mechanism to continue routing the current message down the chain of handlers.

Properties

int m_nIndex

int m_nID


PyCCmdUI.ContinueRouting

ContinueRouting()

Tells the command-routing mechanism to continue routing the current message down the chain of handlers.


PyCCmdUI.Enable

Enable(bEnable)

Enables or disables the user-interface item for this command.

Parameters

bEnable=1 : int

TRUE if the item should be enabled, false otherwise.


PyCCmdUI.SetCheck

SetCheck(state)

Sets the check state of the user-interface item for this command.

Parameters

state=1 : int

0 for unchecked, 1 for checked, or 2 for indeterminate.


PyCCmdUI.SetRadio

SetRadio(bOn)

Like the SetCheck member function, but operates on radio groups.

Parameters

bOn=1 : int

TRUE if the item should be enabled, false otherwise.


PyCCmdUI.SetText

SetText(text)

Sets the text for the user-interface item for this command.

Parameters

text : string

The text for the interface element.


PyCColorDialog

PyCColorDialog Object

A class which encapsulates an MFC CColorDialog object. Derived from a PyCDialog object.

Methods

GetColor
Determines the selected color.

DoModal
Displays a dialog and allows the user to make a selection.

GetSavedCustomColors
Returns the saved custom colors.

SetCurrentColor
Sets the currently selected color.

SetCustomColors
Sets one or more custom colors

GetCustomColors
Gets the currently defined custom colors.


PyCColorDialog.DoModal

int = DoModal()

Displays a dialog and allows the user to make a selection.

MFC References

CColorDialog::DoModal


PyCColorDialog.GetColor

int = GetColor()

Determines the selected color.

MFC References

CColorDialog::GetColor


PyCColorDialog.GetCustomColors

(int,...) = GetCustomColors()

Gets the 16 currently defined custom colors


PyCColorDialog.GetSavedCustomColors

int = GetSavedCustomColors()

Returns the saved custom colors.

MFC References

CColorDialog::GetSavedCustomColors


PyCColorDialog.SetCurrentColor

SetCurrentColor(color)

Sets the currently selected color.

Parameters

color : int

The color to set.

MFC References

CColorDialog::SetCurrentColor


PyCColorDialog.SetCustomColors

SetCustomColors()

Sets one or more custom colors


PyCComboBox

PyCComboBox Object

A windows combo control. Encapsulates an MFC CComboBox class. Derived from a PyCControl object.

Methods

AddString
Add a string to the listbox portion of a combo box.

DeleteString
Delete a string to the listbox portion of a combo box.

Dir
Fill the listbox portion of a combo with a file specification.

GetCount
Get the count of items in the listbox portion of a combo box.

GetCurSel
Get the current selection in the listbox portion of a combo box.

GetEditSel
Gets the edit control selection from a combo box.

GetExtendedUI
Gets the ExtendedUI flag for a combo box.

GetItemData
Retrieves the application-specific object associated with a combobox entry

GetItemValue
Retrieves the application-specific value associated with a combobox entry

GetLBText
Gets the text from the edit control in a combo box.

GetLBTextLen
Gets the length of the text in the edit control of a combo box.

InsertString
Inserts a string into the listbox portion of a combo box.

LimitText
Limit the length of text in the edit control portion of a combo box.

ResetContent
Remove all items from the listbox portion of a combo box.

SelectString
Select a string in the listbox portion of a combo box.

SetCurSel
Sets the current selection in the listbox portion of a combo box.

SetEditSel
Sets the current selection in the edit control portion of a combo box.

SetExtendedUI
Sets the ExtendedUI flag for a combo box.

SetItemData
Sets the application-specific object associated with a combobox entry

SetItemValue
Sets the application-specific value associated with a combobox entry

ShowDropDown
Shows the listbox portion of a combo box.


PyCComboBox.AddString

int = AddString(object)

Adds a string to a combobox.

Parameters

object : any

Any object. If not a string, __str__, __repr__ or a default repr() will be used

MFC References

CComboBox::AddString

Return Value

The zero based index of the new string.


PyCComboBox.DeleteString

int = DeleteString(pos)

Deletes an item from a combobox.

Parameters

pos : int

The zero based index of the item to delete.

MFC References

CComboBox::DeleteString

Return Value

The count of the items remaining in the list.


PyCComboBox.Dir

int = Dir(attr, wild )

Fills the list portion of a combobox with a directory listing.

Parameters

attr : int

The attributes of the files to locate

wild : string

A file specification string - eg, *.*

MFC References

CComboBox::Dir

Return Value

The index of the last file name added to the list.


PyCComboBox.GetCount

int = GetCount()

Returns the count of items in the combobox.

MFC References

CListBox::GetCount

Return Value

Returns the number of items currently in the combobox.


PyCComboBox.GetCurSel

int = GetCurSel()

Returns the index of the currently selected item.

Comments

Should not be called for a multiple selection listbox.

MFC References

CComboBox::GetCurSel


PyCComboBox.GetEditSel

int = GetEditSel()

Returns the selection of the edit control portion of a combo box.

MFC References

CComboBox::GetEditSel

Return Value

A 32-bit value that contains the starting position in the low-order word and the position of the first nonselected character after the end of the selection in the high-order word. If this function is used on a combo box without an edit control, an exception is raised.


PyCComboBox.GetExtendedUI

int = GetExtendedUI()

Indicates if the combo has the extended interface.

MFC References

CComboBox::GetExtendedUI

Return Value

Nonzero if the combo box has the extended user interface; otherwise 0.


PyCComboBox.GetItemData

object = GetItemData(item)

Retrieves the application-specific object associated with an item.

Parameters

item : int

The index of the item whose data is to be retrieved.


PyCComboBox.GetItemValue

int = GetItemValue(item)

Retrieves the application-specific value associated with an item.

Parameters

item : int

The index of the item whose data is to be retrieved.


PyCComboBox.GetLBText

string = GetLBText(index)

Gets the string from the list of a combo box.

Parameters

index : int

The index of the item to return the string for.

Return Value

The requested string. If index does not specify a valid index, no exception is raised.


PyCComboBox.GetLBTextLen

int = GetLBTextLen(index)

Returns the length of a string in the list of a combobox.

Parameters

index : int

The index of the item to return the length of.

MFC References

CComboBox::GetLBTextLen rdesc Returns the length of the string (in bytes), or raises an exception on error.


PyCComboBox.InsertString

int = InsertString(pos, object )

Insert a string into a combobox.

Parameters

pos : int

The zero based index in the combobox to insert the new string

object : any

The object to be added to the combobox

MFC References

CComboBox::InsertString

Return Value

The zero based index of the new string added.


PyCComboBox.LimitText

int = LimitText(max)

Limits the amount of text the edit portion of a combo box can hold.

Parameters

max : int

The maximum number of characters the user can enter. If zero, the size is set to (virtually) unlimited.

MFC References

CComboBox::LimitText


PyCComboBox.ResetContent

ResetContent()

Clear all the items from a combobox.

MFC References

CComboBox::ResetContent


PyCComboBox.SelectString

SelectString(after, string)

Searches for a combobox item that matches the specified string, and selects it.

Parameters

after : int

Contains the zero-based index of the item before the first item to be searched, or -1 for the entire combobox.

string : string

The string to search for.

MFC References

CComboBoxBox::SelectString

Return Value

The return value is always None - an exception is raised if the string can not be located.


PyCComboBox.SetCurSel

SetCurSel(index)

Selects an item in a combobox.

Parameters

index : int

The zero based index of the item to select.

MFC References

CComboBox::SetCurSel


PyCComboBox.SetEditSel

SetEditSel(start, end)

Sets the selection in the edit control portion of a combo box.

Parameters

start : int

Specifies the starting position. If the starting position is set to -1, then any existing selection is removed.

end : int

Specifies the ending position. If the ending position is set to -1, then all text from the starting position to the last character in the edit control is selected.

MFC References

PyCComboBox::SetEditSel

Return Value

The return value is always None - an exception is raised if the combo is a dropdown style, or does not have an edit control.


PyCComboBox.SetExtendedUI

SetExtendedUI(bExtended)

Selects the Extended UI mode for a combo box.

Parameters

bExtended=1 : int

Indicates if the combo should have the extended user interface.

Comments

A combo box with the Extended UI flag set can be identified in the following ways:~ Clicking the static control displays the list box only for combo boxes with the CBS_DROPDOWNLIST style.~ Pressing the DOWN ARROW key displays the list box (F4 is disabled).~ Scrolling in the static control is disabled when the item list is not visible (the arrow keys are disabled).

MFC References

CListBox::SetExtendedUI


PyCComboBox.SetItemData

int = SetItemData(item, Data )

Sets the item's application-specific object value.

Parameters

item : int

Index of the item whose Data is to be set.

Data : object

New value for the data.

Comments

Note that a reference count is not added to the object. This it is your responsibility to make sure the object remains alive while in the list.


PyCComboBox.SetItemValue

int = SetItemValue(item, data )

Sets the item's application-specific value.

Parameters

item : int

Index of the item whose Data is to be set.

data : int

New value for the data.


PyCComboBox.ShowDropDown

ShowDropDown(bShowIt)

Shows or hides the listbox portion of a combo box.

Parameters

bShowIt=1 : int

Indicates if the listbox should be shown or hidden.


PyCCommonDialog

PyCCommonDialog Object

An abstract class which encapsulates an MFC CCommonDialog object. Derived from a PyCDialog object.


PyCControl

PyCControl Object

A windows abstract control. Derived from a PyCWnd object.


PyCControlBar

PyCControlBar Object

A class which encapsulates an MFC CControlBar . Derived from a PyCWnd object.

Methods

CalcDynamicLayout
The framework calls this member function to calculate the dimensions of a dynamic toolbar.

CalcFixedLayout
Calculates the horizontal size of a control bar

EnableDocking
Specifies whether the control bar supports docking and the sides of its parent window.

EraseNonClient

GetBarStyle
Retrieves the control bar style settings.

GetCount
Returns the number of non-HWND elements in the control bar.

GetDockingFrame
Returns the frame window to which a control bar is docked.

IsFloating
Returns a nonzero value if the control bar in question is a floating control bar.

SetBarStyle
Modifies the control bar style settings.

ShowWindow
Shows the window, and recalculates the toolbar layout.

Properties

PyCFrameWnd dockSite
Current dock site, if dockable

PyCWnd dockBar
Current dock bar, if dockable

PyCDockContext dockContext
Used during dragging

int dwStyle
creation style (used for layout)

int dwDockStyle
indicates how bar can be docked


PyCControlBar.CalcDynamicLayout

int = CalcDynamicLayout(length, dwMode )

The framework calls this member function to calculate the dimensions of a dynamic toolbar.

Parameters

length : int

The requested dimension of the control bar, either horizontal or vertical, depending on dwMode.

dwMode : int

A combination of flags.


PyCControlBar.CalcFixedLayout

int = CalcFixedLayout(bStretch, bHorz )

Calculates the horizontal size of a control bar

Parameters

bStretch : int

Indicates whether the bar should be stretched to the size of the frame. The bStretch parameter is nonzero when the bar is not a docking bar (not available for docking) and is 0 when it is docked or floating (available for docking).

bHorz : int

Indicates that the bar is horizontally or vertically oriented.


PyCControlBar.EnableDocking

EnableDocking(style)

pecifies whether the control bar supports docking and the sides of its parent window.

Parameters

style : int

Enables a control bar to be docked.


PyCControlBar.EraseNonClient

EraseNonClient()


PyCControlBar.GetBarStyle

int = GetBarStyle()

Retrieves the control bar style settings.


PyCControlBar.GetCount

int = GetCount()

Returns the number of non-HWND elements in the control bar.


PyCControlBar.GetDockingFrame

PyCFrameWnd = GetDockingFrame()

Returns the frame window to which a control bar is docked.


PyCControlBar.IsFloating

int = IsFloating()

Returns a nonzero value if the control bar in question is a floating control bar.


PyCControlBar.SetBarStyle

SetBarStyle(style)

Modifies the control bar style settings.

Parameters

style : int

The new style


PyCControlBar.ShowWindow

int = ShowWindow()

Shows the toolbar, and recalculates the button layout.

Comments

This method is provided for convenience. For further details, see PyCWnd::ShowWindow and PyCFrameWnd::RecalcLayout

Return Value

The return value is that returned from PyCWnd::ShowWindow


PyCCtrlView

PyCCtrlView Object

A class which implementes a CCtrlView (ie, a view based on a dialog resource.

Methods

OnCommand
Calls the standard Python framework OnCommand handler


PyCCtrlView.OnCommand

OnCommand(wparam, lparam)

Calls the standard Python framework OnCommand handler

Parameters

wparam : int

lparam : int

See Also

PyCWnd.OnCommand virtual method


PyCDC

PyCDC Object

A Device Context. Encapsulates an MFC CDC class.

Methods

AbortDoc
Aborts a print job

Arc
Draws an arc.

BeginPath
Opens a path bracket in the device context

BitBlt
Copies a bitmap

Chord
Draws a chord.

CreateCompatibleDC
Creates a memory DC compatible with this DC.

CreatePrinterDC
Creates a device context for a specific printer

DeleteDC
Deletes all resources associated with a device context.

DPtoLP
Convert from device points to logical points.

Draw3dRect
Draws a three-dimensional rectangle.

DrawFocusRect
Draws a rectangle in the style used to indicate the rectangle has focus

DrawFrameControl
Draws a frame control of the specified type and style.

DrawIcon
Draws an icon on the DC.

DrawText
Formats text in the given rectangle

Ellipse
Draws an Ellipse.

EndDoc
Finishes spooling the document and starts printing it

EndPage
Finishes a page on a printer DC

EndPath
Closes a path bracket and selects the path defined by the bracket into the specified device context

ExtTextOut
Writes text to the DC.

FillPath
Closes any open figures in the current path and fills the path's interior by using the current brush and polygon-filling mode.

FillRect
Fills a given rectangle with the specified brush

FillSolidRect
Fills the given rectangle with the specified solid color.

FrameRect
Draws a border around the rectangle specified by rect

GetBrushOrg
Retrieves the origin (in device units) of the brush currently selected for the device context.

GetClipBox
Retrives the current clipping region.

GetCurrentPosition
Retrieves the current position (in logical coordinates).

GetDeviceCaps
Retrieves current device capabilities.

GetHandleAttrib
Retrieves the handle of the attribute device context.

GetHandleOutput
Retrieves the handle of the output device context.

GetMapMode
Gets the mapping mode for the device context.

GetNearestColor
Returns the closest color a device can map.

GetPixel
Returns the value of a pixel at a location

GetSafeHdc
Returns the underlying windows handle for the DC object.

GetTextExtent
Calculates the size of the string.

GetTextExtentPoint
Alias for GetTextExtent - Calculates the size of the string.

GetTextFace
Retrieves the name of the current font.

GetTextMetrics
Retrieves the metrics for the current font.

GetViewportExt
Gets the viewport extent of the device context

GetViewportOrg
Gets the viewport origin of the device context

GetWindowExt
Gets the window extent of the device context

GetWindowOrg
Retrieves the x- and y-coordinates of the origin of the window associated with the device context.

IntersectClipRect
Creates a new clipping region by forming the intersection of the current region and the rectangle specified

IsPrinting
Returns 1 if the DC is currently printing, else 0

LineTo
Draws a line to a specified point.

LPtoDP
Convert from logical points to device points

MoveTo
Moves the current position to a specifed point.

OffsetWindowOrg
Modifies the coordinates of the window origin relative to the coordinates of the current window origin.

OffsetViewportOrg
Modifies the coordinates of the viewport origin relative to the coordinates of the current viewport origin

PatBlt
Creates a bit pattern on the device.

Pie
Draws a pie shape with specific starting and ending points in a rectangle

PolyBezier
Draws one or more Bezier splines.

Polygon
Draws an Polygon.

Polyline
Draws a Polyline.

RealizePalette
Maps palette entries in the current logical palette to the system palette.

Rectangle
Draws a rectangle using the current pen. The interior of the rectangle is filled using the current brush.

RectVisible
Determines if a rectangle is currently visisble in the viewport.

RestoreDC
Restores a saved DC.

SaveDC
Saves a DC.

ScaleWindowExt
Modifies the window extents relative to the current values.

ScaleViewportExt
Modifies the viewport extents relative to the current values.

SelectClipRgn
Selects the given region as the current clipping region for the device context

SelectObject
Selects an object into the DC.

SelectObject
Selects the logical palette.

SetBkColor
Sets the background color.

SetBkMode
Sets the background mode.

SetBrushOrg
Specifies the origin that GDI will assign to the next brush that the application selects into the device context.

SetGraphicsMode
Sets the graphics mode for the specified device context

SetMapMode
Sets the device mapping mode.

SetPixel
Set a pixel to a color

SetPolyFillMode
Sets the polygon-filling mode.

SetROP2
Sets the current drawing mode.

SetTextAlign
Sets the text alignment.

SetTextColor
Sets the text foreground color.

SetWindowExt
Sets the extents of the window.

SetWindowOrg
Sets the window origin of the device context

SetViewportExt
Sets the extents of the window's viewport.

SetViewportOrg
Sets the viewport origin of the device context

SetWorldTransform
sets a two-dimensional linear transformation between world space and page space for the specified device context.

StartDoc
Starts spooling a document to a printer DC

StartPage
Starts a new page on a printer DC

StretchBlt
Copies a bitmap from the source device context to this device context.

StrokeAndFillPath
Closes any open figures in a path, strokes the outline of the path by using the current pen, and fills its interior by using the current brush. The device context must contain a closed path.

StrokePath
Renders the specified path by using the current pen.

TextOut
Writes text to the DC.


PyCDC.AbortDoc

AbortDoc()

Aborts a print job


PyCDC.Arc

Arc(rect, pointStart, pointEnd)

Draws an eliptical arc.

Parameters

rect : (left, top, right, bottom)

Specifies the ellipse's bounding rectangle

pointStart : (x,y)

Specifies the x- and y-coordinates of the point that defines the arc's starting point (in logical units). This point does not have to lie exactly on the arc.

pointEnd : (x,y)

Specifies the x- and y-coordinates of the point that defines the arc's ending point (in logical units). This point does not have to lie exactly on the arc.

Comments

The arc drawn by using the function is a segment of the ellipse defined by the specified bounding rectangle. The actual starting point of the arc is the point at which a ray drawn from the center of the bounding rectangle through the specified starting point intersects the ellipse. The actual ending point of the arc is the point at which a ray drawn from the center of the bounding rectangle through the specified ending point intersects the ellipse. The arc is drawn in a counterclockwise direction. Since an arc is not a closed figure, it is not filled. Both the width and height of the rectangle must be greater than 2 units and less than 32,767 units.

MFC References

CDC::Arc

Return Value

Always none. If the function fails, an exception is raised.


PyCDC.BeginPath

BeginPath()

Opens a path bracket in the device context


PyCDC.BitBlt

BitBlt(destPos, size, dc, srcPos, rop)

Copies a bitmap from the source device context to this device context.

Parameters

destPos : (x,y)-ints

The logical x,y coordinates of the upper-left corner of the destination rectangle.

size : (width, height)-ints

Specifies the width and height (in logical units) of the destination rectangle and source bitmap.

dc : PyCDC

Specifies the PyCDC object from which the bitmap will be copied. It must be None if rop specifies a raster operation that does not include a source.

srcPos : (xSrc, ySrc)-ints

Specifies the logical x,y coordinates of the upper-left corner of the source bitmap.

rop : int

Specifies the raster operation to be performed. See the win32 api documentation for details.

MFC References

CDC::BitBlt


PyCDC.Chord

Chord(rect, pointStart, pointEnd)

Draws a chord.

Parameters

rect : (left, top, right, bottom)

Specifies the ellipse's bounding rectangle

pointStart : (x,y)

Specifies the x- and y-coordinates of the point that defines the arc's starting point (in logical units). This point does not have to lie exactly on the arc.

pointEnd : (x,y)

Specifies the x- and y-coordinates of the point that defines the arc's ending point (in logical units). This point does not have to lie exactly on the arc.

Comments

Draws a chord (a closed figure bounded by the intersection of an ellipse and a line segment). The rect parameter specify the upper-left and lower-right corners, respectively, of a rectangle bounding the ellipse that is part of the chord. The pointStart and pointEnd parameters specify the endpoints of a line that intersects the ellipse. The chord is drawn by using the selected pen and filled by using the selected brush.

MFC References

CDC::Chord

Return Value

Always none. If the function fails, an exception is raised.


PyCDC.CreateCompatibleDC

CreateCompatibleDC(dcFrom)

Creates a memory device context that is compatible with this DC.

Parameters

dcFrom=None : PyCDC

The source DC, or None to make a screen compatible DC.

Comments

Note that unlike the MFC version, this function calls the global CreateCompatibleDC function and returns a new PyCDC object.

MFC References

CDC::CreateCompatibleDC


PyCDC.CreatePrinterDC

CreatePrinterDC(printerName)

Creates a device context for a specific printer

Parameters

printerName=None : string

The printer name, or None for the default printer

MFC References

CDC::CreateDC


PyCDC.DPtoLP

(x,y) = DPtoLP(point)

Converts device units into logical units.

Parameters

point : (x,y)

The point to convert

Alternative Parameters

x

The x coordinate to convert.

y

The y coordinate to convert.

MFC References

CDC::DPtoLP

To Do

Should really handle list of (x,y) points

Return Value

The converted coordinates.


PyCDC.DeleteDC

DeleteDC()

Deletes all resources associated with a device context.

Comments

In general, do not call this function; the destructor will do it for you.
An application should not call DeleteDC if objects have been selected into the device context. Objects must first be selected out of the device context before it it is deleted.
An application must not delete a device context whose handle was obtained by calling CWnd::GetDC. Instead, it must call CWnd::ReleaseDC to free the device context.
The DeleteDC function is generally used to delete device contexts created with CreateDC, CreateIC, or CreateCompatibleDC.


PyCDC.Draw3dRect

Draw3dRect(rect, colorTopLeft, colorBotRight)

Draws a three-dimensional rectangle.

Parameters

rect : (left, top, right, bottom

Specifies the bounding rectangle, in logical units.

colorTopLeft : int

Specifies the color of the top and left sides of the three-dimensional rectangle.

colorBotRight : int

Specifies the color of the bottom and right sides of the three-dimensional rectangle.

MFC References

CDC::Draw3dRect


PyCDC.DrawFocusRect

DrawFocusRect(rect)

Draws a rectangle in the style used to indicate the rectangle has focus

Parameters

rect : (left, top, right, bottom)

The coordinates of the rectangle

MFC References

CDC::DrawFocusRect


PyCDC.DrawFrameControl

DrawFrameControl(rect, typ, state)

Draws a frame control of the specified type and style.

Parameters

rect : (left, top, right, bottom)

Specifies the bounding rectangle, in logical units.

typ : int

state : int

MFC References

CDC::DrawFrameControl


PyCDC.DrawIcon

DrawIcon(point, hIcon)

Draws an icon on the DC.

Parameters

point : (x,y)

The point coordinate to draw to.

hIcon : int

The handle of the icon to draw.

MFC References

CDC::DrawIcon


PyCDC.DrawText

s,rc,forat = DrawText(s, tuple , format )

Formats text in the given rectangle

Parameters

s : string

The desired output string

tuple : (int, int, int, int)

The bounding rectangle in the form: (left, top, right, bottom) expressed in logical units (depending on selected coordinate system - see PyCDC::SetMapMode)

format : int

Specifies one or more bit-or'd format values, such as DT_BOTTOM, DT_CENTERDT_RIGHT, DT_VCENTER. For a complete list, see the Microsoft Win32 API documentation.

Example

Example

import win32ui<nl>

 import win32con<nl>

 INCH = 1440   # twips - 1440 per inch allows fine res<nl>

 def drawtext_test():<nl>

     dc = win32ui.CreateDC()<nl>

     dc.CreatePrinterDC()                # ties to default printer<nl>

     dc.StartDoc('My Python Document')<nl>

     dc.StartPage()<nl>

 <nl>

     # note: upper left is 0,0 with x increasing to the right,<nl>

     #       and y decreasing (negative) moving down<nl>

     dc.SetMapMode(win32con.MM_TWIPS)<nl>

 <nl>

     # Centers "TEST" about an inch down on page<nl>

     dc.DrawText('TEST', (0,INCH*-1,INCH*8,INCH*-2), win32con.DT_CENTER )<nl>

     dc.EndPage()<nl>

     dc.EndDoc()<nl>

     del dc<nl>

Return Value

Height of text in pixels

The return value is the height of the text, in logical units. If DT_VCENTER or DT_BOTTOM is specified, the return value is the offset from rect.top to the bottom of the drawn text. If the function fails, the return value is zero (no Python exception is thrown)


PyCDC.Ellipse

Ellipse(rect)

Draws an Ellipse.

Parameters

rect : (left, top, right, bottom)

Specifies the ellipse's bounding rectangle

Comments

The center of the ellipse is the center of the bounding rectangle specified by rect. The ellipse is drawn with the current pen, and its interior is filled with the current brush.

MFC References

CDC::Ellipse

Return Value

Always none. If the function fails, an exception is raised.


PyCDC.EndDoc

EndDoc()

Finishes spooling the document and starts printing it


PyCDC.EndPage

EndPage()

Finishes a page on a printer DC


PyCDC.EndPath

EndPath()

Closes a path bracket and selects the path defined by the bracket into the specified device context


PyCDC.ExtTextOut

ExtTextOut(int, int, int, rect, string, tuple)

Writes text to the DC.

Parameters

int : x

The x coordinate to write the text to.

int : y

The y coordinate to write the text to.

int : nOptions

Specifies the rectangle type. This parameter can be one, both, or neither of ETO_CLIPPED and ETO_OPAQUE

rect : (left, top, right, bottom)

Specifies the text's bounding rectangle. (Can be None.)

string : text

The text to write.

tuple : (width1, width2, ...)

Optional array of values that indicate distance between origins of character cells.

MFC References

CDC::ExtTextOut

Return Value

Always none. If the function fails, an exception is raised.


PyCDC.FillPath

FillPath()

Closes any open figures in the current path and fills the path's interior by using the current brush and polygon-filling mode. After its interior is filled, the path is discarded from the device context.


PyCDC.FillRect

FillRect(rect, brush)

Fills a given rectangle with the specified brush

Parameters

rect : (left, top, right, bottom

Specifies the bounding rectangle, in logical units.

brush : PyCBrush

Specifies the brush to use.

MFC References

CDC::FillRect


PyCDC.FillSolidRect

FillSolidRect(rect, color)

Fills the given rectangle with the specified solid color.

Parameters

rect : (left, top, right, bottom

Specifies the bounding rectangle, in logical units.

color : int

Specifies the color to use.

MFC References

CDC::FillSolidRect


PyCDC.FrameRect

FrameRect(rect, brush)

Draws a border around the rectangle specified by rect

Parameters

rect : (left, top, right, bottom

Specifies the bounding rectangle, in logical units.

brush : PyCBrush

Specifies the brush to use.

MFC References

CDC::FrameRect


PyCDC.GetBrushOrg

(int,int) = GetBrushOrg()

Retrieves the origin (in device units) of the brush currently selected for the device context.

MFC References

CDC::GetBrushOrg


PyCDC.GetClipBox

(left, top, right, bottom) = GetClipBox()

Retrieves the dimensions of the smallest bounding rectangle around the current clipping boundary.

MFC References

CDC::GetClipBox

Return Value

A tuple of integers specifying the rectangle.


PyCDC.GetCurrentPosition

(x, y) = GetCurrentPosition()

Retrieves the current position (in logical coordinates).


PyCDC.GetDeviceCaps

int = GetDeviceCaps(index)

Retrieves a capability of the device context.

Parameters

index : int

The information requested. See the win32api documentation for details.

MFC References

CDC::GetDeviceCaps

Return Value

The value of the requested capability


PyCDC.GetHandleAttrib

int = GetHandleAttrib()

Retrieves the handle of the attribute device context.


PyCDC.GetHandleOutput

int = GetHandleOutput()

Retrieves the handle of the output device context.


PyCDC.GetMapMode

int = GetMapMode()

Gets the mapping mode for the device context.

MFC References

CDC::GetMapMode


PyCDC.GetNearestColor

int = GetNearestColor(color)

Returns the closest color a device can map.

Parameters

color : int

Specifies the color to be matched.


PyCDC.GetPixel

GetPixel(x, y)

Gets a pixel at a local in a device context

Parameters

x : int

Horizontal coordinate.

y : int

Vertical coordinate.


PyCDC.GetSafeHdc

int = GetSafeHdc()

Returns the HDC of this DC object.

MFC References

CDC::GetSafeHdc


PyCDC.GetTextExtent

(x,y) = GetTextExtent(text)

Calculates the width and height of a line of text using the current font to determine the dimensions.

Parameters

text : string

The text to calculate for.

MFC References

CFC::GetTextExtent

Return Value

A tuple of integers with the size of the string, in logical units.


PyCDC.GetTextExtentPoint

(x,y) = GetTextExtentPoint(text)

An alias for PyCDC::GetTextExtent. GetTextExtentPoint is the preferred win32api name, but GetTextExtent is the MFC name.
Calculates the width and height of a line of text using the current font to determine the dimensions.

Parameters

text : string

The text to calculate for.

Return Value

A tuple of integers with the size of the string, in logical units.


PyCDC.GetTextFace

string = GetTextFace()

Returns typeface name of the current font.

MFC References

CDC::GetTextFace


PyCDC.GetTextMetrics

dict = GetTextMetrics()

Retrieves the metrics for the current font in this device context.

MFC References

CDC::GetTextMetrics

Return Value

A dictionary of integers, keyed by the following strings:
tmHeight
tmAscent
tmDescent
tmInternalLeading
tmExternalLeading
tmAveCharWidth
tmMaxCharWidth
tmWeight
tmItalic
tmUnderlined
tmStruckOut
tmFirstChar
tmLastChar
tmDefaultChar
tmBreakChar
tmPitchAndFamily
tmCharSet
tmOverhang
tmDigitizedAspectX
tmDigitizedAspectY


PyCDC.GetViewportExt

x, y = GetViewportExt()

Gets the viewport extent of the device context


PyCDC.GetViewportOrg

x, y = GetViewportOrg()

Gets the viewport origin of the device context


PyCDC.GetWindowExt

x, y = GetWindowExt()

Gets the window extent of the device context


PyCDC.GetWindowOrg

x, y = GetWindowOrg()

Retrieves the x- and y-coordinates of the origin of the window associated with the device context.


PyCDC.IntersectClipRect

IntersectClipRect(rect)

Creates a new clipping region by forming the intersection of the current region and the rectangle specified

Parameters

rect : (left, top, right, bottom)

Specifies the bounding rectangle, in logical units.

MFC References

CDC::IntersectClipRect

Return Value

region type as integer


PyCDC.IsPrinting

int = IsPrinting()

Returns 1 if the DC is currently printing, else 0


PyCDC.LPtoDP

(x,y) = LPtoDP(point)

Converts logical units into device units.

Parameters

point : (x,y)

The point coordinate to convert.

Alternative Parameters

x

The x coordinate to convert.

y

The y coordinate to convert.

MFC References

CDC::LPtoDP

Return Value

The converted coordinates.


PyCDC.LineTo

LineTo(point)

Draws a line to a specified point, using the currently selected pen.

Parameters

point : (x,y)

The point coordinate to draw to.

Alternative Parameters

x

The x coordinate to draw to.

y

The y coordinate to draw to.

MFC References

CDC::LineTo


PyCDC.MoveTo

(x,y) = MoveTo(point)

Moves the current position to a specified point.

Parameters

point : (x,y)

The point coordinate to move to.

Alternative Parameters

x

The x coordinate to move to.

y

The y coordinate to move to.

MFC References

CDC::MoveTo

Return Value

The previous position.


PyCDC.OffsetViewportOrg

x, y = OffsetViewportOrg(x,y)

Modifies the coordinates of the viewport origin relative to the coordinates of the current viewport origin

Parameters

x,y : int, int

The new origin offset.

Return Value

The previous viewport origin as a tuple (x,y)


PyCDC.OffsetWindowOrg

x, y = OffsetWindowOrg(x,y)

Modifies the coordinates of the window origin relative to the coordinates of the current window origin.

Parameters

x,y : int, int

The new origin offset.

Return Value

The previous origin as a tuple (x,y)


PyCDC.PatBlt

PatBlt(destPos, size, rop)

Creates a bit pattern on the device.

Parameters

destPos : (x,y)-ints

The logical x,y coordinates of the upper-left corner of the destination rectangle.

size : (width, height)-ints

Specifies the width and height (in logical units) of the destination rectangle and source bitmap.

rop : int

Specifies the raster operation to be performed. See the win32 api documentation for details.

MFC References

CDC::BitBlt


PyCDC.Pie

Pie(x1, y1, x2, y2, x3, y3, x4, y4)

Draws a pie slice in a device context

Parameters

x1 : int

X coordinate of upper left corner

y1 : int

Y coordinate of upper left corner

x2 : int

X coordinate of lower right corner

y2 : int

Y coordinate of lower right corner

x3 : int

X coordinate of starting point of arc

y3 : int

Y coordinate of starting point of arc

x4 : int

X coordinate of ending point of arc

y4 : int

Y coordinate of ending point of arc


PyCDC.PolyBezier

PolyBezier()

Draws one or more Bezier splines.


PyCDC.Polygon

Polygon()

Draws an Polygon.


PyCDC.Polyline

Polyline(points)

Draws a Polyline.

Parameters

points : [(x, y), ...]

A sequence of points


PyCDC.RealizePalette

int = RealizePalette()

Maps palette entries in the current logical palette to the system palette.

Return Value

Indicates how many entries in the logical palette were mapped to different entries in the system palette. This represents the number of entries that this function remapped to accommodate changes in the system palette since the logical palette was last realized.


PyCDC.RectVisible

int = RectVisible(rect)

Determines whether any part of the given rectangle lies within the clipping region of the display context.

Parameters

rect : (left, top, right, bottom)

The coordinates of the reactangle to be checked.

MFC References

CDC::RectVisible

Return Value

Non zero if any part of the rectangle lies within the clipping region, else zero.


PyCDC.Rectangle

rc = Rectangle()

Draws a rectangle using the current pen. The interior of the rectangle is filled using the current brush.


PyCDC.RestoreDC

RestoreDC(saved)

Restores the state of the device context.

Parameters

saved : int

The id of a previously saved device context. See PyCDC::SaveDC

MFC References

CDC::RestoreDC


PyCDC.SaveDC

int = SaveDC()

Saves the current state of the device context. Windows manages a stack of state information. The saved device context can later be restored by using CDC::RestoreDC

MFC References

CDC::SaveDC

Return Value

An integer identifying the context, which can be used by PyCDC::RestoreDC. An exception is raised if this function fails.


PyCDC.ScaleViewportExt

x, y = ScaleViewportExt()

Modifies the viewport extents relative to the current values.


PyCDC.ScaleWindowExt

x, y = ScaleWindowExt()

Modifies the window extents relative to the current values.


PyCDC.SelectClipRgn

obRgn = SelectClipRgn()

Selects the given region as the current clipping region for the device context

Return Value

The return value specifies the region's complexity (integer)


PyCDC.SelectObject

object = SelectObject(ob)

Selects an object into the device context.
Currently, only PyCFont, PyCBitMap , PyCBrush and PyCPen objects are supported.

Parameters

ob : object

The object to select.

MFC References

CDC::SelectObject

Return Value

The previously selected object. This will be the same type as the object parameter.


PyCDC.SetBkColor

int = SetBkColor(color)

Sets the current background color to the specified color.

Parameters

color : int

A windows color specification. See the win32api documentation for details.

Comments

If the background mode is OPAQUE, the system uses the background color to fill the gaps in styled lines, the gaps between hatched lines in brushes, and the background in character cells. The system also uses the background color when converting bitmaps between color and monochrome device contexts.

MFC References

CDC::SetBkColor

Return Value

The return value is the previous background color.


PyCDC.SetBkMode

int = SetBkMode(mode)

Sets the current background mode to the specified mode.

Parameters

mode : int

A background mode. May be either TRANSPARENT or OPAQUE.

Comments

Specifies the mode to be set. This parameter can be either OPAQUE or TRANSPARENT

MFC References

CDC::SetBkMode

Return Value

The return value is the previous background mode.


PyCDC.SetBrushOrg

(int, int) = SetBrushOrg(point)

Specifies the origin that GDI will assign to the next brush that the application selects into the device context.

Parameters

point : (x,y)

The new origin in device units.

MFC References

CDC::SetBrushOrg

Return Value

The previous origin in device units.


PyCDC.SetGraphicsMode

int = SetGraphicsMode(mode)

Sets the graphics mode for the specified device context

Parameters

mode : int

The new mode.


PyCDC.SetMapMode

int = SetMapMode(newMode)

Sets the mapping mode for the device context.

Parameters

newMode : int

The new mode. Can be one of MM_ANISOTROPIC, MM_HIENGLISH, MM_HIMETRIC, MM_ISOTROPIC, MM_LOENGLISH, MM_LOMETRIC, MM_TEXT, MM_TWIPS

MFC References

CDC::SetMapMode

Return Value

The previous mapping mode.


PyCDC.SetPixel

SetPixel(x, y, color)

Sets a pixel in a device context

Parameters

x : int

Horizontal coordinate.

y : int

Vertical coordinate.

color : int

The brush color.


PyCDC.SetPolyFillMode

(int) = SetPolyFillMode(point)

Sets the polygon-filling mode.

Parameters

point : (x,y)

The new origin in device units.

MFC References

CDC::SetPolyFillMode

Return Value

The previous PolyFillMode as integer

The previous PolyFillMode.


PyCDC.SetROP2

dict = SetROP2(mode)

Sets the current drawing mode.

Parameters

mode : int

The new drawing mode.

MFC References

CDC::SetROP2


PyCDC.SetTextAlign

int = SetTextAlign(newFlags)

Sets the text-alignment flags.

Parameters

newFlags : int

The new alignment flags. Can be a combination of (TA_CENTER, TA_LEFT, TA_RIGHT), (TA_BASELINE, TA_BOTTOM, TA_TOP) and (TA_NOUPDATECP, TA_UPDATECP)
The default is TA_LEFT|TA_TOP|TA_NOUPDATECP

MFC References

CDC::SetTextAlign

Return Value

The old alignment flags.


PyCDC.SetTextColor

int = SetTextColor(color)

Sets the text color to the specified color.

Parameters

color : int

A windows color specification. See the win32api documentation for details.

Comments

This text color is used when writing text to this device context and also when converting bitmaps between color and monochrome device contexts. If the device cannot represent the specified color, the system sets the text color to the nearest physical color. The background color for a character is specified by the SetBkColor and SetBkMode member functions.

MFC References

CDC::SetTextColor

Return Value

The return value is the previous text color.


PyCDC.SetViewportExt

(x,y) = SetViewportExt(size)

Sets the x,y extents of the viewport of the device context.

Parameters

size : (x,y)

The new size.

MFC References

CDC::SetViewportExt

Return Value

The previous extents of the viewport (in logical units).


PyCDC.SetViewportOrg

x, y = SetViewportOrg(x,y)

Sets the viewport origin of the device context

Parameters

x,y : int, int

The new origin.


PyCDC.SetWindowExt

(x,y) = SetWindowExt(size)

Sets the x,y extents of the window associated with the device context.

Parameters

size : (x,y)

The new size.

MFC References

CDC::SetWindowExt

Return Value

The previous extents of the window (in logical units).


PyCDC.SetWindowOrg

x, y = SetWindowOrg(x,y)

Sets the window origin of the device context

Parameters

x,y : int, int

The new origin.


PyCDC.SetWorldTransform

int = SetWorldTransform()

sets a two-dimensional linear transformation between world space and page space for the specified device context. This transformation can be used to scale, rotate, shear, or translate graphics output.


PyCDC.StartDoc

StartDoc(docName, outputFile)

Starts spooling a document to a printer DC

Parameters

docName : string

The document name

outputFile : string

The output file name. Use this to spool to a file. Omit to send to the printer.


PyCDC.StartPage

StartPage()

Starts a new page on a printer DC


PyCDC.StretchBlt

StretchBlt(destPos, size, dc, srcPos, size, rop)

Copies a bitmap from the source device context to this device context.

Parameters

destPos : (x,y)-ints

The logical x,y coordinates of the upper-left corner of the destination rectangle.

size : (width, height)-ints

Specifies the width and height (in logical units) of the destination rectangle and source bitmap.

dc : PyCDC

Specifies the PyCDC object from which the bitmap will be copied. It must be None if rop specifies a raster operation that does not include a source.

srcPos : (xSrc, ySrc)-ints

Specifies the logical x,y coordinates of the upper-left corner of the source bitmap.

size : (widthsrc, heightsrc)-ints

Specifies the width and height (in logical units) of the destination rectangle and source bitmap.

rop : int

Specifies the raster operation to be performed. See the win32 api documentation for details.

MFC References

CDC::StretchBlt


PyCDC.StrokeAndFillPath

StrokeAndFillPath()

Closes any open figures in a path, strokes the outline of the path by using the current pen, and fills its interior by using the current brush. The device context must contain a closed path.


PyCDC.StrokePath

StrokePath()

Renders the specified path by using the current pen.


PyCDC.TextOut

TextOut(int, int, string)

Outputs text to the display context, using the currently selected font.

Parameters

int : x

The x coordinate to write the text to.

int : y

The y coordinate to write the text to.

string : text

The text to write.

MFC References

CDC::TextOut

Return Value

Always none. If the function fails, an exception is raised.


PyCDialog

PyCDialog Object

A class which encapsulates an MFC CDialog object. Derived from a PyCWnd object.

Methods

CreateWindow
Creates a modless window for the dialog.

DoModal
Creates a modal window for the dialog.

EndDialog
Closes a modal dialog.

GotoDlgCtrl
Sets focus to a specific control.

MapDialogRect
Converts the dialog-box units of a rectangle to screen units.

OnCancel
Calls the default MFC OnCancel handler.

OnOK
Calls the default MFC OnOK handler.

OnInitDialog
Calls the default MFC OnInitDialog handler. sentinel


PyCDialog.CreateWindow

CreateWindow(obParent)

Create a modeless window for the dialog box.

Parameters

obParent=None : PyCWnd

The parent window for the new window

MFC References

CDialog::CreateIndirect


PyCDialog.DoModal

int = DoModal()

Create a modal window for the dialog box.

MFC References

CDialog::DoModal

Return Value

The return value from the dialog. This is the value passed to PyCDialog::EndDialog.


PyCDialog.EndDialog

EndDialog(result)

Ends a modal dialog box.

Parameters

result : int

The value to be returned by the PyCDialog::DoModal method.

MFC References

CDialog::EndDialog


PyCDialog.GotoDlgCtrl

GotoDlgCtrl(control)

Moves the focus to the specified control in the dialog box.

Parameters

control : PyCWnd

The control to get the focus.


PyCDialog.MapDialogRect

(left, top, right, bottom) = MapDialogRect(rect)

Converts the dialog-box units of a rectangle to screen units.

Parameters

rect : (left, top, right, bottom)

The rect to be converted


PyCDialog.OnCancel

OnCancel()

Calls the default MFC OnCancel handler.

See Also

PyCDialog.OnCancel virtual method


PyCDialog.OnInitDialog

int = OnInitDialog()

Calls the default MFC OnInitDialog handler.

See Also

PyCDialog.OnInitDialog virtual method


PyCDialog.OnOK

OnOK()

Calls the default MFC OnOK handler.

See Also

PyCDialog.OnOK virtual method


PyCDialogBar

PyCDialogBar Object

A class which encapsulates an MFC CDialogBar . Derived from a PyCControlBar object.

Methods

CreateWindow
Creates the window for the PyCDialogBar object.


PyCDialogBar.CreateWindow

CreateWindow(parent, template, style, id)

Creates the window for the PyCDialogBar object.

Parameters

parent : PyCWnd

The parent window

template : string

The template to load the resource from

style : int

The style for the window

id : int

The ID of the window

Alternative Parameters

parent

The parent window

resourceId

The resource ID to load the resource from

style

The style for the window

id

The ID of the window


PyCDocTemplate

PyCDocTemplate Object

A document template class. Encapsulates an MFC CDocTemplate class

Methods

DoCreateDoc
Creates an underlying document object.

FindOpenDocument
Returns an existing document with the specified file name.

GetDocString
Retrieves a specific substring describing the document type.

GetDocumentList
Return a list of all open documents.

GetResourceID
Returns the resource ID in use.

GetSharedMenu
Returns the shared menu object for all frames using this template.

InitialUpdateFrame
Calls the default OnInitialFrame handler.

SetContainerInfo
Sets the resources to be used when an OLE 2 object is in-place activated.

SetDocStrings
Assigns the document strings for the template.

OpenDocumentFile
Opens a document file, creating a view and frame.


PyCDocTemplate.CreateNewDocument

PyCDocTemplate.CreateNewDocument Virtual

CreateNewDocument()

Called to create a new document object.


PyCDocTemplate.CreateNewFrame

PyCDocTemplate.CreateNewFrame Virtual

CreateNewFrame()

Called to create a new frame window.


PyCDocTemplate.DoCreateDoc

PyCDocument = DoCreateDoc(fileName)

Creates an underlying document object.

Parameters

fileName=None : string

The name of the file to load.


PyCDocTemplate.FindOpenDocument

PyCDocument = FindOpenDocument(fileName)

Returns an existing document with the specified file name.

Parameters

fileName : string

The fully qualified filename to search for.


PyCDocTemplate.GetDocString

string = GetDocString(docIndex)

Retrieves a specific substring describing the document type.

Parameters

docIndex : int

The document index. Must be one of the win32ui.CDocTemplate_* constants.

Comments

For more information on the doc strings, please see PyCDocTemplate::SetDocStrings


PyCDocTemplate.GetDocumentList

list = GetDocumentList()

Return a list of all open documents.


PyCDocTemplate.GetResourceID

GetResourceID()

Returns the resource ID in use.


PyCDocTemplate.GetSharedMenu

PyCMenu = GetSharedMenu()

Returns the shared menu object for all frames using this template.

MFC References

CWnd::m_hMenuShared


PyCDocTemplate.InitialUpdateFrame

InitialUpdateFrame(frame, doc, bMakeVisible)

Calls the default OnInitialFrame handler.

Parameters

frame=None : PyCFrameWnd

The frame window.

doc=None : PyCDocument

A document for the frame.

bMakeVisible=1 : int

Indicates of the frame should be shown.

See Also

PyCDocTemplate.InitialUpdateFrame virtual method


PyCDocTemplate.OpenDocumentFile

OpenDocumentFile(filename, bMakeVisible)

Opens a document file, creating a view and frame.

Parameters

filename : string

Name of file to open, or None

bMakeVisible=1 : int

Indicates if the document should be created visible.


PyCDocTemplate.SetContainerInfo

SetContainerInfo(id)

Sets the resources to be used when an OLE 2 object is in-place activated.

Parameters

id : int

The resource ID.


PyCDocTemplate.SetDocStrings

SetDocStrings(docStrings)

Assigns the document strings for the template.

Parameters

docStrings : string

The document strings.

Comments

The string must be a \\n seperated list of docstrings. The elements are:

elementName | Description
windowTitle | Title used for the window (only for SDI applications)
docName | Root for the default document name.
fileNewName | Name of the document type, as displayed in the "File/New" dialog
filterName | Description of the document type and a wildcard spec for the file open dialog.
filterExt | Extension for documents of this file type.
regFileTypeId | Internal Id of the document as registered in the registry. Used to associate the extension with the file type.
regFileTypeName | Name of the document, as stored in the reigstry. This is the name presented to the user.


PyCDockContext

PyCDockContext Object

A class which encapsulates an MFC CDockContext object

Methods

EndDrag

StartDrag

EndResize

StartResize

ToggleDocking

Properties

x,y ptLast

left, top, right, bottom rectLast

cx, cy sizeLast

int bDitherLast

left, top, right, bottom rectDragHorz

left, top, right, bottom rectDragVert

left, top, right, bottom rectFrameDragHorz

left, top, right, bottom rectFrameDragVert

int dwDockStyle
allowable dock styles for bar

int dwOverDockStyle
style of dock that rect is over

int dwStyle
style of control bar

int bFlip
if shift key is down

int bForceFrame
if ctrl key is down CDC* m_pDC; // where to draw during drag

int bDragging

int nHitTest

int uMRUDockID

left, top, right, bottom rectMRUDockPos

int dwMRUFloatStyle

x,y ptMRUFloatPos
Sentinel


PyCDockContext.EndDrag

int = EndDrag()


PyCDockContext.EndResize

int = EndResize()


PyCDockContext.StartDrag

int = StartDrag(pt)

Parameters

pt : int, int


PyCDockContext.StartResize

int = StartResize(hittest, pt )

Parameters

hittest : int

pt : int, int


PyCDockContext.ToggleDocking

int = ToggleDocking()


PyCDocument

PyCDocument Object

A document class. Encapsulates an MFC CDocument class

Methods

DeleteContents
Call the MFC DeleteContents method.

DoSave
Save the file. If necessary, prompt for file name.

DoFileSave
Check file attributes, and save the file.

GetDocTemplate
Returns the PyCDocTemplate for the document.

GetAllViews
Returns a list of all views for the current document.

GetFirstView
Returns the first view object attached to this document.

GetPathName
Returns the full path name of the current document.

GetTitle
Returns the title of the current document.

IsModified
Return a flag indicating if the document has been modified.

OnChangedViewList
Informs the document when a view is added or removed.

OnCloseDocument
Call the MFC OnCloseDocument handler.

OnNewDocument
Call the MFC OnNewDocument handler.

OnOpenDocument
Call the MFC OnOpenDocument handler.

OnSaveDocument
Call the MFC OnSaveDocument handler.

SetModifiedFlag
Set the "dirty" flag for the document.

SaveModified
Call the underlying MFC method.

SetPathName
Set the full path name for the document.

SetTitle
Set the title of the document.

UpdateAllViews
Informs each view when a document changes. sentinel


PyCDocument.DeleteContents

DeleteContents()

Call the MFC DeleteContents method. This routine is provided so a document object which overrides this method can call the original MFC version if required.

See Also

PyCDocument.DeleteContents virtual method

MFC References

CDocument::DeleteContents


PyCDocument.DoFileSave

DoFileSave()

Checks the file attributes. If the file is read only, a new name is prompted, else the file is saved (by calling DoSave)

See Also

PyCDocument.DoFileSave virtual method

Undocumented MFC References

CDocument::DoFileSave


PyCDocument.DoSave

DoSave(fileName, bReplace)

Calls the underlying MFC DoSave method.

Parameters

fileName : string

The name of the file to save to.

bReplace=1 : int

Should an existing file be silently replaced?.

Comments

If invalid or no filename, will prompt for a name, else will perform the actual saving of the document.

See Also

PyCDocument.DoSave virtual method

Undocumented MFC References

CDocument::DoSave


PyCDocument.GetAllViews

[PyCView,...] = GetAllViews()

Returns a list of all views for the current document.

MFC References

CDocument::GetFirstViewPosition

CDocument::GetNextView


PyCDocument.GetDocTemplate

PyCDocTemplate = GetDocTemplate()

Returns the template for the document.

MFC References

CDocument::GetDocTemplate


PyCDocument.GetFirstView

PyCView = GetFirstView()

Returns the first view object attached to this document.

Comments

For more info, see PyCDocument::GetAllViews shouldnt be possible.

MFC References

CDocument::GetFirstViewPosition

CDocument::GetNextView


PyCDocument.GetPathName

string = GetPathName()

Returns the full path name of the current document. The string will be empty if no path name has been set.

MFC References

CDocument::GetPathName


PyCDocument.GetTitle

string = GetTitle()

Returns the title of the current document. This will often be the file name portion of the path name.

MFC References

CDocument::GetTitle


PyCDocument.IsModified

int = IsModified()

Return a flag indicating if the document has been modified.

MFC References

CDocument::IsModified


PyCDocument.OnChangedViewList

OnChangedViewList()

Informs the document when a view is added or removed.


PyCDocument.OnCloseDocument

OnCloseDocument()

Call the MFC OnCloseDocument handler. This routine is provided so a document object which overrides this method can call the original MFC version if required.

See Also

PyCDocument.OnCloseDocument virtual method

MFC References

CDocument::OnCloseDocument


PyCDocument.OnNewDocument

OnNewDocument()

Call the MFC OnNewDocument handler. This routine is provided so a document object which overrides this method can call the original MFC version if required.

See Also

PyCDocument.OnNewDocument virtual method

MFC References

CDocument::OnNewDocument


PyCDocument.OnOpenDocument

OnOpenDocument(pathName)

Call the MFC OnOpenDocument handler. This routine is provided so a document object which overrides this method can call the original MFC version if required.

Parameters

pathName : string

The full path of the file to open.

MFC References

CDocument::OnOpenDocument


PyCDocument.OnSaveDocument

OnSaveDocument(pathName)

Call the MFC OnSaveDocument handler. This routine is provided so a document object which overrides this method can call the original MFC version if required.

Parameters

pathName : string

The full path of the file to save.

MFC References

CDocument::OnSaveDocument


PyCDocument.SaveModified

int = SaveModified()

Call the underlying MFC method.

See Also

PyCDocument.SaveModified virtual method

MFC References

CDocument::SaveModified

Return Value

Nonzero if it is safe to continue and close the document; 0 if the document should not be closed.


PyCDocument.SetModifiedFlag

SetModifiedFlag(bModified)

Set the "dirty" flag for the document.

Parameters

bModified=1 : int

Set dirty flag

MFC References

CDocument::SetModifiedFlag


PyCDocument.SetPathName

SetPathName(path)

Set the full path name for the document.

Parameters

path : string

The full path of the file.

MFC References

CDocument::SetPathName


PyCDocument.SetTitle

SetTitle(title)

Set the title of the document (ie, the name to appear in the window caption for the document.

Parameters

title : string

The new title.

MFC References

CDocument::SetTitle


PyCDocument.UpdateAllViews

UpdateAllViews(sender, hint)

Informs each view when a document changes.

Parameters

sender : PyCView

The view who initiated the update

hint=None : object

A hint for the update.

MFC References

CDocument::UpdateAllViews


PyCEdit

PyCEdit Object

A windows edit control. Encapsulates an MFC CEdit class. Derived from a PyCControl object.

Methods

CreateWindow
Creates the window for a new edit object.

Clear
Clears all text from an edit control.

Copy
Copy the selection to the clipboard.

Cut
Cut the selection, and place it in the clipboard.

FmtLines
Change the formatting options for the edit control

GetFirstVisibleLine
Returns zero-based index of the topmost visible line.

GetSel
Returns the selection.

GetLine
Returns a specified line.

GetLineCount
Returns the number of lines in an edit control.

LimitText
Sets max length of text that user can enter

LineFromChar
Returns the line number of a given character.

LineIndex
Returns the line index

LineScroll
Scroll the control vertically and horizontally

Paste
Pastes the contents of the clipboard into the edit control.

ReplaceSel
Replace the selection with the specified text.

SetReadOnly
Set the read only status of an edit control.

SetSel
Changes the selection in an edit control. sentinel


PyCEdit.Clear

int = Clear()

Clears all text in an edit control.

MFC References

CEdit::Clear


PyCEdit.Copy

Copy()

Copys the current selection to the clipboard.

MFC References

CEdit::Copy


PyCEdit.CreateWindow

CreateWindow(style, rect, parent, id)

Creates the window for a new Edit object.

Parameters

style : int

The style for the Edit. Use any of the win32con.BS_* constants.

rect : (left, top, right, bottom)

The size and position of the Edit.

parent : PyCWnd

The parent window of the Edit. Usually a PyCDialog.

id : int

The Edits control ID.


PyCEdit.Cut

Cut()

Cuts the current selection to the clipboard.

MFC References

CEdit::Cut


PyCEdit.FmtLines

int = FmtLines(bAddEOL)

Sets the formatting options for the control.

Parameters

bAddEOL : int

Specifies whether soft line-break characters are to be inserted. A value of TRUE inserts the characters; a value of FALSE removes them.

MFC References

CEdit::FmtLines

Return Value

Nonzero if any formatting occurs; otherwise 0.


PyCEdit.GetFirstVisibleLine

int = GetFirstVisibleLine()

Returns zero-based index of the topmost visible line.

MFC References

CEdit::GetFirstVisibleLine

Return Value

The zero-based index of the topmost visible line. For single-line edit controls, the return value is 0.


PyCEdit.GetLine

int = GetLine(lineNo)

Returns the text in a specified line.

Parameters

lineNo=current : int

Contains the zero-based index value for the desired line.

Comments

This function is not an MFC wrapper.


PyCEdit.GetLineCount

int = GetLineCount()

Gets the number of lines in an edit control.

MFC References

CEdit::GetLineCount

Return Value

The number of lines in the buffer. If the control is empty, the return value is 1.


PyCEdit.GetSel

(start, end) = GetSel()

Returns the start and end of the current selection.

MFC References

CEdit::GetSel

Return Value

The return tuple is (the first character in the current selection, first nonselected character past the end of the current selection)


PyCEdit.LimitText

LimitText(nChars)

Sets max length of text that user can enter

Parameters

nChars=0 : int

Specifies the length (in bytes) of the text that the user can enter. If this parameter is 0, the text length is set to UINT_MAX bytes. This is the default behavior.

MFC References

CEdit::LimitText


PyCEdit.LineFromChar

int = LineFromChar(charNo)

Returns the line number of the specified character.

Parameters

charNo=-1 : int

Contains the zero-based index value for the desired character in the text of the edit control, or -1. If -1, then it specifies the current line.

MFC References

CEdit::LineFromChar

Return Value

The zero-based line number of the line containing the character index specified by charNo. If charNo is -1, the number of the line that contains the first character of the selection is returned. If there is no selection, the current line number is returned.


PyCEdit.LineIndex

int = LineIndex(lineNo)

Retrieves the character index of a line within a multiple-line edit control.

Parameters

lineNo=-1 : int

Contains the index value for the desired line in the text of the edit control, or contains -1. If -1, then it specifies the current line.

Comments

This method only works on multi-linr edit controls.

MFC References

CEdit::LineIndex

Return Value

The character index of the line specified in lineNo, or -1 if the specified line number is greater then the number of lines in the edit control.


PyCEdit.LineScroll

int = LineScroll(nLines, nChars )

Scroll the control vertically and horizontally

Parameters

nLines : int

Specifies the number of lines to scroll vertically.

nChars=0 : int

Specifies the number of character positions to scroll horizontally. This value is ignored if the edit control has either the ES_RIGHT or ES_CENTER style.

Comments

This method only works on multi-linr edit controls.

MFC References

CEdit::LineScroll


PyCEdit.Paste

Paste()

Pastes the contents of the clipboard into the control.

MFC References

CEdit::Paste


PyCEdit.ReplaceSel

ReplaceSel(text)

Replaces the selection with the specified text.

Parameters

text : string

The text to replace the selection with.

MFC References

CEdit::ReplaceSel


PyCEdit.SetReadOnly

SetReadOnly(bReadOnly)

Sets or clears the read-only status of the listbox.

Parameters

bReadOnly=1 : int

The read-only state to set.

MFC References

CEdit::SetReadOnly


PyCEdit.SetSel

SetSel(start, end, bNoScroll)

Sets the selection in the edit control.

Parameters

start : int

Specifies the starting position. If start is 0 and end is -1, all the text in the edit control is selected. If start is -1, any current selection is removed.

end=start : int

Specifies the ending position.

bNoScroll=0 : int

Indicates whether the caret should be scrolled into view. If 0, the caret is scrolled into view. If 1, the caret is not scrolled into view.

Alternative Parameters

start,end)

As for normal start, end args.

bNoScroll

Indicates whether the caret should be scrolled into view. If 0, the caret is scrolled into view. If 1, the caret is not scrolled into view.

MFC References

CEdit::SetSel


PyCEditView

PyCEditView Object

A class which implementes a CView of a text file. Derived from PyCView and PyCEdit objects.

Methods

IsModified
Indicates if the view's document is modified.

LoadFile
Loads a named file into the view.

SetModifiedFlag
Sets the view's document modified flag.

GetEditCtrl
Returns the underlying PyCEdit object

PreCreateWindow
Calls the underlying MFC PreCreateWindow method.

SaveFile
Saves the view to a named file.

OnCommand
Calls the standard Python framework OnCommand handler


PyCEditView.GetEditCtrl

PyCEditCtrl = GetEditCtrl()

returns the underlying edit control object.


PyCEditView.IsModified

int = IsModified()

Indicates if the view's document has the modified flag set.


PyCEditView.LoadFile

LoadFile(fileName)

Loads a file into the view.

Parameters

fileName : string

The name of the file to be loaded.


PyCEditView.OnCommand

OnCommand(wparam, lparam)

Calls the standard Python framework OnCommand handler

Parameters

wparam : int

lparam : int

See Also

PyCWnd.OnCommand virtual method


PyCEditView.PreCreateWindow

tuple = PreCreateWindow(createStruct)

Calls the underlying MFC PreCreateWindow method.

Parameters

createStruct : tuple

A tuple representing a CREATESTRUCT structure.


PyCEditView.SaveFile

SaveFile(fileName)

Saves the view to a file.

Parameters

fileName : string

The name of the file to be written.


PyCEditView.SetModifiedFlag

SetModifiedFlag(bModified)

Sets the modified flag for the view's document.

Parameters

bModified=1 : int

The modified state to set.


PyCFileDialog

PyCFileDialog Object

A class which encapsulates an MFC CFileDialog object. Derived from a PyCDialog object.

Methods

GetPathName
Retrieves the path name.

GetFileName
Retrieves the file name.

GetFileExt
Retrieves the file extension.

GetFileTitle
Retrieves the file title.

GetPathNames
Retrieves the list of path names from the file dialog.

GetReadOnlyPref
Retrieves the read-only preference.

SetOFNTitle
Sets the title for the dialog.

SetOFNInitialDir
Sets the initial directory for the dialog.


PyCFileDialog.GetFileExt

string = GetFileExt()

Retrives the file extension from the file dialog.

MFC References

CFileDialog::GetFileExt


PyCFileDialog.GetFileName

string = GetFileName()

Retrives the file name from the file dialog.

MFC References

CFileDialog::GetFileName


PyCFileDialog.GetFileTitle

string = GetFileTitle()

Retrives the file title from the file dialog.

MFC References

CFileDialog::GetFileTitle


PyCFileDialog.GetPathName

string = GetPathName()

Retrives the path name from the file dialog.

MFC References

CFileDialog::GetPathName


PyCFileDialog.GetPathNames

string = GetPathNames()

Retrieves the list of path names from the file dialog.

Comments

This method is useful when a multi-select dialog is used.

MFC References

CFileDialog::GetPathNames


PyCFileDialog.GetReadOnlyPref

int = GetReadOnlyPref()

Retrives the value of the "Read Only" checkbox on the file dialog.

MFC References

CFileDialog::GetReadOnlyPref


PyCFileDialog.SetOFNInitialDir

SetOFNInitialDir(title)

Sets the initial directory for the dialog.

Parameters

title : string

The initial directory for the dialog box. May be None.


PyCFileDialog.SetOFNTitle

SetOFNTitle(title)

Sets the Title for the dialog.

Parameters

title : string

The title for the dialog box. May be None.


PyCFont

PyCFont Object

A windows font object. Encapsulates an MFC CFont class. Derived from a PyCGDIObject.


PyCFontDialog

PyCFontDialog Object

A class which encapsulates an MFC CFontDialog object. Derived from a PyCDialog object.

Methods

DoModal
Displays a dialog and allows the user to make a selection.

GetCurrentFont
Returns a dictionary describing the current font.

GetCharFormat
Returns the font selection in a CHARFORMAT tuple.

GetColor
Determines the color of the selected font.

GetFaceName
Returns the face name of the selected font.

GetStyleName
Returns the style name of the selected font.

GetSize
Returns he font's size, in tenths of a point.

GetWeight
Returns the font's weight.

IsStrikeOut
Determines whether the font is displayed with strikeout.

IsUnderline
Determines whether the font is displayed with underline.

IsBold
Determines whether the font is displayed bold.

IsItalic
Determines whether the font is displayed with italic.


PyCFontDialog.DoModal

int = DoModal()

Displays a dialog and allows the user to make a selection.

MFC References

CFontDialog::DoModal


PyCFontDialog.GetCharFormat

tuple = GetCharFormat()

Returns the font selection in a CHARFORMAT tuple.

MFC References

CFontDialog::GetCharFormat


PyCFontDialog.GetColor

int = GetColor()

Determines the color of the selected font.

MFC References

CFontDialog::GetColor


PyCFontDialog.GetCurrentFont

dict = GetCurrentFont()

Returns a dictionary describing the current font.

MFC References

CFontDialog::GetCurrentFont


PyCFontDialog.GetFaceName

string = GetFaceName()

Returns the face name of the selected font.

MFC References

CFontDialog::GetFaceName


PyCFontDialog.GetSize

int = GetSize()

Returns he font's size, in tenths of a point.

MFC References

CFontDialog::GetSize


PyCFontDialog.GetStyleName

string = GetStyleName()

Returns the style name of the selected font.

MFC References

CFontDialog::GetStyleName


PyCFontDialog.GetWeight

int = GetWeight()

Returns the font's weight.

MFC References

CFontDialog::GetWeight


PyCFontDialog.IsBold

int = IsBold()

Determines whether the font is displayed bold.

MFC References

CFontDialog::IsBold


PyCFontDialog.IsItalic

int = IsItalic()

Determines whether the font is displayed with italic.

MFC References

CFontDialog::IsItalic


PyCFontDialog.IsStrikeOut

int = IsStrikeOut()

Determines whether the font is displayed with strikeout.

MFC References

CFontDialog::IsStrikeOut


PyCFontDialog.IsUnderline

int = IsUnderline()

Determines whether the font is displayed with underline.

MFC References

CFontDialog::IsUnderline


PyCFormView

PyCFormView Object

A class which implementes a CFormView (ie, a view based on a dialog resource.

Methods

OnCommand
Calls the standard Python framework OnCommand handler


PyCFormView.OnCommand

OnCommand(wparam, lparam)

Calls the standard Python framework OnCommand handler

Parameters

wparam : int

lparam : int

See Also

PyCWnd.OnCommand virtual method


PyCFrameWnd

PyCFrameWnd Object

A windows frame window. Encapsulates an MFC CFrameWnd class. Derived from a PyCWnd object.

Methods

BeginModalState
Sets the frame window to modal.

CreateWindow
Creates the underlying window for the object.

EndModalState
Ends the frame window's modal state. Enables all of the windows disabled by PyCFrameWnd::BeginModalState.

DockControlBar
Docks a control bar.

EnableDocking
Enable dockable control bars in a frame window

FloatControlBar
Floats a control bar.

GetActiveDocument
Returns the currently active document

GetControlBar
Retrieves the specified control bar.

GetMessageString
Retrieves message corresponding to a command ID.

GetMessageBar
Retrieves the message bar for the frame.

IsTracking
Determines if splitter bar is currently being moved.

InModalState
Returns a value indicating whether or not a frame window is in a modal state.

LoadAccelTable
Loads an accelerator table.

LoadFrame
Creates the MDI Window's frame

LoadBarState
Loads a control bars settings

PreCreateWindow
Calls the underlying MFC PreCreateWindow method.

SaveBarState
Saves a control bars settings

ShowControlBar
Shows a control bar.

RecalcLayout
Called by the framework when the standard control bars are toggled on or off or when the frame window is resized.

GetActiveView
Retrieves the active view.

OnBarCheck
Changes the state of the specified controlbar.

OnUpdateControlBarMenu
Checks the state of a menu item

SetActiveView
Sets the active view for a frame.


PyCFrameWnd.BeginModalState

BeginModalState()

Sets the frame window to modal.


PyCFrameWnd.CreateWindow

tuple = CreateWindow(wndClass, title , style , rect , PyCWnd , createContext , pszMenuName , styleEx )

Creates the actual window for the PyCFrameWnd object.

Parameters

wndClass : string

The window class name, or None

title : string

The window title

style=WS_VISIBLE | WS_OVERLAPPEDWINDOW : int

The window style

rect=None : int, int, int, int

The default rectangle

PyCWnd=None : parent

The parent window

createContext=None : tuple

A tuple representing a CREATECONTEXT structure.

pszMenuName : string

The string id for the menu.

styleEx : int

The extended style of the window being created.

MFC References

CFrameWnd::Create


PyCFrameWnd.DockControlBar

DockControlBar(controlBar, dockBarId, int, int, int, int)

Docks a control bar.

Parameters

controlBar : PyCControlBar

The control bar to dock.

dockBarId=0 : int

Determines which sides of the frame window to consider for docking.

int, int, int, int=0,0,0,0 : left, top, right, bottom

Determines, in screen coordinates, where the control bar will be docked in the nonclient area of the destination frame window.

MFC References

CFrameWnd::DockControlBar


PyCFrameWnd.EnableDocking

EnableDocking(style)

Enable dockable control bars in a frame window

Parameters

style : int

Specifies which sides of the frame window can serve as docking sites for control bars.

Comments

By default, control bars will be docked to a side of the frame window in the following order: top, bottom, left, right.


PyCFrameWnd.EndModalState

EndModalState()

Ends the frame window's modal state. Enables all of the windows disabled by PyCFrameWnd::BeginModalState.


PyCFrameWnd.FloatControlBar

FloatControlBar(controlBar, int, int, style)

Floats a control bar.

Parameters

controlBar : PyCControlBar

The control bar to dock.

int, int : x,y

The location, in screen coordinates, where the top left corner of the control bar will be placed.

style=CBRS_ALIGN_TOP : int

Determines which sides of the frame window to consider for docking.

MFC References

CFrameWnd::FloatControlBar


PyCFrameWnd.GetActiveDocument

PyCDocument = GetActiveDocument()

Gets the currently active document, else None

MFC References

CFrameWnd::GetActiveDocument


PyCFrameWnd.GetActiveView

PyCView = GetActiveView()

Retrieves the active view.


PyCFrameWnd.GetControlBar

PyCControlBar = GetControlBar(id)

Retrieves the specified control bar.

Parameters

id : int

The ID of the toolbar to be retrieved


PyCFrameWnd.GetMessageBar

PyCWnd = GetMessageBar()

Retrieves the message bar for the frame.


PyCFrameWnd.GetMessageString

string = GetMessageString(id)

Retrieves message corresponding to a command ID.

Parameters

id : int

The ID to be retrieved

See Also

PyCMDIChildWnd.GetMessageString virtual method


PyCFrameWnd.InModalState

int = InModalState()

Returns a value indicating whether or not a frame window is in a modal state.


PyCFrameWnd.IsTracking

int = IsTracking()

Determines if splitter bar is currently being moved.


PyCFrameWnd.LoadAccelTable

LoadAccelTable()

Loads an accelerator table.


PyCFrameWnd.LoadBarState

LoadBarState(profileName)

Loads a control bars settings

Parameters

profileName : string

Name of a section in the initialization file or a key in the Windows registry where state information is stored.

MFC References

CFrameWnd::LoadBarState


PyCFrameWnd.LoadFrame

LoadFrame(idResource, style, wndParent, context)

Loads a Windows frame window and associated resources

Parameters

idResource=IDR_PYTHONTYPE : int

The Id of the resources (menu, icon, etc) for this window

style=-1 : long

The window style. Note -1 implies win32con.WS_OVERLAPPEDWINDOW|win32con.FWS_ADDTOTITLE

wndParent=None : PyCWnd

The parent of the window, or None.

context=None : object

An object passed to the OnCreateClient for the frame,

MFC References

CFrameWnd::LoadFrame


PyCFrameWnd.OnBarCheck

int = OnBarCheck(id)

Changes the state of the specified controlbar.

Parameters

id : int

The control ID of the control bar.


PyCFrameWnd.OnUpdateControlBarMenu

int = OnUpdateControlBarMenu(cmdUI)

Checks the state of a menu item

Parameters

cmdUI : PyCCmdUI

A cmdui object


PyCFrameWnd.PreCreateWindow

tuple = PreCreateWindow(createStruct)

Calls the underlying MFC PreCreateWindow method.

Parameters

createStruct : tuple

A tuple representing a CREATESTRUCT structure.

See Also

PyCWnd.PreCreateWindow virtual method


PyCFrameWnd.RecalcLayout

RecalcLayout(bNotify)

Called by the framework when the standard control bars are toggled on or off or when the frame window is resized.

Parameters

bNotify=1 : int

Notify flag

MFC References

CFrameWnd::RecalcLayout


PyCFrameWnd.SaveBarState

SaveBarState(profileName)

Saves a control bars settings

Parameters

profileName : string

Name of a section in the initialization file or a key in the Windows registry where state information is stored.

MFC References

CFrameWnd::SaveBarState


PyCFrameWnd.SetActiveView

SetActiveView(view, bNotify)

Sets the active view for a frame.

Parameters

view : PyCView

The view to set active.

bNotify=1 : int

Specifies whether the view is to be notified of activation. If TRUE, OnActivateView is called for the new view; if FALSE, it is not.


PyCFrameWnd.ShowControlBar

ShowControlBar(controlBar, bShow, bDelay)

Shows a control bar.

Parameters

controlBar : PyCControlBar

The control bar to dock.

bShow : int

Show or hide flag.

bDelay : int

If TRUE, delay showing the control bar. If FALSE, show the control bar immediately.

MFC References

CFrameWnd::ShowControlBar


PyCGdiObject

PyCGdiObject Object

A class which encapsulates an MFC CGdiObject.


PyCImageList

PyCImageList Object

A Python type encapsulating an MFC CImageList class.

Methods

Add
Adds an icon to the image list.

Destroy
Destroys the underlying MFC imagelist object.

DeleteImageList
Deletes an image list.

GetBkColor
Retrieves the background color of an Image List.

GetSafeHandle
Retrieves the HIMAGELIST for the object

GetImageCount
Retrieves the number of images in an image list.

GetImageInfo
Retrieves information about an image.

SetBkColor
Sets the background color for an Image List.


PyCImageList.Add

int = Add(bitmap, bitmapMask)

Adds an image to the list.

Parameters

bitmap, bitmapMask : (int,int)

2 Bitmaps to use (primary and mask)

Alternative Parameters

bitmap

Bitmap to use

color

Color to use for the mask.

Alternative Parameters

hIcon

Handle of an icon to add.

Return Value

Zero-based index of the first new image.


PyCImageList.DeleteImageList

DeleteImageList()

Deletes an image list.

Comments

This frees all resources associated with an image list. No further operations on the object will be allowed.


PyCImageList.Destroy

Destroy()

Destroys the underlying CImageList

Comments

This method actually calls delete() on the CImageList - you should ensure that no controls still require access to this list.


PyCImageList.GetBkColor

int = GetBkColor()

Retrieves the background color of an Image List.


PyCImageList.GetImageCount

int = GetImageCount()

Retrieves the number of images in an image list.


PyCImageList.GetImageInfo

iiii(iiii) = GetImageInfo(index)

Retrieves information about an image.

Parameters

index : int

Index of image.

Return Value

The return info is a tuple describing an IMAGELIST structure.


PyCImageList.GetSafeHandle

int = GetSafeHandle()

Retrieves the HIMAGELIST for the object


PyCImageList.SetBkColor

SetBkColor(color)

Sets the background color for an Image List.

Parameters

color : int

The new background color.


PyCListBox

PyCListBox Object

A windows listbox control. Encapsulates an MFC CListBox class. Derived from a PyCControl object.

Methods

AddString
Add a string to the listbox.

DeleteString
Delete a string from the listbox.

Dir
Fill a listbox with a file specification.

GetCaretIndex
Get the index of the item with the focus rectangle.

GetCount
Get the count of items in the listbox.

GetCurSel
Get the current selection in a single selection listbox.

GetItemData
Retrieves the application-specific object associated with a listbox entry

GetItemValue
Retrieves the application-specific value associated with a listbox entry

GetSel
Get the selected items in a multiple selection listbox.

GetSelCount
Get the number of selected items in a multtiple selection listbox.

GetSelItems
Get the index of the selected items in a multiple selection listbox.

GetSelTextItems
Get the text of the selected items in a multiple selection listbox.

GetTopIndex
Get the index of the topmost item.

GetText
Get the text associated with an item.

GetTextLen
Get the length of an item

InsertString
Insert a string into the listbox.

ResetContent
Remove all items from a listbox.

SetCaretIndex
Set the focus rectange to a specified item.

SelectString
Select an item, based on a string.

SelItemRange
Select a range of items in a multiple selection listbox.

SetCurSel
Set the current selection in a single selection listbox.

SetItemData
Sets the application-specific object associated with a listbox entry

SetItemValue
Sets the application-specific value associated with a listbox entry

SetSel
Set the selection.

SetTabStops
Set the tab stops for a listbox.

SetTopIndex
Set the top most visible item in a listbox.


PyCListBox.AddString

int = AddString(object)

Adds a string to a listbox.

Parameters

object : any

Any object. If not a string, __str__, __repr__ or a default repr() will be used

MFC References

CListBox::AddString

Return Value

The zero based index of the new string.


PyCListBox.DeleteString

int = DeleteString(pos)

Deletes an item from a listbox.

Parameters

pos : int

The zero based index of the item to delete.

MFC References

CListBox::DeleteString

Return Value

The count of the items remaining in the list.


PyCListBox.Dir

int = Dir(attr, wild )

Fills a listbox with a directory listing.

Parameters

attr : int

The attributes of the files to locate

wild : string

A file specification string - eg, *.*

MFC References

CListBox::Dir

Return Value

The index of the last file name added to the list.


PyCListBox.GetCaretIndex

int = GetCaretIndex()

Returns the index of the item which has focus.

Return Value

The zero-based index of the item that has the focus rectangle in a list box. If the list box is a single-selection list box, the return value is the index of the item that is selected, if any.


PyCListBox.GetCount

int = GetCount()

Returns the count of items in the listbox.

MFC References

CListBox::GetCount

Return Value

Returns the number of items currently in the listbox.


PyCListBox.GetCurSel

int = GetCurSel()

Returns the index of the currently selected item.

Comments

Should not be called for a multiple selection listbox.

MFC References

CListBox::GetCurSel


PyCListBox.GetItemData

object = GetItemData(item)

Retrieves the application-specific object associated with an item.

Parameters

item : int

The index of the item whose data is to be retrieved.


PyCListBox.GetItemValue

int = GetItemValue(item)

Retrieves the application-specific value associated with an item.

Parameters

item : int

The index of the item whose data is to be retrieved.


PyCListBox.GetSel

int = GetSel(index)

Returns the selection state of a specified item.

Parameters

index : int

The index of the item to return the state for.

MFC References

CListBox::GetSel

Return Value

A +ve number if the item is selected, else zero.


PyCListBox.GetSelCount

int = GetSelCount()

Returns the number of selected items in a multiple selection listbox.

MFC References

CListBox::GetSelCount


PyCListBox.GetSelItems

list = GetSelItems()

Returns a list of the indexes of the currently selected items in a multiple selection listbox.

MFC References

CListBox::GetSelCount

CListBox::GetSelItems


PyCListBox.GetSelTextItems

list = GetSelTextItems()

Returns a list of the strings of the currently selected items in a multiple selection listbox.

MFC References

CListBox::GetSelCount

CListBox::GetSelItems

CListBox::GetText


PyCListBox.GetText

string = GetText(index)

Returns the string for a specified item.

Parameters

index : int

The index of the item to retrieve the text of


PyCListBox.GetTextLen

int = GetTextLen(index)

Returns the length of the string for a specified item.

Parameters

index : int

The index of the item to retrieve the length of the text.

MFC References

CListBox::GetTextLen


PyCListBox.GetTopIndex

int = GetTopIndex()

Returns the index of the top most visible item.

MFC References

CListBox::GetTopIndex

Return Value

The zero based index of the top most visible item.


PyCListBox.InsertString

int = InsertString(pos, object )

Insert a string into a listbox.

Parameters

pos : int

The zero based index in the listbox to insert the new string

object : any

The object to be added to the listbox

MFC References

CListBox::InsertString

Return Value

The zero based index of the new string added.


PyCListBox.ResetContent

ResetContent()

Clear all the items from a listbox.

MFC References

CListBox::ResetContent


PyCListBox.SelItemRange

SelItemRange(bSel, start, end)

Selects an item range.

Parameters

bSel : int

Should the selection specified be set or cleared?

start : int

The zero based index of the first item to select.

end : int

The zero based index of the last item to select.


PyCListBox.SelectString

SelectString(after, string)

Searches for a list-box item that matches the specified string, and selects it.

Parameters

after : int

Contains the zero-based index of the item before the first item to be searched, or -1 for the entire listbox.

string : string

The string to search for.

MFC References

CListBox::SelectString

Return Value

The return value is always None - an exception is raised if the string can not be located.


PyCListBox.SetCaretIndex

SetCaretIndex(index, bScroll)

Sets the focus rectange to a specified item.

Parameters

index : int

The zero based index of the item.

bScroll=1 : int

Should the listbox scroll to the item?

MFC References

CListBox::SetCaretIndex


PyCListBox.SetCurSel

SetCurSel(index)

Selects an item in a single selection listbox.

Parameters

index : int

The zero based index of the item to select.

MFC References

CListBox::SetCurSel


PyCListBox.SetItemData

int = SetItemData(item, Data )

Sets the item's application-specific object value.

Parameters

item : int

Index of the item whose Data is to be set.

Data : object

New value for the data.

Comments

Note that a reference count is not added to the object. This it is your responsibility to make sure the object remains alive while in the list.


PyCListBox.SetItemValue

int = SetItemValue(item, data )

Sets the item's application-specific value.

Parameters

item : int

Index of the item whose Data is to be set.

data : int

New value for the data.


PyCListBox.SetSel

SetSel(index, bSel)

Selects an item in a multiple selection listbox.

Parameters

index : int

The zero based index of the item to select.

bSel=1 : int

Should the item be selected or deselected?

MFC References

CListBox::SetSel


PyCListBox.SetTabStops

SetTabStops(eachTabStop)

Sets the tab stops for a listbox.

Parameters

eachTabStop : int

The position for each tab stop.

Alternative Parameters

tabStops

Each individual tab stop.


PyCListBox.SetTopIndex

SetTopIndex(index)

Sets the top index (top most visible item) of the listbox.

Parameters

index : int

The zero based index of the item to place at the top of the list.

MFC References

CListBox::SetTopIndex


PyCListCtrl

PyCListCtrl Object

A class which encapsulates an MFC CListCtrl object. Derived from a PyCWnd object.

Methods

Arrange
Aligns items on a grid.

CreateWindow
Creates the actual window for the object.

DeleteAllItems
Deletes all items from the list.

DeleteItem
Deletes the specified item.

GetTextColor
Retrieves the text color of a list view control.

SetTextColor
Sets the text color of a list view control.

GetBkColor
Retrieves the background color of the control.

SetBkColor
Sets the background color of the control.

GetItem
Retrieves the details of an items attributes.

GetItemCount
Retrieves the number of items in a list view control.

GetItemRect
Retrieves the bounding rectangle of a list view item.

GetEditControl
Retrieves the handle of the edit control used to edit the specified list view item.

EditLabel
Edits a specified list view item in-place.

EnsureVisible
Ensures that a list view item is visible in its list view control.

CreateDragImage
Creates a dragging bitmap for the specified list view item.

GetImageList
Retrieves the current image list.

GetNextItem
Searches for a list view item with specified properties and with specified relationship to a given item.

InsertColumn
Inserts a column into a list control when in report view.

InsertItem
Inserts an item into the list.

SetImageList
Assigns an image list to a list view control.

GetColumn
Retrieves the details of a column in the control.

GetTextBkColor
Retrieves the text background color of a list view control.

SetTextBkColor
Sets the text background color of a list view control.

GetTopIndex
Retrieves the index of the topmost visible item.

GetCountPerPage
Calculates the number of items that can fit vertically in a list view control.

GetSelectedCount
Retrieves the number of selected items in the list view control.

SetItem
Sets some of all of an items attributes.

SetItemState
Changes the state of an item in a list view control.

GetItemState
Retrieves the state of a list view item.

SetItemData
Sets the item's application-specific value.

GetItemData
Retrieves the application-specific value associated with an item.

SetItemCount
Prepares a list view control for adding a large number of items.

GetItemCount
Retrieves the number of items in a list view control.

SetItemText
Changes the text of a list view item or subitem.

GetItemText
Retrieves the text of a list view item or subitem.

RedrawItems
Redraws a range of items

Update
Forces the control to repaint a specified item.

SetColumn
Sets the state of a column in a list control when in report view.

DeleteColumn
Deletes the specified column from the list control.

GetColumnWidth
Gets the width of the specified column in the list control.

SetColumnWidth
Sets the width of the specified column in the list control.

GetStringWidth
Gets the necessary column width to fully display this text in a column.

HitTest
Determines which list view item, if any, is at a specified position.

GetItemPosition
Determines the position of the specified item.


PyCListCtrl.Arrange

Arrange(code)

Aligns items on a grid.

Parameters

code : int

Specifies the alignment style for the items


PyCListCtrl.CreateDragImage

PyCImageList,(x,y) = CreateDragImage(item)

Creates a dragging bitmap for the specified list view item.

Parameters

item : int

The index of the item to edit.


PyCListCtrl.CreateWindow

CreateWindow(style, rect, PyCWnd, id)

Creates the actual window for the object.

Parameters

style : int

The window style

rect : int, int, int, int

The default rectangle

PyCWnd : parent

The parent window

id : int

The control ID

MFC References

CListCtrl::Create


PyCListCtrl.DeleteAllItems

DeleteAllItems()

Deletes all items from the list.


PyCListCtrl.DeleteColumn

int = DeleteColumn(first)

Deletes the specified column from the list control.

Parameters

first : int

Index of the column to be removed.


PyCListCtrl.DeleteItem

DeleteItem(item)

Deletes the specified item.

Parameters

item : int

The item to delete.


PyCListCtrl.EditLabel

PyCEdit = EditLabel(item)

Edits a specified list view item in-place.

Parameters

item : int

The index of item to edit.


PyCListCtrl.EnsureVisible

int = EnsureVisible(item, bPartialOK )

Ensures that a list view item is visible in its list view control.

Parameters

item : int

The index of item to edit.

bPartialOK : int

Specifies whether partial visibility is acceptable.


PyCListCtrl.GetBkColor

int = GetBkColor()

Retrieves the background color of the control.


PyCListCtrl.GetColumn

PyCListCtrl::LV_COLUMN tuple = GetColumn(column)

Retrieves the details of a column in the control.

Parameters

column : int

The index of the column whose attributes are to be retrieved.


PyCListCtrl.GetColumnWidth

int = GetColumnWidth(first)

Gets the width of the specified column in the list control.

Parameters

first : int

Index of the column whose width is to be retrieved.


PyCListCtrl.GetCountPerPage

int = GetCountPerPage()

Calculates the number of items that can fit vertically in a list view control.


PyCListCtrl.GetEditControl

PyCEdit = GetEditControl()

Retrieves the handle of the edit control used to edit the specified list view item.


PyCListCtrl.GetImageList

PyCImageList = GetImageList(nImageList)

Retrieves the current image list.

Parameters

nImageList : int

Value specifying which image list to retrieve. It can be one of:
- commctrl.LVSIL_NORMAL Image list with large icons.
- commctrl.LVSIL_SMALL Image list with small icons.
- commctrl.LVSIL_STATE Image list with state images.


PyCListCtrl.GetItem

PyCListCtrl::LV_ITEM tuple = GetItem(item, sub )

Retrieves the details of an items attributes.

Parameters

item : int

The index of the item whose attributes are to be retrieved.

sub : int

Specifies the subitem whose text is to be retrieved.


PyCListCtrl.GetItemCount

int = GetItemCount()

Retrieves the number of items in a list view control.


PyCListCtrl.GetItemData

object = GetItemData(item)

Retrieves the application-specific value associated with an item.

Parameters

item : int

The index of the item whose data is to be retrieved.


PyCListCtrl.GetItemPosition

(int, int) = GetItemPosition(item)

Determines the position of the specified item.

Parameters

item : int

The item to determine the position for.


PyCListCtrl.GetItemRect

(int, int, int, int) = GetItemRect(item, bTextOnly )

Retrieves the bounding rectangle of a list view item.

Parameters

item : int

Index of the item whose Data is to be set.

bTextOnly : int

f this parameter is nonzero, the bounding rectangle includes only the text of the item. Otherwise it includes the entire line that the item occupies in the list view control.


PyCListCtrl.GetItemState

int = GetItemState(item, mask )

Retrieves the state of a list view item.

Parameters

item : int

The index of the item whose position is to be retrieved.

mask : int

Mask specifying which of the item's state flags to return.


PyCListCtrl.GetItemText

int = GetItemText(item, sub )

Retrieves the text of a list view item or subitem.

Parameters

item : int

The index of the item whose text is to be retrieved.

sub : int

Specifies the subitem whose text is to be retrieved.


PyCListCtrl.GetNextItem

int = GetNextItem(item, flags )

Searches for a list view item with specified properties and with specified relationship to a given item.

Parameters

item : int

Index of the item to begin the searching with, or -1 to find the first item that matches the specified flags. The specified item itself is excluded from the search.

flags : int

Geometric relation of the requested item to the specified item, and the state of the requested item. The geometric relation can be one of these values:
LVNI_ABOVE
LVNI_ALL
LVNI_BELOW
LVNI_TOLEFT
LVNI_TORIGHT
The state can be zero, or it can be one or more of these values:
LVNI_DROPHILITED
LVNI_FOCUSED
LVNI_HIDDEN
LVNI_MARKED
LVNI_SELECTED
If an item does not have all of the specified state flags set, the search continues with the next item.

Return Value

Returns an integer index, or raises a win32ui.error exception if not item can be found.


PyCListCtrl.GetSelectedCount

int = GetSelectedCount()

Retrieves the number of selected items in the list view control.


PyCListCtrl.GetStringWidth

int = GetStringWidth(first)

Gets the necessary column width to fully display this text in a column.

Parameters

first : int

String that contains the text whose width is to be determined.

Comments

Doesn't take the size of an included Image in account, only the size of the text is determined.


PyCListCtrl.GetTextBkColor

int = GetTextBkColor()

Retrieves the text background color of a list view control.


PyCListCtrl.GetTextColor

int = GetTextColor()

Retrieves the text color of a list view control.


PyCListCtrl.GetTopIndex

int = GetTopIndex()

Retrieves the index of the topmost visible item.


PyCListCtrl.HitTest

(int, int, int) = HitTest(x,y)

Determines which list view item, if any, is at a specified position.

Parameters

x,y : point

The point to test.

Return Value

The result is a tuple of (flags, item, subItem). flags may be a combination of the following values:

Value | Description
commctrl.LVHT_ABOVE | The position is above the control's client area.
commctrl.LVHT_BELOW | The position is below the control's client area.
commctrl.LVHT_NOWHERE | The position is inside the list view control's client window, but it is not over a list item.
commctrl.LVHT_ONITEMICON | The position is over a list view item's icon.
commctrl.LVHT_ONITEMLABEL | The position is over a list view item's text.
commctrl.LVHT_ONITEMSTATEICON | The position is over the state image of a list view item.
commctrl.LVHT_TOLEFT | The position is to the left of the list view control's client area.
commctrl.LVHT_TORIGHT | The position is to the right of the list view control's client area.


PyCListCtrl.InsertColumn

int = InsertColumn(colNo, item )

Inserts a column into a list control when in report view.

Parameters

colNo : int

The new column number

item : PyCListCtrl::LV_COLUMN tuple

A tuple describing the new column.


PyCListCtrl.InsertItem

int = InsertItem(item)

Inserts an item into the list.

Parameters

item : PyCListCtrl::LV_ITEM tuple

A tuple describing the new item.

Alternative Parameters

item

The index of the item.

text

The text of the item.

image

The index of the image to use.

Alternative Parameters

item

The index of the item.

text

The text of the item.


PyCListCtrl.RedrawItems

int = RedrawItems(first, first )

Forces a listview to repaint a range of items.

Parameters

first : int

Index of the first item to be repainted.

first : int

Index of the last item to be repainted.

Comments

The specified items are not actually repainted until the list view window receives a WM_PAINT message. To repaint immediately, call the Windows UpdateWindow function after using this function.


PyCListCtrl.SetBkColor

SetBkColor(color)

Sets the background color of the control.

Parameters

color : int

The new background color.


PyCListCtrl.SetColumn

int = SetColumn(colNo, item )

Changes column state in a list control when in report view.

Parameters

colNo : int

The to be modified column number

item : PyCListCtrl::LV_COLUMN tuple

A tuple describing the modified column.


PyCListCtrl.SetColumnWidth

int = SetColumnWidth(first, first )

Sets the width of the specified column in the list control.

Parameters

first : int

Index of the column to be changed.

first : int

New width of the column.


PyCListCtrl.SetImageList

int = SetImageList(imageList, imageType )

Assigns an image list to a list view control.

Parameters

imageList : PyCImageList

The Image List to use.

imageType : int

Type of image list. It can be one of (COMMCTRL.) LVSIL_NORMAL, LVSIL_SMALL or LVSIL_STATE


PyCListCtrl.SetItem

int = SetItem(item)

Sets some of all of an items attributes.

Parameters

item : PyCListCtrl::LV_ITEM tuple

A tuple describing the new item.


PyCListCtrl.SetItemCount

SetItemCount(count)

Prepares a list view control for adding a large number of items.

Parameters

count : int

Number of items that the control will ultimately contain.

Comments

By calling this function before adding a large number of items, you enable a list view control to reallocate its internal data structures only once rather than every time you add an item.


PyCListCtrl.SetItemData

int = SetItemData(item, Data )

Sets the item's application-specific value.

Parameters

item : int

Index of the item whose Data is to be set.

Data : object

New value for the data.

Comments

Note that a reference count is not added to the object. This it is your responsibility to make sure the object remains alive while in the list.


PyCListCtrl.SetItemState

int = SetItemState(item, state , mask )

Changes the state of an item in a list view control.

Parameters

item : int

Index of the item whose state is to be set.

state : int

New values for the state bits.

mask : int

Mask specifying which state bits to change.


PyCListCtrl.SetItemText

int = SetItemText(item, sub , text )

Changes the text of a list view item or subitem.

Parameters

item : int

Index of the item whose text is to be set.

sub : int

Index of the subitem, or zero to set the item label.

text : string

String that contains the new item text.


PyCListCtrl.SetTextBkColor

SetTextBkColor(color)

Sets the text background color of a list view control.

Parameters

color : int

The new background color.


PyCListCtrl.SetTextColor

SetTextColor(color)

Sets the text color of a list view control.

Parameters

color : int

The new color.


PyCListCtrl.Update

Update(item)

Forces the control to repaint a specified item.

Parameters

item : int

The new color.


PyCListView

PyCListView Object

A class which implementes a CListView. Derived from PyCView and PyCListCtrl objects.

Methods

PreCreateWindow
Calls the underlying MFC PreCreateWindow method.

GetListCtrl
Returns the underlying list control object.

OnCommand
Calls the standard Python framework OnCommand handler


PyCListView.GetListCtrl

PyCListCtrl = GetListCtrl()

Returns the underlying list control object.


PyCListView.OnCommand

OnCommand(wparam, lparam)

Calls the standard Python framework OnCommand handler

Parameters

wparam : int

lparam : int

See Also

PyCWnd.OnCommand virtual method


PyCListView.PreCreateWindow

tuple = PreCreateWindow(createStruct)

Calls the underlying MFC PreCreateWindow method.

Parameters

createStruct : tuple

A tuple representing a CREATESTRUCT structure.


PyCMDIChildWnd

PyCMDIChildWnd Object

A windows frame window. Encapsulates an MFC CMDIChildWindow class

Methods

ActivateFrame
Calls the underlying MFC ActivateFrame method.

CreateWindow
Creates the actual window for the PyCWnd object.

GetMDIFrame
Returns the MDI parent frame

MDIActivate
Activates the MDI frame independent of the main frame.

PreCreateWindow
Calls the underlying MFC PreCreateWindow method.

PreTranslateMessage
Calls the underlying MFC PreTranslateMessage method.

OnCommand
Calls the standard Python framework OnCommand handler

OnClose
Calls the standard Python framework OnClose handler


PyCMDIChildWnd.ActivateFrame

ActivateFrame(cmdShow)

Calls the underlying MFC ActivateFrame method.

Parameters

cmdShow=-1 : int

The status of the window.

See Also

PyCMDIChildWnd.ActivateFrame virtual method


PyCMDIChildWnd.CreateWindow

tuple = CreateWindow(wndClass, title , style , rect , PyCWnd , createContext )

Creates the actual window for the PyCWnd object.

Parameters

wndClass : string

The window class name, or None

title : string

The window title

style=WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW : int

The window style

rect=None : int, int, int, int

The default rectangle

PyCWnd=None : parent

The parent window

createContext=None : tuple

A tuple representing a CREATECONTEXT structure.

Comments

You do not need to call this method if you use the MFC Document/View framework.


PyCMDIChildWnd.GetMDIFrame

GetMDIFrame()

Returns the MDI parent frame


PyCMDIChildWnd.MDIActivate

MDIActivate(cmdShow)

Activates the MDI frame independent of the main frame.

Parameters

cmdShow=-1 : int

The status of the window.

See Also

PyCWnd.OnMDIActivate virtual method


PyCMDIChildWnd.OnClose

OnClose()

Calls the standard Python framework OnClose handler

See Also

PyCWnd.OnClose virtual method


PyCMDIChildWnd.OnCommand

OnCommand(wparam, lparam)

Calls the standard Python framework OnCommand handler

Parameters

wparam : int

lparam : int

See Also

PyCWnd.OnCommand virtual method


PyCMDIChildWnd.PreCreateWindow

tuple = PreCreateWindow(createStruct)

Calls the underlying MFC PreCreateWindow method.

Parameters

createStruct : tuple

A tuple representing a CREATESTRUCT structure.

See Also

PyCWnd.PreCreateWindow virtual method


PyCMDIChildWnd.PreTranslateMessage

PreTranslateMessage()

Calls the base PreTranslateMessage handler

See Also

PyCWnd.PreTranslateMessage virtual method


PyCMDIFrameWnd

PyCMDIFrameWnd Object

A main application frame window. Encapsulates an MFC CMDIFrameWnd class

Methods

GetMDIClient
Returns the MDI client window

MDIGetActive
Retrieves the current active MDI child window, along with a flag indicating whether the child window is maximized.

MDIActivate
Activate an MDI child window

MDINext
Activates the next MDI window

PreCreateWindow
Calls the underlying MFC PreCreateWindow method.

PreTranslateMessage
Calls the underlying MFC PreTranslateMessage method.

OnCommand
Calls the standard Python framework OnCommand handler

OnContextHelp
Calls the underlying MFC OnContextHelp method.

OnClose
Calls the standard Python framework OnClose handler


PyCMDIFrameWnd.GetMDIClient

PyCMDIFrameWnd = GetMDIClient()

Returns the MDI client window


PyCMDIFrameWnd.MDIActivate

PyCMDIFrameWnd = MDIActivate(window)

Activate an MDI child window

Parameters

window : PyCWnd

The window to activate.


PyCMDIFrameWnd.MDIGetActive

(PyCMDIChildWnd, int) = MDIGetActive()

Retrieves the current active MDI child window, along with a flag indicating whether the child window is maximized.


PyCMDIFrameWnd.MDINext

MDINext(fNext)

Activates the next MDI window

Parameters

fNext=0 : int

Indicates if the next (0) or previous (non-zero) window is requested.

Comments

Unlike MFC, this version supports the fNext param in the WM_MDINEXT message.


PyCMDIFrameWnd.OnClose

OnClose()

Calls the standard Python framework OnClose handler


PyCMDIFrameWnd.OnCommand

OnCommand(wparam, lparam)

Calls the standard Python framework OnCommand handler

Parameters

wparam : int

lparam : int

See Also

PyCWnd.OnCommand virtual method


PyCMDIFrameWnd.OnContextHelp

None = OnContextHelp()

Calls the underlying MFC OnContextHelp method.


PyCMDIFrameWnd.PreCreateWindow

tuple = PreCreateWindow(createStruct)

Calls the underlying MFC PreCreateWindow method.

Parameters

createStruct : tuple

A tuple representing a CREATESTRUCT structure.

See Also

PyCWnd.PreCreateWindow virtual method


PyCMDIFrameWnd.PreTranslateMessage

PreTranslateMessage()

Calls the base PreTranslateMessage handler

See Also

PyCWnd.PreTranslateMessage virtual method


PyCMenu

PyCMenu Object

A windows menu. Encapsulates an MFC CMenu class

Methods

AppendMenu
Appends a new item to the end of a menu. Python can specify the state of the menu item by setting values in nFlags.

DeleteMenu
Deletes the specified menu item.

EnableMenuItem
Enables, disables, or dims a menu item.

GetHandle
Returns the menu object's underlying hMenu.

GetMenuItemCount
Determines the number of items in a menu.

GetMenuItemID
Returns the item ID for the specified item in a pop-up menu.

GetMenuString
Returns the string for a specified menu item.

GetSubMenu
Returns a submenu.

InsertMenu
Inserts an item into a menu.

ModifyMenu
Modify an item in a menu.

TrackPopupMenu
Creates a popup menu anywhere on the screen.


PyCMenu.AppendMenu

AppendMenu(flags, id, value)

Appends a new item to the end of a menu. Python can specify the state of the menu item by setting values in nFlags.

Parameters

flags : int

Specifies information about the state of the new menu item when it is added to the menu. May be a combination of the win32con.MF_* values.

id=0 : int

Specifies either the command ID of the new menu item.

value=None : string/None

Specifies the content of the new menu item. If used, flags must contain win32con.MF_STRING.


PyCMenu.DeleteMenu

string = DeleteMenu(id, flags )

Deletes the specified menu item.

Parameters

id : int

The id of the item being deleted.

flags : int

Specifies how the id parameter is interpreted. It must be one of win32con.MF_BYCOMMAND or win32con.MF_BYPOSITION.


PyCMenu.EnableMenuItem

int = EnableMenuItem(id, flags )

Enables, disables, or dims a menu item.

Parameters

id : int

Specifies the command ID of the menu item. This parameter can specify pop-up menu items as well as standard menu items.

flags : int

Specifies the action to take. It can be a combination of MF_DISABLED, MF_ENABLED, or MF_GRAYED, with MF_BYCOMMAND or MF_BYPOSITION

Comments

The PyCMenu::CreateMenu , PyCMenu::InsertMenu, PyCMenu::ModifyMenu, and PyCMenu::LoadMenuIndirect member functions can also set the state (enabled, disabled, or dimmed) of a menu item.


PyCMenu.GetHandle

int = GetHandle()

Returns the menu object's underlying hMenu.


PyCMenu.GetMenuItemCount

int = GetMenuItemCount()

Determines the number of items in a menu.

Return Value

The number of items in the menu if the function is successful; otherwise -1.


PyCMenu.GetMenuItemID

int = GetMenuItemID(pos)

Returns the item ID for the specified item in a pop-up menu.

Parameters

pos : int

The position (zero-based) of the menu item whose ID is being retrieved.

Comments

If the specified item is a pop-up menu (as opposed to an item within the pop-up menu), the return value is -1. If nPos corresponds to a SEPARATOR menu item, the return value is 0.


PyCMenu.GetMenuString

string = GetMenuString(id, flags )

Returns the string for a specified menu item.

Parameters

id : int

The id of the item being requested.

flags=win32con.MF_BYCOMMAND : int

Specifies how the id parameter is interpreted. It must be one of win32con.MF_BYCOMMAND or win32con.MF_BYPOSITION.


PyCMenu.GetSubMenu

PyCMenu = GetSubMenu(pos)

Returns a submenu.

Parameters

pos : int

The position (zero-based) of the menu item being retrieved.


PyCMenu.InsertMenu

InsertMenu(pos, flags, id, value)

Inserts an item into a menu.

Parameters

pos : int

The position (zero-based) the item should be inserted.

flags : int

Flags for the new item.

id=0 : int

The ID for the new item.

value=None : string/None

A string for the menu item.

Alternative Parameters

pos

The position (zero-based) the item should be inserted.

flags

Flags for the new item.

id

The ID for the new item.

value

A string for the menu item.


PyCMenu.ModifyMenu

ModifyMenu(pos, flags, id, value)

Modify an item in a menu.

Parameters

pos : int

The position (zero-based) the item to be changed.

flags : int

Flags for the item.

id=0 : int

The ID for the item.

value=None : string/None

A string for the menu item.


PyCMenu.TrackPopupMenu

TrackPopupMenu((x,y), flags, owner)

Creates a popup menu anywhere on the screen.

Parameters

(x,y) : (int, int)

The position for the menu..

flags=win32con.TPM_LEFTALIGN|win32con.TPM_LEFTBUTTON|win32con.TPM_RIGHTBUTTON : int

Flags for the menu.

owner=(main application frame) : PyCWnd

The owner of the menu.

Comments

The TrackPopupMenu function displays a floating pop-up menu at the specified location and tracks the selection of items on the pop-up menu. The floating pop-up menu can appear anywhere on the screen.

Return Value

If the underlying MFC function fails, but TPM_RETURNCMD is set in the flags parameter, then None is returned instead of the normal exception.


PyCOleClientItem

PyCOleClientItem Object

An OLE client item class. Encapsulates an MFC COleClientItem class

Methods

CreateNewItem
Creates an embedded item.

Close
Closes the item.

DoVerb
Executes the specified verb.

Draw
Draws the OLE item into the specified bounding rectangle using the specified device context.

GetActiveView
Obtains the active view for the item

GetDocument
Obtains the current document for the item

GetInPlaceWindow
Obtains the window in which the item has been opened for in-place editing.

GetItemState
Obtains the OLE item's current state

GetObject
Returns the COM object to the item. This is the m_lpObject variable in MFC.

GetStorage
Returns the COM object used for storage

OnActivate
Calls the underlying MFC handler.

OnChange
Calls the underlying MFC handler.

OnChangeItemPosition
Calls the underlying MFC method.

OnDeactivateUI
Calls the underlying MFC method.

Run
Runs the application associated with this item.

SetItemRects
Sets the bounding rectangle or the visible rectangle of the OLE item.


PyCOleClientItem.Close

Close()

Closes the item


PyCOleClientItem.CreateNewItem

CreateNewItem()

Creates an embedded item.


PyCOleClientItem.DoVerb

DoVerb()

Executes the specified verb.


PyCOleClientItem.Draw

Draw()

Draws the OLE item into the specified bounding rectangle using the specified device context.


PyCOleClientItem.GetActiveView

PyCView = GetActiveView()

Obtains the active view for the item


PyCOleClientItem.GetDocument

PyCDocument = GetDocument()

Obtains the current document for the item


PyCOleClientItem.GetInPlaceWindow

PyCWnd = GetInPlaceWindow()

Obtains the window in which the item has been opened for in-place editing.


PyCOleClientItem.GetItemState

GetItemState()

Obtains the OLE item's current state


PyCOleClientItem.GetObject

PyIUnknown = GetObject()

Returns the COM object to the item. This is the m_lpObject variable in MFC.


PyCOleClientItem.GetStorage

GetStorage()

Returns the COM object used for storage


PyCOleClientItem.OnActivate

OnActivate()

Calls the underlying MFC method.


PyCOleClientItem.OnChange

OnChange()

Calls the underlying MFC method.


PyCOleClientItem.OnChangeItemPosition

int = OnChangeItemPosition()

Calls the underlying MFC method.

Return Value

The result is a BOOL indicating if the function succeeded. No exception is thrown.


PyCOleClientItem.OnDeactivateUI

int = OnDeactivateUI()

Calls the underlying MFC method.


PyCOleClientItem.Run

Run()

Runs the application associated with this item.


PyCOleClientItem.SetItemRects

SetItemRects()

Sets the bounding rectangle or the visible rectangle of the OLE item.


PyCOleDialog

PyCOleDialog Object

An abstract class which encapsulates an MFC COleDialog object. Derived from a PyCCommonDialog object.


PyCOleDocument

PyCOleDocument Object

An OLE document class. Encapsulates an MFC COleDocument class

Methods

EnableCompoundFile
Call this function if you want to store the document using the compound-file format

GetStartPosition
Obtains the position of the first item in the document.

GetNextItem
Call this function repeatedly to access each of the items in your document.

GetInPlaceActiveItem
Obtains the OLE item that is currently activated in place in the frame window containing the view identified by obWnd. sentinel


PyCOleDocument.EnableCompoundFile

EnableCompoundFile(bEnable)

Call this function if you want to store the document using the compound-file format.

Parameters

bEnable=1 : int

Specifies whether compound file support is enabled or disabled.


PyCOleDocument.GetInPlaceActiveItem

PyCOleClientItem = GetInPlaceActiveItem(wnd)

Obtains the OLE item that is currently activated in place in the frame window containing the view identified by obWnd.

Parameters

wnd : PyCWnd

The window.


PyCOleDocument.GetNextItem

(POSITION, PyCOleClientItem) = GetNextItem(pos)

Call this function repeatedly to access each of the items in your document.

Parameters

pos : POSITION

The position to iterate from.


PyCOleDocument.GetStartPosition

POSITION = GetStartPosition()

Obtains the position of the first item in the document.


PyCOleInsertDialog

PyCOleInsertDialog Object

An OLE 'Insert Object' dialog. Encapsulates an MFC COleInsertDialog class

Methods

GetClassID
Returns the CLSID associated with the selected item

GetSelectionType
Returns the type of selection made

GetPathName
Returns the full path to the file selected in the dialog box


PyCOleInsertDialog.GetClassID

CLSID = GetClassID()

Returns the CLSID associated with the selected item


PyCOleInsertDialog.GetPathName

CLSID = GetPathName()

Returns the full path to the file selected in the dialog box

Comments

Do not call this if the selection type is createNewItem,


PyCOleInsertDialog.GetSelectionType

CLSID = GetSelectionType()

Returns the type of selection made


PyCPrintDialog

PyCPrintDialog Object

An object which encapsulates an MFC CPrintDialog object.


PyCPrintDialog.OnCancel

PyCPrintDialog.OnCancel Virtual

OnCancel()

Called by the MFC architecture when the user selects the Cancel button.

Comments

The procedure is expected to dismiss the window with the PyCPrintDialog::EndDialog method. The base implementation (which dismisses the dialog) is not called if a handler exists. This can be done via PyCPrintDialog::OnCancel .

See Also

PyCDialog::OnCancel


PyCPrintDialog.OnOK

PyCPrintDialog.OnOK Virtual

OnOK()

Called by the MFC architecture when the user selects the OK button.

Comments

The procedure is expected to dismiss the window with the PyCPrintDialog::EndDialog method. The base implementation (which dismisses the dialog) is not called if a handler exists. This can be done via PyCPrintDialog::OnOK .

See Also

PyCDialogDialog::OnOK


PyCPrintInfo

PyCPrintInfo Object

Encapsulates an MFC CPrintInfo class, its member CPrintDialog class, and the PRINTDLG structure member of the CPrintDialog.

Methods

DocObject
A flag indicating whether the document being printed is a DocObject.

GetDwFlags
A flags specifying DocObject printing operations. Valid only if data member m_bDocObject is TRUE.

SetDwFlags
Set a flag specifying DocObject printing operations. Valid only if data member m_bDocObject is TRUE.

GetDocOffsetPage
Get the number of pages preceding the first page of a particular DocObject in a combined DocObject print job.

SetDocOffsetPage
Set the number of pages preceding the first page of a particular DocObject in a combined DocObject print job.

SetPrintDialog
Set a pointer to the CPrintDialog object used to display the Print dialog box for the print job.

GetDirect
TRUE if the Print dialog box will be bypassed for direct printing; FALSE otherwise.

SetDirect
Sets to TRUE if the Print dialog box will be bypassed for direct printing; FALSE otherwise.

GetPreview
A flag indicating whether the document is being previewed.

SetPreview
Set whether the document is being previewed.

GetContinuePrinting
A flag indicating whether the framework should continue the print loop.

SetContinuePrinting
Set whether the framework should continue the print loop.

GetCurPage
Get the number of the current page.

SetCurPage
Set the number of the current page.

GetNumPreviewPages
Get the number of pages displayed in preview mode.

SetNumPreviewPages
Set the number of pages displayed in preview mode.

GetUserData
Get a user-created structure.

SetUserData
Set a user-created structure.

GetDraw
Get the usable drawing area of the page in logical coordinates.

SetDraw
Set the usable drawing area of the page in logical coordinates.

GetPageDesc
Get the format string used to display the page numbers during print preview

SetPageDesc
Set the format string used to display the page numbers during print preview

GetMinPage
Get the number of the first page of the document.

SetMinPage
Set the number of the first page of the document.

GetMaxPage
Get the number of the last page of the document.

SetMaxPage
Set the number of the last page of the document.

GetOffsetPage
Get the number of pages preceding the first page of a DocObject item being printed in a combined DocObject print job.

GetFromPage
The number of the first page to be printed.

GetToPage
The number of the last page to be printed.

SetHDC
Sets the printer DC compatible with the users choices, call after the print dialog DoModal finishes.

CreatePrinterDC
Handle to the newly created printer device context, call only after DoModal finishes.

DoModal
Call DoModal on the dialog.

GetCopies
The number of copies requested, call only after DoModal finishes.

GetDefaults
Retrieves device defaults without displaying a dialog box.

FreeDefaults
After a call to GetDefaults, and you are through with the CPrintDialog object, this call deletes the printer DC and calls GlobalFree function on the handles.

GetDeviceName
The name of the currently selected printer, call only after DoModal finishes.

GetDriverName
The name of the currently selected printer device driver, call only after DoModal finishes.

GetDlgFromPage
Retrieves the starting page of the print range.

GetDlgToPage
Retrieves the ending page of the print range.

GetPortName
The name of the currently selected printer port, call only after DoModal finishes.

GetPrinterDC
A handle to the printer device context if successful; otherwise NULL. If the bPrintSetupOnly parameter of the CPrintDialog constructor was FALSE (indicating that the Print dialog box is displayed), then GetPrinterDC returns a handle to the printer device context. You must call the WindowsDeleteDC function to delete the device context when you are done using it.

PrintAll
Nonzero if all pages in the document are to be printed; otherwise 0, call only after DoModal finishes.

PrintCollate
Nonzero if the user selects the collate check box in the dialog box; otherwise 0, call only after DoModal finishes.

PrintRange
Nonzero if only a range of pages in the document are to be printed; otherwise 0, call only after DoModal finishes.

PrintSelection
Nonzero if only the selected items are to be printed; otherwise 0., call only after DoModal finishes

GetHDC
Identifies a device context or an information context, depending on whether the Flags member specifies the PD_RETURNDC or PC_RETURNIC flag. If neither flag is specified, the value of this member is undefined. If both flags are specified, PD_RETURNDC has priority.

GetFlags
A set of bit flags that you can use to initialize the Print common dialog box. When the dialog box returns, it sets these flags to indicate the user's input.

SetFlags
A set of bit flags that you can use to initialize the Print common dialog box. When the dialog box returns, it sets these flags to indicate the user's input.

SetFromPage
The number of the first page to be printed.

SetToPage
The number of the first page to be printed.

GetPRINTDLGMinPage
Get the minimum value for the page range specified in the From and To page edit controls. If nMinPage equals nMaxPage, the Pages radio button and the starting and ending page edit controls are disabled.

SetPRINTDLGMinPage
Set the minimum value for the page range specified in the From and To page edit controls. If nMinPage equals nMaxPage, the Pages radio button and the starting and ending page edit controls are disabled.

GetPRINTDLGCopies
Gets the initial number of copies for the Copies edit control if hDevMode is NULL; otherwise, the dmCopies member of the DEVMODE structure contains the initial value.

SetPRINTDLGCopies
Sets the initial number of copies for the Copies edit control if hDevMode is NULL; otherwise, the dmCopies member of the DEVMODE structure contains the initial value.


PyCPrintInfo.CreatePrinterDC

CreatePrinterDC()

Handle to the newly created printer device context, call only after DoModal finishes.

MFC References

CPrintDialog::CreatePrinterDC


PyCPrintInfo.DoModal

DoModal()

Call DoModal on the dialog.

MFC References

CPrintDialog::DoModal


PyCPrintInfo.DocObject

DocObject()

Return true if the document being printed is a DocObject.

MFC References

CPrintInfo::m_bDocObject


PyCPrintInfo.FreeDefaults

FreeDefaults()

After a call to GetDefaults, and you are through with the CPrintDialog object, this call deletes the printer DC and calls GlobalFree function on the handles.

MFC References

CPrintDialog::GetDefaults


PyCPrintInfo.GetContinuePrinting

GetContinuePrinting()

A flag indicating whether the framework should continue the print loop.

MFC References

CPrintInfo::m_bContinuePrinting


PyCPrintInfo.GetCopies

GetCopies()

The number of copies requested, call only after DoModal finishes.

MFC References

CPrintDialog::GetCopies


PyCPrintInfo.GetCurPage

GetCurPage()

Get the number of the current page.

MFC References

CPrintInfo::m_nCurPage


PyCPrintInfo.GetDefaults

GetDefaults()

Nonzero if the function was successful; otherwise 0. Call this function to retrieve the device defaults of the default printer without displaying a dialog box. The retrieved values are placed in the m_pd structure. In some cases, a call to this function will call the constructor for CPrintDialog with bPrintSetupOnly set to FALSE. In these cases, a printer DC and hDevNames and hDevMode (two handles located in the m_pd data member) are automatically allocated. If the constructor for CPrintDialog was called with bPrintSetupOnly set to FALSE, this function will not only return hDevNames and hDevMode (located in m_pd.hDevNames and m_pd.hDevMode) to the caller, but will also return a printer DC in m_pd.hDC. It is the responsibility of the caller to delete the printer DC and call the WindowsGlobalFree function on the handles when you are finished with the CPrintDialog object.

MFC References

CPrintDialog::GetDefaults


PyCPrintInfo.GetDeviceName

GetDeviceName()

The name of the currently selected printer, call only after DoModal finishes.

MFC References

CPrintDialog::GetDeviceName


PyCPrintInfo.GetDirect

GetDirect()

TRUE if the Print dialog box will be bypassed for direct printing; FALSE otherwise.

MFC References

CPrintInfo::m_bDirect


PyCPrintInfo.GetDlgFromPage

GetDlgFromPage()

Retrieves the starting page of the print range.

MFC References

CPrintDialog::GetDlgFromPage


PyCPrintInfo.GetDlgToPage

GetDlgToPage()

Retrieves the ending page of the print range.

MFC References

CPrintDialog::GetDlgToPage


PyCPrintInfo.GetDocOffsetPage

GetDocOffsetPage()

Get the number of pages preceding the first page of a particular DocObject in a combined DocObject print job.

MFC References

CPrintInfo::m_nOffsetPage


PyCPrintInfo.GetDraw

GetDraw()

Get the usable drawing area of the page in logical coordinates.

MFC References

CPrintInfo::m_rectDraw


PyCPrintInfo.GetDriverName

GetDriverName()

The name of the currently selected printer device driver, call only after DoModal finishes.

MFC References

CPrintDialog::GetDriverName


PyCPrintInfo.GetDwFlags

GetDwFlags()

A flags specifying DocObject printing operations. Valid only if data member m_bDocObject is TRUE.

MFC References

CPrintInfo::m_dwFlags


PyCPrintInfo.GetFlags

GetFlags()

A set of bit flags that you can use to initialize the Print common dialog box. When the dialog box returns, it sets these flags to indicate the user's input. This member can be a combination of the following flags: PD_ALLPAGES, PD_COLLATE, PD_DISABLEPRINTTOFILE, PD_ENABLEPRINTHOOK, PD_ENABLEPRINTTEMPLATE, PD_ENABLEPRINTTEMPLATEHANDLE, PD_ENABLESETUPHOOK, PD_ENABLESETUPTEMPLATE, PD_ENABLESETUPTEMPLATEHANDLE, PD_HIDEPRINTTOFILE, PD_NONETWORKBUTTON, PD_NOPAGENUMS, PD_NOSELECTION, PD_NOWARNING, PD_PAGENUMS, PD_PRINTSETUP, PD_PRINTTOFILE, PD_RETURNDC, PD_RETURNDEFAULT, PD_RETURNIC, PD_SELECTION, PD_SHOWHELP, PD_USEDEVMODECOPIES, PD_USEDEVMODECOPIESANDCOLLATE.

MFC References

PRINTDLG::Flags


PyCPrintInfo.GetFromPage

GetFromPage()

The number of the first page to be printed.

MFC References

CPrintInfo::GetFromPage


PyCPrintInfo.GetHDC

GetHDC()

Identifies a device context or an information context, depending on whether the Flags member specifies the PD_RETURNDC or PC_RETURNIC flag. If neither flag is specified, the value of this member is undefined. If both flags are specified, PD_RETURNDC has priority.

MFC References

PRINTDLG::hDC


PyCPrintInfo.GetMaxPage

GetMaxPage()

Get the number of the last page of the document.

MFC References

CPrintInfo::GetMaxPage


PyCPrintInfo.GetMinPage

GetMinPage()

Get the number of the first page of the document.

MFC References

CPrintInfo::GetMinPage


PyCPrintInfo.GetNumPreviewPages

GetNumPreviewPages()

Get the number of pages displayed in preview mode.

MFC References

CPrintInfo::m_nNumPreviewPages


PyCPrintInfo.GetOffsetPage

GetOffsetPage()

Get the number of pages preceding the first page of a DocObject item being printed in a combined DocObject print job. This currently does NOT work, as, if I include the symbol pInfo->GetOffsetPage(), the link fails to find its definition. Allways returns 0.

MFC References

CPrintInfo::GetOffsetPage


PyCPrintInfo.GetPRINTDLGCopies

GetPRINTDLGCopies()

Get the initial number of copies for the Copies edit control if hDevMode is NULL; otherwise, the dmCopies member of theDEVMODE structure contains the initial value. When PrintDlg returns, nCopies contains the actual number of copies to print. This value depends on whether the application or the printer driver is responsible for printing multiple copies. If the PD_USEDEVMODECOPIESANDCOLLATE flag is set in the Flags member, nCopies is always 1 on return, and the printer driver is responsible for printing multiple copies. If the flag is not set, the application is responsible for printing the number of copies specified by nCopies. For more information, see the description of the PD_USEDEVMODECOPIESANDCOLLATE flag.

MFC References

PRINTDLG::nCopies


PyCPrintInfo.GetPRINTDLGMinPage

GetPRINTDLGMinPage()

Get the minimum value for the page range specified in the From and To page edit controls. If nMinPage equals nMaxPage, the Pages radio button and the starting and ending page edit controls are disabled.

MFC References

PRINTDLG::nMinPage


PyCPrintInfo.GetPageDesc

GetPageDesc()

Get the format string used to display the page numbers during print preview

MFC References

CPrintInfo::m_strPageDesc


PyCPrintInfo.GetPortName

GetPortName()

The name of the currently selected printer port, call only after DoModal finishes.

MFC References

CPrintDialog::GetPortName


PyCPrintInfo.GetPreview

GetPreview()

A flag indicating whether the document is being previewed.

MFC References

CPrintInfo::m_bPreview


PyCPrintInfo.GetPrinterDC

GetPrinterDC()

A handle to the printer device context if successful; otherwise NULL. If the bPrintSetupOnly parameter of the CPrintDialog constructor was FALSE (indicating that the Print dialog box is displayed), then GetPrinterDC returns a handle to the printer device context. You must call the WindowsDeleteDC function to delete the device context when you are done using it.

MFC References

CPrintDialog::GetPrinterDC


PyCPrintInfo.GetToPage

GetToPage()

The number of the last page to be printed.

MFC References

CPrintInfo::GetToPage


PyCPrintInfo.GetUserData

GetUserData()

Get a user-created structure.

MFC References

CPrintInfo::m_lpUserData


PyCPrintInfo.PrintAll

PrintAll()

Nonzero if all pages in the document are to be printed; otherwise 0, call only after DoModal finishes.

MFC References

CPrintDialog::PrintAll


PyCPrintInfo.PrintCollate

PrintCollate()

Nonzero if the user selects the collate check box in the dialog box; otherwise 0, call only after DoModal finishes.

MFC References

CPrintDialog::PrintCollate


PyCPrintInfo.PrintRange

PrintRange()

Nonzero if only a range of pages in the document are to be printed; otherwise 0, call only after DoModal finishes.

MFC References

CPrintDialog::PrintRange


PyCPrintInfo.PrintSelection

PrintSelection()

Nonzero if only the selected items are to be printed; otherwise 0., call only after DoModal finishes

MFC References

CPrintDialog::PrintSelection


PyCPrintInfo.SetContinuePrinting

SetContinuePrinting()

Set whether the framework should continue the print loop.

MFC References

CPrintInfo::m_bContinuePrinting


PyCPrintInfo.SetCurPage

SetCurPage()

Set the number of the current page.

MFC References

CPrintInfo::m_nCurPage


PyCPrintInfo.SetDirect

SetDirect()

Sets to TRUE if the Print dialog box will be bypassed for direct printing; FALSE otherwise.

MFC References

CPrintInfo::m_bDirect


PyCPrintInfo.SetDocOffsetPage

SetDocOffsetPage()

Set the number of pages preceding the first page of a particular DocObject in a combined DocObject print job.

MFC References

CPrintInfo::m_nOffsetPage


PyCPrintInfo.SetDraw

SetDraw()

Set the usable drawing area of the page in logical coordinates.

MFC References

CPrintInfo::m_rectDraw


PyCPrintInfo.SetDwFlags

SetDwFlags()

Set a flag specifying DocObject printing operations. Valid only if data member m_bDocObject is TRUE.

MFC References

CPrintInfo::m_dwFlags


PyCPrintInfo.SetFlags

SetFlags()

A set of bit flags that you can use to initialize the Print common dialog box. When the dialog box returns, it sets these flags to indicate the user's input. This member can be a combination of the following flags: PD_ALLPAGES, PD_COLLATE, PD_DISABLEPRINTTOFILE, PD_ENABLEPRINTHOOK, PD_ENABLEPRINTTEMPLATE, PD_ENABLEPRINTTEMPLATEHANDLE, PD_ENABLESETUPHOOK, PD_ENABLESETUPTEMPLATE, PD_ENABLESETUPTEMPLATEHANDLE, PD_HIDEPRINTTOFILE, PD_NONETWORKBUTTON, PD_NOPAGENUMS, PD_NOSELECTION, PD_NOWARNING, PD_PAGENUMS, PD_PRINTSETUP, PD_PRINTTOFILE, PD_RETURNDC, PD_RETURNDEFAULT, PD_RETURNIC, PD_SELECTION, PD_SHOWHELP, PD_USEDEVMODECOPIES, PD_USEDEVMODECOPIESANDCOLLATE.

MFC References

PRINTDLG::Flags


PyCPrintInfo.SetFromPage

SetFromPage()

The number of the first page to be printed.

MFC References

PRINTDLG::nFromPage


PyCPrintInfo.SetHDC

SetHDC(hdc)

Sets the printer DC compatible with the users choices, call after the print dialog DoModal finishes.

Parameters

hdc : int

The DC.

MFC References

CPrintInfo::m_pPD

CPrintDialog::m_pd.hDC


PyCPrintInfo.SetMaxPage

SetMaxPage()

Set the number of the last page of the document.

MFC References

CPrintInfo::SetMaxPage


PyCPrintInfo.SetMinPage

SetMinPage()

Set the number of the first page of the document.

MFC References

CPrintInfo::SetMinPage


PyCPrintInfo.SetNumPreviewPages

SetNumPreviewPages()

Set the number of pages displayed in preview mode.

MFC References

CPrintInfo::m_nNumPreviewPages


PyCPrintInfo.SetPRINTDLGCopies

SetPRINTDLGCopies()

Set the initial number of copies for the Copies edit control if hDevMode is NULL; otherwise, the dmCopies member of theDEVMODE structure contains the initial value. When PrintDlg returns, nCopies contains the actual number of copies to print. This value depends on whether the application or the printer driver is responsible for printing multiple copies. If the PD_USEDEVMODECOPIESANDCOLLATE flag is set in the Flags member, nCopies is always 1 on return, and the printer driver is responsible for printing multiple copies. If the flag is not set, the application is responsible for printing the number of copies specified by nCopies. For more information, see the description of the PD_USEDEVMODECOPIESANDCOLLATE flag.

MFC References

PRINTDLG::nCopies


PyCPrintInfo.SetPRINTDLGMinPage

SetPRINTDLGMinPage()

Set the minimum value for the page range specified in the From and To page edit controls. If nMinPage equals nMaxPage, the Pages radio button and the starting and ending page edit controls are disabled.

MFC References

PRINTDLG::nMinPage


PyCPrintInfo.SetPageDesc

SetPageDesc()

Set the format string used to display the page numbers during print preview

MFC References

CPrintInfo::m_strPageDesc


PyCPrintInfo.SetPreview

SetPreview()

Set whether the document is being previewed.

MFC References

CPrintInfo::m_bPreview


PyCPrintInfo.SetPrintDialog

SetPrintDialog()

Set a pointer to the CPrintDialog object used to display the Print dialog box for the print job.

MFC References

CPrintInfo::m_pPD


PyCPrintInfo.SetToPage

SetToPage()

The number of the last page to be printed.

MFC References

PRINTDLG::nToPage


PyCPrintInfo.SetUserData

SetUserData()

Set a user-created structure.

MFC References

CPrintInfo::m_lpUserData


PyCProgressCtrl

PyCProgressCtrl Object

A windows progress bar control. Encapsulates an MFC CProgressCtrl class. Derived from PyCControl.

Methods

CreateWindow
Creates the window for a new progress bar object.

SetRange
Sets the lower and upper bounds for the progress bar.

SetPos
Set the control's position

OffsetPos
Advances the progress bar control's current position by the increment specified.

SetStep
Specifies the step increment for a progress bar control.

StepIt
Advances the current position for a progress bar control by the step increment. Returns previous position.


PyCProgressCtrl.CreateWindow

CreateWindow(style, rect, parent, id)

Creates the actual control.

Parameters

style : int

The style for the control.

rect : (left, top, right, bottom)

The size and position of the control.

parent : PyCWnd

The parent window of the control. Usually a PyCDialog.

id : int

The control's ID.


PyCProgressCtrl.OffsetPos

int = OffsetPos(nPos)

Advances the progress bar control's current position by the increment specified

Parameters

nPos=1 : int

Amount to advance the position.


PyCProgressCtrl.SetPos

int = SetPos(nPos)

Set the control's position

Parameters

nPos=1 : int

New position of the progress bar control.


PyCProgressCtrl.SetRange

SetRange(nLower, nUpper)

Set the control's bounds

Parameters

nLower=1 : int

Specifies the lower limit of the range (default is zero).

nUpper=1 : int

Specifies the upper limit of the range (default is 100).


PyCProgressCtrl.SetStep

int = SetStep(nStep)

Specifies the step increment for a progress bar control.

Parameters

nStep=1 : int

New step increment.


PyCProgressCtrl.StepIt

int = StepIt()

Advances the current position for a progress bar control by the step increment. Returns previous position.


PyCPropertyPage

PyCPropertyPage Object

A class which encapsulates an MFC CPropertyPage object. Derived from a PyCDialog object.

Methods

CancelToClose
Changes the Cancel button to Close.

OnCancel
Calls the default MFC OnCancel handler.

OnOK
Calls the default MFC OnOK handler.

OnApply
Calls the default MFC OnApply handler.

OnReset
Calls the default MFC OnReset handler.

OnQueryCancel
Calls the default MFC OnQueryCancel handler.

OnWizardBack
Calls the default MFC OnWizardBack handler.

OnWizardNext
Calls the default MFC OnWizardNext handler.

OnWizardFinish
Calls the default MFC OnWizardFinish handler.

OnSetActive
Calls the default MFC OnSetActive handler.

OnKillActive
Calls the default MFC OnKillActive handler.

SetModified
Sets the modified flag (for the Apply button).

SetPSPBit
Sets (or clears) a bit in m_psp.dwFlags.


PyCPropertyPage.CancelToClose

CancelToClose()

Changes the Cancel button to Close.


PyCPropertyPage.OnApply

OnApply()

Calls the default MFC OnApply handler.

See Also

PyCPropertyPage.OnApply virtual method


PyCPropertyPage.OnCancel

OnCancel()

Calls the default MFC OnCancel handler.

See Also

PyCDialog.OnCancel virtual method


PyCPropertyPage.OnKillActive

int = OnKillActive()

Calls the default MFC OnKillActive handler.

See Also

PyCPropertyPage.OnKillActive virtual method

PyCPropertyPage.OnKillActive virtual method

Return Value

The result is true if the page should be deselected. Typically this result should be passed to the original OnSetActive handler.


PyCPropertyPage.OnOK

OnOK()

Calls the default MFC OnOK handler.

See Also

PyCDialog.OnOK virtual method


PyCPropertyPage.OnQueryCancel

OnQueryCancel()

Calls the default MFC OnQueryCancel handler.

See Also

PyCPropertyPage.OnQueryCancel virtual method


PyCPropertyPage.OnReset

OnReset()

Calls the default MFC OnReset handler.

See Also

PyCPropertyPage.OnReset virtual method


PyCPropertyPage.OnSetActive

int = OnSetActive()

Calls the default MFC OnSetActive handler.

See Also

PyCPropertyPage.OnSetActive virtual method

PyCPropertyPage.OnSetActive virtual method

Return Value

The result is true if the page should be made active. Typically this result should be passed to the original OnSetActive handler.


PyCPropertyPage.OnWizardBack

OnWizardBack()

Calls the default MFC OnWizardBack handler.

See Also

PyCPropertyPage.OnWizardBack virtual method


PyCPropertyPage.OnWizardFinish

OnWizardFinish()

Calls the default MFC OnWizardFinish handler.

See Also

PyCPropertyPage.OnWizardFinish virtual method


PyCPropertyPage.OnWizardNext

OnWizardNext()

Calls the default MFC OnWizardNext handler.

See Also

PyCPropertyPage.OnWizardNext virtual method


PyCPropertyPage.SetModified

SetModified(bChanged)

Sets the modified flag.

Parameters

bChanged=1 : int

A flag to indicate the new modified state.


PyCPropertyPage.SetPSPBit

SetPSPBit(bitMask, bitValue)

Sets or clears a bit in m_psp.dwFlags

Parameters

bitMask : int

The PSP_* bit mask constant

bitValue : int

1 to set, 0 to clear


PyCPropertySheet

PyCPropertySheet Object

A class which encapsulates an MFC CPropertySheet object. Derived from a PyCWnd object.

Methods

AddPage
Adds the supplied page with the rightmost tab in the property sheet.

CreateWindow
Displays the property sheet as a modeless dialog.

DoModal
Displays the property sheet as a modal dialog.

EnableStackedTabs
Enables or disables stacked tabs.

EndDialog
Closes the dialog, with the specified result.

GetActiveIndex
Retrieves the index of the active page of the property sheet.

GetActivePage
Returns the currently active property page.

GetPage
Returns the specified property page.

GetPageIndex
Retrieves the index of the specified page of the property sheet.

GetPageCount
Returns the number of pages.

GetTabCtrl
Returns the tab control used by the sheet.

OnInitDialog
Calls the default MFC OnInitDialog handler.

PressButton
Simulates the choice of the specified button in a property sheet.

RemovePage
Removes the specified page from the sheet.

SetActivePage
Programmatically sets the active page object.

SetTitle
Sets the caption for the property sheet.

SetFinishText
Sets the text for the Finish button

SetWizardMode
Enables the wizard mode

SetWizardButtons
Enables the wizard buttons

SetPSHBit
Sets (or clears) a bit in m_psh.dwFlags.


PyCPropertySheet.AddPage

AddPage(page)

Adds the supplied page with the rightmost tab in the property sheet.

Parameters

page : PyCPropertyPage

The page to be added.

Comments

Add pages to the property sheet in the left-to-right order you want them to appear.

MFC References

PyCPropertySheet::AddPage


PyCPropertySheet.CreateWindow

CreateWindow(parent, style, exStyle)

Displays the property sheet as a modeless dialog.

Parameters

parent=None : PyCWnd

The parent of the dialog.

style=WS_SYSMENU|WS_POPUP|WS_CAPTION|DS_MODALFRAME|WS_VISIBLE : int

The style for the window.

exStyle=WS_EX_DLGMODALFRAME : int

The extended style for the window.


PyCPropertySheet.DoModal

int = DoModal()

Displays the property sheet as a modal dialog.


PyCPropertySheet.EnableStackedTabs

PyCPropertyPage = EnableStackedTabs(stacked)

Enables or disables stacked tabs.

Parameters

stacked : int

A boolean flag


PyCPropertySheet.EndDialog

EndDialog(result)

Closes the dialog, with the specified result.

Parameters

result : int

The result to be returned by DoModal.


PyCPropertySheet.GetActiveIndex

int = GetActiveIndex()

Retrieves the index of the active page of the property sheet.


PyCPropertySheet.GetActivePage

PyCPropertyPage = GetActivePage()

Returns the currently active property page.

MFC References

PyCPropertySheet::GetActivePage


PyCPropertySheet.GetPage

PyCPropertyPage = GetPage(pageNo)

Returns the specified property page.

Parameters

pageNo : int

The index of the page toretrieve.

MFC References

PyCPropertySheet::GetPage


PyCPropertySheet.GetPageCount

int = GetPageCount()

Returns the number of pages.


PyCPropertySheet.GetPageIndex

int = GetPageIndex(page)

Retrieves the index of the specified page of the property sheet.

Parameters

page : PyCPropertyPage

The page.


PyCPropertySheet.GetTabCtrl

PyCTabCtrl = GetTabCtrl()

Returns the tab control used by the sheet.


PyCPropertySheet.OnInitDialog

int = OnInitDialog()

Calls the default MFC OnInitDialog handler.

See Also

PyCPropertySheet.OnInitDialog virtual method


PyCPropertySheet.PressButton

PressButton(button)

Simulates the choice of the specified button in a property sheet.

Parameters

button : int

The button to press


PyCPropertySheet.RemovePage

RemovePage(offset)

Removes the specified page from the sheet.

Parameters

offset : int

The page number to remove

Alternative Parameters

page

The page to remove


PyCPropertySheet.SetActivePage

SetActivePage(page)

Programmatically sets the active page object.

Parameters

page : PyCPropertyPage

The page.


PyCPropertySheet.SetFinishText

SetFinishText(text)

Sets the text for the Finish button

Parameters

text : string

The next for the button


PyCPropertySheet.SetPSHBit

SetPSHBit(bitMask, bitValue)

Sets or clears a bit in m_psh.dwFlags

Parameters

bitMask : int

The PSH_* bit mask constant

bitValue : int

1 to set, 0 to clear


PyCPropertySheet.SetTitle

SetTitle(title)

Sets the caption for the property sheet.

Parameters

title : string

The new caption


PyCPropertySheet.SetWizardButtons

SetWizardButtons(flags)

Enables the wizard buttons

Parameters

flags : int

The wizard flags


PyCPropertySheet.SetWizardMode

SetWizardMode()

Enables the wizard mode


PyCRect

PyCRect Object

A Python interface the the MFC CRect class.

Items

[0] int : left

[1] int : top

[2] int : right

[3] int : bottom


PyCRgn

PyCRgn Object

An object encapsulating an MFC PyCRgn class.


PyCRgn.CombineRgn

int = CombineRgn()

Creates a new GDI region by combining two existing regions. The regions are combined as specified by nCombineMode Return Values: success or failure flag (BOOL)


PyCRgn.CopyRgn

int = CopyRgn()

Copies the region defined by pRgnSrc into the CRgn object Return Values: success or failure flag (BOOL)


PyCRgn.CreateEllipticRgn

int = CreateEllipticRgn()

Initializes a region to an ellipse Return Values: success or failure flag (BOOL)


PyCRgn.CreateRectRgn

int = CreateRectRgn()

Initializes a region to a rectangle Return Values: success or failure flag (BOOL)


PyCRgn.DeleteObject

int = DeleteObject()

Deletes the attached Windows GDI Rgn object from memory by freeing all system storage associated with the Windows GDI object Return Values: None


PyCRgn.GetRgnBox

int = GetRgnBox()

Retrieves the coordinates of the bounding rectangle of the CRgn object Return Values: the bounding rectangle as a tuple (l,t,r,b)


PyCRgn.GetSafeHandle

int = GetSafeHandle()

A HANDLE to the attached Windows GDI object; otherwise NULL if no object is attached Return Values: the handle of the CRgn object


PyCRichEditCtrl

PyCRichEditCtrl Object

A windows Rich Text edit control. Encapsulates an MFC CRichEditCtrl class. Derived from a PyCControl object.

Methods

Clear
Clears all text from an edit control.

Copy
Copy the selection to the clipboard.

CreateWindow
Creates a rich edit control.

Cut
Cut the selection, and place it in the clipboard.

FindText
Finds text in the control

GetCharPos
Returns te location of the top-left corner of the specified character.

GetDefaultCharFormat
Returns the current default character formatting attributes in this PyCRichEditCtrl object.

GetEventMask
Returns the current event mask.

GetSelectionCharFormat
Returns the character formatting attributes of the current selection in this PyCRichEditCtrl object.

GetFirstVisibleLine
Returns zero-based index of the topmost visible line.

GetParaFormat
Returns the formatting of the current paragraph.

GetSel
Returns the selection.

GetSelText
Returns the currently selected text

GetTextLength
Returns the length of the text in the control.

GetLine
Returns a specified line.

GetModify
Determines if the control has been modified.

GetLineCount
Returns the number of lines in an edit control.

LimitText
Sets max length of text that user can enter

LineFromChar
Returns the line number of a given character.

LineIndex
Returns the line index

LineScroll
Scroll the control vertically and horizontally

Paste
Pastes the contents of the clipboard into the edit control.

ReplaceSel
Replace the selection with the specified text.

SetBackgroundColor
Sets the background color for the control.

SetDefaultCharFormat
Sets the current default character formatting attributes in this PyCRichEditCtrl object.

SetEventMask
Sets the event motification mask.

SetSelectionCharFormat
Sets the character formatting attributes for the selection in this PyCRichEditCtrl object.

SetModify
Sets the modified flag.

SetOptions
Sets options for the control.

SetParaFormat
Sets the paragraph formatting.

SetReadOnly
Set the read only status of an edit control.

SetSel
Changes the selection in an edit control.

SetSelAndCharFormat
Sets the selection and the char format.

SetTargetDevice
Sets the target device for the control

StreamIn
Invokes a callback to stream data into the control.

StreamOut
Invokes a callback to stream data out of the control.


PyCRichEditCtrl.Clear

int = Clear()

Clears all text in an edit control.

MFC References

CRichEditCtrl::Clear


PyCRichEditCtrl.Copy

Copy()

Copys the current selection to the clipboard.

MFC References

CRichEditCtrl::Copy


PyCRichEditCtrl.CreateWindow

CreateWindow(style, rect, parent, id)

Creates a rich edit control window.

Parameters

style : int

The control style

rect : int,int,int,int

The position of the control

parent : PyCWnd

The parent window. Must not be None

id : int

The control ID


PyCRichEditCtrl.Cut

Cut()

Cuts the current selection to the clipboard.

MFC References

CRichEditCtrl::Cut


PyCRichEditCtrl.FindText

int, (start, end) = FindText(charPos)

Finds text in the control

Parameters

charPos : int

The character position


PyCRichEditCtrl.GetCharPos

(tuple) = GetCharPos(charPos)

Returns the location of the top-left corner of the character specified by charPos.

Parameters

charPos : int

The character position

Return Value

The return value is a win32ui::CHARFORMAT tuple


PyCRichEditCtrl.GetDefaultCharFormat

(tuple) = GetDefaultCharFormat()

Returns the current default character formatting attributes in this PyCRichEditCtrl object.

MFC References

CRichEditCtrl::GetDefaultCharFormat

Return Value

The return value is a win32ui::CHARFORMAT tuple


PyCRichEditCtrl.GetEventMask

int = GetEventMask()

Returns the current event mask.

MFC References

CRichEditCtrl::GetEventMask


PyCRichEditCtrl.GetFirstVisibleLine

int = GetFirstVisibleLine()

Returns zero-based index of the topmost visible line.

MFC References

CRichEditCtrl::GetFirstVisibleLine

Return Value

The zero-based index of the topmost visible line. For single-line edit controls, the return value is 0.


PyCRichEditCtrl.GetLine

int = GetLine(lineNo)

Returns the text in a specified line.

Parameters

lineNo=current : int

Contains the zero-based index value for the desired line.

Comments

This function is not an MFC wrapper.


PyCRichEditCtrl.GetLineCount

int = GetLineCount()

Gets the number of lines in an edit control.

MFC References

CRichEditCtrl::GetLineCount

Return Value

The number of lines in the buffer. If the control is empty, the return value is 1.


PyCRichEditCtrl.GetModify

int = GetModify()

Nonzero if the text in this control has been modified; otherwise 0.

MFC References

CRichEditCtrl::GetModify


PyCRichEditCtrl.GetParaFormat

(tuple) = GetParaFormat()

Returns the current paragraph formatting attributes.

MFC References

CRichEditCtrl::GetParaFormat

Return Value

The return value is a win32ui::PARAFORMAT tuple


PyCRichEditCtrl.GetSel

(start, end) = GetSel()

Returns the start and end of the current selection.

MFC References

CRichEditCtrl::GetSel

Return Value

The return tuple is (the first character in the current selection, first nonselected character past the end of the current selection)


PyCRichEditCtrl.GetSelText

string = GetSelText()

Returns the currently selected text


PyCRichEditCtrl.GetSelectionCharFormat

(tuple) = GetSelectionCharFormat()

Returns the character formatting of the selection.

MFC References

CRichEditCtrl::GetSelectionCharFormat


PyCRichEditCtrl.GetTextLength

int = GetTextLength()

Returns the length of the text in the control.

MFC References

CRichEditCtrl::GetTextLength


PyCRichEditCtrl.LimitText

LimitText(nChars)

Sets max length of text that user can enter

Parameters

nChars=0 : int

Specifies the length (in bytes) of the text that the user can enter. If this parameter is 0, the text length is set to UINT_MAX bytes. This is the default behavior.

MFC References

CRichEditCtrl::LimitText


PyCRichEditCtrl.LineFromChar

int = LineFromChar(charNo)

Returns the line number of the specified character.

Parameters

charNo=-1 : int

Contains the zero-based index value for the desired character in the text of the edit control, or -1. If -1, then it specifies the current line.

MFC References

CRichEditCtrl::LineFromChar

Return Value

The zero-based line number of the line containing the character index specified by charNo. If charNo is -1, the number of the line that contains the first character of the selection is returned. If there is no selection, the current line number is returned.


PyCRichEditCtrl.LineIndex

int = LineIndex(lineNo)

Retrieves the character index of a line within a multiple-line edit control.

Parameters

lineNo=-1 : int

Contains the index value for the desired line in the text of the edit control, or contains -1. If -1, then it specifies the current line.

Comments

This method only works on multi-linr edit controls.

MFC References

CRichEditCtrl::LineIndex

Return Value

The character index of the line specified in lineNo, or -1 if the specified line number is greater then the number of lines in the edit control.


PyCRichEditCtrl.LineScroll

int = LineScroll(nLines, nChars )

Scroll the control vertically and horizontally

Parameters

nLines : int

Specifies the number of lines to scroll vertically.

nChars=0 : int

Specifies the number of character positions to scroll horizontally. This value is ignored if the edit control has either the ES_RIGHT or ES_CENTER style.

Comments

This method only works on multi-linr edit controls.

MFC References

CRichEditCtrl::LineScroll


PyCRichEditCtrl.Paste

Paste()

Pastes the contents of the clipboard into the control.

MFC References

CRichEditCtrl::Paste


PyCRichEditCtrl.ReplaceSel

ReplaceSel(text)

Replaces the selection with the specified text.

Parameters

text : string

The text to replace the selection with.

MFC References

CRichEditCtrl::ReplaceSel


PyCRichEditCtrl.SetBackgroundColor

int = SetBackgroundColor(bSysColor, cr )

Sets the background color for the control.

Parameters

bSysColor : int

Indicates if the background color should be set to the system value. If this value is TRUE, cr is ignored.

cr=0 : int

The requested background color. Used only if bSysColor is FALSE.

MFC References

CRichEditCtrl::SetEventMask

Return Value

The return value is the previous background color.


PyCRichEditCtrl.SetDefaultCharFormat

SetDefaultCharFormat(charFormat)

Sets the current default character formatting attributes in this PyCRichEditCtrl object.

Parameters

charFormat : tuple

A charformat tuple. See win32ui::CHARFORMAT tuple for details.

MFC References

CRichEditCtrl::SetDefaultCharFornmat


PyCRichEditCtrl.SetEventMask

int = SetEventMask(eventMask)

Sets the event motification mask.

Parameters

eventMask : int

The new event mask. Must be one of the win32con.ENM_* flags.

MFC References

CRichEditCtrl::SetEventMask

Return Value

The return value is the previous event mask.


PyCRichEditCtrl.SetModify

SetModify(modified)

Sets the modified flag for this control

Parameters

modified=1 : int

Indicates the new value for the modified flag.

MFC References

CRichEditCtrl::SetModify


PyCRichEditCtrl.SetOptions

SetOptions(op, flags)

Sets options for the control.

Parameters

op : int

Indicates the operation. Must be one of the win32con.ECOOP_* flags.

flags : int

Indicates the options. Must be one a combination of win32con.ECO_* flags.

MFC References

CRichEditCtrl::SetOptions


PyCRichEditCtrl.SetParaFormat

int = SetParaFormat(paraFormat)

Sets the paragraph formatting

Parameters

paraFormat : tuple

A charformat tuple. See win32ui::PARAFORMAT tuple for details.

MFC References

CRichEditCtrl::SetParaFormat

Return Value

This function seems to return occasionally return failure, but the formatting is applied. Therefore an exception is not raised on failure, but the BOOL return code is passed back.


PyCRichEditCtrl.SetReadOnly

SetReadOnly(bReadOnly)

Sets or clears the read-only status of the listbox.

Parameters

bReadOnly=1 : int

The read-only state to set.

MFC References

CRichEditCtrl::SetReadOnly


PyCRichEditCtrl.SetSel

SetSel(start, end)

Sets the selection in the edit control.

Parameters

start : int

Specifies the starting position. If start is 0 and end is -1, all the text in the edit control is selected. If start is -1, any current selection is removed.

end=start : int

Specifies the ending position.

Alternative Parameters

start,end)

As for normal start, end args.

MFC References

CRichEditCtrl::SetSel


PyCRichEditCtrl.SetSelAndCharFormat

SetSelAndCharFormat(charFormat)

Sets the selection and char format.

Parameters

charFormat : tuple

A charformat tuple. See win32ui::CHARFORMAT tuple for details.

Comments

Highly optimised for speed for color editors.

MFC References

CRichEditCtrl::SetSelectionCharFormat

CRichEditCtrl::SetSel


PyCRichEditCtrl.SetSelectionCharFormat

SetSelectionCharFormat(charFormat)

Sets the current selections character formatting attributes.

Parameters

charFormat : tuple

A charformat tuple. See win32ui::CHARFORMAT tuple for details.

MFC References

CRichEditCtrl::SetSelectionCharFormat


PyCRichEditCtrl.SetTargetDevice

SetTargetDevice(dc, lineWidth)

Sets the target device for the control

Parameters

dc : PyCDC

The new DC - may be None

lineWidth : int

Line width to use for formatting.

MFC References

CRichEditCtrl::SetTargetDevice


PyCRichEditCtrl.StreamIn

(int,int) = StreamIn(format, method )

Invokes a callback to stream data into the control.

Parameters

format : int

The format. One of the win32con.SF_* flags (SF_TEXT,SF_RTF)

method : object

A callable object (eg, a method or function) This method is called with a single integer param, which is the maximum number of bytes to fetch. The method should return a zero length string, or None to finish the operation, and a string otherwise.

MFC References

CRichEditCtrl::StreamIn

Return Value

The return value is a tuple of (no bytes written, error code)


PyCRichEditCtrl.StreamOut

(int, int) = StreamOut(format, method )

Invokes a callback to stream data into the control.

Parameters

format : int

The format. One of the win32con.SF_* flags (SF_TEXT,SF_RTF) and may also combine SFF_SELECTION.

method : object

A callable object (eg, a method or function) This method is called with a string parameter. It should return an integer, zero to abort, non zero otherwise.

MFC References

CRichEditCtrl::StreamOut

Return Value

The return value is a tuple of (no bytes written, error code)


PyCRichEditDoc

PyCRichEditDoc Object

A class which implements a CRichEditView object. Derived from PyCDocument.

Methods

OnCloseDocument
Call the MFC OnCloseDocument handler.


PyCRichEditDoc.OnCloseDocument

OnCloseDocument()

Call the MFC OnCloseDocument handler. This routine is provided so a document object which overrides this method can call the original MFC version if required.

See Also

PyCDocument.OnCloseDocument virtual method

MFC References

CRichEditDoc::OnCloseDocument


PyCRichEditDocTemplate

PyCRichEditDocTemplate Object

A document template class for OLE functionality. Encapsulates an MFC CDocTemplate class

Methods

DoCreateRichEditDoc
Creates an underlying document object.


PyCRichEditDocTemplate.DoCreateRichEditDoc

PyCRichEditDoc = DoCreateRichEditDoc(fileName)

Creates an underlying document object.

Parameters

fileName=None : string

The name of the file to load.


PyCRichEditView

PyCRichEditView Object

A class which implementes a CRichEditView. Derived from PyCRichEditView and PyCRichEditCtrl.

Methods

GetRichEditCtrl
Returns the underlying rich edit control object.

SetWordWrap
Sets the wordwrap state for the control.

WrapChanged
Calls the underlying WrapChanged method.

SaveTextFile
Saves the control to a text file


PyCRichEditView.GetRichEditCtrl

PyCRichEditCtrl = GetRichEditCtrl()

Returns the underlying rich edit control object.


PyCRichEditView.SaveTextFile

None = SaveTextFile()

Saves the contents of the control as a test file

Comments

Theere is no equivilent MFC method. This is implemented in this module for performance reasons.


PyCRichEditView.SetWordWrap

None = SetWordWrap(wordWrap)

Sets the wordwrap state for the control.

Parameters

wordWrap : int

The new word-wrap state.

MFC References

CRichEditCtrl::m_nWordWrap


PyCRichEditView.WrapChanged

None = WrapChanged()

Calls the underlying WrapChanged method.

MFC References

CRichEditCtrl::WrapChanged


PyCScrollView

PyCScrollView Object

A class which implements a generic CScrollView. Derived from a PyCView object.

Methods

GetDeviceScrollPosition
Return the position of the scroll bars (device units).

GetDC
Get the views current PyCDC

GetScrollPosition
Return the position of the scroll bars (logical units).

GetTotalSize
Return the total size of the views.

OnCommand
Calls the standard Python framework OnCommand handler

ResizeParentToFit
Call ResizeParentToFit to let the size of your view dictate the size of its frame window.

SetScaleToFitSize
Scales the viewport size to the current window size automatically.

ScrollToPosition
Scroll to a specified point.

SetScrollSizes
Set the scrolling sizes.

UpdateBars
Update the scroll bar state.


PyCScrollView.GetDC

PyCDC = GetDC()

Gets the view's current DC.


PyCScrollView.GetDeviceScrollPosition

(x,y) = GetDeviceScrollPosition()

Returns the positon of the scroll bars in device units.


PyCScrollView.GetScrollPosition

(x,y) = GetScrollPosition()

Returns the current position of the scroll bars (in logical units).


PyCScrollView.GetTotalSize

(x,y) = GetTotalSize()

Returns the total size of the view in logical units.


PyCScrollView.OnCommand

OnCommand(wparam, lparam)

Calls the standard Python framework OnCommand handler

Parameters

wparam : int

lparam : int

See Also

PyCWnd.OnCommand virtual method


PyCScrollView.ResizeParentToFit

tuple = ResizeParentToFit(bShrinkOnly)

Lets the size of a view dictate the size of its frame window.

Parameters

bShrinkOnly=1 : int

The kind of resizing to perform. The default value, TRUE, shrinks the frame window if appropriate.

Comments

This is recommended only for views in MDI child frame windows.
Use ResizeParentToFit in the OnInitialUpdate handler function of your View class.
You must ensure the parent's PyCFrameWnd::RecalcLayout is called before using this method.


PyCScrollView.ScrollToPosition

ScrollToPosition(position)

Scrolls to a given point in the view.

Parameters

position : (x,y)

The position to scroll to.


PyCScrollView.SetScaleToFitSize

SetScaleToFitSize(size)

Scales the viewport size to the current window size automatically.

Parameters

size : (x,y)

The horizontal and vertical sizes to which the view is to be scaled. The scroll view's size is measured in logical units.


PyCScrollView.SetScrollSizes

SetScrollSizes(mapMode, sizeTotal, sizePage, sizePage)

Sets the sizes of the scroll bars

Parameters

mapMode : int

The mapping mode for this view.

sizeTotal : (x,y)

The total size of the view. Sizes are in logical units. Both x and y must be greater than zero.

sizePage=win32ui.rectDefault : (x,y)

The number of untils to scroll in response to a page-down command.

sizePage=win32ui.rectDefault : (x,y)

The number of untils to scroll in response to a line-down command.


PyCScrollView.UpdateBars

UpdateBars()

Update the scroll bars state


PyCSliderCtrl

PyCSliderCtrl Object

A windows Slider bar control. Encapsulates an MFC CSliderCtrl class. Derived from PyCControl.

Methods

CreateWindow
Creates the window for a new Slider bar object.

GetLineSize
Get the control's line size

SetLineSize
Set the control's line size

GetPageSize
Get the control's Page size

SetPageSize
Set the control's Page size

GetRangeMax
Get the control's maximum

GetRangeMin
Get the control's minimum

GetRange
Get the control's minimum and maximum

GetRangeMax
Set the control's maximum

GetRangeMin
Set the control's minimum

SetRange
Set the control's minimum and maximum

GetSelection
Get the selection start and end positions

SetSelection
Set the selection start and end positions

GetChannelRect
Get the control's channel rect

GetThumbRect
Get the control's thumb rect

GetPos
Get the control's position

SetPos
Set the control's position

GetNumTics
Get the number of tics in the control

GetTicArray
Get the array of tic positions

GetTic
Get the position of the specified tic

GetTicPos
Get the position of the specified tic in client coordinates

SetTic
Set a tick at the position

SetTicFreq
Set the tic mark frequency

ClearSel
Clear any control selection

VerifyPos
Verify the positon between min and max

ClearTics
Clear any tic marks from the control


PyCSliderCtrl.ClearSel

int = ClearSel(bRedraw)

Clear the selection

Parameters

bRedraw=1 : int

Redraw the control?


PyCSliderCtrl.ClearTics

int = ClearTics(bRedraw)

Clear the control's tic marks

Parameters

bRedraw=1 : int

Redraw the control?


PyCSliderCtrl.CreateWindow

CreateWindow(style, rect, parent, id)

Creates the actual control.

Parameters

style : int

The style for the control.

rect : (left, top, right, bottom)

The size and position of the control.

parent : PyCWnd

The parent window of the control. Usually a PyCDialog.

id : int

The control's ID.


PyCSliderCtrl.GetChannelRect

int = GetChannelRect()

Get the control's channel rectangle


PyCSliderCtrl.GetLineSize

int = GetLineSize()

Get the control's position


PyCSliderCtrl.GetNumTics

int = GetNumTics()

Get number of tics in the slider


PyCSliderCtrl.GetPageSize

int = GetPageSize()

Get the control's position


PyCSliderCtrl.GetPos

int = GetPos()

Get the control's position


PyCSliderCtrl.GetRange

int = GetRange()

Get the control's min and max


PyCSliderCtrl.GetRangeMax

int = GetRangeMax()

Get the control's Maximum


PyCSliderCtrl.GetRangeMin

int = GetRangeMin()

Get the control's Minimum


PyCSliderCtrl.GetSelection

int = GetSelection()

Get the control's selection start and end positions


PyCSliderCtrl.GetThumbRect

int = GetThumbRect()

Get the control's thumb rectangle


PyCSliderCtrl.GetTic

int = GetTic(nTic)

Get the position of the specified tic number

Parameters

nTic=1 : int

Zero based index of the tic mark


PyCSliderCtrl.GetTicArray

int = GetTicArray()

Get a tuple of slider tic positions


PyCSliderCtrl.GetTicPos

int = GetTicPos(nTic)

Get the position of the specified tic number in client coordinates

Parameters

nTic=1 : int

Zero based index of the tic mark


PyCSliderCtrl.SetLineSize

int = SetLineSize(nLineSize)

Set the control's line size. Returns the previous line size.

Parameters

nLineSize=1 : int

New line size of the Slider bar control


PyCSliderCtrl.SetPageSize

int = SetPageSize(nPageSize)

Set the control's page size Returns the previous page size.

Parameters

nPageSize=1 : int

New page size of the Slider bar control.


PyCSliderCtrl.SetPos

int = SetPos(nPos)

Set the control's position

Parameters

nPos=1 : int

New position of the Slider bar control.


PyCSliderCtrl.SetRange

int = SetRange(nRangeMin, nRangeMax , bRedraw )

Set the control's min and max

Parameters

nRangeMin=1 : int

New minimum of the Slider bar control.

nRangeMax=1 : int

New maximum of the Slider bar control.

bRedraw=1 : int

Should slider be redrawn?


PyCSliderCtrl.SetSelection

int = SetSelection(nRangeMin, nRangeMax )

Set the control's selection start and end positions

Parameters

nRangeMin=1 : int

New start of the Slider's selection.

nRangeMax=1 : int

New end of the Slider's selection.


PyCSliderCtrl.SetTic

int = SetTic(nTic)

Set a tic at the specified position

Parameters

nTic=1 : int

Position of the desired tic mark


PyCSliderCtrl.SetTicFreq

int = SetTicFreq(nFreq)

Set the tic frequency

Parameters

nFreq=1 : int

Frequency of tic marks


PyCSliderCtrl.VerifyPos

int = VerifyPos()

Verify the position is between configured min and max


PyCSpinButtonCtrl

PyCSpinButtonCtrl Object

A windows spin button control. Encapsulates an MFC CSpinButtonCtrl object.

Methods

GetPos
Obtains the current position for a spin button control.

SetPos
Sets the current position for a spin button control.

SetRange
Sets the upper and lower limits (range) for a spin button control.

SetRange32
Sets the upper and lower limits (range) for a spin button control.


PyCSpinButtonCtrl.GetPos

int = GetPos()

Obtains the current position for a spin button control.


PyCSpinButtonCtrl.SetPos

int = SetPos(pos)

Sets the current position for a spin button control.

Parameters

pos : int

The new position.

Return Value

The result is the previous position.


PyCSpinButtonCtrl.SetRange

int = SetRange()

Sets the upper and lower limits (range) for a spin button control.


PyCSpinButtonCtrl.SetRange32

int = SetRange32()

Sets the 32 bit upper and lower limits (range) for a spin button control.


PyCSplitterWnd

PyCSplitterWnd Object

A class which encapsulates an MFC CSplitterWnd . Derived from a PyCWnd object.

Methods

GetPane
Returns the PyCWnd object associated with a splitter window pane.

CreateView
Creates a view in a splitter window

CreateStatic
Creates a static splitter window.

SetColumnInfo
Sets a new minimum height and ideal height for a column

SetRowInfo
Sets a new minimum height and ideal height for a row.

IdFromRowCol
Gets the child window ID for the specified child.

DoKeyboardSplit


PyCSplitterWnd.CreateStatic

CreateStatic(parent, rows, cols, style, id)

Creates a static splitter window.

Parameters

parent : PyCFrameWnd or PyCSplitter

The parent window.

rows : int

The number of rows in the splitter.

cols : int

The number of columns in the splitter.

style=WS_CHILD | WS_VISIBLE : int

Specifies the window style

id=AFX_IDW_PANE_FIRST : int

The child window ID of the window. The ID can be AFX_IDW_PANE_FIRST unless the splitter window is nested inside another splitter window.

Comments

A static splitter window is a splitter where the number of panes are fixed at window creation time. Currently this is the only splitter window supported by win32ui.

MFC References

CSplitterWnd::CreateStatic


PyCSplitterWnd.CreateView

CreateView(view, row, col, width, height)

Creates a view in a splitter window

Parameters

view : PyCView

The view to place in the splitter pane.

row : int

The row in the splitter to place the view.

col : int

The column in the splitter to place the view.

width, height : (int, int)

The initial size of the new view.

MFC References

CSplitterWnd::CreateView exception set.


PyCSplitterWnd.DoKeyboardSplit

int = DoKeyboardSplit()


PyCSplitterWnd.GetPane

PyCWnd = GetPane(row, col )

Returns the PyCView associated with the specified pane.

Parameters

row : int

The row in the splitter.

col : int

The column in the splitter.

Comments

Theoretically the return value can be a PyCWnd object, but currently it will always be a PyCView or derived object.


PyCSplitterWnd.IdFromRowCol

IdFromRowCol(row, col)

Gets the child window ID for the specified child.

Parameters

row : int

The row in the splitter.

col : int

The col in the splitter


PyCSplitterWnd.SetColumnInfo

SetColumnInfo(column, ideal, min)

Sets a new minimum height and ideal height for a column

Parameters

column : int

The column in the splitter.

ideal : int

Specifies an ideal height for the splitter window column in pixels.

min : int

Specifies a minimum height for the splitter window column in pixels.


PyCSplitterWnd.SetRowInfo

SetRowInfo(row, ideal, min)

Sets a new minimum height and ideal height for a row.

Parameters

row : int

The row in the splitter.

ideal : int

Specifies an ideal height for the splitter window row in pixels.

min : int

Specifies a minimum height for the splitter window row in pixels.


PyCStatusBar

PyCStatusBar Object

A class which encapsulates an MFC CStatusBar . Derived from a PyCControlBar object.

Methods

SetIndicators
Sets each indicator's ID.


PyCStatusBar.SetIndicators

SetIndicators(indicators)

Sets each indicator's ID.

Parameters

indicators : tuple

A tuple containing the ID's of the indicators.


PyCStatusBarCtrl

PyCStatusBarCtrl Object

A windows progress bar control. Encapsulates an MFC CStatusBarCtrl class. Derived from PyCControl.

Methods

CreateWindow
Creates the window for a new progress bar object.

GetBorders
Retrieve the status bar control's current widths of the horizontal and vertical borders and of the space between rectangles.

GetParts
Retrieve coordinates of the parts in a status bar control.

GetRect
Retrieves the bounding rectangle of a part in a status bar control.

GetText
Retrieves the text of a part in a status bar control.

GetTextAttr
Retrieves the text attributes of a part in a status bar control.

GetTextLength
Retrieves the length of the text in a part in a status bar control.

SetMinHeight
Set the minimum height of a status bar control's drawing area.

SetParts
Sets the number of parts in a status bar control and the coordinate of the right edge of each part.

SetText
Set the text in the given part of a status bar control.


PyCStatusBarCtrl.CreateWindow

CreateWindow(style, rect, parent, id)

Creates the actual control.

Parameters

style : int

The style for the control.

rect : (left, top, right, bottom)

The size and position of the control.

parent : PyCWnd

The parent window of the control. Usually a PyCDialog.

id : int

The control's ID.


PyCStatusBarCtrl.GetBorders

(width, height, spacing) = GetBorders()

Retrieve the status bar control's current widths of the horizontal and vertical borders and of the space between rectangles.


PyCStatusBarCtrl.GetParts

(int) = GetParts(nParts)

Retrieve coordinates of the parts in a status bar control.

Parameters

nParts : int

The number of coordinates to retrieve

Comments

This function, as designed in MFC, returns both the *number* of parts, and, through an OUT parameter, an array of ints giving the coordinates of the parts. There is also an IN parameter saying how many coordinates to give back. Here, we're explicitly changing the semantics a bit.

GetParts() -> Tuple of all coordinates
GetParts(n) -> Tuple of the first n coordinates (or all coordinates, if fewer than n)

So, in Python, you can't simultaneously find out how many coordinates there are, and retrieve a subset of them. In a reasonable universe, there would have been GetParts() -> int, and GetCoords() -> List. This means that I need to call the MFC method twice; once to find out how many there are, and another time to get them.


PyCStatusBarCtrl.GetRect

(left, top, right, bottom) = GetRect(nPane)

Retrieves the bounding rectangle of a part in a status bar control.

Parameters

nPane : int

Zero-based index of the part whose bounding rectangle is to be retrieved.


PyCStatusBarCtrl.GetText

text = GetText(nPane)

Retrieve the text from the given part of a status bar control.

Parameters

nPane : int

Zero-based index of the part whose text is to be retrieved.


PyCStatusBarCtrl.GetTextAttr

int = GetTextAttr(nPane)

Retrieve the attributes of the text in the given part of a status bar control.

Parameters

nPane : int

Zero-based index of the part whose text is to be retrieved.


PyCStatusBarCtrl.GetTextLength

int = GetTextLength(nPane)

Retrieve the length the text in the given part of a status bar control.

Parameters

nPane : int

Zero-based index of the part whose text is to be retrieved.


PyCStatusBarCtrl.SetMinHeight

SetMinHeight(nHeight)

Set the minimum height of a status bar control's drawing area.

Parameters

nHeight : int

Minimum height


PyCStatusBarCtrl.SetParts

SetParts(coord)

Sets the number of parts in a status bar control and the coordinate of the right edge of each part.

Parameters

coord : int...

Coordinates of each part


PyCStatusBarCtrl.SetText

SetText(text, nPane, nType)

Set the text in the given part of a status bar control.

Parameters

text : string

The text to display

nPane : int

Zero-based index of the part to set.

nType : int

Type of drawing operation.

Comments

The drawing type can be set to one of:~ 0 - The text is drawn with a border to appear lower than the plane of the status bar.~ win32con.SBT_NOBORDERS - The text is drawn without borders.~ win32con.SBT_OWNERDRAW - The text is drawn by the parent window.~ win32con.SBT_POPOUT - The text is drawn with a border to appear higher than the plane of the status bar.


PyCTabCtrl

PyCTabCtrl Object

A class which encapsulates an MFC CTabCtrl object. Derived from a PyCWnd object.

Methods

GetCurSel
Gets the current selection of a tab control.

GetItemCountl
Returns the number of tabs in the control.

SetCurSel
Sets the current selection of a tab control.


PyCTabCtrl.GetCurSel

int = GetCurSel()

Gets the current selection of a tab control.

Return Value

The zero-based index of the currently selected item, or -1 if no selection.


PyCTabCtrl.GetItemCountl

int = GetItemCountl()

Returns the number of tabs in the control.


PyCTabCtrl.SetCurSel

int = SetCurSel(index)

Sets the current selection of a tab control.

Parameters

index : int

The index of the tab to set current.

Return Value

The zero-based index of the previously selected item.


PyCToolBar

PyCToolBar Object

A class which encapsulates an MFC CToolBar . Derived from a PyCControlBar object.

Methods

GetButtonStyle
Retrieves the style for a button.

GetButtonText
Gets the text for a button.

GetItemID
Returns the command ID of a button or separator at the given index.

SetButtonInfo
Gets the associated tooltip control

GetToolBarCtrl
Returns the tool bar control object associated with the tool bar

LoadBitmap
Loads the bitmap containing bitmap-button images.

LoadToolBar
Loads a toolbar from a Toolbar resource.

SetBarStyle
Sets toolbar's (CBRS_xxx) part of style

SetBitmap
Sets a bitmapped image.

SetButtonInfo
Sets the button's command ID, style, and image number.

SetButtons
Sets button styles and an index of button images within the bitmap.

SetButtonStyle
Sets the style for a button

SetHeight
Sets the height of the toolbar.

SetSizes
Sets the sizes for the toolbar items.

SetButtonInfo
Sets the tooltips control


PyCToolBar.GetButtonStyle

GetButtonStyle(index)

Retrieves the style for a button.

Parameters

index : int

Index of the item whose style is to be retrieved.


PyCToolBar.GetButtonText

string = GetButtonText(index)

Gets the text for a button.

Parameters

index : int

Index of the item whose text is to be retrieved.


PyCToolBar.GetItemID

GetItemID(index)

Returns the command ID of a button or separator at the given index.

Parameters

index : int

Index of the item whose ID is to be retrieved.


PyCToolBar.GetToolBarCtrl

PyCToolBarCtrl = GetToolBarCtrl()

Gets the toolbar control object for the toolbar


PyCToolBar.LoadBitmap

LoadBitmap(id)

Loads the bitmap containing bitmap-button images.

Parameters

id : int

The bitmap ID.

Alternative Parameters

id

The bitmap ID.

Comments

The bitmap should contain one image for each toolbar button. If the images are not of the standard size (16 pixels wide and 15 pixels high), call PyCToolBar::SetSizes to set the button sizes and their images.


PyCToolBar.LoadToolBar

LoadToolBar(id)

Loads a toolbar from a toolbar resource.

Parameters

id : int

The bitmap ID.

Alternative Parameters

id

The bitmap ID.

Comments

The bitmap should contain one image for each toolbar button. If the images are not of the standard size (16 pixels wide and 15 pixels high), call PyCToolBar::SetSizes to set the button sizes and their images.


PyCToolBar.SetBarStyle

SetBarStyle(style)

Sets the toolbar part of style

Parameters

style : long

The toolbar style to set.


PyCToolBar.SetBitmap

SetBitmap(hBitmap)

Sets a bitmapped image.

Parameters

hBitmap : int

The handle to a bitmap resource.

Comments

Call this method to set the bitmap image for the toolbar. For example, call SetBitmap to change the bitmapped image after the user takes an action on a document that changes the action of a button.


PyCToolBar.SetButtonInfo

SetButtonInfo(index, ID, style, imageIx)

Sets the button's command ID, style, and image number.

Parameters

index : int

Index of the button or separator whose information is to be set.

ID : int

The value to which the button's command ID is set.

style : int

The new button style

imageIx : int

New index for the button's image within the bitmap


PyCToolBar.SetButtonStyle

SetButtonStyle(index, style)

Sets the style for a button.

Parameters

index : int

Index of the item whose style is to be set

style : int

The new style


PyCToolBar.SetButtons

SetButtons(buttons)

Sets button styles and an index of button images within the bitmap.

Parameters

buttons : tuple

A tuple containing the ID's of the buttons.

Alternative Parameters

numButtons

The number of buttons to pre-allocate. If this option is used, then PyCToolBar::PySetButtonInfo must be used.


PyCToolBar.SetHeight

SetHeight(height)

Sets the height of the toolbar.

Parameters

height : int

The height in pixels of the toolbar.


PyCToolBar.SetSizes

SetSizes(sizeButton, sizeButton)

Sets the size of each button.

Parameters

sizeButton : (cx, cy)

The size of each button.

sizeButton : (cx, cy)

The size of each bitmap.


PyCToolBarCtrl

PyCToolBarCtrl Object

A class which encapsulates an MFC CToolBarCtrl . Derived from a PyCWnd object. Created using PyCToolBar::GetToolBarCtrl

Methods

AddBitmap
Add one or more button images to the list of button images

AddButtons
Add one or more buttons

AddStrings
Add one or more strings

AutoSize
Resize the entire toolbar

CheckButton
Check or clear a button

CommandToIndex
Retrieve the zero-based index for the button associated with the specified command identifier.

CreateWindow
Create the actual control

Customize
Display the customize toolbar dialog box

DeleteButton
Delete a button from the toolbar control

EnableButton
Enable or disable a toolbar control button.

GetBitmapFlags
Retrieve the bitmap flags from the toolbar.

GetButton
Retrieve information about the specified button in a toolbar control.

GetButtonCount
Retrieve a count of the buttons currently in the toolbar control.

GetItemRect
Retrieve the bounding rectangle of a button in a toolbar control.

GetRows
Retrieve the number of rows of buttons currently displayed

HideButton
Hide or show the specified button in a toolbar control.

Indeterminate
Hide or show the specified button in a toolbar control.

InsertButton
Insert a button into a toolbar control.

IsButtonChecked
See if a button is checked.

IsButtonEnabled
See if a button is enabled.

IsButtonHidden
See if a button is checked.

IsButtonIndeterminate
See if a button is Indeterminate.

IsButtonPressed
See if a button is pressed.

PressButton
Mark or unmark the specified button as pressed.

SetBitmapSize
Set the size of the actual bitmapped images to be added to a toolbar control.

SetButtonSize
Set the size of the actual buttons to be added to a toolbar control.

SetCmdID
Set the command identifier which will be sent to the owner window when the specified button is pressed.

SetRows
Ask the toolbar control to resize itself to the requested number of rows.


PyCToolBarCtrl.AddBitmap

int = AddBitmap(numButtons, bitmap )

Add one or more button images to the list of button images

Parameters

numButtons : int

Number of button images in the bitmap.

bitmap : PyBitmap

Bitmap containing button or buttons to be added

MFC References

CToolBarCtrl::AddBitmap


PyCToolBarCtrl.AddButtons

int = AddButtons()

Add one or more buttons to the toolbar

MFC References

CToolBarCtrl::AddButtons


PyCToolBarCtrl.AddStrings

int = AddStrings(strings)

Add one or more strings to the toolbar

Parameters

strings : string...

Strings to add. Can give more than one string.

MFC References

CToolBarCtrl::AddStrings


PyCToolBarCtrl.AutoSize

AutoSize()

Resize the entire toolbar control

MFC References

CToolBarCtrl::AutoSize


PyCToolBarCtrl.CheckButton

int = CheckButton(nID, bCheck )

Check or clear a given button in a toolbar control

Parameters

nID : int

Command identifier of the button to check or clear.

bCheck=1 : int

1 to check, 0 to clear the button

MFC References

CToolBarCtrl::CheckButton


PyCToolBarCtrl.CommandToIndex

int = CommandToIndex(nID)

Retrieve the zero-based index for the button associated with the specified command identifier.

Parameters

nID : int

Command identifier of the button you want to find.

MFC References

CToolBarCtrl::CommandToIndex


PyCToolBarCtrl.CreateWindow

CreateWindow(style, rect, parent, id)

Creates the window for a new toolbar object

Parameters

style : int

The style for the button. Use any of the win32con.BS_* constants.

rect : (left, top, right, bottom)

The size and position of the button.

parent : PyCWnd

The parent window of the button. Usually a PyCDialog.

id : int

The buttons control ID.

MFC References

CToolBarCtrl::Create


PyCToolBarCtrl.Customize

Customize()

Display the Customize Toolbar dialog box.

MFC References

CToolBarCtrl::Customize


PyCToolBarCtrl.DeleteButton

DeleteButton(nID)

Delete a button from the toolbar control.

Parameters

nID : int

ID of the button to delete.

MFC References

CToolBarCtrl::DeleteButton


PyCToolBarCtrl.EnableButton

EnableButton(nID, bEnable)

Enable or disable a toolbar control button.

Parameters

nID : int

ID of the button to enable or disable.

bEnable=1 : int

1 to enable, 0 to disable

MFC References

CToolBarCtrl::EnableButton


PyCToolBarCtrl.GetBitmapFlags

int = GetBitmapFlags()

retrieve the bitmap flags from the toolbar.

MFC References

CToolBarCtrl::GetBitmapFlags


PyCToolBarCtrl.GetButton

PyCToolBarCtrl::TBBUTTON = GetButton(nID)

Retrieve information about the specified button in a toolbar control.

Parameters

nID : int

ID of the button to retrieve.

MFC References

CToolBarCtrl::GetButton


PyCToolBarCtrl.GetButtonCount

int = GetButtonCount()

Retrieve a count of the buttons currently in the toolbar control.

MFC References

CToolBarCtrl::GetButtonCount


PyCToolBarCtrl.GetItemRect

left, top, right, bottom = GetItemRect(nID)

Retrieve the bounding rectangle of a button in a toolbar control.

Parameters

nID : int

ID of the button.

MFC References

CToolBarCtrl::GetItemRect


PyCToolBarCtrl.GetRows

left, top, right, bottom = GetRows()

Retrieve the number of rows of buttons currently displayed

MFC References

CToolBarCtrl::GetRows


PyCToolBarCtrl.HideButton

HideButton(nID, bEnable)

Hide or show the specified button in a toolbar control.

Parameters

nID : int

ID of the button to hide.

bEnable=1 : int

1 to hide, 0 to show.

MFC References

CToolBarCtrl::HideButton


PyCToolBarCtrl.Indeterminate

Indeterminate(nID, bEnable)

Mark or unmark the specified button as indeterminate

Parameters

nID : int

ID of the button to mark.

bEnable=1 : int

1 to hide, 0 to show.

MFC References

CToolBarCtrl::Indeterminate


PyCToolBarCtrl.InsertButton

int = InsertButton(nID, button )

Insert a button in a toolbar control.

Parameters

nID : int

Zero-based index of a button. This function inserts the new button to the left of this button.

button : PyCToolBarCtrl::TBBUTTON

Bitmap containing button to be inserted

Comments

The image and/or string whose index you provide must have previously been added to the toolbar control's list using PyCToolBarCtrl::AddBitmap, PyCToolBarCtrl::AddString , and/or PyCToolBarCtrl::AddStrings.

MFC References

CToolBarCtrl::InsertButton


PyCToolBarCtrl.IsButtonChecked

int = IsButtonChecked(nID)

Determine whether the specified button in a toolbar control is checked.

Parameters

nID : int

ID of the button to check.

MFC References

CToolBarCtrl::IsButtonChecked


PyCToolBarCtrl.IsButtonEnabled

int = IsButtonEnabled(nID)

Determine whether the specified button in a toolbar control is enabled.

Parameters

nID : int

ID of the button to check.

MFC References

CToolBarCtrl::IsButtonEnabled


PyCToolBarCtrl.IsButtonHidden

int = IsButtonHidden(nID)

Determine whether the specified button in a toolbar control is hidden.

Parameters

nID : int

ID of the button to check.

MFC References

CToolBarCtrl::IsButtonHidden


PyCToolBarCtrl.IsButtonIndeterminate

int = IsButtonIndeterminate(nID)

Determine whether the specified button in a toolbar control is indeterminate.

Parameters

nID : int

ID of the button to check.

MFC References

CToolBarCtrl::IsButtonIndeterminate


PyCToolBarCtrl.IsButtonPressed

int = IsButtonPressed(nID)

Determine whether the specified button in a toolbar control is pressed.

Parameters

nID : int

ID of the button to check.

MFC References

CToolBarCtrl::IsButtonPressed


PyCToolBarCtrl.PressButton

PressButton(nID, bEnable)

Mark or unmark the specified button as pressed.

Parameters

nID : int

ID of the button to mark.

bEnable=1 : int

1 to mark, 0 to unmark.

MFC References

CToolBarCtrl::PressButton


PyCToolBarCtrl.SetBitmapSize

SetBitmapSize(width, height)

Set the size of the actual bitmapped images to be added to a toolbar control.

Parameters

width=16 : int

Width of bitmap images.

height=15 : int

Height of bitmap images.

Alternative Parameters

width

Width of bitmap images.

height

Height of bitmap images.

MFC References

CToolBarCtrl::SetBitmapSize


PyCToolBarCtrl.SetButtonSize

SetButtonSize(width, height)

Set the size of the buttons to be added to a toolbar control.

Parameters

width=16 : int

Width of buttons

height=15 : int

Height of buttons

Alternative Parameters

width

Width of bitmap images.

height

Height of bitmap images.

MFC References

CToolBarCtrl::SetButtonSize


PyCToolBarCtrl.SetCmdID

SetCmdID(nIndex, nID)

Set the command identifier which will be sent to the owner window when the specified button is pressed.

Parameters

nIndex : int

The zero-based index of the button whose command ID is to be set.

nID : int

The command ID to set the selected button to.

MFC References

CToolBarCtrl::SetCmdID


PyCToolBarCtrl.SetRows

left, top, right, bottom = SetRows(nRows, bLarger )

Ask the toolbar control to resize itself to the requested number of rows.

Parameters

nRows : int

Requested number of rows.

bLarger : int

Tells whether to use more rows or fewer rows if the toolbar cannot be resized to the requested number of rows.

MFC References

CToolBarCtrl::SetRows


PyCToolTipCtrl

PyCToolTipCtrl Object

A windows tooltip control. Encapsulates an MFC CToolTipCtrl class. Derived from PyCControl.

Methods

CreateWindow
Creates the window for a new progress bar object.

UpdateTipText
Update the tool tip text for a control's tools

AddTool
Adds a tool to tooltip control.

SetMaxTipWidth


PyCToolTipCtrl.AddTool

AddTool(wnd, text, rect, id)

Adds a tool to tooltip control.

Parameters

wnd : PyCWnd

The window of the tool.

text : string

The text for the tool.

rect=None : int, int, int, int

The default rectangle

id : int

The id of the tool


PyCToolTipCtrl.CreateWindow

CreateWindow(parent, style)

Creates the actual control.

Parameters

parent : PyCWnd

The parent window of the control.

style : int

The style for the control.


PyCToolTipCtrl.SetMaxTipWidth

int = SetMaxTipWidth(width)

Parameters

width : int

The new width


PyCToolTipCtrl.UpdateTipText

UpdateTipText(text, wnd, id)

Update the tool tip text for a control's tools

Parameters

text : string

The text for the tool.

wnd : PyCWnd

The window of the tool.

id : int

The id of the tool


PyCTreeCtrl

PyCTreeCtrl Object

A class which encapsulates an MFC CTreeCtrl object. Derived from a PyCWnd object.

Methods

CreateWindow
Creates the actual window for the object.

GetCount
Retrieves the number of tree items associated with a tree view control.

GetIndent
Retrieves the offset (in pixels) of a tree view item from its parent.

SetIndent
Sets the offset (in pixels) of a tree view item from its parent.

GetImageList
Retrieves the current image list.

SetImageList
Assigns an image list to a list view control.

GetNextItem
Retrieves the next item.

ItemHasChildren
Returns nonzero if the specified item has child items.

GetChildItem
Retrieves the child item of the specified tree view item.

GetNextSiblingItem
Retrieves the next sibling of the specified tree view item.

GetPrevSiblingItem
Retrieves the previous sibling of the specified tree view item.

GetParentItem
Retrieves the parent item of the specified tree view item.

GetFirstVisibleItem
Retrieves the first visible item of the specified tree view item.

GetNextVisibleItem
Retrieves the next visible item of the specified tree view item.

GetNextVisibleItem
Retrieves the previous visible item of the specified tree view item.

GetSelectedItem
Retrieves the currently selected tree view item.

GetDropHilightItem
Retrieves the target of a drag-and-drop operation.

GetRootItem
Retrieves the root of the specified tree view item.

GetToolTips
Returns the tooltip control

GetItem
Retrieves the details of an items attributes.

SetItem
Sets some of all of an items attributes.

GetItemState
Retrieves the state of an item.

SetItemState
Sets the state of an item.

GetItemImage
Retrieves the index of an items images.

SetItemImage
Sets the index of an items images.

SetItemText
Changes the text of a list view item or subitem.

GetItemText
Retrieves the text of a list view item or subitem.

GetItemData
Retrieves the application-specific value associated with an item.

SetItemData
Sets the item's application-specific value

GetItemRect
Retrieves the bounding rectangle of a tree view item.

GetEditControl
Retrieves the handle of the edit control used to edit the specified tree view item.

GetVisibleCount
Retrieves the number of visible tree items associated with a tree view control.

InsertItem
Inserts an item into the list.

DeleteItem
Deletes an item from the list.

DeleteAllItems
Deletes all items from the list.

Expand
Expands, or collapses, the child items of the specified tree view item.

Select
Selects, scrolls into view, or redraws a specified tree view item.

SelectItem
Selects a specified tree view item.

SelectDropTarget
Redraws the tree item as the target of a drag-and-drop operation.

SelectSetFirstVisible
Selects a specified tree view item as the first visible item.

EditLabel
Edits a specified tree view item in-place.

CreateDragImage
Creates a dragging bitmap for the specified tree view item.

SortChildren
Sorts the children of a given parent item.

EnsureVisible
Ensures that a tree view item is visible in its tree view control.

HitTest
Determines which tree view item, if any, is at a specified position.

Comments

Sam Rushing has found the following tidbits:
You can implement dynamic collapsing and expanding of events for large collections yourself - see KB Q130697
The MFC docs tell you to use TVE_COLLAPSERESET in order to throw away the child items when collapsing a node. They neglect to tell you a very important tidbit: that you need to combine the flag with TVE_COLLAPSE. This is pointed out in the docs for TreeView_Expand(), but not in those for CTreeCtrl::Expand.


PyCTreeCtrl.CreateDragImage

PyCImageList = CreateDragImage(item)

Creates a dragging bitmap for the specified tree view item.

Parameters

item : HTREEITEM

The item to edit.


PyCTreeCtrl.CreateWindow

CreateWindow(style, rect, PyCWnd, id)

Creates the actual window for the object.

Parameters

style : int

The window style

rect : int, int, int, int

The default rectangle

PyCWnd : parent

The parent window

id : int

The control ID

MFC References

CTreeCtrl::Create


PyCTreeCtrl.DeleteAllItems

object = DeleteAllItems()

Deletes all items in the control


PyCTreeCtrl.DeleteItem

DeleteItem(item)

Deletes the specified item.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.EditLabel

PyCEdit = EditLabel(item)

Edits a specified tree view item in-place.

Parameters

item : HTREEITEM

The item to edit.


PyCTreeCtrl.EnsureVisible

int = EnsureVisible(item)

Ensures that a tree view item is visible in its tree view control.

Parameters

item : HTREEITEM

The item to edit.


PyCTreeCtrl.Expand

Expand(item, code)

Expands, or collapses, the child items of the specified tree view item.

Parameters

item : HTREEITEM

The specified item

code : int

The action to take


PyCTreeCtrl.GetChildItem

HTREEITEM = GetChildItem(item)

Retrieves the first child item.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.GetCount

int = GetCount()

Retrieves the number of tree items associated with a tree view control.


PyCTreeCtrl.GetDropHilightItem

HTREEITEM = GetDropHilightItem()

Retrieves the target of a drag-and-drop operation.


PyCTreeCtrl.GetEditControl

PyCEdit = GetEditControl()

Retrieves the handle of the edit control used to edit the specified tree view item.


PyCTreeCtrl.GetFirstVisibleItem

HTREEITEM = GetFirstVisibleItem()

Retrieves the first visible item of the tree view control.


PyCTreeCtrl.GetImageList

PyCImageList = GetImageList(nImageList)

Retrieves the current image list.

Parameters

nImageList : int

Value specifying which image list to retrieve. It can be one of:
- commctrl.LVSIL_NORMAL Image list with large icons.
- commctrl.LVSIL_SMALL Image list with small icons.
- commctrl.LVSIL_STATE Image list with state images.


PyCTreeCtrl.GetIndent

int = GetIndent()

Retrieves the offset (in pixels) of a tree view item from its parent.


PyCTreeCtrl.GetItem

PyCTreeCtrl::TV_ITEM tuple = GetItem(item, mask )

Retrieves the details of an items attributes.

Parameters

item : HTREEITEM

The item whose attributes are to be retrieved.

mask=(all flags set) : int

The requested attributes.


PyCTreeCtrl.GetItemData

object = GetItemData(item)

Retrieves the application-specific value associated with an item.

Parameters

item : HTREEITEM

The index of the item whose data is to be retrieved.


PyCTreeCtrl.GetItemImage

(int,int) = GetItemImage(item)

Retrieves the index of an items images.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.GetItemRect

(int, int, int, int) = GetItemRect(item, bTextOnly )

Retrieves the bounding rectangle of a tree view item.

Parameters

item : HTREEITEM

The item whose Data is to be set.

bTextOnly : int

f this parameter is nonzero, the bounding rectangle includes only the text of the item. Otherwise it includes the entire line that the item occupies in the tree view control.


PyCTreeCtrl.GetItemState

(int,int) = GetItemState(item, stateMask )

Retrieves the state and mask of an item.

Parameters

item : HTREEITEM

The specified item

stateMask : int

The mask for the result.


PyCTreeCtrl.GetItemText

int = GetItemText(item)

Retrieves the text of a list view item or subitem.

Parameters

item : HTREEITEM

The item whose text is to be retrieved.


PyCTreeCtrl.GetNextItem

HTREEITEM = GetNextItem(item, code )

Retrieves the next item.

Parameters

item : HTREEITEM

The specified item

code : int

Specifies the relationship of the item to fetch.


PyCTreeCtrl.GetNextSiblingItem

HTREEITEM = GetNextSiblingItem(item)

Retrieves the next sibling of the specified tree view item.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.GetNextVisibleItem

HTREEITEM = GetNextVisibleItem(item)

Retrieves the next visible item of the specified tree view item.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.GetParentItem

HTREEITEM = GetParentItem(item)

Retrieves the parent item of the specified tree view item.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.GetPrevSiblingItem

HTREEITEM = GetPrevSiblingItem(item)

Retrieves the previous sibling of the specified tree view item.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.GetRootItem

HTREEITEM = GetRootItem()

Retrieves the root of the specified tree view item.


PyCTreeCtrl.GetSelectedItem

HTREEITEM = GetSelectedItem()

Retrieves the currently selected tree view item.


PyCTreeCtrl.GetToolTips

PyCToolTopCtrl = GetToolTips()

Returns the tooltip control


PyCTreeCtrl.GetVisibleCount

int = GetVisibleCount()

Retrieves the number of visible tree items associated with a tree view control.


PyCTreeCtrl.HitTest

(int, int) = HitTest(x,y)

Determines which tree view item, if any, is at a specified position.

Parameters

x,y : point

The point to test.

Return Value

The result is a tuple of (flags, hItem). flags may be a combination of the following values:

Value | Description
commctrl.TVHT_ABOVE | Above the client area.
commctrl.TVHT_BELOW | Below the client area.
commctrl.TVHT_NOWHERE | In the client area, but below the last item.
commctrl.TVHT_ONITEM | On the bitmap or label associated with an item.
commctrl.TVHT_ONITEMBUTTON | On the button associated with an item.
commctrl.TVHT_ONITEMICON | On the bitmap associated with an item.
commctrl.TVHT_ONITEMINDENT | In the indentation associated with an item.
commctrl.TVHT_ONITEMLABEL | On the label (string) associated with an item.
commctrl.TVHT_ONITEMRIGHT | In the area to the right of an item.
commctrl.TVHT_ONITEMSTATEICON | On the state icon for a tree view item that is in a user-defined state.
commctrl.TVHT_TOLEFT | To the left of the client area.
commctrl.TVHT_TORIGHT | To the right of the client area.


PyCTreeCtrl.InsertItem

int = InsertItem(hParent, hInsertAfter , item )

Inserts an item into the list.

Parameters

hParent : HTREEITEM

The parent item. If commctrl.TVI_ROOT or 0, it is added to the root.

hInsertAfter : HTREEITEM

The item to insert after. Can be an item or TVI_FIRST, TVI_LAST or TVI_SORT

item : PyCTreeCtrl::TV_ITEM tuple

A tuple describing the new item.

Alternative Parameters

mask

Integer specifying which attributes to set

text

The text of the item.

image

The index of the image to use.

selectedImage

The index of the items selected image.

state

The initial state of the item.

stateMask

Specifies which bits of the state are valid.

lParam

A user defined object for the item.

parent

The parent of the item.

parent

The parent of the item.

Alternative Parameters

text

The text for the item.

image

The index of the image to use.

selectedImage

The index of the items selected image.

parent

The parent of the item.

insertAfter

The item to insert the new item after, or TVI_FIRST, TVI_LAST or TVI_SORT

Alternative Parameters

text

The text for the item.

parent

The parent of the item.

parent

The parent of the item.


PyCTreeCtrl.ItemHasChildren

int = ItemHasChildren(item)

Returns nonzero if the specified item has child items.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.Select

Select(item, code)

Selects, scrolls into view, or redraws a specified tree view item.

Parameters

item : HTREEITEM

The specified item

code : int

The action to take


PyCTreeCtrl.SelectDropTarget

SelectDropTarget(item)

Redraws the tree item as the target of a drag-and-drop operation.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.SelectItem

SelectItem(item)

Selects a specified tree view item.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.SelectSetFirstVisible

SelectSetFirstVisible(item)

Selects a specified tree view item as the first visible item.

Parameters

item : HTREEITEM

The specified item


PyCTreeCtrl.SetImageList

int = SetImageList(imageList, imageType )

Assigns an image list to a list view control.

Parameters

imageList : PyCImageList

The Image List to use.

imageType : int

Type of image list. It can be one of (COMMCTRL.) LVSIL_NORMAL, LVSIL_SMALL or LVSIL_STATE


PyCTreeCtrl.SetIndent

SetIndent(indent)

Sets the offset (in pixels) of a tree view item from its parent.

Parameters

indent : int

The new indent.


PyCTreeCtrl.SetItem

int = SetItem(item)

Sets some of all of an items attributes.

Parameters

item : PyCTreeCtrl::TV_ITEM tuple

A tuple describing the new item.


PyCTreeCtrl.SetItemData

int = SetItemData(item, Data )

Sets the item's application-specific value.

Parameters

item : HTREEITEM

The item whose Data is to be set.

Data : int

New value for the data.

Comments

Note that a reference count is not added to the object. This it is your responsibility to make sure the object remains alive while in the list.


PyCTreeCtrl.SetItemImage

SetItemImage(item, iImage, iSelectedImage)

Sets the index of an items images.

Parameters

item : HTREEITEM

The specified item

iImage : int

The offset of the image.

iSelectedImage : int

The offset of the selected image.


PyCTreeCtrl.SetItemState

SetItemState(item, state, stateMask)

Sets the state of item.

Parameters

item : HTREEITEM

The specified item

state : int

The new state

stateMask : int

The mask for the new state


PyCTreeCtrl.SetItemText

int = SetItemText(item, text )

Changes the text of a list view item or subitem.

Parameters

item : HTREEITEM

The item whose text is to be retrieved.

text : string

String that contains the new item text.


PyCTreeCtrl.SortChildren

SortChildren(item)

Sorts the children of a given parent item.

Parameters

item : HTREEITEM

The specified parent item


PyCTreeView

PyCTreeView Object

A class which implementes a CTreeView. Derived from PyCView and PyCTreeCtrl objects.

Methods

PreCreateWindow
Calls the underlying MFC PreCreateWindow method.

GetTreeCtrl
Returns the underlying tree control object.

OnCommand
Calls the standard Python framework OnCommand handler


PyCTreeView.GetTreeCtrl

PyCTreeCtrl = GetTreeCtrl()

Returns the underlying tree control object.


PyCTreeView.OnCommand

OnCommand(wparam, lparam)

Calls the standard Python framework OnCommand handler

Parameters

wparam : int

lparam : int

See Also

PyCWnd.OnCommand virtual method


PyCTreeView.PreCreateWindow

tuple = PreCreateWindow(createStruct)

Calls the underlying MFC PreCreateWindow method.

Parameters

createStruct : tuple

A tuple representing a CREATESTRUCT structure.


PyCView

PyCView Object

A class which implements a generic CView. Derived from a PyCWnd object.

Methods

CreateWindow
Create the window for a view.

GetDocument
Returns the document for a view.

OnActivateView
Calls the underlying MFC OnActivateView method.

OnInitialUpdate
Calls the underlying MFC OnInitialUpdate method.

OnMouseActivate
Calls the underlying MFC OnMouseActivate method.

PreCreateWindow
Calls the underlying MFC PreCreateWindow method.

OnFilePrint
Calls the underlying MFC OnFilePrint method.

OnFilePrint
Calls the underlying MFC OnFilePrintPreview method.

DoPreparePrinting
Calls the underlying MFC DoPreparePrinting method.

OnBeginPrinting
Calls the underlying MFC OnBeginPrinting method.

OnEndPrinting
Calls the underlying MFC OnEndPrinting method.


PyCView.CreateWindow

CreateWindow(parent, id, style, rect)

Creates the window for a view.

Parameters

parent : PyCWnd

The parent window (usually a frame)

id=win32ui.AFX_IDW_PANE_FIRST : int

The child ID for the view

style=win32ui.AFX_WS_DEFAULT_VIEW : int

The style for the view

rect=(0,0,0,0) : (left, top, right, bottom)

The default position of the window.


PyCView.DoPreparePrinting

int = DoPreparePrinting()

Invoke the Print dialog box and create a printer device context.

Comments

This function is usually called from PyCView.OnPreparePrinting virtual method


PyCView.GetDocument

PyCDocument = GetDocument()

Returns the document for a view.


PyCView.OnActivateView

int = OnActivateView(activate, activateView , DeactivateView )

Calls the underlying MFC OnActivateView method.

Parameters

activate : int

Indicates whether the view is being activated or deactivated.

activateView : PyCView

The view object that is being activated.

DeactivateView : PyCView

The view object that is being deactivated.

See Also

PyCView.OnActivateView virtual method


PyCView.OnBeginPrinting

OnBeginPrinting()

Calls the underlying MFC OnBeginPrinting method.

See Also

PyCView.OnBeginPrinting virtual method


PyCView.OnEndPrinting

OnEndPrinting()

Calls the underlying MFC OnEndPrinting method.

See Also

PyCView.OnEndPrinting virtual method


PyCView.OnFilePrint

OnFilePrint()

Calls the underlying MFC OnFilePrint method.


PyCView.OnInitialUpdate

OnInitialUpdate()

Calls the underlying MFC OnInitialUpdate method.

See Also

PyCView.OnInitialUpdate virtual method


PyCView.OnMouseActivate

int = OnMouseActivate(wnd, hittest , message )

Calls the base MFC OnMouseActivate function.

Parameters

wnd : PyCWnd

hittest : int

message : int

See Also

PyCWnd.OnMouseActivate virtual method


PyCView.PreCreateWindow

tuple = PreCreateWindow(createStruct)

Calls the underlying MFC PreCreateWindow method.

Parameters

createStruct : tuple

A tuple representing a CREATESTRUCT structure.

See Also

PyCWnd.PreCreateWindow virtual method


PyCWinApp

PyCWinApp Object

An application class. Encapsulates an MFC CWinApp class

Methods

AddDocTemplate
Adds a template to the application list.

FindOpenDocument
Returns an existing document with the specified file name.

GetDocTemplateList
Returns a list of all document templates in use.

InitDlgInstance
Calls critical InitInstance processing for a dialog based application.

LoadCursor
Loads a cursor.

LoadStandardCursor
Loads a standard cursor.

LoadOEMCursor
Loads an OEM cursor.

LoadIcon
Loads an icon resource.

LoadStandardIcon
Loads an icon resource.

OpenDocumentFile
Opens a document file by name.

OnFileNew
Calls the underlying OnFileNew MFC method.

OnFileOpen
Calls the underlying OnFileOpen MFC method.

RemoveDocTemplate
Removes a template to the application list.

Run
Starts the main application message pump.

IsInproc
Returns a flag to indicate if the created CWinApp was in the DLL, or an external EXE.


PyCWinApp.AddDocTemplate

AddDocTemplate(template)

Adds a template to the application list.

Parameters

template : PyCDocTemplate

The template to be added.


PyCWinApp.FindOpenDocument

PyCDocument = FindOpenDocument(fileName)

Returns an existing document with the specified file name.

Parameters

fileName : string

The fully qualified filename to search for.


PyCWinApp.GetDocTemplateList

[PyCDocTemplate,...] = GetDocTemplateList()

Returns a list of all document templates.


PyCWinApp.InitDlgInstance

InitDlgInstance(dialog)

Calls critical InitInstance processing for a dialog based application.

Parameters

dialog : PyCDialog

The dialog object to be used as the main window for the application.


PyCWinApp.IsInproc

int = IsInproc()

Returns a flag to indicate if the created CWinApp was in the DLL, or an external EXE.


PyCWinApp.LoadCursor

int = LoadCursor(cursorId)

Loads a cursor.

Parameters

cursorId : int

The ID of the cursor to load.

Alternative Parameters

cursorId

The ID of the cursor to load.


PyCWinApp.LoadIcon

int = LoadIcon(idResource)

Loads an icon resource.

Parameters

idResource : int

The ID of the icon to load.


PyCWinApp.LoadOEMCursor

int = LoadOEMCursor(cursorId)

Loads an OEM cursor.

Parameters

cursorId : int

The ID of the cursor to load.


PyCWinApp.LoadStandardCursor

int = LoadStandardCursor(cursorId)

Loads a standard cursor.

Parameters

cursorId : int

The ID of the cursor to load.

Alternative Parameters

cursorId

The ID of the cursor to load.


PyCWinApp.LoadStandardIcon

int = LoadStandardIcon(resourceName)

Loads an icon resource.

Parameters

resourceName : string

The name of the standard icon to load.


PyCWinApp.OnFileNew

OnFileNew()

Calls the underlying OnFileNew MFC method.


PyCWinApp.OnFileOpen

OnFileOpen()

Calls the underlying OnFileOpen MFC method.


PyCWinApp.OpenDocumentFile

OpenDocumentFile(fileName)

Opens a document file by name.

Parameters

fileName : string

The name of the document to open.


PyCWinApp.RemoveDocTemplate

RemoveDocTemplate(template)

Removes a template to the application list.

Parameters

template : PyCDocTemplate

The template to be removed. Must have previously been added by PyCWinApp::AddDocTemplate.

Comments

Note that MFC does not provide an equivilent function.


PyCWinApp.Run

int = Run()

Starts the message pump. Advanced users only


PyCWinThread

PyCWinThread Object

An application class. Encapsulates an MFC CWinThread class

Methods

CreateThread
Creates the actual thread behind the thread object.

PumpIdle
Pumps idle messages.

PumpMessages
Pumps all messages to the application until a WM_QUIT message is received.

Run
Starts the main application message pump.

SetMainFrame
Sets the C++ applications main frame

SetThreadPriority
Sets the threads priority


PyCWinThread.CreateThread

CreateThread()

Creates the actual thread behind the thread object.


PyCWinThread.PumpIdle

PumpIdle()

Pumps all idle messages.


PyCWinThread.PumpMessages

PumpMessages()

Pumps all messages to the application until a WM_QUIT message is received.

Comments

This allows an application which is performing a long operation to dispatch paint messages during the operation.


PyCWinThread.Run

int = Run()

Starts the message pump. Advanced users only


PyCWinThread.SetMainFrame

SetMainFrame(mainFrame)

Sets the threads main frame

Parameters

mainFrame : PyCWnd

The applications main frame.

Comments

You can pass None to this function to reset the main frame. Should I free this? I dont think so!


PyCWinThread.SetThreadPriority

SetThreadPriority(priority)

Sets the threads priority. Returns TRUE if successful.

Parameters

priority : PyCWnd

The threads priority.


PyCWnd

PyCWnd Object

A base window class. Encapsulates an MFC CWnd class

Methods

ActivateFrame
Searches upwards for a parent window which has a frame, and activates it.

BringWindowToTop
Brings the window to the top of a stack of overlapping windows.

BeginPaint
Prepares the window for painting.

CalcWindowRect
Computes the size of the window rectangle based on the desired client rectangle size.

CenterWindow
Centers a window relative to its parent.

CheckRadioButton
Selects a specified radio button

ChildWindowFromPoint
Identifies the child window that contains the point

ClientToScreen
Convert coordinates from Client to Screen

CreateWindow
Create the underlying window object

CreateWindowEx
Creates the actual window for the PyCWnd object using extended attributes.

DefWindowProc
Calls the default message handler.

DestroyWindow
Destroys the window attached to the object.

DlgDirList
Fill a listbox control with a file specification.

DlgDirListComboBox
Fill a combobox control with a file specification.

DlgDirSelect
Retrieves the current selection from a list box.

DlgDirSelectComboBox
Retrieves the current selection from a combo box.

DragAcceptFiles
Indicate the window can accept files dragges from file manager.

DrawMenuBar
Redraw the windows menu bar.

EnableWindow
Enable or disable the window.

EndModalLoop
Ends a modal loop.

EndPaint
Ends painting in a window

GetCheckedRadioButton
Get the ID of the checked a radio button in a group.

GetClientRect
Gets the client rectangle for thewindow.

GetDC
Gets the window's current device context.

GetDCEx
Gets the window's current device context.

GetDlgCtrlID
Get the current window's control id.

GetDlgItem
Get a child control by Id

GetDlgItemInt
Returns the integer value of a child window or control with the specified ID.

GetDlgItemText
Returns the text of child window or control with the specified ID.

GetLastActivePopup
Identifies the most recently active pop-up window

GetMenu
Get the current menu for a window.

GetParent
Get the parent window.

GetParentFrame
Returns the window's frame.

GetParent
Returns the child window's parent window or owner window.

GetSafeHwnd
Returns the HWnd of this window.

GetScrollInfo
Retrieve information about a scroll bar

GetScrollPos
Retrieves the current position of the scroll box of a scroll bar.

GetStyle
Retrieves the window style

GetExStyle
Retrieves the window extended style

GetSystemMenu
Get the system menu for the window.

GetTopLevelFrame
Get the top-level frame window.

GetTopLevelOwner
Get the top-level owner window.

GetTopLevelParent
Get the top-level parent window.

GetTopWindow
Get the top level window attached to this window.

GetWindow
Get a specified window (eg, parent, child, etc).

GetWindowDC
Obtains the PyDC for a window.

GetWindowPlacement
Gets the window's current placement information.

GetWindowRect
Get the windows rectangle.

GetWindowText
Get the window's current text.

HideCaret
Hides the caret

HookAllKeyStrokes
Hook a handler for all keystroke messages.

HookKeyStroke
Hook a keystroke handler.

HookMessage
Hook a message notification handler.

InvalidateRect
Invalidate a specified rectangle in a window.

InvalidateRgn
Invalidate a specified region of a window.

IsChild
Indicates if a window is a child.

IsDlgButtonChecked
Indicates if a dialog botton is checked.

IsIconic
Indicates if the window is currently minimised.

IsZoomed
Indicates if the window is currently maximised.

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

IsWindowVisible
Determines if the window is currently visible.

IsWindowVisible
Determines if the window is currently enabled.

KillTimer
Destroys a system timer

LockWindowUpdate
Disables drawing in the given window

MapWindowPoints
Converts (maps) a set of points from the coordinate space of the CWnd to the coordinate space of another window.

MouseCaptured
Indicates if the window currently has the mouse captured.

MessageBox
Displays a message box.

ModifyStyle
Modifies the style of a window.

ModifyStyleEx
Modifies the style of a window.

MoveWindow
Moves the window to a new location.

OnClose
Calls the default MFC OnClose handler.

OnCtlColor
Calls the default MFC OnCtlColor handler.

OnEraseBkgnd
Calls the default MFC OnEraseBkgnd handler.

OnNcHitTest
Calls the base MFC OnNcHitTest function.

OnPaint
Calls the default MFC OnPaint handler.

OnQueryDragIcon
Calls the default MFC OnQueryDragIcon handler.

OnQueryNewPalette
Calls the underlying MFC OnQueryNewPalette method.

OnSetCursor
Calls the default MFC OnSetCursor message

OnMouseActivate
Calls the default MFC OnMouseActicate message

OnWndMsg
Calls the default MFC Window Message handler.

PreCreateWindow
Calls the underlying MFC PreCreateWindow method.

PumpWaitingMessages
Calls the Peek/Dispatch loop on the wnd.

RedrawWindow
Updates the specified rectangle or region in the given window's client area.

ReleaseCapture
Releases the mouse capture for the window.

ReleaseDC
Releases a device context, freeing it for use by other applications.

RepositionBars
Repositions the control bars for the window.

RunModalLoop
Starts a modal loop for the window.

PostMessage
Post a message to the window.

SendMessageToDescendants
Send a message to a window's children.

SendMessage
Send a message to the window.

SetActiveWindow
Sets the window active.

SetForegroundWindow
Puts the window into the foreground and activates the window.

SetWindowPos
Sets the windows position information.

ScreenToClient
Converts from screen coordinates to client coordinates.

SetCapture
Captures the mouse input for thw window.

SetDlgItemText
Sets the text for the child window or control with the specified ID.

SetFocus
Sets focus to the window.

SetFont
Sets the window's current font to the specified font.

SetMenu
Sets the menu for a window.

SetRedraw
Sets the redraw flag for the window.

SetScrollPos
Sets the current position of the scroll box of a scroll bar.

SetScrollInfo
Set information about a scroll bar

SetTimer
Installs a system timer

SetWindowPlacement
Sets the window's placement options.

SetWindowText
Sets the window's text.

ShowCaret
Shows the caret

ShowScrollBar
Shows/Hides the window's scroll bars.

ShowWindow
Shows the window.

UnLockWindowUpdate
Unlocks a window that was locked with LockWindowUpdate

UpdateData
Updates a windows dialog data.

UpdateDialogControls
Updates the state of dialog buttons and other controls in a dialog box or window that uses the PyCCmdUI::HookCommandUpdate callback mechanism.

UpdateWindow
Updates a window.


PyCWnd.ActivateFrame

ActivateFrame(cmdShow)

Searches upwards for a parent window which has a frame, and activates it.

Parameters

cmdShow=SW_SHOW : int

The param passed to CFrameWnd::ShowWindow . See also PyCWnd::ShowWindow.

MFC References

CFrameWnd::ActivateFrame


PyCWnd.BeginPaint

PyCDC, PAINTSTRUCT = BeginPaint()

Prepares a window for painting

Return Value

You must pass the PAINTSTRUCT param to the PyCWnd::EndPaint method.


PyCWnd.BringWindowToTop

BringWindowToTop()

Brings the window to the top of a stack of overlapping windows.

Comments

This method activates pop-up, top-level, and MDI child windows. The BringWindowToTop member function should be used to uncover any window that is partially or completely obscured by any overlapping windows.
Calling this method is similar to calling the PyCWnd::SetWindowPos method to change a window's position in the Z order. The BringWindowToTop method does not change the window style to make it a top-level window of the desktop.

MFC References

CWnd::BringWindowToTop


PyCWnd.CalcWindowRect

(left, top, right, bottom) = CalcWindowRect(rect, nAdjustType )

Computes the size of the window rectangle based on the desired client rectangle size. The resulting size can then be used as the initial size for the window object.

Parameters

rect : (left, top, right, bottom)

The size to calculate from

nAdjustType=adjustBorder : int

An enumerated type used for in-place editing. It can have the following values: CWnd::adjustBorder = 0, which means that scrollbar sizes are ignored in calculation; and CWnd::adjustOutside = 1, which means that they are added into the final measurements of the rectangle.

MFC References

CWnd::CalcWindowRect


PyCWnd.CenterWindow

CenterWindow(altwin)

Centers a window relative to its parent.

Parameters

altwin=None : PyCWnd

alternate window relative to which it will be centered (other than the parent window).

MFC References

CWnd::CenterWindow


PyCWnd.CheckRadioButton

CheckRadioButton(idFirst, idLast, idCheck)

Selects the specified radio button, and clears all others in the group.

Parameters

idFirst : int

The identifier of the first radio button in the group.

idLast : int

The identifier of the last radio button in the group.

idCheck : int

The identifier of the radio button to be checked.

MFC References

CWnd::CheckRadioButton


PyCWnd.ChildWindowFromPoint

PyCWnd = ChildWindowFromPoint(x, y , flag )

Returns the child window that contains the point

Parameters

x : int

x coordinate of point

y : int

y coordinate of point

flag=0 : int

Specifies which child windows to skip

MFC References

CWnd::ChildWindowFromPoint


PyCWnd.ClientToScreen

(x,y) or (l, t, r, b) = ClientToScreen(point)

Converts the client coordinates of a given point on the display to screen coordinates.

Parameters

point : (x,y)

The client coordinates.

Alternative Parameters

rect

The client coordinates.

Comments

The new screen coordinates are relative to the upper-left corner of the system display. This function assumes that the given pointis in client coordinates.

MFC References

CWnd::ClientToScreen


PyCWnd.CreateWindow

CreateWindow(classId, windowName, style, rect, parent, id, context)

Creates the actual window

Parameters

classId : string

The class ID for the window, or None

windowName : string

The title for the window, or None

style : int

The style for the window.

rect : (left, top, right, bottom)

The size and position of the window.

parent : PyCWnd

The parent window of the new window..

id : int

The control's ID.

context=None : object

A CreateContext object.

MFC References

CWnd::Create


PyCWnd.CreateWindowEx

CreateWindowEx(styleEx, classId, windowName, style, rect, parent, id, createStruct, createStruct)

Creates the actual window using extended capabilities.

Parameters

styleEx : int

The extended style of the window being created.

classId : string

The class ID for the window. May not be None.

windowName : string

The title for the window, or None

style : int

The style for the window.

rect : (left, top, right, bottom)

The size and position of the window.

parent : PyCWnd

The parent window of the new window..

id : int

The control's ID.

createStruct=None : CREATESTRUCT

A CreateStruct object (ie, a tuple)

createStruct : tuple

A tuple representing a CREATESTRUCT structure.

MFC References

CWnd::CreateEx


PyCWnd.DefWindowProc

int = DefWindowProc(message, idLast , idCheck )

Calls the default message handler.

Parameters

message : int

The Windows message.

idLast : int

The lParam for the message.

idCheck : int

The wParam for the message.

MFC References

CWnd::DefWindowProc


PyCWnd.DestroyWindow

DestroyWindow()

Destroy the window attached to the object.

Comments

The DestroyWindow member function sends appropriate messages to the window to deactivate it and remove the input focus. It also destroys the window's menu, flushes the application queue, destroys outstanding timers, removes Clipboard ownership, and breaks the Clipboard-viewer chain if CWnd is at the top of the viewer chain. It sends WM_DESTROY and WM_NCDESTROY messages to the window.


PyCWnd.DlgDirList

DlgDirList(defPath, idListbox, idStaticPath, fileType)

Fill a list box with a file or directory listing.

Parameters

defPath : string

The file spec to fill the list box with

idListbox : int

The Id of the listbox control to fill.

idStaticPath : int

The Id of the static control used to display the current drive and directory. If idStaticPath is 0, it is assumed that no such control exists.

fileType : int

Specifies the attributes of the files to be displayed. It can be any combination of DDL_READWRITE, DDL_READONLY, DDL_HIDDEN, DDL_SYSTEM, DDL_DIRECTORY, DDL_ARCHIVE, DDL_POSTMSGS, DDL_DRIVES or DDL_EXCLUSIVE

MFC References

CWnd::DlgDirList


PyCWnd.DlgDirListComboBox

DlgDirListComboBox()

Fill a combo with a file or directory listing. See PyCWnd::DlgDirList for details.

MFC References

CWnd::DlgDirListComboBox


PyCWnd.DlgDirSelect

string = DlgDirSelect(idListbox)

Retrieves the current selection from a list box. It assumes that the list box has been filled by the PyCWnd::DlgDirList member function and that the selection is a drive letter, a file, or a directory name.

Parameters

idListbox : int

The Id of the listbox.

MFC References

CWnd::DlgDirSelect


PyCWnd.DlgDirSelectComboBox

string = DlgDirSelectComboBox(idListbox)

Retrieves the current selection from the list box of a combo box. It assumes that the list box has been filled by the PyCWnd::DlgDirListComboBox member function and that the selection is a drive letter, a file, or a directory name.

Parameters

idListbox : int

The Id of the combobox.

MFC References

CWnd::DlgDirSelectComboBox


PyCWnd.DragAcceptFiles

DragAcceptFiles(bAccept)

Indicates that the window and children supports files dropped from file manager

Parameters

bAccept=1 : int

A flag indicating if files are accepted.

MFC References

CWnd::DragAcceptFiles


PyCWnd.DrawMenuBar

DrawMenuBar()

Redraws the menu bar. Can be called if the menu changes.


PyCWnd.EnableWindow

int = EnableWindow(bEnable)

Enables or disables the window. Typically used for dialog controls.

Parameters

bEnable=1 : int

A flag indicating if the window is to be enabled or disabled.

MFC References

CWnd::EnableWindow

Return Value

Returns the state before the EnableWindow member function was called


PyCWnd.EndModalLoop

EndModalLoop(result)

Ends a modal loop.

Parameters

result : int

The result as returned to RunModalLoop


PyCWnd.EndPaint

EndPaint(paintStruct)

Ends painting

Parameters

paintStruct : PAINTSTRUCT

The object returned from PyCWnd::BeginPaint


PyCWnd.GetCheckedRadioButton

int = GetCheckedRadioButton(idFirst, idLast )

Returns the ID of the checked radio button, or 0 if none is selected.

Parameters

idFirst : int

The Id of the first radio button in the group.

idLast : int

The Id of the last radio button in the group.

MFC References

CWnd::GetCheckedRadioButton


PyCWnd.GetClientRect

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

Returns the client coordinates of the window. left and top will be zero.


PyCWnd.GetDC

PyCDC = GetDC()

Gets the windows current DC object.

Return Value

The result is a PyCDC, or a win32ui.error exception is raised.


PyCWnd.GetDCEx

PyCDC = GetDCEx()

Gets the windows current DC object with extended caps.


PyCWnd.GetDlgCtrlID

int = GetDlgCtrlID()

Returns the ID of this child window.

MFC References

CWnd::GetDlgCtrlId


PyCWnd.GetDlgItem

PyCWnd = GetDlgItem(idControl)

Returns a window object for the child window or control with the specified ID. The type of the return object will be as specific as possible, but will always be derived from an PyCWnd object.

Parameters

idControl : int

The Id of the control to be retrieved.

MFC References

CWnd::GetDlgItem

Return Value

The result is a PyCWnd (or derived) object, or a win32ui.error exception is raised.


PyCWnd.GetDlgItemInt

int = GetDlgItemInt(idControl, bUnsigned )

Returns the integer value of a child window or control with the specified ID.

Parameters

idControl : int

The Id of the control to be retrieved.

bUnsigned=1 : int

Should the function check for a minus sign

MFC References

CWnd::GetDlgItemInt

Return Value

If the value can not be converted, a ValueError is raised.


PyCWnd.GetDlgItemText

string = GetDlgItemText(idControl)

Returns the text of child window or control with the specified ID.

Parameters

idControl : int

The Id of the control to be retrieved.

MFC References

CWnd::GetDlgItemText


PyCWnd.GetExStyle

int = GetExStyle()

Retrieves the window's extended style


PyCWnd.GetLastActivePopup

PyCWnd = GetLastActivePopup()

Returns the last active popup Window, or the Window itself.

MFC References

CWnd::GetLastActivePopup

Return Value

The result is a PyCWnd object, or None if no Window can be found.


PyCWnd.GetMenu

PyCMenu = GetMenu()

Returns the menu object for the window's menu.

MFC References

CWnd::GetMenu

Return Value

The result is a PyMenu object, or an exception is thrown.


PyCWnd.GetParent

PyCWnd = GetParent()

Returns the window's parent.

MFC References

CWnd::GetParent

Return Value

The result is a PyCWnd object, or None if no Window can be found.


PyCWnd.GetParentFrame

PyCWnd = GetParentFrame()

Returns the window's frame.

MFC References

CWnd::GetParentFrame

Return Value

The result is a PyCWnd object, or None if no Window can be found.


PyCWnd.GetSafeHwnd

int = GetSafeHwnd()

Returns the HWnd of this window.

MFC References

CWnd::GetSafeHwnd


PyCWnd.GetScrollInfo

int = 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.


PyCWnd.GetScrollPos

int = GetScrollPos(nBar)

Retrieves the current position of the scroll box of a scroll bar.

Parameters

nBar : int

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


PyCWnd.GetStyle

int = GetStyle()

Retrieves the window style


PyCWnd.GetSystemMenu

PyCMenu = GetSystemMenu()

Returns the menu object for the window's system menu.

MFC References

CWnd::GetSystemMenu


PyCWnd.GetTopLevelFrame

PyCWnd = GetTopLevelFrame()

Returns the top-level frame of the window.

MFC References

CWnd::GetTopLevelFrame

Return Value

The result is a PyCWnd object, or None if no Window can be found.


PyCWnd.GetTopLevelOwner

PyCWnd = GetTopLevelOwner()

Returns the top-level owner of the window.

MFC References

CWnd::GetTopLevelOwner

Return Value

The result is a PyCWnd object, or None if no Window can be found.


PyCWnd.GetTopLevelParent

PyCWnd = GetTopLevelParent()

Returns the top-level parent of the window.

MFC References

CWnd::GetTopLevelParent

Return Value

The result is a PyCWnd object, or None if no Window can be found.


PyCWnd.GetTopWindow

PyCWnd = GetTopWindow()

Identifies the top-level child window in a linked list of child windows.

Comments

Searches for the top-level child window that belongs to this window. If this window has no children, this function returns None

MFC References

CWnd::GetTopWindow

Return Value

If no child windows exist, the value is None.


PyCWnd.GetWindow

PyCWnd = GetWindow(type)

Returns a window, with the specified relationship to this window.

Parameters

type : int

Specifies the relationship between the current and the returned window. It can take one of the following values: GW_CHILD, GW_HWNDFIRST, GW_HWNDLAST, GW_HWNDNEXT, GW_HWNDPREV or GW_OWNER

MFC References

CWnd::GetWindow

Return Value

The result is a PyCWnd or None if no Window can be found.


PyCWnd.GetWindowDC

PyCDC = GetWindowDC()

Gets the windows current DC object.


PyCWnd.GetWindowPlacement

tuple = GetWindowPlacement()

Returns placement information about the current window.

MFC References

CWnd::GetWindowPlacement

Return Value

The result is a tuple of (flags, showCmd, (minposX, minposY), (maxposX, maxposY), (normalposX, normalposY))

Item | Description
flags | One of the WPF_* constants
showCmd | Current state - one of the SW_* constants.
minpos | Specifies the coordinates of the window's upper-left corner when the window is minimized.
maxpos | Specifies the coordinates of the window's upper-left corner when the window is maximized.
normalpos | Specifies the window's coordinates when the window is in the restored position.


PyCWnd.GetWindowRect

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

Returns the screen coordinates of the windows upper left corner

MFC References

CWnd::GetWindowRect


PyCWnd.GetWindowText

string = GetWindowText()

Returns the windows text.

MFC References

CWnd::Py_BuildValue


PyCWnd.HideCaret

HideCaret()

Hides the caret

Comments

See also PyCWnd::ShowCaret


PyCWnd.HookAllKeyStrokes

HookAllKeyStrokes(obHandler)

Hook a key stroke handler for all key strokes.

Parameters

obHandler : object

The handler for the keystrokes. This must be a callable object.

Comments

The handler object passed will be called as the application receives WM_CHAR messages. The handler will be called with 2 arguments
The handler object (as per all hook functions).
The keystroke being handled.
If the handler returns TRUE, then the keystroke will be passed on to the default handler, otherwise it will be consumed.
Note: This handler will prevent any PyCWnd::HookKeyStroke hooks from being called.


PyCWnd.HookKeyStroke

object = HookKeyStroke(obHandler, ch )

Hook a key stroke handler

Parameters

obHandler : object

The handler of the keystroke. This must be a callable object.

ch : int

The ID for the keystroke to be handled. This may be an ascii code, or a virtual key code.

Comments

The handler object passed will be called as the application receives WM_CHAR message for the specified character code. The handler will be called with 2 arguments
The handler object (as per all hook functions)
The keystroke being handled.
If the handler returns TRUE, then the keystroke will be passed on to the default handler, otherwise the keystroke will be consumed.
Note: This handler will not be called if a PyCWnd::HookAllKeyStrokes hook is in place.

Return Value

The return value is the previous handler, or None.


PyCWnd.HookMessage

object = HookMessage(obHandler, message )

Hook a message notification handler

Parameters

obHandler : object

The handler for the message notification. This must be a callable object.

message : int

The ID of the message to be handled.

Comments

The handler object passed will be called as the application receives messages with the specified ID. Note that it is not possible for PythonWin to consume a message - it is always passed on to the default handler. The handler will be called with 2 arguments
The handler object (as per all hook functions).
A tuple representing the message.
The message tuple is in the following format:

Items

[0] int : hwnd

The hwnd of the window.

[1] int : message

The message.

[2] int : wParam

The wParam sent with the message.

[3] int : lParam

The lParam sent with the message.

[4] int : time

The time the message was posted.

[5] int, int : point

The point where the mouse was when the message was posted.

Return Value

The return value is the previous handler, or None.


PyCWnd.InvalidateRect

InvalidateRect(rect, bErase)

Invalidates an area of a window.

Parameters

rect=(0,0,0,0) : (left, top, right, bottom)

Rectangle to be updated. If default param is used, the entire window is invalidated.

bErase=1 : int

Specifies whether the background within the update region is to be erased.

MFC References

CWnd::InvalidateRect


PyCWnd.InvalidateRgn

InvalidateRgn(region, bErase)

Invalidates a region of the window

Parameters

region : PyCRgn

The region to erase.

bErase=1 : int

Indicates if the region should be erased.


PyCWnd.IsChild

int = IsChild(obWnd)

Determines if a given window is a child of this window.

Parameters

obWnd : PyCWnd

The window to be checked

MFC References

CWnd::IsChild


PyCWnd.IsDlgButtonChecked

int = IsDlgButtonChecked(idCtl)

Determines if a dialog button is checked.

Parameters

idCtl : int

The ID of the button to check.

MFC References

CWnd::IsDlgButtonChecked


PyCWnd.IsIconic

int = IsIconic()

Determines if the window is currently displayed as an icon.


PyCWnd.IsWindow

int = IsWindow()

determines whether the specified window handle identifies an existing window


PyCWnd.IsWindowVisible

int = IsWindowVisible()

Determines if the window is currently visible.


PyCWnd.IsZoomed

int = IsZoomed()

Determines if the window is currently maximised.


PyCWnd.KillTimer

int = KillTimer()

Kills a system timer

MFC References

CWnd::KillTimer


PyCWnd.LockWindowUpdate

LockWindowUpdate()

Disables drawing in the given window

MFC References

CWnd::LockWindowUpdate


PyCWnd.MapWindowPoints

MapWindowPoints(wnd, points)

Converts (maps) a set of points from the coordinate space of a window to the coordinate space of another window.

Parameters

wnd : PyCWnd

points : [ (x,y), ...]

The points to map

Return Value

A list of the mapped points from the coordinate space of the CWnd to the coordinate space of another window.


PyCWnd.MessageBox

MessageBox(message, title, style)

Display a message box.

Parameters

message : string

The message to be displayed in the message box.

title=None : 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.

MFC References

CWnd::MessageBox

Return Value

An integer identifying the button pressed to dismiss the dialog.


PyCWnd.ModifyStyle

int = ModifyStyle(remove, add , flags )

Modifies the style of a window.

Parameters

remove : int

Specifies window styles to be removed during style modification.

add : int

Specifies window styles to be added during style modification.

flags=0 : int

Flags to be passed to SetWindowPos, or zero if SetWindowPos should not be called. The default is zero.

Comments

If nFlags is nonzero, ModifyStyle calls the Windows API function ::SetWindowPos and redraws the window by combining nFlags with the following four preset flags:
* SWP_NOSIZE Retains the current size.
* SWP_NOMOVE Retains the current position.
* SWP_NOZORDER Retains the current Z order.
* SWP_NOACTIVATE Does not activate the window.
See also PyCWnd::ModifyStyleEx

MFC References

CWnd::ModifyStyle

Return Value

The result is true if the style was changed, or false if the style is already the same as requested and no change was made.


PyCWnd.ModifyStyleEx

int = ModifyStyleEx(remove, add , flags )

Modifies the extended style of a window.

Parameters

remove : int

Specifies extended window styles to be removed during style modification.

add : int

Specifies extended extended window styles to be added during style modification.

flags=0 : int

Flags to be passed to SetWindowPos, or zero if SetWindowPos should not be called. The default is zero.

Comments

If nFlags is nonzero, ModifyStyleEx calls the Windows API function ::SetWindowPos and redraws the window by combining nFlags with the following four preset flags:
* SWP_NOSIZE Retains the current size.
* SWP_NOMOVE Retains the current position.
* SWP_NOZORDER Retains the current Z order.
* SWP_NOACTIVATE Does not activate the window.
See also PyCWnd::ModifyStyle

MFC References

CWnd::ModifyStyleEx

Return Value

The result is true if the style was changed, or false if the style is already the same as requested and no change was made.


PyCWnd.MouseCaptured

int = MouseCaptured()

Returns 1 if the window has the mouse capture, else 0


PyCWnd.MoveWindow

MoveWindow(rect, bRepaint)

Move a window to a new location.

Parameters

rect : (left, top, right, bottom)

The new location of the window, relative to the parent.

bRepaint=1 : int

Indicates if the window should be repainted after the move.

MFC References

CWnd::MoveWindow


PyCWnd.OnClose

int = OnClose()

Calls the default MFC OnClose handler.

See Also

PyCWnd.OnClose virtual method

MFC References

CWnd::OnClose


PyCWnd.OnCtlColor

int = OnCtlColor(dc, control , type )

Calls the default MFC OnCtlColor handler.

Parameters

dc : PyCDC

The dc

control : PyCWin

The control that want's it's color changed

type : int

Type of control

See Also

PyCWnd.OnCtlColor virtual method

MFC References

CWnd::OnCtlColor


PyCWnd.OnEraseBkgnd

int = OnEraseBkgnd(dc)

Calls the default MFC OnEraseBkgnd handler.

Parameters

dc : PyCDC

The dc

See Also

PyCWnd.OnEraseBkgnd virtual method

MFC References

CWnd::OnEraseBkgnd


PyCWnd.OnMouseActivate

int = OnMouseActivate(wnd, hittest , message )

Calls the base MFC OnMouseActivate function.

Parameters

wnd : PyCWnd

hittest : int

message : int

See Also

PyCWnd.OnMouseActivate virtual method


PyCWnd.OnNcHitTest

int = OnNcHitTest(x, y)

Calls the base MFC OnNcHitTest function.

Parameters

x, y : int, int

The point

See Also

PyCWnd.OnNcHitTest virtual method


PyCWnd.OnPaint

int = OnPaint()

Calls the default MFC OnPaint handler.

See Also

PyCWnd.OnPaint virtual method

MFC References

CWnd::OnEraseBkgnd


PyCWnd.OnQueryDragIcon

int = OnQueryDragIcon()

Calls the default MFC OnQueryDragIcon handler.

See Also

PyCWnd.OnQueryDragIcon virtual method


PyCWnd.OnQueryNewPalette

int = OnQueryNewPalette()

Calls the underlying MFC OnQueryNewPalette method.

See Also

PyCWnd.OnQueryNewPalette virtual method


PyCWnd.OnSetCursor

int = OnSetCursor(wnd, hittest , message )

Calls the base MFC OnSetCursor function.

Parameters

wnd : PyCWnd

hittest : int

message : int

See Also

PyCWnd.OnSetCursor virtual method


PyCWnd.OnWndMsg

(int,int) = OnWndMsg(msg, wParam , lParam )

Calls the default MFC Window Message handler.

Parameters

msg : int

The message

wParam : int

The wParam for the message

lParam : int

The lParam for the message

MFC References

CWnd::OnWndMsg

Return Value

The return value is a tuple of (int, int), being the return value from the MFC function call, and the value of the lResult param. Please see the MFC documentation for more details.


PyCWnd.PostMessage

PostMessage(idMessage, wParam, lParam)

Post a message to the window.

Parameters

idMessage : int

The ID of the message to post.

wParam=0 : int

The wParam for the message

lParam=0 : int

The lParam for the message

MFC References

CWnd::PostMessage


PyCWnd.PreCreateWindow

tuple = PreCreateWindow(createStruct)

Calls the underlying MFC PreCreateWindow method.

Parameters

createStruct : tuple

A tuple representing a CREATESTRUCT structure.

See Also

PyCWnd.PreCreateWindow virtual method


PyCWnd.PumpWaitingMessages

PumpWaitingMessages(firstMsg, lastMsg)

Pump messages associate with a window.

Parameters

firstMsg : int

First message ID to process

lastMsg : int

First message ID to process

MFC References

CWnd::PeekMessage and DispatchMessage


PyCWnd.RedrawWindow

RedrawWindow(rect, object, flags)

Updates the specified rectangle or region in the given window's client area.

Parameters

rect=None : (left, top, right, bottom)

A rect, or None

object=PyCRgn or None : PyCRgn

A region

flags=RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE : int

MFC References

CWnd::RedrawWindow


PyCWnd.ReleaseCapture

ReleaseCapture()

Releases the mouse capture for this window. See PyCWnd::SetCapture.


PyCWnd.ReleaseDC

ReleaseDC(dc)

Releases a device context, freeing it for use by other applications.

Parameters

dc : PyCDC

The DC to be released.


PyCWnd.RepositionBars

RepositionBars(idFirst, idLast, idLeftOver)

Repositions the windows control bars.( UINT nIDFirst, UINT nIDLast, UINT nIDLeftOver, UINT nFlag = CWnd::reposDefault, LPRECT lpRectParam = NULL, LPCRECT lpRectClient = NULL, BOOL bStretch = TRUE );

Parameters

idFirst : int

The ID of the first control to reposition.

idLast : int

The ID of the last control to reposition.

idLeftOver : int


PyCWnd.RunModalLoop

int = RunModalLoop(flags)

Begins a modal loop for the window.

Parameters

flags : int


PyCWnd.ScreenToClient

(left, top, right, bottom) or (x, y) = ScreenToClient(rect)

Converts the screen coordinates of a given point or rectangle on the display to client coordinates.

Parameters

rect : (left, top, right, bottom) or (x,y)

The coordinates to convert.

Alternative Parameters

pnt

The coordinates to convert.

MFC References

CWnd::ScreenToClient

Return Value

The result is the same size as the input argument.


PyCWnd.SendMessage

SendMessage(idMessage, wParam, lParam)

Send a message to the window.

Parameters

idMessage : int

The ID of the message to send.

wParam=0 : int

The wParam for the message

lParam=0 : int

The lParam for the message

Alternative Parameters

idMessage

The ID of the message to send.

ob

A buffer whose size is passed in wParam, and address is passed in lParam

MFC References

CWnd::SendMessage


PyCWnd.SendMessageToDescendants

SendMessageToDescendants(idMessage, wParam, lParam, bDeep)

Send a message to all descendant windows.

Parameters

idMessage : int

The ID of the message to send.

wParam=0 : int

The wParam for the message

lParam=0 : int

The lParam for the message

bDeep=1 : int

Indicates if the message should be recursively sent to all children

MFC References

CWnd::SendMessageToDescendants


PyCWnd.SetActiveWindow

PyCWnd = SetActiveWindow()

Sets the window active. Returns the previously active window, or None.

Return Value

The result is the previous window with focus, or None.


PyCWnd.SetCapture

SetCapture()

Causes all subsequent mouse input to be sent to the window object regardless of the position of the cursor.


PyCWnd.SetDlgItemText

SetDlgItemText(idControl, text)

Sets the text for the child window or control with the specified ID.

Parameters

idControl : int

The Id of the control

text : string

The new text

MFC References

CWnd::SetDlgItemText


PyCWnd.SetFocus

SetFocus()

Claims the input focus. The object that previously had the focus loses it.


PyCWnd.SetFont

SetFont(font, bRedraw)

Sets the window's current font to the specified font.

Parameters

font : PyCFont

The new font to use.

bRedraw=1 : int

If TRUE, redraw the window.


PyCWnd.SetForegroundWindow

SetForegroundWindow()

Puts the window into the foreground and activates the window.


PyCWnd.SetMenu

SetMenu(menuObj)

Sets the menu for a window.

Parameters

menuObj : PyCMenu

The menu object to set, or None to remove the window.


PyCWnd.SetRedraw

SetRedraw(bState)

Allows changes to be redrawn or to prevent changes from being redrawn.

Parameters

bState=1 : int

Specifies the state of the redraw flag.

MFC References

CWnd::SetRedraw


PyCWnd.SetScrollInfo

int = SetScrollInfo(nBar, redraw )

Set 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

redraw=1 : int

A flag indicating if the scrollbar should be re-drawn.


PyCWnd.SetScrollPos

int = SetScrollPos(nBar, nPos , redraw )

Sets the current position of the scroll box of a scroll bar.

Parameters

nBar : int

The scroll bar to set. Can be one of win32con.SB_VERT or win32con.SB_HORZ

nPos : int

The new position

redraw=1 : int

A flag indicating if the scrollbar should be redrawn.


PyCWnd.SetTimer

int = SetTimer(idEvent, elapse )

Installs a system timer

Parameters

idEvent : int

The ID of the event

elapse : int

How often the timer should fire.

MFC References

CWnd::SetTimer


PyCWnd.SetWindowPlacement

SetWindowPlacement(placement)

Sets the windows placement

Parameters

placement : (tuple)

A tuple representing the WINDOWPLACEMENT structure.

MFC References

CWnd::SetWindowPlacement


PyCWnd.SetWindowPos

SetWindowPos(hWndInsertAfter, position, flags)

Sets the windows position information

Parameters

hWndInsertAfter : int

A hwnd, else one of the win32con.HWND_* constants.

position : (x,y,cx,cy)

The new position of the window.

flags : int

Window positioning flags.

MFC References

CWnd::SetWindowPos


PyCWnd.SetWindowText

SetWindowText(text)

Sets the window's text.

Parameters

text : string

The windows text.

MFC References

CWnd::SetWindowText


PyCWnd.ShowCaret

ShowCaret()

Shows the caret

Comments

See also PyCWnd::HideCaret


PyCWnd.ShowScrollBar

ShowScrollBar(nBar, bShow)

Shows or hides a scroll bar. An application should not call ShowScrollBar to hide a scroll bar while processing a scroll-bar notification message.

Parameters

nBar : int

Specifies whether the scroll bar is a control or part of a window's nonclient area. If it is part of the nonclient area, nBar also indicates whether the scroll bar is positioned horizontally, vertically, or both. It must be one of win32con.SB_BOTH, win32con.SB_HORZ or win32con.SB_VERT.

bShow=1 : int

Indicates if the scroll bar should be shown or hidden.

MFC References

CWnd::ShowScrollBar


PyCWnd.ShowWindow

int = ShowWindow(style)

Sets the visibility state of the window.

Parameters

style=win32con.SW_SHOWNORMAL : int

Specifies how the window is to be shown. It must be one of win32con.SW_HIDE, win32con.SW_MINIMIZE, win32con.SW_RESTORE, win32con.SW_SHOW, win32con.SW_SHOWMAXIMIZED win32con.SW_SHOWMINIMIZED, win32con.SW_SHOWMINNOACTIVE, win32con.SW_SHOWNA, win32con.SW_SHOWNOACTIVATE, or win32con.SW_SHOWNORMAL

MFC References

CWnd::ShowWindow

Return Value

Returns TRUE is the window was previously visible.


PyCWnd.UnlockWindowUpdate

UnlockWindowUpdate()

Unlocks a window that was locked with LockWindowUpdate

MFC References

CWnd::UnLockWindowUpdate


PyCWnd.UpdateData

int = UpdateData(bSaveAndValidate)

Initialises data in a dialog box, or to retrieves and validates dialog data. Returns nonzero if the operation is successful; otherwise 0. If bSaveAndValidate is TRUE, then a return value of nonzero means that the data is successfully validated.

Parameters

bSaveAndValidate=1 : int

Flag that indicates whether dialog box is being initialized (FALSE) or data is being retrieved (TRUE).

MFC References

CWnd::UpdateData


PyCWnd.UpdateDialogControls

int = UpdateDialogControls(pTarget, disableIfNoHandler )

Updates the state of dialog buttons and other controls in a dialog box or window that uses the PyCCmdUI::HookCommandUpdate callback mechanism.

Parameters

pTarget : PyCCmdTarget

The main frame window of the application, and is used for routing update messages.

disableIfNoHandler : int

Flag that indicates whether a control that has no update handler should be automatically displayed as disabled.


PyCWnd.UpdateWindow

UpdateWindow()

Updates a window. This forces a paint message to be sent to the window, if any part of the window is marked as invalid.


PyDLL

PyDLL Object

A DLL object. A general utility object, and not associated with an MFC object.

Methods

GetFileName
Returns the file name of the DLL associated with the object.

AttachToMFC
Attaches the DLL to the internal list of MFC DLL's.


PyDLL.__repr__

string = __repr__()

Returns the HINSTANCE and filename of the DLL.

Win32 API References

GetModuleFileName


PyDLL.AttachToMFC

AttachToMFC()

Attaches the DLL object to the MFC list of DLL's.

Comments

After calling this method, MFC will search this DLL when looking for resources. A program can use this function once, instead of specifying the DLL in each call to load/find a resource.
In addition, this is the only way that an application can provide status bar messages and tool tips for custom control ID's in an external DLL.


PyDLL.GetFileName

string = GetFileName()

Returns the name of the module associated with the DLL.

Comments

Note that this is the name that Windows knows the DLL by, not necessarily the name that was specified!


TV_ITEM

TV_ITEM Object

Describes a TV_ITEM tuple, used by the PyCListCtrl object. A tuple of 8 items:
When returned from a win32ui function, will always be a tuple of size 8, and items may be None if not available.
When passed to a win32ui function, the tuple may be any length up to 8, and any item may be None.

Items

[0] int : hItem

Item handle

[1] int : state

Item state. If specified, the stateMask must also be specified.

[2] int : stateMask

Item state mask

[3] string : text

Item text

[4] int : iImage

Offset of items image.

[5] int : iSelectedImage

Offset of items selected image.

[6] int : cChildren

Number of child items.

[7] int : lParam

User defined integer param.

Parameters

cxy : int

Width or height of item

pszText : string

Item text

text : string

Item text

fmt : int

code for centering etc of string

lParam : int

User defined integer param.


OLECLOSE_NOSAVE

const axcontrol.OLECLOSE_NOSAVE;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXCONTROL/SRC/AXCONTROL.CPP

The object should not be saved, even if it is dirty. This flag is typically used when an object is being deleted.


OLECLOSE_PROMPTSAVE

const axcontrol.OLECLOSE_PROMPTSAVE;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXCONTROL/SRC/AXCONTROL.CPP

If the object is dirty, the PyIOleObject::Close implementation should display a dialog box to let the end user determine whether to save the object. However, if the object is in the running state but its user interface is invisible, the end user should not be prompted, and the close should be handled as if OLECLOSE_SAVEIFDIRTY had been specified.


OLECLOSE_SAVEIFDIRTY

const axcontrol.OLECLOSE_SAVEIFDIRTY;

Defined in: E:/SRC/PYTHONEX/COM/WIN32COMEXT/AXCONTROL/SRC/AXCONTROL.CPP

The object should be saved if it is dirty.


Classes and class members


Functions


GetFileVersionInfo.

(Filename, SubBlock)

Retrieve version info for specified file

Parameters

Filename : string/unicode

File to query for version info

SubBlock : string/unicode

Information to return: \\ for VS_FIXEDFILEINFO, \\VarFileInfo\\Translation for languages/codepages available


AB_NO_DIALOG

const mapi.AB_NO_DIALOG;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


ATTACH_BY_REF_ONLY

const mapi.ATTACH_BY_REF_ONLY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The PR_ATTACH_PATHNAME or PR_ATTACH_LONG_PATHNAME property contains a fully qualified path identifying the attachment.


ATTACH_BY_REF_RESOLVE

const mapi.ATTACH_BY_REF_RESOLVE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The PR_ATTACH_PATHNAME or PR_ATTACH_LONG_PATHNAME property contains a fully qualified path identifying the attachment.


ATTACH_BY_REFERENCE

const mapi.ATTACH_BY_REFERENCE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The PR_ATTACH_PATHNAME or PR_ATTACH_LONG_PATHNAME property contains a fully qualified path identifying the attachment to recipients with access to a common file server.


ATTACH_BY_VALUE

const mapi.ATTACH_BY_VALUE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The PR_ATTACH_DATA_BIN property contains the attachment data.


ATTACH_EMBEDDED_MSG

const mapi.ATTACH_EMBEDDED_MSG;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The PR_ATTACH_DATA_OBJ property contains an embedded object that supports the IMessage interface.


ATTACH_OLE

const mapi.ATTACH_OLE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The attachment is an embedded OLE object


BMR_EQZ

const mapi.BMR_EQZ;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Perform a bitwise AND operation of the mask in the ulMask member with the property represented by the ulPropTag member and test for being equal to zero.


BMR_NEZ

const mapi.BMR_NEZ;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Perform a bitwise AND operation of the mask in the ulMask member with the property represented by the ulPropTag member and test for being not equal to zero.


BOOKMARK_BEGINNING

const mapi.BOOKMARK_BEGINNING;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Starts the seek operation from the beginning of the table.


BOOKMARK_CURRENT

const mapi.BOOKMARK_CURRENT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Starts the seek operation from the row in the table where the cursor is located.


BOOKMARK_END

const mapi.BOOKMARK_END;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Starts the seek operation from the end of the table.


CONVENIENT_DEPTH

const mapi.CONVENIENT_DEPTH;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Fills the hierarchy table with containers from multiple levels. If CONVENIENT_DEPTH is not set, the hierarchy table contains only the container's immediate child containers.


DIR_BACKWARD

const mapi.DIR_BACKWARD;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Searches backward from the row identified by the bookmark.


FL_FULLSTRING

const mapi.FL_FULLSTRING;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

To match, the lpProp search string must be completely contained in the property identified by ulPropTag.


FL_IGNORECASE

const mapi.FL_IGNORECASE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The comparison should be made without considering case.


FL_IGNORENONSPACE

const mapi.FL_IGNORENONSPACE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The comparison should ignore Unicode-defined nonspacing characters such as diacritical marks.


FL_LOOSE

const mapi.FL_LOOSE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The comparison should result in a match whenever possible, ignoring case and nonspacing characters


FL_PREFIX

const mapi.FL_PREFIX;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

To match, the lpProp search string must appear at the beginning of the property identified by ulPropTag. The two strings should be compared only up to the length of the search string indicated by lpProp.


FL_SUBSTRING

const mapi.FL_SUBSTRING;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

To match, the lpProp search string must be contained anywhere within the property identified by ulPropTag.


FOLDER_GENERIC

const mapi.FOLDER_GENERIC;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

A generic folder should be created.


FOLDER_SEARCH

const mapi.FOLDER_SEARCH;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

A search-results folder should be created.


FORCE_SAVE

const mapi.FORCE_SAVE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Changes should be written to the object, overriding any previous changes made to the object, and the object closed. Read/write access must have been set for the operation to succeed. The FORCE_SAVE flag is used after a previous call to SaveChanges returned MAPI_E_OBJECT_CHANGED.


KEEP_OPEN_READONLY

const mapi.KEEP_OPEN_READONLY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Changes should be committed and the object should be kept open for reading. No further changes will be made.


KEEP_OPEN_READWRITE

const mapi.KEEP_OPEN_READWRITE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Changes should be committed and the object should be kept open for read/write access. This flag is usually set when the object was initially opened for read/write access. Subsequent changes to the object are allowed.


MAPI_ALLOW_OTHERS

const mapi.MAPI_ALLOW_OTHERS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The shared session should be returned, allowing subsequent clients to acquire the session without providing any user credentials.


MAPI_ASSOCIATED

const mapi.MAPI_ASSOCIATED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The container's associated contents table should be returned rather than the standard contents table. This flag is used only with folders. The messages that are included in the associated contents table were created with the MAPI_ASSOCIATED flag set in the call to IMAPIFolder::CreateMessage. Clients typically use the associated contents table to retrieve forms and views.


MAPI_BCC

const mapi.MAPI_BCC;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The recipient is a blind carbon copy (BCC) recipient. Primary and carbon copy recipients are unaware of the existence of BCC recipients.


MAPI_BEST_ACCESS

const mapi.MAPI_BEST_ACCESS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_CC

const mapi.MAPI_CC;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The recipient is a carbon copy (CC) recipient, a recipient that receives a message in addition to the primary recipients.


MAPI_CREATE

const mapi.MAPI_CREATE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The object will be created if necessary.


MAPI_DEFAULT_SERVICES

const mapi.MAPI_DEFAULT_SERVICES;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

MAPI should populate the new profile with the message services that are included in the [Default Services] section of the MAPISVC.INF file.


MAPI_DEFERRED_ERRORS

const mapi.MAPI_DEFERRED_ERRORS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Allows a method to return successfully, possibly before the changes have been fully committed.


MAPI_DIALOG

const mapi.MAPI_DIALOG;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_ACCOUNT_DISABLED

const mapi.MAPI_E_ACCOUNT_DISABLED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_AMBIGUOUS_RECIP

const mapi.MAPI_E_AMBIGUOUS_RECIP;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_BAD_CHARWIDTH

const mapi.MAPI_E_BAD_CHARWIDTH;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_BAD_COLUMN

const mapi.MAPI_E_BAD_COLUMN;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_BAD_VALUE

const mapi.MAPI_E_BAD_VALUE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_BUSY

const mapi.MAPI_E_BUSY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_CALL_FAILED

const mapi.MAPI_E_CALL_FAILED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_CANCEL

const mapi.MAPI_E_CANCEL;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_COLLISION

const mapi.MAPI_E_COLLISION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_COMPUTED

const mapi.MAPI_E_COMPUTED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_CORRUPT_DATA

const mapi.MAPI_E_CORRUPT_DATA;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_CORRUPT_STORE

const mapi.MAPI_E_CORRUPT_STORE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_DECLINE_COPY

const mapi.MAPI_E_DECLINE_COPY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_DISK_ERROR

const mapi.MAPI_E_DISK_ERROR;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_END_OF_SESSION

const mapi.MAPI_E_END_OF_SESSION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_EXTENDED_ERROR

const mapi.MAPI_E_EXTENDED_ERROR;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_FAILONEPROVIDER

const mapi.MAPI_E_FAILONEPROVIDER;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_FOLDER_CYCLE

const mapi.MAPI_E_FOLDER_CYCLE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_HAS_FOLDERS

const mapi.MAPI_E_HAS_FOLDERS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_HAS_MESSAGES

const mapi.MAPI_E_HAS_MESSAGES;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_INTERFACE_NOT_SUPPORTED

const mapi.MAPI_E_INTERFACE_NOT_SUPPORTED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_INVALID_ACCESS_TIME

const mapi.MAPI_E_INVALID_ACCESS_TIME;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_INVALID_BOOKMARK

const mapi.MAPI_E_INVALID_BOOKMARK;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_INVALID_ENTRYID

const mapi.MAPI_E_INVALID_ENTRYID;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_INVALID_OBJECT

const mapi.MAPI_E_INVALID_OBJECT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_INVALID_PARAMETER

const mapi.MAPI_E_INVALID_PARAMETER;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_INVALID_TYPE

const mapi.MAPI_E_INVALID_TYPE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_INVALID_WORKSTATION_ACCOUNT

const mapi.MAPI_E_INVALID_WORKSTATION_ACCOUNT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_LOGON_FAILED

const mapi.MAPI_E_LOGON_FAILED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_MISSING_REQUIRED_COLUMN

const mapi.MAPI_E_MISSING_REQUIRED_COLUMN;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_NETWORK_ERROR

const mapi.MAPI_E_NETWORK_ERROR;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_NO_ACCESS

const mapi.MAPI_E_NO_ACCESS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_NO_RECIPIENTS

const mapi.MAPI_E_NO_RECIPIENTS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_NO_SUPPORT

const mapi.MAPI_E_NO_SUPPORT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_NO_SUPPRESS

const mapi.MAPI_E_NO_SUPPRESS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_NON_STANDARD

const mapi.MAPI_E_NON_STANDARD;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_NOT_ENOUGH_DISK

const mapi.MAPI_E_NOT_ENOUGH_DISK;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_NOT_ENOUGH_MEMORY

const mapi.MAPI_E_NOT_ENOUGH_MEMORY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_NOT_ENOUGH_RESOURCES

const mapi.MAPI_E_NOT_ENOUGH_RESOURCES;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_NOT_FOUND

const mapi.MAPI_E_NOT_FOUND;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_NOT_IN_QUEUE

const mapi.MAPI_E_NOT_IN_QUEUE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_NOT_INITIALIZED

const mapi.MAPI_E_NOT_INITIALIZED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_NOT_ME

const mapi.MAPI_E_NOT_ME;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_OBJECT_CHANGED

const mapi.MAPI_E_OBJECT_CHANGED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_OBJECT_DELETED

const mapi.MAPI_E_OBJECT_DELETED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_PASSWORD_CHANGE_REQUIRED

const mapi.MAPI_E_PASSWORD_CHANGE_REQUIRED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_PASSWORD_EXPIRED

const mapi.MAPI_E_PASSWORD_EXPIRED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_SESSION_LIMIT

const mapi.MAPI_E_SESSION_LIMIT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_STRING_TOO_LONG

const mapi.MAPI_E_STRING_TOO_LONG;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_SUBMITTED

const mapi.MAPI_E_SUBMITTED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_TABLE_EMPTY

const mapi.MAPI_E_TABLE_EMPTY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_TABLE_TOO_BIG

const mapi.MAPI_E_TABLE_TOO_BIG;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_TIMEOUT

const mapi.MAPI_E_TIMEOUT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_TOO_BIG

const mapi.MAPI_E_TOO_BIG;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_TOO_COMPLEX

const mapi.MAPI_E_TOO_COMPLEX;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_TYPE_NO_SUPPORT

const mapi.MAPI_E_TYPE_NO_SUPPORT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_UNABLE_TO_ABORT

const mapi.MAPI_E_UNABLE_TO_ABORT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_UNABLE_TO_COMPLETE

const mapi.MAPI_E_UNABLE_TO_COMPLETE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_UNCONFIGURED

const mapi.MAPI_E_UNCONFIGURED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_UNEXPECTED_ID

const mapi.MAPI_E_UNEXPECTED_ID;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_UNEXPECTED_TYPE

const mapi.MAPI_E_UNEXPECTED_TYPE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_UNKNOWN_CPID

const mapi.MAPI_E_UNKNOWN_CPID;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_UNKNOWN_ENTRYID

const mapi.MAPI_E_UNKNOWN_ENTRYID;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_UNKNOWN_FLAGS

const mapi.MAPI_E_UNKNOWN_FLAGS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_UNKNOWN_LCID

const mapi.MAPI_E_UNKNOWN_LCID;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_USER_CANCEL

const mapi.MAPI_E_USER_CANCEL;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_VERSION

const mapi.MAPI_E_VERSION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_E_WAIT

const mapi.MAPI_E_WAIT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_EXPLICIT_PROFILE

const mapi.MAPI_EXPLICIT_PROFILE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The default profile should not be used, and the user should be required to supply a profile.


MAPI_EXTENDED

const mapi.MAPI_EXTENDED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Log on with extended capabilities. This flag should always be set. The older MAPILogon function is no longer available.


MAPI_FORCE_DOWNLOAD

const mapi.MAPI_FORCE_DOWNLOAD;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

An attempt should be made to download all of the user's messages before returning. If the MAPI_FORCE_DOWNLOAD flag is not set, messages can be downloaded in the background after the call to MAPILogonEx returns.


MAPI_INIT_VERSION

const mapi.MAPI_INIT_VERSION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_LOGON_UI

const mapi.MAPI_LOGON_UI;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

A dialog box should be displayed to prompt the user for logon information if required. When the MAPI_LOGON_UI flag is not set, the calling client does not display a logon dialog box and returns an error value if the user is not logged on. MAPI_LOGON_UI and MAPI_PASSWORD_UI are mutually exclusive.


MAPI_MODIFY

const mapi.MAPI_MODIFY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_MULTITHREAD_NOTIFICATIONS

const mapi.MAPI_MULTITHREAD_NOTIFICATIONS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

MAPI should generate notifications using a thread dedicated to notification handling rather than the first thread used to call mapi::MAPIInitialize.


MAPI_NEW_SESSION

const mapi.MAPI_NEW_SESSION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

An attempt should be made to create a new MAPI session rather than acquire the shared session. If the MAPI_NEW_SESSION flag is not set, MAPILogonEx uses an existing shared session even if the lpszprofileName parameter is not NULL.


MAPI_NO_IDS

const mapi.MAPI_NO_IDS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Requests that only names stored as Unicode strings be returned.


MAPI_NO_MAIL

const mapi.MAPI_NO_MAIL;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

MAPI should not inform the MAPI spooler of the session's existence. The result is that no messages can be sent or received within the session except through a tightly coupled store and transport pair. A calling client sets this flag if it is acting as an agent, if configuration work must be done, or if the client is browsing the available message stores.


MAPI_NO_STRINGS

const mapi.MAPI_NO_STRINGS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Requests that only names stored as numeric identifiers be returned.


MAPI_NT_SERVICE

const mapi.MAPI_NT_SERVICE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The caller is running as a Windows NT service. Callers that are not running as a Windows NT service should not set this flag; callers that are running as a service must set this flag.


MAPI_P1

const mapi.MAPI_P1;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The recipient did not successfully receive the message on the previous attempt. This is a resend of an earlier transmission.


MAPI_PASSWORD_UI

const mapi.MAPI_PASSWORD_UI;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

A dialog box should be displayed to prompt the user for the profile password. MAPI_PASSWORD_UI cannot be set if MAPI_LOGON_UI is set because the calling client can only present one of the two dialog boxes. This dialog box does not allow the profile name to be changed; the lpszProfileName parameter must be non-NULL.


MAPI_SERVICE_UI_ALWAYS

const mapi.MAPI_SERVICE_UI_ALWAYS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

MAPILogonEx should display a configuration dialog box for each message service in the profile. The dialog boxes are displayed after the profile has been chosen but before any message service is logged on. The MAPI common dialog box for logon also contains a check box that requests the same operation.


MAPI_SUBMITTED

const mapi.MAPI_SUBMITTED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The recipient has already received the message and does not need to receive it again. This is a resend of an earlier transmission. This flag is set in conjunction with the MAPI_TO, MAPI_CC, and MAPI_BCC values.


MAPI_TIMEOUT_SHORT

const mapi.MAPI_TIMEOUT_SHORT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The logon should fail if blocked for more than a few seconds.


MAPI_TO

const mapi.MAPI_TO;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The recipient is a primary (To) recipient. Clients are required to handle primary recipients; all other types are optional.


MAPI_UNICODE

const mapi.MAPI_UNICODE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The passed-in strings are in Unicode format. If the MAPI_UNICODE flag is not set, the strings are in ANSI format.


MAPI_USE_DEFAULT

const mapi.MAPI_USE_DEFAULT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The messaging subsystem should substitute the profile name of the default profile for the lpszProfileName parameter. The MAPI_EXPLICIT_PROFILE flag is ignored unless lpszProfileName is NULL or empty.


MAPI_W_APPROX_COUNT

const mapi.MAPI_W_APPROX_COUNT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_W_CANCEL_MESSAGE

const mapi.MAPI_W_CANCEL_MESSAGE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_W_ERRORS_RETURNED

const mapi.MAPI_W_ERRORS_RETURNED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_W_NO_SERVICE

const mapi.MAPI_W_NO_SERVICE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_W_PARTIAL_COMPLETION

const mapi.MAPI_W_PARTIAL_COMPLETION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MAPI_W_POSITION_CHANGED

const mapi.MAPI_W_POSITION_CHANGED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


MDB_NO_DIALOG

const mapi.MDB_NO_DIALOG;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Prevents the display of logon dialog boxes. If this flag is set, and OpenMsgStore does not have enough configuration information to open the message store without the user's help, it returns MAPI_E_LOGON_FAILED. If this flag is not set, the message store provider can prompt the user to correct a name or password, to insert a disk, or to perform other actions necessary to establish connection to the message store.


MDB_NO_MAIL

const mapi.MDB_NO_MAIL;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The message store should not be used for sending or receiving mail. When this flag is set, MAPI does not notify the MAPI spooler that this message store is being opened.


MDB_TEMPORARY

const mapi.MDB_TEMPORARY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Instructs MAPI that the message store is not permanent and should not be added to the message store table. This flag is used to log on the message store so that information can be retrieved programmatically from the profile section.


MDB_WRITE

const mapi.MDB_WRITE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Requests read/write access to the message store.


MODRECIP_ADD

const mapi.MODRECIP_ADD;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The recipients should be added to the recipient list.


MODRECIP_MODIFY

const mapi.MODRECIP_MODIFY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The recipients should replace existing recipients. All of the existing properties are replaced by those in the corresponding ADRENTRY structure.


MODRECIP_REMOVE

const mapi.MODRECIP_REMOVE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Existing recipients should be removed from the recipient list using as an index the PR_ROWID property included in the property value array of each recipient entry in the mods parameter.


NO_ATTACHMENT

const mapi.NO_ATTACHMENT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The attachment has just been created.


OPEN_IF_EXISTS

const mapi.OPEN_IF_EXISTS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Does not fail if the specified folder already exists.


RELOP_EQ

const mapi.RELOP_EQ;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The comparison is made based on equal values.


RELOP_GE

const mapi.RELOP_GE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The comparison is made based on a greater or equal first value.


RELOP_GT

const mapi.RELOP_GT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The comparison is made based on a greater first value.


RELOP_LE

const mapi.RELOP_LE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The comparison is made based on a lesser or equal first value.


RELOP_LT

const mapi.RELOP_LT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The comparison is made based on a lesser first value.


RELOP_NE

const mapi.RELOP_NE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The comparison is made based on unequal values.


RELOP_RE

const mapi.RELOP_RE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The comparison is made based on LIKE (regular expression) values.


RES_AND

const mapi.RES_AND;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

SRestriction structure describes an AND restriction, which applies a bitwise AND operation to a restriction.


RES_BITMASK

const mapi.RES_BITMASK;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

SRestriction structure describes a bitmask restriction, which applies a bitmask to a property value.


RES_COMMENT

const mapi.RES_COMMENT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

SRestriction structure describes a comment restriction, which associates a comment with a restriction.


RES_COMPAREPROPS

const mapi.RES_COMPAREPROPS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

SRestriction structure describes a compare properties restriction, which compares two property values.


RES_CONTENT

const mapi.RES_CONTENT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

SRestriction structure describes a content restriction, which searches a property value for specific content.


RES_EXIST

const mapi.RES_EXIST;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

SRestriction structure describes an exist restriction, which determines if a property is supported.


RES_NOT

const mapi.RES_NOT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

SRestriction structure describes a NOT restriction, which applies a logical NOT operation to a restriction.


RES_OR

const mapi.RES_OR;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

SRestriction structure describes an OR restriction, which applies a logical OR operation to a restriction.


RES_PROPERTY

const mapi.RES_PROPERTY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

SRestriction structure describes a property restriction, which determines if a property value matches a particular value.


RES_SIZE

const mapi.RES_SIZE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

SRestriction structure describes a size restriction, which determines if a property value is a particular size.


RES_SUBRESTRICTION

const mapi.RES_SUBRESTRICTION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

SRestriction structure describes a subobject restriction, which applies a restriction to a message's attachments or recipients.


RTF_SYNC_BODY_CHANGED

const mapi.RTF_SYNC_BODY_CHANGED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The plain text version of the message has changed.


RTF_SYNC_RTF_CHANGED

const mapi.RTF_SYNC_RTF_CHANGED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The RTF version of the message has changed.


SERVICE_UI_ALLOWED

const mapi.SERVICE_UI_ALLOWED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The message service should display its configuration property sheet only if the service is not completely configured.


SERVICE_UI_ALWAYS

const mapi.SERVICE_UI_ALWAYS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The message service must always display its configuration property sheet. If SERVICE_UI_ALWAYS is not set, a configuration property sheet can still be displayed if SERVICE_UI_ALLOWED is set and valid configuration information is not available from the property value array in the lpProps parameter. Either SERVICE_UI_ALLOWED or SERVICE_UI_ALWAYS must be set for a property sheet to be displayed.


STATUS_DEFAULT_STORE

const mapi.STATUS_DEFAULT_STORE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D


TABLE_SORT_ASCEND

const mapi.TABLE_SORT_ASCEND;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The table should be sorted in ascending order.


TABLE_SORT_COMBINE

const mapi.TABLE_SORT_COMBINE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The sort operation should create a category that combines the property identified as the sort key column in the ulPropTag member with the sort key column specified in the previous SSortOrder structure.
TABLE_SORT_COMBINE can only be used when the SSortOrder structure is being used as an entry in an SSortOrderSet structure to specify multiple sort orders for a categorized sort. TABLE_SORT_COMBINE cannot be used in the first SSortOrder structure in an SSortOrderSet structure.


TABLE_SORT_DESCEND

const mapi.TABLE_SORT_DESCEND;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

The table should be sorted in descending order.


TBL_ASYNC

const mapi.TBL_ASYNC;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Starts the operation asynchronously and returns before the operation completes.


TBL_BATCH

const mapi.TBL_BATCH;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/MAPI.D

Defers evaluation of the filter until the data in the table is required.


Messages


Modules

  • axcontrol
  • axdebug
  • axscript
  • dde
  • exchange
  • exchdapi
  • IADsContainer
  • IADsUser
  • IDirectoryObject
  • internet
  • mapi
  • odbc
  • perfmon
  • pythoncom
  • pywintypes
  • servicemanager
  • shell
  • win2kras
  • win32api
  • win32clipboard
  • win32event
  • win32evtlog
  • win32file
  • win32gui
  • win32help
  • win32lz
  • win32net
  • win32pdh
  • win32pipe
  • win32print
  • win32process
  • win32ras
  • win32security
  • win32service
  • win32ui
  • win32uiole
  • win32wnet
  • wincerapi


Objects and Module Methods

Object and Module Methods

  • axcontrol.OleCreate
  • axcontrol.OleLoadPicture
  • axcontrol.OleLoadPicturePath
  • connection.close
  • connection.commit
  • connection.cursor
  • connection.rollback
  • connection.setautocommit
  • cursor.close
  • cursor.execute
  • cursor.fetchall
  • cursor.fetchmany
  • cursor.fetchone
  • cursor.setinputsizes
  • cursor.setoutputsize
  • exchange.HrCreateDirEntryIdEx
  • exchange.HrCreateProfileName
  • exchange.HrFindExchangeGlobalAddressList
  • exchange.HrGetExchangeStatus
  • exchange.HrGetMailboxDN
  • exchange.HrGetServerDN
  • exchange.HrMailboxLogoff
  • exchange.HrMailboxLogon
  • exchange.HrMAPIFindDefaultMsgStore
  • exchange.HrMAPIFindFolder
  • exchange.HrMAPIFindFolderEx
  • exchange.HrMAPIFindInbox
  • exchange.HrMAPIFindIPMSubtree
  • exchange.HrMAPIFindStore
  • exchange.HrMAPIFindSubfolderEx
  • exchange.HrMAPIOpenFolderEx
  • exchange.HrMAPISetPropBoolean
  • exchange.HrMAPISetPropLong
  • exchange.HrOpenExchangePrivateStore
  • exchange.HrOpenExchangePublicFolders
  • exchange.HrOpenExchangePublicStore
  • exchange.HrOpenSessionObject
  • exchange.HrOpenSiteContainer
  • exchange.HrOpenSiteContainerAddressing
  • exchdapi.HrAdminProgramExists
  • exchdapi.HrCreateGatewayProfile
  • exchdapi.HrCreateMailboxAgentProfile
  • exchdapi.HrEnumContainers
  • exchdapi.HrEnumOrganizations
  • exchdapi.HrEnumSiteAdmins
  • exchdapi.HrEnumSites
  • exchdapi.HrGetServiceAccountName
  • exchdapi.HrInstallMailboxAgent
  • exchdapi.HrInstallService
  • exchdapi.HrMailboxAgentExists
  • exchdapi.HrRemoveMailboxAgent
  • exchdapi.HrRemoveProfile
  • GetFileVersionInfo.
  • IADsContainer.get_Count
  • IADsContainer.get_Filter
  • IADsContainer.get_Hints
  • IADsContainer.put_Filter
  • IADsContainer.put_Hints
  • IADsUser.get_AccountDisabled
  • IADsUser.get_AccountExpirationDate
  • IADsUser.get_BadLoginAddress
  • IADsUser.get_BadLoginCount
  • IADsUser.get_Department
  • IADsUser.get_Description
  • IADsUser.get_Division
  • IADsUser.get_EmailAddress
  • IADsUser.get_EmployeeID
  • IADsUser.get_FirstName
  • IADsUser.get_FullName
  • IADsUser.get_HomeDirectory
  • IADsUser.get_HomePage
  • IADsUser.get_LoginScript
  • IADsUser.put_AccountDisabled
  • IADsUser.put_AccountExpirationDate
  • IADsUser.put_Department
  • IADsUser.put_Description
  • IADsUser.put_Division
  • IADsUser.put_EmailAddress
  • IADsUser.put_EmployeeID
  • IADsUser.put_FirstName
  • IADsUser.put_FullName
  • IADsUser.put_HomeDirectory
  • IADsUser.put_HomePage
  • IADsUser.put_LoginScript
  • IDirectoryObject.GetObjectAttributes
  • IDirectoryObject.GetObjectInformation
  • IDirectoryObject.SetObjectAttributes
  • mapi.BinFromHex
  • mapi.CloseIMsgSession
  • mapi.HexFromBin
  • mapi.HrQueryAllRows
  • mapi.MAPIAdminProfiles
  • mapi.MAPIInitialize
  • mapi.MAPILogonEx
  • mapi.MAPIUninitialize
  • mapi.OpenIMsgOnIStg
  • mapi.OpenIMsgSession
  • mapi.RTFStreamToHTML
  • mapi.RTFSync
  • mapi.WrapCompressedRTFStream
  • odbc.odbc
  • perfmon.CounterDefinition
  • perfmon.LoadPerfCounterTextStrings
  • perfmon.ObjectType
  • perfmon.PerfMonManager
  • perfmon.UnloadPerfCounterTextStrings
  • PyACL.AddAccessAllowedAce
  • PyACL.AddAccessDeniedAce
  • PyACL.AddAuditAccessAce
  • PyACL.DeleteAce
  • PyACL.GetAce
  • PyACL.GetAceCount
  • PyACL.GetAclSize
  • PyACL.GetAclSize
  • PyACL.Initialize
  • PyACL.IsValid
  • PyAssocObject.AttachObject
  • PyAssocObject.GetMethodByType
  • PyBitmap.CreateCompatibleBitmap
  • PyBitmap.GetBitmapBits
  • PyBitmap.GetHandle
  • PyBitmap.GetInfo
  • PyBitmap.GetSize
  • PyBitmap.LoadBitmap
  • PyBitmap.LoadBitmapFile
  • PyBitmap.LoadPPMFile
  • PyBitmap.Paint
  • PyBitmap.SaveBitmapFile
  • PyCBrush.CreateSolidBrush
  • PyCBrush.GetSafeHandle
  • PyCButton.CreateWindow
  • PyCButton.GetBitmap
  • PyCButton.GetButtonStyle
  • PyCButton.GetCheck
  • PyCButton.GetState
  • PyCButton.SetBitmap
  • PyCButton.SetButtonStyle
  • PyCButton.SetCheck
  • PyCButton.SetState
  • PyCCmdTarget.BeginWaitCursor
  • PyCCmdTarget.EndWaitCursor
  • PyCCmdTarget.HookCommand
  • PyCCmdTarget.HookCommandUpdate
  • PyCCmdTarget.HookNotify
  • PyCCmdTarget.HookOleEvent
  • PyCCmdTarget.RestoreWaitCursor
  • PyCCmdUI.ContinueRouting
  • PyCCmdUI.Enable
  • PyCCmdUI.SetCheck
  • PyCCmdUI.SetRadio
  • PyCCmdUI.SetText
  • PyCColorDialog.DoModal
  • PyCColorDialog.GetColor
  • PyCColorDialog.GetCustomColors
  • PyCColorDialog.GetSavedCustomColors
  • PyCColorDialog.SetCurrentColor
  • PyCColorDialog.SetCustomColors
  • PyCComboBox.AddString
  • PyCComboBox.DeleteString
  • PyCComboBox.Dir
  • PyCComboBox.GetCount
  • PyCComboBox.GetCurSel
  • PyCComboBox.GetEditSel
  • PyCComboBox.GetExtendedUI
  • PyCComboBox.GetItemData
  • PyCComboBox.GetItemValue
  • PyCComboBox.GetLBText
  • PyCComboBox.GetLBTextLen
  • PyCComboBox.InsertString
  • PyCComboBox.LimitText
  • PyCComboBox.ResetContent
  • PyCComboBox.SelectString
  • PyCComboBox.SetCurSel
  • PyCComboBox.SetEditSel
  • PyCComboBox.SetExtendedUI
  • PyCComboBox.SetItemData
  • PyCComboBox.SetItemValue
  • PyCComboBox.ShowDropDown
  • PyCControlBar.CalcDynamicLayout
  • PyCControlBar.CalcDynamicLayout
  • PyCControlBar.CalcFixedLayout
  • PyCControlBar.CalcFixedLayout
  • PyCControlBar.EnableDocking
  • PyCControlBar.EraseNonClient
  • PyCControlBar.GetBarStyle
  • PyCControlBar.GetCount
  • PyCControlBar.GetDockingFrame
  • PyCControlBar.IsFloating
  • PyCControlBar.OnBarStyleChange
  • PyCControlBar.OnUpdateCmdUI
  • PyCControlBar.SetBarStyle
  • PyCControlBar.ShowWindow
  • PyCCtrlView.OnCommand
  • PyCDC.AbortDoc
  • PyCDC.Arc
  • PyCDC.BeginPath
  • PyCDC.BitBlt
  • PyCDC.Chord
  • PyCDC.CreateCompatibleDC
  • PyCDC.CreatePrinterDC
  • PyCDC.DeleteDC
  • PyCDC.DPtoLP
  • PyCDC.Draw3dRect
  • PyCDC.DrawFocusRect
  • PyCDC.DrawFrameControl
  • PyCDC.DrawIcon
  • PyCDC.DrawText
  • PyCDC.Ellipse
  • PyCDC.EndDoc
  • PyCDC.EndPage
  • PyCDC.EndPath
  • PyCDC.ExtTextOut
  • PyCDC.FillPath
  • PyCDC.FillRect
  • PyCDC.FillSolidRect
  • PyCDC.FrameRect
  • PyCDC.GetBrushOrg
  • PyCDC.GetClipBox
  • PyCDC.GetCurrentPosition
  • PyCDC.GetDeviceCaps
  • PyCDC.GetHandleAttrib
  • PyCDC.GetHandleOutput
  • PyCDC.GetMapMode
  • PyCDC.GetNearestColor
  • PyCDC.GetPixel
  • PyCDC.GetSafeHdc
  • PyCDC.GetTextExtent
  • PyCDC.GetTextExtentPoint
  • PyCDC.GetTextFace
  • PyCDC.GetTextMetrics
  • PyCDC.GetViewportExt
  • PyCDC.GetViewportOrg
  • PyCDC.GetWindowExt
  • PyCDC.GetWindowOrg
  • PyCDC.IntersectClipRect
  • PyCDC.IsPrinting
  • PyCDC.LineTo
  • PyCDC.LPtoDP
  • PyCDC.MoveTo
  • PyCDC.OffsetViewportOrg
  • PyCDC.OffsetWindowOrg
  • PyCDC.PatBlt
  • PyCDC.Pie
  • PyCDC.PolyBezier
  • PyCDC.Polygon
  • PyCDC.Polyline
  • PyCDC.RealizePalette
  • PyCDC.Rectangle
  • PyCDC.RectVisible
  • PyCDC.RestoreDC
  • PyCDC.SaveDC
  • PyCDC.ScaleViewportExt
  • PyCDC.ScaleWindowExt
  • PyCDC.SelectClipRgn
  • PyCDC.SelectObject
  • PyCDC.SelectPalette
  • PyCDC.SetBkColor
  • PyCDC.SetBkMode
  • PyCDC.SetBrushOrg
  • PyCDC.SetGraphicsMode
  • PyCDC.SetMapMode
  • PyCDC.SetPixel
  • PyCDC.SetPolyFillMode
  • PyCDC.SetROP2
  • PyCDC.SetTextAlign
  • PyCDC.SetTextColor
  • PyCDC.SetViewportExt
  • PyCDC.SetViewportOrg
  • PyCDC.SetWindowExt
  • PyCDC.SetWindowOrg
  • PyCDC.SetWorldTransform
  • PyCDC.StartDoc
  • PyCDC.StartPage
  • PyCDC.StretchBlt
  • PyCDC.StrokeAndFillPath
  • PyCDC.StrokePath
  • PyCDC.TextOut
  • PyCDialog.CreateWindow
  • PyCDialog.DoModal
  • PyCDialog.EndDialog
  • PyCDialog.GotoDlgCtrl
  • PyCDialog.MapDialogRect
  • PyCDialog.OnCancel
  • PyCDialog.OnCancel
  • PyCDialog.OnInitDialog
  • PyCDialog.OnInitDialog
  • PyCDialog.OnOK
  • PyCDialog.OnOK
  • PyCDialogBar.CreateWindow
  • PyCDockContext.EndDrag
  • PyCDockContext.EndResize
  • PyCDockContext.StartDrag
  • PyCDockContext.StartResize
  • PyCDockContext.ToggleDocking
  • PyCDocTemplate.CreateNewDocument
  • PyCDocTemplate.CreateNewFrame
  • PyCDocTemplate.DoCreateDoc
  • PyCDocTemplate.FindOpenDocument
  • PyCDocTemplate.GetDocString
  • PyCDocTemplate.GetDocumentList
  • PyCDocTemplate.GetResourceID
  • PyCDocTemplate.GetSharedMenu
  • PyCDocTemplate.InitialUpdateFrame
  • PyCDocTemplate.InitialUpdateFrame
  • PyCDocTemplate.MatchDocType
  • PyCDocTemplate.OpenDocumentFile
  • PyCDocTemplate.OpenDocumentFile
  • PyCDocTemplate.SetContainerInfo
  • PyCDocTemplate.SetDocStrings
  • PyCDocument.DeleteContents
  • PyCDocument.DeleteContents
  • PyCDocument.DoFileSave
  • PyCDocument.DoFileSave
  • PyCDocument.DoSave
  • PyCDocument.DoSave
  • PyCDocument.GetAllViews
  • PyCDocument.GetDocTemplate
  • PyCDocument.GetFirstView
  • PyCDocument.GetPathName
  • PyCDocument.GetTitle
  • PyCDocument.IsModified
  • PyCDocument.OnChangedViewList
  • PyCDocument.OnChangedViewList
  • PyCDocument.OnCloseDocument
  • PyCDocument.OnCloseDocument
  • PyCDocument.OnNewDocument
  • PyCDocument.OnNewDocument
  • PyCDocument.OnOpenDocument
  • PyCDocument.OnOpenDocument
  • PyCDocument.OnSaveDocument
  • PyCDocument.OnSaveDocument
  • PyCDocument.PreCloseFrame
  • PyCDocument.SaveModified
  • PyCDocument.SaveModified
  • PyCDocument.SetModifiedFlag
  • PyCDocument.SetPathName
  • PyCDocument.SetTitle
  • PyCDocument.UpdateAllViews
  • PyCEdit.Clear
  • PyCEdit.Copy
  • PyCEdit.CreateWindow
  • PyCEdit.Cut
  • PyCEdit.FmtLines
  • PyCEdit.GetFirstVisibleLine
  • PyCEdit.GetLine
  • PyCEdit.GetLineCount
  • PyCEdit.GetSel
  • PyCEdit.LimitText
  • PyCEdit.LineFromChar
  • PyCEdit.LineIndex
  • PyCEdit.LineScroll
  • PyCEdit.Paste
  • PyCEdit.ReplaceSel
  • PyCEdit.SetReadOnly
  • PyCEdit.SetSel
  • PyCEditView.GetEditCtrl
  • PyCEditView.IsModified
  • PyCEditView.LoadFile
  • PyCEditView.OnCommand
  • PyCEditView.PreCreateWindow
  • PyCEditView.SaveFile
  • PyCEditView.SetModifiedFlag
  • PyCFileDialog.GetFileExt
  • PyCFileDialog.GetFileName
  • PyCFileDialog.GetFileTitle
  • PyCFileDialog.GetPathName
  • PyCFileDialog.GetPathNames
  • PyCFileDialog.GetReadOnlyPref
  • PyCFileDialog.SetOFNInitialDir
  • PyCFileDialog.SetOFNTitle
  • PyCFontDialog.DoModal
  • PyCFontDialog.GetCharFormat
  • PyCFontDialog.GetColor
  • PyCFontDialog.GetCurrentFont
  • PyCFontDialog.GetFaceName
  • PyCFontDialog.GetSize
  • PyCFontDialog.GetStyleName
  • PyCFontDialog.GetWeight
  • PyCFontDialog.IsBold
  • PyCFontDialog.IsItalic
  • PyCFontDialog.IsStrikeOut
  • PyCFontDialog.IsUnderline
  • PyCFormView.OnCommand
  • PyCFrameWnd.BeginModalState
  • PyCFrameWnd.CreateWindow
  • PyCFrameWnd.DockControlBar
  • PyCFrameWnd.EnableDocking
  • PyCFrameWnd.EndModalState
  • PyCFrameWnd.FloatControlBar
  • PyCFrameWnd.GetActiveDocument
  • PyCFrameWnd.GetActiveView
  • PyCFrameWnd.GetControlBar
  • PyCFrameWnd.GetMessageBar
  • PyCFrameWnd.GetMessageString
  • PyCFrameWnd.InModalState
  • PyCFrameWnd.IsTracking
  • PyCFrameWnd.LoadAccelTable
  • PyCFrameWnd.LoadBarState
  • PyCFrameWnd.LoadFrame
  • PyCFrameWnd.OnBarCheck
  • PyCFrameWnd.OnUpdateControlBarMenu
  • PyCFrameWnd.PreCreateWindow
  • PyCFrameWnd.RecalcLayout
  • PyCFrameWnd.SaveBarState
  • PyCFrameWnd.SetActiveView
  • PyCFrameWnd.ShowControlBar
  • PyCFrameWnd.ShowOwnedWindows
  • PyCImageList.Add
  • PyCImageList.DeleteImageList
  • PyCImageList.Destroy
  • PyCImageList.GetBkColor
  • PyCImageList.GetImageCount
  • PyCImageList.GetImageInfo
  • PyCImageList.GetSafeHandle
  • PyCImageList.SetBkColor
  • PyCListBox.AddString
  • PyCListBox.DeleteString
  • PyCListBox.Dir
  • PyCListBox.GetCaretIndex
  • PyCListBox.GetCount
  • PyCListBox.GetCurSel
  • PyCListBox.GetItemData
  • PyCListBox.GetItemValue
  • PyCListBox.GetSel
  • PyCListBox.GetSelCount
  • PyCListBox.GetSelItems
  • PyCListBox.GetSelTextItems
  • PyCListBox.GetText
  • PyCListBox.GetTextLen
  • PyCListBox.GetTopIndex
  • PyCListBox.InsertString
  • PyCListBox.ResetContent
  • PyCListBox.SelectString
  • PyCListBox.SelItemRange
  • PyCListBox.SetCaretIndex
  • PyCListBox.SetCurSel
  • PyCListBox.SetItemData
  • PyCListBox.SetItemValue
  • PyCListBox.SetSel
  • PyCListBox.SetTabStops
  • PyCListBox.SetTopIndex
  • PyCListCtrl.Arrange
  • PyCListCtrl.CreateDragImage
  • PyCListCtrl.CreateWindow
  • PyCListCtrl.DeleteAllItems
  • PyCListCtrl.DeleteColumn
  • PyCListCtrl.DeleteItem
  • PyCListCtrl.EditLabel
  • PyCListCtrl.EnsureVisible
  • PyCListCtrl.GetBkColor
  • PyCListCtrl.GetColumn
  • PyCListCtrl.GetColumnWidth
  • PyCListCtrl.GetCountPerPage
  • PyCListCtrl.GetEditControl
  • PyCListCtrl.GetImageList
  • PyCListCtrl.GetItem
  • PyCListCtrl.GetItemCount
  • PyCListCtrl.GetItemData
  • PyCListCtrl.GetItemPosition
  • PyCListCtrl.GetItemRect
  • PyCListCtrl.GetItemState
  • PyCListCtrl.GetItemText
  • PyCListCtrl.GetNextItem
  • PyCListCtrl.GetSelectedCount
  • PyCListCtrl.GetStringWidth
  • PyCListCtrl.GetTextBkColor
  • PyCListCtrl.GetTextColor
  • PyCListCtrl.GetTopIndex
  • PyCListCtrl.HitTest
  • PyCListCtrl.InsertColumn
  • PyCListCtrl.InsertItem
  • PyCListCtrl.RedrawItems
  • PyCListCtrl.SetBkColor
  • PyCListCtrl.SetColumn
  • PyCListCtrl.SetColumnWidth
  • PyCListCtrl.SetImageList
  • PyCListCtrl.SetItem
  • PyCListCtrl.SetItemCount
  • PyCListCtrl.SetItemData
  • PyCListCtrl.SetItemState
  • PyCListCtrl.SetItemText
  • PyCListCtrl.SetTextBkColor
  • PyCListCtrl.SetTextColor
  • PyCListCtrl.Update
  • PyCListView.GetListCtrl
  • PyCListView.OnCommand
  • PyCListView.PreCreateWindow
  • PyCMDIChildWnd.ActivateFrame
  • PyCMDIChildWnd.ActivateFrame
  • PyCMDIChildWnd.CreateWindow
  • PyCMDIChildWnd.GetMDIFrame
  • PyCMDIChildWnd.GetMessageString
  • PyCMDIChildWnd.MDIActivate
  • PyCMDIChildWnd.OnClose
  • PyCMDIChildWnd.OnCommand
  • PyCMDIChildWnd.OnCreateClient
  • PyCMDIChildWnd.PreCreateWindow
  • PyCMDIChildWnd.PreTranslateMessage
  • PyCMDIFrameWnd.GetMDIClient
  • PyCMDIFrameWnd.MDIActivate
  • PyCMDIFrameWnd.MDIGetActive
  • PyCMDIFrameWnd.MDINext
  • PyCMDIFrameWnd.OnClose
  • PyCMDIFrameWnd.OnCommand
  • PyCMDIFrameWnd.OnContextHelp
  • PyCMDIFrameWnd.PreCreateWindow
  • PyCMDIFrameWnd.PreTranslateMessage
  • PyCMenu.AppendMenu
  • PyCMenu.DeleteMenu
  • PyCMenu.EnableMenuItem
  • PyCMenu.GetHandle
  • PyCMenu.GetMenuItemCount
  • PyCMenu.GetMenuItemID
  • PyCMenu.GetMenuString
  • PyCMenu.GetSubMenu
  • PyCMenu.InsertMenu
  • PyCMenu.ModifyMenu
  • PyCMenu.TrackPopupMenu
  • PyCOleClientItem.Close
  • PyCOleClientItem.CreateNewItem
  • PyCOleClientItem.DoVerb
  • PyCOleClientItem.Draw
  • PyCOleClientItem.GetActiveView
  • PyCOleClientItem.GetDocument
  • PyCOleClientItem.GetInPlaceWindow
  • PyCOleClientItem.GetItemState
  • PyCOleClientItem.GetObject
  • PyCOleClientItem.GetStorage
  • PyCOleClientItem.OnActivate
  • PyCOleClientItem.OnActivate
  • PyCOleClientItem.OnChange
  • PyCOleClientItem.OnChange
  • PyCOleClientItem.OnChangeItemPosition
  • PyCOleClientItem.OnChangeItemPosition
  • PyCOleClientItem.OnDeactivateUI
  • PyCOleClientItem.OnDeactivateUI
  • PyCOleClientItem.OnGetItemPosition
  • PyCOleClientItem.Run
  • PyCOleClientItem.SetItemRects
  • PyCOleDocument.EnableCompoundFile
  • PyCOleDocument.GetInPlaceActiveItem
  • PyCOleDocument.GetNextItem
  • PyCOleDocument.GetStartPosition
  • PyCOleInsertDialog.GetClassID
  • PyCOleInsertDialog.GetPathName
  • PyCOleInsertDialog.GetSelectionType
  • PyCPrintDialog.OnCancel
  • PyCPrintDialog.OnOK
  • PyCPrintInfo.CreatePrinterDC
  • PyCPrintInfo.DocObject
  • PyCPrintInfo.DoModal
  • PyCPrintInfo.FreeDefaults
  • PyCPrintInfo.GetContinuePrinting
  • PyCPrintInfo.GetCopies
  • PyCPrintInfo.GetCurPage
  • PyCPrintInfo.GetDefaults
  • PyCPrintInfo.GetDeviceName
  • PyCPrintInfo.GetDirect
  • PyCPrintInfo.GetDlgFromPage
  • PyCPrintInfo.GetDlgToPage
  • PyCPrintInfo.GetDocOffsetPage
  • PyCPrintInfo.GetDraw
  • PyCPrintInfo.GetDriverName
  • PyCPrintInfo.GetDwFlags
  • PyCPrintInfo.GetFlags
  • PyCPrintInfo.GetFromPage
  • PyCPrintInfo.GetHDC
  • PyCPrintInfo.GetMaxPage
  • PyCPrintInfo.GetMinPage
  • PyCPrintInfo.GetNumPreviewPages
  • PyCPrintInfo.GetOffsetPage
  • PyCPrintInfo.GetPageDesc
  • PyCPrintInfo.GetPortName
  • PyCPrintInfo.GetPreview
  • PyCPrintInfo.GetPRINTDLGCopies
  • PyCPrintInfo.GetPRINTDLGMinPage
  • PyCPrintInfo.GetPrinterDC
  • PyCPrintInfo.GetToPage
  • PyCPrintInfo.GetUserData
  • PyCPrintInfo.PrintAll
  • PyCPrintInfo.PrintCollate
  • PyCPrintInfo.PrintRange
  • PyCPrintInfo.PrintSelection
  • PyCPrintInfo.SetContinuePrinting
  • PyCPrintInfo.SetCurPage
  • PyCPrintInfo.SetDirect
  • PyCPrintInfo.SetDocOffsetPage
  • PyCPrintInfo.SetDraw
  • PyCPrintInfo.SetDwFlags
  • PyCPrintInfo.SetFlags
  • PyCPrintInfo.SetFromPage
  • PyCPrintInfo.SetHDC
  • PyCPrintInfo.SetMaxPage
  • PyCPrintInfo.SetMinPage
  • PyCPrintInfo.SetNumPreviewPages
  • PyCPrintInfo.SetPageDesc
  • PyCPrintInfo.SetPreview
  • PyCPrintInfo.SetPrintDialog
  • PyCPrintInfo.SetPRINTDLGCopies
  • PyCPrintInfo.SetPRINTDLGMinPage
  • PyCPrintInfo.SetToPage
  • PyCPrintInfo.SetUserData
  • PyCProgressCtrl.CreateWindow
  • PyCProgressCtrl.OffsetPos
  • PyCProgressCtrl.SetPos
  • PyCProgressCtrl.SetRange
  • PyCProgressCtrl.SetStep
  • PyCProgressCtrl.StepIt
  • PyCPropertyPage.CancelToClose
  • PyCPropertyPage.OnApply
  • PyCPropertyPage.OnApply
  • PyCPropertyPage.OnCancel
  • PyCPropertyPage.OnKillActive
  • PyCPropertyPage.OnKillActive
  • PyCPropertyPage.OnOK
  • PyCPropertyPage.OnQueryCancel
  • PyCPropertyPage.OnQueryCancel
  • PyCPropertyPage.OnReset
  • PyCPropertyPage.OnReset
  • PyCPropertyPage.OnSetActive
  • PyCPropertyPage.OnSetActive
  • PyCPropertyPage.OnWizardBack
  • PyCPropertyPage.OnWizardBack
  • PyCPropertyPage.OnWizardFinish
  • PyCPropertyPage.OnWizardFinish
  • PyCPropertyPage.OnWizardNext
  • PyCPropertyPage.OnWizardNext
  • PyCPropertyPage.SetModified
  • PyCPropertyPage.SetPSPBit
  • PyCPropertySheet.AddPage
  • PyCPropertySheet.CreateWindow
  • PyCPropertySheet.DoModal
  • PyCPropertySheet.EnableStackedTabs
  • PyCPropertySheet.EndDialog
  • PyCPropertySheet.GetActiveIndex
  • PyCPropertySheet.GetActivePage
  • PyCPropertySheet.GetPage
  • PyCPropertySheet.GetPageCount
  • PyCPropertySheet.GetPageIndex
  • PyCPropertySheet.GetTabCtrl
  • PyCPropertySheet.OnInitDialog
  • PyCPropertySheet.OnInitDialog
  • PyCPropertySheet.OnInitDialog
  • PyCPropertySheet.PressButton
  • PyCPropertySheet.RemovePage
  • PyCPropertySheet.SetActivePage
  • PyCPropertySheet.SetFinishText
  • PyCPropertySheet.SetPSHBit
  • PyCPropertySheet.SetTitle
  • PyCPropertySheet.SetWizardButtons
  • PyCPropertySheet.SetWizardMode
  • PyCPropertySheet.WindowProc
  • PyCRgn.CombineRgn
  • PyCRgn.CopyRgn
  • PyCRgn.CreateEllipticRgn
  • PyCRgn.CreateRectRgn
  • PyCRgn.DeleteObject
  • PyCRgn.GetRgnBox
  • PyCRgn.GetSafeHandle
  • PyCRichEditCtrl.Clear
  • PyCRichEditCtrl.Copy
  • PyCRichEditCtrl.CreateWindow
  • PyCRichEditCtrl.Cut
  • PyCRichEditCtrl.FindText
  • PyCRichEditCtrl.GetCharPos
  • PyCRichEditCtrl.GetDefaultCharFormat
  • PyCRichEditCtrl.GetEventMask
  • PyCRichEditCtrl.GetFirstVisibleLine
  • PyCRichEditCtrl.GetLine
  • PyCRichEditCtrl.GetLineCount
  • PyCRichEditCtrl.GetModify
  • PyCRichEditCtrl.GetParaFormat
  • PyCRichEditCtrl.GetSel
  • PyCRichEditCtrl.GetSelectionCharFormat
  • PyCRichEditCtrl.GetSelText
  • PyCRichEditCtrl.GetTextLength
  • PyCRichEditCtrl.LimitText
  • PyCRichEditCtrl.LineFromChar
  • PyCRichEditCtrl.LineIndex
  • PyCRichEditCtrl.LineScroll
  • PyCRichEditCtrl.Paste
  • PyCRichEditCtrl.ReplaceSel
  • PyCRichEditCtrl.SetBackgroundColor
  • PyCRichEditCtrl.SetDefaultCharFormat
  • PyCRichEditCtrl.SetEventMask
  • PyCRichEditCtrl.SetModify
  • PyCRichEditCtrl.SetOptions
  • PyCRichEditCtrl.SetParaFormat
  • PyCRichEditCtrl.SetReadOnly
  • PyCRichEditCtrl.SetSel
  • PyCRichEditCtrl.SetSelAndCharFormat
  • PyCRichEditCtrl.SetSelectionCharFormat
  • PyCRichEditCtrl.SetTargetDevice
  • PyCRichEditCtrl.SetWordCharFormat
  • PyCRichEditCtrl.StreamIn
  • PyCRichEditCtrl.StreamOut
  • PyCRichEditDoc.OnCloseDocument
  • PyCRichEditDocTemplate.DoCreateRichEditDoc
  • PyCRichEditView.GetRichEditCtrl
  • PyCRichEditView.SaveTextFile
  • PyCRichEditView.SetWordWrap
  • PyCRichEditView.WrapChanged
  • PyCScrollView.GetDC
  • PyCScrollView.GetDeviceScrollPosition
  • PyCScrollView.GetScrollPosition
  • PyCScrollView.GetTotalSize
  • PyCScrollView.OnCommand
  • PyCScrollView.OnPrepareDC
  • PyCScrollView.ResizeParentToFit
  • PyCScrollView.ScrollToPosition
  • PyCScrollView.SetScaleToFitSize
  • PyCScrollView.SetScrollSizes
  • PyCScrollView.UpdateBars
  • PyCSliderCtrl.ClearSel
  • PyCSliderCtrl.ClearTics
  • PyCSliderCtrl.CreateWindow
  • PyCSliderCtrl.GetChannelRect
  • PyCSliderCtrl.GetLineSize
  • PyCSliderCtrl.GetNumTics
  • PyCSliderCtrl.GetPageSize
  • PyCSliderCtrl.GetPos
  • PyCSliderCtrl.GetRange
  • PyCSliderCtrl.GetRangeMax
  • PyCSliderCtrl.GetRangeMin
  • PyCSliderCtrl.GetSelection
  • PyCSliderCtrl.GetThumbRect
  • PyCSliderCtrl.GetTic
  • PyCSliderCtrl.GetTicArray
  • PyCSliderCtrl.GetTicPos
  • PyCSliderCtrl.SetLineSize
  • PyCSliderCtrl.SetPageSize
  • PyCSliderCtrl.SetPos
  • PyCSliderCtrl.SetRange
  • PyCSliderCtrl.SetRangeMax
  • PyCSliderCtrl.SetRangeMin
  • PyCSliderCtrl.SetSelection
  • PyCSliderCtrl.SetTic
  • PyCSliderCtrl.SetTicFreq
  • PyCSliderCtrl.VerifyPos
  • PyCSpinButtonCtrl.GetPos
  • PyCSpinButtonCtrl.SetPos
  • PyCSpinButtonCtrl.SetRange
  • PyCSpinButtonCtrl.SetRange32
  • PyCSplitterWnd.CreateStatic
  • PyCSplitterWnd.CreateView
  • PyCSplitterWnd.DoKeyboardSplit
  • PyCSplitterWnd.GetPane
  • PyCSplitterWnd.IdFromRowCol
  • PyCSplitterWnd.SetColumnInfo
  • PyCSplitterWnd.SetRowInfo
  • PyCStatusBar.SetIndicators
  • PyCStatusBarCtrl.CreateWindow
  • PyCStatusBarCtrl.GetBorders
  • PyCStatusBarCtrl.GetParts
  • PyCStatusBarCtrl.GetRect
  • PyCStatusBarCtrl.GetText
  • PyCStatusBarCtrl.GetTextAttr
  • PyCStatusBarCtrl.GetTextLength
  • PyCStatusBarCtrl.SetMinHeight
  • PyCStatusBarCtrl.SetParts
  • PyCStatusBarCtrl.SetSimple
  • PyCStatusBarCtrl.SetText
  • PyCTabCtrl.GetCurSel
  • PyCTabCtrl.GetItemCountl
  • PyCTabCtrl.SetCurSel
  • PyCToolBar.GetButtonStyle
  • PyCToolBar.GetButtonText
  • PyCToolBar.GetItemID
  • PyCToolBar.GetToolBarCtrl
  • PyCToolBar.GetToolTips
  • PyCToolBar.LoadBitmap
  • PyCToolBar.LoadToolBar
  • PyCToolBar.SetBarStyle
  • PyCToolBar.SetBitmap
  • PyCToolBar.SetButtonInfo
  • PyCToolBar.SetButtons
  • PyCToolBar.SetButtonStyle
  • PyCToolBar.SetButtonText
  • PyCToolBar.SetHeight
  • PyCToolBar.SetSizes
  • PyCToolBar.SetToolTips
  • PyCToolBarCtrl.AddBitmap
  • PyCToolBarCtrl.AddButtons
  • PyCToolBarCtrl.AddStrings
  • PyCToolBarCtrl.AutoSize
  • PyCToolBarCtrl.CheckButton
  • PyCToolBarCtrl.CommandToIndex
  • PyCToolBarCtrl.CreateWindow
  • PyCToolBarCtrl.Customize
  • PyCToolBarCtrl.DeleteButton
  • PyCToolBarCtrl.EnableButton
  • PyCToolBarCtrl.GetBitmapFlags
  • PyCToolBarCtrl.GetButton
  • PyCToolBarCtrl.GetButtonCount
  • PyCToolBarCtrl.GetItemRect
  • PyCToolBarCtrl.GetRows
  • PyCToolBarCtrl.HideButton
  • PyCToolBarCtrl.Indeterminate
  • PyCToolBarCtrl.InsertButton
  • PyCToolBarCtrl.IsButtonChecked
  • PyCToolBarCtrl.IsButtonEnabled
  • PyCToolBarCtrl.IsButtonHidden
  • PyCToolBarCtrl.IsButtonIndeterminate
  • PyCToolBarCtrl.IsButtonPressed
  • PyCToolBarCtrl.PressButton
  • PyCToolBarCtrl.SetBitmapSize
  • PyCToolBarCtrl.SetButtonSize
  • PyCToolBarCtrl.SetCmdID
  • PyCToolBarCtrl.SetRows
  • PyCToolBarCtrl.TBUTTON tuple
  • PyCToolTipCtrl.AddTool
  • PyCToolTipCtrl.CreateWindow
  • PyCToolTipCtrl.SetMaxTipWidth
  • PyCToolTipCtrl.UpdateTipText
  • PyCTreeCtrl.CreateDragImage
  • PyCTreeCtrl.CreateWindow
  • PyCTreeCtrl.DeleteAllItems
  • PyCTreeCtrl.DeleteItem
  • PyCTreeCtrl.EditLabel
  • PyCTreeCtrl.EnsureVisible
  • PyCTreeCtrl.Expand
  • PyCTreeCtrl.GetChildItem
  • PyCTreeCtrl.GetCount
  • PyCTreeCtrl.GetDropHilightItem
  • PyCTreeCtrl.GetEditControl
  • PyCTreeCtrl.GetFirstVisibleItem
  • PyCTreeCtrl.GetImageList
  • PyCTreeCtrl.GetIndent
  • PyCTreeCtrl.GetItem
  • PyCTreeCtrl.GetItemData
  • PyCTreeCtrl.GetItemImage
  • PyCTreeCtrl.GetItemRect
  • PyCTreeCtrl.GetItemState
  • PyCTreeCtrl.GetItemText
  • PyCTreeCtrl.GetNextItem
  • PyCTreeCtrl.GetNextSiblingItem
  • PyCTreeCtrl.GetNextVisibleItem
  • PyCTreeCtrl.GetParentItem
  • PyCTreeCtrl.GetPrevSiblingItem
  • PyCTreeCtrl.GetPrevVisibleItem
  • PyCTreeCtrl.GetRootItem
  • PyCTreeCtrl.GetSelectedItem
  • PyCTreeCtrl.GetToolTips
  • PyCTreeCtrl.GetVisibleCount
  • PyCTreeCtrl.HitTest
  • PyCTreeCtrl.InsertItem
  • PyCTreeCtrl.ItemHasChildren
  • PyCTreeCtrl.Select
  • PyCTreeCtrl.SelectDropTarget
  • PyCTreeCtrl.SelectItem
  • PyCTreeCtrl.SelectSetFirstVisible
  • PyCTreeCtrl.SetImageList
  • PyCTreeCtrl.SetIndent
  • PyCTreeCtrl.SetItem
  • PyCTreeCtrl.SetItemData
  • PyCTreeCtrl.SetItemImage
  • PyCTreeCtrl.SetItemState
  • PyCTreeCtrl.SetItemText
  • PyCTreeCtrl.SortChildren
  • PyCTreeView.GetTreeCtrl
  • PyCTreeView.OnCommand
  • PyCTreeView.PreCreateWindow
  • PyCView.CreateWindow
  • PyCView.DoPreparePrinting
  • PyCView.GetDocument
  • PyCView.OnActivateView
  • PyCView.OnActivateView
  • PyCView.OnBeginPrinting
  • PyCView.OnBeginPrinting
  • PyCView.OnDraw
  • PyCView.OnEndPrinting
  • PyCView.OnEndPrinting
  • PyCView.OnFilePrint
  • PyCView.OnFilePrintPreview
  • PyCView.OnInitialUpdate
  • PyCView.OnInitialUpdate
  • PyCView.OnMouseActivate
  • PyCView.OnPrepareDC
  • PyCView.OnPrepareDC
  • PyCView.OnPreparePrinting
  • PyCView.OnPreparePrinting
  • PyCView.OnPrint
  • PyCView.OnUpdate
  • PyCView.PreCreateWindow
  • PyCWinApp.AddDocTemplate
  • PyCWinApp.FindOpenDocument
  • PyCWinApp.GetDocTemplateList
  • PyCWinApp.InitDlgInstance
  • PyCWinApp.IsInproc
  • PyCWinApp.LoadCursor
  • PyCWinApp.LoadIcon
  • PyCWinApp.LoadOEMCursor
  • PyCWinApp.LoadStandardCursor
  • PyCWinApp.LoadStandardIcon
  • PyCWinApp.OnFileNew
  • PyCWinApp.OnFileOpen
  • PyCWinApp.OpenDocumentFile
  • PyCWinApp.RemoveDocTemplate
  • PyCWinApp.Run
  • PyCWinThread.CreateThread
  • PyCWinThread.PumpIdle
  • PyCWinThread.PumpMessages
  • PyCWinThread.Run
  • PyCWinThread.SetMainFrame
  • PyCWinThread.SetThreadPriority
  • PyCWnd.ActivateFrame
  • PyCWnd.BeginPaint
  • PyCWnd.BringWindowToTop
  • PyCWnd.CalcWindowRect
  • PyCWnd.CenterWindow
  • PyCWnd.CheckRadioButton
  • PyCWnd.ChildWindowFromPoint
  • PyCWnd.ClientToScreen
  • PyCWnd.CreateWindow
  • PyCWnd.CreateWindowEx
  • PyCWnd.DefWindowProc
  • PyCWnd.DestroyWindow
  • PyCWnd.DlgDirList
  • PyCWnd.DlgDirListComboBox
  • PyCWnd.DlgDirSelect
  • PyCWnd.DlgDirSelectComboBox
  • PyCWnd.DragAcceptFiles
  • PyCWnd.DrawMenuBar
  • PyCWnd.EnableWindow
  • PyCWnd.EndModalLoop
  • PyCWnd.EndPaint
  • PyCWnd.GetCheckedRadioButton
  • PyCWnd.GetClientRect
  • PyCWnd.GetDC
  • PyCWnd.GetDCEx
  • PyCWnd.GetDlgCtrlID
  • PyCWnd.GetDlgItem
  • PyCWnd.GetDlgItemInt
  • PyCWnd.GetDlgItemText
  • PyCWnd.GetExStyle
  • PyCWnd.GetLastActivePopup
  • PyCWnd.GetMenu
  • PyCWnd.GetParent
  • PyCWnd.GetParentFrame
  • PyCWnd.GetParentOwner
  • PyCWnd.GetSafeHwnd
  • PyCWnd.GetScrollInfo
  • PyCWnd.GetScrollPos
  • PyCWnd.GetStyle
  • PyCWnd.GetSystemMenu
  • PyCWnd.GetTopLevelFrame
  • PyCWnd.GetTopLevelOwner
  • PyCWnd.GetTopLevelParent
  • PyCWnd.GetTopWindow
  • PyCWnd.GetWindow
  • PyCWnd.GetWindowDC
  • PyCWnd.GetWindowPlacement
  • PyCWnd.GetWindowRect
  • PyCWnd.GetWindowText
  • PyCWnd.HideCaret
  • PyCWnd.HookAllKeyStrokes
  • PyCWnd.HookKeyStroke
  • PyCWnd.HookMessage
  • PyCWnd.InvalidateRect
  • PyCWnd.InvalidateRgn
  • PyCWnd.IsChild
  • PyCWnd.IsDlgButtonChecked
  • PyCWnd.IsIconic
  • PyCWnd.IsWindow
  • PyCWnd.IsWindowEnabled
  • PyCWnd.IsWindowVisible
  • PyCWnd.IsZoomed
  • PyCWnd.KillTimer
  • PyCWnd.LockWindowUpdate
  • PyCWnd.MapWindowPoints
  • PyCWnd.MessageBox
  • PyCWnd.ModifyStyle
  • PyCWnd.ModifyStyleEx
  • PyCWnd.MouseCaptured
  • PyCWnd.MoveWindow
  • PyCWnd.OnClose
  • PyCWnd.OnClose
  • PyCWnd.OnCommand
  • PyCWnd.OnCreate
  • PyCWnd.OnCtlColor
  • PyCWnd.OnCtlColor
  • PyCWnd.OnEraseBkgnd
  • PyCWnd.OnEraseBkgnd
  • PyCWnd.OnMDIActivate
  • PyCWnd.OnMouseActivate
  • PyCWnd.OnMouseActivate
  • PyCWnd.OnNcCalcSize
  • PyCWnd.OnNcHitTest
  • PyCWnd.OnNcHitTest
  • PyCWnd.OnPaint
  • PyCWnd.OnPaint
  • PyCWnd.OnPaletteChanged
  • PyCWnd.OnPaletteIsChanging
  • PyCWnd.OnQueryDragIcon
  • PyCWnd.OnQueryDragIcon
  • PyCWnd.OnQueryNewPalette
  • PyCWnd.OnQueryNewPalette
  • PyCWnd.OnSetCursor
  • PyCWnd.OnSetCursor
  • PyCWnd.OnSysColorChange
  • PyCWnd.OnWinIniChange
  • PyCWnd.OnWndMsg
  • PyCWnd.PostMessage
  • PyCWnd.PreCreateWindow
  • PyCWnd.PreCreateWindow
  • PyCWnd.PreTranslateMessage
  • PyCWnd.PumpWaitingMessages
  • PyCWnd.RedrawWindow
  • PyCWnd.ReleaseCapture
  • PyCWnd.ReleaseDC
  • PyCWnd.RepositionBars
  • PyCWnd.RunModalLoop
  • PyCWnd.ScreenToClient
  • PyCWnd.SCROLLINFO tuple
  • PyCWnd.SendMessage
  • PyCWnd.SendMessageToDescendants
  • PyCWnd.SetActiveWindow
  • PyCWnd.SetCapture
  • PyCWnd.SetDlgItemText
  • PyCWnd.SetFocus
  • PyCWnd.SetFont
  • PyCWnd.SetForegroundWindow
  • PyCWnd.SetMenu
  • PyCWnd.SetRedraw
  • PyCWnd.SetScrollInfo
  • PyCWnd.SetScrollPos
  • PyCWnd.SetTimer
  • PyCWnd.SetWindowPlacement
  • PyCWnd.SetWindowPos
  • PyCWnd.SetWindowText
  • PyCWnd.ShowCaret
  • PyCWnd.ShowScrollBar
  • PyCWnd.ShowWindow
  • PyCWnd.UnlockWindowUpdate
  • PyCWnd.UpdateData
  • PyCWnd.UpdateDialogControls
  • PyCWnd.UpdateWindow
  • 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
  • PyDLL.__repr__
  • PyDLL.AttachToMFC
  • PyDLL.GetFileName
  • PyHANDLE.__cmp__
  • PyHANDLE.__hash__
  • PyHANDLE.__int__
  • PyHANDLE.__nonzero__
  • PyHANDLE.__print__
  • PyHANDLE.__str__
  • PyHANDLE.Close
  • PyHANDLE.Detach
  • PyIActiveScriptDebug.EnumCodeContextsOfPosition
  • PyIActiveScriptDebug.GetScriptletTextAttributes
  • PyIActiveScriptDebug.GetScriptTextAttributes
  • PyIActiveScriptError.GetExceptionInfo
  • PyIActiveScriptError.GetSourceLineText
  • PyIActiveScriptError.GetSourcePosition
  • PyIActiveScriptErrorDebug.GetDocumentContext
  • PyIActiveScriptErrorDebug.GetStackFrame
  • PyIActiveScriptParseProcedure.ParseProcedureText
  • PyIActiveScriptSite.GetDocVersionString
  • PyIActiveScriptSite.GetItemInfo
  • PyIActiveScriptSite.GetLCID
  • PyIActiveScriptSite.OnEnterScript
  • PyIActiveScriptSite.OnLeaveScript
  • PyIActiveScriptSite.OnScriptError
  • PyIActiveScriptSite.OnScriptTerminate
  • PyIActiveScriptSite.OnStateChange
  • PyIActiveScriptSiteDebug.GetApplication
  • PyIActiveScriptSiteDebug.GetDocumentContextFromPosition
  • PyIActiveScriptSiteDebug.GetRootApplicationNode
  • PyIActiveScriptSiteDebug.OnScriptErrorDebug
  • PyIAddrBook.CompareEntryIDs
  • PyIAddrBook.OpenEntry
  • PyIAddrBook.ResolveName
  • PyIApplicationDebugger.CreateInstanceAtDebugger
  • PyIApplicationDebugger.onClose
  • PyIApplicationDebugger.onDebuggerEvent
  • PyIApplicationDebugger.onDebugOutput
  • PyIApplicationDebugger.onHandleBreakPoint
  • PyIApplicationDebugger.QueryAlive
  • PyIBindCtx.GetRunningObjectTable
  • PyIBrowserFrameOptions.GetFrameOptions
  • PyICatInformation.EnumCategories
  • PyICatInformation.EnumClassesOfCategories
  • PyICatInformation.GetCategoryDesc
  • PyICatRegister.RegisterCategories
  • PyICatRegister.RegisterClassImplCategories
  • PyICatRegister.RegisterClassReqCategories
  • PyICatRegister.UnregisterCategories
  • PyICatRegister.UnRegisterClassImplCategories
  • PyICatRegister.UnRegisterClassReqCategories
  • PyIClassFactory.CreateInstance
  • PyIClassFactory.LockServer
  • PyIConnectionPoint.Advise
  • PyIConnectionPoint.EnumConnections
  • PyIConnectionPoint.GetConnectionInterface
  • PyIConnectionPoint.GetConnectionPointContainer
  • PyIConnectionPoint.Unadvise
  • PyIConnectionPointContainer.EnumConnectionPoints
  • PyIConnectionPointContainer.FindConnectionPoint
  • PyIContextMenu.GetCommandString
  • PyIContextMenu.InvokeCommand
  • PyIContextMenu.QueryContextMenu
  • PyICopyHook.CopyCallback
  • PyICreateTypeInfo.AddFuncDesc
  • PyICreateTypeInfo.AddImplType
  • PyICreateTypeInfo.AddRefTypeInfo
  • PyICreateTypeInfo.AddVarDesc
  • PyICreateTypeInfo.DefineFuncAsDllEntry
  • PyICreateTypeInfo.LayOut
  • PyICreateTypeInfo.SetAlignment
  • PyICreateTypeInfo.SetDocString
  • PyICreateTypeInfo.SetFuncAndParamNames
  • PyICreateTypeInfo.SetFuncDocString
  • PyICreateTypeInfo.SetFuncHelpContext
  • PyICreateTypeInfo.SetGuid
  • PyICreateTypeInfo.SetHelpContext
  • PyICreateTypeInfo.SetImplTypeFlags
  • PyICreateTypeInfo.SetMops
  • PyICreateTypeInfo.SetSchema
  • PyICreateTypeInfo.SetTypeDescAlias
  • PyICreateTypeInfo.SetTypeFlags
  • PyICreateTypeInfo.SetVarDocString
  • PyICreateTypeInfo.SetVarHelpContext
  • PyICreateTypeInfo.SetVarName
  • PyICreateTypeInfo.SetVersion
  • PyICreateTypeLib.CreateTypeInfo
  • PyICreateTypeLib.SaveAllChanges
  • PyICreateTypeLib.SetDocString
  • PyICreateTypeLib.SetGuid
  • PyICreateTypeLib.SetHelpContext
  • PyICreateTypeLib.SetHelpFileName
  • PyICreateTypeLib.SetLcid
  • PyICreateTypeLib.SetLibFlags
  • PyICreateTypeLib.SetName
  • PyICreateTypeLib.SetVersion
  • PyIDataObject.DAdvise
  • PyIDataObject.DUnadvise
  • PyIDataObject.EnumDAdvise
  • PyIDataObject.EnumFormatEtc
  • PyIDataObject.GetCanonicalFormatEtc
  • PyIDataObject.GetData
  • PyIDataObject.GetDataHere
  • PyIDataObject.QueryGetData
  • PyIDataObject.SetData
  • PyIDebugApplication.AddGlobalExpressionContextProvider
  • PyIDebugApplication.AddStackFrameSniffer
  • PyIDebugApplication.Close
  • PyIDebugApplication.CreateApplicationNode
  • PyIDebugApplication.CreateAsyncDebugOperation
  • PyIDebugApplication.DebugOutput
  • PyIDebugApplication.FCanJitDebug
  • PyIDebugApplication.FireDebuggerEvent
  • PyIDebugApplication.FIsAutoJitDebugEnabled
  • PyIDebugApplication.GetBreakFlags
  • PyIDebugApplication.GetCurrentThread
  • PyIDebugApplication.HandleBreakPoint
  • PyIDebugApplication.HandleRuntimeError
  • PyIDebugApplication.QueryCurrentThreadIsDebuggerThread
  • PyIDebugApplication.RemoveGlobalExpressionContextProvider
  • PyIDebugApplication.RemoveStackFrameSniffer
  • PyIDebugApplication.SetName
  • PyIDebugApplication.StartDebugSession
  • PyIDebugApplication.StepOutComplete
  • PyIDebugApplication.SynchronousCallInDebuggerThread
  • PyIDebugApplicationNode.Attach
  • PyIDebugApplicationNode.Close
  • PyIDebugApplicationNode.Detach
  • PyIDebugApplicationNode.EnumChildren
  • PyIDebugApplicationNode.GetParent
  • PyIDebugApplicationNode.SetDocumentProvider
  • PyIDebugApplicationNodeEvents.onAddChild
  • PyIDebugApplicationNodeEvents.onAttach
  • PyIDebugApplicationNodeEvents.onDetach
  • PyIDebugApplicationNodeEvents.onRemoveChild
  • PyIDebugApplicationThread.QueryIsCurrentThread
  • PyIDebugApplicationThread.QueryIsDebuggerThread
  • PyIDebugApplicationThread.SetDescription
  • PyIDebugApplicationThread.SetStateString
  • PyIDebugApplicationThread.SynchronousCallIntoThread
  • PyIDebugCodeContext.GetDocumentContext
  • PyIDebugCodeContext.SetBreakPoint
  • PyIDebugDocumentContext.EnumCodeContexts
  • PyIDebugDocumentContext.GetDocument
  • PyIDebugDocumentHelper.AddDBCSText
  • PyIDebugDocumentHelper.AddDeferredText
  • PyIDebugDocumentHelper.AddUnicodeText
  • PyIDebugDocumentHelper.Attach
  • PyIDebugDocumentHelper.BringDocumentContextToTop
  • PyIDebugDocumentHelper.BringDocumentToTop
  • PyIDebugDocumentHelper.CreateDebugDocumentContext
  • PyIDebugDocumentHelper.DefineScriptBlock
  • PyIDebugDocumentHelper.Detach
  • PyIDebugDocumentHelper.GetDebugApplicationNode
  • PyIDebugDocumentHelper.GetScriptBlockInfo
  • PyIDebugDocumentHelper.Init
  • PyIDebugDocumentHelper.SetDebugDocumentHost
  • PyIDebugDocumentHelper.SetDefaultTextAttr
  • PyIDebugDocumentHelper.SetDocumentAttr
  • PyIDebugDocumentHelper.SetLongName
  • PyIDebugDocumentHelper.SetShortName
  • PyIDebugDocumentHelper.SetTextAttributes
  • PyIDebugDocumentHost.GetDeferredText
  • PyIDebugDocumentHost.GetFileName
  • PyIDebugDocumentHost.GetPathName
  • PyIDebugDocumentHost.GetScriptTextAttributes
  • PyIDebugDocumentHost.NotifyChanged
  • PyIDebugDocumentHost.OnCreateDocumentContext
  • PyIDebugDocumentInfo.GetDocumentClassId
  • PyIDebugDocumentInfo.GetName
  • PyIDebugDocumentProvider.GetDocument
  • PyIDebugDocumentText.GetContextOfPosition
  • PyIDebugDocumentText.GetDocumentAttributes
  • PyIDebugDocumentText.GetLineOfPosition
  • PyIDebugDocumentText.GetPositionOfContext
  • PyIDebugDocumentText.GetPositionOfLine
  • PyIDebugDocumentText.GetSize
  • PyIDebugDocumentText.GetText
  • PyIDebugDocumentTextAuthor.InsertText
  • PyIDebugDocumentTextAuthor.RemoveText
  • PyIDebugDocumentTextAuthor.ReplaceText
  • PyIDebugDocumentTextEvents.onDestroy
  • PyIDebugDocumentTextEvents.onInsertText
  • PyIDebugDocumentTextEvents.onRemoveText
  • PyIDebugDocumentTextEvents.onReplaceText
  • PyIDebugDocumentTextEvents.onUpdateDocumentAttributes
  • PyIDebugDocumentTextEvents.onUpdateTextAttributes
  • PyIDebugDocumentTextExternalAuthor.GetFileName
  • PyIDebugDocumentTextExternalAuthor.GetPathName
  • PyIDebugDocumentTextExternalAuthor.NotifyChanged
  • PyIDebugExpression.Abort
  • PyIDebugExpression.GetResultAsDebugProperties
  • PyIDebugExpression.GetResultAsString
  • PyIDebugExpression.QueryIsComplete
  • PyIDebugExpression.Start
  • PyIDebugExpressionCallBack.onComplete
  • PyIDebugExpressionContext.GetLanguageInfo
  • PyIDebugExpressionContext.ParseLanguageText
  • PyIDebugProperty.EnumMembers
  • PyIDebugProperty.GetExtendedInfo
  • PyIDebugProperty.GetParent
  • PyIDebugProperty.GetPropertyInfo
  • PyIDebugProperty.SetValueAsString
  • PyIDebugSessionProvider.StartDebugSession
  • PyIDebugStackFrame.GetCodeContext
  • PyIDebugStackFrame.GetDebugProperty
  • PyIDebugStackFrame.GetDescriptionString
  • PyIDebugStackFrame.GetLanguageString
  • PyIDebugStackFrame.GetThread
  • PyIDebugStackFrameSniffer.EnumStackFrames
  • PyIDebugStackFrameSnifferEx.EnumStackFramesEx
  • PyIDebugSyncOperation.Execute
  • PyIDebugSyncOperation.GetTargetThread
  • PyIDebugSyncOperation.InProgressAbort
  • PyIDispatch.GetIDsOfNames
  • PyIDispatch.GetTypeInfo
  • PyIDispatch.GetTypeInfoCount
  • PyIDispatch.Invoke
  • PyIDispatch.InvokeTypes
  • PyIEnumCATEGORYINFO.Clone
  • PyIEnumCATEGORYINFO.Next
  • PyIEnumCATEGORYINFO.Reset
  • PyIEnumCATEGORYINFO.Skip
  • PyIEnumConnectionPoints.Clone
  • PyIEnumConnectionPoints.Next
  • PyIEnumConnectionPoints.Reset
  • PyIEnumConnectionPoints.Skip
  • PyIEnumConnections.Clone
  • PyIEnumConnections.Next
  • PyIEnumConnections.Reset
  • PyIEnumConnections.Skip
  • PyIEnumDebugApplicationNodes.Clone
  • PyIEnumDebugApplicationNodes.Next
  • PyIEnumDebugApplicationNodes.Reset
  • PyIEnumDebugApplicationNodes.Skip
  • PyIEnumDebugCodeContexts.Clone
  • PyIEnumDebugCodeContexts.Next
  • PyIEnumDebugCodeContexts.Reset
  • PyIEnumDebugCodeContexts.Skip
  • PyIEnumDebugExpressionContexts.Clone
  • PyIEnumDebugExpressionContexts.Next
  • PyIEnumDebugExpressionContexts.Reset
  • PyIEnumDebugExpressionContexts.Skip
  • PyIEnumDebugPropertyInfo.Clone
  • PyIEnumDebugPropertyInfo.GetCount
  • PyIEnumDebugPropertyInfo.Next
  • PyIEnumDebugPropertyInfo.Reset
  • PyIEnumDebugPropertyInfo.Skip
  • PyIEnumDebugStackFrames.Clone
  • PyIEnumDebugStackFrames.Next
  • PyIEnumDebugStackFrames.Reset
  • PyIEnumDebugStackFrames.Skip
  • PyIEnumFORMATETC.Clone
  • PyIEnumFORMATETC.Next
  • PyIEnumFORMATETC.Reset
  • PyIEnumFORMATETC.Skip
  • PyIEnumGUID.Clone
  • PyIEnumGUID.Next
  • PyIEnumGUID.Reset
  • PyIEnumGUID.Skip
  • PyIEnumIDList.Clone
  • PyIEnumIDList.Next
  • PyIEnumIDList.Reset
  • PyIEnumIDList.Skip
  • PyIEnumMoniker.Clone
  • PyIEnumMoniker.Next
  • PyIEnumMoniker.Reset
  • PyIEnumMoniker.Skip
  • PyIEnumRemoteDebugApplications.Clone
  • PyIEnumRemoteDebugApplications.Next
  • PyIEnumRemoteDebugApplications.Reset
  • PyIEnumRemoteDebugApplications.Skip
  • PyIEnumRemoteDebugApplicationThreads.Clone
  • PyIEnumRemoteDebugApplicationThreads.Next
  • PyIEnumRemoteDebugApplicationThreads.Reset
  • PyIEnumRemoteDebugApplicationThreads.Skip
  • PyIEnumSTATPROPSETSTG.Clone
  • PyIEnumSTATPROPSETSTG.Next
  • PyIEnumSTATPROPSETSTG.Reset
  • PyIEnumSTATPROPSETSTG.Skip
  • PyIEnumSTATPROPSTG.Clone
  • PyIEnumSTATPROPSTG.Next
  • PyIEnumSTATPROPSTG.Reset
  • PyIEnumSTATPROPSTG.Skip
  • PyIEnumSTATSTG.Clone
  • PyIEnumSTATSTG.Next
  • PyIEnumSTATSTG.Reset
  • PyIEnumSTATSTG.Skip
  • PyIErrorLog.AddError
  • PyIExternalConnection.AddConnection
  • PyIExternalConnection.ReleaseConnection
  • PyIExtractIcon.Extract
  • PyIExtractIcon.GetIconLocation
  • PyIID.__cmp__
  • PyIID.__hash__
  • PyIID.__repr__
  • PyIID.__str__
  • PyIInternetBindInfo.GetBindInfo
  • PyIInternetBindInfo.GetBindString
  • PyIInternetPriority.GetPriority
  • PyIInternetPriority.SetPriority
  • PyIInternetProtocol.LockRequest
  • PyIInternetProtocol.Read
  • PyIInternetProtocol.Seek
  • PyIInternetProtocol.UnlockRequest
  • PyIInternetProtocolInfo.CombineUrl
  • PyIInternetProtocolInfo.CompareUrl
  • PyIInternetProtocolInfo.ParseUrl
  • PyIInternetProtocolInfo.QueryInfo
  • PyIInternetProtocolRoot.Abort
  • PyIInternetProtocolRoot.Continue
  • PyIInternetProtocolRoot.Resume
  • PyIInternetProtocolRoot.Start
  • PyIInternetProtocolRoot.Suspend
  • PyIInternetProtocolRoot.Terminate
  • PyIInternetProtocolSink.ReportData
  • PyIInternetProtocolSink.ReportProgress
  • PyIInternetProtocolSink.ReportResult
  • PyIInternetProtocolSink.Switch
  • PyILockBytes.Flush
  • PyILockBytes.LockRegion
  • PyILockBytes.ReadAt
  • PyILockBytes.SetSize
  • PyILockBytes.Stat
  • PyILockBytes.UnlockRegion
  • PyILockBytes.WriteAt
  • PyIMachineDebugManager.AddApplication
  • PyIMachineDebugManager.EnumApplications
  • PyIMachineDebugManager.RemoveApplication
  • PyIMachineDebugManagerEvents.onAddApplication
  • PyIMachineDebugManagerEvents.onRemoveApplication
  • PyIMAPIContainer.GetContentsTable
  • PyIMAPIContainer.GetHierarchyTable
  • PyIMAPIContainer.OpenEntry
  • PyIMAPIFolder.CopyMessages
  • PyIMAPIFolder.CreateFolder
  • PyIMAPIFolder.CreateMessage
  • PyIMAPIFolder.DeleteMessages
  • PyIMAPIFolder.EmptyFolder
  • PyIMAPIFolder.GetLastError
  • PyIMAPIProp.CopyProps
  • PyIMAPIProp.CopyTo
  • PyIMAPIProp.DeleteProps
  • PyIMAPIProp.GetIDsFromNames
  • PyIMAPIProp.GetLastError
  • PyIMAPIProp.GetNamesFromIDs
  • PyIMAPIProp.GetPropList
  • PyIMAPIProp.GetProps
  • PyIMAPIProp.OpenProperty
  • PyIMAPIProp.SaveChanges
  • PyIMAPIProp.SetProps
  • PyIMAPISession.CompareEntryIDs
  • PyIMAPISession.GetMsgStoresTable
  • PyIMAPISession.GetStatusTable
  • PyIMAPISession.Logoff
  • PyIMAPISession.OpenAddressBook
  • PyIMAPISession.OpenEntry
  • PyIMAPISession.OpenMsgStore
  • PyIMAPISession.OpenProfileSection
  • PyIMAPISession.QueryIdentity
  • PyIMAPITable.Abort
  • PyIMAPITable.Advise
  • PyIMAPITable.CreateBookmark
  • PyIMAPITable.FindRow
  • PyIMAPITable.FreeBookmark
  • PyIMAPITable.GetRowCount
  • PyIMAPITable.GetStatus
  • PyIMAPITable.QueryColumns
  • PyIMAPITable.QueryPosition
  • PyIMAPITable.QueryRows
  • PyIMAPITable.Restrict
  • PyIMAPITable.SeekRow
  • PyIMAPITable.SeekRowApprox
  • PyIMAPITable.SetColumns
  • PyIMAPITable.SortTable
  • PyIMessage.CreateAttach
  • PyIMessage.DeleteAttach
  • PyIMessage.GetAttachmentTable
  • PyIMessage.GetRecipientTable
  • PyIMessage.ModifyRecipients
  • PyIMessage.OpenAttach
  • PyIMessage.SetReadFlag
  • PyIMessage.SubmitMessage
  • PyIMoniker.BindToObject
  • PyIMoniker.BindToStorage
  • PyIMoniker.ComposeWith
  • PyIMoniker.Enum
  • PyIMoniker.GetDisplayName
  • PyIMoniker.Hash
  • PyIMoniker.IsEqual
  • PyIMoniker.IsSystemMoniker
  • PyIMsgServiceAdmin.ConfigureMsgService
  • PyIMsgServiceAdmin.CreateMsgService
  • PyIMsgServiceAdmin.DeleteMsgService
  • PyIMsgServiceAdmin.GetMsgServiceTable
  • PyIMsgServiceAdmin.GetProviderTable
  • PyIMsgServiceAdmin.OpenProfileSection
  • PyIMsgServiceAdmin.RenameMsgService
  • PyIMsgStore.AbortSubmit
  • PyIMsgStore.CompareEntryIDs
  • PyIMsgStore.GetLastError
  • PyIMsgStore.GetReceiveFolder
  • PyIMsgStore.GetReceiveFolderTable
  • PyIMsgStore.OpenEntry
  • PyIOleClientSite.GetContainer
  • PyIOleClientSite.GetMoniker
  • PyIOleClientSite.OnShowWindow
  • PyIOleClientSite.RequestNewObjectLayout
  • PyIOleClientSite.SaveObject
  • PyIOleClientSite.ShowObject
  • PyIOleControl.FreezeEvents
  • PyIOleControl.GetControlInfo
  • PyIOleControl.OnAmbientPropertyChange
  • PyIOleControl.OnMnemonic
  • PyIOleInPlaceObject.InPlaceDeactivate
  • PyIOleInPlaceObject.ReactivateAndUndo
  • PyIOleInPlaceObject.SetObjectRects
  • PyIOleInPlaceObject.UIDeactivate
  • PyIOleInPlaceSite.CanInPlaceActivate
  • PyIOleInPlaceSite.DeactivateAndUndo
  • PyIOleInPlaceSite.DiscardUndoState
  • PyIOleInPlaceSite.GetWindowContext
  • PyIOleInPlaceSite.OnInPlaceActivate
  • PyIOleInPlaceSite.OnInPlaceDeactivate
  • PyIOleInPlaceSite.OnPosRectChange
  • PyIOleInPlaceSite.OnUIActivate
  • PyIOleInPlaceSite.OnUIDeactivate
  • PyIOleInPlaceSite.Scroll
  • PyIOleInPlaceSiteEx.OnInPlaceActivateEx
  • PyIOleInPlaceSiteEx.OnInPlaceDeactivateEx
  • PyIOleInPlaceSiteEx.RequestUIActivate
  • PyIOleInPlaceSiteWindowless.AdjustRect
  • PyIOleInPlaceSiteWindowless.CanWindowlessActivate
  • PyIOleInPlaceSiteWindowless.GetCapture
  • PyIOleInPlaceSiteWindowless.GetDC
  • PyIOleInPlaceSiteWindowless.GetFocus
  • PyIOleInPlaceSiteWindowless.InvalidateRect
  • PyIOleInPlaceSiteWindowless.InvalidateRgn
  • PyIOleInPlaceSiteWindowless.OnDefWindowMessage
  • PyIOleInPlaceSiteWindowless.ReleaseDC
  • PyIOleInPlaceSiteWindowless.ScrollRect
  • PyIOleInPlaceSiteWindowless.SetCapture
  • PyIOleInPlaceSiteWindowless.SetFocus
  • PyIOleObject.Advise
  • PyIOleObject.Close
  • PyIOleObject.DoVerb
  • PyIOleObject.EnumAdvise
  • PyIOleObject.EnumVerbs
  • PyIOleObject.GetClientSite
  • PyIOleObject.GetClipboardData
  • PyIOleObject.GetExtent
  • PyIOleObject.GetMiscStatus
  • PyIOleObject.GetMoniker
  • PyIOleObject.GetUserClassID
  • PyIOleObject.GetUserType
  • PyIOleObject.InitFromData
  • PyIOleObject.IsUpToDate
  • PyIOleObject.SetClientSite
  • PyIOleObject.SetColorScheme
  • PyIOleObject.SetExtent
  • PyIOleObject.SetHostNames
  • PyIOleObject.SetMoniker
  • PyIOleObject.Unadvise
  • PyIOleObject.Update
  • PyIOleWindow.ContextSensitiveHelp
  • PyIOleWindow.GetWindow
  • PyIPersist.GetClassID
  • PyIPersistFile.GetCurFile
  • PyIPersistFile.IsDirty
  • PyIPersistFile.Load
  • PyIPersistFile.Save
  • PyIPersistFile.SaveCompleted
  • PyIPersistFolder.Initialize
  • PyIPersistPropertyBag.InitNew
  • PyIPersistPropertyBag.Load
  • PyIPersistPropertyBag.Save
  • PyIPersistStorage.HandsOffStorage
  • PyIPersistStorage.InitNew
  • PyIPersistStorage.IsDirty
  • PyIPersistStorage.Load
  • PyIPersistStorage.Save
  • PyIPersistStorage.SaveCompleted
  • PyIPersistStream.GetSizeMax
  • PyIPersistStream.IsDirty
  • PyIPersistStream.Load
  • PyIPersistStream.Save
  • PyIPersistStreamInit.InitNew
  • PyIProcessDebugManager.AddApplication
  • PyIProcessDebugManager.CreateApplication
  • PyIProcessDebugManager.CreateDebugDocumentHelper
  • PyIProcessDebugManager.GetDefaultApplication
  • PyIProcessDebugManager.RemoveApplication
  • PyIPropertyBag.Read
  • PyIPropertyBag.Write
  • PyIPropertySetStorage.Create
  • PyIPropertySetStorage.Delete
  • PyIPropertySetStorage.Enum
  • PyIPropertySetStorage.Open
  • PyIPropertyStorage.Commit
  • PyIPropertyStorage.DeleteMultiple
  • PyIPropertyStorage.DeletePropertyNames
  • PyIPropertyStorage.Enum
  • PyIPropertyStorage.ReadMultiple
  • PyIPropertyStorage.ReadPropertyNames
  • PyIPropertyStorage.Revert
  • PyIPropertyStorage.SetClass
  • PyIPropertyStorage.SetTimes
  • PyIPropertyStorage.Stat
  • PyIPropertyStorage.WriteMultiple
  • PyIPropertyStorage.WritePropertyNames
  • PyIProvideClassInfo.GetClassInfo
  • PyIProvideClassInfo2.GetGUID
  • PyIProvideExpressionContexts.EnumExpressionContexts
  • PyIRemoteDebugApplication.CauseBreak
  • PyIRemoteDebugApplication.ConnectDebugger
  • PyIRemoteDebugApplication.CreateInstanceAtApplication
  • PyIRemoteDebugApplication.DisconnectDebugger
  • PyIRemoteDebugApplication.EnumGlobalExpressionContexts
  • PyIRemoteDebugApplication.EnumThreads
  • PyIRemoteDebugApplication.GetDebugger
  • PyIRemoteDebugApplication.GetName
  • PyIRemoteDebugApplication.GetRootNode
  • PyIRemoteDebugApplication.QueryAlive
  • PyIRemoteDebugApplication.ResumeFromBreakPoint
  • PyIRemoteDebugApplicationEvents.OnBreakFlagChange
  • PyIRemoteDebugApplicationEvents.OnClose
  • PyIRemoteDebugApplicationEvents.OnConnectDebugger
  • PyIRemoteDebugApplicationEvents.OnCreateThread
  • PyIRemoteDebugApplicationEvents.OnDebugOutput
  • PyIRemoteDebugApplicationEvents.OnDestroyThread
  • PyIRemoteDebugApplicationEvents.OnDisconnectDebugger
  • PyIRemoteDebugApplicationEvents.OnEnterBreakPoint
  • PyIRemoteDebugApplicationEvents.OnLeaveBreakPoint
  • PyIRemoteDebugApplicationEvents.OnSetName
  • PyIRemoteDebugApplicationThread.EnumStackFrames
  • PyIRemoteDebugApplicationThread.GetApplication
  • PyIRemoteDebugApplicationThread.GetDescription
  • PyIRemoteDebugApplicationThread.GetState
  • PyIRemoteDebugApplicationThread.GetSuspendCount
  • PyIRemoteDebugApplicationThread.GetSystemThreadId
  • PyIRemoteDebugApplicationThread.Resume
  • PyIRemoteDebugApplicationThread.SetNextStatement
  • PyIRemoteDebugApplicationThread.Suspend
  • PyIRunningObjectTable.EnumRunning
  • PyIRunningObjectTable.GetObject
  • PyIRunningObjectTable.IsRunning
  • PyIServiceProvider.QueryService
  • PyIShellBrowser.BrowseObject
  • PyIShellBrowser.EnableModelessSB
  • PyIShellBrowser.GetControlWindow
  • PyIShellBrowser.GetViewStateStream
  • PyIShellBrowser.OnViewWindowActive
  • PyIShellBrowser.QueryActiveShellView
  • PyIShellBrowser.RemoveMenusSB
  • PyIShellBrowser.SendControlMsg
  • PyIShellBrowser.SetMenuSB
  • PyIShellBrowser.SetStatusTextSB
  • PyIShellBrowser.TranslateAcceleratorSB
  • PyIShellExtInit.Initialize
  • PyIShellFolder.BindToObject
  • PyIShellFolder.BindToStorage
  • PyIShellFolder.CompareIDs
  • PyIShellFolder.CreateViewObject
  • PyIShellFolder.EnumObjects
  • PyIShellFolder.GetAttributesOf
  • PyIShellFolder.GetDisplayNameOf
  • PyIShellFolder.GetUIObjectOf
  • PyIShellFolder.ParseDisplayName
  • PyIShellFolder.SetNameOf
  • PyIShellLink.GetArguments
  • PyIShellLink.GetDescription
  • PyIShellLink.GetHotkey
  • PyIShellLink.GetIconLocation
  • PyIShellLink.GetIDList
  • PyIShellLink.GetPath
  • PyIShellLink.GetShowCmd
  • PyIShellLink.GetWorkingDirectory
  • PyIShellLink.Resolve
  • PyIShellLink.SetArguments
  • PyIShellLink.SetDescription
  • PyIShellLink.SetHotkey
  • PyIShellLink.SetIconLocation
  • PyIShellLink.SetIDList
  • PyIShellLink.SetPath
  • PyIShellLink.SetRelativePath
  • PyIShellLink.SetShowCmd
  • PyIShellLink.SetWorkingDirectory
  • PyIShellView.CreateViewWindow
  • PyIShellView.DestroyViewWindow
  • PyIShellView.EnableModeless
  • PyIShellView.GetCurrentInfo
  • PyIShellView.GetItemObject
  • PyIShellView.Refresh
  • PyIShellView.SaveViewState
  • PyIShellView.SelectItem
  • PyIShellView.TranslateAccelerator
  • PyIShellView.UIActivate
  • PyISpecifyPropertyPages.GetPages
  • PyIStorage.Commit
  • PyIStorage.CopyTo
  • PyIStorage.CreateStorage
  • PyIStorage.CreateStream
  • PyIStorage.DestroyElement
  • PyIStorage.EnumElements
  • PyIStorage.MoveElementTo
  • PyIStorage.OpenStorage
  • PyIStorage.OpenStream
  • PyIStorage.RenameElement
  • PyIStorage.Revert
  • PyIStorage.SetClass
  • PyIStorage.SetElementTimes
  • PyIStorage.SetStateBits
  • PyIStorage.Stat
  • PyIStream.Clone
  • PyIStream.Commit
  • PyIStream.CopyTo
  • PyIStream.LockRegion
  • PyIStream.Read
  • PyIStream.Revert
  • PyIStream.Seek
  • PyIStream.SetSize
  • PyIStream.Stat
  • PyIStream.UnlockRegion
  • PyIStream.Write
  • PyITypeComp.Bind
  • PyITypeComp.BindType
  • PyITypeInfo.GetContainingTypeLib
  • PyITypeInfo.GetDocumentation
  • PyITypeInfo.GetFuncDesc
  • PyITypeInfo.GetIDsOfNames
  • PyITypeInfo.GetImplTypeFlags
  • PyITypeInfo.GetNames
  • PyITypeInfo.GetRefTypeInfo
  • PyITypeInfo.GetRefTypeOfImplType
  • PyITypeInfo.GetTypeAttr
  • PyITypeInfo.GetTypeComp
  • PyITypeInfo.GetVarDesc
  • PyITypeLib.GetDocumentation
  • PyITypeLib.GetLibAttr
  • PyITypeLib.GetTypeComp
  • PyITypeLib.GetTypeInfo
  • PyITypeLib.GetTypeInfoCount
  • PyITypeLib.GetTypeInfoOfGuid
  • PyITypeLib.GetTypeInfoType
  • PyIUnknown.__cmp__
  • PyIUnknown.QueryInterface
  • PyIViewObject.Draw
  • PyIViewObject.Freeze
  • PyIViewObject.GetAdvise
  • PyIViewObject.GetColorSet
  • PyIViewObject.SetAdvise
  • PyIViewObject.Unfreeze
  • PyIViewObject2.GetExtent
  • 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_DESCRIPTOR.GetLength
  • PySECURITY_DESCRIPTOR.GetSecurityDescriptorControl
  • PySECURITY_DESCRIPTOR.GetSecurityDescriptorDacl
  • PySECURITY_DESCRIPTOR.GetSecurityDescriptorGroup
  • PySECURITY_DESCRIPTOR.GetSecurityDescriptorOwner
  • PySECURITY_DESCRIPTOR.GetSecurityDescriptorSacl
  • PySECURITY_DESCRIPTOR.Initialize
  • PySECURITY_DESCRIPTOR.IsSelfRelative
  • PySECURITY_DESCRIPTOR.IsValid
  • PySECURITY_DESCRIPTOR.SetSecurityDescriptorDacl
  • PySECURITY_DESCRIPTOR.SetSecurityDescriptorGroup
  • PySECURITY_DESCRIPTOR.SetSecurityDescriptorOwner
  • PySECURITY_DESCRIPTOR.SetSecurityDescriptorSacl
  • PySID.__cmp__
  • PySID.GetLength
  • PySID.GetSidIdentifierAuthority
  • PySID.GetSubAuthority
  • PySID.GetSubAuthorityCount
  • PySID.Initialize
  • PySID.IsValid
  • PySID.SetSubAuthority
  • PySTGMEDIUM.set
  • pythoncom._GetGatewayCount
  • pythoncom._GetInterfaceCount
  • pythoncom.CoCreateFreeThreadedMarshaler
  • pythoncom.CoCreateInstance
  • pythoncom.CoCreateInstanceEx
  • pythoncom.CoFreeUnusedLibraries
  • pythoncom.CoGetInterfaceAndReleaseStream
  • pythoncom.CoInitialize
  • pythoncom.CoInitializeEx
  • pythoncom.CoInitializeSecurity
  • pythoncom.CoMarshalInterThreadInterfaceInStream
  • pythoncom.Connect
  • pythoncom.CoRegisterClassObject
  • pythoncom.CoResumeClassObjects
  • pythoncom.CoRevokeClassObject
  • pythoncom.CoTreatAsClass
  • pythoncom.CoUninitialize
  • pythoncom.CreateBindCtx
  • pythoncom.CreateFileMoniker
  • pythoncom.CreateGuid
  • pythoncom.CreatePointerMoniker
  • pythoncom.CreateTypeLib
  • pythoncom.EnableQuitMessage
  • pythoncom.FUNCDESC
  • pythoncom.GetActiveObject
  • pythoncom.GetClassFile
  • pythoncom.GetFacilityString
  • pythoncom.GetRecordFromGuids
  • pythoncom.GetRunningObjectTable
  • pythoncom.GetScodeRangeString
  • pythoncom.GetScodeString
  • pythoncom.GetSeverityString
  • pythoncom.IsGatewayRegistered
  • pythoncom.LoadRegTypeLib
  • pythoncom.LoadTypeLib
  • pythoncom.MakeIID
  • pythoncom.MakePyFactory
  • pythoncom.MakeTime
  • pythoncom.MkParseDisplayName
  • pythoncom.new
  • pythoncom.OleFlushClipboard
  • pythoncom.OleGetClipboard
  • pythoncom.OleIsCurrentClipboard
  • pythoncom.OleLoad
  • pythoncom.OleLoadFromStream
  • pythoncom.OleSaveToStream
  • pythoncom.OleSetClipboard
  • pythoncom.ProgIDFromCLSID
  • pythoncom.PumpMessages
  • pythoncom.PumpWaitingMessages
  • pythoncom.QueryPathOfRegTypeLib
  • pythoncom.ReadClassStg
  • pythoncom.RegisterActiveObject
  • pythoncom.RegisterTypeLib
  • pythoncom.RevokeActiveObject
  • pythoncom.StgCreateDocfile
  • pythoncom.StgCreateDocfileOnILockBytes
  • pythoncom.StgIsStorageFile
  • pythoncom.STGMEDIUM
  • pythoncom.StgOpenStorage
  • pythoncom.StgOpenStorageEx
  • pythoncom.TYPEATTR
  • pythoncom.Unicode
  • pythoncom.UnRegisterTypeLib
  • pythoncom.UnwrapObject
  • pythoncom.VARDESC
  • pythoncom.WrapObject
  • pythoncom.WriteClassStg
  • PyTime.__cmp__
  • PyTime.__float__
  • PyTime.__getattr__
  • PyTime.__hash__
  • PyTime.__int__
  • PyTime.__nonzero__
  • PyTime.__repr__
  • PyTime.__str__
  • 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.Finalize
  • servicemanager.Initialize
  • servicemanager.LogErrorMsg
  • servicemanager.LogInfoMsg
  • servicemanager.LogMsg
  • servicemanager.LogWarningMsg
  • servicemanager.PrepareToHostMultiple
  • servicemanager.PrepareToHostSingle
  • servicemanager.PumpWaitingMessages
  • servicemanager.RegisterServiceCtrlHandler
  • shell.DragQueryFile
  • shell.DragQueryPoint
  • shell.SHAddToRecentDocs
  • shell.SHBrowseForFolder
  • shell.SHChangeNotify
  • shell.SHEmptyRecycleBin
  • shell.SHGetDesktopFolder
  • shell.SHGetFolderLocation
  • shell.SHGetFolderPath
  • shell.SHGetPathFromIDList
  • shell.SHGetSpecialFolderLocation
  • shell.SHGetSpecialFolderPath
  • shell.SHUpdateImage
  • 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.EnumResourceLanguages
  • win32api.EnumResourceNames
  • win32api.EnumResourceTypes
  • win32api.ExitWindows
  • win32api.ExitWindowsEx
  • win32api.ExpandEnvironmentStrings
  • win32api.FindCloseChangeNotification
  • win32api.FindExecutable
  • win32api.FindFiles
  • win32api.FindFirstChangeNotification
  • win32api.FindNextChangeNotification
  • win32api.FormatMessage
  • win32api.FormatMessageW
  • win32api.FreeLibrary
  • win32api.GenerateConsoleCtrlEvent
  • win32api.GetAsyncKeyState
  • win32api.GetCommandLine
  • win32api.GetComputerName
  • win32api.GetConsoleTitle
  • win32api.GetCurrentProcess
  • win32api.GetCurrentProcessId
  • win32api.GetCurrentThread
  • win32api.GetCurrentThreadId
  • win32api.GetCursorPos
  • win32api.GetDiskFreeSpace
  • win32api.GetDiskFreeSpaceEx
  • win32api.GetDomainName
  • win32api.GetEnvironmentVariable
  • win32api.GetFileAttributes
  • win32api.GetFocus
  • win32api.GetFullPathName
  • win32api.GetKeyState
  • win32api.GetLastError
  • win32api.GetLocalTime
  • win32api.GetLogicalDrives
  • win32api.GetLogicalDriveStrings
  • win32api.GetLongPathName
  • win32api.GetLongPathNameW
  • 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.GetThreadLocale
  • win32api.GetTickCount
  • win32api.GetTimeZoneInformation
  • win32api.GetUserDefaultLangID
  • win32api.GetUserDefaultLCID
  • win32api.GetUserName
  • win32api.GetUserNameEx
  • win32api.GetVersion
  • win32api.GetVersionEx
  • win32api.GetVolumeInformation
  • win32api.GetWindowLong
  • win32api.GetWindowsDirectory
  • win32api.HIBYTE
  • win32api.HIWORD
  • win32api.InitiateSystemShutdown
  • win32api.keybd_event
  • win32api.LoadCursor
  • win32api.LoadLibrary
  • win32api.LoadLibraryEx
  • win32api.LoadResource
  • win32api.LoadString
  • win32api.LOBYTE
  • win32api.LOWORD
  • win32api.MAKELANGID
  • win32api.MessageBeep
  • win32api.MessageBox
  • win32api.mouse_event
  • 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.RegEnumKeyEx
  • win32api.RegEnumValue
  • win32api.RegFlushKey
  • win32api.RegGetKeySecurity
  • win32api.RegisterWindowMessage
  • win32api.RegLoadKey
  • win32api.RegNotifyChangeKeyValue
  • 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.WaitForInputIdle
  • 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.CancelIo
  • 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.CreateHardLink
  • win32file.CreateIoCompletionPort
  • win32file.DCB
  • win32file.DecryptFile
  • win32file.DefineDosDevice
  • win32file.DefineDosDeviceW
  • win32file.DeleteFile
  • win32file.DeleteFileW
  • win32file.DeleteVolumeMountPoint
  • win32file.DeviceIoControl
  • win32file.EncryptFile
  • win32file.EncryptionDisable
  • 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.GetFileAttributesEx
  • win32file.GetFileAttributesEx
  • win32file.GetFileAttributesW
  • win32file.GetFileInformationByHandle
  • win32file.GetFileSize
  • win32file.GetFileTime
  • win32file.GetFileType
  • win32file.GetLogicalDrives
  • win32file.GetOverlappedResult
  • win32file.GetQueuedCompletionStatus
  • win32file.GetVolumeNameForVolumeMountPoint
  • win32file.LockFile
  • win32file.LockFileEx
  • win32file.MoveFile
  • win32file.MoveFileEx
  • win32file.MoveFileExW
  • win32file.MoveFileW
  • win32file.PostQueuedCompletionStatus
  • win32file.PurgeComm
  • win32file.ReadDirectoryChangesW
  • 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.SetFileTime
  • win32file.SetupComm
  • win32file.SetVolumeLabel
  • win32file.SetVolumeMountPoint
  • win32file.TransmitCommChar
  • win32file.UnlockFile
  • win32file.UnlockFileEx
  • win32file.WaitCommEvent
  • win32file.WriteFile
  • win32file.WSAEventSelect
  • win32file.WSAEventSelect
  • win32file.WSARecv
  • win32file.WSASend
  • win32gui.AppendMenu
  • win32gui.BringWindowToTop
  • win32gui.CallWindowProc
  • win32gui.CheckMenuItem
  • win32gui.ClientToScreen
  • win32gui.CloseWindow
  • win32gui.CommDlgExtendedError
  • win32gui.CreateCaret
  • win32gui.CreateDialogIndirect
  • win32gui.CreateMenu
  • win32gui.CreatePopupMenu
  • win32gui.CreateWindow
  • win32gui.CreateWindowEx
  • win32gui.DefWindowProc
  • win32gui.DeleteMenu
  • win32gui.DeleteObject
  • win32gui.DestroyCaret
  • win32gui.DestroyIcon
  • win32gui.DestroyMenu
  • win32gui.DestroyWindow
  • win32gui.DialogBox
  • win32gui.DialogBoxIndirect
  • win32gui.DialogBoxIndirectParam
  • win32gui.DialogBoxIndirectParam
  • win32gui.DialogBoxParam
  • win32gui.DrawMenuBar
  • win32gui.EnableMenuItem
  • win32gui.EnableWindow
  • win32gui.EndDialog
  • win32gui.EnumChildWindows
  • win32gui.EnumFontFamilies
  • win32gui.EnumThreadWindows
  • win32gui.EnumWindows
  • win32gui.ExtractIcon
  • win32gui.FindWindow
  • win32gui.FindWindowEx
  • win32gui.GetActiveWindow
  • win32gui.GetCapture
  • win32gui.GetClassName
  • win32gui.GetClientRect
  • win32gui.GetCursorPos
  • win32gui.GetDC
  • win32gui.GetDesktopWindow
  • win32gui.GetDlgItem
  • win32gui.GetForegroundWindow
  • win32gui.GetMenuItemCount
  • win32gui.GetMenuItemID
  • win32gui.GetMenuItemInfo
  • win32gui.GetMenuItemRect
  • win32gui.GetMenuState
  • win32gui.GetNextDlgGroupItem
  • win32gui.GetNextDlgTabItem
  • win32gui.GetObject
  • win32gui.GetOpenFileName
  • win32gui.GetParent
  • win32gui.GetScrollInfo
  • win32gui.GetStockObject
  • win32gui.GetSystemMenu
  • win32gui.GetWindow
  • win32gui.GetWindowDC
  • win32gui.GetWindowRect
  • win32gui.GetWindowText
  • win32gui.HideCaret
  • win32gui.ImageList_Add
  • win32gui.ImageList_Create
  • win32gui.ImageList_Destroy
  • win32gui.ImageList_Draw
  • win32gui.ImageList_GetIcon
  • win32gui.ImageList_GetImageCount
  • win32gui.ImageList_LoadBitmap
  • win32gui.ImageList_LoadImage
  • win32gui.ImageList_Remove
  • win32gui.ImageList_Replace
  • win32gui.ImageList_ReplaceIcon
  • win32gui.ImageList_SetBkColor
  • win32gui.InitCommonControls
  • win32gui.InsertMenu
  • win32gui.InsertMenuItem
  • win32gui.IsChild
  • win32gui.IsIconic
  • win32gui.IsWindow
  • win32gui.IsWindowVisible
  • win32gui.LoadCursor
  • win32gui.LoadIcon
  • win32gui.LoadImage
  • win32gui.LoadMenu
  • win32gui.LOGFONT
  • win32gui.MessageBeep
  • win32gui.MessageBox
  • win32gui.ModifyMenu
  • 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.RegisterWindowMessage
  • win32gui.ReleaseCapture
  • win32gui.ReleaseDC
  • win32gui.RemoveMenu
  • win32gui.ReplyMessage
  • 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.SetMenuDefaultItem
  • win32gui.SetMenuItemBitmaps
  • win32gui.SetMenuItemInfo
  • 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.LookupPerfIndexByName
  • win32pdh.LookupPerfNameByIndex
  • 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.SetNamedPipeHandleState
  • 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.ExitProcess
  • win32process.GetCurrentProcess
  • win32process.GetCurrentProcessId
  • win32process.GetExitCodeProcess
  • win32process.GetExitCodeThread
  • win32process.GetPriorityClass
  • win32process.GetProcessAffinityMask
  • win32process.GetProcessVersion
  • win32process.GetStartupInfo
  • win32process.GetThreadPriority
  • win32process.GetWindowThreadProcessId
  • 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.AdjustTokenGroups
  • win32security.AdjustTokenPrivileges
  • win32security.ConvertSecurityDescriptorToStringSecurityDescriptor
  • win32security.ConvertSidToStringSid
  • win32security.ConvertStringSecurityDescriptorToSecurityDescriptor
  • win32security.ConvertStringSidToSid
  • win32security.CryptEnumProviders
  • win32security.GetBinarySid
  • win32security.GetFileSecurity
  • win32security.GetKernelObjectSecurity
  • win32security.GetTokenInformation
  • win32security.GetUserObjectSecurity
  • win32security.ImpersonateLoggedOnUser
  • win32security.ImpersonateNamedPipeClient
  • win32security.LogonUser
  • win32security.LookupAccountName
  • win32security.LookupAccountSid
  • win32security.LookupPrivilegeDisplayName
  • win32security.LookupPrivilegeName
  • win32security.LookupPrivilegeValue
  • win32security.LsaAddAccountRights
  • win32security.LsaClose
  • win32security.LsaEnumerateAccountRights
  • win32security.LsaEnumerateAccountsWithUserRight
  • win32security.LsaOpenPolicy
  • win32security.LsaQueryInformationPolicy
  • win32security.LsaRegisterPolicyChangeNotification
  • win32security.LsaRemoveAccountRights
  • win32security.LsaRetrievePrivateData
  • win32security.LsaSetInformationPolicy
  • win32security.LsaStorePrivateData
  • win32security.LsaUnregisterPolicyChangeNotification
  • win32security.OpenProcessToken
  • win32security.OpenThreadToken
  • win32security.RevertToSelf
  • win32security.SECURITY_ATTRIBUTES
  • win32security.SECURITY_DESCRIPTOR
  • win32security.SetFileSecurity
  • win32security.SetKernelObjectSecurity
  • win32security.SetTokenInformation
  • 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
  • win32ui.AddToRecentFileList
  • win32ui.ComparePath
  • win32ui.CreateBitmap
  • win32ui.CreateBitmapFromHandle
  • win32ui.CreateBrush
  • win32ui.CreateButton
  • win32ui.CreateColorDialog
  • win32ui.CreateControl
  • win32ui.CreateControlBar
  • win32ui.CreateCtrlView
  • win32ui.CreateDC
  • win32ui.CreateDCFromHandle
  • win32ui.CreateDebuggerThread
  • win32ui.CreateDialog
  • win32ui.CreateDialogBar
  • win32ui.CreateDialogIndirect
  • win32ui.CreateDocTemplate
  • win32ui.CreateEdit
  • win32ui.CreateEditView
  • win32ui.CreateFileDialog
  • win32ui.CreateFont
  • win32ui.CreateFontDialog
  • win32ui.CreateFormView
  • win32ui.CreateFrame
  • win32ui.CreateImageList
  • win32ui.CreateListCtrl
  • win32ui.CreateListView
  • win32ui.CreateMDIChild
  • win32ui.CreateMDIFrame
  • win32ui.CreateMenu
  • win32ui.CreatePalette
  • win32ui.CreatePen
  • win32ui.CreatePopupMenu
  • win32ui.CreatePrintDialog
  • win32ui.CreateProgressCtrl
  • win32ui.CreatePropertyPage
  • win32ui.CreatePropertyPageIndirect
  • win32ui.CreatePropertySheet
  • win32ui.CreateRgn
  • win32ui.CreateRichEditCtrl
  • win32ui.CreateRichEditDocTemplate
  • win32ui.CreateRichEditView
  • win32ui.CreateSliderCtrl
  • win32ui.CreateSplitter
  • win32ui.CreateStatusBar
  • win32ui.CreateStatusBarCtrl
  • win32ui.CreateThread
  • win32ui.CreateToolBar
  • win32ui.CreateToolBarCtrl
  • win32ui.CreateToolTipCtrl
  • win32ui.CreateTreeCtrl
  • win32ui.CreateTreeView
  • win32ui.CreateView
  • win32ui.CreateWindowFromHandle
  • win32ui.CreateWnd
  • win32ui.DestroyDebuggerThread
  • win32ui.DoWaitCursor
  • win32ui.Enable3dControls
  • win32ui.EnableControlContainer
  • win32ui.FindWindow
  • win32ui.FindWindowEx
  • win32ui.FullPath
  • win32ui.GetActiveWindow
  • win32ui.GetApp
  • win32ui.GetAppName
  • win32ui.GetAppRegistryKey
  • win32ui.GetBytes
  • win32ui.GetCommandLine
  • win32ui.GetDeviceCaps
  • win32ui.GetFileTitle
  • win32ui.GetFocus
  • win32ui.GetForegroundWindow
  • win32ui.GetHalftoneBrush
  • win32ui.GetInitialStateRequest
  • win32ui.GetMainFrame
  • win32ui.GetName
  • win32ui.GetProfileFileName
  • win32ui.GetProfileVal
  • win32ui.GetRecentFileList
  • win32ui.GetRect
  • win32ui.GetResource
  • win32ui.GetThread
  • win32ui.GetType
  • win32ui.InitRichEdit
  • win32ui.InstallCallBackCaller
  • win32ui.IsDebug
  • win32ui.IsObject
  • win32ui.IsWin32s
  • win32ui.LoadDialogResource
  • win32ui.LoadLibrary
  • win32ui.LoadMenu
  • win32ui.LoadStdProfileSettings
  • win32ui.LoadString
  • win32ui.MessageBox
  • win32ui.OutputDebugString
  • win32ui.PrintTraceback
  • win32ui.PumpWaitingMessages
  • win32ui.RegisterWndClass
  • win32ui.RemoveRecentFile
  • win32ui.SetAppHelpPath
  • win32ui.SetAppName
  • win32ui.SetCurrentInstanceHandle
  • win32ui.SetCurrentResourceHandle
  • win32ui.SetDialogBkColor
  • win32ui.SetProfileFilename
  • win32ui.SetRegistryKey
  • win32ui.SetResource
  • win32ui.SetStatusText
  • win32ui.StartDebuggerPump
  • win32ui.StopDebuggerPump
  • win32ui.TranslateMessage
  • win32ui.TranslateVirtualKey
  • win32ui.WinHelp
  • win32ui.WriteProfileVal
  • win32uiole.CreateInsertDialog
  • win32uiole.CreateOleClientItem
  • win32uiole.CreateOleDocument
  • win32uiole.DaoGetEngine
  • win32uiole.GetIDispatchForWindow
  • win32uiole.OleGetUserCtrl
  • win32uiole.OleSetUserCtrl
  • 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
  • PyIDispatchEx::DeleteMemberByDispID
  • PyIDispatchEx::DeleteMemberByName
  • PyIDispatchEx::GetDispID
  • PyIDispatchEx::GetMemberName
  • PyIDispatchEx::GetMemberProperties
  • PyIDispatchEx::GetNextDispID
  • PyIDispatchEx::InvokeEx
  • PyIUnknown::__repr__
  • win32net::NetGetAnyDCName
  • win32net::NetGetDCName
  • win32ras::RasDialFunc1


Objects and Module Properties

Object and Module Properties

  • pythoncom.dcom
  • pythoncom.frozen


Objects

  • CHARFORMAT
  • COMMTIMEOUTS
  • connection
  • CREATESTRUCT
  • cursor
  • Dialog Header Tuple
  • Dialog Item Tuple
  • ELEMDESC
  • FUNCDESC
  • IDLDESC
  • LARGE_INTEGER
  • LV_COLUMN
  • LV_ITEM
  • MAPIINIT_0
  • NCB
  • NETRESOURCE
  • PARAFORMAT
  • PyACL
  • PyADS_ATTR_INFO
  • PyADS_OBJECT_INFO
  • PyAssocCObject
  • PyAssocObject
  • PyBitmap
  • PyCBrush
  • PyCButton
  • PyCCmdTarget
  • PyCCmdUI
  • PyCColorDialog
  • PyCComboBox
  • PyCCommonDialog
  • PyCControl
  • PyCControlBar
  • PyCCtrlView
  • PyCDC
  • PyCDialog
  • PyCDialogBar
  • PyCDockContext
  • PyCDocTemplate
  • PyCDocument
  • PyCEdit
  • PyCEditView
  • PyCEHANDLE
  • PyCFileDialog
  • PyCFont
  • PyCFontDialog
  • PyCFormView
  • PyCFrameWnd
  • PyCGdiObject
  • PyCImageList
  • PyCListBox
  • PyCListCtrl
  • PyCListView
  • PyCMDIChildWnd
  • PyCMDIFrameWnd
  • PyCMenu
  • PyCOleClientItem
  • PyCOleDialog
  • PyCOleDocument
  • PyCOleInsertDialog
  • PyCOMSTAT
  • PyCPrintDialog
  • PyCPrintInfo
  • PyCProgressCtrl
  • PyCPropertyPage
  • PyCPropertySheet
  • PyCRect
  • PyCRgn
  • PyCRichEditCtrl
  • PyCRichEditDoc
  • PyCRichEditDocTemplate
  • PyCRichEditView
  • PyCScrollView
  • PyCSliderCtrl
  • PyCSpinButtonCtrl
  • PyCSplitterWnd
  • PyCStatusBar
  • PyCStatusBarCtrl
  • PyCTabCtrl
  • PyCToolBar
  • PyCToolBarCtrl
  • PyCToolTipCtrl
  • PyCTreeCtrl
  • PyCTreeView
  • PyCView
  • PyCWinApp
  • PyCWinThread
  • PyCWnd
  • PyDCB
  • PyDDEConv
  • PyDDEServer
  • PyDDEStringItem
  • PyDDETopic
  • PyDLL
  • 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
  • PyIABContainer
  • PyIActiveScriptDebug
  • PyIActiveScriptError
  • PyIActiveScriptErrorDebug
  • PyIActiveScriptParseProcedure
  • PyIActiveScriptSite
  • PyIActiveScriptSiteDebug
  • PyIAddrBook
  • PyIApplicationDebugger
  • PyIAttach
  • PyIBindCtx
  • PyIBrowserFrameOptions
  • PyICatInformation
  • PyICatRegister
  • PyIClassFactory
  • PyIConnectionPoint
  • PyIConnectionPointContainer
  • PyIContextMenu
  • PyICopyHook
  • PyICreateTypeInfo
  • PyICreateTypeLib
  • PyIDataObject
  • PyIDebugApplication
  • PyIDebugApplicationNode
  • PyIDebugApplicationNodeEvents
  • PyIDebugApplicationThread
  • PyIDebugCodeContext
  • PyIDebugDocument
  • PyIDebugDocumentContext
  • PyIDebugDocumentHelper
  • PyIDebugDocumentHost
  • PyIDebugDocumentInfo
  • PyIDebugDocumentProvider
  • PyIDebugDocumentText
  • PyIDebugDocumentTextAuthor
  • PyIDebugDocumentTextEvents
  • PyIDebugDocumentTextExternalAuthor
  • PyIDebugExpression
  • PyIDebugExpressionCallBack
  • PyIDebugExpressionContext
  • PyIDebugProperty
  • PyIDebugSessionProvider
  • PyIDebugStackFrame
  • PyIDebugStackFrameSniffer
  • PyIDebugStackFrameSnifferEx
  • PyIDebugSyncOperation
  • PyIDispatch
  • PyIDispatchEx
  • PyIDistList
  • PyIDL
  • PyIEnumCATEGORYINFO
  • PyIEnumConnectionPoints
  • PyIEnumConnections
  • PyIEnumDebugApplicationNodes
  • PyIEnumDebugCodeContexts
  • PyIEnumDebugExpressionContexts
  • PyIEnumDebugPropertyInfo
  • PyIEnumDebugStackFrames
  • PyIEnumFORMATETC
  • PyIEnumGUID
  • PyIEnumIDList
  • PyIEnumMoniker
  • PyIEnumRemoteDebugApplications
  • PyIEnumRemoteDebugApplicationThreads
  • PyIEnumSTATPROPSETSTG
  • PyIEnumSTATPROPSTG
  • PyIEnumSTATSTG
  • PyIErrorLog
  • PyIExternalConnection
  • PyIExtractIcon
  • PyIID
  • PyIInternetBindInfo
  • PyIInternetPriority
  • PyIInternetProtocol
  • PyIInternetProtocolInfo
  • PyIInternetProtocolRoot
  • PyIInternetProtocolSink
  • PyILockBytes
  • PyIMachineDebugManager
  • PyIMachineDebugManagerEvents
  • PyIMailUser
  • PyIMAPIContainer
  • PyIMAPIFolder
  • PyIMAPIProp
  • PyIMAPISession
  • PyIMAPITable
  • PyIMessage
  • PyIMoniker
  • PyIMsgServiceAdmin
  • PyIMsgStore
  • PyIOleClientSite
  • PyIOleControl
  • PyIOleInPlaceObject
  • PyIOleInPlaceSite
  • PyIOleInPlaceSiteEx
  • PyIOleInPlaceSiteWindowless
  • PyIOleObject
  • PyIOleWindow
  • PyIPersist
  • PyIPersistFile
  • PyIPersistFolder
  • PyIPersistPropertyBag
  • PyIPersistStorage
  • PyIPersistStream
  • PyIPersistStreamInit
  • PyIProcessDebugManager
  • PyIProfAdmin
  • PyIProfSect
  • PyIPropertyBag
  • PyIPropertySetStorage
  • PyIPropertyStorage
  • PyIProvideClassInfo
  • PyIProvideClassInfo2
  • PyIProvideExpressionContexts
  • PyIRemoteDebugApplication
  • PyIRemoteDebugApplicationEvents
  • PyIRemoteDebugApplicationThread
  • PyIRunningObjectTable
  • PyIServiceProvider
  • PyIShellBrowser
  • PyIShellExtInit
  • PyIShellFolder
  • PyIShellLink
  • PyIShellView
  • PyISpecifyPropertyPages
  • PyIStorage
  • PyIStream
  • PyITypeComp
  • PyITypeInfo
  • PyITypeLib
  • PyIUnknown
  • PyIViewObject
  • PyIViewObject2
  • 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
  • PyMAPINAMEIDArray
  • PyNMHDR
  • PyOVERLAPPED
  • PyOVERLAPPEDReadBuffer
  • PyPERF_COUNTER_DEFINITION
  • PyPERF_OBJECT_TYPE
  • PyPerfMonManager
  • PyRecord
  • PySAndRestriction
  • PySBinaryArray
  • PySBitMaskRestriction
  • PySContentRestriction
  • 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
  • PySExistRestriction
  • PySHARE_INFO_*
  • PySHARE_INFO_0
  • PySHARE_INFO_1
  • PySHARE_INFO_2
  • PySHARE_INFO_501
  • PySHARE_INFO_502
  • PySID
  • PySNotRestriction
  • PySOrRestriction
  • PySPropertyRestriction
  • PySPropTagArray
  • PySPropValue
  • PySPropValueArray
  • PySRestriction
  • PySRow
  • PySRowSet
  • PySSortOrderItem
  • PySSortOrderSet
  • PySTARTUPINFO
  • PySTGMEDIUM
  • 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
  • SERVICE_STATUS
  • STATSTG
  • TLIBATTR
  • TV_ITEM
  • TYPEATTR
  • TYPEDESC
  • ULARGE_INTEGER
  • VARDESC


Overviews

  • ASP and Python
  • Keyboard Bindings
  • MTS and Python for NT
  • Python, C++, and COM
  • Recursive directory deletes and special files
  • Source code folding in the editor
  • Source Safe Integration
  • Tabs and indentation in the editor
  • win32com.shell and Windows Shell Links
  • Windows NT Eventlog
  • Windows NT Eventlog and Threading
  • Windows NT Files -- Locking
  • Windows NT Security -- Impersonation

    Win32 API

  • Directory permissions with GetNamedSecurityInfo
  • Getting process info (with some COM thrown it!)
  • Windows NT/2000 Networking with the win32net module

    Python COM

  • ADSI Python
  • Active Directory
  • Quick-Starts to Python and COM
  • win32com readme

    Pythonwin and win32ui

  • Pythonwin Debugger documentation
  • Pythonwin readme
  • The Pythonwin environment


PyAssocObject.GetMethodByType

GetMethodByType()

Given a method name and a type object, return the attribute.

Comments

This function allows you to obtain attributes for base types. For example, calling appObject.GetAttributeByType("Run", threadType) will return the built-in Run method for the CWinThread object rather than the CWinApp object.


PyCControlBar.CalcDynamicLayout

PyCControlBar.CalcDynamicLayout Virtual

CalcDynamicLayout()

Override to augment control-bar size calculations.

Comments

The base implementation is not called if a handler exists. This can be done via CPythonControlBar::CalcDynamicLayout .

See Also

CPythonControlBar::CalcDynamicLayout


PyCControlBar.CalcFixedLayout

PyCControlBar.CalcFixedLayout Virtual

CalcFixedLayout()

Override to augment control-bar size calculations.

Comments

The base implementation is not called if a handler exists. This can be done via CPythonControlBar::CalcFixedLayout .

See Also

CPythonControlBar::CalcFixedLayout


PyCControlBar.OnBarStyleChange

PyCControlBar.OnBarStyleChange Virtual

OnBarStyleChange()

Override to augment control-bar size calculations.

Comments

The base implementation is not called if a handler exists. This can be done via CPythonControlBar::OnBarStyleChange .


PyCControlBar.OnUpdateCmdUI

PyCControlBar.OnUpdateCmdUI Virtual

OnUpdateCmdUI(frame, bDisableIsNoHandler )

Parameters

frame : PyCFrameWnd

bDisableIsNoHandler : int


PyCDC.SelectPalette

int = SelectPalette(hPalette, forceBackground )

Sets the logical palette.

Parameters

hPalette : int

The handle to the palette

forceBackground : int

Specifies whether the logical palette is forced to be a background palette.

MFC References

CDC::SelectePalette

Return Value

The previous palette handle.


PyCDialog.OnCancel

PyCDialog.OnCancel Virtual

OnCancel()

Called by the MFC architecture when the user selects the Cancel button.

Comments

The procedure is expected to dismiss the window with the PyCDialog::EndDialog method. The base implementation (which dismisses the dialog) is not called if a handler exists. This can be done via PyCDialog::OnCancel.

See Also

PyCDialog::OnCancel


PyCDialog.OnInitDialog

PyCDialog.OnInitDialog Virtual

OnInitDialog()

Override to augment dialog-box initialization.

Comments

The base implementation is not called if a handler exists. This can be done via PyCDialog::OnInitDialog.

See Also

PyCDialog::OnInitDialog

Return Value

Specifies whether the application has set the input focus to one of the controls in the dialog box. If OnInitDialog returns nonzero, Windows sets the input focus to the first control in the dialog box. The application can return 0/None only if it has explicitly set the input focus to one of the controls in the dialog box.


PyCDialog.OnOK

PyCDialog.OnOK Virtual

OnOK()

Called by the MFC architecture when the user selects the OK button.

Comments

The procedure is expected to dismiss the window with the PyCDialog::EndDialog method. The base implementation (which dismisses the dialog) is not called if a handler exists. This can be done via PyCDialog::OnOK.

See Also

PyCDialog::OnOK


PyCDocTemplate.InitialUpdateFrame

PyCDocTemplate.InitialUpdateFrame Virtual

InitialUpdateFrame(frame, frame , bMakeVisible )

Called to perform the initial frame update. The default behaviour is to call OnInitialUpdate on all views.

Parameters

frame : PyCFrameWnd

The frame window.

frame : PyCDocument

The document attached to the frame.

bMakeVisible : int

Indicates if the frame should be made visible.


PyCDocTemplate.MatchDocType

PyCDocTemplate.MatchDocType Virtual

MatchDocType(fileName, fileType )

Queries if the template can open the specified file name.

Parameters

fileName : string

The name of the file to open.

fileType : int

Only used on the mac.

Comments

This method should call PyCDocTemplate.FindOpenDocument to return an already open document if one exists, else it should return one of the win32ui.CDocTemplate_Confidence_* constants.


PyCDocTemplate.OpenDocumentFile

PyCDocTemplate.OpenDocumentFile Virtual

OpenDocumentFile()

Called when a document file is to be opened.


PyCDocument.DeleteContents

PyCDocument.DeleteContents Virtual

DeleteContents()

Called by the MFC architecture when a document is newly created or closed.

Comments

If a handler is defined for this function, the base (MFC) function will not be called. If necessary, the handler must call this function explicitely.

See Also

PyCDocument::DeleteContents


PyCDocument.DoFileSave

PyCDocument.DoFileSave Virtual

DoFileSave()

Called by the MFC architecture.

Comments

If a handler is defined for this function, it must call the base class PyCDocument::DoFileSave method.

See Also

PyCDocument::DoFileSave

Return Value

TRUE if the document could be saved, else FALSE.


PyCDocument.DoSave

PyCDocument.DoSave Virtual

DoSave(fileName, bReplace )

Called by the MFC architecture to save a document.

Parameters

fileName : string

The name of the file being saved.

bReplace : int

TRUE if the file should be replaced.

Comments

If a handler is defined for this function, it must call the base class PyCDocument::DoSave method.

See Also

PyCDocument::DoSave

Return Value

TRUE if the document could be saved, else FALSE.


PyCDocument.OnChangedViewList

PyCDocument.OnChangedViewList Virtual

OnChangedViewList()

Called by the MFC architecture when after a view is attached.

Comments

If a handler is defined for this function, the base (MFC) function will not be called. If necessary, the handler must call this function explicitely.

See Also

PyCDocument::OnChangedViewList


PyCDocument.OnCloseDocument

PyCDocument.OnCloseDocument Virtual

OnCloseDocument()

Called by the MFC architecture.

Comments

If a handler is defined for this function, the base (MFC) function will not be called. If necessary, the handler must call this function explicitely.

See Also

PyCDocument::OnCloseDocument


PyCDocument.OnNewDocument

PyCDocument.OnNewDocument Virtual

OnNewDocument()

Called by the MFC architecture.

Comments

If a handler is defined for this function, the base (MFC) function will not be called. If necessary, the handler must call this function explicitely.

See Also

PyCDocument::OnNewDocument

Return Value

TRUE if a new document could be created, else FALSE.


PyCDocument.OnOpenDocument

PyCDocument.OnOpenDocument Virtual

OnOpenDocument(fileName)

Called by the MFC architecture.

Parameters

fileName : string

The name of the file being opened.

Comments

If a handler is defined for this function, the base (MFC) function will not be called. If necessary, the handler must call this function explicitely.

See Also

PyCDocument::OnOpenDocument

Return Value

TRUE if the document could be opened, else FALSE.


PyCDocument.OnSaveDocument

PyCDocument.OnSaveDocument Virtual

OnSaveDocument(fileName)

Called by the MFC architecture.

Parameters

fileName : string

The name of the file being saved.

Comments

If a handler is defined for this function, the base (MFC) function will not be called. If necessary, the handler must call this function explicitely.

See Also

PyCDocument::OnSaveDocument

Return Value

TRUE if the document could be saved, else FALSE.


PyCDocument.PreCloseFrame

PyCDocument.PreCloseFrame Virtual

PreCloseFrame()

Called before the frame window is closed.

Comments

The MFC base implementation is always called after the Python handler returns.


PyCDocument.SaveModified

PyCDocument.SaveModified Virtual

SaveModified()

Called by the MFC architecture when a document is closed.

Comments

If a handler is defined for this function, the base (MFC) function will not be called. If necessary, the handler must call this function explicitely.

See Also

PyCDocument::SaveModified

Return Value

The handler should return TRUE if it is safe to continue and close the document; 0 if the document should not be closed.


PyCFrameWnd.ShowOwnedWindows

string = ShowOwnedWindows(bShow)

Shows all windows that are descendants of the PyCFrameWnd object.

Parameters

bShow=1 : int

Flag


PyCMDIChildWnd.ActivateFrame

PyCMDIChildWnd.ActivateFrame Virtual

ActivateFrame(cmdShow)

Called to activate the frame window.

Parameters

cmdShow : int

The parameter to be passed to PyCWnd::ShowWindow

Comments

If a handler for this function exists, then the base MFC implementation will not be called. If you wish to use the default functionality, PyCMDIFrameWnd::ActivateFrame can be called.
If there is no handler, the base MFC implementation will be called.

See Also

PyCMDIChildWnd::ActivateFrame


PyCMDIChildWnd.GetMessageString

PyCMDIChildWnd.GetMessageString Virtual

GetMessageString(id)

Gets the message string to use for a control specific ID.

Parameters

id : int

The command ID to retrieve the string for.

See Also

PyCMDIChildWnd::GetMessageString


PyCMDIChildWnd.OnCreateClient

PyCMDIChildWnd.OnCreateClient Virtual

OnCreateClient(CREATESTRUCT, object )

Called by the framework during the execution of OnCreate.

Parameters

CREATESTRUCT : tuple

A tuple describing a CREATESTRUCT structure.

object : object

A Python object initially passed to LoadFrame

Return Value

The return value from this method is ignored, but an exception will prevent window creation.


PyCOleClientItem.OnActivate

PyCOleClientItem.OnActivate Virtual

OnActivate()


PyCOleClientItem.OnChange

PyCOleClientItem.OnChange Virtual

OnChange(wNotification, dwParam )

Parameters

wNotification : int

dwParam : int


PyCOleClientItem.OnChangeItemPosition

PyCOleClientItem.OnChangeItemPosition Virtual

OnChangeItemPosition((left, top, right, bottom))

Parameters

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

The new position


PyCOleClientItem.OnDeactivateUI

PyCOleClientItem.OnDeactivateUI Virtual

OnDeactivateUI(bUndoable)

Parameters

bUndoable : int


PyCOleClientItem.OnGetItemPosition

PyCOleClientItem.OnGetItemPosition Virtual

OnGetItemPosition()


PyCPropertyPage.OnApply

PyCPropertyPage.OnApply Virtual

OnApply()

Called by the framework when the user chooses the OK or the Apply Now button.

Comments

Note - If you provide a handler, you must call the underlying MFC method (PyCPropertyPage::OnApply) yourself

See Also

PyCPropertyPage::OnApply

Return Value

Return Nonzero if the changes are accepted; otherwise 0.


PyCPropertyPage.OnKillActive

PyCPropertyPage.OnKillActive Virtual

OnKillActive()

Called when the page loses focus.

Comments

Note - If you provide a handler, you must call the underlying MFC method (PyCPropertyPage::OnKillActive) yourself

See Also

PyCPropertyPage::OnKillActive

Return Value

The method should return TRUE if the page can be de-activated.


PyCPropertyPage.OnQueryCancel

PyCPropertyPage.OnQueryCancel Virtual

OnQueryCancel()

Called by the framework when the user clicks the Cancel button and before the cancel action has taken place.

Comments

Note - If you provide a handler, you must call the underlying MFC method (PyCPropertyPage::OnQueryCancel) yourself

See Also

PyCPropertyPage::OnQueryCancel

Return Value

Return FALSE to prevent the cancel operation or TRUE to allow it.


PyCPropertyPage.OnReset

PyCPropertyPage.OnReset Virtual

OnReset()

Called by the framework when the user chooses the Cancel button.

Comments

Note - If you provide a handler, you must call the underlying MFC method (PyCPropertyPage::OnReset) yourself

See Also

PyCPropertyPage::OnReset


PyCPropertyPage.OnSetActive

PyCPropertyPage.OnSetActive Virtual

OnSetActive()

Called when the page becomes active.

Comments

Note - If you provide a handler, you must call the underlying MFC method (PyCPropertyPage::OnSetActive) yourself

See Also

PyCPropertyPage::OnSetActive

Return Value

The method should return TRUE if the page can be activated.


PyCPropertyPage.OnWizardBack

PyCPropertyPage.OnWizardBack Virtual

OnWizardBack()

Called by the framework when the user clicks on the Back button in a wizard.

Comments

Note - If you provide a handler, you must call the underlying MFC method (PyCPropertyPage::OnWizardBack) yourself

See Also

PyCPropertyPage::OnWizardBack

Return Value

Return 0 to automatically advance to the next page; -1 to prevent the page from changing. To jump to a page other than the next one, return the identifier of the dialog to be displayed.


PyCPropertyPage.OnWizardFinish

PyCPropertyPage.OnWizardFinish Virtual

OnWizardFinish()

Called by the framework when the user clicks on the Finish button in a wizard.

Comments

Note - If you provide a handler, you must call the underlying MFC method (PyCPropertyPage::OnWizardFinish) yourself

See Also

PyCPropertyPage::OnWizardFinish

Return Value

Return nonzero if the property sheet is destroyed when the wizard finishes; otherwise zero.


PyCPropertyPage.OnWizardNext

PyCPropertyPage.OnWizardNext Virtual

OnWizardNext()

Called by the framework when the user clicks on the Next button in a wizard.

Comments

Note - If you provide a handler, you must call the underlying MFC method (PyCPropertyPage::OnWizardNext) yourself

See Also

PyCPropertyPage::OnWizardNext

Return Value

Return 0 to automatically advance to the next page; -1 to prevent the page from changing. To jump to a page other than the next one, return the identifier of the dialog to be displayed.


PyCPropertySheet.OnInitDialog

PyCPropertySheet.OnInitDialog Virtual

OnInitDialog()

Override to augment dialog-box initialization.

Comments

The base implementation is not called if a handler exists. This can be done via PyCDialog::OnInitDialog.

See Also

PyCDialog::OnInitDialog

Return Value

Specifies whether the application has set the input focus to one of the controls in the dialog box. If OnInitDialog returns nonzero, Windows sets the input focus to the first control in the dialog box. The application can return 0/None only if it has explicitly set the input focus to one of the controls in the dialog box.


PyCPropertySheet.OnInitDialog

PyCPropertySheet.OnInitDialog Virtual

OnInitDialog()

Override to augment dialog-box initialization.

Comments

The base implementation is not called if a handler exists. This can be done via PyCPropertySheet::OnInitDialog.

See Also

PyCPropertySheet::OnInitDialog

Return Value

Specifies whether the application has set the input focus to one of the controls in the dialog box. If OnInitDialog returns nonzero, Windows sets the input focus to the first control in the dialog box. The application can return 0/None only if it has explicitly set the input focus to one of the controls in the dialog box.


PyCPropertySheet.WindowProc

PyCPropertySheet.WindowProc Virtual

WindowProc()

Default message handler.


PyCRichEditCtrl.SetWordCharFormat

SetWordCharFormat(charFormat)

Sets the currently selected word's character formatting attributes.

Parameters

charFormat : tuple

A charformat tuple. See win32ui::CHARFORMAT tuple for details.

MFC References

CRichEditCtrl::SetWordCharFormat


PyCScrollView.OnPrepareDC

PyCScrollView.OnPrepareDC Virtual

OnPrepareDC(dc)

Called to prepare the device context for a view.

Parameters

dc : PyCDC

The DC object.

See Also

PyCView::OnPrepareDC


PyCSliderCtrl.SetRangeMax

int = SetRangeMax(nRangeMax, bRedraw )

Set the control's maximum

Parameters

nRangeMax=1 : int

New maximum of the Slider bar control.

bRedraw=1 : int

Should slider be redrawn?


PyCSliderCtrl.SetRangeMin

int = SetRangeMin(nRangeMin, bRedraw )

Set the control's minimum

Parameters

nRangeMin=1 : int

New minimum of the Slider bar control.

bRedraw=1 : int

Should slider be redrawn?


PyCStatusBarCtrl.SetSimple

SetSimple(bSimple)

Specify whether a status bar control displays simple text or displays all control parts set by a previous call to SetParts.

Parameters

bSimple : int

If non-zero, displays simple text.


PyCToolBar.GetToolTips

GetToolTips()

Returns the associated tooltips control


PyCToolBar.SetButtonText

SetButtonText(index, text)

Sets the text for a button.

Parameters

index : int

Index of the item whose style is to be set

text : string

The new text


PyCToolBar.SetToolTips

SetToolTips(obTTC)

Sets the tooltips control

Parameters

obTTC : PyCToolTipCtrl

The ToolTipCtrl ctrl to be set.


PyCToolBarCtrl.TBUTTON tuple

TBUTTON tuple(iBitmap, idCommand, fsState, fsStyle, userob, iString)

Describes a TBUTTON tuple, used by the PyCToolBarCtrl AddButtons method

Parameters

iBitmap : int

Zero-based index of button image

idCommand : int

Command to be sent when button pressed

fsState : int

Button state. Can be any of the TBSTATE values defined in win32con

fsStyle : int

Button style. Can be any of the TBSTYLE values defined in win32con

userob : object

Arbitrary Python object

iString : int

Zero-based index of button label string

Comments

Userob is any Python object at all, but no reference count is kept, so you must ensure the object remains referenced throughout.


PyCTreeCtrl.GetPrevVisibleItem

HTREEITEM = GetPrevVisibleItem(item)

Retrieves the previous visible item of the specified tree view item.

Parameters

item : HTREEITEM

The specified item


PyCView.OnActivateView

PyCView.OnActivateView Virtual

OnActivateView(bActivate, activateView , DeactivateView )

Called by the framework when a view is activated or deactivated.

Parameters

bActivate : int

Indicates whether the view is being activated or deactivated.

activateView : PyCWnd

The view object that is being activated.

DeactivateView : PyCWnd

The view object that is being deactivated.

Comments

If a handler exists, the base MFC implementation is not called.
The activateView and deactiveView parameters are the same objects if the application's main frame window is activated with no change in the active view for example, if the focus is being transferred from another application to this one, rather than from one view to another within the application. This allows a view to re-realize its palette, if needed.

See Also

PyCView::OnActivateView


PyCView.OnBeginPrinting

PyCView.OnBeginPrinting Virtual

OnBeginPrinting(dc, pInfo )

Called by the framework at the beginning of a print or print preview job, after OnPreparePrinting has been called.

Parameters

dc : PyCDC

The DC object.

pInfo : PyCPrintInfo

The print info object.

See Also

PyCView::OnBeginPrinting


PyCView.OnDraw

PyCView.OnDraw Virtual

OnDraw(dc)

Called when the view should be drawn.

Parameters

dc : PyCDC

The DC object.

See Also

PyCView::OnDraw


PyCView.OnEndPrinting

PyCView.OnEndPrinting Virtual

OnEndPrinting(dc, pInfo )

Called by the framework after a document has been printed or previewed.

Parameters

dc : PyCDC

The DC object.

pInfo : PyCPrintInfo

The print info object.

See Also

PyCView::OnEndPrinting


PyCView.OnFilePrintPreview

OnFilePrintPreview()

Calls the underlying MFC OnFilePrintPreview method.


PyCView.OnInitialUpdate

PyCView.OnInitialUpdate Virtual

OnInitialUpdate()

Called before the first update for a view.

Comments

The MFC base class is called only if no handler exists.

See Also

PyCView::OnInitialUpdate


PyCView.OnPrepareDC

OnPrepareDC()

Calls the underlying MFC OnPrepareDC method.

See Also

PyCView.OnPrepareDC virtual method


PyCView.OnPrepareDC

PyCView.OnPrepareDC Virtual

OnPrepareDC(dc, pInfo )

Called to prepare the device context for a view.

Parameters

dc : PyCDC

The DC object.

pInfo : PyCPrintInfo

The print info object.

See Also

PyCWnd::OnPrepareDC


PyCView.OnPreparePrinting

int = OnPreparePrinting()

Calls the underlying MFC OnPreparePrinting method.

See Also

PyCView.OnPreparePrinting virtual method


PyCView.OnPreparePrinting

PyCView.OnPreparePrinting Virtual

OnPreparePrinting(pInfo)

Called by the framework before a document is printed or previewed

Parameters

pInfo : PyCPrintInfo

The print info object.

See Also

PyCView::OnPreparePrinting


PyCView.OnPrint

PyCView.OnPrint Virtual

OnPrint(dc, pInfo )

Called when the view should be printed.

Parameters

dc : PyCDC

The DC object.

pInfo : PyPrintInfo

The PrintIfo object.

See Also

PyCView::OnPrint


PyCView.OnUpdate

PyCView.OnUpdate Virtual

OnUpdate(sender, lHint , hint )

Called by the framework when a view needs updating.

Parameters

sender : PyCView

lHint : int

hint : object

Comments

Typically you should not perform any drawing directly from OnUpdate. Instead, determine the rectangle describing, in device coordinates, the area that requires updating; pass this rectangle to PyCWnd::InvalidateRect. You can then paint the update next PyCView::OnDraw

See Also

PyCView::OnUpdate


PyCWnd.GetParentOwner

PyCWnd = GetParentOwner()

Returns the child window's parent window or owner window.

MFC References

CWnd::GetParentOwner

Return Value

The result is a PyCWnd object, or None if no Window can be found.


PyCWnd.IsWindowEnabled

int = IsWindowEnabled()

Determines if the window is currently enabled.


PyCWnd.OnClose

PyCWnd.OnClose Virtual

OnClose()

Called for the WM_CLOSE message.

Comments

The default calls DestroyWindow(). If you supply a handler, the default is not called.

The MFC base class is always called before the Python method.

See Also

PyCWnd::OnClose


PyCWnd.OnCommand

PyCWnd.OnCommand Virtual

OnCommand(wparam, lparam )

Allows a Window to override the OnCommand handling.

Parameters

wparam : int

lparam : int

Comments

The base class method must be called manually via PyCWnd::OnCommand . Failure to call the base implementation will prevent all Python command handlers (hooked via PyCWnd::HookCommand ).


PyCWnd.OnCreate

PyCWnd.OnCreate Virtual

OnCreate()

Called for the WM_CREATE message.

Comments

The MFC implementation is always called before Python.

Return Value

The result is an integer indicating if the window should be created.


PyCWnd.OnCtlColor

PyCWnd.OnCtlColor Virtual

OnCtlColor()

Called for the WM_CTLCOLOR message.

Comments

Setup dc to paint the control pWnd of type nCtlColor.

The default calls OnCtlColor(). If you supply a handler, the default is not called.

See Also

PyCWnd::OnCtlColor

Return Value

Handle of the brush to paint the control's background.


PyCWnd.OnEraseBkgnd

PyCWnd.OnEraseBkgnd Virtual

OnEraseBkgnd(dc)

Called for the WN_ERASEBACKGROUND message.

Parameters

dc : PyCDC

The device context.

See Also

PyCWnd::OnEraseBkgnd

Return Value

Nonzero if it erases the background; otherwise 0.


PyCWnd.OnMDIActivate

PyCWnd.OnMDIActivate Virtual

OnMDIActivate(bActivate, wndActivate , wndDeactivate )

Parameters

bActivate : int

wndActivate : PyCWnd

wndDeactivate : PyCWnd

Comments

The MFC implementation is always called before this.


PyCWnd.OnMouseActivate

PyCWnd.OnMouseActivate Virtual

OnMouseActivate(wndDesktop, hitTest , msg )

Called when the mouse is used to activate a window.

Parameters

wndDesktop : PyCWnd

hitTest : int

msg : int

See Also

PyCWnd::OnMouseActivate


PyCWnd.OnNcCalcSize

PyCWnd.OnNcCalcSize Virtual

OnNcCalcSize()

Called for the WM_NCCALCSIZE message.


PyCWnd.OnNcHitTest

PyCWnd.OnNcHitTest Virtual

OnNcHitTest(x,y)

Called for the WM_NCHITTEST message.

Parameters

x,y : int, int

The point to test.

See Also

PyCWnd::OnNcHitTest


PyCWnd.OnPaint

PyCWnd.OnPaint Virtual

OnPaint()

Default message handler.

See Also

Wnd::OnPaint


PyCWnd.OnPaletteChanged

PyCWnd.OnPaletteChanged Virtual

OnPaletteChanged(focusWnd)

Called to allow windows that use a color palette to realize their logical palettes and update their client areas.

Parameters

focusWnd : PyCWnd

The window that caused the system palette to change.


PyCWnd.OnPaletteIsChanging

PyCWnd.OnPaletteIsChanging Virtual

OnPaletteIsChanging(realizeWnd)

Informs other applications when an application is going to realize its logical palette.

Parameters

realizeWnd : PyCWnd

Specifies the window that is about to realize its logical palette.

Comments

The MFC base class is always called before the Python method.


PyCWnd.OnQueryDragIcon

PyCWnd.OnQueryDragIcon Virtual

OnQueryDragIcon()

Called for the WM_QUERYDRAGICON message.

See Also

PyCWnd::OnQueryDragIcon

Return Value

The result is an integer containing a HCURSOR for the icon.


PyCWnd.OnQueryNewPalette

PyCWnd.OnQueryNewPalette Virtual

OnQueryNewPalette()

Informs the window it is about to receive input focus, and shoudl realize its logical palette.

Comments

The base class method must be called manually via PyCScrollView::OnQueryNewPalette

See Also

PyCWnd::OnQueryNewPalette


PyCWnd.OnSetCursor

PyCWnd.OnSetCursor Virtual

OnSetCursor(wnd, hitTest , msg )

Called for the WM_SETCURSOR message.

Parameters

wnd : PyCWnd

hitTest : int

msg : int

See Also

PyCWnd::OnSetCursor


PyCWnd.OnSysColorChange

PyCWnd.OnSysColorChange Virtual

OnSysColorChange()

Called for all top-level windows when a change is made in the system color setting.

Comments

The MFC base class is always called before the Python method.


PyCWnd.OnWinIniChange

PyCWnd.OnWinIniChange Virtual

OnWinIniChange(section)

Called when the system configuration changes.

Parameters

section : string

The section which changed.

Comments

The MFC base class is always called before the Python method.


PyCWnd.PreCreateWindow

PyCWnd.PreCreateWindow Virtual

PreCreateWindow(CREATESTRUCT)

Called by the framework before the creation of the Windows window attached to this View object.

Parameters

CREATESTRUCT : tuple

A tuple describing a CREATESTRUCT structure.

See Also

PyCWnd::PreCreateWindow


PyCWnd.PreTranslateMessage

PyCWnd.PreTranslateMessage Virtual

PreTranslateMessage(msg)

Allows a Window to override the PreTranslateMessage handling.

Parameters

msg : tuple

Built from a MSG structure using format "iiiii(ii)"

Return Value

The result should be a tuple of the same format as the msg param, in which case the MSG structure will be updated and TRUE returned from the C++ function. If None is returned, the default handler is called.


PyCWnd.SCROLLINFO tuple

SCROLLINFO tuple(addnMask, min, max, page, pos, trackPos)

Describes a SCROLLINFO tuple

Parameters

addnMask : int

Additional mask information. Python automatically fills the mask for valid items, so currently the only valid values are zero, and win32con.SIF_DISABLENOSCROLL.

min : int

The minimum scrolling position. Both min and max, or neither, must be provided.

max : int

The maximum scrolling position. Both min and max, or neither, must be provided.

page : int

Specifies the page size. A scroll bar uses this value to determine the appropriate size of the proportional scroll box.

pos : int

Specifies the position of the scroll box.

trackPos : int

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.


PyIDebugApplicationThread.SetDescription

SetDescription()

Description of SetDescription.


PyIDebugApplicationThread.SetStateString

SetStateString()

Description of SetStateString.


PyIDebugStackFrame.GetDebugProperty

PyIDebugProperty = GetDebugProperty()

Returns the debug property.


PySECURITY_DESCRIPTOR.GetSecurityDescriptorGroup

PySID = GetSecurityDescriptorGroup()

Return the group owning the security descriptor. SID is returned.


PySECURITY_DESCRIPTOR.SetSecurityDescriptorDacl

SetSecurityDescriptorDacl(bDaclPresent, DACL, bDaclDefaulted)

Replaces DACL in a security descriptor.

Parameters

bDaclPresent : int

A flag indicating if the SE_DACL_PRESENT flag should be set.

DACL : PyACL

The DACL 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.


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.


Structures and Enums

Structures and enumerations


win32api.RegEnumKeyEx

PyTuple = RegEnumKeyEx(key)

Returns list of subkeys, info is (name, reserved, class, last write time) - class currently not defined, will always be None, reserved always 0

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.


win32com.shell and Windows Shell Links

Following is documentation for the PyIShellLink object.

Example

To create a PyIShellLink object

from win32com.shell import shell

import pythoncom

shortcut = pythoncom.CoCreateInstance(

    shell.CLSID_ShellLink, None,

    pythoncom.CLSCTX_INPROC_SERVER, shell.IID_IShellLink

)
To load information from existing shortcut file

shortcut.QueryInterface( pythoncom.IID_IPersistFile ).Load( filename )
To save information to a file

shortcut.QueryInterface( pythoncom.IID_IPersistFile ).Save( filename, 0 )
This documentation class is based on: http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/sdkdoc/shellcc/shell/ifaces/ishelllink/ishelllink.htm With only minor alterations and notations by Mike Fletcher. Errors may be present, read at your own risk. See also: http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/books/win95ui/chpt09-01.htm A tutorial-like introduction, includes brief discussion of non-file linking, and a fairly simple C sample application for file-based linking.

class PyIShellLink( IPersistFile ):

    ''' Following is not a functional class, intended solely for documentation '''

    def GetArguments(self):

        '''Retrieves the command-line arguments associated with a shell link object. '''

    def SetArguments(self, argumentString):

        '''Sets the command-line arguments associated with a shell link object.'''

    def GetDescription(self):

        '''Retrieves the description string for a shell link object. '''

    def SetDescription(self, descriptionString):

        '''Sets the description string for a shell link object. '''

    def GetIconLocation(self):

        '''Retrieves the location (path and index) of the icon for a shell link object.

        Returns a tuple of string and integer'''

    def SetIconLocation(self, locationString, iconIndex):

        '''Sets the location (path and index) of the icon for a shell link object. '''

    def GetPath(self, flags):

        '''Retrieves the path and file name of a shell link object.

        Note: flags are available through shell.SLGP_*

            SLGP_SHORTPATH  Retrieves the standard short (8.3 format) file name.

            SLGP_UNCPRIORITY  Retrieves the Universal Naming Convention (UNC) path name

            of the file.

            SLGP_RAWPATH  Retrieves the raw path name. A raw path is something that might

            not exist and may include environment variables that need to be expanded.'''

    def SetPath(self, pathString):

        '''Sets the path and file name of a shell link object. '''

    def SetRelativePath(self, pathString):

        '''Sets the relative path for a shell link object.

        Note: This mechanism allows for moved link files

        to reestablish connection with relative files through

        similar-prefix comparisons'''

    def GetShowCmd(self):

        '''Retrieves the show (SW_) command for a shell link object.'''

    def SetShowCmd(self, constant):

        '''Sets the show (SW_) command for a shell link object.

        Note: constants are defined in win32con, ie. win32con.SW_*

            SW_SHOWNORMAL Activates and displays a window. If the window is minimized or

            maximized, the system restores it to its original size and position. An

            application should specify this flag when displaying the window for the first

            time.

            SW_SHOWMAXIMIZED Activates the window and displays it as a maximized window.

            SW_SHOWMINIMIZED Activates the window and displays it as a minimized window.

        '''

    def GetWorkingDirectory(self):

        '''Retrieves the name of the working directory for a shell link object. '''

    def SetWorkingDirectory(self, pathString):

        '''Sets the name of the working directory for a shell link object.'''

    def Resolve(self, window, flags):

        '''Resolves a shell link by searching for the shell link object and updating the

        shell link path and its list of identifiers (if necessary).

        Notes:

            window is the parent window of a dialog which will pop up if resolution fails

        flags:

            SLR_INVOKE_MSI  Call the Microsoft Windows Installer.

            SLR_NOLINKINFO  Disable distributed link tracking. By default, distributed

                link tracking tracks removable media across multiple devices based on the

                volume name. It also uses the UNC path to track remote file systems whose

                drive letter has changed. Setting SLR_NOLINKINFO disables both types of tracking.

            SLR_NO_UI       Do not display a dialog box if the link cannot be resolved. When

                SLR_NO_UI is set, the high-order word of fFlags can be set to a time-out value

                that specifies the maximum amount of time to be spent resolving the link. The

                function returns if the link cannot be resolved within the time-out duration.

                If the high-order word is set to zero, the time-out duration will be set to the

                default value of 3,000 milliseconds (3 seconds). To specify a value, set the high

                word of fFlags to the desired time-out duration, in milliseconds.

            SLR_NOUPDATE    Do not update the link information.

            SLR_NOSEARCH    Do not execute the search heuristics.

            SLR_NOTRACK     Do not use distributed link tracking.

            SLR_UPDATE      If the link object has changed, update its path and list of identifiers. If SLR_UPDATE is set, you do not need to call IPersistFile::IsDirty to determine whether or not the link object has changed.

        '''

    ### Problematic elements

    # The problems below are due primarily to structs used in the API

    def GetIDList(self):

        '''Retrieves the list of item identifiers for a shell link object.

        Note: I do not see how to manipulate these identifiers, they are C structs,

        so I suppose we might be able to unpack them with the struct module.

        However, when I attempt this, I seem to get messed up identifiers

        (lengths of 0 for the individual identifiers) (see malfunctioning code below)'''

    def SetIDList(self, IDList):

        '''Sets the list of item identifiers for a shell link object.

        Note: See comments on GetIDList'''

    def SetHotkey(self, Hotkey):

        '''Sets the hot key for a shell link object.

        Note: New hot key. The virtual key code is in the low-order byte, and the modifier

        flags are in the high-order byte. The modifier flags can be a combination of the

        values specified in the description of the IShellLink::GetHotkey method.

        Note: I cannot find these constants anywhere...

            HOTKEYF_ALT, HOTKEYF_CONTROL, HOTKEYF_EXT, HOTKEYF_SHIFT

        '''

    def GetHotkey (self):

        '''Retrieves the hot key for a shell link object.

        Note: My tests do not seem to be working. at least, the values returned

        seem not to match what the documentation says should be returned.

        I would expect with a Hotkey of CTRL-ALT-T, to get an integer where

        integer & 256 == ord('T'), i.e. 116 or 84, instead I get 1620

        '''

import struct

def readIDList (data):

    ''' unpack data into list of identifiers

    The following is not functional!'''

    result = []

    headersize = struct.calcsize('H')

    while data:

        count = struct.unpack('H', data[:headersize])[0]

        if count:

            result.append( data[:count] )

            data = data[count:]

        else:

            raise ValueError, ('ID item of length zero defined', data )


EVENT_ALL_ACCESS

const win32event.EVENT_ALL_ACCESS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVENT.D

Specifies all possible access flags for the event object.


EVENT_MODIFY_STATE

const win32event.EVENT_MODIFY_STATE;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVENT.D


MAXIMUM_WAIT_OBJECTS

const win32event.MAXIMUM_WAIT_OBJECTS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVENT.D


QS_ALLEVENTS

const win32event.QS_ALLEVENTS;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVENT.D

Any message is in the queue.


QS_HOTKEY

const win32event.QS_HOTKEY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVENT.D

A WM_HOTKEY message is in the queue.


QS_INPUT

const win32event.QS_INPUT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVENT.D

An input message is in the queue.


QS_KEY

const win32event.QS_KEY;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVENT.D

A mouse-button message (WM_LBUTTONUP, WM_RBUTTONDOWN, and so on).


QS_MOUSEMOVE

const win32event.QS_MOUSEMOVE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVENT.D

A WM_MOUSEMOVE message is in the queue.


QS_PAINT

const win32event.QS_PAINT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVENT.D

A WM_PAINT message is in the queue.


QS_POSTMESSAGE

const win32event.QS_POSTMESSAGE;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVENT.D

A WM_TIMER message is in the queue.


SYNCHRONIZE

const win32event.SYNCHRONIZE;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVENT.D


WAIT_ABANDONED_0

const win32event.WAIT_ABANDONED_0;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVENT.D


WAIT_FAILED

const win32event.WAIT_FAILED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVENT.D


WAIT_IO_COMPLETION

const win32event.WAIT_IO_COMPLETION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVENT.D


WAIT_OBJECT_0

const win32event.WAIT_OBJECT_0;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVENT.D


WAIT_TIMEOUT

const win32event.WAIT_TIMEOUT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVENT.D


EVENTLOG_AUDIT_FAILURE

const win32evtlog.EVENTLOG_AUDIT_FAILURE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_AUDIT_SUCCESS

const win32evtlog.EVENTLOG_AUDIT_SUCCESS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_BACKWARDS_READ

const win32evtlog.EVENTLOG_BACKWARDS_READ;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_END_ALL_PAIRED_EVENTS

const win32evtlog.EVENTLOG_END_ALL_PAIRED_EVENTS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_END_PAIRED_EVENT

const win32evtlog.EVENTLOG_END_PAIRED_EVENT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_ERROR_TYPE

const win32evtlog.EVENTLOG_ERROR_TYPE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_FORWARDS_READ

const win32evtlog.EVENTLOG_FORWARDS_READ;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_INFORMATION_TYPE

const win32evtlog.EVENTLOG_INFORMATION_TYPE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_PAIRED_EVENT_ACTIVE

const win32evtlog.EVENTLOG_PAIRED_EVENT_ACTIVE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_PAIRED_EVENT_INACTIVE

const win32evtlog.EVENTLOG_PAIRED_EVENT_INACTIVE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_SEEK_READ

const win32evtlog.EVENTLOG_SEEK_READ;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_SEQUENTIAL_READ

const win32evtlog.EVENTLOG_SEQUENTIAL_READ;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_START_PAIRED_EVENT

const win32evtlog.EVENTLOG_START_PAIRED_EVENT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_SUCCESS

const win32evtlog.EVENTLOG_SUCCESS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32EVTLOG.D


EVENTLOG_WARNING_TYPE

const win32evtlog.EVENTLOG_WARNING_TYPE;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


CBR_300

const win32file.CBR_300;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


CBR_600

const win32file.CBR_600;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


CBR_1200

const win32file.CBR_1200;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


CBR_2400

const win32file.CBR_2400;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


CBR_4800

const win32file.CBR_4800;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


CBR_9600

const win32file.CBR_9600;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


CBR_14400

const win32file.CBR_14400;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


CBR_19200

const win32file.CBR_19200;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


CBR_38400

const win32file.CBR_38400;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


CBR_56000

const win32file.CBR_56000;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


CBR_57600

const win32file.CBR_57600;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


CBR_115200

const win32file.CBR_115200;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


CBR_128000

const win32file.CBR_128000;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


CBR_256000

const win32file.CBR_256000;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


CLRBREAK

const win32file.CLRBREAK;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

Clears the DTR (data-terminal-ready) signal.


CLRRTS

const win32file.CLRRTS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

Clears the RTS (request-to-send) signal.


CREATE_ALWAYS

const win32file.CREATE_ALWAYS;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

The drive is a CD-ROM drive.


DRIVE_FIXED

const win32file.DRIVE_FIXED;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

The root directory does not exist.


DRIVE_RAMDISK

const win32file.DRIVE_RAMDISK;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

The drive is a RAM disk.


DRIVE_REMOTE

const win32file.DRIVE_REMOTE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

The drive is a remote (network) drive.


DRIVE_REMOVABLE

const win32file.DRIVE_REMOVABLE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

The disk can be removed from the drive.


DRIVE_UNKNOWN

const win32file.DRIVE_UNKNOWN;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

The drive type cannot be determined.


DTR_CONTROL_DISABLE

const win32file.DTR_CONTROL_DISABLE;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

A break was detected on input.


EV_CTS

const win32file.EV_CTS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

The CTS (clear-to-send) signal changed state.


EV_DSR

const win32file.EV_DSR;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

The DSR (data-set-ready) signal changed state.


EV_ERR

const win32file.EV_ERR;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

A ring indicator was detected.


EV_RLSD

const win32file.EV_RLSD;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

The RLSD (receive-line-signal-detect) signal changed state.


EV_RXCHAR

const win32file.EV_RXCHAR;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

A character was received and placed in the input buffer.


EV_RXFLAG

const win32file.EV_RXFLAG;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

The last character in the output buffer was sent.


EVENPARITY

const win32file.EVENPARITY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


FD_ACCEPT

const win32file.FD_ACCEPT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


FD_ADDRESS_LIST_CHANGE

const win32file.FD_ADDRESS_LIST_CHANGE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


FD_CLOSE

const win32file.FD_CLOSE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


FD_CONNECT

const win32file.FD_CONNECT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


FD_GROUP_QOS

const win32file.FD_GROUP_QOS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


FD_OOB

const win32file.FD_OOB;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


FD_QOS

const win32file.FD_QOS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


FD_READ

const win32file.FD_READ;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


FD_ROUTING_INTERFACE_CHANGE

const win32file.FD_ROUTING_INTERFACE_CHANGE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


FD_WRITE

const win32file.FD_WRITE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


FILE_ALL_ACCESS

const win32file.FILE_ALL_ACCESS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


FILE_ATTRIBUTE_ARCHIVE

const win32file.FILE_ATTRIBUTE_ARCHIVE;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


FILE_CURRENT

const win32file.FILE_CURRENT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


FILE_END

const win32file.FILE_END;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


FILE_FLAG_BACKUP_SEMANTICS

const win32file.FILE_FLAG_BACKUP_SEMANTICS;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


FILE_GENERIC_WRITE

const win32file.FILE_GENERIC_WRITE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


FILE_SHARE_DELETE

const win32file.FILE_SHARE_DELETE;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

The specified file is a disk file.


FILE_TYPE_PIPE

const win32file.FILE_TYPE_PIPE;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

The type of the specified file is unknown.


GENERIC_EXECUTE

const win32file.GENERIC_EXECUTE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

Specifies execute access.


GENERIC_READ

const win32file.GENERIC_READ;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


MARKPARITY

const win32file.MARKPARITY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


MOVEFILE_COPY_ALLOWED

const win32file.MOVEFILE_COPY_ALLOWED;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


ODDPARITY

const win32file.ODDPARITY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


ONE5STOPBITS

const win32file.ONE5STOPBITS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


ONESTOPBIT

const win32file.ONESTOPBIT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


OPEN_ALWAYS

const win32file.OPEN_ALWAYS;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

Clears the input buffer (if the device driver has one).


PURGE_TXABORT

const win32file.PURGE_TXABORT;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

A Win32-based application


SCS_DOS_BINARY

const win32file.SCS_DOS_BINARY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

An MS-DOS - based application


SCS_OS216_BINARY

const win32file.SCS_OS216_BINARY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

A 16-bit OS/2-based application


SCS_PIF_BINARY

const win32file.SCS_PIF_BINARY;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

A POSIX - based application


SCS_WOW_BINARY

const win32file.SCS_WOW_BINARY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

A 16-bit Windows-based application


SECURITY_ANONYMOUS

const win32file.SECURITY_ANONYMOUS;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

Specifies that only the enabled aspects


SECURITY_IDENTIFICATION

const win32file.SECURITY_IDENTIFICATION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

Specifies to impersonate the client at the Identification impersonation level.


SECURITY_IMPERSONATION

const win32file.SECURITY_IMPERSONATION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

Specifies to impersonate the client at the Impersonation impersonation level.


SETBREAK

const win32file.SETBREAK;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

Sends the DTR (data-terminal-ready) signal.


SETRTS

const win32file.SETRTS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

Sends the RTS (request-to-send) signal.


SETXOFF

const win32file.SETXOFF;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D

Causes transmission to act as if an XOFF character has been received.


SETXON

const win32file.SETXON;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


SO_UPDATE_ACCEPT_CONTEXT

const win32file.SO_UPDATE_ACCEPT_CONTEXT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


SPACEPARITY

const win32file.SPACEPARITY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


TRUNCATE_EXISTING

const win32file.TRUNCATE_EXISTING;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


WSA_IO_PENDING

const win32file.WSA_IO_PENDING;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


WSA_OPERATION_ABORTED

const win32file.WSA_OPERATION_ABORTED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


WSAECONNABORTED

const win32file.WSAECONNABORTED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


WSAECONNRESET

const win32file.WSAECONNRESET;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


WSAEDISCON

const win32file.WSAEDISCON;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


WSAEFAULT

const win32file.WSAEFAULT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


WSAEINPROGRESS

const win32file.WSAEINPROGRESS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


WSAEINTR

const win32file.WSAEINTR;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


WSAEINVAL

const win32file.WSAEINVAL;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


WSAEMSGSIZE

const win32file.WSAEMSGSIZE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


WSAENETDOWN

const win32file.WSAENETDOWN;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


WSAENETRESET

const win32file.WSAENETRESET;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


WSAENOTCONN

const win32file.WSAENOTCONN;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


WSAENOTSOCK

const win32file.WSAENOTSOCK;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


WSAEOPNOTSUPP

const win32file.WSAEOPNOTSUPP;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


WSAESHUTDOWN

const win32file.WSAESHUTDOWN;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


WSAEWOULDBLOCK

const win32file.WSAEWOULDBLOCK;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32FILE.D


CLR_NONE

const win32gui.CLR_NONE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


ILC_COLOR

const win32gui.ILC_COLOR;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


ILC_COLOR4

const win32gui.ILC_COLOR4;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


ILC_COLOR8

const win32gui.ILC_COLOR8;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


ILC_COLOR16

const win32gui.ILC_COLOR16;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


ILC_COLOR24

const win32gui.ILC_COLOR24;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


ILC_COLOR32

const win32gui.ILC_COLOR32;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


ILC_COLORDDB

const win32gui.ILC_COLORDDB;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


ILC_MASK

const win32gui.ILC_MASK;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


ILD_BLEND

const win32gui.ILD_BLEND;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


ILD_BLEND25

const win32gui.ILD_BLEND25;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


ILD_BLEND50

const win32gui.ILD_BLEND50;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


ILD_FOCUS

const win32gui.ILD_FOCUS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


ILD_MASK

const win32gui.ILD_MASK;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


ILD_NORMAL

const win32gui.ILD_NORMAL;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


ILD_SELECTED

const win32gui.ILD_SELECTED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


ILD_TRANSPARENT

const win32gui.ILD_TRANSPARENT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


IMAGE_BITMAP

const win32gui.IMAGE_BITMAP;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


IMAGE_CURSOR

const win32gui.IMAGE_CURSOR;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


IMAGE_ICON

const win32gui.IMAGE_ICON;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


LR_CREATEDIBSECTION

const win32gui.LR_CREATEDIBSECTION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


LR_DEFAULTCOLOR

const win32gui.LR_DEFAULTCOLOR;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


LR_DEFAULTSIZE

const win32gui.LR_DEFAULTSIZE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


LR_LOADFROMFILE

const win32gui.LR_LOADFROMFILE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


LR_LOADMAP3DCOLORS

const win32gui.LR_LOADMAP3DCOLORS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


LR_LOADTRANSPARENT

const win32gui.LR_LOADTRANSPARENT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


LR_MONOCHROME

const win32gui.LR_MONOCHROME;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


LR_SHARED

const win32gui.LR_SHARED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


LR_VGACOLOR

const win32gui.LR_VGACOLOR;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


NIF_ICON

const win32gui.NIF_ICON;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


NIF_MESSAGE

const win32gui.NIF_MESSAGE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


NIF_TIP

const win32gui.NIF_TIP;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


NIM_ADD

const win32gui.NIM_ADD;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D

Adds an icon to the status area.


NIM_DELETE

const win32gui.NIM_DELETE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D

Deletes an icon from the status area.


NIM_MODIFY

const win32gui.NIM_MODIFY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D

Modifies an icon in the status area.


NIM_SETFOCUS

const win32gui.NIM_SETFOCUS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D

Give the icon focus.


TPM_BOTTOMALIGN

const win32gui.TPM_BOTTOMALIGN;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


TPM_CENTERALIGN

const win32gui.TPM_CENTERALIGN;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


TPM_LEFTALIGN

const win32gui.TPM_LEFTALIGN;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


TPM_LEFTBUTTON

const win32gui.TPM_LEFTBUTTON;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


TPM_NONOTIFY

const win32gui.TPM_NONOTIFY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


TPM_RETURNCMD

const win32gui.TPM_RETURNCMD;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


TPM_RIGHTALIGN

const win32gui.TPM_RIGHTALIGN;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


TPM_RIGHTBUTTON

const win32gui.TPM_RIGHTBUTTON;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


TPM_TOPALIGN

const win32gui.TPM_TOPALIGN;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


TPM_VCENTERALIGN

const win32gui.TPM_VCENTERALIGN;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32GUI.D


debug

const win32help.debug;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

ALink version of HH_KEYWORD_LOOKUP


HH_CLOSE_ALL

const win32help.HH_CLOSE_ALL;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

close all windows opened directly or indirectly by the caller


HH_DISPLAY_INDEX

const win32help.HH_DISPLAY_INDEX;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

not currently implemented


HH_DISPLAY_SEARCH

const win32help.HH_DISPLAY_SEARCH;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

not currently implemented


HH_DISPLAY_TEXT_POPUP

const win32help.HH_DISPLAY_TEXT_POPUP;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

display string resource id or text in a popup window


HH_DISPLAY_TOC

const win32help.HH_DISPLAY_TOC;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

not currently implemented


HH_DISPLAY_TOPIC

const win32help.HH_DISPLAY_TOPIC;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HH_ENUM_CATEGORY

const win32help.HH_ENUM_CATEGORY;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HH_GET_LAST_ERROR

const win32help.HH_GET_LAST_ERROR;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

not currently implemented See HHERROR.h


HH_GET_WIN_HANDLE

const win32help.HH_GET_WIN_HANDLE;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HH_GET_WIN_TYPE

const win32help.HH_GET_WIN_TYPE;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HH_GPROPID_CONTENT_LANGUAGE

const win32help.HH_GPROPID_CONTENT_LANGUAGE;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

long: LandId for desired content.


HH_GPROPID_CURRENT_SUBSET

const win32help.HH_GPROPID_CURRENT_SUBSET;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

BSTR: Current subset.


HH_GPROPID_SINGLETHREAD

const win32help.HH_GPROPID_SINGLETHREAD;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

VARIANT_BOOL: True for single thread


HH_GPROPID_TOOLBAR_MARGIN

const win32help.HH_GPROPID_TOOLBAR_MARGIN;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

long: LangId of the UI.


HH_HELP_CONTEXT

const win32help.HH_HELP_CONTEXT;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

display mapped numeric value in dwData


HH_HELP_FINDER

const win32help.HH_HELP_FINDER;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

WinHelp equivalent


HH_INITIALIZE

const win32help.HH_INITIALIZE;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Initializes the help system.


HH_KEYWORD_LOOKUP

const win32help.HH_KEYWORD_LOOKUP;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HH_MAX_TABS_CUSTOM

const win32help.HH_MAX_TABS_CUSTOM;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HH_PRETRANSLATEMESSAGE

const win32help.HH_PRETRANSLATEMESSAGE;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Pumps messages. (NULL, NULL, MSG*).


HH_RESERVED1

const win32help.HH_RESERVED1;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HH_RESERVED2

const win32help.HH_RESERVED2;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HH_RESERVED3

const win32help.HH_RESERVED3;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HH_RESET_IT_FILTER

const win32help.HH_RESET_IT_FILTER;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Set a global property. (NULL, NULL, HH_GPROP).


HH_SET_INCLUSIVE_FILTER

const win32help.HH_SET_INCLUSIVE_FILTER;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Add Info type to filter.


HH_SET_WIN_TYPE

const win32help.HH_SET_WIN_TYPE;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HH_SYNC

const win32help.HH_SYNC;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HH_TAB_AUTHOR

const win32help.HH_TAB_AUTHOR;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HH_TAB_CONTENTS

const win32help.HH_TAB_CONTENTS;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HH_TAB_CUSTOM_FIRST

const win32help.HH_TAB_CUSTOM_FIRST;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HH_TAB_CUSTOM_LAST

const win32help.HH_TAB_CUSTOM_LAST;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HH_TAB_FAVORITES

const win32help.HH_TAB_FAVORITES;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HH_TAB_HISTORY

const win32help.HH_TAB_HISTORY;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HH_TAB_INDEX

const win32help.HH_TAB_INDEX;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HH_TAB_SEARCH

const win32help.HH_TAB_SEARCH;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HH_TP_HELP_CONTEXTMENU

const win32help.HH_TP_HELP_CONTEXTMENU;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

text popup help, same as WinHelp HELP_WM_HELP


HH_UNINITIALIZE

const win32help.HH_UNINITIALIZE;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Uninitializes the help system.


HHACT_BACK

const win32help.HHACT_BACK;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_CONTRACT

const win32help.HHACT_CONTRACT;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_CUSTOMIZE

const win32help.HHACT_CUSTOMIZE;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_EXPAND

const win32help.HHACT_EXPAND;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_FORWARD

const win32help.HHACT_FORWARD;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_HIGHLIGHT

const win32help.HHACT_HIGHLIGHT;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_HOME

const win32help.HHACT_HOME;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_JUMP1

const win32help.HHACT_JUMP1;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_JUMP2

const win32help.HHACT_JUMP2;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_LAST_ENUM

const win32help.HHACT_LAST_ENUM;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_NOTES

const win32help.HHACT_NOTES;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_OPTIONS

const win32help.HHACT_OPTIONS;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_PRINT

const win32help.HHACT_PRINT;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_REFRESH

const win32help.HHACT_REFRESH;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_STOP

const win32help.HHACT_STOP;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_SYNC

const win32help.HHACT_SYNC;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_TAB_CONTENTS

const win32help.HHACT_TAB_CONTENTS;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_TAB_FAVORITES

const win32help.HHACT_TAB_FAVORITES;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_TAB_HISTORY

const win32help.HHACT_TAB_HISTORY;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_TAB_INDEX

const win32help.HHACT_TAB_INDEX;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_TAB_SEARCH

const win32help.HHACT_TAB_SEARCH;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_TOC_NEXT

const win32help.HHACT_TOC_NEXT;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_TOC_PREV

const win32help.HHACT_TOC_PREV;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHACT_ZOOM

const win32help.HHACT_ZOOM;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHN_FIRST

const win32help.HHN_FIRST;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHN_LAST

const win32help.HHN_LAST;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHN_NAVCOMPLETE

const win32help.HHN_NAVCOMPLETE;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHN_TRACK

const win32help.HHN_TRACK;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHN_WINDOW_CREATE

const win32help.HHN_WINDOW_CREATE;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_BUTTON_BACK

const win32help.HHWIN_BUTTON_BACK;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Back button


HHWIN_BUTTON_BROWSE_BCK

const win32help.HHWIN_BUTTON_BROWSE_BCK;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


HHWIN_BUTTON_BROWSE_FWD

const win32help.HHWIN_BUTTON_BROWSE_FWD;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


HHWIN_BUTTON_CONTENTS

const win32help.HHWIN_BUTTON_CONTENTS;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


HHWIN_BUTTON_EXPAND

const win32help.HHWIN_BUTTON_EXPAND;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Expand/contract button


HHWIN_BUTTON_FAVORITES

const win32help.HHWIN_BUTTON_FAVORITES;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


HHWIN_BUTTON_FORWARD

const win32help.HHWIN_BUTTON_FORWARD;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Forward button


HHWIN_BUTTON_HISTORY

const win32help.HHWIN_BUTTON_HISTORY;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


HHWIN_BUTTON_HOME

const win32help.HHWIN_BUTTON_HOME;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Home button


HHWIN_BUTTON_INDEX

const win32help.HHWIN_BUTTON_INDEX;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


HHWIN_BUTTON_JUMP1

const win32help.HHWIN_BUTTON_JUMP1;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_BUTTON_JUMP2

const win32help.HHWIN_BUTTON_JUMP2;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_BUTTON_NOTES

const win32help.HHWIN_BUTTON_NOTES;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


HHWIN_BUTTON_OPTIONS

const win32help.HHWIN_BUTTON_OPTIONS;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Options button


HHWIN_BUTTON_PRINT

const win32help.HHWIN_BUTTON_PRINT;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Print button


HHWIN_BUTTON_REFRESH

const win32help.HHWIN_BUTTON_REFRESH;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Refresh button


HHWIN_BUTTON_SEARCH

const win32help.HHWIN_BUTTON_SEARCH;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


HHWIN_BUTTON_STOP

const win32help.HHWIN_BUTTON_STOP;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Stop button


HHWIN_BUTTON_SYNC

const win32help.HHWIN_BUTTON_SYNC;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Sync button


HHWIN_BUTTON_TOC_NEXT

const win32help.HHWIN_BUTTON_TOC_NEXT;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_BUTTON_TOC_PREV

const win32help.HHWIN_BUTTON_TOC_PREV;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_BUTTON_ZOOM

const win32help.HHWIN_BUTTON_ZOOM;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_DEF_BUTTONS

const win32help.HHWIN_DEF_BUTTONS;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_NAVTAB_BOTTOM

const win32help.HHWIN_NAVTAB_BOTTOM;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_NAVTAB_LEFT

const win32help.HHWIN_NAVTAB_LEFT;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_NAVTAB_TOP

const win32help.HHWIN_NAVTAB_TOP;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


HHWIN_PARAM_CUR_TAB

const win32help.HHWIN_PARAM_CUR_TAB;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

valid curNavType


HHWIN_PARAM_EXPANSION

const win32help.HHWIN_PARAM_EXPANSION;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

valid notExpanded


HHWIN_PARAM_EXSTYLES

const win32help.HHWIN_PARAM_EXSTYLES;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

valid exStyles


HHWIN_PARAM_HISTORY_COUNT

const win32help.HHWIN_PARAM_HISTORY_COUNT;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

valid cHistory


HHWIN_PARAM_INFOTYPES

const win32help.HHWIN_PARAM_INFOTYPES;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

valid apInfoTypes


HHWIN_PARAM_NAV_WIDTH

const win32help.HHWIN_PARAM_NAV_WIDTH;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

valid navWidth


HHWIN_PARAM_PROPERTIES

const win32help.HHWIN_PARAM_PROPERTIES;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

valid winProperties


HHWIN_PARAM_RECT

const win32help.HHWIN_PARAM_RECT;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

valid windowPos


HHWIN_PARAM_SHOWSTATE

const win32help.HHWIN_PARAM_SHOWSTATE;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

valid showState


HHWIN_PARAM_STYLES

const win32help.HHWIN_PARAM_STYLES;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

valid styles


HHWIN_PARAM_TABORDER

const win32help.HHWIN_PARAM_TABORDER;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

valid taborder


HHWIN_PARAM_TABPOS

const win32help.HHWIN_PARAM_TABPOS;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

valid tabpos


HHWIN_PARAM_TB_FLAGS

const win32help.HHWIN_PARAM_TB_FLAGS;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

valid toolBarFlags


HHWIN_PROP_AUTO_SYNC

const win32help.HHWIN_PROP_AUTO_SYNC;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

automatically ssync contents and index


HHWIN_PROP_CHANGE_TITLE

const win32help.HHWIN_PROP_CHANGE_TITLE;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Put current HTML title in title bar


HHWIN_PROP_MENU

const win32help.HHWIN_PROP_MENU;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Menu


HHWIN_PROP_NAV_ONLY_WIN

const win32help.HHWIN_PROP_NAV_ONLY_WIN;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Only display the navigation window


HHWIN_PROP_NO_TOOLBAR

const win32help.HHWIN_PROP_NO_TOOLBAR;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Don't display a toolbar


HHWIN_PROP_NODEF_EXSTYLES

const win32help.HHWIN_PROP_NODEF_EXSTYLES;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

no default window styles (only HH_WINTYPE.styles)


HHWIN_PROP_NOTB_TEXT

const win32help.HHWIN_PROP_NOTB_TEXT;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

no text on toolbar buttons


HHWIN_PROP_NOTITLEBAR

const win32help.HHWIN_PROP_NOTITLEBAR;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

no title bar


HHWIN_PROP_ONTOP

const win32help.HHWIN_PROP_ONTOP;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Top-most window


HHWIN_PROP_POST_QUIT

const win32help.HHWIN_PROP_POST_QUIT;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

post WM_QUIT message when window closes


HHWIN_PROP_TAB_ADVSEARCH

const win32help.HHWIN_PROP_TAB_ADVSEARCH;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Advanced FTS UI.


HHWIN_PROP_TAB_AUTOHIDESHOW

const win32help.HHWIN_PROP_TAB_AUTOHIDESHOW;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Automatically hide/show tri-pane window


HHWIN_PROP_TAB_CUSTOM1

const win32help.HHWIN_PROP_TAB_CUSTOM1;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Use custom tab #1


HHWIN_PROP_TAB_CUSTOM2

const win32help.HHWIN_PROP_TAB_CUSTOM2;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Use custom tab #2


HHWIN_PROP_TAB_CUSTOM3

const win32help.HHWIN_PROP_TAB_CUSTOM3;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Use custom tab #3


HHWIN_PROP_TAB_CUSTOM4

const win32help.HHWIN_PROP_TAB_CUSTOM4;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Use custom tab #4


HHWIN_PROP_TAB_CUSTOM5

const win32help.HHWIN_PROP_TAB_CUSTOM5;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Use custom tab #5


HHWIN_PROP_TAB_CUSTOM6

const win32help.HHWIN_PROP_TAB_CUSTOM6;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Use custom tab #6


HHWIN_PROP_TAB_CUSTOM7

const win32help.HHWIN_PROP_TAB_CUSTOM7;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Use custom tab #7


HHWIN_PROP_TAB_CUSTOM8

const win32help.HHWIN_PROP_TAB_CUSTOM8;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Use custom tab #8


HHWIN_PROP_TAB_CUSTOM9

const win32help.HHWIN_PROP_TAB_CUSTOM9;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

Use custom tab #9


HHWIN_PROP_TAB_FAVORITES

const win32help.HHWIN_PROP_TAB_FAVORITES;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

include favorites tab in navigation pane


HHWIN_PROP_TAB_HISTORY

const win32help.HHWIN_PROP_TAB_HISTORY;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

include history tab in navigation pane


HHWIN_PROP_TAB_SEARCH

const win32help.HHWIN_PROP_TAB_SEARCH;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

include search tab in navigation pane


HHWIN_PROP_TRACKING

const win32help.HHWIN_PROP_TRACKING;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

send tracking notification messages


HHWIN_PROP_TRI_PANE

const win32help.HHWIN_PROP_TRI_PANE;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

use a tri-pane window


HHWIN_PROP_USER_POS

const win32help.HHWIN_PROP_USER_POS;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

After initial creation, user controls window size/position


HHWIN_TB_MARGIN

const win32help.HHWIN_TB_MARGIN;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

the window type has a margin


IDTB_BACK

const win32help.IDTB_BACK;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_BROWSE_BACK

const win32help.IDTB_BROWSE_BACK;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_BROWSE_FWD

const win32help.IDTB_BROWSE_FWD;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_CONTENTS

const win32help.IDTB_CONTENTS;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


IDTB_CONTRACT

const win32help.IDTB_CONTRACT;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_CUSTOMIZE

const win32help.IDTB_CUSTOMIZE;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_EXPAND

const win32help.IDTB_EXPAND;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_FAVORITES

const win32help.IDTB_FAVORITES;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


IDTB_FORWARD

const win32help.IDTB_FORWARD;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_HISTORY

const win32help.IDTB_HISTORY;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


IDTB_HOME

const win32help.IDTB_HOME;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_INDEX

const win32help.IDTB_INDEX;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


IDTB_JUMP1

const win32help.IDTB_JUMP1;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_JUMP2

const win32help.IDTB_JUMP2;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_NOTES

const win32help.IDTB_NOTES;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


IDTB_OPTIONS

const win32help.IDTB_OPTIONS;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_PRINT

const win32help.IDTB_PRINT;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_REFRESH

const win32help.IDTB_REFRESH;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_SEARCH

const win32help.IDTB_SEARCH;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP

not implemented


IDTB_STOP

const win32help.IDTB_STOP;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_SYNC

const win32help.IDTB_SYNC;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_TOC_NEXT

const win32help.IDTB_TOC_NEXT;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_TOC_PREV

const win32help.IDTB_TOC_PREV;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32HELPMODULE.CPP


IDTB_ZOOM

const win32help.IDTB_ZOOM;

Defined in: E:/SRC/PYTHONEX/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 : PyLOCALGROUP_INFO_*

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 : PyLOCALGROUP_INFO_*

A dictionary holding the group data.

Win32 API References

NetLocalGroupSetInfo


NMPWAIT_NOWAIT

const win32pipe.NMPWAIT_NOWAIT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32PIPE.D


NMPWAIT_USE_DEFAULT_WAIT

const win32pipe.NMPWAIT_USE_DEFAULT_WAIT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32PIPE.D


NMPWAIT_WAIT_FOREVER

const win32pipe.NMPWAIT_WAIT_FOREVER;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_ACCESS_DUPLEX

const win32pipe.PIPE_ACCESS_DUPLEX;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_ACCESS_INBOUND

const win32pipe.PIPE_ACCESS_INBOUND;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_ACCESS_OUTBOUND

const win32pipe.PIPE_ACCESS_OUTBOUND;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_NOWAIT

const win32pipe.PIPE_NOWAIT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_READMODE_BYTE

const win32pipe.PIPE_READMODE_BYTE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_READMODE_MESSAGE

const win32pipe.PIPE_READMODE_MESSAGE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_TYPE_BYTE

const win32pipe.PIPE_TYPE_BYTE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_TYPE_MESSAGE

const win32pipe.PIPE_TYPE_MESSAGE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_UNLIMITED_INSTANCES

const win32pipe.PIPE_UNLIMITED_INSTANCES;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32PIPE.D


PIPE_WAIT

const win32pipe.PIPE_WAIT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32PIPE.D


ABOVE_NORMAL_PRIORITY_CLASS

const win32process.ABOVE_NORMAL_PRIORITY_CLASS;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32PROCESS.D


CREATE_UNICODE_ENVIRONMENT

const win32process.CREATE_UNICODE_ENVIRONMENT;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32PROCESS.D


NORMAL_PRIORITY_CLASS

const win32process.NORMAL_PRIORITY_CLASS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32PROCESS.D

Indicates a normal process with no special scheduling needs.


REALTIME_PRIORITY_CLASS

const win32process.REALTIME_PRIORITY_CLASS;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32PROCESS.D

If this value is not specified, the dwFillAttribute member is ignored.


STARTF_USEPOSITION

const win32process.STARTF_USEPOSITION;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32PROCESS.D

If this value is not specified, the wShowWindow member is ignored.


STARTF_USESIZE

const win32process.STARTF_USESIZE;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32PROCESS.D

Indicates normal priority for the priority class.


THREAD_PRIORITY_TIME_CRITICAL

const win32process.THREAD_PRIORITY_TIME_CRITICAL;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_AuthAck

const win32ras.RASCS_AuthAck;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_AuthCallback

const win32ras.RASCS_AuthCallback;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_AuthChangePassword

const win32ras.RASCS_AuthChangePassword;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_Authenticate

const win32ras.RASCS_Authenticate;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_Authenticated

const win32ras.RASCS_Authenticated;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_AuthLinkSpeed

const win32ras.RASCS_AuthLinkSpeed;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_AuthNotify

const win32ras.RASCS_AuthNotify;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_AuthProject

const win32ras.RASCS_AuthProject;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_AuthRetry

const win32ras.RASCS_AuthRetry;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_CallbackComplete

const win32ras.RASCS_CallbackComplete;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_CallbackSetByCaller

const win32ras.RASCS_CallbackSetByCaller;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_ConnectDevice

const win32ras.RASCS_ConnectDevice;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_Connected

const win32ras.RASCS_Connected;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_DeviceConnected

const win32ras.RASCS_DeviceConnected;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_Disconnected

const win32ras.RASCS_Disconnected;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_Interactive

const win32ras.RASCS_Interactive;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_LogonNetwork

const win32ras.RASCS_LogonNetwork;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_OpenPort

const win32ras.RASCS_OpenPort;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_PasswordExpired

const win32ras.RASCS_PasswordExpired;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_PortOpened

const win32ras.RASCS_PortOpened;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_PrepareForCallback

const win32ras.RASCS_PrepareForCallback;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_Projected

const win32ras.RASCS_Projected;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_ReAuthenticate

const win32ras.RASCS_ReAuthenticate;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_RetryAuthentication

const win32ras.RASCS_RetryAuthentication;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_StartAuthentication

const win32ras.RASCS_StartAuthentication;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_WaitForCallback

const win32ras.RASCS_WaitForCallback;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


RASCS_WaitForModemReset

const win32ras.RASCS_WaitForModemReset;

Defined in: E:/SRC/PYTHONEX/WIN32/SRC/WIN32RASMODULE.CPP

Constant for RAS state.


ACCESS_ALLOWED_ACE_TYPE

const win32security.ACCESS_ALLOWED_ACE_TYPE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Access-allowed ACE that uses the ACCESS_ALLOWED_ACE structure.


ACCESS_ALLOWED_OBJECT_ACE_TYPE

const win32security.ACCESS_ALLOWED_OBJECT_ACE_TYPE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Windows 2000/XP: Object-specific access-allowed ACE that uses the ACCESS_ALLOWED_OBJECT_ACE structure.


ACCESS_DENIED_ACE_TYPE

const win32security.ACCESS_DENIED_ACE_TYPE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Access-denied ACE that uses the ACCESS_DENIED_ACE structure.


ACCESS_DENIED_OBJECT_ACE_TYPE

const win32security.ACCESS_DENIED_OBJECT_ACE_TYPE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Windows 2000/XP: Object-specific access-denied ACE that uses the ACCESS_DENIED_OBJECT_ACE structure.


ACL_REVISION

const win32security.ACL_REVISION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


ACL_REVISION_DS

const win32security.ACL_REVISION_DS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


AuditCategoryAccountLogon

const win32security.AuditCategoryAccountLogon;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


AuditCategoryAccountManagement

const win32security.AuditCategoryAccountManagement;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


AuditCategoryDetailedTracking

const win32security.AuditCategoryDetailedTracking;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


AuditCategoryDirectoryServiceAccess

const win32security.AuditCategoryDirectoryServiceAccess;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


AuditCategoryLogon

const win32security.AuditCategoryLogon;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


AuditCategoryObjectAccess

const win32security.AuditCategoryObjectAccess;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


AuditCategoryPolicyChange

const win32security.AuditCategoryPolicyChange;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


AuditCategoryPrivilegeUse

const win32security.AuditCategoryPrivilegeUse;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


AuditCategorySystem

const win32security.AuditCategorySystem;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


CONTAINER_INHERIT_ACE

const win32security.CONTAINER_INHERIT_ACE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


DACL_SECURITY_INFORMATION

const win32security.DACL_SECURITY_INFORMATION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates the discretionary ACL of the object is being referenced.


DENY_ACCESS

const win32security.DENY_ACCESS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


FAILED_ACCESS_ACE_FLAG

const win32security.FAILED_ACCESS_ACE_FLAG;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


GRANT_ACCESS

const win32security.GRANT_ACCESS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


GROUP_SECURITY_INFORMATION

const win32security.GROUP_SECURITY_INFORMATION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates the primary group identifier of the object is being referenced.


INHERIT_ONLY_ACE

const win32security.INHERIT_ONLY_ACE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


INHERITED_ACE

const win32security.INHERITED_ACE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


LOGON32_LOGON_BATCH

const win32security.LOGON32_LOGON_BATCH;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Use the Windows NT 3.5 logon provider.


LOGON32_PROVIDER_WINNT40

const win32security.LOGON32_PROVIDER_WINNT40;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Use the Windows NT 4.0 logon provider


NO_INHERITANCE

const win32security.NO_INHERITANCE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


NO_PROPAGATE_INHERIT_ACE

const win32security.NO_PROPAGATE_INHERIT_ACE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


NOT_USED_ACCESS

const win32security.NOT_USED_ACCESS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


OBJECT_INHERIT_ACE

const win32security.OBJECT_INHERIT_ACE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


OWNER_SECURITY_INFORMATION

const win32security.OWNER_SECURITY_INFORMATION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates the owner identifier of the object is being referenced.


POLICY_ALL_ACCESS

const win32security.POLICY_ALL_ACCESS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


POLICY_AUDIT_EVENT_FAILURE

const win32security.POLICY_AUDIT_EVENT_FAILURE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Generate audit records for failed attempts to cause an event of this type to occur.


POLICY_AUDIT_EVENT_NONE

const win32security.POLICY_AUDIT_EVENT_NONE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Do not generate audit records for events of this type.


POLICY_AUDIT_EVENT_SUCCESS

const win32security.POLICY_AUDIT_EVENT_SUCCESS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Generate audit records for successful events of this type.


POLICY_AUDIT_EVENT_UNCHANGED

const win32security.POLICY_AUDIT_EVENT_UNCHANGED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

For set operations, specify this value to leave the current options unchanged. This is the default.


POLICY_AUDIT_LOG_ADMIN

const win32security.POLICY_AUDIT_LOG_ADMIN;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


POLICY_CREATE_ACCOUNT

const win32security.POLICY_CREATE_ACCOUNT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


POLICY_CREATE_PRIVILEGE

const win32security.POLICY_CREATE_PRIVILEGE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


POLICY_CREATE_SECRET

const win32security.POLICY_CREATE_SECRET;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


POLICY_EXECUTE

const win32security.POLICY_EXECUTE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


POLICY_GET_PRIVATE_INFORMATION

const win32security.POLICY_GET_PRIVATE_INFORMATION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


POLICY_LOOKUP_NAMES

const win32security.POLICY_LOOKUP_NAMES;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


POLICY_NOTIFICATION

const win32security.POLICY_NOTIFICATION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


POLICY_READ

const win32security.POLICY_READ;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


POLICY_SERVER_ADMIN

const win32security.POLICY_SERVER_ADMIN;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


POLICY_SET_AUDIT_REQUIREMENTS

const win32security.POLICY_SET_AUDIT_REQUIREMENTS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


POLICY_SET_DEFAULT_QUOTA_LIMITS

const win32security.POLICY_SET_DEFAULT_QUOTA_LIMITS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


POLICY_TRUST_ADMIN

const win32security.POLICY_TRUST_ADMIN;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


POLICY_VIEW_AUDIT_INFORMATION

const win32security.POLICY_VIEW_AUDIT_INFORMATION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


POLICY_VIEW_LOCAL_INFORMATION

const win32security.POLICY_VIEW_LOCAL_INFORMATION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


POLICY_WRITE

const win32security.POLICY_WRITE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyAccountDomainInformation

const win32security.PolicyAccountDomainInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyAuditEventsInformation

const win32security.PolicyAuditEventsInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyAuditFullQueryInformation

const win32security.PolicyAuditFullQueryInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyAuditFullSetInformation

const win32security.PolicyAuditFullSetInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyAuditLogInformation

const win32security.PolicyAuditLogInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyDefaultQuotaInformation

const win32security.PolicyDefaultQuotaInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyDnsDomainInformation

const win32security.PolicyDnsDomainInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyLsaServerRoleInformation

const win32security.PolicyLsaServerRoleInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyModificationInformation

const win32security.PolicyModificationInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyNotifyAccountDomainInformation

const win32security.PolicyNotifyAccountDomainInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyNotifyAuditEventsInformation

const win32security.PolicyNotifyAuditEventsInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyNotifyDnsDomainInformation

const win32security.PolicyNotifyDnsDomainInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyNotifyDomainEfsInformation

const win32security.PolicyNotifyDomainEfsInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyNotifyDomainKerberosTicketInformation

const win32security.PolicyNotifyDomainKerberosTicketInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyNotifyMachineAccountPasswordInformation

const win32security.PolicyNotifyMachineAccountPasswordInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyNotifyServerRoleInformation

const win32security.PolicyNotifyServerRoleInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyPdAccountInformation

const win32security.PolicyPdAccountInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyPrimaryDomainInformation

const win32security.PolicyPrimaryDomainInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyReplicaSourceInformation

const win32security.PolicyReplicaSourceInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyServerDisabled

const win32security.PolicyServerDisabled;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyServerEnabled

const win32security.PolicyServerEnabled;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyServerRoleBackup

const win32security.PolicyServerRoleBackup;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PolicyServerRolePrimary

const win32security.PolicyServerRolePrimary;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PROTECTED_DACL_SECURITY_INFORMATION

const win32security.PROTECTED_DACL_SECURITY_INFORMATION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


PROTECTED_SACL_SECURITY_INFORMATION

const win32security.PROTECTED_SACL_SECURITY_INFORMATION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


REVOKE_ACCESS

const win32security.REVOKE_ACCESS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SACL_SECURITY_INFORMATION

const win32security.SACL_SECURITY_INFORMATION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates the system ACL of the object is being referenced.


SDDL_REVISION_1

const win32security.SDDL_REVISION_1;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_DACL_AUTO_INHERITED

const win32security.SE_DACL_AUTO_INHERITED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

win2k and up


SE_DACL_DEFAULTED

const win32security.SE_DACL_DEFAULTED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_DACL_PRESENT

const win32security.SE_DACL_PRESENT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_DACL_PROTECTED

const win32security.SE_DACL_PROTECTED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

win2k and up


SE_DS_OBJECT

const win32security.SE_DS_OBJECT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_DS_OBJECT_ALL

const win32security.SE_DS_OBJECT_ALL;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_FILE_OBJECT

const win32security.SE_FILE_OBJECT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_GROUP_DEFAULTED

const win32security.SE_GROUP_DEFAULTED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_GROUP_ENABLED

const win32security.SE_GROUP_ENABLED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_GROUP_ENABLED_BY_DEFAULT

const win32security.SE_GROUP_ENABLED_BY_DEFAULT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_GROUP_LOGON_ID

const win32security.SE_GROUP_LOGON_ID;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_GROUP_MANDATORY

const win32security.SE_GROUP_MANDATORY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_GROUP_OWNER

const win32security.SE_GROUP_OWNER;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_GROUP_RESOURCE

const win32security.SE_GROUP_RESOURCE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_GROUP_USE_FOR_DENY_ONLY

const win32security.SE_GROUP_USE_FOR_DENY_ONLY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_KERNEL_OBJECT

const win32security.SE_KERNEL_OBJECT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_LMSHARE

const win32security.SE_LMSHARE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_OWNER_DEFAULTED

const win32security.SE_OWNER_DEFAULTED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_PRINTER

const win32security.SE_PRINTER;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_PRIVILEGE_ENABLED

const win32security.SE_PRIVILEGE_ENABLED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_PRIVILEGE_ENABLED_BY_DEFAULT

const win32security.SE_PRIVILEGE_ENABLED_BY_DEFAULT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_PRIVILEGE_USED_FOR_ACCESS

const win32security.SE_PRIVILEGE_USED_FOR_ACCESS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_PROVIDER_DEFINED_OBJECT

const win32security.SE_PROVIDER_DEFINED_OBJECT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_REGISTRY_KEY

const win32security.SE_REGISTRY_KEY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_REGISTRY_WOW64_32KEY

const win32security.SE_REGISTRY_WOW64_32KEY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_SACL_AUTO_INHERITED

const win32security.SE_SACL_AUTO_INHERITED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

win2k and up


SE_SACL_DEFAULTED

const win32security.SE_SACL_DEFAULTED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_SACL_PRESENT

const win32security.SE_SACL_PRESENT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_SACL_PROTECTED

const win32security.SE_SACL_PROTECTED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

win2k and up


SE_SELF_RELATIVE

const win32security.SE_SELF_RELATIVE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_SERVICE

const win32security.SE_SERVICE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_UNKNOWN_OBJECT_TYPE

const win32security.SE_UNKNOWN_OBJECT_TYPE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_WINDOW_OBJECT

const win32security.SE_WINDOW_OBJECT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SE_WMIGUID_OBJECT

const win32security.SE_WMIGUID_OBJECT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SECURITY_CREATOR_SID_AUTHORITY

const win32security.SECURITY_CREATOR_SID_AUTHORITY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SECURITY_LOCAL_SID_AUTHORITY

const win32security.SECURITY_LOCAL_SID_AUTHORITY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SECURITY_NON_UNIQUE_AUTHORITY

const win32security.SECURITY_NON_UNIQUE_AUTHORITY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SECURITY_NT_AUTHORITY

const win32security.SECURITY_NT_AUTHORITY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SECURITY_NULL_SID_AUTHORITY

const win32security.SECURITY_NULL_SID_AUTHORITY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SECURITY_RESOURCE_MANAGER_AUTHORITY

const win32security.SECURITY_RESOURCE_MANAGER_AUTHORITY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SECURITY_WORLD_SID_AUTHORITY

const win32security.SECURITY_WORLD_SID_AUTHORITY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SecurityAnonymous

const win32security.SecurityAnonymous;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SecurityDelegation

const win32security.SecurityDelegation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SecurityIdentification

const win32security.SecurityIdentification;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SecurityImpersonation

const win32security.SecurityImpersonation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SET_ACCESS

const win32security.SET_ACCESS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SET_AUDIT_FAILURE

const win32security.SET_AUDIT_FAILURE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SET_AUDIT_SUCCESS

const win32security.SET_AUDIT_SUCCESS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SidTypeAlias

const win32security.SidTypeAlias;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates an alias SID.


SidTypeComputer

const win32security.SidTypeComputer;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates a computer SID


SidTypeDeletedAccount

const win32security.SidTypeDeletedAccount;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates an SID for a deleted account.


SidTypeDomain

const win32security.SidTypeDomain;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates a domain SID.


SidTypeGroup

const win32security.SidTypeGroup;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates a group SID.


SidTypeInvalid

const win32security.SidTypeInvalid;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates an invalid SID.


SidTypeUnknown

const win32security.SidTypeUnknown;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates an unknown SID type.


SidTypeUser

const win32security.SidTypeUser;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates a user SID.


SidTypeWellKnownGroup

const win32security.SidTypeWellKnownGroup;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Indicates an SID for a well-known group.


STYPE_DEVICE

const win32security.STYPE_DEVICE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


STYPE_DISKTREE

const win32security.STYPE_DISKTREE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


STYPE_IPC

const win32security.STYPE_IPC;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


STYPE_PRINTQ

const win32security.STYPE_PRINTQ;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


STYPE_SPECIAL

const win32security.STYPE_SPECIAL;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


STYPE_TEMPORARY

const win32security.STYPE_TEMPORARY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SUB_CONTAINERS_AND_OBJECTS_INHERIT

const win32security.SUB_CONTAINERS_AND_OBJECTS_INHERIT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SUB_CONTAINERS_ONLY_INHERIT

const win32security.SUB_CONTAINERS_ONLY_INHERIT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SUB_OBJECTS_ONLY_INHERIT

const win32security.SUB_OBJECTS_ONLY_INHERIT;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SUCCESSFUL_ACCESS_ACE_FLAG

const win32security.SUCCESSFUL_ACCESS_ACE_FLAG;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SYSTEM_AUDIT_ACE_TYPE

const win32security.SYSTEM_AUDIT_ACE_TYPE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

System-audit ACE that uses the SYSTEM_AUDIT_ACE structure.


SYSTEM_AUDIT_OBJECT_ACE_TYPE

const win32security.SYSTEM_AUDIT_OBJECT_ACE_TYPE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TOKEN_ADJUST_DEFAULT

const win32security.TOKEN_ADJUST_DEFAULT;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Required to duplicate an access token.


TOKEN_EXECUTE

const win32security.TOKEN_EXECUTE;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Required to attach an impersonation access token to a process.


TOKEN_QUERY

const win32security.TOKEN_QUERY;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Required to query the contents of an access token.


TOKEN_QUERY_SOURCE

const win32security.TOKEN_QUERY_SOURCE;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D

Required to query the source of an access token.


TOKEN_READ

const win32security.TOKEN_READ;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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.


TokenDefaultDacl

const win32security.TokenDefaultDacl;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TokenGroups

const win32security.TokenGroups;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TokenGroupsAndPrivileges

const win32security.TokenGroupsAndPrivileges;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TokenImpersonation

const win32security.TokenImpersonation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TokenImpersonationLevel

const win32security.TokenImpersonationLevel;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TokenOwner

const win32security.TokenOwner;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TokenPrimary

const win32security.TokenPrimary;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TokenPrimaryGroup

const win32security.TokenPrimaryGroup;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TokenPrivileges

const win32security.TokenPrivileges;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TokenRestrictedSids

const win32security.TokenRestrictedSids;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TokenSandBoxInert

const win32security.TokenSandBoxInert;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TokenSessionId

const win32security.TokenSessionId;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TokenSource

const win32security.TokenSource;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TokenStatistics

const win32security.TokenStatistics;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TokenType

const win32security.TokenType;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TokenUser

const win32security.TokenUser;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TrustedControllersInformation

const win32security.TrustedControllersInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TrustedDomainAuthInformation

const win32security.TrustedDomainAuthInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TrustedDomainAuthInformationInternal

const win32security.TrustedDomainAuthInformationInternal;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TrustedDomainFullInformation

const win32security.TrustedDomainFullInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TrustedDomainFullInformation2Internal

const win32security.TrustedDomainFullInformation2Internal;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TrustedDomainFullInformationInternal

const win32security.TrustedDomainFullInformationInternal;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TrustedDomainInformationBasic

const win32security.TrustedDomainInformationBasic;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TrustedDomainInformationEx

const win32security.TrustedDomainInformationEx;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TrustedDomainInformationEx2Internal

const win32security.TrustedDomainInformationEx2Internal;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TrustedDomainNameInformation

const win32security.TrustedDomainNameInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TrustedPasswordInformation

const win32security.TrustedPasswordInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TrustedPosixOffsetInformation

const win32security.TrustedPosixOffsetInformation;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TRUSTEE_BAD_FORM

const win32security.TRUSTEE_BAD_FORM;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TRUSTEE_IS_ALIAS

const win32security.TRUSTEE_IS_ALIAS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TRUSTEE_IS_COMPUTER

const win32security.TRUSTEE_IS_COMPUTER;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TRUSTEE_IS_DELETED

const win32security.TRUSTEE_IS_DELETED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TRUSTEE_IS_DOMAIN

const win32security.TRUSTEE_IS_DOMAIN;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TRUSTEE_IS_GROUP

const win32security.TRUSTEE_IS_GROUP;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TRUSTEE_IS_INVALID

const win32security.TRUSTEE_IS_INVALID;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TRUSTEE_IS_NAME

const win32security.TRUSTEE_IS_NAME;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TRUSTEE_IS_OBJECTS_AND_NAME

const win32security.TRUSTEE_IS_OBJECTS_AND_NAME;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TRUSTEE_IS_OBJECTS_AND_SID

const win32security.TRUSTEE_IS_OBJECTS_AND_SID;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TRUSTEE_IS_SID

const win32security.TRUSTEE_IS_SID;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TRUSTEE_IS_UNKNOWN

const win32security.TRUSTEE_IS_UNKNOWN;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TRUSTEE_IS_USER

const win32security.TRUSTEE_IS_USER;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


TRUSTEE_IS_WELL_KNOWN_GROUP

const win32security.TRUSTEE_IS_WELL_KNOWN_GROUP;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


UNPROTECTED_DACL_SECURITY_INFORMATION

const win32security.UNPROTECTED_DACL_SECURITY_INFORMATION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


UNPROTECTED_SACL_SECURITY_INFORMATION

const win32security.UNPROTECTED_SACL_SECURITY_INFORMATION;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SECURITY.D


SC_GROUP_IDENTIFIER

const win32service.SC_GROUP_IDENTIFIER;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SERVICE.D


SC_MANAGER_ALL_ACCESS

const win32service.SC_MANAGER_ALL_ACCESS;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SERVICE.D

Enables connecting to the service control manager.


SC_MANAGER_CREATE_SERVICE

const win32service.SC_MANAGER_CREATE_SERVICE;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SERVICE.D


SC_MANAGER_QUERY_LOCK_STATUS

const win32service.SC_MANAGER_QUERY_LOCK_STATUS;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SERVICE.D


SERVICE_ALL_ACCESS

const win32service.SERVICE_ALL_ACCESS;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SERVICE.D

The service continue is pending.


SERVICE_CONTROL_CONTINUE

const win32service.SERVICE_CONTROL_CONTINUE;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SERVICE.D


SERVICE_ENUMERATE_DEPENDENTS

const win32service.SERVICE_ENUMERATE_DEPENDENTS;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SERVICE.D


SERVICE_INTERACTIVE_PROCESS

const win32service.SERVICE_INTERACTIVE_PROCESS;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SERVICE.D

Indicates the parameter should not be changed.


SERVICE_PAUSE_CONTINUE

const win32service.SERVICE_PAUSE_CONTINUE;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SERVICE.D

The service pause is pending.


SERVICE_PAUSED

const win32service.SERVICE_PAUSED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SERVICE.D

The service is paused.


SERVICE_QUERY_CONFIG

const win32service.SERVICE_QUERY_CONFIG;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SERVICE.D

The service is running.


SERVICE_SPECIFIC_ERROR

const win32service.SERVICE_SPECIFIC_ERROR;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SERVICE.D

A service specific error has occurred.


SERVICE_START

const win32service.SERVICE_START;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SERVICE.D

The service is starting.


SERVICE_STATE_ALL

const win32service.SERVICE_STATE_ALL;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SERVICE.D


SERVICE_STOP

const win32service.SERVICE_STOP;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SERVICE.D

The service is stopping.


SERVICE_STOPPED

const win32service.SERVICE_STOPPED;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SERVICE.D

The service is not running.


SERVICE_SYSTEM_START

const win32service.SERVICE_SYSTEM_START;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SERVICE.D


SERVICE_WIN32_OWN_PROCESS

const win32service.SERVICE_WIN32_OWN_PROCESS;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WIN32SERVICE.D

A service type flag that indicates a Win32 service that shares a process with other services.


win32ui.CreateToolBarCtrl

PyCToolBarCtrl = CreateToolBarCtrl()

Creates a toolbar control object. PyCToolBarCtrl::CreateWindow creates the actual control.


win32ui.CreateToolTipCtrl

PyCToolTipCtrl = CreateToolTipCtrl()

Creates a progress control object. PyToolTipCtrl::Create creates the actual control.


win32ui.GetRect

tuple = GetRect()

Returns the rectangle of the main application frame. See PyCWnd::GetWindowRecr for further details.

Return Value

A tuple of integers with (left, top, right, bottom)


AFX_IDW_PANE_FIRST

const win32ui.AFX_IDW_PANE_FIRST;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of the first splitter pane


AFX_IDW_PANE_LAST

const win32ui.AFX_IDW_PANE_LAST;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of the last splitter pane


AFX_WS_DEFAULT_VIEW

const win32ui.AFX_WS_DEFAULT_VIEW;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_Confidence_maybeAttemptForeign

const win32ui.CDocTemplate_Confidence_maybeAttemptForeign;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_Confidence_maybeAttemptNative

const win32ui.CDocTemplate_Confidence_maybeAttemptNative;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_Confidence_noAttempt

const win32ui.CDocTemplate_Confidence_noAttempt;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_Confidence_yesAlreadyOpen

const win32ui.CDocTemplate_Confidence_yesAlreadyOpen;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_Confidence_yesAttemptForeign

const win32ui.CDocTemplate_Confidence_yesAttemptForeign;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_Confidence_yesAttemptNative

const win32ui.CDocTemplate_Confidence_yesAttemptNative;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_docName

const win32ui.CDocTemplate_docName;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_fileNewName

const win32ui.CDocTemplate_fileNewName;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_filterExt

const win32ui.CDocTemplate_filterExt;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_filterName

const win32ui.CDocTemplate_filterName;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_regFileTypeId

const win32ui.CDocTemplate_regFileTypeId;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_regFileTypeName

const win32ui.CDocTemplate_regFileTypeName;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


CDocTemplate_windowTitle

const win32ui.CDocTemplate_windowTitle;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


CRichEditView_WrapNone

const win32ui.CRichEditView_WrapNone;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


CRichEditView_WrapToTargetDevice

const win32ui.CRichEditView_WrapToTargetDevice;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


CRichEditView_WrapToWindow

const win32ui.CRichEditView_WrapToWindow;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


debug

const win32ui.debug;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

1 if we are current using a _DEBUG build of win32ui, else 0.


FWS_ADDTOTITLE

const win32ui.FWS_ADDTOTITLE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

MFC Frame Window style extension. Add document title to window title.


FWS_PREFIXTITLE

const win32ui.FWS_PREFIXTITLE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

MFC Frame Window style extension.


FWS_SNAPTOBARS

const win32ui.FWS_SNAPTOBARS;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

MFC Frame Window style extension.


ID_APP_ABOUT

const win32ui.ID_APP_ABOUT;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_APP_EXIT

const win32ui.ID_APP_EXIT;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_CLEAR

const win32ui.ID_EDIT_CLEAR;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_CLEAR_ALL

const win32ui.ID_EDIT_CLEAR_ALL;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_COPY

const win32ui.ID_EDIT_COPY;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_CUT

const win32ui.ID_EDIT_CUT;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_FIND

const win32ui.ID_EDIT_FIND;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_GOTO_LINE

const win32ui.ID_EDIT_GOTO_LINE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_PASTE

const win32ui.ID_EDIT_PASTE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_REDO

const win32ui.ID_EDIT_REDO;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_REPEAT

const win32ui.ID_EDIT_REPEAT;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_REPLACE

const win32ui.ID_EDIT_REPLACE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_SELECT_ALL

const win32ui.ID_EDIT_SELECT_ALL;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_SELECT_BLOCK

const win32ui.ID_EDIT_SELECT_BLOCK;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_EDIT_UNDO

const win32ui.ID_EDIT_UNDO;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_CHECK

const win32ui.ID_FILE_CHECK;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_CLOSE

const win32ui.ID_FILE_CLOSE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_IMPORT

const win32ui.ID_FILE_IMPORT;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_LOCATE

const win32ui.ID_FILE_LOCATE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_MRU_FILE1

const win32ui.ID_FILE_MRU_FILE1;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_MRU_FILE2

const win32ui.ID_FILE_MRU_FILE2;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_MRU_FILE3

const win32ui.ID_FILE_MRU_FILE3;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_MRU_FILE4

const win32ui.ID_FILE_MRU_FILE4;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_NEW

const win32ui.ID_FILE_NEW;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_OPEN

const win32ui.ID_FILE_OPEN;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_PAGE_SETUP

const win32ui.ID_FILE_PAGE_SETUP;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_PRINT

const win32ui.ID_FILE_PRINT;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_PRINT_PREVIEW

const win32ui.ID_FILE_PRINT_PREVIEW;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_PRINT_SETUP

const win32ui.ID_FILE_PRINT_SETUP;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_RUN

const win32ui.ID_FILE_RUN;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_SAVE

const win32ui.ID_FILE_SAVE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_SAVE_ALL

const win32ui.ID_FILE_SAVE_ALL;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_FILE_SAVE_AS

const win32ui.ID_FILE_SAVE_AS;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_HELP_GUI_REF

const win32ui.ID_HELP_GUI_REF;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_HELP_OTHER

const win32ui.ID_HELP_OTHER;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_HELP_PYTHON

const win32ui.ID_HELP_PYTHON;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_INDICATOR_COLNUM

const win32ui.ID_INDICATOR_COLNUM;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_INDICATOR_LINENUM

const win32ui.ID_INDICATOR_LINENUM;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_NEXT_PANE

const win32ui.ID_NEXT_PANE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_PREV_PANE

const win32ui.ID_PREV_PANE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_SEPARATOR

const win32ui.ID_SEPARATOR;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_BROWSE

const win32ui.ID_VIEW_BROWSE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_EOL

const win32ui.ID_VIEW_EOL;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_FIXED_FONT

const win32ui.ID_VIEW_FIXED_FONT;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_FOLD_COLLAPSE

const win32ui.ID_VIEW_FOLD_COLLAPSE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_FOLD_COLLAPSE_ALL

const win32ui.ID_VIEW_FOLD_COLLAPSE_ALL;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_FOLD_EXPAND

const win32ui.ID_VIEW_FOLD_EXPAND;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_FOLD_EXPAND_ALL

const win32ui.ID_VIEW_FOLD_EXPAND_ALL;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_FOLD_TOGGLE

const win32ui.ID_VIEW_FOLD_TOGGLE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_INDENTATIONGUIDES

const win32ui.ID_VIEW_INDENTATIONGUIDES;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_INTERACTIVE

const win32ui.ID_VIEW_INTERACTIVE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_OPTIONS

const win32ui.ID_VIEW_OPTIONS;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_RIGHT_EDGE

const win32ui.ID_VIEW_RIGHT_EDGE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_STATUS_BAR

const win32ui.ID_VIEW_STATUS_BAR;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_TOOLBAR

const win32ui.ID_VIEW_TOOLBAR;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_TOOLBAR_DBG

const win32ui.ID_VIEW_TOOLBAR_DBG;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_VIEW_WHITESPACE

const win32ui.ID_VIEW_WHITESPACE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_WINDOW_ARRANGE

const win32ui.ID_WINDOW_ARRANGE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_WINDOW_CASCADE

const win32ui.ID_WINDOW_CASCADE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_WINDOW_NEW

const win32ui.ID_WINDOW_NEW;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_WINDOW_SPLIT

const win32ui.ID_WINDOW_SPLIT;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_WINDOW_TILE_HORZ

const win32ui.ID_WINDOW_TILE_HORZ;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


ID_WINDOW_TILE_VERT

const win32ui.ID_WINDOW_TILE_VERT;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDB_BROWSER_HIER

const win32ui.IDB_BROWSER_HIER;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in bitmap for the browser


IDB_DEBUGGER_HIER

const win32ui.IDB_DEBUGGER_HIER;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDB_HIERFOLDERS

const win32ui.IDB_HIERFOLDERS;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in bitmap for default hierarchical list


IDC_ABOUT_VERSION

const win32ui.IDC_ABOUT_VERSION;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of 'Version' control


IDC_AUTO_RELOAD

const win32ui.IDC_AUTO_RELOAD;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_AUTOCOMPLETE

const win32ui.IDC_AUTOCOMPLETE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_BUTTON1

const win32ui.IDC_BUTTON1;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_BUTTON2

const win32ui.IDC_BUTTON2;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_BUTTON3

const win32ui.IDC_BUTTON3;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_BUTTON4

const win32ui.IDC_BUTTON4;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_CALLTIPS

const win32ui.IDC_CALLTIPS;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_CHECK1

const win32ui.IDC_CHECK1;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_CHECK2

const win32ui.IDC_CHECK2;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_CHECK3

const win32ui.IDC_CHECK3;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_COMBO1

const win32ui.IDC_COMBO1;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_COMBO2

const win32ui.IDC_COMBO2;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_EDIT1

const win32ui.IDC_EDIT1;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_EDIT2

const win32ui.IDC_EDIT2;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_EDIT3

const win32ui.IDC_EDIT3;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_EDIT4

const win32ui.IDC_EDIT4;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_EDIT_COLOE

const win32ui.IDC_EDIT_COLOE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_EDIT_TABS

const win32ui.IDC_EDIT_TABS;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_INDENT_SIZE

const win32ui.IDC_INDENT_SIZE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_KEYBOARD_CONFIG

const win32ui.IDC_KEYBOARD_CONFIG;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_LIST1

const win32ui.IDC_LIST1;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_PROMPT1

const win32ui.IDC_PROMPT1;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_PROMPT2

const win32ui.IDC_PROMPT2;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_PROMPT3

const win32ui.IDC_PROMPT3;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_PROMPT4

const win32ui.IDC_PROMPT4;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_PROMPT_TABS

const win32ui.IDC_PROMPT_TABS;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_RADIO1

const win32ui.IDC_RADIO1;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_RADIO2

const win32ui.IDC_RADIO2;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_RIGHTEDGE_COLUMN

const win32ui.IDC_RIGHTEDGE_COLUMN;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_RIGHTEDGE_DEFINE

const win32ui.IDC_RIGHTEDGE_DEFINE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_RIGHTEDGE_ENABLE

const win32ui.IDC_RIGHTEDGE_ENABLE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_RIGHTEDGE_SAMPLE

const win32ui.IDC_RIGHTEDGE_SAMPLE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_SPIN1

const win32ui.IDC_SPIN1;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_SPIN2

const win32ui.IDC_SPIN2;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_TAB_SIZE

const win32ui.IDC_TAB_SIZE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_USE_SMART_TABS

const win32ui.IDC_USE_SMART_TABS;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_USE_TABS

const win32ui.IDC_USE_TABS;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_VIEW_WHITESPACE

const win32ui.IDC_VIEW_WHITESPACE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDC_VSS_INTEGRATE

const win32ui.IDC_VSS_INTEGRATE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDD_ABOUTBOX

const win32ui.IDD_ABOUTBOX;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'About Box' dialog


IDD_DUMMYPROPPAGE

const win32ui.IDD_DUMMYPROPPAGE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in dummy property page


IDD_GENERAL_STATUS

const win32ui.IDD_GENERAL_STATUS;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of a general status dialog box (fairly small, 3 static controls, minimize box)


IDD_LARGE_EDIT

const win32ui.IDD_LARGE_EDIT;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'Large Edit' dialog (dialog box with a large edit control)


IDD_PP_DEBUGGER

const win32ui.IDD_PP_DEBUGGER;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDD_PP_EDITOR

const win32ui.IDD_PP_EDITOR;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'Editor' property page


IDD_PP_FORMAT

const win32ui.IDD_PP_FORMAT;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'Format' property page


IDD_PP_IDE

const win32ui.IDD_PP_IDE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'IDE' property page


IDD_PP_TABS

const win32ui.IDD_PP_TABS;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'Tabs and Whitespace' property page


IDD_PP_TOOLMENU

const win32ui.IDD_PP_TOOLMENU;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'ToolsMenu' property page


IDD_PROPDEMO1

const win32ui.IDD_PROPDEMO1;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in Property Page demo dialog 1


IDD_PROPDEMO2

const win32ui.IDD_PROPDEMO2;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in Property Page demo dialog 2


IDD_RUN_SCRIPT

const win32ui.IDD_RUN_SCRIPT;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'Run Script' dialog


IDD_SET_TABSTOPS

const win32ui.IDD_SET_TABSTOPS;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'Set Tab Stops' dialog


IDD_SIMPLE_INPUT

const win32ui.IDD_SIMPLE_INPUT;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in 'Simple Input' property page.


IDD_TREE

const win32ui.IDD_TREE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in dialog with a tree control.


IDD_TREE_MB

const win32ui.IDD_TREE_MB;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Id of built in dialog with a tree control with multiple buttons.


IDR_CNTR_INPLACE

const win32ui.IDR_CNTR_INPLACE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDR_DEBUGGER

const win32ui.IDR_DEBUGGER;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDR_MAINFRAME

const win32ui.IDR_MAINFRAME;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDR_PYTHONCONTYPE

const win32ui.IDR_PYTHONCONTYPE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDR_PYTHONTYPE

const win32ui.IDR_PYTHONTYPE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDR_PYTHONTYPE_CNTR_IP

const win32ui.IDR_PYTHONTYPE_CNTR_IP;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


IDR_TEXTTYPE

const win32ui.IDR_TEXTTYPE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP


LM_COMMIT

const win32ui.LM_COMMIT;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Remember MRUWidth


LM_HORZ

const win32ui.LM_HORZ;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

same as bHorz in CalcFixedLayout


LM_HORZDOCK

const win32ui.LM_HORZDOCK;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Horizontal Docked Dimensions


LM_LENGTHY

const win32ui.LM_LENGTHY;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Set if nLength is a Height instead of a Width


LM_MRUWIDTH

const win32ui.LM_MRUWIDTH;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Most Recently Used Dynamic Width


LM_STRETCH

const win32ui.LM_STRETCH;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

same meaning as bStretch in CalcFixedLayout. If set, ignores nLength and returns dimensions based on LM_HORZ state, otherwise LM_HORZ is used to determine if nLength is the desired horizontal or vertical length and dimensions are returned based on nLength


LM_VERTDOCK

const win32ui.LM_VERTDOCK;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Vertical Docked Dimensions


MFS_4THICKFRAME

const win32ui.MFS_4THICKFRAME;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

thick frame all around (no tiles)


MFS_BLOCKSYSMENU

const win32ui.MFS_BLOCKSYSMENU;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

block hit testing on system menu


MFS_MOVEFRAME

const win32ui.MFS_MOVEFRAME;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

no sizing, just moving


MFS_SYNCACTIVE

const win32ui.MFS_SYNCACTIVE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

syncronize activation w/ parent


MFS_THICKFRAME

const win32ui.MFS_THICKFRAME;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

use instead of WS_THICKFRAME


PD_ALLPAGES

const win32ui.PD_ALLPAGES;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

The default flag that indicates that the All radio button is initially selected. This flag is used as a placeholder to indicate that the PD_PAGENUMS and PD_SELECTION flags are not specified.


PD_COLLATE

const win32ui.PD_COLLATE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

If this flag is set, the Collate check box is checked. If this flag is set when the PrintDlg function returns, the application must simulate collation of multiple copies. For more information, see the description of the PD_USEDEVMODECOPIESANDCOLLATE flag.


PD_DISABLEPRINTTOFILE

const win32ui.PD_DISABLEPRINTTOFILE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Disables the Print to File check box.


PD_ENABLEPRINTHOOK

const win32ui.PD_ENABLEPRINTHOOK;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Enables the hook procedure specified in the lpfnPrintHook member. This enables the hook procedure for the Print dialog box.


PD_ENABLEPRINTTEMPLATE

const win32ui.PD_ENABLEPRINTTEMPLATE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

PD_ENABLEPRINTTEMPLATE


PD_ENABLEPRINTTEMPLATEHANDLE

const win32ui.PD_ENABLEPRINTTEMPLATEHANDLE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Indicates that the hPrintTemplate member identifies a data block that contains a preloaded dialog box template. This template replaces the default template for the Print dialog box. The system ignores the lpPrintTemplateName member if this flag is specified.


PD_ENABLESETUPHOOK

const win32ui.PD_ENABLESETUPHOOK;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Enables the hook procedure specified in the lpfnSetupHook member. This enables the hook procedure for the Print Setup dialog box.


PD_ENABLESETUPTEMPLATE

const win32ui.PD_ENABLESETUPTEMPLATE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Indicates that the hInstance and lpSetupTemplateName members specify a replacement for the default Print Setup dialog box template.


PD_ENABLESETUPTEMPLATEHANDLE

const win32ui.PD_ENABLESETUPTEMPLATEHANDLE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Indicates that the hSetupTemplate member identifies a data block that contains a preloaded dialog box template. This template replaces the default template for the Print Setup dialog box. The system ignores the lpSetupTemplateName member if this flag is specified.


PD_HIDEPRINTTOFILE

const win32ui.PD_HIDEPRINTTOFILE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Hides the Print to File check box.


PD_NONETWORKBUTTON

const win32ui.PD_NONETWORKBUTTON;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Hides and disables the Network button.


PD_NOPAGENUMS

const win32ui.PD_NOPAGENUMS;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Disables the Pages radio button and the associated edit controls.


PD_NOSELECTION

const win32ui.PD_NOSELECTION;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Disables the Selection radio button.


PD_NOWARNING

const win32ui.PD_NOWARNING;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Prevents the warning message from being displayed when there is no default printer.


PD_PAGENUMS

const win32ui.PD_PAGENUMS;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

If this flag is set, the Pages radio button is selected. If this flag is set when the PrintDlg function returns, the nFromPage and nFromPage members indicate the starting and ending pages specified by the user.


PD_PRINTSETUP

const win32ui.PD_PRINTSETUP;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Causes the system to display the Print Setup dialog box rather than the Print dialog box.


PD_PRINTTOFILE

const win32ui.PD_PRINTTOFILE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

If this flag is set, the Print to File check box is selected. If this flag is set when the PrintDlg function returns, the offset indicated by the wOutputOffset member of the DEVNAMES structure contains the string "FILE:". When you call theStartDoc function to start the printing operation, specify this "FILE:" string in the lpszOutput member of theDOCINFO structure. Specifying this string causes the print subsystem to query the user for the name of the output file.


PD_RETURNDC

const win32ui.PD_RETURNDC;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Causes PrintDlg to return a device context matching the selections the user made in the dialog box. The device context is returned in hDC.


PD_RETURNDEFAULT

const win32ui.PD_RETURNDEFAULT;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

If this flag is set, the PrintDlg function does not display the dialog box. Instead, it sets the hDevNames and hDevMode members to handles toDEVMODE and DEVNAMES structures that are initialized for the system default printer. Both hDevNames and hDevMode must be NULL, or PrintDlg returns an error. If the system default printer is supported by an old printer driver (earlier than Windows version 3.0), only hDevNames is returned; hDevMode is NULL.


PD_RETURNIC

const win32ui.PD_RETURNIC;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Similar to the PD_RETURNDC flag, except this flag returns an information context rather than a device context. If neither PD_RETURNDC nor PD_RETURNIC is specified, hDC is undefined on output.


PD_SELECTION

const win32ui.PD_SELECTION;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

If this flag is set, the Selection radio button is selected. If neither PD_PAGENUMS nor PD_SELECTION is set, the All radio button is selected.


PD_SHOWHELP

const win32ui.PD_SHOWHELP;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Causes the dialog box to display the Help button. The hwndOwner member must specify the window to receive the HELPMSGSTRING registered messages that the dialog box sends when the user clicks the Help button.


PD_USEDEVMODECOPIES

const win32ui.PD_USEDEVMODECOPIES;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Same as PD_USEDEVMODECOPIESANDCOLLATE


PD_USEDEVMODECOPIESANDCOLLATE

const win32ui.PD_USEDEVMODECOPIESANDCOLLATE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

This flag indicates whether your application supports multiple copies and collation. Set this flag on input to indicate that your application does not support multiple copies and collation. In this case, the nCopies member of the PRINTDLG structure always returns 1, and PD_COLLATE is never set in the Flags member. If this flag is not set, the application is responsible for printing and collating multiple copies. In this case, the nCopies member of the PRINTDLG structure indicates the number of copies the user wants to print, and the PD_COLLATE flag in the Flags member indicates whether the user wants collation. Regardless of whether this flag is set, an application can determine from nCopies and PD_COLLATE how many copies to render and whether to print them collated. If this flag is set and the printer driver does not support multiple copies, the Copies edit control is disabled. Similarly, if this flag is set and


PSWIZB_BACK

const win32ui.PSWIZB_BACK;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Enable/Disable the Property sheet Back button


PSWIZB_DISABLEDFINISH

const win32ui.PSWIZB_DISABLEDFINISH;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Enable/Disable the Property sheet disabled Finish button


PSWIZB_FINISH

const win32ui.PSWIZB_FINISH;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Enable/Disable the Property sheet Finish button


PSWIZB_NEXT

const win32ui.PSWIZB_NEXT;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIMODULE.CPP

Enable/Disable the Property sheet Next button


COleClientItem_activeState

const win32uiole.COleClientItem_activeState;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIOLE.CPP


COleClientItem_activeUIState

const win32uiole.COleClientItem_activeUIState;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIOLE.CPP


COleClientItem_emptyState

const win32uiole.COleClientItem_emptyState;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIOLE.CPP


COleClientItem_loadedState

const win32uiole.COleClientItem_loadedState;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIOLE.CPP


COleClientItem_openState

const win32uiole.COleClientItem_openState;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIOLE.CPP


OLE_CHANGED

const win32uiole.OLE_CHANGED;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIOLE.CPP

representation of a draw aspect has changed


OLE_CHANGED_ASPECT

const win32uiole.OLE_CHANGED_ASPECT;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIOLE.CPP

the item draw aspect has changed


OLE_CHANGED_STATE

const win32uiole.OLE_CHANGED_STATE;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIOLE.CPP

the item state (open, active, etc.) has changed


OLE_CLOSED

const win32uiole.OLE_CLOSED;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIOLE.CPP

the item has closed


OLE_RENAMED

const win32uiole.OLE_RENAMED;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIOLE.CPP

the item has changed its moniker


OLE_SAVED

const win32uiole.OLE_SAVED;

Defined in: E:/SRC/PYTHONEX/PYTHONWIN/WIN32UIOLE.CPP

the item has committed its storage


wincerapi.CEHANDLE

PyCEHANDLE = CEHANDLE()

Creates a new CEHANDLE object


CSIDL_BITBUCKET

const wincerapi.CSIDL_BITBUCKET;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WINCERAPI.D

Control Panel-virtual folder containing icons for the control panel applications.


CSIDL_DESKTOP

const wincerapi.CSIDL_DESKTOP;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WINCERAPI.D

Windows desktop-virtual folder at the root of the name space.


CSIDL_DESKTOPDIRECTORY

const wincerapi.CSIDL_DESKTOPDIRECTORY;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WINCERAPI.D

Virtual folder containing fonts.


CSIDL_NETHOOD

const wincerapi.CSIDL_NETHOOD;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WINCERAPI.D

File system directory containing objects that appear in the network neighborhood.


CSIDL_NETWORK

const wincerapi.CSIDL_NETWORK;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WINCERAPI.D

File system directory that serves as a common repository for documents.


CSIDL_PRINTERS

const wincerapi.CSIDL_PRINTERS;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WINCERAPI.D

Printers folder-virtual folder containing installed printers.


CSIDL_PROGRAMS

const wincerapi.CSIDL_PROGRAMS;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WINCERAPI.D

File system directory containing the user's most recently used documents.


CSIDL_SENDTO

const wincerapi.CSIDL_SENDTO;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WINCERAPI.D

File system directory containing Send To menu items.


CSIDL_STARTMENU

const wincerapi.CSIDL_STARTMENU;

Defined in: E:/SRC/PYTHONEX/BUILD/TEMP/HELP/WINCERAPI.D

File system directory containing Start menu items.


CSIDL_STARTUP

const wincerapi.CSIDL_STARTUP;

Defined in: E:/SRC/PYTHONEX/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: E:/SRC/PYTHONEX/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


Generated Python COM Support

This file describes how the Python COM extensions support "generated files". The information contained here is for expert Python users, and people who need to take advantage of the advanced features of the support. More general information is available in the Quick Start to Client Side COM documentation.

Introduction

Generated Python COM support means that a .py file exists behind a particular COM object. This .py file is created by a generation process from a COM type library.

This documentation talks about the process of the creation of the .py files.

Design Goals

The main design goal is that the Python programmer need not know much about the type library they wish to work with. They need not know the name of a specific Python module to use a type library. COM uses an IID, version and LCID to identify a type library. Therefore, the Python programmer only need know this information to obtain a Python module.

How to generate support files

Support files can be generated either "off-line" by the makepy utility, or in custom Python code.

Using makepy is in many ways far simpler - you simply pick the type library and you are ready to go! The Quick Start to Client Side COM documentation describes this process.

Often however, you will want to use code to ensure the type library has been processed. This document describes that process.

Usage

The win32com.client.gencache module implements all functionality. As described above, if you wish to generate support from code, you need to know the IID, version and LCID of the type library.

The following functions are defined. The best examples of their usage is probably in the Pythonwin OCX Demos, and the COM Test Suite (particularly testMSOffice.py)

Note that the gencache.py file supports being run from the command line, and provides some utilities for managing the cache. Run the file to see usage options.

Using makepy to help with the runtime generation

makepy supports a "-i" option, to print information about a type library. When you select a type library, makepy will print out 2 lines of code that you cant paste into your application. This will then allow your module to generate the makepy .py file at runtime, but will only take you a few seconds!

win32com.client.gencache functions

def MakeModuleForTypelib(typelibCLSID, lcid, major, minor, progressInstance = None):

Generate support for a type library.

Given the IID, LCID and version information for a type library, generate and import the necessary support files.

Returns

The Python module. No exceptions are caught.

Params

typelibCLSID
IID of the type library.

major
Integer major version.

minor
Integer minor version.

lcid
Integer LCID for the library.

progressInstance
A class instance to use as the progress indicator, or None to use the default GUI one.

def EnsureModule(typelibCLSID, lcid, major, minor, progressInstance = None):

Ensure Python support is loaded for a type library, generating if necessary.

Given the IID, LCID and version information for a type library, check and if necessary generate, then import the necessary support files.

Returns:

The Python module. No exceptions are caught during the generate process.

Params

typelibCLSID
IID of the type library.

major
Integer major version.

minor
Integer minor version.

lcid
Integer LCID for the library.

progressInstance
A class instance to use as the progress indicator, or None to use the default GUI one.

def GetClassForProgID(progid):

Get a Python class for a Program ID

Given a Program ID, return a Python class which wraps the COM object

Returns

The Python class, or None if no module is available.

Params

progid
A COM ProgramID or IID (eg, "Word.Application")

def GetModuleForProgID(progid):

Get a Python module for a Program ID

Given a Program ID, return a Python module which contains the class which wraps the COM object.

Returns

The Python module, or None if no module is available.

Params:

progid
A COM ProgramID or IID (eg, "Word.Application")

def GetModuleForCLSID(clsid):

Get a Python module for a CLSID

Given a CLSID, return a Python module which contains the class which wraps the COM object.

Returns

The Python module, or None if no module is available.

Params

progid
A COM CLSID (ie, not the description)

def GetModuleForTypelib(typelibCLSID, lcid, major, minor):

Get a Python module for a type library ID

Returns

An imported Python module, else None

Params:

typelibCLSID
IID of the type library.

major
Integer major version.

minor
Integer minor version

lcid
Integer LCID for the library.


win32com

Python and COM

Introduction

Python has an excellent interface to COM (also known variously as OLE2, ActiveX, etc).

The Python COM package can be used to interface to almost any COM program (such as the MS-Office suite), write servers that can be hosted by any COM client (such as Visual Basic or C++), and has even been used to provide the core ActiveX Scripting Support.

  • Note that win32com is now released in the win32all installation package. The installation EXE can be downloaded, or you can jump to the win32all readme for more details.
  • Here is the win32com source code in a zip file.

Documentation

Preliminary Active Scripting and Debugging documentation is available.

2 Quick-Start guides have been provided, which also contain other links. See the Quick Start for Client side COM and the Quick Start for Server side COM


Misc win32com Stuff

Misc stuff I don’t know where to put anywhere else

Client Side Dispatch

Using win32com.client.Dispatch automatically invokes all the win32com client side "smarts", including automatic usage of generated .py files etc.

If you wish to avoid that, and use truly "dynamic" objects (ie, there is generated .py support available, but you wish to avoid it), you can use win32com.client.dynamic.Dispatch

_print_details_() method
If win32com.client.dynamic.Dispatch is used, the objects have a _print_details_() method available, which prints all relevant knowledge about an object (for example, all methods and properties). For objects that do not expose runtime type information, _print_details_ may not list anything.


The win32com package

This document describes the win32com package in general terms.

The COM support can be thought of as existing in 2 main portions - the C++ support code (the core PythonCOM module), and helper code, implemented in Python. The total package is known as "win32com".

The win32com support is stand-alone. It does not require Pythonwin.

The win32com package

To facilitate an orderly framework, the Python "ni" module has been used, and the entire package is known as "win32com". As is normal for such packages, win32com itself does not provide any functionality. Some of the modules are described below:

  • win32com.pythoncom - core C++ support.
    This module is rarely used directly by programmers - instead the other "helper" module are used, which themselves draw on the core pythoncom services.
  • win32com.client package
    Support for COM clients used by Python. Some of the modules in this package allow for dynamic usage of COM clients, a module for generating .py files for certain COM servers, etc.
  • win32com.server package
    Support for COM servers written in Python. The modules in this package provide most of the underlying framework for magically turning Python classes into COM servers, exposing the correct public methods, registering your server in the registry, etc.
  • win32com.axscript
    ActiveX Scripting implementation for Python.
  • win32com.axdebug
    Active Debugging implementation for Python
  • win32com.mapi
    Utilities for working with MAPI and the Microsoft Exchange Server

The pythoncom module

The pythoncom module is the underlying C++ support for all COM related objects. In general, Python programmers will not use this module directly, but use win32com helper classes and functions.

This module exposes a C++ like interface to COM - there are objects implemented in pythoncom that have methods "QueryInterface()", "Invoke()", just like the C++ API. If you are using COM in C++, you would not call a method directly, you would use pObject->Invoke( …, MethodId, argArray…). Similarly, if you are using pythoncom directly, you must also use the Invoke method to call an object's exposed method.

There are some Python wrappers for hiding this raw interface, meaning you should almost never need to use the pythoncom module directly. These helpers translate a "natural" looking interface (eg, obj.SomeMethod()) into the underlying Invoke call.


Untitled

Python and COM - Blowing the others away

Python and COM - Implementation Details

Introduction

This document describes the technical implementation of the COM support in Python. It is primarily concerned with the underlying C++ interface to COM, although general Python issues are touched.

This document is targeted at people who wish to maintain/enhance the standard COM support (typically by writing extension modules). For information on using Python and COM from a Python programmers perspective, please see the documentation index.

General COM Support.

COM support in Python can be broken into 2 general areas - C++ support, and Python support. C++ support exists in the core PythonCOM module (plus any PythonCOM extension modules). Python support exists in the .py files that accompany the core module.

Naming Conventions

The naming conventions used by Python code will be:

  • The Python "New Import" (ni) module will be used, allowing packages, or nested modules.
  • The package name will be "win32com".
  • The core module name will be "pythoncom" (ie, "win32com.pythoncom")

The rest of the naming conventions are yet to be worked out.

Core COM support.

This section is involved with the core C++ support in "pythoncom".

The organisation of PythonCOM support falls into 3 discrete areas.

COM Client Support

This is the ability to manipulate other COM objects via their exposed interface. This includes use of IDispatch (eg using Python to start Microsoft Word, open a file, and print it.) but also all client side IUnknown derived objects fall into this category, including ITypeLib and IConnectionPoint support.

COM Server Support

This is ability for Python to create COM Servers, which can be manipulated by another COM client. This includes server side IDispatch (eg, Visual Basic starting a Python interpreter, and asking it to evaluate some code) but also all supported server side IUnknown derived classes.

Python/COM type and value conversion

This is internal code used by the above areas to managed the conversion to and from Python/COM types and values. This includes code to convert an arbitrary Python object into a COM variant, manages return types, and a few other helpers.

COM Structures and Python Types

OLE supports many C level structures for the COM API, which must be mapped to Python.

VARIANT

Variants are never exposed as such to Python programs. The internal framework always converts all variants to and from Python types. In some cases, type descriptions may be used, which force specific mappings, although in general the automatic conversion works fine.

TYPEDESC

A tuple, containing the elements of the C union. This union will be correctly decoded by the support code.

ELEMDESC

A tuple of TYPEDESC and PARAMDESC objects.

FUNCDESC

A funcdesc is a large and unwieldy tuple. Documentation to be supplied.

IID/CLSID

A native IID in Python is a special type, defined in pythoncom. Whenever a CLSID/IID is required, typically either an object, a tuple of type "iii(iiiiiiii)" or string can be used.

Helper functions are available to convert to and from IID/CLSID and strings.

COM Framework

Both client and server side support have a specific framework in place to assist in supporting the widest possible set of interfaces. The framework allows external extension DLLs to be written, which extend the interfaces available to the Python user.

This allows the core PythonCOM module to support a wide set of common interfaces, and other extensions to support anything obscure.

Client Framework

QueryInterface and Types

When the only support required by Python is IDispatch, everything is simple - every object returned from QueryInterface is a PyIDispatch object. But this does not extend to other types, such as ITypeLib, IConnectionPoint etc., which are required for full COM support.

For example, consider the following C++ psuedo-code:

IConnectionPoint *conPt;
someIDispatch->QueryInterface(IID_IConnectionPoint, (void **)&conPt);
// Note the IID_ and type of the * could be anything!

This cast, and knowledge of a specific IID_* to type must be simulated in Python.

Python/COM will therefore maintain a map of UID's to Python type objects. Whenever QueryInterface is called, Python will lookup this map, to determine if the object type is supported. If the object is supported, then an object of that type will be returned. If the object is not supported, then a PyIUnknown object will be returned.

Note that PyIDispatch will be supported by the core engine. Therefore:

>>> disp=someobj.QueryInterface(win32com.IID_Dispatch)

will return a PyIDispatch object, whereas

>>> unk=someobj.QueryInterface(SomeUnknownIID) # returns PyIUnknown
>>> disp=unk.QueryInterface(win32com.IID_Dispatch)
>>> unk.Release() # Clean up now, rather than waiting for unk death.

Is needed to convert to an IDispatch object.

Core Support

The core COM support module will support the IUnknown, IDispatch, ITypeInfo, ITypeLib and IConnectionPointContainer and IConnectionPoint interfaces. This implies the core COM module supports 6 different OLE client object types, mapped to the 6 IID_*'s representing the objects. (The IConnection* objects allow for Python to repsond to COM events)

A psuedo-inheritance scheme is used. The Python types are all derived from the Python IUnknown type (PyIUnknown). Therefore all IUnknown methods are automatically available to all types, just as it should be. The PyIUnknown type manages all object reference counts and destruction.

Extensibility

To provide the above functionality, a Python map is provided, which maps from a GUID to a Python type object.

The advantage of this scheme is an external extension modules can hook into the core support. For example, imagine the following code:

>>> import myextracom # external .pyd supporting some interface.
# myextracom.pyd will do the equivilent of

# pythoncom.mapSupportedTypes(myextracom.IID_Extra, myextracom.ExtraType)
>>> someobj.QueryInterface(myextracom.IID_Extra)

Would correctly return an object defined in the extension module.

Server Framework

General Framework

A server framework has been put in place which provides the following features:

All Interfaces provide VTBL support - this means that the Servers exposed by Python are callable from C++ and other compiled languages.

Supports full "inproc" servers. This means that no external .EXE is needed making Python COM servers available in almost all cases.

An extensible model which allows for extension modules to provide server support for interfaces defined in that module. A map is provided which maps from a GUID to a function pointer which creates the interface.

Python and Variant Types Conversion

In general, Python and COM are both "type-less". COM is type-less via the VARIANT object, which supports many types, and Python is type-less due to its object model.

There are a number of areas where Python and OLE clash.

Parameters and conversions.

For simple calls, there are 2 helpers available which will convert to and from PyObjects and VARIANTS. The call to convert a Python object to a VARIANT is simple in that it returns a VARIANT of the most appropriate type for the Python object - ie, the type of the Python object determines the resulting VARIANT type.

There are also more complex conversion routines available, wrapped in a C++ helper class. Typically, these helpers are used whenever a specific variant type is known (eg, when an ITypeInfo is available for the object being used). In this case, all efforts are made to convert the Python type to the requested variant type - ie, in this situation, the VARIANT type determines how the Python object is coerced. In addition, this code supports the use of "ByRef" and pointer paramaters, providing and freeing any buffers necessary for the call.


Quick Start to Client side COM and Python

Introduction

This documents how to quickly start using COM from Python. It is not a thorough discussion of the COM system, or of the concepts introduced by COM.

Other good information on COM can be found in various conference tutorials - please see the collection of Mark's conference tutorials

For information on implementing COM objects using Python, please see a Quick Start to Server side COM and Python

In this document we discuss the following topics:

  • Using a COM object from Python
  • How do I know which objects are available?
  • Static Dispatch/Type Safe objects (using the new improved makepy.py)
  • Using COM Constants with makepy.

Quick Start

To use a COM object from Python

import win32com.client
o = win32com.client.Dispatch("Object.Name")
o.Method()
o.property = "New Value"
print o.property

Example

o = win32com.client.Dispatch("Excel.Application")
o.Visible = 1
o.Workbooks.Add() # for office 97 – 95 a bit different!
o.Cells(1,1).Value = "Hello"

And we will see the word "Hello" appear in the top cell.

How do I know which methods and properties are available?

Good question. This is hard! You need to use the documentation with the products, or possibly a COM browser. Note however that COM browsers typically rely on these objects registering themselves in certain ways, and many objects to not do this. You are just expected to know.

The Python COM browser

PythonCOM comes with a basic COM browser that may show you the information you need. Note that this package requires Pythonwin (ie, the MFC GUI environment) to be installed for this to work.

There are far better COM browsers available - I tend to use the one that comes with MSVC, or this one!

To run the browser, simply select it from the Pythonwin Tools menu, or double-click on the file win32com\client\combrowse.py

Static Dispatch (or Type Safe) objects

In the above examples, if we printed the 'repr(o)' object above, it would have resulted in

<COMObject Excel.Application>

This reflects that the object is a generic COM object that Python has no special knowledge of (other than the name you used to create it!). This is known as a "dynamic dispatch" object, as all knowledge is built dynamically. The win32com package also has the concept of static dispatch objects, which gives Python up-front knowledge about the objects that it is working with (including arguments, argument types, etc)

In a nutshell, Static Dispatch involves the generation of a .py file that contains support for the specific object. For more overview information, please see the documentation references above.

The generation and management of the .py files is somewhat automatic, and involves one of 2 steps:

  • Using makepy.py to select a COM library. This process is very similar to Visual Basic, where you select from a list of all objects installed on your system, and once selected the objects are magically useable.

or

  • Use explicit code to check for, and possibly generate, support at run-time. This is very powerful, as it allows the developer to avoid ensuring the user has selected the appropriate type library. This option is extremely powerful for OCX users, as it allows Python code to sub-class an OCX control, but the actual sub-class can be generated at run-time. Use makepy.py with a -i option to see how to include this support in your Python code.

The win32com.client.gencache module manages these generated files. This module has some documentation of its own, but you probably don't need to know the gory details!

How do I get at the generated module?

You will notice that the generated file name is long and cryptic - obviously not designed for humans to work with! So how do you get at the module object for the generated code?

Hopefully, the answer is you shouldn't need to. All generated file support is generally available directly via win32com.client.Dispatch and win32com.client.constants. But should you ever really need the Python module object, the win32com.client.gencache module has functions specifically for this. The functions GetModuleForCLSID and GetModuleForProgID both return Python module objects that you can use in your code. See the docstrings in the gencache code for more details.

To generate Python Sources supporting a COM object

Example using Microsoft Office 97.

Either:

  • Run 'win32com\client\makepy.py' (eg, run it from the command window, or double-click on it) and a list will be presented. Select the Type Library 'Microsoft Word 8.0 Object Library'
  • From a command prompt, run the command 'makepy.py "Microsoft Word 8.0 Object Library"' (include the double quotes). This simply avoids the selection process.
  • If you desire, you can also use explicit code to generate it just before you need to use it at runtime. Run 'makepy.py -i "Microsoft Word 8.0 Object Library"' (include the double quotes) to see how to do this.

And that is it! Nothing more needed. No special import statements needed! Now, you simply need say

>>> import win32com.client

>>> w=win32com.client.Dispatch("Word.Application")

>>> w.Visible=1

>>> w

<win32com.gen_py.Microsoft Word 8.0 Object Library._Application>

Note that now Python knows the explicit type of the object.

Using COM Constants

Makepy automatically installs all generated constants from a type library in an object called win32com.clients.constants. You do not need to do anything special to make these constants work, other than create the object itself (ie, in the example above, the constants relating to Word would automatically be available after the w=win32com.client.Dispatch("Word.Application") statement.

For example, immediately after executing the code above, you could execute the following:

>>> w.WindowState = win32com.client.constants.wdWindowStateMinimize

and Word will Minimize.


Quick Start to Server side COM and Python

Introduction

This documents how to quickly start implementing COM objects in Python. It is not a thorough discussion of the COM system, or of the concepts introduced by COM.

For more details information on Python and COM, please see the COM Tutorial given by Greg Stein and Mark Hammond at SPAM 6 (HTML format) or download the same tutorial in PowerPoint format.

For information on using external COM objects from Python, please see a Quick Start to Client side COM and Python.

In this document we discuss the core functionality, registering the server, testing the class, debugging the class, exception handling and server policies (phew!)

Implement the core functionality

Implement a stand-alone Python class with your functionality

class HelloWorld:

def __init__(self):

self.softspace = 1

self.noCalls = 0

def Hello(self, who):

self.noCalls = self.noCalls + 1

# insert "softspace" number of spaces

return "Hello" + " " * self.softspace + who

This is obviously a very simple server. In particular, custom error handling would be needed for a production class server. In addition, there are some contrived properties just for demonstration purposes.

Make Unicode concessions

At this stage, Python and Unicode don’t really work well together. All strings which come from COM will actually be Unicode objects rather than string objects.

To make this code work in a COM environment, the last line of the "Hello" method must become:

return "Hello" + " " * self.softspace + str(who)

Note the conversion of the "who" to "str(who)". This forces the Unicode object into a native Python string object.

For details on how to debug COM Servers to find this sort of error, please see debugging the class

Annotate the class with win32com specific attributes

This is not a complete list of names, simply a list of properties used by this sample.

Property Name | Description
_public_methods_ | List of all method names exposed to remote COM clients
_public_attrs_ | List of all attribute names exposed to remote COM clients
_readonly_attrs_ | List of all attributes which can be accessed, but not set.

We change the class header to become:

class HelloWorld:

_public_methods_ = ['Hello']

_public_attrs_ = ['softspace', 'noCalls']

_readonly_attrs_ = ['noCalls']

def __init__(self):

[Same from here…]

Registering and assigning a CLSID for the object

COM requires that all objects use a unique CLSID and be registered under a "user friendly" name. This documents the process.

Generating the CLSID

Microsoft Visual C++ comes with various tools for generating CLSID's, which are quite suitable. Alternatively, the pythoncom module exports the function CreateGuid() to generate these identifiers.

>>> import pythoncom
>>> print pythoncom.CreateGuid()
{7CC9F362-486D-11D1-BB48-0000E838A65F}

Obviously the GUID that you get will be different than that displayed here.

Preparing for registration of the Class

The win32com package allows yet more annotations to be applied to a class, allowing registration to be effected with 2 lines in your source file. The registration annotations used by this sample are:

Property Name

Description

_reg_clsid_

The CLSID of the COM object

_reg_progid_

The "program ID", or Name, of the COM Server. This is the name the user usually uses to instantiate the object

_reg_desc_

Optional: The description of the COM Server. Used primarily for COM browsers. If not specified, the _reg_progid_ is used as the description.

_reg_class_spec_

Optional: A string which represents how Python can create the class instance. The string is of format
[package.subpackage.]module.class

The portion up to the class name must be valid for Python to "import", and the class portion must be a valid attribute in the specified class.

This is optional from build 124 of Pythoncom., and has been removed from this sample.

_reg_remove_keys_

Optional: A list of tuples of extra registry keys to be removed when uninstalling the server. Each tuple is of format ("key", root), where key is a string, and root is one of the win32con.HKEY_* constants (this item is optional, defaulting to HKEY_CLASSES_ROOT)

Note there are quite a few other keys available. Also note that these annotations are not required - they just make registration simple. Helper functions in the module win32com.server.register allow you to explicitly specify each of these attributes without attaching them to the class.

The header of our class now becomes:

class HelloWorld:

_reg_clsid_ = "{7CC9F362-486D-11D1-BB48-0000E838A65F}"

_reg_desc_ = "Python Test COM Server"

_reg_progid_ = "Python.TestServer"

_public_methods_ = ['Hello']

[same from here]

Registering the Class

The idiom that most Python COM Servers use is that they register themselves when run as a script (ie, when executed from the command line.) Thus the standard "if __name__=='__main___':" technique works well.

win32com.server.register contains a number of helper functions. The easiest to use is "UseCommandLine".

Registration becomes as simple as:

if __name__=='__main__':
# ni only for 1.4!
import ni, win32com.server.register
win32com.server.register.UseCommandLine(HelloWorld)

Running the script will register our test server.

Testing our Class

For the purposes of this demonstration, we will test the class using Visual Basic. This code should run under any version of Visual Basic, including VBA found in Microsoft Office. Any COM compliant package could be used alternatively. VB has been used just to prove there is no "smoke and mirrors. For information on how to test the server using Python, please see the Quick Start to Client side COM documentation.

This is not a tutorial in VB. The code is just presented! Run it, and it will work!

Debugging the COM Server

When things go wrong in COM Servers, there is often nowhere useful for the Python traceback to go, even if such a traceback is generated.

Rather than discuss how it works, I will just present the procedure to debug your server:

To register a debug version of your class, run the script (as above) but pass in a "--debug" parameter. Eg, for the server above, use the command line "testcomserver.py --debug".

To see the debug output generated (and any print statements you may choose to add!) you can simply select the "Remote Debug Trace Collector" from the Pythonwin Tools menu, or run the script "win32traceutil.py" from Windows Explorer or a Command Prompt.

Exception Handling

Servers need to be able to provide exception information to their client. In some cases, it may be a simple return code (such as E_NOTIMPLEMENTED), but often it can contain much richer information, describing the error on detail, and even a help file and topic where more information can be found.

We use Python class based exceptions to provide this information. The COM framework will examine the exception, and look for certain known attributes. These attributes will be copied across to the COM exception, and passed back to the client.

The following attributes are supported, and correspond to the equivalent entry in the COM Exception structure:
scode, code, description, source, helpfile and helpcontext

To make working with exceptions easier, there is a helper module "win32com.server.exception.py", which defines a single class. An example of its usage would be:

raise COMException(desc="Must be a string",scode=winerror.E_INVALIDARG,helpfile="myhelp.hlp",...)

(Note the COMException class supports (and translates) "desc" as a shortcut for "description", but the framework requires "description")

Server Policies

This is information about how it all hangs together. The casual COM author need not know this.

Whenever a Python Server needs to be created, the C++ framework first instantiates a "policy" object. This "policy" object is the gatekeeper for the COM Server - it is responsible for creating the underlying Python object that is the server (ie, your object), and also for translating the underlying COM requests for the object.

This policy object handles all of the underlying COM functionality. For example, COM requires all methods and properties to have unique numeric ID's associated with them. The policy object manages the creation of these ID's for the underlying Python methods and attributes. Similarly, when the client whishes to call a method with ID 123, the policy object translates this back to the actual method, and makes the call.

It should be noted that the operation of the "policy" object could be dictated by the Python object - the policy object has many defaults, but the actual Python class can always dictate its operation.

Default Policy attributes

The default policy object has a few special attributes that define who the object is exposed to COM. The example above shows the _public_methods attribute, but this section describes all such attributes in detail.

_public_methods_

Required list of strings, containing the names of all methods to be exposed to COM. It is possible this will be enhanced in the future (eg, possibly '*' will be recognised to say all methods, or some other ideas…)

_public_attrs_

Optional list of strings containing all attribute names to be exposed, both for reading and writing. The attribute names must be valid instance variables.

_readonly_attrs_

Optional list of strings defining the name of attributes exposed read-only.

_com_interfaces_

Optional list of IIDs exposed by this object. If this attribute is missing, IID_IDispatch is assumed (ie, if not supplied, the COM object will be created as a normal Automation object.

and actual instance attributes:

_dynamic_ : optional method

_value_ : optional attribute

_query_interface_ : optional method

_NewEnum : optional method

_Evaluate : optional method


Python Script sample: Calculator

Calculator


ActiveX / VBScript Chart Example

 Chart Example
You must be running Microsoft Internet Explorer 3.0 and have the Microsoft ActiveX Chart control installed to view this page.

The chart control enables you to draw charts. The chart's types and styles are properties of the control. The chart has one method, AboutBox. The chart generates no events.

Chart Type
Simple Pie | Simple Column
Pie with Wedge Out | Stacked Column
Simple Point | Full Column
Stacked Point | Simple Bar
Full Point | Stacked Bar
Simple Line | Full Bar
Stacked Line | HLC Stock
Full Line | HLC Stock WSJ
Simple Area | OHLC Stock
Stack Area | OHLC Stock WSJ
Full Area
Gridlines
Horizontal
Vertical
Background
Opaque
Transparent

Notes
The chart's properties on this page are changed by selecting the various radio buttons and check boxes. The OnClick event of these intrinsic controls calls VBScript procedures that change the chart properties.

The About Chart Control command button calls the chart's AboutBox method.

To view the source code for this page, select Source from the View menu.

If you have any questions or comments about this example, please send them to billr@smart.net. We would appreciate feedback and would like to hear about other developers' experiences with these new tools.

© 1996 Rollins & Associates, Inc.
Page last updated 08/28/96
Please send comments to billr@smart.net


Engine Registration

The Python ActiveX Scripting Engine is not currently registered.

Due to a privacy concern discovered in the engine, the use of Python inside IE has been disabled.

Before any of the supplied demos will work, the engine must be successfully registered.

To install a version of the engine, that does work with IE, you can execute the Python program win32com\axscript\client\pyscript_rexec.py must be run. You can either do this manually, or follow the instructions below.

Register the engine now!

If you have read about the privacy concern and still wish to register the engine, just follow the process outlined below:

  1. Click on the link below
  2. A dialog will be presented asking if the file should be opened or saved to disk. Select "Open it".
  3. A Console program will briefly open, while the server is registered.

Register the engine now

Checking the registration

After the registration is complete, simply hit the Reload button. If the registration was successful, the page will change to the Python/AvtiveX Demo Page.


Python ActiveX Scripting Demonstation

Congratulations on installing the Python ActiveX Scripting Engine

Be warned that there is a privacy concern with this engine. Please read this information, including how to disable the feature.

Object model

Except as described below, the object module exposed should be similar to that exposed by Visual Basic, etc. Due to the nature of ActiveX Scripting, the details for each host are different, but Python should work "correctly".

The object model exposed via Python for MSIE is not as seamless as VB. The biggest limitation is the concept of a "local" namespace. For example, in VB, you can code text="Hi there", but in Python, you must code MyForm.ThisButton.Text="Hi There". See the foo2 sample for futher details.

Known bugs and problems

  • This release seems to have broken Aaron's mouse-trace sample. No idea why, and Im supposed to be looking into it.

  • Builtin objects such as MARQUEE are giving me grief. Objects accessed via forms are generally no problem.

  • If you are trying to use Python with the Windows Scripting Host, note that .pys files are not correct registered - you will need to explicitely specify either cscript.exe or wscript.exe on the command line.


Scripting Demos

An Introduction to the scripting engine.

The Calculator Demo is a very cool sample written by Aaron Watters.

Mouse track is another of Aaron's samples, and shows how fast the Python engine is!

The foo2 sample is mainly used for debugging and testing, but does show some forms in action.


The caption on the first button is set by the Window Load code. Clicking that button changes the text in the first edit box.

The second button changes its own text when clicked.

The fourth button calls a global function, defined in the global 'script' scope, rather than the 'MyForm' scope.

And here is a second form


Internet Workshop

Python AX Script Engine
Demo using the Marquee Control
Mark Hammond.

This is really quite a boring demo, as the Marquee control does everything. However, there is Python code behind the buttons that change the speed. This code is all of 2 lines per button!!!

For more information on Python as an ActiveX scripting language, see

Python
http://www.python.org


Python Scripting sample: Mouse tracking

Clickable Map Image

A mouse tracking demo. Move the mouse over the image above...


Pythonwin's architecture.

Introduction

This document describes the general architecture of Pythonwin. It describes the general design and interface to MFC.

After reading this, you should read the document and view architecture documentation.

Objects, types, etc.

For each MFC object created, there are usually 3 "objects" floating around. Although this may initially seem confusing, it does provide significant flexibility.

In general this complexity is hidden from view. The programmer usually only ever deals with a single object, and this object manages all others. However, an understanding if the implementation will assist in advanced programming techniques.

There is a quick example which shows all this in action.

C++ objects

For every window, toolbar, document etc. that exists in Pythonwin, there is a C++ object. In some cases this object may be a standard MFC object, as found in the MFC DLL's. In other cases, the C++ object will be derived from a standard MFC object, and can be found in win32ui.pyd.

Often, these C++ objects will not be aware that there is Python support behind them.

win32ui types.

The win32ui module provides a large number of types, each one usually associated with an MFC C++ object.. The naming conventions for these objects is of the form "Py{MFC_Name}" - eg, PyCDocument provides the functionality of an MFC CDocument, PyCDialog for a CDialog.

There is a form of inheritance used for these objects. Each object provides methods from its derived class. A PyCDialog is derived from a PyCWnd, and therefore has all PyCWnd methods available. However, this is as far as the inheritance extends, as Python types are more restrictive than Python classes.

Each method that a win32ui type provides is generally just code for extracting Python arguments and making the call to the associated C++ object.

These objects and methods are defined in Pythonwin.hlp (available from the Pythonwin help menu.)

"Object" base class

In object.py, there is a base class "Object". This provides 2 key functions.

  • Its constructor (__init__ method) registers the class with a win32ui type object (see below). This allows all virtual methods (see below) to be handled by a class method.
  • It allows itself to look exactly like the underlying win32ui type. It does this by storing the win32ui object in self._obj_, and providing a __getattr__ method. See the standard Python documentation for information on __getattr__ in a Python class.

The end result of this is that a class derived from "Object" looks just like a win32ui object, and can be used as such. In fact, there is rarely a reason to use the underlying object directly.

Python Classes

If you like you can skip this, and jump straight to the example below. It makes more sense in action!

Pythonwin provides support for many "virtual" functions. A "virtual" function is defined as a virtual C++ MFC function which has deferred its implementation to a Python object. To explain, I will use the example of a document.

In Python, it is possible to create a PyCDialog object by using win32ui.CreateDialog(). This will create both a PyCDialog object, and a C++ CDialog object. For dialogs to be useful to a programmer, it must be possible to define a method to be called when the dialog initialises (i.e., when the C++ OnInitDialog virtual method is called). Normally, a programmer would initialise the values of controls etc. at this time. To support this, the C++ OnInitDialog implementation calls Python to handle the call. In this example, OnInitDialog is a "virtual" function.

Each win32ui type supports being "attached" to a Python class instance. When a virtual function is called, the Python class instance associated with the object is checked to see if it has a method with the same name. If so, the method is called.

More details on this can be found in the document and view architecture documentation.

Example of this in action

>>> import win32ui # import the base win32ui module.
>>> import dialog # import dialog.py
>>> d=dialog.Dialog(win32ui.IDD_SIMPLE_INPUT)
>>> d
<Dialog instance at 886c78>

This creates an instance of class Dialog, defined in dialog.py. Dialog is derived from Object (via Wnd). To see the underlying win32ui type:

>>> d._obj_
object 'PyCDialog' - assoc is 002F3278, vf=True, ch=0, mh=2, kh=0
>>>
This output shows the C++ CDialog object is at address 0x002F3278, that there is a virtual function handler (i.e., the class instance "d"), that 2 messages have hooks, and no command or keyboard handlers are installed.

Even though the DoModal() method is implemented in the underlying win32ui type, the class object can be used just like the win32ui object. Thus:

>>> d.DoModal()
1
>>>

To see virtual functions in action

>>> class MyDialog(dialog.Dialog):

...   def OnInitDialog(self, msg):

...     self.GetDlgItem(win32ui.IDC_PROMPT1).SetWindowText("Hello")

...     return 1

...

>>> d=MyDialog(win32ui.IDD_SIMPLE_INPUT)

>>> d.DoModal()

1

Note the prompt on the dialog box is now "Hello".


Documents and Views in Pythonwin

Introduction

This document describes the document/view architecture of Pythonwin. It is assumed you have read the Pythonwin architecture documentation and are somewhat familiar with the standard MFC architecture.

Wherever possible, Pythonwin and the samples have followed the same architecture as MFC. This has advantages and disadvantages. Often the MFC architecture does not seem to fit with small, short GUI utilities, due to the reliance on "document" based applications. On the positive, Pythonwin can leverage off the full MFC functionality. This means minimal code to get full-blown application support.

Document and View - Control Flow

[This needs lots more work. There where 2 flow-charts, which were semi-useless!]

The creation of the frame and views are typically done via the PyCWnd.LoadFrame method. During this call, the windows are created, and virtual functions pass control back to Python. The LoadFrame flow is shown in the separate diagram.

Object Oriented Documents

Sam Rushing once asked me "there needs to be a way to create 'object-oriented' documents, by that I mean a document with an object associated with it rather than a string. Currently the only way to open a document forces you to use a string (or None)."

The most obvious path to take would seem to override "OpenDocumentFile" or some such, and pass an object rather than a file name. The document could then load itself from the object, and all would be happy. Unfortunately, the tight integration with MFC means this can not work, and led to Sam's frustration above.

On the other hand, the "OpenDocumentFile" method is provided for integration with a standard MDI interface, and the Windows explorer. Obviously, it is not possible to select "File/Open", and load an object based document.

However, I didn't have an easy answer for him.

MFC's OLE Implementation

The closest example to the "right" way to do it seemed to be the MFC OLE implementation. When you have an object embedded in another document, and the user wants to edit the object, MFC must load the object without a simple "file name" parameter. MFC's approach is this:

  • A normal blank document is created (via OnNewDocument)
  • COLEServerDoc's OLE XPersistStorage::Load() method is called, with an "object" (the OLE storage pointer)
  • The Documents OnOpenEmbedding() method is called.
    • OnOpenDocument is called, with a NULL file name parameter.
    • Serialize is called.

Instead of changing the meaning of the existing functions, MFC adds new definitions for derived classes, such as OnOpenEmbedding

Back to our example

The cleanest thing seems to be to duplicate the functionality of "OpenDocumentFile" - such as "OpenObject". You would do this by:

  • Check to see if there is already a document representing the document open. If so, switch to it and return.
  • Create a new document object.
  • Create a frame for the document
  • Call OnNewDocument to initialise the document.
  • Set the documents title
  • Call InitialUpdateFrame for the initial display.

"objdoc.py".

In the Pythonwin demos directory, there is a file "objdoc.py".

This module defines a template, which has an "OpenObject" method, and takes any Python object as an argument. If window with the object is already open, it is switched to. If not, a edit window is created, and the objects "repr" is written to the window.

Standard virtual function specification.

I'm not sure where to stick this!

In general, the C++ virtual function handlers follow the same general logic. If no handler is defined, the base class is called. If a Python handler is defined, the base C++ class is not called. In the latter case, it is up to the Python programmer to ensure the base class is called if necessary. This is normally done by calling the method in the underlying _obj_.


Embedding Pythonwin.

Pythonwin is distributed as 2 key components - Pythonwin.exe and win32ui.pyd. Win32ui.pyd contains the raw functionality of Pythonwin - Pythonwin.exe is a simple "wrapper" .exe that hosts win32ui.pyd.

This document describes how to embed the win32ui extension module in your own application.

Limitations.

The biggest limitations you will find are that a host application must

  • Have some small changes made to the application source to fully support win32ui command handling and routing (although most things work without modification)
  • Be an MFC application

Below is some example code needed to embed win32ui in your application..

Changes to the application.

Subclass a Win32uiHostGlue class

You must instantiate a Win32uiHostGlue class. This class is used as a glue between win32ui.pyd and the host .exe, and is defined in Win32uiHostGlue.h

Currently, this consists of about 5 methods that must be called by your application. The principle is that the Application must hook certain handlers, and delegate them to the HostGlue class. This will ensure the appropriate Win32ui internals are called.

Embedding win32ui Architecture

win32uihostglue.h

The win32uihostglue.h module defines a class which makes interfacing fairly simple. This Win32uiHostGlue class is used as a glue between win32ui.pyd and the host .exe. In the most simple case, you need to instantiate one of the classes, and at certain key points in your CWinApp derived class, call the appropriate methods. You may choose to provide your own glue class derived from Win32uiHostGlue in certain cases.

Below is an example class, which overrides the "SetStatusText" method, so that status information displays in the applications status bar (this is only necessary if your application has a "non standard" status bar - normally you could omit this.).

GameApp NEAR theApp; // My existing CWinApp derived class.
// HostGlue class.

class GameHostGlue : public Win32uiHostGlue
{
  virtual void SetStatusText(const char *text, BOOL bForce)
    // Assuming our GameApp above defines a SetStatusText method
    {GetApp()->SetStatusText(text, bForce);}
};

// The one and only Glue object.
GameHostGlue NEAR glue;

And now we are well on our way.

Delegating to win32uiHostGlue

You need to either implement, or modify, certain key methods of your Application object. Probably the most important is the call to initialise win32ui. You need to modify your CWinApp::InitInstance method (it is almost certain you already have one). The following code needs to be executed in this method:

InitInstance

BOOL GameApp::InitInstance()
{
...
  if (!glue.DynamicApplicationInit("import initscore", csScripts)) {
  // Assuming you have a ReportError method - do whatever makes sense!
    ReportError("Could not attach to the Python win32ui extensions");
    return FALSE;
  }
...

Note the following:

  • The first param - "import initscore" is the Python command that will be executed to kick in the Python side of the world. For Pythonwin, this is "import pywin.framework.startup" - see "initscore.py" below.
  • The second param may be empty or NULL, and defines an additional PythonPath to be added. This is useful if you do not want your application .py/.pyd files on the main PythonPath. In the example above, code not shown loads csScripts from the applications INI file.
  • The example above assumes the Python code is not responsible for creating the main application window. In the case of Pythonwin (where the Python code does create the main window) this call actually appears in InitApplication() for the CWinApp class. The example above assumes you have existing C++ code which creates the main frame window. Your Python code could create child windows, as the initscore.py file demonstrates.

And the Rest

Below is the rest of the code you need to implement. You may need to create these methods, as the AppWizard generated MFC application does not have some.

BOOL
GameApp::OnCmdMsg (UINT nID, int nCode,
void* pExtra, AFX_CMDHANDLERINFO*pHandlerInfo)
{
  // yield to Python first - send to the main frame, as there is no Python app object.
  if (glue.OnCmdMsg (m_pMainWnd, nID, nCode, pExtra, pHandlerInfo))
    return TRUE;
  else
    return CWinApp::OnCmdMsg (nID, nCode, pExtra, pHandlerInfo);
}

BOOL GameApp::PreTranslateMessage(MSG *pMsg)
{
  if (glue.PreTranslateMessage(pMsg))
    return TRUE;
  else
    return CWinApp::PreTranslateMessage(pMsg);
}
BOOL GameApp::OnIdle( LONG lCount )
{
  // call base class idle first
  if (CWinApp::OnIdle(lCount))
    return TRUE;
  return glue.OnIdle(lCount);
}

  • initscore.py

  • Below is the code for initscore.py. Obviously your code will vary, depending on your requirements.
import sys
import win32ui
# First step - redirect python output to the debugging device, until we
# can create a window to capture it.

# Note that this is only useful while debugging, and simply sends any
# Python output (ie, exceptions while developing the startup code) is
# printed to the MSVC debugger. Note that since this code was written,
# the win32trace module has appeared, giving another alternative to
# debugging this code.
class DebugOutput:
  softspace=1
  def write(self,message):
    win32ui.OutputDebug(message)
sys.stderr=sys.stdout=DebugOutput()

# One of your first priorities should be to set sys.stdout to somewhere useful,
# depending on what useful means to your application. This code simply creates
# the Pythonwin Interactive Window, which handles this automatically.

# Now here is the code that does the real work.
import win32con

from pywin.framework import intpyapp, app

class ScoreApp(intpyapp.InteractivePythonApp):
  def InitInstance(self):
    # Call the base class (if you want)
    intpyapp.InteractivePythonApp.InitInstance(self)
    # Do domething useful, specific to your app.
    # Here, we minimise the interactive window.
    # (after painting the main frame)
    win32ui.PumpWaitingMessages()
    interact.edit.currentView.GetParent().ShowWindow(win32con.SW_MINIMIZE)

#  def OnExitInstance(self):
#    return 0

app = ScoreApp()

And we are done


Win32 Debugger Documentation

Pythonwin Debugger Documentation

This documents the Win32 Debugger, and much of its functionality.

You may also wish to view the debugger overview, the debugger tutorial, or the known problems with the debugger.

This document contains the following topics

pywin.debugger package
Debugger Interface
GUI versus Non-GUI Issues
How It Works

pywin.debugger package

The debugger is a sub-package of Pythonwin, named pywin.debugger.

Debugger Interface

The debugger is based on the standard Python debugging modules. It is suggested you read the documentation on the "pdb" and "bdb" modules. This documentation can be located in the standard Python documentation:

The package exports the following functions:

GetDebugger()

Returns a debugger object. If there is already a debugger, then this function returns it (re-creating its window, if necessary). If there is no current debugger, a debugger is created.

The following functions operate almost identically to those described in the pdb documentation

set_trace()
brk() # alternative name

Like a hard-coded break-point, this function creates a debugger if necessary, and stops at the following statement. Note - putting this statement as the last line of a function may cause you to stop at an unexpected place!

post_mortem(traceback, exception_type = None, exception_value = None)

Perform post-mortem debugging of the passed traceback. This is useful for analysing the conditions that lead up to an exception.

run(cmd, globals=None, locals=None)

Begin debugging the command, in the globals and locals context.

runeval(expression, globals=None, locals=None)

Like "run" but treats the string as an expression to be evaluated.

GUI versus Non-GUI Issues

The Pythonwin debugger behaves differently depending on if the application being debugged is Pythonwin or not. If the host Python application is Pythonwin, then the debugger runs in "GUI" mode - otherwise in "non-GUI" mode.

If the application is not Pythonwin, then the debugger has far less control over the debugging environment. There are 2 main areas where this is most apparent.

Will we return?

In a non-GUI application, each time we leave the debugger (eg, to step through a line of code), we may never re-appear. We may be debugging the last statement of the program, or just may never hit another breakpoint until termination.

Therefore, the debugger will always prompt for file saves whenever stepping into code. Although the file will be saved, the changes will probably not take affect until the program is restarted.

Are there any messages for me?

When debugging non-GUI applications, there may not be a message loop. As the debugger is a GUI application, it needs a message loop to respond to user interaction, etc.

There is an option for the debugger to "hide in non-GUI applications", which by default is enabled. This means that each time a statement is executed, the entire debugger environment is hidden! In fact, it may never re-appear (see above).

If you disable this option, then debugging these applications will be smoother, but the side-effects will depend on your host application.

If debugging a Python.exe program (or any other console program), the debugger will not be hidden, but will not respond at all to any user input while the host program is executing. In fact, the debugger will appear to have totally hung. The debugger has not hung - it just can not process messages. It will either spring back into life when a breakpoint etc. it hit, or vanish when the host application exits.

If debugging inside another GUI application (such as Excel, or MS Internet Explorer), then there is a reasonable chance that the debugger will continue to operate totally normally while the host is running (ie, just as it does under Pythonwin)

Let me out of here

The other potential area where things may get strange is shutting down the main application frame while debugging. In general, this should shut down normally, but sometimes may not!

How It Works

For those who care, the debugger uses the standard Python debugger hooks. Whenever interaction with the user is required, the debugger creates a new message loop, right under the code being debugged.

While this message loop is processing messages, the code is broken, and the user can interact with the debugger. Whenever the debugger is about to return control to Python itself, it breaks out of the message loop, leaving the code to execute as it was.


Known Problems

Pythonwin Debugger Known Problems

This document lists the currently known problems with the pywin.debugger package.

You may also wish to view the debugger overview, the debugger tutorial, or the general debugger documentation.

Exiting the debugger on Windows 95 sometimes causes a crash.

There is a problem with the "hierlist" control on Windows 95. I don't know what it is.

Closing the main debugger application while debugging may cause strange results.

This is particularly true when debugging non-Pythonwin applications. I have made some efforts in this area, but it is pretty hard and complex.

Closing the debugger dialog, selecting "End/Close" from one of the property pages, or "Close" from the debugging toolbar should always work as expected.

Debugging the bottom call-stack does not work as expected.

If you are ever debugging a function that is the only function in the call-stack (ie you are at the bottom stack), then the functions "run" "step out" and "step over" may not work as expected - each of these operations may function as a single-step.

You will need to single-step out of this entire function.

Output window does not show function arguments

This is a restriction in the core Python interpreter, caused by the introduction of keyword arguments. When Python supports it again, so will I.


Win32 Debugger Tutorial

Pythonwin Debugger Tutorial

NOTE: This debugger used to be known as the "win32dbg" package. Also, we have recently upgraded to a much better editor control. The screen shots in this tutorial do not reflect these recent changes. Although "win32dbg" will still work, you should substitute "pywin.debugger" for "win32dbg" in the screen-shots, and hopefully the new editor control will make the break-points etc even more obvious.

This tutorial shows how to debug a file provided with Pythonwin distribution. The module we will debug is called "fail.py", and is provided purely for demonstrating and testing the debugger. This file is located in the Pythonwin\pywin\debugger directory.

This document does not attempt to discuss general debugging concepts. It is assumed that you understand the concepts of "Step In" to a routine, "Step Over" a routine, "call stack", "break-point" etc.

When you have completed the tutorial, you should read the general debugger documentation.

In general, the user interface should be fairly intuitive. All toolbar items have status bar text and tool-tips, which will help determine their function.

This tutorial covers the following topics:

Preparation for the tutorial
Starting the Debugger
Setting a Breakpoint
Stepping through the code
Examining the current context
Postmortem diagnostics

Preparation for the tutorial

To prepare for the tutorial, ensure you have Pythonwin installed, then start either Pythonwin/Python, Windows Explorer, or an "MS-DOS" prompt

Starting the Debugger

From Pythonwin or Python.exe

At the interactive window, type:

import pywin.debugger.fail<enter>

From Windows Explorer

Navigate to the Pythonwin\pywin\debugger directory, and double-click on the file "fail.py"

From the MS-DOS Prompt

Change to the Pythonwin\pywin\debugger directory.

For Windows NT users, type:

fail.py<enter>

Or Windows 95/98 (sob - you would hope that 98 would have fixed some of 95s dumbness!)

<path to python.exe>\python.exe fail.py

or

start fail.py

Using the Debugger

If all goes well, you should see the debugger appear in a full GUI frame, with a particular line in fail.py highlighted. Part of the screen should look something like:

NOTE: This screen capture is wrong - hopefully what you can see on your screen is better and more obvious than this old picture!

In this case, the Python program has executed until it hit the statement:

pywin.debugger.set_trace()

This statement is effectively a hard-coded break-point, which creates a debugger, and causes it to stop at the statement following the set_trace().

The Debugger is showing the blue line as the "current" line - this is the next statement to be executed.

Setting a Break-point

Our next step is to set a breakpoint somewhere inside the code that remains to be executed. As you can see, the Python program is about to call the function "c()". Examining the source, we can see that c() calls d(). The first line of d() is a good spot!

To set a break-point, perform the following steps.

  • Select the "fail.py" source file (or more generally, you can open another source file, and set a break-point there).
  • Scroll to the location where a breakpoint should be set, and ensure the carat (edit box cursor) is on the line.
  • Either: Select the "Hand" icon on the debugger toolbar. Or: Select the "Breakpoints" property page, and select the "Add/Clear" button.

The debugger should then look something like:

Note the current line is still colored blue, and the newly added break-point is colored red. You can also select the "Breakpoints" property-page and see the breakpoint listed there.

We are now ready to run the debugger.

  • Either: Select "Go" from one of the property-pages, or select the "Run" toolbar item.

The debugger should vanish briefly, then re-appear after hitting the breakpoint.

Notes

  • The behaviour of the "hiding" can be changed, but with caveats - see the general debugger documentation for details on GUI versus non-GUI issues).
  • The debugger will show the break-point line in blue - there will be no visual indication the line is both a break-point, and the current line. As soon as the current line moves off this line, it will return to its break-point color.

Stepping through the code

Use the "Step" toolbar or dialog button to step through code. Stepping from the current location will step over the assignment of 1 to the local variable d. Continuing to step will step into the function e().

Examining the current context

Just to jump in, we should have a play with the property pages.

  • Use the "Call Stack" page to see the current context. Double-clicking will change the "current context", and change the highlight. Expand and collapse each entry to view locals and globals.
  • Use the "Interactive" page to view and change variables in the current context. For example, assuming that "d()" is still the top call stack, entering "d<enter>" into the interactive page will print "1". Almost any Python expression/statement can be executed here, from the current context. Use the "Call Stack" page to change the current context (ie, make another stack entry blue), and notice how "d" is likely to evaluate to the function d() (ie, the interactive page has changed contexts)

Post-mortem diagnostics

The fail.py as distributed is setup to demonstrate "port-mortem" debugging - ie, debugging after an exception has occurred.

To demonstrate post-mortem diagnostics, simply:

  • Click on the "Run" toolbar item or property page button

The debugger will again vanish, and re-appear looking something like:

Notice that there is now a new property page, titled "Exception". This shows the traceback that Python would normally print if this exception was unhandled.

All other features of the debugger work as expected. You can view each call stacks local and globals, etc. However, you can not force Python to ignore, or otherwise alter the normal Python exception processing. (except, or course, by stopping the debugger)

OK - now jump to the general debugger documentation to get a more detailed picture.