Python for Win32 Extensions Help

Important Release Notes

  • View the change log
  • View information regarding Python 3.x support

    External Resources

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

    Python Objects

  • Modules
  • Objects

    Overviews and other documentation

  • ASP and Python
  • DirectSound examples
  • 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
  • Important notes about COM currency support changes
  • win32com documentation index
  • win32com readme

    Pythonwin and win32ui

  • Pythonwin Debugger documentation
  • Pythonwin readme
  • The Pythonwin environment

    ISAPI filters and extensions

  • Introduction to Python ISAPI support
  • Constants

    Help file built: 11/14/19


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
  • Windows NT Security -- Impersonation


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


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


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

  • _winxptheme
  • mmapfile
  • odbc
  • perfmon
  • pywintypes
  • servicemanager
  • timer
  • win2kras
  • win32api
  • win32clipboard
  • win32console
  • win32cred
  • win32crypt
  • win32event
  • win32evtlog
  • win32file
  • win32gui
  • win32help
  • win32inet
  • win32job
  • win32lz
  • win32net
  • win32pdh
  • win32pipe
  • win32print
  • win32process
  • win32profile
  • win32ras
  • win32security
  • win32service
  • win32transaction
  • win32ts
  • win32wnet
  • wincerapi


_winxptheme

Module _winxptheme

A module which provides an interface to the Windows XP 'theme' API.
Note that this module will fail to load on non-Windows XP versions. Generally you should use the 'winxptheme' module which will load on all Windows versions, and provide implementations of IsThemeActive() or IsAppThemed() which return False when XP is not used, and provides all objects from this module when XP is used. See winxptheme.py for more details.

Methods

OpenThemeData
Open the theme data for the specified HWND and semi-colon separated list of class names.
OpenThemeData() will try each class name, one at a time, and use the first matching theme info found. If a match is found, a theme handle to the data is returned. If no match is found, a "NULL" handle is returned.
When the window is destroyed or a WM_THEMECHANGED msg is received, _winxptheme::CloseThemeData should be called to close the theme handle.

CloseThemeData
Closes the theme data handle. This should be done when the window being themed is destroyed or whenever a WM_THEMECHANGED msg is received (followed by an attempt to create a new Theme data handle).

DrawThemeBackground
Draws the theme-specified border and fill for the "iPartId" and "iStateId". This could be based on a bitmap file, a border and fill, or other image description.

DrawThemeText
Draws the text using the theme-specified color and font for the "iPartId" and "iStateId".

GetThemeBackgroundContentRect
Gets the size of the content for the theme-defined background. This is usually the area inside the borders or Margins.

GetThemeBackgroundExtent
Calculates the size/location of the theme- specified background based on the "pContentRect".

IsThemeActive
Can be used to test if a system theme is active for the current user session.
use the API _winxptheme::IsAppThemed to test if a theme is active for the calling process.

IsAppThemed
Returns True if a theme is active and available to the current process

GetWindowTheme
If window is themed, returns its most recent HTHEME from OpenThemeData() - otherwise, returns NULL.

EnableThemeDialogTexture
Enables/disables dialog background theme. This method can be used to tailor dialog compatibility with child windows and controls that may or may not coordinate the rendering of their client area backgrounds with that of their parent dialog in a manner that supports seamless background texturing.

IsThemeDialogTextureEnabled
Reports whether the dialog supports background texturing.

GetThemeAppProperties
Returns the app property flags that control theming

EnableTheming
Enables or disables themeing for the current user in the current and future sessions.

SetWindowTheme
Rredirects an existing Window to use a different section of the current theme information than its class normally asks for.

GetCurrentThemeName
Get the name of the current theme in-use, the canonical color scheme name (not the display name) and the canonical size name (not the display name).


_winxptheme.CloseThemeData

CloseThemeData(hTheme)

Closes the theme data handle. This should be done when the window being themed is destroyed or whenever a WM_THEMECHANGED msg is received (followed by an attempt to create a new Theme data handle).

Parameters

hTheme : PyHTHEME

Open theme data handle (returned from prior call to OpenThemeData() API).


_winxptheme.DrawThemeBackground

DrawThemeBackground(hTheme, hdc, iPartId, iStateId, pRect, pClipRect)

Draws the theme-specified border and fill for the "iPartId" and "iStateId". This could be based on a bitmap file, a border and fill, or other image description.

Parameters

hTheme : PyHTHEME

theme data handle

hdc : int

HDC to draw into

iPartId : int

part number to draw

iStateId : int

state number (of the part) to draw

pRect : rect

defines the size/location of the part

pClipRect : rect

optional clipping rect (don't draw outside it)


_winxptheme.DrawThemeText

DrawThemeText(hTheme, hdc, iPartId, iStateId, pszText, dwCharCount, dwTextFlags, dwTextFlags2, pRect)

Draws the text using the theme-specified color and font for the "iPartId" and "iStateId".

Parameters

hTheme : PyHTHEME

theme data handle

hdc : int

HDC to draw into

iPartId : int

part number to draw

iStateId : int

state number (of the part) to draw

pszText : string

actual text to draw

dwCharCount : int

number of chars to draw (-1 for all)

dwTextFlags : int

same as DrawText() "uFormat" param

dwTextFlags2 : int

additional drawing options

pRect : rect

defines the size/location of the part


_winxptheme.EnableThemeDialogTexture

EnableThemeDialogTexture(hdlg, dwFlags)

Enables/disables dialog background theme. This method can be used to tailor dialog compatibility with child windows and controls that may or may not coordinate the rendering of their client area backgrounds with that of their parent dialog in a manner that supports seamless background texturing.

Parameters

hdlg : int

The window handle of the target dialog

dwFlags : int

ETDT_ENABLE to enable the theme-defined dialog background texturing,
ETDT_DISABLE to disable background texturing,
ETDT_ENABLETAB to enable the theme-defined background texturing using the Tab texture


_winxptheme.EnableTheming

EnableTheming(fEnable)

Enables or disables themeing for the current user in the current and future sessions.

Parameters

fEnable : bool

if False, disable theming & turn themes off.
if True, enable themeing and, if user previously had a theme active, make it active now.


_winxptheme.GetCurrentThemeName

(string, string, string) = GetCurrentThemeName()

Get the name of the current theme in-use, the canonical color scheme name (not the display name) and the canonical size name (not the display name).


_winxptheme.GetThemeAppProperties

int = GetThemeAppProperties()

Returns the app property flags that control theming


_winxptheme.GetThemeBackgroundContentRect

rect = GetThemeBackgroundContentRect(hTheme, hdc , iPartId , iStateId , pBoundingRect )

Gets the size of the content for the theme-defined background. This is usually the area inside the borders or Margins.

Parameters

hTheme : PyHTHEME

theme data handle

hdc : int

(optional) device content to be used for drawing

iPartId : int

part number to draw

iStateId : int

state number (of the part) to draw

pBoundingRect : rect

the outer RECT of the part being drawn

Return Value

The result is a rect with the content area


_winxptheme.GetThemeBackgroundExtent

rect = GetThemeBackgroundExtent(hTheme, hdc , iPartId , iStateId , pContentRect )

Calculates the size/location of the theme- specified background based on the "pContentRect".

Parameters

hTheme : PyHTHEME

theme data handle

hdc : int

(optional) device content to be used for drawing

iPartId : int

part number to draw

iStateId : int

state number (of the part) to draw

pContentRect : rect

RECT that defines the content area

Return Value

Result is a rect with the overall size/location of part


_winxptheme.GetWindowTheme

PyHTHEME = GetWindowTheme(hwnd)

If window is themed, returns its most recent HTHEME from OpenThemeData() - otherwise, returns NULL.

Parameters

hwnd : int

The window to get the HTHEME of


_winxptheme.IsAppThemed

bool = IsAppThemed()

Returns True if a theme is active and available to the current process


_winxptheme.IsThemeActive

bool = IsThemeActive()

Can be used to test if a system theme is active for the current user session.
use the API _winxptheme::IsAppThemed to test if a theme is active for the calling process.


_winxptheme.IsThemeDialogTextureEnabled

bool = IsThemeDialogTextureEnabled(hdlg)

Reports whether the dialog supports background texturing.

Parameters

hdlg : int

The window handle of the target dialog


_winxptheme.OpenThemeData

PyHTHEME = OpenThemeData(hwnd, pszClassList )

Open the theme data for the specified HWND and semi-colon separated list of class names.
OpenThemeData() will try each class name, one at a time, and use the first matching theme info found. If a match is found, a theme handle to the data is returned. If no match is found, a "NULL" handle is returned.
When the window is destroyed or a WM_THEMECHANGED msg is received, _winxptheme::CloseThemeData should be called to close the theme handle.

Parameters

hwnd : int

Window handle of the control/window to be themed

pszClassList : string

Class name (or list of names) to match to theme data section. if the list contains more than one name, the names are tested one at a time for a match. If a match is found, OpenThemeData() returns a theme handle associated with the matching class. This param is a list (instead of just a single class name) to provide the class an opportunity to get the "best" match between the class and the current theme. For example, a button might pass L"OkButton, Button" if its ID=ID_OK. If the current theme has an entry for OkButton, that will be used. Otherwise, we fall back on the normal Button entry.


_winxptheme.SetWindowTheme

SetWindowTheme(hwnd, pszSubAppName, pszSubIdList)

Rredirects an existing Window to use a different section of the current theme information than its class normally asks for.

Parameters

hwnd : int

The handle of the window (cannot be 0)

pszSubAppName : string/None

App (group) name to use in place of the calling app's name. If NULL, the actual calling app name will be used.

pszSubIdList : string/None

A semicolon separated list of class Id names to use in place of actual list passed by the window's class. if NULL, the id list from the calling class is used.


mmapfile

Module mmapfile

Compiled extension module that provides access to the memory mapped file API

Methods

mmapfile
Creates or opens a file mapping, and maps a view into memory


mmapfile.mmapfile

Pymmapfile = mmapfile(File, Name , MaximumSize , FileOffset , NumberOfBytesToMap )

Creates or opens a memory mapped file. This method uses the following API functions: CreateFileMapping, MapViewOfFile, VirtualQuery

Parameters

File : str

Name of file. Use None or '' when opening an existing named mapping, or to use system pagefile.

Name : str

Name of mapping object to create or open, can be None

MaximumSize=0 : int

Size of file mapping to create, should be specified as a multiple of system page size (see win32api::GetSystemInfo). Defaults to size of existing file if 0. If an existing named mapping is opened, the returned object will have the same size as the original mapping.

FileOffset=0 : int

Offset into the file at which to create view. This should be specified as a multiple of system allocation granularity. (see win32api::GetSystemInfo)

NumberOfBytesToMap=0 : int

Size of view to create, also a multiple of system page size. If 0, view will span from offset to end of file mapping.

Comments

Accepts keyword args.

Win32 API References

Search for CreateFileMapping at msdn, google or google groups.

Search for MapViewOfFile at msdn, google or google groups.

Search for VirtualQuery at msdn, google or google groups.


odbc

Module odbc

A Python wrapper around the ODBC API.

Methods

odbc
Creates an connection object.

SQLDataSources
Enumerates ODBC data sources.


odbc.SQLDataSources

(name, desc)/None = SQLDataSources(direction)

Enumerates ODBC data sources

Parameters

direction : int

One of SQL_FETCH_* flags indicating how to retrieve data sources

Return Value

The result is None when SQL_NO_DATA is returned from ODBC.


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 wraps Performance Monitor functions.

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.

Time
Makes a PyTime object from the argument.

CreateGuid
Creates a new, unique GUIID. MS_WINCE

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

HANDLE
Creates a new PyHANDLE object.

HKEY
Creates a new PyHKEY object.

WAVEFORMATEX
Creates a new PyWAVEFORMATEX 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, is_bytes )

Creates a new IID object

Parameters

iidString : string/Unicode

A string representation of an IID, or a ProgID.

is_bytes=False : bool

Indicates if the first param is actually the bytes of an IID structure.


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

Creates a new Unicode object


pywintypes.UnicodeFromRaw

PyUnicode = UnicodeFromRaw(str)

Creates a new Unicode object from raw binary data

Parameters

str : string/buffer

The string containing the binary data.


pywintypes.WAVEFORMATEX

PyWAVEFORMATEX = WAVEFORMATEX()

Creates a new WAVEFORMATEX object


servicemanager

Module servicemanager

A module that interfaces with the Windows Service Control Manager. While this module can be imported by regular Python programs, it is only useful when used by a Python program hosting a service - and even then is generally used automatically by the Python Service framework. See the pipeTestService sample for an example of using this module.
The module win32service and win32serviceutil provide other facilities for controlling and managing services.

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

RunningAsService
Indicates if the code is running as a service.

SetEventSourceName
Sets the event source name for event log entries written by the service.


servicemanager.CoInitializeEx

CoInitializeEx()

Initialize OLE with additional options.


servicemanager.CoUninitialize

CoUninitialize()

Unitialize OLE


servicemanager.Debugging

True/False = Debugging(newVal)

Indicates if the service is running in debug mode and optionally toggles the debug flag.

Parameters

newVal=-1 : int

If not -1, a new value for the debugging flag. The result is the value of the flag before it is changed.


servicemanager.Finalize

Finalize()


servicemanager.Initialize

Initialize(eventSourceName, eventSourceFile)

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

Parameters

eventSourceName=None : PyUnicode

The event source name

eventSourceFile=None : PyUnicode

The name of the file (generally a DLL) with the event source messages.


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

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.

extra_args=False : bool

Is this callback expecting the additional 2 args passed by HandlerEx?

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.


servicemanager.RunningAsService

True/False = RunningAsService()

Indicates if the code is being executed as a service.


servicemanager.SetEventSourceName

SetEventSourceName(sourceName, registerNow)

Sets the event source name for event log entries written by the service.

Parameters

sourceName : string

The event source name

registerNow=False : bool

If True, the event source name in the registry will be updated immediately. If False, the name will be registered the first time an event log entry is written via any pythonservice methods (or possibly never if no record if written).
Note that in some cases, the service itself will not have permission to write the event source in the registry. Therefore, it would be prudent for your installation program to call this function with registerNow=True, to ensure your services can write useful entries.


timer

Module timer

Extension that wraps Win32 Timer functions

Methods

set_timer
Creates a timer that executes a callback function

kill_timer
Stops a timer


timer.kill_timer

boolean = kill_timer(IDEvent)

Creates a timer that executes a callback function

Parameters

IDEvent : int

Timer id as returned by timer::set_timer

Comments

Uses the KillTimer API function.


timer.set_timer

int = set_timer(Elapse, TimerFunc )

Creates a timer that executes a callback function

Parameters

Elapse : int

Timer period, in milliseconds

TimerFunc : function

Callback function. Will be called with with 2 int args: (timer_id, time)

Comments

Uses the SetTimer function.

Return Value

Returns the id of the timer, which can be passed to kill_timer to stop it.


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=None : PyHANDLE

Handle to the parent window for the UI dialog.

Win32 API References

Search for RasGetEapUserIdentity at msdn, google or google groups.


win32api

Module win32api

A module, encapsulating the Windows Win32 API.

Methods

AbortSystemShutdown
Aborts a system shutdown

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

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.

ChangeDisplaySettings
Changes video mode for default display

ChangeDisplaySettingsEx
Changes video mode for specified display

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.

EnumDisplayDevices
Obtain information about the display devices in a system

EnumDisplayMonitors
Lists monitors for a device context

EnumDisplaySettings
Lists available modes for specified device

EnumDisplaySettingsEx
Lists available modes for a display device, with optional flags

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

GetComputerNameEx
Retrieves a NetBIOS or DNS name associated with the local computer

GetComputerObjectName
Retrieves the local computer's name in a specified format

GetMonitorInfo
Retrieves information for a monitor by handle

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.

GetDateFormat
Formats a date as a date string for a specified locale.

GetDiskFreeSpace
Retrieves information about a disk.

GetDiskFreeSpaceEx
Retrieves information about a disk.

GetDllDirectory
Retrieves the DLL search path

GetDomainName
Returns the current domain name

GetEnvironmentVariable
Retrieves the value of an environment variable.

GetEnvironmentVariableW
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

GetHandleInformation
Retrieves a handle's flags.

GetKeyboardLayout
Retrieves the active input locale identifier

GetKeyboardLayoutList
Returns a sequence of all locale ids in the system

GetKeyboardLayoutName
Retrieves the name of the active input locale identifier (formerly called the keyboard layout).

GetKeyboardState
Retrieves the status of the 256 virtual keys on the keyboard.

GetKeyState
Retrives the last known key state for a key.

GetLastError
Retrieves the last error code known by the system.

GetLastInputInfo
Returns time of last input event in tick count

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.

GetModuleFileNameW
Retrieves the unicode filename of the specified module.

GetModuleHandle
Returns the handle of an already loaded DLL.

GetPwrCapabilities
Retrieves system's power capabilities

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.

GetSystemFileCacheSize
Returns the amount of memory reserved for file cache

SetSystemFileCacheSize
Sets the amount of memory reserved for file cache

GetSystemInfo
Retrieves information about the current system.

GetNativeSystemInfo
Retrieves information about the current system for a Wow64 process.

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.

GetTimeFormat
Formats a time as a time string for a specified locale.

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.

GlobalMemoryStatus
Returns systemwide memory usage

GlobalMemoryStatusEx
Returns physical and virtual memory usage

keybd_event
Simulate a keyboard event

mouse_event
Simulate a mouse event

LoadCursor
Loads a cursor.

LoadKeyboardLayout
Loads a new locale id

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.

MapVirtualKeyEx
Translates (maps) a virtual-key code into a scan code or character value, or translates a scan code into a virtual-key code.

MessageBeep
Plays a predefined waveform sound.

MessageBox
Display a message box.

MonitorFromPoint
Finds monitor that contains a point

MonitorFromRect
Finds monitor that has largest intersection with a rectangle

MonitorFromWindow
Finds monitor that contains a window

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.

RegCopyTree
Copies an entire registry key to another location

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

RegCreateKeyEx
Extended version of RegCreateKey

RegDeleteKey
Deletes the specified key.

RegDeleteKeyEx
Deletes a registry key from 32 or 64 bit registry view

RegDeleteTree
Recursively deletes a key's subkeys and values

RegDeleteValue
Removes a named value from the specified registry key.

RegEnumKey
Enumerates subkeys of the specified open registry key.

RegEnumKeyEx
Enumerates subkeys of the specified open registry key.

RegEnumKeyExW
Unicode version of RegEnumKeyEx

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.

RegOpenCurrentUser
Opens HKEY_CURRENT_USER for impersonated user

RegOpenKey
Alias for win32api::RegOpenKeyEx

RegOpenKeyEx
Opens the specified key.

RegOpenKeyTransacted
Opens a registry key as part of a transaction.

RegOverridePredefKey
Redirects one of the predefined keys to different 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.

RegQueryInfoKeyW
Returns information about an open registry key

RegRestoreKey
Restores a key and subkeys from a saved registry file

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

RegSaveKeyEx
Extended version of RegSaveKey

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.

SetConsoleCtrlHandler
Adds or removes an application-defined HandlerRoutine function from the list of handler functions for the calling process.

SetConsoleTitle
Sets the title for the current console.

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

SetDllDirectory
Modifies the application-specific DLL search path

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.

SetLastError
Sets the last error code known for the current thread.

SetSysColors
Changes color of various window elements

SetLocalTime
Changes the system's local time.

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.

SetEnvironmentVariable
Creates, deletes, or changes the value of an environment variable.

SetEnvironmentVariable
Creates, deletes, or changes the value of an environment variable.

SetEnvironmentVariableW
Creates, deletes, or changes the value of an environment variable.

SetHandleInformation
Sets a handles's flags

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

SetSystemPowerState
Powers machine down to a suspended state

SetThreadLocale
Sets the current thread's locale.

SetTimeZoneInformation
Sets the system time-zone information.

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.

ToAsciiEx
Translates the specified virtual-key code and keyboard state to the corresponding character or characters.

Unicode
Creates a new PyUnicode object

UpdateResource
Updates a resource in a PE file.

VkKeyScan
Translates a character to the corresponding virtual-key code and shift state.

VkKeyScan
Translates a character to the corresponding virtual-key code and shift state.

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.

MAKEWORD
creates a WORD value by concatenating the specified values.

MAKELONG
creates a LONG value by concatenating the specified values.


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

Search for AbortSystemShutdown at msdn, google or google groups.


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

Search for Beep at msdn, google or google groups.


win32api.BeginUpdateResource

PyHANDLE = 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.ChangeDisplaySettings

int = ChangeDisplaySettings(DevMode, Flags )

Changes video mode for default display

Parameters

DevMode : PyDEVMODE

A PyDEVMODE object as returned from EnumDisplaySettings, or None to reset to default settings from registry

Flags : int

One of the win32con.CDS_* constants, or 0

Return Value

Returns DISP_CHANGE_SUCCESSFUL on success, or one of the DISP_CHANGE_* error constants on failure


win32api.ChangeDisplaySettingsEx

int = ChangeDisplaySettingsEx(DeviceName, DevMode , Flags )

Changes video mode for specified display

Parameters

DeviceName=None : str

Name of device as returned by win32api::EnumDisplayDevices, use None for default display device

DevMode=None : PyDEVMODE

A PyDEVMODE object as returned from win32api::EnumDisplaySettings, or None to reset to default settings from registry

Flags=0 : int

One of the win32con.CDS_* constants, or 0

Comments

Accepts keyword arguments

Return Value

Returns DISP_CHANGE_SUCCESSFUL on success, or one of the DISP_CHANGE_* error constants on failure


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

Search for ClipCursor at msdn, google or google groups.


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

Search for CopyFile at msdn, google or google groups.


win32api.DebugBreak

DebugBreak()

Breaks into the C debugger

Win32 API References

Search for DebugBreak at msdn, google or google groups.


win32api.DeleteFile

DeleteFile(fileName)

Deletes the specified file.

Parameters

fileName : string/PyUnicode

File to delete.

Win32 API References

Search for DeleteFile at msdn, google or google groups.


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

Search for DragFinish at msdn, google or google groups.


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

Search for DragQueryFile at msdn, google or google groups.

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.

Comments

When duplicating a handle for a different process, you should either keep a reference to the returned PyHANDLE, or call .Detach() on it to prevent it from being closed prematurely.


win32api.EndUpdateResource

EndUpdateResource(handle, discard)

Ends a resource update cycle of a PE file.

Parameters

handle : PyHANDLE

The update-file handle.

discard : int

Flag to discard all writes.


win32api.EnumDisplayDevices

PyDISPLAY_DEVICE = EnumDisplayDevices(Device, DevNum , Flags )

Obtain information about the display devices in a system

Parameters

Device=None : string

Name of device, use None to obtain information for the display adapter(s) on the machine, based on DevNum

DevNum=0 : int

Index of device of interest, starting with zero

Flags=0 : int

Reserved, use 0 if passed in

Comments

Accepts keyword arguments


win32api.EnumDisplayMonitors

list = EnumDisplayMonitors(hdc, rcClip )

Lists display monitors for a given device context and area

Parameters

hdc=None : PyHANDLE

Handle to device context, use None for virtual desktop

rcClip=None : PyRECT

Clipping rectangle, can be None

Comments

Accepts keyword arguments

Return Value

Returns a sequence of tuples. For each monitor found, returns a handle to the monitor, device context handle, and intersection rectangle: (hMonitor, hdcMonitor, PyRECT)


win32api.EnumDisplaySettings

PyDEVMODE = EnumDisplaySettings(DeviceName, ModeNum )

List available modes for specified display device

Parameters

DeviceName=None : string

Name of device as returned by win32api::EnumDisplayDevices, use None for default display device

ModeNum=0 : int

Index of setting to return, or one of ENUM_CURRENT_SETTINGS, ENUM_REGISTRY_SETTINGS

Comments

Accepts keyword arguments


win32api.EnumDisplaySettingsEx

PyDEVMODE = EnumDisplaySettingsEx(DeviceName, ModeNum , Flags )

Lists available modes for a display device, with optional flags

Parameters

DeviceName=None : string

Name of device as returned by win32api::EnumDisplayDevices. Can be None for default display

ModeNum : int

Index of setting to return, or one of ENUM_CURRENT_SETTINGS, ENUM_REGISTRY_SETTINGS

Flags=0 : int

EDS_RAWMODE (2) is only defined flag

Comments

Accepts keyword arguments


win32api.EnumResourceLanguages

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

List languages for a resource

Parameters

hmodule : PyHANDLE

Handle to the module that contains resource

lpType : PyResourceId

Resource type, can be string or integer

lpName : PyResourceId

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 : PyHANDLE

The handle to the module to enumerate.

resType : PyResourceId

The type of resource to enumerate. (win32con.RT_*). If passed as a string, form is '#' sign followed by decimal number. eg RT_ANICURSOR would be '#21'

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

Search for AbortSystemShutdown at msdn, google or google groups.


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

Search for AbortSystemShutdown at msdn, google or google groups.


win32api.ExpandEnvironmentStrings

string = ExpandEnvironmentStrings(in)

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

Parameters

in : string

String to expand

Win32 API References

Search for ExpandEnvironmentStrings at msdn, google or google groups.


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

Search for FindExecutable at msdn, google or google groups.

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

Search for FindFirstFile at msdn, google or google groups.

Search for FindNextFile at msdn, google or google groups.

Search for FindClose at msdn, google or google groups.

Return Value

Returns a sequence of WIN32_FIND_DATA tuples


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 : PyHANDLE

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 it should be a string containing the error msg; otherwise it is ignored.

messageId

The message ID.

languageID

The language ID.

inserts

The string inserts to insert.

Win32 API References

Search for GetLastError at msdn, google or google groups.

Search for FormatMessage at msdn, google or google groups.


win32api.FormatMessageW

PyUnicode = FormatMessageW(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 or PyHANDLE; if flags contain FORMAT_MESSAGE_FROM_STRING it should be a unicode string; otherwise it is ignored.

messageId

The message ID.

languageID

The language ID.

inserts

The string inserts to insert.

Win32 API References

Search for GetLastError at msdn, google or google groups.

Search for FormatMessage at msdn, google or google groups.


win32api.FreeLibrary

FreeLibrary(hModule)

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

Parameters

hModule : PyHANDLE

Specifies the handle to the module.

Win32 API References

Search for FreeLibrary at msdn, google or google groups.


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

Search for GenerateConsoleCtrlEvent at msdn, google or google groups.


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

Search for GetAsyncKeyState at msdn, google or google groups.

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

Search for GetCommandLine at msdn, google or google groups.


win32api.GetComputerName

string = GetComputerName()

Returns the local computer name

Win32 API References

Search for GetComputerName at msdn, google or google groups.


win32api.GetComputerNameEx

string = GetComputerNameEx(NameType)

Retrieves a NetBIOS or DNS name associated with the local computer

Parameters

NameType : int

Value from COMPUTER_NAME_FORMAT enum, win32con.ComputerName*

Win32 API References

Search for GetComputerNameEx at msdn, google or google groups.


win32api.GetComputerObjectName

string = GetComputerObjectName(NameFormat)

Retrieves the local computer's name in a specified format.

Parameters

NameFormat : int

EXTENDED_NAME_FORMAT value, win32con.Name*

Win32 API References

Search for GetComputerObjectName at msdn, google or google groups.


win32api.GetConsoleTitle

string = GetConsoleTitle()

Returns the title for the current 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

Search for GetCurrentProcess at msdn, google or google groups.


win32api.GetCurrentProcessId

int = GetCurrentProcessId()

Returns the thread ID for the current process.

Win32 API References

Search for GetCurrentProcessId at msdn, google or google groups.


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

Search for GetCurrentThread at msdn, google or google groups.


win32api.GetCurrentThreadId

int = GetCurrentThreadId()

Returns the thread ID for the current thread.

Win32 API References

Search for GetCurrentThreadId at msdn, google or google groups.


win32api.GetCursorPos

int, int = GetCursorPos()

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

Win32 API References

Search for GetCursorPos at msdn, google or google groups.


win32api.GetDateFormat

string = GetDateFormat(locale, flags , time , format )

Formats a date as a date string for a specified locale. The function formats either a specified date or the local system date.

Parameters

locale : int

flags : int

time : PyTime

The time to use, or None to use the current time.

format : string

May be None


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

Search for GetDiskFreeSpace at msdn, google or google groups.

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

Search for GetDiskFreeSpaceEx at msdn, google or google groups.

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

PyUnicode = GetDllDirectory()

Returns the DLL search path

Win32 API References

Search for GetDllDirectory at msdn, google or google groups.


win32api.GetDomainName

string = GetDomainName()

Returns the current domain name

Comments

This is a convenience wrapper of the Win32 function LookupAccountSid()


win32api.GetEnvironmentVariable

str = GetEnvironmentVariable(variable)

Retrieves the value of an environment variable.

Parameters

variable : str

The variable to get

Win32 API References

Search for GetEnvironmentVariable at msdn, google or google groups.

Return Value

Returns None if environment variable is not found


win32api.GetEnvironmentVariableW

PyUnicode = GetEnvironmentVariableW(Name)

Retrieves the unicode value of an environment variable.

Parameters

Name : str

The variable to retrieve

Win32 API References

Search for GetEnvironmentVariableW at msdn, google or google groups.

Return Value

Returns None if environment variable is not found


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. If this param is a unicode object, GetFileAttributesW is called.

Win32 API References

Search for GetFileAttributes at msdn, google or google groups.

Search for GetFileAttributesW at msdn, google or google groups.

Return Value

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


win32api.GetFileVersionInfo

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


win32api.GetFocus

int = GetFocus()

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

Win32 API References

Search for GetFocus at msdn, google or google groups.

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.

Comments

Please use win32file::GetFullPathName instead - it has better Unicode semantics.


win32api.GetHandleInformation

int = GetHandleInformation(Object)

Retrieves a handle's flags.

Parameters

Object : PyHANDLE

Handle to an object

Comments

Not available on Win98/Me

Return Value

Returns a combination of HANDLE_FLAG_INHERIT, HANDLE_FLAG_PROTECT_FROM_CLOSE


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

Search for GetKeyState at msdn, google or google groups.

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

int = GetKeyboardLayout(threadId)

retrieves the active input locale identifier (formerly called the keyboard layout) for the specified thread.

Parameters

threadId=0 : int

Comments

If the idThread parameter is zero, the input locale identifier for the active thread is returned.


win32api.GetKeyboardLayoutList

(int,..) = GetKeyboardLayoutList()

Returns a sequence of all locale ids currently loaded


win32api.GetKeyboardLayoutName

int = GetKeyboardLayoutName()

Retrieves the name of the active input locale identifier (formerly called the keyboard layout).


win32api.GetKeyboardState

string = GetKeyboardState()

Retrieves the status of the 256 virtual keys on the keyboard.

Win32 API References

Search for GetKeyboardState at msdn, google or google groups.

Return Value

The return value is a string of exactly 256 characters. Each character represents the bitmask for a key - see the Win32 documentation for more details.


win32api.GetLastError

int = GetLastError()

Retrieves the calling thread's last error code value.

Win32 API References

Search for GetLastError at msdn, google or google groups.


win32api.GetLastInputInfo

int = GetLastInputInfo()

Returns time of last input event in tick count

Win32 API References

Search for GetLastInputInfo at msdn, google or google groups.


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

Search for GetLogicalDriveStrings at msdn, google or google groups.

Return Value

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


win32api.GetLogicalDrives

int = GetLogicalDrives()

Returns a bitmask representing the currently available disk drives.

Win32 API References

Search for GetLogicalDrives at msdn, google or google groups.


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

PyUnicode = GetLongPathNameW(fileName)

Converts the specified path to its long form.

Parameters

fileName : PyUnicode

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 : PyHANDLE

Specifies the handle to the module.

Win32 API References

Search for GetModuleFileName at msdn, google or google groups.


win32api.GetModuleFileNameW

PyUnicode = GetModuleFileNameW(hModule)

Retrieves the unicode filename of the specified module.

Parameters

hModule : PyHANDLE

Specifies the handle to the module.

Win32 API References

Search for GetModuleFileName at msdn, google or google groups.


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

Search for GetModuleHandle at msdn, google or google groups.


win32api.GetMonitorInfo

dict = GetMonitorInfo(hMonitor)

Retrieves information for a monitor by handle

Parameters

hMonitor : PyHANDLE

Handle to a monitor

Comments

Accepts keyword args

Return Value

Returns a dictionary representing a MONITORINFOEX structure


win32api.GetNativeSystemInfo

tuple = GetNativeSystemInfo()

Retrieves information about the current system for a Wow64 process.

Win32 API References

Search for GetNativeSystemInfo at msdn, google or google groups.

Return Value

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


win32api.GetProcAddress

int = GetProcAddress(hModule, functionName )

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

Parameters

hModule : PyHANDLE

Specifies the handle to the module.

functionName : PyResourceId

Specifies the name of the procedure, or its ordinal value

Win32 API References

Search for GetProcAddress at msdn, google or google groups.


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.

Comments

This function is obsolete, applications should use the registry instead.

Win32 API References

Search for GetProfileSection at msdn, google or google groups.

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.

Comments

This function is obsolete, applications should use the registry instead.

Win32 API References

Search for GetProfileString at msdn, google or google groups.

Search for GetProfileInt at msdn, google or google groups.

Search for GetPrivateProfileString at msdn, google or google groups.

Search for GetPrivateProfileInt at msdn, google or google groups.

Return Value

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


win32api.GetPwrCapabilities

dict = GetPwrCapabilities()

Retrieves system's power capabilities

Comments

Requires Win2k or later.

Win32 API References

Search for GetPwrCapabilities at msdn, google or google groups.

Return Value

Returns a dict representing a SYSTEM_POWER_CAPABILITIES struct


win32api.GetShortPathName

string = GetShortPathName(path)

Obtains the short path form of the specified path.

Parameters

path : string/unicode

If a unicode object is passed, GetShortPathNameW will be called and a unicode object returned.

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

Search for GetShortPathName at msdn, google or google groups.


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

Search for GetSysColor at msdn, google or google groups.

Return Value

The return value is a windows RGB color representation.


win32api.GetSystemDefaultLCID

int = GetSystemDefaultLCID()

Retrieves the system default locale identifier.

Win32 API References

Search for GetSystemDefaultLCID at msdn, google or google groups.


win32api.GetSystemDefaultLangID

int = GetSystemDefaultLangID()

Retrieves the system default language identifier.

Win32 API References

Search for GetSystemDefaultLangID at msdn, google or google groups.


win32api.GetSystemDirectory

string = GetSystemDirectory()

Returns the path of the Windows system directory.

Win32 API References

Search for GetSystemDirectory at msdn, google or google groups.


win32api.GetSystemFileCacheSize

tuple = GetSystemFileCacheSize()

Returns the amount of memory reserved for file cache

Return Value

Returns a tuple containing the minimum and maximum cache sizes, and flags (combination of win32con.MM_WORKING_SET_* flags)


win32api.GetSystemInfo

tuple = GetSystemInfo()

Retrieves information about the current system.

Win32 API References

Search for GetSystemInfo at msdn, google or google groups.

Return Value

The return value is a tuple of 9 values, which corresponds to the Win32 SYSTEM_INFO structure. The element names are:
wProcessorArchitecture
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

Search for GetSystemMetrics at msdn, google or google groups.


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

Search for GetTempFileName at msdn, google or google groups.

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

int = GetTickCount()

Returns the number of milliseconds since windows started.


win32api.GetTimeFormat

string = GetTimeFormat(locale, flags , time , format )

Formats a time as a time string for a specified locale. The function formats either a specified time or the local system time.

Parameters

locale : int

flags : int

time : PyTime

The time to use, or None to use the current time.

format : string

May be None


win32api.GetTimeZoneInformation

tuple = GetTimeZoneInformation(times_as_tuples)

Retrieves the system time-zone information.

Parameters

times_as_tuples=False : bool

If true, the SYSTEMTIME elements are returned as tuples instead of a time object.

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/tuple : 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/tuple : 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

Search for GetUserDefaultLCID at msdn, google or google groups.


win32api.GetUserDefaultLangID

int = GetUserDefaultLangID()

Retrieves the user default language identifier.

Win32 API References

Search for GetUserDefaultLangID at msdn, google or google groups.


win32api.GetUserName

string = GetUserName()

Returns the current user name

Win32 API References

Search for GetUserName at msdn, google or google groups.


win32api.GetUserNameEx

string = GetUserNameEx(NameFormat)

Returns the current user name in format from EXTENDED_NAME_FORMAT enum

Parameters

NameFormat : int

EXTENDED_NAME_FORMAT value, win32con.Name*

Win32 API References

Search for GetUserNameEx at msdn, google or google groups.


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

tuple = GetVersionEx(format)

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

Parameters

format=0 : int

The format of the version info to return. May be 0 (for OSVERSIONINFO) or 1 (for OSVERSIONINFOEX)

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.

Return Value

or if the format param is 1, the return value is a tuple with:

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.

[5] int : wServicePackMajor

Major version number of the latest Service Pack installed on the system. For example, for Service Pack 3, the major version number is 3. If no Service Pack has been installed, the value is zero.

[6] int : wServicePackMinor

Minor version number of the latest Service Pack installed on the system. For example, for Service Pack 3, the minor version number is 0.

[7] int : wSuiteMask

Bit flags that identify the product suites available on the system. This member can be a combination of the VER_SUITE_* values.

[8] int : wProductType

Additional information about the system. This member can be one of the VER_NT_* values.

[9] int : wReserved


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 : PyHANDLE

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.

Comments

This function calls the GetWindowLongPtr Api function


win32api.GetWindowsDirectory

string = GetWindowsDirectory()

Returns the path of the Windows directory.


win32api.GlobalMemoryStatus

dict = GlobalMemoryStatus()

Returns systemwide memory usage

Return Value

Returns a dictionary representing a MEMORYSTATUS structure


win32api.GlobalMemoryStatusEx

dict = GlobalMemoryStatusEx()

Returns physical and virtual memory usage

Comments

Only available on Win2k and later.

Return Value

Returns a dictionary representing a MEMORYSTATUSEX structure


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

Search for InitiateSystemShutdown at msdn, google or google groups.


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

PyHANDLE = LoadCursor(hInstance, cursorid )

Loads a cursor.

Parameters

hInstance : PyHANDLE

Handle to the instance to load the resource from, or None to load a standard system cursor

cursorid : PyResourceId

The ID of the cursor. Can be a resource id or for system cursors, one of win32con.IDC_*

Win32 API References

Search for LoadCursor at msdn, google or google groups.


win32api.LoadKeyboardLayout

int = LoadKeyboardLayout(KLID, Flags )

Loads a new locale id

Parameters

KLID : string

Hex string containing a locale id, eg "00000409"

Flags=0 : int

Combination of win32con.KLF_* constants

Return Value

Returns the numeric locale id that was loaded


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

Search for LoadLibrary at msdn, google or google groups.


win32api.LoadLibraryEx

PyHANDLE = 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 : PyHANDLE

Reserved - must be zero

handle : flags

Specifies the action to take when loading the module.

Win32 API References

Search for LoadLibraryEx at msdn, google or google groups.


win32api.LoadResource

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

Finds and loads a resource from a PE file.

Parameters

handle : PyHANDLE

The handle of the module containing the resource. Use None for currrent process executable.

type : PyResourceId

The type of resource to load.

name : PyResourceId

The name or Id 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 : PyHANDLE

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

int = MAKELONG(low, high )

creates a LONG value by concatenating the specified values.

Parameters

low : int

Specifies the low-order byte of the new value.

high : int

Specifies the high-order byte of the new value.

Comments

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


win32api.MAKEWORD

int = MAKEWORD(low, high )

creates a WORD value by concatenating the specified values.

Parameters

low : int

Specifies the low-order byte of the new value.

high : int

Specifies the high-order byte of the new value.

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 : PyHANDLE

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

PyHANDLE = MonitorFromPoint(pt, Flags )

Finds monitor that contains a point

Parameters

pt : (int, int)

Tuple of 2 ints (x,y) specifying screen coordinates

Flags=0 : int

Flags that determine default behaviour, one of MONITOR_DEFAULTTONEAREST,MONITOR_DEFAULTTONULL,MONITOR_DEFAULTTOPRIMARY

Comments

Accepts keyword arguments

Return Value

Returns None if no monitor was found


win32api.MonitorFromRect

PyHANDLE = MonitorFromRect(rc, Flags )

Finds monitor that has largest intersection with a rectangle

Parameters

rc : PyRECT

Rectangle to be examined

Flags=0 : int

Flags that determine default behaviour, one of MONITOR_DEFAULTTONEAREST,MONITOR_DEFAULTTONULL,MONITOR_DEFAULTTOPRIMARY

Comments

Accepts keyword arguments

Return Value

Returns None if no monitor was found


win32api.MonitorFromWindow

PyHANDLE = MonitorFromWindow(hwnd, Flags )

Finds monitor that contains a window

Parameters

hwnd : PyHANDLE

Handle to a window

Flags=0 : int

Flags that determine default behaviour, one of MONITOR_DEFAULTTONEAREST,MONITOR_DEFAULTTONULL,MONITOR_DEFAULTTOPRIMARY

Comments

Accepts keyword arguments

Return Value

Returns None if no monitor was found


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

Search for MoveFile. at msdn, google or google groups.


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

Search for MoveFileEx at msdn, google or google groups.


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 : PyHANDLE

The hWnd of the window to receive the message.

idMessage : int

The ID of the message to post.

wParam=None : int

The wParam for the message

lParam=None : int

The lParam for the message

Win32 API References

Search for PostMessage at msdn, google or google groups.


win32api.PostQuitMessage

PostQuitMessage(exitCode)

Post a quit message to an app.

Parameters

exitCode=0 : int

The exit code

Win32 API References

Search for PostQuitMessage at msdn, google or google groups.


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=None : int/str

The wParam for the message

lParam=None : int/str

The lParam for the message

Win32 API References

Search for PostThreadMessage at msdn, google or google groups.


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

Search for RegCloseKey at msdn, google or google groups.


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

Search for RegConnectRegistry at msdn, google or google groups.

Return Value

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


win32api.RegCopyTree

RegCopyTree(KeySrc, SubKey, KeyDest)

Copies an entire registry key to another location

Parameters

KeySrc : PyHKEY

Registry key to be copied

SubKey : PyUnicode

Subkey to be copied, can be None

KeyDest : PyHKEY

The destination key

Comments

Accepts keyword args.

Requires Vista or later.


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

Search for RegCreateKey at msdn, google or google groups.

Return Value

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


win32api.RegCreateKeyEx

PyHKEY, int = RegCreateKeyEx(Key, SubKey , samDesired , Class , Options , SecurityAttributes , Transaction )

Extended version of RegCreateKey

Parameters

Key : PyHKEY/int

Registry key or one of win32con.HKEY_* values

SubKey : PyUnicode

Name of subkey to open or create.

samDesired : int

Access allowed to handle, combination of win32con.KEY_* constants. Can also contain standard access rights such as DELETE, WRITE_OWNER, etc.

Class=None : PyUnicode

Name of registry key class

Options=REG_OPTION_NON_VOLATILE : int

One of the winnt.REG_OPTION_* values

SecurityAttributes=None : PySECURITY_ATTRIBUTES

Specifies security for key and handle inheritance

Transaction=None : PyHANDLE

Handle to a transaction as returned by win32transaction::CreateTransaction

Comments

Implemented only as Unicode (RegCreateKeyExW). Accepts keyword arguments.

If a transaction handle is passed in, RegCreateKeyTransacted will be called (requires Vista or later)

Win32 API References

Search for RegCreateKeyEx at msdn, google or google groups.

Search for RegCreateKeyTransacted at msdn, google or google groups.

Return Value

Returns registry handle and flag indicating if key was opened or created (REG_CREATED_NEW_KEY or REG_OPENED_EXISTING_KEY)


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

Search for RegDeleteKey at msdn, google or google groups.


win32api.RegDeleteKeyEx

RegDeleteKeyEx(Key, SubKey, samDesired, Transaction)

Deletes a registry key from 32 or 64 bit registry view

Parameters

Key : PyHKEY/int

Registry key or one of win32con.HKEY_* values

SubKey : PyUnicode

Name of subkey to be deleted.

samDesired=0 : int

Can be KEY_WOW64_32KEY or KEY_WOW64_64KEY to specify alternate registry view

Transaction=None : PyHANDLE

Handle to a transaction as returned by win32transaction::CreateTransaction

Comments

Accepts keyword args.

Requires 64-bit XP, Vista, or later.

Key to be deleted cannot contain subkeys

If a transaction handle is specified, RegDeleteKeyTransacted is called

Win32 API References

Search for RegDeleteKeyEx at msdn, google or google groups.

Search for RegDeleteKeyTransacted at msdn, google or google groups.


win32api.RegDeleteTree

RegDeleteTree(Key, SubKey)

Recursively deletes a key's subkeys and values

Parameters

Key : PyHKEY

Handle to a registry key

SubKey : PyUnicode

Name of subkey to be deleted, or None for all subkeys and values

Comments

Accepts keyword args.

Requires Vista or later.


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

Search for RegDeleteValue at msdn, google or google groups.


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

Search for RegEnumKey at msdn, google or google groups.


win32api.RegEnumKeyEx

tuple = RegEnumKeyEx(Key)

Lists subkeys of a 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.

Return Value

Returns subkeys as tuples of (name, reserved, class, last write time). Reserved will always be 0.


win32api.RegEnumKeyExW

tuple = RegEnumKeyExW(Key)

Unicode version of RegEnumKeyEx

Parameters

Key : PyHKEY

Registry handle opened with KEY_ENUMERATE_SUB_KEYS, or one of win32con.HKEY_* constants

Return Value

Returns subkeys as tuples of (name, reserved, class, last write time). Reserved will always be 0.


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

Search for PyRegEnumValue at msdn, google or google groups.


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

Search for RegFlushKey at msdn, google or google groups.


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

Search for RegGetKeySecurity at msdn, google or google groups.


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

Search for RegLoadKey at msdn, google or google groups.


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

PyHKEY = RegOpenCurrentUser(samDesired)

Opens HKEY_CURRENT_USER for impersonated user

Parameters

samDesired=MAXIMUM_ALLOWED : int

Desired access, combination of win32con.KEY_*

Win32 API References

Search for RegOpenCurrentUser at msdn, google or google groups.


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

Search for RegOpenKeyEx at msdn, google or google groups.

Return Value

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


win32api.RegOpenKeyTransacted

PyHKEY = RegOpenKeyTransacted(Key, SubKey , samDesired , Transaction , Options )

Opens a registry key as part of a transaction

Parameters

Key : PyHKEY/int

Registry key or one of win32con.HKEY_* values

SubKey : PyUnicode

Name of subkey to open. Can be None to reopen an existing key.

samDesired : int

Access allowed to handle, combination of win32con.KEY_* constants. Can also contain standard access rights such as DELETE, WRITE_OWNER, etc.

Transaction : PyHANDLE

Handle to a transaction as returned by win32transaction::CreateTransaction

Options=0 : int

Reserved, use only 0

Comments

Accepts keyword arguments.

Requires Vista or later.

Win32 API References

Search for RegOpenKeyTransacted at msdn, google or google groups.

Return Value

Returns a transacted registry handle. Note that operations on subkeys are not automatically transacted.


win32api.RegOverridePredefKey

RegOverridePredefKey(Key, NewKey)

Redirects one of the predefined keys to different key

Parameters

Key : PyHKEY

One of the predefined registry keys (win32con.HKEY_*)

NewKey : PyHKEY

Registry key to which it will be redirected. Pass None to restore original key.

Comments

Requires Windows 2000 or later.

Win32 API References

Search for RegOverridePredefKey at msdn, google or google groups.


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

Search for RegQueryInfoKey at msdn, google or google groups.


win32api.RegQueryInfoKeyW

dict = RegQueryInfoKeyW(Key)

Returns information about an open registry key

Parameters

Key : PyHKEY

Handle to a registry key, or one of win32con.HKEY_* constants

Win32 API References

Search for RegQueryInfoKeyW at msdn, google or google groups.


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

Search for RegQueryValue at msdn, google or google groups.


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

Search for RegQueryValueEx at msdn, google or google groups.


win32api.RegRestoreKey

RegRestoreKey(Key, File, Flags)

Restores a key and subkeys from a saved registry file

Parameters

Key : PyHKEY

Handle to registry key to be restored. Can also be one of win32con.HKEY_* values.

File : PyUnicode

File from which to restore registry data

Flags=0 : int

One of REG_FORCE_RESTORE,REG_NO_LAZY_FLUSH,REG_REFRESH_HIVE,REG_WHOLE_HIVE_VOLATILE (from winnt)

Comments

Implemented only as Unicode (RegRestoreKeyW). Accepts keyword arguments.

Requires SeBackupPrivilege and SeRestorePrivilege

Win32 API References

Search for RegRestoreKey at msdn, google or google groups.


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

Search for RegSaveKey at msdn, google or google groups.


win32api.RegSaveKeyEx

RegSaveKeyEx(Key, File, SecurityAttributes, Flags)

Extended version of RegSaveKey

Parameters

Key : PyHKEY

Handle to a registry key or one of HKEY_CURRENT_CONFIG, HKEY_CURRENT_USER

File : PyUnicode

Name of file in which to save data. File must not already exist.

SecurityAttributes=None : PySECURITY_ATTRIBUTES

Specifies security for the file to be created

Flags=REG_LATEST_FORMAT : int

One of REG_STANDARD_FORMAT,REG_LATEST_FORMAT,REG_NO_COMPRESSION (from winnt.py)

Comments

Implemented only as Unicode (RegSaveKeyExW). Accepts keyword arguments.

SE_BACKUP_NAME privilege must be enabled.

Win32 API References

Search for RegSaveKeyEx at msdn, google or google groups.


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

Search for PyRegSetKeySecurity at msdn, google or google groups.


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

Search for RegSetValue at msdn, google or google groups.


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.
REG_QWORD | A 64-bit number.
REG_QWORD_LITTLE_ENDIAN A 64-bit number in little-endian format. This is equivalent to REG_QWORD.
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

Search for RegSetValueEx at msdn, google or google groups.


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

Search for RegUnLoadKey at msdn, google or google groups.


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

Search for RegisterWindowMessage at msdn, google or google groups.


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

Search for SearchPath at msdn, google or google groups.

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 : PyHANDLE

The hWnd of the window to receive the message.

idMessage : int

The ID of the message to send.

wParam=None : int/string

The wParam for the message

lParam=None : int/string

The lParam for the message

Win32 API References

Search for SendMessage at msdn, google or google groups.


win32api.SetClassLong

int = SetClassLong(hwnd, offset , val )

Replaces the specified 32 or 64 bit value at the specified offset into the extra class memory for the window.

Parameters

hwnd : PyHANDLE

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.

Comments

This function calls the SetClassLongPtr Api function


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.

Comments

This function is obsolete, use win32api::SetClassLong instead


win32api.SetConsoleCtrlHandler

SetConsoleCtrlHandler(ctrlHandler, bAdd)

Adds or removes an application-defined HandlerRoutine function from the list of handler functions for the calling process.

Parameters

ctrlHandler : callable

The function to call. This function should accept one param - the type of signal.

bAdd : int

True if the handler is being added, false if removed.

Comments

Note that the implementation is a single CtrlHandler in C, which keeps a list of the handlers added by this function. So although this function uses the same semantics as the Win32 function (ie, last registered first called, and first to return True stops the calls) the true order of all Python and C implemented CtrlHandlers may not match what would happen if all were implemented in C.
This handler must acquire the Python lock before it can call any of the registered handlers. This means the handler may not be called until the current Python thread yields the lock.
A console process can use the win32api::GenerateConsoleCtrlEvent function to send a CTRL+C or CTRL+BREAK signal to a console process group.
The system generates CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT, and CTRL_SHUTDOWN_EVENT signals when the user closes the console, logs off, or shuts down the system so that the process has an opportunity to clean up before termination.

Win32 API References

Search for SetConsoleCtrlHandler at msdn, google or google groups.


win32api.SetConsoleTitle

SetConsoleTitle(title)

Sets the title for the current console.

Parameters

title : string

The new title

Win32 API References

Search for SetConsoleTitle at msdn, google or google groups.


win32api.SetCursor

PyHANDLE = SetCursor(hCursor)

Set the cursor to the HCURSOR object.

Parameters

hCursor : PyHANDLE

The new cursor. Can be None to remove cursor.

Win32 API References

Search for SetCursor at msdn, google or google groups.

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

Search for SetCursorPos at msdn, google or google groups.


win32api.SetDllDirectory

SetDllDirectory(PathName)

Modifies the application-specific DLL search path

Parameters

PathName : PyUnicode

Directory to be added to search path, can be None to restore defaults

Win32 API References

Search for SetDllDirectory at msdn, google or google groups.


win32api.SetEnvironmentVariable

SetEnvironmentVariable(Name, Value)

Creates, deletes, or changes the value of an environment variable.

Parameters

Name : str/unicode

Name of the environment variable

Value : str/unicode

Value to be set, use None to remove variable

Win32 API References

Search for SetEnvironmentVariable at msdn, google or google groups.


win32api.SetEnvironmentVariableW

SetEnvironmentVariableW(Name, Value)

Creates, deletes, or changes the value of an environment variable.

Parameters

Name : str

Name of the environment variable

Value : str

Value to be set, or None to remove variable

Win32 API References

Search for SetEnvironmentVariable at msdn, google or google groups.


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

Search for SetErrorMode at msdn, google or google groups.

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

SetHandleInformation(Object, Mask, Flags)

Sets a handles's flags

Parameters

Object : PyHANDLE

Handle to an object

Mask : int

Bitmask specifying which flags should be set

Flags : int

Bitmask of flag values to be set. Valid Flags are HANDLE_FLAG_INHERIT, HANDLE_FLAG_PROTECT_FROM_CLOSE

Comments

Not available on Win98/Me


win32api.SetLastError

int = SetLastError()

Sets the calling thread's last error code value.

Win32 API References

Search for SetLastError at msdn, google or google groups.


win32api.SetLocalTime

SetLocalTime(SystemTime)

Changes the system's local time

Parameters

SystemTime : PyTime

The local time to be set. Can also be a time tuple.


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

SetSysColors(Elements, RgbValues)

Changes color of various window elements

Parameters

Elements : tuple

A tuple of ints, COLOR_* constants indicating which window element to change

RgbValues : tuple

An equal length tuple of ints representing RGB values (see win32api::RGB)


win32api.SetSystemFileCacheSize

SetSystemFileCacheSize(MinimumFileCacheSize, MaximumFileCacheSize, Flags)

Sets the amount of memory reserved for file cache

Parameters

MinimumFileCacheSize : long

Minimum size in bytes.

MaximumFileCacheSize : long

Maximum size in bytes.

Flags=0 : int

Combination of win32con.MM_WORKING_SET_* flags

Comments

Requires SE_INCREASE_QUOTA_NAME priv

Pass -1 for both min and max to flush file cache.

Accepts keyword args.


win32api.SetSystemPowerState

SetSystemPowerState(Suspend, Force)

Initiates low power mode to make system sleep or hibernate

Parameters

Suspend : boolean

True - system is suspended. False - initiates hibernation.

Force : boolean

True - power state occurs unconditionally. False - applications are queried for permission.

Comments

Requires Win2k or later.

SE_SHUTDOWN_NAME privilege must be enabled.

Win32 API References

Search for SetSystemPowerState at msdn, google or google groups.


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

tuple = SetTimeZoneInformation(tzi)

Sets the system time-zone information.

Parameters

tzi : tuple

A tuple with the timezone info

Comments

The tuple is of form:

Items

[0] int : Bias

[1] string : StandardName

[2] SYSTEMTIME tuple : StandardDate

[3] int : StandardBias

[4] string : DaylightName

[5] SYSTEMTIME tuple : DaylightDate

[6] int : DaylightBias


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.

Comments

This function calls the SetWindowLongPtr Api function


win32api.SetWindowWord

int = SetWindowWord(hwnd, offset , val )

Parameters

hwnd : PyHANDLE

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.

Comments

This function is obsolete, use win32api::SetWindowLong instead


win32api.ShellExecute

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

Opens or prints a file.

Parameters

hwnd : PyHANDLE

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

Search for ShellExecute at msdn, google or google groups.

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

Search for ShowCursor at msdn, google or google groups.

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

Search for Sleep at msdn, google or google groups.

Search for SleepEx at msdn, google or google groups.

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

bytes = ToAsciiEx(vk, scancode , keyboardstate , flags , hlayout )

Translates the specified virtual-key code and keyboard state to the corresponding character or characters.

Parameters

vk : int

The virtual key code.

scancode : int

The scan code.

keyboardstate : bytes

A string of exactly 256 characters.

flags=0 : int

hlayout=None : handle

The keyboard layout to use


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 : PyHANDLE

The update-file handle.

type : PyResourceId

The type of resource to update

name : PyResourceId

The id/name of the resource to update

data : string

The data to place into the resource.

language=NEUTRAL : int

Language to use, defaults to LANG_NEUTRAL.


win32api.VkKeyScan

int = VkKeyScan(char, char )

Translates a character to the corresponding virtual-key code and shift state.

Parameters

char : string or unicode

A byte or unicode string of length 1. If a byte string is passed VkKeyScanA will be called, otherwise VkKeyScanW will be called.

char : chr

Specifies a character

Win32 API References

Search for VkKeyScanA at msdn, google or google groups.

Search for VkKeyScanW at msdn, google or google groups.


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

Search for WinExec at msdn, google or google groups.


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

Search for WinHelp at msdn, google or google groups.

Return Value

The method raises an exception if an error occurs.


win32api.WriteProfileSection

list = WriteProfileSection(section, data , iniName )

Writes a complete section to an INI file or registry.

Parameters

section : string

The section in the INI file to be written.

data : string

The data to write. Can be None to delete the section. Otherwise, must be string, with each entry terminated with '\\0', followed by another terminating '\\0'

iniName=None : string

Name of INI file. If specified, WritePrivateProfileSection will be called.

Comments

This function is obsolete, applications should use the registry instead.

Win32 API References

Search for WriteProfileSection at msdn, google or google groups.

Search for WritePrivateProfileSection at msdn, google or google groups.


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.

Comments

This function is obsolete, applications should use the registry instead.

Win32 API References

Search for WritePrivateProfileString at msdn, google or google groups.

Search for WriteProfileString at msdn, google or google groups.


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

Search for keybd_event at msdn, google or google groups.


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

Search for mouse_event at msdn, google or google groups.


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.

GetClipboardDataHandle
Retrieves data from the clipboard in a specified format, returning the underlying integer handle.

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.

GetGlobalMemory
Returns the contents of the specified global memory object.

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

Search for ChangeClipboardChain at msdn, google or google groups.

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

Search for CloseClipboard at msdn, google or google groups.

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

Search for CountClipboardFormats at msdn, google or google groups.

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

Search for EmptyClipboard at msdn, google or google groups.

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

Search for EnumClipboardFormats at msdn, google or google groups.

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. Note that not all data formats are supported, and that the underlying handle can be retrieved with win32clipboard::GetClipboardDataHandle

Parameters

format=CF_TEXT : int

Specifies a clipboard format. For a description of the standard clipboard formats, see Standard Clipboard Formats. In Unicode builds (ie, python 3k), the default is CF_UNICODETEXT.

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

Search for GetClipboardData at msdn, google or google groups.

Search for Standard Clipboard Formats at msdn, google or google groups.

To Do

CF_METAFILEPICT format returns a pointer to a METAFILEPICT struct which contains the metafile handle, rather than returning the handle directly. This code currently fails with error: (6, 'GetClipboardData:GetMetafileBitsEx(NULL)', 'The handle is invalid.')

Return Value

If the function fails, the standard win32api.error exception is raised. If the function succeeds, the return value is as described in the following table:

Format | Result type
CF_HDROP | A tuple of Unicode filenames.
CF_UNICODETEXT | A unicode object.
CF_OEMTEXT | A string object.
CF_TEXT | A string object.
CF_ENHMETAFILE | A string with binary data obtained from GetEnhMetaFileBits
CF_METAFILEPICT | A string with binary data obtained from GetMetaFileBitsEx (currently broken)
CF_BITMAP | An integer handle to the bitmap.
All other formats | A string with binary data obtained directly from the global memory referenced by the handle.


win32clipboard.GetClipboardDataHandle

int = GetClipboardDataHandle(format)

Retrieves data from the clipboard in a specified format, and returns an integer handle to the data. To get the data bytes, use the win32clipboard::GetClipboardData function.

Parameters

format=CF_TEXT : int

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


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

Search for GetClipboardFormatName at msdn, google or google groups.

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

Search for GetClipboardOwner at msdn, google or google groups.

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

Search for GetClipboardSequenceNumber at msdn, google or google groups.

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

Search for GetClipboardViewer at msdn, google or google groups.

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

string = GetGlobalMemory(hglobal)

Returns the contents of the specified global memory object.

Parameters

hglobal : PyHANDLE

The handle to the global memory object


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

Search for GetOpenClipboardWindow at msdn, google or google groups.

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)

Returns the first available clipboard format in the specified list.

Parameters

formats : sequence

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

Win32 API References

Search for GetPriorityClipboardFormat at msdn, google or google groups.

Search for Standard Clipboard Formats at msdn, google or google groups.

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

Search for IsClipboardFormatAvailable at msdn, google or google groups.

Search for Standard Clipboard Formats at msdn, google or google groups.

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=None : PyHANDLE

Integer handle to the window to be associated with the open clipboard. If this parameter is None, 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

Search for OpenClipboard at msdn, google or google groups.

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

Search for RegisterClipboardFormat at msdn, google or google groups.

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/buffer

Integer handle to the data in the specified format, or string, unicode, or any object that supports the buffer interface. A global memory object is allocated, and the object's buffer is copied to the new memory. 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.

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

Search for SetClipboardData at msdn, google or google groups.

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

Convienience function to call SetClipboardData with text.

Parameters

text : str/unicode

The text to place on the clipboard.

format=CF_TEXT : int

The clipboard format to use - must be CF_TEXT or CF_UNICODETEXT

Comments

You may pass a Unicode or string/bytes object to this function, but depending on the value of the 'format' param, it may be converted to the appropriate type for that param.

Many applications will want to call this function twice, with the same string specified but CF_UNICODETEXT specified the second.

Win32 API References

Search for SetClipboardData at msdn, google or google groups.

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

PyHANDLE = 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 : PyHANDLE

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

Search for SetClipboardViewer at msdn, google or google groups.

Return Value

Returns a handle to the next window in chain, or None if no other viewer exists.

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.


win32console

Module win32console

Interface to the Windows Console functions for dealing with character-mode applications

Methods

CreateConsoleScreenBuffer
Creates a new console handle

GetConsoleDisplayMode
Returns the current console's display mode

AttachConsole
Attaches calling process to console of another process

AllocConsole
Creates a new console for the calling process

FreeConsole
Detaches process from its console

GetConsoleProcessList
Returns pids of all processes attached to current console

GetConsoleCP
Returns the input code page for calling process's console

GetConsoleOutputCP
Returns the output code page for calling process's console

SetConsoleCP
Sets the input code page for calling process's console

SetConsoleOutputCP
Sets the output code page for calling process's console

GetConsoleSelectionInfo
Returns info on text selection within the current console

AddConsoleAlias
Creates a new console alias

GetConsoleAliases
Retrieves aliases defined under specified executable

GetConsoleAliasExes
Lists all executables that have console aliases defined

GetConsoleWindow
Returns a handle to the console's window, or 0 if none exists

GetNumberOfConsoleFonts
Returns the number of fonts available to the console

SetConsoleTitle
Sets the title of calling process's console

GetConsoleTitle
Returns the title of console to which calling process is attached

GenerateConsoleCtrlEvent
Sends a control signal to a group of processes attached to a common console

GetStdHandle
Returns one of calling process's standard handles


win32console.AddConsoleAlias

AddConsoleAlias(Source, Target, ExeName)

Creates a new console alias

Parameters

Source : PyUNICODE

The string to be mapped to the target string

Target : PyUNICODE

String to be substituted for Source. If None, alias is removed

ExeName : PyUNICODE

Name of executable that will use alias


win32console.AllocConsole

AllocConsole()

Creates a new console for the calling process

Comments

Calling process must not already be attached to another console


win32console.AttachConsole

AttachConsole(ProcessId)

Attaches to console of another process

Parameters

ProcessId : int

Pid of another process, or ATTACH_PARENT_PROCESS

Comments

Calling process must not already be attached to another console


win32console.CreateConsoleScreenBuffer

PyConsoleScreenBuffer = CreateConsoleScreenBuffer(DesiredAccess, ShareMode , SecurityAttributes , Flags )

Creates a new console screen buffer

Parameters

DesiredAccess=GENERIC_READ and GENERIC_WRITE : int

GENERIC_READ and/or GENERIC_WRITE

ShareMode=FILE_SHARE_READ and FILE_SHARE_WRITE : int

FILE_SHARE_READ and/or FILE_SHARE_WRITE

SecurityAttributes=None : PySECURITY_ATTRIBUTES

Specifies security descriptor and inheritance for handle

Flags=CONSOLE_TEXTMODE_BUFFER : int

CONSOLE_TEXTMODE_BUFFER is currently only valid flag


win32console.FreeConsole

FreeConsole()

Detaches process from its current console


win32console.GenerateConsoleCtrlEvent

GenerateConsoleCtrlEvent(CtrlEvent, ProcessGroupId)

Sends a control signal to a group of processes attached to a common console

Parameters

CtrlEvent : int

Signal to be sent to specified process group - CTRL_C_EVENT or CTRL_BREAK_EVENT

ProcessGroupId=0 : int

Pid of a process group, use 0 for calling process


win32console.GetConsoleAliasExes

PyUNICODE = GetConsoleAliasExes()

Lists all executables that have console aliases defined

Return Value

Returns a unicode string containing executable names separated by NULLS


win32console.GetConsoleAliases

PyUNICODE = GetConsoleAliases(ExeName)

Retrieves aliases defined under specified executable

Parameters

ExeName : PyUNICODE

Name of executable for which to return aliases

Return Value

Returns a unicode string containing null-terminated pairs of aliases and their target text of the form "alias1=replacementtext1\\0alias2=replacementtext2\\0"


win32console.GetConsoleCP

int = GetConsoleCP()

Returns the input code page for calling process's console


win32console.GetConsoleDisplayMode

int = GetConsoleDisplayMode()

Returns the current console's display mode

Comments

Only exists on Wix XP and later

Return Value

CONSOLE_FULLSCREEN,CONSOLE_FULLSCREEN_HARDWARE


win32console.GetConsoleOutputCP

int = GetConsoleOutputCP()

Returns the output code page for calling process's console


win32console.GetConsoleProcessList

(int,...) = GetConsoleProcessList()

Returns pids of all processes attached to current console


win32console.GetConsoleSelectionInfo

dict = GetConsoleSelectionInfo()

Returns info on text selection within the current console

Return Value

Returns a dictionary containing {Flags:int, SelectionAnchor: PyCOORD, Selection:PySMALL_RECT} Flags will contain a combination of CONSOLE_NO_SELECTION,CONSOLE_SELECTION_IN_PROGRESS,CONSOLE_SELECTION_NOT_EMPTY,CONSOLE_MOUSE_SELECTION,CONSOLE_MOUSE_DOWN


win32console.GetConsoleTitle

PyUNICODE = GetConsoleTitle()

Returns the title of the console window


win32console.GetConsoleWindow

int = GetConsoleWindow()

Returns a handle to the console's window, or 0 if none exists

Return Value

This function may raise NotImplementedError if it does not exist on the platform, or a PyHANDLE object with a value of 0. It will never raise a win32 exception.


win32console.GetNumberOfConsoleFonts

int = GetNumberOfConsoleFonts()

Returns the number of fonts available to the console

Comments

Function is not documented in MSDN


win32console.GetStdHandle

PyConsoleScreenBuffer = GetStdHandle(StdHandle)

Returns one of calling process's standard handles

Parameters

StdHandle : int

Specifies the handle to return - STD_INPUT_HANDLE, STD_OUTPUT_HANDLE, or STD_ERROR_HANDLE

Return Value

Returns a PyConsoleScreenBuffer wrapping the handle, or None if specified handle does not exist


win32console.SetConsoleCP

SetConsoleCP(CodePageId)

Sets the input code page for calling process's console

Parameters

CodePageId : int

The code page to set


win32console.SetConsoleOutputCP

SetConsoleOutputCP(CodePageID)

Sets the output code page for calling process's console

Parameters

CodePageID : int

The code page to set


win32console.SetConsoleTitle

SetConsoleTitle(ConsoleTitle)

Sets the title of the console window

Parameters

ConsoleTitle : PyUNICODE

New title for the console


win32cred

Module win32cred

Interface to credentials management functions. The functions in this module are only available on Windows XP and later.
Functions operate only on the credential set of the calling user.
User's profile must be loaded for stored credentials to be accessible.
Each credential is uniquely identified by its TargetName and Type.
All functions accept keyword arguments.

Methods

CredMarshalCredential
Marshals a credential into a unicode string

CredUnmarshalCredential
Unmarshals credentials formatted using win32cred::CredMarshalCredential

CredIsMarshaledCredential
Checks if a string matches the form of a marshaled credential

CredEnumerate
Lists stored credentials for current logon session

CredGetTargetInfo
Determines type and location of credential target

CredWriteDomainCredentials
Creates or updates credential for a domain or server

CredReadDomainCredentials
Retrieves a user's credentials for a domain or server

CredDelete
Deletes a stored credential

CredWrite
Creates or updates a stored credential

CredRead
Retrieves a stored credential

CredRename
Changes the target name of stored credentials

CredUICmdLinePromptForCredentials
Prompt for username/passwd from a console app

CredUIPromptForCredentials
Initiates dialog to request user credentials

CredUIConfirmCredentials
Confirms whether credentials entered by user are valid or not

CredUIReadSSOCredW
Retrieves single sign on username

CredUIStoreSSOCredW
Creates a single sign on credential

CredUIParseUserName
Parses a full username into domain and username


win32cred.CredDelete

CredDelete(TargetName, Type, Flags)

Deletes a stored credential

Parameters

TargetName : PyUnicode

Target of credential to be deleted

Type : int

One of the CRED_TYPE_* values

Flags=0 : int

Reserved, use only 0


win32cred.CredEnumerate

(dict,...) = CredEnumerate(Filter, Flags )

Lists credentials for current logon session

Parameters

Filter=None : PyUnicode

Matches credentials' target names by prefix, can be None

Flags=0 : int

Reserved, use 0 if passed in

Return Value

Returns a sequence of PyCREDENTIAL dictionaries


win32cred.CredGetTargetInfo

dict = CredGetTargetInfo(TargetName, Flags )

Determines type and location of credential target

Parameters

TargetName : PyUnicode

Name of server that is target of stored credentials

Flags=0 : int

CRED_ALLOW_NAME_RESOLUTION, or 0

Comments

The target information will not be available until an attempt is made to authenticate against it

Return Value

Returns a PyCREDENTIAL_TARGET_INFORMATION dict


win32cred.CredIsMarshaledCredential

boolean = CredIsMarshaledCredential(MarshaledCredential)

Checks if a string matches the form of a marshaled credential

Parameters

MarshaledCredential : PyUnicode

Marshaled credential as returned by win32cred::CredMarshalCredential


win32cred.CredMarshalCredential

PyUnicode = CredMarshalCredential(CredType, Credential )

Marshals a credential into a unicode string

Parameters

CredType : int

CertCredential or UsernameTargetCredential

Credential : str/PyUnicode

The credential to be marshalled. Type is dependent on CredType.

CredType | Type of Credential
CertCredential | String containing the SHA1 hash of user's certificate
UsernameTargetCredential | Unicode string containing a username for which credentials exist in current logon session

Comments

Credentials with Flags that contain CRED_FLAGS_USERNAME_TARGET can be marshalled to be passed as the username to functions that normally require a username/password combination, such as win32security::LogonUser and win32net::NetUseAdd


win32cred.CredRead

dict = CredRead(TargetName, Type , Flags )

Retrieves a stored credential

Parameters

TargetName : PyUnicode

The target of the credentials to retrieve

Type : int

One of the CRED_TYPE_* constants

Flags=0 : int

Reserved, use 0

Return Value

Returns a PyCREDENTIAL dict


win32cred.CredReadDomainCredentials

(dict,...) = CredReadDomainCredentials(TargetInfo, Flags )

Retrieves credentials for a domain or server

Parameters

TargetInfo : dict

PyCREDENTIAL_TARGET_INFORMATION identifying a domain or server. At least one of the Names is required.

Flags=0 : int

CRED_CACHE_TARGET_INFORMATION is only valid flag

Return Value

Returns a sequence of PyCREDENTIAL dicts


win32cred.CredRename

dict = CredRename(OldTargetName, NewTargetName , Type , Flags )

Changes the target name of stored credentials

Parameters

OldTargetName : PyUnicode

The target of credential to be renamed

NewTargetName : PyUnicode

New target for the specified credential

Type : int

Type of the credential to be renamed (CRED_TYPE_*)

Flags=0 : int

Reserved, use only 0

Comments

CRED_FLAGS_USERNAME_TARGET credentials can't be renamed since their TargetName and Username must be equal


win32cred.CredUICmdLinePromptForCredentials

(PyUnicode, PyUnicode, boolean) = CredUICmdLinePromptForCredentials(TargetName, AuthError , UserName , Password , Save , Flags )

Prompt for username/passwd from a console app

Parameters

TargetName : PyUnicode

Server or domain against which to authenticate

AuthError=0 : int

Error code indicating why credentials are required, can be 0

UserName=None : PyUnicode

Default username, can be None. At most CREDUI_MAX_USERNAME_LENGTH chars

Password=None : PyUnicode

Password, can be None. At most CREDUI_MAX_PASSWORD_LENGTH chars

Save=True : boolean

Specifies default value for Save prompt

Flags=CREDUI_FLAGS_EXCLUDE_CERTIFICATES : int

Combination of CREDUI_FLAGS_* values

Comments

The command-line version of this function does not accept certificates, so Flags must contain CREDUI_FLAGS_EXCLUDE_CERTIFICATES or CREDUI_FLAGS_REQUIRE_SMARTCARD

Return Value

Returns the username and password entered, and a boolean indicating if credential was saved


win32cred.CredUIConfirmCredentials

CredUIConfirmCredentials(TargetName, Confirm)

Confirms whether credentials entered by user are valid or not

Parameters

TargetName : PyUnicode

Target of credentials that are pending confirmation

Confirm : boolean

Indicates if authentication succeeded

Comments

This function should be called to confirm credentials entered via win32cred::CredUICmdLinePromptForCredentials or win32cred::CredUIPromptForCredentials if CREDUI_FLAGS_EXPECT_CONFIRMATION was passed in Flags to either function.
Sequence of operations:
Prompt for credentials
Authenticate against target using credentials
Call this function to indicate if authentication succeeded or not


win32cred.CredUIParseUserName

(PyUnicode, PyUnicode) = CredUIParseUserName(UserName)

Parses a full username into domain and username

Parameters

UserName : PyUnicode

Username as returned by win32cred::CredUIPromptForCredentials

Return Value

Returns the username and domain


win32cred.CredUIPromptForCredentials

(PyUnicode, PyUnicode, boolean) = CredUIPromptForCredentials(TargetName, AuthError , UserName , Password , Save , Flags , UiInfo )

Initiates dialog to request user credentials

Parameters

TargetName : PyUnicode

Server or domain against which to authenticate

AuthError=0 : int

Error code indicating why credentials are required, can be 0

UserName=None : PyUnicode

Default username, can be None. At most CREDUI_MAX_USERNAME_LENGTH chars

Password=None : PyUnicode

Password, can be None. At most CREDUI_MAX_PASSWORD_LENGTH chars

Save=True : boolean

Specifies whether Save checkbox defaults to checked or unchecked

Flags=0 : int

Combination of CREDUI_FLAGS_* values

UiInfo=None : dict

PyCREDUI_INFO dict for customizing the dialog, can be None

Return Value

Returns the username, password, and a boolean indicating if credential was persisted


win32cred.CredUIReadSSOCredW

PyUnicode = CredUIReadSSOCredW(Realm)

Retrieves single sign on username

Parameters

Realm=None : PyUnicode

Realm for which to read username, can be None


win32cred.CredUIStoreSSOCredW

CredUIStoreSSOCredW(Realm, Username, Password, Persist)

Creates a single sign on credential

Parameters

Realm : PyUnicode

Realm for which to read username, can be None for default realm

Username : PyUnicode

Username for realm

Password : PyUnicode

User's password

Persist : boolean

Specifies whether to save credential


win32cred.CredUnmarshalCredential

int,PyUnicode = CredUnmarshalCredential(MarshaledCredential)

Unmarshals credentials formatted using win32cred::CredMarshalCredential

Parameters

MarshaledCredential : PyUnicode

Unicode string containing marshaled credential

CredType | Type of output credentials
CertCredential | Character string containing SHA1 hash of a certificate
UsernameTargetCredential | Unicode string containing username

Return Value

Returns the credential type and credentials.


win32cred.CredWrite

CredWrite(Credential, Flags)

Creates or updates a stored credential

Parameters

Credential : dict

PyCREDENTIAL dict containing the credentials to be stored

Flags=0 : int

CRED_PRESERVE_CREDENTIAL_BLOB is only defined flag

Comments

When updating a credential, to preserve a previously stored password use None or '' for CredentialBlob member of Credential and pass CRED_PRESERVE_CREDENTIAL_BLOB in Flags


win32cred.CredWriteDomainCredentials

CredWriteDomainCredentials(TargetInfo, Credential, Flags)

Creates or updates credential for a domain or server

Parameters

TargetInfo : dict

PyCREDENTIAL_TARGET_INFORMATION identifying the target domain. At least one of the Names is required

Credential : dict

PyCREDENTIAL dict containing the credentials to be stored

Flags=0 : int

CRED_PRESERVE_CREDENTIAL_BLOB is only defined flag

Comments

When updating a credential, to preserve a previously stored password use None or '' for CredentialBlob member of Credential and pass CRED_PRESERVE_CREDENTIAL_BLOB in Flags


win32crypt

Module win32crypt

An interface to the win32 Cryptography API

Methods

CryptProtectData
Encrypts data using a session key derived from current user's logon credentials

CryptUnprotectData
Decrypts data that was encrypted using win32crypt::CryptProtectData

CryptEnumProviders
Lists available cryptographic providers

CryptEnumProviderTypes
Lists available local cryptographic provider types

CryptGetDefaultProvider
Returns default provider for local machine or current user

CryptSetProviderEx
Sets default provider (for machine or user) for specified type

CryptAcquireContext
Retrieve handle to a cryptographic service provider

CryptFindLocalizedName
Return localized name for predefined system stores (Root, My, .Default, .LocalMachine)

CertEnumSystemStore
Lists system stores

CertEnumSystemStoreLocation
Lists system store locations

CertEnumPhysicalStore
Lists physical stores on computer

CertRegisterSystemStore
Creates a new system certificate store

CertUnregisterSystemStore
Unregister specified store, optionally deleting it

CertOpenStore
Opens a certificate store

CertOpenSystemStore
Opens most commonly used Certificate Stores

CryptFindOIDInfo
Retreives information about an object identifier or alorithm identifier

CertAlgIdToOID
Converts an integer ALG_ID to it's szOID_ string representation

CertOIDToAlgId
Converts a string object identfier to a numeric algorith identifier

CryptGetKeyIdentifierProperty
Retrieves a property from a certificate by it's key indentifier

CryptEnumKeyIdentifierProperties
Lists private keys for user or machine

CryptEnumOIDInfo
Lists registered object identfiers

CertAddSerializedElementToStore
Creates a new Certificate, CRL, or CTL context from serialized data

CryptQueryObject
Determines the type of serialized or encoded data

CryptDecodeMessage
Decrypts an encoded message and verifies a signature

CryptEncryptMessage
Encrypts and encodes a message

CryptDecryptMessage
Decrypts an encrypted and encoded message

CryptSignAndEncryptMessage
Decrypts an encrypted and encoded message

CryptVerifyMessageSignature
Verifies a message signature

CryptGetMessageCertificates
Extracts certificates encoded in a message

CryptGetMessageSignerCount
Finds the number of signers of an encoded message

CryptSignMessage
Signs and encodes a message

CryptVerifyDetachedMessageSignature
Verifies a signature that is encoded separately from the data

CryptDecryptAndVerifyMessageSignature
Decrypts and decodes a signed message, and verifies its signatures

CryptEncodeObjectEx
Serializes and ASN encodes cryptographic structures

CryptDecodeObjectEx
Decodes ASN encodes data

CertNameToStr
Converts an encoded CERT_NAME_INFO into a formatted string

CryptFormatObject
Formats an encoded buffer into a readable string

PFXImportCertStore
Creates a certificate store from PKCS#12 data (*.PFX files)

PFXVerifyPassword
Checks if a PFX blob can be decrypted with given password

PFXIsPFXBlob
Checks if data buffer contains a PFX blob

CryptBinaryToString
Formats a binary buffer into the specified type of string

CryptStringToBinary
Converts a formatted string back into raw bytes


win32crypt.CertAddSerializedElementToStore

PyCERT_CONTEXT = CertAddSerializedElementToStore(CertStore, Element , AddDisposition , ContextTypeFlags , Flags )

Imports a serialized Certificate context, CRL, or CTL

Parameters

CertStore : PyCERTSTORE

Certificate Store to which the context will be added, can be None

Element : buffer

Serialized data

AddDisposition : int

one of CERT_STORE_ADD_* values

ContextTypeFlags=CERT_STORE_CERTIFICATE_CONTEXT_FLAG : int

One of CERT_STORE_*_CONTEXT_FLAG constants

Flags=0 : int

Reserved, use only 0

Comments

Currently only Certificate contexts are supported


win32crypt.CertAlgIdToOID

string = CertAlgIdToOID(AlgId)

Converts an integer ALG_ID to it's szOID_ string representation

Parameters

AlgId : int

An algorithm identifier

Comments

If there is no corresponding OID, None is returned


win32crypt.CertEnumPhysicalStore

[PyUnicode,...] = CertEnumPhysicalStore(pvSystemStore, dwFlags )

Lists physical stores on computer

Parameters

pvSystemStore : PyUnicode

Name of system store to enumerate physical locations for

dwFlags : int

CERT_SYSTEM_STORE_* constant, CERT_SYSTEM_STORE_RELOCATE_FLAG not supported yet


win32crypt.CertEnumSystemStore

[PyUnicode,...] = CertEnumSystemStore(dwFlags, pvSystemStoreLocationPara )

Lists system stores

Parameters

dwFlags : int

CERT_SYSTEM_STORE_* location, can be combined with CERT_SYSTEM_STORE_RELOCATE_FLAG

pvSystemStoreLocationPara=None : PyCERT_SYSTEM_STORE_RELOCATE_PARA

Optional If flags contains CERT_SYSTEM_STORE_RELOCATE_FLAG must be a sequence (PyHkey, unicode) representing a CERT_SYSTEM_STORE_RELOCATE_PARA, otherwise should be a unicode store name


win32crypt.CertEnumSystemStoreLocation

[PyUnicode,...] = CertEnumSystemStoreLocation(Flags)

Lists system store locations

Parameters

Flags=0 : int

Reserved, must be 0 if passed in


win32crypt.CertNameToStr

str = CertNameToStr(Name, StrType , CertEncodingType )

Converts an encoded CERT_NAME_INFO into a formatted string

Parameters

Name : str

String containing an encoded CERT_NAME_INFO, as used with certificate Issuer and Subject

StrType=CERT_SIMPLE_NAME_STR : int

Type of string to format, one of CERT_SIMPLE_NAME_STR,CERT_OID_NAME_STR,CERT_X500_NAME_STR

CertEncodingType=X509_ASN_ENCODING : int

Input encoding

Comments

Usually this encoded data is contained in a CERT_NAME_BLOB


win32crypt.CertOIDToAlgId

int = CertOIDToAlgId(ObjId)

Converts a string object identfier to a numeric algorith identifier

Parameters

ObjId : string

String szOID_* identifier

Comments

If no matching ALG_ID is found, 0 is returned


win32crypt.CertOpenStore

PyCERTSTORE = CertOpenStore(StoreProvider, MsgAndCertEncodingType , CryptProv , Flags , Para )

Opens a certificate store

Parameters

StoreProvider : int

CERT_STORE_PROV_*, currently does not accept string provider names

MsgAndCertEncodingType : int

Only used with CERT_STORE_PROV_MSG, CERT_STORE_PROV_PKCS7, and CERT_STORE_PROV_FILENAME. Usually should be X509_ASN_ENCODING combined with PKCS_7_ASN_ENCODING

CryptProv : PyCRYPTPROV

Handle to a CSP, can be None to use default provider

Flags : int

Combination of CERT_STORE_*_FLAG flags

Para=None : object

PyCERT_SYSTEM_STORE_RELOCATE_PARA , or data specific to provider


win32crypt.CertOpenSystemStore

PyCERTSTORE = CertOpenSystemStore(SubsystemProtocol, Prov )

Opens most commonly used Certificate Stores

Parameters

SubsystemProtocol : PyUnicode

Name of store to open, will be created if it doesn't already exist

Prov=None : PyCRYPTPROV

Handle to CSP, use None for default provider


win32crypt.CertRegisterSystemStore

CertRegisterSystemStore(SystemStore, Flags)

Registers a certificate store

Parameters

SystemStore : PyUnicode

string/unicode name of store to be registered, or a sequence of (PyHkey, unicode) representing a CERT_SYSTEM_STORE_RELOCATE_PARA struct

Flags : int

One of the CERT_SYSTEM_STORE_* location constants, can also be combined with CERT_SYSTEM_STORE_RELOCATE_FLAG and CERT_STORE_CREATE_NEW_FLAG


win32crypt.CertUnregisterSystemStore

CertUnregisterSystemStore(SystemStore, Flags)

Unregisters a certificate store

Parameters

SystemStore : PyUnicode

Name of System store to be unregistered

Flags : int

CERT_SYSTEM_STORE_RELOCATE_FLAG, CERT_STORE_DELETE_FLAG (CERT_SYSTEM_STORE_RELOCATE_FLAG not supported yet)


win32crypt.CryptAcquireContext

PyCRYPTPROV = CryptAcquireContext(Container, Provider , ProvType , Flags )

Retrieve handle to a cryptographic service provider

Parameters

Container : PyUnicode

Name of key container, can be none to use a Provider's default key container (usually username)

Provider : PyUnicode

Name of cryptographic provider. (MS_*_PROV) Use None for user's default provider.

ProvType : int

One of the PROV_* constants

Flags : int

Combination of CRYPT_VERIFYCONTEXT,CRYPT_NEWKEYSET,CRYPT_MACHINE_KEYSET,CRYPT_DELETEKEYSET,CRYPT_SILENT

Return Value

Returns None if CRYPT_DELETEKEYSET is specified, otherwise returns a handle to the provider


win32crypt.CryptBinaryToString

str = CryptBinaryToString(Binary, Flags )

Formats a binary buffer into the specified type of string

Parameters

Binary : bytes

Buffer containing raw data to be formatted

Flags : int

Type of output desired, win32cryptcon.CRYPT_STRING_* value

Win32 API References

Search for CryptBinaryToString at msdn, google or google groups.


win32crypt.CryptDecodeMessage

dict = CryptDecodeMessage(EncodedBlob, DecryptPara , VerifyPara , MsgTypeFlags , SignerIndex , PrevInnerContentType , ReturnData )

Decodes and decrypts a message, and verifies its signatures

Parameters

EncodedBlob : buffer

Data to be decoded

DecryptPara : dict

PyCRYPT_DECRYPT_MESSAGE_PARA containing decryption parms

VerifyPara=None : dict

PyCRYPT_VERIFY_MESSAGE_PARA containing signature verification parms

MsgTypeFlags=CMSG_ALL_FLAGS : int

Combination of CMSG_DATA_FLAG, CMSG_SIGNED_FLAG, CMSG_ENVELOPED_FLAG, CMSG_SIGNED_AND_ENVELOPED_FLAG, or CMSG_HASHED_FLAG

SignerIndex=0 : int

Index of the signer to verify, ignored if message is not signed.

PrevInnerContentType=0 : int

Content type returned from previous call, used during subsequent pass on a nested message

ReturnData=True : boolean

Indicates if decoded data should be returned.

Comments

Only one level of encoding is interpreted. Some types of messages will need multiple calls to completely decode. For example, to decode a message created by win32crypt::CryptSignAndEncryptMessage, one pass with CMSG_ENVELOPED_FLAG and a second pass using CMSG_SIGNED_FLAG are required to recover the original message text.

Return Value

Output params are returned as a dict containing:
{MsgType:int}, ##Type of message decoded, one of CMSG_DATA,CMSG_SIGNED,CMSG_ENVELOPED,CMSG_SIGNED_AND_ENVELOPED,CMSG_HASHED
InnerContentType:int, ##Type of decoded content returned, uses same set of values as MsgType. CMSG_DATA indicates unencoded data.
Decoded:str, ##The decoded data, will be None if ReturnData is False.
XchgCert:PyCERT_CONTEXT, ##Certificate used to decode message
SignerCert:PyCERT_CONTEXT} ##Certificate used to sign message


win32crypt.CryptDecodeObjectEx

object = CryptDecodeObjectEx(StructType, Encoded , Flags , CertEncodingType , DecodePara )

Decodes ASN encoded data

Parameters

StructType : str/int

An OID identifying the type of data to be decoded, can be either str or int

Encoded : str

String or buffer containing ASN encoded data

Flags=0 : int

Encoding options, can be combination CRYPT_UNICODE_* constants. CRYPT_ENCODE_ALLOC_FLAG is added to flags..

CertEncodingType=X509_ASN_ENCODING combined with PKCS_7_ASN_ENCODING : int

Encoding types

DecodePara=None : object

Not supported, use only None

OID | Object returned
szOID_ENHANCED_KEY_USAGE | Sequence of OIDs
X509_ENHANCED_KEY_USAGE | Sequence of OIDs
szOID_KEY_USAGE | PyCRYPT_BIT_BLOB
X509_KEY_USAGE | PyCRYPT_BIT_BLOB
X509_BITS | PyCRYPT_BIT_BLOB
szOID_SUBJECT_ALT_NAME | PyCERT_ALT_NAME_INFO
szOID_SUBJECT_ALT_NAME2 | PyCERT_ALT_NAME_INFO
szOID_ISSUER_ALT_NAME | PyCERT_ALT_NAME_INFO
szOID_ISSUER_ALT_NAME2 | PyCERT_ALT_NAME_INFO
szOID_NEXT_UPDATE_LOCATION | PyCERT_ALT_NAME_INFO
X509_ALTERNATE_NAME | PyCERT_ALT_NAME_INFO
X509_NAME_VALUE | PyCERT_NAME_VALUE
X509_UNICODE_ANY_STRING | PyCERT_NAME_VALUE
X509_UNICODE_NAME_VALUE | PyCERT_NAME_VALUE
X509_NAME | PyCERT_NAME_INFO
X509_UNICODE_NAME | PyCERT_NAME_INFO
szOID_KEY_ATTRIBUTES | PyCERT_KEY_ATTRIBUTES_INFO
X509_KEY_ATTRIBUTES | PyCERT_KEY_ATTRIBUTES_INFO
szOID_BASIC_CONSTRAINTS | PyCERT_BASIC_CONSTRAINTS_INFO
X509_BASIC_CONSTRAINTS | PyCERT_BASIC_CONSTRAINTS_INFO
szOID_BASIC_CONSTRAINTS2 | PyCERT_BASIC_CONSTRAINTS2_INFO
X509_BASIC_CONSTRAINTS2 | PyCERT_BASIC_CONSTRAINTS2_INFO
szOID_CERT_POLICIES | Sequence of PyCERT_POLICY_INFO objects
szOID_APPLICATION_CERT_POLICIES | Sequence of PyCERT_POLICY_INFO objects
X509_CERT_POLICIES | Sequence of PyCERT_POLICY_INFO objects
szOID_SUBJECT_KEY_IDENTIFIER | Binary string containing the key identifier
szOID_AUTHORITY_KEY_IDENTIFIER | PyCERT_AUTHORITY_KEY_ID_INFO
X509_AUTHORITY_KEY_ID | PyCERT_AUTHORITY_KEY_ID_INFO

Return Value

Type of object returned is dependent on the StructType to be decoded


win32crypt.CryptDecryptAndVerifyMessageSignature

dict = CryptDecryptAndVerifyMessageSignature(EncryptedBlob, DecryptPara , VerifyPara , SignerIndex )

Decrypts and decodes a signed message, and verifies its signatures

Parameters

EncryptedBlob : buffer

Encoded message to be decrypted.

DecryptPara : PyCRYPT_DECRYPT_MESSAGE_PARA

Decryption parms

VerifyPara=None : PyCRYPT_VERIFY_MESSAGE_PARA

Signature verification parms

SignerIndex=0 : int

Index of the signer to verify, zero-based.

Comments

Usage is similar to CryptDecodeMessage, except that it undoes all levels of encoding and returns the bare message. This function is the counterpart of CryptSignAndEncryptMessage.

Return Value

Output params are returned as a dict containing:
Decrypted:str, ##The decrypted message contents
XchgCert:PyCERT_CONTEXT, ##Certificate whose private key was used to decrypt message
SignerCert:PyCERT_CONTEXT ##Certificate used to sign message


win32crypt.CryptDecryptMessage

str, PyCERT_CONTEXT = CryptDecryptMessage(DecryptPara, EncryptedBlob )

Decrypts an encrypted and encoded message

Parameters

DecryptPara : PyCRYPT_DECRYPT_MESSAGE_PARA

Dictionary containing decryption parameters

EncryptedBlob : buffer

Buffer containing an encrypted message

Return Value

Returns the decrypted message and a handle to the certificate used to decrypt it


win32crypt.CryptEncodeObjectEx

str = CryptEncodeObjectEx(StructType, StructInfo , Flags , CertEncodingType , EncodePara )

Serializes and ASN encodes cryptographic structures

Parameters

StructType : str/int

OID identifying type of data to be encoded, either szOID_* string or a numeric id

StructInfo : dict

Information to be encoded. Contents of dict are dependent on StructType

Flags=0 : int

Encoding options, combination of CRYPT_UNICODE_* constants. CRYPT_ENCODE_ALLOC_FLAG is added to flags..

CertEncodingType=X509_ASN_ENCODING combined with PKCS_7_ASN_ENCODING : int

Encoding types

EncodePara=None : object

Not supported, use only None

StructType | Type of input
szOID_ENHANCED_KEY_USAGE | PyCTL_USAGE (sequence of OID's)
X509_ENHANCED_KEY_USAGE | PyCTL_USAGE (sequence of OID's)
szOID_KEY_USAGE | PyCRYPT_BIT_BLOB
X509_KEY_USAGE | PyCRYPT_BIT_BLOB
X509_BITS | PyCRYPT_BIT_BLOB


win32crypt.CryptEncryptMessage

str = CryptEncryptMessage(EncryptPara, RecipientCert , ToBeEncrypted )

Encrypts and encodes a message

Parameters

EncryptPara : PyCRYPT_ENCRYPT_MESSAGE_PARA

Encryption parameters

RecipientCert : (PyCERT_CONTEXT,...)

Sequence of handles to recipients' certificates

ToBeEncrypted : buffer

Data to be encrypted


win32crypt.CryptEnumKeyIdentifierProperties

list = CryptEnumKeyIdentifierProperties(KeyIdentifier, PropId , Flags , ComputerName )

Enumerates private keys for certificates and their properties

Parameters

KeyIdentifier=None : string

Id of a certificate key, can be None for all keys

PropId=0 : int

CERT_*_PROP_ID constant. Limits returned values to specified propery, Use 0 for all

Flags=0 : int

Can be CRYPT_KEYID_MACHINE_FLAG to list keys for local machine, or remote machine if ComputerName is given

ComputerName=None : PyUnicode

Name of remote computer, use None for local machine


win32crypt.CryptEnumOIDInfo

list = CryptEnumOIDInfo(GroupId)

Lists registered Object Identifiers that belong to specified group

Parameters

GroupId=0 : int

The type of OIDs to enmerate, one of the CRYPT_*_OID_GROUP_ID constants or 0 to list all


win32crypt.CryptEnumProviderTypes

[(PyUnicode,int),...] = CryptEnumProviderTypes()

Lists available local cryptographic provider types

Comments

Windows XP sp3 has a bug that causes this function to always fail with ERROR_MORE_DATA (234) See KB959160 for a hotfix

Return Value

Returns a sequence of tuples containing name and identifier of provider types


win32crypt.CryptEnumProviders

[(PyUnicode,int),...] = CryptEnumProviders()

List cryptography providers

Return Value

Returns a sequence of tuples containing provider name and type


win32crypt.CryptFindLocalizedName

PyUnicode = CryptFindLocalizedName(CryptName)

Returns localized name for predefined system stores (Root, My, .Default, .LocalMachine)

Parameters

CryptName : PyUnicode

Name of a system store


win32crypt.CryptFindOIDInfo

dict = CryptFindOIDInfo(KeyType, Key , GroupId )

Returns information about an algorithm identifier or object identifier

Parameters

KeyType : int

One of CRYPT_OID_INFO_OID_KEY,CRYPT_OID_INFO_NAME_KEY,CRYPT_OID_INFO_ALGID_KEY,CRYPT_OID_INFO_SIGN_KEY

Key : object

Type is dependent on KeyType

GroupId=0 : int

CRYPT_*_GROUP_ID constant, or 0

Return Value

Returns a dictionary of CRYPT_OID_INFO data

KeyType | Type of Key
CRYPT_OID_INFO_OID_KEY | An szOID_* character string
CRYPT_OID_INFO_NAME_KEY | A unicode name
CRYPT_OID_INFO_ALGID_KEY | An ALG_ID, one of the CALG_* integer constants
CRYPT_OID_INFO_SIGN_KEY | A tuple of 2 CALG_* integers (hash algorithm, public key algorithm)


win32crypt.CryptFormatObject

str = CryptFormatObject(StructType, Encoded , FormatStrType , CertEncodingType , FormatType , FormatStruct )

Formats an encoded buffer into a readable string

Parameters

StructType : str/int

OID identifying the type of encoded data, one of the szOID_* strings or an integer OID

Encoded : str

String containing encoded data to be formatted

FormatStrType=0 : int

String formatting options, combination of CRYPT_FORMAT_STR_MULTI_LINE, CRYPT_FORMAT_STR_NO_HEX

CertEncodingType=X509_ASN_ENCODING : int

Input encoding

FormatType=0 : int

Reserved, use only 0

FormatStruct=None : None

Reserved, use only None

Comments

Will handle all of the common certificate extension types

Win32 API References

Search for CryptFormatObject at msdn, google or google groups.


win32crypt.CryptGetDefaultProvider

PyUnicode = CryptGetDefaultProvider(ProvType, Flags )

Returns default provider for local machine or current user

Parameters

ProvType : int

Type of provider (PROV_* constant)

Flags : int

CRYPT_MACHINE_DEFAULT or CRYPT_USER_DEFAULT


win32crypt.CryptGetKeyIdentifierProperty

object = CryptGetKeyIdentifierProperty(KeyIdentifier, PropId , Flags , ComputerName )

Retrieves a property from a certificate by its key indentifier

Parameters

KeyIdentifier : string

Hash that identifies a certificate key

PropId=CERT_KEY_PROV_INFO_PROP_ID : int

Property identifier, one of the CERT_*_PROP_ID values

Flags=0 : int

Use CRYPT_KEYID_MACHINE_FLAG for machine keyset. (CRYPT_KEYID_ALLOC_FLAG is always added to Flags)

ComputerName=None : PyUnicode

Name of remote computer, use None for local machine

Comments

CERT_KEY_PROV_INFO_PROP_ID is only property currently supported


win32crypt.CryptGetMessageCertificates

PyCERTSTORE = CryptGetMessageCertificates(SignedBlob, MsgAndCertEncodingType , CryptProv , Flags )

Extracts certificates encoded in a message

Parameters

SignedBlob : buffer

Buffer containing a signed message

MsgAndCertEncodingType=X509_ASN_ENCODING|PKCS_7_ASN_ENCODING : int

Message and certificate encoding types

CryptProv=None : PyCRYPTPROV

Handle to a CSP, use None for default

Flags=0 : int

Same flags used with win32crypt::CertOpenStore


win32crypt.CryptGetMessageSignerCount

int = CryptGetMessageSignerCount(SignedBlob, MsgEncodingType )

Finds the number of signers of an encoded message

Parameters

SignedBlob : buffer

Buffer containing a signed message

MsgEncodingType=X509_ASN_ENCODING|PKCS_7_ASN_ENCODING : int

Message encoding type


win32crypt.CryptProtectData

bytes = CryptProtectData(DataIn, DataDescr , OptionalEntropy , Reserved , PromptStruct , Flags )

Encrypts data using a session key derived from current user's logon credentials

Parameters

DataIn : bytes

Data to be encrypted.

DataDescr=None : PyUnicode

Description to add to the data

OptionalEntropy=None : bytes

Extra entropy (eg password) for encryption process, can be None

Reserved=None : None

Must be None

PromptStruct=None : PyCRYPTPROTECT_PROMPTSTRUCT

Contains options for UI display during encryption and decryption, can be None

Flags=0 : int

Combination of CRYPTPROTECT_* flags


win32crypt.CryptQueryObject

dict = CryptQueryObject(ObjectType, Object , ExpectedContentTypeFlags , ExpectedFormatTypeFlags , Flags )

Determines the cryptographic type of input data

Parameters

ObjectType : int

Type of input, CERT_QUERY_OBJECT_BLOB or CERT_QUERY_OBJECT_FILE

Object : str

Raw data or a filename containing the data to be queried depending on ObjectType

ExpectedContentTypeFlags=CERT_QUERY_CONTENT_FLAG_ALL : int

One of the CERT_QUERY_CONTENT_FLAG_* constants

ExpectedFormatTypeFlags=CERT_QUERY_FORMAT_FLAG_ALL : int

One of the CERT_QUERY_FORMAT_FLAG_* constants

Flags=0 : int

Reserved, use only 0

Return Value

Returns a dictionary containing
{MsgAndCertEncodingType:int, ## encoding type, usually X509_ASN_ENCODING combined with PKCS_7_ASN_ENCODING
ContentType:int, ## One of the CERT_QUERY_CONTENT_* constants
FormatType:int, ## One of the CERT_QUERY_FORMAT_* constants
CertStore:PyCERTSTORE, ## Handle to certificate store containing all certficates in the object, may be None
Msg:PyCRYPTMSG, ## If input doesn't contains a PKCS7 message, will be None
Context:PyCERT_CONTEXT} ## A certificate, CRL, or CTL context depending on ContentType, may be None


win32crypt.CryptSetProviderEx

CryptSetProviderEx(ProvName, ProvType, Flags)

Sets default provider (for machine or user) for specified type

Parameters

ProvName : PyUnicode

Name of new default provider (MS_*_PROV value)

ProvType : int

One of the PROV_* provider types

Flags : int

CRYPT_MACHINE_DEFAULT or CRYPT_USER_DEFAULT. Combine with CRYPT_DELETE_DEFAULT to remove default.


win32crypt.CryptSignAndEncryptMessage

str = CryptSignAndEncryptMessage(SignPara, EncryptPara , RecipientCert , ToBeSignedAndEncrypted )

Encrypts, encodes and signs a message using a certificate

Parameters

SignPara : PyCRYPT_SIGN_MESSAGE_PARA

Message signing parameters

EncryptPara : PyCRYPT_ENCRYPT_MESSAGE_PARA

Encryption parameters

RecipientCert : (PyCERT_CONTEXT,...)

Sequence of certificates of intended recipients

ToBeSignedAndEncrypted : str

Buffer containing data to be encoded in the message


win32crypt.CryptSignMessage

str = CryptSignMessage(SignPara, ToBeSigned , DetachedSignature )

Signs and encodes a message

Parameters

SignPara : PyCRYPT_SIGN_MESSAGE_PARA

Message signing parameters

ToBeSigned : (str,...)

Sequence of strings containing message data. Can only contain 1 string if DetachedSignature parm is False.

DetachedSignature=False : boolean

If True, only the signature itself is encoded in output msg.


win32crypt.CryptStringToBinary

bytes, int, int = CryptStringToBinary(String, Flags )

Converts a formatted string back into raw bytes

Parameters

String : str

Formatted string to be converted to raw binary data

Flags : int

Input format (win32cryptcon.CRYPT_STRING_*)

Win32 API References

Search for CryptStringToBinary at msdn, google or google groups.

Return Value

Returns the decoded binary data, number of header characters skipped, and CRYPT_STRING_* value denoting the type of data found (used if input Flags is one of *_ANY values)


win32crypt.CryptUnprotectData

(str, bytes) = CryptUnprotectData(DataIn, OptionalEntropy , Reserved , PromptStruct , Flags )

Decrypts data that was encrypted using win32crypt::CryptProtectData.

Parameters

DataIn : bytes

Data to be decrypted.

OptionalEntropy=None : bytes

Extra entropy passed to CryptProtectData

Reserved=None : None

Must be None

PromptStruct=None : PyCRYPTPROTECT_PROMPTSTRUCT

Contains options for UI display during encryption and decryption, can be None

Flags=0 : int

Combination of CRYPTPROTECT_* flags

Return Value

The result is a tuple of (description, data) where description is the description that was passed to win32crypt::CryptProtectData, and data is the unencrypted data.


win32crypt.CryptVerifyDetachedMessageSignature

PyCERT_CONTEXT = CryptVerifyDetachedMessageSignature(SignerIndex, DetachedSignBlob , ToBeSigned , VerifyPara )

Verifies a signature that is encoded separately from the data

Parameters

SignerIndex : int

Index of the signer to verify

DetachedSignBlob : buffer

Buffer containing an encoded signature

ToBeSigned : (buffer,...)

Sequence of buffers containing message data.

VerifyPara=None : PyCRYPT_VERIFY_MESSAGE_PARA

Signature verification parameters, use None for defaults

Return Value

Returns the signing certificate


win32crypt.CryptVerifyMessageSignature

(PyCERT_CONTEXT, str) = CryptVerifyMessageSignature(SignedBlob, SignerIndex , VerifyPara , ReturnData )

Verifies the signature of an encoded message

Parameters

SignedBlob : str

Buffer containing a signed message

SignerIndex=0 : int

Index of the signer to verify, zero-based

VerifyPara=None : PyCRYPT_VERIFY_MESSAGE_PARA

Signature verification parameters, use None for defaults

ReturnData=False : boolean

Indicates if decoded data should be returned.

Return Value

Returns the signing certificate and the decoded data. If ReturnData parm is False, None is returned for data.


win32crypt.PFXImportCertStore

PyCERTSTORE = PFXImportCertStore(PFX, Password , Flags )

Creates a certificate store from PKCS#12 data (*.PFX files)

Parameters

PFX : bytes

Buffer containing PKCS#12-formatted certificate(s)

Password : str

Password used to encrypt the data, may be None

Flags : int

Allowed flags are CRYPT_EXPORTABLE,CRYPT_USER_PROTECTED,CRYPT_MACHINE_KEYSET, and CRYPT_USER_KEYSET

Comments

MSDN docs specify that *one* of the Flags can be used, but in practice a combination is allowed

Depending on the encrypting application, a blank password ("") may be treated differently that a NULL password (None), so if you have a PFX with no password try both.

Win32 API References

Search for PFXImportCertStore at msdn, google or google groups.


win32crypt.PFXIsPFXBlob

boolean = PFXIsPFXBlob(PFX)

Checks if data buffer contains a PFX blob

Parameters

PFX : bytes

Buffer containing data to be checked

Win32 API References

Search for PFXIsPFXBlob at msdn, google or google groups.


win32crypt.PFXVerifyPassword

boolean = PFXVerifyPassword(PFX, Password , Flags )

Checks if a PFX blob can be decrypted with given password

Parameters

PFX : bytes

Buffer containing PKCS#12-formatted certificate(s)

Password : str

Password used to encrypt the data, may be None

Flags : int

Allowed flags are CRYPT_EXPORTABLE,CRYPT_USER_PROTECTED,CRYPT_MACHINE_KEYSET, and CRYPT_USER_KEYSET

Win32 API References

Search for PFXVerifyPassword at msdn, google or google groups.


win32event

Module win32event

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

Methods

CancelWaitableTimer
Cancels a waiting timer.

CreateEvent
Creates a waitable event

CreateMutex
Creates a mutex

CreateSemaphore
Creates a semaphore, or opens an existing one

CreateWaitableTimer
Creates a waitable timer, or opens an existing one

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.

OpenWaitableTimer
Opens an existing named waitable timer 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

SetWaitableTimer
Sets a waitable timer.

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

CancelWaitableTimer()

Cancels a waiting timer.


win32event.CreateEvent

PyHANDLE = CreateEvent(EventAttributes, bManualReset , bInitialState , Name )

Creates a waitable event

Parameters

EventAttributes : PySECURITY_ATTRIBUTES

The security attributes, or None

bManualReset : bool

flag for manual-reset event

bInitialState : bool

flag for initial state

Name : PyUnicode

event-object name, or None

Return Value

The result is a handle to the created object


win32event.CreateMutex

PyHANDLE = CreateMutex(MutexAttributes, InitialOwner , Name )

Creates a mutex

Parameters

MutexAttributes : PySECURITY_ATTRIBUTES

Specifies inheritance and security descriptor for object, or None for defaults

InitialOwner : bool

flag for initial ownership

Name : PyUnicode

Mutex-object name, or None

Return Value

The result is a handle to the created object


win32event.CreateSemaphore

PyHANDLE = CreateSemaphore(SemaphoreAttributes, InitialCount , MaximumCount , SemaphoreName )

Creates a semaphore, or opens an existing one

Parameters

SemaphoreAttributes : PySECURITY_ATTRIBUTES

Specifies inheritance and security descriptor for object, or None for defaults

InitialCount : int

Initial count

MaximumCount : int

Maximum count

SemaphoreName : str

Semaphore-object name, or None

Win32 API References

Search for CreateSemaphore at msdn, google or google groups.

Return Value

The result is a handle to the object


win32event.CreateWaitableTimer

PyHANDLE = CreateWaitableTimer(TimerAttributes, ManualReset , TimerName )

Creates a waitable timer, or opens an existing one

Parameters

TimerAttributes : PySECURITY_ATTRIBUTES

Specifies inheritance and security descriptor for object, or None for defaults

ManualReset : bool

True for manual reset timer, or False to create a synchronization timer

TimerName : str

Timer object name, or None

Win32 API References

Search for CreateWaitableTimer at msdn, google or google groups.

Return Value

The result is a handle to the 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 : bool

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.

Comments

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, milliseconds , wakeMask , waitFlags )

Returns when a message arrives of an event is signalled

Parameters

handleList : [PyHANDLE, ...]

A sequence of handles to wait on.

milliseconds : int

time-out interval in milliseconds

wakeMask : int

type of input events to wait for

waitFlags : int

wait flags

Comments

This method will no longer raise a COM E_NOTIMPL exception as it is no longer dynamically loaded.


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 : bool

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 : bool

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 : bool

inherit flag

name : PyUnicode

name of semaphore to open.


win32event.OpenWaitableTimer

PyHANDLE = OpenWaitableTimer(desiredAccess, bInheritHandle , timerName )

Opens an existing named waitable timer object

Parameters

desiredAccess : int

access flag

bInheritHandle : bool

inherit flag

timerName : str

pointer to timer object name


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

SetWaitableTimer(handle, dueTime, period, func, param, resume_state)

Sets a waitable timer.

Parameters

handle : PyHANDLE

handle to timer

dueTime : long

timer due time

period : int

timer interval

func : object

completion routine - must be None

param : object

completion routine parameter - must be None

resume_state : bool

resume state


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 : bool

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 : bool

wait flag

milliseconds : int

time-out interval in milliseconds

bAlertable : bool

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 : bool

alertable wait flag.

Return Value

See win32event::WaitForSingleObject for return values.


win32evtlog

Module win32evtlog

A module, encapsulating the Windows Win32 event log API.
The Evt* functions are only available on Vista and later. Attempting to call them on XP will result in the process exiting, rather than a python exception.

Methods

ReadEventLog
Reads some event log records.

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.

ReportEvent
Reports an event

EvtOpenChannelEnum
Begins an enumeration of event channels

EvtNextChannelPath
Retrieves a channel path from an enumeration

EvtOpenLog
Opens an event log or exported log archive

EvtClearLog
Clears an event log and optionally exports events to an archive

EvtExportLog
Exports events from a channel or log file

EvtArchiveExportedLog
Localizes an exported event log file

EvtGetExtendedStatus
Returns additional error info from last Evt* call

EvtQuery
Opens a query over a log channel or exported log file

EvtNext
Returns events from a query

EvtSeek
Changes the current position in a result set

EvtRender
Formats an event into XML text

EvtSubscribe
Requests notification for events

EvtCreateBookmark
Creates a bookmark

EvtUpdateBookmark
Repositions a bookmark to an event

EvtGetChannelConfigProperty
Retreives channel configuration information

EvtOpenChannelConfig
Opens channel configuration

EvtOpenSession
Creates a session used to access the Event Log on another machine

EvtOpenPublisherEnum
Begins an enumeration of event publishers

EvtNextPublisherId
Returns the next publisher from an enumeration

EvtOpenPublisherMetadata
Opens a publisher to retrieve properties using win32evtlog::EvtGetPublisherMetadataProperty

EvtGetPublisherMetadataProperty
Retrieves a property from an event publisher

EvtOpenEventMetadataEnum
Enumerates the events that a publisher provides

EvtNextEventMetadata
Retrieves the next item from an event metadata enumeration

EvtGetEventMetadataProperty
Retrieves a property from an event publisher

EvtGetLogInfo
Retrieves log file or channel information

EvtGetEventInfo
Retrieves information about the source of an event

EvtGetObjectArraySize
Returns the size of an array of event objects

EvtGetObjectArrayProperty
Retrieves an item from an object array


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

EvtArchiveExportedLog(LogFilePath, Locale, Session, Flags)

Localizes an exported event log file

Parameters

LogFilePath : str

Filename of an exported log file

Locale : int

Locale id

Session=None : PyEVT_HANDLE

Handle to a remote session (see win32evtlog::EvtOpenSession), or None for local machine.

Flags=0 : int

Reserved

Comments

Accepts keyword args


win32evtlog.EvtClearLog

EvtClearLog(ChannelPath, TargetFilePath, Session, Flags)

Clears an event log and optionally exports events to an archive

Parameters

ChannelPath : str

Name of event log to be cleared

TargetFilePath=None : str

Name of file in which cleared events will be archived, or None

Session=None : PyEVT_HANDLE

Handle to a remote session (see win32evtlog::EvtOpenSession), or None for local machine.

Flags=0 : int

Reserved, use only 0

Comments

Accepts keyword args


win32evtlog.EvtCreateBookmark

PyEVT_HANDLE = EvtCreateBookmark(BookmarkXML)

Creates a bookmark

Parameters

BookmarkXML=None : str

XML representation of a bookmark as returned by win32evtlog::EvtRender, or None for a new bookmark

Comments

Accepts keyword args


win32evtlog.EvtExportLog

EvtExportLog(Path, TargetFilePath, Flags, Query, Session)

Exports events from a channel or log file

Parameters

Path : str

Path of a live event log channel or exported log file

TargetFilePath : str

File to create, cannot already exist

Flags : int

Combination of EvtExportLog* flags specifying the type of path

Query=None : str

Selects specific events to export

Session=None : PyEVT_HANDLE

Handle to a remote session (see win32evtlog::EvtOpenSession), or None for local machine.

Comments

Accepts keyword args


win32evtlog.EvtGetChannelConfigProperty

(object, int) = EvtGetChannelConfigProperty(ChannelConfig, PropertyId , Flags )

Retreives channel configuration information

Parameters

ChannelConfig : PyEVT_HANDLE

Config handle as returned by win32evtlog::EvtOpenChannelConfig

PropertyId : int

Property to retreive, one of EvtChannel* constants

Flags=0 : int

Reserved, use only 0

Comments

Accepts keyword args

Returns the value and type of value (EvtVarType*)


win32evtlog.EvtGetEventInfo

(object, int) = EvtGetEventInfo(Event, PropertyId )

Retrieves information about the source of an event

Parameters

Event : PyEVT_HANDLE

Handle to an event

PropertyId : int

Property to retreive, EvtEvent*

Comments

Accepts keyword args

Returns the value and type of value (EvtVarType*)


win32evtlog.EvtGetEventMetadataProperty

(object, int) = EvtGetEventMetadataProperty(EventMetadata, PropertyId , Flags )

Retrieves a property from an event publisher

Parameters

EventMetadata : PyEVT_HANDLE

Event metadata handle as returned by win32evtlog::EvtNextEventMetadata

PropertyId : int

Property to retreive, EventMetadata*

Flags=0 : int

Reserved, use only 0

Comments

Accepts keyword args

Return Value

Returns the value and type of value (EvtVarType*).


win32evtlog.EvtGetExtendedStatus

str = EvtGetExtendedStatus()

Returns additional error info from last Evt* call


win32evtlog.EvtGetLogInfo

(object, int) = EvtGetLogInfo(Log, PropertyId )

Retrieves log file or channel information

Parameters

Log : PyEVT_HANDLE

Event log handle as returned by win32evtlog::EvtOpenLog

PropertyId : int

Property to retreive, EvtLog*

Comments

Accepts keyword args

Returns the value and type of value (EvtVarType*)


win32evtlog.EvtGetObjectArrayProperty

(object, int) = EvtGetObjectArrayProperty(ObjectArray, PropertyId , ArrayIndex , Flags )

Retrieves an item from an object array

Parameters

ObjectArray : PyEVT_HANDLE

Handle to an array of objects as returned by win32evtlog::EvtGetPublisherMetadataProperty for some ProperyId's

PropertyId : int

Type of property contained in the array

ArrayIndex : int

Zero-based index of item to retrieve

Flags=0 : int

Reserved, use only 0

Comments

Accepts keyword args

Return Value

Returns the value and type of value (EvtVarType*)


win32evtlog.EvtGetObjectArraySize

int = EvtGetObjectArraySize(ObjectArray)

Returns the size of an array of event objects

Parameters

ObjectArray : PyEVT_HANDLE

Handle to an array of objects as returned by win32evtlog::EvtGetPublisherMetadataProperty for some ProperyId's

Comments

Accepts keyword args


win32evtlog.EvtGetPublisherMetadataProperty

(object, int) = EvtGetPublisherMetadataProperty(PublisherMetadata, PropertyId , Flags )

Retrieves a property from an event publisher

Parameters

PublisherMetadata : PyEVT_HANDLE

Publisher handle as returned by win32evtlog::EvtOpenPublisherMetadata

PropertyId : int

Property to retreive, EvtPublisherMetadata*

Flags=0 : int

Reserved, use only 0

Comments

Accepts keyword args

Return Value

Returns the value and type of value (EvtVarType*) Some properties return a handle (type EvtVarTypeEvtHandle) which can be iterated using win32evtlog::EvtGetObjectArraySize and win32evtlog::EvtGetObjectArrayProperty.


win32evtlog.EvtNext

(PyEVT_HANDLE,...) = EvtNext(ResultSet, Count , Timeout , Flags )

Returns events from a query

Parameters

ResultSet : PyEVT_HANDLE

Handle to event query or subscription

Count : int

Number of events to return

Timeout=-1 : int

Time to wait in milliseconds, use -1 for infinite

Flags=0 : int

Reserved, use only 0

Comments

Accepts keyword args

Return Value

Returns a tuple of handles to events. If no items are available, returns an empty tuple instead of raising an exception.


win32evtlog.EvtNextChannelPath

str = EvtNextChannelPath(ChannelEnum)

Retrieves a channel path from an enumeration

Parameters

ChannelEnum : PyEVT_HANDLE

Handle to an enumeration as returned by win32evtlog::EvtOpenChannelEnum

Comments

Accepts keyword args

Return Value

Returns None at end of enumeration


win32evtlog.EvtNextEventMetadata

PyEVT_HANDLE = EvtNextEventMetadata(EventMetadataEnum, Flags )

Retrieves the next item from an event metadata enumeration

Parameters

EventMetadataEnum : PyEVT_HANDLE

Enumeration handle as returned by win32evtlog::EvtOpenEventMetadataEnum

Flags=0 : int

Reserved, use only 0

Comments

Accepts keyword args


win32evtlog.EvtNextPublisherId

str = EvtNextPublisherId(PublisherEnum)

Returns the next publisher from an enumeration

Parameters

PublisherEnum : PyEVT_HANDLE

Handle to an enumeration as returned by win32evtlog::EvtOpenPublisherEnum

Comments

Accepts keyword args

Return Value

Returns None at end of enumeration


win32evtlog.EvtOpenChannelConfig

PyEVT_HANDLE = EvtOpenChannelConfig(ChannelPath, Session , Flags )

Opens channel configuration

Parameters

ChannelPath : str

Channel to be opened

Session=None : PyEVT_HANDLE

Session handle as returned by win32evtlog::EvtOpenSession, or None for local machine

Flags=0 : int

Reserved, use only 0

Comments

Accepts keyword args


win32evtlog.EvtOpenChannelEnum

PyEVT_HANDLE = EvtOpenChannelEnum(Session, Flags )

Begins an enumeration of event channels

Parameters

Session=None : PyEVT_HANDLE

Handle to a remote session (see win32evtlog::EvtOpenSession), or None for local machine.

Flags=0 : int

Reserved, use only 0

Comments

Accepts keyword args


win32evtlog.EvtOpenEventMetadataEnum

PyEVT_HANDLE = EvtOpenEventMetadataEnum(PublisherMetadata, Flags )

Enumerates the events that a publisher provides

Parameters

PublisherMetadata : PyEVT_HANDLE

Publisher handle as returned by win32evtlog::EvtOpenPublisherMetadata

Flags=0 : int

Reserved, use only 0

Comments

Accepts keyword args


win32evtlog.EvtOpenLog

PyEVT_HANDLE = EvtOpenLog(Path, Flags , Session )

Opens an event log or exported log archive

Parameters

Path : str

Event log name or Path of an export file

Flags : int

EvtOpenChannelPath (1) or EvtOpenFilePath (2)

Session=None : PyEVT_HANDLE

Handle to a remote session (see win32evtlog::EvtOpenSession), or None for local machine.

Comments

Accepts keyword args


win32evtlog.EvtOpenPublisherEnum

PyEVT_HANDLE = EvtOpenPublisherEnum(Session, Flags )

Begins an enumeration of event publishers

Parameters

Session=None : PyEVT_HANDLE

Handle to a remote session (see win32evtlog::EvtOpenSession), or None for local machine.

Flags=0 : int

Reserved, use only 0

Comments

Accepts keyword args


win32evtlog.EvtOpenPublisherMetadata

PyEVT_HANDLE = EvtOpenPublisherMetadata(PublisherIdentity, Session , LogFilePath , Locale , Flags )

Opens a publisher to retrieve properties using win32evtlog::EvtGetPublisherMetadataProperty

Parameters

PublisherIdentity : str

Publisher id as returned by win32evtlog::EvtNextPublisherId

Session=None : PyEVT_HANDLE

Handle to remote session, or None for local machine

LogFilePath=None : str

Log file from which to retrieve publisher, or None for locally registered publisher

Locale=0 : int

Locale to use for retrieved properties, use 0 for current locale

Flags=0 : int

Reserved, use only 0

Comments

Accepts keyword args


win32evtlog.EvtOpenSession

PyEVT_HANDLE = EvtOpenSession(Login, LoginClass , Timeout , Flags )

Creates a session used to access the Event Log on another machine

Parameters

Login : PyEVT_RPC_LOGIN

Credentials to be used to access remote machine

LoginClass=EvtRpcLogin : int

Type of login to perform, EvtRpcLogin is only defined value

Timeout=0 : int

Reserved, use only 0

Flags=0 : int

Reserved, use only 0

Comments

Accepts keyword args


win32evtlog.EvtQuery

PyEVT_HANDLE = EvtQuery(Path, Flags , Query , Session )

Opens a query over a log channel or exported log file

Parameters

Path : str

Log channel or exported log file, depending on Flags

Flags : int

Combination of EVT_QUERY_FLAGS (EvtQuery*)

Query=None : str

Selects events to return, None or '*' for all events

Session=None : PyEVT_HANDLE

Handle to a remote session (see win32evtlog::EvtOpenSession), or None for local machine.

Comments

Accepts keyword args


win32evtlog.EvtRender

str = EvtRender(Event, Flags )

Formats an event into XML text

Parameters

Event : PyEVT_HANDLE

Handle to an event or bookmark

Flags : int

EvtRenderEventXml or EvtRenderBookmark indicating type of handle

Comments

Accepts keyword args

Rendering event values (Flags=EvtRenderEventValues) is not currently supported


win32evtlog.EvtSeek

EvtSeek(ResultSet, Position, Flags, Bookmark, Timeout)

Changes the current position in a result set

Parameters

ResultSet : PyEVT_HANDLE

Handle to event query or subscription

Position : int

Offset (base from which to seek is specified by Flags)

Flags : int

EvtSeekRelative* flag indicating seek origin

Bookmark=None : PyEVT_HANDLE

Used as seek origin only if Flags contains EvtSeekRelativeToBookmark

Timeout=0 : int

Reserved, use only 0

Comments

Accepts keyword args


win32evtlog.EvtSubscribe

PyEVT_HANDLE = EvtSubscribe(ChannelPath, Flags , SignalEvent , Callback , Context , Query , Session , Bookmark )

Requests notification for events

Parameters

ChannelPath : str

Name of an event log channel

Flags : int

Combination of EvtSubscribe* flags determining how subscription is initiated

SignalEvent=None : Py_HANDLE

An event handle to be set when events are available (see win32event::CreateEvent)

Callback=None : function

Python function to be called with each event

Context=None : object

Arbitrary object to be passed to the callback function

Query=None : str

XML query used to select specific events, use None or '*' for all events

Session=None : PyEVT_HANDLE

Handle to a session on another machine, or None for local

Bookmark=None : PyEVT_HANDLE

If Flags contains EvtSubscribeStartAfterBookmark, used as starting point

Comments

Accepts keyword args

The method used to receive events is determined by the parameters passed in. To create a push subscription, define a callback function that will be called with each event. The function will receive 3 args: First is an integer specifying why the function was called (EvtSubscribeActionError or EvtSubscribeActionDeliver) Second is the context object passed to EvtSubscribe. Third is the handle to an event log record (if not called due to an error) If an event handle is passed in, a pull subscription is created. The event handle will be signalled when events are available, and the subscription handle can be passed to win32evtlog::EvtNext to obtain the events.


win32evtlog.EvtUpdateBookmark

PyEVT_HANDLE = EvtUpdateBookmark(Bookmark, Event )

Repositions a bookmark to an event

Parameters

Bookmark : PyEVT_HANDLE

Handle to a bookmark

Event : PyEVT_HANDLE

Handle to an event

Comments

Accepts keyword args


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

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

PyEVTLOG_HANDLE = 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 , Size )

Reads some event log records.

Parameters

Handle : Py_HANDLE

Handle to a an opened event log (see win32evtlog::OpenEventLog)

Flags : int

Reading flags

Offset : int

Record offset to read (in SEEK mode).

Size=4096 : int

Output buffer size.

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(EventLog, Type, Category, EventID, UserSid, Strings, RawData)

Reports an event

Parameters

EventLog : PyHANDLE

Handle to an event log

Type : int

win32con.EVENTLOG_* value

Category : int

Source-specific event category

EventID : int

Source-specific event identifier

UserSid : PySID

Sid of current user, can be None

Strings : sequence

Sequence of unicode strings to be inserted in message

RawData : str

Binary data for event, can be None


win32file

Module win32file

An interface to the win32 File API's
This module includes the tranactional NTFS operations introduced with Vista. The transacted functions are not wrapped separately, but are invoked by passing a transaction handle to the corresponding Unicode API function. This makes it simple to convert a set of file operations into a transaction by simply adding Transaction=PyHANDLE to the passed arguments. If Transaction is None, 0, or not specified, the non-transacted API function will be called.
Functions combined in this manner:
CreateFile / CreateFileTransacted
DeleteFile / DeleteFileTransacted
CreateDirectoryEx / CreateDirectoryTransacted
MoveFileWithProgress / MoveFileTransacted
CopyFileEx / CopyFileTransacted
GetFileAttributes / GetFileAttributesTransacted
SetFileAttributes / SetFileAttributesTransacted
CreateHardLink / CreateHardLinkTransacted
CreateSymbolicLink / CreateSymbolicLinkTransacted
RemoveDirectory / RemoveDirectoryTransacted

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

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

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.

CreateMailslot
Creates a mailslot on the local machine

GetMailslotInfo
Retrieves information about a mailslot

SetMailslotInfo
Sets a mailslot's timeout

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.

DeviceIoControl
Sends a control code to a device or file system driver

FindClose
Closes a find handle.

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,

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
Returns a file's creation, last access, and modification times.

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
Allocates a buffer which can be used with an overlapped Read operation using win32file::ReadFile

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.

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.

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
Locks a specified file for exclusive access by the calling process.

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

QueryDosDevice
Returns the mapping for a device name, or all device names

ReadDirectoryChangesW
retrieves information describing the changes occurring within a directory.

FILE_NOTIFY_INFORMATION
Decodes a PyFILE_NOTIFY_INFORMATION buffer.

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.

SetFilePointer
Moves the file pointer of an open file.

SetVolumeLabel
Sets a volume label for a disk drive.

UnlockFile
Unlocks a region of a file locked by win32file::LockFile or win32file::LockFileEx

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

_setmaxstdio
Set the maximum allowed number of open stdio handles

_getmaxstdio
Returns the maximum number of CRT io streams.

TransmitFile
Transmits a file over a socket TransmitFile(sock, filehandle, bytes_to_write, bytes_per_send, overlap, flags [, (prepend_buf, postpend_buf)])

ConnectEx
Version of connect that uses Overlapped I/O ConnectEx(sock, (addr, port), buf, overlap)

AcceptEx
Version of accept that uses Overlapped I/O

CalculateSocketEndPointSize
Calculate how many bytes are needed for the connection endpoints data for a socket.

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.

WSAEnumNetworkEvents
Return network events that caused the event associated with the socket to be signaled.

WSAAsyncSelect
Request windows message notification for 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. The function reinitializes all hardware and control settings, but it does not empty output or input queues.

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.

GetVolumeNameForVolumeMountPoint
Returns unique volume name.

GetVolumePathName
Returns volume mount point for a path

GetVolumePathNamesForVolumeName
Returns mounted paths for a volume

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

CreateSymbolicLink
Creates a symbolic link (reparse point)

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)

FileEncryptionStatus
retrieves the encryption status of the specified file.

QueryUsersOnEncryptedFile
Returns list of users for an encrypted file as tuples of (SID, certificate hash blob, display info)

QueryRecoveryAgentsOnEncryptedFile
Lists recovery agents for file as a tuple of tuples.

RemoveUsersFromEncryptedFile
Removes specified certificates from file - if certificate is not found, it is ignored

AddUsersToEncryptedFile
Allows user identified by SID and EFS certificate access to decrypt specified file

DuplicateEncryptionInfoFile
Duplicates EFS encryption from one file to another

BackupRead
Reads streams of data from a file

BackupSeek
Seeks forward in a file stream

BackupWrite
Restores file data

SetFileShortName
Set the 8.3 name of a file

CopyFileEx
Restartable file copy with optional progress routine

MoveFileWithProgress
Moves a file, and reports progress to a callback function

ReplaceFile
Replaces one file with another

OpenEncryptedFileRaw
Initiates a backup or restore operation on an encrypted file

ReadEncryptedFileRaw
Reads the encrypted bytes of a file for backup and restore purposes

WriteEncryptedFileRaw
Writes raw bytes to an encrypted file

CloseEncryptedFileRaw
Frees a context created by win32file::OpenEncryptedFileRaw

CreateFileW
Unicode version of CreateFile - see win32file::CreateFile for more information.

DeleteFileW
Deletes a file (Unicode version)

GetFileAttributesEx
Retrieves attributes for a specified file or directory.

SetFileAttributesW
Sets a file's attributes

CreateDirectoryExW
Creates a directory (Unicode version)

RemoveDirectory
Removes an existing directory

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

FindFilesIterator
Returns an interator based on FindFirstFile/FindNextFile. Similar to win32file::FindFiles , but avoids the creation of the list for huge directories.

FindStreams
List the data streams for a file

FindFileNames
Enumerates hard links that point to specified file

GetFinalPathNameByHandle
Returns the file name for an open file handle

SfcGetNextProtectedFile
Returns list of protected operating system files

SfcIsFileProtected
Checks if a file is protected

GetLongPathName
Retrieves the long path for a short path (8.3 filename)

GetFullPathName
Returns full path for path passed in

Wow64DisableWow64FsRedirection
Disables file system redirection for 32-bit processes running on a 64-bit system

Wow64RevertWow64FsRedirection
Reenables file system redirection for 32-bit processes running on a 64-bit system

GetFileInformationByHandleEx
Retrieves extended file information for an open file handle.

SetFileInformationByHandle
Changes file characteristics by file handle

ReOpenFile
Creates a new handle to an open file

OpenFileById
Opens a file by File Id or Object Id


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.

Pass a buffer of exactly the size returned by win32file::CalculateSocketEndPointSize to have AcceptEx return without reading any bytes from the remote connection.

Example

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

Return Value

The result is 0 or ERROR_IO_PENDING. All other values will raise win32file.error. Specifically: if the win32 function returns FALSE, WSAGetLastError() is checked for ERROR_IO_PENDING.


win32file.AddUsersToEncryptedFile

AddUsersToEncryptedFile(FileName, pUsers)

Allows user identified by SID and EFS certificate access to decrypt specified file

Parameters

FileName : string/unicode

File that additional users will be allowed to decrypt

pUsers : ((PySID,string,int),...)

Sequence representing ENCRYPTION_CERTIFICATE_LIST - elements are sequences consisting of users' Sid, encoded EFS certficate (user must export a .cer to obtain this data), and encoding type (usually 1 for X509_ASN_ENCODING)


win32file.AllocateReadBuffer

PyOVERLAPPEDReadBuffer = AllocateReadBuffer(bufSize)

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

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

(int, buffer, int) = BackupRead(hFile, NumberOfBytesToRead , Buffer , bAbort , bProcessSecurity , lpContext )

Reads streams of data from a file

Parameters

hFile : PyHANDLE

File handle opened by CreateFile

NumberOfBytesToRead : int

Number of bytes to be read from file

Buffer : buffer

Writeable buffer object that receives data read

bAbort : int

If true, ends read operation and frees backup context

bProcessSecurity : int

Indicates whether file's ACL stream should be read

lpContext : int

Pass 0 on first call, then pass back value returned from last call thereafter

Comments

Returns number of bytes read, data buffer, and context pointer for next operation If Buffer is None, a new buffer will be created of size NbrOfBytesToRead that can be passed back in subsequent calls


win32file.BackupSeek

long = BackupSeek(hFile, NumberOfBytesToSeek , lpContext )

Seeks forward in a file stream

Parameters

hFile : PyHANDLE

File handle used by a BackupRead operation

NumberOfBytesToSeek : long

Number of bytes to move forward in current stream

lpContext : int

Context pointer returned from a BackupRead operation

Comments

Function will only seek to end of current stream, used to seek past bad data or find beginning position for read of next stream Returns number of bytes actually moved


win32file.BackupWrite

(int,int) = BackupWrite(hFile, NumberOfBytesToWrite , Buffer , bAbort , bProcessSecurity , lpContext )

Restores file data

Parameters

hFile : PyHANDLE

File handle opened by CreateFile

NumberOfBytesToWrite : int

Length of data to be written to file

Buffer : string

A string or buffer object that contains the data to be written

bAbort : int

If true, ends write operation and frees backup context

bProcessSecurity : int

Indicates whether ACL's should be restored

lpContext : int

Pass 0 on first call, then pass back value returned from last call thereafter

Comments

Returns number of bytes written and context pointer for next operation


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

int = CalculateSocketEndPointSize(socket)

Calculate how many bytes are needed for the connection endpoints data for a socket.

Parameters

socket : PySocket /int

The socket for which to determine the size.

Comments

This function allows you to determine the minumum buffer size which can be passed to win32file::AcceptEx


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

CloseEncryptedFileRaw(Context)

Frees a context created by win32file::OpenEncryptedFileRaw

Parameters

Context : PyCObject

Context object returned from win32file::OpenEncryptedFileRaw

Comments

Only available on Windows 2000 or later


win32file.CloseHandle

CloseHandle(handle)

Closes an open handle.

Parameters

handle : PyHANDLE/int

A previously opened handle.


win32file.ConnectEx

(int, int) = ConnectEx(s, name , Overlapped , SendBuffer )

Version of connect that uses Overlapped I/O ConnectEx(sock, (addr, port), buf, overlap)

Parameters

s : PySocket /int

A bound, unconnected socket that will be used to connect

name : tuple

Address to connect to (host, port)

Overlapped : PyOVERLAPPED

An overlapped structure

SendBuffer=None : buffer

Buffer to send on the socket after connect

Return Value

Returns the completion code and number of bytes sent. The completion code will be 0 for a completed operation, or ERROR_IO_PENDING for a pending overlapped operation.

If the platform does not support ConnectEx (eg, Windows 2000), an exception will be thrown indicating the WSAIoctl function (which is used to fetch the function pointer) failed with error code WSAEINVAL (10022).


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

CopyFileEx(ExistingFileName, NewFileName, ProgressRoutine, Data, Cancel, CopyFlags, Transaction)

Restartable file copy with optional progress routine

Parameters

ExistingFileName : PyUNICODE

File to be copied

NewFileName : PyUNICODE

Place to which it will be copied

ProgressRoutine=None : CopyProgressRoutine

A python function that receives progress updates, can be None

Data=None : object

An arbitrary object to be passed to the callback function

Cancel=False : boolean

Pass True to cancel a restartable copy that was previously interrupted

CopyFlags=0 : int

Combination of COPY_FILE_* flags

Transaction=None : PyHANDLE

Handle to a transaction as returned by win32transaction::CreateTransaction

Comments

Accepts keyword args.

On Vista and later, the Transaction arg can be passed to invoke CopyFileTransacted

Win32 API References

Search for CopyFileEx at msdn, google or google groups.

Search for CopyFileTransacted at msdn, google or google groups.


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(TemplateDirectory, NewDirectory, SecurityAttributes, Transaction)

Creates a directory (Unicode version)

Parameters

TemplateDirectory : PyUnicode

Directory to use as a template, can be None

NewDirectory : PyUnicode

Name of directory to be created

SecurityAttributes=None : PySECURITY_ATTRIBUTES

Security for new directory (optional)

Transaction=None : PyHANDLE

Handle to a transaction (optional). See win32transaction::CreateTransaction.

Comments

If a transaction handle is passed, CreateDirectoryTransacted will be called (requires Vista or later).

Accepts keyword arguments.

Win32 API References

Search for CreateDirectoryEx at msdn, google or google groups.

Search for CreateDirectoryTransacted at msdn, google or google groups.


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 , SecurityAttributes , CreationDisposition , FlagsAndAttributes , TemplateFile , Transaction , MiniVersion , ExtendedParameter )

Unicode version of CreateFile - see win32file::CreateFile for more information.

Parameters

FileName : PyUnicode

Name of file

DesiredAccess : int

Combination of access mode flags. See MSDN docs.

ShareMode : int

Combination of FILE_SHARE_READ, FILE_SHARE_WRITE, FILE_SHARE_DELETE

SecurityAttributes : PySECURITY_ATTRIBUTES

Specifies security descriptor and handle inheritance, can be None

CreationDisposition : int

One of CREATE_ALWAYS,CREATE_NEW,OPEN_ALWAYS,OPEN_EXISTING or TRUNCATE_EXISTING

FlagsAndAttributes : int

Combination of FILE_ATTRIBUTE_* and FILE_FLAG_* flags

TemplateFile=None : PyHANDLE

Handle to file to be used as template, can be None

Transaction=None : PyHANDLE

Handle to the transaction as returned by win32transaction::CreateTransaction

MiniVersion=None : int

Transacted version of file to open, can be None

ExtendedParameter=None : None

Reserved, use only None

Comments

If Transaction is specified, CreateFileTransacted will be called (requires Vista or later)

Accepts keyword arguments.

Win32 API References

Search for CreateFile at msdn, google or google groups.

Search for CreateFileTransacted at msdn, google or google groups.


win32file.CreateHardLink

CreateHardLink(FileName, ExistingFileName, SecurityAttributes, Transaction)

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

Parameters

FileName : PyUnicode

The name of the new directory entry to be created.

ExistingFileName : PyUnicode

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

SecurityAttributes=None : PySECURITY_ATTRIBUTES

Optional SECURITY_ATTRIBUTES object. MSDN describes this parameter as reserved, so use only None

Transaction=None : PyHANDLE

Handle to a transaction, as returned by win32transaction::CreateTransaction

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 on Windows 2000 and later. Otherwise NotImplementedError will be raised.

Accepts keyword args.

If the Transaction parameter is specified, CreateHardLinkTransacted will be called (requires Vista or later)

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

Return Value

If an existing handle to a completion port is passed, the result of this function will be that same handle. See MSDN for more details.


win32file.CreateMailslot

PyHANDLE = CreateMailslot(Name, MaxMessageSize , ReadTimeout , SecurityAttributes )

Creates a mailslot on the local machine

Parameters

Name : str

Name of the mailslot, of the form \\.\\mailslot\\[path]name

MaxMessageSize : int

Largest message size. Use 0 for unlimited.

ReadTimeout : int

Timeout in milliseconds. Use -1 for no timeout.

SecurityAttributes : PySECURITY_ATTRIBUTES

Determines if returned handle is inheritable, can be None

Win32 API References

Search for CreateMailslot at msdn, google or google groups.


win32file.CreateSymbolicLink

CreateSymbolicLink(SymlinkFileName, TargetFileName, Flags, Transaction)

Creates a symbolic link (reparse point)

Parameters

SymlinkFileName : PyUnicode

Path of the symbolic link to be created

TargetFileName : PyUnicode

The name of file to which link will point

Flags=0 : int

SYMBOLIC_LINK_FLAG_DIRECTORY and SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE are the only defined flags

Transaction=None : PyHANDLE

Handle to a transaction, as returned by win32transaction::CreateTransaction

Comments

This method only exists on Vista and later.

Accepts keyword args.

Requires SeCreateSymbolicLink priv.

If the Transaction parameter is passed in, CreateSymbolicLinkTransacted will be called


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

Deletes a file (Unicode version)

Parameters

FileName : PyUnicode

Name of file to be deleted

Transaction=None : PyHANDLE

Transaction handle as returned by win32transaction::CreateTransaction

Comments

If a transaction handle is passed in, DeleteFileTransacted will be called (requires Windows Vista).

Accepts keyword arguments.

Win32 API References

Search for DeleteFile at msdn, google or google groups.

Search for DeleteFileTransacted at msdn, google or google groups.


win32file.DeleteVolumeMountPoint

DeleteVolumeMountPoint(VolumeMountPoint)

Unmounts the volume from the specified volume mount point.

Parameters

VolumeMountPoint : PyUnicode

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

Comments

Accepts keyword args.

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 requires Windows 2000 or later. On earlier platforms, NotImplementedError will be raised.

Example

Usage

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


win32file.DeviceIoControl

str/buffer = DeviceIoControl(Device, IoControlCode , InBuffer , OutBuffer , Overlapped )

Sends a control code to a device or file system driver

Parameters

Device : PyHANDLE

Handle to a file, device, or volume

IoControlCode : int

IOControl Code to use, from winioctlcon

InBuffer : str/buffer

The input data for the operation, can be None for some operations.

OutBuffer : int/buffer

Size of the buffer to allocate for output, or a writeable buffer as returned by win32file::AllocateReadBuffer.

Overlapped=None : PyOVERLAPPED

An overlapped object for async operations. Device handle must have been opened with FILE_FLAG_OVERLAPPED.

Comments

Accepts keyword args

Return Value

If a preallocated output buffer is passed in, the returned object may be the original buffer, or a view of the buffer with only the actual size of the retrieved data.
If OutBuffer is a buffer size and the operation is synchronous (ie no Overlapped is passed in), returns a plain string containing the retrieved data. For an async operation, a new writeable buffer is returned.


win32file.DuplicateEncryptionInfoFile

DuplicateEncryptionInfoFile(SrcFileName, DstFileName, CreationDisposition, Attributes, SecurityAttributes)

Duplicates EFS encryption from one file to another

Parameters

SrcFileName : PyUnicode

Encrypted file to read EFS metadata from

DstFileName : PyUnicode

File to be encrypted using EFS data from source file

CreationDisposition : int

Specifies whether an existing file should be overwritten (CREATE_NEW or CREATE_ALWAYS)

Attributes : int

File attributes

SecurityAttributes=None : PySECURITY_ATTRIBUTES

Specifies security for destination file

Comments

Requires Windows XP or later

Accepts keyword arguments.

Win32 API References

Search for DuplicateEncryptionInfoFile at msdn, google or google groups.


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

[(action, filename), ... = FILE_NOTIFY_INFORMATION(buffer, size )

Decodes a PyFILE_NOTIFY_INFORMATION buffer.

Parameters

buffer : string

The buffer to decode.

size : int

The number of bytes to refer to. Generally this will be smaller than the size of the buffer (and certainly never greater!)

Comments

See win32file::ReadDirectoryChangesW for more information.


win32file.FileEncryptionStatus

int = FileEncryptionStatus(FileName)

retrieves the encryption status of the specified file.

Parameters

FileName : string/unicode

file to query

Comments

Requires Windows 2000 or higher.

Return Value

The result is documented as being one of FILE_ENCRYPTABLE, FILE_IS_ENCRYPTED, FILE_SYSTEM_ATTR, FILE_ROOT_DIR, FILE_SYSTEM_DIR, FILE_UNKNOWN, FILE_SYSTEM_NOT_SUPPORT, FILE_USER_DISALLOWED, or FILE_READ_ONLY


win32file.FindClose

FindClose(hFindFile)

Closes a find handle.

Parameters

hFindFile : int

file search handle


win32file.FindCloseChangeNotification

FindCloseChangeNotification(hChangeHandle)

Closes a handle.

Parameters

hChangeHandle : int

handle to change notification to close


win32file.FindFileNames

[PyUnicode,...] = FindFileNames(FileName, Transaction )

Enumerates hard links that point to specified file

Parameters

FileName : PyUnicode

Name of file for which to find links

Transaction=None : PyHANDLE

Handle to a transaction, can be None

Comments

This uses the API functions FindFirstFileNameW, FindNextFileNameW and FindClose

Available on Vista and later

If Transaction is specified, a transacted search is performed using FindFirstFileNameTransacted


win32file.FindFilesIterator

iterator = FindFilesIterator(FileName, Transaction )

Returns an interator based on FindFirstFile/FindNextFile. Similar to win32file::FindFiles , but avoids the creation of the list for huge directories.

Parameters

FileName : string

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

Transaction=None : PyHANDLE

Handle to a transaction, can be None. If this parameter is not None, FindFirstFileTransacted will be called to perform a transacted search

Comments

Accepts keyword args.

FindFirstFileTransacted will be called if a transaction handle is passed in.

Return Value

The result is a Python iterator, with each next() method returning a WIN32_FIND_DATA tuple.


win32file.FindFilesW

list = FindFilesW(FileName, Transaction )

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

Parameters

FileName : string

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

Transaction=None : PyHANDLE

Transaction handle as returned by win32transaction::CreateTransaction. Can be None. If this parameter is not None, FindFirstFileTransacted will be called to perform a transacted search

Comments

Accepts keyword args.

FindFirstFileTransacted will be called if a transaction handle is passed in.

Win32 API References

Search for FindFirstFile at msdn, google or google groups.

Search for FindFirstFileTransacted at msdn, google or google groups.

Search for FindNextFile at msdn, google or google groups.

Search for FindClose at msdn, google or google groups.

Return Value

The return value is a list of WIN32_FIND_DATA tuples.


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

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

Parameters

hChangeHandle : int

handle to change notification to signal


win32file.FindStreams

[(long, PyUnicode),...] = FindStreams(FileName, Transaction )

List the data streams for a file

Parameters

FileName : PyUnicode

Name of file (or directory) to operate on

Transaction=None : PyHANDLE

Handle to a transaction, can be None

Comments

This uses the API functions FindFirstStreamW, FindNextStreamW and FindClose

Available on Windows Server 2003 and Vista

If the Transaction arg is not None, FindFirstStreamTransacted will be called in place of FindFirstStreamW

Return Value

Returns a list of tuples containing each stream's size and name


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

Comments

LocalSockAddr and RemoteSockAddr are ("xx.xx.xx.xx", port#) if iFamily == AF_INET

otherwise LocalSockAddr and RemoteSockAddr are just binary strings

and they should be unpacked with the struct module.


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

long = 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(rootPathName)

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

Parameters

rootPathName : string

Return Value

The result is one of the DRIVE_* constants.


win32file.GetDriveTypeW

int = GetDriveTypeW(rootPathName)

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

Parameters

rootPathName : string

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.

Comments

The win32file module exposes win32file::GetFileAttributes and win32file::GetFileAttributesW separately - both functions will accept either strings or Unicode objects but will always call the named function. This is different than win32api::GetFileAttributes, which only exposes one Python function and automatically calls the appropriate win32 function based on the type of the filename param.


win32file.GetFileAttributesEx

tuple = GetFileAttributesEx(FileName, InfoLevelId , Transaction )

Retrieves attributes for a specified file or directory.

Parameters

FileName : PyUnicode

File or directory for which to retrieve information 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 r"\\?\\" to the path.

InfoLevelId=GetFileExInfoStandard : int

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

Transaction=None : PyHANDLE

Handle to a transaction (optional). See win32transaction::CreateTransaction. If this parameter is specified, GetFileAttributesTransacted will be called (requires Vista or later).

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.

Accepts keyword arguments.

InfoLevelId | Information returned
GetFileExInfoStandard | Tuple representing a WIN32_FILE_ATTRIBUTE_DATA struc

Win32 API References

Search for GetFileAttributesEx at msdn, google or google groups.

Search for GetFileAttributesTransacted at msdn, google or google groups.

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

int = GetFileAttributesW(fileName)

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

Parameters

fileName : PyUnicode

Name of the file to retrieve attributes for.

Comments

Note that win32api::GetFileAttributes will automatically call GetFileAttributesW when passed a unicode filename param. See win32file::GetFileAttributes and win32api::GetFileAttributes for more.


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

object = GetFileInformationByHandleEx(File, FileInformationClass )

Retrieves extended file information for an open file handle.

Parameters

File : PyHANDLE

Handle to a file or directory. Do not pass a pipe handle.

FileInformationClass : int

Type of data to return, one of win32file.File*Info values

Comments

Available on Vista and later.

Accepts keyword args.

Return Value

Type of returned object is determined by the requested information class

Class | Returned info
FileBasicInfo | Dict representing a FILE_BASIC_INFO struct
FileStandardInfo | Dict representing a FILE_STANDARD_INFO struct
FileNameInfo | String containing the file name, without the drive letter
FileCompressionInfo | Dict representing a FILE_COMPRESSION_INFO struct
FileAttributeTagInfo | Dict representing a FILE_ATTRIBUTE_TAG_INFO struct
FileIdBothDirectoryInfo | Sequence of dicts representing FILE_ID_BOTH_DIR_INFO structs. Call in loop until no more files are returned.
FileIdBothDirectoryRestartInfo | Sequence of dicts representing FILE_ID_BOTH_DIR_INFO structs.
FileStreamInfo | Sequence of dicts representing FILE_STREAM_INFO structs


win32file.GetFileSize

long = GetFileSize()

Determines the size of a file.


win32file.GetFileTime

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

Returns a file's creation, last access, and modification times.

Parameters

handle : PyHANDLE

Handle to the file.

creationTime : PyTime

accessTime : PyTime

writeTime : PyTime

Comments

Times are returned in UTC time.


win32file.GetFileType

int = GetFileType(hFile)

Determines the type of a file.

Parameters

hFile : PyHANDLE

The handle to the file.


win32file.GetFinalPathNameByHandle

PyUnicode = GetFinalPathNameByHandle(File, Flags )

Returns the file name for an open file handle

Parameters

File : PyHANDLE

An open file handle

Flags : int

Specifies type of path to return. (win32con.FILE_NAME_NORMALIZED,FILE_NAME_OPENED,VOLUME_NAME_DOS,VOLUME_NAME_GUID,VOLUME_NAME_NONE,VOLUME_NAME_NT)

Comments

Exists on Windows Vista or later.

Accepts keyword arguments.

Win32 API References

Search for GetFinalPathNameByHandle at msdn, google or google groups.


win32file.GetFullPathName

str/unicode = GetFullPathName(FileName, Transaction )

Returns full path for path passed in

Parameters

FileName : str/unicode

Path on which to operate

Transaction=None : PyHANDLE

Handle to a transaction as returned by win32transaction::CreateTransaction

Comments

This function takes either a plain string or a unicode string, and returns the same type If unicode is passed in, GetFullPathNameW is called, which supports filenames longer than MAX_PATH

If Transaction parameter is specified, GetFullPathNameTransacted is called (requires Vista or later)


win32file.GetLogicalDrives

int = GetLogicalDrives()

Returns a bitmaks of the logical drives installed.


win32file.GetLongPathName

PyUnicode = GetLongPathName(ShortPath, Transaction )

Retrieves the long path for a short path (8.3 filename)

Parameters

ShortPath : PyUnicode

8.3 path to be expanded

Transaction=None : PyHANDLE

Handle to a transaction. If specified, GetLongPathNameTransacted will be called.

Comments

Accepts keyword args


win32file.GetMailslotInfo

(int,int,int,int) = GetMailslotInfo(Mailslot)

Retrieves information about a mailslot

Parameters

Mailslot : PyHANDLE

Handle to a mailslot

Win32 API References

Search for GetMailslotInfo at msdn, google or google groups.

Return Value

Returns (maximum message size, next message size, message count, timeout)


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 0, otherwise it will be set to the win32 error code.


win32file.GetVolumeNameForVolumeMountPoint

PyUnicode = GetVolumeNameForVolumeMountPoint(VolumeMountPoint)

Returns unique volume name.

Parameters

VolumeMountPoint : PyUnicode

Volume mount point or root drive - trailing backslash required

Comments

Requires Win2K or later.

Accepts keyword args.


win32file.GetVolumePathName

PyUnicode = GetVolumePathName(FileName, BufferLength )

Returns volume mount point for a path

Parameters

FileName : PyUnicode

File/dir for which to return volume mount point

BufferLength=0 : int

Optional parm to allocate extra space for returned string

Comments

Api gives no indication of how much memory is needed, so function assumes returned path will not be longer that length of input path + 1. Use GetFullPathName first for relative paths, or GetLongPathName for 8.3 paths. Optional second parm can also be used to override the buffer size for returned path

Accepts keyword args.


win32file.GetVolumePathNamesForVolumeName

[PyUnicode,...] = GetVolumePathNamesForVolumeName(VolumeName)

Returns mounted paths for a volume

Parameters

VolumeName : PyUnicode

Name of a volume as returned by win32file::GetVolumeNameForVolumeMountPoint

Comments

Requires WinXP or later

Accepts keyword args


win32file.LockFile

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

Locks a specified file for exclusive access by the calling process.

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, can be None for delayed delete operation

flags : int

flag to determine how to move file (win32file.MOVEFILE_*)


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, can be None for delayed delete operation

flags : int

flag to determine how to move file (win32file.MOVEFILE_*)


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

MoveFileWithProgress(ExistingFileName, NewFileName, ProgressRoutine, Data, Flags, Transaction)

Moves a file, and reports progress to a callback function

Parameters

ExistingFileName : PyUNICODE

File or directory to be moved

NewFileName : PyUNICODE

Destination, can be None if flags contain MOVEFILE_DELAY_UNTIL_REBOOT

ProgressRoutine=None : CopyProgressRoutine

A python function that receives progress updates, can be None

Data=None : object

An arbitrary object to be passed to the callback function

Flags=0 : int

Combination of MOVEFILE_* flags

Transaction=None : PyHANDLE

Handle to a transaction (optional). See win32transaction::CreateTransaction.

Comments

Only available on Windows 2000 or later

Accepts keyword arguments.

On Vista and later, the Transaction arg can be passed to invoke MoveFileTransacted


win32file.OpenEncryptedFileRaw

PyCObject = OpenEncryptedFileRaw(FileName, Flags )

Initiates a backup or restore operation on an encrypted file

Parameters

FileName : PyUNICODE

Name of file on which to operate

Flags : int

CREATE_FOR_IMPORT, CREATE_FOR_DIR, OVERWRITE_HIDDEN, or 0 for export

Comments

Only available on Windows 2000 or later

Return Value

Returns a PyCObject containing an operation context that can be passed to win32file::ReadEncryptedFileRaw or win32file::WriteEncryptedFileRaw. Context must be destroyed using win32file::CloseEncryptedFileRaw.


win32file.OpenFileById

PyHANDLE = OpenFileById(File, FileId , DesiredAccess , ShareMode , Flags , SecurityAttributes )

Opens a file by File Id or Object Id

Parameters

File : PyHANDLE

Handle to a file on the volume that contains the file to open

FileId : int/PyIID

File Id or Object Id of the file to open

DesiredAccess : int

Access mode

ShareMode : int

Sharing mode (FILE_SHARE_*)

Flags : int

Combination of FILE_FLAG_* flags

SecurityAttributes=None : PySECURITY_ATTRIBUTES

Reserved, use only None

Comments

Available on Vista and later.

Accepts keyword args.


win32file.PostQueuedCompletionStatus

None = PostQueuedCompletionStatus(handle, numberOfbytes , completionKey , 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=0 : int

value to return via GetQueuedCompletionStatus' first result

completionKey=0 : int

value to return via GetQueuedCompletionStatus' second result

overlapped=None : PyOVERLAPPED

value to return via GetQueuedCompletionStatus' third result

Comments

Note that if you post overlapped objects, but your post is closed before all pending requests are processed, the overlapped objects (including its 'handle' and 'object' members) will leak. See MS KB article Q192800 for a summary of this.


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

string = QueryDosDevice(DeviceName)

Returns the mapping for a device name, or all device names

Parameters

DeviceName : string

Name of device to query, or None to return all defined devices

Return Value

Returns a string containing substrings separated by NULLs with 2 terminating NULLs


win32file.QueryRecoveryAgentsOnEncryptedFile

(PySID,string,unicode) = QueryRecoveryAgentsOnEncryptedFile(FileName)

Lists recovery agents for file as a tuple of tuples.

Parameters

FileName : string/unicode

file to query

Return Value

The result is a tuple of tuples - ((SID, certificate hash blob, display info),....)


win32file.QueryUsersOnEncryptedFile

(PySID,string,unicode) = QueryUsersOnEncryptedFile(FileName)

Returns list of users for an encrypted file as tuples of (SID, certificate hash blob, display info)

Parameters

FileName : string/unicode

file to query


win32file.ReOpenFile

PyHANDLE = ReOpenFile(OriginalFile, DesiredAccess , ShareMode , Flags )

Creates a new handle to an open file

Parameters

OriginalFile : PyHANDLE

An open file handle

DesiredAccess : int

Access mode, cannot conflict with original access mode

ShareMode : int

Sharing mode (FILE_SHARE_*), cannot conflict with original share mode

Flags : int

Combination of FILE_FLAG_* flags

Comments

Available on Vista and later.

Accepts keyword args.


win32file.ReadDirectoryChangesW

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

retrieves information describing the changes occurring within a directory.

Parameters

handle : PyHANDLE

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

An overlapped object. The directory must also be opened with FILE_FLAG_OVERLAPPED.

Comments

If you pass an overlapped object, you almost certainly must pass a buffer object for the asynchronous results - failure to do so may crash Python as the asynchronous result writes to invalid memory.

The FILE_NOTIFY_INFORMATION structure used by this function is variable length, depending on the length of the filename. The size of the buffer must be at least 6 bytes long + the length of the filenames returned. The number of notifications that can be returned for a given buffer size depends on the filename lengths.

Return Value

If a buffer size is passed, the result is a list of (action, filename)

If a buffer is passed, the result is None - you must use the overlapped object to determine when the information is available and how much is valid. The buffer can then be passed to win32file::FILE_NOTIFY_INFORMATION


win32file.ReadEncryptedFileRaw

ReadEncryptedFileRaw(ExportCallback, CallbackContext, Context)

Reads the encrypted bytes of a file for backup and restore purposes

Parameters

ExportCallback : ExportCallBack

Python function that receives chunks of data as it is read

CallbackContext : object

Arbitrary Python object to be passed to callback function

Context : PyCObject

Context object returned from win32file::OpenEncryptedFileRaw

Comments

Only available on Windows 2000 or later


win32file.ReadFile

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

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 result, or a buffer to fill with the result. If a buffer object and overlapped is passed, the result is the buffer itself. If a buffer but no overlapped is passed, the result is a new string object, built from the buffer, but with a length that reflects the data actually read.

overlapped=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)) [py2k] or (bytes(object)) [py3k] 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(PathName, Transaction)

Removes an existing directory

Parameters

PathName : PyUnicode

Name of directory to be removed

Transaction=None : PyHANDLE

Handle to a transaction (optional). See win32transaction::CreateTransaction.

Comments

If a transaction handle is passed in, RemoveDirectoryTransacted will be called (requires Vista or later)

Accepts keyword arguments. Implemented only as Unicode.

Win32 API References

Search for RemoveDirectory at msdn, google or google groups.

Search for RemoveDirectoryTransacted at msdn, google or google groups.


win32file.RemoveUsersFromEncryptedFile

RemoveUsersFromEncryptedFile(FileName, pHashes)

Removes specified certificates from file - if certificate is not found, it is ignored

Parameters

FileName : string/unicode

File from which to remove users

pHashes : ((PySID,string,unicode),...)

Sequence representing an ENCRYPTION_CERTIFICATE_HASH_LIST structure, as returned by QueryUsersOnEncryptedFile


win32file.ReplaceFile

ReplaceFile(ReplacedFileName, ReplacementFileName, BackupFileName, ReplaceFlags, Exclude, Reserved)

Replaces one file with another

Parameters

ReplacedFileName : PyUNICODE

File to be replaced

ReplacementFileName : PyUNICODE

File that will replace it

BackupFileName=None : PyUNICODE

Place at which to create a backup of the replaced file, can be None

ReplaceFlags=0 : int

Combination of REPLACEFILE_* flags

Exclude=None : None

Reserved, use None if passed in

Reserved=None : None

Reserved, use None if passed in

Comments

Only available on Windows 2000 or later


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. The function reinitializes all hardware and control settings, but it does not empty output or input queues.

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 : str/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, FileAttributes, Transaction)

Sets a file's attributes

Parameters

FileName : PyUNICODE

File or directory whose attributes are to be changed

FileAttributes : int

Combination of FILE_ATTRIBUTE_* flags

Transaction=None : PyHANDLE

Handle to the transaction. See win32transaction::CreateTransaction.

Comments

If Transaction is not None, SetFileAttributesTransacted will be called (requires Vista or later)

Accepts keyword arguments.

Win32 API References

Search for SetFileAttributes at msdn, google or google groups.

Search for SetFileAttributesTransacted at msdn, google or google groups.


win32file.SetFileInformationByHandle

SetFileInformationByHandle(File, FileInformationClass, Information)

Changes file characteristics by file handle

Parameters

File : PyHANDLE

Handle to a file or directory. Do not pass a pipe handle.

FileInformationClass : int

Type of data, one of win32file.File*Info values

Information : object

Type is dependent on the class to be changed

Class | Type of input
FileBasicInfo | Dict representing a FILE_BASIC_INFO struct, containing {"CreationTime":PyTime, "LastAccessTime":PyTime, "LastWriteTime":PyTime, "ChangeTime":PyTime, "FileAttributes":int}
FileRenameInfo | Dict representing a FILE_RENAME_INFO struct, containing {"ReplaceIfExists":boolean, "RootDirectory":PyHANDLE, "FileName":str} MSDN says the RootDirectory is "A handle to the root directory in which the file to be renamed is located". However, this is actually the destination dir, can be None to stay in same dir.
FileDispositionInfo | Boolean indicating if file should be deleted when handle is closed
FileAllocationInfo | Int giving the allocation size.
FileEndOfFileInfo | Int giving the EOF position, cannot be greater than allocated size.
FileIoPriorityHintInfo | Int containing the IO priority (IoPriorityHint*)

Comments

Available on Vista and later.

Accepts keyword args.


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

SetFileShortName(hFile, ShortName)

Set the 8.3 name of a file

Parameters

hFile : PyHANDLE

Handle to a file or directory

ShortName : PyUNICODE

The 8.3 name to be applied to the file

Comments

This function is only available on WinXP and later

File handle must be opened with FILE_FLAG_BACKUP_SEMANTICS, and SE_RESTORE_NAME privilege must be enabled


win32file.SetFileTime

SetFileTime(File, CreationTime, LastAccessTime, LastWriteTime, UTCTimes)

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

Parameters

File : PyHANDLE

Previously opened handle (opened with FILE_WRITE_ATTRIBUTES access).

CreationTime=None : PyTime

File created time. None for no change.

LastAccessTime=None : PyTime

File access time. None for no change.

LastWriteTime=None : PyTime

File written time. None for no change.

UTCTimes=False : boolean

If True, input times are treated as UTC and no conversion is done, otherwise they are treated as local times. Defaults to False for backward compatibility. This parameter is ignored in Python 3.x, where you should always pass datetime objects with timezone information.


win32file.SetMailslotInfo

SetMailslotInfo(Mailslot, ReadTimeout)

Sets a mailslot's timeout

Parameters

Mailslot : PyHANDLE

Handle to a mailslot

ReadTimeout : int

Timeout in milliseconds, use -1 for no timeout

Win32 API References

Search for SetMailslotInfo at msdn, google or google groups.


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(VolumeMountPoint, VolumeName )

Mounts the specified volume at the specified volume mount point.

Parameters

VolumeMountPoint : PyUnicode

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

VolumeName : PyUnicode

The volume to mount there

Comments

Accepts keyword args.

Note that both parameters must have trailing backslashes.

This method exists only on Windows 2000 or later. On earlier platforms, NotImplementedError 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.SfcGetNextProtectedFile

[PyUnicode,...] = SfcGetNextProtectedFile()

Returns list of protected operating system files

Win32 API References

Search for SfcGetNextProtectedFile at msdn, google or google groups.


win32file.SfcIsFileProtected

boolean = SfcIsFileProtected(ProtFileName)

Checks if a file is protected

Parameters

ProtFileName : PyUnicode

Name of file to be checked


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

TransmitFile(Socket, File, NumberOfBytesToWrite, NumberOfBytesPerSend, Overlapped, Flags, Head, Tail)

Transmits a file over a socket TransmitFile(sock, filehandle, bytes_to_write, bytes_per_send, overlap, flags [, (prepend_buf, postpend_buf)])

Parameters

Socket : PySocket /int

Socket that will be used to send the file

File : PyHANDLE/int

Handle to the file

NumberOfBytesToWrite : int

The number of bytes in the file to transmit, use 0 for entire file.

NumberOfBytesPerSend : int

The size, in bytes, of each block of data sent in each send operation.

Overlapped : PyOVERLAPPED

An overlapped structure, can be None.

Flags : int

A set of flags used to modify the behavior of the TransmitFile function call. (win32file.TF_*)

Head=None : buffer

Buffer to send on the socket before the file

Tail=None : buffer

Buffer to send on the socket after the file

Return Value

Returns 0 on completion, or ERROR_IO_PENDING if an overlapped operation has been queued


win32file.UnlockFile

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

Unlocks a region of a file locked by win32file::LockFile or win32file::LockFileEx

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

WSAAsyncSelect(socket, hwnd, int, networkEvents)

Request windows message notification for 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.WSAEnumNetworkEvents

dict = WSAEnumNetworkEvents(s, hEvent )

Return network events that caused the event associated with the socket to be signaled.

Parameters

s : PySocket

Socket to check for netork events, previously registered for network event notification with WSAEventSelect.

hEvent : PyHANDLE

Optional handle to the event associated with socket s in the last call to WSAEventSelect. If specified, the event will be reset.

Return Value

A dictionary mapping network events that occured for the specified socket since the last call to this function (e.g. FD_READ, FD_WRITE) to their associated error code, or 0 if the event occured without an error. The events returned are a subset of events previously registered for this socket with WSAEventSelect.


win32file.WSAEventSelect

WSAEventSelect(socket, hEvent, networkEvents)

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

Parameters

socket : PySocket

socket to attach to the event

hEvent : PyHandle

Event handle for the socket to become attached to.

networkEvents : int

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


win32file.WSARecv

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

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

Parameters

s : PySocket /int

Socket to send data on.

buffer : buffer

Buffer to send data from.

ol : PyOVERLAPPED

An overlapped structure

dwFlags : int

Optional reception flags.


win32file.WSASend

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

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

Parameters

s : PySocket /int

Socket to send data on.

buffer : string/buffer

Buffer to send data from.

ol : PyOVERLAPPED

An overlapped structure

dwFlags : int

Optional send flags.


win32file.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.Wow64DisableWow64FsRedirection

int = Wow64DisableWow64FsRedirection()

Disables file system redirection for 32-bit processes running on a 64-bit system

Comments

Requires 64-bit XP or later

Return Value

Returns a state value to be passed to win32file::Wow64RevertWow64FsRedirection


win32file.Wow64RevertWow64FsRedirection

Wow64RevertWow64FsRedirection(OldValue)

Reenables file system redirection for 32-bit processes running on a 64-bit system

Parameters

OldValue : int

State returned from Wow64DisableWow64FsRedirection

Comments

Requires 64-bit XP or later


win32file.WriteEncryptedFileRaw

WriteEncryptedFileRaw(ImportCallback, CallbackContext, Context)

Writes raw bytes to an encrypted file

Parameters

ImportCallback : ImportCallBack

Python function that supplies data to be written

CallbackContext : object

Arbitrary Python object to be passed to callback function

Context : PyCObject

Context object returned from win32file::OpenEncryptedFileRaw

Comments

Only available on Windows 2000 or later


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

Gets operating-system file handle associated with existing stream

Parameters

fd : int

File descriptor as returned by file.fileno()


win32file._getmaxstdio

int = _getmaxstdio()

Returns the maximum number of CRT io streams.


win32file._open_osfhandle

int = _open_osfhandle(osfhandle, flags )

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

Parameters

osfhandle : PyHANDLE

An open file handle

flags : int

O_APPEND,O_RDONLY, or O_TEXT


win32file._setmaxstdio

int = _setmaxstdio(newmax)

Set the maximum allowed number of open stdio handles

Parameters

newmax : int

Maximum number of open stdio streams, 2048 max

Return Value

Returns the number that was set, or -1 on failure.


win32gui

Module win32gui

A module which provides an interface to the native win32 GUI API.
Note that a module winxpgui also exists, which has the same methods as win32gui, but has an XP manifest and is setup for side-by-side sharing support for certain system DLLs, notably commctl32.

Methods

EnumFontFamilies
Enumerates the available font families.

set_logger
Sets a logger object for exceptions and error information

LOGFONT
Creates a LOGFONT object.

CreateFontIndirect
function creates a logical font that has the specified characteristics. The font can subsequently be selected as the current font for any device context.

GetObject
Returns a struct containing the parameters used to create a GDI object

GetObjectType
Returns the type (OBJ_* constant) of a GDI handle

PyGetMemory
Returns a buffer object from and address and length

PyGetString
Returns a string from an address.

PySetString
Copies a string to an address (null terminated). You almost certainly should use win32gui::PySetMemory instead.

PySetMemory
Copies bytes to an address.

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

PyGetBufferAddressAndLen
Returns a buffer object address and len

FlashWindow
The FlashWindow function flashes the specified window one time. It does not change the active state of the window.

FlashWindowEx
The FlashWindowEx function flashes the specified window a specified number of times.

GetWindowLong

GetClassLong

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

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.

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.

GetDlgItemInt
Returns the integer value of a dialog control

SetDlgItemInt
Places an integer value in a dialog control

GetDlgCtrlID
Retrieves the identifier of the specified control.

GetDlgItemText
Returns the text of a dialog control

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.

InitCommonControlsEx
Initializes specific common controls.

LoadCursor
Loads a cursor.

SetCursor

GetCursor

GetCursorInfo
Retrieves information about the global cursor.

CreateAcceleratorTable
Creates an accelerator table

DestroyAccleratorTable
Destroys an accelerator table

LoadMenu
Loads a menu

DestroyMenu
Destroys a previously loaded menu.

SetMenu
Sets the menu for the specified window.

GetMenu
Gets the menu for the specified window.

LoadIcon
Loads an icon

CopyIcon
Copies an icon

DrawIcon
Draws an icon or cursor into the specified device context. To specify additional drawing options, use the win32gui::DrawIconEx function.

DrawIconEx
Draws an icon or cursor into the specified device context, performing the specified raster operations, and stretching or compressing the icon or cursor as specified.

CreateIconIndirect
Creates an icon or cursor from an ICONINFO structure.

CreateIconFromResource
Creates an icon or cursor from resource bits describing the 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.

BitBlt
Performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into a destination device context.

StretchBlt
Copies a bitmap from a source rectangle into a destination rectangle, stretching or compressing the bitmap to fit the dimensions of the destination rectangle, if necessary

PatBlt
Paints a rectangle by combining the current brush with existing colors

SetStretchBltMode
Sets the stretching mode used by win32gui::StretchBlt

GetStretchBltMode
Returns the stretching mode used by win32gui::StretchBlt

TransparentBlt
Transfers color from one DC to another, with one color treated as transparent

MaskBlt
Combines the color data for the source and destination bitmaps using the specified mask and raster operation.

AlphaBlend
Transfers color information using alpha blending

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

ImageList_SetOverlayImage
Adds a specified image to the list of images to be used as overlay masks. An image list can have up to four overlay masks in version 4.70 and earlier and up to 15 in version 4.71. The function assigns an overlay mask index to the specified image.

MessageBox
Displays a message box

MessageBeep
Plays a waveform sound.

CreateWindow
Creates a new window.

DestroyWindow

EnableWindow
Enables and disables keyboard and mouse input to a window

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.

DragAcceptFiles
Registers whether a window accepts dropped files.

DragDetect
captures the mouse and tracks its movement until the user releases the left button, presses the ESC key, or moves the mouse outside the drag rectangle around the specified point.

SetDoubleClickTime

GetDoubleClickTime

HideCaret
Hides the caret

SetCaretPos
Changes the position of the caret

GetCaretPos
Returns the current caret position

ShowCaret
Shows the caret at its current position

ShowWindow
Shows or hides a window and changes its state

IsWindowVisible
Indicates if the window has the WS_VISIBLE style.

IsWindowEnabled
Indicates if the window is enabled.

SetFocus
Sets focus to the specified window.

GetFocus
Returns the HWND of the window with focus.

UpdateWindow

BringWindowToTop

SetActiveWindow

GetActiveWindow

SetForegroundWindow

GetForegroundWindow

GetClientRect
Returns the rectangle of the client area of a window, in client coordinates

GetDC
Gets the device context for the window.

SaveDC
Save the state of a device context

RestoreDC
Restores a device context state

DeleteDC
Deletes a DC

CreateCompatibleDC
Creates a memory device context (DC) compatible with the specified device.

CreateCompatibleBitmap
Creates a bitmap compatible with the device that is associated with the specified device context.

CreateBitmap
Creates a bitmap

SelectObject
Selects an object into the specified device context (DC). The new object replaces the previous object of the same type.

GetCurrentObject
Retrieves currently selected object from a DC

GetWindowRect
Returns the rectangle for a window in screen coordinates

GetStockObject
Creates a handle to one of the standard system Gdi objects

PostQuitMessage

WaitMessage
Waits for a message

SetWindowPos
Sets the position and size of a window

GetWindowPlacement
Returns placement information about the current window.

SetWindowPlacement
Sets the windows placement

RegisterClass
Registers a window class.

UnregisterClass
Unregisters a window class created by win32gui::RegisterClass

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

PumpWaitingMessages
Pumps all waiting messages for the current thread.

GetMessage

TranslateMessage

DispatchMessage

TranslateAccelerator

PeekMessage

Shell_NotifyIcon
Adds, removes or modifies a taskbar icon.

GetSystemMenu

DrawMenuBar

MoveWindow

CloseWindow

DeleteMenu

RemoveMenu

CreateMenu

CreatePopupMenu

TrackPopupMenu
Display popup shortcut menu

CommDlgExtendedError

ExtractIcon

ExtractIconEx

DestroyIcon

GetIconInfo
Returns parameters for an icon or cursor

ScreenToClient
Convert screen coordinates to client coords

ClientToScreen
Convert client coordinates to screen coords

PaintDesktop
Fills a DC with the destop background

RedrawWindow
Causes a portion of a window to be redrawn

GetTextExtentPoint32
Computes the width and height of the specified string of text.

GetTextMetrics
Returns info for the font selected into a DC

GetTextCharacterExtra
Returns the space between characters

SetTextCharacterExtra
Sets the spacing between characters

GetTextAlign
Returns horizontal and vertical alignment for text in a device context

SetTextAlign
Sets horizontal and vertical alignment for text in a device context

GetTextFace
Retrieves the name of the font currently selected in a DC

GetMapMode
Returns the method a device context uses to translate logical units to physical units

SetMapMode
Sets the method used for translating logical units to device units

GetGraphicsMode
Determines if advanced GDI features are enabled for a device context

SetGraphicsMode
Enables or disables advanced graphics features for a DC

GetLayout
Retrieves the layout mode of a device context

SetLayout
Sets the layout for a device context

GetPolyFillMode
Returns the polygon filling mode for a device context

SetPolyFillMode
Sets the polygon filling mode for a device context

GetWorldTransform
Retrieves a device context's coordinate space translation matrix

SetWorldTransform
Transforms a device context's coordinate space

ModifyWorldTransform
Combines a coordinate tranformation with device context's current transformation

CombineTransform
Combines two coordinate space transformations

GetWindowOrgEx
Retrievs the window origin for a DC

SetWindowOrgEx
Changes the window origin for a DC

GetViewportOrgEx
Retrievs the origin for a DC's viewport

SetViewportOrgEx
Changes the viewport origin for a DC

GetWindowExtEx
Retrieves the window extents for a DC

SetWindowExtEx
Changes the window extents for a DC

GetViewportExtEx
Retrieves the viewport extents for a DC

SetViewportExtEx
Changes the viewport extents for a DC

GradientFill
Shades triangles or rectangles by interpolating between vertex colors

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

GetMenuDefaultItem

AppendMenu

InsertMenu

EnableMenuItem

CheckMenuItem

GetSubMenu

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.

CheckMenuRadioItem
Checks a specified menu item and makes it a radio item. At the same time, the function clears all other menu items in the associated group and clears the radio-item type flag for those items.

SetMenuInfo
Sets information for a specified menu.

GetMenuInfo
Gets information about a specified menu.

DrawFocusRect
Draws a standard focus outline around a rectangle

DrawText
Draws formatted text on a device context

LineTo
Draw a line from current position to specified point

Ellipse
Draws a filled ellipse on a device context

Pie
Draws a section of an ellipse cut by 2 radials

Arc
Draws an arc defined by an ellipse and 2 radials

ArcTo
Draws an arc defined by an ellipse and 2 radials

AngleArc
Draws a line from current pos and a section of a circle's arc

Chord
Draws a chord defined by an ellipse and 2 radials

ExtFloodFill
Fills an area with current brush

SetPixel
Set the color of a single pixel

GetPixel
Returns the RGB color of a single pixel

GetROP2
Returns the foreground mixing mode of a DC

SetROP2
Sets the foreground mixing mode of a DC

SetPixelV
Sets the color of a single pixel to an approximation of specified color

MoveToEx
Changes the current drawing position

GetCurrentPositionEx
Returns a device context's current drawing position

GetArcDirection
Returns the direction in which rectangles and arcs are drawn

SetArcDirection
Sets the drawing direction for arcs and rectangles

Polygon
Draws a closed filled polygon defined by a sequence of points

Polyline
Connects a sequence of points using currently selected pen

PolylineTo
Draws a series of lines starting from current position. Updates current position with end point.

PolyBezier
Draws a series of Bezier curves starting from first point specified.

PolyBezierTo
Draws a series of Bezier curves starting from current drawing position.

PlgBlt
Copies color from a rectangle into a parallelogram

CreatePolygonRgn
Creates a region from a sequence of vertices

ExtTextOut
Writes text to a DC.

GetTextColor
Returns the text color for a DC

SetTextColor
Changes the text color for a device context

GetBkMode
Returns the background mode for a device context

SetBkMode
Sets the background mode for a device context

GetBkColor
Returns the background color for a device context

SetBkColor
Sets the background color for a device context

DrawEdge
Draws edge(s) of a rectangle

FillRect
Fills a rectangular area with specified brush

FillRgn
Fills a region with specified brush

PaintRgn
Paints a region with current brush

FrameRgn
Draws a frame around a region

InvertRgn
Inverts the colors in a region

EqualRgn
Determines if 2 regions are equal

PtInRegion
Determines if a region contains a point

PtInRect
Determines if a rectangle contains a point

RectInRegion
Determines if a region and rectangle overlap at any point

SetRectRgn
Makes an existing region rectangular

CombineRgn
Combines two regions

DrawAnimatedRects
Animates a rectangle in the manner of minimizing, mazimizing, or opening

CreateSolidBrush
Creates a solid brush of specified color

CreatePatternBrush
Creates a brush using a bitmap as a pattern

CreateHatchBrush
Creates a hatch brush with specified style and color

CreatePen
Create a GDI pen

GetSysColor
Returns the color of a window element

GetSysColorBrush
Creates a handle to a system color brush

InvalidateRect
Invalidates a rectangular area of a window and adds it to the window's update region

FrameRect
Draws an outline around a rectangle

InvertRect
Inverts the colors in a regtangular region

WindowFromDC
Finds the window associated with a device context

GetUpdateRgn
Copies the update region of a window into an existing region

GetWindowRgn
Copies the window region of a window into an existing region

SetWindowRgn
Sets the visible region of a window

GetWindowRgnBox
Returns the bounding box for a window's region

ValidateRgn
Removes a region from a window's update region

InvalidateRgn
Adds a region to a window's update region

GetRgnBox
Calculates the bounding box of a region

OffsetRgn
Relocates a region

Rectangle
Creates a solid rectangle using currently selected pen and brush

RoundRect
Draws a rectangle with elliptically rounded corners, filled using using current brush

BeginPaint

EndPaint

BeginPath
Initializes a path in a DC

EndPath
Finalizes a path begun by win32gui::BeginPath

AbortPath
Cancels a path begun by win32gui::BeginPath

CloseFigure
Closes a section of a path by connecting the beginning pos with the current pos

FlattenPath
Flattens any curves in current path into a series of lines

FillPath
Fills a path with currently selected brush

WidenPath
Widens current path by amount it would increase by if drawn with currently selected pen

StrokePath
Draws current path with currently selected pen

StrokeAndFillPath
Combines operations of StrokePath and FillPath with no overlap

GetMiterLimit
Retrieves the limit of miter joins for a DC

SetMiterLimit
Set the limit of miter joins for a DC

PathToRegion
Converts a closed path in a DC to a region

GetPath
Returns a sequence of points that describe the current path

CreateRoundRectRgn
Create a rectangular region with elliptically rounded corners,

CreateRectRgnIndirect
Creates a rectangular region,

CreateEllipticRgnIndirect
Creates an ellipse region,

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.

_TrackMouseEvent
Posts messages when the mouse pointer leaves a window or hovers over a window for a specified amount of time.

ReleaseDC
Releases a device context.

CreateCaret
Creates a new caret for a window

DestroyCaret
Destroys caret for current task

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.

WindowFromPoint
Retrieves a handle to the window that contains the specified point.

ChildWindowFromPoint
Determines which, if any, of the child windows belonging to a parent window contains the specified point.

ChildWindowFromPoint
Determines which, if any, of the child windows belonging to a parent window contains the specified point.

ListView_SortItems
Uses an application-defined comparison function to sort the items of a list view control.

ListView_SortItemsEx
Uses an application-defined comparison function to sort the items of a list view control.

CreateDC
Creates a device context for a printer or display device

GetSaveFileNameW
Creates a dialog for user to specify location to save a file or files

GetOpenFileNameW
Creates a dialog to allow user to select file(s) to open

SystemParametersInfo
Queries or sets system-wide parameters. This function can also update the user profile while setting a parameter.

SetLayeredWindowAttributes
Sets the opacity and transparency color key of a layered window.

GetLayeredWindowAttributes
Retrieves the layering parameters of a window with the WS_EX_LAYERED extended style

UpdateLayeredWindow
Updates the position, size, shape, content, and translucency of a layered window.

AnimateWindow
Enables you to produce special effects when showing or hiding windows. There are three types of animation: roll, slide, and alpha-blended fade.

CreateBrushIndirect
Creates a GDI brush from a LOGBRUSH struct

ExtCreatePen
Creates a GDI pen object

DrawTextW
Draws Unicode text on a device context.

EnumPropsEx
Enumerates properties attached to a window. Each property is passed to a callback function, which receives 4 arguments:
Handle to the window, name of the property, handle to the property data, and Param object passed to this function

RegisterDeviceNotification
Registers the device or type of device for which a window will receive notifications.

UnregisterDeviceNotification
Unregisters a Device Notification handle. It is generally not necessary to call this function manually, but in some cases, handle values may be extracted via the struct module and need to be closed explicitly.

RegisterHotKey
Registers a hotkey for a window


win32gui.AbortPath

AbortPath(hdc)

Cancels a path begun by win32gui::BeginPath

Parameters

hdc : PyHANDLE

Handle to a device context


win32gui.AlphaBlend

AlphaBlend(Dest, XOriginDest, YOriginDest, WidthDest, HeightDest, Src, XOriginSrc, YOriginSrc, WidthSrc, HeightSrc, blendFunction)

Transfers color information using alpha blending

Parameters

Dest : PyHANDLE

Destination device context handle

XOriginDest : int

X pos of dest rect

YOriginDest : int

Y pos of dest rect

WidthDest : int

Width of dest rect

HeightDest : int

Height of dest rect

Src : PyHANDLE

Source DC handle

XOriginSrc : int

X pos of src rect

YOriginSrc : int

Y pos of src rect

WidthSrc : int

Width of src rect

HeightSrc : int

Height of src rect

blendFunction : PyBLENDFUNCTION

Alpha blending parameters


win32gui.AngleArc

AngleArc(hdc, Y, Y, Radius, StartAngle, SweepAngle)

Draws a line from current pos and a section of a circle's arc

Parameters

hdc : PyHANDLE

Handle to a device context

Y : int

x pos of circle

Y : int

y pos of circle

Radius : int

Radius of circle

StartAngle : float

Angle where arc starts, in degrees

SweepAngle : float

Angle that arc covers, in degrees


win32gui.AnimateWindow

AnimateWindow(hwnd, Time, Flags)

Enables you to produce special effects when showing or hiding windows. There are three types of animation: roll, slide, and alpha-blended fade.

Parameters

hwnd : PyHANDLE

handle to window

Time : int

Duration of animation in ms

Flags : int

Animation type, combination of win32con.AW_* flags

Comments

This function is available on Win2k and later

Accepts keyword args


win32gui.AppendMenu

AppendMenu()


win32gui.Arc

Arc(hdc, LeftRect, TopRect, RightRect, BottomRect, XRadial1, YRadial1, XRadial2, YRadial2)

Draws an arc defined by an ellipse and 2 radials

Parameters

hdc : PyHANDLE

Device context on which to draw

LeftRect : int

Left limit of ellipse

TopRect : int

Top limit of ellipse

RightRect : int

Right limit of ellipse

BottomRect : int

Bottom limit of ellipse

XRadial1 : int

Horizontal pos of Radial1 endpoint

YRadial1 : int

Vertical pos of Radial1 endpoint

XRadial2 : int

Horizontal pos of Radial2 endpoint

YRadial2 : int

Vertical pos of Radial2 endpoint


win32gui.ArcTo

ArcTo(hdc, LeftRect, TopRect, RightRect, BottomRect, XRadial1, YRadial1, XRadial2, YRadial2)

Draws an arc defined by an ellipse and 2 radials

Parameters

hdc : PyHANDLE

Device context on which to draw

LeftRect : int

Left limit of ellipse

TopRect : int

Top limit of ellipse

RightRect : int

Right limit of ellipse

BottomRect : int

Bottom limit of ellipse

XRadial1 : int

Horizontal pos of Radial1 endpoint

YRadial1 : int

Vertical pos of Radial1 endpoint

XRadial2 : int

Horizontal pos of Radial2 endpoint

YRadial2 : int

Vertical pos of Radial2 endpoint

Comments

Draws exactly as win32gui::Arc, but changes current drawing position


win32gui.BeginPaint

hdc, paintstruct = BeginPaint()


win32gui.BeginPath

BeginPath(hdc)

Initializes a path in a DC

Parameters

hdc : PyHANDLE

Handle to a device context


win32gui.BitBlt

BitBlt(hdcDest, x, y, width, height, hdcSrc, nXSrc, nYSrc, dwRop)

Performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into a destination device context.

Parameters

hdcDest : int

handle to destination DC

x : int

x-coord of destination upper-left corner

y : int

y-coord of destination upper-left corner

width : int

width of destination rectangle

height : int

height of destination rectangle

hdcSrc : int

handle to source DC

nXSrc : int

x-coordinate of source upper-left corner

nYSrc : int

y-coordinate of source upper-left corner

dwRop : int

raster operation code


win32gui.BringWindowToTop

BringWindowToTop(hwnd)

Parameters

hwnd : int

The handle to the window


win32gui.CallWindowProc

int = CallWindowProc(wndproc, hwnd , msg , wparam , lparam )

Parameters

wndproc : int

The wndproc to call - this is generally the return value of SetWindowLong(GWL_WNDPROC)

hwnd : PyHANDLE

Handle to the window

msg : int

A window message

wparam : int/str

Type is dependent on the message

lparam : int/str

Type is dependent on the message


win32gui.CheckMenuItem

int = CheckMenuItem()


win32gui.CheckMenuRadioItem

CheckMenuRadioItem(hMenu, idFirst, idLast, idCheck, uFlags)

Checks a specified menu item and makes it a radio item. At the same time, the function clears all other menu items in the associated group and clears the radio-item type flag for those items.

Parameters

hMenu : int

handle to menu

idFirst : int

identifier or position of first item

idLast : int

identifier or position of last item

idCheck : int

identifier or position of item to check

uFlags : int

options


win32gui.ChildWindowFromPoint

int = ChildWindowFromPoint(hwndParent, point )

Determines which, if any, of the child windows belonging to a parent window contains the specified point.

Parameters

hwndParent : int

The parent.

point : (int, int)

The point.


win32gui.ChildWindowFromPoint

int = ChildWindowFromPoint(hwndParent, point , flags )

Determines which, if any, of the child windows belonging to a parent window contains the specified point.

Parameters

hwndParent : int

The parent.

point : (int, int)

The point.

flags : int

Specifies which child windows to skip. This parameter can be one or more of the CWP_* constants.


win32gui.Chord

Chord(hdc, LeftRect, TopRect, RightRect, BottomRect, XRadial1, YRadial1, XRadial2, YRadial2)

Draws a chord defined by an ellipse and 2 radials

Parameters

hdc : PyHANDLE

Device context on which to draw

LeftRect : int

Left limit of ellipse

TopRect : int

Top limit of ellipse

RightRect : int

Right limit of ellipse

BottomRect : int

Bottom limit of ellipse

XRadial1 : int

Horizontal pos of Radial1 endpoint

YRadial1 : int

Vertical pos of Radial1 endpoint

XRadial2 : int

Horizontal pos of Radial2 endpoint

YRadial2 : int

Vertical pos of Radial2 endpoint


win32gui.ClientToScreen

(int,int) = ClientToScreen(hWnd, Point )

Convert client coordinates to screen coords

Parameters

hWnd : PyHANDLE

Handle to a window

Point : (int,int)

Client coordinates to be converted


win32gui.CloseFigure

CloseFigure(hdc)

Closes a section of a path by connecting the beginning pos with the current pos

Parameters

hdc : PyHANDLE

Handle to a device context that contains an open path. See win32gui::BeginPath.


win32gui.CloseWindow

CloseWindow()


win32gui.CombineRgn

int = CombineRgn(Dest, Src1 , Src2 , CombineMode )

Combines two regions

Parameters

Dest : PyGdiHandle

Handle to existing region that will receive combined region

Src1 : PyGdiHandle

Handle to first region

Src2 : PyGdiHandle

Handle to second region

CombineMode : int

One of RGN_AND,RGN_COPY,RGN_DIFF,RGN_OR,RGN_XOR

Return Value

Returns the type of region created, one of NULLREGION, SIMPLEREGION, COMPLEXREGION


win32gui.CombineTransform

PyXFORM = CombineTransform(xform1, xform2 )

Combines two coordinate space transformations

Parameters

xform1 : PyXFORM

First transformation

xform2 : PyXFORM

Second transformation


win32gui.CommDlgExtendedError

int = CommDlgExtendedError()


win32gui.CopyIcon

HICON = CopyIcon(hicon)

Copies an icon

Parameters

hicon : int

Existing icon


win32gui.CreateAcceleratorTable

HACCEL = CreateAcceleratorTable(accels)

Creates an accelerator table

Parameters

accels : ( (int, int, int), ...)

A sequence of (fVirt, key, cmd), as per the Win32 ACCEL structure.


win32gui.CreateBitmap

PyGdiHANDLE = CreateBitmap(width, height , cPlanes , cBitsPerPixel , bitmap bits )

Creates a bitmap

Parameters

width : int

bitmap width, in pixels

height : int

bitmap height, in pixels

cPlanes : int

number of color planes

cBitsPerPixel : int

number of bits to identify color

bitmap bits : None

Must be None


win32gui.CreateBrushIndirect

PyGdiHANDLE = CreateBrushIndirect(lb)

Creates a GDI brush from a LOGBRUSH struct

Parameters

lb : PyLOGBRUSH

Dict containing brush creation parameters


win32gui.CreateCaret

CreateCaret(hWnd, hBitmap, nWidth, nHeight)

Creates a new caret for a window

Parameters

hWnd : int

handle to owner window

hBitmap : PyGdiHANDLE

handle to bitmap for caret shape

nWidth : int

caret width

nHeight : int

caret height


win32gui.CreateCompatibleBitmap

PyGdiHANDLE = CreateCompatibleBitmap(hdc, width , height )

Creates a bitmap compatible with the device that is associated with the specified device context.

Parameters

hdc : int

handle to DC

width : int

width of bitmap, in pixels

height : int

height of bitmap, in pixels


win32gui.CreateCompatibleDC

HDC = CreateCompatibleDC(dc)

Creates a memory device context (DC) compatible with the specified device.

Parameters

dc : int

handle to DC


win32gui.CreateDC

int = CreateDC(Driver, Device , InitData )

Creates a device context for a printer or display device

Parameters

Driver : string

Name of display or print provider, usually DISPLAY or WINSPOOL

Device : string

Name of specific device, eg printer name returned from GetDefaultPrinter

InitData : PyDEVMODE

A PyDEVMODE that specifies printing parameters, use None for printer defaults


win32gui.CreateDialogIndirect

int = CreateDialogIndirect(hInstance, controlList , hWndParent , DialogFunc , InitParam )

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

Parameters

hInstance : PyHANDLE

Handle to module creating the dialog box

controlList : PyDialogTemplate

Sequence containing a PyDLGTEMPLATE, followed by variable number of PyDLGITEMTEMPLATEs

hWndParent : PyHANDLE

Handle to dialog's parent window

DialogFunc : function

Dialog box procedure to process messages

InitParam=0 : int

Initialization data to be passed to above procedure during WM_INITDIALOG processing


win32gui.CreateEllipticRgnIndirect

PyGdiHandle = CreateEllipticRgnIndirect(rc)

Creates an ellipse region,

Parameters

rc : PyRECT

Coordinates of bounding rectangle in logical units


win32gui.CreateFontIndirect

PyGdiHandle = CreateFontIndirect(lplf)

function creates a logical font that has the specified characteristics. The font can subsequently be selected as the current font for any device context.

Parameters

lplf : PyLOGFONT

A LOGFONT object as returned by win32gui::LOGFONT


win32gui.CreateHatchBrush

PyGdiHANDLE = CreateHatchBrush(Style, clrref )

Creates a hatch brush with specified style and color

Parameters

Style : int

Hatch style, one of win32con.HS_* constants

clrref : int

Rgb color value. See win32api::RGB.


win32gui.CreateIconFromResource

PyHANDLE = CreateIconFromResource(bits, fIcon , ver )

Creates an icon or cursor from resource bits describing the icon.

Parameters

bits : string

The bits

fIcon : bool

True if an icon, False if a cursor.

ver=0x00030000 : int

Specifies the version number of the icon or cursor format for the resource bits pointed to by the presbits parameter. This parameter can be 0x00030000.


win32gui.CreateIconIndirect

int = CreateIconIndirect(iconinfo)

Creates an icon or cursor from an ICONINFO structure.

Parameters

iconinfo : PyICONINFO

Tuple defining the icon parameters


win32gui.CreateMenu

int = CreateMenu()

Return Value

The result is a HMENU to the new menu.


win32gui.CreatePatternBrush

PyGdiHANDLE = CreatePatternBrush(hbmp)

Creates a brush using a bitmap as a pattern

Parameters

hbmp : PyGdiHANDLE

Handle to a bitmap


win32gui.CreatePen

PyGdiHANDLE = CreatePen(PenStyle, Width , Color )

Create a GDI pen

Parameters

PenStyle : int

One of win32con.PS_* pen styles

Width : int

Drawing width in logical units. Use zero for single pixel.

Color : int

RGB color value. See win32api::RGB.


win32gui.CreatePolygonRgn

PyGdiHANDLE = CreatePolygonRgn(Points, PolyFillMode )

Creates a region from a sequence of vertices

Parameters

Points : [(int,int),...]

Sequence of POINT tuples: ((x,y),...).

PolyFillMode : int

Filling mode, one of ALTERNATE, WINDING


win32gui.CreatePopupMenu

int = CreatePopupMenu()

Return Value

The result is a HMENU to the new menu.


win32gui.CreateRectRgnIndirect

PyGdiHandle = CreateRectRgnIndirect(rc)

Creates a rectangular region,

Parameters

rc : PyRECT

Coordinates of rectangle


win32gui.CreateRoundRectRgn

PyGdiHandle = CreateRoundRectRgn(LeftRect, TopRect , RightRect , BottomRect , WidthEllipse , HeightEllipse )

Create a rectangular region with elliptically rounded corners,

Parameters

LeftRect : int

Position of left edge of rectangle

TopRect : int

Position of top edge of rectangle

RightRect : int

Position of right edge of rectangle

BottomRect : int

Position of bottom edge of rectangle

WidthEllipse : int

Width of ellipse

HeightEllipse : int

Height of ellipse


win32gui.CreateSolidBrush

PyGdiHANDLE = CreateSolidBrush(Color)

Creates a solid brush of specified color

Parameters

Color : int

RGB color value. See win32api::RGB.


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

DeleteDC(hdc)

Deletes a DC

Parameters

hdc : int

The source DC


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 : PyGdiHANDLE

handle to the object to delete.


win32gui.DestroyAccleratorTable

DestroyAccleratorTable(haccel)

Destroys an accelerator table

Parameters

haccel : int


win32gui.DestroyCaret

DestroyCaret()

Destroys caret for current task


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(hInstance, TemplateName , hWndParent , DialogFunc , InitParam )

Creates a modal dialog box.

Parameters

hInstance : PyHANDLE

Handle to module that contains the dialog template

TemplateName : PyResourceId

Name or resource id of the dialog resource

hWndParent : PyHANDLE

Handle to dialog's parent window

DialogFunc : function

Dialog box procedure to process messages

InitParam=0 : int

Initialization data to be passed to above procedure during WM_INITDIALOG processing


win32gui.DialogBoxIndirect

int = DialogBoxIndirect(hInstance, controlList , hWndParent , DialogFunc , InitParam )

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

Parameters

hInstance : PyHANDLE

Handle to module creating the dialog box

controlList : PyDialogTemplate

Sequence of items defining the dialog box and subcontrols

hWndParent : PyHANDLE

Handle to dialog's parent window

DialogFunc : function

Dialog box procedure to process messages

InitParam=0 : long

Initialization data to be passed to above procedure during WM_INITDIALOG processing


win32gui.DialogBoxIndirectParam

int = DialogBoxIndirectParam()

See win32gui::DialogBoxIndirect


win32gui.DialogBoxIndirectParam

int = DialogBoxIndirectParam()

See win32gui::CreateDialogIndirect


win32gui.DialogBoxParam

int = DialogBoxParam()

See win32gui::DialogBox


win32gui.DispatchMessage

int = DispatchMessage(msg)

Parameters

msg : MSG


win32gui.DragAcceptFiles

DragAcceptFiles(hwnd, fAccept)

Registers whether a window accepts dropped files.

Parameters

hwnd : int

Handle to the Window

fAccept : int

Value that indicates if the window identified by the hWnd parameter accepts dropped files. This value is True to accept dropped files or False to discontinue accepting dropped files.


win32gui.DragDetect

DragDetect(hwnd, point)

captures the mouse and tracks its movement until the user releases the left button, presses the ESC key, or moves the mouse outside the drag rectangle around the specified point.

Parameters

hwnd : int

Handle to the Window

point : (int, int)

Initial position of the mouse, in screen coordinates. The function determines the coordinates of the drag rectangle by using this point.

Return Value

If the user moved the mouse outside of the drag rectangle while holding down the left button , the return value is nonzero.
If the user did not move the mouse outside of the drag rectangle while holding down the left button , the return value is zero.


win32gui.DrawAnimatedRects

DrawAnimatedRects(hwnd, idAni, minCoords, restCoords)

Animates a rectangle in the manner of minimizing, mazimizing, or opening

Parameters

hwnd : int

handle to clipping window

idAni : int

type of animation, win32con.IDANI_*

minCoords : PyRECT

rectangle coordinates (minimized)

restCoords : PyRECT

rectangle coordinates (restored)


win32gui.DrawEdge

PyRECT = DrawEdge(hdc, rc , edge , Flags )

Draws edge(s) of a rectangle

Parameters

hdc : PyHANDLE

Handle to a device context

rc : PyRECT

Rectangle whose edge(s) will be drawn

edge : int

Combination of win32con.BDR_* flags, or one of win32con.EDGE_* flags

Flags : int

Combination of win32con.BF_* flags

Return Value

BF_ADJUST flag causes input rectange to be shrunk by size of border.. Rectangle is always returned.


win32gui.DrawFocusRect

DrawFocusRect(hDC, rc)

Draws a standard focus outline around a rectangle

Parameters

hDC : PyHANDLE

Handle to a device context

rc : (int, int, int,int)

Tuple of (left,top,right,bottom) defining the rectangle


win32gui.DrawIcon

DrawIcon(hDC, X, Y, hicon)

Draws an icon or cursor into the specified device context. To specify additional drawing options, use the win32gui::DrawIconEx function.

Parameters

hDC : int

handle to DC

X : int

x-coordinate of upper-left corner

Y : int

y-coordinate of upper-left corner

hicon : int

handle to icon


win32gui.DrawIconEx

DrawIconEx(hDC, xLeft, yTop, hIcon, cxWidth, cyWidth, istepIfAniCur, hbrFlickerFreeDraw, diFlags)

Draws an icon or cursor into the specified device context, performing the specified raster operations, and stretching or compressing the icon or cursor as specified.

Parameters

hDC : int

handle to device context

xLeft : int

x-coord of upper left corner

yTop : int

y-coord of upper left corner

hIcon : int

handle to icon

cxWidth : int

icon width

cyWidth : int

icon height

istepIfAniCur : int

frame index, animated cursor

hbrFlickerFreeDraw : PyGdiHANDLE

handle to background brush, can be None

diFlags : int

icon-drawing flags (win32con.DI_*)


win32gui.DrawMenuBar

DrawMenuBar(hwnd)

Parameters

hwnd : int

The handle to the window


win32gui.DrawText

(int, PyRECT) = DrawText(hDC, String , nCount , Rect , Format )

Draws formatted text on a device context

Parameters

hDC : int/PyHANDLE

The device context on which to draw

String : str

The text to be drawn

nCount : int

The number of characters, use -1 for simple null-terminated string

Rect : PyRECT

Tuple of 4 ints specifying the position (left, top, right, bottom)

Format : int

Formatting flags, combination of win32con.DT_* values

Return Value

Returns the height of the drawn text, and the rectangle coordinates


win32gui.DrawTextW

int,PyRECT = DrawTextW(hDC, String , Count , Rect , Format )

Draws Unicode text on a device context.

Parameters

hDC : PyHANDLE

Handle to a device context

String : PyUnicode

Text to be drawn

Count : int

Number of characters to draw, use -1 for entire null terminated string

Rect : PyRECT

Rectangle in which to draw text

Format : int

Formatting flags, combination of win32con.DT_* values

Comments

Accepts keyword args.

Return Value

Returns the height of the drawn text, and the rectangle coordinates


win32gui.Ellipse

Ellipse(hdc, LeftRect, TopRect, RightRect, BottomRect)

Draws a filled ellipse on a device context

Parameters

hdc : PyHANDLE

Device context on which to draw

LeftRect : int

Left limit of ellipse

TopRect : int

Top limit of ellipse

RightRect : int

Right limit of ellipse

BottomRect : int

Bottom limit of ellipse


win32gui.EnableMenuItem

EnableMenuItem()


win32gui.EnableWindow

int = EnableWindow(hWnd, bEnable )

Enables and disables keyboard and mouse input to a window

Parameters

hWnd : PyHANDLE

Handle to window

bEnable : boolean

True to enable input to the window, False to disable input

Return Value

Returns True if window was already disabled when call was made, False otherwise


win32gui.EndDialog

EndDialog(hwnd, result)

Ends a dialog box.

Parameters

hwnd : int

Handle to the window.

result : int

result


win32gui.EndPaint

EndPaint(hwnd, ps)

Parameters

hwnd : int

ps : paintstruct

As returned from win32gui::BeginPaint


win32gui.EndPath

EndPath(hdc)

Finalizes a path begun by win32gui::BeginPath

Parameters

hdc : PyHANDLE

Handle to a device context


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 : PyHANDLE

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 , EnumFontFamProc , Param )

Enumerates the available font families.

Parameters

hdc : PyHANDLE

Handle to a device context for which to enumerate available fonts

Family : string/PyUnicode

Family of fonts to enumerate. If none, first member of each font family will be returned.

EnumFontFamProc : function

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

Param : object

An arbitrary object to be passed to the callback function

Comments

The parameters that the callback function will receive are as follows:
PyLOGFONT - contains the font parameters
None - Placeholder for a TEXTMETRIC structure, not supported yet
int - Font type, combination of DEVICE_FONTTYPE, RASTER_FONTTYPE, TRUETYPE_FONTTYPE
object - The Param originally passed in to EnumFontFamilies


win32gui.EnumPropsEx

EnumPropsEx(hWnd, EnumFunc, Param)

Enumerates properties attached to a window. Each property is passed to a callback function, which receives 4 arguments:
Handle to the window, name of the property, handle to the property data, and Param object passed to this function

Parameters

hWnd : PyHANDLE

Handle to a window

EnumFunc : function

Callback function

Param : object

Arbitrary object to be passed to callback function


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.

Parameters

callback : function

A Python function to be used as the callback. Function can return False to stop enumeration, or raise an exception.

extra : object

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


win32gui.EqualRgn

boolean = EqualRgn(SrcRgn1, SrcRgn2 )

Determines if 2 regions are equal

Parameters

SrcRgn1 : PyGdiHandle

Handle to a region

SrcRgn2 : PyGdiHandle

Handle to a region


win32gui.ExtCreatePen

PyHANDLE = ExtCreatePen(PenStyle, Width , lb , Style )

Creates a GDI pen object

Parameters

PenStyle : int

Combination of win32con.PS_*. Must contain either PS_GEOMETRIC or PS_COSMETIC.

Width : int

Width of pen in logical units. Must be 1 for PS_COSMETIC.

lb : PyLOGBRUSH

Dict containing brush creation parameters

Style=None : (int, ...)

Sequence containing lengths of dashes and spaces Used only with PS_USERSTYLE, otherwise must be None.


win32gui.ExtFloodFill

ExtFloodFill(, XStart, YStart, Color, FillType)

Fills an area with current brush

Parameters

=hdc : PyHANDLE

Handle to a device context

XStart : int

Horizontal starting pos

YStart : int

Vertical starting pos

Color : int

RGB color value. See win32api::RGB.

FillType : int

One of win32con.FLOODFILL* values


win32gui.ExtTextOut

int = ExtTextOut(hdc, int , int , int , rect , string , tuple )

Writes text to a DC.

Parameters

hdc : PyHANDLE

Handle to a device context

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 : PyRECT

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.

Win32 API References

Search for ExtTextOut at msdn, google or google groups.

Return Value

Always none. If the function fails, an exception is raised.


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

int = ExtractIconEx(moduleName, index , numIcons )

Parameters

moduleName : string

index : int

numIcons=1 : int

Comments

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

Return Value

If index==-1, the result is an integer with the number of icons in the file, otherwise it is 2 arrays of icon handles.


win32gui.FillPath

FillPath(hdc)

Fills a path with currently selected brush

Parameters

hdc : PyHANDLE

Handle to a device context that contains a finalized path. See win32gui::EndPath.

Comments

Any open figures are closed and path is deselected from the DC.


win32gui.FillRect

FillRect(hDC, rc, hbr)

Fills a rectangular area with specified brush

Parameters

hDC : PyHANDLE

Handle to a device context

rc : PyRECT

Rectangle to be filled

hbr : PyGdiHANDLE

Handle to brush to be used to fill area


win32gui.FillRgn

FillRgn(hdc, hrgn, hbr)

Fills a region with specified brush

Parameters

hdc : PyHANDLE

Handle to the device context

hrgn : PyGdiHANDLE

Handle to the region

hbr : PyGdiHANDLE

Brush to be used


win32gui.FindWindow

PyHANDLE = FindWindow(ClassName, WindowName )

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

Parameters

ClassName : PyResourceId

Name or atom of window class to find, can be None

WindowName : string

Title of window to find, can be None


win32gui.FindWindowEx

PyHANDLE = FindWindowEx(Parent, ChildAfter , ClassName , WindowName )

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

Parameters

Parent : PyHANDLE

Window whose child windows will be searched. If 0, desktop window is assumed.

ChildAfter : PyHANDLE

Child window after which to search in Z-order, can be 0 to search all

ClassName : PyResourceId

Name or atom of window class to find, can be None

WindowName : string

Title of window to find, can be None


win32gui.FlashWindow

int = FlashWindow(hwnd, bInvert )

The FlashWindow function flashes the specified window one time. It does not change the active state of the window.

Parameters

hwnd : PyHANDLE

Handle to a window

bInvert : int

Indicates if window should toggle between active and inactive


win32gui.FlashWindowEx

int = FlashWindowEx(hwnd, dwFlags , uCount , dwTimeout )

The FlashWindowEx function flashes the specified window a specified number of times.

Parameters

hwnd : PyHANDLE

Handle to a window

dwFlags : int

Combination of win32con.FLASHW_* flags

uCount : int

Nbr of times to flash

dwTimeout : int

Elapsed time between flashes, in milliseconds


win32gui.FlattenPath

FlattenPath(hdc)

Flattens any curves in current path into a series of lines

Parameters

hdc : PyHANDLE

Handle to a device context that contains a closed path. See win32gui::EndPath.


win32gui.FrameRect

FrameRect(hDC, rc, hbr)

Draws an outline around a rectangle

Parameters

hDC : PyHANDLE

Handle to a device context

rc : PyRECT

Rectangle around which to draw

hbr : PyGdiHANDLE

Handle to brush created using CreateHatchBrush, CreatePatternBrush, CreateSolidBrush, or GetStockObject


win32gui.FrameRgn

FrameRgn(hdc, hrgn, hbr, Width, Height)

Draws a frame around a region

Parameters

hdc : PyHANDLE

Handle to the device context

hrgn : PyGdiHandle

Handle to the region

hbr : PyGdiHandle

Handle to brush to be used

Width : int

Frame width

Height : int

Frame height


win32gui.GetActiveWindow

HWND = GetActiveWindow()


win32gui.GetArcDirection

int = GetArcDirection(hdc)

Returns the direction in which rectangles and arcs are drawn

Parameters

hdc : PyHANDLE

Handle to a device context

Return Value

Recturns one of win32con.AD_* values


win32gui.GetBkColor

int = GetBkColor(hdc)

Returns the background color for a device context

Parameters

hdc : PyHANDLE

Handle to a device context

Return Value

Returns an RGB color value. On error, returns CLR_INVALID.


win32gui.GetBkMode

int = GetBkMode(hdc)

Returns the background mode for a device context

Parameters

hdc : PyHANDLE

Handle to a device context

Return Value

Returns OPAQUE, TRANSPARENT, or 0 on failure


win32gui.GetCapture

int = GetCapture()

Returns the window with the mouse capture.


win32gui.GetCaretPos

int,int = GetCaretPos()

Returns the current caret position


win32gui.GetClassLong

int = GetClassLong(hwnd, index )

Parameters

hwnd : int

index : int


win32gui.GetClassName

string = GetClassName(hwnd)

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

Parameters

hwnd : PyHANDLE

The handle to the window


win32gui.GetClientRect

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

Returns the rectangle of the client area of a window, in client coordinates

Parameters

hwnd : int

The handle to the window


win32gui.GetCurrentObject

PyHANDLE = GetCurrentObject(hdc, ObjectType )

Retrieves currently selected object from a DC

Parameters

hdc : PyHANDLE

Handle to a device context

ObjectType : int

Type of object to retrieve, one of win32con.OBJ_*;


win32gui.GetCurrentPositionEx

(int,int) = GetCurrentPositionEx(hdc)

Returns a device context's current drawing position

Parameters

hdc : PyHANDLE

Device context


win32gui.GetCursor

HCURSOR = GetCursor()


win32gui.GetCursorInfo

flags, hcursor, (x,y) = GetCursorInfo()

Retrieves information about the global cursor.


win32gui.GetCursorPos

(int, int) = GetCursorPos()

retrieves the cursor's position, in screen coordinates.


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

int = GetDlgCtrlID(hwnd)

Retrieves the identifier of the specified control.

Parameters

hwnd : int

The handle to the control


win32gui.GetDlgItem

HWND = GetDlgItem(hDlg, IDDlgItem )

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

Parameters

hDlg : PyHANDLE

Handle to a dialog window

IDDlgItem : int

Identifier of one of the dialog's controls


win32gui.GetDlgItemInt

GetDlgItemInt(hDlg, IDDlgItem, Signed)

Returns the integer value of a dialog control

Parameters

hDlg : PyHANDLE

Handle to a dialog window

IDDlgItem : int

Identifier of one of the dialog's controls

Signed : boolean

Indicates whether control value should be interpreted as signed


win32gui.GetDlgItemText

string = GetDlgItemText(hDlg, IDDlgItem )

Returns the text of a dialog control

Parameters

hDlg : PyHANDLE

Handle to a dialog window

IDDlgItem : int

The Id of a control within the dialog


win32gui.GetDoubleClickTime

int = GetDoubleClickTime()


win32gui.GetFocus

GetFocus()

Returns the HWND of the window with focus.


win32gui.GetForegroundWindow

HWND = GetForegroundWindow()


win32gui.GetGraphicsMode

int = GetGraphicsMode(hdc)

Determines if advanced GDI features are enabled for a device context

Parameters

hdc : PyHANDLE

Handle to a device context

Return Value

Returns GM_COMPATIBLE or GM_ADVANCED


win32gui.GetIconInfo

PyICONINFO = GetIconInfo(hicon)

Returns parameters for an icon or cursor

Parameters

hicon : PyHANDLE

The icon to query

Return Value

The result is a tuple of (fIcon, xHotspot, yHotspot, hbmMask, hbmColor) The hbmMask and hbmColor items are bitmaps created for the caller, so must be freed.


win32gui.GetLayeredWindowAttributes

(int,int,int) = GetLayeredWindowAttributes(hwnd)

Retrieves the layering parameters of a window with the WS_EX_LAYERED extended style

Parameters

hwnd : PyHANDLE

Handle to a layered window

Comments

This function only exists on WinXP and later.

Accepts keyword arguments.

Return Value

Returns a tuple of (color key, alpha, flags)


win32gui.GetLayout

int = GetLayout(hdc)

Retrieves the layout mode of a device context

Parameters

hdc : PyHANDLE

Handle to a device context

Return Value

Returns one of win32con.LAYOUT_*


win32gui.GetMapMode

int = GetMapMode(hdc)

Returns the method a device context uses to translate logical units to physical units

Parameters

hdc : PyHANDLE

Handle to a device context

Return Value

Returns one of win32con.MM_* values


win32gui.GetMenu

GetMenu()

Gets the menu for the specified window.


win32gui.GetMenuDefaultItem

int = GetMenuDefaultItem(hMenu, fByPos , flags )

Parameters

hMenu : int

Handle to the menu

fByPos : int

flags : int


win32gui.GetMenuInfo

GetMenuInfo(hmenu, info)

Gets information about a specified menu.

Parameters

hmenu : int

handle to menu

info : buffer

A buffer to fill with the information.

Comments

See win32gui_struct for helper functions.

This function will raise NotImplementedError on early platforms (eg, Windows NT.)


win32gui.GetMenuItemCount

int = GetMenuItemCount(hMenu)

Parameters

hMenu : int

Handle to the menu


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, uItem, fByPosition, menuItem)

Gets menu information

Parameters

hMenu : int

Handle to the menu

uItem : int

The menu item identifier or the menu item position.

fByPosition : int

Boolean value of True if uItem is set to a menu item position. This parameter is set to False if uItem is set to a menu item identifier.

menuItem : buffer

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


win32gui.GetMenuItemRect

(int, int, int, int) = GetMenuItemRect(hWnd, hMenu , uItem )

Parameters

hWnd : int

hMenu : int

Handle to the menu

uItem : int


win32gui.GetMenuState

int = GetMenuState(hMenu, uID , flags )

Parameters

hMenu : int

Handle to the menu

uID : int

flags : int


win32gui.GetMessage

MSG = GetMessage(hwnd, min , max )

Parameters

hwnd : int

min : int

max : int


win32gui.GetMiterLimit

float = GetMiterLimit(hdc)

Retrieves the limit of miter joins for a DC

Parameters

hdc : PyHANDLE

Handle to a device context


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)

Returns a struct containing the parameters used to create a GDI object

Parameters

handle : PyHANDLE

Handle to the object.

Comments

The result depends on the type of the handle.

Object type as determined by win32gui::GetObjectType | Returned object
OBJ_FONT | PyLOGFONT
OBJ_BITMAP | PyBITMAP
OBJ_PEN | Dict representing a LOGPEN struct


win32gui.GetObjectType

int = GetObjectType(h)

Returns the type (OBJ_* constant) of a GDI handle

Parameters

h : PyHANDLE

A handle to a GDI object


win32gui.GetOpenFileName

int = GetOpenFileName(OPENFILENAME)

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.

Parameters

OPENFILENAME : string/bytes

A string packed into an OPENFILENAME structure, probably via the struct module.

Comments

The win32gui::GetOpenFileNameW function is far more convenient to use.

Return Value

If the user presses OK, the function returns TRUE. Otherwise, use CommDlgExtendedError for error details (ie, a win32gui.error is raised). If the user cancels the dialog, the winerror attribute of the exception will be zero.


win32gui.GetOpenFileNameW

(PyUNICODE,PyUNICODE, int) = GetOpenFileNameW(hwndOwner, hInstance , Filter , CustomFilter , FilterIndex , File , MaxFile , InitialDir , Title , Flags , DefExt , TemplateName )

Creates a dialog to allow user to select file(s) to open

Parameters

hwndOwner=None : PyHANDLE

Handle to window that owns dialog

hInstance=None : PyHANDLE

Handle to module that contains dialog template

Filter=None : PyUNICODE

Contains pairs of descriptions and filespecs separated by NULLS, with a final trailing NULL. Example: 'Python Scripts\\0*.py;*.pyw;*.pys\\0Text files\\0*.txt\\0'

CustomFilter=None : PyUNICODE

Description to be used for filter that user selected or typed, can also contain a filespec as above

FilterIndex=0 : int

Specifies which of the filters is initially selected, use 0 for CustomFilter

File=None : PyUNICODE

The file name initially displayed

MaxFile=1024 : int

Number of characters to allocate for selected filename, override if large number of files expected

InitialDir=None : PyUNICODE

The starting directory

Title=None : PyUNICODE

The title of the dialog box

Flags=0 : int

Combination of win32con.OFN_* constants

DefExt=None : PyUNICODE

The default extension to use

TemplateName=None : PyResourceId

Name or resource id of dialog box template

Comments

Accepts keyword arguments, all arguments optional Input parameters and return values are identical to win32gui::GetSaveFileNameW


win32gui.GetParent

int = GetParent(child)

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

Parameters

child : int

handle to child window


win32gui.GetPath

tuple,tuple = GetPath(hdc)

Returns a sequence of points that describe the current path

Parameters

hdc : PyHANDLE

Handle to a device context containing a finalized path. See win32gui::EndPath

Return Value

Returns a sequence of POINT tuples, and a sequence of ints designating each point's function (combination of win32con.PT_* values)


win32gui.GetPixel

int = GetPixel(hdc, XPos , YPos )

Returns the RGB color of a single pixel

Parameters

hdc : PyHANDLE

Handle to a device context

XPos : int

Horizontal pos

YPos : int

Vertical pos


win32gui.GetPolyFillMode

int = GetPolyFillMode(hdc)

Returns the polygon filling mode for a device context

Parameters

hdc : PyHANDLE

Handle to a device context

Return Value

Returns win32con.ALTERNATE or win32con.WINDING


win32gui.GetROP2

int = GetROP2(hdc)

Returns the foreground mixing mode of a DC

Parameters

hdc : PyHANDLE

Handle to a device context

Return Value

Returns one of win32con.R2_* values


win32gui.GetRgnBox

int, PyRECT = GetRgnBox(hrgn)

Calculates the bounding box of a region

Parameters

hrgn : PyGdiHANDLE

Handle to a region

Return Value

Returns type of region (COMPLEXREGION, NULLREGION, or SIMPLEREGION) and rectangle in logical units


win32gui.GetSaveFileNameW

(PyUNICODE,PyUNICODE,int) = GetSaveFileNameW(hwndOwner, hInstance , Filter , CustomFilter , FilterIndex , File , MaxFile , InitialDir , Title , Flags , DefExt , TemplateName )

Creates a dialog for user to specify location to save a file or files

Parameters

hwndOwner=None : PyHANDLE

Handle to window that owns dialog

hInstance=None : PyHANDLE

Handle to module that contains dialog template

Filter=None : PyUNICODE

Contains pairs of descriptions and filespecs separated by NULLS, with a final trailing NULL. Example: 'Python Scripts\\0*.py;*.pyw;*.pys\\0Text files\\0*.txt\\0'

CustomFilter=None : PyUNICODE

Description to be used for filter that user selected or typed, can also contain a filespec as above

FilterIndex=0 : int

Specifies which of the filters is initially selected, use 0 for CustomFilter

File=None : PyUNICODE

The file name initially displayed

MaxFile=1024 : int

Number of characters to allocate for selected filename(s), override if large number of files expected

InitialDir=None : PyUNICODE

The starting directory

Title=None : PyUNICODE

The title of the dialog box

Flags=0 : int

Combination of win32con.OFN_* constants

DefExt=None : PyUNICODE

The default extension to use

TemplateName=None : PyResourceId

Name or resource id of dialog box template

Comments

Accepts keyword arguments, all arguments optional

Return Value

Returns a tuple of 3 values (PyUNICODE, PyUNICODE, int):
First is the selected file(s). If multiple files are selected, returned string will be the directory followed by files names separated by nulls, otherwise it will be the full path. In other words, if you use the OFN_ALLOWMULTISELECT flag you should split this value on \\0 characters and if the length of the result list is 1, it will be the full path, otherwise element 0 will be the directory and the rest of the elements will be filenames in this directory.
Second is a unicode string containing user-selected filter, will be None if CustomFilter was not specified
Third item contains flags pertaining to users input, such as OFN_READONLY and OFN_EXTENSIONDIFFERENT
If the user presses cancel or an error occurs, a win32gui.error is raised. If the user pressed cancel, the error number (ie, the winerror attribute of the exception) will be zero.


win32gui.GetScrollInfo

PySCROLLINFO = GetScrollInfo(hwnd, nBar , mask )

Returns information about a scroll bar

Parameters

hwnd : int

The handle to the window.

nBar : int

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

mask=SIF_ALL : int

The mask for attributes to retrieve.


win32gui.GetStockObject

PyHANDLE = GetStockObject(Object)

Creates a handle to one of the standard system Gdi objects

Parameters

Object : int

One of *_BRUSH, *_PEN, *_FONT, or *_PALLETTE constants


win32gui.GetStretchBltMode

int = GetStretchBltMode(hdc)

Returns the stretching mode used by win32gui::StretchBlt

Parameters

hdc : PyHANDLE

Handle to a device context

Return Value

Returns one of BLACKONWHITE,COLORONCOLOR,HALFTONE,STRETCH_ANDSCANS,STRETCH_DELETESCANS,STRETCH_HALFTONE,STRETCH_ORSCANS,WHITEONBLACK, or 0 on error.


win32gui.GetSubMenu

HMENU = GetSubMenu(hMenu, nPos )

Parameters

hMenu : int

Handle to the menu

nPos : int


win32gui.GetSysColor

int = GetSysColor(Index)

Returns the color of a window element

Parameters

Index : int

One of win32con.COLOR_* values


win32gui.GetSysColorBrush

PyGdiHANDLE = GetSysColorBrush(Index)

Creates a handle to a system color brush

Parameters

Index : int

Index of a window element color (win32con.COLOR_*)


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

int = GetTextAlign(hdc)

Returns horizontal and vertical alignment for text in a device context

Parameters

hdc : PyHANDLE

Handle to a device context

Return Value

Returns combination of win32con.TA_* flags


win32gui.GetTextCharacterExtra

int = GetTextCharacterExtra(hdc)

Returns the space between characters

Parameters

hdc : PyHANDLE

Handle to a device context


win32gui.GetTextColor

int = GetTextColor(hdc)

Returns the text color for a DC

Parameters

hdc : int

Handle to a device context

Return Value

Returns an RGB color. On error, returns CLR_INVALID


win32gui.GetTextExtentPoint32

cx, cy = GetTextExtentPoint32(hdc, str )

Computes the width and height of the specified string of text.

Parameters

hdc : PyHANDLE

The device context

str : string

The string to measure.


win32gui.GetTextFace

PyUnicode = GetTextFace(hdc)

Retrieves the name of the font currently selected in a DC

Parameters

hdc : PyHANDLE

Handle to a device context

Comments

Calls unicode api function (GetTextFaceW)


win32gui.GetTextMetrics

dict = GetTextMetrics()

Returns info for the font selected into a DC


win32gui.GetUpdateRgn

int = GetUpdateRgn(hWnd, hRgn , Erase )

Copies the update region of a window into an existing region

Parameters

hWnd : PyHANDLE

Handle to a window

hRgn : PyGdiHANDLE

Handle to an existing region to receive update area

Erase : boolean

Indicates if window background is to be erased

Return Value

Returns type of region, one of COMPLEXREGION, NULLREGION, or SIMPLEREGION


win32gui.GetViewportExtEx

(int,int) = GetViewportExtEx(hdc)

Retrieves the viewport extents for a DC

Parameters

hdc : PyHANDLE

Handle to a device context

Return Value

Returns the extents as (x,y) in logical units


win32gui.GetViewportOrgEx

(int,int) = GetViewportOrgEx(hdc)

Retrievs the origin for a DC's viewport

Parameters

hdc : PyHANDLE

Handle to a device context


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

(int,int) = GetWindowExtEx(hdc)

Retrieves the window extents for a DC

Parameters

hdc : PyHANDLE

Handle to a device context

Return Value

Returns the extents as (x,y) in logical units


win32gui.GetWindowLong

int = GetWindowLong(hwnd, index )

Parameters

hwnd : int

index : int


win32gui.GetWindowOrgEx

(int,int) = GetWindowOrgEx(hdc)

Retrievs the window origin for a DC

Parameters

hdc : PyHANDLE

Handle to a device context


win32gui.GetWindowPlacement

tuple = GetWindowPlacement()

Returns placement information about the current window.

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.


win32gui.GetWindowRect

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

Returns the rectangle for a window in screen coordinates

Parameters

hwnd : int

The handle to the window


win32gui.GetWindowRgn

int = GetWindowRgn(hWnd, hRgn )

Copies the window region of a window into an existing region

Parameters

hWnd : PyHANDLE

Handle to a window

hRgn : PyGdiHANDLE

Handle to an existing region that receives window region

Return Value

Returns type of region, one of COMPLEXREGION, NULLREGION, or SIMPLEREGION


win32gui.GetWindowRgnBox

int, PyRECT = GetWindowRgnBox(hWnd)

Returns the bounding box for a window's region

Parameters

hWnd : PyHANDLE

Handle to a window that has a window region. (see win32gui::SetWindowRgn)

Comments

Only available in winxpgui

Return Value

Returns type of region and rectangle coordinates in device units


win32gui.GetWindowText

string = GetWindowText(hwnd)

Get the window text.

Parameters

hwnd : PyHANDLE

The handle to the window

Comments

Note that previous versions of PyWin32 returned a (empty) Unicode object when the string was empty, or an MBCS encoded string value otherwise. A String is now returned in all cases.


win32gui.GetWorldTransform

PyXFORM = GetWorldTransform(hdc)

Retrieves a device context's coordinate space translation matrix

Parameters

hdc : PyHANDLE

Handle to a device context

Comments

DC's mode must be set to GM_ADVANCED. See win32gui::SetGraphicsMode.


win32gui.GradientFill

GradientFill(hdc, Vertex, Mesh, Mode)

Shades triangles or rectangles by interpolating between vertex colors

Parameters

hdc : int

Handle to device context

Vertex : (PyTRIVERTEX,...)

Sequence of TRIVERTEX dicts defining color info

Mesh : tuple

Sequence of tuples containing either 2 or 3 ints that index into the trivertex array to define either triangles or rectangles

Mode : int

win32con.GRADIENT_FILL_* value defining whether to fill by triangle or by rectangle


win32gui.HideCaret

HideCaret(hWnd)

Hides the caret

Parameters

hWnd : PyHANDLE

Window that owns the caret, can be 0.


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 : PyGdiHANDLE

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

hbmMask : PyGdiHANDLE

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_DrawEx

BOOL = ImageList_DrawEx()

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

ImageList_SetOverlayImage(hImageList, iImage, iOverlay)

Adds a specified image to the list of images to be used as overlay masks. An image list can have up to four overlay masks in version 4.70 and earlier and up to 15 in version 4.71. The function assigns an overlay mask index to the specified image.

Parameters

hImageList : int

iImage : int

iOverlay : int


win32gui.InitCommonControls

InitCommonControls()

Initializes the common controls.


win32gui.InitCommonControlsEx

InitCommonControlsEx(flag)

Initializes specific common controls.

Parameters

flag : int

One of the ICC_ constants


win32gui.InsertMenu

InsertMenu()


win32gui.InsertMenuItem

InsertMenuItem(hMenu, uItem, fByPosition, menuItem)

Inserts a menu item

Parameters

hMenu : int

Handle to the menu

uItem : int

The menu item identifier or the menu item position.

fByPosition : int

Boolean value of True if uItem is set to a menu item position. This parameter is set to False if uItem is set to a menu item identifier.

menuItem : buffer

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


win32gui.InvalidateRect

InvalidateRect(hWnd, Rect, Erase)

Invalidates a rectangular area of a window and adds it to the window's update region

Parameters

hWnd : PyHANDLE

Handle to the window

Rect : PyRECT

Client coordinates defining area to be redrawn. Use None for entire client area.

Erase : boolean

Indicates if background should be erased


win32gui.InvalidateRgn

InvalidateRgn(hWnd, hRgn, Erase)

Adds a region to a window's update region

Parameters

hWnd : PyHANDLE

Handle to the window

hRgn : PyGdiHANDLE

Region to be redrawn

Erase : boolean

Indidates if background should be erased


win32gui.InvertRect

InvertRect(hDC, rc)

Inverts the colors in a regtangular region

Parameters

hDC : PyHANDLE

Handle to a device context

rc : PyRECT

Coordinates of rectangle to invert


win32gui.InvertRgn

InvertRgn(hdc, hrgn)

Inverts the colors in a region

Parameters

hdc : PyHANDLE

Handle to the device context

hrgn : PyGdiHandle

Handle to the region


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

int = IsWindowEnabled(hwnd)

Indicates if the window is enabled.

Parameters

hwnd : int

The handle to the 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.LineTo

LineTo(hdc, XEnd, YEnd)

Draw a line from current position to specified point

Parameters

hdc : PyHANDLE

Handle to a device context

XEnd : int

Horizontal position in logical units

YEnd : int

Vertical position in logical units


win32gui.ListView_SortItems

ListView_SortItems(hwnd, callback, param)

Uses an application-defined comparison function to sort the items of a list view control.

Parameters

hwnd : int

The handle to the window

callback : object

A callback object, taking 3 params.

param=None : object

The third param to the callback function.


win32gui.ListView_SortItemsEx

ListView_SortItemsEx(hwnd, callback, param)

Uses an application-defined comparison function to sort the items of a list view control.

Parameters

hwnd : int

The handle to the window

callback : object

A callback object, taking 3 params.

param=None : object

The third param to the callback function.


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(hinstance, resource_id )

Loads an icon

Parameters

hinstance : int

resource_id : int/string


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(hinstance, resource_id )

Loads a menu

Parameters

hinstance : int

resource_id : int/string


win32gui.MaskBlt

MaskBlt(Dest, XDest, YDest, Width, Height, Src, XSrc, YSrc, Mask, xMask, yMask, Rop)

Combines the color data for the source and destination bitmaps using the specified mask and raster operation.

Parameters

Dest : PyHANDLE

Destination device context handle

XDest : int

X pos of dest rect

YDest : int

Y pos of dest rect

Width : int

Width of rect to be copied

Height : int

Height of rect to be copied

Src : PyHANDLE

Source DC handle

XSrc : int

X pos of src rect

YSrc : int

Y pos of src rect

Mask : PyGdiHANDLE

Handle to monochrome bitmap used to mask color

xMask : int

X pos in mask

yMask : int

Y pos in mask

Rop : int

Foreground and background raster operations. See MSDN docs for how to construct this value.

Comments

This function is not supported on Win9x.

Win32 API References

Search for MaskBlt at msdn, google or google groups.


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

ModifyWorldTransform(hdc, Xform, Mode)

Combines a coordinate tranformation with device context's current transformation

Parameters

hdc : PyHANDLE

Handle to a device context

Xform : PyXFORM

Transformation to be applied. Ignored if Mode is MWT_IDENTITY.

Mode : int

One of win32con.MWT_* values specifying how transformations will be combined

Comments

DC's mode must be set to GM_ADVANCED. See win32gui::SetGraphicsMode.


win32gui.MoveToEx

(int, int) = MoveToEx(hdc, X , Y )

Changes the current drawing position

Parameters

hdc : PyHANDLE

Device context handle

X : int

Horizontal pos in logical units

Y : int

Vertical pos in logical units

Return Value

Returns the previous position as (X, Y)


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

int = OffsetRgn(hrgn, XOffset , YOffset )

Relocates a region

Parameters

hrgn : PyGdiHANDLE

Handle to a region

XOffset : int

Horizontal offset

YOffset : int

Vertical offset

Return Value

Returns type of region (COMPLEXREGION, NULLREGION, or SIMPLEREGION)


win32gui.PaintDesktop

PaintDesktop(hdc)

Fills a DC with the destop background

Parameters

hdc : PyHANDLE

Handle to a device context


win32gui.PaintRgn

PaintRgn(hdc, hrgn)

Paints a region with current brush

Parameters

hdc : PyHANDLE

Handle to the device context

hrgn : PyGdiHANDLE

Handle to the region


win32gui.PatBlt

PatBlt(hdc, XLeft, YLeft, Width, Height, Rop)

Paints a rectangle by combining the current brush with existing colors

Parameters

hdc : PyHANDLE

Handle to a device context

XLeft : int

Horizontal pos

YLeft : int

Vertical pos

Width : int

Width of rectangular area

Height : int

Height of rectangular area

Rop : int

Raster operation, one of PATCOPY,PATINVERT,DSTINVERT,BLACKNESS,WHITENESS


win32gui.PathToRegion

PyGdiHANDLE = PathToRegion(hdc)

Converts a closed path in a DC to a region

Parameters

hdc : PyHANDLE

Handle to a device context that contains a closed path. See win32gui::EndPath.

Comments

On success, the path is deselected from the DC


win32gui.PeekMessage

MSG = PeekMessage(hwnd, filterMin , filterMax , removalOptions )

Parameters

hwnd : int

filterMin : int

filterMax : int

removalOptions : int


win32gui.Pie

Pie(hdc, LeftRect, TopRect, RightRect, BottomRect, XRadial1, YRadial1, XRadial2, YRadial2)

Draws a section of an ellipse cut by 2 radials

Parameters

hdc : PyHANDLE

Device context on which to draw

LeftRect : int

Left limit of ellipse

TopRect : int

Top limit of ellipse

RightRect : int

Right limit of ellipse

BottomRect : int

Bottom limit of ellipse

XRadial1 : int

Horizontal pos of Radial1 endpoint

YRadial1 : int

Vertical pos of Radial1 endpoint

XRadial2 : int

Horizontal pos of Radial2 endpoint

YRadial2 : int

Vertical pos of Radial2 endpoint


win32gui.PlgBlt

PlgBlt(Dest, Point, Src, XSrc, YSrc, Width, Height, Mask, xMask, yMask)

Copies color from a rectangle into a parallelogram

Parameters

Dest : PyHANDLE

Destination DC

Point : tuple

Sequence of 3 POINT tuples (x,y) describing a paralellogram

Src : PyHANDLE

Source device context

XSrc : int

Left edge of source rectangle

YSrc : int

Top of source rectangle

Width : int

Width of source rectangle

Height : int

Height of source rectangle

Mask=None : PyGdiHANDLE

Handle to monochrome bitmap to mask source, can be None

xMask=0 : int

x pos in mask

yMask=0 : int

y pos in mask


win32gui.PolyBezier

PolyBezier(hdc, Points)

Draws a series of Bezier curves starting from first point specified.

Parameters

hdc : PyHANDLE

Handle to a device context

Points : [(int,int),...]

Sequence of POINT tuples: ((x,y),...).

Comments

Number of points must be a multiple of 3 plus 1.


win32gui.PolyBezierTo

PolyBezierTo(hdc, Points)

Draws a series of Bezier curves starting from current drawing position.

Parameters

hdc : PyHANDLE

Handle to a device context

Points : [(int,int),...]

Sequence of POINT tuples: ((x,y),...).

Comments

Points must contain 3 points for each curve. Current position is updated with last endpoint.


win32gui.Polygon

Polygon(hdc, Points)

Draws a closed filled polygon defined by a sequence of points

Parameters

hdc : PyHANDLE

Handle to a device context

Points : [(int,int),...]

Sequence of POINT tuples: ((x,y),...)


win32gui.Polyline

Polyline(hdc, Points)

Connects a sequence of points using currently selected pen

Parameters

hdc : PyHANDLE

Handle to a device context

Points : [(int,int),...]

Sequence of POINT tuples: ((x,y),...)


win32gui.PolylineTo

PolylineTo(hdc, Points)

Draws a series of lines starting from current position. Updates current position with end point.

Parameters

hdc : PyHANDLE

Handle to a device context

Points : [(int,int),...]

Sequence of POINT tuples: ((x,y),...)


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=0 : int

An integer whose value depends on the message

lparam=0 : 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.PtInRect

boolean = PtInRect(rect, point )

Determines if a rectangle contains a point

Parameters

rect : (int, int, int, int)

The rect to check

point : (int,int)

The point


win32gui.PtInRegion

boolean = PtInRegion(hrgn, X , Y )

Determines if a region contains a point

Parameters

hrgn : PyGdiHandle

Handle to a region

X : int

X coord

Y : int

Y coord


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

Search for PeekMessage and DispatchMessage at msdn, google or google groups.

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 : buffer

the buffer object


win32gui.PyGetMemory

object = PyGetMemory(addr, len )

Returns a buffer object from and address and length

Parameters

addr : int

Address of the memory to reference.

len : int

Number of bytes to return.

Comments

If zero is passed a ValueError will be raised.


win32gui.PyGetString

string = PyGetString(addr, len )

Returns a string from an address.

Parameters

addr : int

Address of the memory to reference

len : int

Number of characters to read. If not specified, the string must be NULL terminated.

Return Value

If win32gui.UNICODE is True, this will return a unicode object.


win32gui.PySetMemory

object = PySetMemory(addr, String )

Copies bytes to an address.

Parameters

addr : int

Address of the memory to reference

String : string or buffer

The string to copy


win32gui.PySetString

object = PySetString(addr, String , maxLen )

Copies a string to an address (null terminated). You almost certainly should use win32gui::PySetMemory instead.

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

boolean = RectInRegion(hrgn, rc )

Determines if a region and rectangle overlap at any point

Parameters

hrgn : PyGdiHandle

Handle to a region

rc : PyRECT

Rectangle coordinates in logical units


win32gui.Rectangle

Rectangle(hdc, LeftRect, TopRect, RightRect, BottomRect)

Creates a solid rectangle using currently selected pen and brush

Parameters

hdc : PyHANDLE

Handle to device context

LeftRect : int

Position of left edge of rectangle

TopRect : int

Position of top edge of rectangle

RightRect : int

Position of right edge of rectangle

BottomRect : int

Position of bottom edge of rectangle


win32gui.RedrawWindow

RedrawWindow(hWnd, rcUpdate, hrgnUpdate, flags)

Causes a portion of a window to be redrawn

Parameters

hWnd : PyHANDLE

Handle to window to be redrawn

rcUpdate : (int,int,int,int)

Rectangle (left, top, right, bottom) identifying part of window to be redrawn, can be None

hrgnUpdate : PyGdiHANDLE

Handle to region to be redrawn, can be None to indicate entire client area

flags : int

Combination of win32con.RDW_* flags


win32gui.RegisterClass

int = RegisterClass(wndClass)

Registers a window class.

Parameters

wndClass : PyWNDCLASS

An object describing the window class.


win32gui.RegisterDeviceNotification

PyHDEVNOTIFY = RegisterDeviceNotification(handle, filter , flags )

Registers the device or type of device for which a window will receive notifications.

Parameters

handle : PyHANDLE

The handle to a window or a service

filter : buffer

A buffer laid out like one of the DEV_BROADCAST_* structures, generally built by one of the win32gui_struct helpers.

flags : int

Win32 API References

Search for RegisterDeviceNotification at msdn, google or google groups.


win32gui.RegisterHotKey

RegisterHotKey(hWnd, id, Modifiers, vk)

Registers a hotkey for a window

Parameters

hWnd : PyHANDLE

Handle to window that will receive WM_HOTKEY messages

id : int

Unique id to be used for the hot key

Modifiers : int

Control keys, combination of win32con.MOD_*

vk : int

Virtual key code

Win32 API References

Search for RegisterHotKey at msdn, google or google groups.


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 )

Releases a device context.

Parameters

hWnd : int

handle to window

hDC : int

handle to device context


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

RestoreDC(hdc, SavedDC)

Restores a device context state

Parameters

hdc : PyHANDLE

Handle to a device context

SavedDC : int

Identifier of state to be restored, as returned by win32gui::SaveDC.


win32gui.RoundRect

RoundRect(hdc, LeftRect, TopRect, RightRect, BottomRect, Width, Height)

Draws a rectangle with elliptically rounded corners, filled using using current brush

Parameters

hdc : PyHANDLE

Handle to device context

LeftRect : int

Position of left edge of rectangle

TopRect : int

Position of top edge of rectangle

RightRect : int

Position of right edge of rectangle

BottomRect : int

Position of bottom edge of rectangle

Width : int

Width of ellipse

Height : int

Height of ellipse


win32gui.SaveDC

int = SaveDC(hdc)

Save the state of a device context

Parameters

hdc : PyHANDLE

Handle to device context

Return Value

Returns a value identifying the state that can be passed to win32gui::RestoreDC. On error, returns 0.


win32gui.ScreenToClient

(int,int) = ScreenToClient(hWnd, Point )

Convert screen coordinates to client coords

Parameters

hWnd : PyHANDLE

Handle to a window

Point : (int,int)

Screen coordinates to be converted


win32gui.ScrollWindowEx

int,PyRECT = ScrollWindowEx(hWnd, dx , dy , rcScroll , rcClip , hrgnUpdate , 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, in device units

dy : int

Amount of vertical scrolling, in device units

rcScroll : PyRECT

Scroll rectangle, can be None for entire client area

rcClip : PyRECT

Clipping rectangle, can be None

hrgnUpdate : PyGdiHandle

Handle to region which will be updated with area invalidated by scroll operation, can be None

flags : int

Scrolling flags, combination of SW_ERASE,SW_INVALIDATE,SW_SCROLLCHILDREN,SW_SMOOTHSCROLL. If SW_SMOOTHSCROLL is specified, use upper 16 bits to specify time in milliseconds.

Return Value

Returns the type of region invalidated by scrolling, and a rectangle defining the affected area.


win32gui.SelectObject

HGDIOBJ = SelectObject(hdc, object )

Selects an object into the specified device context (DC). The new object replaces the previous object of the same type.

Parameters

hdc : int

handle to DC

object : int

The GDI object


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=None : int/str

Type depends on the message

lparam=None : int/str

Type 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.SetArcDirection

int = SetArcDirection(hdc, ArcDirection )

Sets the drawing direction for arcs and rectangles

Parameters

hdc : PyHANDLE

Handle to a device context

ArcDirection : int

One of win32con.AD_* constants

Return Value

Returns the previous direction, or 0 on error.


win32gui.SetBkColor

int = SetBkColor(hdc, color )

Sets the background color for a device context

Parameters

hdc : int/PyHANDLE

Handle to a device context

color : int

Return Value

Returns the previous color, or CLR_INVALID on failure


win32gui.SetBkMode

int = SetBkMode(hdc, BkMode )

Sets the background mode for a device context

Parameters

hdc : int/PyHANDLE

Handle to a device context

BkMode : int

OPAQUE or TRANSPARENT

Return Value

Returns the previous mode, or 0 on failure


win32gui.SetCapture

SetCapture()

Captures the mouse for the specified window.


win32gui.SetCaretPos

SetCaretPos(x, y)

Changes the position of the caret

Parameters

x : int

horizontal position

y : int

vertical position


win32gui.SetCursor

HCURSOR = SetCursor(hcursor)

Parameters

hcursor : int


win32gui.SetDlgItemInt

SetDlgItemInt(hDlg, IDDlgItem, Value, Signed)

Places an integer value in a dialog control

Parameters

hDlg : PyHANDLE

Handle to a dialog window

IDDlgItem : int

Identifier of one of the dialog's controls

Value : int

Value to placed in the control

Signed : boolean

Indicates if the input value is signed


win32gui.SetDlgItemText

SetDlgItemText(hDlg, IDDlgItem, String)

Sets the text for a window or control

Parameters

hDlg : PyHANDLE

Handle to a dialog window

IDDlgItem : int

The Id of a control within the dialog

String : str/unicode

The text to put in the control


win32gui.SetDoubleClickTime

SetDoubleClickTime(newVal)

Parameters

newVal : int


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

int = SetGraphicsMode(hdc, Mode )

Enables or disables advanced graphics features for a DC

Parameters

hdc : PyHANDLE

Handle to a device context

Mode : int

GM_COMPATIBLE or GM_ADVANCED (from win32con)

Return Value

Returns the previous mode, one of win32con.GM_COMPATIBLE or win32con.GM_ADVANCED


win32gui.SetLayeredWindowAttributes

SetLayeredWindowAttributes(hwnd, Key, Alpha, Flags)

Sets the opacity and transparency color key of a layered window.

Parameters

hwnd : PyHANDLE

handle to the layered window

Key : int

Specifies the color key. Use win32api::RGB to generate value.

Alpha : int

Opacity, in the range 0-255

Flags : int

Combination of win32con.LWA_* values

Comments

This function only exists on Win2k and later

Accepts keyword arguments


win32gui.SetLayout

int = SetLayout(hdc, Layout )

Sets the layout for a device context

Parameters

hdc : PyHANDLE

Handle to a device context

Layout : int

One of win32con.LAYOUT_* constants

Return Value

Returns the previous layout mode


win32gui.SetMapMode

int = SetMapMode(hdc, MapMode )

Sets the method used for translating logical units to device units

Parameters

hdc : PyHANDLE

Handle to a device context

MapMode : int

The new mapping mode (win32con.MM_*)

Return Value

Returns the previous mapping mode, one of win32con.MM_* constants


win32gui.SetMenu

SetMenu(hwnd, hmenu)

Sets the menu for the specified window.

Parameters

hwnd : int

hmenu : int


win32gui.SetMenuDefaultItem

SetMenuDefaultItem(hMenu, uItem, fByPos)

Parameters

hMenu : int

Handle to the menu

uItem : int

fByPos : int


win32gui.SetMenuInfo

SetMenuInfo(hmenu, info)

Sets information for a specified menu.

Parameters

hmenu : int

handle to menu

info : MENUINFO

menu information in the format of a buffer.

Comments

See win32gui_struct for helper functions.

This function will raise NotImplementedError on early platforms (eg, Windows NT.)


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 : PyGdiHANDLE

handle to unchecked bitmap, can be None

hBitmapChecked : PyGdiHANDLE

handle to checked bitmap, can be None


win32gui.SetMenuItemInfo

SetMenuItemInfo(hMenu, uItem, fByPosition, menuItem)

Sets menu information

Parameters

hMenu : int

Handle to the menu

uItem : int

The menu item identifier or the menu item position.

fByPosition : int

Boolean value of True if uItem is set to a menu item position. This parameter is set to False if uItem is set to a menu item identifier.

menuItem : buffer

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


win32gui.SetMiterLimit

float = SetMiterLimit(hdc, NewLimit )

Set the limit of miter joins for a DC

Parameters

hdc : PyHANDLE

Handle to a device context

NewLimit : float

New limit to be set

Return Value

Returns the previous limit


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

int = SetPixel(hdc, X , Y , Color )

Set the color of a single pixel

Parameters

hdc : PyHANDLE

Handle to a device context

X : int

Horizontal pos

Y : int

Vertical pos

Color : int

RGB color to be set.

Return Value

Returns the RGB color actually set, which may be different from the one passed in


win32gui.SetPixelV

SetPixelV(hdc, X, Y, Color)

Sets the color of a single pixel to an approximation of specified color

Parameters

hdc : PyHANDLE

Handle to a device context

X : int

Horizontal pos

Y : int

Vertical pos

Color : int

RGB color to be set.


win32gui.SetPolyFillMode

int = SetPolyFillMode(hdc, PolyFillMode )

Sets the polygon filling mode for a device context

Parameters

hdc : PyHANDLE

Handle to a device context

PolyFillMode : int

One of ALTERNATE or WINDING

Return Value

Returns the previous mode, one of win32con.ALTERNATE or win32con.WINDING


win32gui.SetROP2

int = SetROP2(hdc, DrawMode )

Sets the foreground mixing mode of a DC

Parameters

hdc : PyHANDLE

Handle to a device context

DrawMode : int

Mixing mode, one of win32con.R2_*.

Return Value

Returns previous mode


win32gui.SetRectRgn

SetRectRgn(hrgn, LeftRect, TopRect, RightRect, BottomRect)

Makes an existing region rectangular

Parameters

hrgn : PyGdiHandle

Handle to a region

LeftRect : int

Left edge in logical units

TopRect : int

Top edge in logical units

RightRect : int

Right edge in logical units

BottomRect : int

Bottom edge in logical units


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?

Return Value

Returns an int with the current position of the scroll box.


win32gui.SetStretchBltMode

int = SetStretchBltMode(hdc, StretchMode )

Sets the stretching mode used by win32gui::StretchBlt

Parameters

hdc : PyHANDLE

Handle to a device context

StretchMode : int

One of BLACKONWHITE,COLORONCOLOR,HALFTONE,STRETCH_ANDSCANS,STRETCH_DELETESCANS,STRETCH_HALFTONE,STRETCH_ORSCANS, or WHITEONBLACK (from win32con)

Return Value

If the function succeeds, the return value is the previous stretching mode.
If the function fails, the return value is zero.


win32gui.SetTextAlign

int = SetTextAlign(hdc, Mode )

Sets horizontal and vertical alignment for text in a device context

Parameters

hdc : PyHANDLE

Handle to a device context

Mode : int

Combination of win32con.TA_* constants

Return Value

Returns the previous alignment flags


win32gui.SetTextCharacterExtra

int = SetTextCharacterExtra(hdc, CharExtra )

Sets the spacing between characters

Parameters

hdc : PyHANDLE

Handle to a device context

CharExtra : int

Space between adjacent chars, in logical units

Return Value

Returns the previous spacing


win32gui.SetTextColor

int = SetTextColor(hdc, color )

Changes the text color for a device context

Parameters

hdc : int

Handle to a device context

color : int

The RGB color value - see win32api::RGB

Return Value

Returns the previous color, or CLR_INVALID on failure


win32gui.SetViewportExtEx

(int,int) = SetViewportExtEx(hdc, XExtent , YExtent )

Changes the viewport extents for a DC

Parameters

hdc : PyHANDLE

Handle to a device context

XExtent : int

New X extent in logical units

YExtent : int

New Y extent in logical units

Return Value

Returns the previous extents as (x,y) in logical units


win32gui.SetViewportOrgEx

(int,int) = SetViewportOrgEx(hdc, X , Y )

Changes the viewport origin for a DC

Parameters

hdc : PyHANDLE

Handle to a device context

X : int

New X coord in logical units

Y : int

New Y coord in logical units

Return Value

Returns the previous origin as (x,y)


win32gui.SetWindowExtEx

(int,int) = SetWindowExtEx(hdc, XExtent , YExtent )

Changes the window extents for a DC

Parameters

hdc : PyHANDLE

Handle to a device context

XExtent : int

New X extent in logical units

YExtent : int

New Y extent in logical units

Return Value

Returns the previous extents


win32gui.SetWindowLong

int = SetWindowLong(hwnd, index , value )

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

Parameters

hwnd : PyHANDLE

The handle to the window

index : int

The index of the item to set.

value : object

The value to set.

Comments

This function calls the SetWindowLongPtr Api function

If index is GWLP_WNDPROC, then the value parameter must be a callable object (or a dictionary) to use as the new window procedure.


win32gui.SetWindowOrgEx

(int,int) = SetWindowOrgEx(hdc, X , Y )

Changes the window origin for a DC

Parameters

hdc : PyHANDLE

Handle to a device context

X : int

New X coord in logical units

Y : int

New Y coord in logical units

Return Value

Returns the previous origin


win32gui.SetWindowPlacement

SetWindowPlacement(hWnd, placement)

Sets the windows placement

Parameters

hWnd : PyHANDLE

Handle to a window

placement : (tuple)

A tuple representing the WINDOWPLACEMENT structure.


win32gui.SetWindowPos

SetWindowPos(hWnd, InsertAfter, X, Y, cx, cy, Flags)

Sets the position and size of a window

Parameters

hWnd : PyHANDLE

Handle to the window

InsertAfter : PyHANDLE

Window that hWnd will be placed below. Can be a window handle or one of HWND_BOTTOM,HWND_NOTOPMOST,HWND_TOP, or HWND_TOPMOST

X : int

New X coord

Y : int

New Y coord

cx : int

New width of window

cy : int

New height of window

Flags : int

Combination of win32con.SWP_* flags


win32gui.SetWindowRgn

SetWindowRgn(hWnd, hRgn, Redraw)

Sets the visible region of a window

Parameters

hWnd : PyHANDLE

Handle to a window

hRgn : PyGdiHANDLE

Handle to region to be set, can be None

Redraw : boolean

Indicates if window should be completely redrawn

Comments

On success, the system assumes ownership of the region so you should call the handle's Detach() method to prevent it from being automatically closed.


win32gui.SetWindowText

SetWindowText()

Sets the window text.


win32gui.SetWorldTransform

SetWorldTransform(hdc, Xform)

Transforms a device context's coordinate space

Parameters

hdc : PyHANDLE

Handle to a device context

Xform : PyXFORM

Matrix defining the transformation

Comments

DC's mode must be set to GM_ADVANCED. See win32gui::SetGraphicsMode.


win32gui.Shell_NotifyIcon

Shell_NotifyIcon(Message, nid)

Adds, removes or modifies a taskbar icon.

Parameters

Message : int

One of win32gui.NIM_* flags

nid : PyNOTIFYICONDATA

Tuple containing NOTIFYICONDATA info


win32gui.ShowCaret

ShowCaret(hWnd)

Shows the caret at its current position

Parameters

hWnd : PyHANDLE

Window that owns the caret, can be 0.


win32gui.ShowWindow

boolean = ShowWindow(hWnd, cmdShow )

Shows or hides a window and changes its state

Parameters

hWnd : int

The handle to the window

cmdShow : int

Combination of win32con.SW_* flags


win32gui.StretchBlt

StretchBlt(hdcDest, x, y, width, height, hdcSrc, nXSrc, nYSrc, nWidthSrc, nHeightSrc, dwRop)

Copies a bitmap from a source rectangle into a destination rectangle, stretching or compressing the bitmap to fit the dimensions of the destination rectangle, if necessary

Parameters

hdcDest : int

handle to destination DC

x : int

x-coord of destination upper-left corner

y : int

y-coord of destination upper-left corner

width : int

width of destination rectangle

height : int

height of destination rectangle

hdcSrc : int

handle to source DC

nXSrc : int

x-coord of source upper-left corner

nYSrc : int

y-coord of source upper-left corner

nWidthSrc : int

width of source rectangle

nHeightSrc : int

height of source rectangle

dwRop : int

raster operation code


win32gui.StrokeAndFillPath

StrokeAndFillPath(hdc)

Combines operations of StrokePath and FillPath with no overlap

Parameters

hdc : PyHANDLE

Handle to a device context that contains a closed path. See win32gui::EndPath.


win32gui.StrokePath

StrokePath(hdc)

Draws current path with currently selected pen

Parameters

hdc : PyHANDLE

Handle to a device context that contains a closed path. See win32gui::EndPath.


win32gui.SystemParametersInfo

SystemParametersInfo(Action, Param, WinIni)

Queries or sets system-wide parameters. This function can also update the user profile while setting a parameter.

Parameters

Action : int

System parameter to query or set, one of the SPI_GET* or SPI_SET* constants

Param=None : object

depends on action to be taken

WinIni=0 : int

Flags specifying whether change should be permanent, and if all windows should be notified of change. Combination of SPIF_UPDATEINIFILE, SPIF_SENDCHANGE, SPIF_SENDWININICHANGE

Action | Input/return type
SPI_GETDESKWALLPAPER | Returns the path to the bmp used as wallpaper
SPI_SETDESKWALLPAPER | Param should be a string specifying a .bmp file
SPI_GETDROPSHADOW | Returns a boolean
SPI_GETFLATMENU | Returns a boolean
SPI_GETFONTSMOOTHING | Returns a boolean
SPI_GETICONTITLEWRAP | Returns a boolean
SPI_GETSNAPTODEFBUTTON | Returns a boolean
SPI_GETBEEP | Returns a boolean
SPI_GETBLOCKSENDINPUTRESETS | Returns a boolean
SPI_GETMENUUNDERLINES | Returns a boolean
SPI_GETKEYBOARDCUES | Returns a boolean
SPI_GETKEYBOARDPREF | Returns a boolean
SPI_GETSCREENSAVEACTIVE | Returns a boolean
SPI_GETSCREENSAVERRUNNING | Returns a boolean
SPI_GETMENUDROPALIGNMENT | Returns a boolean (True indicates left aligned, False right aligned)
SPI_GETMENUFADE | Returns a boolean
SPI_GETLOWPOWERACTIVE | Returns a boolean
SPI_GETPOWEROFFACTIVE | Returns a boolean
SPI_GETCOMBOBOXANIMATION | Returns a boolean
SPI_GETCURSORSHADOW | Returns a boolean
SPI_GETGRADIENTCAPTIONS | Returns a boolean
SPI_GETHOTTRACKING | Returns a boolean
SPI_GETLISTBOXSMOOTHSCROLLING | Returns a boolean
SPI_GETMENUANIMATION | Returns a boolean
SPI_GETSELECTIONFADE | Returns a boolean
SPI_GETTOOLTIPANIMATION | Returns a boolean
SPI_GETTOOLTIPFADE | Returns a boolean (TRUE=fade, False=slide)
SPI_GETUIEFFECTS | Returns a boolean
SPI_GETACTIVEWINDOWTRACKING | Returns a boolean
SPI_GETACTIVEWNDTRKZORDER | Returns a boolean
SPI_GETDRAGFULLWINDOWS | Returns a boolean
SPI_GETSHOWIMEUI | Returns a boolean
SPI_GETMOUSECLICKLOCK | Returns a boolean
SPI_GETMOUSESONAR | Returns a boolean
SPI_GETMOUSEVANISH | Returns a boolean
SPI_GETSCREENREADER | Returns a boolean
SPI_GETSHOWSOUNDS | Returns a boolean
SPI_SETDROPSHADOW | Param must be a boolean
SPI_SETDROPSHADOW | Param must be a boolean
SPI_SETMENUUNDERLINES | Param must be a boolean
SPI_SETKEYBOARDCUES | Param must be a boolean
SPI_SETMENUFADE | Param must be a boolean
SPI_SETCOMBOBOXANIMATION | Param must be a boolean
SPI_SETCURSORSHADOW | Param must be a boolean
SPI_SETGRADIENTCAPTIONS | Param must be a boolean
SPI_SETHOTTRACKING | Param must be a boolean
SPI_SETLISTBOXSMOOTHSCROLLING | Param must be a boolean
SPI_SETMENUANIMATION | Param must be a boolean
SPI_SETSELECTIONFADE | Param must be a boolean
SPI_SETTOOLTIPANIMATION | Param must be a boolean
SPI_SETTOOLTIPFADE | Param must be a boolean
SPI_SETUIEFFECTS | Param must be a boolean
SPI_SETACTIVEWINDOWTRACKING | Param must be a boolean
SPI_SETACTIVEWNDTRKZORDER | Param must be a boolean
SPI_SETMOUSESONAR | Param must be a boolean
SPI_SETMOUSEVANISH | Param must be a boolean
SPI_SETMOUSECLICKLOCK | Param must be a boolean
SPI_SETFONTSMOOTHING | Param should specify a boolean
SPI_SETICONTITLEWRAP | Param should specify a boolean
SPI_SETSNAPTODEFBUTTON | Param is a boolean
SPI_SETBEEP | Param is a boolean
SPI_SETBLOCKSENDINPUTRESETS | Param is a boolean
SPI_SETKEYBOARDPREF | Param is a boolean
SPI_SETMOUSEBUTTONSWAP | Param is a boolean
SPI_SETSCREENSAVEACTIVE | Param is a boolean
SPI_SETMENUDROPALIGNMENT | Param is a boolean (True=left aligned, False=right aligned)
SPI_SETLOWPOWERACTIVE | Param is a boolean
SPI_SETPOWEROFFACTIVE | Param is a boolean
SPI_SETDRAGFULLWINDOWS | Param is a boolean
SPI_SETSHOWIMEUI | Param is a boolean
SPI_SETSCREENREADER | Param is a boolean
SPI_SETSHOWSOUNDS | Param is a boolean
SPI_SETMOUSETRAILS | Param should be an int specifying the nbr of cursors in the trail (0 or 1 means disabled)
SPI_SETWHEELSCROLLLINES | Param is an int specifying nbr of lines
SPI_SETKEYBOARDDELAY | Param is an int in the range 0 - 3
SPI_SETKEYBOARDSPEED | Param is an int in the range 0 - 31
SPI_SETDOUBLECLICKTIME | Param is an int (in milliseconds), Use win32gui::GetDoubleClickTime to retrieve the value.
SPI_SETDOUBLECLKWIDTH | Param is an int. Use win32api.GetSystemMetrics(SM_CXDOUBLECLK) to retrieve the value.
SPI_SETDOUBLECLKHEIGHT | Param is an int, Use win32api.GetSystemMetrics(SM_CYDOUBLECLK) to retrieve the value.
SPI_SETMOUSEHOVERHEIGHT | Param is an int
SPI_SETMOUSEHOVERWIDTH | Param is an int
SPI_SETMOUSEHOVERTIME | Param is an int
SPI_SETSCREENSAVETIMEOUT | Param is an int specifying the timeout in seconds
SPI_SETMENUSHOWDELAY | Param is an int specifying the shortcut menu delay in milliseconds
SPI_SETLOWPOWERTIMEOUT | Param is an int (in seconds)
SPI_SETPOWEROFFTIMEOUT | Param is an int (in seconds)
SPI_SETDRAGHEIGHT | Param is an int. Use win32api.GetSystemMetrics(SM_CYDRAG) to retrieve the value.
SPI_SETDRAGWIDTH | Param is an int. Use win32api.GetSystemMetrics(SM_CXDRAG) to retrieve the value.
SPI_SETBORDER | Param is an int
SPI_GETFONTSMOOTHINGCONTRAST | Returns an int
SPI_GETFONTSMOOTHINGTYPE | Returns an int
SPI_GETMOUSETRAILS | Returns an int specifying the nbr of cursor images in the trail, 0 or 1 indicates disabled
SPI_GETWHEELSCROLLLINES | Returns the nbr of lines to scroll for the mouse wheel
SPI_GETKEYBOARDDELAY | Returns an int
SPI_GETKEYBOARDSPEED | Returns an int
SPI_GETMOUSESPEED | Returns an int
SPI_GETMOUSEHOVERHEIGHT | Returns an int
SPI_GETMOUSEHOVERWIDTH | Returns an int
SPI_GETMOUSEHOVERTIME | Returns an int
SPI_GETSCREENSAVETIMEOUT | Returns an int (idle time in seconds)
SPI_GETMENUSHOWDELAY | Returns an int (shortcut delay in milliseconds)
SPI_GETLOWPOWERTIMEOUT | Returns an int (in seconds)
SPI_GETPOWEROFFTIMEOUT | Returns an int (in seconds)
SPI_GETACTIVEWNDTRKTIMEOUT | Returns an int (milliseconds)
SPI_GETBORDER | Returns an int
SPI_GETCARETWIDTH | Returns an int
SPI_GETFOREGROUNDFLASHCOUNT | Returns an int
SPI_GETFOREGROUNDLOCKTIMEOUT | Returns an int
SPI_GETFOCUSBORDERHEIGHT | Returns an int
SPI_GETFOCUSBORDERWIDTH | Returns an int
SPI_GETMOUSECLICKLOCKTIME | Returns an int (in milliseconds)
SPI_SETFONTSMOOTHINGCONTRAST | Param should be an int in the range 1000 to 2200
SPI_SETFONTSMOOTHINGTYPE | Param should be one of the FE_FONTSMOOTHING* constants
SPI_SETMOUSESPEED | Param should be an int in the range 1 - 20
SPI_SETACTIVEWNDTRKTIMEOUT | Param is an int (in milliseconds)
SPI_SETCARETWIDTH | Param is an int (in pixels)
SPI_SETFOREGROUNDFLASHCOUNT | Param is an int
SPI_SETFOREGROUNDLOCKTIMEOUT | Param is an int (in milliseconds)
SPI_SETFOCUSBORDERHEIGHT | Returns an int
SPI_SETFOCUSBORDERWIDTH | Returns an int
SPI_SETMOUSECLICKLOCKTIME | Param is an int (in milliseconds)
SPI_GETICONTITLELOGFONT | Returns a PyLOGFONT,
SPI_SETICONTITLELOGFONT | Param must be a PyLOGFONT,
SPI_SETLANGTOGGLE | Param is ignored. Sets the language toggle hotkey from registry key HKCU\\keyboard layout\\toggle
SPI_SETICONS | Reloads the system icons. Param is not used
SPI_GETMOUSE | Returns a tuple of 3 ints containing the x and y mouse thresholds and the acceleration factor.
SPI_SETMOUSE | Param should be a sequence of 3 ints
SPI_GETDEFAULTINPUTLANG | Returns an int (locale id for default language)
SPI_SETDEFAULTINPUTLANG | Param is an int containing a locale id
SPI_GETANIMATION | Returns an int
SPI_SETANIMATION | Param is an int
SPI_ICONHORIZONTALSPACING | Functions as both a get and set operation. If Param is None, functions as a get operation, otherwise Param is an int to be set as the new value
SPI_ICONVERTICALSPACING | Functions as both a get and set operation. If Param is None, functions as a get operation, otherwise Param is an int to be set as the new value
SPI_GETNONCLIENTMETRICS | Param must be None. The result is a dict.
SPI_SETNONCLIENTMETRICS | Param is a dict in the form of a NONCLIENTMETRICS struct, as returned by SPI_GETNONCLIENTMETRICS operation
SPI_GETMINIMIZEDMETRICS | Returns a dict representing a MINIMIZEDMETRICS struct. Param is not used.
SPI_SETMINIMIZEDMETRICS | Param should be a MINIMIZEDMETRICS dict as returned by SPI_GETMINIMIZEDMETRICS action
SPI_SETDESKPATTERN | Unsupported (obsolete)
SPI_GETFASTTASKSWITCH | Unsupported (obsolete)
SPI_SETFASTTASKSWITCH | Unsupported (obsolete)
SPI_SETSCREENSAVERRUNNING | Unsupported (documented as internal use only)
SPI_SCREENSAVERRUNNING | Same as SPI_SETSCREENSAVERRUNNING
SPI_SETPENWINDOWS | Unsupported (only relevant for win95)
SPI_GETWINDOWSEXTENSION | Unsupported (only relevant for win95)
SPI_GETGRIDGRANULARITY | Unsupported (obsolete)
SPI_SETGRIDGRANULARITY | Unsupported (obsolete)
SPI_LANGDRIVER | Unsupported (use is not documented)
SPI_GETFONTSMOOTHINGORIENTATION | Unsupported (use is not documented)
SPI_SETFONTSMOOTHINGORIENTATION | Unsupported (use is not documented)
SPI_SETHANDHELD | Unsupported (use is not documented)
SPI_GETICONMETRICS | Not implemented yet
SPI_SETICONMETRICS | Not implemented yet
SPI_GETWORKAREA | Not implemented yet
SPI_SETWORKAREA | Not implemented yet
SPI_GETSERIALKEYS | Not implemented yet
SPI_SETSERIALKEYS | Not implemented yet
SPI_SETMOUSEKEYS | Not implemented yet
SPI_GETMOUSEKEYS | Not implemented yet
SPI_GETHIGHCONTRAST | Not implemented yet
SPI_SETHIGHCONTRAST | Not implemented yet
SPI_GETSOUNDSENTRY | Not implemented yet
SPI_SETSOUNDSENTRY | Not implemented yet
SPI_GETSTICKYKEYS | Not implemented yet
SPI_SETSTICKYKEYS | Not implemented yet
SPI_GETTOGGLEKEYS | Not implemented yet
SPI_SETTOGGLEKEYS | Not implemented yet
SPI_GETACCESSTIMEOUT | Not implemented yet
SPI_SETACCESSTIMEOUT | Not implemented yet
SPI_GETFILTERKEYS | Not implemented yet
SPI_SETFILTERKEYS | Not implemented yet

Comments

Param and WinIni are not used with any of the SPI_GET operations
Boolean parameters can be any object that can be evaluated as True or False

Return Value

SPI_SET functions all return None on success. Types returned by SPI_GET functions are dependent on the operation


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 : PyRECT

Pointer to rec (can be None)


win32gui.TranslateAccelerator

int = TranslateAccelerator(hwnd, haccel , msg )

Parameters

hwnd : int

haccel : int

msg : MSG


win32gui.TranslateMessage

int = TranslateMessage(msg)

Parameters

msg : MSG


win32gui.TransparentBlt

TransparentBlt(Dest, XOriginDest, YOriginDest, WidthDest, HeightDest, Src, XOriginSrc, YOriginSrc, WidthSrc, HeightSrc, Transparent)

Transfers color from one DC to another, with one color treated as transparent

Parameters

Dest : PyHANDLE

Destination device context handle

XOriginDest : int

X pos of dest rect

YOriginDest : int

Y pos of dest rect

WidthDest : int

Width of dest rect

HeightDest : int

Height of dest rect

Src : PyHANDLE

Source DC handle

XOriginSrc : int

X pos of src rect

YOriginSrc : int

Y pos of src rect

WidthSrc : int

Width of src rect

HeightSrc : int

Height of src rect

Transparent : int

RGB color value that will be transparent


win32gui.UnregisterClass

UnregisterClass(atom, hinst)

Unregisters a window class created by win32gui::RegisterClass

Parameters

atom : PyResourceId

The atom or classname identifying the class previously registered.

hinst : PyHANDLE

The handle to the instance unregistering the class, can be None


win32gui.UnregisterDeviceNotification

UnregisterDeviceNotification()

Unregisters a Device Notification handle. It is generally not necessary to call this function manually, but in some cases, handle values may be extracted via the struct module and need to be closed explicitly.


win32gui.UpdateLayeredWindow

UpdateLayeredWindow(hwnd, hdcDst, ptDst, size, hdcSrc, ptSrc, Key, blend, Flags)

Updates the position, size, shape, content, and translucency of a layered window.

Parameters

hwnd : PyHANDLE

handle to layered window

hdcDst=None : PyHANDLE

handle to screen DC, can be None. *Must* be None if hdcSrc is None

ptDst=None : (x,y)

New screen position, can be None.

size=None : (cx, cy)

New size of the layered window, can be None. *Must* be None if hdcSrc is None.

hdcSrc=None : int

handle to surface DC for the window, can be None

ptSrc=None : (x,y)

layer position, can be None. *Must* be None if hdcSrc is None.

Key=0 : int

Color key, generate using win32api::RGB

blend=(0,0,255,0) : (int, int, int, int)

PyBLENDFUNCTION specifying alpha blending parameters

Flags=0 : int

One of the win32con.ULW_* values. Use 0 if hdcSrc is None.

Comments

This function is only available on Windows 2000 and later

Accepts keyword arguments.


win32gui.UpdateWindow

UpdateWindow(hwnd)

Parameters

hwnd : int

The handle to the window


win32gui.ValidateRgn

ValidateRgn(hWnd, hRgn)

Removes a region from a window's update region

Parameters

hWnd : PyHANDLE

Handle to the window

hRgn : PyGdiHANDLE

Region to be validated


win32gui.WaitMessage

WaitMessage()

Waits for a message


win32gui.WidenPath

WidenPath(hdc)

Widens current path by amount it would increase by if drawn with currently selected pen

Parameters

hdc : PyHANDLE

Handle to a device context that contains a closed path. See win32gui::EndPath.


win32gui.WindowFromDC

PyHANDLE = WindowFromDC(hDC)

Finds the window associated with a device context

Parameters

hDC : PyHANDLE

Handle to a device context

Return Value

Returns a handle to the window, or 0 if the DC is not associated with a window


win32gui.WindowFromPoint

int = WindowFromPoint(point)

Retrieves a handle to the window that contains the specified point.

Parameters

point : (int, int)

The point.


win32gui._TrackMouseEvent

_TrackMouseEvent(tme)

Posts messages when the mouse pointer leaves a window or hovers over a window for a specified amount of time.

Parameters

tme : TRACKMOUSEEVENT


win32gui.set_logger

set_logger(logger)

Sets a logger object for exceptions and error information

Parameters

logger : object

A logger object, generally from the standard logger package.

Comments

Once a logger has been set for the module, unhandled exceptions, such as from a window's WNDPROC, will be written (via logger.exception()) to the log instead of to stderr.
Note that using this with the Python 2.3 logging package will prevent the traceback from being written to the log. However, it is possible to use the Python 2.4 logging package directly with Python 2.3


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

Search for HtmlHelp at msdn, google or google groups.

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=None : None/int/string

Additional data specific to the help call. Can be a buffer or pointer-sized int.

Win32 API References

Search for WinHelp at msdn, google or google groups.

Return Value

The method raises an exception if an error occurs.


win32inet

Module win32inet

An interface to the Windows internet (wininet) API

Methods

InternetSetCookie
Creates a cookie associated with the specified URL.

InternetGetCookie
Retrieves the cookie for the specified URL

InternetAttemptConnect
Attempts to make a connection to the Internet.

InternetCheckConnection
Allows an application to check if a connection to the Internet can be established

InternetGoOnline
Prompts the user for permission to initiate connection to a URL.

InternetCloseHandle

InternetConnect
Opens an FTP, Gopher, or HTTP session for a given site.

InternetOpen
Initializes an application's use of the Microsoft® Win32® Internet functions.

InternetOpenUrl
Opens a resource specified by a complete FTP, Gopher, or HTTP URL.

InternetCanonicalizeUrl
Canonicalizes a URL, which includes converting unsafe characters and spaces into escape sequences.

InternetGetLastResponseInfo
Retrieves the last Win32® Internet function error description or server response on the thread calling this function.

InternetReadFile
Reads data from a handle opened by the win32inet::InternetOpenUrl, win32inet::FtpOpenFile, win32inet::GopherOpenFile , or win32inet::HttpOpenRequest function.

InternetWriteFile
Writes data to a handle opened by win32inet::FtpOpenFile.

FtpOpenFile
Initiates access to a remote file on an FTP server for reading or writing.

FtpCommand
Allows an application to send commands directly to an FTP server.

InternetQueryOption
Retrieves an option for an internet handle

InternetSetOption
Sets an option for an internet handle

FindFirstUrlCacheEntry
Initiates an enumeration of the browser cache

FindNextUrlCacheEntry
Continues enumeration of cached files

FindFirstUrlCacheEntryEx
Initiates an enumeration of the browser cache

FindNextUrlCacheEntryEx
Continues enumeration of cached files

FindCloseUrlCache
Closes a cache enumeration handle

FindFirstUrlCacheGroup
Initiates enumeration of Url cache groups

FindNextUrlCacheGroup
Continues enumeration of cache groups

GetUrlCacheEntryInfo
Retrieves cache info for a URL

DeleteUrlCacheGroup
Deletes a cache group

CreateUrlCacheGroup
Creates a new cache group

CreateUrlCacheEntry
Creates a cache entry for a URL

CommitUrlCacheEntry
Commits a cache entry

SetUrlCacheEntryGroup
Associates a cache entry with a group

GetUrlCacheGroupAttribute
Retrieves attributes for a cache group

SetUrlCacheGroupAttribute
Changes the attributes of a cache group

DeleteUrlCacheEntry
Deletes the cache entry for a URL


win32inet.CommitUrlCacheEntry

str = CommitUrlCacheEntry(UrlName, LocalFileName , ExpireTime , LastModifiedTime , CacheEntryType , HeaderInfo , OriginalUrl )

Commits a cache entry

Parameters

UrlName : str

The Url for which to create an entry

LocalFileName : str

Filename returned from win32inet::CreateUrlCacheEntry. Can be None when creating a history entry.

ExpireTime=None : PyTime

Time at which entry expires

LastModifiedTime=None : PyTime

Modification time of URL

CacheEntryType=NORMAL_CACHE_ENTRY : int

Combination of *_CACHE_ENTRY flags

HeaderInfo=None : str

Header data used to request Url

OriginalUrl=None : str

If redirected, original site requested

Comments

Accepts keyword args

Win32 API References

Search for CommitUrlCacheEntry at msdn, google or google groups.


win32inet.CreateUrlCacheEntry

str = CreateUrlCacheEntry(UrlName, ExpectedFileSize , FileExtension )

Creates a cache entry for a URL

Parameters

UrlName : str

The Url for which to create an entry

ExpectedFileSize : int

Size of content, use 0 if unknown

FileExtension : str

Extension to use for filename

Comments

Accepts keyword args

Win32 API References

Search for CreateUrlCacheEntry at msdn, google or google groups.

Return Value

Returns the filename to which content should be written


win32inet.CreateUrlCacheGroup

long = CreateUrlCacheGroup(Flags)

Creates a new cache group

Parameters

Flags=0 : int

Combination of CACHEGROUP_FLAG_* flags

Comments

Accepts keyword args

Win32 API References

Search for CreateUrlCacheGroup at msdn, google or google groups.


win32inet.DeleteUrlCacheEntry

DeleteUrlCacheEntry(UrlName)

Deletes the cache entry for a URL

Parameters

UrlName : str

Cached url to be deleted


win32inet.DeleteUrlCacheGroup

DeleteUrlCacheGroup(GroupId, Attributes)

Deletes a cache group

Parameters

GroupId : int

Group id

Attributes=CACHEGROUP_FLAG_FLUSHURL_ONDELETE : int

Combination of CACHEGROUP_FLAG_* flags

Comments

Accepts keyword args

Win32 API References

Search for DeleteUrlCacheGroup at msdn, google or google groups.


win32inet.FindCloseUrlCache

FindCloseUrlCache(EnumHandle)

Closes a cache enumeration handle

Parameters

EnumHandle : PyUrlCacheHANDLE

Cache enumeration handle as returned by win32inet::FindFirstUrlCacheEntry

Comments

Accepts keyword args

Win32 API References

Search for FindCloseUrlCache at msdn, google or google groups.


win32inet.FindFirstUrlCacheEntry

(PyUrlCacheHANDLE, dict) = FindFirstUrlCacheEntry(SearchPattern)

Initiates an enumeration of the browser cache

Parameters

SearchPattern=None : str

Type of entry to find, can be 'visited:', 'cookie:', or None

Comments

Accepts keyword args

Win32 API References

Search for FindFirstUrlCacheEntry at msdn, google or google groups.

Return Value

Returns a handle that can be passed to win32inet::FindNextUrlCacheEntry, and a dict containing information for the first entry found. Throws error code ERROR_NO_MORE_ITEMS if no items are found.


win32inet.FindFirstUrlCacheEntryEx

(PyUrlCacheHANDLE, dict) = FindFirstUrlCacheEntryEx(SearchPattern, Flags , Filter , GroupId )

Initiates an enumeration of the browser cache

Parameters

SearchPattern=None : str

Type of entry to find, can be 'visited:', 'cookie:', or None

Flags=0 : int

None currently defined

Filter=0 : int

Types of entries to return, combination of *_CACHE_ENTRY values

GroupId=0 : int

Cache group to enumerate, use 0 for all

Comments

Accepts keyword args

Win32 API References

Search for FindFirstUrlCacheEntryEx at msdn, google or google groups.

Return Value

Returns a handle that can be passed to win32inet::FindNextUrlCacheEntry, and a dict containing information for the first entry found. Throws error code ERROR_NO_MORE_ITEMS if no items are found.


win32inet.FindFirstUrlCacheGroup

(PyUrlCacheHANDLE, int) = FindFirstUrlCacheGroup(Filter)

Initiates enumeration of Url cache groups

Parameters

Filter=CACHEGROUP_SEARCH_ALL : int

CACHEGROUP_SEARCH_*

Comments

Accepts keyword args

Win32 API References

Search for FindFirstUrlCacheGroup at msdn, google or google groups.

Return Value

Returns a handle that can be passed to win32inet::FindNextUrlCacheGroup, and the id of the first group found.


win32inet.FindNextUrlCacheEntry

dict = FindNextUrlCacheEntry(EnumHandle)

Continues enumeration of cached files

Parameters

EnumHandle : PyUrlCacheHANDLE

Cache enumeration handle as returned by win32inet::FindFirstUrlCacheEntry

Comments

Accepts keyword args

Win32 API References

Search for FindNextUrlCacheEntry at msdn, google or google groups.

Return Value

Returns a dict representing a INTERNET_CACHE_ENTRY_INFO strunct


win32inet.FindNextUrlCacheEntryEx

dict = FindNextUrlCacheEntryEx(EnumHandle)

Continues enumeration of cached files

Parameters

EnumHandle : PyUrlCacheHANDLE

Cache enumeration handle as returned by win32inet::FindFirstUrlCacheEntryEx

Comments

Accepts keyword args

Win32 API References

Search for FindNextUrlCacheEntryEx at msdn, google or google groups.

Return Value

Returns a dict representing a INTERNET_CACHE_ENTRY_INFO strunct


win32inet.FindNextUrlCacheGroup

int = FindNextUrlCacheGroup(Find)

Continues enumeration of cache groups

Parameters

Find : PyHANDLE

Group enumeration handle as returned by win32inet::FindFirstUrlCacheGroup

Comments

Accepts keyword args

Win32 API References

Search for FindNextUrlCacheGroup at msdn, google or google groups.


win32inet.FtpCommand

PyHINTERNET = FtpCommand(Connect, ExpectResponse , Flags , Command , Context )

Allows an application to send commands directly to an FTP server.

Parameters

Connect : PyHINTERNET

Valid HINTERNET handle to an FTP session.

ExpectResponse : bool

Boolean value that indicates whether or not the application expects a response from the FTP server. This must be set to True if a response is expected, or False otherwise.

Flags : int

Unsigned long integer value that contains the flags that control this function. This can be set to either FTP_TRANSFER_TYPE_ASCII or FTP_TRANSFER_TYPE_BINARY

Command : string

The command to send to the FTP server.

Context=None : object

Arbitrary object to be passed to callback

Comments

This function may cause a crash on 32-bit XP and Vista due to an internal error in win32inet.dll.

Accepts keyword args


win32inet.FtpOpenFile

PyHINTERNET = FtpOpenFile(hConnect, FileName , Access , Flags , Context )

Initiates access to a remote file on an FTP server for reading or writing.

Parameters

hConnect : PyHINTERNET

Valid HINTERNET handle to an FTP session.

FileName : string

The name of the file to access on the remote system.

Access : int

Integer value that determines how the file will be accessed. This can be GENERIC_READ or GENERIC_WRITE, but not both.

Flags : int

Integer value that contains the conditions under which the transfers occur. The application should select one transfer type and any of the flags that indicate how the caching of the file will be controlled. The transfer type can be one of the FTP_TRANSFER_TYPE* values

Context=None : object

Arbitrary object that will be passed to handle's callback function

Comments

Accepts keyword args


win32inet.GetUrlCacheEntryInfo

dict = GetUrlCacheEntryInfo(UrlName)

Retrieves cache info for a URL

Parameters

UrlName : str

Cache enumeration handle as returned by win32inet::FindFirstUrlCacheEntry

Comments

Accepts keyword args

Win32 API References

Search for GetUrlCacheEntryInfo at msdn, google or google groups.

Return Value

Returns a dict representing a INTERNET_CACHE_ENTRY_INFO strunct


win32inet.GetUrlCacheGroupAttribute

dict = GetUrlCacheGroupAttribute(GroupId, Attributes )

Retrieves attributes for a cache group

Parameters

GroupId : int

Group id

Attributes=CACHEGROUP_ATTRIBUTE_GET_ALL : int

Attributes to retrieve, CACHEGROUP_ATTRIBUTE_*

Comments

Accepts keyword args

Win32 API References

Search for GetUrlCacheGroupAttribute at msdn, google or google groups.

Return Value

Returns a dict representing a INTERNET_CACHE_GROUP_INFO struct


win32inet.InternetAttemptConnect

InternetAttemptConnect(Reserved)

Attempts to make a connection to the Internet.

Parameters

Reserved=0 : int

Use only 0.


win32inet.InternetCanonicalizeUrl

string = InternetCanonicalizeUrl(url, flags )

Canonicalizes a URL, which includes converting unsafe characters and spaces into escape sequences.

Parameters

url : string

The URL to canonicalize.

flags=0 : int

integer value that contains the flags that control canonicalization. This can be one of the following values:

ICU_BROWSER_MODE Does not encode or decode characters after "#" or "?", and does not remove trailing white space after "?". If this value is not specified, the entire URL is encoded and trailing white space is removed. ICU_DECODE Converts all %XX sequences to characters, including escape sequences, before the URL is parsed. ICU_ENCODE_PERCENT Encodes any percent signs encountered. By default, percent signs are not encoded. This value is available in Microsoft® Internet Explorer 5 and later versions of the Win32® Internet functions. ICU_ENCODE_SPACES_ONLY Encodes spaces only. ICU_NO_ENCODE Does not convert unsafe characters to escape sequences. ICU_NO_META Does not remove meta sequences (such as "." and "..") from the URL. If no flags are specified (dwFlags = 0), the function converts all unsafe characters and meta sequences (such as .,\\ .., and ...) to escape sequences.


win32inet.InternetCheckConnection

InternetCheckConnection(Url, Flags, Reserved)

Allows an application to check if a connection to the Internet can be established

Parameters

Url : string

Url to attempt to connect to, can be None

Flags=0 : int

FLAG_ICC_FORCE_CONNECTION is only defined flag

Reserved=0 : int

Use only 0.


win32inet.InternetCloseHandle

InternetCloseHandle(handle)

Parameters

handle : PyHINTERNET

Comments

It should not be necessary to call this function - all handles are PyHINTERNET objects, so can have their Close method called, and will otherwise be automatically closed.


win32inet.InternetConnect

InternetConnect(Internet, ServerName, ServerPort, Username, Password, Service, Flags, Context)

Opens an FTP, Gopher, or HTTP session for a given site.

Parameters

Internet : PyHINTERNET

Valid HINTERNET handle returned by a previous call to win32inet::InternetOpen.

ServerName : string

A string that contains the host name of an Internet server. Alternately, the string can contain the IP number of the site, in ASCII dotted-decimal format (for example, 11.0.1.45).

ServerPort : int

Number of the TCP/IP port on the server to connect to. These flags set only the port that will be used. The service is set by the value of dwService. This can be one of the INTERNET_DEFAULT_*_PORT constants or INTERNET_INVALID_PORT_NUMBER, which uses the default port for the service specified by dwService.

Username : string

A string that contains the name of the user to log on. If this parameter is None, the function uses an appropriate default, except for HTTP; a NULL parameter in HTTP causes the server to return an error. For the FTP protocol, the default is "anonymous".

Password : string

Address of a null-terminated string that contains the password to use to log on. If both Password and Username are None, the function uses the default "anonymous" password. In the case of FTP, the default password is the user's e-mail name. If lpszPassword is None, but lpszUsername is not None, the function uses a blank password.

Service : int

Iinteger value that contains the type of service to access. This can be one of INTERNET_SERVICE_FTP, INTERNET_SERVICE_GOPHER, or INTERNET_SERVICE_HTTP.

Flags : int

Integer value that contains the flags specific to the service used. When the value of dwService is INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE causes the application to use passive FTP semantics.

Context=None : object

Arbitrary object to be passed to callback function

Comments

Accepts keyword args


win32inet.InternetGetCookie

string = InternetGetCookie(Url, CookieName )

Retrieves the cookie for the specified URL

Parameters

Url : string

Site for which to retrieve cookie

CookieName : string

Name of cookie (documented on MSDN as not implemented)


win32inet.InternetGetLastResponseInfo

int, string = InternetGetLastResponseInfo()

Retrieves the last Win32® Internet function error description or server response on the thread calling this function.


win32inet.InternetGoOnline

InternetGoOnline(Url, Parent, Flags)

Prompts the user for permission to initiate connection to a URL.

Parameters

Url : string

Web site to connect to

Parent=None : int

Handle to parent window

Flags=0 : int

INTERNET_GOONLINE_REFRESH is only available flag


win32inet.InternetOpen

InternetOpen(agent, proxyName, proxyBypass, flags)

Initializes an application's use of the Microsoft® Win32® Internet functions.

Parameters

agent : string

A string that contains the name of the application or entity calling the Internet functions. This name is used as the user agent in the HTTP protocol.

proxyName : string

proxyBypass : string

flags : int

Combination of INTERNET_FLAG_ASYNC,INTERNET_FLAG_FROM_CACHE, or INTERNET_FLAG_OFFLINE


win32inet.InternetOpenUrl

PyHINTERNET = InternetOpenUrl(Internet, Url , Headers , Flags , Context )

Opens a resource specified by a complete FTP, Gopher, or HTTP URL.

Parameters

Internet : PyHINTERNET

Internet handle as returned by win32inet::InternetOpen

Url : string

A string that contains the URL to begin reading. Only URLs beginning with ftp:, gopher:, http:, or https: are supported.

Headers=None : string

a string variable that contains the headers to be sent to the HTTP server.

Flags=0 : int

INTERNET_FLAG_*

Context=None : object

An arbitrary object to be passed to the status callback function

Comments

Accepts keyword args.

Return Value

Returns None in async mode (Internet handle created with INTERNET_FLAG_ASYNC). When handle is created, it will be passed to callback function of parent handle.


win32inet.InternetQueryOption

object = InternetQueryOption(hInternet, Option )

Retrieves an option for an internet handle

Parameters

hInternet : PyHINTERNET

Internet handle, or None for global defaults

Option : int

INTERNET_OPTION_* value

Option | Returned type
INTERNET_OPTION_CALLBACK | Python callback function
INTERNET_OPTION_CONTEXT_VALUE | Context object
INTERNET_OPTION_SEND_TIMEOUT | Int - timeout in millseconds
INTERNET_OPTION_CONTROL_SEND_TIMEOUT | Int - timeout in millseconds
INTERNET_OPTION_RECEIVE_TIMEOUT | Int - timeout in millseconds
INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT | Int - timeout in millseconds
INTERNET_OPTION_CODEPAGE | Int - Codepage of host part of URL
INTERNET_OPTION_CODEPAGE_PATH | Int - Codepage for URL
INTERNET_OPTION_CODEPAGE_EXTRA | Int - Codepage for path part of URL
INTERNET_OPTION_CONNECT_RETRIES | Int - Number of time to try to reconnect to host
INTERNET_OPTION_CONNECT_TIMEOUT | Int - Connection timeout in milliseconds
INTERNET_OPTION_CONNECTED_STATE | Int - Connection state, INTERNET_STATE_*
INTERNET_OPTION_HANDLE_TYPE | Int, INTERNET_HANDLE_TYPE_*
INTERNET_OPTION_ERROR_MASK | Int, combination of INTERNET_ERROR_MASK_*
INTERNET_OPTION_EXTENDED_ERROR | Int, ERROR_INTERNET_*
INTERNET_OPTION_FROM_CACHE_TIMEOUT | Int - Timeout in ms before cached copy is used
INTERNET_OPTION_IDN | Int, INTERNET_FLAG_IDN_*
INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER | Int
INTERNET_OPTION_MAX_CONNS_PER_SERVER | Int
INTERNET_OPTION_READ_BUFFER_SIZE | Int
INTERNET_OPTION_WRITE_BUFFER_SIZE | Int
INTERNET_OPTION_REQUEST_FLAGS | Int, combination of INTERNET_REQFLAG_*
INTERNET_OPTION_REQUEST_PRIORITY | Int
INTERNET_OPTION_SECURITY_FLAGS | Int, SECURITY_FLAG_*
INTERNET_OPTION_SECURITY_KEY_BITNESS | Int
INTERNET_OPTION_BYPASS_EDITED_ENTRY | Boolean
INTERNET_OPTION_HTTP_DECODING | Boolean
INTERNET_OPTION_IGNORE_OFFLINE | Boolean
INTERNET_OPTION_DATAFILE_NAME | String - Name of internet cache file
INTERNET_OPTION_USERNAME | String - Username passed to InternetConnect
INTERNET_OPTION_PASSWORD | String - Password passed to InternetConnect
INTERNET_OPTION_PROXY_PASSWORD | String
INTERNET_OPTION_PROXY_USERNAME | String
INTERNET_OPTION_SECONDARY_CACHE_KEY | String
INTERNET_OPTION_SECURITY_CERTIFICATE | String
INTERNET_OPTION_URL | String
INTERNET_OPTION_USER_AGENT | String
INTERNET_OPTION_CACHE_TIMESTAMPS | dict - Expiration and last modified times
INTERNET_OPTION_HTTP_VERSION | dict - HTTP_VERSION_INFO
INTERNET_OPTION_VERSION | dict - INTERNET_VERSION_INFO
INTERNET_OPTION_PARENT_HANDLE | PyHINTERNET
INTERNET_OPTION_PROXY | dict - INTERNET_PROXY_INFO
INTERNET_OPTION_DIAGNOSTIC_SOCKET_INFO | Not yet supported (INTERNET_DIAGNOSTIC_SOCKET_INFO)
INTERNET_OPTION_PER_CONNECTION_OPTION | Not yet supported (INTERNET_PER_CONN_OPTION_LIST)
INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT | Not yet supported (INTERNET_CERTIFICATE_INFO)
INTERNET_OPTION_ALTER_IDENTITY | Not supported
INTERNET_OPTION_ASYNC | Not supported
INTERNET_OPTION_ASYNC_ID | Not supported
INTERNET_OPTION_ASYNC_PRIORITY | Not supported
INTERNET_OPTION_CACHE_STREAM_HANDLE | Not supported
INTERNET_OPTION_CALLBACK_FILTER | Not supported
INTERNET_OPTION_CLIENT_CERT_CONTEXT | Not supported
INTERNET_OPTION_DATA_RECEIVE_TIMEOUT | Not supported
INTERNET_OPTION_DATA_SEND_TIMEOUT | Not supported
INTERNET_OPTION_CONNECT_BACKOFF | Not supported
INTERNET_OPTION_CONNECT_TIME | Not supported
INTERNET_OPTION_DISABLE_AUTODIAL | Not supported
INTERNET_OPTION_DISCONNECTED_TIMEOUT | Not supported
INTERNET_OPTION_IDENTITY | Not supported
INTERNET_OPTION_IDLE_STATE | Not supported
INTERNET_OPTION_KEEP_CONNECTION | Not supported
INTERNET_OPTION_LISTEN_TIMEOUT | Not supported
INTERNET_OPTION_OFFLINE_MODE | Not supported
INTERNET_OPTION_OFFLINE_SEMANTICS | Not supported
INTERNET_OPTION_POLICY | Not supported
INTERNET_OPTION_RECEIVE_THROUGHPUT | Not supported
INTERNET_OPTION_REMOVE_IDENTITY | Not supported
INTERNET_OPTION_SEND_THROUGHPUT | Not supported
INTERNET_OPTION_DATAFILE_EXT | Only valid for InternetSetOption
INTERNET_OPTION_DIGEST_AUTH_UNLOAD | Only valid for InternetSetOption
INTERNET_OPTION_END_BROWSER_SESSION | Only valid for InternetSetOption
INTERNET_OPTION_REFRESH | Only valid for InternetSetOption
INTERNET_OPTION_RESET_URLCACHE_SESSION | Only valid for InternetSetOption
INTERNET_OPTION_SETTINGS_CHANGED | Only valid for InternetSetOption

Win32 API References

Search for InternetQueryOption at msdn, google or google groups.

Return Value

The type of object returned is dependent on the option requested


win32inet.InternetReadFile

string = InternetReadFile(hInternet, size )

Reads data from a handle opened by the

win32inet::InternetOpenUrl, win32inet::FtpOpenFile,

win32inet::GopherOpenFile

, or win32inet::HttpOpenRequest

 function.

Parameters

hInternet : PyHINTERNET

size : int

Number of bytes to read.

Return Value

The result will be a string of zero bytes when the end is reached.


win32inet.InternetSetCookie

InternetSetCookie(url, lpszCookieName, data)

Creates a cookie associated with the specified URL.

Parameters

url : string

lpszCookieName : string

data : string


win32inet.InternetSetOption

InternetSetOption(hInternet, Option, Buffer)

Sets an option for an internet handle

Parameters

hInternet : PyHINTERNET

Internet handle, or None for global defaults

Option : int

The option to set, INTERNET_OPTION_*

Buffer : object

Type is dependent on Option

Option | Type of input object
INTERNET_OPTION_CALLBACK | Python function called on status change
INTERNET_OPTION_CONTEXT_VALUE | Any Python object to be passed to callback function
INTERNET_OPTION_SEND_TIMEOUT | Int - timeout in millseconds
INTERNET_OPTION_CONTROL_SEND_TIMEOUT | Int - timeout in millseconds
INTERNET_OPTION_RECEIVE_TIMEOUT | Int - timeout in millseconds
INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT | Int - timeout in millseconds
INTERNET_OPTION_CODEPAGE | Int - Codepage of host part of URL
INTERNET_OPTION_CODEPAGE_PATH | Codepage for URL
INTERNET_OPTION_CODEPAGE_EXTRA | Int - Codepage for path part of URL
INTERNET_OPTION_CONNECT_RETRIES | Int - Number of time to try to reconnect to host
INTERNET_OPTION_CONNECT_TIMEOUT | Int - Connection timeout in milliseconds
INTERNET_OPTION_CONNECTED_STATE | Int - Connection state, INTERNET_STATE_*
INTERNET_OPTION_ERROR_MASK | Int, combination of INTERNET_ERROR_MASK_*
INTERNET_OPTION_FROM_CACHE_TIMEOUT | Int - Timeout in ms before cached copy is used
INTERNET_OPTION_IDN | Int, INTERNET_FLAG_IDN_*
INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER | Int
INTERNET_OPTION_MAX_CONNS_PER_SERVER | Int
INTERNET_OPTION_READ_BUFFER_SIZE | Int
INTERNET_OPTION_WRITE_BUFFER_SIZE | Int
INTERNET_OPTION_REQUEST_PRIORITY | Int
INTERNET_OPTION_DIGEST_AUTH_UNLOAD | None
INTERNET_OPTION_END_BROWSER_SESSION | None
INTERNET_OPTION_REFRESH | None
INTERNET_OPTION_RESET_URLCACHE_SESSION | None
INTERNET_OPTION_SETTINGS_CHANGED | None
INTERNET_OPTION_BYPASS_EDITED_ENTRY | Boolean
INTERNET_OPTION_HTTP_DECODING | Boolean
INTERNET_OPTION_IGNORE_OFFLINE | Boolean
INTERNET_OPTION_USERNAME | String - Username passed to InternetConnect
INTERNET_OPTION_PASSWORD | String - Password passed to InternetConnect
INTERNET_OPTION_PROXY_PASSWORD | String
INTERNET_OPTION_PROXY_USERNAME | String
INTERNET_OPTION_SECONDARY_CACHE_KEY | String
INTERNET_OPTION_USER_AGENT | String
INTERNET_OPTION_DATAFILE_EXT | String - Extension to use for download cache file
INTERNET_OPTION_PROXY | Dict representing INTERNET_PROXY_INFO struct
INTERNET_OPTION_HTTP_VERSION | Not yet supported - HTTP_VERSION_INFO
INTERNET_OPTION_PER_CONNECTION_OPTION | Not yet supported (INTERNET_PER_CONN_OPTION_LIST)
INTERNET_OPTION_ALTER_IDENTITY | Not supported
INTERNET_OPTION_ASYNC | Not supported
INTERNET_OPTION_ASYNC_ID | Not supported
INTERNET_OPTION_ASYNC_PRIORITY | Not supported
INTERNET_OPTION_CACHE_STREAM_HANDLE | Not supported
INTERNET_OPTION_CALLBACK_FILTER | Not supported
INTERNET_OPTION_CLIENT_CERT_CONTEXT | Not supported
INTERNET_OPTION_DATA_RECEIVE_TIMEOUT | Not supported
INTERNET_OPTION_DATA_SEND_TIMEOUT | Not supported
INTERNET_OPTION_CONNECT_BACKOFF | Not supported
INTERNET_OPTION_CONNECT_TIME | Not supported
INTERNET_OPTION_DISABLE_AUTODIAL | Not supported
INTERNET_OPTION_DISCONNECTED_TIMEOUT | Not supported
INTERNET_OPTION_IDENTITY | Not supported
INTERNET_OPTION_IDLE_STATE | Not supported
INTERNET_OPTION_KEEP_CONNECTION | Not supported
INTERNET_OPTION_LISTEN_TIMEOUT | Not supported
INTERNET_OPTION_OFFLINE_MODE | Not supported
INTERNET_OPTION_OFFLINE_SEMANTICS | Not supported
INTERNET_OPTION_POLICY | Not supported
INTERNET_OPTION_RECEIVE_THROUGHPUT | Not supported
INTERNET_OPTION_REMOVE_IDENTITY | Not supported
INTERNET_OPTION_SEND_THROUGHPUT | Not supported
INTERNET_OPTION_CACHE_TIMESTAMPS | Only valid for InternetQueryOption
INTERNET_OPTION_HANDLE_TYPE | Only valid for InternetQueryOption
INTERNET_OPTION_DATAFILE_NAME | Only valid for InternetQueryOption
INTERNET_OPTION_PARENT_HANDLE | Only valid for InternetQueryOption
INTERNET_OPTION_SECURITY_CERTIFICATE | Only valid for InternetQueryOption
INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT | Only valid for InternetQueryOption
INTERNET_OPTION_SECURITY_FLAGS | Only valid for InternetQueryOption
INTERNET_OPTION_SECURITY_KEY_BITNESS | Only valid for InternetQueryOption
INTERNET_OPTION_DIAGNOSTIC_SOCKET_INFO | Only valid for InternetQueryOption
INTERNET_OPTION_VERSION | Only valid for InternetQueryOption
INTERNET_OPTION_EXTENDED_ERROR | Only valid for InternetQueryOption
INTERNET_OPTION_REQUEST_FLAGS | Only valid for InternetQueryOption
INTERNET_OPTION_URL | Only valid for InternetQueryOption

Win32 API References

Search for InternetSetOption at msdn, google or google groups.


win32inet.InternetWriteFile

int = InternetWriteFile(File, Buffer )

Writes data to a handle opened by win32inet::FtpOpenFile.

Parameters

File : PyHINTERNET

Writeable internet handle

Buffer : string

String or buffer containing data to be written


win32inet.SetUrlCacheEntryGroup

SetUrlCacheEntryGroup(UrlName, Flags, GroupId)

Associates a cache entry with a group

Parameters

UrlName : str

Url whose cache is to be added to the group

Flags : int

INTERNET_CACHE_GROUP_ADD or INTERNET_CACHE_GROUP_REMOVE

GroupId : int

Id of a cache group

Comments

Accepts keyword args

Win32 API References

Search for SetUrlCacheEntryGroup at msdn, google or google groups.


win32inet.SetUrlCacheGroupAttribute

SetUrlCacheGroupAttribute(GroupId, Attributes, GroupInfo, Flags)

Changes the attributes of a cache group

Parameters

GroupId : int

Id of a cache group

Attributes : int

Bitmask of CACHEGROUP_ATTRIBUTE_* flags indicating which attributes to set

GroupInfo : dict

INTERNET_CACHE_GROUP_INFO dict as returned by win32inet::GetUrlCacheGroupAttribute

Flags=0 : int

Reserved, use 0

Comments

Accepts keyword args

Win32 API References

Search for SetUrlCacheGroupAttribute at msdn, google or google groups.


win32job

Module win32job

An interface to the win32 Process and Thread API's, available in Windows 2000 and later.

Methods

AssignProcessToJobObject
Associates a process with an existing job object.

CreateJobObject
Creates or opens a job object.

OpenJobObject
Opens an existing job object.

TerminateJobObject
Terminates all processes currently associated with the job.

UserHandleGrantAccess
Grants or denies access to a handle to a User object to a job that has a user-interface restriction.

IsProcessInJob
Determines if the process is running in the specified job.

QueryInformationJobObject
Retrieves limit and job state information from the job object.

SetInformationJobObject
Sets quotas and limits for a job


win32job.AssignProcessToJobObject

AssignProcessToJobObject(hJob, hProcess)

Associates a process with an existing job object.

Parameters

hJob : PyHANDLE

hProcess : PyHANDLE


win32job.CreateJobObject

CreateJobObject(jobAttributes, name)

Creates or opens a job object.

Parameters

jobAttributes : PySECURITY_ATTRIBUTES

name : unicode


win32job.IsProcessInJob

boolean = IsProcessInJob(hProcess, hJob )

Determines if the process is running in the specified job.

Parameters

hProcess : PyHANDLE

Handle to a process

hJob : PyHANDLE

Handle to a job, use None to check if process is part of any job

Comments

Function is only available on WinXP and later


win32job.OpenJobObject

OpenJobObject(desiredAccess, inheritHandles, name)

Opens an existing job object.

Parameters

desiredAccess : int

inheritHandles : bool

name : unicode


win32job.QueryInformationJobObject

dict = QueryInformationJobObject(Job, JobObjectInfoClass )

Retrieves limit and job state information from the job object.

Parameters

Job : PyHANDLE

Handle to a job, use None for job that calling process is part of

JobObjectInfoClass : int

The type of data required, one of JobObject* values

JobObjectInfoClass | Type of information returned
JobObjectBasicAccountingInformation | Returns a dict representing a JOBOBJECT_BASIC_ACCOUNTING_INFORMATION struct
JobObjectBasicAndIoAccountingInformation | Returns a dict representing a JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION struct
JobObjectBasicLimitInformation | Returns a dict representing a JOBOBJECT_BASIC_LIMIT_INFORMATION struct
JobObjectExtendedLimitInformation | Returns a dict representing a JOBOBJECT_EXTENDED_LIMIT_INFORMATION struct
JobObjectEndOfJobTimeInformation | Returns a dict representing a JOBOBJECT_END_OF_JOB_TIME_INFORMATION struct
JobObjectBasicUIRestrictions | Returns a dict representing a JOBOBJECT_BASIC_UI_RESTRICTIONS struct
JobObjectBasicProcessIdList | Returns a sequence of pids of processes assigned to the job
JobObjectJobSetInformation | Returns a dict representing a JOBOBJECT_JOBSET_INFORMATION struct (not documented on MSDN)
JobObjectSecurityLimitInformation | JOBOBJECT_SECURITY_LIMIT_INFORMATION Not implemented
JobObjectAssociateCompletionPortInformation | JOBOBJECT_ASSOCIATE_COMPLETION_PORT Not implemented

Return Value

The type of the returned information is dependent on the class requested


win32job.SetInformationJobObject

SetInformationJobObject(Job, JobObjectInfoClass, JobObjectInfo)

Sets quotas and limits for a job

Parameters

Job : PyHANDLE

Handle to a job

JobObjectInfoClass : int

The type of data required, one of JobObject* values

JobObjectInfo : dict

Dictionary containing info to be set, as returned by win32job::QueryInformationJobObject

JobObjectInfoClass | Type of information to be set
JobObjectBasicLimitInformation | A JOBOBJECT_BASIC_LIMIT_INFORMATION dict
JobObjectExtendedLimitInformation | dict representing a JOBOBJECT_EXTENDED_LIMIT_INFORMATION struct
JobObjectEndOfJobTimeInformation | dict representing a JOBOBJECT_END_OF_JOB_TIME_INFORMATION struct
JobObjectBasicUIRestrictions | dict representing a JOBOBJECT_BASIC_UI_RESTRICTIONS struct
JobObjectJobSetInformation | Input is a JOBOBJECT_JOBSET_INFORMATION dict - Not implemented
JobObjectSecurityLimitInformation | Input is a JOBOBJECT_SECURITY_LIMIT_INFORMATION dict - Not implemented
JobObjectAssociateCompletionPortInformation | Input is a JOBOBJECT_ASSOCIATE_COMPLETION_PORT dict - Not implemented


win32job.TerminateJobObject

TerminateJobObject(hJob, exitCode)

Terminates all processes currently associated with the job.

Parameters

hJob : PyHANDLE

exitCode : int


win32job.UserHandleGrantAccess

UserHandleGrantAccess(hUserHandle, hJob, grant)

Grants or denies access to a handle to a User object to a job that has a user-interface restriction.

Parameters

hUserHandle : PyHANDLE

hJob : PyHANDLE

grant : bool


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

Search for LZClose at msdn, google or google groups.


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

Search for LZCopy at msdn, google or google groups.


win32lz.GetExpandedName

string = GetExpandedName(Source)

Retrieves the original name of an expanded file,

Parameters

Source : str

Name of a compressed file

Win32 API References

Search for GetExpandedName at msdn, google or google groups.


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

Search for LZInit at msdn, google or google groups.


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

Search for LZOpenFile at msdn, google or google groups.


win32net

Module win32net

A module encapsulating the Windows Network API.

Methods

NetGetJoinInformation
Retrieves join status information for the specified computer.

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.

NetMessageNameAdd
Add a message alias for a computer

NetMessageNameDel
Removes a message alias

NetMessageNameEnum
List message aliases for a computer

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

NetServerComputerNameAdd
Adds an extra network name for a server

NetServerComputerNameDel
Deletes an emulated computer name created by win32net::PyNetServerComputerNameAdd

NetValidateName
Verify that computer/domain name is valid for given context

NetValidatePasswordPolicy
Allows an application to check password compliance against an application-provided account database.


win32net.NetFileClose

NetFileClose(servername, fileid)

Closes an open network resource on a server

Parameters

servername : string/PyUnicode

Name of server on which to operate, local machine assumed if None

fileid : int

Id of opened resource, as returned by win32net::NetFileEnum


win32net.NetFileEnum

(dict,...) = NetFileEnum(level, servername , basepath , username )

Lists remotely opened resources on a server

Parameters

level : int

Level of information, 2 or 3 supported

servername=None : string/PyUnicode

The name of the server for which to list open resources, local machine assumed if None

basepath=None : string/PyUnicode

If specified, limits returned list to files on given path

username=None : string/PyUnicode

User that opened resource, or None to list open files for all users

Return Value

Returns a sequence of dictionaries representing FILE_INFO_* structs, depending on level specified


win32net.NetFileGetInfo

dict = NetFileGetInfo(level, servername , fileid )

Returns information about an open network resource

Parameters

level : int

Level of information to return, 2 or 3 supported

servername : string/PyUnicode

Server on which resource is open, local machine assumed if None

fileid : int

Id of opened resource, as returned by win32net::NetFileEnum


win32net.NetGetAnyDCName

PyUnicode = NetGetAnyDCName(server, domain )

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

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

PyUnicode = NetGetDCName(server, domain )

Returns the name of the primary domain controller (PDC).

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

PyUnicode, int = NetGetJoinInformation()

Retrieves join status information for the specified computer.


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

Search for NetGroupAdd at msdn, google or google groups.


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

Search for NetGroupAddUser at msdn, google or google groups.


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

Search for NetGroupDel at msdn, google or google groups.


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

Search for NetGroupDelUser at msdn, google or google groups.


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

Search for NetGroupEnum at msdn, google or google groups.

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 new "resume handle". The first time you call this function, you should pass zero for the resume handle. If more data is available than what was returned, a new non-zero resume handle will be returned, which can be used to call the function again to fetch more data. This process may repeat, each time with a new resume handle, until zero is returned for the new handle, indicating all the data has been read.


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

Search for NetGroupGetInfo at msdn, google or google groups.

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

Search for NetGroupGetUsers at msdn, google or google groups.

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 new "resume handle". The first time you call this function, you should pass zero for the resume handle. If more data is available than what was returned, a new non-zero resume handle will be returned, which can be used to call the function again to fetch more data. This process may repeat, each time with a new resume handle, until zero is returned for the new handle, indicating all the data has been read.


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

Search for NetGroupSetInfo at msdn, google or google groups.


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

Search for NetGroupSetUsers at msdn, google or google groups.


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

Search for NetLocalGroupAddMembers at msdn, google or google groups.


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

Search for NetLocalGroupDelMembers at msdn, google or google groups.


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

Search for NetLocalGroupGetMembers at msdn, google or google groups.

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 new "resume handle". The first time you call this function, you should pass zero for the resume handle. If more data is available than what was returned, a new non-zero resume handle will be returned, which can be used to call the function again to fetch more data. This process may repeat, each time with a new resume handle, until zero is returned for the new handle, indicating all the data has been read.


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

Search for NetLocalGroupSetMembers at msdn, google or google groups.


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

Search for NetMessageBufferSend at msdn, google or google groups.


win32net.NetMessageNameAdd

NetMessageNameAdd(server, msgname)

Adds a message alias for specified machine

Parameters

server : str/unicode

Name of server on which to execute - leading backslashes required on NT - local machine used if None

msgname : str/unicode

Message alias to add, 15 characters max


win32net.NetMessageNameDel

NetMessageNameDel(server, msgname)

Removes a message alias for specified machine

Parameters

server : str/unicode

Name of server on which to execute - leading backslashes required on NT - local machine used if None

msgname : str/unicode

Message alias to delete for specified machine


win32net.NetMessageNameEnum

NetMessageNameEnum(Server)

Lists aliases for a computer

Parameters

Server : str/unicode

Name of server on which to execute - leading backslashes required on NT - local machine used if None


win32net.NetServerComputerNameAdd

NetServerComputerNameAdd(ServerName, EmulatedDomainName, EmulatedServerName)

Adds an additional network name for a server

Parameters

ServerName : string/PyUnicode

Name of server that will receive additional name

EmulatedDomainName : string/PyUnicode

Domain under which to add the new server name, can be None

EmulatedServerName : string/PyUnicode

New network name that server will respond to

Return Value

Returns none on success


win32net.NetServerComputerNameDel

NetServerComputerNameDel(ServerName, EmulatedServerName)

Removes a network name added by win32net::NetServerComputerNameAdd

Parameters

ServerName : string/PyUnicode

Name of server on which to operate

EmulatedServerName : string/PyUnicode

Network name to be removed

Return Value

Returns none on success


win32net.NetServerDiskEnum

list = NetServerDiskEnum(server, level )

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.

Win32 API References

Search for NetServerDiskEnum at msdn, google or google groups.

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

Search for NetServerEnum at msdn, google or google groups.

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 new "resume handle". The first time you call this function, you should pass zero for the resume handle. If more data is available than what was returned, a new non-zero resume handle will be returned, which can be used to call the function again to fetch more data. This process may repeat, each time with a new resume handle, until zero is returned for the new handle, indicating all the data has been read.


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

Search for NetServerGetInfo at msdn, google or google groups.

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

Search for NetServerSetInfo at msdn, google or google groups.


win32net.NetSessionDel

NetSessionDel(server, client, username)

Disconnects network connections on a server

Parameters

server : string/PyUnicode

The name of the server on which to operate, local machine assumed if None or blank

client=None : string/PyUnicode

Name of client computer, or None

username=None : string/PyUnicode

User name, or None for all connected users

Return Value

Returns None on success


win32net.NetSessionEnum

(dict,...) = NetSessionEnum(level, server , client , username )

Returns network sessions for a server, limited to single client and/or user if specified.

Parameters

level : int

Level of information requested, currently accepts 0, 1, 2, 10, and 502

server=None : string/PyUnicode

The name of the server for which to list sessions, local machine assumed if None

client=None : string/PyUnicode

Name of client computer, or None to list all computer sessions

username=None : string/PyUnicode

User name, or None to list all connected users

Return Value

Returns a sequence of dictionaries representing SESSION_INFO_* structs, depending on level specified


win32net.NetSessionGetInfo

dict = NetSessionGetInfo(level, server , client , username )

Returns information for a network session from specified client

Parameters

level : int

Level of information requested, currently accepts 0, 1, 2, 10, and 502

server : string/PyUnicode

The name of the server on which to operate, None or blank assumes local machine

client : string/PyUnicode

Name of client computer

username : string/PyUnicode

User that established session

Return Value

Returns a dictionary representing a SESSION_INFO_* struct, depending on level specified


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

Search for NetShareAdd at msdn, google or google groups.


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

Search for NetShareCheck at msdn, google or google groups.

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

Search for NetShareDel at msdn, google or google groups.


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

Search for NetShareEnum param 1 is not declared as const :-( at msdn, google or google groups.

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 new "resume handle". The first time you call this function, you should pass zero for the resume handle. If more data is available than what was returned, a new non-zero resume handle will be returned, which can be used to call the function again to fetch more data. This process may repeat, each time with a new resume handle, until zero is returned for the new handle, indicating all the data has been read.


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

Search for NetShareGetInfo at msdn, google or google groups.

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

Search for NetShareSetInfo at msdn, google or google groups.


win32net.NetStatisticsGet

dict = NetStatisticsGet(server, service , level , options )

Retrieves network statistics for specified service on specified machine

Parameters

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.

Return Value

The result is a dictionary representing a STAT_SERVER_0 or STAT_WORKSTATION_0 struct


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

Search for NetUseAdd at msdn, google or google groups.


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

Search for NetUseDel at msdn, google or google groups.


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

Search for NetUseEnum at msdn, google or google groups.

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 new "resume handle". The first time you call this function, you should pass zero for the resume handle. If more data is available than what was returned, a new non-zero resume handle will be returned, which can be used to call the function again to fetch more data. This process may repeat, each time with a new resume handle, until zero is returned for the new handle, indicating all the data has been read.


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

Search for NetUseGetInfo at msdn, google or google groups.

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

Search for NetUserAdd at msdn, google or google groups.


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

Search for NetUserChangePassword at msdn, google or google groups.


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

Search for NetUserDel at msdn, google or google groups.


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

Search for NetUserEnum at msdn, google or google groups.

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 new "resume handle". The first time you call this function, you should pass zero for the resume handle. If more data is available than what was returned, a new non-zero resume handle will be returned, which can be used to call the function again to fetch more data. This process may repeat, each time with a new resume handle, until zero is returned for the new handle, indicating all the data has been read.


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

Search for NetUserGetInfo at msdn, google or google groups.

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

Search for NetUserModalsGet at msdn, google or google groups.

Return Value

The result will be a dictionary in one of the PyUSER_MODALS_INFO_* formats, depending on the level parameter.


win32net.NetUserModalsSet

NetUserModalsSet(server, level, data)

Sets global user parameters 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

Search for NetUserModalsSet at msdn, google or google groups.


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

Search for NetUserSetInfo at msdn, google or google groups.


win32net.NetValidateName

NetValidateName(Server, Name, NameType, Account, Password)

Checks that domain/machine/workgroup name is valid for given context

Parameters

Server : string/PyUnicode

Name of server on which to execute (None or blank uses local)

Name : string/PyUnicode

Machine, domain, or workgroup name to validate

NameType : int

Type of name to validate - from NETSETUP_NAME_TYPE enum (win32net.NetSetup*)

Account=None : string/PyUnicode

Account name to use while validating, current security context is used if not specified

Password=None : string/PyUnicode

Password for Account

Comments

If Account and Password aren't passed, current logon credentials are used

Will raise NotImplementedError if not available on this platform.

Return Value

Returns none if valid, exception if not


win32net.NetValidatePasswordPolicy

NetValidatePasswordPolicy(Server, Qualifier, ValidationType, arg)

Allows an application to check password compliance against an application-provided account database and verify that passwords meet the complexity, aging, minimum length, and history reuse requirements of a password policy.

Parameters

Server : string/PyUnicode

Name of server on which to execute (None or blank uses local)

Qualifier : None

Reserved, must be None

ValidationType : int

The type of password validation to perform

arg : dict/tuple

Depends on the ValidationType param - either a PyNET_VALIDATE_AUTHENTICATION_INPUT_ARG, PyNET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG or PyNET_VALIDATE_PASSWORD_RESET_INPUT_ARG tuple or dict.

Comments

Will raise NotImplementedError if not available on this platform, or raise win32net.error if the function fails.

Return Value

Returns a tuple of (PyNET_VALIDATE_PERSISTED_FIELDS, int) with the integer being the ValidationResult.


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

Search for NetWkstaGetInfo at msdn, google or google groups.

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

Search for NetWkstaSetInfo at msdn, google or google groups.


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

Search for NetWkstaTransportAdd at msdn, google or google groups.


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

Search for NetWkstaTransportDel at msdn, google or google groups.


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

Search for NetWkstaTransportEnum at msdn, google or google groups.

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 new "resume handle". The first time you call this function, you should pass zero for the resume handle. If more data is available than what was returned, a new non-zero resume handle will be returned, which can be used to call the function again to fetch more data. This process may repeat, each time with a new resume handle, until zero is returned for the new handle, indicating all the data has been read.


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

Search for NetWkstaUserEnum at msdn, google or google groups.

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 new "resume handle". The first time you call this function, you should pass zero for the resume handle. If more data is available than what was returned, a new non-zero resume handle will be returned, which can be used to call the function again to fetch more data. This process may repeat, each time with a new resume handle, until zero is returned for the new handle, indicating all the data has been read.


win32pdh

Module win32pdh

A module, encapsulating the Windows Performance Data Helpers API

Methods

AddCounter
Adds a new counter

AddEnglishCounter
Adds a counter to a query by its English name

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

GetFormattedCounterValueArray
Retrieves an array of formatted counter values

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

int = AddEnglishCounter(hQuery, path , userData )

Adds a counter to a query by its English name

Parameters

hQuery : int

Handle to an open query.

path : string

Full counter path with standard English names.

userData=0 : int

User data associated with the counter.

Comments

Available on Vista and later

See also win32pdh::RemoveCounter

Return Value

Returns a handle to the counter


win32pdh.BrowseCounters

string = BrowseCounters(Flags, hWndOwner , CallBack , DefaultDetailLevel , DialogBoxCaption , InitialPath , DataSource , ReturnMultiple , CallBackArg )

Displays the counter browsing dialog box so that the user can select the counters to be returned to the caller.

Parameters

Flags : (boolean, ...)

Sequence of boolean flags, or None. All default to False. (bIncludeInstanceIndex, bSingleCounterPerAdd, bSingleCounterPerDialog, bLocalCountersOnly, bWildCardInstances, bHideDetailBox, bInitializePath, bDisableMachineSelection, bIncludeCostlyObjects, bShowObjectBrowser)

hWndOwner : PyHANDLE

Parent for the dialog.

CallBack : object

A callable object to function as the callback.

DefaultDetailLevel : 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.

DialogBoxCaption=None : string

The dialog caption, or None for default.

InitialPath=None : str

Counter to be selected initially, or None for default

DataSource=None : str

Name of a performance log file, or None for live counters

ReturnMultiple=False : boolean

Return all selected counter paths as a sequence of strings. Previously, this function only returned a single path even when multiple counters were selected.

CallBackArg=None : object

Extra argument to be passed to callback function. For backward compatibility, the callback will only receive a single argument if this is not given.


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(DataSource, machine , object , detailLevel , flags )

Enumerates an object's items

Parameters

DataSource : string

Path of a performance log file, or None for machine counters

machine : string

The machine to use, or None

object : string

The type of object

detailLevel : int

The level of data required, win32pdh.PERF_DETAIL_*

flags=0 : int

Flags - must be zero


win32pdh.EnumObjects

list = EnumObjects(DataSource, machine , detailLevel , refresh )

Enumerates objects

Parameters

DataSource : string

Path to a performance log file, or None for machine counters

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

The API function leaks memory on Windows XP.


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=0 : int

PDH_PATH_WBEM_RESULT, PDH_PATH_WBEM_INPUT, or 0


win32pdh.OpenQuery

int = OpenQuery(DataSource, userData )

Opens a new query

Parameters

DataSource=None : str

Name of a performaance log file, or None for live data

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

TransactNamedPipe
Combines the functions that write a message to and read a message from the specified named pipe into a single network operation.

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

GetNamedPipeInfo
Returns pipe's flags, buffer sizes, and max instances

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.

GetNamedPipeClientProcessId
Returns the process id of client that is connected to a named pipe

GetNamedPipeServerProcessId
Returns pid of server process that created a named pipe

GetNamedPipeClientSessionId
Returns the session id of client that is connected to a named pipe

GetNamedPipeServerSessionId
Returns session id of server process that created a named pipe

popen
Version of popen that works in a GUI

Comments

Not implemented in py3k.

Methods

popen2
Variation on popen - returns 2 pipes

Not implemented in py3k.

Methods

popen3
Variation on popen - returns 3 pipes

Not implemented in py3k.

Methods

popen4
Like popen2, but stdout/err are combined.

Not implemented in py3k.


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 zero if the function succeeds. If the function fails, GetLastError() is called, and if the result is ERROR_IO_PENDING or ERROR_PIPE_CONNECTED (common when passing an overlapped object), this value is returned. All other error values raise a win32 exception (from which the error code can be extracted)


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

Specifies security and inheritance for the pipe

nSize : int

Buffer size for pipe. Use 0 for default size.

mode : int

O_TEXT or O_BINARY


win32pipe.GetNamedPipeClientProcessId

int = GetNamedPipeClientProcessId(hPipe)

Returns the process id of client that is connected to a named pipe

Parameters

hPipe : PyHANDLE

The handle to the pipe.

Comments

Requires Vista or later


win32pipe.GetNamedPipeClientSessionId

int = GetNamedPipeClientSessionId(hPipe)

Returns the session id of client that is connected to a named pipe

Parameters

hPipe : PyHANDLE

The handle to the pipe.

Comments

Requires Vista or later


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

(int, int, int, int) = GetNamedPipeInfo(hNamedPipe)

Returns pipe's flags, buffer sizes, and max instances

Parameters

hNamedPipe : PyHANDLE

Handle to a named pipe


win32pipe.GetNamedPipeServerProcessId

int = GetNamedPipeServerProcessId(hPipe)

Returns pid of server process that created a named pipe

Parameters

hPipe : PyHANDLE

The handle to the pipe.

Comments

Requires Vista or later


win32pipe.GetNamedPipeServerSessionId

int = GetNamedPipeServerSessionId(hPipe)

Returns session id of server process that created a named pipe

Parameters

hPipe : PyHANDLE

The handle to the pipe.

Comments

Requires Vista or later


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/None

The pipe read mode.

MaxCollectionCount : int/None

Maximum bytes collected before transmission to the server.

CollectDataTimeout : int/None

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


win32pipe.TransactNamedPipe

string/buffer = TransactNamedPipe(pipeName, writeData , buffer/bufSize , overlapped )

Combines the functions that write a message to and read a message from the specified named pipe into a single network operation.

Parameters

pipeName : PyUNICODE

The name of the pipe.

writeData : string/buffer

The data to write to the pipe.

buffer/bufSize : PyOVERLAPPEDReadBuffer/int

Size of the buffer to create for the result, or a buffer to fill with the result. If a buffer object and overlapped is passed, the result is the buffer itself. If a buffer but no overlapped is passed, the result is a new string object, built from the buffer, but with a length that reflects the data actually read.

overlapped=None : PyOVERLAPPED

An overlapped structure or None

Comments

This function is modelled on win32file::ReadFile - for overlapped operations you are expected to provide a buffer which will be filled asynchronously.


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 printing API.

Methods

OpenPrinter
Retrieves a handle to a printer.

GetPrinter
Retrieves information about a printer

SetPrinter
Changes printer configuration and status

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.

GetDefaultPrinterW
Returns the default printer.

SetDefaultPrinter
Sets the default printer.

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

AbortPrinter
Deletes spool file for printer

StartPagePrinter
Notifies the print spooler that a page is to be printed on specified printer

EndPagePrinter
Ends a page in a print job

StartDoc
Starts spooling a print job on a printer device context

EndDoc
Stops spooling a print job on a printer device context

AbortDoc
Cancels print job on a printer device context

StartPage
Starts a page on a printer device context

EndPage
Ends a page on a printer device context

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.

DocumentProperties
Changes printer configuration

EnumPrintProcessors
List printer providers for specified server and environment

EnumPrintProcessorDatatypes
Lists data types that specified print provider supports

EnumPrinterDrivers
Lists installed printer drivers

EnumForms
Lists forms for a printer

AddForm
Adds a form for a printer

DeleteForm
Deletes a form defined for a printer

GetForm
Retrieves information about a defined form

SetForm
Change information for a form

AddJob
Adds a job to be spooled to a printer queue

ScheduleJob
Schedules a spooled job to be printed

DeviceCapabilities
Queries a printer for its capabilities

GetDeviceCaps
Retrieves device-specific parameters and settings

EnumMonitors
Lists installed printer port monitors

EnumPorts
Lists printer ports on a server

GetPrintProcessorDirectory
Returns the directory where print processor files reside

GetPrinterDriverDirectory
Returns the directory where printer drivers are installed

AddPrinter
Adds a new printer on a server

DeletePrinter
Deletes an existing printer

DeletePrinterDriver
Deletes the specified driver from a server

DeletePrinterDriverEx
Deletes a printer driver and associated files

FlushPrinter
Clears printer from error state if WritePrinter fails


win32print.AbortDoc

AbortDoc(hdc)

Cancels a print job

Parameters

hdc : PyHANDLE

Printer device context handle as returned by win32gui::CreateDC


win32print.AbortPrinter

AbortPrinter(hPrinter)

Deletes spool file for a printer

Parameters

hPrinter : PyPrinterHANDLE

Handle to printer as returned by win32print::OpenPrinter


win32print.AddForm

AddForm(hprinter, Form)

Adds a form for a printer

Parameters

hprinter : PyPrinterHANDLE

Printer handle as returned by win32print::OpenPrinter

Form : dict

FORM_INFO_1 dictionary

Return Value

Returns None on success, throws an exception otherwise


win32print.AddJob

AddJob(hprinter)

Add a job to be spooled to a printer queue

Parameters

hprinter : PyPrinterHANDLE

Printer handle as returned by win32print::OpenPrinter

Return Value

Returns the file name to which data should be written and the job id of the new job


win32print.AddPrinter

PyPrinterHANDLE = AddPrinter(Name, Level , pPrinter )

Installs a printer on a server

Parameters

Name : string

Name of server on which to install printer, None indicates local machine

Level : int

Level of data contained in pPrinter, only level 2 currently supported

pPrinter : dict

PRINTER_INFO_2 dict as returned by win32print::GetPrinter

Comments

pPrinterName, pPortName, pDriverName, and pPrintProcessor are required

Return Value

Returns a handle to the new printer


win32print.AddPrinterConnection

None = AddPrinterConnection(printer)

Connects to remote printer

Parameters

printer : string

printer to connect to (eg: \\server\\printer).


win32print.ClosePrinter

ClosePrinter(hPrinter)

Closes a handle to a printer.

Parameters

hPrinter : PyPrinterHANDLE

handle to printer object


win32print.DeleteForm

DeleteForm(hprinter, FormName)

Deletes a form defined for a printer

Parameters

hprinter : PyPrinterHANDLE

Printer handle as returned by win32print::OpenPrinter

FormName : PyUnicode

Name of form to be deleted

Return Value

Returns None on success, throws an exception otherwise


win32print.DeletePrinter

DeletePrinter(hPrinter)

Deletes an existing printer

Parameters

hPrinter : PyPrinterHANDLE

Handle to printer as returned by win32print::OpenPrinter or win32print::AddPrinter

Comments

Printer handle must be opened for PRINTER_ACCESS_ADMINISTER If there are any pending print jobs for the printer, actual deletion does not happen until they are done


win32print.DeletePrinterConnection

None = DeletePrinterConnection(printer)

Removes connection to remote printer

Parameters

printer : string

printer to disconnect from (eg: \\server\\printer).


win32print.DeletePrinterDriver

DeletePrinterDriver(Server, Environment, DriverName)

Removes the specified printer driver from a server

Parameters

Server : string/PyUnicode

Name of print server, use None for local machine

Environment : string/PyUnicode

Environment - eg 'Windows NT x86' - use None for current client environment

DriverName : string/PyUnicode

Name of driver to remove

Comments

Does not delete associated driver files - use win32print::DeletePrinterDriverEx if this is required


win32print.DeletePrinterDriverEx

DeletePrinterDriverEx(Server, Environment, DriverName, DeleteFlag, VersionFlag)

Deletes a printer driver and its associated files

Parameters

Server : string/PyUnicode

Name of print server, use None for local machine

Environment : string/PyUnicode

Environment - eg 'Windows NT x86' - use None for current client environment

DriverName : string/PyUnicode

Name of driver to remove

DeleteFlag : int

Combination of DPD_DELETE_SPECIFIC_VERSION, DPD_DELETE_UNUSED_FILES, and DPD_DELETE_ALL_FILES

VersionFlag : int

Can be 0,1,2, or 3. Only used if DPD_DELETE_SPECIFIC_VERSION is specified in DeleteFlag


win32print.DeviceCapabilities

DeviceCapabilities(Device, Port, Capability, DEVMODE)

Queries a printer for its capabilities

Parameters

Device : string

Name of printer

Port : string

Port that printer is using

Capability : int

Type of capability to return - DC_* constant

DEVMODE=None : PyDEVMODE

If present, function returns values from it, otherwise the printer defaults are used

Capability | Returned value
DC_MINEXTENT | Dictionary containing minimum paper width and height
DC_MAXEXTENT | Dictionary containing maximum paper width and height
DC_ENUMRESOLUTIONS | Sequence of dictionaries containing x and y resolutions in DPI
DC_PAPERS | Returns a sequence of ints, DMPAPER_* constants
DC_BINS | Returns a sequence of ints, DMBIN_* constants
DC_NUP | Sequence of ints containing supported logical page per physical page settings
DC_MEDIATYPES | Sequence of ints, DMMEDIA_* constants
DC_PAPERNAMES | Sequence of strings
DC_MEDIATYPENAMES | Sequence of strings
DC_MEDIAREADY | Sequence of strings
DC_FILEDEPENDENCIES | Sequence of strings
DC_PERSONALITY | Sequence of strings
DC_BINNAMES | Sequence of strings
DC_PAPERSIZE | Sequence of dicts containing paper sizes, in 1/10 millimeter units
All others | Output is an int


win32print.DocumentProperties

int = DocumentProperties(HWnd, hPrinter , DeviceName , DevModeOutput , DevModeInput , Mode )

Changes printer configuration for a printer

Parameters

HWnd : PyHANDLE

Parent window handle to use if DM_IN_PROMPT is specified to display printer dialog

hPrinter : PyPrinterHANDLE

Printer handle as returned by win32print::OpenPrinter

DeviceName : string

Name of printer

DevModeOutput : PyDEVMODE

PyDEVMODE object that receives modified info, can be None if DM_OUT_BUFFER not specified

DevModeInput : PyDEVMODE

PyDEVMODE that specifies initial configuration, can be None if DM_IN_BUFFER not specified

Mode : int

A combination of DM_IN_BUFFER, DM_OUT_BUFFER, and DM_IN_PROMPT - pass 0 to retrieve driver data size

Return Value

If DM_IN_PROMPT is specified, returned value will be IDOK or IDCANCEL


win32print.EndDoc

EndDoc(hdc)

Stops spooling a print job on a printer device context

Parameters

hdc : PyHANDLE

Printer device context handle as returned by win32gui::CreateDC


win32print.EndDocPrinter

None = EndDocPrinter(hPrinter)

The EndDocPrinter function ends a print job for the specified printer. To be used after using WritePrinter.

Parameters

hPrinter : PyPrinterHANDLE

handle to printer (from win32print::OpenPrinter)


win32print.EndPage

EndPage(hdc)

Ends a page on a printer device context

Parameters

hdc : PyHANDLE

Printer device context handle as returned by win32gui::CreateDC


win32print.EndPagePrinter

EndPagePrinter(hprinter)

Ends a page in a print job

Parameters

hprinter : PyPrinterHANDLE

Printer handle as returned by win32print::OpenPrinter


win32print.EnumForms

(FORM_INFO_1,...) = EnumForms(hprinter)

Lists forms for a printer

Parameters

hprinter : PyPrinterHANDLE

Printer handle as returned by win32print::OpenPrinter

Return Value

Returns a sequence of dictionaries representing FORM_INFO_1 structures


win32print.EnumJobs

tuple = EnumJobs(hPrinter, FirstJob , NoJobs , Level )

Enumerates print jobs on specified printer.

Parameters

hPrinter : PyPrinterHANDLE

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 (JOB_INFO_1, JOB_INFO_2, JOB_INFO_3 supported).

Return Value

Returns a sequence of dictionaries representing JOB_INFO_* structures, depending on level


win32print.EnumMonitors

(dict,...) = EnumMonitors(Name, Level )

Lists installed printer port monitors

Parameters

Name : str/PyUnicode

Name of server, use None for local machine

Level : int

Level of information to return, 1 and 2 supported

Return Value

Returns a sequence of dicts representing MONITOR_INFO_* structures depending on level


win32print.EnumPorts

(dict,...) = EnumPorts(Name, Level )

Lists printer port on a server

Parameters

Name : str/PyUnicode

Name of server, use None for local machine

Level : int

Level of information to return, 1 and 2 supported

Return Value

Returns a sequence of dicts representing PORT_INFO_* structures depending on level


win32print.EnumPrintProcessorDatatypes

(PyUnicode,...) = EnumPrintProcessorDatatypes(ServerName, PrintProcessorName )

List data types that specified print provider recognizes

Parameters

ServerName : string/PyUnicode

Name of print server, use None for local machine

PrintProcessorName : string/PyUnicode

Name of print processor


win32print.EnumPrintProcessors

(PyUnicode,...) = EnumPrintProcessors(Server, Environment )

List printer processors for specified server and environment

Parameters

Server=None : string/PyUnicode

Name of print server, use None for local machine

Environment=None : string/PyUnicode

Environment - eg 'Windows NT x86' - use None for current client environment


win32print.EnumPrinterDrivers

(dict,...) = EnumPrinterDrivers(Server, Environment , Level )

Lists installed printer drivers

Parameters

Server=None : string/unicode

Name of print server, use None for local machine

Environment=None : string/unicode

Environment - eg 'Windows NT x86' - use None for current client environment

Level=1 : int

Level of information to return, 1-6 (not all levels are supported on all platforms)

Comments

On Win2k and up, 'all' can be passed for environment

Return Value

Returns a sequence of dictionaries representing DRIVER_INFO_* structures


win32print.EnumPrinters

tuple = EnumPrinters(flags, name , level )

Enumerates printers, print servers, domains and print providers.

Parameters

flags : int

types of printer objects to enumerate (combination of PRINTER_ENUM_* constants).

name=None : string

name of printer object.

level=1 : int

type of printer info structure (Levels 1,2,4,5 supported)

Comments

Use Flags=PRINTER_ENUM_NAME, Name=None, Level=1 to enumerate print providers.
Use Flags=PRINTER_ENUM_NAME, Name=\\servername, Level=2 or 5 to list printers on another server.
See MSDN docs for EnumPrinters for other specific combinations

Return Value

Level 1 returns a tuple of tuples for backward compatibility. Each individual element is a tuple of (flags, description, name, comment)
All other levels return a tuple of dictionaries representing PRINTER_INFO_* structures


win32print.FlushPrinter

int = FlushPrinter(Printer, Buf , Sleep )

Clears printer from error state if WritePrinter fails

Parameters

Printer : PyPrinterHANDLE

Handle to a printer

Buf : str

Data to be sent to printer

Sleep : int

Number of milliseconds to suspend printer

Return Value

Returns the number of bytes actually written to the printer


win32print.GetDefaultPrinter

string = GetDefaultPrinter()

Returns the default printer.


win32print.GetDefaultPrinterW

PyUnicode = GetDefaultPrinterW()

Returns the default printer.

Comments

Unlike win32print::GetDefaultPrinter, this method calls the GetDefaultPrinter API function.


win32print.GetDeviceCaps

int = GetDeviceCaps(hdc, Index )

Retrieves device-specific parameters and settings

Parameters

hdc : PyHANDLE

Handle to a printer or display device context

Index : int

The capability to return. See MSDN for valid values.

Comments

Can also be used for Display DCs in addition to printer DCs

Win32 API References

Search for GetDeviceCaps at msdn, google or google groups.


win32print.GetForm

GetForm(hprinter, FormName)

Retrieves information about a form defined for a printer

Parameters

hprinter : PyPrinterHANDLE

Printer handle as returned by win32print::OpenPrinter

FormName : PyUnicode

Name of form for which to retrieve info

Return Value

Returns a FORM_INFO_1 dict


win32print.GetJob

dictionary = GetJob(hPrinter, JobID , Level )

Returns dictionary of information about a specified print job.

Parameters

hPrinter : PyPrinterHANDLE

Handle to a printer as returned by win32print::OpenPrinter.

JobID : int

Job Identifier.

Level=1 : int

Level of information to return (JOB_INFO_1, JOB_INFO_2, JOB_INFO_3 supported).

Return Value

Returns a dict representing a JOB_INFO_* struct, depending on level


win32print.GetPrintProcessorDirectory

PyUnicode = GetPrintProcessorDirectory(Name, Environment )

Returns the directory where print processor files reside

Parameters

Name : str/PyUnicode

Name of server, use None for local machine

Environment : str/PyUnicode

Environment - eg 'Windows NT x86' - use None for current client environment


win32print.GetPrinter

dict = GetPrinter(hPrinter, Level )

Retrieves information about a printer

Parameters

hPrinter : PyPrinterHANDLE

handle to printer object as returned by win32print::OpenPrinter

Level=2 : int

Level of data returned (1,2,3,4,5,7,8,9)

Comments

Original implementation used level 2 only and returned a tuple Pass single arg as indicator to use old behaviour for backward compatibility

Return Value

Returns a dictionary containing PRINTER_INFO_* data for level, or returns a tuple of PRINTER_INFO_2 data if no level is passed in.


win32print.GetPrinterDriverDirectory

PyUnicode = GetPrinterDriverDirectory(Name, Environment )

Returns the directory where printer drivers are installed

Parameters

Name : str/PyUnicode

Name of server, use None for local machine

Environment : str/PyUnicode

Environment - eg 'Windows NT x86' - use None for current client environment


win32print.OpenPrinter

PyPrinterHANDLE = OpenPrinter(printer, Defaults )

Retrieves a handle to a printer.

Parameters

printer : string

Printer or print server name. Use None to open local print server.

Defaults=None : dict

PRINTER_DEFAULTS dict, or None


win32print.ScheduleJob

ScheduleJob(hprinter, JobId)

Schedules a spooled job to be printed

Parameters

hprinter : PyPrinterHANDLE

Printer handle as returned by win32print::OpenPrinter

JobId : int

Job Id as returned by win32print::AddJob


win32print.SetDefaultPrinter

None = SetDefaultPrinter(printer)

Sets the default printer.

Parameters

printer : string

printer to set as default

Comments

This function uses the pre-win2k method of WriteProfileString rather than the SetDefaultPrinter API function


win32print.SetDefaultPrinterW

None = SetDefaultPrinterW(Printer)

Sets the default printer

Parameters

Printer : PyUnicode

Name of printer, can be None to use first available printer

Comments

Unlike win32print::SetDefaultPrinter, this method calls the SetDefaultPrinter API function.


win32print.SetForm

SetForm(hprinter, FormName, Form)

Change information for a form

Parameters

hprinter : PyPrinterHANDLE

Printer handle as returned by win32print::OpenPrinter

FormName : PyUnicode

Name of form

Form : dict

FORM_INFO_1 dictionary

Return Value

Returns None on success


win32print.SetJob

None = SetJob(hPrinter, JobID , Level , JobInfo , Command )

Pause, cancel, resume, set priority levels on a print job.

Parameters

hPrinter : PyPrinterHANDLE

Handle of printer.

JobID : int

Job Identifier.

Level : int

Level of information in JobInfo dict (0, 1, 2, and 3 are supported).

JobInfo : dict

JOB_INFO_* Dictionary as returned by win32print::GetJob or win32print::EnumJobs (can be None if Level is 0).

Command : int

Job command value (JOB_CONTROL_*).

Comments

If printer is not opened with at least PRINTER_ACCESS_ADMINISTER access, 'Position' member of JOB_INFO_1 and JOB_INFO_2 must be set to JOB_POSITION_UNSPECIFIED


win32print.SetPrinter

SetPrinter(hPrinter, Level, pPrinter, Command)

Change printer configuration and status

Parameters

hPrinter : PyPrinterHANDLE

Printer handle as returned by win32print::OpenPrinter

Level : int

Level of data contained in pPrinter

pPrinter : dict

PRINTER_INFO_* dict as returned by win32print::GetPrinter, can be None if level is 0

Command : int

Command to send to printer - one of the PRINTER_CONTROL_* constants, or 0

Comments

If Level is 0 and Command is PRINTER_CONTROL_SET_STATUS, pPrinter should be an integer, and is interpreted as the new printer status to set (one of the PRINTER_STATUS_* constants).


win32print.StartDoc

int = StartDoc(hdc, docinfo )

Starts spooling a print job on a printer device context

Parameters

hdc : PyHANDLE

Printer device context handle as returned by win32gui::CreateDC

docinfo : tuple

DOCINFO tuple specifying print job parameters

Return Value

On success, returns the job id of the print job


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 : PyPrinterHANDLE

handle to printer (from win32print::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.StartPage

StartPage(hdc)

Starts a page on a printer device context

Parameters

hdc : PyHANDLE

Printer device context handle as returned by win32gui::CreateDC


win32print.StartPagePrinter

StartPagePrinter(hprinter)

Notifies the print spooler that a page is to be printed on specified printer

Parameters

hprinter : PyPrinterHANDLE

Printer handle as returned by win32print::OpenPrinter


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.

Parameters

hprinter : PyPrinterHANDLE

Handle to printer as returned by win32print::OpenPrinter.

buf : string

String or buffer containing data to send to printer. Embedded NULL bytes are allowed.

Return Value

Returns number of bytes written to printer.


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

CreateRemoteThread
creates a thread that runs in the virtual address space of another process.

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.

GetCurrentProcess
Retrieves a pseudo handle for the current process.

GetProcessVersion
Obtains the major and minor version numbers of the system on which a specified process expects to run.

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

GetProcessPriorityBoost
Determines if dynamic priority adjustment is enabled for a process

SetProcessPriorityBoost
Enables or disables dynamic priority adjustment for a process

GetThreadPriorityBoost
Determines if dynamic priority adjustment is enabled for a thread

SetThreadPriorityBoost
Enables or disables dynamic priority adjustment for a thread

GetThreadIOPendingFlag
Determines if thread has any outstanding IO requests

GetThreadTimes
Returns a thread's time statistics

GetProcessId
Returns the Pid for a process handle

SetPriorityClass

AttachThreadInput
Attaches or detaches the input of two threads

SetThreadIdealProcessor
Used to specify a preferred processor for a thread. The system schedules threads on their preferred processors whenever possible.

GetProcessAffinityMask
Gets a processor affinity mask for a specified process

SetProcessAffinityMask
Sets a processor affinity mask for a specified process.

SetThreadAffinityMask
Sets a processor affinity mask for a specified thread.

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

EnumProcesses
Returns Pids for currently running processes

EnumProcessModules
Lists loaded modules for a process handle

EnumProcessModulesEx
Lists 32 or 64-bit modules load by a process

GetModuleFileNameEx
Return name of module loaded by another process (uses process handle, not pid)

GetProcessMemoryInfo
Returns process memory statistics as a dict representing a PROCESS_MEMORY_COUNTERS struct

GetProcessTimes
Retrieve time statics for a process by handle. (KernelTime and UserTime in 100 nanosecond units)

GetProcessIoCounters
Return I/O statistics for a process as a dictionary representing an IO_COUNTERS struct.

GetProcessWindowStation
Returns a handle to the window station for the calling process

GetProcessWorkingSetSize
Returns min and max working set sizes for a process by handle

SetProcessWorkingSetSize
Sets minimum and maximum working set sizes for a process

GetProcessShutdownParameters
Retrieves shutdown priority and flags for current process

SetProcessShutdownParameters
Sets shutdown priority and flags for current process

GetGuiResources
Returns the number of GDI or user object handles held by a process

IsWow64Process
Determines whether the specified process is running under WOW64.


win32process.AttachThreadInput

AttachThreadInput(idAttach, idAttachTo, Attach)

Attaches or detaches the input of two threads

Parameters

idAttach : int

The id of a thread

idAttachTo : int

The id of the thread to which it will be attached

Attach : bool

Indicates whether thread should be attached or detached


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

PyHANDLE, int = CreateRemoteThread(hprocess, sa , stackSize , entryPoint , Parameter , flags )

creates a thread that runs in the virtual address space of another process.

Parameters

hprocess : PyHANDLE

The handle to the remote process.

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's address.

Parameter : int

Arg passed to the function in the form of a void pointer

flags : int

Return Value

The result is a tuple of the thread handle and thread ID.


win32process.EnumProcessModules

(long,....) = EnumProcessModules(hProcess)

Lists loaded modules for a process handle

Parameters

hProcess : PyHANDLE

Process handle as returned by OpenProcess


win32process.EnumProcessModulesEx

(long,....) = EnumProcessModulesEx(hProcess, FilterFlag )

Lists 32 or 64-bit modules load by a process

Parameters

hProcess : PyHANDLE

Process handle as returned by OpenProcess

FilterFlag=LIST_MODULES_DEFAULT : int

Controls whether 32 or 64-bit modules are returned

Comments

Requires Vista or later


win32process.EnumProcesses

(long,....) = EnumProcesses()

Returns Pids for currently running processes


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

int = GetGuiResources(Process, Flags )

Returns the number of GDI or user object handles held by a process

Parameters

Process : PyHANDLE

Handle to a process as returned by win32api::OpenProcess

Flags : int

GR_GDIOBJECTS or GR_USEROBJECTS (from win32con)

Comments

Available on Win2k and up


win32process.GetModuleFileNameEx

PyUNICODE = GetModuleFileNameEx(hProcess, hModule )

Return name of module loaded by another process (uses process handle, not pid)

Parameters

hProcess : PyHANDLE

Process handle as returned by OpenProcess

hModule : PyHANDLE

Module handle


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 process

Parameters

hProcess : PyHANDLE

handle to the process of interest

Return Value

The result is a tuple of (process affinity mask, system affinity mask)


win32process.GetProcessId

int = GetProcessId(Process)

Returns the Pid for a process handle

Parameters

Process : PyHANDLE

Handle to a process


win32process.GetProcessIoCounters

dict = GetProcessIoCounters(hProcess)

Return I/O statistics for a process as a dictionary representing an IO_COUNTERS struct.

Parameters

hProcess : PyHANDLE

Process handle as returned by OpenProcess


win32process.GetProcessMemoryInfo

dict = GetProcessMemoryInfo(hProcess)

Returns process memory statistics as a dict representing a PROCESS_MEMORY_COUNTERS struct

Parameters

hProcess : PyHANDLE

Process handle as returned by OpenProcess


win32process.GetProcessPriorityBoost

bool = GetProcessPriorityBoost(Process)

Determines if dynamic priority adjustment is enabled for a process

Parameters

Process : PyHANDLE

Handle to a process


win32process.GetProcessShutdownParameters

int,int = GetProcessShutdownParameters()

Retrieves shutdown priority and flags for current process

Comments

Ranges are 000-0FF Reserved by windows, 100-1FF Last, 200-2FF Middle, 300-3FF First, 400-4FF Reserved by Windows


win32process.GetProcessTimes

dict = GetProcessTimes(hProcess)

Retrieve time statics for a process by handle. (KernelTime and UserTime in 100 nanosecond units)

Parameters

hProcess : PyHANDLE

Process handle as returned by OpenProcess


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

GetProcessWindowStation()

Returns a handle to the window station for the calling process


win32process.GetProcessWorkingSetSize

int,int = GetProcessWorkingSetSize(hProcess)

Returns min and max working set sizes for a process by handle

Parameters

hProcess : PyHANDLE

Process handle as returned by win32api::OpenProcess


win32process.GetStartupInfo

PySTARTUPINFO = GetStartupInfo()

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


win32process.GetThreadIOPendingFlag

bool = GetThreadIOPendingFlag(Thread)

Determines if thread has any outstanding IO requests

Parameters

Thread : PyHANDLE

Handle to a thread


win32process.GetThreadPriority

int = GetThreadPriority(handle)

Parameters

handle : PyHANDLE

handle to the thread


win32process.GetThreadPriorityBoost

bool = GetThreadPriorityBoost(Thread)

Determines if dynamic priority adjustment is enabled for a thread

Parameters

Thread : PyHANDLE

Handle to a thread


win32process.GetThreadTimes

dict = GetThreadTimes(Thread)

Returns a thread's time statistics

Parameters

Thread : PyHANDLE

Handle to a 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.IsWow64Process

bool = IsWow64Process(Process)

Determines whether the specified process is running under WOW64.

Parameters

Process=None : PyHANDLE

Handle to a process as returned by win32api::OpenProcess, win32api::GetCurrentProcess, etc, or will use the current process handle if None (the default) is passed.

Return Value

If this function is not provided by the operating system, the return value is False (ie, a NotImplemented exception will never be thrown). However, if the function exists but fails, a win32process.error exception is thrown as normal.


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(hProcess, mask)

Sets a processor affinity mask for a specified process.

Parameters

hProcess : PyHANDLE

handle to the process of interest

mask : int

a processor affinity mask

Comments

This function does not exist on all platforms.


win32process.SetProcessPriorityBoost

SetProcessPriorityBoost(Process, DisablePriorityBoost)

Enables or disables dynamic priority adjustment for a process

Parameters

Process : PyHANDLE

Handle to a process

DisablePriorityBoost : boolean

True to disable or False to enable


win32process.SetProcessShutdownParameters

SetProcessShutdownParameters(Level, Flags)

Sets shutdown priority and flags for current process

Parameters

Level : int

Priority, higher means earlier

Flags : int

Currently only SHUTDOWN_NORETRY valid

Comments

Ranges are 000-0FF Reserved by windows, 100-1FF Last, 200-2FF Middle, 300-3FF First, 400-4FF Reserved by windows


win32process.SetProcessWorkingSetSize

SetProcessWorkingSetSize(hProcess, MinimumWorkingSetSize, MaximumWorkingSetSize)

Sets minimum and maximum working set sizes for a process

Parameters

hProcess : PyHANDLE

Process handle as returned by OpenProcess

MinimumWorkingSetSize : int

Minimum number of bytes to keep in physical memory

MaximumWorkingSetSize : int

Maximum number of bytes to keep in physical memory

Comments

Set both min and max to -1 to have process swapped out completely


win32process.SetThreadAffinityMask

int = SetThreadAffinityMask(hThread, ThreadAffinityMask )

Sets a processor affinity mask for a specified thread.

Parameters

hThread : PyHANDLE

handle to the thread of interest

ThreadAffinityMask : int

a processor 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.SetThreadPriorityBoost

SetThreadPriorityBoost(Thread, DisablePriorityBoost)

Enables or disables dynamic priority adjustment for a thread

Parameters

Thread : PyHANDLE

Handle to a thread

DisablePriorityBoost : boolean

True to disable or False to enable


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

Can be CREATE_SUSPENDED so thread doesn't run immediately

Return Value

The result is a tuple of the thread handle and thread ID.


win32profile

Module win32profile

Wraps functions for dealing with user profiles

Methods

CreateEnvironmentBlock
Retrieves environment variables for a user

DeleteProfile
Removes a user's profile

ExpandEnvironmentStringsForUser
Replaces environment variables in a string with per-user values

GetAllUsersProfileDirectory
Retrieve All Users profile directory

GetDefaultUserProfileDirectory
Retrieve profile path for Default user

GetEnvironmentStrings
Retrieves environment variables for current process

GetProfilesDirectory
Retrieves directory where user profiles are stored

GetProfileType
Returns type of current user's profile

GetUserProfileDirectory
Returns profile directory for a logon token

LoadUserProfile
Load user settings for a login token

UnloadUserProfile
Unload profile loaded by LoadUserProfile


win32profile.CreateEnvironmentBlock

dict = CreateEnvironmentBlock(Token, Inherit )

Retrieves environment variables for a user

Parameters

Token : PyHANDLE

User token as returned by win32security::LogonUser, use None to retrieve system variables only

Inherit : boolean

Indicates if environment of current process should be inherited


win32profile.DeleteProfile

DeleteProfile(SidString, ProfilePath, ComputerName)

Remove profile for a user identified by string SID from specified machine.

Parameters

SidString : PyUnicode

String representation of user's Sid. See win32security::ConvertSidToStringSid.

ProfilePath=None : PyUnicode

Profile directory, value queried from registry if not specified

ComputerName=None : PyUnicode

Name of computer from which to delete profile, local machine assumed if not specified


win32profile.ExpandEnvironmentStringsForUser

PyUnicode = ExpandEnvironmentStringsForUser(Token, Src )

Replaces environment variables in a string with per-user values

Parameters

Token : PyHANDLE

The logon token for a user. Use None for system variables.

Src : PyUnicode

String containing environment variables enclosed in % signs


win32profile.GetAllUsersProfileDirectory

PyUnicode = GetAllUsersProfileDirectory()

Retrieve All Users profile path


win32profile.GetDefaultUserProfileDirectory

PyUnicode = GetDefaultUserProfileDirectory()

Retrieve Default user profile


win32profile.GetEnvironmentStrings

dict = GetEnvironmentStrings()

Retrieves environment variables for current process


win32profile.GetProfileType

int = GetProfileType()

Returns type of current user's profile

Return Value

Returns a combination of PT_* flags


win32profile.GetProfilesDirectory

PyUnicode = GetProfilesDirectory()

Retrieves directory where user profiles are stored


win32profile.GetUserProfileDirectory

PyUnicode = GetUserProfileDirectory(Token)

Returns profile directory for a logon token

Parameters

Token : PyHANDLE

User token as returned by win32security::LogonUser


win32profile.LoadUserProfile

PyHKEY = LoadUserProfile(hToken, ProfileInfo )

Loads user settings into registry

Parameters

hToken : PyHANDLE

Logon token as returned by win32security::LogonUser, win32security::OpenThreadToken, etc

ProfileInfo : PyPROFILEINFO

Dictionary representing a PROFILEINFO structure

Comments

SE_BACKUP_NAME and SE_RESTORE_NAME privs are required, but do not have to be enabled

Return Value

Returns a handle to user's registry key.


win32profile.UnloadUserProfile

UnloadUserProfile(Token, Profile)

Unloads user profile loaded by win32profile::LoadUserProfile

Parameters

Token : PyHANDLE

Logon token as returned by win32security::LogonUser, win32security::OpenProcessToken, etc

Profile : PyHKEY

Registry handle as returned by win32profile::LoadUserProfile


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

Search for RasCreatePhonebookEntry at msdn, google or google groups.


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

Search for RasDial at msdn, google or google groups.

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

Search for RasEditPhonebookEntry at msdn, google or google groups.


win32ras.EnumConnections

list = EnumConnections()

Returns a list of tuples, one for each active connection.

Win32 API References

Search for RasEnumConnections at msdn, google or google groups.

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.


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

Search for RasGetConnectStatus at msdn, google or google groups.

Search for RasGetConnectStatus at msdn, google or google groups.


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

Search for RasGetEntryDialParams at msdn, google or google groups.

Search for RasGetConnectStatus at msdn, google or google groups.

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

Search for RasGetErrorString at msdn, google or google groups.


win32ras.HangUp

HangUp(hras)

Terminates a remote access session.

Parameters

hras : int

The handle to the RAS connection to be terminated.

Win32 API References

Search for RasHangUp at msdn, google or google groups.


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

Search for RasSetEntryDialParams at msdn, google or google groups.

Search for RasGetConnectStatus at msdn, google or google groups.


win32security

Module win32security

An interface to the win32 security API's

Methods

DsGetSpn
Compose one or more service principal names to be registered using win32security::DsWriteAccountSpn

DsWriteAccountSpn
Associates a set of service principal names with an account

DsBind
Creates a connection to a directory service

DsUnBind
Closes a directory services handle created by win32security::DsBind

DsGetDcName
Returns the name of a domain controller (DC) in a specified domain. You can supply DC selection criteria to this function to indicate preference for a DC with particular characteristics.

DsCrackNames
Converts an array of directory service object names from one format to another.

DsListInfoForServer
Lists miscellaneous information for a server.

DsListServersInSite

DsListServersInSite

DsListServersInSite

DsListRoles

DsListDomainsInSite

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.

ImpersonateAnonymousToken
Cause a thread to act in the security context of an anonymous token

IsTokenRestricted
Checks if a token contains restricted sids

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.

LogonUserEx
Log a user onto the local machine,

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.

SetSecurityInfo
Sets security info for an object by handle

GetSecurityInfo
Retrieve security info for an object by handle

SetNamedSecurityInfo
Sets security info for an object by name

GetNamedSecurityInfo
Retrieve security info for an object by name

OpenProcessToken
Opens the access token associated with a process.

LookupPrivilegeValue
Retrieves the locally unique id for a privilege name

LookupPrivilegeName
return the text name for a privilege LUID

LookupPrivilegeDisplayName
Returns long description for a privilege name

AdjustTokenPrivileges
Enables or disables privileges for an access token.

AdjustTokenGroups
Sets the groups associated to an access token.

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.

SetThreadToken
Assigns an impersonation token to a thread. The function can also cause a thread to stop using an impersonation token.

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 win32security::LsaOpenPolicy

LsaQueryInformationPolicy
Retrieves information from the policy handle

LsaSetInformationPolicy
Sets policy options

LsaAddAccountRights
Adds a list of privileges to an account

LsaRemoveAccountRights
Removes privs from an account

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

EnumerateSecurityPackages
List available security packages as a sequence of dictionaries representing SecPkgInfo structures

AllocateLocallyUniqueId
Creates a new LUID

ImpersonateSelf
Assigns an impersonation token for current security context to current process

DuplicateToken
Creates a copy of an access token with specified impersonation level

DuplicateTokenEx
Extended version of DuplicateToken.

CheckTokenMembership
Checks if a SID is enabled in a token

CreateRestrictedToken
Creates a restricted copy of an access token with reduced privs - requires win2K or higher

LsaRegisterLogonProcess
Creates a trusted connection to LSA

LsaConnectUntrusted
Creates untrusted connection to LSA

LsaDeregisterLogonProcess
Closes connection to LSA server

LsaLookupAuthenticationPackage
Retrieves the unique id for an authentication package

LsaEnumerateLogonSessions
Lists all current logon ids

LsaGetLogonSessionData
Returns information about a logon session

AcquireCredentialsHandle
Creates a handle to credentials for use with SSPI

InitializeSecurityContext
Creates a security context based on credentials created by AcquireCredentialsHandle

AcceptSecurityContext
Builds security context between server and client

QuerySecurityPackageInfo
Retrieves parameters for a security package

LsaCallAuthenticationPackage
Requests the services of an authentication package

TranslateName
Converts a directory service object name from one format to another.

CreateWellKnownSid
Returns one of the predefined well known sids

MapGenericMask
Translates generic access rights into specific rights


win32security.ACL

PyACL = ACL(bufSize)

Creates a new PyACL object.

Parameters

bufSize=64 : int

The size of the buffer for the ACL.


win32security.AcceptSecurityContext

(int, long, int) = AcceptSecurityContext(Credential, Context , pInput , ContextReq , TargetDataRep , NewContext , pOutput )

Builds security context between server and client

Parameters

Credential : PyCredHandle

Handle to server's credentials (see AcquireCredentialsHandle)

Context : PyCtxtHandle

Use None on initial call, then handle returned in NewContext thereafter

pInput : PySecBufferDesc

Data buffer received from client

ContextReq : int

Combination of ASC_REQ_* flags

TargetDataRep : int

One of SECURITY_NATIVE_DREP,SECURITY_NETWORK_DREP

NewContext : PyCtxtHandle

Uninitialized context handle to receive output

pOutput : PySecBufferDesc

Buffer that receives output data, to be passed back as pInput on subsequent calls

Return Value

Returns a tuple of (return code, context attributes, context expiration time)


win32security.AcquireCredentialsHandle

(PyCredHandle,PyTime) = AcquireCredentialsHandle(Principal, Package , CredentialUse , LogonID , AuthData )

Creates a handle to credentials for use with SSPI

Parameters

Principal : str/unicode

Use None for current security context

Package : str/unicode

Name of security package that credentials will be used with

CredentialUse : int

Intended use of requested credentials, SECPKG_CRED_INBOUND, SECPKG_CRED_OUTBOUND, or SECPKG_CRED_BOTH

LogonID : long

LUID representing a logon session, can be None

AuthData : tuple

Sequence of 3 strings: (User, Domain, Password) - use none for existing credentials

Return Value

Returns credential handle and credential's expiration time


win32security.AdjustTokenGroups

PyTOKEN_GROUPS = AdjustTokenGroups(TokenHandle, ResetToDefault , NewState )

Sets the groups associated to an access token.

Parameters

TokenHandle : PyHANDLE

The handle to access token to be modified

ResetToDefault : boolean

Sets groups to default enabled/disabled states,

NewState : PyTOKEN_GROUPS

Groups and attributes to be set for token

Comments

Accepts keyword args.

Return Value

Returns previous state of groups modified


win32security.AdjustTokenPrivileges

PyTOKEN_PRIVILEGES = AdjustTokenPrivileges(TokenHandle, bDisableAllPrivileges , NewState )

Enables or disables privileges for an access token.

Parameters

TokenHandle : PyHANDLE

Handle to an access token

bDisableAllPrivileges : int

Flag for disabling all privileges

NewState : PyTOKEN_PRIVILEGES

The new state, can be None if bDisableAllPrivileges is True

Comments

Accepts keyword args.

Return Value

Returns modified privileges for later restoral. Privileges deleted from the token using SE_PRIVILEGE_REMOVED are not returned.


win32security.AllocateLocallyUniqueId

AllocateLocallyUniqueId()

Creates a new LUID


win32security.CheckTokenMembership

bool = CheckTokenMembership(TokenHandle, SidToCheck )

Checks if a SID is enabled in a token

Parameters

TokenHandle : PyHANDLE

Handle to an access token, current process token used if None

SidToCheck : PySID

Sid to be checked for presence in token


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

PyHANDLE = CreateRestrictedToken(ExistingTokenHandle, Flags , SidsToDisable , PrivilegesToDelete , SidsToRestrict )

Creates a restricted copy of an access token with reduced privs - requires win2K or higher

Parameters

ExistingTokenHandle : PyHANDLE

Handle to an access token (see win32security::LogonUser,win32security::OpenProcessToken

Flags : int

Valid values are zero or a combination of DISABLE_MAX_PRIVILEGE and SANDBOX_INERT

SidsToDisable : (PySID_AND_ATTRIBUTES,...)

Ssequence of PySID_AND_ATTRIBUTES tuples, or None

PrivilegesToDelete : (PyLUID_AND_ATTRIBUTES,...)

Privilege LUIDS to remove from token (attributes are ignored), or None

SidsToRestrict : (PySID_AND_ATTRIBUTES,...)

Sequence of PySID_AND_ATTRIBUTES tuples (attributes must be 0). Can be None.


win32security.CreateWellKnownSid

PySID = CreateWellKnownSid(WellKnownSidType, DomainSid )

Returns one of the predefined well known sids

Parameters

WellKnownSidType : int

One of the Win*Sid constants

DomainSid=None : PySID

Domain for the new SID, or None for local machine


win32security.CryptEnumProviders

[(PyUnicode,int),...] = CryptEnumProviders()

List cryptography providers

Return Value

Returns a sequence of tuples containing provider name and type


win32security.DsBind

PyDS_HANDLE = DsBind(DomainController, DnsDomainName )

Creates a connection to a directory service

Parameters

DomainController : PyUnicode

Name of domain controller to contact, can be None

DnsDomainName : PyUnicode

Dotted name of domain to bind to, can be None


win32security.DsCrackNames

[ (status, domain, name) ] = DsCrackNames(hds, flags , formatOffered , formatDesired , names )

Converts an array of directory service object names from one format to another.

Parameters

hds : PyDS_HANDLE

Directory service handle as returned by win32security::DsBind

flags : int

formatOffered : int

formatDesired : int

names : [name, ...]


win32security.DsGetDcName

dict = DsGetDcName(computerName, domainName , domainGUID , siteName , flags )

Returns the name of a domain controller (DC) in a specified domain. You can supply DC selection criteria to this function to indicate preference for a DC with particular characteristics.

Parameters

computerName=None : PyUnicode

domainName=None : PyUnicode

domainGUID=None : PyIID

siteName=None : PyUnicode

flags=0 : int

Comments

This function supports keyword arguments.


win32security.DsGetSpn

(PyUnicode,...) = DsGetSpn(ServiceType, ServiceClass , ServiceName , InstancePort , InstanceNames , InstancePorts )

Compose one or more service principal names to be registered using win32security::DsWriteAccountSpn

Parameters

ServiceType : int

Type of Spn to create, one of the DS_SPN_* constants

ServiceClass : PyUnicode

Arbitrary string that describes type of service, eg http

ServiceName : PyUnicode

Name of service, can be None (not required for DS_SPN_*_HOST Spn's)

InstancePort=0 : int

Port nbr for service instance, use 0 for no port

InstanceNames=None : (PyUnicode,...)

A sequence of service instance names, can be None - not required for for host Spn's

InstancePorts=None : (int,...)

A sequence of extra instance ports. If specified, must be same length as InstanceNames.


win32security.DsListDomainsInSite

[ PyDS_NAME_RESULT_ITEM, ...] = DsListDomainsInSite(hds)

Parameters

hds : PyDS_HANDLE

Directory service handle as returned by win32security::DsBind


win32security.DsListInfoForServer

[ PyDS_NAME_RESULT_ITEM, ...] = DsListInfoForServer(hds, server )

Lists miscellaneous information for a server.

Parameters

hds : PyDS_HANDLE

Directory service handle as returned by win32security::DsBind

server : PyUnicode


win32security.DsListRoles

[ PyDS_NAME_RESULT_ITEM, ...] = DsListRoles(hds)

Parameters

hds : PyDS_HANDLE

Directory service handle as returned by win32security::DsBind


win32security.DsListServersInSite

[ PyDS_NAME_RESULT_ITEM, ...] = DsListServersInSite(hds, site )

Parameters

hds : PyDS_HANDLE

Directory service handle as returned by win32security::DsBind

site : PyUnicode


win32security.DsListServersInSite

[ PyDS_NAME_RESULT_ITEM, ...] = DsListServersInSite(hds, domain , site )

Parameters

hds : PyDS_HANDLE

Directory service handle as returned by win32security::DsBind

domain : PyUnicode

site : PyUnicode


win32security.DsListServersInSite

[ PyDS_NAME_RESULT_ITEM, ...] = DsListServersInSite(hds)

Parameters

hds : PyDS_HANDLE

Directory service handle as returned by win32security::DsBind


win32security.DsUnBind

DsUnBind(hDS)

Closes a directory services handle created by win32security::DsBind

Parameters

hDS : PyDS_HANDLE

A handle to a directory service as returned by win32security::DsBind


win32security.DsWriteAccountSpn

DsWriteAccountSpn(hDS, Operation, Account, Spns)

Associates a set of service principal names with an account

Parameters

hDS : PyDS_HANDLE

Directory service handle as returned from win32security::DsBind

Operation : int

Constant from DS_SPN_WRITE_OP enum

Account : PyUnicode

Distinguished name of account whose Spn's will be modified

Spns : (PyUnicode,...)

A sequence of target Spn's as returned by win32security::DsGetSpn


win32security.DuplicateToken

PyHANDLE = DuplicateToken(ExistingTokenHandle, ImpersonationLevel )

Creates a copy of an access token with specified impersonation level

Parameters

ExistingTokenHandle : PyHANDLE

Handle to an access token (see win32security::LogonUser,win32security::OpenProcessToken)

ImpersonationLevel : int

A value from SECURITY_IMPERSONATION_LEVEL enum


win32security.DuplicateTokenEx

PyHANDLE = DuplicateTokenEx(ExistingToken, ImpersonationLevel , DesiredAccess , TokenType , TokenAttributes )

Extended version of DuplicateToken.

Parameters

ExistingToken : PyHANDLE

Logon token opened with TOKEN_DUPLICATE access

ImpersonationLevel : int

One of win32security.Security* values

DesiredAccess : int

Type of access required for the handle, combination of win32security.TOKEN_* flags

TokenType : int

Type of token to be created, TokenPrimary or TokenImpersonation

TokenAttributes=None : PySECURITY_ATTRIBUTES

Specifies security and inheritance for the new handle. None results in default DACL and no inheritance,

Comments

Accepts keyword arguments


win32security.EnumerateSecurityPackages

(dict,...) = EnumerateSecurityPackages()

List available security packages as a sequence of dictionaries representing SecPkgInfo structures


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.

Comments

This function reportedly will not return the INHERITED_ACE flag on some Windows XP SP1 systems Use GetNamedSecurityInfo if you encounter this problem.


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

PySECURITY_DESCRIPTOR = GetNamedSecurityInfo(ObjectName, ObjectType , SecurityInfo )

Retrieve security info for an object by name

Parameters

ObjectName : str/unicode

Name of object

ObjectType : int

Value from SE_OBJECT_TYPE enum

SecurityInfo : int

Combination of SECURITY_INFORMATION constants

Comments

Separate owner, group, dacl, and sacl are not returned as they can be easily retrieved from the returned PySECURITY_DESCRIPTOR


win32security.GetSecurityInfo

PySECURITY_DESCRIPTOR = GetSecurityInfo(handle, ObjectType , SecurityInfo )

Retrieve security info for an object by handle

Parameters

handle : int/PyHANDLE

Handle to object

ObjectType : int

Value from SE_OBJECT_TYPE enum

SecurityInfo : int

Combination of SECURITY_INFORMATION constants

Comments

Separate owner, group, dacl, and sacl are not returned as they can be easily retrieved from the returned PySECURITY_DESCRIPTOR


win32security.GetTokenInformation

object = GetTokenInformation(TokenHandle, TokenInformationClass )

Retrieves a specified type of information about an access token. The calling process must have appropriate access rights to obtain the information.

Parameters

TokenHandle : PyHANDLE

Handle to an access token.

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
TokenSessionId | int - Terminal Services session id
TokenSandBoxInert | Boolean
TokenType | Value from TOKEN_TYPE enum (TokenPrimary,TokenImpersonation)
TokenImpersonationLevel | Value from SECURITY_IMPERSONATION_LEVEL enum
TokenVirtualizationEnabled | Boolean
TokenVirtualizationAllowed | Boolean
TokenHasRestrictions | Boolean
TokenElevationType | int - TokenElevation* value indicating what type of token is linked to
TokenUIAccess | Boolean
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
TokenPrimaryGroup | PySID
TokenSource | (string,LUID)
TokenDefaultDacl | PyACL
TokenStatistics | dict Returns a dictionary representing a TOKEN_STATISTICS structure
TokenOrigin | LUID identifying the logon session
TokenLinkedToken | PyHANDLE - Returns handle to the access token to which token is linked
TokenLogonSid | PySID
TokenElevation | Boolean
TokenIntegrityLevel | (PySID, int)
TokenMandatoryPolicy | int (TOKEN_MANDATORY_POLICY_* flag)


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

ImpersonateAnonymousToken(ThreadHandle)

Cause a thread to act in the security context of an anonymous token

Parameters

ThreadHandle : PyHANDLE

Handle to thread that will


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

ImpersonateSelf(ImpersonationLevel)

Assigns an impersonation token for current security context to current process

Parameters

ImpersonationLevel : int

A value from SECURITY_IMPERSONATION_LEVEL enum


win32security.InitializeSecurityContext

(int, int, PyTime) = InitializeSecurityContext(Credential, Context , TargetName , ContextReq , TargetDataRep , pInput , NewContext , pOutput )

Creates a security context based on credentials created by AcquireCredentialsHandle

Parameters

Credential : PyCredHandle

A credentials handle as returned by win32security::AcquireCredentialsHandle

Context : PyCtxtHandle

Use None on initial call, then handle returned in NewContext thereafter

TargetName : str/unicode

Target of context, security package specific - Use None with NTLM

ContextReq : int

Combination of ISC_REQ_* flags

TargetDataRep : int

One of SECURITY_NATIVE_DREP,SECURITY_NETWORK_DREP

pInput : PySecBufferDesc

Data buffer - use None initially

NewContext : PyCtxtHandle

Uninitialized context handle to receive output

pOutput : PySecBufferDesc

Buffer that receives output data for subsequent calls

Return Value

Return value is a tuple of (return code, attribute flags, expiration time)


win32security.IsTokenRestricted

bool = IsTokenRestricted(TokenHandle)

Checks if a token contains restricted sids

Parameters

TokenHandle : PyHANDLE

Handle to an access token


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 : PyUnicode

The name of the user account to log on to. This may also be a marshalled credential (see win32cred::CredMarshalCredential).

Domain : PyUnicode

The name of the domain, or None for the current domain

Password : PyUnicode

User's password. Use a blank string if Username contains a marshalled credential.

LogonType : int

One of LOGON32_LOGON_* values

LogonProvider : int

One of LOGON32_PROVIDER_* values

Comments

Accepts keyword args

On Windows 2000 and earlier, the calling process must have SE_TCB_NAME privilege.


win32security.LogonUserEx

(PyHANDLE, PySID, str, dict) = LogonUserEx(Username, Domain , Password , LogonType , LogonProvider )

Log a user onto the local machine,

Parameters

Username : PyUnicode

User account, may be specified as a UPN (user@domain.com). This may also be a marshalled credential (see win32cred::CredMarshalCredential).

Domain : PyUnicode

User's domain. Can be None if Username is a full UPN.

Password : PyUnicode

User's password. Use a blank string if Username contains a marshalled credential.

LogonType : int

One of LOGON32_LOGON_* values

LogonProvider : int

One of LOGON32_PROVIDER_* values

Comments

Requires Windows XP or later

Accepts keyword args

Return Value

Returns access token, logon sid, profile buffer, and process quotas. Format of the profile buffer is not known, so returned object is subject to change.


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(SystemName, Name )

Returns long description for a privilege name

Parameters

SystemName : string/PyUnicode

System name, local system assumed if not specified

Name : string/PyUnicode

Name of privilege, Se...Privilege string constants (win32security.SE_*_NAME)


win32security.LookupPrivilegeName

PyUnicode = LookupPrivilegeName(SystemName, luid )

return the text name for a privilege LUID

Parameters

SystemName : 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 )

Retrieves the locally unique id for a privilege name

Parameters

systemName : string

String specifying the system, use None for local machine

privilegeName : string

String specifying the privilege (win32security.SE_*_NAME)


win32security.LsaAddAccountRights

LsaAddAccountRights(PolicyHandle, AccountSid, UserRights)

Adds a list of privileges to an account

Parameters

PolicyHandle : PyLSA_HANDLE

An LSA policy handle as returned by win32security::LsaOpenPolicy

AccountSid : PySID

Account to which privs will be added

UserRights : (str/unicode,...)

Sequence of privilege names (SE_*_NAME unicode constants)

Comments

Account is created if it doesn't already exist.

Accepts keyword args.


win32security.LsaCallAuthenticationPackage

LsaCallAuthenticationPackage(LsaHandle, AuthenticationPackage, MessageType, ProtocolSubmitBuffer)

Requests the services of an authentication package

Parameters

LsaHandle : PyLsaLogon_HANDLE

Lsa handle as returned by win32security::LsaRegisterLogonProcess or win32security::LsaConnectUntrusted

AuthenticationPackage : int

Id of authentication package to call, as returned by win32security::LsaLookupAuthenticationPackage

MessageType : int

Type of request that is being made, Kerb*Message or MsV1_0* constant

ProtocolSubmitBuffer : object

Type is dependent on MessageType

Comments

Message type is embedded in different types of submit buffers in the API call, but passed separately from python for simplicity of parsing input

MessageType | Input type
KerbQueryTicketCacheMessage | long - a logon id, use 0 for current logon session
KerbRetrieveTicketMessage | long - a logon id, use 0 for current logon session
KerbPurgeTicketCacheMessage | (long, PyUnicode, PyUnicode) - tuple containing (LogonId, ServerName, RealmName)
KerbRetrieveEncodedTicketMessage | (LogonId, TargetName, TicketFlags, CacheOptions, EncryptionType, CredentialsHandle) (int, PyUnicode, int, int, int, PyCredHandle)

MessageType | Return type
KerbQueryTicketCacheMessage | (dict,...) - Returns all tickets for the specified logon session (form is KERB_TICKET_CACHE_INFO)
KerbPurgeTicketCacheMessage | None
KerbRetrieveTicketMessage | Returns the ticket granting ticket for the logon session as a KERB_EXTERNAL_TICKET
KerbRetrieveEncodedTicketMessage | Returns specified ticket as a KERB_EXTERNAL_TICKET

Return Value

Type of returned object is dependent on MessageType


win32security.LsaClose

LsaClose(PolicyHandle)

Closes a policy handle created by win32security::LsaOpenPolicy

Parameters

PolicyHandle : PyHANDLE

An LSA policy handle as returned by win32security::LsaOpenPolicy


win32security.LsaConnectUntrusted

PyLsaLogon_HANDLE = LsaConnectUntrusted()

Creates untrusted connection to LSA

Comments

You don't need SeTcbPrivilege to execute this function as you do with LsaRegisterLogonProcess, but functionality of handle is limited


win32security.LsaDeregisterLogonProcess

LsaDeregisterLogonProcess(LsaHandle)

Closes connection to LSA server

Parameters

LsaHandle : PyLsaLogon_HANDLE

An Lsa handle as returned by win32security::LsaConnectUntrusted or win32security::LsaRegisterLogonProcess


win32security.LsaEnumerateAccountRights

[PyUnicode, ...] = LsaEnumerateAccountRights(PolicyHandle, AccountSid )

Lists privileges held by SID

Parameters

PolicyHandle : PyLSA_HANDLE

An LSA policy handle as returned by win32security::LsaOpenPolicy

AccountSid : PySID

Security identifier of account for which to list privs


win32security.LsaEnumerateAccountsWithUserRight

(PySID,...) = LsaEnumerateAccountsWithUserRight(PolicyHandle, UserRight )

Return SIDs that hold specified priv

Parameters

PolicyHandle : PyLSA_HANDLE

An LSA policy handle as returned by win32security::LsaOpenPolicy

UserRight : str/unicode

Name of privilege (SE_*_NAME unicode constant)


win32security.LsaEnumerateLogonSessions

(long,...) = LsaEnumerateLogonSessions()

Lists all current logon ids


win32security.LsaGetLogonSessionData

(dict,...) = LsaGetLogonSessionData(LogonId)

Returns information about a logon session

Parameters

LogonId : PyLARGE_INTEGER

An LUID identifying a logon session

Return Value

Returns a dictionary representing a SECURITY_LOGON_SESSION_DATA structure


win32security.LsaLookupAuthenticationPackage

int = LsaLookupAuthenticationPackage(LsaHandle, PackageName )

Retrieves the unique id for an authentication package

Parameters

LsaHandle : PyLsaLogon_HANDLE

An Lsa handle as returned by win32security::LsaConnectUntrusted or win32security::LsaRegisterLogonProcess

PackageName : string

Name of security package to be identified


win32security.LsaOpenPolicy

PyLSA_HANDLE = LsaOpenPolicy(system_name, access_mask )

Opens a policy handle for the specified system

Parameters

system_name : string/PyUnicode

System name, local system assumed if not specified

access_mask : int

Bitmask of requested access types


win32security.LsaQueryInformationPolicy

LsaQueryInformationPolicy(PolicyHandle, InformationClass)

Retrieves information from the policy handle

Parameters

PolicyHandle : PyLSA_HANDLE

An LSA policy handle as returned by win32security::LsaOpenPolicy

InformationClass : int

POLICY_INFORMATION_CLASS value

POLICY_INFORMATION_CLASS value | Return type
PolicyAuditEventsInformation | returns tuple of (boolean,(int,...)) Tuple consists of a boolean indicating if auditing is enabled, and a tuple of ints, indexed by POLICY_AUDIT_EVENT_TYPE values, containing a combination of POLICY_AUDIT_EVENT_UNCHANGED, POLICY_AUDIT_EVENT_SUCCESS, POLICY_AUDIT_EVENT_FAILURE, POLICY_AUDIT_EVENT_NONE
PolicyDnsDomainInformation | Returns a tuple representing a POLICY_DNS_DOMAIN_INFO struct
PolicyPrimaryDomainInformation | Returns name and SID of primary domain
PolicyAccountDomainInformation | Returns name and SID of account domain
PolicyLsaServerRoleInformation | Returns an int, one of PolicyServerRoleBackup, PolicyServerRolePrimary
PolicyModificationInformation | Returns modification serial nbr and modified time of Lsa database


win32security.LsaRegisterLogonProcess

PyLsaLogon_HANDLE = LsaRegisterLogonProcess(LogonProcessName)

Creates a trusted connection to LSA

Parameters

LogonProcessName : string

Name to use for this logon process

Comments

Requires SeTcbPrivilege (and must be enabled)


win32security.LsaRegisterPolicyChangeNotification

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(PolicyHandle, AccountSid, AllRights, UserRights)

Removes privs from an account

Parameters

PolicyHandle : PyLSA_HANDLE

An LSA policy handle as returned by win32security::LsaOpenPolicy

AccountSid : PySID

Account whose privileges will be removed

AllRights : int

Boolean value indicating if all privs should be removed from account

UserRights : (str/unicode,...)

List of privilege names to be removed (SE_*_NAME unicode constants)

Comments

If AllRights parm is true, account is *deleted*

Accepts keyword args.


win32security.LsaRetrievePrivateData

PyUnicode = LsaRetrievePrivateData(PolicyHandle, KeyName )

Retreives encrypted unicode data from Lsa registry key.

Parameters

PolicyHandle : PyLSA_HANDLE

An LSA policy handle as returned by win32security::LsaOpenPolicy

KeyName : string

Registry key to read


win32security.LsaSetInformationPolicy

LsaSetInformationPolicy(PolicyHandle, InformationClass, Information)

Sets policy options

Parameters

PolicyHandle : PyLSA_HANDLE

An LSA policy handle as returned by win32security::LsaOpenPolicy

InformationClass : int

POLICY_INFORMATION_CLASS value

Information : object

Type is dependent on InformationClass

InformationClass Type of input expected
PolicyAuditEventsInformation (boolean, (int, ...))
First member imdicates whether auditing is enabled or not.
Seconed member is a sequence of POLICY_AUDIT_EVENT_* flags specifying which events should be audited. See AuditCategory* values for positions of each event type.


win32security.LsaStorePrivateData

LsaStorePrivateData(PolicyHandle, KeyName, PrivateData)

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

Parameters

PolicyHandle : PyLSA_HANDLE

An LSA policy handle as returned by win32security::LsaOpenPolicy

KeyName : string

Registry key in which to store data

PrivateData : PyUNICODE

Unicode string to be encrypted and stored


win32security.LsaUnregisterPolicyChangeNotification

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

int = MapGenericMask(AccessMask, GenericMapping )

Translates generic access rights into specific rights

Parameters

AccessMask : int

A bitmask of generic rights to be interpreted according to GenericMapping

GenericMapping : (int,int,int,int)

A tuple of 4 bitmasks (GenericRead, GenericWrite, GenericExecute, GenericAll) containing the standard and specific rights that correspond to the generic rights.

Return Value

The input AccessMask will be returned with any generic access rights translated into specific equivalents


win32security.OpenProcessToken

PyHANDLE = OpenProcessToken(processHandle, desiredAccess )

Opens the access token associated with a process.

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

dict = QuerySecurityPackageInfo(PackageName)

Retrieves parameters for a security package

Parameters

PackageName : PyUNICODE

Name of the security package to query

Return Value

Returns a dictionary representing a SecPkgInfo struct


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 an object for which security information will be set.

info : int

The type of information to set - combination of SECURITY_INFORMATION values

security : PySECURITY_DESCRIPTOR

The security information


win32security.SetNamedSecurityInfo

SetNamedSecurityInfo(ObjectName, ObjectType, SecurityInfo, Owner, Group, Dacl, Sacl)

Sets security info for an object by name

Parameters

ObjectName : str/unicode

Name of object

ObjectType : int

Value from SE_OBJECT_TYPE enum

SecurityInfo : int

Combination of SECURITY_INFORMATION constants

Owner : PySID

Sid to set as owner of object, can be None

Group : PySID

Group Sid, can be None

Dacl : PyACL

Discretionary ACL to set for object, can be None

Sacl : PyACL

System Audit ACL to set for object, can be None


win32security.SetSecurityInfo

SetSecurityInfo(handle, ObjectType, SecurityInfo, Owner, Group, Dacl, Sacl)

Sets security info for an object by handle

Parameters

handle : int/PyHANDLE

Handle to object

ObjectType : int

Value from SE_OBJECT_TYPE enum

SecurityInfo : int

Combination of SECURITY_INFORMATION constants

Owner : PySID

Sid to set as owner of object, can be None

Group : PySID

Group Sid, can be None

Dacl : PyACL

Discretionary ACL to set for object, can be None

Sacl : PyACL

System Audit ACL to set for object, can be None


win32security.SetThreadToken

SetThreadToken(Thread, Token)

Assigns an impersonation token to a thread. The function can also cause a thread to stop using an impersonation token.

Parameters

Thread : PyHANDLE

Handle to a thread. Use None to indicate calling thread.

Token : PyHANDLE

Handle to an impersonation token. Use None to end impersonation.


win32security.SetTokenInformation

SetTokenInformation(TokenHandle, TokenInformationClass, TokenInformation)

Set a specified type of information in an access token

Parameters

TokenHandle : 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 to be modfied

TokenInformation : object

Type is dependent on TokenInformationClass

TokenInformationClass | Type of input expected
TokenOwner | PySID to be used as owner of created objects
TokenPrimaryGroup | PySID
TokenDefaultDacl | PyACL - Default permissions for created objects
TokenSessionId | Int - Terminal services session id
TokenVirtualizationEnabled | Boolean
TokenVirtualizationAllowed | Boolean
TokenIntegrityLevel | PySID_AND_ATTRIBUTES containing an integrity SID and SE_GROUP_INTEGRITY flag
TokenMandatoryPolicy | Int. one of TOKEN_MANDATORY_POLICY_* values


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 an object for which security information will be set.

info : int

The type of information to set - combination of SECURITY_INFORMATION values

security : PySECURITY_DESCRIPTOR

The security information


win32security.TranslateName

PyUnicode = TranslateName(accountName, accountNameFormat , accountNameFormat , numChars )

Converts a directory service object name from one format to another.

Parameters

accountName : PyUnicode

object name

accountNameFormat : int

A value from the EXTENDED_NAME_FORMAT enumeration type indicating the format of the accountName name.

accountNameFormat : int

A value from the EXTENDED_NAME_FORMAT enumeration type indicating the format of the desired name.

numChars=1024 : int

Number of Unicode characters to allocate for the return buffer.


win32service

Module win32service

An interface to the Windows NT Service API

Methods

GetThreadDesktop
Retrieves a handle to the desktop for a thread

EnumWindowStations
Lists names of window stations

GetUserObjectInformation
Returns specified type of info about a window station or desktop

SetUserObjectInformation
Set specified type of info for a window station or desktop object

OpenWindowStation
Returns a handle to the specified window station

OpenDesktop
Opens a handle to a desktop

CreateDesktop
Creates a new desktop in calling process's current window station

OpenInputDesktop
Returns a handle to desktop for logged-in user

GetProcessWindowStation
Returns a handle to calling process's current window station

CreateWindowStation
Creates a new window station

EnumServicesStatus
Returns a tuple of status info for each service that meets specified criteria

EnumServicesStatusEx
Lists the status of services that meet the specified criteria

EnumDependentServices
Lists services that depend on a service

QueryServiceConfig
Retrieves configuration parameters for a service

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 or SCM handle

QueryServiceStatus
Queries a service status

QueryServiceStatusEx
Queries a service status

SetServiceObjectSecurity
Set the security descriptor for a service

QueryServiceObjectSecurity
Retrieves information from the security descriptor for a service

GetServiceKeyName
Translates a service display name into its registry key name

GetServiceDisplayName
Translates an internal service name into its display name

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.

ChangeServiceConfig2
Modifies advanced service parameters

QueryServiceConfig2
Retrieves advanced service configuration options


win32service.ChangeServiceConfig

int/None = ChangeServiceConfig(hService, serviceType , startType , errorControl , binaryFile , loadOrderGroup , bFetchTag , serviceDeps , acctName , password , displayName )

Changes the configuration of an existing service.

Parameters

hService : PySC_HANDLE

handle to service to be modified

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

ChangeServiceConfig2(hService, InfoLevel, info)

Modifies advanced service parameters

Parameters

hService : PySC_HANDLE

Service handle as returned by win32service::OpenService

InfoLevel : int

One of win32service.SERVICE_CONFIG_* values

info : object

Type depends on InfoLevel

InfoLevel | Input value
SERVICE_CONFIG_DESCRIPTION | Unicode string
SERVICE_CONFIG_FAILURE_ACTIONS | Dict representing a SERVICE_FAILURE_ACTIONS struct
SERVICE_CONFIG_DELAYED_AUTO_START_INFO | Boolean
SERVICE_CONFIG_FAILURE_ACTIONS_FLAG | Boolean
SERVICE_CONFIG_PRESHUTDOWN_INFO | int (shutdown timeout in milliseconds)
SERVICE_CONFIG_SERVICE_SID_INFO | int (SERVICE_SID_TYPE_*)
SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO | Sequence of unicode strings


win32service.CloseServiceHandle

CloseServiceHandle(scHandle)

Closes a service or SCM handle

Parameters

scHandle : PySC_HANDLE

Handle to close


win32service.ControlService

SERVICE_STATUS = ControlService(scHandle, code )

Sends a control message to a service.

Parameters

scHandle : PySC_HANDLE

Handle to control

code : int

The service control code.

Return Value

The result is the new service status.


win32service.CreateDesktop

PyHDESK = CreateDesktop(Desktop, Flags , DesiredAccess , SecurityAttributes )

Creates a new desktop in calling process's current window station

Parameters

Desktop : str/unicode

Name of desktop to create

Flags : int

DF_ALLOWOTHERACCOUNTHOOK or 0

DesiredAccess : int

An ACCESS_MASK determining level of access available thru returned handle

SecurityAttributes : PySECURITY_ATTRIBUTES

Specifies inheritance and controls access to desktop


win32service.CreateService

PySC_HANDLE/(PySC_HANDLE, int) = CreateService(scHandle, name , displayName , desiredAccess , serviceType , startType , errorControl , binaryFile , loadOrderGroup , bFetchTag , serviceDeps , acctName , password )

Creates a new service.

Parameters

scHandle : PySC_HANDLE

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

PyHWINSTA = CreateWindowStation(WindowStation, Flags , DesiredAccess , SecurityAttributes )

Creates a new window station

Parameters

WindowStation : str/unicode

Name of window station to create, or None

Flags : int

CWF_CREATE_ONLY or 0

DesiredAccess : int

Bitmask of access types available to returned handle

SecurityAttributes : PySECURITY_ATTRIBUTES

Specifies security for window station, and whether handle is inheritable

Comments

If name is None or empty string, name is formatteded from logon id


win32service.DeleteService

DeleteService(scHandle)

Deletes the specified service

Parameters

scHandle : PySC_HANDLE

Handle to service to be deleted


win32service.EnumDependentServices

(tuple,...) = EnumDependentServices(hService, ServiceState )

Lists services that depend on a service

Parameters

hService : PySC_HANDLE

Handle to service for which to list dependent services (as returned by win32service::OpenService)

ServiceState=SERVICE_STATE_ALL : int

Limits to services in specified state - One of SERVICE_STATE_ALL, SERVICE_ACTIVE, SERVICE_INACTIVE

Return Value

Returns a sequence of tuples representing ENUM_SERVICE_STATUS structs: (ServiceName, DisplayName, SERVICE_STATUS)


win32service.EnumServicesStatus

(tuple,...) = EnumServicesStatus(hSCManager, ServiceType , ServiceState )

Returns a tuple of status info for each service that meets specified criteria

Parameters

hSCManager : PySC_HANDLE

Handle to service control manager as returned by win32service::OpenSCManager

ServiceType=SERVICE_WIN32 : int

Types of services to enumerate (SERVICE_DRIVER and/or SERVICE_WIN32)

ServiceState=SERVICE_STATE_ALL : int

Limits to services in specified state

Return Value

Returns a sequence of tuples representing ENUM_SERVICE_STATUS structs: (ServiceName, DisplayName, SERVICE_STATUS)


win32service.EnumServicesStatusEx

(dict,...) = EnumServicesStatusEx(SCManager, ServiceType , ServiceState , GroupName , InfoLevel )

Lists the status of services that meet the specified criteria

Parameters

SCManager : PySC_HANDLE

Handle to service control manager as returned by win32service::OpenSCManager

ServiceType=SERVICE_WIN32 : int

Types of services to enumerate (SERVICE_DRIVER and/or SERVICE_WIN32)

ServiceState=SERVICE_STATE_ALL : int

Limits to services in specified state

GroupName=None : str

Name of group - use None for all, or '' for services that don't belong to a group

InfoLevel=SC_ENUM_PROCESS_INFO : int

Currently SC_ENUM_PROCESS_INFO is only level defined

Win32 API References

Search for EnumServicesStatusEx at msdn, google or google groups.

Return Value

Returns a sequence of dicts, whose contents depend on information level requested. Currently, only information level supported is SC_ENUM_PROCESS_INFO (returns ENUM_SERVICE_STATUS_PROCESS).


win32service.EnumWindowStations

(PyUnicode,,...) = EnumWindowStations()

Lists names of window stations

Comments

Only window stations for which you have WINSTA_ENUMERATE access will be returned


win32service.GetProcessWindowStation

PyHWINSTA = GetProcessWindowStation()

Returns a handle to calling process's current window station


win32service.GetServiceDisplayName

PyUNICODE = GetServiceDisplayName(hSCManager, ServiceName )

Translates an internal service name into its display name

Parameters

hSCManager : PySC_HANDLE

Handle to service control manager as returned by win32service::OpenSCManager

ServiceName : PyUNICODE

Name of service


win32service.GetServiceKeyName

PyUNICODE = GetServiceKeyName(hSCManager, DisplayName )

Translates a service display name into its registry key name

Parameters

hSCManager : PySC_HANDLE

Handle to service control manager as returned by win32service::OpenSCManager

DisplayName : PyUNICODE

Display name of a service


win32service.GetThreadDesktop

PyHDESK = GetThreadDesktop(ThreadId)

Retrieves a handle to the desktop for a thread

Parameters

ThreadId : int

Id of thread


win32service.GetUserObjectInformation

GetUserObjectInformation(Handle, type)

Returns specified type of info about a window station or desktop

Parameters

Handle : PyHANDLE

Handle to window station or desktop

type : int

Type of info to return, one of UOI_FLAGS,UOI_NAME, UOI_TYPE, or UOI_USER_SID

Return Value

Return type is dependent on UOI_* constant passed in


win32service.LockServiceDatabase

int = LockServiceDatabase(sc_handle)

Locks the service database.

Parameters

sc_handle : PySC_HANDLE

A handle to the SCM.


win32service.OpenDesktop

PyHDESK = OpenDesktop(szDesktop, Flags , Inherit , DesiredAccess )

Opens a handle to a desktop

Parameters

szDesktop : str/unicode

Name of desktop to open

Flags : int

DF_ALLOWOTHERACCOUNTHOOK or 0

Inherit : bool

Allow handle to be inherited

DesiredAccess : int

ACCESS_MASK specifying level of access for handle


win32service.OpenInputDesktop

PyHDESK = OpenInputDesktop(Flags, Inherit , DesiredAccess )

Returns a handle to desktop for logged-in user

Parameters

Flags : int

DF_ALLOWOTHERACCOUNTHOOK or 0

Inherit : bool

Specifies if handle will be inheritable

DesiredAccess : int

ACCESS_MASK specifying access available to returned handle


win32service.OpenSCManager

PySC_HANDLE = 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. (combination of win32service.SC_MANAGER_* flags)


win32service.OpenService

PySC_HANDLE = OpenService(scHandle, name , desiredAccess )

Returns a handle to the specified service.

Parameters

scHandle : PySC_HANDLE

Handle to the Service Control Mananger

name : PyUnicode

The name of the service to open.

desiredAccess : int

The access desired.


win32service.OpenWindowStation

PyHWINSTA = OpenWindowStation(szWinSta, Inherit , DesiredAccess )

Returns a handle to the specified window station

Parameters

szWinSta : str/PyUNICODE

Name of window station

Inherit : Bool

Allow handle to be inherited by subprocesses

DesiredAccess : int

Bitmask of access types


win32service.QueryServiceConfig

tuple = QueryServiceConfig(hService)

Retrieves configuration parameters for a service

Parameters

hService : PySC_HANDLE

Service handle as returned by win32service::OpenService

Return Value

Returns a tuple representing a QUERY_SERVICE_CONFIG struct:

Items

[0] int : ServiceType

Combination of SERVICE_*_DRIVER or SERVICE_*_PROCESS constants

[1] int : StartType

One of SERVICE_*_START constants

[2] int : ErrorControl

One of SERVICE_ERROR_* constants

[3] PyUnicode : BinaryPathName

Service's binary executable, can also contain command line args

[4] PyUnicode : LoadOrderGroup

Loading group that service is a member of

[5] int : TagId

Order of service within its load order group

[6] [PyUnicode,...] : Dependencies

Sequence of names of services on which this service depends

[7] PyUnicode : ServiceStartName

Account name under which service will run

[8] PyUnicode : DisplayName

Name of service


win32service.QueryServiceConfig2

object = QueryServiceConfig2(hService, InfoLevel )

Retrieves advanced service configuration options

Parameters

hService : PySC_HANDLE

Service handle as returned by win32service::OpenService

InfoLevel : int

One of win32service.SERVICE_CONFIG_* values

InfoLevel | Type of value returned
SERVICE_CONFIG_DESCRIPTION | Unicode string
SERVICE_CONFIG_FAILURE_ACTIONS | Dict representing a SERVICE_FAILURE_ACTIONS struct
SERVICE_CONFIG_DELAYED_AUTO_START_INFO | Boolean
SERVICE_CONFIG_FAILURE_ACTIONS_FLAG | Boolean
SERVICE_CONFIG_PRESHUTDOWN_INFO | int (shutdown timeout in milliseconds)
SERVICE_CONFIG_SERVICE_SID_INFO | int (SERVICE_SID_TYPE_*)
SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO | List of unicode strings

Return Value

Type of returned object depends on InfoLevel


win32service.QueryServiceLockStatus

(int, PyUnicode, int) = QueryServiceLockStatus(hSCManager)

Retrieves the lock status of the specified service control manager database.

Parameters

hSCManager : PySC_HANDLE

Handle to the SCM.

Return Value

The result is a tuple of (bIsLocked, userName, lockDuration)


win32service.QueryServiceObjectSecurity

PySECURITY_DESCRIPTOR = QueryServiceObjectSecurity(Handle, SecurityInformation )

Retrieves information from the security descriptor for a service

Parameters

Handle : PySC_HANDLE

Service handle

SecurityInformation : int

Type of infomation to retrieve, combination of values from SECURITY_INFORMATION enum


win32service.QueryServiceStatus

SERVICE_STATUS = QueryServiceStatus(hService)

Queries a service status

Parameters

hService : PySC_HANDLE

Handle to service to be queried


win32service.QueryServiceStatusEx

SERVICE_STATUS = QueryServiceStatusEx(hService)

Queries a service status

Parameters

hService : PySC_HANDLE

Handle to service to be queried


win32service.SetServiceObjectSecurity

SetServiceObjectSecurity(Handle, SecurityInformation, SecurityDescriptor)

Set the security descriptor for a service

Parameters

Handle : PySC_HANDLE

Service handle

SecurityInformation : int

Type of infomation to set, combination of values from SECURITY_INFORMATION enum

SecurityDescriptor : PySECURITY_DESCRIPTOR

PySECURITY_DESCRIPTOR containing infomation to set


win32service.SetServiceStatus

SetServiceStatus(scHandle, serviceStatus)

Sets a service status

Parameters

scHandle : int

Handle to set

serviceStatus : SERVICE_STATUS

The new status


win32service.SetUserObjectInformation

SetUserObjectInformation(Handle, info, type)

Set specified type of info for a window station or desktop object

Parameters

Handle : PyHANDLE

Handle to window station or desktop

info : object

Information to set for handle, currently only a dictionary representing USEROBJECTFLAGS struct

type=UOI_FLAGS : int

Type of info to set, currently only accepts UOI_FLAGS

Comments

Currently only UOI_FLAGS supported


win32service.StartService

StartService(hService, args)

Starts the specified service

Parameters

hService : PySC_HANDLE

Handle to the service to be started

args : [string, ...]

Arguments to the service.


win32service.UnlockServiceDatabase

int = UnlockServiceDatabase(lock)

Unlocks the service database.

Parameters

lock : int

A lock provided by win32service::LockServiceDatabase


win32transaction

Module win32transaction

Module wrapping Kernal Transaction Manager functions, as used with transacted NTFS and transacted registry functions.

Comments

These functions are only available on Vista and later.

All functions accept keyword arguments.

Methods

CreateTransaction
Creates a transaction

RollbackTransaction
Rolls back a transaction

RollbackTransactionAsync
Rolls back a transaction asynchronously

CommitTransaction
Commits a transaction

CommitTransactionAsync
Commits a transaction asynchronously

GetTransactionId
Returns the transaction's GUID

OpenTransaction
Creates a handle to an existing transaction


win32transaction.CommitTransaction

CommitTransaction(TransactionHandle)

Commits a transaction

Parameters

TransactionHandle : PyHANDLE

Handle to a transaction

Win32 API References

Search for CommitTransaction at msdn, google or google groups.


win32transaction.CommitTransactionAsync

CommitTransactionAsync(TransactionHandle)

Commits a transaction asynchronously

Parameters

TransactionHandle : PyHANDLE

Handle to a transaction

Win32 API References

Search for CommitTransactionAsync at msdn, google or google groups.


win32transaction.CreateTransaction

PyHANDLE = CreateTransaction(TransactionAttributes, UOW , CreateOptions , IsolationLevel , IsolationFlags , Timeout , Description )

Creates a transaction

Parameters

TransactionAttributes=None : PySECURITY_ATTRIBUTES

Security and inheritance for the transaction, can be None

UOW=None : PyIID

Reserved, use only None

CreateOptions=0 : int

TRANSACTION_DO_NOT_PROMOTE is only defined flag

IsolationLevel=0 : int

Reserved, use only 0

IsolationFlags=0 : int

Reserved, use only 0

Timeout=0 : int

Abort timeout in milliseconds

Description=None : PyUnicode

Text description of transaction, can be None

Win32 API References

Search for CreateTransaction at msdn, google or google groups.


win32transaction.GetTransactionId

PyIID = GetTransactionId(TransactionHandle)

Returns the transaction's GUID

Parameters

TransactionHandle : PyHANDLE

Handle to a transaction


win32transaction.OpenTransaction

PyHANDLE = OpenTransaction(DesiredAccess, TransactionId )

Creates a handle to an existing transaction

Parameters

DesiredAccess : int

Combination of TRANSACTION_* access rights

TransactionId : PyIID

GUID identifying the transaction


win32transaction.RollbackTransaction

RollbackTransaction(TransactionHandle)

Rolls back a transaction

Parameters

TransactionHandle : PyHANDLE

Handle to a transaction

Win32 API References

Search for RollbackTransaction at msdn, google or google groups.


win32transaction.RollbackTransactionAsync

RollbackTransactionAsync(TransactionHandle)

Rolls back a transaction asynchronously

Parameters

TransactionHandle : PyHANDLE

Handle to a transaction

Win32 API References

Search for RollbackTransactionAsync at msdn, google or google groups.


win32ts

Module win32ts

Interface to the Terminal Services Api All functions in this module accept keyword arguments

Methods

WTSOpenServer
Opens a handle to a terminal server

WTSCloseServer
Closes a terminal server handle

WTSQueryUserConfig
Returns user configuration

WTSSetUserConfig
Changes user configuration

WTSEnumerateServers
Lists terminal servers in a domain

WTSEnumerateSessions
Lists sessions on a server

WTSLogoffSession
Logs off a user logged in through Terminal Services

WTSDisconnectSession
Disconnects a session without logging it off

WTSQuerySessionInformation
Retrieve information about a session

WTSEnumerateProcesses
Lists processes on a terminal server

WTSQueryUserToken
Retrieves the access token for a session

WTSShutdownSystem
Issues a shutdown request to a terminal server

WTSTerminateProcess
Kills a process on a terminal server

ProcessIdToSessionId
Finds the session under which a process is running

WTSGetActiveConsoleSessionId
Returns the id of the console session

WTSRegisterSessionNotification
Registers a window to receive terminal service notifications

WTSUnRegisterSessionNotification
Disables terminal service window messages

WTSWaitSystemEvent
Waits for an event to occur

WTSSendMessage
Sends a popup message to a terminal services session


win32ts.ProcessIdToSessionId

int = ProcessIdToSessionId(ProcessId)

Finds the session under which a process is running

Parameters

ProcessId : int

Id of a process as returned by win32ts::WTSEnumerateProcesses


win32ts.WTSCloseServer

WTSCloseServer(Server)

Closes a terminal server handle

Parameters

Server : PyHANDLE

Terminal Server handle


win32ts.WTSDisconnectSession

WTSDisconnectSession(Server, SessionId, Wait)

Disconnects a session without logging it off

Parameters

Server : PyHANDLE

Handle to a terminal server

SessionId : int

Terminal services session id as returned by win32ts::WTSEnumerateSessions

Wait : boolean

Indicates whether operation should be performed asynchronously


win32ts.WTSEnumerateProcesses

(PyUnicode,...) = WTSEnumerateProcesses(Server, Version , Reserved )

Lists processes on a terminal server

Parameters

Server=WTS_CURRENT_SERVER_HANDLE : PyHANDLE

Handle to a terminal server

Version=1 : int

Version of request, currently 1 is only valid value

Reserved=0 : int

Reserved, use 0 if passed in


win32ts.WTSEnumerateServers

(PyUnicode,...) = WTSEnumerateServers(DomainName, Version , Reserved )

Lists terminal servers in a domain

Parameters

DomainName=None : PyUnicode

Use None for current domain

Version=1 : int

Version of request, currently 1 is only valid value

Reserved=0 : int

Reserved, use 0 if passed in


win32ts.WTSEnumerateSessions

(dict,...) = WTSEnumerateSessions(Server, Version , Reserved )

Lists sessions on a server

Parameters

Server=WTS_CURRENT_SERVER_HANDLE : PyHANDLE

Handle to a terminal server

Version=1 : int

Version of request, currently 1 is only valid value

Reserved=0 : int

Reserved, use 0 if passed in

Return Value

Returns a sequence of dictionaries representing WTS_SESSION_INFO structs, containing {SessionId:int, WinStationName:str, State:int}


win32ts.WTSGetActiveConsoleSessionId

int = WTSGetActiveConsoleSessionId()

Returns the id of the console session

Comments

Returns 0xffffffff if no active console session exists


win32ts.WTSLogoffSession

WTSLogoffSession(Server, SessionId, Wait)

Logs off a user logged in through Terminal Services

Parameters

Server : PyHANDLE

Handle to a terminal server

SessionId : int

Terminal services session id as returned by win32ts::WTSEnumerateSessions

Wait : boolean

Indicates whether operation should be performed asynchronously


win32ts.WTSOpenServer

PyHANDLE = WTSOpenServer(ServerName)

Opens a handle to a terminal server

Parameters

ServerName : PyUnicode

Name ot terminal server to be opened


win32ts.WTSQuerySessionInformation

WTSQuerySessionInformation(Server, SessionId, WTSInfoClass)

Returns information about a terminal services session

Parameters

Server : PyHANDLE

Handle to a terminal server as returned by win32ts::WTSOpenServer

SessionId : int

Terminal services session id as returned by win32ts::WTSEnumerateSessions

WTSInfoClass : int

Type of information requested, from WTS_INFO_CLASS enum

InfoClass | Returned value
WTSApplicationName | Unicode string
WTSClientDirectory | Unicode string
WTSClientName | Unicode string
WTSDomainName | Unicode string
WTSInitialProgram | Unicode string
WTSOEMId | Unicode string
WTSUserName | Unicode string
WTSWinStationName | Unicode string
WTSWorkingDirectory | Unicode string
WTSClientProtocolType | Int, one of WTS_PROTOCOL_TYPE_CONSOLE,WTS_PROTOCOL_TYPE_ICA,WTS_PROTOCOL_TYPE_RDP
WTSClientProductId | Int
WTSClientBuildNumber | Int
WTSClientHardwareId | Int
WTSSessionId | Int
WTSConnectState | Int, from WTS_CONNECTSTATE_CLASS
WTSClientDisplay | Dict containing client's display settings
WTSClientAddress | Dict containing type and value of client's IP address (None if console session) IPV6 addresses may not be returned correctly on Windows versions earlier than Windows Server 2012 (see http://sourceforge.net/p/pywin32/bugs/664/ for details)


win32ts.WTSQueryUserConfig

object = WTSQueryUserConfig(ServerName, UserName , ConfigClass )

Returns user configuration

Parameters

ServerName : PyUnicode

Name ot terminal server

UserName : PyUnicode

Name of user

ConfigClass : int

Type of information to be returned, win32ts.WTSUserConfig*

ConfigClass | Returned value
WTSUserConfigInitialProgram | Unicode string, program to be run when user logs on
WTSUserConfigWorkingDirectory | Unicode string, working dir for initial program
WTSUserConfigModemCallbackPhoneNumber | Unicode string
WTSUserConfigTerminalServerProfilePath | Unicode string
WTSUserConfigTerminalServerHomeDir | Unicode string
WTSUserConfigTerminalServerHomeDirDrive | Unicode string
WTSUserConfigfInheritInitialProgram | Int
WTSUserConfigfAllowLogonTerminalServer | Int, 1 if user can log on thru Terminal Service
WTSUserConfigTimeoutSettingsConnections | Int, max connection time (ms)
WTSUserConfigTimeoutSettingsDisconnections | Int
WTSUserConfigTimeoutSettingsIdle | Int, max idle time (ms)
WTSUserConfigfDeviceClientDrives | Int
WTSUserConfigfDeviceClientPrinters | Int
WTSUserConfigfDeviceClientDefaultPrinter | Int
WTSUserConfigBrokenTimeoutSettings | Int
WTSUserConfigReconnectSettings | Int
WTSUserConfigModemCallbackSettings | Int
WTSUserConfigShadowingSettings | Int, indicates if user's session my be monitored
WTSUserConfigfTerminalServerRemoteHomeDir | Int,

Return Value

The type of the returned value is dependent on the config class requested


win32ts.WTSQueryUserToken

PyHANDLE = WTSQueryUserToken(SessionId)

Retrieves the access token for a session

Parameters

SessionId : int

Terminal services session id

Comments

This function is intended only for use by trusted processes that have SE_TCB_PRIVILEGE enabled


win32ts.WTSRegisterSessionNotification

WTSRegisterSessionNotification(Wnd, Flags)

Registers a window to receive terminal service notifications

Parameters

Wnd : PyHANDLE

Window handle to receive terminal service messages

Flags : int

NOTIFY_FOR_THIS_SESSION or NOTIFY_FOR_ALL_SESSIONS


win32ts.WTSSendMessage

int = WTSSendMessage(Server, SessionId , Title , Message , Style , Timeout , Wait )

Sends a popup message to a terminal services session

Parameters

Server=WTS_CURRENT_SERVER_HANDLE : PyHANDLE

Handle to a terminal server, or WTS_CURRENT_SERVER_HANDLE

SessionId : int

Terminal services session id

Title : PyUnicode

Title of dialog

Message : PyUnicode

Message to be displayed

Style : int

Usually MB_OK

Timeout : int

Seconds to wait before returning (only used if Wait is True)

Wait : boolean

Specifies if function should wait for user input before returning

Return Value

Returns one of IDABORT,IDCANCEL,IDIGNORE,IDNO,IDOK,IDRETRY,IDYES,IDASYNC,IDTIMEOUT,


win32ts.WTSSetUserConfig

WTSSetUserConfig(ServerName, UserName, ConfigClass)

Changes user configuration

Parameters

ServerName : PyUnicode

Name ot terminal server

UserName : PyUnicode

Name of user

ConfigClass : int

Type of information to be set, win32ts.WTSUserConfig*

ConfigClass | Type of data required
WTSUserConfigInitialProgram | Unicode string, program to be run when user logs on
WTSUserConfigWorkingDirectory | Unicode string, working dir for initial program
WTSUserConfigModemCallbackPhoneNumber | Unicode string
WTSUserConfigTerminalServerProfilePath | Unicode string
WTSUserConfigTerminalServerHomeDir | Unicode string
WTSUserConfigTerminalServerHomeDirDrive | Unicode string
WTSUserConfigfInheritInitialProgram | Int
WTSUserConfigfAllowLogonTerminalServer | Int, 1 if user can log on thru Terminal Service
WTSUserConfigTimeoutSettingsConnections | Int, max connection time (ms)
WTSUserConfigTimeoutSettingsDisconnections | Int
WTSUserConfigTimeoutSettingsIdle | Int, max idle time (ms)
WTSUserConfigfDeviceClientDrives | Int
WTSUserConfigfDeviceClientPrinters | Int
WTSUserConfigfDeviceClientDefaultPrinter | Int
WTSUserConfigBrokenTimeoutSettings | Int
WTSUserConfigReconnectSettings | Int
WTSUserConfigModemCallbackSettings | Int
WTSUserConfigShadowingSettings | Int, indicates if user's session my be monitored
WTSUserConfigfTerminalServerRemoteHomeDir | Int,


win32ts.WTSShutdownSystem

WTSShutdownSystem(Server, ShutdownFlag)

Issues a shutdown request to a terminal server

Parameters

Server : PyHANDLE

Handle to a terminal server

ShutdownFlag : int

One of the win32ts.WTS_WSD_* values


win32ts.WTSTerminateProcess

WTSTerminateProcess(Server, ProcessId, ExitCode)

Kills a process on a terminal server

Parameters

Server : PyHANDLE

Handle to a terminal server

ProcessId : int

Id of a process as returned by win32ts::WTSEnumerateProcesses

ExitCode : int

Exit code for the process


win32ts.WTSUnRegisterSessionNotification

WTSUnRegisterSessionNotification(Wnd)

Disables terminal service window messages

Parameters

Wnd : PyHANDLE

Window previously registered to receive session notifications


win32ts.WTSWaitSystemEvent

int = WTSWaitSystemEvent(Server, EventMask )

Waits for an event to occur

Parameters

Server=WTS_CURRENT_SERVER_HANDLE : PyHANDLE

Handle to a terminal server, or WTS_CURRENT_SERVER_HANDLE

EventMask=WTS_EVENT_ALL : int

Combination of WTS_EVENT_* values

Return Value

Returns a bitmask of WTS_EVENT_* flags indication which event(s) occurred


win32wnet

Module win32wnet

A module that exposes the Windows Networking API.

Methods

NETRESOURCE
The PyNETRESOURCE type - can be used to create a new PyNETRESOURCE object.

NCB
The PyNCB type - can be used to create a new PyNCB object.

NCBBuffer
Creates a new buffer

Netbios
Executes a Netbios call.

WNetAddConnection2
Creates a connection to a network resource.

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

WNetGetResourceInformation
Finds the type and provider of a network resource

WNetGetLastError
Retrieves extended error information set by a network provider when one of the WNet* functions fails

WNetGetResourceParent
Finds the parent resource of a network resource

WNetGetConnection
Retrieves the name of the network resource associated with a local device.


win32wnet.NCBBuffer

buffer = NCBBuffer(size)

Creates an NCB buffer of the relevant size.

Parameters

size : int

The number of bytes to allocate.


win32wnet.Netbios

int = Netbios(ncb)

Executes a Netbios call.

Parameters

ncb : NCB

The NCB object to use for the call.


win32wnet.WNetAddConnection2

WNetAddConnection2(NetResource, Password, UserName, Flags)

Creates a connection to a network resource. The function can redirect a local device to the network resource.

Parameters

NetResource : PyNETRESOURCE

Describes the network resource for the connection.

Password=None : str

The password to use. Use None for default credentials.

UserName=None : str

The user name to connect as. Use None for default credentials.

Flags=0 : int

Combination win32netcon.CONNECT_* flags

Comments

This function also accepts backwards-compatible, positional-only arguments of (dwType, lpLocalName, lpRemoteName[, lpProviderName, Username, Password, flags])

Accepts keyword arguments.

Win32 API References

Search for WNetAddConnection2 at msdn, google or google groups.


win32wnet.WNetAddConnection3

WNetAddConnection3(hwnd, NetResource, Password, UserName, Flags)

Creates a connection to a network resource.

Parameters

hwnd : int

Handle to a parent window.

NetResource : PyNETRESOURCE

Describes the network resource for the connection.

Password=None : str

The password to use. Use None for default credentials.

UserName=None : str

The user name to connect as. Use None for default credentials.

Flags=0 : int

Combination win32netcon.CONNECT_* flags

Comments

Accepts keyword arguments.

Win32 API References

Search for WNetAddConnection3 at msdn, google or google groups.


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

[PyNETRESOURCE, ...] = 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.

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

string = WNetGetConnection(connection)

Retrieves the name of the network resource associated with a local device.

Parameters

connection=None : 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.


win32wnet.WNetGetLastError

(int,str,str) = WNetGetLastError()

Retrieves extended error information set by a network provider when one of the WNet* functions fails

Comments

The error description or the network provider name may be truncated if they exceed 1024 and 256 characters, respectively

Return Value

Returns the error code, a text description of the error, and the name of the network provider


win32wnet.WNetGetResourceInformation

(PyNETRESOURCE, str) = WNetGetResourceInformation(NetResource)

Finds the type and provider of a network resource

Parameters

NetResource : PyNETRESOURCE

Describes a network resource. lpRemoteName is required, dwType and lpProvider can be supplied if known

Return Value

Returns a NETRESOURCE and a string containing the trailing part of the remote path


win32wnet.WNetGetResourceParent

PyNETRESOURCE = WNetGetResourceParent(NetResource)

Finds the parent resource of a network resource

Parameters

NetResource : PyNETRESOURCE

Describes a network resource. lpRemoteName and lpProvider are required, dwType is recommended for efficiency


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 : PyNETRESOURCE

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

Search for GetSystemInfo at msdn, google or google groups.

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

Search for CeFindFirstFile at msdn, google or google groups.

Search for FindNextFile at msdn, google or google groups.

Search for CloseHandle at msdn, google or google groups.

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
  • CopyProgressRoutine
  • DOCINFO
  • ExportCallback
  • FORM_INFO_1
  • ImportCallback
  • LARGE_INTEGER
  • NCB
  • PRINTER_DEFAULTS
  • PyACL
  • PyBITMAP
  • PyBLENDFUNCTION
  • PyCEHANDLE
  • PyCERTSTORE
  • PyCERT_ALT_NAME_ENTRY
  • PyCERT_ALT_NAME_INFO
  • PyCERT_AUTHORITY_KEY_ID_INFO
  • PyCERT_BASIC_CONSTRAINTS2_INFO
  • PyCERT_BASIC_CONSTRAINTS_INFO
  • PyCERT_CONTEXT
  • PyCERT_EXTENSION
  • PyCERT_KEY_ATTRIBUTES_INFO
  • PyCERT_NAME_INFO
  • PyCERT_NAME_VALUE
  • PyCERT_OTHER_NAME
  • PyCERT_POLICY_INFO
  • PyCERT_PUBLIC_KEY_INFO
  • PyCOMSTAT
  • PyCOORD
  • PyCREDENTIAL
  • PyCREDENTIAL_ATTRIBUTE
  • PyCREDENTIAL_TARGET_INFORMATION
  • PyCREDUI_INFO
  • PyCRYPTHASH
  • PyCRYPTKEY
  • PyCRYPTMSG
  • PyCRYPTPROTECT_PROMPTSTRUCT
  • PyCRYPTPROV
  • PyCRYPT_ALGORITHM_IDENTIFIER
  • PyCRYPT_ATTRIBUTE
  • PyCRYPT_BIT_BLOB
  • PyCRYPT_DECRYPT_MESSAGE_PARA
  • PyCRYPT_ENCRYPT_MESSAGE_PARA
  • PyCRYPT_SIGN_MESSAGE_PARA
  • PyCRYPT_VERIFY_MESSAGE_PARA
  • PyCTL_CONTEXT
  • PyCTL_USAGE
  • PyConsoleScreenBuffer
  • PyCredHandle
  • PyCtxtHandle
  • PyDCB
  • PyDEVMODE
  • PyDEVMODEW
  • PyDISPLAY_DEVICE
  • PyDLGITEMTEMPLATE
  • PyDLGTEMPLATE
  • PyDS_HANDLE
  • PyDS_NAME_RESULT_ITEM
  • PyDateTime
  • PyDialogTemplate
  • PyEVTLOG_HANDLE
  • PyEVT_HANDLE
  • PyEVT_RPC_LOGIN
  • 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
  • PyGdiHANDLE
  • PyGetSignerCertificate
  • PyHANDLE
  • PyHDESK
  • PyHDEVNOTIFY
  • PyHHNTRACK
  • PyHHN_NOTIFY
  • PyHH_AKLINK
  • PyHH_FTS_QUERY
  • PyHH_POPUP
  • PyHH_WINTYPE
  • PyHINTERNET
  • PyHKEY
  • PyHTHEME
  • PyHWINSTA
  • PyICONINFO
  • PyIID
  • PyINPUT_RECORD
  • 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
  • PyLOGBRUSH
  • PyLOGFONT
  • PyLSA_HANDLE
  • PyLUID_AND_ATTRIBUTES
  • PyLsaLogon_HANDLE
  • PyMSG
  • PyNETRESOURCE
  • PyNET_VALIDATE_AUTHENTICATION_INPUT_ARG
  • PyNET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG
  • PyNET_VALIDATE_PERSISTED_FIELDS
  • PyNMHDR
  • PyNOTIFYICONDATA
  • PyOVERLAPPED
  • PyOVERLAPPEDReadBuffer
  • PyPERF_COUNTER_DEFINITION
  • PyPERF_OBJECT_TYPE
  • PyPOINT
  • PyPROFILEINFO
  • PyPerfMonManager
  • PyPrinterHANDLE
  • PyRECT
  • PyResourceId
  • PySCROLLINFO
  • PySC_HANDLE
  • 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
  • PySID_AND_ATTRIBUTES
  • PySIZE
  • PySMALL_RECT
  • PySTARTUPINFO
  • PySecBuffer
  • PySecBufferDesc
  • PyTOKEN_GROUPS
  • PyTOKEN_PRIVILEGES
  • PyTRIVERTEX
  • PyTRUSTEE
  • PyTS_HANDLE
  • 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_INFO_4
  • 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
  • PyUrlCacheHANDLE
  • PyWAVEFORMATEX
  • PyWINHTTP_AUTOPROXY_OPTIONS
  • PyWINHTTP_PROXY_INFO
  • 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
  • PyXFORM
  • Pymmapfile
  • RASDIALEXTENSIONS
  • RASDIALPARAMS
  • SC_ACTION
  • SERVICE_FAILURE_ACTIONS
  • SERVICE_STATUS
  • TRACKMOUSEEVENT
  • ULARGE_INTEGER
  • WIN32_FIND_DATA
  • com_error
  • connection
  • cursor
  • error


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


CopyProgressRoutine

CopyProgressRoutine Object

Python function used as a callback for win32file::CopyFileEx and win32file::MoveFileWithProgress
Function will receive 9 parameters:
(TotalFileSize, TotalBytesTransferred, StreamSize, StreamBytesTransferred, StreamNumber, CallbackReason, SourceFile, DestinationFile, Data)
SourceFile and DestinationFile are PyHANDLEs. Data is the context object passed to the calling function. All others are longs.
CallbackReason will be one of CALLBACK_CHUNK_FINISHED or CALLBACK_STREAM_SWITCH
Your implementation of this function must return one of the PROGRESS_* constants.


DOCINFO

DOCINFO Object

A tuple of information representing a DOCINFO struct

Properties

string/PyUnicode DocName
Name of document

string/PyUnicode Output
Name of output file when printing to file. Use None for normal printing.

string/PyUnicode DataType
Type of data to be sent to printer, eg RAW, EMF, TEXT. Use None for printer default.

int Type
Flag specifying mode of operation. Can be DI_APPBANDING, DI_ROPS_READ_DESTINATION, or 0


ExportCallback

ExportCallback Object

User-defined callback function used with win32file::ReadEncryptedFileRaw.
Function is called with 3 parameters: (Data, CallbackContext, Length)
Data: Read-only buffer containing the raw data read from the file. Must not be referenced outside of the callback function.
CallbackContext: Arbitrary object passed to ReadEncryptedFileRaw.
Length: Number of bytes in the Data buffer.
On success, function should return ERROR_SUCCESS. Otherwise, it can return a win32 error code, or simply raise an exception.


FORM_INFO_1

FORM_INFO_1 Object

A dictionary containing FORM_INFO_1W data

Properties

int Flags
FORM_USER, FORM_BUILTIN, or FORM_PRINTER

PyUnicode Name
Name of form

dict Size
A dictionary representing a SIZEL structure {'cx':int,'cy':int}

dict ImageableArea
A dictionary representing a RECTL structure {'left':int, 'top':int, 'right':int, 'bottom':int}


ImportCallback

ImportCallback Object

User-defined callback function used with win32file::WriteEncryptedFileRaw
Function is called with 3 parameters: (Data, CallbackContext, Length)
Data: Writeable buffer to be filled with raw encrypted data. Buffer memory is only valid within the callback function.
CallbackContext: The arbitrary object passed to WriteEncryptedFileRaw.
Length: Size of the data buffer.
Your implementation of this function should return a tuple of 2 ints containing an error code (ERROR_SUCCESS on success), and the length of data written to the buffer.
Function exits when 0 is returned for the data length.


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


PRINTER_DEFAULTS

PRINTER_DEFAULTS Object

A dictionary representing a PRINTER_DEFAULTS structure

Properties

string pDatatype
Data type to be used for print jobs, see win32print::EnumPrintProcessorDatatypes, optional, can be None

PyDEVMODE pDevMode
A PyDEVMODE that specifies default printer parameters, optional, can be None

int DesiredAccess
An ACCESS_MASK specifying what level of access is needed, eg PRINTER_ACCESS_ADMINISTER, PRINTER_ACCESS_USE


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.

AddAccessAllowedAceEx
Same as AddAccessAllowedAce, with addition of ace flags

AddAccessAllowedObjectAce
Adds an ACCESS_ALLOWED_OBJECT_ACE to the ACL

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

AddAccessDeniedAceEx
Adds an access-denied ACE to an ACL object

AddMandatoryAce
Adds a mandatory integrity level ACE to a SACL

AddAccessAllowedObjectAce
Adds an ACCESS_DENIED_OBJECT_ACE to the ACL

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

AddAuditAccessAceEx
Adds an audit ACE to an SACL with inheritance flags

AddAuditAccessObjectAce
Adds an audit ACE for an object type identified by GUID

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

GetEffectiveRightsFromAcl
Return access rights (ACCESS_MASK) that the ACL grants to specified trustee

GetAuditedPermissionsFromAcl
Return types of access for which ACL will generate an audit event for specified trustee


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

AddAccessAllowedAceEx(revision, aceflags, access, sid)

Add access allowed ACE to an ACL with ACE flags (Requires Win2k or higher)

Parameters

revision : int

Must be at least ACL_REVISION_DS

aceflags : int

Combination of ACE inheritance flags (CONTAINER_INHERIT_ACE,INHERIT_ONLY_ACE,INHERITED_ACE,NO_PROPAGATE_INHERIT_ACE, and OBJECT_INHERIT_ACE)

access : int

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

sid : PySID

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


PyACL.AddAccessAllowedObjectAce

AddAccessAllowedObjectAce(AceRevision, AceFlags, AccessMask, ObjectTypeGuid, InheritedObjectTypeGuid, sid)

Adds an ACCESS_ALLOWED_OBJECT_ACE to the ACL

Parameters

AceRevision : int

Must be at least ACL_REVISION_DS

AceFlags : int

Combination of ACE inheritance flags (CONTAINER_INHERIT_ACE,INHERIT_ONLY_ACE,INHERITED_ACE,NO_PROPAGATE_INHERIT_ACE, and OBJECT_INHERIT_ACE)

AccessMask : int

Specifies the mask of access rights to be granted to the specified SID

ObjectTypeGuid : PyIID

GUID of object type or property set to which ace applies, can be None

InheritedObjectTypeGuid : PyIID

GUID of object type or property that will inherit ACE, can be None

sid : PySID

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


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

AddAccessDeniedAceEx(revision, aceflags, access, sid)

Add access denied ACE to an ACL with ACE flags (Requires Win2k or higher)

Parameters

revision : int

Must be at least ACL_REVISION_DS

aceflags : int

Combination of ACE inheritance flags (CONTAINER_INHERIT_ACE,INHERIT_ONLY_ACE,INHERITED_ACE,NO_PROPAGATE_INHERIT_ACE, and OBJECT_INHERIT_ACE)

access : int

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

sid : PySID

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


PyACL.AddAccessDeniedObjectAce

AddAccessDeniedObjectAce(AceRevision, AceFlags, AccessMask, ObjectTypeGuid, InheritedObjectTypeGuid, sid)

Adds an ACCESS_DENIED_OBJECT_ACE to the ACL

Parameters

AceRevision : int

Must be at least ACL_REVISION_DS

AceFlags : int

Combination of ACE inheritance flags (CONTAINER_INHERIT_ACE,INHERIT_ONLY_ACE,INHERITED_ACE,NO_PROPAGATE_INHERIT_ACE, and OBJECT_INHERIT_ACE)

AccessMask : int

Specifies the mask of access rights to be granted to the specified SID

ObjectTypeGuid : PyIID

GUID of object type or property set to which ace applies, can be None

InheritedObjectTypeGuid : PyIID

GUID of object type or property that will inherit ACE, can be None

sid : PySID

A SID object representing a user, group, or logon account that will be denied access.


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

AddAuditAccessAceEx(dwAceRevision, AceFlags, dwAccessMask, sid, bAuditSuccess, bAuditFailure)

Adds an audit ACE to an Sacl, includes ace flags

Parameters

dwAceRevision : int

Revision of ACL: Must be at least ACL_REVISION_DS

AceFlags : int

Combination of FAILED_ACCESS_ACE_FLAG,SUCCESSFUL_ACCESS_ACE_FLAG,CONTAINER_INHERIT_ACE,INHERIT_ONLY_ACE,INHERITED_ACE,NO_PROPAGATE_INHERIT_ACE and OBJECT_INHERIT_ACE

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

AddAuditAccessObjectAce(dwAceRevision, AceFlags, dwAccessMask, ObjectTypeGuid, InheritedObjectTypeGuid, sid, bAuditSuccess, bAuditFailure)

Adds an audit ACE for an object type identified by GUID

Parameters

dwAceRevision : int

Revision of ACL: Must be at least ACL_REVISION_DS

AceFlags : int

Combination of FAILED_ACCESS_ACE_FLAG,SUCCESSFUL_ACCESS_ACE_FLAG,CONTAINER_INHERIT_ACE,INHERIT_ONLY_ACE,INHERITED_ACE,NO_PROPAGATE_INHERIT_ACE and OBJECT_INHERIT_ACE

dwAccessMask : int

Bitmask of access types to be audited

ObjectTypeGuid : PyIID

GUID of object type or property set to which ace applies, can be None

InheritedObjectTypeGuid : PyIID

GUID of object type or property that will inherit ACE, can be None

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

AddMandatoryAce(AceRevision, AceFlags, MandatoryPolicy, LabelSid)

Adds a mandatory integrity level ACE to a SACL

Parameters

AceRevision : int

ACL_REVISION or ACL_REVISION_DS

AceFlags : int

Combination of ACE inheritance flags (CONTAINER_INHERIT_ACE,INHERIT_ONLY_ACE,INHERITED_ACE,NO_PROPAGATE_INHERIT_ACE, and OBJECT_INHERIT_ACE)

MandatoryPolicy : int

Access policy for processes with lower integrity level, combination of SYSTEM_MANDATORY_LABEL_* flags

LabelSid : PySID

Integrity level SID. This can be created using CreateWellKnownSid with Win*LabelSid.
Also can be constructed manually using SECURITY_MANDATORY_LABEL_AUTHORITY and a SECURITY_MANDATORY_*_RID


PyACL.DeleteAce

DeleteAce(index)

Deletes specified Ace from an ACL.

Parameters

index : int

Zero-based index of the ACE to delete.


PyACL.GetAce

tuple = GetAce(index)

Gets an Ace from the ACL

Parameters

index : int

Zero-based index of the ACE to retrieve.

Return Value

Conventional ACE's (types ACCESS_ALLOWED_ACE, ACCESS_DENIED_ACE, SYSTEM_AUDIT_ACE) are returned as a tuple of:

Items

[0] (int, int) : aceType, AceFlags

[1] int : Mask

[2] PySID : sid

Object ACE's (types ACCESS_ALLOWED_OBJECT_ACE, ACCESS_DENIED_OBJECT_ACE, SYSTEM_AUDIT_OBJECT_ACE) are returned as a tuple:

[0] (int, int) : aceType, AceFlags

[1] int : mask

[2] PyIID : ObjectType

[3] PyIID : InheritedObjectType

[4] PySID : sid

For details see the API documentation.


PyACL.GetAceCount

int = GetAceCount()

Returns the number of ACEs in the ACL.


PyACL.GetAclRevision

int = GetAclRevision()

Returns revision of the ACL.


PyACL.GetAclSize

int = GetAclSize()

Returns the storage size of the ACL.


PyACL.GetAuditedPermissionsFromAcl

(SuccessfulAuditedRights,FailedAuditRights) = GetAuditedPermissionsFromAcl(trustee)

Return types of access for which ACL will generate an audit event for specified trustee

Parameters

trustee : PyTRUSTEE

Dictionary representing a TRUSTEE structure

Comments

This function is known to return the success and failure access masks in the the wrong order on Windows 2000 service pack 4. Problem has been reported to Microsoft.


PyACL.GetEffectiveRightsFromAcl

ACCESS_MASK = GetEffectiveRightsFromAcl(trustee)

Return access rights (ACCESS_MASK) that the ACL grants to specified trustee

Parameters

trustee : PyTRUSTEE

Dictionary representing a TRUSTEE structure


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)


PyBITMAP

PyBITMAP Object

A Python object, representing an PyBITMAP structure

Comments

Typically you get one of these from GetObject. Note that currently the bitmap bits are not exposed via this type - but the value of the pointer is. You can use the struct and win32gui functions to unpack these bits manually if you really need them. Note that you are still responsible for the life of the win32 bitmap object. The object can then be passed to any function which takes an BITMAP object

Properties

integer bmType

integer bmWidth

integer bmHeight

integer bmWidthBytes

integer bmPlanes

integer


PyBLENDFUNCTION

PyBLENDFUNCTION Object

Tuple of four small ints used to fill a BLENDFUNCTION struct Each int must fit in a byte (0-255).

Win32 API References

Search for BLENDFUNCTION at msdn, google or google groups.

Items

[0] int : BlendOp

Only defined value is AC_SRC_OVER (0)

[1] int : BlendFlags

None currently defined, must be 0

[2] int : SourceConstantAlpha

Transparency to be applied to entire source. (255 is opaque)

[3] int : AlphaFormat

Only defined flag is AC_SRC_ALPHA, used when src bitmap contains per-pixel alpha


PyCEHANDLE

PyCEHANDLE Object

A Python object, representing a remote Windows CE handle


PyCERTSTORE

PyCERTSTORE Object

Handle to a certificate store

Methods

CertCloseStore
Closes the certificate store

CertControlStore
Controls sychronization of the certificate store

CertEnumCertificatesInStore
Lists all certificates in the store

CertEnumCTLsInStore
Finds all Certificate Trust Lists in store.

CertSaveStore
Serializes the store to memory or a file

CertAddEncodedCertificateToStore
Imports an encoded certificate into the store

CertAddCertificateContextToStore
Adds a certificate context to the store

CertAddCertificateLinkToStore
Adds a link to a cert in another store

CertAddCTLContextToStore
Adds a certificate trust list to the store

CertAddCTLLinkToStore
Adds a link to a CTL in another store

CertAddStoreToCollection
Adds a sibling store to a store collection

CertRemoveStoreFromCollection
Removes a sibling store from a store collection

PFXExportCertStoreEx
Exports certificates and associated private keys in PKCS#12 format

Properties

int HCERTSTORE
Integer handle


PyCERTSTORE.CertAddCertificateContextToStore

PyCERT_CONTEXT = CertAddCertificateContextToStore(CertContext, AddDisposition )

Adds a certificate context to the store

Parameters

CertContext : PyCERT_CONTEXT

Certificate context to be added

AddDisposition : int

CERT_STORE_ADD_* constant


PyCERTSTORE.CertAddCertificateLinkToStore

PyCERT_CONTEXT = CertAddCertificateLinkToStore(CertContext, AddDisposition )

Adds a link to a cert in another store

Parameters

CertContext : PyCERT_CONTEXT

Certificate context to be linked

AddDisposition : int

One of the CERT_STORE_ADD_* values


PyCERTSTORE.CertAddCTLContextToStore

PyCTL_CONTEXT = CertAddCTLContextToStore(CtlContext, AddDisposition )

Adds a certificate trust list to the store

Parameters

CtlContext : PyCTL_CONTEXT

CTL to be added

AddDisposition : int

CERT_STORE_ADD_* constant


PyCERTSTORE.CertAddCTLLinkToStore

PyCTL_CONTEXT = CertAddCTLLinkToStore(CtlContext, AddDisposition )

Adds a link to a CTL in another store

Parameters

CtlContext : PyCTL_CONTEXT

CTL to be linked

AddDisposition : int

One of the CERT_STORE_ADD_* values


PyCERTSTORE.CertAddEncodedCertificateToStore

PyCERT_CONTEXT = CertAddEncodedCertificateToStore(CertEncodingType, CertEncoded , AddDisposition )

Imports an encoded certificate into the store

Parameters

CertEncodingType : int

Usually X509_ASN_ENCODING combined with PKCS_7_ASN_ENCODING

CertEncoded : buffer

Data containing a serialized certificate

AddDisposition : int

Combination of CERT_STORE_ADD_* flags


PyCERTSTORE.CertAddStoreToCollection

CertAddStoreToCollection(SiblingStore, UpdateFlag, Priority)

Adds a sibling store to a store collection

Parameters

SiblingStore : PyCERTSTORE

Store to be added to the collection

UpdateFlag=0 : int

Can be CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG to enable changes to persist

Priority=0 : int

Determines order in which store are searched and updated

Comments

A collection store is created by using cryptoapi::CertOpenStore with CERT_STORE_PROV_COLLECTION


PyCERTSTORE.CertCloseStore

CertCloseStore(Flags)

Closes the certificate store

Parameters

Flags=0 : int

Combination of CERT_CLOSE_*_FLAG flags


PyCERTSTORE.CertControlStore

CertControlStore(Flags, CtrlType, CtrlPara)

Controls sychronization of the certificate store

Parameters

Flags : int

One of the CERT_STORE_CTRL_*_FLAG flags

CtrlType : int

One of the CERT_STORE_CTRL_* flags

CtrlPara : PyHANDLE

Event handle, can be None (not used with CERT_STORE_CTRL_COMMIT)


PyCERTSTORE.CertEnumCertificatesInStore

[PyCERT_CONTEXT,...] = CertEnumCertificatesInStore()

Lists all certificates in the store


PyCERTSTORE.CertEnumCTLsInStore

[PyCTL_CONTEXT,...] = CertEnumCTLsInStore()

Finds all Certificate Trust Lists in store


PyCERTSTORE.CertRemoveStoreFromCollection

CertRemoveStoreFromCollection(SiblingStore)

Removes a sibling store from a collection

Parameters

SiblingStore : PyCERTSTORE

Store to be removed from the collection


PyCERTSTORE.CertSaveStore

CertSaveStore(MsgAndCertEncodingType, SaveAs, SaveTo, SaveToPara, Flags)

Serializes the store to memory or a file

Parameters

MsgAndCertEncodingType : int

Only used when saveas is CERT_STORE_SAVE_AS_PKCS7 - usually X509_ASN_ENCODING combined with PKCS_7_ASN_ENCODING

SaveAs : int

One of the CERT_STORE_SAVE_AS_* constants

SaveTo : int

One of the CERT_STORE_SAVE_TO_* constants (CERT_STORE_SAVE_TO_MEMORY not supported yet)

SaveToPara : PyHANDLE/string

File name or open file handle depending on SaveTo parm

Flags=0 : int

Reserved, use 0


PyCERTSTORE.PFXExportCertStoreEx

bytes = PFXExportCertStoreEx(Password, Flags )

Exports certificates and associated private keys in PKCS#12 format

Parameters

Password=None : str

Passphrase to be used to encrypt the output

Flags=EXPORT_PRIVATE_KEYS|REPORT_NO_PRIVATE_KEY|REPORT_NOT_ABLE_TO_EXPORT_PRIVATE_KEY : int

Options to be used while exporting


PyCERT_ALT_NAME_ENTRY

PyCERT_ALT_NAME_ENTRY Object

Represented as a 2-tuple

Comments

First item is one of the CERT_ALT_NAME_* constants indicating the type.
Second item is either a string, or for CERT_ALT_NAME_OTHER_NAME a PyCERT_OTHER_NAME


PyCERT_ALT_NAME_INFO

PyCERT_ALT_NAME_INFO Object

Sequence of PyCERT_ALT_NAME_ENTRY objects


PyCERT_AUTHORITY_KEY_ID_INFO

PyCERT_AUTHORITY_KEY_ID_INFO Object

Dict containing the identity of a CA

Properties

str KeyId
Unique identifier of private key, usually a hash

str CertIssuer
Encoded DN of the Certificate Authority. Decode using X509_UNICODE_NAME

int CertSerialNumber
Serial nbr of the CA's signing certificate


PyCERT_BASIC_CONSTRAINTS2_INFO

PyCERT_BASIC_CONSTRAINTS2_INFO Object

Dict representing a CERT_BASIC_CONSTRAINTS2_INFO struct

Properties

boolean fCA
Indicates if cert represents a certificate authority

boolean fPathLenConstraint
Indicates if PathLenConstraint member is used

int PathLenConstraint
Limits number of intermediate CA's between root CA and end user


PyCERT_BASIC_CONSTRAINTS_INFO

PyCERT_BASIC_CONSTRAINTS_INFO Object

Dict representing a CERT_BASIC_CONSTRAINTS_INFO struct

Properties

PyCRYPT_BIT_BLOB SubjectType
Contains a combination of CERT_CA_SUBJECT_FLAG,CERT_END_ENTITY_SUBJECT_FLAG

boolean fPathLenConstraint
Indicates if PathLenConstraint member is used

int PathLenConstraint
Limits number of intermediate CA's between root CA and end user

tuple SubtreesConstraint
Sequence of encoded name blobs


PyCERT_CONTEXT

PyCERT_CONTEXT Object

Handle to a certificate context

Methods

CertFreeCertificateContext
Frees the context handle

CertEnumCertificateContextProperties
Lists property ids for the certificate

CryptAcquireCertificatePrivateKey
Retrieves the private key associated with the certificate

CertGetIntendedKeyUsage
Returns the intended key usage from the certificate extensions

CertGetEnhancedKeyUsage
Finds the enhanced key usage property and/or extension for the certificate

CertSerializeCertificateStoreElement
Serializes the certificate and its properties

CertVerifySubjectCertificateContext
Checks the validity of the certificate

CertDeleteCertificateFromStore
Removes the certificate from its store

CertGetCertificateContextProperty
Retrieves the specified property from the certificate

CertSetCertificateContextProperty
Sets a property for a certificate

Properties

int HANDLE
Pointer to CERT_CONTEXT struct

PyCERTSTORE CertStore
Handle to the certificate store that contains this certificate

str CertEncoded
Content of the certificate as encoded bytes

int CertEncodingType
Method used to encode the certifcate, usually X509_ASN_ENCODING or PKCS_7_ASN_ENCODING

int Version
One of the CERT_V* values

PyUnicode Subject
Encoded CERT_NAME_INFO struct containing the subject name. Can be decoded using cryptoapi::CryptDecodeObjectEx with X509_UNICODE_NAME, or formatted using cryptoapi::CertNameToStr

PyUnicode Issuer
Certificate Authority that issued certificate as encoded CERT_NAME_INFO. Use cryptoapi::CryptDecodeObjectEx to decode into individual components, or cryptoapi::CertNameToStr to return a single formatted string

PyTime NotBefore
Beginning of certificate's period of validity

PyTime NotAfter
End of certificate's period of validity

str SignatureAlgorithm
Object id of the certifcate's signature algorithm

(PyCERT_EXTENSION,...) Extension
Sequence of CERT_EXTENSION dicts containing certificate's extensions

PyCERT_PUBLIC_KEY_INFO SubjectPublicKeyInfo
Encoded public key of certificate

int SerialNumber
Serial number assigned by the issuer


PyCERT_CONTEXT.CertDeleteCertificateFromStore

CertDeleteCertificateFromStore()

Removes the certificate from its store


PyCERT_CONTEXT.CertEnumCertificateContextProperties

[int,...] = CertEnumCertificateContextProperties()

Lists property ids for the certificate


PyCERT_CONTEXT.CertFreeCertificateContext

CertFreeCertificateContext()

Frees the certificate context


PyCERT_CONTEXT.CertGetCertificateContextProperty

object = CertGetCertificateContextProperty(PropId)

Retrieves the specified property from the certificate

Parameters

PropId : int

One of the CERT_*_PROP_ID constants

PropId | Returned value
CERT_ARCHIVED_PROP_ID | Boolean
CERT_DATE_STAMP_PROP_ID | PyTime
CERT_ACCESS_STATE_PROP_ID | int
CERT_KEY_SPEC_PROP_ID | int
CERT_DESCRIPTION_PROP_ID | Unicode
CERT_FRIENDLY_NAME_PROP_ID | Unicode
CERT_PVK_FILE_PROP_ID | Unicode
CERT_AUTO_ENROLL_PROP_ID | Unicode
CERT_HASH_PROP_ID | String containing a hash
CERT_SHA1_HASH_PROP_ID | String containing a hash
CERT_MD5_HASH_PROP_ID | String containing a hash
CERT_SIGNATURE_HASH_PROP_ID | String containing a hash
CERT_KEY_IDENTIFIER_PROP_ID | String containing a hash
CERT_SUBJECT_NAME_MD5_HASH_PROP_ID | String containing a hash
CERT_KEY_PROV_HANDLE_PROP_ID | PyCRYPTPROV
CERT_SUBJECT_PUBLIC_KEY_MD5_HASH_PROP_ID | String containing a hash
CERT_ISSUER_PUBLIC_KEY_MD5_HASH_PROP_ID | String containing a hash
CERT_CTL_USAGE_PROP_ID | Encoded CTL_USAGE, decode as X509_ENHANCED_KEY_USAGE (CTL_USAGE and CERT_ENHKEY_USAGE are identical)
CERT_ENHKEY_USAGE_PROP_ID | Encoded CTL_USAGE. Can be decoded using cryptoapi::CryptDecodeObjectEx with X509_ENHANCED_KEY_USAGE
CERT_KEY_PROV_INFO_PROP_ID | CRYPT_KEY_PROV_INFO dict
CERT_KEY_CONTEXT_PROP_ID | Dict representing CERT_KEY_CONTEXT struct
CERT_NEXT_UPDATE_LOCATION_PROP_ID | Encoded CERT_ALT_NAME_INFO, decode using cryptoapi::CryptDecodeObjectEx with szOID_NEXT_UPDATE_LOCATION

Return Value

Type of object returned is dependent on the property id requested.


PyCERT_CONTEXT.CertGetEnhancedKeyUsage

tuple = CertGetEnhancedKeyUsage(Flags)

Finds the enhanced key usage property and/or extension for the certificate

Parameters

Flags=0 : int

CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG, CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG, or 0

Return Value

Returns a sequence of usage OIDs


PyCERT_CONTEXT.CertGetIntendedKeyUsage

int = CertGetIntendedKeyUsage()

Returns the intended key usage from the certificate extensions (szOID_KEY_USAGE or szOID_KEY_ATTRIBUTES)

Return Value

Returns a combination of CERT_*_KEY_USAGE values


PyCERT_CONTEXT.CertSerializeCertificateStoreElement

string = CertSerializeCertificateStoreElement(Flags)

Serializes the certificate and its properties

Parameters

Flags=0 : int

Reserved, use only 0 if passed in


PyCERT_CONTEXT.CertSetCertificateContextProperty

CertSetCertificateContextProperty(PropId, Data, Flags)

Sets a property for a certificate

Parameters

PropId : int

Id of property to be set, CERT_*_PROP_ID

Data : object

The value to be set for the property. Type is dependent on PropId. Use None to delete a property.

Flags=0 : int

Combination of CERT_SET_* flags

PropId | Type of input
CERT_ARCHIVED_PROP_ID | None causes Archived flag to be cleared, any other causes it to be set no actual data, non-NULL pvData indicates presence of flag
CERT_DATE_STAMP_PROP_ID | PyTime specifying when cert was added to store
CERT_DESCRIPTION_PROP_ID | Unicode string
CERT_FRIENDLY_NAME_PROP_ID | Unicode string
CERT_PVK_FILE_PROP_ID | Unicode string
CERT_AUTO_ENROLL_PROP_ID | Unicode string
CERT_KEY_SPEC_PROP_ID | Int, usually AT_KEYEXCHANGE or AT_SIGNATURE
CERT_HASH_PROP_ID | String containing the hash
CERT_SHA1_HASH_PROP_ID | String containing the hash
CERT_MD5_HASH_PROP_ID | String containingg the hash
CERT_SIGNATURE_HASH_PROP_ID | String containing the hash
CERT_KEY_IDENTIFIER_PROP_ID | String containing the key id
CERT_SUBJECT_PUBLIC_KEY_MD5_HASH_PROP_ID | String containing the hash
CERT_ISSUER_PUBLIC_KEY_MD5_HASH_PROP_ID | String containing the hash
CERT_SUBJECT_NAME_MD5_HASH_PROP_ID | String containing the hash
CERT_RENEWAL_PROP_ID | String containing the hash
CERT_ENHKEY_USAGE_PROP_ID | String containing an encoded PyCTL_USAGE. Use cryptoapi::CryptEncodeObjectEx with X509_ENHANCED_KEY_USAGE.
CERT_CTL_USAGE_PROP_ID | Same as CERT_ENHKEY_USAGE_PROP_ID


PyCERT_CONTEXT.CertVerifySubjectCertificateContext

int = CertVerifySubjectCertificateContext(Issuer, Flags )

Checks the validity of the certificate

Parameters

Issuer : PyCERT_CONTEXT

Certificate of authority that issued the certificate

Flags : int

Combination of CERT_STORE_REVOCATION_FLAG,CERT_STORE_SIGNATURE_FLAG and CERT_STORE_TIME_VALIDITY_FLAG indicating which checks should be performed

Return Value

Returns flags indicating which validity checks failed, or 0 if all were successful.


PyCERT_CONTEXT.CryptAcquireCertificatePrivateKey

(int,PyCRYPTPROV) = CryptAcquireCertificatePrivateKey(Flags)

Retrieves the private key associated with the certificate

Parameters

Flags=0 : int

Combination of CRYPT_ACQUIRE_*_FLAG constants

Comments

Only the owner of the certificate can use this method

Return Value

Returns the KeySpec (AT_KEYEXCHANGE or AT_SIGNATURE) and a CSP handle to the key


PyCERT_EXTENSION

PyCERT_EXTENSION Object

Dict containing a certificate extension

Properties

str ObjId
The OID identifying the type of extension

boolean Critical
If true, any contraints or limits contained in the extension should be considered absolute

str Value
Binary string containing ASN encoded data. To interpret or display extension data, see cryptoapi::CryptDecodeObjectEx and cryptoapi::CryptFormatObject .

Comments

These extensions are not yet handled by CryptDecodeObjectEx, but can be formatted with CryptFormatObject.
szOID_PRIVATEKEY_USAGE_PERIOD -- ???? CERT_PRIVATE_KEY_VALIDITY ????
szOID_KEY_USAGE_RESTRICTION - CERT_KEY_USAGE_RESTRICTION_INFO


PyCERT_KEY_ATTRIBUTES_INFO

PyCERT_KEY_ATTRIBUTES_INFO Object

Dict representing a CERT_KEY_ATTRIBUTES_INFO struct

Properties

str KeyId
Usually a hash that uniquely identifies the key

PyCRYPT_BIT_BLOB IntendedKeyUsage
Contains a byte with CERT_*_KEY_USAGE flags

dict PrivateKeyUsagePeriod
Private key's begin and end effective dates, may be None


PyCERT_NAME_INFO

PyCERT_NAME_INFO Object

Sequence of CERT_RDN's


PyCERT_NAME_VALUE

PyCERT_NAME_VALUE Object

Dict containing type (CERT_RDN_*) and a unicode string


PyCERT_OTHER_NAME

PyCERT_OTHER_NAME Object

Dict containing {ObjId, Value}. ObjId is one of the string object id's identifying the type of name. Value is a binary string containing an encoded CERT_NAME_VALUE that can be decoded using X509_UNICODE_NAME_VALUE to return the actual unicode string


PyCERT_POLICY_INFO

PyCERT_POLICY_INFO Object

Dict containing a certificate policy

Properties

str PolicyIdentifier
OID identifying the policy

tuple PolicyQualifier
Sequence of CERT_POLICY_QUALIFIER dicts


PyCERT_PUBLIC_KEY_INFO

PyCERT_PUBLIC_KEY_INFO Object

Dict containing an exported public key

Properties

PyCRYPT_ALGORITHM_IDENTIFIER Algorithm
Dict containing OID of the public key algorithm

PyCRYPT_BIT_BLOB PublicKey
Dict containing the encoded public key


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.


PyCOORD

PyCOORD Object

Wrapper for a COORD struct. Create using PyCOORDType(X,Y)

Properties

int X
Horizontal coordinate

int Y
Vertical coordinate


PyCREDENTIAL

PyCREDENTIAL Object

A dictionary containing information for a CREDENTIAL struct

Win32 API References

Search for CREDENTIAL struct at msdn, google or google groups.

Properties

int Flags
Combination of CRED_FLAGS_PROMPT_NOW, CRED_FLAGS_USERNAME_TARGET

int Type
Type of credential, one of CRED_TYPE_* values

PyUnicode TargetName
Target of credential, can end with * for wildcard matching

PyUnicode Comment
Descriptive text

PyTime LastWritten
Modification time, ignored on input

PyUnicode CredentialBlob
Contains password for username credential, or PIN for certificate credential. This member is write-only.

int Persist
Specifies scope of persistence, one of CRED_PERSIST_* values

tuple Attributes
Tuple of PyCREDENTIAL_ATTRIBUTE dicts containing application-specific data, can be None

PyUnicode TargetAlias
Alias for TargetName, only valid with CRED_TYPE_GENERIC

PyUnicode UserName
User to be authenticated by target. Can be of the form username@domain or domain\\username. For CRED_TYPE_DOMAIN_CERTIFICATE, use win32cred::CredMarshalCredential to marshal the SHA1 hash of user's certficate


PyCREDENTIAL_ATTRIBUTE

PyCREDENTIAL_ATTRIBUTE Object

A dictionary containing information for a CREDENTIAL_ATTRIBUTE struct

Win32 API References

Search for CREDENTIAL_ATTRIBUTE at msdn, google or google groups.

Properties

PyUnicode Keyword
Attribute name, at most CRED_MAX_STRING_LENGTH chars

int Flags
Reserved, use only 0

str Value
Attribute value, at most CRED_MAX_VALUE_SIZE bytes. Unicode objects are treated as raw bytes.


PyCREDENTIAL_TARGET_INFORMATION

PyCREDENTIAL_TARGET_INFORMATION Object

A dictionary representing a CREDENTIAL_TARGET_INFORMATION struct

Win32 API References

Search for CREDENTIAL_TARGET_INFORMATION at msdn, google or google groups.

Properties

PyUnicode TargetName
Target of credentials

PyUnicode NetbiosServerName

PyUnicode DnsServerName

PyUnicode NetbiosDomainName

PyUnicode DnsDomainName

PyUnicode DnsTreeName

PyUnicode PackageName
Name of security package which mapped TargetName

int Flags
CRED_TI_* flags

(int,...) CredTypes
Tuple of CRED_TYPE_* values indicating which types of credentials are acceptable to target


PyCREDUI_INFO

PyCREDUI_INFO Object

A dictionary representing a CREDUI_INFO structure, used with win32cred::CredUIPromptForCredentials

Comments

All members are optional

Win32 API References

Search for CREDUI_INFO at msdn, google or google groups.

Properties

PyHANDLE Parent
Handle to parent window, can be None

PyUnicode MessageText
Message to appear in dialog

PyUnicode CaptionText
Title of the dialog window

PyHANDLE Banner
Handle to a bitmap to be displayed


PyCRYPTHASH

PyCRYPTHASH Object

Handle to a cryptographic hash

Methods

CryptDestroyHash
Frees the hash object

CryptDuplicateHash
Clones the hash object

CryptHashData
Adds data to the hash

CryptHashSessionKey
Hashes a session key

CryptSignHash
Signs the hash

CryptVerifySignature
Verifies that a signature matches hashed data

CryptGetHashParam
Retrieves the specified attribute of the hash


PyCRYPTHASH.CryptDestroyHash

CryptDestroyHash()

Frees the hash object


PyCRYPTHASH.CryptDuplicateHash

PyCRYPTHASH = CryptDuplicateHash(Flags)

Clones the hash object

Parameters

Flags=0 : int

Reserved, use 0 if passed


PyCRYPTHASH.CryptGetHashParam

int/str = CryptGetHashParam(Param, Flags )

Retrieves the specified attribute of the hash

Parameters

Param : int

The parameter to retrieve: HP_ALGID, HP_HASHSIZE, or HP_HASHVAL

Flags=0 : int

Reserved, use 0 if passed in

Comments

After this method has been called, no more data can be hashed

Return Value

Type of returned object is dependent on the Param passed in


PyCRYPTHASH.CryptHashData

CryptHashData(Data, Flags)

Adds data to the hash

Parameters

Data : string

Data to be hashed

Flags=0 : int

CRYPT_USERDATA or 0

Comments

If Flags is CRYPT_USERDATA, provider is expected to prompt user to enter data. MSDN says that MS CSPs ignore this flag


PyCRYPTHASH.CryptHashSessionKey

CryptHashSessionKey(Key, Flags)

Hashes a session key

Parameters

Key : PyCRYPTKEY

The session key to be hashed

Flags=0 : int

CRYPT_LITTLE_ENDIAN or 0


PyCRYPTHASH.CryptSignHash

string = CryptSignHash(KeySpec, Flags )

Signs the hash

Parameters

KeySpec : int

The key to be used to sign the hash, AT_KEYEXCHANGE,AT_SIGNATURE

Flags=0 : int

CRYPT_NOHASHOID,CRYPT_X931_FORMAT or 0

Comments

This methods signs only the hash, not the data that the hash represents


PyCRYPTHASH.CryptVerifySignature

CryptVerifySignature(Signature, PubKey, Flags)

Verifies that a signature matches hashed data

Parameters

Signature : string

Signature data to verify

PubKey : PyCRYPTKEY

Public key of signer

Flags=0 : int

CRYPT_NOHASHOID,CRYPT_X931_FORMAT or 0


PyCRYPTKEY

PyCRYPTKEY Object

Handle to a cryptographic key

Methods

CryptDestroyKey
Releases the handle to the key

CryptExportKey
Securely exports key or key pair

CryptGetKeyParam
Retrieves key parameters

CryptDuplicateKey
Creates an independent copy of the key

CryptEncrypt
Encrypts data

CryptDecrypt
Decrypts data

Properties

int HCRYPTPROV
CSP used by the key

int HCRYPTKEY
Plain integer handle to the key


PyCRYPTKEY.CryptDecrypt

str = CryptDecrypt(Final, Data , Hash , Flags )

Decrypts data

Parameters

Final : int

Boolean, use True is this is last (or only) operation

Data : buffer

Data to be decrypted

Hash=None : PyCRYPTHASH

Hash to be used in signature verification, can be None

Flags=0 : int

Reserved, use only 0


PyCRYPTKEY.CryptDestroyKey

CryptDestroyKey()

Releases the handle to the key (does not delete permanent keys)


PyCRYPTKEY.CryptDuplicateKey

PyCRYPTKEY = CryptDuplicateKey(Reserved, Flags )

Creates an independent copy of the key

Parameters

Reserved=0 : int

Use 0 if passed in

Flags=0 : int

Also reserved, use 0


PyCRYPTKEY.CryptEncrypt

str = CryptEncrypt(Final, Data , Hash , Flags )

Encrypts and optionally hashes data

Parameters

Final : int

Boolean, use True if this is final encryption operation

Data : buffer

Data to be encrypted

Hash=None : PyCRYPTHASH

Hash to be updated with data passed in, can be None

Flags=0 : int

Reserved, use 0 if passed in


PyCRYPTKEY.CryptExportKey

str = CryptExportKey(ExpKey, BlobType , Flags )

Exports key or key pair as an encrypted blob

Parameters

ExpKey : PyCRYPTKEY

Public key or session key of destination user. Use None if exporting a PUBLICKEYBLOB

BlobType : int

One of OPAQUEKEYBLOB,PRIVATEKEYBLOB,PUBLICKEYBLOB,SIMPLEBLOB,PLAINTEXTKEYBLOB,SYMMETRICWRAPKEYBLOB

Flags=0 : int

Combination of CRYPT_DESTROYKEY,CRYPT_SSL2_FALLBACK,CRYPT_OAEP or 0

Return Value

Returns a binary blob that can be imported via PyCRYPTPROV::CryptImportKey


PyCRYPTKEY.CryptGetKeyParam

object = CryptGetKeyParam(Param, Flags )

Retrieves key parameters

Parameters

Param : int

One of the KP_* constants

Flags=0 : int

Reserved, use only 0

Return Value

Type of returned object is dependent on the requested attribute


PyCRYPTMSG

PyCRYPTMSG Object

Wrapper for a cryptographic message handle

Methods

CryptMsgClose
Closes the message handle

Properties

int HCRYPTMSG
Raw message handle


PyCRYPTMSG.CryptMsgClose

CryptMsgClose()

Closes the message handle


PyCRYPTPROTECT_PROMPTSTRUCT

PyCRYPTPROTECT_PROMPTSTRUCT Object

A tuple representing a CRYPTPROTECT_PROMPTSTRUCT structure

Items

[0] int : flags

Combination of CRYPTPROTECT_PROMPT_* flags

[1] int : hwndApp

parent hwnd (default is 0)

[2] PyUnicode : prompt

A prompt string (default is None)


PyCRYPTPROV

PyCRYPTPROV Object

Handle to a cryptographic provider, created using cryptoapi::CryptAcquireContext

Methods

CryptReleaseContext
Releases the CSP handle

CryptGenKey
Generates a key pair or a session key

CryptGetProvParam
Retrieves specified attribute of provider

CryptGetUserKey
Returns a handle to one of user's key pairs

CryptGenRandom
Generates random data of specified length

CryptCreateHash
Creates a hash object for hashing large amounts of data

CryptImportKey
Imports a key exported by PyCRYPTKEY::CryptExportKey

CryptExportPublicKeyInfo
Exports a public key to send to other users

CryptImportPublicKeyInfo
Imports another user's public key


PyCRYPTPROV.CryptCreateHash

PyCRYPTHASH = CryptCreateHash(Algid, Key , Flags )

Creates a hash object for hashing large amounts of data

Parameters

Algid : int

An algorithm identifier, CALG_*.

Key=None : PyCRYPTKEY

Used only for keyed hashes (MAC or HMAC), use None otherwise

Flags=0 : int

Reserved, use 0 if passed in


PyCRYPTPROV.CryptExportPublicKeyInfo

PyCERT_PUBLIC_KEY_INFO = CryptExportPublicKeyInfo(KeySpec, CertEncodingType )

Exports a public key to send to other users Returned dict can be serialized for sending to another python application using pickle.dump

Parameters

KeySpec : int

AT_KEYEXCHANGE or AT_SIGNATURE

CertEncodingType=X509_ASN_ENCODING combined with PKCS_7_ASN_ENCODING : int

Specifies encoding for exported key info


PyCRYPTPROV.CryptGenKey

PyCRYPTKEY = CryptGenKey(Algid, Flags , KeyLen )

Generates a key pair or a session key

Parameters

Algid : int

Algorithm identifier, one of the CALG_* values, or AT_KEYEXCHANGE/AT_SIGNATURE

Flags : int

Combination of CRYPT_CREATE_SALT,CRYPT_EXPORTABLE,CRYPT_NO_SALT,CRYPT_PREGEN,CRYPT_USER_PROTECTED,CRYPT_ARCHIVABLE

KeyLen=0 : int

Length of key to generate, can be 0 to use provider's default key length

Comments

Differs from Api call in that the length is passed in separately


PyCRYPTPROV.CryptGenRandom

string = CryptGenRandom(Len, SeedData )

Generates random data of specified length

Parameters

Len : int

Number of bytes to generate

SeedData=None : string

Random seed data


PyCRYPTPROV.CryptGetProvParam

CryptGetProvParam(Param, Flags)

Retrieves specified attribute of provider

Parameters

Param : int

One of the PP_* values

Flags=0 : int

If param if PP_KEYSET_SEC_DESCR, can be a combination of OWNER_SECURITY_INFORMATION,GROUP_SECURITY_INFORMATION,DACL_SECURITY_INFORMATION,SACL_SECURITY_INFORMATION

Return Value

Type of returned object is dependent on the attribute requested


PyCRYPTPROV.CryptGetUserKey

PyCRYPTKEY = CryptGetUserKey(KeySpec)

Returns a handle to one of user's key pairs

Parameters

KeySpec : int

AT_KEYEXCHANGE or AT_SIGNATURE (some providers may implement extra key specs)


PyCRYPTPROV.CryptImportKey

PyCRYPTKEY = CryptImportKey(Data, PubKey , Flags )

Imports a key exported by PyCRYPTKEY::CryptExportKey

Parameters

Data : buffer

The key blob to be imported

PubKey=None : PyCRYPTKEY

Key to be used to decrypt the blob, not used for importing public keys

Flags=0 : int

Combination of CRYPT_EXPORTABLE, CRYPT_OAEP, CRYPT_NO_SALT, CRYPT_USER_PROTECTED


PyCRYPTPROV.CryptImportPublicKeyInfo

PyCRYPTKEY = CryptImportPublicKeyInfo(Info, CertEncodingType )

Imports another user's public key

Parameters

Info : dict

PyCERT_PUBLIC_KEY_INFO dictionary as returned by PyCRYPTPROV::CryptExportPublicKeyInfo

CertEncodingType=X509_ASN_ENCODING combined with PKCS_7_ASN_ENCODING : int

Specifies encoding for exported key info


PyCRYPTPROV.CryptReleaseContext

CryptReleaseContext(Flags)

Releases the CSP handle

Parameters

Flags=0 : int

Reserved, use 0 if passed in


PyCRYPT_ALGORITHM_IDENTIFIER

PyCRYPT_ALGORITHM_IDENTIFIER Object

Dictionary containing information that identifies an encryption algorithm and any extra parameters it requires

Properties

str ObjId
An szOID_* string identifying the algorithm

str Parameters
Blob of binary data containing encoded parameters


PyCRYPT_ATTRIBUTE

PyCRYPT_ATTRIBUTE Object

Dict representing a CRYPT_ATTRIBUTE struct

Properties

str ObjId
An szOID_* string identifying the attribute

(buffer,...) Value
A sequence of buffers containing the attribute values


PyCRYPT_BIT_BLOB

PyCRYPT_BIT_BLOB Object

Dict containing raw data of a certain bit length

Properties

buffer Data
Binary data

int UnusedBits
Nbr of bits of last byte that are unused


PyCRYPT_DECRYPT_MESSAGE_PARA

PyCRYPT_DECRYPT_MESSAGE_PARA Object

Dict containing message decryption parameters, used with cryptoapi::CryptDecodeMessage and cryptoapi::CryptDecryptMessage

Properties

(PyCERT_STORE ,...) CertStores
Sequence of certificate stores to be searched for a certificate with a private key that can be used to decrypt the message

int MsgAndCertEncodingType
Encoding types, optional. Defaults to X509_ASN_ENCODING combined with PKCS_7_ASN_ENCODING

int Flags
Optional. CRYPT_MESSAGE_SILENT_KEYSET_FLAG can be used to suppress any dialogs that might be triggered by accessing a key container, such as a request for a PIN.


PyCRYPT_ENCRYPT_MESSAGE_PARA

PyCRYPT_ENCRYPT_MESSAGE_PARA Object

Dictionary of encryption parameters used with cryptoapi::CryptEncryptMessage

Properties

PyCRYPT_ALGORITHM_IDENTIFIER ContentEncryptionAlgorithm
Identifies the algorithm to be used

PyCRYPTPROV CryptProv
Optional. Handle to provider that will perform encryption, can be None for default provider

object EncryptionAuxInfo
Optional. Extra info required by some CSP's. Not supported yet, use only None

int Flags
Optional. Combination of CRYPT_MESSAGE_*_FLAG constants

int InnerContentType
Optional. Only used if message to be encrypted is already encoded

int MsgEncodingType
Optional. Defaults to X509_ASN_ENCODING combined with PKCS_7_ASN_ENCODING


PyCRYPT_SIGN_MESSAGE_PARA

PyCRYPT_SIGN_MESSAGE_PARA Object

Dict of parms defining how a message will be signed

Properties

PyCERT_CONTEXT SigningCert
Certficate to be used to sign message

PyCRYPT_ALGORITHM_IDENTIFIER HashAlgorithm
Algorithm to be used for signed hash

None HashAuxInfo
Optional. Param is reserved, use only None.

(PyCERT_CONTEXT,...) MsgCert
Optional sequence of certificate to be included in the message.

(CRL_CONTEXT,...) MsgCrl
Optional. Sequence of certificate revocation lists. Not yet supported, use only None.

(PyCRYPT_ATTRIBUTE,...) AuthAttr
Sequence of canonical attributes to be added to the message

(PyCRYPT_ATTRIBUTE,...) UnauthAttr
Sequence of arbitrary attributes

int Flags
Optional CRYPT_MESSAGE_*_FLAG that indicates content type if output is to be further encoded.

int InnerContentType
Optional, one of the CMSG_* content types if message is already encoded, .

int MsgEncodingType
Encoding types, optional. Defaults to X509_ASN_ENCODING combined with PKCS_7_ASN_ENCODING


PyCRYPT_VERIFY_MESSAGE_PARA

PyCRYPT_VERIFY_MESSAGE_PARA Object

Dict of verification parameters to be used with cryptoapi::CryptDecodeMessage or cryptoapi::CryptVerifyMessageSignature . All parameters are optional. Can be either an empty dict or None to use all defaults.

Properties

int MsgAndCertEncodingType
Encoding types, defaults to X509_ASN_ENCODING combined with PKCS_7_ASN_ENCODING

PyCRYPTPROV CryptProv
CSP to be used to verify signature. Use None for default provider.

function PyGetSignerCertificate
Callback function that locates signer's certificate.

object GetArg
Argument to be passed to above function, can be any object.


PyCTL_CONTEXT

PyCTL_CONTEXT Object

Object containing a Certificate Trust List

Methods

CertFreeCTLContext
Closes the context handle

CertEnumCTLContextProperties
Lists property id's for the context

CertEnumSubjectInSortedCTL
Retrieves trusted subjects contained in CTL

CertDeleteCTLFromStore
Removes the CTL from the store that it is contained in

CertSerializeCTLStoreElement
Serializes the CTL and its properties

Properties

int HCTL_CONTEXT
Raw message handle


PyCTL_CONTEXT.CertDeleteCTLFromStore

CertDeleteCTLFromStore()

Removes the CTL from the store that it is contained in


PyCTL_CONTEXT.CertEnumCTLContextProperties

(int,...) = CertEnumCTLContextProperties()

Lists property id's for the context


PyCTL_CONTEXT.CertEnumSubjectInSortedCTL

((str,str),...) = CertEnumSubjectInSortedCTL()

Retrieves trusted subjects contained in CRL

Return Value

Returns a sequence of tuples containing two strings (SubjectIdentifier, EncodedAttributes)


PyCTL_CONTEXT.CertFreeCTLContext

CertFreeCTLContext()

Closes the CTL handle


PyCTL_CONTEXT.CertSerializeCTLStoreElement

string = CertSerializeCTLStoreElement(Flags)

Serializes the CTL and its properties

Parameters

Flags=0 : int

Reserved, use only 0 if passed in


PyCTL_USAGE

PyCTL_USAGE Object

Sequence of string OIDs (szOID_*). This struct is identical to CERT_ENHKEY_USAGE.


PyConsoleScreenBuffer

PyConsoleScreenBuffer Object

Handle to a console screen buffer Create using win32console::CreateConsoleScreenBuffer or win32console::GetStdHandle Use PyConsoleScreenBufferType(Handle) to wrap a pre-existing handle as returned by win32api::GetStdHandle. Will also accept a handle created by win32file::CreateFile for CONIN$ or CONOUT$. When an existing handle is wrapped, a copy is made using DuplicateHandle, and caller is still responsible for any cleanup of original handle.

Methods

Detach
Releases reference to handle without closing it

Close
Closes the handle

SetConsoleActiveScreenBuffer
Sets this handle as the currently display screen buffer

GetConsoleCursorInfo
Retrieves size and visibility of console's cursor

SetConsoleCursorInfo
Sets the size and visibility of console's cursor

GetConsoleMode
Returns the input or output mode of the console buffer

SetConsoleMode
Sets the input or output mode of the console buffer

ReadConsole
Reads characters from the console input buffer

WriteConsole
Writes characters at current cursor position

FlushConsoleInputBuffer
Flush input buffer for console

SetConsoleTextAttribute
Sets character attributes for subsequent write operations

SetConsoleCursorPosition
Sets the console screen buffer's cursor position

SetConsoleScreenBufferSize
Sets the size of the console screen buffer

SetConsoleWindowInfo
Changes size and position of a console's window

GetConsoleScreenBufferInfo
Returns the state of the screen buffer

GetLargestConsoleWindowSize
Returns the largest possible size for the console's window

FillConsoleOutputAttribute
Set text attributes for a consecutive series of characters

FillConsoleOutputCharacter
Sets consecutive character positions to a specified character

ReadConsoleOutputCharacter
Reads consecutive characters from a starting position

ReadConsoleOutputAttribute
Retrieves attributes from consecutive character cells

WriteConsoleOutputCharacter
Writes a string of characters at a specified position

WriteConsoleOutputAttribute
Sets the attributes of a range of character cells

ScrollConsoleScreenBuffer
Scrolls a region of the display

GetCurrentConsoleFont
Returns the currently displayed font

GetConsoleFontSize
Returns size of specified font for the console

SetConsoleFont
Changes the font used by the screen buffer

SetStdHandle
Replaces one of calling process's standard handles with this handle

SetConsoleDisplayMode
Sets the display mode of the console buffer

WriteConsoleInput
Places input records in the console's input queue

ReadConsoleInput
Reads input records and removes them from the input queue

PeekConsoleInput
Returns pending input records without removing them from the input queue

GetNumberOfConsoleInputEvents
Returns the number of unread records in the input queue


PyConsoleScreenBuffer.FillConsoleOutputAttribute

int = FillConsoleOutputAttribute(Attribute, Length , WriteCoord )

Set text attributes for a consecutive series of characters

Parameters

Attribute : int

Text attributes to be set, combination of FOREGROUND_*, BACKGROUND_*, and COMMON_LVB_* constants

Length : int

The number of characters to set

WriteCoord : PyCOORD

The screen position to begin at

Return Value

Returns the number of character cells whose attributes were set


PyConsoleScreenBuffer.FillConsoleOutputCharacter

int = FillConsoleOutputCharacter(Character, Length , WriteCoord )

Sets consecutive character positions to a specified character

Parameters

Character : PyUNICODE

A single character to be used to fill the specified range

Length : int

The number of characters positions to fill

WriteCoord : PyCOORD

The screen position to begin at

Return Value

Returns the number of characters actually written


PyConsoleScreenBuffer.FlushConsoleInputBuffer

FlushConsoleInputBuffer()

Flush input buffer


PyConsoleScreenBuffer.GetConsoleCursorInfo

(Size, bVisible) = GetConsoleCursorInfo()

Retrieves size and visibility of console's cursor

Return Value

Returns the size of the console's cursor expressed as a percentage of character size, and a boolen indicating if cursor is visible


PyConsoleScreenBuffer.GetConsoleFontSize

PyCOORD = GetConsoleFontSize(Font)

Returns size of specified font for the console

Parameters

Font : int

Index of font as returned by GetCurrentConsoleFont

Comments

Only exists on XP or later.


PyConsoleScreenBuffer.GetConsoleMode

int = GetConsoleMode()

Returns the input or output mode of the console buffer

Return Value

Returns a combination of ENABLE_*_INPUT or ENABLE_*_OUTPUT constants


PyConsoleScreenBuffer.GetConsoleScreenBufferInfo

dict = GetConsoleScreenBufferInfo()

Returns the state of the screen buffer


PyConsoleScreenBuffer.GetCurrentConsoleFont

(int, PyCOORD) = GetCurrentConsoleFont(MaximumWindow)

Returns currently displayed font

Parameters

MaximumWindow=False : boolean

If True, retrieves font size for maximum window size

Comments

Only exists on XP or later.
MSDN docs claim the returned COORD is the font size, but it's actually the window size.
Use PyConsoleScreenBuffer::GetConsoleFontSize for the font size.

Return Value

Returns the index of current font and window size


PyConsoleScreenBuffer.GetLargestConsoleWindowSize

PyCOORD = GetLargestConsoleWindowSize()

Returns the largest possible size for the console's window


PyConsoleScreenBuffer.GetNumberOfConsoleInputEvents

int = GetNumberOfConsoleInputEvents()

Returns the number of unread records in the input queue


PyConsoleScreenBuffer.PeekConsoleInput

(PyINPUT_RECORD,...) = PeekConsoleInput(Length)

Returns pending input records without removing them from the input queue

Parameters

Length : int

The number of input records to read

Comments

This function does not block as ReadConsoleInput does.
The number of records returned may be less than the nbr requested

Return Value

Returns a sequence of PyINPUT_RECORD objects


PyConsoleScreenBuffer.ReadConsole

PyUNICODE = ReadConsole(NumberOfCharsToRead)

Reads characters from the console input buffer

Parameters

NumberOfCharsToRead : int

Characters to read


PyConsoleScreenBuffer.ReadConsoleInput

(PyINPUT_RECORD,...) = ReadConsoleInput(Length)

Reads input records and removes them from the input queue

Parameters

Length : int

The number of input records to read

Comments

This functions blocks until at least one record is read.
The number of records returned may be less than the nbr requested

Return Value

Returns a sequence of PyINPUT_RECORD objects


PyConsoleScreenBuffer.ReadConsoleOutputAttribute

(int,...) = ReadConsoleOutputAttribute(Length, ReadCoord )

Retrieves attributes from consecutive character cells

Parameters

Length : int

The number of attributes to read

ReadCoord : PyCOORD

The screen position from which to start reading

Return Value

Returns a sequence of ints containing the attributes of a range of characters


PyConsoleScreenBuffer.ReadConsoleOutputCharacter

PyUnicode = ReadConsoleOutputCharacter(Length, ReadCoord )

Reads consecutive characters from a starting position

Parameters

Length : int

The number of characters positions to read

ReadCoord : PyCOORD

The screen position start reading from


PyConsoleScreenBuffer.ScrollConsoleScreenBuffer

ScrollConsoleScreenBuffer(ScrollRectangle, ClipRectangle, DestinationOrigin, FillCharacter, FillAttribute)

Scrolls a region of the display

Parameters

ScrollRectangle : PySMALL_RECT

The region to be scrolled

ClipRectangle : PySMALL_RECT

Rectangle that limits display area affected, can be None

DestinationOrigin : PyCOORD

The position to which ScrollRectangle will be moved

FillCharacter : PyUNICODE

Character to fill in the area left blank by scrolling operation

FillAttribute : int

Text attributes to apply to FillCharacter


PyConsoleScreenBuffer.SetConsoleActiveScreenBuffer

SetConsoleActiveScreenBuffer()

Sets this handle as the currently displayed screen buffer


PyConsoleScreenBuffer.SetConsoleCursorInfo

SetConsoleCursorInfo(Size, Visible)

Sets the size and visibility of console's cursor

Parameters

Size : int

Percentage of character size that cursor will occupy

Visible : boolen

Determines if cursor is visible


PyConsoleScreenBuffer.SetConsoleCursorPosition

SetConsoleCursorPosition(CursorPosition)

Sets the console screen buffer's cursor position

Parameters

CursorPosition : PyCOORD

A PyCOORD containing the new cursor position


PyConsoleScreenBuffer.SetConsoleDisplayMode

SetConsoleDisplayMode(Flags, NewScreenBufferDimensions)

Sets the display mode of the console buffer

Parameters

Flags : int

CONSOLE_FULLSCREEN_MODE or CONSOLE_WINDOWED_MODE

NewScreenBufferDimensions : PyCOORD

New size of the screen buffer in characters


PyConsoleScreenBuffer.SetConsoleFont

SetConsoleFont(Font)

Changes the font used by the screen buffer

Parameters

Font : int

The number of the font to be set

Comments

Function is not documented on MSDN


PyConsoleScreenBuffer.SetConsoleMode

SetConsoleMode(Mode)

Sets the input or output mode of the console buffer

Parameters

Mode : int

Combination of ENABLE_*_INPUT or ENABLE_*_OUTPUT constants


PyConsoleScreenBuffer.SetConsoleScreenBufferSize

SetConsoleScreenBufferSize(Size)

Sets the size of the console screen buffer

Parameters

Size : PyCOORD

COORD object containing the new dimensions


PyConsoleScreenBuffer.SetConsoleTextAttribute

SetConsoleTextAttribute(Attributes)

Sets character attributes for subsequent write operations

Parameters

Attributes : int

Attributes to be set, combination of FOREGROUND_*, BACKGROUND_*, and COMMON_LVB_* constants


PyConsoleScreenBuffer.SetConsoleWindowInfo

SetConsoleWindowInfo(Absolute, ConsoleWindow)

Changes size and position of a console's window

Parameters

Absolute : boolean

If False, coordinates are relative to current position

ConsoleWindow : PySMALL_RECT

A SMALL_RECT containing the new window coordinates


PyConsoleScreenBuffer.SetStdHandle

SetStdHandle(StdHandle)

Replaces one of calling process's standard handles with this handle

Parameters

StdHandle : int

Specifies handle to be replaced - STD_INPUT_HANDLE, STD_OUTPUT_HANDLE, or STD_ERROR_HANDLE


PyConsoleScreenBuffer.WriteConsole

int = WriteConsole(Buffer)

Writes characters at current cursor position

Parameters

Buffer : PyUNICODE

String or Unicode to be written to console

Return Value

Returns the number of characters written


PyConsoleScreenBuffer.WriteConsoleInput

int = WriteConsoleInput(Buffer)

Places input records in the console's input queue

Parameters

Buffer : (PyINPUT_RECORD,...)

A sequence of PyINPUT_RECORD objects

Return Value

Returns the number of records written


PyConsoleScreenBuffer.WriteConsoleOutputAttribute

int = WriteConsoleOutputAttribute(Attributes, WriteCoord )

Sets the attributes of a range of character cells

Parameters

Attributes : (int,...)

A sequence of ints containing the attributes to be set

WriteCoord : PyCOORD

The screen position at which to start writing

Return Value

Returns the number of attributes set


PyConsoleScreenBuffer.WriteConsoleOutputCharacter

int = WriteConsoleOutputCharacter(Characters, WriteCoord )

Writes a string of characters at a specified position

Parameters

Characters : PyUNICODE

Characters to be written

WriteCoord : PyCOORD

The screen position at which to start writing

Return Value

Returns the number of characters actually written


PyCredHandle

PyCredHandle Object

Handle to a set of logon credentials, used with sspi authentication functions

Comments

This object is usually created using win32security::AcquireCredentialsHandle. An uninitialized handle can also be created using win32security.PyCredHandleType()

Methods

Detach
Disassociates object from handle and returns integer value of handle (prevents automatic freeing of credentials when object is deallocated),

FreeCredentialsHandle
Releases the credentials handle

QueryCredentialsAttributes
Returns information about the credentials


PyCredHandle.Detach

long = Detach()

Disassociates object from handle and returns integer value of handle,


PyCredHandle.FreeCredentialsHandle

FreeCredentialsHandle()

Releases the credentials handle and makes object unusable


PyCredHandle.QueryCredentialsAttributes

QueryCredentialsAttributes(Attribute)

Returns information about the credentials

Parameters

Attribute : int

SECPKG_* constant specifying which type of information to return

Comments

Only SECPKG_CRED_ATTR_NAMES currently supported

Attribute | Return type
SECPKG_CRED_ATTR_NAMES | PyUnicode - returns username that credentials represent
SECPKG_ATTR_SUPPORTED_ALGS | Not supported yet SecPkgCred_SupportedAlgs:
SECPKG_ATTR_CIPHER_STRENGTHS | Not supported yet SecPkgCred_CipherStrengths:
SECPKG_ATTR_SUPPORTED_PROTOCOLS | Not supported yet SecPkgCred_SupportedProtocols:

Return Value

Type of returned values is dependent on Attribute


PyCtxtHandle

PyCtxtHandle Object

Security context handle, as used with sspi functions

Comments

Create using win32security.PyCtxtHandleType(). The handle must be initialized by passing it to win32security::InitializeSecurityContext or win32security::AcceptSecurityContext

Methods

Detach
Disassociates object from handle and returns integer value of handle

CompleteAuthToken
Completes the authentication token

QueryContextAttributes
Retrieves info about a security context

DeleteSecurityContext
Frees the security context and invalidates the handle

QuerySecurityContextToken
Returns the access token for a security context

MakeSignature
Generates a signature for a message

VerifySignature
Verifies a signature created using PyCtxtHandle::MakeSignature

EncryptMessage
Encrypts data with security context's session key

DecryptMessage
Decrypts data encrypted by PyCtxtHandle::EncryptMessage

ImpersonateSecurityContext
Causes a server to act in the security context of an authenticated client

RevertSecurityContext
Stops impersonation of a client initiated by PyCtxtHandle::ImpersonateSecurityContext


PyCtxtHandle.CompleteAuthToken

CompleteAuthToken(Token)

Completes the authentication token

Parameters

Token : PySecBufferDesc

The buffer that contains the token buffer used when the context was initialized

Comments

This method should be invoked on a context handle if the InitializeSecurityContext call that created it returned SEC_I_COMPLETE_NEEDED or SEC_I_COMPLETE_AND_CONTINUE


PyCtxtHandle.DecryptMessage

DecryptMessage(Message, MessageSeqNo)

Decrypts data produced by PyCtxtHandle::EncryptMessage

Parameters

Message : PySecBufferDesc

PySecBufferDesc containing data buffers to be decrypted

MessageSeqNo : int

A sequential number used by some packages to verify that no extraneous messages have been received

Comments

The buffer configuration is dependent on the security package. Usually there is one buffer of type SECBUFFER_DATA which is modified in place and a second buffer of type SECBUFFER_TOKEN or SECBUFFER_PADDING containing signature, padding, or other extra data from encryption process that doesn't fit in first buffer

Return Value

Returns flags specfic to security package indicating quality of protection


PyCtxtHandle.DeleteSecurityContext

DeleteSecurityContext()

Frees the security context and invalidates the handle


PyCtxtHandle.Detach

long = Detach()

Disassociates object from handle and returns integer value of handle

Comments

Use when the security context needs to persist beyond the lifetime of the Python object


PyCtxtHandle.EncryptMessage

EncryptMessage(fqop, Message, MessageSeqNo)

Encrypts data with session key of security context

Parameters

fqop : int

Flags that indicate quality of protection desired, specific to each security package

Message : PySecBufferDesc

PySecBufferDesc that contains data buffer(s) to be encrypted

MessageSeqNo : int

A sequential number used by some packages to verify that no extraneous messages have been received

Comments

The buffer configuration is dependent on the security package. Usually there is one input buffer of type SECBUFFER_DATA to be encrypted in-place and another empty buffer of type SECBUFFER_PADDING or SECBUFFER_TOKEN to receive signature or padding data

Return Value

Returns None on success, and buffer(s) will contain encrypted data


PyCtxtHandle.ImpersonateSecurityContext

ImpersonateSecurityContext()

Impersonates a client security context


PyCtxtHandle.MakeSignature

MakeSignature(fqop, Message, MessageSeqNo)

Creates a crytographic hash of a message using session key of the security context

Parameters

fqop : int

Flags that indicate quality of protection desired, specific to each security package

Message : PySecBufferDesc

Buffer set that includes buffers for input data and output signature

MessageSeqNo : int

A sequential number used by some packages to verify that no extraneous messages have been received

Comments

The buffer configuration is dependent on the security package. Usually there is one input buffer of type SECBUFFER_DATA and an output buffer of type SECBUFFER_TOKEN

Return Value

Returns None on success, and output buffer in Message will contain the signature


PyCtxtHandle.QueryContextAttributes

QueryContextAttributes(Attribute)

Retrieves info about a security context

Parameters

Attribute : int

SECPKG_ATTR_* constant

Comments

Not all attributes are available for every security package

Attribute | Return type
SECPKG_ATTR_ACCESS_TOKEN | PyHANDLE - returns a handle to the context's access token
SECPKG_ATTR_AUTHORITY | PyUnicode - returns the name of the authenticating entity
SECPKG_ATTR_CIPHER_STRENGTHS | (int,int) - returns the mininum and maximum cipher strengths allowed
SECPKG_ATTR_CONNECTION_INFO | Returns a dictionary of connection info representing a SecPkgContext_ConnectionInfo struct
SECPKG_ATTR_SESSION_KEY | string - returns the session key for the context
SECPKG_ATTR_ISSUER_LIST_EX | (int, string) - Returns names of trusted certificate issuers
SECPKG_ATTR_FLAGS | int - returns flags negotiated when context was established
SECPKG_ATTR_PACKAGE_INFO | dict - returns dictionary containing info for context's security package
SECPKG_ATTR_NEGOTIATION_INFO | (int, dict) - returns state of negotiation (SECPKG_NEGOTIATION_COMPLETE, SECPKG_NEGOTIATION_OPTIMISTIC,SECPKG_NEGOTIATION_IN_PROGRESS) and info for negotiated package
SECPKG_ATTR_NAMES | PyUnicode - returns the user name for the context
SECPKG_ATTR_SIZES | dict containing buffer sizes to be used with the context
SECPKG_ATTR_PASSWORD_EXPIRY | PyTime - returns time password expires
SECPKG_ATTR_LIFESPAN | (PyTime,PyTime) - returns time period during which context is valid
SECPKG_ATTR_NATIVE_NAMES | (PyUnicode,PyUnicode) - returns client and server names
SECPKG_ATTR_TARGET_INFORMATION | string - returns the target for the context
SECPKG_ATTR_STREAM_SIZES | dict (see SecPkgContext_StreamSizes) containing message buffer sizes
SECPKG_ATTR_KEY_INFO | dict (see SecPkgContext_KeyInfo) containing encryption key parameters
SECPKG_ATTR_DCE_INFO | not supported yet SecPkgContext_DceInfo
SECPKG_ATTR_LOCAL_CERT_CONTEXT | not supported yet PCCERT_CONTEXT
SECPKG_ATTR_REMOTE_CERT_CONTEXT | not supported yet PCCERT_CONTEXT
SECPKG_ATTR_ROOT_STORE | not supported yet HCERTCONTEXT
SECPKG_ATTR_SUPPORTED_ALGS | not supported yet SecPkgCred_SupportedAlgs
SECPKG_ATTR_SUPPORTED_PROTOCOLS | not supported yet SecPkgCred_SupportedProtocols


PyCtxtHandle.QuerySecurityContextToken

PyHandle = QuerySecurityContextToken()

Returns the access token for a security context


PyCtxtHandle.RevertSecurityContext

RevertSecurityContext()

Stops impersonation of client context (see PyCtxtHandle::ImpersonateSecurityContext)


PyCtxtHandle.VerifySignature

VerifySignature(Message, MessageSeqNo)

Verifies a signature created using PyCtxtHandle::MakeSignature

Parameters

Message : PySecBufferDesc

SecBufferDesc that contains data buffer and signature buffer

MessageSeqNo : int

A sequential number used by some packages to verify that no extraneous messages have been received

Comments

The buffer configuration is dependent on the security package. Usually there is a data buffer of type SECBUFFER_DATA and a signature buffer of type SECBUFFER_TOKEN

Return Value

Returns quality of protection flags used to create signature


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


PyDEVMODE

PyDEVMODE Object

Python object wrapping a DEVMODE structure

Methods

Clear
Resets all members of the structure

Properties

int SpecVersion
Should always be set to DM_SPECVERSION

int DriverVersion
Version nbr assigned to printer driver by vendor

int Size
Size of structure

int DriverExtra
Number of extra bytes allocated for driver data, can only be set when new object is created

int Fields
Bitmask of win32con.DM_* constants indicating which members are set

int Orientation
Only applies to printers, DMORIENT_PORTRAIT or DMORIENT_LANDSCAPE

int PaperSize
Use 0 if PaperWidth and PaperLength are set, otherwise win32con.DMPAPER_* constant

int PaperLength
Specified in 1/10 millimeters

int PaperWidth
Specified in 1/10 millimeters

int Position_x
Position of display relative to desktop

int Position_y
Position of display relative to desktop

int DisplayOrientation
Display rotation: DMDO_DEFAULT,DMDO_90, DMDO_180, DMDO_270

int DisplayFixedOutput
DMDFO_DEFAULT, DMDFO_CENTER, DMDFO_STRETCH

int Scale
Specified as percentage, eg 50 means half size of original

int Copies
Nbr of copies to print

int DefaultSource
DMBIN_* constant, or can be a printer-specific value

int PrintQuality
DMRES_* constant, interpreted as DPI if positive

int Color
DMCOLOR_COLOR or DMCOLOR_MONOCHROME

int Duplex
For printers that do two-sided printing: DMDUP_SIMPLEX, DMDUP_HORIZONTAL, DMDUP_VERTICAL

int YResolution
Vertical printer resolution in DPI - if this is set, PrintQuality indicates horizontal DPI

int TTOption
TrueType options: DMTT_BITMAP, DMTT_DOWNLOAD, DMTT_DOWNLOAD_OUTLINE, DMTT_SUBDEV

int Collate
DMCOLLATE_TRUE or DMCOLLATE_FALSE

int LogPixels
Pixels per inch (only for display devices

int BitsPerPel
Color resolution in bits per pixel

int PelsWidth
Pixel width of display

int PelsHeight
Pixel height of display

int DisplayFlags
Combination of DM_GRAYSCALE and DM_INTERLACED

int DisplayFrequency
Refresh rate

int DisplayOrientation
Display rotation: DMDO_DEFAULT,DMDO_90, DMDO_180, DMDO_270

int ICMMethod
Indicates where ICM is performed, one of win32con.DMICMMETHOD_* values

int ICMIntent
Intent of ICM, one of win32con.DMICM_* values

int MediaType
win32con.DMMEDIA_*, can also be a printer-specific value greater then DMMEDIA_USER

int DitherType
Dithering option, win32con.DMDITHER_*

int Reserved1
Reserved, use only 0

int Reserved2
Reserved, use only 0

int Nup
Controls printing of multiple logical pages per physical page, DMNUP_SYSTEM or DMNUP_ONEUP

int PanningWidth
Not used, leave as 0

int PanningHeight
Not used, leave as 0

str DeviceName
String of at most 32 chars

str FormName
Name of form as returned by win32print::EnumForms, at most 32 chars

str DriverData
Driver data appended to end of structure


PyDEVMODE.Clear

Clear()

Resets all members of the structure


PyDEVMODEW

PyDEVMODEW Object

Unicode version of PyDEVMODE object PyDEVMODEW is only needed when win32api, win32gui, or win32print are built with UNICODE defined. Currently, you must explicitely ask for the unicode version.

Methods

Clear
Resets all members of the structure

Properties

int SpecVersion
Should always be set to DM_SPECVERSION

int DriverVersion
Version nbr assigned to printer driver by vendor

int Size
Size of structure

int DriverExtra
Number of extra bytes allocated for driver data, can only be set when new object is created

int Fields
Bitmask of win32con.DM_* constants indicating which members are set

int Orientation
Only applies to printers, DMORIENT_PORTRAIT or DMORIENT_LANDSCAPE

int PaperSize
Use 0 if PaperWidth and PaperLength are set, otherwise win32con.DMPAPER_* constant

int PaperLength
Specified in 1/10 millimeters

int PaperWidth
Specified in 1/10 millimeters

int Position_x
Position of display relative to desktop

int Position_y
Position of display relative to desktop

int DisplayOrientation
Display rotation: DMDO_DEFAULT,DMDO_90, DMDO_180, DMDO_270

int DisplayFixedOutput
DMDFO_DEFAULT, DMDFO_CENTER, DMDFO_STRETCH

int Scale
Specified as percentage, eg 50 means half size of original

int Copies
Nbr of copies to print

int DefaultSource
DMBIN_* constant, or can be a printer-specific value

int PrintQuality
DMRES_* constant, interpreted as DPI if positive

int Color
DMCOLOR_COLOR or DMCOLOR_MONOCHROME

int Duplex
For printers that do two-sided printing: DMDUP_SIMPLEX, DMDUP_HORIZONTAL, DMDUP_VERTICAL

int YResolution
Vertical printer resolution in DPI - if this is set, PrintQuality indicates horizontal DPI

int TTOption
TrueType options: DMTT_BITMAP, DMTT_DOWNLOAD, DMTT_DOWNLOAD_OUTLINE, DMTT_SUBDEV

int Collate
DMCOLLATE_TRUE or DMCOLLATE_FALSE

int LogPixels
Pixels per inch (only for display devices

int BitsPerPel
Color resolution in bits per pixel

int PelsWidth
Pixel width of display

int PelsHeight
Pixel height of display

int DisplayFlags
Combination of DM_GRAYSCALE and DM_INTERLACED

int DisplayFrequency
Refresh rate

int DisplayOrientation
Display rotation: DMDO_DEFAULT,DMDO_90, DMDO_180, DMDO_270

int ICMMethod
Indicates where ICM is performed, one of win32con.DMICMMETHOD_* values

int ICMIntent
Intent of ICM, one of win32con.DMICM_* values

int MediaType
win32con.DMMEDIA_*, can also be a printer-specific value greater then DMMEDIA_USER

int DitherType
Dithering option, win32con.DMDITHER_*

int Reserved1
Reserved, use only 0

int Reserved2
Reserved, use only 0

int Nup
Controls printing of multiple logical pages per physical page, DMNUP_SYSTEM or DMNUP_ONEUP

int PanningWidth
Not used, leave as 0

int PanningHeight
Not used, leave as 0

PyUnicode DeviceName
String of at most 32 chars

str FormName
Name of form as returned by win32print::EnumForms, at most 32 chars

str DriverData
Driver data appended to end of structure


PyDISPLAY_DEVICE

PyDISPLAY_DEVICE Object

Python object wrapping a DISPLAY_DEVICE structure

Methods

Clear
Resets all members of the structure

Properties

int Size
Size of structure

str DeviceName
String of at most 32 chars

str DeviceString
String of at most 128 chars

int StateFlags
Bitmask of win32con.DISPLAY_DEVICE_* constants indicating current device status

str DeviceID
String of at most 128 chars

str DeviceKey
String of at most 128 chars


PyDISPLAY_DEVICE.Clear

Clear()

Resets all members of the structure


PyDLGITEMTEMPLATE

PyDLGITEMTEMPLATE Object

A tuple describing a control in a dialog box.

Win32 API References

Search for DLGITEMTEMPLATE at msdn, google or google groups.

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] PyUnicode : 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] buffer : extraData

A byte string or buffer used as extra data for the control. The value depends on the control.


PyDLGTEMPLATE

PyDLGTEMPLATE Object

A tuple of items describing a dialog box, that can be used to create the dialog.

Win32 API References

Search for DLGTEMPLATE at msdn, google or google groups.

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)
See MSDN documentation on Dialog Boxes for allowable values.

[3] int : extStyle

The extended style bits for the dialog. Defaults to 0 if not passed and None is supported for backwards compatibility.

[4] (int, string) : (fontSize, fontName)

A tuple describing the font, or None if the system default font is to be used.

[5] PyResourceId : menuResource

The resource ID of the menu to be used for the dialog, or None for no menu.

[6] PyResourceId : windowClass

Window class name or atom as returned from RegisterWindowClass. Defaults to None.


PyDS_HANDLE

PyDS_HANDLE Object

Directory service handle, returned by win32security::DsBind Subtype of PyHANDLE, inherits all properties and methods.
When closed, DsUnBind is called.


PyDS_NAME_RESULT_ITEM

PyDS_NAME_RESULT_ITEM Object

A tuple representing a DS_NAME_RESULT_ITEM

Items

[0] int : status

One of ntsecuritycon.DS_NAME_* error codes

[1] PyUnicode : Domain

Dns domain that object belongs to

[2] PyUnicode : Name

Formatted object name


PyDateTime

PyDateTime Object

A Python object, representing an instant in time.

Comments

pywin32 builds for Python 3.0 use datetime objects instead of the old PyTime object.

PyDateTime is a sub-class of the regular datetime.datetime object. It is subclassed so it can provide a somewhat backwards compatible PyDateTime::Format method, but is otherwise identical.

Methods

Format
Formats the time value - an alias for strftime with a default param.


PyDateTime.Format

str = Format()

Comments

This method is an alias for the datetime strftime method, using %c as the default value for the format string.


PyDialogTemplate

PyDialogTemplate Object

Sequence of items defining a dialog. The first item is a PyDLGTEMPLATE describing the dialog, followed by zero or more PyDLGITEMTEMPLATEs describing controls within the dialog.


PyEVTLOG_HANDLE

PyEVTLOG_HANDLE Object

Object representing a handle to the windows event log. Identical to PyHANDLE, but calls CloseEventLog() on destruction


PyEVT_HANDLE

PyEVT_HANDLE Object

Handle to an event log, session, query, or any other object used with the Evt* event log functions on Vista and later. When the object is destroyed, EvtClose is called.


PyEVT_RPC_LOGIN

PyEVT_RPC_LOGIN Object

Tuple containing login credentials for a remote Event Log connection

Comments

To use current login credentials, pass None for User, Domain, and Password

Items

[0] string : Server

Machine to connect to (only required item)

[1] string : User

User account to login with, defaults to None

[2] string : Domain

Domain of account, defaults to None

[3] string : Password

Password, defaults to None

[4] int : Flags

Type of authentication, EvtRpcLogin*. Default is EvtRpcLoginAuthDefault


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


PyGdiHANDLE

PyGdiHANDLE Object

Gdi objects such as brush (HBRUSH), pen (HPEN), font (HFONT), region (HRGN), bitmap (HBITMAP) On destruction, the handle is closed using DeleteObject. The object's Close() method also calls DeleteObject. The gdi object should be deselected from any DC that it is selected into before it's closed. Inherits the methods and properties of PyHANDLE.


PyGetSignerCertificate

PyGetSignerCertificate Object

Callback used with CRYPT_VERIFY_MESSAGE_PARA to locate a certficate by issuer and serial nbr. This function will receive 4 args: 1. Arbitrary context object given as GetArg in CRYPT_VERIFY_MESSAGE_PARA 2. CertEncodingType (int) - specifies the type of encoding used 3. SignerId - Dict containing issuer and serial nbr that uniquely identifies a certificate 4. PyCERTSTORE containing certificates extracted from the message Function must return a PyCERT_CONTEXT. If no certificate could be found, it should raise pywintypes.error(winerror.CRYPT_E_NO_MATCH) If this function is not specified, the default action is to locate a certificate encoded in the message.


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.

Properties

long handle
Integer value of the handle

Methods

Close
Closes the handle

close
Synonym for PyHANDLE::Close

Detach
Detaches the Win32 handle from the handle object.

__nonzero__
Used for detecting true/false. is nb_bool in Python 3.0

__int__
Used when an integer representation of the handle object is required.

__print__
Used when the object is printed. tp_print

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

__str__
Used when a string representation is required tp_str


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

__long__()

Used when the handle as an integer is required.

Comments

To get the underling win32 handle from a PyHANDLE object, use long(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) { return ((PyHANDLE *)ob)->m_handle != 0; }


PyHANDLE.__print__

__print__()

Used when the HANDLE object is printed.


PyHANDLE.__str__

__str__()

Used when a string representation of the handle object is required.


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.


PyHDESK

PyHDESK Object

Object representing a handle to a desktop, created by win32service::CreateDesktop, win32service::GetThreadDesktop and win32service::OpenDesktop.

Methods

SetThreadDesktop
Assigns desktop to calling thread

EnumDesktopWindows
Lists all top-level windows on the desktop

SwitchDesktop
Activates the desktop

CloseDesktop
Closes the desktop handle

Detach
Releases reference to handle without closing it


PyHDESK.CloseDesktop

CloseDesktop()

Closes the desktop handle


PyHDESK.EnumDesktopWindows

(PyHANDLE,...) = EnumDesktopWindows()

Returns a list of handles to all top-level windows on desktop


PyHDESK.SetThreadDesktop

SetThreadDesktop()

Assigns this desktop to the calling thread


PyHDESK.SwitchDesktop

SwitchDesktop()

Activates the desktop


PyHDEVNOTIFY

PyHDEVNOTIFY Object

A handle returned by RegisterDeviceNotifications which automatically calls UnregisterDeviceNotification on destruction. Inherits the methods and properties of PyHANDLE.


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.


PyHINTERNET

PyHINTERNET Object

An object that wraps a HINTERNET handle. When the handle object is destroyed, it is automatically closed. See the PyHANDLE object for more details.


PyHKEY

PyHKEY Object

A Python object, representing a win32 HKEY (a HANDLE to a registry key). See the PyHANDLE object for more details


PyHTHEME

PyHTHEME Object

A PyHANDLE object wrapping a HTHEME. _winxptheme::CloseThemeData will be called when the object dies or PyHANDLE::Close is called.


PyHWINSTA

PyHWINSTA Object

Wrapper for a handle to a window station - returned by CreateWindowStation, OpenWindowStation, or GetProcessWindowStation

Methods

EnumDesktops
List desktop names within the window station

SetProcessWindowStation
Associates the calling process with the window station

CloseWindowStation
Closes the window station handle

Detach
Releases reference to handle without closing it


PyHWINSTA.CloseWindowStation

CloseWindowStation()

Closes the window station handle

Comments

This function cannot close the handle to current process's window station


PyHWINSTA.EnumDesktops

(PyUNICODE,...) = EnumDesktops()

Lists names of desktops in the window station


PyHWINSTA.SetProcessWindowStation

SetProcessWindowStation()

Associates the calling process with the window station


PyICONINFO

PyICONINFO Object

Tuple describing an icon or cursor

Win32 API References

Search for ICONINFO at msdn, google or google groups.

Items

[0] boolean : Icon

True indicates an icon, False for a cursor

[1] int : xHotSpot

For a cursor, X coord of hotspot. Ignored for icons

[2] int : yHotSpot

For a cursor, Y coord of hotspot. Ignored for icons

[3] PyGdiHANDLE : hbmMask

Monochrome mask bitmap

[4] PyGdiHANDLE : hbmColor

Color bitmap, may be None for black and white icon


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

__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

Comments

Note that IID objects support the buffer interface. Thus buffer(iid) can be used to obtain the raw bytes. tp_as_buffer


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.


PyINPUT_RECORD

PyINPUT_RECORD Object

Interface to the INPUT_RECORD struct used with console IO functions. Create using PyINPUT_RECORDType(EventType)

Comments

Only attributes that apply to each particular EventType can be accessed:
KEY_EVENT: KeyDown, RepeatCount, VirtualKeyCode, VirtualScanCode, ControlKeyState
MOUSE_EVENT: MousePosition, ButtonState, ControlKeyState, EventFlags
WINDOW_BUFFER_SIZE_EVENT: Size
FOCUS_EVENT: SetFocus
MENU_EVENT: CommandId

Properties

int EventType
One of KEY_EVENT, MOUSE_EVENT, WINDOW_BUFFER_SIZE_EVENT, MENU_EVENT, FOCUS_EVENT. Cannot be changed after object is created

boolean KeyDown
True for a key press, False for key release

int RepeatCount
Nbr of repeats generated (key was held down if >1)

int VirtualKeyCode
Device-independent key code, win32con.VK_*

int VirtualScanCode
Device-dependent scan code generated by keyboard

PyUnicode Char
Single unicode character generated by the keypress

int ControlKeyState
State of modifier keys, combination of CAPSLOCK_ON, ENHANCED_KEY, LEFT_ALT_PRESSED, LEFT_CTRL_PRESSED, NUMLOCK_ON, RIGHT_ALT_PRESSED, RIGHT_CTRL_PRESSED, SCROLLLOCK_ON, SHIFT_PRESSED

int ButtonState
Bitmask representing which mouse buttons were pressed.

int EventFlags
DOUBLE_CLICK, MOUSE_MOVED or MOUSE_WHEELED, or 0. If 0, indicates a mouse button press

PyCOORD MousePosition
Position in character coordinates

PyCOORD Size
New size of screen buffer in character rows/columns

boolean SetFocus
Reserved - Used only with type FOCUS_EVENT. This event is Reserved, and should be ignored.

int CommandId
Used only with event type MENU_EVENT, which is reserved and should not be used


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


PyLOGBRUSH

PyLOGBRUSH Object

Dict representing a LOGBRUSH struct as used with win32gui::CreateBrushIndirect and win32gui::ExtCreatePen

Win32 API References

Search for LOGBRUSH at msdn, google or google groups.

Properties

int Style
Brush style, one of win32con.BS_* values

int Color
RGB color value. Can also be DIB_PAL_COLORS or DIB_RGB_COLORS if Style is BS_DIBPATTERN or BS_DIBPATTERNPT=

int/PyHANDLE Hatch
For BS_HATCH style, one of win32con.HS_*. Not used For BS_SOLID or BS_HOLLOW. For a pattern brush, this should be a handle to a bitmap


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

string lfFaceName
Name of the typeface, at most 31 characters


PyLSA_HANDLE

PyLSA_HANDLE Object

Object representing an Lsa policy handle (LSA_HANDLE), created by win32security::LsaOpenPolicy Identical to PyHANDLE, but calls LsaClose on destruction


PyLUID_AND_ATTRIBUTES

PyLUID_AND_ATTRIBUTES Object

A sequence containing (LUID,Attributes) representing an LUID_AND_ATTRIBUTES structure

Comments

LUID is a large integer, and attributes is an integer containing flags


PyLsaLogon_HANDLE

PyLsaLogon_HANDLE Object

Lsa handle used to access authentication packages, returned by win32security::LsaRegisterLogonProcess or win32security::LsaConnectUntrusted. Base low-level object is a plain HANDLE. Inherits all properties and methods of PyHANDLE, but Close uses LsaDeregisterLogonProcess


PyMSG

PyMSG Object

A tuple representing a win32 MSG structure.

Items

[0] PyHANDLE : hwnd

Handle to the window whose window procedure receives the message.

[1] int : message

Specifies the message identifier.

[2] int : wParam

Specifies additional information about the message.

[3] int : lParam

Specifies additional information about the message.

[4] int : time

Specifies the time at which the message was posted (retrieved via GetTickCount()).

[5] (int, int) : point

Specifies the cursor position, in screen coordinates, when the message was posted.


PyNETRESOURCE

PyNETRESOURCE 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

Comments

Note that in pywin32-212 and earlier, the string attributes were always strings, but empty strings when the underlying Windows structure had NULL. On later pywin32 builds, these string attributes will return None in such cases.


PyNET_VALIDATE_AUTHENTICATION_INPUT_ARG

PyNET_VALIDATE_AUTHENTICATION_INPUT_ARG Object

A dictionary or tuple passed as input to win32net::NetValidatePasswordPolicy

Parameters

InputPersistedFields=None : NET_VALIDATE_PERSISTED_FIELDS

PasswordMatched=0 : int


PyNET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG

PyNET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG Object

A dictionary or tuple passed as input to win32net::NetValidatePasswordPolicy

Parameters

InputPersistedFields=None : NET_VALIDATE_PERSISTED_FIELDS

ClearPassword=None : PyUnicode

UserAccountName=None : PyUnicode

HashedPassword=None : buffer

A string or anything else holding bytes.

PasswordMatch=0 : int

Note MSDN incorrectly documents this member as PasswordMatched


PyNET_VALIDATE_PERSISTED_FIELDS

PyNET_VALIDATE_PERSISTED_FIELDS Object

A dictionary returned by win32net::NetValidatePasswordPolicy

Comments

Note that these fields will only appear if the PresentFields structure element indicates the fields are valid. Thus, the result dictionary may contain none, all, or any combination of these.

Parameters

PasswordLastSet : PyTime

BadPasswordTime : PyTime

LockoutTime : PyTime

BadPasswordCount : int

PasswordHistoryLength : int

PasswordHistory : None/string


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. ??? 64-bit problem here ???

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.


PyNOTIFYICONDATA

PyNOTIFYICONDATA Object

Tuple used to fill a NOTIFYICONDATA struct as used with win32gui::Shell_NotifyIcon

Win32 API References

Search for NOTIFYICONDATA at msdn, google or google groups.

Items

[0] PyHANDLE : hWnd

Handle to window that will process icon's messages

[1] int : ID

Unique id used when hWnd processes messages from more than one icon

[2] int : Flags

Combination of win32gui.NIF_* flags

[3] int : CallbackMessage

Message id to be pass to hWnd when processing messages

[4] PyHANDLE : hIcon

Handle to the icon to be displayed

[5] str : Tip

Tooltip text (optional)

[6] str : Info

Balloon tooltip text (optional)

[7] int : Timeout

Timeout for balloon tooltip, in milliseconds (optional)

[8] str : InfoTitle

Title for balloon tooltip (optional)

[9] int : InfoFlags

Combination of win32gui.NIIF_* flags (optional)


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.

Properties

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.

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)

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.

integer Internal
Reserved for operating system use. (pointer-sized value)

integer InternalHigh
Reserved for operating system use. (pointer-sized value)


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


PyPERF_OBJECT_TYPE.Close

Close()

Closes the object.


PyPOINT

PyPOINT Object

Tuple of two ints (x,y) representing a POINT struct


PyPROFILEINFO

PyPROFILEINFO Object

Dictionary containing data to fill a PROFILEINFO struct, to be passed to win32profile::LoadUserProfile. UserName is only required member.

Win32 API References

Search for PROFILEINFO at msdn, google or google groups.

Properties

PyUnicode UserName
Name of user for which to load profile

int Flags
Combination of PI_* flags

PyUnicode ProfilePath
Path to roaming profile, can be None. Use win32net::NetUserGetInfo to retrieve user's profile path

PyUnicode DefaultPath
Path to Default user profile, can be None

PyUnicode ServerName
Domain controller, can be None

PyUnicode PolicyPath
Location of policy file, can be None

PyHKEY Profile
Handle to root of user's registry key. This member is output.


PyPerfMonManager

PyPerfMonManager Object

A Python object

Methods

Close
Closes all counters.


PyPerfMonManager.Close

Close()

Closes the performance monitor manager.


PyPrinterHANDLE

PyPrinterHANDLE Object

Handle to a printer or print server.
Created using win32print::OpenPrinter or win32print::AddPrinter
Inherits all methods and properties of PyHANDLE.
When object is destroyed, handle is released using ClosePrinter.


PyRECT

PyRECT Object

Tuple of 4 ints defining a rectangle: (left, top, right, bottom)


PyResourceId

PyResourceId Object

Identifies a resource or function in a module. This can be a WORD-sized integer value (0-65536), or string/unicode depending on whether the *A or *W API function is to be called. Class atoms as used with win32gui::CreateWindow are also treated as resource ids since they can also be represented by a name or WORD id. When passing resource names and types as strings, they are usually formatted as a pound sign followed by decimal form of the id. ('#42' for example)


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.


PySC_HANDLE

PySC_HANDLE Object

Handle to a service or service control manager. This is a variant of PyHANDLE that releases its handle using CloseServiceHandle.


PySECURITY_ATTRIBUTES

PySECURITY_ATTRIBUTES Object

A Python object, representing a SECURITY_ATTRIBUTES structure

Properties

boolean 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 SECURITY_DESCRIPTOR
A PySECURITY_DESCRIPTOR, or None

Comments

On platforms that support security descriptor operations, SECURITY_DESCRIPTOR defaults to a blank security descriptor with no owner, group, dacl, or sacl. Set to None to use a NULL security descriptor instead. When PySECURITY_ATTRIBUTES is created on Windows 95/98/Me, SECURITY_DESCRIPTOR defaults to None and should not be changed. When SECURITY_DESCRIPTOR is not None, any of its methods can be invoked directly on the PySECURITY_ATTRIBUTES object


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

SetSecurityDescriptorControl
Sets control bitmask of a security descriptor

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

PySID = GetSecurityDescriptorGroup()

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


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

SetSecurityDescriptorControl(ControlBitsOfInterest, ControlBitsToSet)

Sets the control bit flags related to inheritance for a security descriptor

Parameters

ControlBitsOfInterest : int

Bitmask of flags to be modified

ControlBitsToSet : int

Bitmask containing flag values to set

Comments

Only exists on Windows 2000 or later


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.


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)

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_AND_ATTRIBUTES

PySID_AND_ATTRIBUTES Object

A sequence containing (PySID,Attributes) Representing a SID_AND_ATTRIBUTES structure

Comments

Attributes is an integer containing flags that depend on intended usage


PySIZE

PySIZE Object

Tuple of two ints (cx,cy) representing a SIZE struct


PySMALL_RECT

PySMALL_RECT Object

Wrapper for a SMALL_RECT struct Create using PySMALL_RECTType(Left, Top, Right, Bottom). All params optional, defaulting to 0

Properties

int Left
Left side of rectangle

int Top
Top edge of rectangle

int Right
Right edge of rectangle

int Bottom
Bottome edge of rectangle


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 wShowWindow
Can be any of the SW_ constants defined in win32con. For GUI processes, this specifies the default value the first time ShowWindow is called.

integer/PyHANDLE hStdInput

integer/PyHANDLE hStdOutput

integer/PyHANDLE hStdError

string/None lpDesktop

string/None lpTitle


PySecBuffer

PySecBuffer Object

Python object wrapping a SecBuffer structure Created using win32security.PySecBufferType(type,size) where type is a SECBUFFER_* constant

Methods

Clear
Resets all members of the structure

Properties

int BufferType

string Buffer

int BufferSize

int MaxBufferSize


PySecBuffer.Clear

Clear()

Resets the buffer to all NULL's, and set the current size to maximum


PySecBufferDesc

PySecBufferDesc Object

Sequence-like object that contains a group of buffers to be used with SSPI functions.

Comments

This object is created using win32security.PySecBufferDescType(Version), where Version is an int that defaults to SECBUFFER_VERSION if not passed in.

Methods

append
Adds a PySecBuffer to the list of buffers


PySecBufferDesc.append

append(buffer)

Adds a PySecBuffer to the buffer configuration

Parameters

buffer :

PySecBuffer object to be attached to the group of buffers


PyTOKEN_GROUPS

PyTOKEN_GROUPS Object

A sequence of PySID_AND_ATTRIBUTES sequences, eg [(PySID,int),...] representing a TOKEN_GROUPS structure


PyTOKEN_PRIVILEGES

PyTOKEN_PRIVILEGES Object

An object representing Win32 token privileges.

Comments

This is a sequence (eg, list) of ((id, attributes),...) where id is a privilege LUID as returned by win32security::LookupPrivilegeValue and attributes is a combination of SE_PRIVILEGE_ENABLED, SE_PRIVILEGE_ENABLED_BY_DEFAULT, and SE_PRIVILEGE_USED_FOR_ACCESS


PyTRIVERTEX

PyTRIVERTEX Object

Dict representing a TRIVERTEX struct containing color information at a point

Win32 API References

Search for TRIVERTEX at msdn, google or google groups.

Properties

int x
X coord in logical units

int y
Y coord in logical units

int Red
Red component

int Green
Green component

int Blue
Blue component

int Alpha
Transparency value


PyTRUSTEE

PyTRUSTEE Object

A dictionary representing a TRUSTEE structure.

Properties

int TrusteeForm

int TrusteeType

object Identifier
Depends on the value of TrusteeForm (string or sid)

object MultipleTrustee
default is None

object MultipleTrusteeOperation
default is None


PyTS_HANDLE

PyTS_HANDLE Object

Handle to a Terminal Server


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

Properties

int year

int month

int weekday

int day

int hour

int minute

int second

int msec


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

__nonzero__()

Used for detecting true/false. static*/ int PyTime::nonzeroFunc(PyObject *ob)


PyTime.__repr__

__repr__()


PyTime.__str__

string = __str__()

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


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


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
4 | PyUSER_INFO_4
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_INFO_4

PyUSER_INFO_4 Object

A dictionary holding the information in a Win32 USER_INFO_4 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

PySID user_sid

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

PySID 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

pywin32 uses the builtin Python Unicode object
In general, any pywin32/COM function documented as taking a PyUnicode parameter will also accept a Python string object, which will be automatically encoded using the MBCS encoding before being passed to the function. Note that the reverse is generally *not* true - a function documented as accepting a string must be passed a string.


PyUrlCacheHANDLE

PyUrlCacheHANDLE Object

Handle used to enumerate the browser cache. Created by win32inet::FindFirstUrlCacheEntry. Object's Close() method calls FindCloseUrlCache to free the handle.


PyWAVEFORMATEX

PyWAVEFORMATEX Object

A Python object, representing a WAVEFORMATEX structure

Properties

integer wFormatTag
Waveform-audio format type. pywintypes only defines WAVE_FORMAT_PCM as a constant. Other values must be looked up in the mmsystem.h header file.

integer nChannels
Number of channels. 1 for Mono, 2 for Stereo, anything, but never 5.1.

integer nSamplesPerSec
Sample rate, in samples per second (hertz), that each channel should be played or recorded. If wFormatTag is WAVE_FORMAT_PCM, then common values for nSamplesPerSec are 8000, 11025, 22050, and 44100 Hz

integer nAvgBytesPerSec
Required average data-transfer rate, in bytes per second, for the format tag. If wFormatTag is WAVE_FORMAT_PCM, nAvgBytesPerSec should be equal to the product of nSamplesPerSec and nBlockAlign.

integer nBlockAlign
Block alignment, in bytes. The block alignment is the minimum atomic unit of data for the wFormatTag format type. If wFormatTag is WAVE_FORMAT_PCM, nBlockAlign should be equal to the product of nChannels and wBitsPerSample divided by 8 (bits per byte). For non-PCM formats, this member must be computed according to the manufacturer’s specification of the format tag.

integer wBitsPerSample
Bits per sample for the wFormatTag format type. If wFormatTag is WAVE_FORMAT_PCM, then wBitsPerSample should be equal to 8 or 16. Sentinel


PyWINHTTP_AUTOPROXY_OPTIONS

PyWINHTTP_AUTOPROXY_OPTIONS Object

Used by win32inet::WinHTTPGetProxyForUrl

Parameters

dwFlags : int

dwAutoDetectFlags : int

obAutoConfig : string

obReserved=None : object

Must be None

dwReserved=0 : int

Must be zero

autoLogin=1 : bool


PyWINHTTP_PROXY_INFO

PyWINHTTP_PROXY_INFO Object

A tuple representing a WINHTTP_PROXY_INFO structure.

Items

[0] int : dwAccessType

[2] string : lpszProxy

[3] string : lpszProxy


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 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 wki402_maximum_collection_count, whichever comes first.

string/PyUnicode maximum_collection_count
Name of the domain to which computer belongs

int keep_conn
Major version number of operating system running on the computer

int keep_search
Minor version number of operating system running on the computer

int max_cmds
..

int num_work_buf
Number of users who are logged on to the local computer

int siz_work_buf
Number of users who are logged on to the local computer

int max_wrk_cache
..

int sess_timeout
..

int siz_error
..

int num_alerts
..

int num_services
..

int errlog_sz
..

int print_buf_time
..

int num_char_buf
..

int siz_char_buf
Specifies the maximum size, in bytes, of a character pipe buffer and device buffer.

string/PyUnicode siz_char_buf
..

int mailslots
..

int num_dgram_buf
..

int max_threads
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
These 3 handled manually in PyWNDCLASS::getattro/setattro. The pymeth below is used as an end tag, so these props will be lost if below it

string/PyUnicode lpszMenuName

string/PyUnicode lpszClassName

function lpfnWndProc

Methods

SetDialogProc
Sets the WNDCLASS to be for a dialog box.


PyWNDCLASS.SetDialogProc

SetDialogProc()

Sets the WNDCLASS to be for a dialog box


PyXFORM

PyXFORM Object

Dict representing an XFORM struct used as a world transformation matrix All members are optional, defaulting to 0.0.

Win32 API References

Search for XFORM struct at msdn, google or google groups.

Properties

float M11
Usage is dependent on operation performed, see MSDN docs

float M12
Usage is dependent on operation performed, see MSDN docs

float M21
Usage is dependent on operation performed, see MSDN docs

float M22
Usage is dependent on operation performed, see MSDN docs

float Dx
Horizontal offset in logical units

float Dy
Vertical offset in logical units


Pymmapfile

Pymmapfile Object

Object that provides access to memory-mapped file operations.

Methods

close
Closes the file mapping handle and releases mapped view

find
Finds a string in the buffer.

flush
Flushes memory buffer to disk

move
Moves data from one place in buffer to another

read
Returns specified number of bytes from buffer, and advances current position

read_byte
Reads a single character from current pos

read_line
Reads data from current pos up to next EOL.

resize
Resizes the file mapping and view

seek
Changes current position

size
Returns size of file mapping

tell
Returns current position in buffer

write
Places data at current pos in buffer.

write_byte
Writes a single character of data


Pymmapfile.close

close()

Closes the file mapping handle and releases mapped view


Pymmapfile.find

int = find(needle, start )

Finds a string in the buffer.

Parameters

needle : str

String to be located

start : int

Pos at which to start search, current pos assumed if not specified

Return Value

Returns pos of string, or -1 if not found


Pymmapfile.flush

flush(offset, size)

Flushes memory buffer to disk

Parameters

offset=0 : int

Position in buffer at which to flush

size=0 : int

Number of bytes to flush, 0 to flush remainder of buffer past the offset


Pymmapfile.move

move(dest, src, count)

Moves data from one place in buffer to another

Parameters

dest : int

Destination position in buffer

src : int

Source position in buffer

count : int

Number of bytes to move


Pymmapfile.read_byte

str = read_byte()

Reads a single character from current pos


Pymmapfile.read_line

str = read_line()

Reads data from current pos up to next EOL.


Pymmapfile.read

str = read(num_bytes)

Returns specified number of bytes from buffer, and advances current position

Parameters

num_bytes : int

Number of bytes to read


Pymmapfile.resize

resize(MaximumSize, FileOffset, NumberOfBytesToMap)

Resizes the file mapping and view.

Parameters

MaximumSize : long

New size for file mapping. Use a multiple of system page size (see win32api::GetSystemInfo)

FileOffset=0 : long

Offset into file mapping. Must be multiple of allocation granularity.

NumberOfBytesToMap=0 : long

New view size. Specify a multiple of system page size.

Comments

If MaximumSize is 0, only the mapped view will be affected.

Accepts keyword args.


Pymmapfile.seek

seek(dist, how)

Changes current position

Parameters

dist : int

Distance to seek

how=0 : int

Pos from which to seek

how | meaning
0 | Seek from start of buffer
1 | Seek from current position
2 | Seek backwards from end of buffer


Pymmapfile.size

long = size()

Returns size of current view


Pymmapfile.tell

int = tell()

Returns current position in buffer


Pymmapfile.write_byte

write_byte(char)

Writes a single character of data

Parameters

char : str

Single byte to be placed in buffer


Pymmapfile.write

write(data)

Places data at current pos in buffer.

Parameters

data : str

Data to be written


RASDIALEXTENSIONS

RASDIALEXTENSIONS Object

An object that describes a Win32 RASDIALEXTENSIONS 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)


SC_ACTION

SC_ACTION Object

Tuple of 2 ints (Type,Delay) used to represent an SC_ACTION structure

Properties

int Type
One of SC_ACTION_NONE, SC_ACTION_REBOOT, SC_ACTION_RESTART, SC_ACTION_RUN_COMMAND

int Delay
Time delay before specified action is taken (in milliseconds)


SERVICE_FAILURE_ACTIONS

SERVICE_FAILURE_ACTIONS Object

A dictionary representing a SERVICE_FAILURE_ACTIONS structure

Properties

int ResetPeriod
Indicates how many seconds to wait to reset the failure count, can be INFINITE

str/PyUnicode RebootMsg
Message displayed when reboot action is taken

str/PyUnicode Command
Command line to execute for SC_ACTION_RUN_COMMAND

tuple Actions
A tuple of SC_ACTION tuples


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.


TRACKMOUSEEVENT

TRACKMOUSEEVENT Object

A tuple of (dwFlags, hwndTrack, dwHoverTime)


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.


WIN32_FIND_DATA

WIN32_FIND_DATA Object

A tuple representing a 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 DWORD of file size.

[5] int : nFileSizeLow

low order DWORD of file size.

[6] int : reserved0

Contains reparse tag if path is a reparse point

[7] int : reserved1

Reserved.

[8] str/unicode : fileName

The name of the file.

[9] str/unicode : alternateFilename

Alternative name of the file, expressed in 8.3 format.


com_error

com_error Object

An exception raised when a COM exception occurs.

Comments

This error is defined in the pywintypes module, but is also available via pythoncom.com_error.

This exception is derived from the standard Python Exception object.

Instances of these exception can be accessed via indexing or via attribute access. Attribute access is more forwards compatible with Python 3, so is recommended.

See also error

Items

[0] int : hresult

The COM hresult

[1] string : strerror

The error message

[2] None/tuple : excepinfo

An optional EXCEPINFO tuple.

[3] None/int : argerror

The index of the argument in error, or (usually) None or -1


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


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


error

error Object

An exception raised when a win32 error occurs

Comments

This error is defined in the pywintypes module, but most of the win32 modules expose this error object via their own error attribute - eg, win32api.error is pywintypes.error is win32gui.error.

This exception is derived from the standard Python Exception object.

Instances of these exception can be accessed via indexing or via attribute access. Attribute access is more forwards compatible with Python 3, so is recommended.

See also com_error

Items

[0] int : winerror

The windows error code.

[1] string : funcname

The name of the windows function that failed.

[2] string : strerror

The error message.


Constants

  • 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
  • AuditCategoryAccountLogon
  • AuditCategoryAccountManagement
  • AuditCategoryDetailedTracking
  • AuditCategoryDirectoryServiceAccess
  • AuditCategoryLogon
  • AuditCategoryObjectAccess
  • AuditCategoryPolicyChange
  • AuditCategoryPrivilegeUse
  • AuditCategorySystem
  • BELOW_NORMAL_PRIORITY_CLASS
  • CALLBACK_CHUNK_FINISHED
  • CALLBACK_STREAM_SWITCH
  • 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
  • CLRBREAK
  • CLRDTR
  • CLRRTS
  • CLR_NONE
  • CONTAINER_INHERIT_ACE
  • COPY_FILE_ALLOW_DECRYPTED_DESTINATION
  • COPY_FILE_COPY_SYMLINK
  • COPY_FILE_FAIL_IF_EXISTS
  • COPY_FILE_OPEN_SOURCE_FOR_WRITE
  • COPY_FILE_RESTARTABLE
  • CREATE_ALWAYS
  • CREATE_BREAKAWAY_FROM_JOB
  • CREATE_DEFAULT_ERROR_MODE
  • CREATE_FOR_DIR
  • CREATE_FOR_IMPORT
  • CREATE_NEW
  • CREATE_NEW_CONSOLE
  • CREATE_NEW_PROCESS_GROUP
  • CREATE_NO_WINDOW
  • CREATE_PRESERVE_CODE_AUTHZ_LEVEL
  • CREATE_SEPARATE_WOW_VDM
  • CREATE_SHARED_WOW_VDM
  • CREATE_SUSPENDED
  • CREATE_UNICODE_ENVIRONMENT
  • CSIDL_BITBUCKET
  • CSIDL_COMMON_DESKTOPDIRECTORY
  • CSIDL_COMMON_PROGRAMS
  • CSIDL_COMMON_STARTMENU
  • CSIDL_COMMON_STARTUP
  • CSIDL_CONTROLS
  • CSIDL_DESKTOP
  • CSIDL_DESKTOPDIRECTORY
  • CSIDL_DRIVES
  • CSIDL_FONTS
  • CSIDL_NETHOOD
  • CSIDL_NETWORK
  • CSIDL_PERSONAL
  • CSIDL_PRINTERS
  • CSIDL_PROGRAMS
  • CSIDL_RECENT
  • CSIDL_SENDTO
  • CSIDL_STARTMENU
  • CSIDL_STARTUP
  • CSIDL_TEMPLATES
  • DACL_SECURITY_INFORMATION
  • DBT_CONFIGCHANGECANCELED
  • DBT_CONFIGCHANGED
  • DBT_CUSTOMEVENT
  • DBT_DEVICEARRIVAL
  • DBT_DEVICEQUERYREMOVE
  • DBT_DEVICEQUERYREMOVEFAILED
  • DBT_DEVICEREMOVECOMPLETE
  • DBT_DEVICEREMOVEPENDING
  • DBT_DEVICETYPESPECIFIC
  • DBT_QUERYCHANGECONFIG
  • DEBUG_ONLY_THIS_PROCESS
  • DEBUG_PROCESS
  • DENY_ACCESS
  • DETACHED_PROCESS
  • DF_ALLOWOTHERACCOUNTHOOK
  • DISABLE_MAX_PRIVILEGE
  • DRIVE_CDROM
  • DRIVE_FIXED
  • DRIVE_NO_ROOT_DIR
  • DRIVE_RAMDISK
  • DRIVE_REMOTE
  • DRIVE_REMOVABLE
  • DRIVE_UNKNOWN
  • DS_SPN_ADD_SPN_OP
  • DS_SPN_DELETE_SPN_OP
  • DS_SPN_DNS_HOST
  • DS_SPN_DN_HOST
  • DS_SPN_DOMAIN
  • DS_SPN_NB_DOMAIN
  • DS_SPN_NB_HOST
  • DS_SPN_REPLACE_SPN_OP
  • DS_SPN_SERVICE
  • DTR_CONTROL_DISABLE
  • DTR_CONTROL_ENABLE
  • DTR_CONTROL_HANDSHAKE
  • ETDT_DISABLE
  • ETDT_ENABLE
  • ETDT_ENABLETAB
  • ETDT_USETABTEXTURE
  • EVENPARITY
  • 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
  • EVENT_ALL_ACCESS
  • EVENT_MODIFY_STATE
  • EV_BREAK
  • EV_CTS
  • EV_DSR
  • EV_ERR
  • EV_RING
  • EV_RLSD
  • EV_RXCHAR
  • EV_RXFLAG
  • EV_TXEMPTY
  • EventMetadataEventChannel
  • EventMetadataEventID
  • EventMetadataEventKeyword
  • EventMetadataEventLevel
  • EventMetadataEventMessageID
  • EventMetadataEventOpcode
  • EventMetadataEventTask
  • EventMetadataEventTemplate
  • EventMetadataEventVersion
  • EvtChannelConfigAccess
  • EvtChannelConfigClassicEventlog
  • EvtChannelConfigEnabled
  • EvtChannelConfigIsolation
  • EvtChannelConfigOwningPublisher
  • EvtChannelConfigPropertyIdEND
  • EvtChannelConfigType
  • EvtChannelLoggingConfigAutoBackup
  • EvtChannelLoggingConfigLogFilePath
  • EvtChannelLoggingConfigMaxSize
  • EvtChannelLoggingConfigRetention
  • EvtChannelPublisherList
  • EvtChannelPublishingConfigBufferSize
  • EvtChannelPublishingConfigClockType
  • EvtChannelPublishingConfigControlGuid
  • EvtChannelPublishingConfigFileMax
  • EvtChannelPublishingConfigKeywords
  • EvtChannelPublishingConfigLatency
  • EvtChannelPublishingConfigLevel
  • EvtChannelPublishingConfigMaxBuffers
  • EvtChannelPublishingConfigMinBuffers
  • EvtChannelPublishingConfigSidType
  • EvtEventMetadataPropertyIdEND
  • EvtEventPath
  • EvtEventPropertyIdEND
  • EvtEventQueryIDs
  • EvtExportLogChannelPath
  • EvtExportLogFilePath
  • EvtExportLogTolerateQueryErrors
  • EvtLogAttributes
  • EvtLogCreationTime
  • EvtLogFileSize
  • EvtLogFull
  • EvtLogLastAccessTime
  • EvtLogLastWriteTime
  • EvtLogNumberOfLogRecords
  • EvtLogOldestRecordNumber
  • EvtOpenChannelPath
  • EvtOpenFilePath
  • EvtPublisherMetadataChannelReferenceFlags
  • EvtPublisherMetadataChannelReferenceID
  • EvtPublisherMetadataChannelReferenceIndex
  • EvtPublisherMetadataChannelReferenceMessageID
  • EvtPublisherMetadataChannelReferencePath
  • EvtPublisherMetadataChannelReferences
  • EvtPublisherMetadataHelpLink
  • EvtPublisherMetadataKeywordMessageID
  • EvtPublisherMetadataKeywordName
  • EvtPublisherMetadataKeywordValue
  • EvtPublisherMetadataKeywords
  • EvtPublisherMetadataLevelMessageID
  • EvtPublisherMetadataLevelName
  • EvtPublisherMetadataLevelValue
  • EvtPublisherMetadataLevels
  • EvtPublisherMetadataMessageFilePath
  • EvtPublisherMetadataOpcodeMessageID
  • EvtPublisherMetadataOpcodeName
  • EvtPublisherMetadataOpcodeValue
  • EvtPublisherMetadataOpcodes
  • EvtPublisherMetadataParameterFilePath
  • EvtPublisherMetadataPropertyIdEND
  • EvtPublisherMetadataPublisherGuid
  • EvtPublisherMetadataPublisherMessageID
  • EvtPublisherMetadataResourceFilePath
  • EvtPublisherMetadataTaskEventGuid
  • EvtPublisherMetadataTaskMessageID
  • EvtPublisherMetadataTaskName
  • EvtPublisherMetadataTaskValue
  • EvtPublisherMetadataTasks
  • EvtQueryChannelPath
  • EvtQueryFilePath
  • EvtQueryForwardDirection
  • EvtQueryReverseDirection
  • EvtQueryTolerateQueryErrors
  • EvtRenderBookmark
  • EvtRenderEventValues
  • EvtRenderEventXml
  • EvtRpcLogin
  • EvtRpcLoginAuthDefault
  • EvtRpcLoginAuthKerberos
  • EvtRpcLoginAuthNTLM
  • EvtRpcLoginAuthNegotiate
  • EvtSeekOriginMask
  • EvtSeekRelativeToBookmark
  • EvtSeekRelativeToCurrent
  • EvtSeekRelativeToFirst
  • EvtSeekRelativeToLast
  • EvtSeekStrict
  • EvtSubscribeActionDeliver
  • EvtSubscribeActionError
  • EvtSubscribeOriginMask
  • EvtSubscribeStartAfterBookmark
  • EvtSubscribeStartAtOldestRecord
  • EvtSubscribeStrict
  • EvtSubscribeToFutureEvents
  • EvtSubscribeTolerateQueryErrors
  • EvtVarTypeAnsiString
  • EvtVarTypeBinary
  • EvtVarTypeBoolean
  • EvtVarTypeByte
  • EvtVarTypeDouble
  • EvtVarTypeEvtHandle
  • EvtVarTypeEvtXml
  • EvtVarTypeFileTime
  • EvtVarTypeGuid
  • EvtVarTypeHexInt32
  • EvtVarTypeHexInt64
  • EvtVarTypeInt16
  • EvtVarTypeInt32
  • EvtVarTypeInt64
  • EvtVarTypeNull
  • EvtVarTypeSByte
  • EvtVarTypeSid
  • EvtVarTypeSingle
  • EvtVarTypeSizeT
  • EvtVarTypeString
  • EvtVarTypeSysTime
  • EvtVarTypeUInt16
  • EvtVarTypeUInt32
  • EvtVarTypeUInt64
  • 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_DIRECTORY
  • FILE_ATTRIBUTE_HIDDEN
  • FILE_ATTRIBUTE_NORMAL
  • FILE_ATTRIBUTE_OFFLINE
  • FILE_ATTRIBUTE_READONLY
  • FILE_ATTRIBUTE_SYSTEM
  • FILE_ATTRIBUTE_TEMPORARY
  • FILE_BEGIN
  • FILE_CURRENT
  • FILE_ENCRYPTABLE
  • FILE_END
  • FILE_FLAG_BACKUP_SEMANTICS
  • FILE_FLAG_DELETE_ON_CLOSE
  • FILE_FLAG_NO_BUFFERING
  • FILE_FLAG_OPEN_REPARSE_POINT
  • 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_IS_ENCRYPTED
  • FILE_READ_ONLY
  • FILE_ROOT_DIR
  • FILE_SHARE_DELETE
  • FILE_SHARE_READ
  • FILE_SHARE_WRITE
  • FILE_SYSTEM_ATTR
  • FILE_SYSTEM_DIR
  • FILE_SYSTEM_NOT_SUPPORT
  • FILE_TYPE_CHAR
  • FILE_TYPE_DISK
  • FILE_TYPE_PIPE
  • FILE_TYPE_UNKNOWN
  • FILE_UNKNOWN
  • FILE_USER_DISALLOWED
  • FileAllocationInfo
  • FileAttributeTagInfo
  • FileBasicInfo
  • FileCompressionInfo
  • FileDispositionInfo
  • FileEndOfFileInfo
  • FileIdBothDirectoryInfo
  • FileIdBothDirectoryRestartInfo
  • FileIdType
  • FileIoPriorityHintInfo
  • FileNameInfo
  • FileRenameInfo
  • FileStandardInfo
  • FileStreamInfo
  • GENERIC_EXECUTE
  • GENERIC_READ
  • GENERIC_WRITE
  • GRANT_ACCESS
  • GROUP_SECURITY_INFORMATION
  • GetFileExInfoStandard
  • 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_NODEF_EXSTYLES
  • HHWIN_PROP_NODEF_STYLES
  • HHWIN_PROP_NOTB_TEXT
  • HHWIN_PROP_NOTITLEBAR
  • HHWIN_PROP_NO_TOOLBAR
  • 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
  • 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
  • HIGH_PRIORITY_CLASS
  • IDLE_PRIORITY_CLASS
  • IDTB_BACK
  • IDTB_BROWSE_BACK
  • IDTB_BROWSE_FWD
  • IDTB_CONTENTS
  • IDTB_CONTRACT
  • IDTB_CUSTOMIZE
  • IDTB_EXPAND
  • IDTB_FAVORITES
  • IDTB_FORWARD
  • IDTB_HISTORY
  • IDTB_HOME
  • IDTB_INDEX
  • IDTB_JUMP1
  • IDTB_JUMP2
  • IDTB_NOTES
  • IDTB_OPTIONS
  • IDTB_PRINT
  • IDTB_REFRESH
  • IDTB_SEARCH
  • IDTB_STOP
  • IDTB_SYNC
  • IDTB_TOC_NEXT
  • IDTB_TOC_PREV
  • IDTB_ZOOM
  • ILC_COLOR
  • ILC_COLOR16
  • ILC_COLOR24
  • ILC_COLOR32
  • ILC_COLOR4
  • ILC_COLOR8
  • ILC_COLORDDB
  • ILC_MASK
  • ILD_BLEND
  • ILD_BLEND25
  • ILD_BLEND50
  • ILD_FOCUS
  • ILD_MASK
  • ILD_NORMAL
  • ILD_SELECTED
  • ILD_TRANSPARENT
  • IMAGE_BITMAP
  • IMAGE_CURSOR
  • IMAGE_ICON
  • INFINITE
  • INHERITED_ACE
  • INHERIT_ONLY_ACE
  • IoPriorityHintLow
  • IoPriorityHintNormal
  • IoPriorityHintVeryLow
  • JOB_OBJECT_ALL_ACCESS
  • JOB_OBJECT_ASSIGN_PROCESS
  • JOB_OBJECT_BASIC_LIMIT_VALID_FLAGS
  • JOB_OBJECT_EXTENDED_LIMIT_VALID_FLAGS
  • JOB_OBJECT_LIMIT_ACTIVE_PROCESS
  • JOB_OBJECT_LIMIT_AFFINITY
  • JOB_OBJECT_LIMIT_BREAKAWAY_OK
  • JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION
  • JOB_OBJECT_LIMIT_JOB_MEMORY
  • JOB_OBJECT_LIMIT_JOB_TIME
  • JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE
  • JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME
  • JOB_OBJECT_LIMIT_PRIORITY_CLASS
  • JOB_OBJECT_LIMIT_PROCESS_MEMORY
  • JOB_OBJECT_LIMIT_PROCESS_TIME
  • JOB_OBJECT_LIMIT_SCHEDULING_CLASS
  • JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK
  • JOB_OBJECT_LIMIT_VALID_FLAGS
  • JOB_OBJECT_LIMIT_WORKINGSET
  • JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS
  • JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT
  • JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO
  • JOB_OBJECT_MSG_END_OF_JOB_TIME
  • JOB_OBJECT_MSG_END_OF_PROCESS_TIME
  • JOB_OBJECT_MSG_EXIT_PROCESS
  • JOB_OBJECT_MSG_JOB_MEMORY_LIMIT
  • JOB_OBJECT_MSG_NEW_PROCESS
  • JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT
  • JOB_OBJECT_POST_AT_END_OF_JOB
  • JOB_OBJECT_QUERY
  • JOB_OBJECT_RESERVED_LIMIT_VALID_FLAGS
  • JOB_OBJECT_SECURITY_FILTER_TOKENS
  • JOB_OBJECT_SECURITY_NO_ADMIN
  • JOB_OBJECT_SECURITY_ONLY_TOKEN
  • JOB_OBJECT_SECURITY_RESTRICTED_TOKEN
  • JOB_OBJECT_SECURITY_VALID_FLAGS
  • JOB_OBJECT_SET_ATTRIBUTES
  • JOB_OBJECT_SET_SECURITY_ATTRIBUTES
  • JOB_OBJECT_TERMINATE
  • JOB_OBJECT_TERMINATE_AT_END_OF_JOB
  • JOB_OBJECT_UILIMIT_ALL
  • JOB_OBJECT_UILIMIT_DESKTOP
  • JOB_OBJECT_UILIMIT_DISPLAYSETTINGS
  • JOB_OBJECT_UILIMIT_EXITWINDOWS
  • JOB_OBJECT_UILIMIT_GLOBALATOMS
  • JOB_OBJECT_UILIMIT_HANDLES
  • JOB_OBJECT_UILIMIT_NONE
  • JOB_OBJECT_UILIMIT_READCLIPBOARD
  • JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS
  • JOB_OBJECT_UILIMIT_WRITECLIPBOARD
  • JOB_OBJECT_UI_VALID_FLAGS
  • JobObjectAssociateCompletionPortInformation
  • JobObjectBasicAccountingInformation
  • JobObjectBasicAndIoAccountingInformation
  • JobObjectBasicLimitInformation
  • JobObjectBasicProcessIdList
  • JobObjectBasicUIRestrictions
  • JobObjectEndOfJobTimeInformation
  • JobObjectExtendedLimitInformation
  • JobObjectJobSetInformation
  • JobObjectSecurityLimitInformation
  • LABEL_SECURITY_INFORMATION
  • LIST_MODULES_32BIT
  • LIST_MODULES_64BIT
  • LIST_MODULES_ALL
  • LIST_MODULES_DEFAULT
  • LOGON32_LOGON_BATCH
  • LOGON32_LOGON_INTERACTIVE
  • LOGON32_LOGON_NETWORK
  • LOGON32_LOGON_NETWORK_CLEARTEXT
  • LOGON32_LOGON_NEW_CREDENTIALS
  • LOGON32_LOGON_SERVICE
  • LOGON32_LOGON_UNLOCK
  • LOGON32_PROVIDER_DEFAULT
  • LOGON32_PROVIDER_WINNT35
  • LOGON32_PROVIDER_WINNT40
  • LOGON32_PROVIDER_WINNT50
  • LR_CREATEDIBSECTION
  • LR_DEFAULTCOLOR
  • LR_DEFAULTSIZE
  • LR_LOADFROMFILE
  • LR_LOADMAP3DCOLORS
  • LR_LOADTRANSPARENT
  • LR_MONOCHROME
  • LR_SHARED
  • LR_VGACOLOR
  • MARKPARITY
  • MAXIMUM_PROCESSORS
  • MAXIMUM_WAIT_OBJECTS
  • MOVEFILE_COPY_ALLOWED
  • MOVEFILE_CREATE_HARDLINK
  • MOVEFILE_DELAY_UNTIL_REBOOT
  • MOVEFILE_FAIL_IF_NOT_TRACKABLE
  • MOVEFILE_REPLACE_EXISTING
  • MOVEFILE_WRITE_THROUGH
  • MaxJobObjectInfoClass
  • NIF_ICON
  • NIF_INFO
  • NIF_MESSAGE
  • NIF_STATE
  • NIF_TIP
  • NIIF_ERROR
  • NIIF_ICON_MASK
  • NIIF_INFO
  • NIIF_NONE
  • NIIF_NOSOUND
  • NIIF_WARNING
  • NIM_ADD
  • NIM_DELETE
  • NIM_MODIFY
  • NIM_SETFOCUS
  • NIM_SETVERSION
  • NMPWAIT_NOWAIT
  • NMPWAIT_USE_DEFAULT_WAIT
  • NMPWAIT_WAIT_FOREVER
  • NOPARITY
  • NORMAL_PRIORITY_CLASS
  • NOT_USED_ACCESS
  • NO_INHERITANCE
  • NO_PROPAGATE_INHERIT_ACE
  • OBJECT_INHERIT_ACE
  • ODDPARITY
  • ONE5STOPBITS
  • ONESTOPBIT
  • OPEN_ALWAYS
  • OPEN_EXISTING
  • OVERWRITE_HIDDEN
  • OWNER_SECURITY_INFORMATION
  • ObjectIdType
  • 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
  • PROGRESS_CANCEL
  • PROGRESS_CONTINUE
  • PROGRESS_QUIET
  • PROGRESS_STOP
  • PROTECTED_DACL_SECURITY_INFORMATION
  • PROTECTED_SACL_SECURITY_INFORMATION
  • PURGE_RXABORT
  • PURGE_RXCLEAR
  • PURGE_TXABORT
  • PURGE_TXCLEAR
  • PolicyAccountDomainInformation
  • PolicyAuditEventsInformation
  • PolicyAuditFullQueryInformation
  • PolicyAuditFullSetInformation
  • PolicyAuditLogInformation
  • PolicyDefaultQuotaInformation
  • PolicyDnsDomainInformation
  • PolicyLsaServerRoleInformation
  • PolicyModificationInformation
  • PolicyNotifyAccountDomainInformation
  • PolicyNotifyAuditEventsInformation
  • PolicyNotifyDnsDomainInformation
  • PolicyNotifyDomainEfsInformation
  • PolicyNotifyDomainKerberosTicketInformation
  • PolicyNotifyMachineAccountPasswordInformation
  • PolicyNotifyServerRoleInformation
  • PolicyPdAccountInformation
  • PolicyPrimaryDomainInformation
  • PolicyReplicaSourceInformation
  • PolicyServerDisabled
  • PolicyServerEnabled
  • PolicyServerRoleBackup
  • PolicyServerRolePrimary
  • 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_AuthLinkSpeed
  • RASCS_AuthNotify
  • RASCS_AuthProject
  • RASCS_AuthRetry
  • RASCS_Authenticate
  • RASCS_Authenticated
  • 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
  • REPLACEFILE_IGNORE_MERGE_ERRORS
  • REPLACEFILE_WRITE_THROUGH
  • REVOKE_ACCESS
  • RTS_CONTROL_DISABLE
  • RTS_CONTROL_ENABLE
  • RTS_CONTROL_HANDSHAKE
  • RTS_CONTROL_TOGGLE
  • SACL_SECURITY_INFORMATION
  • SANDBOX_INERT
  • SCS_32BIT_BINARY
  • SCS_DOS_BINARY
  • SCS_OS216_BINARY
  • SCS_PIF_BINARY
  • SCS_POSIX_BINARY
  • SCS_WOW_BINARY
  • SC_ACTION_NONE
  • SC_ACTION_REBOOT
  • SC_ACTION_RESTART
  • SC_ACTION_RUN_COMMAND
  • SC_ENUM_PROCESS_INFO
  • 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
  • SDDL_REVISION_1
  • SECPKG_CRED_BOTH
  • SECPKG_CRED_INBOUND
  • SECPKG_CRED_OUTBOUND
  • SECPKG_FLAG_ACCEPT_WIN32_NAME
  • SECPKG_FLAG_CLIENT_ONLY
  • SECPKG_FLAG_CONNECTION
  • SECPKG_FLAG_DATAGRAM
  • SECPKG_FLAG_EXTENDED_ERROR
  • SECPKG_FLAG_IMPERSONATION
  • SECPKG_FLAG_INTEGRITY
  • SECPKG_FLAG_MULTI_REQUIRED
  • SECPKG_FLAG_PRIVACY
  • SECPKG_FLAG_STREAM
  • SECPKG_FLAG_TOKEN_ONLY
  • 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
  • SERVICE_ACCEPT_HARDWAREPROFILECHANGE
  • SERVICE_ACCEPT_NETBINDCHANGE
  • SERVICE_ACCEPT_PARAMCHANGE
  • SERVICE_ACCEPT_PAUSE_CONTINUE
  • SERVICE_ACCEPT_POWEREVENT
  • SERVICE_ACCEPT_PRESHUTDOWN
  • SERVICE_ACCEPT_SESSIONCHANGE
  • SERVICE_ACCEPT_SHUTDOWN
  • SERVICE_ACCEPT_STOP
  • SERVICE_ACTIVE
  • SERVICE_ALL_ACCESS
  • SERVICE_AUTO_START
  • SERVICE_BOOT_START
  • SERVICE_CHANGE_CONFIG
  • SERVICE_CONFIG_DELAYED_AUTO_START_INFO
  • SERVICE_CONFIG_DESCRIPTION
  • SERVICE_CONFIG_FAILURE_ACTIONS
  • SERVICE_CONFIG_FAILURE_ACTIONS_FLAG
  • SERVICE_CONFIG_PRESHUTDOWN_INFO
  • SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO
  • SERVICE_CONFIG_SERVICE_SID_INFO
  • SERVICE_CONTINUE_PENDING
  • SERVICE_CONTROL_CONTINUE
  • SERVICE_CONTROL_DEVICEEVENT
  • SERVICE_CONTROL_HARDWAREPROFILECHANGE
  • SERVICE_CONTROL_INTERROGATE
  • SERVICE_CONTROL_NETBINDADD
  • SERVICE_CONTROL_NETBINDDISABLE
  • SERVICE_CONTROL_NETBINDENABLE
  • SERVICE_CONTROL_NETBINDREMOVE
  • SERVICE_CONTROL_PARAMCHANGE
  • SERVICE_CONTROL_PAUSE
  • SERVICE_CONTROL_POWEREVENT
  • SERVICE_CONTROL_PRESHUTDOWN
  • SERVICE_CONTROL_SESSIONCHANGE
  • 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_PAUSED
  • SERVICE_PAUSE_CONTINUE
  • SERVICE_PAUSE_PENDING
  • SERVICE_QUERY_CONFIG
  • SERVICE_QUERY_STATUS
  • SERVICE_RUNNING
  • SERVICE_SID_TYPE_NONE
  • SERVICE_SID_TYPE_RESTRICTED
  • SERVICE_SID_TYPE_UNRESTRICTED
  • SERVICE_SPECIFIC_ERROR
  • SERVICE_START
  • SERVICE_START_PENDING
  • SERVICE_STATE_ALL
  • SERVICE_STOP
  • SERVICE_STOPPED
  • SERVICE_STOP_PENDING
  • SERVICE_SYSTEM_START
  • SERVICE_USER_DEFINED_CONTROL
  • SERVICE_WIN32
  • SERVICE_WIN32_OWN_PROCESS
  • SERVICE_WIN32_SHARE_PROCESS
  • SETBREAK
  • SETDTR
  • SETRTS
  • SETXOFF
  • SETXON
  • SET_ACCESS
  • SET_AUDIT_FAILURE
  • SET_AUDIT_SUCCESS
  • SE_DACL_AUTO_INHERITED
  • SE_DACL_DEFAULTED
  • SE_DACL_PRESENT
  • SE_DACL_PROTECTED
  • SE_DS_OBJECT
  • 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_REMOVED
  • SE_PRIVILEGE_USED_FOR_ACCESS
  • 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
  • SO_CONNECT_TIME
  • SO_UPDATE_ACCEPT_CONTEXT
  • SO_UPDATE_CONNECT_CONTEXT
  • SPACEPARITY
  • STARTF_FORCEOFFFEEDBACK
  • STARTF_FORCEONFEEDBACK
  • STARTF_RUNFULLSCREEN
  • STARTF_USECOUNTCHARS
  • STARTF_USEFILLATTRIBUTE
  • STARTF_USEPOSITION
  • STARTF_USESHOWWINDOW
  • STARTF_USESIZE
  • STARTF_USESTDHANDLES
  • 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
  • SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE
  • SYMBOLIC_LINK_FLAG_DIRECTORY
  • SYNCHRONIZE
  • SYSTEM_AUDIT_ACE_TYPE
  • SYSTEM_AUDIT_OBJECT_ACE_TYPE
  • SecurityAnonymous
  • SecurityDelegation
  • SecurityIdentification
  • SecurityImpersonation
  • SidTypeAlias
  • SidTypeComputer
  • SidTypeDeletedAccount
  • SidTypeDomain
  • SidTypeGroup
  • SidTypeInvalid
  • SidTypeUnknown
  • SidTypeUser
  • SidTypeWellKnownGroup
  • TF_DISCONNECT
  • TF_REUSE_SOCKET
  • TF_USE_DEFAULT_WORKER
  • TF_USE_KERNEL_APC
  • TF_USE_SYSTEM_THREAD
  • TF_WRITE_BEHIND
  • THREAD_MODE_BACKGROUND_BEGIN
  • THREAD_MODE_BACKGROUND_END
  • THREAD_PRIORITY_ABOVE_NORMAL
  • THREAD_PRIORITY_BELOW_NORMAL
  • THREAD_PRIORITY_HIGHEST
  • THREAD_PRIORITY_IDLE
  • THREAD_PRIORITY_LOWEST
  • THREAD_PRIORITY_NORMAL
  • THREAD_PRIORITY_TIME_CRITICAL
  • TOKEN_ADJUST_DEFAULT
  • TOKEN_ADJUST_GROUPS
  • TOKEN_ADJUST_PRIVILEGES
  • TOKEN_ALL_ACCESS
  • TOKEN_ASSIGN_PRIMARY
  • TOKEN_DUPLICATE
  • TOKEN_EXECUTE
  • TOKEN_IMPERSONATE
  • TOKEN_QUERY
  • TOKEN_QUERY_SOURCE
  • TOKEN_READ
  • TOKEN_WRITE
  • TPM_BOTTOMALIGN
  • TPM_CENTERALIGN
  • TPM_LEFTALIGN
  • TPM_LEFTBUTTON
  • TPM_NONOTIFY
  • TPM_RETURNCMD
  • TPM_RIGHTALIGN
  • TPM_RIGHTBUTTON
  • TPM_TOPALIGN
  • TPM_VCENTERALIGN
  • TRUNCATE_EXISTING
  • 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
  • TokenImpersonation
  • TokenPrimary
  • TrustedControllersInformation
  • TrustedDomainAuthInformation
  • TrustedDomainAuthInformationInternal
  • TrustedDomainFullInformation
  • TrustedDomainFullInformation2Internal
  • TrustedDomainFullInformationInternal
  • TrustedDomainInformationBasic
  • TrustedDomainInformationEx
  • TrustedDomainInformationEx2Internal
  • TrustedDomainNameInformation
  • TrustedPasswordInformation
  • TrustedPosixOffsetInformation
  • UNPROTECTED_DACL_SECURITY_INFORMATION
  • UNPROTECTED_SACL_SECURITY_INFORMATION
  • UOI_FLAGS
  • UOI_NAME
  • UOI_TYPE
  • UOI_USER_SID
  • WAIT_ABANDONED
  • WAIT_ABANDONED_0
  • WAIT_FAILED
  • WAIT_IO_COMPLETION
  • WAIT_OBJECT_0
  • WAIT_TIMEOUT
  • WSAECONNABORTED
  • WSAECONNRESET
  • WSAEDISCON
  • WSAEFAULT
  • WSAEINPROGRESS
  • WSAEINTR
  • WSAEINVAL
  • WSAEMSGSIZE
  • WSAENETDOWN
  • WSAENETRESET
  • WSAENOBUFS
  • WSAENOTCONN
  • WSAENOTSOCK
  • WSAEOPNOTSUPP
  • WSAESHUTDOWN
  • WSAEWOULDBLOCK
  • WSA_IO_PENDING
  • WSA_OPERATION_ABORTED
  • WSF_VISIBLE
  • debug


ABOVE_NORMAL_PRIORITY_CLASS

const win32process.ABOVE_NORMAL_PRIORITY_CLASS;

Windows 2000: Indicates a process that has priority above NORMAL_PRIORITY_CLASS but below HIGH_PRIORITY_CLASS.


ACCESS_ALLOWED_ACE_TYPE

const win32security.ACCESS_ALLOWED_ACE_TYPE;

Access-allowed ACE that uses the ACCESS_ALLOWED_ACE structure.


ACCESS_ALLOWED_OBJECT_ACE_TYPE

const win32security.ACCESS_ALLOWED_OBJECT_ACE_TYPE;

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;

Access-denied ACE that uses the ACCESS_DENIED_ACE structure.


ACCESS_DENIED_OBJECT_ACE_TYPE

const win32security.ACCESS_DENIED_OBJECT_ACE_TYPE;

Windows 2000/XP: Object-specific access-denied ACE that uses the ACCESS_DENIED_OBJECT_ACE structure.


ACL_REVISION

const win32security.ACL_REVISION;


ACL_REVISION_DS

const win32security.ACL_REVISION_DS;


AuditCategoryAccountLogon

const win32security.AuditCategoryAccountLogon;


AuditCategoryAccountManagement

const win32security.AuditCategoryAccountManagement;


AuditCategoryDetailedTracking

const win32security.AuditCategoryDetailedTracking;


AuditCategoryDirectoryServiceAccess

const win32security.AuditCategoryDirectoryServiceAccess;


AuditCategoryLogon

const win32security.AuditCategoryLogon;


AuditCategoryObjectAccess

const win32security.AuditCategoryObjectAccess;


AuditCategoryPolicyChange

const win32security.AuditCategoryPolicyChange;


AuditCategoryPrivilegeUse

const win32security.AuditCategoryPrivilegeUse;


AuditCategorySystem

const win32security.AuditCategorySystem;


BELOW_NORMAL_PRIORITY_CLASS

const win32process.BELOW_NORMAL_PRIORITY_CLASS;

Windows 2000: Indicates a process that has priority above IDLE_PRIORITY_CLASS but below NORMAL_PRIORITY_CLASS.


CALLBACK_CHUNK_FINISHED

const win32file.CALLBACK_CHUNK_FINISHED;


CALLBACK_STREAM_SWITCH

const win32file.CALLBACK_STREAM_SWITCH;


CBR_110

const win32file.CBR_110;


CBR_115200

const win32file.CBR_115200;


CBR_1200

const win32file.CBR_1200;


CBR_128000

const win32file.CBR_128000;


CBR_14400

const win32file.CBR_14400;


CBR_19200

const win32file.CBR_19200;


CBR_2400

const win32file.CBR_2400;


CBR_256000

const win32file.CBR_256000;


CBR_300

const win32file.CBR_300;


CBR_38400

const win32file.CBR_38400;


CBR_4800

const win32file.CBR_4800;


CBR_56000

const win32file.CBR_56000;


CBR_57600

const win32file.CBR_57600;


CBR_600

const win32file.CBR_600;


CBR_9600

const win32file.CBR_9600;


CLRBREAK

const win32file.CLRBREAK;

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;

Clears the DTR (data-terminal-ready) signal.


CLRRTS

const win32file.CLRRTS;

Clears the RTS (request-to-send) signal.


CLR_NONE

const win32gui.CLR_NONE;


CONTAINER_INHERIT_ACE

const win32security.CONTAINER_INHERIT_ACE;


COPY_FILE_ALLOW_DECRYPTED_DESTINATION

const win32file.COPY_FILE_ALLOW_DECRYPTED_DESTINATION;


COPY_FILE_COPY_SYMLINK

const win32file.COPY_FILE_COPY_SYMLINK;


COPY_FILE_FAIL_IF_EXISTS

const win32file.COPY_FILE_FAIL_IF_EXISTS;


COPY_FILE_OPEN_SOURCE_FOR_WRITE

const win32file.COPY_FILE_OPEN_SOURCE_FOR_WRITE;


COPY_FILE_RESTARTABLE

const win32file.COPY_FILE_RESTARTABLE;


CREATE_ALWAYS

const win32file.CREATE_ALWAYS;

Creates a new file. The function overwrites the file if it exists.


CREATE_BREAKAWAY_FROM_JOB

const win32process.CREATE_BREAKAWAY_FROM_JOB;


CREATE_DEFAULT_ERROR_MODE

const win32process.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.


CREATE_FOR_DIR

const win32file.CREATE_FOR_DIR;


CREATE_FOR_IMPORT

const win32file.CREATE_FOR_IMPORT;


CREATE_NEW

const win32file.CREATE_NEW;

Creates a new file. The function fails if the specified file already exists.


CREATE_NEW_CONSOLE

const win32process.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

const win32process.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

const win32process.CREATE_NO_WINDOW;


CREATE_PRESERVE_CODE_AUTHZ_LEVEL

const win32process.CREATE_PRESERVE_CODE_AUTHZ_LEVEL;


CREATE_SEPARATE_WOW_VDM

const win32process.CREATE_SEPARATE_WOW_VDM;

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;

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;


CREATE_UNICODE_ENVIRONMENT

const win32process.CREATE_UNICODE_ENVIRONMENT;

If set, the environment block pointed to by lpEnvironment uses Unicode characters. If clear, the environment block uses ANSI characters.


CSIDL_BITBUCKET

const wincerapi.CSIDL_BITBUCKET;

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;

File system directory that contains files and folders that appear on the desktop for all users.


CSIDL_COMMON_PROGRAMS

const wincerapi.CSIDL_COMMON_PROGRAMS;

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;

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;

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;

Control Panel-virtual folder containing icons for the control panel applications.


CSIDL_DESKTOP

const wincerapi.CSIDL_DESKTOP;

Windows desktop-virtual folder at the root of the name space.


CSIDL_DESKTOPDIRECTORY

const wincerapi.CSIDL_DESKTOPDIRECTORY;

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;

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;

Virtual folder containing fonts.


CSIDL_NETHOOD

const wincerapi.CSIDL_NETHOOD;

File system directory containing objects that appear in the network neighborhood.


CSIDL_NETWORK

const wincerapi.CSIDL_NETWORK;

Network Neighborhood-virtual folder representing the top level of the network hierarchy.


CSIDL_PERSONAL

const wincerapi.CSIDL_PERSONAL;

File system directory that serves as a common repository for documents.


CSIDL_PRINTERS

const wincerapi.CSIDL_PRINTERS;

Printers folder-virtual folder containing installed printers.


CSIDL_PROGRAMS

const wincerapi.CSIDL_PROGRAMS;

File system directory that contains the user's program groups which are also file system directories.


CSIDL_RECENT

const wincerapi.CSIDL_RECENT;

File system directory containing the user's most recently used documents.


CSIDL_SENDTO

const wincerapi.CSIDL_SENDTO;

File system directory containing Send To menu items.


CSIDL_STARTMENU

const wincerapi.CSIDL_STARTMENU;

File system directory containing Start menu items.


CSIDL_STARTUP

const wincerapi.CSIDL_STARTUP;

File system directory that corresponds to the user's Startup program group.


CSIDL_TEMPLATES

const wincerapi.CSIDL_TEMPLATES;

File system directory that serves as a common repository for document templates.


DACL_SECURITY_INFORMATION

const win32security.DACL_SECURITY_INFORMATION;

Indicates the discretionary ACL of the object is being referenced.


DBT_CONFIGCHANGECANCELED

const win32service.DBT_CONFIGCHANGECANCELED;


DBT_CONFIGCHANGED

const win32service.DBT_CONFIGCHANGED;


DBT_CUSTOMEVENT

const win32service.DBT_CUSTOMEVENT;

user-defined event


DBT_DEVICEARRIVAL

const win32service.DBT_DEVICEARRIVAL;

system detected a new device


DBT_DEVICEQUERYREMOVE

const win32service.DBT_DEVICEQUERYREMOVE;

wants to remove, may fail


DBT_DEVICEQUERYREMOVEFAILED

const win32service.DBT_DEVICEQUERYREMOVEFAILED;

removal aborted


DBT_DEVICEREMOVECOMPLETE

const win32service.DBT_DEVICEREMOVECOMPLETE;

device is gone


DBT_DEVICEREMOVEPENDING

const win32service.DBT_DEVICEREMOVEPENDING;

about to remove, still avail.


DBT_DEVICETYPESPECIFIC

const win32service.DBT_DEVICETYPESPECIFIC;

type specific event


DBT_QUERYCHANGECONFIG

const win32service.DBT_QUERYCHANGECONFIG;


DEBUG_ONLY_THIS_PROCESS

const win32process.DEBUG_ONLY_THIS_PROCESS;

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;

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.


DENY_ACCESS

const win32security.DENY_ACCESS;


DETACHED_PROCESS

const win32process.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.


DF_ALLOWOTHERACCOUNTHOOK

const win32service.DF_ALLOWOTHERACCOUNTHOOK;

#define CWF_CREATE_ONLY CWF_CREATE_ONLY


DISABLE_MAX_PRIVILEGE

const win32security.DISABLE_MAX_PRIVILEGE;


DRIVE_CDROM

const win32file.DRIVE_CDROM;

The drive is a CD-ROM drive.


DRIVE_FIXED

const win32file.DRIVE_FIXED;

The disk cannot be removed from the drive.


DRIVE_NO_ROOT_DIR

const win32file.DRIVE_NO_ROOT_DIR;

The root directory does not exist.


DRIVE_RAMDISK

const win32file.DRIVE_RAMDISK;

The drive is a RAM disk.


DRIVE_REMOTE

const win32file.DRIVE_REMOTE;

The drive is a remote (network) drive.


DRIVE_REMOVABLE

const win32file.DRIVE_REMOVABLE;

The disk can be removed from the drive.


DRIVE_UNKNOWN

const win32file.DRIVE_UNKNOWN;

The drive type cannot be determined.


DS_SPN_ADD_SPN_OP

const win32security.DS_SPN_ADD_SPN_OP;


DS_SPN_DELETE_SPN_OP

const win32security.DS_SPN_DELETE_SPN_OP;


DS_SPN_DNS_HOST

const win32security.DS_SPN_DNS_HOST;


DS_SPN_DN_HOST

const win32security.DS_SPN_DN_HOST;


DS_SPN_DOMAIN

const win32security.DS_SPN_DOMAIN;


DS_SPN_NB_DOMAIN

const win32security.DS_SPN_NB_DOMAIN;


DS_SPN_NB_HOST

const win32security.DS_SPN_NB_HOST;


DS_SPN_REPLACE_SPN_OP

const win32security.DS_SPN_REPLACE_SPN_OP;


DS_SPN_SERVICE

const win32security.DS_SPN_SERVICE;


DTR_CONTROL_DISABLE

const win32file.DTR_CONTROL_DISABLE;

Disables the DTR line when the device is opened and leaves it disabled.


DTR_CONTROL_ENABLE

const win32file.DTR_CONTROL_ENABLE;

Enables the DTR line when the device is opened and leaves it on.


DTR_CONTROL_HANDSHAKE

const win32file.DTR_CONTROL_HANDSHAKE;

Enables DTR handshaking. If handshaking is enabled, it is an error for the application to adjust the line by using the EscapeCommFunction function.


ETDT_DISABLE

const _winxptheme.ETDT_DISABLE;


ETDT_ENABLE

const _winxptheme.ETDT_ENABLE;


ETDT_ENABLETAB

const _winxptheme.ETDT_ENABLETAB;


ETDT_USETABTEXTURE

const _winxptheme.ETDT_USETABTEXTURE;


EVENPARITY

const win32file.EVENPARITY;


EVENTLOG_AUDIT_FAILURE

const win32evtlog.EVENTLOG_AUDIT_FAILURE;


EVENTLOG_AUDIT_SUCCESS

const win32evtlog.EVENTLOG_AUDIT_SUCCESS;


EVENTLOG_BACKWARDS_READ

const win32evtlog.EVENTLOG_BACKWARDS_READ;


EVENTLOG_END_ALL_PAIRED_EVENTS

const win32evtlog.EVENTLOG_END_ALL_PAIRED_EVENTS;


EVENTLOG_END_PAIRED_EVENT

const win32evtlog.EVENTLOG_END_PAIRED_EVENT;


EVENTLOG_ERROR_TYPE

const win32evtlog.EVENTLOG_ERROR_TYPE;


EVENTLOG_FORWARDS_READ

const win32evtlog.EVENTLOG_FORWARDS_READ;


EVENTLOG_INFORMATION_TYPE

const win32evtlog.EVENTLOG_INFORMATION_TYPE;


EVENTLOG_PAIRED_EVENT_ACTIVE

const win32evtlog.EVENTLOG_PAIRED_EVENT_ACTIVE;


EVENTLOG_PAIRED_EVENT_INACTIVE

const win32evtlog.EVENTLOG_PAIRED_EVENT_INACTIVE;


EVENTLOG_SEEK_READ

const win32evtlog.EVENTLOG_SEEK_READ;


EVENTLOG_SEQUENTIAL_READ

const win32evtlog.EVENTLOG_SEQUENTIAL_READ;


EVENTLOG_START_PAIRED_EVENT

const win32evtlog.EVENTLOG_START_PAIRED_EVENT;


EVENTLOG_SUCCESS

const win32evtlog.EVENTLOG_SUCCESS;


EVENTLOG_WARNING_TYPE

const win32evtlog.EVENTLOG_WARNING_TYPE;


EVENT_ALL_ACCESS

const win32event.EVENT_ALL_ACCESS;

Specifies all possible access flags for the event object.


EVENT_MODIFY_STATE

const win32event.EVENT_MODIFY_STATE;

Enables use of the event handle in the SetEvent and ResetEvent functions to modify the event’s state.


EV_BREAK

const win32file.EV_BREAK;

A break was detected on input.


EV_CTS

const win32file.EV_CTS;

The CTS (clear-to-send) signal changed state.


EV_DSR

const win32file.EV_DSR;

The DSR (data-set-ready) signal changed state.


EV_ERR

const win32file.EV_ERR;

A line-status error occurred. Line-status errors are CE_FRAME, CE_OVERRUN, and CE_RXPARITY.


EV_RING

const win32file.EV_RING;

A ring indicator was detected.


EV_RLSD

const win32file.EV_RLSD;

The RLSD (receive-line-signal-detect) signal changed state.


EV_RXCHAR

const win32file.EV_RXCHAR;

A character was received and placed in the input buffer.


EV_RXFLAG

const win32file.EV_RXFLAG;

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;

The last character in the output buffer was sent.


EventMetadataEventChannel

const win32evtlog.EventMetadataEventChannel;


EventMetadataEventID

const win32evtlog.EventMetadataEventID;


EventMetadataEventKeyword

const win32evtlog.EventMetadataEventKeyword;


EventMetadataEventLevel

const win32evtlog.EventMetadataEventLevel;


EventMetadataEventMessageID

const win32evtlog.EventMetadataEventMessageID;


EventMetadataEventOpcode

const win32evtlog.EventMetadataEventOpcode;


EventMetadataEventTask

const win32evtlog.EventMetadataEventTask;


EventMetadataEventTemplate

const win32evtlog.EventMetadataEventTemplate;


EventMetadataEventVersion

const win32evtlog.EventMetadataEventVersion;


EvtChannelConfigAccess

const win32evtlog.EvtChannelConfigAccess;


EvtChannelConfigClassicEventlog

const win32evtlog.EvtChannelConfigClassicEventlog;


EvtChannelConfigEnabled

const win32evtlog.EvtChannelConfigEnabled;


EvtChannelConfigIsolation

const win32evtlog.EvtChannelConfigIsolation;


EvtChannelConfigOwningPublisher

const win32evtlog.EvtChannelConfigOwningPublisher;


EvtChannelConfigPropertyIdEND

const win32evtlog.EvtChannelConfigPropertyIdEND;


EvtChannelConfigType

const win32evtlog.EvtChannelConfigType;


EvtChannelLoggingConfigAutoBackup

const win32evtlog.EvtChannelLoggingConfigAutoBackup;


EvtChannelLoggingConfigLogFilePath

const win32evtlog.EvtChannelLoggingConfigLogFilePath;


EvtChannelLoggingConfigMaxSize

const win32evtlog.EvtChannelLoggingConfigMaxSize;


EvtChannelLoggingConfigRetention

const win32evtlog.EvtChannelLoggingConfigRetention;


EvtChannelPublisherList

const win32evtlog.EvtChannelPublisherList;


EvtChannelPublishingConfigBufferSize

const win32evtlog.EvtChannelPublishingConfigBufferSize;


EvtChannelPublishingConfigClockType

const win32evtlog.EvtChannelPublishingConfigClockType;


EvtChannelPublishingConfigControlGuid

const win32evtlog.EvtChannelPublishingConfigControlGuid;


EvtChannelPublishingConfigFileMax

const win32evtlog.EvtChannelPublishingConfigFileMax;


EvtChannelPublishingConfigKeywords

const win32evtlog.EvtChannelPublishingConfigKeywords;


EvtChannelPublishingConfigLatency

const win32evtlog.EvtChannelPublishingConfigLatency;


EvtChannelPublishingConfigLevel

const win32evtlog.EvtChannelPublishingConfigLevel;


EvtChannelPublishingConfigMaxBuffers

const win32evtlog.EvtChannelPublishingConfigMaxBuffers;


EvtChannelPublishingConfigMinBuffers

const win32evtlog.EvtChannelPublishingConfigMinBuffers;


EvtChannelPublishingConfigSidType

const win32evtlog.EvtChannelPublishingConfigSidType;


EvtEventMetadataPropertyIdEND

const win32evtlog.EvtEventMetadataPropertyIdEND;


EvtEventPath

const win32evtlog.EvtEventPath;


EvtEventPropertyIdEND

const win32evtlog.EvtEventPropertyIdEND;


EvtEventQueryIDs

const win32evtlog.EvtEventQueryIDs;


EvtExportLogChannelPath

const win32evtlog.EvtExportLogChannelPath;


EvtExportLogFilePath

const win32evtlog.EvtExportLogFilePath;


EvtExportLogTolerateQueryErrors

const win32evtlog.EvtExportLogTolerateQueryErrors;


EvtLogAttributes

const win32evtlog.EvtLogAttributes;


EvtLogCreationTime

const win32evtlog.EvtLogCreationTime;


EvtLogFileSize

const win32evtlog.EvtLogFileSize;


EvtLogFull

const win32evtlog.EvtLogFull;


EvtLogLastAccessTime

const win32evtlog.EvtLogLastAccessTime;


EvtLogLastWriteTime

const win32evtlog.EvtLogLastWriteTime;


EvtLogNumberOfLogRecords

const win32evtlog.EvtLogNumberOfLogRecords;


EvtLogOldestRecordNumber

const win32evtlog.EvtLogOldestRecordNumber;


EvtOpenChannelPath

const win32evtlog.EvtOpenChannelPath;


EvtOpenFilePath

const win32evtlog.EvtOpenFilePath;


EvtPublisherMetadataChannelReferenceFlags

const win32evtlog.EvtPublisherMetadataChannelReferenceFlags;


EvtPublisherMetadataChannelReferenceID

const win32evtlog.EvtPublisherMetadataChannelReferenceID;


EvtPublisherMetadataChannelReferenceIndex

const win32evtlog.EvtPublisherMetadataChannelReferenceIndex;


EvtPublisherMetadataChannelReferenceMessageID

const win32evtlog.EvtPublisherMetadataChannelReferenceMessageID;


EvtPublisherMetadataChannelReferencePath

const win32evtlog.EvtPublisherMetadataChannelReferencePath;


EvtPublisherMetadataChannelReferences

const win32evtlog.EvtPublisherMetadataChannelReferences;


EvtPublisherMetadataHelpLink

const win32evtlog.EvtPublisherMetadataHelpLink;


EvtPublisherMetadataKeywordMessageID

const win32evtlog.EvtPublisherMetadataKeywordMessageID;


EvtPublisherMetadataKeywordName

const win32evtlog.EvtPublisherMetadataKeywordName;


EvtPublisherMetadataKeywordValue

const win32evtlog.EvtPublisherMetadataKeywordValue;


EvtPublisherMetadataKeywords

const win32evtlog.EvtPublisherMetadataKeywords;


EvtPublisherMetadataLevelMessageID

const win32evtlog.EvtPublisherMetadataLevelMessageID;


EvtPublisherMetadataLevelName

const win32evtlog.EvtPublisherMetadataLevelName;


EvtPublisherMetadataLevelValue

const win32evtlog.EvtPublisherMetadataLevelValue;


EvtPublisherMetadataLevels

const win32evtlog.EvtPublisherMetadataLevels;


EvtPublisherMetadataMessageFilePath

const win32evtlog.EvtPublisherMetadataMessageFilePath;


EvtPublisherMetadataOpcodeMessageID

const win32evtlog.EvtPublisherMetadataOpcodeMessageID;


EvtPublisherMetadataOpcodeName

const win32evtlog.EvtPublisherMetadataOpcodeName;


EvtPublisherMetadataOpcodeValue

const win32evtlog.EvtPublisherMetadataOpcodeValue;


EvtPublisherMetadataOpcodes

const win32evtlog.EvtPublisherMetadataOpcodes;


EvtPublisherMetadataParameterFilePath

const win32evtlog.EvtPublisherMetadataParameterFilePath;


EvtPublisherMetadataPropertyIdEND

const win32evtlog.EvtPublisherMetadataPropertyIdEND;


EvtPublisherMetadataPublisherGuid

const win32evtlog.EvtPublisherMetadataPublisherGuid;


EvtPublisherMetadataPublisherMessageID

const win32evtlog.EvtPublisherMetadataPublisherMessageID;


EvtPublisherMetadataResourceFilePath

const win32evtlog.EvtPublisherMetadataResourceFilePath;


EvtPublisherMetadataTaskEventGuid

const win32evtlog.EvtPublisherMetadataTaskEventGuid;


EvtPublisherMetadataTaskMessageID

const win32evtlog.EvtPublisherMetadataTaskMessageID;


EvtPublisherMetadataTaskName

const win32evtlog.EvtPublisherMetadataTaskName;


EvtPublisherMetadataTaskValue

const win32evtlog.EvtPublisherMetadataTaskValue;


EvtPublisherMetadataTasks

const win32evtlog.EvtPublisherMetadataTasks;


EvtQueryChannelPath

const win32evtlog.EvtQueryChannelPath;


EvtQueryFilePath

const win32evtlog.EvtQueryFilePath;


EvtQueryForwardDirection

const win32evtlog.EvtQueryForwardDirection;


EvtQueryReverseDirection

const win32evtlog.EvtQueryReverseDirection;


EvtQueryTolerateQueryErrors

const win32evtlog.EvtQueryTolerateQueryErrors;


EvtRenderBookmark

const win32evtlog.EvtRenderBookmark;


EvtRenderEventValues

const win32evtlog.EvtRenderEventValues;


EvtRenderEventXml

const win32evtlog.EvtRenderEventXml;


EvtRpcLogin

const win32evtlog.EvtRpcLogin;


EvtRpcLoginAuthDefault

const win32evtlog.EvtRpcLoginAuthDefault;


EvtRpcLoginAuthKerberos

const win32evtlog.EvtRpcLoginAuthKerberos;


EvtRpcLoginAuthNTLM

const win32evtlog.EvtRpcLoginAuthNTLM;


EvtRpcLoginAuthNegotiate

const win32evtlog.EvtRpcLoginAuthNegotiate;


EvtSeekOriginMask

const win32evtlog.EvtSeekOriginMask;


EvtSeekRelativeToBookmark

const win32evtlog.EvtSeekRelativeToBookmark;


EvtSeekRelativeToCurrent

const win32evtlog.EvtSeekRelativeToCurrent;


EvtSeekRelativeToFirst

const win32evtlog.EvtSeekRelativeToFirst;


EvtSeekRelativeToLast

const win32evtlog.EvtSeekRelativeToLast;


EvtSeekStrict

const win32evtlog.EvtSeekStrict;


EvtSubscribeActionDeliver

const win32evtlog.EvtSubscribeActionDeliver;


EvtSubscribeActionError

const win32evtlog.EvtSubscribeActionError;


EvtSubscribeOriginMask

const win32evtlog.EvtSubscribeOriginMask;


EvtSubscribeStartAfterBookmark

const win32evtlog.EvtSubscribeStartAfterBookmark;


EvtSubscribeStartAtOldestRecord

const win32evtlog.EvtSubscribeStartAtOldestRecord;


EvtSubscribeStrict

const win32evtlog.EvtSubscribeStrict;


EvtSubscribeToFutureEvents

const win32evtlog.EvtSubscribeToFutureEvents;


EvtSubscribeTolerateQueryErrors

const win32evtlog.EvtSubscribeTolerateQueryErrors;


EvtVarTypeAnsiString

const win32evtlog.EvtVarTypeAnsiString;


EvtVarTypeBinary

const win32evtlog.EvtVarTypeBinary;


EvtVarTypeBoolean

const win32evtlog.EvtVarTypeBoolean;


EvtVarTypeByte

const win32evtlog.EvtVarTypeByte;


EvtVarTypeDouble

const win32evtlog.EvtVarTypeDouble;


EvtVarTypeEvtHandle

const win32evtlog.EvtVarTypeEvtHandle;


EvtVarTypeEvtXml

const win32evtlog.EvtVarTypeEvtXml;


EvtVarTypeFileTime

const win32evtlog.EvtVarTypeFileTime;


EvtVarTypeGuid

const win32evtlog.EvtVarTypeGuid;


EvtVarTypeHexInt32

const win32evtlog.EvtVarTypeHexInt32;


EvtVarTypeHexInt64

const win32evtlog.EvtVarTypeHexInt64;


EvtVarTypeInt16

const win32evtlog.EvtVarTypeInt16;


EvtVarTypeInt32

const win32evtlog.EvtVarTypeInt32;


EvtVarTypeInt64

const win32evtlog.EvtVarTypeInt64;


EvtVarTypeNull

const win32evtlog.EvtVarTypeNull;


EvtVarTypeSByte

const win32evtlog.EvtVarTypeSByte;


EvtVarTypeSid

const win32evtlog.EvtVarTypeSid;


EvtVarTypeSingle

const win32evtlog.EvtVarTypeSingle;


EvtVarTypeSizeT

const win32evtlog.EvtVarTypeSizeT;


EvtVarTypeString

const win32evtlog.EvtVarTypeString;


EvtVarTypeSysTime

const win32evtlog.EvtVarTypeSysTime;


EvtVarTypeUInt16

const win32evtlog.EvtVarTypeUInt16;


EvtVarTypeUInt32

const win32evtlog.EvtVarTypeUInt32;


EvtVarTypeUInt64

const win32evtlog.EvtVarTypeUInt64;


FAILED_ACCESS_ACE_FLAG

const win32security.FAILED_ACCESS_ACE_FLAG;


FD_ACCEPT

const win32file.FD_ACCEPT;


FD_ADDRESS_LIST_CHANGE

const win32file.FD_ADDRESS_LIST_CHANGE;


FD_CLOSE

const win32file.FD_CLOSE;


FD_CONNECT

const win32file.FD_CONNECT;


FD_GROUP_QOS

const win32file.FD_GROUP_QOS;


FD_OOB

const win32file.FD_OOB;


FD_QOS

const win32file.FD_QOS;


FD_READ

const win32file.FD_READ;


FD_ROUTING_INTERFACE_CHANGE

const win32file.FD_ROUTING_INTERFACE_CHANGE;


FD_WRITE

const win32file.FD_WRITE;


FILE_ALL_ACCESS

const win32file.FILE_ALL_ACCESS;


FILE_ATTRIBUTE_ARCHIVE

const win32file.FILE_ATTRIBUTE_ARCHIVE;

The file should be archived. Applications use this attribute to mark files for backup or removal.


FILE_ATTRIBUTE_COMPRESSED

const win32file.FILE_ATTRIBUTE_COMPRESSED;

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_DIRECTORY

const win32file.FILE_ATTRIBUTE_DIRECTORY;

The file is a directory


FILE_ATTRIBUTE_HIDDEN

const win32file.FILE_ATTRIBUTE_HIDDEN;

The file is hidden. It is not to be included in an ordinary directory listing.


FILE_ATTRIBUTE_NORMAL

const win32file.FILE_ATTRIBUTE_NORMAL;

The file has no other attributes set. This attribute is valid only if used alone.


FILE_ATTRIBUTE_OFFLINE

const win32file.FILE_ATTRIBUTE_OFFLINE;

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;

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;

The file is part of or is used exclusively by the operating system.


FILE_ATTRIBUTE_TEMPORARY

const win32file.FILE_ATTRIBUTE_TEMPORARY;

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;


FILE_CURRENT

const win32file.FILE_CURRENT;


FILE_ENCRYPTABLE

const win32file.FILE_ENCRYPTABLE;


FILE_END

const win32file.FILE_END;


FILE_FLAG_BACKUP_SEMANTICS

const win32file.FILE_FLAG_BACKUP_SEMANTICS;

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;

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;

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_OPEN_REPARSE_POINT

const win32file.FILE_FLAG_OPEN_REPARSE_POINT;

used to open a handle for use with DeviceIoControl and FSCTL_GET_REPARSE_POINT/FSCTL_SET_REPARSE_POINT)


FILE_FLAG_OVERLAPPED

const win32file.FILE_FLAG_OVERLAPPED;

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;

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;

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;

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;

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;


FILE_GENERIC_WRITE

const win32file.FILE_GENERIC_WRITE;


FILE_IS_ENCRYPTED

const win32file.FILE_IS_ENCRYPTED;


FILE_READ_ONLY

const win32file.FILE_READ_ONLY;


FILE_ROOT_DIR

const win32file.FILE_ROOT_DIR;


FILE_SHARE_DELETE

const win32file.FILE_SHARE_DELETE;

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;

Subsequent open operations on the object will succeed only if read access is requested.


FILE_SHARE_WRITE

const win32file.FILE_SHARE_WRITE;

Subsequent open operations on the object will succeed only if write access is requested.


FILE_SYSTEM_ATTR

const win32file.FILE_SYSTEM_ATTR;


FILE_SYSTEM_DIR

const win32file.FILE_SYSTEM_DIR;


FILE_SYSTEM_NOT_SUPPORT

const win32file.FILE_SYSTEM_NOT_SUPPORT;


FILE_TYPE_CHAR

const win32file.FILE_TYPE_CHAR;

The specified file is a character file, typically an LPT device or a console.


FILE_TYPE_DISK

const win32file.FILE_TYPE_DISK;

The specified file is a disk file.


FILE_TYPE_PIPE

const win32file.FILE_TYPE_PIPE;

The specified file is either a named or anonymous pipe.


FILE_TYPE_UNKNOWN

const win32file.FILE_TYPE_UNKNOWN;

The type of the specified file is unknown.


FILE_UNKNOWN

const win32file.FILE_UNKNOWN;


FILE_USER_DISALLOWED

const win32file.FILE_USER_DISALLOWED;


FileAllocationInfo

const win32file.FileAllocationInfo;


FileAttributeTagInfo

const win32file.FileAttributeTagInfo;


FileBasicInfo

const win32file.FileBasicInfo;


FileCompressionInfo

const win32file.FileCompressionInfo;


FileDispositionInfo

const win32file.FileDispositionInfo;


FileEndOfFileInfo

const win32file.FileEndOfFileInfo;


FileIdBothDirectoryInfo

const win32file.FileIdBothDirectoryInfo;


FileIdBothDirectoryRestartInfo

const win32file.FileIdBothDirectoryRestartInfo;


FileIdType

const win32file.FileIdType;


FileIoPriorityHintInfo

const win32file.FileIoPriorityHintInfo;


FileNameInfo

const win32file.FileNameInfo;


FileRenameInfo

const win32file.FileRenameInfo;


FileStandardInfo

const win32file.FileStandardInfo;


FileStreamInfo

const win32file.FileStreamInfo;


GENERIC_EXECUTE

const win32file.GENERIC_EXECUTE;

Specifies execute access.


GENERIC_READ

const win32file.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

const win32file.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.


GRANT_ACCESS

const win32security.GRANT_ACCESS;


GROUP_SECURITY_INFORMATION

const win32security.GROUP_SECURITY_INFORMATION;

Indicates the primary group identifier of the object is being referenced.


GetFileExInfoStandard

const win32file.GetFileExInfoStandard;


HHACT_BACK

const win32help.HHACT_BACK;


HHACT_CONTRACT

const win32help.HHACT_CONTRACT;


HHACT_CUSTOMIZE

const win32help.HHACT_CUSTOMIZE;


HHACT_EXPAND

const win32help.HHACT_EXPAND;


HHACT_FORWARD

const win32help.HHACT_FORWARD;


HHACT_HIGHLIGHT

const win32help.HHACT_HIGHLIGHT;


HHACT_HOME

const win32help.HHACT_HOME;


HHACT_JUMP1

const win32help.HHACT_JUMP1;


HHACT_JUMP2

const win32help.HHACT_JUMP2;


HHACT_LAST_ENUM

const win32help.HHACT_LAST_ENUM;


HHACT_NOTES

const win32help.HHACT_NOTES;


HHACT_OPTIONS

const win32help.HHACT_OPTIONS;


HHACT_PRINT

const win32help.HHACT_PRINT;


HHACT_REFRESH

const win32help.HHACT_REFRESH;


HHACT_STOP

const win32help.HHACT_STOP;


HHACT_SYNC

const win32help.HHACT_SYNC;


HHACT_TAB_CONTENTS

const win32help.HHACT_TAB_CONTENTS;


HHACT_TAB_FAVORITES

const win32help.HHACT_TAB_FAVORITES;


HHACT_TAB_HISTORY

const win32help.HHACT_TAB_HISTORY;


HHACT_TAB_INDEX

const win32help.HHACT_TAB_INDEX;


HHACT_TAB_SEARCH

const win32help.HHACT_TAB_SEARCH;


HHACT_TOC_NEXT

const win32help.HHACT_TOC_NEXT;


HHACT_TOC_PREV

const win32help.HHACT_TOC_PREV;


HHACT_ZOOM

const win32help.HHACT_ZOOM;


HHN_FIRST

const win32help.HHN_FIRST;


HHN_LAST

const win32help.HHN_LAST;


HHN_NAVCOMPLETE

const win32help.HHN_NAVCOMPLETE;


HHN_TRACK

const win32help.HHN_TRACK;


HHN_WINDOW_CREATE

const win32help.HHN_WINDOW_CREATE;


HHWIN_BUTTON_BACK

const win32help.HHWIN_BUTTON_BACK;

Back button


HHWIN_BUTTON_BROWSE_BCK

const win32help.HHWIN_BUTTON_BROWSE_BCK;

not implemented


HHWIN_BUTTON_BROWSE_FWD

const win32help.HHWIN_BUTTON_BROWSE_FWD;

not implemented


HHWIN_BUTTON_CONTENTS

const win32help.HHWIN_BUTTON_CONTENTS;

not implemented


HHWIN_BUTTON_EXPAND

const win32help.HHWIN_BUTTON_EXPAND;

Expand/contract button


HHWIN_BUTTON_FAVORITES

const win32help.HHWIN_BUTTON_FAVORITES;

not implemented


HHWIN_BUTTON_FORWARD

const win32help.HHWIN_BUTTON_FORWARD;

Forward button


HHWIN_BUTTON_HISTORY

const win32help.HHWIN_BUTTON_HISTORY;

not implemented


HHWIN_BUTTON_HOME

const win32help.HHWIN_BUTTON_HOME;

Home button


HHWIN_BUTTON_INDEX

const win32help.HHWIN_BUTTON_INDEX;

not implemented


HHWIN_BUTTON_JUMP1

const win32help.HHWIN_BUTTON_JUMP1;


HHWIN_BUTTON_JUMP2

const win32help.HHWIN_BUTTON_JUMP2;


HHWIN_BUTTON_NOTES

const win32help.HHWIN_BUTTON_NOTES;

not implemented


HHWIN_BUTTON_OPTIONS

const win32help.HHWIN_BUTTON_OPTIONS;

Options button


HHWIN_BUTTON_PRINT

const win32help.HHWIN_BUTTON_PRINT;

Print button


HHWIN_BUTTON_REFRESH

const win32help.HHWIN_BUTTON_REFRESH;

Refresh button


HHWIN_BUTTON_SEARCH

const win32help.HHWIN_BUTTON_SEARCH;

not implemented


HHWIN_BUTTON_STOP

const win32help.HHWIN_BUTTON_STOP;

Stop button


HHWIN_BUTTON_SYNC

const win32help.HHWIN_BUTTON_SYNC;

Sync button


HHWIN_BUTTON_TOC_NEXT

const win32help.HHWIN_BUTTON_TOC_NEXT;


HHWIN_BUTTON_TOC_PREV

const win32help.HHWIN_BUTTON_TOC_PREV;


HHWIN_BUTTON_ZOOM

const win32help.HHWIN_BUTTON_ZOOM;


HHWIN_DEF_BUTTONS

const win32help.HHWIN_DEF_BUTTONS;


HHWIN_NAVTAB_BOTTOM

const win32help.HHWIN_NAVTAB_BOTTOM;


HHWIN_NAVTAB_LEFT

const win32help.HHWIN_NAVTAB_LEFT;


HHWIN_NAVTAB_TOP

const win32help.HHWIN_NAVTAB_TOP;


HHWIN_PARAM_CUR_TAB

const win32help.HHWIN_PARAM_CUR_TAB;

valid curNavType


HHWIN_PARAM_EXPANSION

const win32help.HHWIN_PARAM_EXPANSION;

valid notExpanded


HHWIN_PARAM_EXSTYLES

const win32help.HHWIN_PARAM_EXSTYLES;

valid exStyles


HHWIN_PARAM_HISTORY_COUNT

const win32help.HHWIN_PARAM_HISTORY_COUNT;

valid cHistory


HHWIN_PARAM_INFOTYPES

const win32help.HHWIN_PARAM_INFOTYPES;

valid apInfoTypes


HHWIN_PARAM_NAV_WIDTH

const win32help.HHWIN_PARAM_NAV_WIDTH;

valid navWidth


HHWIN_PARAM_PROPERTIES

const win32help.HHWIN_PARAM_PROPERTIES;

valid winProperties


HHWIN_PARAM_RECT

const win32help.HHWIN_PARAM_RECT;

valid windowPos


HHWIN_PARAM_SHOWSTATE

const win32help.HHWIN_PARAM_SHOWSTATE;

valid showState


HHWIN_PARAM_STYLES

const win32help.HHWIN_PARAM_STYLES;

valid styles


HHWIN_PARAM_TABORDER

const win32help.HHWIN_PARAM_TABORDER;

valid taborder


HHWIN_PARAM_TABPOS

const win32help.HHWIN_PARAM_TABPOS;

valid tabpos


HHWIN_PARAM_TB_FLAGS

const win32help.HHWIN_PARAM_TB_FLAGS;

valid toolBarFlags


HHWIN_PROP_AUTO_SYNC

const win32help.HHWIN_PROP_AUTO_SYNC;

automatically ssync contents and index


HHWIN_PROP_CHANGE_TITLE

const win32help.HHWIN_PROP_CHANGE_TITLE;

Put current HTML title in title bar


HHWIN_PROP_MENU

const win32help.HHWIN_PROP_MENU;

Menu


HHWIN_PROP_NAV_ONLY_WIN

const win32help.HHWIN_PROP_NAV_ONLY_WIN;

Only display the navigation window


HHWIN_PROP_NODEF_EXSTYLES

const win32help.HHWIN_PROP_NODEF_EXSTYLES;

no default extended window styles (only HH_WINTYPE.exStyles)


HHWIN_PROP_NODEF_STYLES

const win32help.HHWIN_PROP_NODEF_STYLES;

no default window styles (only HH_WINTYPE.styles)


HHWIN_PROP_NOTB_TEXT

const win32help.HHWIN_PROP_NOTB_TEXT;

no text on toolbar buttons


HHWIN_PROP_NOTITLEBAR

const win32help.HHWIN_PROP_NOTITLEBAR;

no title bar


HHWIN_PROP_NO_TOOLBAR

const win32help.HHWIN_PROP_NO_TOOLBAR;

Don't display a toolbar


HHWIN_PROP_ONTOP

const win32help.HHWIN_PROP_ONTOP;

Top-most window


HHWIN_PROP_POST_QUIT

const win32help.HHWIN_PROP_POST_QUIT;

post WM_QUIT message when window closes


HHWIN_PROP_TAB_ADVSEARCH

const win32help.HHWIN_PROP_TAB_ADVSEARCH;

Advanced FTS UI.


HHWIN_PROP_TAB_AUTOHIDESHOW

const win32help.HHWIN_PROP_TAB_AUTOHIDESHOW;

Automatically hide/show tri-pane window


HHWIN_PROP_TAB_CUSTOM1

const win32help.HHWIN_PROP_TAB_CUSTOM1;

Use custom tab #1


HHWIN_PROP_TAB_CUSTOM2

const win32help.HHWIN_PROP_TAB_CUSTOM2;

Use custom tab #2


HHWIN_PROP_TAB_CUSTOM3

const win32help.HHWIN_PROP_TAB_CUSTOM3;

Use custom tab #3


HHWIN_PROP_TAB_CUSTOM4

const win32help.HHWIN_PROP_TAB_CUSTOM4;

Use custom tab #4


HHWIN_PROP_TAB_CUSTOM5

const win32help.HHWIN_PROP_TAB_CUSTOM5;

Use custom tab #5


HHWIN_PROP_TAB_CUSTOM6

const win32help.HHWIN_PROP_TAB_CUSTOM6;

Use custom tab #6


HHWIN_PROP_TAB_CUSTOM7

const win32help.HHWIN_PROP_TAB_CUSTOM7;

Use custom tab #7


HHWIN_PROP_TAB_CUSTOM8

const win32help.HHWIN_PROP_TAB_CUSTOM8;

Use custom tab #8


HHWIN_PROP_TAB_CUSTOM9

const win32help.HHWIN_PROP_TAB_CUSTOM9;

Use custom tab #9


HHWIN_PROP_TAB_FAVORITES

const win32help.HHWIN_PROP_TAB_FAVORITES;

include favorites tab in navigation pane


HHWIN_PROP_TAB_HISTORY

const win32help.HHWIN_PROP_TAB_HISTORY;

include history tab in navigation pane


HHWIN_PROP_TAB_SEARCH

const win32help.HHWIN_PROP_TAB_SEARCH;

include search tab in navigation pane


HHWIN_PROP_TRACKING

const win32help.HHWIN_PROP_TRACKING;

send tracking notification messages


HHWIN_PROP_TRI_PANE

const win32help.HHWIN_PROP_TRI_PANE;

use a tri-pane window


HHWIN_PROP_USER_POS

const win32help.HHWIN_PROP_USER_POS;

After initial creation, user controls window size/position


HHWIN_TB_MARGIN

const win32help.HHWIN_TB_MARGIN;

the window type has a margin


HH_ALINK_LOOKUP

const win32help.HH_ALINK_LOOKUP;

ALink version of HH_KEYWORD_LOOKUP


HH_CLOSE_ALL

const win32help.HH_CLOSE_ALL;

close all windows opened directly or indirectly by the caller


HH_DISPLAY_INDEX

const win32help.HH_DISPLAY_INDEX;

not currently implemented


HH_DISPLAY_SEARCH

const win32help.HH_DISPLAY_SEARCH;

not currently implemented


HH_DISPLAY_TEXT_POPUP

const win32help.HH_DISPLAY_TEXT_POPUP;

display string resource id or text in a popup window


HH_DISPLAY_TOC

const win32help.HH_DISPLAY_TOC;

not currently implemented


HH_DISPLAY_TOPIC

const win32help.HH_DISPLAY_TOPIC;


HH_ENUM_CATEGORY

const win32help.HH_ENUM_CATEGORY;

Get category name, call repeatedly to enumerate, -1 at end


HH_ENUM_CATEGORY_IT

const win32help.HH_ENUM_CATEGORY_IT;

Get category info type members, call repeatedly to enumerate, -1 at end


HH_ENUM_INFO_TYPE

const win32help.HH_ENUM_INFO_TYPE;

Get Info type name, call repeatedly to enumerate, -1 at end


HH_FTS_DEFAULT_PROXIMITY

const win32help.HH_FTS_DEFAULT_PROXIMITY;


HH_GET_LAST_ERROR

const win32help.HH_GET_LAST_ERROR;

not currently implemented See HHERROR.h


HH_GET_WIN_HANDLE

const win32help.HH_GET_WIN_HANDLE;


HH_GET_WIN_TYPE

const win32help.HH_GET_WIN_TYPE;


HH_GPROPID_CONTENT_LANGUAGE

const win32help.HH_GPROPID_CONTENT_LANGUAGE;

long: LandId for desired content.


HH_GPROPID_CURRENT_SUBSET

const win32help.HH_GPROPID_CURRENT_SUBSET;

BSTR: Current subset.


HH_GPROPID_SINGLETHREAD

const win32help.HH_GPROPID_SINGLETHREAD;

VARIANT_BOOL: True for single thread


HH_GPROPID_TOOLBAR_MARGIN

const win32help.HH_GPROPID_TOOLBAR_MARGIN;

long: Provides a left/right margin around the toolbar.


HH_GPROPID_UI_LANGUAGE

const win32help.HH_GPROPID_UI_LANGUAGE;

long: LangId of the UI.


HH_HELP_CONTEXT

const win32help.HH_HELP_CONTEXT;

display mapped numeric value in dwData


HH_HELP_FINDER

const win32help.HH_HELP_FINDER;

WinHelp equivalent


HH_INITIALIZE

const win32help.HH_INITIALIZE;

Initializes the help system.


HH_KEYWORD_LOOKUP

const win32help.HH_KEYWORD_LOOKUP;


HH_MAX_TABS_CUSTOM

const win32help.HH_MAX_TABS_CUSTOM;


HH_PRETRANSLATEMESSAGE

const win32help.HH_PRETRANSLATEMESSAGE;

Pumps messages. (NULL, NULL, MSG*).


HH_RESERVED1

const win32help.HH_RESERVED1;


HH_RESERVED2

const win32help.HH_RESERVED2;


HH_RESERVED3

const win32help.HH_RESERVED3;


HH_RESET_IT_FILTER

const win32help.HH_RESET_IT_FILTER;

Clear the info type filter of all info types.


HH_SET_EXCLUSIVE_FILTER

const win32help.HH_SET_EXCLUSIVE_FILTER;

set exclusive filtering method for untyped topics to be excluded from display


HH_SET_GLOBAL_PROPERTY

const win32help.HH_SET_GLOBAL_PROPERTY;

Set a global property. (NULL, NULL, HH_GPROP).


HH_SET_INCLUSIVE_FILTER

const win32help.HH_SET_INCLUSIVE_FILTER;

set inclusive filtering method for untyped topics to be included in display


HH_SET_INFO_TYPE

const win32help.HH_SET_INFO_TYPE;

Add Info type to filter.


HH_SET_WIN_TYPE

const win32help.HH_SET_WIN_TYPE;


HH_SYNC

const win32help.HH_SYNC;


HH_TAB_AUTHOR

const win32help.HH_TAB_AUTHOR;


HH_TAB_CONTENTS

const win32help.HH_TAB_CONTENTS;


HH_TAB_CUSTOM_FIRST

const win32help.HH_TAB_CUSTOM_FIRST;


HH_TAB_CUSTOM_LAST

const win32help.HH_TAB_CUSTOM_LAST;


HH_TAB_FAVORITES

const win32help.HH_TAB_FAVORITES;


HH_TAB_HISTORY

const win32help.HH_TAB_HISTORY;


HH_TAB_INDEX

const win32help.HH_TAB_INDEX;


HH_TAB_SEARCH

const win32help.HH_TAB_SEARCH;


HH_TP_HELP_CONTEXTMENU

const win32help.HH_TP_HELP_CONTEXTMENU;

text popup help, same as WinHelp HELP_CONTEXTMENU


HH_TP_HELP_WM_HELP

const win32help.HH_TP_HELP_WM_HELP;

text popup help, same as WinHelp HELP_WM_HELP


HH_UNINITIALIZE

const win32help.HH_UNINITIALIZE;

Uninitializes the help system.


HIGH_PRIORITY_CLASS

const win32process.HIGH_PRIORITY_CLASS;

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;

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.


IDTB_BACK

const win32help.IDTB_BACK;


IDTB_BROWSE_BACK

const win32help.IDTB_BROWSE_BACK;


IDTB_BROWSE_FWD

const win32help.IDTB_BROWSE_FWD;


IDTB_CONTENTS

const win32help.IDTB_CONTENTS;

not implemented


IDTB_CONTRACT

const win32help.IDTB_CONTRACT;


IDTB_CUSTOMIZE

const win32help.IDTB_CUSTOMIZE;


IDTB_EXPAND

const win32help.IDTB_EXPAND;


IDTB_FAVORITES

const win32help.IDTB_FAVORITES;

not implemented


IDTB_FORWARD

const win32help.IDTB_FORWARD;


IDTB_HISTORY

const win32help.IDTB_HISTORY;

not implemented


IDTB_HOME

const win32help.IDTB_HOME;


IDTB_INDEX

const win32help.IDTB_INDEX;

not implemented


IDTB_JUMP1

const win32help.IDTB_JUMP1;


IDTB_JUMP2

const win32help.IDTB_JUMP2;


IDTB_NOTES

const win32help.IDTB_NOTES;

not implemented


IDTB_OPTIONS

const win32help.IDTB_OPTIONS;


IDTB_PRINT

const win32help.IDTB_PRINT;


IDTB_REFRESH

const win32help.IDTB_REFRESH;


IDTB_SEARCH

const win32help.IDTB_SEARCH;

not implemented


IDTB_STOP

const win32help.IDTB_STOP;


IDTB_SYNC

const win32help.IDTB_SYNC;


IDTB_TOC_NEXT

const win32help.IDTB_TOC_NEXT;


IDTB_TOC_PREV

const win32help.IDTB_TOC_PREV;


IDTB_ZOOM

const win32help.IDTB_ZOOM;


ILC_COLOR

const win32gui.ILC_COLOR;


ILC_COLOR16

const win32gui.ILC_COLOR16;


ILC_COLOR24

const win32gui.ILC_COLOR24;


ILC_COLOR32

const win32gui.ILC_COLOR32;


ILC_COLOR4

const win32gui.ILC_COLOR4;


ILC_COLOR8

const win32gui.ILC_COLOR8;


ILC_COLORDDB

const win32gui.ILC_COLORDDB;


ILC_MASK

const win32gui.ILC_MASK;


ILD_BLEND

const win32gui.ILD_BLEND;


ILD_BLEND25

const win32gui.ILD_BLEND25;


ILD_BLEND50

const win32gui.ILD_BLEND50;


ILD_FOCUS

const win32gui.ILD_FOCUS;


ILD_MASK

const win32gui.ILD_MASK;


ILD_NORMAL

const win32gui.ILD_NORMAL;


ILD_SELECTED

const win32gui.ILD_SELECTED;


ILD_TRANSPARENT

const win32gui.ILD_TRANSPARENT;


IMAGE_BITMAP

const win32gui.IMAGE_BITMAP;


IMAGE_CURSOR

const win32gui.IMAGE_CURSOR;


IMAGE_ICON

const win32gui.IMAGE_ICON;


INFINITE

const win32event.INFINITE;


INHERITED_ACE

const win32security.INHERITED_ACE;


INHERIT_ONLY_ACE

const win32security.INHERIT_ONLY_ACE;


IoPriorityHintLow

const win32file.IoPriorityHintLow;


IoPriorityHintNormal

const win32file.IoPriorityHintNormal;


IoPriorityHintVeryLow

const win32file.IoPriorityHintVeryLow;


JOB_OBJECT_ALL_ACCESS

const win32job.JOB_OBJECT_ALL_ACCESS;


JOB_OBJECT_ASSIGN_PROCESS

const win32job.JOB_OBJECT_ASSIGN_PROCESS;


JOB_OBJECT_BASIC_LIMIT_VALID_FLAGS

const win32job.JOB_OBJECT_BASIC_LIMIT_VALID_FLAGS;


JOB_OBJECT_EXTENDED_LIMIT_VALID_FLAGS

const win32job.JOB_OBJECT_EXTENDED_LIMIT_VALID_FLAGS;


JOB_OBJECT_LIMIT_ACTIVE_PROCESS

const win32job.JOB_OBJECT_LIMIT_ACTIVE_PROCESS;


JOB_OBJECT_LIMIT_AFFINITY

const win32job.JOB_OBJECT_LIMIT_AFFINITY;


JOB_OBJECT_LIMIT_BREAKAWAY_OK

const win32job.JOB_OBJECT_LIMIT_BREAKAWAY_OK;


JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION

const win32job.JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION;


JOB_OBJECT_LIMIT_JOB_MEMORY

const win32job.JOB_OBJECT_LIMIT_JOB_MEMORY;


JOB_OBJECT_LIMIT_JOB_TIME

const win32job.JOB_OBJECT_LIMIT_JOB_TIME;


JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE

const win32job.JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;


JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME

const win32job.JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME;


JOB_OBJECT_LIMIT_PRIORITY_CLASS

const win32job.JOB_OBJECT_LIMIT_PRIORITY_CLASS;


JOB_OBJECT_LIMIT_PROCESS_MEMORY

const win32job.JOB_OBJECT_LIMIT_PROCESS_MEMORY;


JOB_OBJECT_LIMIT_PROCESS_TIME

const win32job.JOB_OBJECT_LIMIT_PROCESS_TIME;


JOB_OBJECT_LIMIT_SCHEDULING_CLASS

const win32job.JOB_OBJECT_LIMIT_SCHEDULING_CLASS;


JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK

const win32job.JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK;


JOB_OBJECT_LIMIT_VALID_FLAGS

const win32job.JOB_OBJECT_LIMIT_VALID_FLAGS;


JOB_OBJECT_LIMIT_WORKINGSET

const win32job.JOB_OBJECT_LIMIT_WORKINGSET;


JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS

const win32job.JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS;


JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT

const win32job.JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT;


JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO

const win32job.JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO;


JOB_OBJECT_MSG_END_OF_JOB_TIME

const win32job.JOB_OBJECT_MSG_END_OF_JOB_TIME;


JOB_OBJECT_MSG_END_OF_PROCESS_TIME

const win32job.JOB_OBJECT_MSG_END_OF_PROCESS_TIME;


JOB_OBJECT_MSG_EXIT_PROCESS

const win32job.JOB_OBJECT_MSG_EXIT_PROCESS;


JOB_OBJECT_MSG_JOB_MEMORY_LIMIT

const win32job.JOB_OBJECT_MSG_JOB_MEMORY_LIMIT;


JOB_OBJECT_MSG_NEW_PROCESS

const win32job.JOB_OBJECT_MSG_NEW_PROCESS;


JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT

const win32job.JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT;


JOB_OBJECT_POST_AT_END_OF_JOB

const win32job.JOB_OBJECT_POST_AT_END_OF_JOB;


JOB_OBJECT_QUERY

const win32job.JOB_OBJECT_QUERY;


JOB_OBJECT_RESERVED_LIMIT_VALID_FLAGS

const win32job.JOB_OBJECT_RESERVED_LIMIT_VALID_FLAGS;


JOB_OBJECT_SECURITY_FILTER_TOKENS

const win32job.JOB_OBJECT_SECURITY_FILTER_TOKENS;


JOB_OBJECT_SECURITY_NO_ADMIN

const win32job.JOB_OBJECT_SECURITY_NO_ADMIN;


JOB_OBJECT_SECURITY_ONLY_TOKEN

const win32job.JOB_OBJECT_SECURITY_ONLY_TOKEN;


JOB_OBJECT_SECURITY_RESTRICTED_TOKEN

const win32job.JOB_OBJECT_SECURITY_RESTRICTED_TOKEN;


JOB_OBJECT_SECURITY_VALID_FLAGS

const win32job.JOB_OBJECT_SECURITY_VALID_FLAGS;


JOB_OBJECT_SET_ATTRIBUTES

const win32job.JOB_OBJECT_SET_ATTRIBUTES;


JOB_OBJECT_SET_SECURITY_ATTRIBUTES

const win32job.JOB_OBJECT_SET_SECURITY_ATTRIBUTES;


JOB_OBJECT_TERMINATE

const win32job.JOB_OBJECT_TERMINATE;


JOB_OBJECT_TERMINATE_AT_END_OF_JOB

const win32job.JOB_OBJECT_TERMINATE_AT_END_OF_JOB;


JOB_OBJECT_UILIMIT_ALL

const win32job.JOB_OBJECT_UILIMIT_ALL;


JOB_OBJECT_UILIMIT_DESKTOP

const win32job.JOB_OBJECT_UILIMIT_DESKTOP;


JOB_OBJECT_UILIMIT_DISPLAYSETTINGS

const win32job.JOB_OBJECT_UILIMIT_DISPLAYSETTINGS;


JOB_OBJECT_UILIMIT_EXITWINDOWS

const win32job.JOB_OBJECT_UILIMIT_EXITWINDOWS;


JOB_OBJECT_UILIMIT_GLOBALATOMS

const win32job.JOB_OBJECT_UILIMIT_GLOBALATOMS;


JOB_OBJECT_UILIMIT_HANDLES

const win32job.JOB_OBJECT_UILIMIT_HANDLES;


JOB_OBJECT_UILIMIT_NONE

const win32job.JOB_OBJECT_UILIMIT_NONE;


JOB_OBJECT_UILIMIT_READCLIPBOARD

const win32job.JOB_OBJECT_UILIMIT_READCLIPBOARD;


JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS

const win32job.JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS;


JOB_OBJECT_UILIMIT_WRITECLIPBOARD

const win32job.JOB_OBJECT_UILIMIT_WRITECLIPBOARD;


JOB_OBJECT_UI_VALID_FLAGS

const win32job.JOB_OBJECT_UI_VALID_FLAGS;


JobObjectAssociateCompletionPortInformation

const win32job.JobObjectAssociateCompletionPortInformation;


JobObjectBasicAccountingInformation

const win32job.JobObjectBasicAccountingInformation;


JobObjectBasicAndIoAccountingInformation

const win32job.JobObjectBasicAndIoAccountingInformation;


JobObjectBasicLimitInformation

const win32job.JobObjectBasicLimitInformation;


JobObjectBasicProcessIdList

const win32job.JobObjectBasicProcessIdList;


JobObjectBasicUIRestrictions

const win32job.JobObjectBasicUIRestrictions;


JobObjectEndOfJobTimeInformation

const win32job.JobObjectEndOfJobTimeInformation;


JobObjectExtendedLimitInformation

const win32job.JobObjectExtendedLimitInformation;


JobObjectJobSetInformation

const win32job.JobObjectJobSetInformation;


JobObjectSecurityLimitInformation

const win32job.JobObjectSecurityLimitInformation;


LABEL_SECURITY_INFORMATION

const win32security.LABEL_SECURITY_INFORMATION;


LIST_MODULES_32BIT

const win32process.LIST_MODULES_32BIT;


LIST_MODULES_64BIT

const win32process.LIST_MODULES_64BIT;


LIST_MODULES_ALL

const win32process.LIST_MODULES_ALL;


LIST_MODULES_DEFAULT

const win32process.LIST_MODULES_DEFAULT;


LOGON32_LOGON_BATCH

const win32security.LOGON32_LOGON_BATCH;

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;

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;

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_NETWORK_CLEARTEXT

const win32security.LOGON32_LOGON_NETWORK_CLEARTEXT;


LOGON32_LOGON_NEW_CREDENTIALS

const win32security.LOGON32_LOGON_NEW_CREDENTIALS;


LOGON32_LOGON_SERVICE

const win32security.LOGON32_LOGON_SERVICE;

Indicates a service-type logon. The account provided must have the service privilege enabled.


LOGON32_LOGON_UNLOCK

const win32security.LOGON32_LOGON_UNLOCK;


LOGON32_PROVIDER_DEFAULT

const win32security.LOGON32_PROVIDER_DEFAULT;

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;

Use the Windows NT 3.5 logon provider.


LOGON32_PROVIDER_WINNT40

const win32security.LOGON32_PROVIDER_WINNT40;

Use the Windows NT 4.0 logon provider


LOGON32_PROVIDER_WINNT50

const win32security.LOGON32_PROVIDER_WINNT50;

Use the Negotiate protocol


LR_CREATEDIBSECTION

const win32gui.LR_CREATEDIBSECTION;


LR_DEFAULTCOLOR

const win32gui.LR_DEFAULTCOLOR;


LR_DEFAULTSIZE

const win32gui.LR_DEFAULTSIZE;


LR_LOADFROMFILE

const win32gui.LR_LOADFROMFILE;


LR_LOADMAP3DCOLORS

const win32gui.LR_LOADMAP3DCOLORS;


LR_LOADTRANSPARENT

const win32gui.LR_LOADTRANSPARENT;


LR_MONOCHROME

const win32gui.LR_MONOCHROME;


LR_SHARED

const win32gui.LR_SHARED;


LR_VGACOLOR

const win32gui.LR_VGACOLOR;


MARKPARITY

const win32file.MARKPARITY;


MAXIMUM_PROCESSORS

const win32process.MAXIMUM_PROCESSORS;


MAXIMUM_WAIT_OBJECTS

const win32event.MAXIMUM_WAIT_OBJECTS;


MOVEFILE_COPY_ALLOWED

const win32file.MOVEFILE_COPY_ALLOWED;

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_CREATE_HARDLINK

const win32file.MOVEFILE_CREATE_HARDLINK;


MOVEFILE_DELAY_UNTIL_REBOOT

const win32file.MOVEFILE_DELAY_UNTIL_REBOOT;

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_FAIL_IF_NOT_TRACKABLE

const win32file.MOVEFILE_FAIL_IF_NOT_TRACKABLE;


MOVEFILE_REPLACE_EXISTING

const win32file.MOVEFILE_REPLACE_EXISTING;

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;

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.


MaxJobObjectInfoClass

const win32job.MaxJobObjectInfoClass;


NIF_ICON

const win32gui.NIF_ICON;


NIF_INFO

const win32gui.NIF_INFO;


NIF_MESSAGE

const win32gui.NIF_MESSAGE;


NIF_STATE

const win32gui.NIF_STATE;

#define NIF_GUID NIF_GUID


NIF_TIP

const win32gui.NIF_TIP;


NIIF_ERROR

const win32gui.NIIF_ERROR;


NIIF_ICON_MASK

const win32gui.NIIF_ICON_MASK;


NIIF_INFO

const win32gui.NIIF_INFO;

#define NIIF_USER NIIF_USER


NIIF_NONE

const win32gui.NIIF_NONE;


NIIF_NOSOUND

const win32gui.NIIF_NOSOUND;


NIIF_WARNING

const win32gui.NIIF_WARNING;


NIM_ADD

const win32gui.NIM_ADD;

Adds an icon to the status area.


NIM_DELETE

const win32gui.NIM_DELETE;

Deletes an icon from the status area.


NIM_MODIFY

const win32gui.NIM_MODIFY;

Modifies an icon in the status area.


NIM_SETFOCUS

const win32gui.NIM_SETFOCUS;

Give the icon focus.


NIM_SETVERSION

const win32gui.NIM_SETVERSION;


NMPWAIT_NOWAIT

const win32pipe.NMPWAIT_NOWAIT;


NMPWAIT_USE_DEFAULT_WAIT

const win32pipe.NMPWAIT_USE_DEFAULT_WAIT;


NMPWAIT_WAIT_FOREVER

const win32pipe.NMPWAIT_WAIT_FOREVER;


NOPARITY

const win32file.NOPARITY;


NORMAL_PRIORITY_CLASS

const win32process.NORMAL_PRIORITY_CLASS;

Indicates a normal process with no special scheduling needs.


NOT_USED_ACCESS

const win32security.NOT_USED_ACCESS;


NO_INHERITANCE

const win32security.NO_INHERITANCE;


NO_PROPAGATE_INHERIT_ACE

const win32security.NO_PROPAGATE_INHERIT_ACE;


OBJECT_INHERIT_ACE

const win32security.OBJECT_INHERIT_ACE;


ODDPARITY

const win32file.ODDPARITY;


ONE5STOPBITS

const win32file.ONE5STOPBITS;


ONESTOPBIT

const win32file.ONESTOPBIT;


OPEN_ALWAYS

const win32file.OPEN_ALWAYS;

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;

Opens the file. The function fails if the file does not exist.


OVERWRITE_HIDDEN

const win32file.OVERWRITE_HIDDEN;


OWNER_SECURITY_INFORMATION

const win32security.OWNER_SECURITY_INFORMATION;

Indicates the owner identifier of the object is being referenced.


ObjectIdType

const win32file.ObjectIdType;


PIPE_ACCESS_DUPLEX

const win32pipe.PIPE_ACCESS_DUPLEX;


PIPE_ACCESS_INBOUND

const win32pipe.PIPE_ACCESS_INBOUND;


PIPE_ACCESS_OUTBOUND

const win32pipe.PIPE_ACCESS_OUTBOUND;


PIPE_NOWAIT

const win32pipe.PIPE_NOWAIT;


PIPE_READMODE_BYTE

const win32pipe.PIPE_READMODE_BYTE;


PIPE_READMODE_MESSAGE

const win32pipe.PIPE_READMODE_MESSAGE;


PIPE_TYPE_BYTE

const win32pipe.PIPE_TYPE_BYTE;


PIPE_TYPE_MESSAGE

const win32pipe.PIPE_TYPE_MESSAGE;


PIPE_UNLIMITED_INSTANCES

const win32pipe.PIPE_UNLIMITED_INSTANCES;


PIPE_WAIT

const win32pipe.PIPE_WAIT;


POLICY_ALL_ACCESS

const win32security.POLICY_ALL_ACCESS;


POLICY_AUDIT_EVENT_FAILURE

const win32security.POLICY_AUDIT_EVENT_FAILURE;

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;

Do not generate audit records for events of this type.


POLICY_AUDIT_EVENT_SUCCESS

const win32security.POLICY_AUDIT_EVENT_SUCCESS;

Generate audit records for successful events of this type.


POLICY_AUDIT_EVENT_UNCHANGED

const win32security.POLICY_AUDIT_EVENT_UNCHANGED;

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;


POLICY_CREATE_ACCOUNT

const win32security.POLICY_CREATE_ACCOUNT;


POLICY_CREATE_PRIVILEGE

const win32security.POLICY_CREATE_PRIVILEGE;


POLICY_CREATE_SECRET

const win32security.POLICY_CREATE_SECRET;


POLICY_EXECUTE

const win32security.POLICY_EXECUTE;


POLICY_GET_PRIVATE_INFORMATION

const win32security.POLICY_GET_PRIVATE_INFORMATION;


POLICY_LOOKUP_NAMES

const win32security.POLICY_LOOKUP_NAMES;


POLICY_NOTIFICATION

const win32security.POLICY_NOTIFICATION;


POLICY_READ

const win32security.POLICY_READ;


POLICY_SERVER_ADMIN

const win32security.POLICY_SERVER_ADMIN;


POLICY_SET_AUDIT_REQUIREMENTS

const win32security.POLICY_SET_AUDIT_REQUIREMENTS;


POLICY_SET_DEFAULT_QUOTA_LIMITS

const win32security.POLICY_SET_DEFAULT_QUOTA_LIMITS;


POLICY_TRUST_ADMIN

const win32security.POLICY_TRUST_ADMIN;


POLICY_VIEW_AUDIT_INFORMATION

const win32security.POLICY_VIEW_AUDIT_INFORMATION;


POLICY_VIEW_LOCAL_INFORMATION

const win32security.POLICY_VIEW_LOCAL_INFORMATION;


POLICY_WRITE

const win32security.POLICY_WRITE;


PROGRESS_CANCEL

const win32file.PROGRESS_CANCEL;


PROGRESS_CONTINUE

const win32file.PROGRESS_CONTINUE;


PROGRESS_QUIET

const win32file.PROGRESS_QUIET;


PROGRESS_STOP

const win32file.PROGRESS_STOP;


PROTECTED_DACL_SECURITY_INFORMATION

const win32security.PROTECTED_DACL_SECURITY_INFORMATION;


PROTECTED_SACL_SECURITY_INFORMATION

const win32security.PROTECTED_SACL_SECURITY_INFORMATION;


PURGE_RXABORT

const win32file.PURGE_RXABORT;

Terminates all outstanding overlapped read operations and returns immediately, even if the read operations have not been completed.


PURGE_RXCLEAR

const win32file.PURGE_RXCLEAR;

Clears the input buffer (if the device driver has one).


PURGE_TXABORT

const win32file.PURGE_TXABORT;

Terminates all outstanding overlapped write operations and returns immediately, even if the write operations have not been completed.


PURGE_TXCLEAR

const win32file.PURGE_TXCLEAR;

Clears the output buffer (if the device driver has one).


PolicyAccountDomainInformation

const win32security.PolicyAccountDomainInformation;


PolicyAuditEventsInformation

const win32security.PolicyAuditEventsInformation;


PolicyAuditFullQueryInformation

const win32security.PolicyAuditFullQueryInformation;


PolicyAuditFullSetInformation

const win32security.PolicyAuditFullSetInformation;


PolicyAuditLogInformation

const win32security.PolicyAuditLogInformation;


PolicyDefaultQuotaInformation

const win32security.PolicyDefaultQuotaInformation;


PolicyDnsDomainInformation

const win32security.PolicyDnsDomainInformation;


PolicyLsaServerRoleInformation

const win32security.PolicyLsaServerRoleInformation;


PolicyModificationInformation

const win32security.PolicyModificationInformation;


PolicyNotifyAccountDomainInformation

const win32security.PolicyNotifyAccountDomainInformation;


PolicyNotifyAuditEventsInformation

const win32security.PolicyNotifyAuditEventsInformation;


PolicyNotifyDnsDomainInformation

const win32security.PolicyNotifyDnsDomainInformation;


PolicyNotifyDomainEfsInformation

const win32security.PolicyNotifyDomainEfsInformation;


PolicyNotifyDomainKerberosTicketInformation

const win32security.PolicyNotifyDomainKerberosTicketInformation;


PolicyNotifyMachineAccountPasswordInformation

const win32security.PolicyNotifyMachineAccountPasswordInformation;


PolicyNotifyServerRoleInformation

const win32security.PolicyNotifyServerRoleInformation;


PolicyPdAccountInformation

const win32security.PolicyPdAccountInformation;


PolicyPrimaryDomainInformation

const win32security.PolicyPrimaryDomainInformation;


PolicyReplicaSourceInformation

const win32security.PolicyReplicaSourceInformation;


PolicyServerDisabled

const win32security.PolicyServerDisabled;


PolicyServerEnabled

const win32security.PolicyServerEnabled;


PolicyServerRoleBackup

const win32security.PolicyServerRoleBackup;


PolicyServerRolePrimary

const win32security.PolicyServerRolePrimary;


QS_ALLEVENTS

const win32event.QS_ALLEVENTS;

An input, WM_TIMER, WM_PAINT, WM_HOTKEY, or posted message is in the queue.


QS_ALLINPUT

const win32event.QS_ALLINPUT;

Any message is in the queue.


QS_HOTKEY

const win32event.QS_HOTKEY;

A WM_HOTKEY message is in the queue.


QS_INPUT

const win32event.QS_INPUT;

An input message is in the queue.


QS_KEY

const win32event.QS_KEY;

A WM_KEYUP, WM_KEYDOWN, WM_SYSKEYUP, or WM_SYSKEYDOWN message is in the queue.


QS_MOUSE

const win32event.QS_MOUSE;

A WM_MOUSEMOVE message or mouse-button message (WM_LBUTTONUP, WM_RBUTTONDOWN, and so on).


QS_MOUSEBUTTON

const win32event.QS_MOUSEBUTTON;

A mouse-button message (WM_LBUTTONUP, WM_RBUTTONDOWN, and so on).


QS_MOUSEMOVE

const win32event.QS_MOUSEMOVE;

A WM_MOUSEMOVE message is in the queue.


QS_PAINT

const win32event.QS_PAINT;

A WM_PAINT message is in the queue.


QS_POSTMESSAGE

const win32event.QS_POSTMESSAGE;

A posted message (other than those just listed) is in the queue.


QS_SENDMESSAGE

const win32event.QS_SENDMESSAGE;

A message sent by another thread or application is in the queue.


QS_TIMER

const win32event.QS_TIMER;

A WM_TIMER message is in the queue.


RASCS_AllDevicesConnected

const win32ras.RASCS_AllDevicesConnected;

Constant for RAS state.


RASCS_AuthAck

const win32ras.RASCS_AuthAck;

Constant for RAS state.


RASCS_AuthCallback

const win32ras.RASCS_AuthCallback;

Constant for RAS state.


RASCS_AuthChangePassword

const win32ras.RASCS_AuthChangePassword;

Constant for RAS state.


RASCS_AuthLinkSpeed

const win32ras.RASCS_AuthLinkSpeed;

Constant for RAS state.


RASCS_AuthNotify

const win32ras.RASCS_AuthNotify;

Constant for RAS state.


RASCS_AuthProject

const win32ras.RASCS_AuthProject;

Constant for RAS state.


RASCS_AuthRetry

const win32ras.RASCS_AuthRetry;

Constant for RAS state.


RASCS_Authenticate

const win32ras.RASCS_Authenticate;

Constant for RAS state.


RASCS_Authenticated

const win32ras.RASCS_Authenticated;

Constant for RAS state.


RASCS_CallbackComplete

const win32ras.RASCS_CallbackComplete;

Constant for RAS state.


RASCS_CallbackSetByCaller

const win32ras.RASCS_CallbackSetByCaller;

Constant for RAS state.


RASCS_ConnectDevice

const win32ras.RASCS_ConnectDevice;

Constant for RAS state.


RASCS_Connected

const win32ras.RASCS_Connected;

Constant for RAS state.


RASCS_DeviceConnected

const win32ras.RASCS_DeviceConnected;

Constant for RAS state.


RASCS_Disconnected

const win32ras.RASCS_Disconnected;

Constant for RAS state.


RASCS_Interactive

const win32ras.RASCS_Interactive;

Constant for RAS state.


RASCS_LogonNetwork

const win32ras.RASCS_LogonNetwork;

Constant for RAS state.


RASCS_OpenPort

const win32ras.RASCS_OpenPort;

Constant for RAS state.


RASCS_PasswordExpired

const win32ras.RASCS_PasswordExpired;

Constant for RAS state.


RASCS_PortOpened

const win32ras.RASCS_PortOpened;

Constant for RAS state.


RASCS_PrepareForCallback

const win32ras.RASCS_PrepareForCallback;

Constant for RAS state.


RASCS_Projected

const win32ras.RASCS_Projected;

Constant for RAS state.


RASCS_ReAuthenticate

const win32ras.RASCS_ReAuthenticate;

Constant for RAS state.


RASCS_RetryAuthentication

const win32ras.RASCS_RetryAuthentication;

Constant for RAS state.


RASCS_StartAuthentication

const win32ras.RASCS_StartAuthentication;

Constant for RAS state.


RASCS_WaitForCallback

const win32ras.RASCS_WaitForCallback;

Constant for RAS state.


RASCS_WaitForModemReset

const win32ras.RASCS_WaitForModemReset;

Constant for RAS state.


RASEAPF_Logon

const win2kras.RASEAPF_Logon;

Specifies that the user data is obtained from Winlogon.


RASEAPF_NonInteractive

const win2kras.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_Preview

const win2kras.RASEAPF_Preview;

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


REALTIME_PRIORITY_CLASS

const win32process.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.


REPLACEFILE_IGNORE_MERGE_ERRORS

const win32file.REPLACEFILE_IGNORE_MERGE_ERRORS;


REPLACEFILE_WRITE_THROUGH

const win32file.REPLACEFILE_WRITE_THROUGH;


REVOKE_ACCESS

const win32security.REVOKE_ACCESS;


RTS_CONTROL_DISABLE

const win32file.RTS_CONTROL_DISABLE;

Disables the RTS line when the device is opened and leaves it disabled.


RTS_CONTROL_ENABLE

const win32file.RTS_CONTROL_ENABLE;

Enables the RTS line when the device is opened and leaves it on.


RTS_CONTROL_HANDSHAKE

const win32file.RTS_CONTROL_HANDSHAKE;

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;

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.


SACL_SECURITY_INFORMATION

const win32security.SACL_SECURITY_INFORMATION;

Indicates the system ACL of the object is being referenced.


SANDBOX_INERT

const win32security.SANDBOX_INERT;


SCS_32BIT_BINARY

const win32file.SCS_32BIT_BINARY;

A Win32-based application


SCS_DOS_BINARY

const win32file.SCS_DOS_BINARY;

An MS-DOS - based application


SCS_OS216_BINARY

const win32file.SCS_OS216_BINARY;

A 16-bit OS/2-based application


SCS_PIF_BINARY

const win32file.SCS_PIF_BINARY;

A PIF file that executes an MS-DOS - based application


SCS_POSIX_BINARY

const win32file.SCS_POSIX_BINARY;

A POSIX - based application


SCS_WOW_BINARY

const win32file.SCS_WOW_BINARY;

A 16-bit Windows-based application


SC_ACTION_NONE

const win32service.SC_ACTION_NONE;


SC_ACTION_REBOOT

const win32service.SC_ACTION_REBOOT;


SC_ACTION_RESTART

const win32service.SC_ACTION_RESTART;


SC_ACTION_RUN_COMMAND

const win32service.SC_ACTION_RUN_COMMAND;


SC_ENUM_PROCESS_INFO

const win32service.SC_ENUM_PROCESS_INFO;


SC_GROUP_IDENTIFIER

const win32service.SC_GROUP_IDENTIFIER;


SC_MANAGER_ALL_ACCESS

const win32service.SC_MANAGER_ALL_ACCESS;

Includes STANDARD_RIGHTS_REQUIRED, in addition to all of the access types listed in this table.


SC_MANAGER_CONNECT

const win32service.SC_MANAGER_CONNECT;

Enables connecting to the service control manager.


SC_MANAGER_CREATE_SERVICE

const win32service.SC_MANAGER_CREATE_SERVICE;

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;

Enables calling of the EnumServicesStatus function to list the services that are in the database.


SC_MANAGER_LOCK

const win32service.SC_MANAGER_LOCK;

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;


SC_MANAGER_QUERY_LOCK_STATUS

const win32service.SC_MANAGER_QUERY_LOCK_STATUS;

Enables calling of the QueryServiceLockStatus function to retrieve the lock status information for the database.


SDDL_REVISION_1

const win32security.SDDL_REVISION_1;


SECPKG_CRED_BOTH

const win32security.SECPKG_CRED_BOTH;


SECPKG_CRED_INBOUND

const win32security.SECPKG_CRED_INBOUND;


SECPKG_CRED_OUTBOUND

const win32security.SECPKG_CRED_OUTBOUND;


SECPKG_FLAG_ACCEPT_WIN32_NAME

const win32security.SECPKG_FLAG_ACCEPT_WIN32_NAME;


SECPKG_FLAG_CLIENT_ONLY

const win32security.SECPKG_FLAG_CLIENT_ONLY;


SECPKG_FLAG_CONNECTION

const win32security.SECPKG_FLAG_CONNECTION;


SECPKG_FLAG_DATAGRAM

const win32security.SECPKG_FLAG_DATAGRAM;


SECPKG_FLAG_EXTENDED_ERROR

const win32security.SECPKG_FLAG_EXTENDED_ERROR;


SECPKG_FLAG_IMPERSONATION

const win32security.SECPKG_FLAG_IMPERSONATION;


SECPKG_FLAG_INTEGRITY

const win32security.SECPKG_FLAG_INTEGRITY;


SECPKG_FLAG_MULTI_REQUIRED

const win32security.SECPKG_FLAG_MULTI_REQUIRED;


SECPKG_FLAG_PRIVACY

const win32security.SECPKG_FLAG_PRIVACY;


SECPKG_FLAG_STREAM

const win32security.SECPKG_FLAG_STREAM;


SECPKG_FLAG_TOKEN_ONLY

const win32security.SECPKG_FLAG_TOKEN_ONLY;


SECURITY_ANONYMOUS

const win32file.SECURITY_ANONYMOUS;

Specifies to impersonate the client at the Anonymous impersonation level.


SECURITY_CONTEXT_TRACKING

const win32file.SECURITY_CONTEXT_TRACKING;

Specifies that the security tracking mode is dynamic. If this flag is not specified, Security Tracking Mode is static.


SECURITY_CREATOR_SID_AUTHORITY

const win32security.SECURITY_CREATOR_SID_AUTHORITY;


SECURITY_DELEGATION

const win32file.SECURITY_DELEGATION;

Specifies to impersonate the client at the Delegation impersonation level.


SECURITY_EFFECTIVE_ONLY

const win32file.SECURITY_EFFECTIVE_ONLY;

Specifies that only the enabled aspects


SECURITY_IDENTIFICATION

const win32file.SECURITY_IDENTIFICATION;

Specifies to impersonate the client at the Identification impersonation level.


SECURITY_IMPERSONATION

const win32file.SECURITY_IMPERSONATION;

Specifies to impersonate the client at the Impersonation impersonation level.


SECURITY_LOCAL_SID_AUTHORITY

const win32security.SECURITY_LOCAL_SID_AUTHORITY;


SECURITY_NON_UNIQUE_AUTHORITY

const win32security.SECURITY_NON_UNIQUE_AUTHORITY;


SECURITY_NT_AUTHORITY

const win32security.SECURITY_NT_AUTHORITY;


SECURITY_NULL_SID_AUTHORITY

const win32security.SECURITY_NULL_SID_AUTHORITY;


SECURITY_RESOURCE_MANAGER_AUTHORITY

const win32security.SECURITY_RESOURCE_MANAGER_AUTHORITY;


SECURITY_WORLD_SID_AUTHORITY

const win32security.SECURITY_WORLD_SID_AUTHORITY;


SERVICE_ACCEPT_HARDWAREPROFILECHANGE

const win32service.SERVICE_ACCEPT_HARDWAREPROFILECHANGE;


SERVICE_ACCEPT_NETBINDCHANGE

const win32service.SERVICE_ACCEPT_NETBINDCHANGE;


SERVICE_ACCEPT_PARAMCHANGE

const win32service.SERVICE_ACCEPT_PARAMCHANGE;


SERVICE_ACCEPT_PAUSE_CONTINUE

const win32service.SERVICE_ACCEPT_PAUSE_CONTINUE;

The service can be paused and continued. This enables the SERVICE_CONTROL_PAUSE and SERVICE_CONTROL_CONTINUE values.


SERVICE_ACCEPT_POWEREVENT

const win32service.SERVICE_ACCEPT_POWEREVENT;


SERVICE_ACCEPT_PRESHUTDOWN

const win32service.SERVICE_ACCEPT_PRESHUTDOWN;


SERVICE_ACCEPT_SESSIONCHANGE

const win32service.SERVICE_ACCEPT_SESSIONCHANGE;


SERVICE_ACCEPT_SHUTDOWN

const win32service.SERVICE_ACCEPT_SHUTDOWN;

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;

The service can be stopped. This enables the SERVICE_CONTROL_STOP value.


SERVICE_ACTIVE

const win32service.SERVICE_ACTIVE;


SERVICE_ALL_ACCESS

const win32service.SERVICE_ALL_ACCESS;

Includes STANDARD_RIGHTS_REQUIRED in addition to all of the access types listed in this table.


SERVICE_AUTO_START

const win32service.SERVICE_AUTO_START;

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;

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;

Enables calling of the ChangeServiceConfig function to change the service configuration.


SERVICE_CONFIG_DELAYED_AUTO_START_INFO

const win32service.SERVICE_CONFIG_DELAYED_AUTO_START_INFO;


SERVICE_CONFIG_DESCRIPTION

const win32service.SERVICE_CONFIG_DESCRIPTION;


SERVICE_CONFIG_FAILURE_ACTIONS

const win32service.SERVICE_CONFIG_FAILURE_ACTIONS;

These require Vista or above


SERVICE_CONFIG_FAILURE_ACTIONS_FLAG

const win32service.SERVICE_CONFIG_FAILURE_ACTIONS_FLAG;


SERVICE_CONFIG_PRESHUTDOWN_INFO

const win32service.SERVICE_CONFIG_PRESHUTDOWN_INFO;


SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO

const win32service.SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO;


SERVICE_CONFIG_SERVICE_SID_INFO

const win32service.SERVICE_CONFIG_SERVICE_SID_INFO;


SERVICE_CONTINUE_PENDING

const win32service.SERVICE_CONTINUE_PENDING;

The service continue is pending.


SERVICE_CONTROL_CONTINUE

const win32service.SERVICE_CONTROL_CONTINUE;

Requests the paused service to resume. The hService handle must have SERVICE_PAUSE_CONTINUE access.


SERVICE_CONTROL_DEVICEEVENT

const win32service.SERVICE_CONTROL_DEVICEEVENT;


SERVICE_CONTROL_HARDWAREPROFILECHANGE

const win32service.SERVICE_CONTROL_HARDWAREPROFILECHANGE;


SERVICE_CONTROL_INTERROGATE

const win32service.SERVICE_CONTROL_INTERROGATE;

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_NETBINDADD

const win32service.SERVICE_CONTROL_NETBINDADD;


SERVICE_CONTROL_NETBINDDISABLE

const win32service.SERVICE_CONTROL_NETBINDDISABLE;


SERVICE_CONTROL_NETBINDENABLE

const win32service.SERVICE_CONTROL_NETBINDENABLE;


SERVICE_CONTROL_NETBINDREMOVE

const win32service.SERVICE_CONTROL_NETBINDREMOVE;


SERVICE_CONTROL_PARAMCHANGE

const win32service.SERVICE_CONTROL_PARAMCHANGE;


SERVICE_CONTROL_PAUSE

const win32service.SERVICE_CONTROL_PAUSE;

Requests the service to pause. The hService handle must have SERVICE_PAUSE_CONTINUE access.


SERVICE_CONTROL_POWEREVENT

const win32service.SERVICE_CONTROL_POWEREVENT;


SERVICE_CONTROL_PRESHUTDOWN

const win32service.SERVICE_CONTROL_PRESHUTDOWN;


SERVICE_CONTROL_SESSIONCHANGE

const win32service.SERVICE_CONTROL_SESSIONCHANGE;


SERVICE_CONTROL_SHUTDOWN

const win32service.SERVICE_CONTROL_SHUTDOWN;

The ControlService function fails if this control code is specified.


SERVICE_CONTROL_STOP

const win32service.SERVICE_CONTROL_STOP;

Requests the service to stop. The hService handle must have SERVICE_STOP access.


SERVICE_DEMAND_START

const win32service.SERVICE_DEMAND_START;

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;

Specifies a device driver or Win32 service that can no longer be started.


SERVICE_DRIVER

const win32service.SERVICE_DRIVER;


SERVICE_ENUMERATE_DEPENDENTS

const win32service.SERVICE_ENUMERATE_DEPENDENTS;

Enables calling of the EnumDependentServices function to enumerate all the services dependent on the service.


SERVICE_ERROR_CRITICAL

const win32service.SERVICE_ERROR_CRITICAL;

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;

The startup (boot) program logs the error but continues the startup operation.


SERVICE_ERROR_NORMAL

const win32service.SERVICE_ERROR_NORMAL;

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;

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;

A service type flag that indicates a Windows NT file system driver.


SERVICE_INACTIVE

const win32service.SERVICE_INACTIVE;


SERVICE_INTERACTIVE_PROCESS

const win32service.SERVICE_INTERACTIVE_PROCESS;

A flag that indicates a Win32 service process that can interact with the desktop.


SERVICE_INTERROGATE

const win32service.SERVICE_INTERROGATE;

Enables calling of the ControlService function to ask the service to report its status immediately.


SERVICE_KERNEL_DRIVER

const win32service.SERVICE_KERNEL_DRIVER;

A service type flag that indicates a Windows NT device driver.


SERVICE_NO_CHANGE

const win32service.SERVICE_NO_CHANGE;

Indicates the parameter should not be changed.


SERVICE_PAUSED

const win32service.SERVICE_PAUSED;

The service is paused.


SERVICE_PAUSE_CONTINUE

const win32service.SERVICE_PAUSE_CONTINUE;

Enables calling of the ControlService function to pause or continue the service.


SERVICE_PAUSE_PENDING

const win32service.SERVICE_PAUSE_PENDING;

The service pause is pending.


SERVICE_QUERY_CONFIG

const win32service.SERVICE_QUERY_CONFIG;

Enables calling of the QueryServiceConfig function to query the service configuration.


SERVICE_QUERY_STATUS

const win32service.SERVICE_QUERY_STATUS;

Enables calling of the QueryServiceStatus function to ask the service control manager about the status of the service.


SERVICE_RUNNING

const win32service.SERVICE_RUNNING;

The service is running.


SERVICE_SID_TYPE_NONE

const win32service.SERVICE_SID_TYPE_NONE;


SERVICE_SID_TYPE_RESTRICTED

const win32service.SERVICE_SID_TYPE_RESTRICTED;


SERVICE_SID_TYPE_UNRESTRICTED

const win32service.SERVICE_SID_TYPE_UNRESTRICTED;


SERVICE_SPECIFIC_ERROR

const win32service.SERVICE_SPECIFIC_ERROR;

A service specific error has occurred.


SERVICE_START

const win32service.SERVICE_START;

Enables calling of the StartService function to start the service.


SERVICE_START_PENDING

const win32service.SERVICE_START_PENDING;

The service is starting.


SERVICE_STATE_ALL

const win32service.SERVICE_STATE_ALL;


SERVICE_STOP

const win32service.SERVICE_STOP;

Enables calling of the ControlService function to stop the service.


SERVICE_STOPPED

const win32service.SERVICE_STOPPED;

The service is not running.


SERVICE_STOP_PENDING

const win32service.SERVICE_STOP_PENDING;

The service is stopping.


SERVICE_SYSTEM_START

const win32service.SERVICE_SYSTEM_START;

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;

Enables calling of the ControlService function to specify a user-defined control code.


SERVICE_WIN32

const win32service.SERVICE_WIN32;


SERVICE_WIN32_OWN_PROCESS

const win32service.SERVICE_WIN32_OWN_PROCESS;

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;

A service type flag that indicates a Win32 service that shares a process with other services.


SETBREAK

const win32file.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.


SETDTR

const win32file.SETDTR;

Sends the DTR (data-terminal-ready) signal.


SETRTS

const win32file.SETRTS;

Sends the RTS (request-to-send) signal.


SETXOFF

const win32file.SETXOFF;

Causes transmission to act as if an XOFF character has been received.


SETXON

const win32file.SETXON;

Causes transmission to act as if an XON character has been received.


SET_ACCESS

const win32security.SET_ACCESS;


SET_AUDIT_FAILURE

const win32security.SET_AUDIT_FAILURE;


SET_AUDIT_SUCCESS

const win32security.SET_AUDIT_SUCCESS;


SE_DACL_AUTO_INHERITED

const win32security.SE_DACL_AUTO_INHERITED;

win2k and up


SE_DACL_DEFAULTED

const win32security.SE_DACL_DEFAULTED;


SE_DACL_PRESENT

const win32security.SE_DACL_PRESENT;


SE_DACL_PROTECTED

const win32security.SE_DACL_PROTECTED;

win2k and up


SE_DS_OBJECT

const win32security.SE_DS_OBJECT;


SE_DS_OBJECT_ALL

const win32security.SE_DS_OBJECT_ALL;


SE_FILE_OBJECT

const win32security.SE_FILE_OBJECT;


SE_GROUP_DEFAULTED

const win32security.SE_GROUP_DEFAULTED;


SE_GROUP_ENABLED

const win32security.SE_GROUP_ENABLED;


SE_GROUP_ENABLED_BY_DEFAULT

const win32security.SE_GROUP_ENABLED_BY_DEFAULT;


SE_GROUP_LOGON_ID

const win32security.SE_GROUP_LOGON_ID;


SE_GROUP_MANDATORY

const win32security.SE_GROUP_MANDATORY;


SE_GROUP_OWNER

const win32security.SE_GROUP_OWNER;


SE_GROUP_RESOURCE

const win32security.SE_GROUP_RESOURCE;


SE_GROUP_USE_FOR_DENY_ONLY

const win32security.SE_GROUP_USE_FOR_DENY_ONLY;


SE_KERNEL_OBJECT

const win32security.SE_KERNEL_OBJECT;


SE_LMSHARE

const win32security.SE_LMSHARE;


SE_OWNER_DEFAULTED

const win32security.SE_OWNER_DEFAULTED;


SE_PRINTER

const win32security.SE_PRINTER;


SE_PRIVILEGE_ENABLED

const win32security.SE_PRIVILEGE_ENABLED;


SE_PRIVILEGE_ENABLED_BY_DEFAULT

const win32security.SE_PRIVILEGE_ENABLED_BY_DEFAULT;


SE_PRIVILEGE_REMOVED

const win32security.SE_PRIVILEGE_REMOVED;


SE_PRIVILEGE_USED_FOR_ACCESS

const win32security.SE_PRIVILEGE_USED_FOR_ACCESS;


SE_PROVIDER_DEFINED_OBJECT

const win32security.SE_PROVIDER_DEFINED_OBJECT;


SE_REGISTRY_KEY

const win32security.SE_REGISTRY_KEY;


SE_REGISTRY_WOW64_32KEY

const win32security.SE_REGISTRY_WOW64_32KEY;


SE_SACL_AUTO_INHERITED

const win32security.SE_SACL_AUTO_INHERITED;

win2k and up


SE_SACL_DEFAULTED

const win32security.SE_SACL_DEFAULTED;


SE_SACL_PRESENT

const win32security.SE_SACL_PRESENT;


SE_SACL_PROTECTED

const win32security.SE_SACL_PROTECTED;

win2k and up


SE_SELF_RELATIVE

const win32security.SE_SELF_RELATIVE;


SE_SERVICE

const win32security.SE_SERVICE;


SE_UNKNOWN_OBJECT_TYPE

const win32security.SE_UNKNOWN_OBJECT_TYPE;


SE_WINDOW_OBJECT

const win32security.SE_WINDOW_OBJECT;


SE_WMIGUID_OBJECT

const win32security.SE_WMIGUID_OBJECT;


SO_CONNECT_TIME

const win32file.SO_CONNECT_TIME;


SO_UPDATE_ACCEPT_CONTEXT

const win32file.SO_UPDATE_ACCEPT_CONTEXT;


SO_UPDATE_CONNECT_CONTEXT

const win32file.SO_UPDATE_CONNECT_CONTEXT;


SPACEPARITY

const win32file.SPACEPARITY;


STARTF_FORCEOFFFEEDBACK

const win32process.STARTF_FORCEOFFFEEDBACK;

Indicates that the feedback cursor is forced off while the process is starting. The normal cursor is displayed.


STARTF_FORCEONFEEDBACK

const win32process.STARTF_FORCEONFEEDBACK;

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;

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;

If this value is not specified, the dwXCountChars and dwYCountChars members are ignored.


STARTF_USEFILLATTRIBUTE

const win32process.STARTF_USEFILLATTRIBUTE;

If this value is not specified, the dwFillAttribute member is ignored.


STARTF_USEPOSITION

const win32process.STARTF_USEPOSITION;

If this value is not specified, the dwX and dwY members are ignored.


STARTF_USESHOWWINDOW

const win32process.STARTF_USESHOWWINDOW;

If this value is not specified, the wShowWindow member is ignored.


STARTF_USESIZE

const win32process.STARTF_USESIZE;

If this value is not specified, the dwXSize and dwYSize members are ignored.


STARTF_USESTDHANDLES

const win32process.STARTF_USESTDHANDLES;

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.


STYPE_DEVICE

const win32security.STYPE_DEVICE;


STYPE_DISKTREE

const win32security.STYPE_DISKTREE;


STYPE_IPC

const win32security.STYPE_IPC;


STYPE_PRINTQ

const win32security.STYPE_PRINTQ;


STYPE_SPECIAL

const win32security.STYPE_SPECIAL;


STYPE_TEMPORARY

const win32security.STYPE_TEMPORARY;


SUB_CONTAINERS_AND_OBJECTS_INHERIT

const win32security.SUB_CONTAINERS_AND_OBJECTS_INHERIT;


SUB_CONTAINERS_ONLY_INHERIT

const win32security.SUB_CONTAINERS_ONLY_INHERIT;


SUB_OBJECTS_ONLY_INHERIT

const win32security.SUB_OBJECTS_ONLY_INHERIT;


SUCCESSFUL_ACCESS_ACE_FLAG

const win32security.SUCCESSFUL_ACCESS_ACE_FLAG;


SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE

const win32file.SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE;


SYMBOLIC_LINK_FLAG_DIRECTORY

const win32file.SYMBOLIC_LINK_FLAG_DIRECTORY;


SYNCHRONIZE

const win32event.SYNCHRONIZE;

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.


SYSTEM_AUDIT_ACE_TYPE

const win32security.SYSTEM_AUDIT_ACE_TYPE;

System-audit ACE that uses the SYSTEM_AUDIT_ACE structure.


SYSTEM_AUDIT_OBJECT_ACE_TYPE

const win32security.SYSTEM_AUDIT_OBJECT_ACE_TYPE;


SecurityAnonymous

const win32security.SecurityAnonymous;


SecurityDelegation

const win32security.SecurityDelegation;


SecurityIdentification

const win32security.SecurityIdentification;


SecurityImpersonation

const win32security.SecurityImpersonation;


SidTypeAlias

const win32security.SidTypeAlias;

Indicates an alias SID.


SidTypeComputer

const win32security.SidTypeComputer;

Indicates a computer SID


SidTypeDeletedAccount

const win32security.SidTypeDeletedAccount;

Indicates an SID for a deleted account.


SidTypeDomain

const win32security.SidTypeDomain;

Indicates a domain SID.


SidTypeGroup

const win32security.SidTypeGroup;

Indicates a group SID.


SidTypeInvalid

const win32security.SidTypeInvalid;

Indicates an invalid SID.


SidTypeUnknown

const win32security.SidTypeUnknown;

Indicates an unknown SID type.


SidTypeUser

const win32security.SidTypeUser;

Indicates a user SID.


SidTypeWellKnownGroup

const win32security.SidTypeWellKnownGroup;

Indicates an SID for a well-known group.


TF_DISCONNECT

const win32file.TF_DISCONNECT;


TF_REUSE_SOCKET

const win32file.TF_REUSE_SOCKET;


TF_USE_DEFAULT_WORKER

const win32file.TF_USE_DEFAULT_WORKER;


TF_USE_KERNEL_APC

const win32file.TF_USE_KERNEL_APC;


TF_USE_SYSTEM_THREAD

const win32file.TF_USE_SYSTEM_THREAD;


TF_WRITE_BEHIND

const win32file.TF_WRITE_BEHIND;


THREAD_MODE_BACKGROUND_BEGIN

const win32process.THREAD_MODE_BACKGROUND_BEGIN;


THREAD_MODE_BACKGROUND_END

const win32process.THREAD_MODE_BACKGROUND_END;


THREAD_PRIORITY_ABOVE_NORMAL

const win32process.THREAD_PRIORITY_ABOVE_NORMAL;

Indicates 1 point above normal priority for the priority class.


THREAD_PRIORITY_BELOW_NORMAL

const win32process.THREAD_PRIORITY_BELOW_NORMAL;

Indicates 1 point below normal priority for the priority class.


THREAD_PRIORITY_HIGHEST

const win32process.THREAD_PRIORITY_HIGHEST;

Indicates 2 points above normal priority for the priority class.


THREAD_PRIORITY_IDLE

const win32process.THREAD_PRIORITY_IDLE;

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;

Indicates 2 points below normal priority for the priority class.


THREAD_PRIORITY_NORMAL

const win32process.THREAD_PRIORITY_NORMAL;

Indicates normal priority for the priority class.


THREAD_PRIORITY_TIME_CRITICAL

const win32process.THREAD_PRIORITY_TIME_CRITICAL;

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.


TOKEN_ADJUST_DEFAULT

const win32security.TOKEN_ADJUST_DEFAULT;

Required to change the default ACL, primary group, or owner of an access token.


TOKEN_ADJUST_GROUPS

const win32security.TOKEN_ADJUST_GROUPS;

Required to change the groups specified in an access token.


TOKEN_ADJUST_PRIVILEGES

const win32security.TOKEN_ADJUST_PRIVILEGES;

Required to change the privileges specified in an access token.


TOKEN_ALL_ACCESS

const win32security.TOKEN_ALL_ACCESS;

Combines the STANDARD_RIGHTS_REQUIRED standard access rights and all individual access rights for tokens.


TOKEN_ASSIGN_PRIMARY

const win32security.TOKEN_ASSIGN_PRIMARY;

Required to attach a primary token to a process in addition to the SE_CREATE_TOKEN_NAME privilege.


TOKEN_DUPLICATE

const win32security.TOKEN_DUPLICATE;

Required to duplicate an access token.


TOKEN_EXECUTE

const win32security.TOKEN_EXECUTE;

Combines the STANDARD_RIGHTS_EXECUTE standard access rights and the TOKEN_IMPERSONATE access right.


TOKEN_IMPERSONATE

const win32security.TOKEN_IMPERSONATE;

Required to attach an impersonation access token to a process.


TOKEN_QUERY

const win32security.TOKEN_QUERY;

Required to query the contents of an access token.


TOKEN_QUERY_SOURCE

const win32security.TOKEN_QUERY_SOURCE;

Required to query the source of an access token.


TOKEN_READ

const win32security.TOKEN_READ;

Combines the STANDARD_RIGHTS_READ standard access rights and the TOKEN_QUERY access right.


TOKEN_WRITE

const win32security.TOKEN_WRITE;

Combines the STANDARD_RIGHTS_WRITE standard access rights and the TOKEN_ADJUST_PRIVILEGES, TOKEN_ADJUST_GROUPS, and TOKEN_ADJUST_DEFAULT access rights.


TPM_BOTTOMALIGN

const win32gui.TPM_BOTTOMALIGN;


TPM_CENTERALIGN

const win32gui.TPM_CENTERALIGN;


TPM_LEFTALIGN

const win32gui.TPM_LEFTALIGN;


TPM_LEFTBUTTON

const win32gui.TPM_LEFTBUTTON;


TPM_NONOTIFY

const win32gui.TPM_NONOTIFY;


TPM_RETURNCMD

const win32gui.TPM_RETURNCMD;


TPM_RIGHTALIGN

const win32gui.TPM_RIGHTALIGN;


TPM_RIGHTBUTTON

const win32gui.TPM_RIGHTBUTTON;


TPM_TOPALIGN

const win32gui.TPM_TOPALIGN;


TPM_VCENTERALIGN

const win32gui.TPM_VCENTERALIGN;


TRUNCATE_EXISTING

const win32file.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.


TRUSTEE_BAD_FORM

const win32security.TRUSTEE_BAD_FORM;


TRUSTEE_IS_ALIAS

const win32security.TRUSTEE_IS_ALIAS;


TRUSTEE_IS_COMPUTER

const win32security.TRUSTEE_IS_COMPUTER;


TRUSTEE_IS_DELETED

const win32security.TRUSTEE_IS_DELETED;


TRUSTEE_IS_DOMAIN

const win32security.TRUSTEE_IS_DOMAIN;


TRUSTEE_IS_GROUP

const win32security.TRUSTEE_IS_GROUP;


TRUSTEE_IS_INVALID

const win32security.TRUSTEE_IS_INVALID;


TRUSTEE_IS_NAME

const win32security.TRUSTEE_IS_NAME;


TRUSTEE_IS_OBJECTS_AND_NAME

const win32security.TRUSTEE_IS_OBJECTS_AND_NAME;


TRUSTEE_IS_OBJECTS_AND_SID

const win32security.TRUSTEE_IS_OBJECTS_AND_SID;


TRUSTEE_IS_SID

const win32security.TRUSTEE_IS_SID;


TRUSTEE_IS_UNKNOWN

const win32security.TRUSTEE_IS_UNKNOWN;


TRUSTEE_IS_USER

const win32security.TRUSTEE_IS_USER;


TRUSTEE_IS_WELL_KNOWN_GROUP

const win32security.TRUSTEE_IS_WELL_KNOWN_GROUP;


TWOSTOPBITS

const win32file.TWOSTOPBITS;


TokenImpersonation

const win32security.TokenImpersonation;


TokenPrimary

const win32security.TokenPrimary;


TrustedControllersInformation

const win32security.TrustedControllersInformation;


TrustedDomainAuthInformation

const win32security.TrustedDomainAuthInformation;


TrustedDomainAuthInformationInternal

const win32security.TrustedDomainAuthInformationInternal;


TrustedDomainFullInformation

const win32security.TrustedDomainFullInformation;


TrustedDomainFullInformation2Internal

const win32security.TrustedDomainFullInformation2Internal;


TrustedDomainFullInformationInternal

const win32security.TrustedDomainFullInformationInternal;


TrustedDomainInformationBasic

const win32security.TrustedDomainInformationBasic;


TrustedDomainInformationEx

const win32security.TrustedDomainInformationEx;


TrustedDomainInformationEx2Internal

const win32security.TrustedDomainInformationEx2Internal;


TrustedDomainNameInformation

const win32security.TrustedDomainNameInformation;


TrustedPasswordInformation

const win32security.TrustedPasswordInformation;


TrustedPosixOffsetInformation

const win32security.TrustedPosixOffsetInformation;


UNPROTECTED_DACL_SECURITY_INFORMATION

const win32security.UNPROTECTED_DACL_SECURITY_INFORMATION;


UNPROTECTED_SACL_SECURITY_INFORMATION

const win32security.UNPROTECTED_SACL_SECURITY_INFORMATION;


UOI_FLAGS

const win32service.UOI_FLAGS;


UOI_NAME

const win32service.UOI_NAME;


UOI_TYPE

const win32service.UOI_TYPE;


UOI_USER_SID

const win32service.UOI_USER_SID;


WAIT_ABANDONED

const win32event.WAIT_ABANDONED;


WAIT_ABANDONED_0

const win32event.WAIT_ABANDONED_0;


WAIT_FAILED

const win32event.WAIT_FAILED;


WAIT_IO_COMPLETION

const win32event.WAIT_IO_COMPLETION;


WAIT_OBJECT_0

const win32event.WAIT_OBJECT_0;


WAIT_TIMEOUT

const win32event.WAIT_TIMEOUT;


WSAECONNABORTED

const win32file.WSAECONNABORTED;


WSAECONNRESET

const win32file.WSAECONNRESET;


WSAEDISCON

const win32file.WSAEDISCON;


WSAEFAULT

const win32file.WSAEFAULT;


WSAEINPROGRESS

const win32file.WSAEINPROGRESS;


WSAEINTR

const win32file.WSAEINTR;


WSAEINVAL

const win32file.WSAEINVAL;


WSAEMSGSIZE

const win32file.WSAEMSGSIZE;


WSAENETDOWN

const win32file.WSAENETDOWN;


WSAENETRESET

const win32file.WSAENETRESET;


WSAENOBUFS

const win32file.WSAENOBUFS;


WSAENOTCONN

const win32file.WSAENOTCONN;


WSAENOTSOCK

const win32file.WSAENOTSOCK;


WSAEOPNOTSUPP

const win32file.WSAEOPNOTSUPP;


WSAESHUTDOWN

const win32file.WSAESHUTDOWN;


WSAEWOULDBLOCK

const win32file.WSAEWOULDBLOCK;


WSA_IO_PENDING

const win32file.WSA_IO_PENDING;


WSA_OPERATION_ABORTED

const win32file.WSA_OPERATION_ABORTED;


WSF_VISIBLE

const win32service.WSF_VISIBLE;


debug

const win32help.debug;

1 if we are current using a _DEBUG build of win32help, else 0.


Python COM

  • Overviews
  • Modules
  • Objects


Overviews

  • ADSI Python
  • Active Directory
  • Important notes about COM currency support changes
  • win32com documentation index
  • win32com readme
  • ASP and Python
  • DirectSound examples
  • 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


DirectSound examples

Example

Our raison d'etre - playing sounds:

WAV_HEADER_SIZE = struct.calcsize('<4sl4s4slhhllhh4sl')

def wav_header_unpack(data):

    '''Unpack a wav header and stuff it into a WAVEFORMATEX structure'''

    (riff, riffsize, wave, fmt, fmtsize, format, nchannels, samplespersecond,

     datarate, blockalign, bitspersample, data, datalength) \\

 struct.unpack('<4sl4s4slhhllhh4sl', data)

    if riff != 'RIFF' or fmtsize != 16 or fmt != 'fmt ' or data != 'data':

    raise ValueError, 'illegal wav header'

    wfx = pywintypes.WAVEFORMATEX()

    wfx.wFormatTag = format

    wfx.nChannels = nchannels

    wfx.nSamplesPerSec = samplespersecond

    wfx.nAvgBytesPerSec = datarate

    wfx.nBlockAlign = blockalign

    wfx.wBitsPerSample = bitspersample

    return wfx, datalength

# Play a wav file and wait until it's finished

fname = os.path.join(os.path.dirname(__file__), "01-Intro.wav")

f = open(fname, 'rb')

# Read and unpack the wav header

hdr = f.read(WAV_HEADER_SIZE)

wfx, size = wav_header_unpack(hdr)

d = ds.DirectSoundCreate(None, None)

d.SetCooperativeLevel(None, ds.DSSCL_PRIORITY)

sdesc = ds.DSBUFFERDESC()

sdesc.dwFlags = ds.DSBCAPS_STICKYFOCUS | ds.DSBCAPS_CTRLPOSITIONNOTIFY

sdesc.dwBufferBytes = size

sdesc.lpwfxFormat = wfx

buffer = d.CreateSoundBuffer(sdesc, None)

event = win32event.CreateEvent(None, 0, 0, None)

  notify = buffer.QueryInterface(ds.IID_IDirectSoundNotify)

notify.SetNotificationPositions((ds.DSBPN_OFFSETSTOP, event))

buffer.Update(0, f.read(size))

buffer.Play(0)

win32event.WaitForSingleObject(event, -1)
This example shows how to record into a wav file:

import pywintypes

import struct

import win32event

import win32com.directsound.directsound as ds

def wav_header_pack(wfx, datasize):

    return struct.pack('<4sl4s4slhhllhh4sl', 'RIFF', 36 + datasize,

               'WAVE', 'fmt ', 16,

               wfx.wFormatTag, wfx.nChannels, wfx.nSamplesPerSec,

               wfx.nAvgBytesPerSec, wfx.nBlockAlign,

               wfx.wBitsPerSample, 'data', datasize);

d = ds.DirectSoundCaptureCreate(None, None)

sdesc = ds.DSCBUFFERDESC()

sdesc.dwBufferBytes = 352800 # 2 seconds

sdesc.lpwfxFormat = pywintypes.WAVEFORMATEX()

sdesc.lpwfxFormat.wFormatTag = pywintypes.WAVE_FORMAT_PCM

sdesc.lpwfxFormat.nChannels = 2

sdesc.lpwfxFormat.nSamplesPerSec = 44100

sdesc.lpwfxFormat.nAvgBytesPerSec = 176400

sdesc.lpwfxFormat.nBlockAlign = 4

sdesc.lpwfxFormat.wBitsPerSample = 16

buffer = d.CreateCaptureBuffer(sdesc)

event = win32event.CreateEvent(None, 0, 0, None)

notify = buffer.QueryInterface(ds.IID_IDirectSoundNotify)

notify.SetNotificationPositions((ds.DSBPN_OFFSETSTOP, event))

buffer.Start(0)

win32event.WaitForSingleObject(event, -1)

# in real life, more, smaller buffers should be retrieved

data = buffer.Update(0, 352800)

f = open('recording.wav', 'wb')

f.write(wav_header_pack(sdesc.lpwfxFormat, 352800))

f.write(data)


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

VARIANT objects

win32com.client now has explicit VARIANT objects which can be used in situations where you need more control over the argument types passed when calling COM methods. See the documentation on this object

Important Currency changes

In all builds prior to 204, a COM currency value was returned as a tuple of integers. Working with 2 integers to represent a currency object was a poor choice, but the alternative was never clear. Now Python ships with the decimal module, the alternative has arrived!

Up until build 212, code could set pythoncom.__future_currency__ = True to force use of the decimal module, with a warning issued otherwise. In builds 213 and later, the decimal module is unconditionally used when pythoncon returns you a currency value.

Recent Changes

Lots of internal changes on the road to py3k

win32com.axcontrol and win2con.internet

Many more interfaces for hosting AX controls and the interfaces used by Internet Explorer.

win32com.shell

The shell interfaces have undergone a number of enhancements and changes. A couple of methods have changed signature between the first build with shell support (200) and later builds. SHGetFileInfo was broken in its result handling, so had to be changed - this is the only function used by the samples that changed, but others not used by the samples also have changed. These shell interfaces are now generally stable.

New win32com.taskscheduler module

Roger Upole has contributed an interface to the Windows task scheduler. This is actually very neat, and it allows Python to edit the task list as shown by Windows Control Panel. Property page suppport may even appear later, now that the win32 library has the new win32rcparser module.

ActiveX Scripting

Python only supports "trusted" execution hosts - thus, it will no longer work as an engine inside IE (Python itself no longer has a restricted execution environment). Python continues to work fine as an Active Scripting Engine in all other applications, including Windows Scripting Host, and ASP.

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

Active Debugging seems to be fully functional.

Older stuff

  • 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


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)

An advanced VARIANT object which can give more control over parameter types

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


Modules

  • adsi
  • axcontrol
  • axdebug
  • axscript
  • directsound
  • exchange
  • exchdapi
  • internet
  • mapi
  • propsys
  • pythoncom
  • shell
  • win32com.authorization.authorization


adsi

Module adsi

A COM interface to ADSI

Methods

ADsOpenObject
Binds to an ADSI object using explicit username and password credentials.

ADsGetObject
Binds to an object given its path and a specified interface identifier (IID).

ADsBuildEnumerator
Builds an enumerator object for the specified ADSI container object.

ADsEnumerateNext

ADsGetLastError

StringAsDS_SELECTION_LIST
Unpacks a string (generally fetched via PyIDataObject::GetData) into a PyDS_SELECTION_LIST list.

DSOP_SCOPE_INIT_INFOs
The type object for PyDSOP_SCOPE_INIT_INFOs objects.


adsi.ADsBuildEnumerator

PyIEnumerator = ADsBuildEnumerator(container)

Builds an enumerator object for the specified ADSI container object.

Parameters

container : PyIADsContainer


adsi.ADsEnumerateNext

PyIEnumerator = ADsEnumerateNext(enum, num )

Parameters

enum : PyIEnumVARIANT

The enumerator.

num=1 : int

Number of items to retrieve.

Return Value

The result is a tuple of Python objects converted from Variants, 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.


adsi.ADsGetLastError

(int, unicode, unicode) = ADsGetLastError()


adsi.ADsGetObject

com_object = ADsGetObject(path, iid )

Binds to an object given its path and a specified interface identifier (IID).

Parameters

path : unicode

iid=IID_IDispatch : PyIID

The requested interface


adsi.ADsOpenObject

com_object = ADsOpenObject(path, username , password , reserved , iid )

Binds to an ADSI object using explicit username and password credentials.

Parameters

path : unicode

username : unicode

password : unicode

reserved=0 : int

iid=IID_IDispatch : PyIID

The requested interface


adsi.DSOP_SCOPE_INIT_INFOs

DSOP_SCOPE_INIT_INFOs = DSOP_SCOPE_INIT_INFOs(size)

The type object for PyDSOP_SCOPE_INIT_INFOs objects.

Parameters

size : int

The number of PyDSOP_SCOPE_INIT_INFO objects to create in the array.


adsi.StringAsDS_SELECTION_LIST

PyDS_SELECTION_LIST = StringAsDS_SELECTION_LIST(buf)

Unpacks a string (generally fetched via PyIDataObject::GetData) into a PyDS_SELECTION_LIST list.

Parameters

buf : str

The raw buffer


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.

OleSetContainedObject
Notifies an object embedded in an OLE container to ensure correct reference.

OleTranslateAccelerator
Called by the object application, allows an object's container to translate accelerators according to the container's accelerator table.


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.


axcontrol.OleSetContainedObject

OleSetContainedObject(unk, fContained)

Notifies an object embedded in an OLE container to ensure correct reference.

Parameters

unk : PyIUnknown

The object

fContained : int


axcontrol.OleTranslateAccelerator

OleTranslateAccelerator(frame, frame_info, msg)

Called by the object application, allows an object's container to translate accelerators according to the container's accelerator table.

Parameters

frame : PyIOleInPlaceFrame

frame to send keystrokes to.

frame_info : PyOLEINPLACEFRAMEINFO

msg : PyMSG


axdebug

Module axdebug

A module, encapsulating the ActiveX Debugging interfaces


axscript

Module axscript

A module, encapsulating the ActiveX Scripting interfaces


directsound

Module directsound

A module encapsulating the DirectSound interfaces. See DirectSound examples for a quick overview.

Methods

DirectSoundCreate
Creates and initializes a new object that supports the IDirectSound interface.

DirectSoundEnumerate
The DirectSoundEnumerate function enumerates the DirectSound drivers installed in the system.

DirectSoundCaptureCreate
The DirectSoundCaptureCreate function creates and initializes an object that supports the IDirectSoundCapture interface.

DirectSoundCaptureEnumerate
The DirectSoundCaptureEnumerate function enumerates the DirectSoundCapture objects installed in the system.

DSCAPS
Creates a new PyDSCAPS object.

DSBCAPS
Creates a new PyDSBCAPS object.

DSCCAPS
Creates a new PyDSCCAPS object.

DSCBCAPS
Creates a new PyDSCBCAPS object.

DSBUFFERDESC
Creates a new PyDSBUFFERDESC object.

DSCBUFFERDESC
Creates a new PyDSCBUFFERDESC object.


directsound.DSBCAPS

PyDSBCAPS = DSBCAPS()

Creates a new PyDSBCAPS object


directsound.DSBUFFERDESC

PyDSBUFFERDESC = DSBUFFERDESC()

Creates a new PyDSBUFFERDESC object


directsound.DSCAPS

PyDSCAPS = DSCAPS()

Creates a new PyDSCAPS object.


directsound.DSCBCAPS

PyDSCBCAPS = DSCBCAPS()

Creates a new PyDSCBCAPS object


directsound.DSCBUFFERDESC

PyDSCBUFFERDESC = DSCBUFFERDESC()

Creates a new PyDSCBUFFERDESC object


directsound.DSCCAPS

PyDSCCAPS = DSCCAPS()

Creates a new PyDSCCAPS object


directsound.DirectSoundCaptureCreate

PyIUnknown = DirectSoundCaptureCreate(guid, unk )

Creates and initializes a new object that supports the IDirectSoundCapture interface.

Parameters

guid=None : PyIID

Address of the GUID that identifies the sound device. The value of this parameter must be one of the GUIDs returned by DirectSoundCaptureEnumerate, or None for the default device.

unk=None : PyIUknown

The IUnknown for COM aggregation.


directsound.DirectSoundCaptureEnumerate

list = DirectSoundCaptureEnumerate()

Enumerates DirectSoundCapture drivers installed in the system.


directsound.DirectSoundCreate

PyIUnknown = DirectSoundCreate(guid, unk )

Creates and initializes a new object that supports the IDirectSound interface.

Parameters

guid=None : PyIID

Address of the GUID that identifies the sound device. The value of this parameter must be one of the GUIDs returned by DirectSoundEnumerate, or None for the default device.

unk=None : PyIUknown

The IUnknown for COM aggregation.


directsound.DirectSoundEnumerate

list = DirectSoundEnumerate()

Enumerates DirectSound drivers installed in the system.


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

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

Methods

CoInternetCreateSecurityManager

CoInternetIsFeatureEnabled

CoInternetSetFeatureEnabled


internet.CoInternetCreateSecurityManager

PyIInternetSecurityManager = CoInternetCreateSecurityManager(reserved)

Parameters

reserved : int


internet.CoInternetIsFeatureEnabled

bool = CoInternetIsFeatureEnabled(flags)

Parameters

flags : int

Return Value

Returns true for S_OK, False for other non-error hresults, or raises a com_error.


internet.CoInternetSetFeatureEnabled

int = CoInternetSetFeatureEnabled(flags, enable )

Parameters

flags : int

enable : bool


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

WrapCompressedRTFStreamEx

OpenIMsgSession

CloseIMsgSession

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

RTFStreamToHTML

OpenStreamOnFile
Allocates and initializes an OLE IStream object to access the contents of a file.

OpenStreamOnFileW
Allocates and initializes an OLE IStream object to access the contents of a file.

HrGetOneProp
Retrieves the value of a single property from an IMAPIProp object.

HrSetOneProp
Sets the value of a single property on a IMAPIProp object.

HrAllocAdviseSink
Creates an advise sink object, given a context specified by the calling implementation and a callback function to be triggered by an event notification.

HrThisThreadAdviseSink
Creates an advise sink that wraps an existing advise sink for thread safety.


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

PyIMAPIAdviseSink = HrAllocAdviseSink(callback, context )

Creates an advise sink object, given a context specified by the calling implementation and a callback function to be triggered by an event notification.

Parameters

callback : function

OnNotify callback function

context : object

Context data to be passed to the callback


mapi.HrGetOneProp

item = HrGetOneProp(prop, propTag )

Retrieves the value of a single property from an IMAPIProp object.

Parameters

prop : PyIMAPIProp

Object to retrieve property value from.

propTag : ULONG

The property tag to open.


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

item = HrSetOneProp(prop, propValue )

Sets the value of a single property on a IMAPIProp object.

Parameters

prop : PyIMAPIProp

Object to set property value on.

propValue : PySPropValue

Property value to set.


mapi.HrThisThreadAdviseSink

PyIMAPIAdviseSink = HrThisThreadAdviseSink(object)

Creates an advise sink that wraps an existing advise sink for thread safety.

Parameters

object : PyIMAPIAdviseSink

The advise sink to be wrapped.


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(uiParam, profileName , password , flags )

Parameters

uiParam : int

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

profileName : string

A string that contains the name of the profile to use when the user logs on. This string is limited to 64 characters.

password=None : string

A string that contains the password of the profile. The password parameter must be None.

flags=0 : int


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

PyIStream = OpenStreamOnFile(filename, flags , prefix )

Allocates and initializes an OLE IStream object to access the contents of a file.

Parameters

filename : string

flags=0 : int

prefix=None : string


mapi.OpenStreamOnFileW

PyIStream = OpenStreamOnFileW(filename, flags , prefix )

Allocates and initializes an OLE IStream object to access the contents of a file.

Parameters

filename : unicode

flags=0 : int

prefix=None : unicode


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


mapi.WrapCompressedRTFStreamEx

(PyIStream, ULONG) = WrapCompressedRTFStreamEx()

Return Value

Result is a tuple of (bodyStream, bodyType);


propsys

Module propsys

A module, encapsulating the Vista Property System interfaces

Methods

PSGetItemPropertyHandler
Retrieves the property store for a shell item

PSGetPropertyDescription
Gets a description interface for a property

PSGetPropertySystem
Creates an IPropertySystem interface

PSGetNameFromPropertyKey
Retrieves the canonical name for a property key

PSGetPropertyKeyFromName
Retrieves the property key by canonical name

PSRegisterPropertySchema
Registers a group of properties described in a schema file

PSUnregisterPropertySchema
Removes a property schema definition

SHGetPropertyStoreFromParsingName
Retrieves the property store for an item by path

StgSerializePropVariant
Serializes a PyPROPVARIANT

StgDeserializePropVariant
Creates a PyPROPVARIANT from a serialized buffer

PSCreateMemoryPropertyStore
Creates a temporary property store that is not connected to any backing storage

PSCreatePropertyStoreFromPropertySetStorage
Wraps a PyIPropertySetStorage interface in a PyIPropertyStore object

PSLookupPropertyHandlerCLSID
Returns the GUID of the property handler for a file

SHGetPropertyStoreForWindow
Retrieves a collection of a window's properties

PSGetPropertyFromPropertyStorage
Extracts a property from a serialized buffer by key

PSGetNamedPropertyFromPropertyStorage
Extracts a property from a serialized buffer by name

PSCreateSimplePropertyChange
Creates a PyIPropertyChange interface used to apply changes to a PyPROPVARIANT

PSCreatePropertyChangeArray
Creates a PyIPropertyChangeArray interface to be used with PyIFileOperation

SHSetDefaultProperties
Sets the default properties for a file.


propsys.PSCreateMemoryPropertyStore

PyIPropertyStore = PSCreateMemoryPropertyStore(riid)

Creates a temporary property store that is not connected to any backing storage

Parameters

riid=IID_IPropertyStore : PyIID

The interface to create

Comments

May also be used to create PyINamedPropertyStore, PyIPropertyStoreCache, PyIPersistStream, or PyIPropertyBag


propsys.PSCreatePropertyChangeArray

PyIPropertyChangeArray = PSCreatePropertyChangeArray()

Creates an IPropertyChangeArray interface to be used with PyIFileOperation

Comments

Currently only creates an empty array to be filled in later


propsys.PSCreatePropertyStoreFromPropertySetStorage

PyIPropertyStore = PSCreatePropertyStoreFromPropertySetStorage(pss, Mode , riid )

Wraps a PyIPropertySetStorage interface in a PyIPropertyStore object

Parameters

pss : PyIPropertySetStorage

Property container to be adapted

Mode : int

Read or write mode, shellcon.STGM_*. Must match mode used to open input interface.

riid=IID_IPropertyStore : PyIID

The interface to create

Comments

This function does not work for the NTFS property storage implementation based on alternate data streams.


propsys.PSCreateSimplePropertyChange

PyIPropertyChange = PSCreateSimplePropertyChange(flags, key , val , riid )

Creates an IPropertyChange interface used to apply changes to a PyPROPVARIANT

Parameters

flags : int

The change operation, pscon.PKA_*

key : PyPROPERTYKEY

The property key

val : PyPROPVARIANT

The value that the change operation will apply

riid=IID_IPropertyChange : PyIID

The interface to return.


propsys.PSGetItemPropertyHandler

PyIPropertyStore = PSGetItemPropertyHandler(Item, ReadWrite , riid )

Retrieves the property store for a shell item

Parameters

Item : PyIShellItem

A shell item

ReadWrite=False : bool

Pass True for a writeable property store

riid=IID_IPropertyStore : PyIID

Interface to return


propsys.PSGetNameFromPropertyKey

string = PSGetNameFromPropertyKey(Key)

Retrieves the canonical name of a property

Parameters

Key : PyPROPERTYKEY

A property key


propsys.PSGetNamedPropertyFromPropertyStorage

PyPROPVARIANT = PSGetNamedPropertyFromPropertyStorage(ps, name )

Extracts a property value from a serialized buffer by name

Parameters

ps : buffer

Bytes or buffer (or str in python 2) containing a serialized property set (see PyIPersistSerializedPropStorage::GetPropertyStorage)

name : str

Property to return


propsys.PSGetPropertyDescription

PyIPropertyDescription = PSGetPropertyDescription(Key, riid )

Gets a description interface for a property

Parameters

Key : PyPROPERTYKEY

A property key identifier

riid=IID_IPropertyDescription : PyIID

The interface to return

Comments

Possible interfaces include IPropertyDescription, IPropertyDescriptionAliasInfo, and IPropertyDescriptionSearchInfo


propsys.PSGetPropertyFromPropertyStorage

PyPROPVARIANT = PSGetPropertyFromPropertyStorage(ps, key )

Extracts a property value from a serialized buffer by key

Parameters

ps : buffer

Bytes or buffer (or str in python 2) containing a serialized property set (see PyIPersistSerializedPropStorage::GetPropertyStorage)

key : PyPROPERTYKEY

Property to return


propsys.PSGetPropertyKeyFromName

PyPROPERTYKEY = PSGetPropertyKeyFromName(Name)

Retrieves the property key by canonical name

Parameters

Name : str

The canonical name of a property (eg System.Author)


propsys.PSGetPropertySystem

PyIPropertySystem = PSGetPropertySystem(riid)

Creates an IPropertySystem interface

Parameters

riid=IID_IPropertySystem : PyIID

The interface to return


propsys.PSLookupPropertyHandlerCLSID

PyIID = PSLookupPropertyHandlerCLSID(FilePath)

Returns the GUID of the property handler for a file

Parameters

FilePath : str

Name of file

Comments

If no handler is found, the returned error code can be deceptive as it seems to indicate that the file itself was not found


propsys.PSRegisterPropertySchema

PSRegisterPropertySchema(filename)

Registers a group of properties described in a schema file

Parameters

filename : unicode

An XML file that defines a property schema (*.propdesc)


propsys.PSUnregisterPropertySchema

PSUnregisterPropertySchema(filename)

Removes a property schema definition

Parameters

filename : unicode

A previously registered schema definition file


propsys.SHGetPropertyStoreForWindow

PyIPropertyStore = SHGetPropertyStoreForWindow(hwnd, riid )

Retrieves a collection of a window's properties

Parameters

hwnd : PyHANDLE

Handle to a window

riid=IID_IPropertyStore : PyIID

The interface to create

Comments

Requires Windows 7 or later.

Return Value

The returned store can be used to set the System.AppUserModel.ID property that determines how windows are grouped on the taskbar


propsys.SHGetPropertyStoreFromParsingName

PyIPropertyStore = SHGetPropertyStoreFromParsingName(Path, BindCtx , Flags , riid )

Retrieves the property store for an item by path

Parameters

Path : string

Path to file

BindCtx=None : PyIBindCtx

Bind context, or None

Flags=GPS_DEFAULT : int

Combination of GETPROPERTYSTOREFLAGS values (shellcon.GPS_*)

riid=IID_IPropertyStore : PyIID

The interface to return

Comments

This function does not exist on XP, even with Desktop Search installed


propsys.SHSetDefaultProperties

SHSetDefaultProperties(hwnd, Item, FileOpFlags, Sink)

Sets the default properties for a file.

Parameters

hwnd : PyHANDLE

Parent window for any notifications, can be None

Item : PyIShellItem

Shell item whose defaults are to be set

FileOpFlags=0 : int

File operation flags, as used with PyIFileOperation::SetOperationFlags

Sink=None : PyGFileOperationProgressSink

Event sink to receive notifications

Comments

Default properties are registered by filetype under SetDefaultsFor value.


propsys.StgDeserializePropVariant

PyPROPVARIANT = StgDeserializePropVariant(prop)

Creates a PyPROPVARIANT from a serialized buffer

Parameters

prop : bytes

Buffer or bytes object (or str in Python 2) containing a serialized value


propsys.StgSerializePropVariant

bytes = StgSerializePropVariant(propvar)

Serializes a PyPROPVARIANT

Parameters

propvar : PyPROPVARIANT

The value to serialize


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.

CoMarshalInterface
Marshals an interface into a stream

CoUnmarshalInterface
Unmarshals an interface

CoReleaseMarshalData
Frees resources used by a marshalled interface MS_WINCE

CoGetObject
Converts a display name into a moniker that identifies the object named, and then binds to the object identified by the moniker.

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.

CoWaitForMultipleHandles
Waits for specified handles to be signaled or for a specified timeout period to elapse.

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.

CreateItemMoniker
Creates an item moniker that identifies an object within a containing object (typically a compound document).

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

CreateURLMoniker
Create a URL moniker from a full url or partial url and base moniker

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

CreateTypeLib2
Provides access to a new object instance that supports the ICreateTypeLib2 interface. MS_WINCE

CreateStreamOnHGlobal
Creates an in-memory stream storage object

CreateILockBytesOnHGlobal
Creates an ILockBytes interface based on global memory

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

GetRecordFromTypeInfo
Creates a PyRecord object from a PyITypeInfo interface

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

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.

ObjectFromAddress
Returns a COM object given its address in memory.

ObjectFromLresult
Retrieves a requested interface pointer for an object based on a previously generated object reference.

OleInitialize

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

ReadClassStm
Reads a CLSID from a PyIStream 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.

RegisterDragDrop
Registers the specified window as one that can be the target of an OLE drag-and-drop operation.

RevokeDragDrop
Revokes the specified window as the target of an OLE drag-and-drop operation.

DoDragDrop
Carries out an OLE drag and drop operation. 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.

StgOpenStorageOnILockBytes
Open an existing storage object that does not reside in a disk file, but instead has an underlying PyILockBytes byte array provided by the caller.

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

StgCreateStorageEx
Creates a new structured storage file or property set

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

WriteClassStm
Sets the CLSID of a stream

UnwrapObject
Unwraps a Python instance in a gateway object.

FmtIdToPropStgName
Convert a FMTID to its stream name

PropStgNameToFmtId
Convert property set name to FMTID

CoGetCallContext
Creates interfaces used to access client security settings and perform impersonation

CoGetObjectContext
Creates an interface to interact with the context of the current object

CoGetCancelObject
Retrieves an interface used to cancel a pending call

CoSetCancelObject
Sets or removes a PyICancelMethodCalls interface to be used on the current thread

CoEnableCallCancellation
Enables call cancellation for synchronous calls on the current thread

CoDisableCallCancellation
Disables call cancellation for synchronous calls on the current thread

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, combination of pythoncom.CLSCTX_* flags

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, combination of pythoncom.CLSCTX_* flags

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

CoDisableCallCancellation()

Disables call cancellation for synchronous calls on the current thread


pythoncom.CoEnableCallCancellation

CoEnableCallCancellation()

Enables call cancellation for synchronous calls on the current thread


pythoncom.CoFreeUnusedLibraries

CoFreeUnusedLibraries()

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


pythoncom.CoGetCallContext

PyIServerSecurity = CoGetCallContext(riid)

Creates interfaces used to access client security requirements and perform impersonation

Parameters

riid=IID_IServerSecurity : PyIID

The interface to create, IID_IServerSecurity or IID_ISecurityCallContext

Comments

ISecurityCallContext will only be available for a server that uses role-based security


pythoncom.CoGetCancelObject

PyICancelMethodCalls = CoGetCancelObject(ThreadID, riid )

Retrieves an interface used to cancel a pending call

Parameters

ThreadID=0 : int

Id of thread with pending call, or 0 for current thread

riid=IID_ICancelMethodCalls : PyIID

The interface to return

Comments

Requires Win2k or later


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

PyIUnknown = CoGetObject(name, bindOpts , iid )

Converts a display name into a moniker that identifies the object named, and then binds to the object identified by the moniker.

Parameters

name : string

bindOpts=None : None

Must be None

iid=IID_IUnknown : PyIID

The IID of the interface to return.


pythoncom.CoGetObjectContext

PyIContext = CoGetObjectContext(riid)

Creates an interface to interact with the context of the current object

Parameters

riid=IID_IContext : PyIID

The interface to return

Comments

Requires Win2k or later

COM applications can use this function to create IComThreadingInfo, IContext, or IContextCallback COM+ applications may also create IObjectContext, IObjectContextInfo, IObjectContextActivity, or IContextState


pythoncom.CoInitialize

CoInitialize()

Initialize the COM libraries for the calling thread.

Comments

Apart from the error handling semantics, this is equivalent to pythoncom::CoInitializeEx(pythoncom.COINIT_APARTMENTTHREADED). See pythoncom::CoInitializeEx for a description.

Return Value

This function will ignore the RPC_E_CHANGED_MODE error, as that error indicates someone else beat you to the initialization, and did so with a different threading model. This error is ignored as it still means COM is ready for use on this thread, and as this function does not explicitly specify a threading model the caller probably doesn't care what model it is.
All other COM errors will raise pythoncom.error as usual. Use pythoncom::CoInitializeEx if you also want to handle the RPC_E_CHANGED_MODE error.


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.

Return Value

This function will raise pythoncom.error for all error return values, including RPC_E_CHANGED_MODE error. This is in contrast to pythoncom::CoInitialize which will hide that specific error. If your code is happy to work in a threading model other than the one you specified, you must explicitly handle (and presumably ignore) this exception.


pythoncom.CoInitializeSecurity

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

Registers security and sets the default security values.

Parameters

sd : PySECURITY_DESCRIPTOR

Security descriptor containing access permissions for process' objects, can be None.
If Capabilities contains EOAC_APPID, sd should be an AppId (guid), or None to use server executable.
If Capabilities contains EOAC_ACCESS_CONTROL, sd parameter should be an IAccessControl interface.

authSvc : 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

One of pythoncom.RPC_C_AUTHN_LEVEL_* values. 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

One of pythoncom.RPC_C_IMP_LEVEL_* values. 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

Authentication capabilities, combination of pythoncom.EOAC_* flags.

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

CoMarshalInterface(Stm, riid, Unk, DestContext, flags)

Marshals an interface into a stream

Parameters

Stm : PyIStream

An IStream interface into which marshalled interface will be written

riid : PyIID

IID of interface to be marshalled

Unk : PyIUnknown

Base IUnknown of the object to be marshalled

DestContext : int

MSHCTX_* flag indicating where object will be unmarshalled

flags=MSHLFLAGS_NORMAL : int

MSHLFLAGS_* flag indicating marshalling options


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

CoReleaseMarshalData(Stm)

Frees resources used by a marshalled interface

Parameters

Stm : PyIStream

Stream containing marshalled interface

Comments

This is usually only needed when the interface could not be successfully unmarshalled


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.


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

CoSetCancelObject(Unk)

Sets or removes a PyICancelMethodCalls interface to be used on the current thread

Parameters

Unk : PyIUnknown

An interface that support ICancelMethodCalls, can be None to unregister current cancel object

Comments

Requires Win2k or later


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

interface = CoUnmarshalInterface(Stm, riid )

Unmarshals an interface

Parameters

Stm : PyIStream

Stream containing marshalled interface

riid : PyIID

IID of interface to be unmarshalled


pythoncom.CoWaitForMultipleHandles

int = CoWaitForMultipleHandles(Flags, Timeout , Handles )

Waits for specified handles to be signaled or for a specified timeout period to elapse.

Parameters

Flags : int

Combination of pythoncom.COWAIT_* values

Timeout : int

Timeout in milliseconds

Handles : [PyHANDLE, ...]

Sequence of handles


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 equivalent 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.CreateILockBytesOnHGlobal

PyILockBytes = CreateILockBytesOnHGlobal(hGlobal, DeleteOnRelease )

Creates an ILockBytes interface based on global memory

Parameters

hGlobal=None : PyHANDLE

Global memory handle. If None, a new global memory object is allocated.

DeleteOnRelease=True : bool

Indicates if global memory should be freed when interface is released.


pythoncom.CreateItemMoniker

PyIMoniker = CreateItemMoniker(delim, item )

Creates an item moniker that identifies an object within a containing object (typically a compound document).

Parameters

delim : string

String containing the delimiter (typically "!") used to separate this item's display name from the display name of its containing object.

item : string

String indicating the containing object's name for the object being identified.


pythoncom.CreatePointerMoniker

PyIMoniker = CreatePointerMoniker(IUnknown)

Creates a new PyIMoniker object.

Parameters

IUnknown : PyIUnknown

The interface for the moniker.


pythoncom.CreateStreamOnHGlobal

PyIStream = CreateStreamOnHGlobal(hGlobal, DeleteOnRelease )

Creates an in-memory stream storage object

Parameters

hGlobal=None : PyHANDLE

Global memory handle. If None, a new global memory object is allocated.

DeleteOnRelease=True : bool

Indicates if global memory should be freed when IStream object is destroyed.


pythoncom.CreateTypeLib

ICreateTypeLib = CreateTypeLib()

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


pythoncom.CreateTypeLib2

ICreateTypeLib2 = CreateTypeLib2()

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


pythoncom.DoDragDrop

DoDragDrop()

Carries out an OLE drag and drop operation.


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

PyUNICODE = FmtIdToPropStgName(fmtid)

Converts a FMTID to its stream name

Parameters

fmtid : PyIID

Format id - a property storage GUID (FMTID_* IIDs)


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 : str

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 or buffer

The raw data to initialize the record with.


pythoncom.GetRecordFromTypeInfo

PyRecord = GetRecordFromTypeInfo(TypeInfo)

Creates a new record object from a PyITypeInfo interface

Parameters

TypeInfo : PyITypeInfo

The type information to be converted into a PyRecord object

Comments

This function will fail if the specified type info does not have a guid defined


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

PyIUnknown = ObjectFromAddress(address, iid )

Returns a COM object given its address in memory.

Parameters

address : int

The address which holds a COM object

iid=IUnknown : PyIID

The IID to query

Return Value

This method is useful for applications which return objects via non-standard mechanisms - eg, Windows Explorer allows you to send a specific message to the explorer window and the result will be the address of an object Explorer implements. This method allows you to recover the object from that address.


pythoncom.ObjectFromLresult

PyIUnknown = ObjectFromLresult(lresult, iid , wparm )

Retrieves a requested interface pointer for an object based on a previously generated object reference.

Parameters

lresult : int

iid : PyIID

The IID to query

wparm : int


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

OleInitialize()

Calls OleInitialized - this should rarely be needed, although some clipboard operations insist this is called rather than pythoncom::CoInitialize


pythoncom.OleIsCurrentClipboard

true/false = OleIsCurrentClipboard(dataObj)

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

Parameters

dataObj : PyIDataObject

The data object to check


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

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

Parameters

dataObj : PyIDataObject

The data object to place on the clipboard. This parameter can be None in which case the clipboard is emptied.


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

PyIID = PropStgNameToFmtId(Name)

Converts a property set name to its format id (GUID)

Parameters

Name : string/unicode

Storage stream name


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

Search for PeekMessage and DispatchMessage at msdn, google or google groups.

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

PyIID = ReadClassStm(Stm)

Retrieves the CLSID from a stream

Parameters

Stm : PyIStream

An IStream interface


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

RegisterDragDrop(hwnd, dropTarget)

Registers the specified window as one that can be the target of an OLE drag-and-drop operation and specifies the PyIDropTarget instance to use for drop operations.

Parameters

hwnd : PyHANDLE

Handle to a window

dropTarget : PyIDropTarget

Object that implements the IDropTarget interface


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

RevokeDragDrop(hwnd)

Revokes the registration of the specified application window as a potential target for OLE drag-and-drop operations.

Parameters

hwnd : PyHANDLE

Handle to a window registered as an OLE drop target.


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

PyIStorage = StgCreateStorageEx(Name, Mode , stgfmt , Attrs , riid , StgOptions , SecurityDescriptor )

Creates a new structured storage file or property set

Parameters

Name : string

Name of the stream or file to open

Mode : int

Access mode, combination of storagecon.STGM_* flags

stgfmt : int

Storage format, storagecon.STGFMT_*

Attrs : int

File flags and attributes, only used with STGFMT_DOCFILE

riid : PyIID

Interface id to return, IStorage or IPropertySetStorage

StgOptions=None : dict

Dictionary representing STGOPTIONS struct (only used with STGFMT_DOCFILE)

SecurityDescriptor=None : PySECURITY_DESCRIPTOR

Specifies security for the new file. Must be None on Windows XP.

Comments

Requires Win2k or later

Accepts keyword args


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. This method will also raise com_error if the StgIsStorageFile function returns a failure HRESULT.


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, Mode , stgfmt , Attrs , riid , StgOptions )

Advanced version of StgOpenStorage, win2k or better

Parameters

Name : string

Name of the stream or file to open

Mode : int

Access mode, combination of storagecon.STGM_* flags

stgfmt : int

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

Attrs : int

File flags and attributes, only used with STGFMT_DOCFILE

riid : PyIID

Interface id to return, IStorage or IPropertySetStorage

StgOptions=None : dict

Dictionary representing STGOPTIONS struct (only used with STGFMT_DOCFILE)

Comments

Requires Win2k or later

Accepts keyword args


pythoncom.StgOpenStorageOnILockBytes

PyIStorage = StgOpenStorageOnILockBytes(lockBytes, stgPriority , snbExclude , reserved )

Open an existing storage object that does not reside in a disk file, but instead has an underlying PyILockBytes byte array provided by the caller.

Parameters

lockBytes : PyILockBytes

The PyILockBytes interface on the underlying byte array object on which to open an existing storage object.

stgPriority : PyIStorage

Usually None, or another parent storage.

snbExclude=None : object

Not yet supported - must be None

reserved=0 : int

A reserved value


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

Parameters

storage : PyIStorage

Storage object into which CLSID will be written.

iid : PyIID

The IID to write


pythoncom.WriteClassStm

WriteClassStm(Stm, clsid)

Writes a CLSID to a stream.

Parameters

Stm : PyIStream

An IStream interface

clsid : 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: O:/SRC/PYWIN32/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: O:/SRC/PYWIN32/COM/WIN32COM/SRC/PYTHONCOM.CPP


shell

Module shell

A module wrapping Windows Shell functions and interfaces

Methods

AssocCreate
Creates a PyIQueryAssociations object

AssocCreateForClasses
Retrieves an object that implements an IQueryAssociations interface."}

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

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

IsUserAnAdmin
Tests whether the current user is a member of the Administrator's group.

SHCreateDataObject
Creates a data object in a parent folder.

SHCreateDefaultContextMenu

SHCreateDefaultExtractIcon
Creates a standard icon extractor, whose defaults can be further configured via the IDefaultExtractIconInit interface.

SHCreateShellFolderView
Creates a new instance of the default Shell folder view object.

SHCreateShellItemArray
Creates a Shell item array object.

SHCreateShellItemArrayFromDataObject
Creates a shell item array from an IDataObject interface

SHCreateShellItemArrayFromIDLists
Creates a shell item array from a number of item identifiers

SHCreateShellItemArrayFromShellItem

SHGetPathFromIDList
Converts an PyIDL to a path.

SHGetPathFromIDListW
Converts an PyIDL to a unicode path.

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

SHGetFileInfo
Retrieves information about an object in the file system, such as a file, a folder, a directory, or a drive root.

SHGetFolderPath
Retrieves the path of a folder.

SHSetFolderPath
Sets the location of a special folder

SHGetFolderLocation
Retrieves the PyIDL of a folder.

SHGetNameFromIDList
Retrieves the display name of an item from an ID list.

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.

SHQueryRecycleBin
Returns the number of items and total size of recycle bin

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.

SHChangeNotifyRegister
Registers a window that receives notifications from the file system or shell.

SHChangeNotifyDeregister
Unregisters the client's window process from receiving notification events

SHCreateItemFromIDList
Creates and initializes a Shell item object.

SHCreateItemFromParsingName
Creates and initializes a Shell item object from a parsing name.

SHCreateItemFromRelativeName
Creates and initializes a Shell item object from a relative parsing name.

SHCreateItemInKnownFolder
Creates a Shell item object for a single file that exists inside a known folder.

SHCreateItemWithParent
Create a Shell item, given a parent folder and a child item ID.

SHGetIDListFromObject
Retrieves the PIDL of an object.

SHGetInstanceExplorer
Allows components that run in a Web browser (Iexplore.exe) or a nondefault Windows® Explorer (Explorer.exe) process to hold a reference to the process. The components can use the reference to prevent the process from closing prematurely.

SHFileOperation
Copies, moves, renames, or deletes a file system object.

StringAsCIDA
Given a CIDA as a raw string, return pidl_folder, [pidl_children, ...]

CIDAAsString
Given a (pidl, child_pidls) object, return a CIDA as a string

StringAsPIDL
Given a PIDL as a raw string, return a PIDL object (ie, a list of strings)

AddressAsPIDL
Given the address of a PIDL, return a PIDL object (ie, a list of strings)

PIDLAsString
Given a PIDL object, return the raw PIDL bytes as a string

SHGetSettings
Retrieves the current shell option settings.

FILEGROUPDESCRIPTORAsString
Creates a FILEGROUPDESCRIPTOR from a sequence of mapping objects, each with FILEDESCRIPTOR attributes

StringAsFILEGROUPDESCRIPTOR
Decodes a FILEGROUPDESCRIPTOR packed in a string

ShellExecuteEx
Performs an action on a file.

SHGetViewStatePropertyBag
Retrieves an interface for a folder's view state

SHILCreateFromPath
Returns the PIDL and attributes of a path

SHCreateShellItem
Creates an IShellItem interface from a PIDL

SHOpenFolderAndSelectItems
Displays a shell folder with items pre-selected

SHCreateStreamOnFileEx
Creates a PyIStream that reads and writes to a file

SetCurrentProcessExplicitAppUserModelID
Sets the taskbar identifier

GetCurrentProcessExplicitAppUserModelID
Retrieves the current taskbar identifier

SHParseDisplayName
Translates a display name into a shell item identifier


shell.AddressAsPIDL

PyIDL = AddressAsPIDL(address)

Given the address of a PIDL in memory, return a PIDL object (ie, a list of strings)

Parameters

address : int

The address of the PIDL


shell.AssocCreate

PyIQueryAssociations = AssocCreate()

Creates a PyIQueryAssociations object


shell.AssocCreateForClasses

PyIUnknown = AssocCreateForClasses()

Retrieves an object that implements an IQueryAssociations interface.

Comments

This function is only available on Vista and later; a COM exception with E_NOTIMPL will be thrown if the function can't be located.


shell.CIDAAsString

string = CIDAAsString(pidl)

Given a (pidl, child_pidls) object, return a CIDA as a string

Parameters

pidl : string

The PIDL as a raw string.

Return Value

The result is a string with the CIDA bytes.


shell.DragQueryFile

int/string = DragQueryFile(hglobal, index )

Retrieves the names (or count) of dropped files

Parameters

hglobal : PyHANDLE

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.


shell.DragQueryFileW

int/PyUnicode = DragQueryFileW(hglobal, index )

Retrieves the names (or count) of dropped files

Parameters

hglobal : PyHANDLE

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.


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 : PyHANDLE

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

string = FILEGROUPDESCRIPTORAsString(descriptors, make_unicode )

Creates a FILEGROUPDESCRIPTOR from a sequence of mapping objects, each with FILEDESCRIPTOR attributes

Parameters

descriptors : [FILEDESCRIPTOR, ...]

A sequence of FILEDESCRIPTOR objects. Each filedescriptor object must be a mapping/dictionary, with the following optional attributes: dwFlags, clsid, sizel, pointl, dwFileAttributes, ftCreationTime, ftLastAccessTime, ftLastWriteTime, nFileSize If these attributes do not exist, or are None, they will be ignored - hence you only need specify attributes you care about.
In general, you can omit dwFlags - it will be set correctly based on what other attributes exist.

make_unicode=False on py2k, True on py3k : bool

If true, a FILEDESCRIPTORW object is created


shell.GetCurrentProcessExplicitAppUserModelID

str = GetCurrentProcessExplicitAppUserModelID()

Retrieves the current taskbar identifier

Comments

Will only retrieve an identifier if set by the application, not a system-assigned default.

Requires Windows 7 or later


shell.IsUserAnAdmin

bool = IsUserAnAdmin()

Tests whether the current user is a member of the Administrator's group.

Comments

This method is only available with version 5 or later of the shell controls

Return Value

The result is true or false, or a com_error with E_NOTIMPL is raised.


shell.PIDLAsString

string = PIDLAsString(pidl)

Given a PIDL object, return the raw PIDL bytes as a string

Parameters

pidl : PyIDL

The PIDL object (ie, a list of strings)


shell.SHAddToRecentDocs

SHAddToRecentDocs(Flags, data)

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

Value from SHARD enum indicating how the item is identified.

data : object

Type of input is determined by the SHARD_* flag. Use None to clear recent items list.

Flags | Type of input
SHARD_PATHA | String containing a file path
SHARD_PATHW | String containing a file path
SHARD_PIDL | PyIDL, or a buffer containing a PIDL (see shell::PIDLAsString)
SHARD_APPIDINFO | Tuple of (PyIShellItem, str), where str is an AppID
SHARD_APPIDINFOIDLIST | Tuple of (PyIDL, str), where str is an AppID
SHARD_LINK | PyIShellLink
SHARD_APPIDINFOLINK | Tuple of (PyIShellLink, str) where str is an AppID
SHARD_SHELLITEM | PyIShellItem

Comments

On Windows 7, the entry is also added to the application's jump list.

The underlying API function has no return value, and therefore no way to indicate failure.

Win32 API References

Search for SHAddToRecentDocs at msdn, google or google groups.


shell.SHBrowseForFolder

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

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

Parameters

hwndOwner=None : PyHANDLE

Parent window for the dialog box, can be None

pidlRoot=None : PyIDL

PIDL identifying the place to start browsing. Desktop is used if not specified

title=None : Unicode /string

Title to be displayed with the directory tree

flags=0 : int

Combination of shellcon.BIF_* flags

callback=None : object

A callable object to be used as the callback, or None

callback_data=None : object

An object passed to the callback function

Comments

If you provide a callback function, it should take 4 args: hwnd, msg, lp, data. Data will be whatever you passed as callback_data, and the rest are integers. See the Microsoft documentation for SHBrowseForFolder, or the browse_for_folder.py shell sample for more information.

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(EventId, Flags, Item1, Item2)

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.

Parameters

EventId : int

Combination of shellcon.SHCNE_* constants

Flags : int

Combination of shellcon.SHCNF_* constants that specify type of last 2 parameters Only one of the type flags may be specified, combined with one of the SHCNF_FLUSH* flags

Item1 : object

Type is dependent on the event to be signalled

Item2 : object

Type is dependent on the event to be signalled


shell.SHChangeNotifyDeregister

SHChangeNotifyDeregister(id)

Unregisters the client's window process from receiving notification events

Parameters

id : int

The registration identifier (ID) returned by shell::SHChangeNotifyRegister.


shell.SHChangeNotifyRegister

int = SHChangeNotifyRegister(hwnd, sources , events , msg )

Registers a window that receives notifications from the file system or shell.

Parameters

hwnd : PyHANDLE

Handle to the window that receives the change or notification messages.

sources : int

One or more values that indicate the type of events for which to receive notifications.

events : int

Change notification events for which to receive notification.

msg : int

Message to be posted to the window procedure.


shell.SHCreateDataObject

PyIUnknown = SHCreateDataObject(parent, children , do_inner , iid )

Parameters

parent : PIDL

children : [PIDL, ...]

do_inner : PyIDataObject

The inner data object, or None bNoneOK */))

iid=IID_IDataObject : PyIID

The IID to query for

Comments

This function is only available on Vista and later; a COM exception with E_NOTIMPL will be thrown if the function can't be located.


shell.SHCreateDefaultContextMenu

PyIUnknown = SHCreateDefaultContextMenu(dcm, iid )

Parameters

dcm : DEFAULTCONTEXTMENU

iid=IID_IContextMenu : PyIID

The IID to query for

Comments

This function is only available on Vista and later; a COM exception with E_NOTIMPL will be thrown if the function can't be located.


shell.SHCreateDefaultExtractIcon

PyIDefaultExtractIconInit = SHCreateDefaultExtractIcon()

Creates a standard icon extractor, whose defaults can be further configured via the IDefaultExtractIconInit interface.

Comments

This function is only available on Vista and later; a COM exception with E_NOTIMPL will be thrown if the function can't be located.


shell.SHCreateItemFromIDList

PyIShellItem = SHCreateItemFromIDList(pidl, riid )

Creates and initializes a Shell item object from a PIDL. Can also create PyIShellItem2 objects.

Parameters

pidl : PyIDL

An absolute item identifier list

riid=IID_IShellItem : PyIID

The interface to create

Comments

This function is only available on Vista and later; a COM exception with E_NOTIMPL will be thrown if the function can't be located.


shell.SHCreateItemFromParsingName

PyIShellItem = SHCreateItemFromParsingName(name, ctx , riid )

Creates and initializes a Shell item object from a parsing name.

Parameters

name : str

The display name of the item to create, eg a file path

ctx : PyIBindCtx

Bind context, can be None

riid : PyIID

The interface to create, IID_IShellItem or IID_IShellItem2

Comments

This function is only available on Vista and later; a COM exception with E_NOTIMPL will be thrown if the function can't be located.


shell.SHCreateItemFromRelativeName

PyIShellItem = SHCreateItemFromRelativeName(Parent, Name , ctx , riid )

Creates and initializes a Shell item object from a relative parsing name.

Parameters

Parent : PyIShellItem

Shell item interface on the parent folder

Name : str

Relative name of an item within the parent folder

ctx : PyIBindCtx

Bind context for parsing, can be None

riid : PyIID

The interface to return, IID_IShellItem or IID_IShellItem2

Comments

This function is only available on Vista and later; a COM exception with E_NOTIMPL will be thrown if the function can't be located.


shell.SHCreateItemInKnownFolder

PyIShellItem = SHCreateItemInKnownFolder(FolderId, Flags , Name , riid )

Creates a Shell item object for a single file that exists inside a known folder.

Parameters

FolderId : PyIID

The GUID of a known folder (shell.FOLDERID_*)

Flags : int

Combination of shellcon.KF_FLAG_* flags controlling how folder is handled

Name : str

Name of an item in the folder. Pass None to bind to the known folder itself.

riid=IID_IShellItem : PyIID

The interface to return, usually IID_IShellItem or IID_IShellItem2

Comments

This function is only available on Vista and later; a COM exception with E_NOTIMPL will be thrown if the function can't be located.


shell.SHCreateItemWithParent

PyIShellItem = SHCreateItemWithParent(Parent, sfParent , child , riid )

Create a Shell item, given a parent folder and a child item ID.

Parameters

Parent : PyIDL

Absolute item id list of the parent folder. Pass None if the below shell folder is used.

sfParent : PyIShellFolder

Parent folder object. Can be None if parent id list is specified.

child : PyIDL

Relative item id list for an object in the parent folder

riid=IID_IShellItem : PyIID

The interface to return, usually IID_IShellItem or IID_IShellItem2

Comments

This function is only available on Vista and later; a COM exception with E_NOTIMPL will be thrown if the function can't be located.


shell.SHCreateShellFolderView

PyIShellView = SHCreateShellFolderView(sf, viewOuter , callbacks )

Creates a new instance of the default Shell folder view object.

Parameters

sf : PyIShellFolder

viewOuter=None : PyIShellView

callbacks=None : PyIShellFolderViewCB


shell.SHCreateShellItem

PyIShellItem = SHCreateShellItem(pidlParent, sfParent , Child )

Creates an IShellItem interface from a PIDL

Parameters

pidlParent : PyIDL

PIDL of parent folder, can be None

sfParent : PyIShellFolder

IShellFolder interface of parent folder, can be None

Child : PyIDL

PIDL identifying desired item. Must be an absolute PIDL if parent is not specified.

Comments

This function is only available on XP and later; a COM exception with E_NOTIMPL will be thrown if the function can't be located.


shell.SHCreateShellItemArray

PyIShellItemArray = SHCreateShellItemArray(parent, sf , children )

Creates a Shell item array object.

Parameters

parent : PyIDL

Absolute ID list of parent folder, or None if sf is specified

sf : PyIShellFolder

The Shell data source object that is the parent of the child items specified in children. If parent is specified, this parameter can be NULL. bNoneOK */))

children : [PyIDL, ...]

Sequence of relative IDLs for items in the parent folder

Comments

This function is only available on Vista and later; a COM exception with E_NOTIMPL will be thrown if the function can't be located.


shell.SHCreateShellItemArrayFromDataObject

PyIShellItemArray = SHCreateShellItemArrayFromDataObject(do, iid )

Creates a shell item array from an IDataObject interface that contains a list of items (eg CF_HDROP)

Parameters

do : PyIDataObject

A data object that can be rendered as a list of items

iid=IID_IShellItemArray : PyIID

The interface to create

Comments

This function is only available on Vista and later; a COM exception with E_NOTIMPL will be thrown if the function can't be located.


shell.SHCreateShellItemArrayFromIDLists

PyIShellItemArray = SHCreateShellItemArrayFromIDLists(pidls)

Creates a shell item array from a number of item identifiers

Parameters

pidls : [PyIDL, ...]

A sequence of absolute IDLs.

Comments

This function is only available on Vista and later; a COM exception with E_NOTIMPL will be thrown if the function can't be located.


shell.SHCreateShellItemArrayFromShellItem

PyIShellItemArray = SHCreateShellItemArrayFromShellItem(si, riid )

Creates an item array containing a single item

Parameters

si : PyIShellItem

A shell item bNoneOK */))

riid=IID_IShellItemArray : PyIID

The interface to return

Comments

This function is only available on Vista and later; a COM exception with E_NOTIMPL will be thrown if the function can't be located.


shell.SHCreateStreamOnFileEx

PyIStream = SHCreateStreamOnFileEx(File, Mode , Attributes , Create , Template )

Creates an IStream interface that reads and writes to a file

Parameters

File : str

Name of file to be connected to the stream

Mode : int

Combination of storagecon.STGM_* flags specifying the access mode

Attributes : int

Combination of win32con.FILE_ATTRIBUTE_* flags

Create : bool

Determines if function should fail when file exists (see MSDN docs for full explanation)

Template=None : None

Reserved, use only None

Comments

Accepts keyword args.

This function is only available on WinXP and later. COM exception with E_NOTIMPL will be thrown if the function can't be located.


shell.SHEmptyRecycleBin

SHEmptyRecycleBin(hwnd, path, flags)

Empties the recycle bin on the specified drive.

Parameters

hwnd : PyHANDLE

Handle to parent window, can be None

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

int, int = SHFileOperation(operation)

Copies, moves, renames, or deletes a file system object.

Parameters

operation : SHFILEOPSTRUCT

Defines the operation to perform.

Return Value

The result is a tuple containing int result of the function itself, and the result of the fAnyOperationsAborted member after the operation. If Flags contains FOF_WANTMAPPINGHANDLE, returned tuple will have a 3rd member containing a sequence of 2-tuples with the old and new file names of renamed files. This will only have any content if FOF_RENAMEONCOLLISION was specified, and some filename conflicts actually occurred.


shell.SHGetDesktopFolder

PyIShellFolder = SHGetDesktopFolder()

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


shell.SHGetFileInfo

int, SHFILEINFO = SHGetFileInfo(name, dwFileAttributes , uFlags , infoAttrs )

Retrieves information about an object in the file system, such as a file, a folder, a directory, or a drive root.

Parameters

name : string/PyIDL

The path and file name. Both absolute and relative paths are valid.
If the uFlags parameter includes the SHGFI_PIDL flag, this parameter must be a valid PyIDL object that uniquely identifies the file within the shell's namespace. The PIDL must be a fully qualified PIDL. Relative PIDLs are not allowed.
If the uFlags parameter includes the SHGFI_USEFILEATTRIBUTES flag, this parameter does not have to be a valid file name. The function will proceed as if the file exists with the specified name and with the file attributes passed in the dwFileAttributes parameter. This allows you to obtain information about a file type by passing just the extension for pszPath and passing FILE_ATTRIBUTE_NORMAL in dwFileAttributes.
This string can use either short (the 8.3 form) or long file names.

dwFileAttributes : int

Combination of one or more file attribute flags (FILE_ATTRIBUTE_ values). If uFlags does not include the SHGFI_USEFILEATTRIBUTES flag, this parameter is ignored.

uFlags : int

Combination of shellcon.SHGFI_* flags that specify the file information to retrieve. See MSDN for details

infoAttrs=0 : int

Flags copied to the SHFILEINFO.dwAttributes member - useful when flags contains SHGFI_ATTR_SPECIFIED


shell.SHGetFolderLocation

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

Retrieves the PIDL of a folder.

Parameters

hwndOwner : int

Window in which to display any neccessary dialogs

nFolder : int

One of the CSIDL_* constants specifying the path.

hToken=None : PyHANDLE

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

reserved=0 : int

Must be 0

Comments

This method is only available with version 5 or later of the shell controls


shell.SHGetFolderPath

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

Retrieves the path of a folder.

Parameters

hwndOwner : PyHANDLE

Parent window, can be None (or 0)

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 with later versions of shell32.dll, or if you have shfolder.dll installed on earlier systems


shell.SHGetIDListFromObject

PyIDL = SHGetIDListFromObject(unk)

Retrieves the PIDL of an object.

Parameters

unk : PyIUnknown

Comments

This function is only available on Vista and later; a COM exception with E_NOTIMPL will be thrown if the function can't be located.


shell.SHGetInstanceExplorer

PyIUnknown = SHGetInstanceExplorer()

Allows components that run in a Web browser (Iexplore.exe) or a nondefault Windows Explorer (Explorer.exe) process to hold a reference to the process. The components can use the reference to prevent the process from closing prematurely.

Comments

SHGetInstanceExplorer succeeds only if it is called from within an Explorer.exe or Iexplorer.exe process. It is typically used by components that run in the context of the Web browser (Iexplore.exe). However, it is also useful when Explorer.exe has been configured to run all folders in a second process. SHGetInstanceExplorer fails if the component is running in the default Explorer.exe process. There is no need to hold a reference to this process, as it is shut down only when the user logs out.


shell.SHGetNameFromIDList

str = SHGetNameFromIDList(pidl, flags )

Retrieves the display name of an item from an ID list.

Parameters

pidl : PyIDL

Absolute ID list of the item

flags : int

Type of name to return, shellcon.SIGDN_*

Comments

This function is only available on Vista and later; a COM exception with E_NOTIMPL will be thrown if the function can't be located.


shell.SHGetPathFromIDList

string = SHGetPathFromIDList(idl)

Converts an IDLIST to a path.

Parameters

idl : PyIDL

The ITEMIDLIST


shell.SHGetPathFromIDListW

PyUnicode = SHGetPathFromIDListW(idl)

Converts an IDLIST to a path.

Parameters

idl : PyIDL

The ITEMIDLIST


shell.SHGetSettings

dict = SHGetSettings(mask)

Retrieves the current shell option settings.

Parameters

mask=-1 : int

The values being requested - one of the shellcon.SSF_* constants

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.

Return Value

The result is a dictionary, the contents of which depend on the mask param. Key names are the same as the SHELLFLAGSTATE structure members - 'fShowExtensions', 'fNoConfirmRecycle', etc


shell.SHGetSpecialFolderLocation

PyIDL = SHGetSpecialFolderLocation(hwndOwner, nFolder )

Retrieves the PIDL of a special folder.

Parameters

hwndOwner : PyHANDLE

Parent window, can be None (or 0)

nFolder : int

One of the CSIDL_* constants specifying the path.


shell.SHGetSpecialFolderPath

PyUnicode = SHGetSpecialFolderPath(hwndOwner, nFolder , bCreate )

Retrieves the path of a special folder.

Parameters

hwndOwner : PyHANDLE

Parent window, can be None (or 0)

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

PyIPropertyBag = SHGetViewStatePropertyBag(pidl, BagName , Flags , riid )

Retrieves an interface for the view state of a folder

Parameters

pidl : PyIDL

An item id list that identifies the folder

BagName : PyUnicode

Name of the property bag to retrieve

Flags : int

Combination of SHGVSPB_* flags

riid : PyIID

The interface to return, usually IID_IPropertyBag

Comments

This function will also return IPropertyBag2, but we don't have a python implementation of this interface yet


shell.SHILCreateFromPath

(PyIDL, int) = SHILCreateFromPath(Path, Flags )

Retrieves the PIDL and attributes for a path

Parameters

Path : PyUnicode

The path whose PIDL will be returned

Flags : int

A combination of SFGAO_* constants as used with GetAttributesOf

Return Value

Returns the PIDL for the given path and any requested attributes


shell.SHOpenFolderAndSelectItems

SHOpenFolderAndSelectItems(Folder, Items, Flags)

Displays a shell folder with items pre-selected

Parameters

Folder : PyIDL

An absolute item id list identifying a shell folder

Items : (PyIDL,...)

A sequence of relative item ids identifying items in the folder

Flags=0 : int

Combination of OFASI_* flags (not used on XP)

Comments

This function is only available on XP and later. COM exception with E_NOTIMPL will be thrown if the function can't be located.


shell.SHParseDisplayName

(PyIDL, int) = SHParseDisplayName(Name, Attributes , BindCtx )

Translates a display name into a shell item identifier

Parameters

Name : str

Display name of a shell item, such as a file path

Attributes : int

Bitmask of shell attributes to retrieve, combination of shellcon.SFGAO_*

BindCtx=None : PyIBindCtx

Bind context, can be None

Comments

Accepts keyword args

Requires XP or later

Return Value

Returns the item id list and any requested attribute flags


shell.SHQueryRecycleBin

long,long = SHQueryRecycleBin(RootPath)

Retrieves the total size and number of items in the Recycle Bin for a specified drive

Parameters

RootPath=None : PyUnicode

A path containing the drive whose recycle bin will be queried, or None for all drives


shell.SHSetFolderPath

SHSetFolderPath(csidl, Path, hToken)

Sets the location of one of the special folders

Parameters

csidl : int

One of the shellcon.CSIDL_* values

Path : str/unicode

The full path to be set

hToken=None : PyHANDLE

Handle to an access token, can be None

Comments

This function is only available on Windows 2000 or later


shell.SHUpdateImage

SHUpdateImage(HashItem, Index, Flags, ImageIndex)

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

Parameters

HashItem : string

Full path of file containing the icon as returned by PyIExtractIcon::GetIconLocation

Index : int

Index of the icon in the above file

Flags : int

GIL_NOTFILENAME or GIL_SIMULATEDOC

ImageIndex : int

Index of the icon in the system image list


shell.SetCurrentProcessExplicitAppUserModelID

SetCurrentProcessExplicitAppUserModelID(AppID)

Sets the taskbar identifier

Parameters

AppID : str

The Application User Model ID used to group taskbar buttons

Comments

Should be used early in process startup before creating any windows

Requires Windows 7 or later


shell.ShellExecuteEx

dict = ShellExecuteEx(fMask, hwnd , lpVerb , lpFile , lpParameters , lpDirectory , nShow , lpIDList , obClass , hkeyClass , dwHotKey , hIcon , hMonitor )

Performs an operation on a file.

Parameters

fMask=0 : int

The default mask for the structure. Other masks may be added based on what paramaters are supplied.

hwnd=0 : PyHANDLE

lpVerb : string

lpFile : string

lpParameters : string

lpDirectory : string

nShow=0 : int

lpIDList : PyIDL

obClass : string

hkeyClass : int

dwHotKey : int

hIcon : PyHANDLE

hMonitor : PyHANDLE

Return Value

The result is a dictionary based on documented result values in the structure. Currently this is "hInstApp" and "hProcess"


shell.StringAsCIDA

PyIDL, list = StringAsCIDA(pidl)

Given a CIDA as a raw string, return the folder PIDL and list of children

Parameters

pidl : string

The PIDL as a raw string.

Return Value

The result is the PIDL of the folder, and a list of child PIDLs.


shell.StringAsFILEGROUPDESCRIPTOR

[dict, ...] = StringAsFILEGROUPDESCRIPTOR(buf, make_unicode )

Decodes a FILEGROUPDESCRIPTOR packed in a string

Parameters

buf : buffer

A string packed as either FILEGROUPDESCRIPTORW or FILEGROUPDESCRIPTORW

make_unicode=-1 : bool

Should this be treated as a FILEDESCRIPTORW? If -1 the size of the buffer will be used to make that determination. Thus, if the buffer is not the exact size of a correct FILEDESCRIPTORW or FILEDESCRIPTORA, you will need to specify this parameter.


shell.StringAsPIDL

PyIDL = StringAsPIDL(pidl)

Given a PIDL as a raw string, return a PIDL object (ie, a list of strings)

Parameters

pidl : string

The PIDL as a raw string.


win32com.authorization.authorization

Module win32com.authorization.authorization

Module containing support for authorization COM interfaces

Methods

EditSecurity
Creates a security descriptor editor dialog


Objects

  • COMPONENT
  • COMPONENTSOPT
  • COMPPOS
  • COMPSTATEINFO
  • DEFCONTENTMENU
  • ELEMDESC
  • EXP_DARWIN_LINK
  • EXP_SPECIAL_FOLDER
  • EXP_SZ_LINK
  • FUNCDESC
  • IDLDESC
  • MAPIINIT_0
  • NT_CONSOLE_PROPS
  • NT_FE_CONSOLE_PROPS
  • PROPSPEC
  • PyADSVALUE
  • PyADS_ATTR_INFO
  • PyADS_OBJECT_INFO
  • PyADS_SEARCHPREF_INFO
  • PyBIND_OPTS
  • PyCMINVOKECOMMANDINFO
  • PyDSBCAPS
  • PyDSBUFFERDESC
  • PyDSCAPS
  • PyDSCBCAPS
  • PyDSCBUFFERDESC
  • PyDSCCAPS
  • PyDSOP_FILTER_FLAGS
  • PyDSOP_SCOPE_INIT_INFO
  • PyDSOP_SCOPE_INIT_INFOs
  • PyDSOP_UPLEVEL_FILTER_FLAGS
  • PyFORMATETC
  • PyGFileOperationProgressSink
  • PyGSecurityInformation
  • PyIADesktopP2
  • PyIADs
  • PyIADsContainer
  • PyIADsUser
  • PyIActiveDesktop
  • PyIActiveDesktopP
  • PyIActiveScriptDebug
  • PyIActiveScriptError
  • PyIActiveScriptErrorDebug
  • PyIActiveScriptParseProcedure
  • PyIActiveScriptSite
  • PyIActiveScriptSiteDebug
  • PyIAddrBook
  • PyIApplicationDebugger
  • PyIApplicationDestinations
  • PyIApplicationDocumentLists
  • PyIAsyncOperation
  • PyIAttach
  • PyIBindCtx
  • PyIBrowserFrameOptions
  • PyICancelMethodCalls
  • PyICatInformation
  • PyICatRegister
  • PyICategoryProvider
  • PyIClassFactory
  • PyIClientSecurity
  • PyIColumnProvider
  • PyIConnectionPoint
  • PyIConnectionPointContainer
  • PyIContext
  • PyIContextMenu
  • PyICopyHookA
  • PyICopyHookW
  • PyICreateTypeInfo
  • PyICreateTypeLib
  • PyICreateTypeLib2
  • PyICurrentItem
  • PyICustomDestinationList
  • 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
  • PyIDefaultExtractIconInit
  • PyIDirectSound
  • PyIDirectSoundBuffer
  • PyIDirectSoundCapture
  • PyIDirectSoundCaptureBuffer
  • PyIDirectSoundNotify
  • PyIDirectoryObject
  • PyIDirectorySearch
  • PyIDispatch
  • PyIDispatchEx
  • PyIDisplayItem
  • PyIDocHostUIHandler
  • PyIDropSource
  • PyIDropTarget
  • PyIDropTargetHelper
  • PyIDsObjectPicker
  • PyIEmptyVolumeCache
  • PyIEmptyVolumeCache2
  • PyIEmptyVolumeCacheCallBack
  • PyIEnumCATEGORYINFO
  • PyIEnumConnectionPoints
  • PyIEnumConnections
  • PyIEnumContextProps
  • PyIEnumDebugApplicationNodes
  • PyIEnumDebugCodeContexts
  • PyIEnumDebugExpressionContexts
  • PyIEnumDebugPropertyInfo
  • PyIEnumDebugStackFrames
  • PyIEnumExplorerCommand
  • PyIEnumFORMATETC
  • PyIEnumGUID
  • PyIEnumIDList
  • PyIEnumMoniker
  • PyIEnumObjects
  • PyIEnumRemoteDebugApplicationThreads
  • PyIEnumRemoteDebugApplications
  • PyIEnumResources
  • PyIEnumSTATPROPSETSTG
  • PyIEnumSTATPROPSTG
  • PyIEnumSTATSTG
  • PyIEnumShellItems
  • PyIEnumString
  • PyIErrorLog
  • PyIExplorerBrowser
  • PyIExplorerBrowserEvents
  • PyIExplorerCommand
  • PyIExplorerCommandProvider
  • PyIExplorerPaneVisibility
  • PyIExternalConnection
  • PyIExtractIcon
  • PyIExtractIconW
  • PyIExtractImage
  • PyIFileOperation
  • PyIIdentityName
  • PyIInitializeWithFile
  • PyIInitializeWithStream
  • PyIInputObject
  • PyIInternetBindInfo
  • PyIInternetPriority
  • PyIInternetProtocol
  • PyIInternetProtocolInfo
  • PyIInternetProtocolRoot
  • PyIInternetProtocolSink
  • PyIInternetSecurityManager
  • PyIKnownFolder
  • PyIKnownFolderManager
  • PyILockBytes
  • PyIMAPIContainer
  • PyIMAPIFolder
  • PyIMAPIProp
  • PyIMAPISession
  • PyIMAPIStatus
  • PyIMAPITable
  • PyIMachineDebugManager
  • PyIMachineDebugManagerEvents
  • PyIMessage
  • PyIMoniker
  • PyIMsgServiceAdmin
  • PyIMsgStore
  • PyINameSpaceTreeControl
  • PyINamedPropertyStore
  • PyIObjectArray
  • PyIObjectCollection
  • PyIObjectWithPropertyKey
  • PyIObjectWithSite
  • PyIOleClientSite
  • PyIOleCommandTarget
  • PyIOleControl
  • PyIOleControlSite
  • PyIOleInPlaceActiveObject
  • PyIOleInPlaceFrame
  • PyIOleInPlaceObject
  • PyIOleInPlaceSite
  • PyIOleInPlaceSiteEx
  • PyIOleInPlaceSiteWindowless
  • PyIOleInPlaceUIWindow
  • PyIOleObject
  • PyIOleWindow
  • PyIPersist
  • PyIPersistFile
  • PyIPersistFolder
  • PyIPersistFolder2
  • PyIPersistPropertyBag
  • PyIPersistSerializedPropStorage
  • PyIPersistStorage
  • PyIPersistStream
  • PyIPersistStreamInit
  • PyIProcessDebugManager
  • PyIProfAdmin
  • PyIPropertyBag
  • PyIPropertyChange
  • PyIPropertyChangeArray
  • PyIPropertyDescription
  • PyIPropertyDescriptionAliasInfo
  • PyIPropertyDescriptionList
  • PyIPropertyDescriptionSearchInfo
  • PyIPropertyEnumType
  • PyIPropertyEnumTypeList
  • PyIPropertySetStorage
  • PyIPropertyStorage
  • PyIPropertyStore
  • PyIPropertyStoreCache
  • PyIPropertyStoreCapabilities
  • PyIPropertySystem
  • PyIProvideClassInfo
  • PyIProvideClassInfo2
  • PyIProvideExpressionContexts
  • PyIProvideTaskPage
  • PyIQueryAssociations
  • PyIRelatedItem
  • PyIRemoteDebugApplication
  • PyIRemoteDebugApplicationEvents
  • PyIRemoteDebugApplicationThread
  • PyIRunningObjectTable
  • PyIScheduledWorkItem
  • PyIServerSecurity
  • PyIServiceProvider
  • PyIShellBrowser
  • PyIShellExtInit
  • PyIShellFolder
  • PyIShellFolder2
  • PyIShellIcon
  • PyIShellIconOverlay
  • PyIShellIconOverlayIdentifier
  • PyIShellIconOverlayManager
  • PyIShellItem
  • PyIShellItem2
  • PyIShellItemArray
  • PyIShellItemResources
  • PyIShellLibrary
  • PyIShellLink
  • PyIShellLinkDataList
  • PyIShellView
  • PyISpecifyPropertyPages
  • PyIStorage
  • PyIStream
  • PyITask
  • PyITaskScheduler
  • PyITaskTrigger
  • PyITaskbarList
  • PyITransferAdviseSink
  • PyITransferDestination
  • PyITransferMediumItem
  • PyITransferSource
  • PyITypeComp
  • PyITypeInfo
  • PyITypeLib
  • PyIUniformResourceLocator
  • PyIUnknown
  • PyIViewObject
  • PyIViewObject2
  • PyMAPINAMEIDArray
  • PyOLEMENUGROUPWIDTHS
  • PyPROPERTYKEY
  • PyPROPVARIANT
  • PySAndRestriction
  • PySBinaryArray
  • PySBitMaskRestriction
  • PySContentRestriction
  • PySExistRestriction
  • PySHELL_ITEM_RESOURCE
  • PySNotRestriction
  • PySOrRestriction
  • PySPropTagArray
  • PySPropValue
  • PySPropValueArray
  • PySPropertyRestriction
  • PySRestriction
  • PySRow
  • PySRowSet
  • PySSortOrderItem
  • PySSortOrderSet
  • PySTGMEDIUM
  • PyTASK_TRIGGER
  • RTF_WCSINFO
  • SHFILEINFO
  • SHFILEOPSTRUCT
  • SI_ACCESS
  • SI_INHERIT_TYPE
  • SI_OBJECT_INFO
  • STATSTG
  • TLIBATTR
  • TYPEATTR
  • TYPEDESC
  • VARDESC


COMPONENT

COMPONENT Object

A dictionary containing data to fill a COMPPOS struct

Properties

int ID
Id of component, ignored when adding a new component

int ComponentType
One of shellcon.COMP_TYPE_* values

bool Checked
True indicates item is currently displayed

bool fDirty
Indicates if unsaved changes exist

bool NoScroll
True disables scrolling

dict Pos
COMPPOS dictionary determining window size and placement

PyUNICODE FriendlyName
String of at most MAX_PATH-1 characters, truncated if longer

PyUNICODE Source
String of at most INTERNET_MAX_URL_LENGTH-1 characters

PyUNICODE SubscribedURL
String of at most INTERNET_MAX_URL_LENGTH-1 characters

int CurItemState
One of shellcon.IS_* flags

dict Original
COMPSTATEINFO dictionary

dict Restored
COMPSTATEINFO dictionary

int Size
Size of structure, ignored on input


COMPONENTSOPT

COMPONENTSOPT Object

A dictionary containing data to fill a COMPONENTSOPT struct

Properties

bool EnableComponents
True if components are enabled

bool ActiveDesktop
True if Active Desktop is enabled

int Size
Size of structure, ignored on input


COMPPOS

COMPPOS Object

A dictionary containing data to fill a COMPPOS struct

Properties

int Left

int Top

int Width

int Height

int Index

int CanResize

int CanResizeX

int CanResizeY

int PreferredLeftPercent

int PreferredTopPercent

int Size
Size of structure, ignored on input


COMPSTATEINFO

COMPSTATEINFO Object

A dictionary containing data to fill a COMPSTATEINFO struct

Properties

int Left
Specified as screen coordinates

int Top
Specified as screen coordinates

int Width
Measured in pixels

int Height
Measured in pixels

int dwItemState
One of IS_NORMAL, IS_FULLSCREEN IS_SPLIT

int Size
Size of structure, ignored on input


DEFCONTENTMENU

DEFCONTENTMENU Object

A tuple representing a DEFCONTEXTMENU structure.

Parameters

hwnd : PyHANDLE

callback : PyIContextMenuCB

May be None bNoneOK */))

pidlFolder : PIDL

May be None

sf : PyIShellFolder

The Shell data source object that is the parent of the child items specified in children. If parent is specified, this parameter can be NULL. bNoneOK */))

children : [PIDL , ...]

unkAssocInfo : PyIUnknown

May be None


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.


EXP_DARWIN_LINK

EXP_DARWIN_LINK Object

Dictionary containing information for a EXP_DARWIN_LINK struct

Properties

int Signature
The type of data block, one of shellcon.*_SIG values

str DarwinID
The Windows Installer id for the link

PyUNICODE wDarwinID
The installer id as Unicode

int Size
Size of structure, ignored on input


EXP_SPECIAL_FOLDER

EXP_SPECIAL_FOLDER Object

Dictionary containing information for a EXP_SPECIAL_FOLDER struct

Properties

int Signature
The type of data block, one of shellcon.*_SIG values

int idSpecialFolder
The special folder id of the target (shellcon.CSIDL_*)

int Offset
Offset into the link's PIDL

int Size
Size of structure, ignored on input


EXP_SZ_LINK

EXP_SZ_LINK Object

Dictionary containing information for an EXP_SZ_LINK or EXP_SZ_ICON struct

Properties

int Signature
The type of data block, one of shellcon.*_SIG values

str Target
The link's target or icon location

PyUNICODE wTarget
The target in Unicode form

int Size
Size of structure, ignored on input


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.


NT_CONSOLE_PROPS

NT_CONSOLE_PROPS Object

Dictionary containing information for a NT_CONSOLE_PROPS struct

Properties

int Signature
The type of data block, one of shellcon.*_SIG values

int FillAttribute
Character attributes for fill operations

int PopupFillAttribute
Fill attributes for popups

(int,int) ScreenBufferSize
Size of console screen buffer, in character cells

(int,int) WindowSize
Size of console window in character cells

(int,int) WindowOrigin
Window position, in screen coordinates

int nFont
Number of font to be displayed. See win32console::GetNumberOfConsoleFonts

int InputBufferSize
Size of console's input buffer

(int,int) FontSize
Size of font

int FontFamily
Font family

int FontWeight
Controls thickness of displayed font

str FaceName
Name of font face, 31 characters at most

int CursorSize
Relative size of cursor, expressed as percent of character size

bool FullScreen
Causes console to run in full screen mode

bool QuickEdit

bool InsertMode

bool AutoPosition
Lets system determine window placement

int HistoryBufferSize
Size of command line history buffer

int NumberOfHistoryBuffers

bool HistoryNoDup

tuple ColorTable
Tuple of 16 ints containing console's color attributes

int Size
Size of structure, ignored on input


NT_FE_CONSOLE_PROPS

NT_FE_CONSOLE_PROPS Object

Dictionary containing information for a NT_FE_CONSOLE_PROPS struct

Properties

int Signature
The type of data block, one of shellcon.*_SIG values

int CodePage
The codepage to be used for console text

int Size
Size of structure, ignored on input


PROPSPEC

PROPSPEC Object

Identifies a property. Can be either an int property id, or a str/unicode property name.


PyADSVALUE

PyADSVALUE Object

A tuple:

Items

[0] object : value

The value as a Python object.

[1] int : type

The AD type of the value.


PyADS_ATTR_INFO

PyADS_ATTR_INFO Object

Represents a ADS_ATTR_INFO structure.

Properties

unicode AttrName
The name

integer ControlCode

integer ADsType

[PyADSVALUE, ...] Values


PyADS_OBJECT_INFO

PyADS_OBJECT_INFO Object

Represents a ADS_OBJECT_INFO structure.

Properties

unicode RDN
The name

unicode ObjectDN

unicode ParentDN

unicode ClassName


PyADS_SEARCHPREF_INFO

PyADS_SEARCHPREF_INFO Object

A tuple of:

Items

[0] int : attr_id

[1] PyADSVALUE : value


PyBIND_OPTS

PyBIND_OPTS Object

Dictionary representation of a BIND_OPTS struct May eventually be extended to include BIND_OPTS2 members

Properties

int Flags
Value from BIND_FLAGS enum: BIND_MAYBOTHERUSER, BIND_JUSTTESTEXISTENCE or 0

int Mode
Combination of storagecon.STGM_* values

int TickCountDeadline
Operation timeout in milliseconds

int cbStruct
Size of struct, ignored on input


PyCMINVOKECOMMANDINFO

PyCMINVOKECOMMANDINFO Object

A tuple of parameters to be converted to a CMINVOKECOMMANDINFO struct

Items

[0] int : Mask

Combination of shellcon.CMIC_MASK_* constants, can be 0

[1] PyHANDLE : hwnd

Window that owns the shortcut menu

[2] int or str : Verb

Action to be carried out, specified as a string command or integer menu item id

[3] str : Parameters

Extra parameters to be passed to the command line for the action, can be None

[4] str : Directory

Working directory, can be None

[5] int : Show

Combination of win32con.SW_* constants for any windows that may be created

[6] int : HotKey

Hot key for any application that may be started

[7] PyHANDLE : Icon

Handle to icon to use for application, can be None


PyDSBCAPS

PyDSBCAPS Object

A Python object, representing a DSBCAPS structure

Properties

integer dwFlags
Flags that specify buffer-object capabilities.

Flag | Description
DSBCAPS_PRIMARYBUFFER | Indicates that the buffer is a primary sound buffer. If this value is not specified, a secondary sound buffer will be created.
DSBCAPS_STATIC | Indicates that the buffer will be used for static sound data. Typically, these buffers are loaded once and played many times. These buffers are candidates for hardware memory.
DSBCAPS_LOCHARDWARE | The buffer is in hardware memory and uses hardware mixing.
DSBCAPS_LOCSOFTWARE | The buffer is in software memory and uses software mixing.
DSBCAPS_CTRL3D | The buffer is either a primary buffer or a secondary buffer that uses 3-D control. To create a primary buffer, the dwFlags member of the DSBUFFERDESC structure should include the DSBCAPS_PRIMARYBUFFER flag.
DSBCAPS_CTRLFREQUENCY | The buffer must have frequency control capability.
DSBCAPS_CTRLPAN | The buffer must have pan control capability.
DSBCAPS_CTRLVOLUME | The buffer must have volume control capability.
DSBCAPS_CTRLPOSITIONNOTIFY | The buffer must have control position notify capability.
DSBCAPS_STICKYFOCUS | Changes the focus behavior of the sound buffer. This flag can be specified in an IDirectSound::CreateSoundBuffer call. With this flag set, an application using DirectSound can continue to play its sticky focus buffers if the user switches to another application not using DirectSound. In this situation, the application's normal buffers are muted, but the sticky focus buffers are still audible. This is useful for nongame applications, such as movie playback (DirectShow™), when the user wants to hear the soundtrack while typing in Microsoft Word or Microsoft® Excel, for example. However, if the user switches to another DirectSound application, all sound buffers, both normal and sticky focus, in the previous application are muted.
DSBCAPS_GLOBALFOCUS | The buffer is a global sound buffer. With this flag set, an application using DirectSound can continue to play its buffers if the user switches focus to another application, even if the new application uses DirectSound. The one exception is if you switch focus to a DirectSound application that uses the DSSCL_EXCLUSIVE or DSSCL_WRITEPRIMARY flag for its cooperative level. In this case, the global sounds from other applications will not be audible.
DSBCAPS_GETCURRENTPOSITION2 | Indicates that IDirectSoundBuffer::GetCurrentPosition should use the new behavior of the play cursor. In DirectSound in DirectX 1, the play cursor was significantly ahead of the actual playing sound on emulated sound cards; it was directly behind the write cursor. Now, if the DSBCAPS_GETCURRENTPOSITION2 flag is specified, the application can get a more accurate play position. If this flag is not specified, the old behavior is preserved for compatibility. Note that this flag affects only emulated sound cards; if a DirectSound driver is present, the play cursor is accurate for DirectSound in all versions of DirectX.
DSBCAPS_MUTE3DATMAXDISTANCE | The sound is reduced to silence at the maximum distance. The buffer will stop playing when the maximum distance is exceeded, so that processor time is not wasted.

integer nChannels
Size of the buffer, in bytes.

integer dwUnlockTransferRate
Specifies the rate, in kilobytes per second, at which data is transferred to the buffer memory when IDirectSoundBuffer::Unlock is called. High-performance applications can use this value to determine the time required for IDirectSoundBuffer::Unlock to execute. For software buffers located in system memory, the rate will be very high because no processing is required. For hardware buffers, the rate might be slower because the buffer might have to be downloaded to the sound card, which might have a limited transfer rate.

integer nAvgBytesPerSec
Specifies whether the returned handle is inherited when a new process is created. If this member is TRUE, the new process inherits the handle. Sentinel


PyDSBUFFERDESC

PyDSBUFFERDESC Object

A Python object, representing a DSBUFFERDESC structure

Properties

integer dwFlags
Identifies the capabilities to include when creating a new DirectSoundBuffer object. Specify one or more of the following:

Flag | Description
DSBCAPS_PRIMARYBUFFER | Indicates that the buffer is a primary sound buffer. If this value is not specified, a secondary sound buffer will be created.
DSBCAPS_STATIC | Indicates that the buffer will be used for static sound data. Typically, these buffers are loaded once and played many times. These buffers are candidates for hardware memory.
DSBCAPS_LOCHARDWARE | The buffer is in hardware memory and uses hardware mixing.
DSBCAPS_LOCSOFTWARE | The buffer is in software memory and uses software mixing.
DSBCAPS_CTRL3D | The buffer is either a primary buffer or a secondary buffer that uses 3-D control. To create a primary buffer, the dwFlags member of the DSBUFFERDESC structure should include the DSBCAPS_PRIMARYBUFFER flag.
DSBCAPS_CTRLFREQUENCY | The buffer must have frequency control capability.
DSBCAPS_CTRLPAN | The buffer must have pan control capability.
DSBCAPS_CTRLVOLUME | The buffer must have volume control capability.
DSBCAPS_CTRLPOSITIONNOTIFY | The buffer must have control position notify capability.
DSBCAPS_STICKYFOCUS | Changes the focus behavior of the sound buffer. This flag can be specified in an IDirectSound::CreateSoundBuffer call. With this flag set, an application using DirectSound can continue to play its sticky focus buffers if the user switches to another application not using DirectSound. In this situation, the application's normal buffers are muted, but the sticky focus buffers are still audible. This is useful for nongame applications, such as movie playback (DirectShow™), when the user wants to hear the soundtrack while typing in Microsoft Word or Microsoft® Excel, for example. However, if the user switches to another DirectSound application, all sound buffers, both normal and sticky focus, in the previous application are muted.
DSBCAPS_GLOBALFOCUS | The buffer is a global sound buffer. With this flag set, an application using DirectSound can continue to play its buffers if the user switches focus to another application, even if the new application uses DirectSound. The one exception is if you switch focus to a DirectSound application that uses the DSSCL_EXCLUSIVE or DSSCL_WRITEPRIMARY flag for its cooperative level. In this case, the global sounds from other applications will not be audible.
DSBCAPS_GETCURRENTPOSITION2 | Indicates that IDirectSoundBuffer::GetCurrentPosition should use the new behavior of the play cursor. In DirectSound in DirectX 1, the play cursor was significantly ahead of the actual playing sound on emulated sound cards; it was directly behind the write cursor. Now, if the DSBCAPS_GETCURRENTPOSITION2 flag is specified, the application can get a more accurate play position. If this flag is not specified, the old behavior is preserved for compatibility. Note that this flag affects only emulated sound cards; if a DirectSound driver is present, the play cursor is accurate for DirectSound in all versions of DirectX.
DSBCAPS_MUTE3DATMAXDISTANCE | The sound is reduced to silence at the maximum distance. The buffer will stop playing when the maximum distance is exceeded, so that processor time is not wasted.

integer dwBufferBytes
Size of the new buffer, in bytes. This value must be 0 when creating primary buffers. For secondary buffers, the minimum and maximum sizes allowed are specified by DSBSIZE_MIN and DSBSIZE_MAX.

WAVEFORMATEX lpwfxFormat
Structure specifying the waveform format for the buffer. This value must be None for primary buffers. The application can use IDirectSoundBuffer::SetFormat to set the format of the primary buffer. Sentinel


PyDSCAPS

PyDSCAPS Object

A Python object, representing a DSCAPS structure

Properties

integer dwFlags
Specifies device capabilities. Can be one or more of the following:

Flag | Description
DSCAPS_PRIMARYMONO | The device supports monophonic primary buffers.
DSCAPS_PRIMARYSTEREO | The device supports stereo primary buffers.
DSCAPS_PRIMARY8BIT | The device supports hardware-mixed secondary buffers with 8-bit samples.
DSCAPS_PRIMARY16BIT | The device supports primary sound buffers with 16-bit samples.
DSCAPS_CONTINUOUSRATE | The device supports all sample rates between the dwMinSecondarySampleRate and dwMaxSecondarySampleRate member values. Typically, this means that the actual output rate will be within +/- 10 hertz (Hz) of the requested frequency.
DSCAPS_EMULDRIVER | The device does not have a DirectSound driver installed, so it is being emulated through the waveform-audio functions. Performance degradation should be expected.
DSCAPS_CERTIFIED | This driver has been tested and certified by Microsoft.
DSCAPS_SECONDARYMONO | The device supports hardware-mixed monophonic secondary buffers.
DSCAPS_SECONDARYSTEREO | The device supports hardware-mixed stereo secondary buffers.
DSCAPS_SECONDARY8BIT | The device supports hardware-mixed secondary buffers with 8-bit samples.
DSCAPS_SECONDARY16BIT | The device supports hardware-mixed secondary sound buffers with 16-bit samples.

integer dwMinSecondarySampleRate
Minimum sample rate supported by this device's hardware secondary sound buffers.

integer dwMaxSecondarySampleRate
Maximum sample rate supported by this device's hardware secondary sound buffers.

integer dwPrimaryBuffers
Number of primary buffers supported. This value will always be 1.

integer dwMaxHwMixingAllBuffers
Specifies the total number of buffers that can be mixed in hardware. This member can be less than the sum of dwMaxHwMixingStaticBuffers and dwMaxHwMixingStreamingBuffers. Resource tradeoffs frequently occur.

integer dwMaxHwMixingStaticBuffers
Specifies the maximum number of static sound buffers.

integer dwMaxHwMixingStreamingBuffers
Specifies the maximum number of streaming sound buffers.

integer dwFreeHwMixingAllBuffers
Description of the free hardware mixing capabilities of the device. An application can use this value to determine whether hardware resources are available for allocation to a secondary sound buffer. Also, by comparing these values to the members that specify maximum mixing capabilities, the resources that are already allocated can be determined.

integer dwFreeHwMixingStaticBuffers
Description of the free hardware mixing capabilities of the device. An application can use this value to determine whether hardware resources are available for allocation to a secondary sound buffer. Also, by comparing these values to the members that specify maximum mixing capabilities, the resources that are already allocated can be determined.

integer dwFreeHwMixingStreamingBuffers
Description of the free hardware mixing capabilities of the device. An application can use this value to determine whether hardware resources are available for allocation to a secondary sound buffer. Also, by comparing these values to the members that specify maximum mixing capabilities, the resources that are already allocated can be determined.

integer dwMaxHw3DAllBuffers
Description of the hardware 3-D positional capabilities of the device.

integer dwMaxHw3DStaticBuffers
Description of the hardware 3-D positional capabilities of the device.

integer dwMaxHw3DStreamingBuffers
Description of the hardware 3-D positional capabilities of the device.

integer dwFreeHw3DAllBuffers
Description of the free, or unallocated, hardware 3-D positional capabilities of the device.

integer dwFreeHw3DStaticBuffers
Description of the free, or unallocated, hardware 3-D positional capabilities of the device.

integer dwFreeHw3DStreamingBuffers
Description of the free, or unallocated, hardware 3-D positional capabilities of the device.

integer dwTotalHwMemBytes
Size, in bytes, of the amount of memory on the sound card that stores static sound buffers.

integer dwFreeHwMemBytes
Size, in bytes, of the free memory on the sound card.

integer dwMaxContigFreeHwMemBytes
Size, in bytes, of the largest contiguous block of free memory on the sound card.

integer dwUnlockTransferRateHwBuffers
Description of the rate, in kilobytes per second, at which data can be transferred to hardware static sound buffers. This and the number of bytes transferred determines the duration of a call to the IDirectSoundBuffer::Update method.

integer dwPlayCpuOverheadSwBuffers
Description of the processing overhead, as a percentage of the central processing unit, needed to mix software buffers (those located in main system memory). This varies according to the bus type, the processor type, and the clock speed. The unlock transfer rate for software buffers is 0 because the data need not be transferred anywhere. Similarly, the play processing overhead for hardware buffers is 0 because the mixing is done by the sound device.


PyDSCBCAPS

PyDSCBCAPS Object

A Python object, representing a DSCBCAPS structure

Properties

integer dwFlags
Specifies device capabilities. Can be 0 or DSCBCAPS_EMULDRIVER (indicates that no DirectSound Device is available and standard wave audio functions are being used).

integer dwBufferBytes
The size, in bytes, of the capture buffer.


PyDSCBUFFERDESC

PyDSCBUFFERDESC Object

A Python object, representing a DSCBUFFERDESC structure

Properties

integer dwFlags
Identifies the capabilities to include when creating a new DirectSoundBuffer object. Can be zero or the following flag:

Flag | Description
DSCBCAPS_WAVEMAPPED | The Win32 wave mapper will be used for formats not supported by the device.

integer dwBufferBytes
Size of the new buffer, in bytes. This value must be 0 when creating primary buffers. For secondary buffers, the minimum and maximum sizes allowed are specified by DSBSIZE_MIN and DSBSIZE_MAX.

WAVEFORMATEX lpwfxFormat
Structure specifying the waveform format for the buffer. This value must be None for primary buffers. The application can use IDirectSoundBuffer::SetFormat to set the format of the primary buffer. Sentinel


PyDSCCAPS

PyDSCCAPS Object

A Python object, representing a DSCCAPS structure

Properties

integer dwFlags
Specifies device capabilities. Can be zero or the following flag:

Flag | Description
DSCCAPS_EMULDRIVER | Indicates that no DirectSound Device is available and standard wave audio functions are being used.

integer dwFormats
Bitset of supported WAVE_FORMAT formats.

integer dwChannels
Number of channels supported by the device.


PyDSOP_FILTER_FLAGS

PyDSOP_FILTER_FLAGS Object

An object representing an ActiveDirectory DSOP_FILTER_FLAGS structure
These objects can only be accessed via a PyDSOP_SCOPE_INIT_INFO object.

Properties

PyDSOP_UPLEVEL_FILTER_FLAGS uplevel

int downlevel


PyDSOP_SCOPE_INIT_INFO

PyDSOP_SCOPE_INIT_INFO Object

An object representing an ActiveDirectory DSOP_SCOPE_INIT_INFO structure.
These objects can only be accessed by indexing a PyDSOP_SCOPE_INIT_INFOs object.

Properties

int type

int scope

int hr

PyUnicode dcName

PyDSOP_FILTER_FLAGS filterFlags


PyDSOP_SCOPE_INIT_INFOs

PyDSOP_SCOPE_INIT_INFOs Object

An object representing an array of PyDSOP_SCOPE_INIT_INFO objects

Comments

You must pass the number of items in the array to the constructor. Once set, this can not be changed. You can index the index (eg, ob[2]). The object has no other (interesting) methods or attributes.
These objects are created via adsi::DSOP_SCOPE_INIT_INFOs(size)


PyDSOP_UPLEVEL_FILTER_FLAGS

PyDSOP_UPLEVEL_FILTER_FLAGS Object

An object representing an ActiveDirectory DSOP_UPLEVEL_FILTER_FLAGS structure.
These objects can only be accessed via a PyDSOP_FILTER_FLAGS object.

Properties

int bothModes

int mixedModeOnly

int nativeModeOnly


PyFORMATETC

PyFORMATETC Object

Tuple representing a FORMATETC struct describing an OLE data format

Items

[0] int : Format

CLIPFORMAT value (CF_*) identifying the type of data

[1] None : td

DVTARGETDEVICE (currently not supported, use only None)

[2] int : Aspect

One of pythoncom.DVASPECT_* values specifying level of detail

[3] int : index

Usually -1, used only when data spans multiple pages

[4] int : tymed

One of pythoncom.TYMED_* values indicating how the data is stored


PyGFileOperationProgressSink

PyGFileOperationProgressSink Object

Implement-only gateway for IFileOperationProgressSink, used to receive events from a PyIFileOperation object.
To abort the operation, an implementation of any method can raise a com_error with an appropriate HRESULT.

Methods

StartOperations
Called as operation begins, before any modifications are done

FinishOperations
Called after all actions have been performed

PreRenameItem
Called before each file rename

PostRenameItem
Called after each file rename

PreMoveItem
Called before each move operation

PostMoveItem
Called after each move operation

PreCopyItem
Called before each copy operation

PostCopyItem
Called after each copy operation

PreDeleteItem
Called before each delete operation

PostDeleteItem
Called after each delete operation

PreNewItem
Called before each new file is created

PostNewItem
Called after each new file is created

UpdateProgress
Gives an estimate of total work completed

ResetTimer
Not implemented, according to MSDN

PauseTimer
Not implemented, according to MSDN

ResumeTimer
Not implemented, according to MSDN


PyGFileOperationProgressSink.FinishOperations

FinishOperations(Result)

Called after all actions have been performed

Parameters

Result : int

HRESULT of last operation performed


PyGFileOperationProgressSink.PauseTimer

PauseTimer()

Not implemented, according to MSDN


PyGFileOperationProgressSink.PostCopyItem

PostCopyItem(Flags, Item, DestinationFolder, NewName, hrCopy, NewlyCreated)

Called after each copy operation

Parameters

Flags : int

Flags specifying copy behaviour, combination of shellcon.TSF_* flags

Item : PyIShellItem

The original item

DestinationFolder : PyIShellItem

Folder into which it was copied

NewName : str

Name of item after copy, may be mangled in case of name conflict

hrCopy : int

HRESULT of the copy operation

NewlyCreated : PyIShellItem

Shell interface of the copy


PyGFileOperationProgressSink.PostDeleteItem

PostDeleteItem(Flags, Item, hrDelete, NewlyCreated)

Called after each delete operation

Parameters

Flags : int

Flags specifying delete behaviour, combination of shellcon.TSF_* flags

Item : PyIShellItem

Item that was deleted

hrDelete : int

HRESULT of the delete operation

NewlyCreated : PyIShellItem

Item in the recycle bin, or None if deleted without recycling


PyGFileOperationProgressSink.PostMoveItem

PostMoveItem(Flags, Item, DestinationFolder, NewName, hrMove, NewlyCreated)

Called after each move operation

Parameters

Flags : int

Flags specifying move behaviour, combination of shellcon.TSF_* flags

Item : PyIShellItem

Interface of the item before it was moved

DestinationFolder : PyIShellItem

The folder into which it was moved

NewName : str

Name of item in its new location, may be mangled in case of conflict

hrMove : int

HRESULT of the move operation

NewlyCreated : PyIShellItem

Shell interface of the item in its new location


PyGFileOperationProgressSink.PostNewItem

PostNewItem(Flags, DestinationFolder, NewName, TemplateName, FileAttributes, hrNew, NewItem)

Called after each new file is created

Parameters

Flags : int

Flags specifying creation behaviour, combination of shellcon.TSF_* flags

DestinationFolder : PyIShellItem

Folder in which item was created

NewName : str

Name of created item, may be mangled if file name conflicts occurred

TemplateName : str

Template file used to initialize new item

FileAttributes : int

File attributes of new item

hrNew : int

HRESULT of the create operation

NewItem : PyIShellItem

Shell interface of created item


PyGFileOperationProgressSink.PostRenameItem

PostRenameItem(Flags, Item, NewName, hrRename, NewlyCreated)

Called after each file rename

Parameters

Flags : int

Flags specifying rename behaviour, combination of shellcon.TSF_* flags

Item : PyIShellItem

Shell interface of item before rename

NewName : str

The new name of the item, may be mangled to resolve filename conflicts

hrRename : int

HRESULT of the rename operation

NewlyCreated : PyIShellItem

Shell interface of the item after rename


PyGFileOperationProgressSink.PreCopyItem

PreCopyItem(Flags, Item, DestinationFolder, NewName)

Called before each copy operation

Parameters

Flags : int

Flags specifying copy behaviour, combination of shellcon.TSF_* flags

Item : PyIShellItem

The item to be copied

DestinationFolder : PyIShellItem

Folder into which it will be copied

NewName : str

Name to be given to the copy, will be None if keeping original name


PyGFileOperationProgressSink.PreDeleteItem

PreDeleteItem(Flags, Item)

Called before each delete operation

Parameters

Flags : int

Flags specifying delete behaviour, combination of shellcon.TSF_* flags

Item : PyIShellItem

Item to be deleted


PyGFileOperationProgressSink.PreMoveItem

PreMoveItem(Flags, Item, DestinationFolder, NewName)

Called before each move operation

Parameters

Flags : int

Flags specifying move behaviour, combination of shellcon.TSF_* flags

Item : PyIShellItem

The item to be moved

DestinationFolder : PyIShellItem

The folder into which it will be moved

NewName : str

Name of moved item, may be None if not to be changed


PyGFileOperationProgressSink.PreNewItem

PreNewItem(Flags, DestinationFolder, NewName)

Called before each new file is created

Parameters

Flags : int

Flags specifying creation behaviour, combination of shellcon.TSF_* flags

DestinationFolder : PyIShellItem

Folder where item will be created

NewName : str

Name of item to be created


PyGFileOperationProgressSink.PreRenameItem

PreRenameItem(Flags, Item, NewName)

Called before each file rename

Parameters

Flags : int

Flags specifying copy behaviour, combination of shellcon.TSF_* flags

Item : PyIShellItem

Shell interface of the copied item

NewName : str

New display name of the item


PyGFileOperationProgressSink.ResetTimer

ResetTimer()

Not implemented, according to MSDN


PyGFileOperationProgressSink.ResumeTimer

ResumeTimer()

Not implemented, according to MSDN


PyGFileOperationProgressSink.StartOperations

StartOperations()

Called as operation begins, before any modifications are done


PyGFileOperationProgressSink.UpdateProgress

UpdateProgress(WorkTotal, WorkSoFar)

Gives an estimate of total work completed

Parameters

WorkTotal : int

Undimensioned number representing total amount of work

WorkSoFar : int

Undimensioned number representing amount already completed


PyGSecurityInformation

PyGSecurityInformation Object

Gateway wrapper for the implement-only ISecurityInformation interface

Methods

GetObjectInformation
Returns information identifying the object

GetSecurity
Requests the object's current security descriptor

SetSecurity
Applies the modified security information to the object

GetAccessRights
Requests the permission flags that will be available for user to set

MapGeneric
Translates generic permission flags into specific flags

GetInheritTypes
Retrieves inheritance flags that will be shown in dialog for containers

PropertySheetPageCallback
Invoked each time a property sheet page is created or destroyed


PyGSecurityInformation.GetAccessRights

((SI_ACCESS,...) int) = GetAccessRights(ObjectType, Flags )

Retrieves permission that can be set

Parameters

ObjectType : PyIID

GUID representing type of object, may be None

Flags : int

Indicates which page is requesting the access rights (SI_ADVANCED, SI_EDIT_AUDITS, SI_EDIT_PROPERTIES)

Return Value

This method should return a 2-tuple containing a sequence of SI_ACCESS tuples, and a zero-based index indicating which of them is the default


PyGSecurityInformation.GetInheritTypes

(SI_INHERIT_TYPE,...) = GetInheritTypes()

Requests types of inheritance that your implementation supports

Return Value

Returns a sequence of SI_INHERIT_TYPE tuples


PyGSecurityInformation.GetObjectInformation

SI_OBJECT_INFO = GetObjectInformation()

Returns information identifying the object whose security is to be editted, and which pages are to appear in the property sheet

Comments

Due to peculiarities of the underlying system calls, this method will only be called once, and subsequent calls will return the information obtained on the first call. As a consequence, a new instance of the interface will need to be created for each object whose security is to be displayed.

Return Value

Your implementation of this method should return a SI_OBJECT_INFO tuple


PyGSecurityInformation.GetSecurity

PySECURITY_DESCRIPTOR = GetSecurity(RequestedInformation, Default )

Retrieves the object's current security settings

Parameters

RequestedInformation : int

Combination of SECURITY_INFORMATION flags indicating which components of the object's security descriptor you should return

Default : bool

If true, return a default security descriptor rather than current security. (invoked when 'Reset' button is clicked)


PyGSecurityInformation.MapGeneric

int = MapGeneric(ObjectType, AceFlags , Mask )

Translates generic access rights to specific equivalents

Parameters

ObjectType : PyIID

Type of object that permissions apply to, None or GUID_NULL indicates object itself

AceFlags : int

Flags from the ACE that contains the permissions

Mask : int

Bitmask containing access rights

Comments

See win32security::MapGenericMask

Return Value

This method should return the input bitmask will all generic rights mapped to specific rights


PyGSecurityInformation.PropertySheetPageCallback

PropertySheetPageCallback(hwnd, Msg, Page)

Called by each page as it is created and destroyed

Parameters

hwnd : int

Handle to the window for the page

Msg : int

Flag indicating type of event, one of PSPCB_CREATE,PSPCB_RELEASE,PSPCB_SI_INITDIALOG

Page : int

SI_PAGE_TYPE value indicating which page is making the call (ntsecuritycon.SI_PAGE_*)

Return Value

Any returned value will be ignored


PyGSecurityInformation.SetSecurity

SetSecurity(SecurityInformation, SecurityDescriptor)

Applies the modified security to the object

Parameters

SecurityInformation : int

SECURITY_INFORMATION flags specifying which types of security information are to be applied

SecurityDescriptor : PySECURITY_DESCRIPTOR

The security information to be applied to the object

Return Value

Any returned value is ignored


PyIADesktopP2

PyIADesktopP2 Object

An interface to the ActiveDesktop

Methods

UpdateAllDesktopSubscriptions
Updates webpage subscriptions on the desktop


PyIADesktopP2.UpdateAllDesktopSubscriptions

UpdateAllDesktopSubscriptions()

Updates webpage subscriptions on the desktop


PyIADs

PyIADs Object

An object representing the IADs interface. In most cases you can achieve the same result via IDispatch - however, this interface allows you get get and set properties without the IDispatch overhead.

Methods

GetInfo
Description of GetInfo

SetInfo
Description of SetInfo

Get
Description of Get

Put
Description of Put

get
Synonym for Get

put
Synonym for Put

Properties

PyUnicode ADsPath

PyUnicode AdsPath
Synonym for ADsPath

PyUnicode Class

PyUnicode GUID
Like the IADs method, this returns a string rather than a GUID object.

PyUnicode Name

PyUnicode Parent

PyUnicode Schema


PyIADs.Get

object = Get(prop)

Description of Get.

Parameters

prop : PyUnicode

The name of the property to fetch

Return Value

The result is a Python object converted from a COM variant. It may be an array, or any types supported by COM variant.


PyIADs.GetInfo

GetInfo()

Description of GetInfo.


PyIADs.Put

Put(property, val)

Description of Put.

Parameters

property : PyUnicode

The property name to set

val : object

The value to set.


PyIADs.SetInfo

SetInfo()

Description of SetInfo.


PyIADsContainer

PyIADsContainer Object

A COM interface to ADSI's IADsContainer interface.
Derived from PyIUnknown

Methods

GetObject

get_Count

get_Filter

put_Filter

get_Hints

put_Hints


PyIADsContainer.get_Count

int = get_Count()


PyIADsContainer.get_Filter

object = get_Filter()


PyIADsContainer.get_Hints

object = get_Hints()


PyIADsContainer.GetObject

PyIDispatch = GetObject(class, relativeName )

Parameters

class : string

Specifies the name of the object class as known in the underlying directory and identical to the one retrieved through the get_Class property method. If the class name is None, the provider returns the first item found in the container.

relativeName : string

Specifies the name of the object as known in the underlying directory and identical to the one retrieved through the get_Name property method.


PyIADsContainer.put_Filter

put_Filter(val)

Parameters

val : object


PyIADsContainer.put_Hints

put_Hints(val)

Parameters

val : object


PyIADsUser

PyIADsUser Object

A COM interface to ADSI's IADsUser interface.
Derived from PyIDispatch

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

SetPassword

ChangePassword


PyIADsUser.ChangePassword

ChangePassword(oldval, newval)

Parameters

oldval : unicode

newval : unicode


PyIADsUser.get_AccountDisabled

int = get_AccountDisabled()


PyIADsUser.get_AccountExpirationDate

int = get_AccountExpirationDate()


PyIADsUser.get_BadLoginAddress

unicode = get_BadLoginAddress()


PyIADsUser.get_BadLoginCount

int = get_BadLoginCount()


PyIADsUser.get_Department

unicode = get_Department()


PyIADsUser.get_Description

unicode = get_Description()


PyIADsUser.get_Division

unicode = get_Division()


PyIADsUser.get_EmailAddress

unicode = get_EmailAddress()


PyIADsUser.get_EmployeeID

unicode = get_EmployeeID()


PyIADsUser.get_FirstName

unicode = get_FirstName()


PyIADsUser.get_FullName

unicode = get_FullName()


PyIADsUser.get_HomeDirectory

unicode = get_HomeDirectory()


PyIADsUser.get_HomePage

unicode = get_HomePage()


PyIADsUser.get_LoginScript

unicode = get_LoginScript()


PyIADsUser.put_AccountDisabled

put_AccountDisabled(val)

Parameters

val : int


PyIADsUser.put_AccountExpirationDate

put_AccountExpirationDate(val)

Parameters

val : PyTime


PyIADsUser.put_Department

put_Department(val)

Parameters

val : unicode


PyIADsUser.put_Description

put_Description(val)

Parameters

val : unicode


PyIADsUser.put_Division

put_Division(val)

Parameters

val : unicode


PyIADsUser.put_EmailAddress

put_EmailAddress(val)

Parameters

val : unicode


PyIADsUser.put_EmployeeID

put_EmployeeID(val)

Parameters

val : unicode


PyIADsUser.put_FirstName

put_FirstName(val)

Parameters

val : unicode


PyIADsUser.put_FullName

put_FullName(val)

Parameters

val : unicode


PyIADsUser.put_HomeDirectory

put_HomeDirectory(val)

Parameters

val : unicode


PyIADsUser.put_HomePage

put_HomePage(val)

Parameters

val : unicode


PyIADsUser.put_LoginScript

put_LoginScript(val)

Parameters

val : unicode


PyIADsUser.SetPassword

SetPassword(val)

Parameters

val : unicode


PyIActiveDesktop

PyIActiveDesktop Object

An interface to the ActiveDesktop

Methods

ApplyChanges
Applies changes to ActiveDesktop settings and persists them to the registry.

GetWallpaper
Returns the current wallpaper

SetWallpaper
Sets the desktop wallpaper

GetWallpaperOptions
Returns wallpaper style

SetWallpaperOptions
Sets wallpaper style

GetPattern
Returns the wallpaper pattern

SetPattern
Sets the wallpaper pattern

GetDesktopItemOptions
Returns options for Active Desktop.

SetDesktopItemOptions
Sets Active Desktop options

AddDesktopItem
Creates a new item to display on the desktop

AddDesktopItemWithUI
Adds a desktop item, allowing user interaction

ModifyDesktopItem
Changes parameters for a desktop item

RemoveDesktopItem
Removes an item from the Active Desktop

GetDesktopItemCount
Returns number of defined desktop items.

GetDesktopItem
Returns desktop item parameters by index

GetDesktopItemByID
Returns desktop item parameters by Id

GenerateDesktopItemHtml
Creates an HTML page for the desktop item

AddUrl
Adds a web page to desktop, allowing user interaction

GetDesktopItemBySource
Returns desktop item parameters by URL


PyIActiveDesktop.AddDesktopItem

AddDesktopItem(comp, Reserved)

Creates a new item to display on the desktop

Parameters

comp : dict

COMPONENT dictionary

Reserved=0 : int

Use 0 if passed in


PyIActiveDesktop.AddDesktopItemWithUI

AddDesktopItemWithUI(hwnd, comp, Flags)

Adds a desktop item, allowing user interaction

Parameters

hwnd : PyHANDLE

Handle to parent window

comp : dict

COMPONENT dictionary

Flags : int

One of shellcon.DTI_ADDUI_* flags


PyIActiveDesktop.AddUrl

AddUrl(hwnd, Source, comp, Flags)

Adds a web page to desktop, allowing user interaction

Parameters

hwnd : PyHANDLE

Parent windows for any user interactive

Source : PyUNICODE

Source URL

comp : dict

COMPONENT dictionary

Flags : int

ADDURL_SILENT, or 0


PyIActiveDesktop.ApplyChanges

ApplyChanges(Flags)

Applies changes to ActiveDesktop settings and persists them to the registry.

Parameters

Flags : int

Combination of shellcon.AD_APPLY_* flags


PyIActiveDesktop.GenerateDesktopItemHtml

GenerateDesktopItemHtml(FileName, comp, Reserved)

Creates an HTML page for the desktop item

Parameters

FileName : PyUNICODE

Name of file to be created

comp : dict

COMPONENT dictionary specifying the desktop item

Reserved=0 : int

Use 0 if passed in


PyIActiveDesktop.GetDesktopItem

dict = GetDesktopItem(Component, Reserved )

Returns desktop item parameters by index

Parameters

Component : int

The zero-based index of the component to get

Reserved=0 : int

Use 0 if passed in

Return Value

Returns a COMPONENT dictionary describing the item


PyIActiveDesktop.GetDesktopItemByID

dict = GetDesktopItemByID(ID, reserved )

Returns desktop item parameters by Id

Parameters

ID : int

The Id of the desktop item

reserved=0 : int

Use 0 if passed in

Return Value

Returns a COMPONENT dictionary


PyIActiveDesktop.GetDesktopItemBySource

dict = GetDesktopItemBySource(Source, Reserved )

Returns desktop item parameters by URL

Parameters

Source : PyUNICODE

The URL address of the item to retrieve

Reserved=0 : int

Use 0 if passed in

Return Value

Returns a COMPONENT dictionary


PyIActiveDesktop.GetDesktopItemCount

GetDesktopItemCount()

Returns number of defined desktop items.


PyIActiveDesktop.GetDesktopItemOptions

dict = GetDesktopItemOptions()

Returns options for Active Desktop.

Return Value

Returns a COMPONENTSOPT dictionary


PyIActiveDesktop.GetPattern

GetPattern(cchPattern, Reserved)

Returns the wallpaper pattern

Parameters

cchPattern=1024 : int

Number of characters to allocate for buffer

Reserved=0 : int

Use 0 if passed in

Return Value

Returns a unicode string containing decimal values representing the pattern


PyIActiveDesktop.GetWallpaper

PyUNICODE = GetWallpaper(cchWallpaper, Reserved )

Returns the current wallpaper

Parameters

cchWallpaper=MAX_PATH : int

Number of characters to allocate for buffer

Reserved=0 : int

Use 0 if passed in


PyIActiveDesktop.GetWallpaperOptions

int = GetWallpaperOptions(Reserved)

Returns wallpaper style

Parameters

Reserved=0 : int

Use 0 if passed in

Return Value

Returns one of the WPSTYLE_* values


PyIActiveDesktop.ModifyDesktopItem

ModifyDesktopItem(comp, Flags)

Changes parameters for a desktop item

Parameters

comp : dict

COMPONENT dictionary

Flags : int

Combination of shellcon.COMP_ELEM_* flags


PyIActiveDesktop.RemoveDesktopItem

RemoveDesktopItem(comp, Reserved)

Removes an item from the Active Desktop

Parameters

comp : dict

COMPONENT dictionary specifying which component to remove

Reserved=0 : int

Use 0 if passed in


PyIActiveDesktop.SetDesktopItemOptions

SetDesktopItemOptions(comp, Reserved)

Sets Active Desktop options

Parameters

comp : dict

COMPONENTSOPT dictionary

Reserved=0 : int

Use 0 if passed in


PyIActiveDesktop.SetPattern

SetPattern(Pattern, Reserved)

Sets the wallpaper pattern

Parameters

Pattern : PyUNICODE

String of decimal numbers representing a picture

Reserved=0 : int

Use 0 if passed in


PyIActiveDesktop.SetWallpaper

SetWallpaper(Wallpaper, Reserved)

Sets the desktop wallpaper

Parameters

Wallpaper : PyUNICODE

File to be used as new wallpaper

Reserved=0 : int

Reserved, use 0 if passed in


PyIActiveDesktop.SetWallpaperOptions

SetWallpaperOptions(Style, Reserved)

Sets wallpaper style

Parameters

Style : int

The wallpaper style, one of the WPSTYLE_* constants

Reserved=0 : int

Reserved, use 0 if passed in


PyIActiveDesktopP

PyIActiveDesktopP Object

An interface to the ActiveDesktop

Methods

SetSafeMode
Changes Active Desktop to safe mode


PyIActiveDesktopP.SetSafeMode

SetSafeMode(Flags)

Changes Active Desktop to safe mode

Parameters

Flags : int

One of shellcon.SSM_* flags


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


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


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

onClose()

Called when PyIDebugApplication::Close is called.


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


PyIApplicationDebugger.QueryAlive

QueryAlive()

Returns true if alive, else false.


PyIApplicationDestinations

PyIApplicationDestinations Object

Allows an application to removed items from its jump lists

Comments

Available on Windows 7 and later

Methods

SetAppID
Specifies the application whose jump list is to be accessed

RemoveDestination
Removes a single entry from the jump list

RemoveAllDestinations
Removes all Recent and Frequent jump list entries


PyIApplicationDestinations.RemoveAllDestinations

RemoveAllDestinations()

Removes all Recent and Frequent jump list entries


PyIApplicationDestinations.RemoveDestination

RemoveDestination(punk)

Removes a single entry from the jump lists

Parameters

punk : PyIUnknown

IShellItem or IShellLink representing an item in the application's jump list

Comments

Does not remove pinned items


PyIApplicationDestinations.SetAppID

SetAppID(AppID)

Specifies the application whose jump list is to be accessed

Parameters

AppID : str

Taskbar identifier for the application

Comments

This method is only needed if the application sets its own taskbar identifier


PyIApplicationDocumentLists

PyIApplicationDocumentLists Object

Interface used to retrieve the jump lists for an application

Comments

Available on Windows 7 and later

Methods

SetAppID
Specifies the application whose jump list is to be accessed

GetList
Retrieves a list of items in a jump list


PyIApplicationDocumentLists.GetList

PyIEnumObjects = GetList(ListType, ItemsDesired , riid )

Retrieves a list of items in a jump list

Parameters

ListType : int

Type of document list to return, shellcon.ADLT_RECENT or ADLT_FREQUENT

ItemsDesired=0 : int

Number of items to return, use 0 for all available

riid=IID_IEnumObjects : PyIID

The interface to return, IID_IEnumObjects or IID_IObjectArray


PyIApplicationDocumentLists.SetAppID

SetAppID(AppID)

Specifies the application whose jump list is to be accessed

Parameters

AppID : str

Taskbar identifier for the application

Comments

This method is only needed if the application sets its own taskbar identifier


PyIAsyncOperation

PyIAsyncOperation Object

Description of the interface

Methods

SetAsyncMode
Description of SetAsyncMode

GetAsyncMode
Description of GetAsyncMode

StartOperation
Description of StartOperation

InOperation
Description of InOperation

EndOperation
Description of EndOperation


PyIAsyncOperation.EndOperation

EndOperation(hResult, pbcReserved, dwEffects)

Description of EndOperation.

Parameters

hResult : int

Description for hResult

pbcReserved : PyIBindCtx

Description for pbcReserved

dwEffects : int

Description for dwEffects


PyIAsyncOperation.GetAsyncMode

bool = GetAsyncMode()

Description of GetAsyncMode.


PyIAsyncOperation.InOperation

InOperation()

Description of InOperation.


PyIAsyncOperation.SetAsyncMode

SetAsyncMode(fDoOpAsync)

Description of SetAsyncMode.

Parameters

fDoOpAsync : int

Description for fDoOpAsync


PyIAsyncOperation.StartOperation

StartOperation(pbcReserved)

Description of StartOperation.

Parameters

pbcReserved : PyIBindCtx

Description for pbcReserved


PyIAttach

PyIAttach Object

An COM interface to MAPI
Derived from PyIMAPIProp

Methods

GetLastError
Returns the last error code for the object.


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


PyIBindCtx

PyIBindCtx Object

A Python interface to IBindCtx. Derived from PyIUnknown

Methods

GetRunningObjectTable
Retrieves the running object table.

GetBindOptions
Retrieves bind options

SetBindOptions
Sets the bind options for the bind context

RegisterObjectParam
Associates a COM object to the bind context

RevokeObjectParam
Removes one of the bind context's associated objects

GetObjectParam
Retrieves one of the contexts string-keyed objects

EnumObjectParam
Creates an enumerator to list context's string keys

Based On

PyIUnknown


PyIBindCtx.EnumObjectParam

PyIEnumString = EnumObjectParam()

Creates an enumerator to list context's string keys


PyIBindCtx.GetBindOptions

PyBIND_OPTS = GetBindOptions()

Retrieves the bind options for the bind context


PyIBindCtx.GetObjectParam

PyIUnknown = GetObjectParam(Key)

Returns one of the bind context's associated objects

Parameters

Key : PyUnicode

The string key for the object to be returned


PyIBindCtx.GetRunningObjectTable

PyIRunningObjectTable = GetRunningObjectTable()

Retrieves an object interfacing to the Running Object Table.


PyIBindCtx.RegisterObjectParam

RegisterObjectParam(Key, punk)

Adds an object to the context's keyed table of associated objects

Parameters

Key : PyUnicode

The string key for the object to be registered

punk : PyIUnknown

COM object to be registered with the bind context


PyIBindCtx.RevokeObjectParam

RevokeObjectParam(Key)

Removes one of the bind context's registered objects

Parameters

Key : PyUnicode

The string key for the object to be removed


PyIBindCtx.SetBindOptions

SetBindOptions(bindopts)

Sets the bind options for the context

Parameters

bindopts : dict

PyBIND_OPTS dictionary containing the binding options


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


PyICancelMethodCalls

PyICancelMethodCalls Object

Interface to request cancellation of a call. See pythoncom::CoGetCancelObject.

Methods

Cancel
Cancels a pending call

TestCancel
Checks if a request has been made to cancel a call


PyICancelMethodCalls.Cancel

Cancel(Seconds)

Cancels a pending call

Parameters

Seconds : int

Wait timeout in seconds


PyICancelMethodCalls.TestCancel

int = TestCancel()

Checks if a request has been made to cancel a call

Return Value

Can return RPC_S_CALLPENDING or RPC_E_CALL_CANCELED


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.

Based On

PyIUnknown


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 unicode object.


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.

Based On

PyIUnknown


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.


PyICategoryProvider

PyICategoryProvider Object

Description of the interface

Methods

CanCategorizeOnSCID
Description of CanCategorizeOnSCID

GetDefaultCategory
Description of GetDefaultCategory

GetCategoryForSCID
Description of GetCategoryForSCID

EnumCategories
Description of EnumCategories

GetCategoryName
Description of GetCategoryName

CreateCategory
Description of CreateCategory


PyICategoryProvider.CanCategorizeOnSCID

CanCategorizeOnSCID(pscid)

Description of CanCategorizeOnSCID.

Parameters

pscid : SHCOLUMNID

Description for pscid


PyICategoryProvider.CreateCategory

CreateCategory(guid, riid)

Description of CreateCategory.

Parameters

guid : PyIID

Description for pguid

riid : PyIID

Description for riid


PyICategoryProvider.EnumCategories

EnumCategories()

Description of EnumCategories.


PyICategoryProvider.GetCategoryForSCID

GetCategoryForSCID(pscid)

Description of GetCategoryForSCID.

Parameters

pscid : SHCOLUMNID

Description for pscid


PyICategoryProvider.GetCategoryName

GetCategoryName(guid)

Description of GetCategoryName.

Parameters

guid : PyIID

Description for pguid

Comments

The buffer is always 1024 chars long


PyICategoryProvider.GetDefaultCategory

GetDefaultCategory()

Description of GetDefaultCategory.


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.


PyIClientSecurity

PyIClientSecurity Object

Description of the interface

Methods

QueryBlanket
Retrieves the authentication settings for an interface

SetBlanket
Changes the authentication options used with an interface

CopyProxy
Makes a private copy of a proxy interface


PyIClientSecurity.CopyProxy

PyIUnknown = CopyProxy(Proxy)

Makes a private copy of a proxy interface

Parameters

Proxy : PyIUnknown

The remote interface to be copied


PyIClientSecurity.QueryBlanket

dict = QueryBlanket(Proxy)

Retrieves the authentication settings for an interface

Parameters

Proxy : PyIUnknown

An interface created through a proxy


PyIClientSecurity.SetBlanket

SetBlanket(Proxy, AuthnSvc, AuthzSvc, ServerPrincipalName, AuthnLevel, ImpLevel, AuthInfo, Capabilities)

Changes the authentication options used with an interface

Parameters

Proxy : PyIUnknown

The proxy interface for which to set security options

AuthnSvc : int

Authentication service identifier, pythoncom.RPC_C_AUTHN_* (but not RPC_C_AUTHN_LEVEL_*)

AuthzSvc : int

Authorization service identifier, pythoncom.RPC_C_AUTHZ_*

ServerPrincipalName : PyUnicode

SPN that identifies the server, can be None

AuthnLevel : int

Authentication level, pythoncom.RPC_C_AUTHN_LEVEL_*

ImpLevel : int

Impersonation level, pythoncom.RPC_C_IMP_LEVEL_*

AuthInfo : None

Not supported yet, use only None

Capabilities : int

Combination of pythoncom.EOAC_* flags. Must be a subset of the capabilities of the specified authentication service.


PyIColumnProvider

PyIColumnProvider Object

Description of the interface

Methods

Initialize
Description of Initialize

GetColumnInfo
Description of GetColumnInfo

GetItemData
Description of GetItemData


PyIColumnProvider.GetColumnInfo

GetColumnInfo(dwIndex)

Description of GetColumnInfo.

Parameters

dwIndex : int

Description for dwIndex


PyIColumnProvider.GetItemData

GetItemData(pscid, pscd)

Description of GetItemData.

Parameters

pscid : PySHCOLUMNID

Description for pscid

pscd : PySHCOLUMNDATA

Description for pscd


PyIColumnProvider.Initialize

Initialize(psci)

Description of Initialize.

Parameters

psci : PyCSHCOLUMNINIT

Description for psci


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

Based On

PyIUnknown


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.

Based On

PyIUnknown


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.


PyIContext

PyIContext Object

Allows access to properties defined for the current context (Requires win2k or later)

Methods

SetProperty
Sets a property on the context

RemoveProperty
Removes a property from the context

GetProperty
Retrieves a context property

EnumContextProps
Returns an enumerator for the context properties


PyIContext.EnumContextProps

PyIEnumContextProps = EnumContextProps()

Returns an enumerator for the context properties


PyIContext.GetProperty

(int, PyIUnknown) = GetProperty(rGuid)

Retrieves a context property

Parameters

rGuid : PyIID

GUID that identifies a context property

Return Value

Returns flags (CPFLAGS is reserved, no defined values) and the IUnknown interface set for the property


PyIContext.RemoveProperty

RemoveProperty(rPolicyId)

Removes a property from the context

Parameters

rPolicyId : PyIID

GUID that identifies a context property


PyIContext.SetProperty

SetProperty(rpolicyId, flags, pUnk)

Sets a property on the context

Parameters

rpolicyId : PyIID

GUID identifying the property to be set

flags : int

Reserved, use only 0

pUnk : PyIUnknown

The property value


PyIContextMenu

PyIContextMenu Object

Description of the interface

Methods

QueryContextMenu
Adds options to a context menu

InvokeCommand
Executes a context menu option

GetCommandString
Retrieves verb or help text for a context menu option


PyIContextMenu.GetCommandString

str = GetCommandString(idCmd, uType , cchMax )

Retrieves verb or help text for a context menu option

Parameters

idCmd : int

Id of the command

uType : int

One of the shellcon.GCS_* constants

cchMax=2048 : int

Size of buffer to create for returned string


PyIContextMenu.InvokeCommand

InvokeCommand(pici)

Executes a context menu option

Parameters

pici : PyCMINVOKECOMMANDINFO

Tuple of parameters representing a CMINVOKECOMMANDINFO struct


PyIContextMenu.QueryContextMenu

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

Adds options to a context menu

Parameters

hmenu : PyHANDLE

Handle to menu to which items should be added

indexMenu : int

Zero-based index at which to add first item

idCmdFirst : int

Minimum menu item Id

idCmdLast : int

Max menu item Id

uFlags : int

Combination of shellcon.CMF_* flags, can be 0


PyICopyHookA

PyICopyHookA Object

Description of the interface

Methods

CopyCallback
Description of CopyCallback


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


PyICopyHookW

PyICopyHookW Object

Description of the interface

Methods

CopyCallback
Description of CopyCallback


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


PyICreateTypeLib2

PyICreateTypeLib2 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


PyICreateTypeLib2.CreateTypeInfo

CreateTypeInfo(szName)

Description of CreateTypeInfo.

Parameters

szName : unicode

Description for szName


PyICreateTypeLib2.SaveAllChanges

SaveAllChanges()

Description of SaveAllChanges.


PyICreateTypeLib2.SetDocString

SetDocString(szDoc)

Description of SetDocString.

Parameters

szDoc : unicode

Description for szDoc


PyICreateTypeLib2.SetGuid

SetGuid(guid)

Description of SetGuid.

Parameters

guid : PyIID

Description for guid


PyICreateTypeLib2.SetHelpContext

SetHelpContext(dwHelpContext)

Description of SetHelpContext.

Parameters

dwHelpContext : int

Description for dwHelpContext


PyICreateTypeLib2.SetHelpFileName

SetHelpFileName(szHelpFileName)

Description of SetHelpFileName.

Parameters

szHelpFileName : unicode

Description for szHelpFileName


PyICreateTypeLib2.SetLcid

SetLcid()

Description of SetLcid.


PyICreateTypeLib2.SetLibFlags

SetLibFlags(uLibFlags)

Description of SetLibFlags.

Parameters

uLibFlags : int

Description for uLibFlags


PyICreateTypeLib2.SetName

SetName(szName)

Description of SetName.

Parameters

szName : unicode

Description for szName


PyICreateTypeLib2.SetVersion

SetVersion(wMajorVerNum, wMinorVerNum)

Description of SetVersion.

Parameters

wMajorVerNum : int

Description for wMajorVerNum

wMinorVerNum : int

Description for wMinorVerNum


PyICurrentItem

PyICurrentItem Object

Description of the interface

Based On

PyIRelatedItem


PyICustomDestinationList

PyICustomDestinationList Object

Interface used to customize an application's jump list

Comments

Requires Windows 7 or later

Methods

SetAppID
Specifies the taskbar identifier for the jump list

BeginList
Clears the jump list and prepares it to be repopulated

AppendCategory
Adds a custom category to the jump list

AppendKnownCategory
Adds one of the predefined categories to the custom list

AddUserTasks
Sets the entries shown in the Tasks category

CommitList
Finalizes changes

GetRemovedDestinations
Returns all the items removed from the jump list

DeleteList
Removes any customization, leaving only the system-maintained Recent and Frequent lists

AbortList
Discards all changes


PyICustomDestinationList.AbortList

AbortList()

Discards all changes


PyICustomDestinationList.AddUserTasks

AddUserTasks(Items)

Sets the entries shown in the Tasks category

Parameters

Items : PyIObjectArray

Collection of PyIShellItem and/or PyIShellLink interfaces


PyICustomDestinationList.AppendCategory

AppendCategory(Category, Items)

Adds a custom category to the jump list

Parameters

Category : str

Display name of the category, can also be a dll and resource id for localization

Items : PyIObjectArray

Collection of IShellItem and/or IShellLink interfaces


PyICustomDestinationList.AppendKnownCategory

AppendKnownCategory(Category)

Adds one of the predefined categories to the custom list

Parameters

Category : int

shellcon.KDC_RECENT or KDC_FREQUENT


PyICustomDestinationList.BeginList

int, PyIObjectArray = BeginList(riid)

Clears the jump list and prepares it to be repopulated

Parameters

riid=IID_IObjectArray : PyIID

The interface to return

Return Value

Returns the number of slots and a collection of all destinations removed from the jump list


PyICustomDestinationList.CommitList

CommitList()

Finalizes changes.


PyICustomDestinationList.DeleteList

DeleteList(AppID)

Removes any customization, leaving only the system-maintained Recent and Frequent lists

Parameters

AppID=None : str

The taskbar identifier of the application


PyICustomDestinationList.GetRemovedDestinations

PyIObjectArray = GetRemovedDestinations(riid)

Returns all the items removed from the jump list

Parameters

riid=IID_IObjectArray : PyIID

The interface to return


PyICustomDestinationList.SetAppID

SetAppID(AppID)

Specifies the taskbar identifier for the jump list

Parameters

AppID : str

The taskbar identifier of the application

Comments

Only needed if the calling app doesn't use the system-assigned default


PyIDL

PyIDL Object

A Python representation of an IDL. Implemented as a sequence of Python strings. FALSE*/, UINT *pcb /* = NULL */)


PyIDataObject

PyIDataObject Object

Used to transfer data in various formats throughout the shell

Comments

Can be enumerated to return a series of PyFORMATETC describing the formats that the object can render.

Methods

GetData
Retrieves data from the object in specified format

GetDataHere
Returns a copy of the object's data in specified format

QueryGetData
Checks if the object supports returning data in a particular format

GetCanonicalFormatEtc
Transforms a FORMATECT data description into a general format that the object supports

SetData
Sets the data that the object will return.

EnumFormatEtc
Returns an enumerator to list the data formats that the object supports.

DAdvise
Connects the object to an interface that will receive notifications when its data changes

DUnadvise
Disconnects a notification sink.

EnumDAdvise
Creates an enumerator to list connected notification sinks.


PyIDataObject.DAdvise

int = DAdvise(pformatetc, advf , pAdvSink )

Connects the object to an interface that will receive notifications when its data changes

Parameters

pformatetc : PyFORMATETC

Defines the type of data for which the sink will receive notifications.

advf : int

Combination of values from ADVF enum. (which currently do not appear in any of the constants modules!)

pAdvSink : PyIAdviseSink

Currently this interface is not wrapped.

Return Value

Returns a unique number that is used to identify the connection


PyIDataObject.DUnadvise

DUnadvise(dwConnection)

Disconnects a notification sink.

Parameters

dwConnection : int

Identifier of the connection as returned by DAdvise.


PyIDataObject.EnumDAdvise

PyIEnumSTATDATA = EnumDAdvise()

Creates an enumerator to list connected notification sinks.


PyIDataObject.EnumFormatEtc

PyIEnumFORMATETC = EnumFormatEtc(dwDirection)

Returns an enumerator to list the data formats that the object supports.

Parameters

dwDirection=DATADIR_GET : int

Indicates whether to return formats that can be queried or set (pythoncom.DATADIR_GET or DATADIR_SET)


PyIDataObject.GetCanonicalFormatEtc

PyFORMATETC = GetCanonicalFormatEtc(pformatectIn)

Transforms a FORMATECT data description into a general format that the object supports

Parameters

pformatectIn : PyFORMATETC

Tuple representing a FORMATETC struct describing how the data should be returned


PyIDataObject.GetData

PySTGMEDIUM = GetData(pformatetcIn)

Retrieves data from the object in specified format

Parameters

pformatetcIn : PyFORMATETC

Tuple representing a FORMATETC struct describing how the data should be returned


PyIDataObject.GetDataHere

PySTGMEDIUM = GetDataHere(pformatetcIn)

Retunrs a copy of the object's data in specified format

Parameters

pformatetcIn : PyFORMATETC

Tuple representing a FORMATETC struct describing how the data should be returned


PyIDataObject.QueryGetData

QueryGetData(pformatetc)

Checks if the objects supports returning data in a particular format.

Parameters

pformatetc : PyFORMATETC

Tuple representing a FORMATETC struct describing how the data should be returned

Return Value

Returns None if the object supports the specified format, otherwise an error is raised.


PyIDataObject.SetData

SetData(pformatetc, pmedium, fRelease)

Sets the data that the object will return.

Parameters

pformatetc : PyFORMATETC

Tuple representing a FORMATETC struct describing the type of data to be set

pmedium : PySTGMEDIUM

The data to be placed in the object

fRelease : boolean

If True, transfers ownership of the data to the object. If False, caller is responsible for releasing the STGMEDIUM.


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

FireDebuggerEvent(guid, unknown)

Fire a generic event to the IApplicationDebugger (if any)

Parameters

guid : PyIIID

A GUID.

unknown : PyIUnknown

An unknown object.


PyIDebugApplication.FIsAutoJitDebugEnabled

FIsAutoJitDebugEnabled()

Description of FIsAutoJitDebugEnabled.


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

SetDescription()

Description of SetDescription.


PyIDebugApplicationThread.SetStateString

SetStateString()

Description of SetStateString.


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

PyIDebugProperty = GetDebugProperty()

Returns the debug property.


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.


PyIDefaultExtractIconInit

PyIDefaultExtractIconInit Object

Description of the interface

Methods

SetFlags
Description of SetFlags

SetKey
Description of SetKey

SetNormalIcon
Description of SetNormalIcon

SetOpenIcon
Description of SetOpenIcon

SetShortcutIcon
Description of SetShortcutIcon

SetDefaultIcon
Description of SetDefaultIcon


PyIDefaultExtractIconInit.SetDefaultIcon

SetDefaultIcon(pszFile, iIcon)

Description of SetDefaultIcon.

Parameters

pszFile : unicode

Description for pszFile

iIcon : int

Description for iIcon


PyIDefaultExtractIconInit.SetFlags

SetFlags(uFlags)

Description of SetFlags.

Parameters

uFlags : int

Description for uFlags


PyIDefaultExtractIconInit.SetKey

SetKey(hkey)

Description of SetKey.

Parameters

hkey : PyHKEY

Description for hkey


PyIDefaultExtractIconInit.SetNormalIcon

SetNormalIcon(pszFile, iIcon)

Description of SetNormalIcon.

Parameters

pszFile : unicode

Description for pszFile

iIcon : int

Description for iIcon


PyIDefaultExtractIconInit.SetOpenIcon

SetOpenIcon(pszFile, iIcon)

Description of SetOpenIcon.

Parameters

pszFile : unicode

Description for pszFile

iIcon : int

Description for iIcon


PyIDefaultExtractIconInit.SetShortcutIcon

SetShortcutIcon(pszFile, iIcon)

Description of SetShortcutIcon.

Parameters

pszFile : unicode

Description for pszFile

iIcon : int

Description for iIcon


PyIDirectSound

PyIDirectSound Object

Description of the interface

Methods

Initialize
Description of Initialize.

SetCooperativeLevel
Description of SetCooperativeLevel.

CreateSoundBuffer
Description of CreateSoundBuffer.

GetCaps
Description of GetCaps.

Compact
Description of Compact.


PyIDirectSound.Compact

Compact()

The Compact method moves the unused portions of on-board sound memory, if any, to a contiguous block so that the largest portion of free memory will be available.


PyIDirectSound.CreateSoundBuffer

CreateSoundBuffer(lpDSCBufferDesc, unk)

The IDirectSound::CreateSoundBuffer method creates a DirectSoundBuffer object to hold a sequence of audio samples.

Parameters

lpDSCBufferDesc : PyDSCBUFFERDESC

a DSBUFFERDESC structure containing values for the sound buffer being created.

unk=None : PyIUknown

The IUnknown for COM aggregation.


PyIDirectSound.GetCaps

GetCaps()

The GetCaps method retrieves the capabilities of the hardware device that is represented by the DirectSound object. See DSCAPS contants .


PyIDirectSound.GetSpeakerConfig

GetSpeakerConfig()

The GetSpeakerConfig method retrieves the speaker configuration.


PyIDirectSound.Initialize

Initialize(guid)

Description of Initialize.

Parameters

guid : PyIID

Globally unique identifier (GUID) specifying the sound driver to which this DirectSound object binds. Pass None to select the primary sound driver.


PyIDirectSound.SetCooperativeLevel

SetCooperativeLevel(hwnd, level)

The IDirectSound::SetCooperativeLevel method sets the cooperative level of the application for this sound device.

Parameters

hwnd : int

Window handle to the application or None.

level : int

Requested priority level. Specify one of the following values:

Level | Description
DSSCL_NORMAL | Sets the application to a fully cooperative status. Most applications should use this level, because it has the smoothest multitasking and resource-sharing behavior.
DSSCL_PRIORITY | Sets the application to the priority level. Applications with this cooperative level can call the DirectSoundBuffer.setFormat and DirectSound.compact methods.
DSSCL_EXCLUSIVE | Sets the application to the exclusive level. When it has the input focus, the application will be the only one audible (sounds from applications with the DSBCAPS_GLOBALFOCUS flag set will be muted). With this level, it also has all the privileges of the DSSCL_PRIORITY level. DirectSound will restore the hardware format, as specified by the most recent call to the DirectSoundBuffer.setFormat method, once the application gains the input focus. (Note that DirectSound will always restore the wave format, no matter what priority level is set.)
DSSCL_WRITEPRIMARY | This is the highest priority level. The application has write access to the primary sound buffers. No secondary sound buffers in any application can be played.


PyIDirectSound.SetSpeakerConfig

SetSpeakerConfig(dwSpeakerConfig)

The SetSpeakerConfig method specifies the speaker configuration of the DirectSound object.

Parameters

dwSpeakerConfig : int

Speaker configuration of the specified DirectSound object. See the DSSPEAKER constants.


PyIDirectSoundBuffer

PyIDirectSoundBuffer Object

Description of the interface

Methods

Initialize
Description of Initialize.

SetCooperativeLevel
Description of SetCooperativeLevel.

GetStatus
Description of GetStatus.

GetCaps
Description of GetCaps.

Initialize
Description of GetCaps.

Restore
Description of Restore.

GetCurrentPosition
Description of GetCaps.

Play
Description of GetCaps.

SetCurrentPosition
Description of GetCaps.

Stop
Description of GetCaps.

Unlock
Description of Unlock.

GetFrequency
Description of GetCaps.

GetPan
Description of GetCaps.

GetVolume
Description of GetCaps.

SetFrequency
Description of GetCaps.

SetPan
Description of GetCaps.

SetVolume
Description of GetCaps.


PyIDirectSoundBuffer.GetCaps

GetCaps()

Retrieves the capabilities of the DirectSoundBuffer object as a DSBCAPS object.


PyIDirectSoundBuffer.GetCurrentPosition

GetCurrentPosition()

Description of GetCurrentPosition.


PyIDirectSoundBuffer.GetFormat

GetFormat()

Description of GetFormat.


PyIDirectSoundBuffer.GetFrequency

GetFrequency()

Description of GetFrequency.


PyIDirectSoundBuffer.GetPan

GetPan()

Description of GetPan.


PyIDirectSoundBuffer.GetStatus

GetStatus()

Retrieves the current status of the sound buffer.


PyIDirectSoundBuffer.GetVolume

GetVolume()

Description of GetVolume.


PyIDirectSoundBuffer.Initialize

Initialize()

Description of Initialize.


PyIDirectSoundBuffer.Play

Play()

Description of Play.


PyIDirectSoundBuffer.Restore

Restore()

Restores the memory allocation for a lost sound buffer for the specified DirectSoundBuffer object.


PyIDirectSoundBuffer.SetCurrentPosition

SetCurrentPosition()

Description of SetCurrentPosition.


PyIDirectSoundBuffer.SetFormat

SetFormat(format)

Sets the format of the primary sound buffer for the application. Whenever this application has the input focus, DirectSound will set the primary buffer to the specified format.

Parameters

format : WAVEFORMATEX

A WAVEFORMATEX object that describes the new format for the primary sound buffer.


PyIDirectSoundBuffer.SetFrequency

SetFrequency()

Description of SetFrequency.


PyIDirectSoundBuffer.SetPan

SetPan()

Description of SetPan.


PyIDirectSoundBuffer.SetVolume

SetVolume()

Description of SetVolume.


PyIDirectSoundBuffer.Stop

Stop()

Description of Stop.


PyIDirectSoundBuffer.Update

Update()

Description of Update.


PyIDirectSoundCapture

PyIDirectSoundCapture Object

The methods of the IDirectSoundCapture interface are used to create sound capture buffers.

Methods

Initialize
Description of Initialize.

CreateSoundBuffer
Description of CreateSoundBuffer.

GetCaps
Description of GetCaps.


PyIDirectSoundCapture.CreateCaptureBuffer

CreateCaptureBuffer(lpDSCBufferDesc, unk)

The IDirectSoundCapture::CreateSoundBuffer method creates a DirectSoundBuffer object to hold a sequence of audio samples.

Parameters

lpDSCBufferDesc : PyDSCBUFFERDESC

a DSCBUFFERDESC structure containing values for the capture buffer being created.

unk=None : PyIUknown

The IUnknown for COM aggregation.


PyIDirectSoundCapture.GetCaps

GetCaps()

The GetCaps method retrieves the capabilities of the hardware device that is represented by the DirectSound object. See DSCAPS contants .


PyIDirectSoundCapture.Initialize

Initialize()

Not normally called directly. Use DirectSoundCaptureCreate instead.


PyIDirectSoundCaptureBuffer

PyIDirectSoundCaptureBuffer Object

The methods of the IDirectSoundCaptureBuffer interface are used to manipulate sound capture buffers.

Methods

Initialize
Description of GetCaps.

SetCooperativeLevel
Description of GetFormat.

GetStatus
Description of GetStatus.

Initialize
Description of Initialize.

GetCurrentPosition
Description of GetCaps.

Play
Description of Start.

Stop
Description of Stop.

Unlock
Description of Update.


PyIDirectSoundCaptureBuffer.GetCaps

GetCaps()

Returns the capabilities of the DirectSound Capture Buffer.


PyIDirectSoundCaptureBuffer.GetCurrentPosition

GetCurrentPosition()

Returns a tuple of the current capture and read position in the buffer. The capture position is ahead of the read position. These positions are not always identical due to possible buffering of captured data either on the physical device or in the host. The data after the read position up to and including the capture position is not necessarily valid data.


PyIDirectSoundCaptureBuffer.GetFormat

GetFormat()

Retrieves the current format of the sound capture buffer as a WAVEFORMATEX object.


PyIDirectSoundCaptureBuffer.GetStatus

GetStatus()

Retrieves the current status of the sound capture buffer.


PyIDirectSoundCaptureBuffer.Initialize

Initialize()

Not normally used. Used IDirectSoundCapture.CreateCaptureBuffer instead.


PyIDirectSoundCaptureBuffer.Start

Start(dwFlags)

The PyIDirectSoundCaptureBuffer::Start method puts the capture buffer into the capture state and begins capturing data into the buffer. If the capture buffer is already in the capture state then the method has no effect.

Parameters

dwFlags=0 : int

Flags that specify the behavior for the capture buffer when capturing sound data. Possible values for dwFlags can be one of the following: DSCBSTART_LOOPING


PyIDirectSoundCaptureBuffer.Stop

Stop()

The IDirectSoundCaptureBuffer::Stop method puts the capture buffer into the "stop" state and stops capturing data. If the capture buffer is already in the stop state then the method has no effect.


PyIDirectSoundCaptureBuffer.Update

Update(dwReadCursor, dwReadBytes, dwFlags)

Retrieve data from the capture buffer.

Parameters

dwReadCursor : int

Offset, in bytes, from the start of the buffer to where the update begins.

dwReadBytes : int

Size, in bytes, of the portion of the buffer to update.

dwFlags=0 : int

Flags modifying the update event. This value can be 0 or the following flag: DSCBLOCK_ENTIREBUFFER The dwReadBytes parameter is to be ignored and the entire capture buffer is to be locked.


PyIDirectSoundNotify

PyIDirectSoundNotify Object

Description of the interface

Methods

Initialize
Description of SetNotificationPositions.


PyIDirectSoundNotify.SetNotificationPositions

SetNotificationPositions()

Description of GetCaps.


PyIDirectoryObject

PyIDirectoryObject Object

A COM interface to ADSI's IDirectoryObject interface.
Derived from PyIUnknown

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.

CreateDSObject

DeleteDSObject
Deletes a leaf object in a directory tree


PyIDirectoryObject.CreateDSObject

PyIDispatch = CreateDSObject(rdn, attrs )

Parameters

rdn : PyUnicode

The relative distinguished name (relative path) of the object to be created.

attrs : (PyADS_ATTR_INFO, ...)

The attributes to set.


PyIDirectoryObject.DeleteDSObject

DeleteDSObject(rdn)

Deletes a leaf object in a directory tree

Parameters

rdn : string

The relative distinguished name (relative path) of the object to be deleted.


PyIDirectoryObject.GetObjectAttributes

(PyADS_ATTR_INFO, ...) = GetObjectAttributes(names)

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

Parameters

names : (PyUnicode, ...)


PyIDirectoryObject.GetObjectInformation

PyADS_OBJECT_INFO = GetObjectInformation()

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


PyIDirectoryObject.SetObjectAttributes

int = SetObjectAttributes(attrs)

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

Parameters

attrs : (PyADS_ATTR_INFO, ...)

The attributes to set


PyIDirectorySearch

PyIDirectorySearch Object

A COM interface to ADSI's IDirectorySearch interface.
Derived from PyIUnknown

Methods

SetSearchPreference

ExecuteSearch
Executes a search and passes the results to the caller. Some providers, such as LDAP, will defer the actual execution until the caller invokes the PyIDirectorySearch::GetFirstRow method or the PyIDirectorySearch::GetNextRow method.

GetNextRow

GetFirstRow

GetPreviousRow

CloseSearchHandle
Closes a previously opened search handle.

AdandonSearch

GetColumn

GetNextColumnName


PyIDirectorySearch.AdandonSearch

AdandonSearch(handle)

Parameters

handle : int


PyIDirectorySearch.CloseSearchHandle

CloseSearchHandle(handle)

Closes a previously opened search handle.

Parameters

handle : int


PyIDirectorySearch.ExecuteSearch

int = ExecuteSearch(filter, attrNames )

Executes a search and passes the results to the caller. Some providers, such as LDAP, will defer the actual execution until the caller invokes the PyIDirectorySearch::GetFirstRow method or the PyIDirectorySearch::GetNextRow method.

Parameters

filter : PyUnicode

attrNames : [PyUnicode, ...]

Return Value

The result is an integer search handle. PyIDirectorySearch::CloseSearchHandle should be called to close the handle.


PyIDirectorySearch.GetColumn

(name, type, values) = GetColumn(handle, name )

Parameters

handle : int

Handle to a search

name : PyUnicode

The column name to fetch


PyIDirectorySearch.GetFirstRow

int = GetFirstRow(handle)

Parameters

handle : int

Return Value

The result is the HRESULT from the call - no exceptions are thrown


PyIDirectorySearch.GetNextColumnName

GetNextColumnName()

Return Value

Returns None when the underlying ADSI function return S_ADS_NOMORE_COLUMNS.


PyIDirectorySearch.GetNextRow

int = GetNextRow(handle)

Parameters

handle : int

Return Value

The result is the HRESULT from the call - no exceptions are thrown


PyIDirectorySearch.GetPreviousRow

int = GetPreviousRow(handle)

Parameters

handle : int

Return Value

The result is the HRESULT from the call - no exceptions are thrown


PyIDirectorySearch.SetSearchPreference

int, [int, ...] = SetSearchPreference(prefs)

Parameters

prefs : ADS_SEARCHPREF_INFO

Return Value

The result is the hresult of the call, and a list of integer status codes for each of the preferences set.


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.

Based On

PyIUnknown


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

Get type information for the object.

Parameters

locale=LOCALE_USER_DEFAULT : int

The locale to use.

index=0 : int

The index of the typelibrary to fetch. Note that these params are reversed from the win32 call.


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 , resultTypeDesc , typeDescs , 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.

resultTypeDesc : tuple

A tuple describing the type of the result. See the comments for more information.

typeDescs : (tuple, ...)

A sequence of tuples describing the types of the parameters for the function. See the comments for more information.

args : object, ...

The args to the function.

Comments

The Microsoft documentation for IDispatch should be used for all params except 'resultTypeDesc' and 'typeDescs'. 'resultTypeDesc' describes the return value of the function, and is a tuple of (type_id, flags). 'typeDescs' describes the type of each parameters, and is a list of the same (type_id, flags) tuple.

item | Description
type_id | A valid "variant type" constant (eg, VT_I4 | VT_ARRAY, VT_DATE, etc - see VARIANT at MSDN).
flags | One of the PARAMFLAG constants (eg, PARAMFLAG_FIN, PARAMFLAG_FOUT etc - see PARAMFLAG at MSDN).

Example

An example from the makepy generated file for Word

class Cells(DispatchBaseClass):

...

    def SetWidth(self, ColumnWidth=..., RulerStyle=...):

    return self._oleobj_.InvokeTypes(202, LCID, 1, (24, 0), ((4, 1), (3, 1)),...)
The interesting bits are

resultTypeDesc: (24, 0) - (VT_VOID, <no flags>)

typeDescs: ((4, 1), (3, 1)) - ((VT_R4, PARAMFLAG_FIN), (VT_I4, PARAMFLAG_FIN))
So, in this example, the function returns no value and takes 2 "in" params - ColumnWidth is a float, and RulerStule is an int.


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
Returns the name associated with a member id

GetNextDispID
Enumerates member ids.

Based On

PyIDispatch


PyIDispatchEx.DeleteMemberByDispID

DeleteMemberByDispID(dispid)

Parameters

dispid : int


PyIDispatchEx.DeleteMemberByName

DeleteMemberByName(name, fdex)

Parameters

name : PyUnicode

Passed in name to be mapped

fdex : int

Determines the options


PyIDispatchEx.GetDispID

int = GetDispID(name, fdex )

Returns the member id for a name

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

str = GetMemberName(dispid)

Returns the name associated with a member id

Parameters

dispid : int

The member id


PyIDispatchEx.GetMemberProperties

int = GetMemberProperties(dispid, fdex )

Returns mask of fdex* flags describing a member

Parameters

dispid : int

The member id

fdex : int

fdex* flags specifying which properties to return


PyIDispatchEx.GetNextDispID

int = GetNextDispID(fdex, dispid )

Enumerates member ids.

Parameters

fdex : int

Determines the options

dispid : int

Current member, or DISPID_STARTENUM to begin enumeration. GetNextDispID will retrieve the item in the enumeration after this one.


PyIDispatchEx.InvokeEx

object = InvokeEx(dispid, lcid , flags , args , types , returnDesc , serviceProvider )

Provides access to properties and methods exposed by a PyIDispatchEx object.

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.


PyIDisplayItem

PyIDisplayItem Object

Description of the interface

Based On

PyIRelatedItem


PyIDocHostUIHandler

PyIDocHostUIHandler Object

Description of the interface

Methods

ShowContextMenu
Description of ShowContextMenu

GetHostInfo
Description of GetHostInfo

ShowUI
Description of ShowUI

HideUI
Description of HideUI

UpdateUI
Description of UpdateUI

EnableModeless
Description of EnableModeless

OnDocWindowActivate
Description of OnDocWindowActivate

OnFrameWindowActivate
Description of OnFrameWindowActivate

ResizeBorder
Description of ResizeBorder

TranslateAccelerator
Description of TranslateAccelerator

GetOptionKeyPath
Description of GetOptionKeyPath

GetDropTarget
Description of GetDropTarget

GetExternal
Description of GetExternal

TranslateUrl
Description of TranslateUrl

FilterDataObject
Description of FilterDataObject


PyIDocHostUIHandler.EnableModeless

EnableModeless(fEnable)

Description of EnableModeless.

Parameters

fEnable : int

Description for fEnable


PyIDocHostUIHandler.FilterDataObject

FilterDataObject(pDO)

Description of FilterDataObject.

Parameters

pDO : PyIDataObject

Description for pDO


PyIDocHostUIHandler.GetDropTarget

GetDropTarget(pDropTarget)

Description of GetDropTarget.

Parameters

pDropTarget : PyIDropTarget

Description for pDropTarget


PyIDocHostUIHandler.GetExternal

GetExternal()

Description of GetExternal.


PyIDocHostUIHandler.GetHostInfo

GetHostInfo()

Description of GetHostInfo.


PyIDocHostUIHandler.GetOptionKeyPath

GetOptionKeyPath(dw)

Description of GetOptionKeyPath.

Parameters

dw : int

Description for dw


PyIDocHostUIHandler.HideUI

HideUI()

Description of HideUI.


PyIDocHostUIHandler.OnDocWindowActivate

OnDocWindowActivate(fActivate)

Description of OnDocWindowActivate.

Parameters

fActivate : int

Description for fActivate


PyIDocHostUIHandler.OnFrameWindowActivate

OnFrameWindowActivate(fActivate)

Description of OnFrameWindowActivate.

Parameters

fActivate : int

Description for fActivate


PyIDocHostUIHandler.ResizeBorder

ResizeBorder(prcBorder, pUIWindow, fRameWindow)

Description of ResizeBorder.

Parameters

prcBorder : (int, int, int, int)

Description for prcBorder

pUIWindow : PyIOleInPlaceUIWindow

Description for pUIWindow

fRameWindow : int

Description for fRameWindow


PyIDocHostUIHandler.ShowContextMenu

ShowContextMenu(dwID, pt, pcmdtReserved, pdispReserved)

Description of ShowContextMenu.

Parameters

dwID : int

Description for dwID

pt : (int, int)

Description for ppt

pcmdtReserved : PyIUnknown

Description for pcmdtReserved

pdispReserved : PyIDispatch

Description for pdispReserved


PyIDocHostUIHandler.ShowUI

ShowUI(dwID, pActiveObject, pCommandTarget, pFrame, pDoc)

Description of ShowUI.

Parameters

dwID : int

Description for dwID

pActiveObject : PyIOleInPlaceActiveObject

Description for pActiveObject

pCommandTarget : PyIOleCommandTarget

Description for pCommandTarget

pFrame : PyIOleInPlaceFrame

Description for pFrame

pDoc : PyIOleInPlaceUIWindow

Description for pDoc


PyIDocHostUIHandler.TranslateAccelerator

TranslateAccelerator(lpMsg, pguidCmdGroup, nCmdID)

Description of TranslateAccelerator.

Parameters

lpMsg : PyLPMSG

Description for lpMsg

pguidCmdGroup : PyIID

Description for pguidCmdGroup

nCmdID : int

Description for nCmdID


PyIDocHostUIHandler.TranslateUrl

TranslateUrl(dwTranslate, pchURLIn)

Description of TranslateUrl.

Parameters

dwTranslate : int

Description for dwTranslate

pchURLIn : unicode

Description for pchURLIn


PyIDocHostUIHandler.UpdateUI

UpdateUI()

Description of UpdateUI.


PyIDropSource

PyIDropSource Object

Description of the interface

Methods

QueryContinueDrag
Description of QueryContinueDrag

GiveFeedback
Description of GiveFeedback


PyIDropSource.GiveFeedback

GiveFeedback(dwEffect)

Description of GiveFeedback.

Parameters

dwEffect : int

Description for dwEffect


PyIDropSource.QueryContinueDrag

QueryContinueDrag(fEscapePressed, grfKeyState)

Description of QueryContinueDrag.

Parameters

fEscapePressed : int

Description for fEscapePressed

grfKeyState : int

Description for grfKeyState


PyIDropTarget

PyIDropTarget Object

Interface that acts as a target of OLE drag and drop operations

Methods

DragEnter
Called when an object is initially dragged into a window

DragOver
Called as the dragged object moves over the window

DragLeave
Called as the object is dragged back out of the window

Drop
Called when the object is dropped onto the window


PyIDropTarget.DragEnter

int = DragEnter(pDataObj, grfKeyState , pt , pdwEffect )

Called when an object is initially dragged into a window

Parameters

pDataObj : PyIDataObject

IDataObject interface that contains the object being dragged

grfKeyState : int

Combination of win32con.MK_* flags containing keyboard modifier state

pt : (int, int)

(x,y) Screen coordinates of cursor

pdwEffect : int

shellcon.DROPEFFECT_* value

Return Value

Your implementation of this function should return a shellcon.DROPEFFECT_* value indicating if the object can be accepted


PyIDropTarget.DragLeave

DragLeave()

Called as the object is dragged back out of the window


PyIDropTarget.DragOver

int = DragOver(grfKeyState, pt , pdwEffect )

Called as the dragged object moves over the window

Parameters

grfKeyState : int

Combination of win32con.MK_* flags containing keyboard modifier state

pt : (int, int)

(x,y) Screen coordinates of cursor

pdwEffect : int

shellcon.DROPEFFECT_* value

Return Value

Your implementation of this function should return a shellcon.DROPEFFECT_* value indicating if the object can be accepted at the current position


PyIDropTarget.Drop

int = Drop(pDataObj, grfKeyState , pt , dwEffect )

Called when the object is dropped onto the window

Parameters

pDataObj : PyIDataObject

IDataObject interface containing the dropped object

grfKeyState : int

Combination of win32con.MK_* flags containing keyboard modifier state

pt : (int, int)

(x,y) Screen coordinates of cursor

dwEffect : int

shellcon.DROPEFFECT_* value

Return Value

Your implementation of this function should return one of the shellcon.DROPEFFECT_* values


PyIDropTargetHelper

PyIDropTargetHelper Object

Description of the interface

Methods

DragEnter
Description of DragEnter

DragOver
Description of DragOver

DragLeave
Description of DragLeave

Drop
Description of Drop


PyIDropTargetHelper.DragEnter

DragEnter(hwnd, pDataObj, pt, dwEffect)

Description of DragEnter.

Parameters

hwnd : PyHANDLE

Handle to target window

pDataObj : PyIDataObject

Object that is dragged onto the window

pt : (int, int)

Coordinates where drag operation entered the window

dwEffect : int

One of shellcon.DROPEFFECT_* values


PyIDropTargetHelper.DragLeave

DragLeave()

Description of DragLeave.


PyIDropTargetHelper.DragOver

DragOver(hwnd, pt, pdwEffect)

Description of DragOver.

Parameters

hwnd : int

pt : (int, int)

Description for pt

pdwEffect : int

Description for pdwEffect


PyIDropTargetHelper.Drop

Drop(pDataObj, pt, dwEffect)

Description of Drop.

Parameters

pDataObj : PyIDataObject

Description for pDataObj

pt : (int, int)

Description for pt

dwEffect : int

Description for dwEffect


PyIDsObjectPicker

PyIDsObjectPicker Object

A COM interface to ADSI's IDsObjectPicker interface.
Derived from PyIUnknown

Methods

Initialize
Initializes the IDsObjectPicker interface with information about the scopes, filters, and options used by the object picker dialog box.

InvokeDialog
Displays a modal object picker dialog box and returns the user's selections.


PyIDsObjectPicker.Initialize

Initialize(targetComputer, scopeInfos, options, attrNames)

Initializes the IDsObjectPicker interface with information about the scopes, filters, and options used by the object picker dialog box.

Parameters

targetComputer : PyUnicode

scopeInfos : PyDSOP_SCOPE_INIT_INFOs

options=0 : int

attrNames=None : [PyUnicode, ...]


PyIDsObjectPicker.InvokeDialog

PyIDataObject = InvokeDialog(hwnd)

Displays a modal object picker dialog box and returns the user's selections.

Parameters

hwnd : int


PyIEmptyVolumeCache

PyIEmptyVolumeCache Object

Used for cleaning up temporary file ("disk cleanup")

Comments

This is a "gateway" object only - you can only implement this interface - see the shell/demos/server/empty_volume_cache.py. The methods described here are the methods you must implement - you can't call them.
Please contribute to these docs!

Methods

PyIEmptyVolumeCache
Initialize

PyIEmptyVolumeCache
GetSpaceUsed

PyIEmptyVolumeCache
Purge

PyIEmptyVolumeCache
ShowProperties

PyIEmptyVolumeCache2
InitializeEx

Gateway Implementation


PyIEmptyVolumeCache2

PyIEmptyVolumeCache2 Object

See also PyIEmptyVolumeCache

Methods

PyIEmptyVolumeCache
Deactivate


PyIEmptyVolumeCache2.InitializeEx

InitializeEx()


PyIEmptyVolumeCacheCallBack

PyIEmptyVolumeCacheCallBack Object

Callback used by PyIEmptyVolumeCacheCallBack

Methods

ScanProgress
Description of ScanProgress

PurgeProgress
Description of PurgeProgress


PyIEmptyVolumeCacheCallBack.PurgeProgress

PurgeProgress(dwlSpaceFreed, spaceFreed, spaceToFree, flags, status)

Description of PurgeProgress.

Parameters

dwlSpaceFreed : PyDWORDLONG

Description for dwlSpaceFreed

spaceFreed : long

spaceToFree : long

flags : long

status : unicode


PyIEmptyVolumeCacheCallBack.ScanProgress

ScanProgress(dwlSpaceUsed, dwFlags, pcwszStatus)

Description of ScanProgress.

Parameters

dwlSpaceUsed : long

Description for dwlSpaceUsed

dwFlags : int

Description for dwFlags

pcwszStatus : unicode

Description for pcwszStatus


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.

Based On

PyIUnknown


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.

Based On

PyIUnknown


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.

Based On

PyIUnknown


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.


PyIEnumContextProps

PyIEnumContextProps Object

A Python interface to IEnumContextProps

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.


PyIEnumContextProps.Clone

PyIEnumContextProps = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumContextProps.Next

((PyIID, int, PyIUnknown), ...) = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.

Return Value

Returns a tuple of 3-tuples representing ContextProperty structs:
First item is GUID identifying the property, second is Flags (reserved), third is the interface set as the property value


PyIEnumContextProps.Reset

Reset()

Resets the enumeration sequence to the beginning.


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


PyIEnumExplorerCommand

PyIEnumExplorerCommand Object

A Python interface to IEnumExplorerCommand

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.


PyIEnumExplorerCommand.Clone

PyIEnumExplorerCommand = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumExplorerCommand.Next

object = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.


PyIEnumExplorerCommand.Reset

Reset()

Resets the enumeration sequence to the beginning.


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

Based On

PyIUnknown


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.

Based On

PyIUnknown


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.


PyIEnumObjects

PyIEnumObjects Object

Iterates through a number of arbitrary interfaces

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.


PyIEnumObjects.Clone

PyIEnumObjects = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumObjects.Next

(PyIUnknown,...) = Next(num, riid )

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.

riid=IID_IUnknown : PyIID

The interfaces to return


PyIEnumObjects.Reset

Reset()

Resets the enumeration sequence to the beginning.


PyIEnumObjects.Skip

Skip()

Skips over the next specified elementes.


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.


PyIEnumResources

PyIEnumResources Object

A Python interface to IEnumResources

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.


PyIEnumResources.Clone

PyIEnumResources = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumResources.Next

object = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.


PyIEnumResources.Reset

Reset()

Resets the enumeration sequence to the beginning.


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

An enumerator for elements contained in a PyIStorage object

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.

Based On

PyIUnknown


PyIEnumSTATSTG.Clone

PyIEnumSTATSTG = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumSTATSTG.Next

(STATSTG, ...) = 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.


PyIEnumShellItems

PyIEnumShellItems Object

A Python interface to IEnumShellItems

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.


PyIEnumShellItems.Clone

PyIEnumShellItems = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumShellItems.Next

(PyIShellItem,...) = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.


PyIEnumShellItems.Reset

Reset()

Resets the enumeration sequence to the beginning.


PyIEnumShellItems.Skip

Skip()

Skips over the next specified elementes.


PyIEnumString

PyIEnumString Object

An enumerator interface to list strings

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.

Based On

PyIUnknown


PyIEnumString.Clone

PyIEnumString = Clone()

Creates another enumerator that contains the same enumeration state as the current one


PyIEnumString.Next

(PyUnicode,...) = Next(num)

Retrieves a specified number of items in the enumeration sequence.

Parameters

num=1 : int

Number of items to retrieve.


PyIEnumString.Reset

Reset()

Resets the enumeration sequence to the beginning.


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

Based On

PyIUnknown


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


PyIExplorerBrowser

PyIExplorerBrowser Object

Description of the interface

Methods

Initialize
Description of Initialize

Destroy
Description of Destroy

SetRect
Description of SetRect

SetPropertyBag
Description of SetPropertyBag

SetEmptyText
Description of SetEmptyText

SetFolderSettings
Description of SetFolderSettings

Advise
Description of Advise

Unadvise
Description of Unadvise

SetOptions
Description of SetOptions

GetOptions
Description of GetOptions

BrowseToIDList
Description of BrowseToIDList

BrowseToObject
Description of BrowseToObject

FillFromObject
Description of FillFromObject

RemoveAll
Description of RemoveAll

GetCurrentView
Description of GetCurrentView


PyIExplorerBrowser.Advise

int = Advise(psbe)

Description of Advise.

Parameters

psbe : PyIExplorerBrowserEvents

Description for psbe


PyIExplorerBrowser.BrowseToIDList

BrowseToIDList(pidl, uFlags)

Description of BrowseToIDList.

Parameters

pidl : PyPCUIDLIST_RELATIVE

Description for pidl

uFlags : int

Description for uFlags


PyIExplorerBrowser.BrowseToObject

BrowseToObject(punk, uFlags)

Description of BrowseToObject.

Parameters

punk : PyIUnknown

Description for punk

uFlags : int

Description for uFlags


PyIExplorerBrowser.Destroy

Destroy()

Description of Destroy.


PyIExplorerBrowser.FillFromObject

FillFromObject(punk, dwFlags)

Description of FillFromObject.

Parameters

punk : PyIUnknown

Description for punk

dwFlags : PyEXPLORER_BROWSER_FILL_FLAGS

Description for dwFlags


PyIExplorerBrowser.GetCurrentView

PyIUnknown = GetCurrentView(riid)

Description of GetCurrentView.

Parameters

riid : PyIID

Description for riid


PyIExplorerBrowser.GetOptions

int = GetOptions()

Description of GetOptions.


PyIExplorerBrowser.Initialize

Initialize(hwndParent, prc, pfs)

Description of Initialize.

Parameters

hwndParent : HWND

Description for hwndParent

prc : PyRECT

Description for prc

pfs : PyFOLDERSETTINGS

Description for pfs


PyIExplorerBrowser.RemoveAll

RemoveAll()

Description of RemoveAll.


PyIExplorerBrowser.SetEmptyText

SetEmptyText(EmptyText)

Description of SetEmptyText.

Parameters

EmptyText : str

Description for pszEmptyText


PyIExplorerBrowser.SetFolderSettings

SetFolderSettings(pfs)

Description of SetFolderSettings.

Parameters

pfs : PyFOLDERSETTINGS

Description for pfs


PyIExplorerBrowser.SetOptions

SetOptions(dwFlag)

Description of SetOptions.

Parameters

dwFlag : PyEXPLORER_BROWSER_OPTIONS

Description for dwFlag


PyIExplorerBrowser.SetPropertyBag

SetPropertyBag(PropertyBag)

Description of SetPropertyBag.

Parameters

PropertyBag : str

Description for pszPropertyBag


PyIExplorerBrowser.SetRect

PyHANDLE = SetRect(hdwp, rcBrowser )

Description of SetRect.

Parameters

hdwp : PyHDWP

Description for phdwp

rcBrowser : PyRECT

Description for rcBrowser


PyIExplorerBrowser.Unadvise

Unadvise(dwCookie)

Description of Unadvise.

Parameters

dwCookie : int

Description for dwCookie


PyIExplorerBrowserEvents

PyIExplorerBrowserEvents Object

Description of the interface

Methods

OnNavigationPending
Description of OnNavigationPending

OnViewCreated
Description of OnViewCreated

OnNavigationComplete
Description of OnNavigationComplete

OnNavigationFailed
Description of OnNavigationFailed


PyIExplorerBrowserEvents.OnNavigationComplete

OnNavigationComplete(pidlFolder)

Description of OnNavigationComplete.

Parameters

pidlFolder : PyPCIDLIST_ABSOLUTE

Description for pidlFolder


PyIExplorerBrowserEvents.OnNavigationFailed

OnNavigationFailed(pidlFolder)

Description of OnNavigationFailed.

Parameters

pidlFolder : PyPCIDLIST_ABSOLUTE

Description for pidlFolder


PyIExplorerBrowserEvents.OnNavigationPending

OnNavigationPending(pidlFolder)

Description of OnNavigationPending.

Parameters

pidlFolder : PyPCIDLIST_ABSOLUTE

Description for pidlFolder


PyIExplorerBrowserEvents.OnViewCreated

OnViewCreated(psv)

Description of OnViewCreated.

Parameters

psv : PyIShellView

Description for psv


PyIExplorerCommand

PyIExplorerCommand Object

Description of the interface

Methods

GetTitle
Description of GetTitle

GetIcon
Description of GetIcon

GetToolTip
Description of GetToolTip

GetCanonicalName
Description of GetCanonicalName

GetState
Description of GetState

Invoke
Description of Invoke

GetFlags
Description of GetFlags

EnumSubCommands
Description of EnumSubCommands


PyIExplorerCommand.EnumSubCommands

PyIEnumExplorerCommand = EnumSubCommands()

Description of EnumSubCommands.


PyIExplorerCommand.GetCanonicalName

PyIID = GetCanonicalName()

Description of GetCanonicalName.


PyIExplorerCommand.GetFlags

int = GetFlags()

Description of GetFlags.


PyIExplorerCommand.GetIcon

unicode = GetIcon(psiItemArray)

Description of GetIcon.

Parameters

psiItemArray : PyIShellItemArray

Description for psiItemArray


PyIExplorerCommand.GetState

int = GetState(psiItemArray, fOkToBeSlow )

Description of GetState.

Parameters

psiItemArray : PyIShellItemArray

Description for psiItemArray

fOkToBeSlow : int

Description for fOkToBeSlow


PyIExplorerCommand.GetTitle

unicode = GetTitle(psiItemArray)

Description of GetTitle.

Parameters

psiItemArray : PyIShellItemArray

Description for psiItemArray


PyIExplorerCommand.GetToolTip

unicode = GetToolTip(psiItemArray)

Description of GetToolTip.

Parameters

psiItemArray : PyIShellItemArray

Description for psiItemArray


PyIExplorerCommand.Invoke

Invoke(psiItemArray, pbc)

Description of Invoke.

Parameters

psiItemArray : PyIShellItemArray

Description for psiItemArray

pbc : PyIBindCtx

Description for pbc


PyIExplorerCommandProvider

PyIExplorerCommandProvider Object

This is a gateway only interface.


PyIExplorerPaneVisibility

PyIExplorerPaneVisibility Object

Description of the interface

Methods

Extract
Description of Extract


PyIExplorerPaneVisibility.GetPaneState

int = GetPaneState(ep)

Description of Extract.

Parameters

ep : guid

Description for ep


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

Based On

PyIUnknown


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

Return Value

The result is (hicon_large, hicon_small), or (None,None) if the underlying function returns S_FALSE, indicating the calling application should extract it.


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


PyIExtractIconW

PyIExtractIconW Object

Description of the interface

Methods

Extract
Description of Extract

GetIconLocation
Description of GetIconLocation


PyIExtractIconW.Extract

Extract(pszFile, nIconIndex, nIconSize)

Description of Extract.

Parameters

pszFile : unicode

Description for pszFile

nIconIndex : int

Description for nIconIndex

nIconSize : int

Description for nIconIndex

Return Value

The result is (hicon_large, hicon_small), or (None,None) if the underlying function returns S_FALSE, indicating the calling application should extract it.


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


PyIExtractImage

PyIExtractImage Object

Description of the interface

Methods

GetLocation
Description of GetLocation

Extract
Description of Extract


PyIExtractImage.Extract

Extract()

Description of Extract.


PyIExtractImage.GetLocation

GetLocation(dwPriority, size, dwRecClrDepth, pdwFlags)

Description of GetLocation.

Parameters

dwPriority : int

Description for dwPriority

size : (int, int)

Description for prgSize

dwRecClrDepth : int

Description for dwRecClrDepth

pdwFlags : int

Description for pdwFlags


PyIFileOperation

PyIFileOperation Object

Interface used to build a collection of file system modifications to be performed by the shell as a unit. Serves as a replacement for shell::SHFileOperation.
No changes are actually made until PerformOperations is called.
Progress can be monitored by implementing PyGFileOperationProgressSink.
Requires Vista or later.

Methods

Advise
Connects an event sink to receive updates

Unadvise
Disconnects a progress sink

SetOperationFlags
Sets option flags

SetProgressMessage
Not implemented

SetProgressDialog
Provides an interface used to display progress

SetProperties
Specifies a set of properties to be changed

SetOwnerWindow
Sets the parent window for any UI displayed.

ApplyPropertiesToItem
Specifies the item that will receive property changes

ApplyPropertiesToItems
Specifies multiple items that will receive property changes

RenameItem
Adds a rename to the operation sequence

RenameItems
Adds multiple renames to the operation sequence

MoveItem
Adds a move operation to the configuration

MoveItems
Adds multiple move operations to the configuration

CopyItem
Adds a copy operation to the configuration

CopyItems
Adds multiple copy operations to the configuration

DeleteItem
Adds a delete operation to the configuration

DeleteItems
Adds multiple delete operations to the configuration

NewItem
Creates a new file as part of the operation

PerformOperations
Effects all configured file system modifications

GetAnyOperationsAborted
Determines if any operations were terminated


PyIFileOperation.Advise

int = Advise(Sink)

Connects an event sink to receive updates

Parameters

Sink : PyGFileOperationProgressSink

Interface that receives progress updates

Return Value

Returns a cookie to be passed to PyIFileOperation::Unadvise to disconnect


PyIFileOperation.ApplyPropertiesToItem

ApplyPropertiesToItem(Item)

Specifies the item that will receive property changes

Parameters

Item : PyIShellItem

The item to which property changes will be applied


PyIFileOperation.ApplyPropertiesToItems

ApplyPropertiesToItems(Items)

Specifies multiple items that will receive property changes

Parameters

Items : PyIUnknown

PyIShellItemArray, PyIDataObject, or PyIEnumShellItems containing the target items


PyIFileOperation.CopyItem

CopyItem(Item, DestinationFolder, CopyName, Sink)

Adds a copy operation to the configuration

Parameters

Item : PyIShellItem

Item to be copied

DestinationFolder : PyIShellItem

Folder into which it will be copied

CopyName=None : str

New name for the copied file, use None to keep original name

Sink=None : PyGFileOperationProgressSink

Progress sink for just this operation


PyIFileOperation.CopyItems

CopyItems(Items, DestinationFolder)

Adds multiple copy operations to the configuration

Parameters

Items : PyIUnknown

PyIShellItemArray, PyIDataObject, or PyIEnumShellItems containing items to be copied

DestinationFolder : PyIShellItem

Folder into which they will be copied


PyIFileOperation.DeleteItem

DeleteItem(Item, Sink)

Adds a delete operation to the configuration

Parameters

Item : PyIShellItem

Description for psiItem

Sink=None : PyGFileOperationProgressSink

Progress sink for just this operation


PyIFileOperation.DeleteItems

DeleteItems(Items)

Adds multiple delete operations to the configuration

Parameters

Items : PyIUnknown

PyIShellItemArray, PyIDataObject, or PyIEnumShellItems containing the items to be deleted


PyIFileOperation.GetAnyOperationsAborted

boolean = GetAnyOperationsAborted()

Determines if any operations were terminated


PyIFileOperation.MoveItem

MoveItem(Item, DestinationFolder, pszNewName, Sink)

Adds a move operation to the configuration

Parameters

Item : PyIShellItem

The item to be moved

DestinationFolder : PyIShellItem

The folder into which it will be moved

pszNewName=None : str

Name to be given to moved item, use None to keep original name

Sink=None : PyGFileOperationProgressSink

Progress sink to receive notification for just this operation


PyIFileOperation.MoveItems

MoveItems(Items, DestinationFolder)

Adds multiple move operations to the configuration

Parameters

Items : PyIUnknown

PyIShellItemArray, PyIDataObject, or PyIEnumShellItems containing the items to be moved

DestinationFolder : PyIShellItem

Folder into which all items will be moved


PyIFileOperation.NewItem

NewItem(DestinationFolder, FileAttributes, Name, TemplateName, Sink)

Creates a new file as part of the operation

Parameters

DestinationFolder : PyIShellItem

Folder in which to create the file

FileAttributes : int

Combination of win32con.FILE_ATTRIBUTE_* flags

Name : str

Name of the new file

TemplateName=None : str

Template file used to initialize the new file

Sink=None : PyGFileOperationProgressSink

Progress sink for just this operation


PyIFileOperation.PerformOperations

PerformOperations()

Effects all configured file system modifications


PyIFileOperation.RenameItem

RenameItem(Item, NewName, Sink)

Adds a rename to the operation sequence

Parameters

Item : PyIShellItem

The item to be renamed

NewName : str

The new name

Sink=None : PyGFileOperationProgressSink

Progress sink for this operation only.


PyIFileOperation.RenameItems

RenameItems(pUnkItems, NewName)

Adds multiple renames to the operation sequence

Parameters

pUnkItems : PyIUnknown

PyIShellItemArray, PyIDataObject, or PyIEnumShellItems containing items to be renamed

NewName : str

New name for all items. Collisions handled automatically.


PyIFileOperation.SetOperationFlags

SetOperationFlags(OperationFlags)

Sets option flags for the operation

Parameters

OperationFlags : int

Combination of shellcon.FOF_* and FOFX_* flags


PyIFileOperation.SetOwnerWindow

SetOwnerWindow(Owner)

Sets the parent window for any UI displayed.

Parameters

Owner : PyHANDLE

Handle to parent window


PyIFileOperation.SetProgressDialog

SetProgressDialog(popd)

Provides an interface used to display a progress dialog

Parameters

popd : PyIOperationsProgressDialog

Progress dialog interface

Comments

IOperationsProgressDialog is not yet supported


PyIFileOperation.SetProgressMessage

SetProgressMessage(Message)

Not implemented.

Parameters

Message : str

Description for Message


PyIFileOperation.SetProperties

SetProperties(proparray)

Specifies a set of properties to be changed.

Parameters

proparray : PyIPropertyChangeArray

Sequence of property changes to be performed (see propsys::PSCreatePropertyChangeArray)

Comments

Note that these properties will be set for *any* files created by the operation, not just items passed to ApplyPropertiesToItem(s). New items created as the result of a rename, copy, or move must have a property handler, or the operation fails with the vague
com_error: (-2147467259, 'Unspecified error', None, None) (E_FAIL, or 0x80004005 in hex) even though the given file operation was actually performed.


PyIFileOperation.Unadvise

Unadvise(Cookie)

Disconnects a progress sink

Parameters

Cookie : int

Identifies the sink to disconnect, as returned by PyIFileOperation::Advise


PyIIdentityName

PyIIdentityName Object

Description of the interface

Based On

PyIRelatedItem


PyIInitializeWithFile

PyIInitializeWithFile Object

Initializes a property handler that requires a file path instead of a stream

Methods

Initialize
Passes a file path to a property handler on startup


PyIInitializeWithFile.Initialize

Initialize(FilePath, Mode)

Passes a file path to a property handler on startup

Parameters

FilePath : str

Full path to the file whose properties are to be accessed

Mode : int

Indicates if properties can be written, STGM_READ or STGM_READWRITE


PyIInitializeWithStream

PyIInitializeWithStream Object

Interface that initializes a handler capable of reading properties from a stream

Methods

Initialize
Initializes a property handler with a stream


PyIInitializeWithStream.Initialize

Initialize(Stream, Mode)

Initializes a property handler with a stream

Parameters

Stream : PyIStream

Stream containing the contents from which to extract properties

Mode : int

Indicates if stream is writable, STGM_READ or STGM_READWRITE


PyIInputObject

PyIInputObject Object

Description of the interface

Methods

TranslateAccelerator
Description of TranslateAccelerator

UIActivate
Description of UIActivate

HasFocusIO
Description of Refresh


PyIInputObject.HasFocusIO

HasFocusIO()

Description of Refresh.


PyIInputObject.TranslateAccelerator

TranslateAccelerator(pmsg)

Description of TranslateAccelerator.

Parameters

pmsg : tuple

Description for pmsg


PyIInputObject.UIActivate

UIActivate(uState)

Description of UIActivate.

Parameters

uState : int

Description for uState


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.


PyIInternetSecurityManager

PyIInternetSecurityManager Object

Description of the interface

Methods

SetSecuritySite
Description of SetSecuritySite

GetSecuritySite
Description of GetSecuritySite

MapUrlToZone
Description of MapUrlToZone

GetSecurityId
Description of GetSecurityId

ProcessUrlAction
Description of ProcessUrlAction { "QueryCustomPolicy", PyIInternetSecurityManager::QueryCustomPolicy, 1 },

SetZoneMapping
Description of SetZoneMapping

GetZoneMappings
Description of GetZoneMappings


PyIInternetSecurityManager.GetSecurityId

GetSecurityId(pwszUrl, pcbSecurityId)

Description of GetSecurityId.

Parameters

pwszUrl : unicode

Description for pwszUrl

pcbSecurityId : int

Description for pcbSecurityId


PyIInternetSecurityManager.GetSecuritySite

GetSecuritySite()

Description of GetSecuritySite.


PyIInternetSecurityManager.GetZoneMappings

GetZoneMappings(dwZone, dwFlags)

Description of GetZoneMappings.

Parameters

dwZone : int

Description for dwZone

dwFlags : int

Description for dwFlags


PyIInternetSecurityManager.MapUrlToZone

MapUrlToZone(pwszUrl, dwFlags)

Description of MapUrlToZone.

Parameters

pwszUrl : unicode

Description for pwszUrl

dwFlags : int

Description for dwFlags


PyIInternetSecurityManager.ProcessUrlAction

ProcessUrlAction(pwszUrl, dwAction, context, dwFlags)

Description of ProcessUrlAction.

Parameters

pwszUrl : unicode

Description for pwszUrl

dwAction : int

Description for dwAction

context : bytes

dwFlags : int

Description for dwFlags


PyIInternetSecurityManager.SetSecuritySite

SetSecuritySite(pSite)

Description of SetSecuritySite.

Parameters

pSite : PyIInternetSecurityMgrSite

Description for pSite


PyIInternetSecurityManager.SetZoneMapping

SetZoneMapping(dwZone, lpszPattern, dwFlags)

Description of SetZoneMapping.

Parameters

dwZone : int

Description for dwZone

lpszPattern : unicode

Description for lpszPattern

dwFlags : int

Description for dwFlags


PyIKnownFolder

PyIKnownFolder Object

Interface representing a known folder that serves as a replacement for the numeric CSIDL definitions and API functions. Requires Vista or later.

Methods

GetId
Returns the id of the folder

GetCategory
Returns the category for a folder (shellcon.KF_CATEGORY_*)

GetShellItem
Returns a shell interface for the folder

GetPath
Returns the path to the folder

SetPath
Changes the location of the folder

GetIDList
Returns the folder's location as an item id list

GetFolderType
Returns the type of the folder

GetRedirectionCapabilities
Returns flags indicating how the folder can be redirected

GetFolderDefinition
Retrieves detailed information about a known folder


PyIKnownFolder.GetCategory

int = GetCategory()

Returns the category for a folder (shellcon.KF_CATEGORY_*)


PyIKnownFolder.GetFolderDefinition

dict = GetFolderDefinition()

Retrieves detailed information about a known folder

Return Value

Returns a dict containing info from a KNOWNFOLDER_DEFINITION struct


PyIKnownFolder.GetFolderType

PyIID = GetFolderType()

Returns the type of the folder

Return Value

Returns a folder type guid (shell.FOLDERTYPEID_*)


PyIKnownFolder.GetId

PyIID = GetId()

Returns the id of the folder


PyIKnownFolder.GetIDList

PyIDL = GetIDList(Flags)

Returns the folder's location as an item id list.

Parameters

Flags : int

Combination of shellcon.KF_FLAG_* values that affect how the operation is performed


PyIKnownFolder.GetPath

str = GetPath(Flags)

Returns the path to the folder

Parameters

Flags=0 : int

Combination of shellcon.KF_FLAG_* flags controlling how the path is returned


PyIKnownFolder.GetRedirectionCapabilities

int = GetRedirectionCapabilities()

Returns flags indicating how the folder can be redirected

Return Value

Combination of shellcon.KF_REDIRECTION_CAPABILITIES_* flags


PyIKnownFolder.GetShellItem

PyIShellItem = GetShellItem(Flags, riid )

Returns a shell interface for the folder

Parameters

Flags=0 : int

Combination of shellcon.KF_FLAG_* values

riid=IID_IShellItem : PyIID

The interface to return (IShellItem or IShellItem2)


PyIKnownFolder.SetPath

SetPath(Flags, Path)

Changes the location of the folder

Parameters

Flags : int

KF_FLAG_DONT_UNEXPAND, or 0

Path : str

New path for known folder


PyIKnownFolderManager

PyIKnownFolderManager Object

Interface used to manage known folder definitions.

Methods

FolderIdFromCsidl
Returns the folder id that corresponds to a CSIDL

FolderIdToCsidl
Returns the CSIDL equivalent of a known folder

GetFolderIds
Retrieves all known folder ids.

GetFolder
Returns a folder by its id

GetFolderByName
Returns a folder by its canonical name

RegisterFolder
Defines a new known folder

UnregisterFolder
Removes the definition of a known folder

FindFolderFromPath
Retrieves a known folder by path

FindFolderFromIDList
Retrieves a known folder using its item id list.

Redirect
Redirects a known folder to an alternate location


PyIKnownFolderManager.FindFolderFromIDList

PyIKnownFolder = FindFolderFromIDList(pidl)

Retrieves a known folder using its item id list.

Parameters

pidl : PyIDL

Item id list of the folder


PyIKnownFolderManager.FindFolderFromPath

PyIKnownFolder = FindFolderFromPath(Path, Mode )

Retrieves a known folder by path

Parameters

Path : str

Path of a folder

Mode : int

FFFP_EXACTMATCH or FFFP_NEARESTPARENTMATCH


PyIKnownFolderManager.FolderIdFromCsidl

PyIID = FolderIdFromCsidl(Csidl)

Returns the folder id that corresponds to a CSIDL

Parameters

Csidl : int

The legacy CSIDL identifying a folder


PyIKnownFolderManager.FolderIdToCsidl

int = FolderIdToCsidl(id)

Returns the CSIDL equivalent of a known folder

Parameters

id : PyIID

A known folder id (shell.FOLDERID_*)


PyIKnownFolderManager.GetFolder

PyIKnownFolder = GetFolder(id)

Returns a folder by its id.

Parameters

id : PyIID

A known folder id (shell.FOLDERID_*)


PyIKnownFolderManager.GetFolderByName

PyIKnownFolder = GetFolderByName(Name)

Returns a folder by canonical name

Parameters

Name : str

The nonlocalized name of a known folder


PyIKnownFolderManager.GetFolderIds

(PyIID,...) = GetFolderIds()

Retrieves all known folder ids.


PyIKnownFolderManager.Redirect

Redirect(id, hwnd, flags, TargetPath, Exclusion)

Redirects a known folder to an alternate location

Parameters

id : PyIID

Id of the known folder to be redirected

hwnd : PyHANDLE

Handle of window to be used for user interaction

flags : int

Combination of KF_REDIRECT_* flags

TargetPath : str

Path to which the known folder will be redirected

Exclusion : (PyIID,...)

Sequence of known folder ids of subfolders to be excluded from redirection


PyIKnownFolderManager.RegisterFolder

RegisterFolder(id, Definition)

Defines a new known folder

Parameters

id : PyIID

GUID used to identify the new known folder

Definition : dict

Dictionary containing info to be placed in a KNOWNFOLDER_DEFINITION struct

Comments

PyIKnownFolder::GetFolderDefinition can be used to get a template dictionary


PyIKnownFolderManager.UnregisterFolder

UnregisterFolder(id)

Removes the definition of a known folder

Parameters

id : PyIID

GUID of a known folder to be unregistered


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.

Based On

PyIUnknown


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 code for the object.

CreateFolder
Creates a folder object.

CreateMessage
Creates a message in a folder

CopyMessages
Copies the specified messages

DeleteFolder
Deletes a subfolder.

DeleteMessages
Deletes the specified messages.

EmptyFolder
deletes all messages and subfolders from a folder without deleting the folder itself.

SetReadFlags
Sets or clears the MSGFLAG_READ flag in the PR_MESSAGE_FLAGS (PidTagMessageFlags) property of one or more of the folder's messages, and manages the sending of read reports.


PyIMAPIFolder.CopyMessages

int = 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=None : string

A comment for the folder or None

iid=None : PyIID

The IID of the object to return. Should usually be None.

flags=0 : 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.DeleteFolder

DeleteFolder(entryId, uiParam, progress)

Deletes a subfolder.

Parameters

entryId : string

The EntryID of the subfolder to delete.

uiParam : long

Handle of the parent window of the progress indicator.

progress : PyIMAPIProgress

A progress object, or None


PyIMAPIFolder.DeleteMessages

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

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

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.


PyIMAPIFolder.SetReadFlags

SetReadFlags(msgs, uiParam, progress, flag)

Sets or clears the MSGFLAG_READ flag in the PR_MESSAGE_FLAGS (PidTagMessageFlags) property of one or more of the folder's messages, and manages the sending of read reports.

Parameters

msgs : PySBinaryArray

uiParam : int

A HWND for the progress

progress : PyIMAPIProgress

A progress object, or None

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.


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, uiParam , progress , resultIID , dest , flags , wantProblems )

Copies a set of properties to another object

Parameters

propTags : PySPropTagArray

The property tags to copy

uiParam : int

Handle to the parent window of the progress object

progress : None

Reserved - must pass None

resultIID : PyIID

IID of the destination object

dest : PyIMAPIProp

The destination object

flags : int

flags

wantProblems=False : bool

Return detailed error information


PyIMAPIProp.CopyTo

int, [problems, ] = CopyTo(IIDExcludeList, propTags , uiParam , progress , resultIID , dest , flags , wantProblems )

Copies an object to another

Parameters

IIDExcludeList : [PyIID, ]

A sequence of IIDs to exclude.

propTags : PySPropTagArray

The property tags to exclude.

uiParam : int

Handle to the parent window of the progress object

progress : None

Reserved - must pass None

resultIID : PyIID

IID of the destination object

dest : PyIMAPIProp

The destination object

flags : int

flags

wantProblems=False : bool

Return detailed error information


PyIMAPIProp.DeleteProps

int, [problems, ] = DeleteProps(propList, wantProblems )

Deletes a set of properties.

Parameters

propList : PySPropTagArray

The list of properties

wantProblems=False : bool

Return detailed error information


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 : ULONG

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

Sets a set of properties.

Parameters

propList : [PySPropValue, ]

The list of properties

wantProblems=False : bool

Return detailed error information


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.

Advise

Unadvise

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 code for the 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

AdminServices
Provides access to a message service administration object for making changes to the message services.


PyIMAPISession.AdminServices

PyIMsgServiceAdmin = AdminServices(flags)

Provides access to a message service administration object for making changes to the message services.

Parameters

flags=0 : int

reserved; must be zero.


PyIMAPISession.Advise

int = Advise(entryId, mask , sink )

Parameters

entryId : string

The entryID of the object

mask : int

sink : PyIMAPIAdviseSink

Return Value

The result is an integer which should be passed to PyIMAPISession::Unadvise


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


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.


PyIMAPISession.Unadvise

Unadvise(connection)

Parameters

connection : int

Value returned from PyIMAPISession::Advise


PyIMAPIStatus

PyIMAPIStatus Object

Provides status information about the MAPI subsystem, the integrated address book and the MAPI spooler.
Derived from PyIMAPIProp

Methods

ChangePassword

SettingsDialog

ValidateState

FlushQueues

FlushQueues


PyIMAPIStatus.ChangePassword

ChangePassword(oldPassword, newPassword, ulFlags)

Parameters

oldPassword : unicode

newPassword : unicode

ulFlags : int


PyIMAPIStatus.FlushQueues

FlushQueues(ulUIParam, transport, ulFlags)

Parameters

ulUIParam : int

transport : string

Blob of data

ulFlags : int


PyIMAPIStatus.FlushQueues

FlushQueues(uiparam, entryID, flags)

Parameters

uiparam : int

entryID : string

A blob

flags : int


PyIMAPIStatus.SettingsDialog

SettingsDialog(ulUIParam, ulFlags)

Parameters

ulUIParam : int

ulFlags : int


PyIMAPIStatus.ValidateState

ValidateState(ulUIParam, ulFlags)

Parameters

ulUIParam : int

ulFlags : int


PyIMAPITable

PyIMAPITable Object

An COM interface to MAPI
Derived from PyIUnknown

Methods

GetLastError
Returns the last error code for the object.

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.

Unadvise
Cancels the sending of notifications previously set up with a call to the IMAPITable::Advise method.


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


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


PyIMAPITable.Unadvise

Unadvise(handle)

Cancels the sending of notifications previously set up with a call to the IMAPITable::Advise method.

Parameters

handle : int

Handle returned from PyIMAPITable::Advise


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


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.

Based On

PyIPersistStream


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

GetLastError
Returns the last error code for the object.

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

AdminProviders
Returns an object providing access to a provider administration object.


PyIMsgServiceAdmin.AdminProviders

PyIProfSect = AdminProviders(uuid, flags )

Returns an object providing access to a provider administration object.

Parameters

uuid : PyIID

The ID of the service

flags : int


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, uiParam, flags)

Creates a message service.

Parameters

serviceName : string

The name of the service.

displayName : string

Display name of the service, or None

uiParam=0 : int

A handle of the parent window for any dialog boxes or windows that this method displays.

flags : int

A bitmask of flags that controls how the message service is installed.


PyIMsgServiceAdmin.DeleteMsgService

DeleteMsgService(uuid)

Deletes the specified service

Parameters

uuid : PyIID

The ID of the service


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


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.

Comments

This is deprecated, and there is no replacement referenced to use instead.


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 code for the object.

AbortSubmit
Attempts to remove a message from the outgoing queue.

Advise
Registers to receive notification of specified events that affect the message store.

Unadvise
Cancels the sending of notifications previously set up with a call to the IMsgStore::Advise method.


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

Advise(entryId, eventMask, adviseSink)

Registers to receive notification of specified events that affect the message store.

Parameters

entryId : string

entry identifier of the folder or message about which notifications should be generated, or None

eventMask : int

A mask of values that indicate the types of notification events.

adviseSink : PyIMAPIAdviseSink

An advise sink.


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

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.


PyIMsgStore.GetReceiveFolder

PyIID, string = GetReceiveFolder(messageClass, 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

messageClass=None : string

Message class that is associated with a receive folder. If this parameter is set to None or an empty string, GetReceiveFolder returns the default receive folder for the message store.

flags=0 : 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.


PyIMsgStore.Unadvise

Unadvise(connection)

Cancels the sending of notifications previously set up with a call to the IMsgStore::Advise method.

Parameters

connection : int

Connection number returned from PyIMsgStore::Advise


PyINameSpaceTreeControl

PyINameSpaceTreeControl Object

Description of the interface

Methods

Initialize
Description of Initialize

TreeAdvise
Description of TreeAdvise

TreeUnadvise
Description of TreeUnadvise

AppendRoot
Description of AppendRoot

InsertRoot
Description of InsertRoot

RemoveRoot
Description of RemoveRoot

RemoveAllRoots
Description of RemoveAllRoots

GetRootItems
Description of GetRootItems

SetItemState
Description of SetItemState

GetItemState
Description of GetItemState

GetSelectedItems
Description of GetSelectedItems

GetItemCustomState
Description of GetItemCustomState

SetItemCustomState
Description of SetItemCustomState

EnsureItemVisible
Description of EnsureItemVisible

SetTheme
Description of SetTheme

GetNextItem
Description of GetNextItem

HitTest
Description of HitTest

GetItemRect
Description of GetItemRect

CollapseAll
Description of CollapseAll


PyINameSpaceTreeControl.AppendRoot

AppendRoot(psiRoot, grfEnumFlags, grfRootStyle, pif)

Description of AppendRoot.

Parameters

psiRoot : PyIShellItem

Description for psiRoot

grfEnumFlags : int

Description for grfEnumFlags

grfRootStyle : int

Description for grfRootStyle

pif : PyIShellItemFilter

Description for pif


PyINameSpaceTreeControl.CollapseAll

CollapseAll()

Description of CollapseAll.


PyINameSpaceTreeControl.EnsureItemVisible

EnsureItemVisible(psi)

Description of EnsureItemVisible.

Parameters

psi : PyIShellItem

Description for psi


PyINameSpaceTreeControl.GetItemCustomState

GetItemCustomState(psi)

Description of GetItemCustomState.

Parameters

psi : PyIShellItem

Description for psi


PyINameSpaceTreeControl.GetItemRect

GetItemRect()

Description of GetItemRect.


PyINameSpaceTreeControl.GetItemState

GetItemState(psi, nstcisMask)

Description of GetItemState.

Parameters

psi : PyIShellItem

Description for psi

nstcisMask : int

Description for nstcisMask


PyINameSpaceTreeControl.GetNextItem

GetNextItem(psi, nstcgi)

Description of GetNextItem.

Parameters

psi : PyIShellItem

Description for psi

nstcgi : int

Description for nstcgi


PyINameSpaceTreeControl.GetRootItems

GetRootItems()

Description of GetRootItems.


PyINameSpaceTreeControl.GetSelectedItems

GetSelectedItems()

Description of GetSelectedItems.


PyINameSpaceTreeControl.HitTest

HitTest(pt)

Description of HitTest.

Parameters

pt : (int, int)

Description for ppt


PyINameSpaceTreeControl.Initialize

Initialize(hwndParent, prc, nsctsFlags)

Description of Initialize.

Parameters

hwndParent : int/long

Description for hwndParent

prc : (int, int, int, int)

Description for prc

nsctsFlags : int

Description for nsctsFlags


PyINameSpaceTreeControl.InsertRoot

InsertRoot(iIndex, psiRoot, grfEnumFlags, grfRootStyle, pif)

Description of InsertRoot.

Parameters

iIndex : int

Description for iIndex

psiRoot : PyIShellItem

Description for psiRoot

grfEnumFlags : int

Description for grfEnumFlags

grfRootStyle : int

Description for grfRootStyle

pif : PyIShellItemFilter

Description for pif


PyINameSpaceTreeControl.RemoveAllRoots

RemoveAllRoots()

Description of RemoveAllRoots.


PyINameSpaceTreeControl.RemoveRoot

RemoveRoot(psiRoot)

Description of RemoveRoot.

Parameters

psiRoot : PyIShellItem

Description for psiRoot


PyINameSpaceTreeControl.SetItemCustomState

SetItemCustomState(psi, iStateNumber)

Description of SetItemCustomState.

Parameters

psi : PyIShellItem

Description for psi

iStateNumber : int

Description for iStateNumber


PyINameSpaceTreeControl.SetItemState

SetItemState(psi, nstcisMask, nstcisFlags)

Description of SetItemState.

Parameters

psi : PyIShellItem

Description for psi

nstcisMask : int

Description for nstcisMask

nstcisFlags : int

Description for nstcisFlags


PyINameSpaceTreeControl.SetTheme

SetTheme(pszTheme)

Description of SetTheme.

Parameters

pszTheme : unicode

Description for pszTheme


PyINameSpaceTreeControl.TreeAdvise

TreeAdvise(punk)

Description of TreeAdvise.

Parameters

punk : PyIUnknown

Description for punk


PyINameSpaceTreeControl.TreeUnadvise

TreeUnadvise(dwCookie)

Description of TreeUnadvise.

Parameters

dwCookie : int

Description for dwCookie


PyINamedPropertyStore

PyINamedPropertyStore Object

Contains a collection of properties indentified by name

Methods

GetNamedValue
Retrieves a property value by name

SetNamedValue
Sets the value of a property

GetNameCount
Retrieves the number of named properties in the store

GetNameAt
Retrieves a property name by zero-based index


PyINamedPropertyStore.GetNameAt

str = GetNameAt(Index)

Retrieves a property name by zero-based index

Parameters

Index : int

Index of the property name


PyINamedPropertyStore.GetNameCount

int = GetNameCount()

Retrieves the number of named properties in the store


PyINamedPropertyStore.GetNamedValue

PyPROPVARIANT = GetNamedValue(Name)

Retrieves a property value by name

Parameters

Name : str

Name of the property


PyINamedPropertyStore.SetNamedValue

SetNamedValue(propvar)

Sets the value of a property

Parameters

propvar : Py__RPC__in REFPROPVARIANT

Description for propvar


PyIObjectArray

PyIObjectArray Object

Holds a collection of interface objects

Methods

GetCount
Returns number of objects in collection

GetAt
Retrieves an item by zero-based index


PyIObjectArray.GetAt

PyIUnknown = GetAt(Index, riid )

Retrieves an item by zero-based index

Parameters

Index : int

Index of item to retrieve

riid=IID_IUnknown : PyIID

The interface to return


PyIObjectArray.GetCount

int = GetCount()

Returns number of objects in collection


PyIObjectCollection

PyIObjectCollection Object

Modifiable container for a number of IUnknown objects

Methods

AddObject
Adds a single object to the collection

AddFromArray
Adds a number of objects contained in an PyIObjectArray collection

RemoveObjectAt
Removes a single object from the collection

Clear
Empties the container

Based On

PyIObjectArray


PyIObjectCollection.AddFromArray

AddFromArray(Source)

Adds a number of objects contained in an PyIObjectArray collection

Parameters

Source : PyIObjectArray

Objects to be added to the collection


PyIObjectCollection.AddObject

AddObject(punk)

Adds a single object to the collection

Parameters

punk : PyIUnknown

Object to be added


PyIObjectCollection.Clear

Clear()

Empties the container.


PyIObjectCollection.RemoveObjectAt

RemoveObjectAt(Index)

Removes a single object from the collection

Parameters

Index : int

Zero-based index of item to remove


PyIObjectWithPropertyKey

PyIObjectWithPropertyKey Object

Interface implemented by objects that have an associated property id

Methods

SetPropertyKey
Sets the property id

GetPropertyKey
Returns the property id


PyIObjectWithPropertyKey.GetPropertyKey

PyPROPERTYKEY = GetPropertyKey()

Returns the property id


PyIObjectWithPropertyKey.SetPropertyKey

SetPropertyKey(key)

Sets the property id

Parameters

key : PyPROPERTYKEY

The identifier of the property


PyIObjectWithSite

PyIObjectWithSite Object

Description of the interface

Methods

SetSite
Description of SetSite

GetSite
Description of GetSite


PyIObjectWithSite.GetSite

GetSite(riid)

Description of GetSite.

Parameters

riid : PyIID

Description for riid


PyIObjectWithSite.SetSite

SetSite(pUnkSite)

Description of SetSite.

Parameters

pUnkSite : PyIUnknown *

Description for pUnkSite


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.


PyIOleCommandTarget

PyIOleCommandTarget Object

Description of the interface

Methods

QueryStatus
Description of QueryStatus

Exec
Description of Exec


PyIOleCommandTarget.Exec

Exec()

Description of Exec.


PyIOleCommandTarget.QueryStatus

QueryStatus()

Description of QueryStatus.


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.


PyIOleControlSite

PyIOleControlSite Object

Description of the interface

Methods

OnControlInfoChanged
Description of OnControlInfoChanged

LockInPlaceActive
Description of LockInPlaceActive

GetExtendedControl
Description of GetExtendedControl

TransformCoords
Description of TransformCoords

TranslateAccelerator
Description of TranslateAccelerator

OnFocus
Description of OnFocus

ShowPropertyFrame
Description of ShowPropertyFrame


PyIOleControlSite.GetExtendedControl

GetExtendedControl()

Description of GetExtendedControl.


PyIOleControlSite.LockInPlaceActive

LockInPlaceActive(fLock)

Description of LockInPlaceActive.

Parameters

fLock : int

Description for fLock


PyIOleControlSite.OnControlInfoChanged

OnControlInfoChanged()

Description of OnControlInfoChanged.


PyIOleControlSite.OnFocus

OnFocus(fGotFocus)

Description of OnFocus.

Parameters

fGotFocus : int

Description for fGotFocus


PyIOleControlSite.ShowPropertyFrame

ShowPropertyFrame()

Description of ShowPropertyFrame.


PyIOleControlSite.TransformCoords

TransformCoords(PtlHimetric, pPtfContainer, dwFlags)

Description of TransformCoords.

Parameters

PtlHimetric : (int, int)

Description for pPtlHimetric

pPtfContainer : (float, float))

Description for pPtfContainer

dwFlags : int

Description for dwFlags

Return Value

The result is a tuple of the transformed input points - ie, a tuple of ((int, int), (float, float))


PyIOleControlSite.TranslateAccelerator

TranslateAccelerator(pMsg, grfModifiers)

Description of TranslateAccelerator.

Parameters

pMsg : PyMSG

Description for pMsg

grfModifiers : int

Description for grfModifiers


PyIOleInPlaceActiveObject

PyIOleInPlaceActiveObject Object

Description of the interface

Methods

TranslateAccelerator
Description of TranslateAccelerator

OnFrameWindowActivate
Description of OnFrameWindowActivate

OnDocWindowActivate
Description of OnDocWindowActivate

ResizeBorder
Description of ResizeBorder

EnableModeless
Description of EnableModeless


PyIOleInPlaceActiveObject.EnableModeless

EnableModeless(fEnable)

Description of EnableModeless.

Parameters

fEnable : int

Description for fEnable


PyIOleInPlaceActiveObject.OnDocWindowActivate

OnDocWindowActivate(fActivate)

Description of OnDocWindowActivate.

Parameters

fActivate : int

Description for fActivate


PyIOleInPlaceActiveObject.OnFrameWindowActivate

OnFrameWindowActivate(fActivate)

Description of OnFrameWindowActivate.

Parameters

fActivate : int

Description for fActivate


PyIOleInPlaceActiveObject.ResizeBorder

ResizeBorder(rcBorder, pUIWindow, fFrameWindow)

Description of ResizeBorder.

Parameters

rcBorder : (int, int, int, int)

Description for prcBorder

pUIWindow : PyIOleInPlaceUIWindow

Description for pUIWindow

fFrameWindow : int

Description for fFrameWindow


PyIOleInPlaceActiveObject.TranslateAccelerator

TranslateAccelerator(lpmsg)

Description of TranslateAccelerator.

Parameters

lpmsg : PyMSG

Description for lpmsg


PyIOleInPlaceFrame

PyIOleInPlaceFrame Object

Description of the interface

Methods

InsertMenus
Description of InsertMenus

SetMenu
Description of SetMenu

RemoveMenus
Description of RemoveMenus

SetStatusText
Description of SetStatusText

EnableModeless
Description of EnableModeless

TranslateAccelerator
Description of TranslateAccelerator


PyIOleInPlaceFrame.EnableModeless

EnableModeless(fEnable)

Description of EnableModeless.

Parameters

fEnable : int

Description for fEnable


PyIOleInPlaceFrame.InsertMenus

InsertMenus(hmenuShared, menuWidths)

Description of InsertMenus.

Parameters

hmenuShared : int/long

Description for hmenuShared

menuWidths : PyOLEMENUGROUPWIDTHS


PyIOleInPlaceFrame.RemoveMenus

RemoveMenus(hmenuShared)

Description of RemoveMenus.

Parameters

hmenuShared : int/long

Description for hmenuShared


PyIOleInPlaceFrame.SetMenu

SetMenu(hmenuShared, holemenu, hwndActiveObject)

Description of SetMenu.

Parameters

hmenuShared : int/long

Description for hmenuShared

holemenu : int/long

Description for holemenu

hwndActiveObject : int/long

Description for hwndActiveObject


PyIOleInPlaceFrame.SetStatusText

SetStatusText(pszStatusText)

Description of SetStatusText.

Parameters

pszStatusText : unicode

Description for pszStatusText


PyIOleInPlaceFrame.TranslateAccelerator

TranslateAccelerator(lpmsg, wID)

Description of TranslateAccelerator.

Parameters

lpmsg : PyMSG

Description for lpmsg

wID : int

Description for wID


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


PyIOleInPlaceUIWindow

PyIOleInPlaceUIWindow Object

Description of the interface

Methods

GetBorder
Description of GetBorder

RequestBorderSpace
Description of RequestBorderSpace

SetBorderSpace
Description of SetBorderSpace

SetActiveObject
Description of SetActiveObject


PyIOleInPlaceUIWindow.GetBorder

GetBorder()

Description of GetBorder.


PyIOleInPlaceUIWindow.RequestBorderSpace

RequestBorderSpace(borderwidths)

Description of RequestBorderSpace.

Parameters

borderwidths : (int, int, int, int)

Description for pborderwidths


PyIOleInPlaceUIWindow.SetActiveObject

SetActiveObject(pActiveObject, pszObjName)

Description of SetActiveObject.

Parameters

pActiveObject : PyIOleInPlaceActiveObject

Description for pActiveObject

pszObjName : unicode

Description for pszObjName


PyIOleInPlaceUIWindow.SetBorderSpace

SetBorderSpace(borderwidths)

Description of SetBorderSpace.

Parameters

borderwidths : (int, int, int, int)

Description for pborderwidths


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, msg, pActiveSite, lindex, hwndParent, rect)

Description of DoVerb.

Parameters

iVerb : int

Description for iVerb

msg : PyMSG

MSG tuple, a-la win32gui etc.

pActiveSite : PyIOleClientSite

Description for pActiveSite

lindex : int

Description for lindex

hwndParent : HWND

Description for hwndParent

rect : (int, int, int, int)


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.

Based On

PyIUnknown


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

str = 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(FileName, Mode)

Opens the specified file and initializes an object from the file contents.

Parameters

FileName : str

Absolute path of the file to open

Mode=STGM_READ : int

Specifies the access mode from the STGM enumeration.


PyIPersistFile.Save

Save(FileName, fRemember)

Saves the object into the specified file.

Parameters

FileName : str

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

Notifies the object that it can revert from NoScribble mode to Normal mode.

Parameters

FileName : str

Absolute path of the file where the object was saved.


PyIPersistFolder

PyIPersistFolder Object

Description of the interface

Methods

Initialize
Description of Initialize


PyIPersistFolder2

PyIPersistFolder2 Object

Description of the interface

Methods

GetCurFolder
Description of GetCurFolder


PyIPersistFolder2.GetCurFolder

GetCurFolder()

Description of GetCurFolder.


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.

Based On

PyIPersist


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


PyIPersistSerializedPropStorage

PyIPersistSerializedPropStorage Object

Allows a property store to be marshalled into a single buffer. Primarily used with property stores created using propsys::PSCreateMemoryPropertyStore.

Methods

SetFlags
Sets flags for the store

SetPropertyStorage
Initializes the store with a serialized buffer

GetPropertyStorage
Retrieves the current contents of the property store


PyIPersistSerializedPropStorage.GetPropertyStorage

buffer = GetPropertyStorage()

Retrieves the current contents of the property store


PyIPersistSerializedPropStorage.SetFlags

SetFlags(flags)

Sets flags for the store

Parameters

flags : int

Combination of pscon.FPSPS_* values


PyIPersistSerializedPropStorage.SetPropertyStorage

SetPropertyStorage(ps)

Initializes the store with a serialized buffer

Parameters

ps : buffer

Bytes or buffer object containing a serialized property store


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.

Based On

PyIUnknown


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.

Based On

PyIPersist


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.

Based On

PyIPersistStream


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

Methods

GetLastError
Returns the last error code for the object.

CreateProfile
Creates a new profile.

DeleteProfile
Deletes a profile.

CopyProfile
Copies a profile.

RenameProfile
Assigns a new name to a profile.

SetDefaultProfile
Sets or clears a client's default profile.

AdminServices
Provides access to a message service administration object for making changes to the message services in a profile.


PyIProfAdmin.AdminServices

PyIProfAdmin = AdminServices(profileName, Password , uiParam , flags )

Provides access to a message service administration object for making changes to the message services in a profile.

Parameters

profileName : string

The name of the profile to be modified.

Password=None : string

uiParam=0 : int

A handle of the parent window for any dialog boxes or windows that this method displays.

flags=0 : int


PyIProfAdmin.CopyProfile

CopyProfile(oldProfileName, Password, newProfileName, uiParam, flags)

Copies a profile.

Parameters

oldProfileName : string

The name of the profile to copy.

Password : string

Must be None

newProfileName : string

The new name of the copied profile.

uiParam=0 : int

A handle of the parent window for any dialog boxes or windows that this method displays.

flags=0 : int


PyIProfAdmin.CreateProfile

CreateProfile(oldProfileName, Password, uiParam, flags)

Creates a new profile.

Parameters

oldProfileName : string

The name of the new profile.

Password : string

Must be None

uiParam=0 : int

A handle of the parent window for any dialog boxes or windows that this method displays.

flags=0 : int


PyIProfAdmin.DeleteProfile

DeleteProfile(oldProfileName, flags)

Deletes a profile.

Parameters

oldProfileName : string

The name of the profile to be deleted.

flags=0 : int


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


PyIProfAdmin.RenameProfile

RenameProfile(oldProfileName, Password, newProfileName, uiParam, flags)

Assigns a new name to a profile.

Parameters

oldProfileName : string

The current name of the profile to rename.

Password : string

Must be None

newProfileName : string

The new name of the profile to rename.

uiParam=0 : int

A handle of the parent window for any dialog boxes or windows that this method displays.

flags=0 : int


PyIProfAdmin.SetDefaultProfile

SetDefaultProfile(profileName, flags)

Sets or clears a client's default profile.

Parameters

profileName : string

The name of the profile that will become the default, or None. Setting profileName to None indicates that SetDefaultProfile should remove the existing default profile, leaving the client without a default.

flags=0 : int


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.

Based On

PyIUnknown


PyIPropertyBag.Read

object = Read(propName, propType , errorLog )

Called by the control to read a property from the storage provided by the container.

Parameters

propName : str

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 : str

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.


PyIPropertyChange

PyIPropertyChange Object

Interface used to specify a change to a property

Methods

ApplyToPropVariant
Applies the change to a variant value

Based On

PyIObjectWithPropertyKey


PyIPropertyChange.ApplyToPropVariant

PyPROPVARIANT = ApplyToPropVariant(OrigVal)

Applies the change to a variant value

Parameters

OrigVal : PyPROPVARIANT

The value to be modified


PyIPropertyChangeArray

PyIPropertyChangeArray Object

Container for a sequence of PyIPropertyChange interfaces, as used with PyIFileOperation.
Create using pythoncom.CoCreateInstance(propsys.CLSID_PropertyChangeArray, ...)

Methods

GetCount
Returns the number of changes in the array

GetAt
Returns a change by zero-based index

InsertAt
Inserts a change at a specific position

Append
Adds a change to the end of the array

AppendOrReplace
Adds a change, or replaces an identical property key

RemoveAt
Removes a change from the array

IsKeyInArray
Checks if array contains a change to a property


PyIPropertyChangeArray.Append

Append(PropChange)

Adds a change to the end of the array

Parameters

PropChange : PyIPropertyChange

The change to be added


PyIPropertyChangeArray.AppendOrReplace

AppendOrReplace(PropChange)

Adds a change, or replaces if an identical property key is already in container

Parameters

PropChange : PyIPropertyChange

The change to be added or replaced


PyIPropertyChangeArray.GetAt

PyIPropertyChange = GetAt(Index, riid )

Retrieves a change by zero-based index

Parameters

Index : int

Index of the change to retrieve

riid=IID_IPropertyChange : PyIID

The interface to return


PyIPropertyChangeArray.GetCount

int = GetCount()

Returns the number of changes in the array


PyIPropertyChangeArray.InsertAt

InsertAt(Index, PropChange)

Inserts a change at a specific position

Parameters

Index : int

Position at which to place the change

PropChange : PyIPropertyChange

The change to be added


PyIPropertyChangeArray.IsKeyInArray

boolean = IsKeyInArray(key)

Checks if array contains a change to a property

Parameters

key : PyPROPERTYKEY

Property key to look for


PyIPropertyChangeArray.RemoveAt

RemoveAt(Index)

Removes a change from the array

Parameters

Index : int

Index of change to be removed


PyIPropertyDescription

PyIPropertyDescription Object

Gives access to the details of a property definition

Methods

GetPropertyKey
Returns the unique identifier for a property

GetCanonicalName
Returns the name of the property

GetPropertyType
Returns the variant type of the property (VT_*)

GetDisplayName
Returns the property name as shown in the UI

GetEditInvitation
Returns the input prompt used in edit controls

GetTypeFlags
Returns type flags for the property

GetViewFlags
Returns the view flags that control how the property is displayed (PDVF_*)

GetDefaultColumnWidth
Returns the default width in characters

GetDisplayType
Returns the display type (PDDT_*)

GetColumnState
Returns flags that control how property is displayed in column (SHCOLSTATE_*)

GetGroupingRange
Returns property's grouping attributes (PDGR_*)

GetRelativeDescriptionType
Returns the relative description type (PDRDT_*)

GetRelativeDescription
Compares two values

GetSortDescription
Returns value that determines how sorting options are displayed (PDSD_*)

GetSortDescriptionLabel
Returns description of current sort order

GetAggregationType
Describes how properties for multiple items are displayed (PDAT_*)

GetConditionType
Returns options that determine how the property is used to build a search query

GetEnumTypeList
Returns an interface used for querying valid property range

CoerceToCanonicalValue
Converts a variant value to the exact type expected by the property

FormatForDisplay
Converts a value to its string representation

IsValueCanonical
Determines if a value exactly matches the specification for the property


PyIPropertyDescription.CoerceToCanonicalValue

int = CoerceToCanonicalValue(Value)

Converts a variant value to the exact type expected by the property

Parameters

Value : PyPROPVARIANT

The property value to be converted

Comments

This method mutates the PyPROPVARIANT in place. It may be cleared on failure.

Return Value

Returns the HRESULT from the operation on success.


PyIPropertyDescription.FormatForDisplay

str = FormatForDisplay(Value, Flags )

Converts a value to its string representation

Parameters

Value : PyPROPVARIANT

The value to be formatted

Flags=PDFF_DEFAULT : int

Combination of PROPDESC_FORMAT_FLAGS (PDFF_*)


PyIPropertyDescription.GetAggregationType

int = GetAggregationType()

Describes how properties for multiple items are displayed (PDAT_*)


PyIPropertyDescription.GetCanonicalName

str = GetCanonicalName()

Returns the name of the property


PyIPropertyDescription.GetColumnState

int = GetColumnState()

Returns flags that control how property is displayed in column (SHCOLSTATE_*)


PyIPropertyDescription.GetConditionType

(int, int) = GetConditionType()

Returns options that determine how the property is used to build a search query

Return Value

Returns the condition type (PDCOT_*) and default operation (COP_*)


PyIPropertyDescription.GetDefaultColumnWidth

int = GetDefaultColumnWidth()

Returns the default width in characters


PyIPropertyDescription.GetDisplayName

str = GetDisplayName()

Returns the property name as shown in the UI


PyIPropertyDescription.GetDisplayType

int = GetDisplayType()

Returns the display type (PDDT_*)


PyIPropertyDescription.GetEditInvitation

str = GetEditInvitation()

Returns the input prompt used in edit controls


PyIPropertyDescription.GetEnumTypeList

PyIPropertyEnumTypeList = GetEnumTypeList(riid)

Returns an interface used for querying valid property range

Parameters

riid=IID_IPropertyEnumTypeList : PyIID

IID of the requested interface


PyIPropertyDescription.GetGroupingRange

int = GetGroupingRange()

Returns property's grouping attributes (PDGR_*)


PyIPropertyDescription.GetPropertyKey

PyPROPERTYKEY = GetPropertyKey()

Returns the unique identifier for a property


PyIPropertyDescription.GetPropertyType

int = GetPropertyType()

Returns the variant type of the property (VT_*)


PyIPropertyDescription.GetRelativeDescription

(str, str) = GetRelativeDescription(var1, var2 )

Compares two values

Parameters

var1 : PyPROPVARIANT

The first value

var2 : PyPROPVARIANT

The second value


PyIPropertyDescription.GetRelativeDescriptionType

int = GetRelativeDescriptionType()

Returns the relative description type (PDRDT_*)


PyIPropertyDescription.GetSortDescription

int = GetSortDescription()

Returns value that determines how sorting options are displayed (PDSD_*)


PyIPropertyDescription.GetSortDescriptionLabel

str = GetSortDescriptionLabel(Descending)

Returns description of current sort order

Parameters

Descending : bool

Indicates if order is reversed


PyIPropertyDescription.GetTypeFlags

int = GetTypeFlags(mask)

Returns type flags for the property

Parameters

mask=PDTF_MASK_ALL : int

Specifies which flags to retrieve (PDTF_*)


PyIPropertyDescription.GetViewFlags

int = GetViewFlags()

Returns the view flags that control how the property is displayed (PDVF_*)


PyIPropertyDescription.IsValueCanonical

bool = IsValueCanonical(Value)

Determines if a value exactly matches the specification for the property

Parameters

Value : PROPVARIANT

The value to check


PyIPropertyDescriptionAliasInfo

PyIPropertyDescriptionAliasInfo Object

Interface that gives access to the sorting columns for a property

Methods

GetSortByAlias
Returns the primary column used for sorting

GetAdditionalSortByAliases
Returns secondary sorting columns


PyIPropertyDescriptionAliasInfo.GetAdditionalSortByAliases

PyIPropertyDescriptionList = GetAdditionalSortByAliases(riid)

Returns secondary sorting columns

Parameters

riid=IID_IPropertyDescriptionList : PyIID

The interface to return


PyIPropertyDescriptionAliasInfo.GetSortByAlias

PyIPropertyDescription = GetSortByAlias(riid)

Returns the primary column used for sorting

Parameters

riid=IID_IPropertyDescription : PyIID

The interface to return


PyIPropertyDescriptionList

PyIPropertyDescriptionList Object

Container for a number of property descriptions

Methods

GetCount
Gets the number of properties in the list

GetAt
Retrieves a description from the list


PyIPropertyDescriptionList.GetAt

PyIPropertyDescription = GetAt(Elem, riid )

Retrieves a description from the list

Parameters

Elem : int

Index of the element to return

riid=IID_IPropertyDescription : PyIID

The interface to return


PyIPropertyDescriptionList.GetCount

int = GetCount()

Gets the number of properties in the list


PyIPropertyDescriptionSearchInfo

PyIPropertyDescriptionSearchInfo Object

Interface that retrieves indexing options defined in a property's searchinfo XML element Inhererits all methods of PyIPropertyDescription

Methods

GetSearchInfoFlags
Returns flags controlling how property is indexed

GetColumnIndexType
Returns flags indicating type of property

GetProjectionString
Returns the canonical name of the property

GetMaxSize
Returns the maximum size specified in search options


PyIPropertyDescriptionSearchInfo.GetColumnIndexType

int = GetColumnIndexType()

Returns flags indicating type of property

Return Value

Returns a value from the PROPDESC_COLUMNINDEX_TYPE enum


PyIPropertyDescriptionSearchInfo.GetMaxSize

int = GetMaxSize()

Returns the maximum size specified in search options


PyIPropertyDescriptionSearchInfo.GetProjectionString

str = GetProjectionString()

Returns the canonical name of the property


PyIPropertyDescriptionSearchInfo.GetSearchInfoFlags

int = GetSearchInfoFlags()

Returns flags controlling how property is indexed

Return Value

Returns a combination of PROPDESC_SEARCHINFO_FLAGS values


PyIPropertyEnumType

PyIPropertyEnumType Object

Contains information about an allowable value or range for a property

Methods

GetEnumType
Retrieves the type (PROPENUMTYPE)

GetValue
Retrieves the defined value

GetRangeMinValue
Returns the minimum allowed value for the property

GetRangeSetValue
Returns a fixed value defined for the property

GetDisplayText
Returns the display text for the enumerated type


PyIPropertyEnumType.GetDisplayText

GetDisplayText()

Returns the display text for the enumerated type


PyIPropertyEnumType.GetEnumType

int = GetEnumType()

Retrieves the type (PROPENUMTYPE)

Return Value

pscon.PET_*


PyIPropertyEnumType.GetRangeMinValue

PyPROPVARIANT = GetRangeMinValue()

Returns the minimum allowed value for the property


PyIPropertyEnumType.GetRangeSetValue

PyPROPVARIANT = GetRangeSetValue()

Returns a fixed value defined for the property


PyIPropertyEnumType.GetValue

PyPROPVARIANT = GetValue()

Retrieves the defined value


PyIPropertyEnumTypeList

PyIPropertyEnumTypeList Object

Contains a collection of PyIPropertyEnumType objects that define the allowable values for a property

Methods

GetCount
Returns the number of objects in the list

GetAt
Retrieves an item by index

FindMatchingIndex
Attempts to match the specified value to one of the allowable values for the property


PyIPropertyEnumTypeList.FindMatchingIndex

int = FindMatchingIndex(Cmp)

Attempts to match the specified value to one of the allowable values for the property

Parameters

Cmp : PyPROPVARIANT

A value to match against the defined values of the property


PyIPropertyEnumTypeList.GetAt

PyIPropertyEnumType = GetAt(itype, riid )

Retrieves an item by index

Parameters

itype : int

Zero based index of type to return

riid=IID_IPropertyEnumType : PyIID

The interface to return


PyIPropertyEnumTypeList.GetCount

int = GetCount()

Returns the number of objects in the list


PyIPropertySetStorage

PyIPropertySetStorage Object

Container for a collection of property sets. Can be iterated over to enumerate property sets.

Methods

Create
Creates a new property set in the storage object

Open
Opens an existing property set

Delete
Removes a property set from this storage object

Enum
Creates an iterator to enumerate contained property sets


PyIPropertySetStorage.Create

PyIPropertyStorage = Create(fmtid, clsid , Flags , Mode )

Creates a new property set in the storage object

Parameters

fmtid : PyIID

GUID identifying a property set, pythoncom.FMTID_*

clsid : PyIID

CLSID of property set handler, usually same as fmtid

Flags : int

Specifies behaviour of property set, storagecon.PROPSETFLAG_*

Mode : int

Access mode, combination of storagecon.STGM_* flags


PyIPropertySetStorage.Delete

Delete(fmtid)

Removes a property set from this storage object

Parameters

fmtid : PyIID

GUID of a property set, pythoncom.FMTID_*


PyIPropertySetStorage.Enum

PyIEnumSTATPROPSETSTG = Enum()

Creates an iterator to enumerate contained property sets


PyIPropertySetStorage.Open

PyIPropertyStorage = Open(fmtid, Mode )

Opens an existing property set

Parameters

fmtid : PyIID

GUID of a property set, pythoncom.FMTID_*

Mode=STGM_READ | STGM_SHARE_EXCLUSIVE : int

Access mode, combination of storagecon.STGM_* flags


PyIPropertyStorage

PyIPropertyStorage Object

Structured storage object that contains a set of properties. Supports iteration to list properties.

Methods

ReadMultiple
Reads specified properties from the current property set.

WriteMultiple
Creates or modifies properties in the property set

DeleteMultiple
Deletes properties from the property set

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
Removes property names from specified properties.

Commit
Persists the property set to its base storage

Revert
Discards any changes that have been made

Enum
Creates an enumerator for properties in the property set

SetTimes
Sets the creation, last access, and modification time

SetClass
Sets the GUID for the property set

Stat
Returns various infomation about the property set


PyIPropertyStorage.Commit

Commit(CommitFlags)

Persists the property set to its base storage

Parameters

CommitFlags : int

Combination of storagecon.STGC_* flags


PyIPropertyStorage.DeleteMultiple

DeleteMultiple(props)

Deletes properties from the property set

Parameters

props : (PROPSPEC, ...)

Sequence containing names or IDs of properties to be deleted


PyIPropertyStorage.DeletePropertyNames

DeletePropertyNames(props)

Removes property names from specified properties.

Parameters

props : (int, ...)

Sequence of ints containing property IDs.


PyIPropertyStorage.Enum

PyIEnumSTATPROPSTG = Enum()

Creates an enumerator for properties in the property set


PyIPropertyStorage.ReadMultiple

(object, ...) = ReadMultiple(props)

Reads specified properties from the current property set.

Parameters

props : (PROPSPEC, ...)

Sequence of property IDs or names.

Return Value

Returned values are automatically converted to an appropriate python type


PyIPropertyStorage.ReadPropertyNames

(str,...) = ReadPropertyNames(props)

Retrieves any existing string names for the specified property identifiers.

Parameters

props : (int, ...)

Sequence of ints containing property IDs.


PyIPropertyStorage.Revert

Revert()

Discards any changes that have been made


PyIPropertyStorage.SetClass

SetClass(clsid)

Sets the GUID for the property set

Parameters

clsid : PyIID

Description for clsid


PyIPropertyStorage.SetTimes

SetTimes(ctime, atime, mtime)

Sets the creation, last access, and modification time

Parameters

ctime : PyTime

Creation time, or None for no change

atime : PyTime

Last access time, or None for no change

mtime : PyTime

Modification time, or None for no change

Comments

Some property sets do not support these times.


PyIPropertyStorage.Stat

tuple = Stat()

Returns various infomation about the property set

Return Value

Returns a tuple representing a STATPROPSETSTG struct.


PyIPropertyStorage.WriteMultiple

WriteMultiple(props, values, propidNameFirst)

Creates or modifies properties in the property set

Parameters

props : (PROPSPEC, ...)

Sequence containing names or integer ids of properties to write

values : (PROPVARIANT , ...)

The values for the properties.

propidNameFirst=2 : int

Minimum property id to be assigned to new properties specified by name


PyIPropertyStorage.WritePropertyNames

WritePropertyNames(props, names)

Assigns string names to a specified array of property IDs in the current property set.

Parameters

props : (int, ...)

Sequence containing the property IDs.

names : (string, ...)

Equal length sequence of property names.


PyIPropertyStore

PyIPropertyStore Object

Contains a collection of properties

Methods

GetCount
Returns the number of properties in the store

GetAt
Returns the property key for the specified property

GetValue
Retrieves the value of a property

SetValue
Sets the value of a property

Commit
Commits property changes


PyIPropertyStore.Commit

Commit()

Commits property changes


PyIPropertyStore.GetAt

PyPROPERTYKEY = GetAt(iProp)

Returns the property key for the specified property

Parameters

iProp : int

Zero-based index of property


PyIPropertyStore.GetCount

int = GetCount()

Returns the number of properties in the store


PyIPropertyStore.GetValue

PyPROPVARIANT = GetValue(Key)

Retrieves the value of a property

Parameters

Key : PyPROPERTYKEY

Property key as returned by PyIPropertyStore::GetAt


PyIPropertyStore.SetValue

SetValue(Key, Value)

Sets the value of a property

Parameters

Key : PyPROPERTYKEY

Property key (see PyIPropertyStore::GetAt)

Value : PyPROPVARIANT

Variant value which can be converted to the appropriate variant type for the property Pass a VT_EMPTY variant to indicate that the property should be removed.


PyIPropertyStoreCache

PyIPropertyStoreCache Object

Property store that allows tracking of modification state. Inherits all methods of PyIPropertyStore.

Methods

GetState
Retrieves the current state of a property

GetValueAndState
Retrieves the current value and state of a property

SetState
Sets the state of a property

SetValueAndState
Sets the value and state of a property


PyIPropertyStoreCache.GetState

int = GetState(key)

Retrieves the current state of a property

Parameters

key : PyPROPERTYKEY

Property identifier

Return Value

A value from the PSC_STATE enum (PSC_NORMAL, PSC_NOTINSOURCE. PSC_DIRTY)


PyIPropertyStoreCache.GetValueAndState

(PyPROPVARIANT, int) = GetValueAndState(key)

Retrieves the current value and state of a property

Parameters

key : PyPROPERTYKEY

Property identifier


PyIPropertyStoreCache.SetState

SetState(key, state)

Sets the state of a property

Parameters

key : PyPROPERTYKEY

Property identifier

state : int

Value from the PSC_STATE enum (pscon.PSC_*)


PyIPropertyStoreCache.SetValueAndState

SetValueAndState(key, value, state)

Sets the value and state of a property

Parameters

key : PyPROPERTYKEY

Property identifier

value : PyPROPVARIANT

The new value

state : int

The new state (pscon.PSC_*)


PyIPropertyStoreCapabilities

PyIPropertyStoreCapabilities Object

Property providers use this interface to indicate whether properties are writeable.

Methods

IsPropertyWritable
Asks provider if a property can be editted.


PyIPropertyStoreCapabilities.IsPropertyWritable

boolean = IsPropertyWritable(key)

Asks provider if a property can be editted.

Parameters

key : PyPROPERTYKEY

Property identifier


PyIPropertySystem

PyIPropertySystem Object

Wraps the IPropertySystem interface

Methods

GetPropertyDescription
Returns an interface used to describe a property

GetPropertyDescriptionByName
Returns an interface used to describe a property

GetPropertyDescriptionListFromString
Retrieves property descriptions from a string of property names

EnumeratePropertyDescriptions
Returns an interface used to list defined properties

FormatForDisplay
Formats a property into a string

RegisterPropertySchema
Registers a set of properties defined in a .propdesc file

UnregisterPropertySchema
Removes a set of registered properties

RefreshPropertySchema
Not currently implemented by the OS


PyIPropertySystem.EnumeratePropertyDescriptions

PyIPropertyDescriptionList = EnumeratePropertyDescriptions(Filter, riid )

Returns an interface used to list defined properties

Parameters

Filter=PDEF_ALL : int

Value from PROPDESC_ENUMFILTER (pscon.PDEF_*) that limits what types of properties are listed

riid=IID_IPropertyDescriptionList : PyIID

The interface to return


PyIPropertySystem.FormatForDisplay

str = FormatForDisplay(Key, Value , Flags )

Formats a property into a string

Parameters

Key : PyPROPERTYKEY

Fmtid and property id that identifies the property

Value : PyPROPVARIANT

The value to format

Flags=PDFF_DEFAULT : int

Combination of PROPDESC_FORMAT_FLAGS (pscon.PDFF_*) indicating formatting options


PyIPropertySystem.GetPropertyDescription

PyIPropertyDescription = GetPropertyDescription(Key, riid )

Returns an interface used to describe a property

Parameters

Key : PyPROPERTYKEY

Fmtid and propertyid that uniquely identifies a property

riid=IID_IPropertyDescription : PyIID

The interface to return


PyIPropertySystem.GetPropertyDescriptionByName

PyIPropertyDescription = GetPropertyDescriptionByName(CanonicalName, riid )

Returns an interface used to describe a property

Parameters

CanonicalName : str

Registered name of the property

riid=IID_IPropertyDescription : PyIID

The interface to return


PyIPropertySystem.GetPropertyDescriptionListFromString

PyIPropertyDescriptionList = GetPropertyDescriptionListFromString(PropList, riid )

Retrieves property descriptions from a string of property names

Parameters

PropList : str

String containing a list of properties and flags

riid=IPropertyDescriptionList : PyIID

The interface to return


PyIPropertySystem.RefreshPropertySchema

RefreshPropertySchema()

Not currently implemented by the OS

Comments

Not currently implemented, according to MSDN


PyIPropertySystem.RegisterPropertySchema

RegisterPropertySchema(Path)

Registers a set of properties defined in a .propdesc file

Parameters

Path : str

Path to a property schema XML file (.propdesc)


PyIPropertySystem.UnregisterPropertySchema

UnregisterPropertySchema(Path)

Removes a set of registered properties

Parameters

Path : str

Path to a property schema XML file (.propdesc)


PyIProvideClassInfo

PyIProvideClassInfo Object

A Python interface to IProvideClassInfo

Methods

GetClassInfo
Gets information about the CO_CLASS.

Based On

PyIUnknown


PyIProvideClassInfo2

PyIProvideClassInfo2 Object

Methods

GetGUID
Gets the default event sink IID for the object (if any).

Based On

PyIProvideClassInfo


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.


PyIProvideTaskPage

PyIProvideTaskPage Object

Description of the interface

Methods

GetPage
Return a property sheet page handle for the spedified type (TASKPAGE_TASK,TASKPAGE_SCHEDULE,TASKPAGE_SETTINGS)


PyIProvideTaskPage.GetPage

GetPage(tpType, PersistChanges)

Return a property sheet page handle for the spedified type (TASKPAGE_TASK,TASKPAGE_SCHEDULE,TASKPAGE_SETTINGS)

Parameters

tpType : int

Type of page to retreive (TASKPAGE_TASK,TASKPAGE_SCHEDULE,TASKPAGE_SETTINGS)

PersistChanges : bool

Indicates if changes should be saved automatically

Comments

There's not yet anything useful that can be done with this handle - return type subject to change


PyIQueryAssociations

PyIQueryAssociations Object

Description of the interface

Methods

Init
Initializes the IQueryAssociations interface and sets the root key to the appropriate ProgID.

GetKey
Searches for and retrieves a file association-related key from the registry.

GetString
Searches for and retrieves a file association-related string from the registry.


PyIQueryAssociations.GetKey

int = GetKey(flags, assocKey , )

Searches for and retrieves a file association-related key from the registry.

Parameters

flags : int

Used to control the search.

assocKey : int

Specifies the type of key that is to be returned.

=extra : string

Optional string with information about the location of the key. It is normally set to a shell verb such as 'open'. Set this parameter to None if it is not used.


PyIQueryAssociations.GetString

int = GetString(flags, assocStr , )

Searches for and retrieves a file association-related string from the registry.

Parameters

flags : int

Used to control the search.

assocStr : int

Specifies the type of string that is to be returned.

=extra : string

Optional string with information about the location of the key. It is normally set to a shell verb such as 'open'. Set this parameter to None if it is not used.

Comments

Note that ASSOCF_NOTRUNCATE semantics are currently not supported - the buffer passed is 2048 bytes long, and will be truncated by the shell if too small.


PyIQueryAssociations.Init

Init(flags, assoc, hkeyProgId, hwnd)

Initializes the IQueryAssociations interface and sets the root key to the appropriate ProgID.

Parameters

flags : int

One of shellcon.ASSOCF_* flags

assoc : string

The string data (ie, extension, prog-id, etc)

hkeyProgId=None : PyHKEY

Root registry key, can be None

hwnd=None : PyHANDLE

Reserved, must be 0 or None


PyIRelatedItem

PyIRelatedItem Object

Interface used as the base for objects that have a related shell item (eg ITransferMediumItem, IDisplayItem, etc). Should not be used directly.

Methods

GetItemIDList
Returns the ID list of the related item

GetItem
Returns the related item


PyIRelatedItem.GetItem

PyIShellItem = GetItem()

Returns the related item


PyIRelatedItem.GetItemIDList

PyIDL = GetItemIDList()

Returns the ID list of the related item


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

Register
Registers an object in the ROT

Revoke
Revokes a previously registered object

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

Based On

PyIUnknown


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


PyIRunningObjectTable.Register

int = Register()

Registers an object and its identifying moniker in the Running Object Table (ROT).


PyIRunningObjectTable.Revoke

int = Revoke()

Removes from the Running Object Table (ROT) an entry that was previously registered by a call to PyIRunningObjectTable::Register.


PyIScheduledWorkItem

PyIScheduledWorkItem Object

Python object that encapsulates the IScheduledWorkItem interface

Methods

CreateTrigger
Creates a new trigger for a task, returns index and new ITaskTrigger interface

DeleteTrigger
Deletes specified trigger

GetTriggerCount
Returns number of triggers defined for the task

GetTrigger
Retrieves ITaskTrigger interface for specified trigger index

GetTriggerString
Creates a human-readable summary of specified trigger

GetRunTimes
Return specified number of run times within given time frame

GetNextRunTime
Returns next time that task is scheduled to run

SetIdleWait
Sets idle parms for task with trigger of type TASK_EVENT_TRIGGER_ON_IDLE

GetIdleWait
Gets idle parms for task with trigger of type TASK_EVENT_TRIGGER_ON_IDLE

Run
Starts task

Terminate
Terminate process if task is running

EditWorkItem
Brings up standard Scheduled Task dialog

GetMostRecentRunTime
Returns last time task ran

GetStatus
Returns status (SCHED_S_TASK... constants)

GetExitCode
Returns tuple of task's exit code and error returned to Task Scheduler if process could not start

SetComment
Set comment string for task

GetComment
Return comment string associated with task.

SetCreator
Specify who (or what) created task, can be any string

GetCreator
Returns creator info, can be any string data

SetWorkItemData
Set data associated with task (treated as uninterpreted bytes)

GetWorkItemData
Retrieve data associated with task

SetErrorRetryCount
Specify nbr of times to attempt to run task if it can't start (not currently implemented)

GetErrorRetryCount
Return nbr of times Task scheduler should try to run task (not currently implemented)

SetErrorRetryInterval
Interval in minutes between attempts to run task. Not implemented according to SDK

GetErrorRetryInterval
Returns nbr of minutes between attempts to run task. Not implemented according to SDK

SetFlags
Set flags for task

GetFlags
Returns flags for task (TASK_FLAG_* constants)

SetAccountInformation
Set username and password under which task will run

GetAccountInformation
Returns username that task will run under


PyIScheduledWorkItem.CreateTrigger

int,PyITaskTrigger = CreateTrigger()

Creates a new trigger for a task, returns index and new ITaskTrigger interface


PyIScheduledWorkItem.DeleteTrigger

DeleteTrigger(Trigger)

Deletes specified trigger

Parameters

Trigger : int

Index of trigger to delete


PyIScheduledWorkItem.EditWorkItem

EditWorkItem(hParent, dwReserved)

Brings up standard Scheduled Task dialog

Parameters

hParent : PyHANDLE

Reserved, use 0 or None if passed

dwReserved : int

Reserved, use 0 if passed


PyIScheduledWorkItem.GetAccountInformation

PyUNICODE = GetAccountInformation()

Returns username that task will run under


PyIScheduledWorkItem.GetComment

PyUnicode = GetComment()

Return comment string associated with task.


PyIScheduledWorkItem.GetCreator

GetCreator()

Returns creator info, can be any string data


PyIScheduledWorkItem.GetErrorRetryCount

GetErrorRetryCount()

Return nbr of times Task scheduler should try to run task (not currently implemented)


PyIScheduledWorkItem.GetErrorRetryInterval

GetErrorRetryInterval()

Returns nbr of minutes between attempts to run task. Not implemented according to SDK


PyIScheduledWorkItem.GetExitCode

(int,int) = GetExitCode()

Returns tuple of task's exit code and error returned to Task Scheduler if process could not start


PyIScheduledWorkItem.GetFlags

int = GetFlags()

Returns flags for task (TASK_FLAG_* constants)


PyIScheduledWorkItem.GetIdleWait

int,int = GetIdleWait()

Gets IdleMinutes and DeadlineMinutes parms for task with trigger of type TASK_EVENT_TRIGGER_ON_IDLE


PyIScheduledWorkItem.GetMostRecentRunTime

PyTime = GetMostRecentRunTime()

Returns last time task ran


PyIScheduledWorkItem.GetNextRunTime

PyTime = GetNextRunTime()

Returns next time that task is scheduled to run


PyIScheduledWorkItem.GetRunTimes

(PyTime,,,) = GetRunTimes(Count, Begin , End )

Return specified number of run times within given time frame

Parameters

Count : int

Number of run times to retrieve

Begin : PyTime

Start time, defaults to current time if not passed or None

End : PyTime

End time, defaults to unlimited if not passed or None


PyIScheduledWorkItem.GetStatus

int = GetStatus()

Returns status (SCHED_S_TASK... constants)


PyIScheduledWorkItem.GetTrigger

PyITaskTrigger = GetTrigger(iTrigger)

Retrieves ITaskTrigger interface for specified trigger index

Parameters

iTrigger : int

Index of trigger to retrieve


PyIScheduledWorkItem.GetTriggerCount

int = GetTriggerCount()

Returns number of triggers defined for the task


PyIScheduledWorkItem.GetTriggerString

PyUNICODE = GetTriggerString()

Creates a human-readable summary of specified trigger


PyIScheduledWorkItem.GetWorkItemData

string = GetWorkItemData()

Retrieve data associated with task


PyIScheduledWorkItem.Run

Run()

Starts task


PyIScheduledWorkItem.SetAccountInformation

SetAccountInformation(AccountName, Password)

Set username and password under which task will run

Parameters

AccountName : unicode

AccountName, use "" for local system account (can only be used by Administrators)

Password : unicode

Password - Can be None for local System account, or if TASK_FLAG_RUN_ONLY_IF_LOGGED_ON is set

Comments

On some systems, username and password are verified at the time the task is saved, on others when the task tries to run


PyIScheduledWorkItem.SetComment

SetComment(Comment)

Set comment string for task

Parameters

Comment : unicode

Freeform comment string


PyIScheduledWorkItem.SetCreator

SetCreator(Creator)

Specify who (or what) created task, can be any string

Parameters

Creator : unicode

Originator of task, does not have to be valid username


PyIScheduledWorkItem.SetErrorRetryCount

SetErrorRetryCount(wRetryCount)

Specify nbr of times to attempt to run task if it can't start (not currently implemented)

Parameters

wRetryCount : int

Nbr of attemps to start task


PyIScheduledWorkItem.SetErrorRetryInterval

SetErrorRetryInterval(RetryInterval)

Interval in minutes between attempts to run task. Not implemented according to SDK

Parameters

RetryInterval : int

Interval in minutes


PyIScheduledWorkItem.SetFlags

SetFlags(dwFlags)

Set flags for task

Parameters

dwFlags : int

Combination of TASK_FLAG_* constants


PyIScheduledWorkItem.SetIdleWait

SetIdleWait(wIdleMinutes, wDeadlineMinutes)

Sets idle parms for task with trigger of type TASK_EVENT_TRIGGER_ON_IDLE

Parameters

wIdleMinutes : int

Nbr of minutes computer must be idle before task fires

wDeadlineMinutes : int

Maximum nbr of minutes task will wait for computer to become idle


PyIScheduledWorkItem.SetWorkItemData

SetWorkItemData(Data)

Set data associated with task (treated as uninterpreted bytes)

Parameters

Data : string

Character data, treated as uninterpreted bytes


PyIScheduledWorkItem.Terminate

Terminate()

Terminate process if task is running


PyIServerSecurity

PyIServerSecurity Object

Interface used to access client security settings and perform impersonation

Comments

Can be created using pythoncom::CoGetCallContext

Methods

QueryBlanket
Retrieves security settings specified by the client

ImpersonateClient
Initiates impersonation of client

RevertToSelf
Ends impersonation of client

IsImpersonating
Determines if server is currently impersonating a client


PyIServerSecurity.ImpersonateClient

ImpersonateClient()

Initiates impersonation of client


PyIServerSecurity.IsImpersonating

bool = IsImpersonating()

Determines if server is currently impersonating a client


PyIServerSecurity.QueryBlanket

dict = QueryBlanket(Capabilities)

Retrieves security settings specified by the client

Parameters

Capabilities=0 : int

Can be EOAC_MAKE_FULLSIC for SChannel provider


PyIServerSecurity.RevertToSelf

RevertToSelf()

Ends impersonation of client


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.

Based On

PyIUnknown


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

Exposed by Windows Explorer and the Open File common dialog box to provide services for namespace extensions.

Methods

InsertMenusSB
Updates a composite menu with container's options

SetMenuSB
Attaches a shared menu to a shell view window

RemoveMenusSB
Asks container to remove any items it added to a composite menu

SetStatusTextSB
Sets the status text in view's status bar

EnableModelessSB
Enables or disables modeless dialogs

TranslateAcceleratorSB
Translates keystrokes used as menu item activators

BrowseObject
Navigates to a different location

GetViewStateStream
Returns a stream that can be used to access view state information

GetControlWindow
Returns a handle to one of the browser's control elements

SendControlMsg
Sends a control msg to browser's toolbar or status bar

QueryActiveShellView
Returns the currently displayed view

OnViewWindowActive
Callback triggered when a view window is activated

SetToolbarItems
Adds toolbar buttons to the browser's toolbar


PyIShellBrowser.BrowseObject

BrowseObject(pidl, wFlags)

Navigates to a different location

Parameters

pidl : PyIDL

Item id list that specifies the new browse location, can be None

wFlags : int

Combination of shellcon.SBSP_* flags


PyIShellBrowser.EnableModelessSB

EnableModelessSB(fEnable)

Enables or disables modeless dialogs

Parameters

fEnable : boolean

Use True to enable or False to disable modeless dialog boxes


PyIShellBrowser.GetControlWindow

GetControlWindow(id)

Returns a handle to one of the browser's control elements

Parameters

id : int

One of shellcon.FCW_* values


PyIShellBrowser.GetViewStateStream

PyIStream = GetViewStateStream(grfMode)

Returns a stream that can be used to access view state information

Parameters

grfMode : int

Read/write mode, one of STGM_READ,STGM_WRITE,STGM_READWRITE


PyIShellBrowser.InsertMenusSB

PyOLEMENUGROUPWIDTHS = InsertMenusSB(hmenuShared, lpMenuWidths )

Updates a composite menu with container's options

Parameters

hmenuShared : PyHANDLE

Newly created menu that contains no items

lpMenuWidths : PyOLEMENUGROUPWIDTHS

Tuple of 6 ints. Items 0,2,and 4 are updated when the tuple is returned.


PyIShellBrowser.OnViewWindowActive

OnViewWindowActive(pshv)

Callback triggered when a view window is activated

Parameters

pshv : PyIShellView

The activated view object


PyIShellBrowser.QueryActiveShellView

PyIShellView = QueryActiveShellView()

Returns the currently displayed view


PyIShellBrowser.RemoveMenusSB

RemoveMenusSB(hmenuShared)

Asks container to remove any items it added to a composite menu

Parameters

hmenuShared : PyHANDLE

Handle to the composite menu


PyIShellBrowser.SendControlMsg

int = SendControlMsg(id, uMsg , wParam , lParam )

Sends a control msg to browser's toolbar or status bar

Parameters

id : int

shellcon.FCW_TOOLBAR or FCW_STATUS

uMsg : int

The message to send

wParam : int

Value is dependent on the message

lParam : long

Value is dependent on the message


PyIShellBrowser.SetMenuSB

SetMenuSB(hmenuShared, holemenuRes, hwndActiveObject)

Attaches a shared menu to a shell view window

Parameters

hmenuShared : PyHANDLE

Handle to the shared menu

holemenuRes : PyHANDLE

Reserved, use only None (or 0)

hwndActiveObject : PyHANDLE

Handle to the shell window


PyIShellBrowser.SetStatusTextSB

SetStatusTextSB(pszStatusText)

Sets the status text in view's status bar

Parameters

pszStatusText : str

New status to be displayed


PyIShellBrowser.SetToolbarItems

SetToolbarItems(lpButtons, uFlags)

Adds toolbar buttons to the browser's toolbar

Parameters

lpButtons : PyLPTBBUTTONSB

Sequence of tuples describing the buttons to be added

uFlags : int

Indicates button positions, combination of shellcon.FCT_*


PyIShellBrowser.TranslateAcceleratorSB

TranslateAcceleratorSB(pmsg, wID)

Translates keystrokes used as menu item activators

Parameters

pmsg : PyMSG

Keystroke message to be translated

wID : int

Menu command id for the keystroke


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

Interface that represents an Explorer folder

Methods

ParseDisplayName
Returns the PIDL of an item in a shell folder

EnumObjects
Creates an enumerator to list the contents of the shell folder

BindToObject
Returns an IShellFolder interface for a subfolder

BindToStorage
Returns an interface to a storage object in a shell folder

CompareIDs
Determines the sorting order of 2 items in shell folder

CreateViewObject
Creates a view object for a shell folder.

GetAttributesOf
Queries attributes of items within the shell folder

GetUIObjectOf
Creates an interface to one or more items in a shell folder

GetDisplayNameOf
Returns the display name of an item within this shell folder

SetNameOf
Sets the display name of an item and changes its PIDL

__iter__
Enumerates all objects in this folder.


PyIShellFolder2

PyIShellFolder2 Object

Represents an explorer folder, giving access to details of items in the folder. Inherits all methods of PyIShellFolder.

Methods

GetDefaultSearchGUID
Retrieves the default search for the folder

EnumSearches
Returns an interface that lists searches defined for the folder

GetDefaultColumn
Returns the columns used for sorting and display

GetDefaultColumnState
Returns flags indicating the default behaviour of the column

GetDetailsEx
Returns the details of an item by Column ID

GetDetailsOf
Returns the value or title of a column in the folder's Details view.

MapColumnToSCID
Returns the unique identifier (FMTID, pid) of a column

__iter__
Enumerates all objects in this folder.


PyIShellFolder2.EnumSearches

PyIEnumExtraSearch = EnumSearches()

Returns an interface that lists searches defined for the folder

Comments

IEnumExtraSearch is not yet wrapped by Pywin32


PyIShellFolder2.GetDefaultColumn

(int, int) = GetDefaultColumn()

Returns the columns used for sorting and display


PyIShellFolder2.GetDefaultColumnState

int = GetDefaultColumnState(iColumn)

Returns flags indicating the default behaviour of the column

Parameters

iColumn : int

Zero-based index of the column

Return Value

Returns a combination of shellcon.SHCOLSTATE_* flags


PyIShellFolder2.GetDefaultSearchGUID

PyIID = GetDefaultSearchGUID(pguid)

Retrieves the default search for the folder

Parameters

pguid : PyIID

Description for pguid


PyIShellFolder2.GetDetailsEx

object = GetDetailsEx(pidl, pscid )

Returns the details of an item by Column ID

Parameters

pidl : PyIDL

Relative id list of an item in the folder

pscid : SHCOLUMNID

The Column id/property key of a column in the folder's Details view

Return Value

The type of returned object is determined by the variant type of the requested column


PyIShellFolder2.GetDetailsOf

(int, int, str) = GetDetailsOf(pidl, iColumn )

Returns the value or title of a column in the folder's Details view.

Parameters

pidl : PyIDL

The relative idl of an item in the folder. Use None to retrieve column title.

iColumn : int

Zero based index of column

Return Value

Returns a tuple representing a SHELLDETAILS struct, containing the formst (LVCFMT_*), column width in characters, and string representation of the requested value


PyIShellFolder2.MapColumnToSCID

SHCOLUMNID = MapColumnToSCID(Column)

Returns the unique identifier (FMTID, pid) of a column

Parameters

Column : int

The zero-based index of the column as presented by the folder's Details view

Return Value

On XP and earlier, this is the Column Id as provided by PyIColumnProvider. For Vista and later, this is the Property Key used with the property system interfaces.


PyIShellIcon

PyIShellIcon Object

Description of the interface

Methods

GetIconOf
Description of GetIconOf


PyIShellIcon.GetIconOf

GetIconOf(pidl)

Description of GetIconOf.

Parameters

pidl : PyIDL

Description for pidl


PyIShellIconOverlay

PyIShellIconOverlay Object

Description of the interface

Methods

GetOverlayIndex
Description of GetOverlayIndex

GetOverlayIconIndex
Description of GetOverlayIconIndex


PyIShellIconOverlay.GetOverlayIconIndex

GetOverlayIconIndex(pidl)

Description of GetOverlayIconIndex.

Parameters

pidl : PyIDL

Description for pidl


PyIShellIconOverlay.GetOverlayIndex

GetOverlayIndex(pidl)

Description of GetOverlayIndex.

Parameters

pidl : PyIDL

Description for pidl


PyIShellIconOverlayIdentifier

PyIShellIconOverlayIdentifier Object

Interface that supplies icon overlay information to the shell

Methods

IsMemberOf
Determines if a shell object should have an icon overlay

GetOverlayInfo
Retrieves the path to the overlay icon

GetPriority
Retrieves the relative priority of the overlay


PyIShellIconOverlayIdentifier.GetOverlayInfo

(PyUnicode, int, int) = GetOverlayInfo()

Retrieves the path to the overlay icon

Return Value

Returns the path to the icon file, the index of icon within the file, and Flags containing combination of shellcon.ISIOI_ICON* flags


PyIShellIconOverlayIdentifier.GetPriority

int = GetPriority()

Retrieves the relative priority of the overlay

Return Value

Implementation of this function should return a number in the range 0-100 (0 is highest priority)


PyIShellIconOverlayIdentifier.IsMemberOf

int = IsMemberOf(path, attrib )

Determines if a shell object should have an icon overlay

Parameters

path : PyUnicode

Fully qualified path of the shell object

attrib : int

Shell attributes, combination of shellcon.SFGAO_* flags

Return Value

The gateway implementation of this function should return winerror.S_OK to display the overlay, S_FALSE if not, or throw a COM exception with E_FAIL on error.
The client implementation of this function returns the same values - ie, Python's True and False should not be used, as S_OK==0==False.


PyIShellIconOverlayManager

PyIShellIconOverlayManager Object

Description of the interface

Methods

GetFileOverlayInfo
Description of GetFileOverlayInfo

GetReservedOverlayInfo
Description of GetReservedOverlayInfo

RefreshOverlayImages
Description of RefreshOverlayImages

LoadNonloadedOverlayIdentifiers
Description of LoadNonloadedOverlayIdentifiers

OverlayIndexFromImageIndex
Description of OverlayIndexFromImageIndex


PyIShellIconOverlayManager.GetFileOverlayInfo

int = GetFileOverlayInfo(path, attrib , flags )

Returns an index into the system image list for the icon image or overlay image

Parameters

path : str

Full path to the file

attrib : int

File attributes (win32com.FILE_ATTRIBUTE_*)

flags : int

SIOM_OVERLAYINDEX (1) or SIOM_ICONINDEX (2)


PyIShellIconOverlayManager.GetReservedOverlayInfo

GetReservedOverlayInfo(path, attrib, flags, ireservedID)

Description of GetReservedOverlayInfo.

Parameters

path : str

Description for path

attrib : int

Description for attrib

flags : int

Description for flags

ireservedID : int

Description for ireservedID


PyIShellIconOverlayManager.LoadNonloadedOverlayIdentifiers

LoadNonloadedOverlayIdentifiers()

Description of LoadNonloadedOverlayIdentifiers.


PyIShellIconOverlayManager.OverlayIndexFromImageIndex

OverlayIndexFromImageIndex(iImage, fAdd)

Description of OverlayIndexFromImageIndex.

Parameters

iImage : int

Description for iImage

fAdd : int

Description for fAdd


PyIShellIconOverlayManager.RefreshOverlayImages

RefreshOverlayImages(flags)

Description of RefreshOverlayImages.

Parameters

flags : int

Description for flags


PyIShellItem

PyIShellItem Object

Interface that represents an item in the Explorer shell

Methods

BindToHandler
Creates an instance of one of the item's handlers

GetParent
Retrieves the parent of this item

GetDisplayName
Returns the display name of the item in the specified format

GetAttributes
Returns shell attributes of the item

Compare
Compares another shell item with this item


PyIShellItem2

PyIShellItem2 Object

Extends the IShellItem interface, giving access to an item's properties

Methods

GetPropertyStore
Returns a collection of the item's properties

GetPropertyStoreForKeys
Creates a property store containing just the specified properties of the item

GetPropertyStoreWithCreateObject
Returns the property store for the item, with alternate handler instantiation

GetPropertyDescriptionList
Retrieves descriptions of properties in a particular group

Update
Refreshes properties that have been modified since interface was created

GetProperty
DRetrieves the value of a property, converted to an appropriate python type

GetCLSID
Retrieves the value of a property as a GUID

GetFileTime
Retrieves the value of a property as a file time.

GetInt32
Retrieves the value of a property as a 32 bit int.

GetString
Retrieves the value of a property as a string

GetUInt32
Returns the value of a property as a 32 bit unsigned int

GetUInt64
Returns the value of a property as an unsigned 64-bit int

GetBool
Returns the value of a property as a boolean


PyIShellItem2.GetBool

boolean = GetBool(key)

Returns the value of a property as a boolean

Parameters

key : PyPROPERTYKEY

The id of the property to retrieve


PyIShellItem2.GetCLSID

PyIID = GetCLSID(key)

Retrieves the value of a property as a CLSID (VT_CLSID)

Parameters

key : PyPROPERTYKEY

The id of the property to retrieve


PyIShellItem2.GetFileTime

PyTime = GetFileTime(key)

Retrieves the value of a property as a FILETIME

Parameters

key : PyPROPERTYKEY

The id of the property to retrieve


PyIShellItem2.GetInt32

int = GetInt32(key)

Retrieves the value of a property as a 32 bit int.

Parameters

key : PyPROPERTYKEY

The id of the property to retrieve


PyIShellItem2.GetProperty

object = GetProperty(key)

Retrieves the value of a property, converted to an appropriate python type

Parameters

key : PyPROPERTYKEY

The id of the property to retrieve

Return Value

Type of returned object is determined by the variant type of the property


PyIShellItem2.GetPropertyDescriptionList

PyIPropertyDescriptionList = GetPropertyDescriptionList(Type, riid )

Retrieves descriptions of properties in a particular group

Parameters

Type : PyPROPERTYKEY

Property list identifier (pscon.PKEY_PropList_*)

riid=IID_IPropertyDescriptionList : PyIID

The interface to return


PyIShellItem2.GetPropertyStore

PyIPropertyStore = GetPropertyStore(Flags, riid )

Returns a collection of the item's properties

Parameters

Flags=GPS_DEFAULT : int

Combination of GETPROPERTYSTOREFLAGS values (shellcon.GPS_*)

riid=IID_IPropertyStore : PyIID

The interface to return


PyIShellItem2.GetPropertyStoreForKeys

PyIPropertyStore = GetPropertyStoreForKeys(Keys, Flags , riid )

Creates a property store containing just the specified properties of the item

Parameters

Keys : (SHCOLUMNID ,...))

A sequence of property identifiers

Flags=GPS_DEFAULT : int

Combination of GETPROPERTYSTOREFLAGS values (shellcon.GPS_*)

riid=IID_IPropertyStore : PyIID

The interface to return


PyIShellItem2.GetPropertyStoreWithCreateObject

PyIPropertyStore = GetPropertyStoreWithCreateObject(Flags, CreateObject , riid )

Returns the property store for the item, with alternate handler instantiation

Parameters

Flags : int

Combination of GETPROPERTYSTOREFLAGS values (shellcon.GPS_*)

CreateObject : PyIUnknown

An interface that implements ICreateObject, used to create the property handler

riid=IID_IPropertyStore : PyIID

The interface to be created

Comments

Primarily used to create a handler in a separate process with reduced privileges


PyIShellItem2.GetString

str = GetString(key)

Retrieves the value of a property as a string

Parameters

key : PyPROPERTYKEY

The id of the property to retrieve


PyIShellItem2.GetUInt32

int = GetUInt32(key)

Returns the value of a property as a 32 bit unsigned int

Parameters

key : PyPROPERTYKEY

The id of the property to retrieve


PyIShellItem2.GetUInt64

int = GetUInt64(key)

Returns the value of a property as an unsigned 64-bit int

Parameters

key : PyPROPERTYKEY

The id of the property to retrieve


PyIShellItem2.Update

Update(BindCtx)

Refreshes properties that have been modified since interface was created

Parameters

BindCtx=None : PyIBindCxt

Bind context used when requesting the interface, or None


PyIShellItemArray

PyIShellItemArray Object

Container for a number of shell items

Comments

Can be used as an iterator to enumerate the contained items

Methods

BindToHandler
Creates an instance of a handler for the items in the container

GetPropertyStore
Retrieves a store containing consolidated properties of items in container

GetPropertyDescriptionList
Retrieves descriptions for a defined group of properties

GetAttributes
Retrieves shell attributes of contained items

GetCount
Returns the number of items in the container

GetItemAt
Retrieves an item by index

EnumItems
Returns an enumeration interface to list contained items


PyIShellItemArray.BindToHandler

interface = BindToHandler(pbc, rbhid , riid )

Creates an instance of a handler for the items in the container

Parameters

pbc : PyIBindCtx

Bind context, can be None

rbhid : PyIID

Bind handler GUID (shell.BHID_*)

riid : PyIID

The interface to return


PyIShellItemArray.EnumItems

PyIEnumShellItems = EnumItems()

Returns an enumeration interface to list contained items


PyIShellItemArray.GetAttributes

int = GetAttributes(AttribFlags, Mask )

Retrieves shell attributes of contained items

Parameters

AttribFlags : int

SIATTRIBFLAGS value (shellcon.SIATTRIBFLAGS_*) specifying how to combine attributes of multiple items

Mask : int

Combination of SFGAOF flags (shellcon.SFGAO_*) specifying which attributes to return


PyIShellItemArray.GetCount

int = GetCount()

Returns the number of items in the container


PyIShellItemArray.GetItemAt

PyIShellItem = GetItemAt(dwIndex)

Retrieves an item by index

Parameters

dwIndex : int

Zero-based index of item to retrieve


PyIShellItemArray.GetPropertyDescriptionList

PyIPropertyDescriptionList = GetPropertyDescriptionList(Type, riid )

Retrieves descriptions for a defined group of properties

Parameters

Type : PyPROPERTYKEY

Property list identifier (pscon.PKEY_PropList_*)

riid=IID_IPropertyDescriptionList : PyIID

The interface to return


PyIShellItemArray.GetPropertyStore

PyIPropertyStore = GetPropertyStore(flags, riid )

Retrieves a store containing consolidated properties of items in container

Parameters

flags=GPS_DEFAULT : int

Flags indicating how the properties are retrieved (shellcon.GPS_*)

riid=IID__IPropertyStore : PyIID

The interface to return, IID_IPropertyStore or related interface


PyIShellItemResources

PyIShellItemResources Object

Description of the interface

Methods

GetAttributes
Description of GetAttributes

GetSize
Description of GetSize

GetTimes
Description of GetTimes

SetTimes
Description of SetTimes

GetResourceDescription
Description of GetResourceDescription

EnumResources
Description of EnumResources

SupportsResource
Description of SupportsResource

OpenResource
Description of OpenResource

CreateResource
Description of CreateResource

MarkForDelete
Description of MarkForDelete


PyIShellItemResources.CreateResource

interface = CreateResource(sir, riid )

Description of CreateResource.

Parameters

sir : PySHELL_ITEM_RESOURCE

Resource identifier

riid : PyIID

The interface to return


PyIShellItemResources.EnumResources

PyIEnumResources = EnumResources()

Description of EnumResources.


PyIShellItemResources.GetAttributes

GetAttributes()

Description of GetAttributes.


PyIShellItemResources.GetResourceDescription

GetResourceDescription(pcsir)

Description of GetResourceDescription.

Parameters

pcsir : PySHELL_ITEM_RESOURCE

Description for pcsir


PyIShellItemResources.GetSize

int = GetSize()

Description of GetSize.


PyIShellItemResources.GetTimes

GetTimes()

Description of GetTimes.


PyIShellItemResources.MarkForDelete

MarkForDelete()

Description of MarkForDelete.


PyIShellItemResources.OpenResource

PyIUnknown = OpenResource(pcsir, riid )

Description of OpenResource.

Parameters

pcsir : PySHELL_ITEM_RESOURCE

Description for pcsir

riid : PyIID

The interface to return


PyIShellItemResources.SetTimes

SetTimes(pftCreation, pftWrite, pftAccess)

Description of SetTimes.

Parameters

pftCreation : PyTime

Description for pftCreation

pftWrite : PyTime

Description for pftWrite

pftAccess : PyTime

Description for pftAccess


PyIShellItemResources.SupportsResource

boolean = SupportsResource(pcsir)

Description of SupportsResource.

Parameters

pcsir : PySHELL_ITEM_RESOURCE

Description for pcsir


PyIShellLibrary

PyIShellLibrary Object

Interface used to access Libraries

Comments

Requires Windows 7 or later

Methods

LoadLibraryFromItem
Loads an existing library file

LoadLibraryFromKnownFolder
Initializes library from a known folder

AddFolder
Includes a folder in the library

RemoveFolder
Removes a folder

GetFolders
Retrieves a collection of folders in the library

ResolveFolder
Attempts to locate a folder that has been moved or renamed

GetDefaultSaveFolder
Returns the default folder in which new items are saved

SetDefaultSaveFolder
Sets the default save location

GetOptions
Retrieves library option flags

SetOptions
Sets library option flags

GetFolderType
Retrieves the folder type of the library

SetFolderType
Sets the folder type of the library

GetIcon
Returns the location of the library's icon

SetIcon
Sets the library icon

Commit
Saves changes (only if loaded from an existing library)

Save
Saves the library to a specific location

SaveInKnownFolder
Saves the library in a known folder


PyIShellLibrary.AddFolder

AddFolder(Location)

Includes a folder

Parameters

Location : PyIShellItem

Shell item interface representing the folder


PyIShellLibrary.Commit

Commit()

Saves changes (only if loaded from an existing library)


PyIShellLibrary.GetDefaultSaveFolder

PyIShellItem = GetDefaultSaveFolder(Type, riid )

Returns the default folder in which new items are saved

Parameters

Type=DSFT_DETECT : int

Specifies whether to return public or private save location, shellcon.DSFT_*

riid=IID_IShellItem : PyIID

The interface to return


PyIShellLibrary.GetFolders

PyIShellItemArray = GetFolders(Filter, riid )

Retrieves a collection of folders in the library

Parameters

Filter=LFF_ALLITEMS : int

Specifies what types of folder to return (shellcon.LFF_*)

riid=IID_IShellItemArray : PyIID

The interface to return, IObjectCollection and IObjectArray also accepted.


PyIShellLibrary.GetFolderType

PyIID = GetFolderType()

Returns the library type, shell.FOLDERTYPEID_*


PyIShellLibrary.GetIcon

str = GetIcon()

Returns the location of the library's icon

Return Value

Uses "module,resource" format


PyIShellLibrary.GetOptions

int = GetOptions()

Retrieves library option flags

Return Value

Returns a combination of shellcon.LOF_* flags


PyIShellLibrary.LoadLibraryFromItem

LoadLibraryFromItem(Library, Mode)

Loads an existing library file

Parameters

Library : PyIShellItem

Shell item interface representing the library file

Mode : int

Access mode, combination of storagecon.STGM_* flags


PyIShellLibrary.LoadLibraryFromKnownFolder

LoadLibraryFromKnownFolder(Library, Mode)

Initializes library from a known folder

Parameters

Library : PyIID

Known folder id, shell.FOLDERID_*

Mode : int

Access mode, combination of storagecon.STGM_* flags


PyIShellLibrary.RemoveFolder

RemoveFolder(Location)

Removes a folder

Parameters

Location : PyIShellItem

Shell item interface representing the folder


PyIShellLibrary.ResolveFolder

PyIShellItem = ResolveFolder(FolderToResolve, Timeout , riid )

Attempts to locate a folder that has been moved or renamed

Parameters

FolderToResolve : PyIShellItem

Library item whose location has changed

Timeout : int

Max search time, specified in milliseconds

riid=IID_IShellItem : PyIID

The interface to return


PyIShellLibrary.Save

PyIShellItem = Save(FolderToSaveIn, LibraryName , Flags )

Saves the library to a specific location

Parameters

FolderToSaveIn : PyIShellItem

The destination folder, use None to save in current user's Libraries folder

LibraryName : str

Filename for the new library, without file extension

Flags : int

Determines behaviour if file already exists, shellcon.LSF_*

Return Value

Returns a shell item for the saved file.


PyIShellLibrary.SaveInKnownFolder

PyIShellItem = SaveInKnownFolder(FolderToSaveIn, LibraryName , Flags )

Saves the library in a known folder

Parameters

FolderToSaveIn : PyIID

The destination folder, shell.FOLDERID_*

LibraryName : str

Filename for the new library, without file extension

Flags : int

Determines behaviour if file already exists, shellcon.LSF_*


PyIShellLibrary.SetDefaultSaveFolder

SetDefaultSaveFolder(Type, SaveFolder)

Sets the default save location

Parameters

Type : int

Specifies public or private save location, shellcon.DSFT_*

SaveFolder : PyIShellItem

New default location, must be in the library


PyIShellLibrary.SetFolderType

SetFolderType(Type)

Sets the folder type for the library

Parameters

Type : PyIID

New type, shell.FOLDERTYPEID_*


PyIShellLibrary.SetIcon

SetIcon(Icon)

Sets the library icon

Parameters

Icon : str

Icon location in "module,resource" syntax


PyIShellLibrary.SetOptions

SetOptions(Mask, Options)

Sets library option flags

Parameters

Mask : int

Bitmask of flags to be changed, combination of shellcon.LOF_* values

Options : int

New options, combination of shellcon.LOF_* values


PyIShellLink

PyIShellLink Object

Interface used to access the properties of a shell link file (*.lnk)

Methods

GetPath
Retrieves the path and file name of a shell link object.

GetIDList
Retrieves the item id list that identifies the target of the shell link.

SetIDList
Sets the target of the link using an item id list

GetDescription
Retrieves the description of the link (displays as Comment in the UI)

SetDescription
Sets the description of the link (displays as Comment in the UI)

GetWorkingDirectory
Retrieves the working directory for the link

SetWorkingDirectory
Sets the working directory for the link

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

str = GetArguments(cchMaxName)

Retrieves the command-line arguments associated with a shell link object.

Parameters

cchMaxName=1024 : int

Number of characters to fetch.


PyIShellLink.GetDescription

str = GetDescription(cchMaxName)

Retrieves the description of the link (displays as Comment in the UI)

Parameters

cchMaxName=1024 : int

Number of character to allocate for the retrieved text


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

str = 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.GetIDList

PyIDL = GetIDList()

Retrieves the item id list that identifies the target of the shell link.


PyIShellLink.GetPath

str, WIN32_FIND_DATA = GetPath(fFlags, cchMaxPath )

Retrieves the target 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

Number of characters to allocate for returned filename

Comments

The AlternateFileName (8.3) member of WIN32_FIND_DATA does not return information


PyIShellLink.GetShowCmd

int = GetShowCmd()

Retrieves the show (SW_) command for a shell link object.


PyIShellLink.GetWorkingDirectory

str = GetWorkingDirectory(cchMaxName)

Retrieves the working directory for the link

Parameters

cchMaxName=1024 : int

Number of characters to allocate for returned text


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 : str

The new arguments.


PyIShellLink.SetDescription

SetDescription(Name)

Sets the description of the link (displays as Comment in the UI)

Parameters

Name : str

The description for the link


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

SetIDList(pidl)

Sets the target of the link using an item id list

Parameters

pidl : PyIDL

Absolute item id list that identifies the target


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

Sets the working directory for the link.

Parameters

Dir : str

The working directory for the link


PyIShellLinkDataList

PyIShellLinkDataList Object

Interface to a link's extra data blocks. Can be obtained from PyIShellLink by calling QueryInterface with IID_IShellLinkDataList

Methods

AddDataBlock
Inserts a data block into the link

CopyDataBlock
Retrieves the specified data block from the link

GetFlags
Retrieves the link's flags

RemoveDataBlock
Deletes one of the link's data blocks

SetFlags
Sets the flags indicating which data blocks are present


PyIShellLinkDataList.AddDataBlock

AddDataBlock(DataBlock)

Inserts a data block into the link

Parameters

DataBlock : dict

Contents are dependent on type of data block being added

Comments

Input should be one of NT_CONSOLE_PROPS, NT_FE_CONSOLE_PROPS, EXP_SPECIAL_FOLDER, EXP_DARWIN_LINK, or EXP_SZ_LINK. Expected form is indicated by the Signature member.


PyIShellLinkDataList.CopyDataBlock

dict = CopyDataBlock(Sig)

Retrieves the specified data block from the link

Parameters

Sig : int

The type of data block to retrieve, one of the shellcon.*_SIG constants

Return Value

The returned dictionary will contain different information depending on the value passed in


PyIShellLinkDataList.GetFlags

int = GetFlags()

Retrieves the link's flags

Return Value

Returns combination of shellcon.SLDF_* flags


PyIShellLinkDataList.RemoveDataBlock

RemoveDataBlock(Sig)

Deletes one of the link's data blocks

Parameters

Sig : int

Identifies which block is to be removed, one of shellcon.*_SIG constants


PyIShellLinkDataList.SetFlags

SetFlags(Flags)

Sets the flags indicating which data blocks are present

Parameters

Flags : int

Combination of shellcon.SLDF_* flags


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

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

Return Value

The result is an integer handle to the new window.


PyIShellView.DestroyViewWindow

DestroyViewWindow()

Description of DestroyViewWindow.


PyIShellView.EnableModeless

EnableModeless(fEnable)

Description of EnableModeless.

Parameters

fEnable : int

Description for fEnable


PyIShellView.GetCurrentInfo

PyFOLDERSETTINGS = GetCurrentInfo()

Description of GetCurrentInfo.


PyIShellView.GetItemObject

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

int = TranslateAccelerator(pmsg)

Description of TranslateAccelerator.

Parameters

pmsg : tuple

Description for pmsg

Return Value

The result is the HRESULT from the underlying TranslateAccelerator call


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

Structured storage compound storage object

Comments

This object acts as an iterator through PyIStorage::EnumElements

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.

Based On

PyIUnknown


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. Use empty seq to exclude all objects, or None to indicate no excludes.

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(Name, Mode , StgFmt , reserved2 )

Creates and opens a new storage object nested within this storage object.

Parameters

Name : str

The name of the newly created stream.

Mode : int

Access mode - combination of storagecon.STGM_* flags

StgFmt : int

Documented as "reserved"!

reserved2=0 : int

Description for reserved2


PyIStorage.CreateStream

PyIStream = CreateStream(Name, Mode , 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

Name : str

Name of the new stream

Mode : int

Access mode, storagecon.STGM_*

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

Copies or moves a substorage or stream from this storage object to another storage object.

Parameters

Name : str

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 : str

A string that contains the new name for the element in its new storage object.

Flags : int

Specifies whether to move or copy (storagecon.STGMOVE_MOVE or STGMOVE_COPY)


PyIStorage.OpenStorage

PyIStorage = OpenStorage(Name, Priority , Mode , snbExclude , reserved )

Opens an existing storage object with the specified name in the specified access mode.

Parameters

Name : str

Name of the storage, or None.

Priority : 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.

Mode : int

Access mode - combination of storagecon.STGM_* flags (must include STGM_SHARE_EXCLUSIVE)

snbExclude : SNB

Reserved for later - Must be None

reserved=0 : int

Reserved integer param.


PyIStorage.OpenStream

PyIStream = OpenStream(Name, reserved1 , Mode , reserved2 )

Opens an existing stream object within this storage object in the specified access mode.

Parameters

Name : str

Name of stream to be opened

reserved1 : object

A reserved param. Always pass None. NULL is always passed to the COM function

Mode : int

Access mode, storagecon.STGM_*

reserved2=0 : int

Reserved - must be zero.


PyIStorage.RenameElement

RenameElement(OldName, NewName)

Renames the specified substorage or stream in this storage object.

Parameters

OldName : str

The name of the substorage or stream to be changed.

NewName : str

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 : str

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

Based On

PyIUnknown


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.


PyITask

PyITask Object

Python object that encapsulates the ITask interface, inherits all the methods of PyIScheduledWorkItem

Methods

SetApplicationName
Specify which program the task will run

GetApplicationName
Retrieve name of program that task will run

SetParameters
Sets command line parameters

GetParameters
Returns command line parameters for task

SetWorkingDirectory
Sets initial working directory for task

GetWorkingDirectory
Return working directory that the task will start out in

SetPriority
Sets priority for task

GetPriority
Gets priority that will be assigned to process when task starts

SetTaskFlags
Sets flag for task

GetTaskFlags
Retrieve task flags (None currently defined)

SetMaxRunTime
Sets maximun run time for task, use -1 to disable

GetMaxRunTime
Returns maximun run time for task

Based On

PyIScheduledWorkItem


PyITask.GetApplicationName

PyUNICODE = GetApplicationName()

Retrieve name of program that task will run


PyITask.GetMaxRunTime

int = GetMaxRunTime()

Returns maximun run time for task


PyITask.GetParameters

PyUNICODE = GetParameters()

Returns command line parameters for task


PyITask.GetPriority

int = GetPriority()

Gets priority that will be assigned to process when task starts


PyITask.GetTaskFlags

int = GetTaskFlags()

Retrieve task flags (None currently defined)


PyITask.GetWorkingDirectory

PyUNICODE = GetWorkingDirectory()

Return working directory that the task will start out in


PyITask.SetApplicationName

SetApplicationName(ApplicationName)

Specify which program the task will run

Parameters

ApplicationName : unicode

Program to execute


PyITask.SetMaxRunTime

SetMaxRunTime(MaxRunTimeMS)

Sets maximun run time for task, use -1 to disable

Parameters

MaxRunTimeMS : int

Specified in milliseconds (use -1 to disable, not 0)


PyITask.SetParameters

SetParameters(Parameters)

Sets command line parameters

Parameters

Parameters : unicode

String containing command line parameters


PyITask.SetPriority

SetPriority(Priority)

Sets priority for task

Parameters

Priority : int

One of REALTIME_PRIORITY_CLASS, HIGH_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS, IDLE_PRIORITY_CLASS


PyITask.SetTaskFlags

SetTaskFlags(dwFlags)

Sets flag for task.

Parameters

dwFlags : int

None currently defined


PyITask.SetWorkingDirectory

SetWorkingDirectory(WorkingDirectory)

Sets initial working directory for task

Parameters

WorkingDirectory : unicode

Initial working directory


PyITaskScheduler

PyITaskScheduler Object

Interface to the Windows Task Scheduler

Methods

SetTargetComputer
Connect to another machine to manage its tasks

GetTargetComputer
Returns name of computer that the Task Scheduler is connected to

Enum
Retrieve list of task names

Activate
Opens the specified task and returns an ITask interface for it

Delete
Delete task by name

NewWorkItem
Creates a new task

AddWorkItem
Create a new scheduled task from PyITask object

IsOfType
Check if named task supports specified interface


PyITaskScheduler.Activate

PyITask = Activate(Name, riid )

Opens the specified task and returns an ITask interface for it

Parameters

Name : unicode

Name of task to retreive

riid=IID_ITask : PyIID

IID to return, currently only IID_ITask accepted


PyITaskScheduler.AddWorkItem

AddWorkItem(TaskName, WorkItem)

Create a new scheduled task from PyITask object

Parameters

TaskName : unicode

Name of task to be created

WorkItem : PyITask

Existing PyITask object

Comments

The PyItask passed in is modified in place and on success is associated with the new task, not the old one


PyITaskScheduler.Delete

Delete(TaskName)

Delete task by name

Parameters

TaskName : unicode

Name of task to delete


PyITaskScheduler.Enum

PyUnicode,... = Enum()

Retrieve list of task names


PyITaskScheduler.GetTargetComputer

unicode = GetTargetComputer()

Returns name of computer that the Task Scheduler is connected to


PyITaskScheduler.IsOfType

IsOfType(Name, riid)

Check if named object supports specified interface

Parameters

Name : unicode

Name of object

riid : PyIID

Named object is checked that it supports the interface of this IID


PyITaskScheduler.NewWorkItem

PyITask = NewWorkItem(TaskName, rclsid , riid )

Creates a new task

Parameters

TaskName : unicode

Name of new task

rclsid=CLSID_CTask : PyIID

Class id of work item, currently only CLSID_CTask (defaults if not passed in)

riid=IID_ITask : PyIID

Interface IID to return, currently only IID_ITask (defaults if not passed in)


PyITaskScheduler.SetTargetComputer

SetTargetComputer(Computer)

Connect to another machine to manage its tasks

Parameters

Computer : unicode

Name of system to connect to

Comments

Leading backslashes are required. Call will succeed without them, but no other methods will work.


PyITaskTrigger

PyITaskTrigger Object

Python object that encapsulates the ITaskTrigger interface

Methods

SetTrigger
Set trigger parameters from a PyTASK_TRIGGER object

GetTrigger
Retrieves trigger parms as a PyTASK_TRIGGER object

GetTriggerString
Build text summary of trigger


PyITaskTrigger.GetTrigger

PyTASK_TRIGGER = GetTrigger()

Retrieves trigger parms as a PyTASK_TRIGGER object


PyITaskTrigger.GetTriggerString

PyUnicode = GetTriggerString()

Build text summary of trigger


PyITaskTrigger.SetTrigger

SetTrigger(Trigger)

Set trigger parameters from a PyTASK_TRIGGER object

Parameters

Trigger : PyTASK_TRIGGER

Python object representing a TASK_TRIGGER struct


PyITaskbarList

PyITaskbarList Object

Description of the interface

Methods

HrInit
Intializes the interface before use

AddTab
Places a window on the taskbar

DeleteTab
Removes a window from the taskbar

ActivateTab
Marks a window as the active tab on the taskbar

SetActiveAlt
Sets the window as the active tab, without displaying it as pressed on the taskbar


PyITaskbarList.ActivateTab

ActivateTab(hwnd)

Marks a window as the active tab on the taskbar

Parameters

hwnd : PyHANDLE

Handle to window, should have WS_CAPTION style


PyITaskbarList.AddTab

AddTab(hwnd)

Places a window on the taskbar

Parameters

hwnd : PyHANDLE

Handle to window, should have WS_CAPTION style


PyITaskbarList.DeleteTab

DeleteTab(hwnd)

Removes a window from the taskbar

Parameters

hwnd : PyHANDLE

Handle to window, should have WS_CAPTION style


PyITaskbarList.HrInit

HrInit()

Intializes the interface before use


PyITaskbarList.SetActiveAlt

SetActiveAlt(hwnd)

Sets the window as the active tab, without displaying it as pressed on the taskbar

Parameters

hwnd : PyHANDLE

Handle to window, should have WS_CAPTION style


PyITransferAdviseSink

PyITransferAdviseSink Object

Interface that receives notifications from PyITransferSource or PyITransferDestination

Methods

UpdateProgress
Gives an estimate of amount of work completed

UpdateTransferState
Notifies client of current operation state

ConfirmOverwrite
Asks user for permission to overwrite an existing item

ConfirmEncryptionLoss
Notifies user when an item can't be encrypted at destination

FileFailure
Notifies user of failure, and queries how to proceed

SubStreamFailure
Notifies user of failure on a substream, and queries how to proceed

PropertyFailure
Notifies user of failure to set an item's properties


PyITransferAdviseSink.ConfirmEncryptionLoss

int = ConfirmEncryptionLoss(Source)

Notifies user when an item can't be encrypted at destination

Parameters

Source : PyIShellItem

Item that failed to be encrypted


PyITransferAdviseSink.ConfirmOverwrite

int = ConfirmOverwrite(Source, DestParent , Name )

Asks user for permission to overwrite an existing item

Parameters

Source : PyIShellItem

The item that will replace existing item

DestParent : PyIShellItem

Folder into which item will be placed

Name : str

New name for item, or None if item is to keep original name


PyITransferAdviseSink.FileFailure

(int,str) = FileFailure(Item, ItemName , Error )

Notifies user of failure, and queries how to proceed

Parameters

Item : PyIShellItem

The shell item that caused the failure

ItemName : str

Name of item if different than above, can be None

Error : int

HRESULT error code from operation

Return Value

Returns the HRESULT and new file name if renaming resolved the failure


PyITransferAdviseSink.PropertyFailure

int = PropertyFailure(Item, key , Error )

Notifies user of failure to set an item's properties

Parameters

Item : PyIShellItem

The item whose property could not be set

key : PyPROPERTYKEY

Identifies the property that caused the error, or None if all properties failed

Error : int

HRESULT error code returned by the operation

Return Value

Returns COPYENGINE_S_* to indicate that the failure was handled, or COPYENGINE_E_USERCANCELLED to cancel pending operations


PyITransferAdviseSink.SubStreamFailure

int = SubStreamFailure(Item, StreamName , Error )

Notifies user of failure on a substream, and queries how to proceed

Parameters

Item : PyIShellItem

The item whose stream couldn't be created

StreamName : str

Name of the failed stream

Error : int

HRESULT failure code from operation

Return Value

Returns COPYENGINE_S_* if operation is to continue, or COPYENGINE_E_* HRESULT if cancelled


PyITransferAdviseSink.UpdateProgress

UpdateProgress(SizeCurrent, SizeTotal, FilesCurrent, FilesTotal, FoldersCurrent, FoldersTotal)

Gives an estimate of amount of work completed

Parameters

SizeCurrent : int

Bytes transferred so far

SizeTotal : int

Total number of bytes

FilesCurrent : int

Number of files processed already

FilesTotal : int

Total number of files

FoldersCurrent : int

Number of folders processed already

FoldersTotal : int

Total number of folder


PyITransferAdviseSink.UpdateTransferState

UpdateTransferState(State)

Notifies client of current operation state

Parameters

State : int

A TRANSFER_ADVISE_STATE value (shellcon.TS_*)


PyITransferDestination

PyITransferDestination Object

Implemented by shell extensions that act as targets for item copy or move operations

Methods

Advise
Connects an advise sink

Unadvise
Disconnects an advise sink

CreateItem
Requests that a new item be created


PyITransferDestination.Advise

int = Advise(Sink)

Connects an advise sink

Parameters

Sink : PyITransferAdviseSink

Event sink to receive notifications

Return Value

Returns an id for the connection, to be passed to PyITransferDestination::Unadvise


PyITransferDestination.CreateItem

(int, interface, interface) = CreateItem(Name, Attributes , Size , Flags , riidItem , riidResources )

Requests that a new item be created

Parameters

Name : str

Filename to be created

Attributes : int

File attributes

Size : int

Size of file

Flags : int

Combination of shellcon.TSF_* flags

riidItem=IID_IShellItem : PyIID

Item interface to return

riidResources=IID_IShellItemResources : PyIID

Resource interface to return

Return Value

Returns the HRESULT and requested interfaces. Interfaces may be None if function returns one of the informational codes (shellcon.COPYENGINE_S_*)


PyITransferDestination.Unadvise

Unadvise(Cookie)

Disconnects an advise sink

Parameters

Cookie : int

Connection identifier as returned by PyITransferDestination::Advise


PyITransferMediumItem

PyITransferMediumItem Object

Description of the interface

Based On

PyIRelatedItem


PyITransferSource

PyITransferSource Object

Implemented by shell folders that can act as the source of shell item operations

Methods

Advise
Connects an advise sink to receive notifications

Unadvise
Disconnects an event sink

SetProperties
Specifies changes to be applied to items' properties

OpenItem
Initiates the copying of an item

MoveItem
Moves a shell item into another folder

RecycleItem
Moves an item to the recycle bin

RemoveItem
Deletes an item without recycling

RenameItem
Renames a shell item

LinkItem
Not implemented, according to MSDN

ApplyPropertiesToItem
Changes an item's properties as specified by PyITransferSource::SetProperties

GetDefaultDestinationName
Determines the name of an item as it would appear in a given folder

EnterFolder
Informs the copy engine that a folder will be the target of a file operation

LeaveFolder
Informs the copy engine that the operation on a destination folder is finished


PyITransferSource.Advise

int = Advise(Sink)

Connects an advise sink to receive notifications

Parameters

Sink : PyITransferAdviseSink

Event sink to respond to notifications


PyITransferSource.ApplyPropertiesToItem

PyIShellItem = ApplyPropertiesToItem(Source)

Changes an item's properties as specified by PyITransferSource::SetProperties

Parameters

Source : PyIShellItem

Item whose properties are to be changed


PyITransferSource.EnterFolder

int = EnterFolder(ChildFolderDest)

Informs the copy engine that a folder will be the target of a file operation

Parameters

ChildFolderDest : PyIShellItem

The destination folder for the operation


PyITransferSource.GetDefaultDestinationName

str = GetDefaultDestinationName(Source, ParentDest )

Determines the name of an item as it would appear in a given folder

Parameters

Source : PyIShellItem

The item whose name is wanted

ParentDest : PyIShellItem

The destination folder


PyITransferSource.LeaveFolder

int = LeaveFolder(ChildFolderDest)

Informs the copy engine that the operation on a destination folder is finished

Parameters

ChildFolderDest : PyIShellItem

Destination folder


PyITransferSource.LinkItem

(int, PyIShellItem = LinkItem(Source, ParentDest , NewName , flags )

Not implemented, according to MSDN

Parameters

Source : PyIShellItem

Description for psiSource

ParentDest : PyIShellItem

Description for psiParentDest

NewName : str

Description for NewName

flags : int

Combination of shellcon.TSF_* flags


PyITransferSource.MoveItem

(int, PyIShellItem = MoveItem(Item, ParentDst , NameDst , flags )

Moves a shell item into another folder

Parameters

Item : PyIShellItem

Item to be moved

ParentDst : PyIShellItem

The folder into which it will be moved

NameDst : unicode

New name for item after move, None to keep same name

flags : int

Combination of shellcon.TSF_* flags

Return Value

Returns the HRESULT from the operation and the new shell item, which may be None when the code in one of the informational COPYENGINE_S_* values. See MSDN for descriptions of expected actions for specific error codes.


PyITransferSource.OpenItem

(int, PyIShellItemResources) = OpenItem(Item, flags , riid )

Initiates the copying of an item

Parameters

Item : PyIShellItem

The item to be copied.

flags : int

Combination of shellcon.TSF_* flags

riid=IID_IShellItemResources : PyIID

The interface to return


PyITransferSource.RecycleItem

(int, PyIShellItem = RecycleItem(Source, ParentDest , flags )

Moves an item to the recycle bin

Parameters

Source : PyIShellItem

The item to be recycled

ParentDest : PyIShellItem

Shell item representing the recycle bin

flags : int

Combination of shellcon.TSF_* flags


PyITransferSource.RemoveItem

int = RemoveItem(Source, flags )

Deletes an item without recycling

Parameters

Source : PyIShellItem

The item to be deleted

flags : int

Combination of shellcon.TSF_* flags

Return Value

Returns the HRESULT of the operation


PyITransferSource.RenameItem

(int, PyIShellItem) = RenameItem(Source, NewName , flags )

Renames a shell item

Parameters

Source : PyIShellItem

Item to be renamed

NewName : str

The name to be given to the item

flags : int

Combination of shellcon.TSF_* flags


PyITransferSource.SetProperties

SetProperties(proparray)

Specifies changes to be applied to items' properties

Parameters

proparray : PyIPropertyChangeArray

Property changes to be applied by PyITransferSource::ApplyPropertiesToItem


PyITransferSource.Unadvise

Unadvise(Cookie)

Disconnects an event sink

Parameters

Cookie : int

Connection id as returned by PyITransferSource::Advise


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

Based On

PyIUnknown


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.

Based On

PyIUnknown


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

Based On

PyIUnknown


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


PyIUniformResourceLocator

PyIUniformResourceLocator Object

Interface to an internet shortcut

Methods

GetURL
Returns the URL for the shortcut

SetURL
Sets the URL for the shortcut

InvokeCommand
Performs one of the object's predefined actions


PyIUniformResourceLocator.GetURL

str = GetURL()

Returns the URL for the shortcut


PyIUniformResourceLocator.InvokeCommand

int = InvokeCommand(Verb, Flags , hwndParent )

Performs one of the object's predefined actions

Parameters

Verb : str

The verb to be invoked

Flags=0 : int

Combination of shellcon.IURL_INVOKECOMMAND_* flags

hwndParent=0 : PyHANDLE

Handle to parent window


PyIUniformResourceLocator.SetURL

SetURL(URL, InFlags)

Sets the URL for the shortcut

Parameters

URL : str

The url to be set

InFlags=0 : int

One of the shellcon.IURL_SETURL* flags


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: O:/SRC/PYWIN32/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


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*/)


PyOLEMENUGROUPWIDTHS

PyOLEMENUGROUPWIDTHS Object

Tuple containing 6 ints indicating nbr of options in each menu group


PyPROPERTYKEY

PyPROPERTYKEY Object

A tuple of a fmtid and property id (IID, int) that uniquely identifies a property


PyPROPVARIANT

PyPROPVARIANT Object

Encapsulates a PROPVARIANT structure. Constructed using PROPVARIANTType(Value, Type=VT_ILLEGAL). Value can be any object that can be be converted to the requested variant type. Type should be a combination of VARENUM values (pythoncom.VT_*). VT_ILLEGAL indicates that an appropriate variant type should be inferred from the Value. If the requested Type includes VT_VECTOR, Value should be a sequence of compatible objects. Currently VT_ARRAY and VT_BYREF are not supported, although some types can be coerced into a safearray using PyPROPVARIANT::ChangeType.

Properties

int vt
The variant type, a combination of VARENUM values including flags. (read only)

Methods

GetValue
Returns an object representing the variant value

ToString
Returns the value as a string

ChangeType
Coerce to a different variant type


PyPROPVARIANT.ChangeType

PyPROPVARIANT = ChangeType(Type, Flags )

Coerce to a different variant type

Parameters

Type : int

New variant type, combination of pythoncom.VT_* values

Flags=0 : int

Reserved (PROPVAR_CHANGE_FLAGS)

Win32 API References

Search for PropVariantChangeType at msdn, google or google groups.


PyPROPVARIANT.GetValue

object = GetValue()

Returns an object representing the variant value


PyPROPVARIANT.ToString

str = ToString()

Returns the value as a string

Win32 API References

Search for PropVariantToString at msdn, google or google groups.


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 : ULONG

The property ID.

ulMask=0 : int


PySContentRestriction

PySContentRestriction Object

Parameters

fuzzyLevel : int

propTag : ULONG

The property ID.

propertyValue : PySPropValue


PySExistRestriction

PySExistRestriction Object

Parameters

propTag : ULONG

The property ID to check for existance.

reserved1=0 : int

reserved2=0 : int


PySHELL_ITEM_RESOURCE

PySHELL_ITEM_RESOURCE Object

Tuple of (PyIID, str) that identifies a shell resource


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 : ULONG

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 Copy into new MAPI memory block
PT_STRING8 | A sequence of string or PyUnicode objects.
PT_UNICODE | A string or PyUnicode Bit of a hack - need to copy into MAPI block.
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 : ULONG

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


PyTASK_TRIGGER

PyTASK_TRIGGER Object

Python object representing a TASK_TRIGGER structure via the structmember Api


RTF_WCSINFO

RTF_WCSINFO Object

A tuple representing a RTF_WCSINFO structure

Items

[0] ULONG : flags

[1] ULONG : incodepage

[2] ULONG : outcodepage

Parameters

stream : PyIStream

Message stream

wcsinfo=(0, 0, 0) : RTF_WCSINFO

function options


SHFILEINFO

SHFILEINFO Object

A tuple representing a SHFILEINFO structure Represented as a tuple of (hIcon, iIcon, dwAttributes, displayName, typeName)


SHFILEOPSTRUCT

SHFILEOPSTRUCT Object

A tuple representing a Win32 shell SHFILEOPSTRUCT structure, used with shell::SHFileOperation

Comments

From and To can contain multiple file names concatenated with a single null between them, eg "c:\\file1.txt\\0c:\\file2.txt". A double null terminator will be appended automatically. If To specifies multiple file names, flags must contain FOF_MULTIDESTFILES

Items

[0] int : hwnd

Handle of window in which to display status messages

[1] int : wFunc

One of the shellcon.FO_* values

[2] str/unicode : From

String containing source file name(s) separated by nulls

[3] str/unicode : To

String containing destination file name(s) separated by nulls, can be None

[4] int : flags

Combination of shellcon.FOF_* flags. Default=0

[5] None : NameMappings

Maps input file names to their new names. This is actually output, and must be None if passed as input. Default=None

[6] string : ProgressTitle

Title for progress dialog (flags must contain FOF_SIMPLEPROGRESS). Default=None


SI_ACCESS

SI_ACCESS Object

Tuple of 4 items representing SI_ACCESS struct

Items

[0] PyIID : guid

GUID identifying the object type permissions apply to. Use GUID_NULL for object itself

[1] int : mask

Bitmask of permissions

[2] PyUNICODE : Name

Description to be displayed for the permissions

[3] int : Flags

Indicates which pages will display the permissions, and how they may be inherited. Combination of SI_ACCESS_SPECIFIC, SI_ACCESS_GENERAL, SI_ACCESS_CONTAINER, SI_ACCESS_PROPERTY, CONTAINER_INHERIT_ACE, INHERIT_ONLY_ACE, OBJECT_INHERIT_ACE


SI_INHERIT_TYPE

SI_INHERIT_TYPE Object

Tuple of 3 items describing a method of inheritance

Items

[0] PyIID : guid

GUID for type of child object, GUID_NULL indicates object itself

[1] int : Flags

ACE inheritance flags, combination of OBJECT_INHERIT_ACE, CONTAINER_INHERIT_ACE, INHERIT_ONLY_ACE

[2] PyUNICODE : Name

Description that will be displayed on the Advanced page


SI_OBJECT_INFO

SI_OBJECT_INFO Object

Six-tuple representing SI_OBJECT_INFO struct

Items

[0] int : Flags

Combination of ntsecuritycon.SI_* flags specifying options

[1] PyHANDLE : hInstance

Handle to a module containing string resources (not supported yet, use 0)

[2] PyUNICODE : ServerName

Name of authenticating server if not local machine

[3] PyUNICODE : ObjectName

Name of object whose security will be displayed

[4] PyUNICODE : PageTitle

Title to be used for basic propery sheet (SI_PAGE_TITLE must be passed in Flags)

[5] PyIID : ObjectType

GUID identifying the type of object, usually IID_NULL


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 tdescAlias
If TypeKind == pythoncom.TKIND_ALIAS, specifies the type for which this type is an alias.

IDLDESC idldeskType
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.


Constants

  • AB_NO_DIALOG
  • APPBREAKFLAG_DEBUGGER_BLOCK
  • APPBREAKFLAG_DEBUGGER_HALT
  • APPBREAKFLAG_STEP
  • ATTACH_BY_REFERENCE
  • ATTACH_BY_REF_ONLY
  • ATTACH_BY_REF_RESOLVE
  • ATTACH_BY_VALUE
  • ATTACH_EMBEDDED_MSG
  • ATTACH_OLE
  • 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
  • CCSF_8BITHEADERS
  • CCSF_EMBEDDED_MESSAGE
  • CCSF_INCLUDE_BCC
  • CCSF_NOHEADERS
  • CCSF_NO_MSGID
  • CCSF_PLAIN_TEXT_ONLY
  • CCSF_PRESERVE_SOURCE
  • CCSF_SMTP
  • CCSF_USE_RTF
  • CCSF_USE_TNEF
  • CLEAR_NRN_PENDING
  • CLEAR_READ_FLAG
  • CLEAR_RN_PENDING
  • CLSID_DefaultDebugSessionProvider
  • CLSID_MachineDebugManager
  • CLSID_ProcessDebugManager
  • CONVENIENT_DEPTH
  • 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_TEXT_ALLOWBREAKPOINTS
  • DEBUG_TEXT_ISEXPRESSION
  • DELETE_HARD_DELETE
  • DEL_FOLDERS
  • DEL_MESSAGES
  • DIR_BACKWARD
  • DOCUMENTNAMETYPE_APPNODE
  • DOCUMENTNAMETYPE_FILE_TAIL
  • DOCUMENTNAMETYPE_TITLE
  • DOCUMENTNAMETYPE_URL
  • DS3DMODE_DISABLE
  • DS3DMODE_HEADRELATIVE
  • DS3DMODE_NORMAL
  • DSBCAPS_CTRL3D
  • DSBCAPS_CTRLFREQUENCY
  • DSBCAPS_CTRLPAN
  • DSBCAPS_CTRLPOSITIONNOTIFY
  • DSBCAPS_CTRLVOLUME
  • DSBCAPS_GETCURRENTPOSITION2
  • DSBCAPS_GLOBALFOCUS
  • DSBCAPS_LOCHARDWARE
  • DSBCAPS_LOCSOFTWARE
  • DSBCAPS_MUTE3DATMAXDISTANCE
  • DSBCAPS_PRIMARYBUFFER
  • DSBCAPS_STATIC
  • DSBCAPS_STICKYFOCUS
  • DSBLOCK_ENTIREBUFFER
  • DSBLOCK_FROMWRITECURSOR
  • DSBPLAY_LOOPING
  • DSBSTATUS_BUFFERLOST
  • DSBSTATUS_LOOPING
  • DSBSTATUS_PLAYING
  • DSCAPS_CERTIFIED
  • DSCAPS_CONTINUOUSRATE
  • DSCAPS_EMULDRIVER
  • DSCAPS_PRIMARY16BIT
  • DSCAPS_PRIMARY8BIT
  • DSCAPS_PRIMARYMONO
  • DSCAPS_PRIMARYSTEREO
  • DSCAPS_SECONDARY16BIT
  • DSCAPS_SECONDARY8BIT
  • DSCAPS_SECONDARYMONO
  • DSCAPS_SECONDARYSTEREO
  • DSCBCAPS_WAVEMAPPED
  • DSCCAPS_EMULDRIVER
  • DSSCL_EXCLUSIVE
  • DSSCL_NORMAL
  • DSSCL_PRIORITY
  • DSSCL_WRITEPRIMARY
  • DSSPEAKER_GEOMETRY_MAX
  • DSSPEAKER_GEOMETRY_MIN
  • DSSPEAKER_GEOMETRY_NARROW
  • DSSPEAKER_GEOMETRY_WIDE
  • DSSPEAKER_HEADPHONE
  • DSSPEAKER_MONO
  • DSSPEAKER_QUAD
  • DSSPEAKER_STEREO
  • DSSPEAKER_SURROUND
  • EMBDHLP_CREATENOW
  • EMBDHLP_DELAYCREATE
  • EMBDHLP_INPROC_HANDLER
  • EMBDHLP_INPROC_SERVER
  • ERRORRESUMEACTION_AbortCallAndReturnErrorToCaller
  • ERRORRESUMEACTION_ReexecuteErrorStatement
  • ERRORRESUMEACTION_SkipErrorStatement
  • EX_DBGPROP_INFO_DEBUGEXTPROP
  • EX_DBGPROP_INFO_ID
  • EX_DBGPROP_INFO_LOCKBYTES
  • EX_DBGPROP_INFO_NTYPE
  • EX_DBGPROP_INFO_NVALUE
  • FEATURE_ADDON_MANAGEMENT
  • FEATURE_BEHAVIORS
  • FEATURE_DISABLE_MK_PROTOCOL
  • FEATURE_ENTRY_COUNT
  • FEATURE_GET_URL_DOM_FILEPATH_UNENCODED
  • FEATURE_HTTP_USERNAME_PASSWORD_DISABLE
  • FEATURE_LOCALMACHINE_LOCKDOWN
  • FEATURE_MIME_HANDLING
  • FEATURE_MIME_SNIFFING
  • FEATURE_OBJECT_CACHING
  • FEATURE_PROTOCOL_LOCKDOWN
  • FEATURE_RESTRICT_ACTIVEXINSTALL
  • FEATURE_RESTRICT_FILEDOWNLOAD
  • FEATURE_SAFE_BINDTOOBJECT
  • FEATURE_SECURITYBAND
  • FEATURE_UNC_SAVEDFILECHECK
  • FEATURE_VALIDATE_NAVIGATE_URL
  • FEATURE_WEBOC_POPUPMANAGEMENT
  • FEATURE_WINDOW_RESTRICTIONS
  • FEATURE_ZONE_ELEVATION
  • FLUSH_ASYNC_OK
  • FLUSH_DOWNLOAD
  • FLUSH_FORCE
  • FLUSH_NO_UI
  • FLUSH_UPLOAD
  • FL_FULLSTRING
  • FL_IGNORECASE
  • FL_IGNORENONSPACE
  • FL_LOOSE
  • FL_PREFIX
  • FL_SUBSTRING
  • FOLDER_DIALOG
  • FOLDER_GENERIC
  • FOLDER_SEARCH
  • FORCE_SAVE
  • GENERATE_RECEIPT_ONLY
  • GET_FEATURE_FROM_PROCESS
  • GET_FEATURE_FROM_REGISTRY
  • GET_FEATURE_FROM_THREAD
  • GET_FEATURE_FROM_THREAD_INTERNET
  • GET_FEATURE_FROM_THREAD_INTRANET
  • GET_FEATURE_FROM_THREAD_LOCALMACHINE
  • GET_FEATURE_FROM_THREAD_RESTRICTED
  • GET_FEATURE_FROM_THREAD_TRUSTED
  • KEEP_OPEN_READONLY
  • KEEP_OPEN_READWRITE
  • MAIL_E_NAMENOTFOUND
  • MAPI_ABCONT
  • MAPI_ADDRBOOK
  • MAPI_ALLOW_OTHERS
  • MAPI_ASSOCIATED
  • MAPI_ATTACH
  • MAPI_BCC
  • MAPI_BEST_ACCESS
  • MAPI_CC
  • MAPI_CREATE
  • MAPI_DEFAULT_SERVICES
  • MAPI_DEFERRED_ERRORS
  • MAPI_DIALOG
  • MAPI_DISTLIST
  • MAPI_EXPLICIT_PROFILE
  • MAPI_EXTENDED
  • 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_LOCKID_LIMIT
  • MAPI_E_LOGON_FAILED
  • MAPI_E_MISSING_REQUIRED_COLUMN
  • MAPI_E_NAMED_PROP_QUOTA_EXCEEDED
  • MAPI_E_NETWORK_ERROR
  • 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_INITIALIZED
  • MAPI_E_NOT_IN_QUEUE
  • MAPI_E_NOT_ME
  • MAPI_E_NO_ACCESS
  • MAPI_E_NO_RECIPIENTS
  • MAPI_E_NO_SUPPORT
  • MAPI_E_NO_SUPPRESS
  • MAPI_E_OBJECT_CHANGED
  • MAPI_E_OBJECT_DELETED
  • MAPI_E_OFFLINE
  • MAPI_E_PASSWORD_CHANGE_REQUIRED
  • MAPI_E_PASSWORD_EXPIRED
  • MAPI_E_PROFILE_DELETED
  • MAPI_E_RECONNECTED
  • MAPI_E_SESSION_LIMIT
  • MAPI_E_STORE_FULL
  • 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_FOLDER
  • MAPI_FORCE_ACCESS
  • MAPI_FORCE_DOWNLOAD
  • MAPI_FORMINFO
  • MAPI_INIT_VERSION
  • MAPI_LOGON_UI
  • MAPI_MAILUSER
  • MAPI_MESSAGE
  • MAPI_MODIFY
  • MAPI_MOVE
  • MAPI_MULTITHREAD_NOTIFICATIONS
  • MAPI_NATIVE_BODY
  • MAPI_NATIVE_BODY_TYPE_HTML
  • MAPI_NATIVE_BODY_TYPE_PLAINTEXT
  • MAPI_NATIVE_BODY_TYPE_RTF
  • MAPI_NEW_SESSION
  • MAPI_NOREPLACE
  • MAPI_NO_IDS
  • MAPI_NO_MAIL
  • MAPI_NO_STRINGS
  • MAPI_NT_SERVICE
  • MAPI_P1
  • MAPI_PASSWORD_UI
  • MAPI_PROFSECT
  • MAPI_SERVICE_UI_ALWAYS
  • MAPI_SESSION
  • MAPI_STATUS
  • MAPI_STORE
  • 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
  • MDB_NO_DIALOG
  • MDB_NO_MAIL
  • MDB_TEMPORARY
  • MDB_WRITE
  • MESSAGE_DIALOG
  • MODRECIP_ADD
  • MODRECIP_MODIFY
  • MODRECIP_REMOVE
  • NO_ATTACHMENT
  • OLECLOSE_NOSAVE
  • OLECLOSE_PROMPTSAVE
  • OLECLOSE_SAVEIFDIRTY
  • OLECMDF_ENABLED
  • OLECMDF_LATCHED
  • OLECMDF_NINCHED
  • OLECMDF_SUPPORTED
  • OLECMDTEXTF_NAME
  • OLECMDTEXTF_NONE
  • OLECMDTEXTF_STATUS
  • OLECREATE_LEAVERUNNING
  • OLEIVERB_DISCARDUNDOSTATE
  • OLEIVERB_HIDE
  • OLEIVERB_INPLACEACTIVATE
  • OLEIVERB_OPEN
  • OLEIVERB_PRIMARY
  • OLEIVERB_SHOW
  • OLEIVERB_UIACTIVATE
  • OPENSTORE_HOME_LOGON
  • OPENSTORE_OVERRIDE_HOME_MDB
  • OPENSTORE_PUBLIC
  • OPENSTORE_TAKE_OWNERSHIP
  • OPENSTORE_USE_ADMIN_PRIVILEGE
  • OPEN_IF_EXISTS
  • PSTF_BEST_ENCRYPTION
  • PSTF_COMPRESSABLE_ENCRYPTION
  • PSTF_NO_ENCRYPTION
  • 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
  • RTF_SYNC_BODY_CHANGED
  • RTF_SYNC_RTF_CHANGED
  • SERVICE_UI_ALLOWED
  • SERVICE_UI_ALWAYS
  • SET_FEATURE_IN_REGISTRY
  • SET_FEATURE_ON_PROCESS
  • SET_FEATURE_ON_THREAD
  • SET_FEATURE_ON_THREAD_INTERNET
  • SET_FEATURE_ON_THREAD_INTRANET
  • SET_FEATURE_ON_THREAD_LOCALMACHINE
  • SET_FEATURE_ON_THREAD_RESTRICTED
  • SET_FEATURE_ON_THREAD_TRUSTED
  • SHOW_SOFT_DELETES
  • SOF_UNIQUEFILENAME
  • SOURCETEXT_ATTR_COMMENT
  • SOURCETEXT_ATTR_FUNCTION_START
  • SOURCETEXT_ATTR_KEYWORD
  • SOURCETEXT_ATTR_NONSOURCE
  • SOURCETEXT_ATTR_NUMBER
  • SOURCETEXT_ATTR_OPERATOR
  • SOURCETEXT_ATTR_STRING
  • STATUS_DEFAULT_STORE
  • STATUS_FLUSH_QUEUES
  • STATUS_INBOUND_FLUSH
  • STATUS_OUTBOUND_FLUSH
  • SUPPRESS_RECEIPT
  • TABLE_CHANGED
  • TABLE_ERROR
  • TABLE_RELOAD
  • TABLE_RESTRICT_DONE
  • TABLE_ROW_ADDED
  • TABLE_ROW_DELETED
  • TABLE_ROW_MODIFIED
  • TABLE_SETCOL_DONE
  • TABLE_SORT_ASCEND
  • TABLE_SORT_COMBINE
  • TABLE_SORT_DESCEND
  • TABLE_SORT_DONE
  • TBL_ALL_COLUMNS
  • TBL_ASYNC
  • TBL_BATCH
  • TEXT_DOC_ATTR_READONLY
  • fnevCriticalError
  • fnevExtended
  • fnevNewMail
  • fnevObjectCopied
  • fnevObjectCreated
  • fnevObjectDeleted
  • fnevObjectModified
  • fnevObjectMoved
  • fnevReservedForMapi
  • fnevSearchComplete
  • fnevStatusObjectModified
  • fnevTableModified


AB_NO_DIALOG

const mapi.AB_NO_DIALOG;


APPBREAKFLAG_DEBUGGER_BLOCK

const axdebug.APPBREAKFLAG_DEBUGGER_BLOCK;

Languages should break immediately with BREAKREASON_DEBUGGER_BLOCK


APPBREAKFLAG_DEBUGGER_HALT

const axdebug.APPBREAKFLAG_DEBUGGER_HALT;

Languages should break immediately with BREAKREASON_DEBUGGER_HALT


APPBREAKFLAG_STEP

const axdebug.APPBREAKFLAG_STEP;

ADD_CONSTANT(APPBREAKFLAG_APPBREAKFLAG_NESTED);


ATTACH_BY_REFERENCE

const mapi.ATTACH_BY_REFERENCE;

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_REF_ONLY

const mapi.ATTACH_BY_REF_ONLY;

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;

The PR_ATTACH_PATHNAME or PR_ATTACH_LONG_PATHNAME property contains a fully qualified path identifying the attachment.


ATTACH_BY_VALUE

const mapi.ATTACH_BY_VALUE;

The PR_ATTACH_DATA_BIN property contains the attachment data.


ATTACH_EMBEDDED_MSG

const mapi.ATTACH_EMBEDDED_MSG;

The PR_ATTACH_DATA_OBJ property contains an embedded object that supports the IMessage interface.


ATTACH_OLE

const mapi.ATTACH_OLE;

The attachment is an embedded OLE object


BMR_EQZ

const mapi.BMR_EQZ;

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;

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;

Starts the seek operation from the beginning of the table.


BOOKMARK_CURRENT

const mapi.BOOKMARK_CURRENT;

Starts the seek operation from the row in the table where the cursor is located.


BOOKMARK_END

const mapi.BOOKMARK_END;

Starts the seek operation from the end of the table.


BREAKPOINT_DELETED

const axdebug.BREAKPOINT_DELETED;


BREAKPOINT_DISABLED

const axdebug.BREAKPOINT_DISABLED;


BREAKPOINT_ENABLED

const axdebug.BREAKPOINT_ENABLED;


BREAKREASON_BREAKPOINT

const axdebug.BREAKREASON_BREAKPOINT;

Caused by an explicit breakpoint


BREAKREASON_DEBUGGER_BLOCK

const axdebug.BREAKREASON_DEBUGGER_BLOCK;

Caused by another thread breaking


BREAKREASON_DEBUGGER_HALT

const axdebug.BREAKREASON_DEBUGGER_HALT;

Caused by debugger IDE requested break


BREAKREASON_ERROR

const axdebug.BREAKREASON_ERROR;

Caused by an execution error


BREAKREASON_HOST_INITIATED

const axdebug.BREAKREASON_HOST_INITIATED;

Caused by host requested break


BREAKREASON_LANGUAGE_INITIATED

const axdebug.BREAKREASON_LANGUAGE_INITIATED;

Caused by a scripted break


BREAKREASON_STEP

const axdebug.BREAKREASON_STEP;

Caused by the stepping mode


BREAKRESUMEACTION_ABORT

const axdebug.BREAKRESUMEACTION_ABORT;

Abort the application


BREAKRESUMEACTION_CONTINUE

const axdebug.BREAKRESUMEACTION_CONTINUE;

Continue running


BREAKRESUMEACTION_STEP_INTO

const axdebug.BREAKRESUMEACTION_STEP_INTO;

Step into a procedure


BREAKRESUMEACTION_STEP_OUT

const axdebug.BREAKRESUMEACTION_STEP_OUT;

Step out of the current procedure


BREAKRESUMEACTION_STEP_OVER

const axdebug.BREAKRESUMEACTION_STEP_OVER;

Step over a procedure


CCSF_8BITHEADERS

const mapi.CCSF_8BITHEADERS;

the converter should allow 8 bit headers


CCSF_EMBEDDED_MESSAGE

const mapi.CCSF_EMBEDDED_MESSAGE;

sent/unsent information is persisted in X-Unsent


CCSF_INCLUDE_BCC

const mapi.CCSF_INCLUDE_BCC;

the converter should include Bcc recipients


CCSF_NOHEADERS

const mapi.CCSF_NOHEADERS;

the converter should ignore the headers on the outside message


CCSF_NO_MSGID

const mapi.CCSF_NO_MSGID;

don't include Message-Id field in outgoing messages


CCSF_PLAIN_TEXT_ONLY

const mapi.CCSF_PLAIN_TEXT_ONLY;

the converter should just send plain text


CCSF_PRESERVE_SOURCE

const mapi.CCSF_PRESERVE_SOURCE;

don't modify the source message


CCSF_SMTP

const mapi.CCSF_SMTP;

the converter is being passed an SMTP message


CCSF_USE_RTF

const mapi.CCSF_USE_RTF;

the converter should do HTML->RTF conversion


CCSF_USE_TNEF

const mapi.CCSF_USE_TNEF;

the converter should embed TNEF in the MIME message


CLEAR_NRN_PENDING

const mapi.CLEAR_NRN_PENDING;

The MSGFLAG_NRN_PENDING flag should be cleared in PR_MESSAGE_FLAGS and an unread report should not be sent.


CLEAR_READ_FLAG

const mapi.CLEAR_READ_FLAG;

The MSGFLAG_READ flag should be cleared in PR_MESSAGE_FLAGS and a read report should not be sent.


CLEAR_RN_PENDING

const mapi.CLEAR_RN_PENDING;

The MSGFLAG_RN_PENDING flag should be cleared in PR_MESSAGE_FLAGS and a read report should not be sent.


CLSID_DefaultDebugSessionProvider

const axdebug.CLSID_DefaultDebugSessionProvider;

An IID object


CLSID_MachineDebugManager

const axdebug.CLSID_MachineDebugManager;

An IID object


CLSID_ProcessDebugManager

const axdebug.CLSID_ProcessDebugManager;

An IID object


CONVENIENT_DEPTH

const mapi.CONVENIENT_DEPTH;

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.


DBGPROP_ATTRIB_ACCESS_FINAL

const axdebug.DBGPROP_ATTRIB_ACCESS_FINAL;


DBGPROP_ATTRIB_ACCESS_PRIVATE

const axdebug.DBGPROP_ATTRIB_ACCESS_PRIVATE;


DBGPROP_ATTRIB_ACCESS_PROTECTED

const axdebug.DBGPROP_ATTRIB_ACCESS_PROTECTED;


DBGPROP_ATTRIB_ACCESS_PUBLIC

const axdebug.DBGPROP_ATTRIB_ACCESS_PUBLIC;


DBGPROP_ATTRIB_HAS_EXTENDED_ATTRIBS

const axdebug.DBGPROP_ATTRIB_HAS_EXTENDED_ATTRIBS;


DBGPROP_ATTRIB_NO_ATTRIB

const axdebug.DBGPROP_ATTRIB_NO_ATTRIB;


DBGPROP_ATTRIB_STORAGE_FIELD

const axdebug.DBGPROP_ATTRIB_STORAGE_FIELD;


DBGPROP_ATTRIB_STORAGE_GLOBAL

const axdebug.DBGPROP_ATTRIB_STORAGE_GLOBAL;


DBGPROP_ATTRIB_STORAGE_STATIC

const axdebug.DBGPROP_ATTRIB_STORAGE_STATIC;


DBGPROP_ATTRIB_STORAGE_VIRTUAL

const axdebug.DBGPROP_ATTRIB_STORAGE_VIRTUAL;


DBGPROP_ATTRIB_TYPE_IS_CONSTANT

const axdebug.DBGPROP_ATTRIB_TYPE_IS_CONSTANT;


DBGPROP_ATTRIB_TYPE_IS_SYNCHRONIZED

const axdebug.DBGPROP_ATTRIB_TYPE_IS_SYNCHRONIZED;


DBGPROP_ATTRIB_TYPE_IS_VOLATILE

const axdebug.DBGPROP_ATTRIB_TYPE_IS_VOLATILE;


DBGPROP_ATTRIB_VALUE_IS_EXPANDABLE

const axdebug.DBGPROP_ATTRIB_VALUE_IS_EXPANDABLE;


DBGPROP_ATTRIB_VALUE_IS_INVALID

const axdebug.DBGPROP_ATTRIB_VALUE_IS_INVALID;


DBGPROP_ATTRIB_VALUE_READONLY

const axdebug.DBGPROP_ATTRIB_VALUE_READONLY;


DBGPROP_INFO_ATTRIBUTES

const axdebug.DBGPROP_INFO_ATTRIBUTES;


DBGPROP_INFO_AUTOEXPAND

const axdebug.DBGPROP_INFO_AUTOEXPAND;


DBGPROP_INFO_DEBUGPROP

const axdebug.DBGPROP_INFO_DEBUGPROP;


DBGPROP_INFO_FULLNAME

const axdebug.DBGPROP_INFO_FULLNAME;


DBGPROP_INFO_NAME

const axdebug.DBGPROP_INFO_NAME;


DBGPROP_INFO_TYPE

const axdebug.DBGPROP_INFO_TYPE;


DBGPROP_INFO_VALUE

const axdebug.DBGPROP_INFO_VALUE;


DEBUG_TEXT_ALLOWBREAKPOINTS

const axdebug.DEBUG_TEXT_ALLOWBREAKPOINTS;

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;

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.


DELETE_HARD_DELETE

const mapi.DELETE_HARD_DELETE;

Permanently removes all messages, including soft-deleted ones.


DEL_FOLDERS

const mapi.DEL_FOLDERS;

All subfolders of the subfolder pointed to by lpEntryID should be deleted.


DEL_MESSAGES

const mapi.DEL_MESSAGES;

All messages in the subfolder pointed to by lpEntryID should be deleted.


DIR_BACKWARD

const mapi.DIR_BACKWARD;

Searches backward from the row identified by the bookmark.


DOCUMENTNAMETYPE_APPNODE

const axdebug.DOCUMENTNAMETYPE_APPNODE;

Gets the name as it appears in the app tree


DOCUMENTNAMETYPE_FILE_TAIL

const axdebug.DOCUMENTNAMETYPE_FILE_TAIL;

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


DOCUMENTNAMETYPE_TITLE

const axdebug.DOCUMENTNAMETYPE_TITLE;

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


DOCUMENTNAMETYPE_URL

const axdebug.DOCUMENTNAMETYPE_URL;

Gets the URL of the document, if any


DS3DMODE_DISABLE

const directsound.DS3DMODE_DISABLE;

Processing of 3D sound is disabled. The sound seems to originate from the center of the listener's head.


DS3DMODE_HEADRELATIVE

const directsound.DS3DMODE_HEADRELATIVE;

Sound parameters (position, velocity, and orientation) are relative to the listener's parameters. In this mode, the absolute parameters of the sound are updated automatically as the listener's parameters change, so that the relative parameters remain constant.


DS3DMODE_NORMAL

const directsound.DS3DMODE_NORMAL;

Normal processing. This is the default mode.


DSBCAPS_CTRL3D

const directsound.DSBCAPS_CTRL3D;

The buffer is either a primary buffer or a secondary buffer that uses 3-D control. To create a primary buffer, the dwFlags member of the DSBUFFERDESC structure should include the DSBCAPS_PRIMARYBUFFER flag.


DSBCAPS_CTRLFREQUENCY

const directsound.DSBCAPS_CTRLFREQUENCY;

The buffer must have frequency control capability.


DSBCAPS_CTRLPAN

const directsound.DSBCAPS_CTRLPAN;

The buffer must have pan control capability.


DSBCAPS_CTRLPOSITIONNOTIFY

const directsound.DSBCAPS_CTRLPOSITIONNOTIFY;

The buffer must have control position notify capability.


DSBCAPS_CTRLVOLUME

const directsound.DSBCAPS_CTRLVOLUME;

The buffer must have volume control capability.


DSBCAPS_GETCURRENTPOSITION2

const directsound.DSBCAPS_GETCURRENTPOSITION2;

Indicates that IDirectSoundBuffer::GetCurrentPosition should use the new behavior of the play cursor. In DirectSound in DirectX 1, the play cursor was significantly ahead of the actual playing sound on emulated sound cards; it was directly behind the write cursor. Now, if the DSBCAPS_GETCURRENTPOSITION2 flag is specified, the application can get a more accurate play position. If this flag is not specified, the old behavior is preserved for compatibility. Note that this flag affects only emulated sound cards; if a DirectSound driver is present, the play cursor is accurate for DirectSound in all versions of DirectX.


DSBCAPS_GLOBALFOCUS

const directsound.DSBCAPS_GLOBALFOCUS;

The buffer is a global sound buffer. With this flag set, an application using DirectSound can continue to play its buffers if the user switches focus to another application, even if the new application uses DirectSound. The one exception is if you switch focus to a DirectSound application that uses the DSSCL_EXCLUSIVE or DSSCL_WRITEPRIMARY flag for its cooperative level. In this case, the global sounds from other applications will not be audible.


DSBCAPS_LOCHARDWARE

const directsound.DSBCAPS_LOCHARDWARE;

The buffer is in hardware memory and uses hardware mixing.


DSBCAPS_LOCSOFTWARE

const directsound.DSBCAPS_LOCSOFTWARE;

The buffer is in software memory and uses software mixing.


DSBCAPS_MUTE3DATMAXDISTANCE

const directsound.DSBCAPS_MUTE3DATMAXDISTANCE;

The sound is reduced to silence at the maximum distance. The buffer will stop playing when the maximum distance is exceeded, so that processor time is not wasted.


DSBCAPS_PRIMARYBUFFER

const directsound.DSBCAPS_PRIMARYBUFFER;

Indicates that the buffer is a primary sound buffer. If this value is not specified, a secondary sound buffer will be created.


DSBCAPS_STATIC

const directsound.DSBCAPS_STATIC;

Indicates that the buffer will be used for static sound data. Typically, these buffers are loaded once and played many times. These buffers are candidates for hardware memory.


DSBCAPS_STICKYFOCUS

const directsound.DSBCAPS_STICKYFOCUS;

Changes the focus behavior of the sound buffer. This flag can be specified in an IDirectSound::CreateSoundBuffer call. With this flag set, an application using DirectSound can continue to play its sticky focus buffers if the user switches to another application not using DirectSound. In this situation, the application's normal buffers are muted, but the sticky focus buffers are still audible. This is useful for nongame applications, such as movie playback (DirectShow™), when the user wants to hear the soundtrack while typing in Microsoft Word or Microsoft® Excel, for example. However, if the user switches to another DirectSound application, all sound buffers, both normal and sticky focus, in the previous application are muted.


DSBLOCK_ENTIREBUFFER

const directsound.DSBLOCK_ENTIREBUFFER;

Unknown.


DSBLOCK_FROMWRITECURSOR

const directsound.DSBLOCK_FROMWRITECURSOR;

Locks from the current write cursor, making a call to DirectSoundBuffer.getCurrentPosition unnecessary. If this flag is specified, the start parameter is ignored. This flag is optional.


DSBPLAY_LOOPING

const directsound.DSBPLAY_LOOPING;

Once the end of the audio buffer is reached, play restarts at the beginning of the buffer. Play continues until explicitly stopped. This flag must be set when playing primary sound buffers.


DSBSTATUS_BUFFERLOST

const directsound.DSBSTATUS_BUFFERLOST;

The buffer is lost and must be restored before it can be played or locked.


DSBSTATUS_LOOPING

const directsound.DSBSTATUS_LOOPING;

The buffer is being looped. If this value is not set, the buffer will stop when it reaches the end of the sound data. Note that if this value is set, the buffer must also be playing.


DSBSTATUS_PLAYING

const directsound.DSBSTATUS_PLAYING;

The buffer is playing. If this value is not set, the buffer is stopped.


DSCAPS_CERTIFIED

const directsound.DSCAPS_CERTIFIED;

This driver has been tested and certified by Microsoft.


DSCAPS_CONTINUOUSRATE

const directsound.DSCAPS_CONTINUOUSRATE;

The device supports all sample rates between the dwMinSecondarySampleRate and dwMaxSecondarySampleRate member values. Typically, this means that the actual output rate will be within +/- 10 hertz (Hz) of the requested frequency.


DSCAPS_EMULDRIVER

const directsound.DSCAPS_EMULDRIVER;

The device does not have a DirectSound driver installed, so it is being emulated through the waveform-audio functions. Performance degradation should be expected.


DSCAPS_PRIMARY16BIT

const directsound.DSCAPS_PRIMARY16BIT;

The device supports primary sound buffers with 16-bit samples.


DSCAPS_PRIMARY8BIT

const directsound.DSCAPS_PRIMARY8BIT;

The device supports hardware-mixed secondary buffers with 8-bit samples.


DSCAPS_PRIMARYMONO

const directsound.DSCAPS_PRIMARYMONO;

The device supports monophonic primary buffers.


DSCAPS_PRIMARYSTEREO

const directsound.DSCAPS_PRIMARYSTEREO;

The device supports stereo primary buffers.


DSCAPS_SECONDARY16BIT

const directsound.DSCAPS_SECONDARY16BIT;

The device supports hardware-mixed secondary sound buffers with 16-bit samples.


DSCAPS_SECONDARY8BIT

const directsound.DSCAPS_SECONDARY8BIT;

The device supports hardware-mixed secondary buffers with 8-bit samples.


DSCAPS_SECONDARYMONO

const directsound.DSCAPS_SECONDARYMONO;

The device supports hardware-mixed monophonic secondary buffers.


DSCAPS_SECONDARYSTEREO

const directsound.DSCAPS_SECONDARYSTEREO;

The device supports hardware-mixed stereo secondary buffers.


DSCBCAPS_WAVEMAPPED

const directsound.DSCBCAPS_WAVEMAPPED;

The Win32 wave mapper will be used for formats not supported by the device.


DSCCAPS_EMULDRIVER

const directsound.DSCCAPS_EMULDRIVER;

The device does not have a DirectSound driver installed, so it is being emulated through the waveform-audio functions. Performance degradation should be expected.


DSSCL_EXCLUSIVE

const directsound.DSSCL_EXCLUSIVE;

Sets the application to the exclusive level. When it has the input focus, the application will be the only one audible (sounds from applications with the DSBCAPS_GLOBALFOCUS flag set will be muted). With this level, it also has all the privileges of the DSSCL_PRIORITY level. DirectSound will restore the hardware format, as specified by the most recent call to the DirectSoundBuffer.setFormat method, once the application gains the input focus. (Note that DirectSound will always restore the wave format, no matter what priority level is set.)


DSSCL_NORMAL

const directsound.DSSCL_NORMAL;

Sets the application to a fully cooperative status. Most applications should use this level, because it has the smoothest multitasking and resource-sharing behavior.


DSSCL_PRIORITY

const directsound.DSSCL_PRIORITY;

Sets the application to the priority level. Applications with this cooperative level can call the DirectSoundBuffer.setFormat and DirectSound.compact methods.


DSSCL_WRITEPRIMARY

const directsound.DSSCL_WRITEPRIMARY;

This is the highest priority level. The application has write access to the primary sound buffers. No secondary sound buffers in any application can be played.


DSSPEAKER_GEOMETRY_MAX

const directsound.DSSPEAKER_GEOMETRY_MAX;

The speakers are directed over an arc of 180 degrees.


DSSPEAKER_GEOMETRY_MIN

const directsound.DSSPEAKER_GEOMETRY_MIN;

The speakers are directed over an arc of 5 degrees.


DSSPEAKER_GEOMETRY_NARROW

const directsound.DSSPEAKER_GEOMETRY_NARROW;

The speakers are directed over an arc of 10 degrees.


DSSPEAKER_GEOMETRY_WIDE

const directsound.DSSPEAKER_GEOMETRY_WIDE;

The speakers are directed over an arc of 20 degrees.


DSSPEAKER_HEADPHONE

const directsound.DSSPEAKER_HEADPHONE;

The speakers are headphones.


DSSPEAKER_MONO

const directsound.DSSPEAKER_MONO;

The speakers are monaural.


DSSPEAKER_QUAD

const directsound.DSSPEAKER_QUAD;

The speakers are quadraphonic.


DSSPEAKER_STEREO

const directsound.DSSPEAKER_STEREO;

The speakers are stereo (default value).


DSSPEAKER_SURROUND

const directsound.DSSPEAKER_SURROUND;

The speakers are surround sound.


EMBDHLP_CREATENOW

const axcontrol.EMBDHLP_CREATENOW;


EMBDHLP_DELAYCREATE

const axcontrol.EMBDHLP_DELAYCREATE;


EMBDHLP_INPROC_HANDLER

const axcontrol.EMBDHLP_INPROC_HANDLER;


EMBDHLP_INPROC_SERVER

const axcontrol.EMBDHLP_INPROC_SERVER;


ERRORRESUMEACTION_AbortCallAndReturnErrorToCaller

const axdebug.ERRORRESUMEACTION_AbortCallAndReturnErrorToCaller;


ERRORRESUMEACTION_ReexecuteErrorStatement

const axdebug.ERRORRESUMEACTION_ReexecuteErrorStatement;


ERRORRESUMEACTION_SkipErrorStatement

const axdebug.ERRORRESUMEACTION_SkipErrorStatement;


EX_DBGPROP_INFO_DEBUGEXTPROP

const axdebug.EX_DBGPROP_INFO_DEBUGEXTPROP;


EX_DBGPROP_INFO_ID

const axdebug.EX_DBGPROP_INFO_ID;


EX_DBGPROP_INFO_LOCKBYTES

const axdebug.EX_DBGPROP_INFO_LOCKBYTES;


EX_DBGPROP_INFO_NTYPE

const axdebug.EX_DBGPROP_INFO_NTYPE;


EX_DBGPROP_INFO_NVALUE

const axdebug.EX_DBGPROP_INFO_NVALUE;


FEATURE_ADDON_MANAGEMENT

const internet.FEATURE_ADDON_MANAGEMENT;


FEATURE_BEHAVIORS

const internet.FEATURE_BEHAVIORS;


FEATURE_DISABLE_MK_PROTOCOL

const internet.FEATURE_DISABLE_MK_PROTOCOL;


FEATURE_ENTRY_COUNT

const internet.FEATURE_ENTRY_COUNT;


FEATURE_GET_URL_DOM_FILEPATH_UNENCODED

const internet.FEATURE_GET_URL_DOM_FILEPATH_UNENCODED;


FEATURE_HTTP_USERNAME_PASSWORD_DISABLE

const internet.FEATURE_HTTP_USERNAME_PASSWORD_DISABLE;


FEATURE_LOCALMACHINE_LOCKDOWN

const internet.FEATURE_LOCALMACHINE_LOCKDOWN;


FEATURE_MIME_HANDLING

const internet.FEATURE_MIME_HANDLING;


FEATURE_MIME_SNIFFING

const internet.FEATURE_MIME_SNIFFING;


FEATURE_OBJECT_CACHING

const internet.FEATURE_OBJECT_CACHING;


FEATURE_PROTOCOL_LOCKDOWN

const internet.FEATURE_PROTOCOL_LOCKDOWN;


FEATURE_RESTRICT_ACTIVEXINSTALL

const internet.FEATURE_RESTRICT_ACTIVEXINSTALL;


FEATURE_RESTRICT_FILEDOWNLOAD

const internet.FEATURE_RESTRICT_FILEDOWNLOAD;


FEATURE_SAFE_BINDTOOBJECT

const internet.FEATURE_SAFE_BINDTOOBJECT;


FEATURE_SECURITYBAND

const internet.FEATURE_SECURITYBAND;


FEATURE_UNC_SAVEDFILECHECK

const internet.FEATURE_UNC_SAVEDFILECHECK;


FEATURE_VALIDATE_NAVIGATE_URL

const internet.FEATURE_VALIDATE_NAVIGATE_URL;


FEATURE_WEBOC_POPUPMANAGEMENT

const internet.FEATURE_WEBOC_POPUPMANAGEMENT;


FEATURE_WINDOW_RESTRICTIONS

const internet.FEATURE_WINDOW_RESTRICTIONS;


FEATURE_ZONE_ELEVATION

const internet.FEATURE_ZONE_ELEVATION;


FLUSH_ASYNC_OK

const mapi.FLUSH_ASYNC_OK;


FLUSH_DOWNLOAD

const mapi.FLUSH_DOWNLOAD;


FLUSH_FORCE

const mapi.FLUSH_FORCE;


FLUSH_NO_UI

const mapi.FLUSH_NO_UI;


FLUSH_UPLOAD

const mapi.FLUSH_UPLOAD;


FL_FULLSTRING

const mapi.FL_FULLSTRING;

To match, the lpProp search string must be completely contained in the property identified by ulPropTag.


FL_IGNORECASE

const mapi.FL_IGNORECASE;

The comparison should be made without considering case.


FL_IGNORENONSPACE

const mapi.FL_IGNORENONSPACE;

The comparison should ignore Unicode-defined nonspacing characters such as diacritical marks.


FL_LOOSE

const mapi.FL_LOOSE;

The comparison should result in a match whenever possible, ignoring case and nonspacing characters


FL_PREFIX

const mapi.FL_PREFIX;

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;

To match, the lpProp search string must be contained anywhere within the property identified by ulPropTag.


FOLDER_DIALOG

const mapi.FOLDER_DIALOG;

A progress indicator should be displayed while the operation proceeds.


FOLDER_GENERIC

const mapi.FOLDER_GENERIC;

A generic folder should be created.


FOLDER_SEARCH

const mapi.FOLDER_SEARCH;

A search-results folder should be created.


FORCE_SAVE

const mapi.FORCE_SAVE;

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.


GENERATE_RECEIPT_ONLY

const mapi.GENERATE_RECEIPT_ONLY;

A read report should be sent if one is pending, but there should be no change in the state of the MSGFLAG_READ flag.


GET_FEATURE_FROM_PROCESS

const internet.GET_FEATURE_FROM_PROCESS;


GET_FEATURE_FROM_REGISTRY

const internet.GET_FEATURE_FROM_REGISTRY;


GET_FEATURE_FROM_THREAD

const internet.GET_FEATURE_FROM_THREAD;


GET_FEATURE_FROM_THREAD_INTERNET

const internet.GET_FEATURE_FROM_THREAD_INTERNET;


GET_FEATURE_FROM_THREAD_INTRANET

const internet.GET_FEATURE_FROM_THREAD_INTRANET;


GET_FEATURE_FROM_THREAD_LOCALMACHINE

const internet.GET_FEATURE_FROM_THREAD_LOCALMACHINE;


GET_FEATURE_FROM_THREAD_RESTRICTED

const internet.GET_FEATURE_FROM_THREAD_RESTRICTED;


GET_FEATURE_FROM_THREAD_TRUSTED

const internet.GET_FEATURE_FROM_THREAD_TRUSTED;


KEEP_OPEN_READONLY

const mapi.KEEP_OPEN_READONLY;

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;

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.


MAIL_E_NAMENOTFOUND

const mapi.MAIL_E_NAMENOTFOUND;


MAPI_ABCONT

const mapi.MAPI_ABCONT;


MAPI_ADDRBOOK

const mapi.MAPI_ADDRBOOK;


MAPI_ALLOW_OTHERS

const mapi.MAPI_ALLOW_OTHERS;

The shared session should be returned, allowing subsequent clients to acquire the session without providing any user credentials.


MAPI_ASSOCIATED

const mapi.MAPI_ASSOCIATED;

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_ATTACH

const mapi.MAPI_ATTACH;


MAPI_BCC

const mapi.MAPI_BCC;

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;


MAPI_CC

const mapi.MAPI_CC;

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;

The object will be created if necessary.


MAPI_DEFAULT_SERVICES

const mapi.MAPI_DEFAULT_SERVICES;

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;

Allows a method to return successfully, possibly before the changes have been fully committed.


MAPI_DIALOG

const mapi.MAPI_DIALOG;


MAPI_DISTLIST

const mapi.MAPI_DISTLIST;


MAPI_EXPLICIT_PROFILE

const mapi.MAPI_EXPLICIT_PROFILE;

The default profile should not be used, and the user should be required to supply a profile.


MAPI_EXTENDED

const mapi.MAPI_EXTENDED;

Log on with extended capabilities. This flag should always be set. The older MAPILogon function is no longer available.


MAPI_E_ACCOUNT_DISABLED

const mapi.MAPI_E_ACCOUNT_DISABLED;


MAPI_E_AMBIGUOUS_RECIP

const mapi.MAPI_E_AMBIGUOUS_RECIP;


MAPI_E_BAD_CHARWIDTH

const mapi.MAPI_E_BAD_CHARWIDTH;


MAPI_E_BAD_COLUMN

const mapi.MAPI_E_BAD_COLUMN;


MAPI_E_BAD_VALUE

const mapi.MAPI_E_BAD_VALUE;


MAPI_E_BUSY

const mapi.MAPI_E_BUSY;


MAPI_E_CALL_FAILED

const mapi.MAPI_E_CALL_FAILED;


MAPI_E_CANCEL

const mapi.MAPI_E_CANCEL;


MAPI_E_COLLISION

const mapi.MAPI_E_COLLISION;


MAPI_E_COMPUTED

const mapi.MAPI_E_COMPUTED;


MAPI_E_CORRUPT_DATA

const mapi.MAPI_E_CORRUPT_DATA;


MAPI_E_CORRUPT_STORE

const mapi.MAPI_E_CORRUPT_STORE;


MAPI_E_DECLINE_COPY

const mapi.MAPI_E_DECLINE_COPY;


MAPI_E_DISK_ERROR

const mapi.MAPI_E_DISK_ERROR;


MAPI_E_END_OF_SESSION

const mapi.MAPI_E_END_OF_SESSION;


MAPI_E_EXTENDED_ERROR

const mapi.MAPI_E_EXTENDED_ERROR;


MAPI_E_FAILONEPROVIDER

const mapi.MAPI_E_FAILONEPROVIDER;


MAPI_E_FOLDER_CYCLE

const mapi.MAPI_E_FOLDER_CYCLE;


MAPI_E_HAS_FOLDERS

const mapi.MAPI_E_HAS_FOLDERS;


MAPI_E_HAS_MESSAGES

const mapi.MAPI_E_HAS_MESSAGES;


MAPI_E_INTERFACE_NOT_SUPPORTED

const mapi.MAPI_E_INTERFACE_NOT_SUPPORTED;


MAPI_E_INVALID_ACCESS_TIME

const mapi.MAPI_E_INVALID_ACCESS_TIME;


MAPI_E_INVALID_BOOKMARK

const mapi.MAPI_E_INVALID_BOOKMARK;


MAPI_E_INVALID_ENTRYID

const mapi.MAPI_E_INVALID_ENTRYID;


MAPI_E_INVALID_OBJECT

const mapi.MAPI_E_INVALID_OBJECT;


MAPI_E_INVALID_PARAMETER

const mapi.MAPI_E_INVALID_PARAMETER;


MAPI_E_INVALID_TYPE

const mapi.MAPI_E_INVALID_TYPE;


MAPI_E_INVALID_WORKSTATION_ACCOUNT

const mapi.MAPI_E_INVALID_WORKSTATION_ACCOUNT;


MAPI_E_LOCKID_LIMIT

const mapi.MAPI_E_LOCKID_LIMIT;


MAPI_E_LOGON_FAILED

const mapi.MAPI_E_LOGON_FAILED;


MAPI_E_MISSING_REQUIRED_COLUMN

const mapi.MAPI_E_MISSING_REQUIRED_COLUMN;


MAPI_E_NAMED_PROP_QUOTA_EXCEEDED

const mapi.MAPI_E_NAMED_PROP_QUOTA_EXCEEDED;


MAPI_E_NETWORK_ERROR

const mapi.MAPI_E_NETWORK_ERROR;


MAPI_E_NON_STANDARD

const mapi.MAPI_E_NON_STANDARD;


MAPI_E_NOT_ENOUGH_DISK

const mapi.MAPI_E_NOT_ENOUGH_DISK;


MAPI_E_NOT_ENOUGH_MEMORY

const mapi.MAPI_E_NOT_ENOUGH_MEMORY;


MAPI_E_NOT_ENOUGH_RESOURCES

const mapi.MAPI_E_NOT_ENOUGH_RESOURCES;


MAPI_E_NOT_FOUND

const mapi.MAPI_E_NOT_FOUND;


MAPI_E_NOT_INITIALIZED

const mapi.MAPI_E_NOT_INITIALIZED;


MAPI_E_NOT_IN_QUEUE

const mapi.MAPI_E_NOT_IN_QUEUE;


MAPI_E_NOT_ME

const mapi.MAPI_E_NOT_ME;


MAPI_E_NO_ACCESS

const mapi.MAPI_E_NO_ACCESS;


MAPI_E_NO_RECIPIENTS

const mapi.MAPI_E_NO_RECIPIENTS;


MAPI_E_NO_SUPPORT

const mapi.MAPI_E_NO_SUPPORT;


MAPI_E_NO_SUPPRESS

const mapi.MAPI_E_NO_SUPPRESS;


MAPI_E_OBJECT_CHANGED

const mapi.MAPI_E_OBJECT_CHANGED;


MAPI_E_OBJECT_DELETED

const mapi.MAPI_E_OBJECT_DELETED;


MAPI_E_OFFLINE

const mapi.MAPI_E_OFFLINE;


MAPI_E_PASSWORD_CHANGE_REQUIRED

const mapi.MAPI_E_PASSWORD_CHANGE_REQUIRED;


MAPI_E_PASSWORD_EXPIRED

const mapi.MAPI_E_PASSWORD_EXPIRED;


MAPI_E_PROFILE_DELETED

const mapi.MAPI_E_PROFILE_DELETED;


MAPI_E_RECONNECTED

const mapi.MAPI_E_RECONNECTED;


MAPI_E_SESSION_LIMIT

const mapi.MAPI_E_SESSION_LIMIT;


MAPI_E_STORE_FULL

const mapi.MAPI_E_STORE_FULL;


MAPI_E_STRING_TOO_LONG

const mapi.MAPI_E_STRING_TOO_LONG;


MAPI_E_SUBMITTED

const mapi.MAPI_E_SUBMITTED;


MAPI_E_TABLE_EMPTY

const mapi.MAPI_E_TABLE_EMPTY;


MAPI_E_TABLE_TOO_BIG

const mapi.MAPI_E_TABLE_TOO_BIG;


MAPI_E_TIMEOUT

const mapi.MAPI_E_TIMEOUT;


MAPI_E_TOO_BIG

const mapi.MAPI_E_TOO_BIG;


MAPI_E_TOO_COMPLEX

const mapi.MAPI_E_TOO_COMPLEX;


MAPI_E_TYPE_NO_SUPPORT

const mapi.MAPI_E_TYPE_NO_SUPPORT;


MAPI_E_UNABLE_TO_ABORT

const mapi.MAPI_E_UNABLE_TO_ABORT;


MAPI_E_UNABLE_TO_COMPLETE

const mapi.MAPI_E_UNABLE_TO_COMPLETE;


MAPI_E_UNCONFIGURED

const mapi.MAPI_E_UNCONFIGURED;


MAPI_E_UNEXPECTED_ID

const mapi.MAPI_E_UNEXPECTED_ID;


MAPI_E_UNEXPECTED_TYPE

const mapi.MAPI_E_UNEXPECTED_TYPE;


MAPI_E_UNKNOWN_CPID

const mapi.MAPI_E_UNKNOWN_CPID;


MAPI_E_UNKNOWN_ENTRYID

const mapi.MAPI_E_UNKNOWN_ENTRYID;


MAPI_E_UNKNOWN_FLAGS

const mapi.MAPI_E_UNKNOWN_FLAGS;


MAPI_E_UNKNOWN_LCID

const mapi.MAPI_E_UNKNOWN_LCID;


MAPI_E_USER_CANCEL

const mapi.MAPI_E_USER_CANCEL;


MAPI_E_VERSION

const mapi.MAPI_E_VERSION;


MAPI_E_WAIT

const mapi.MAPI_E_WAIT;


MAPI_FOLDER

const mapi.MAPI_FOLDER;


MAPI_FORCE_ACCESS

const mapi.MAPI_FORCE_ACCESS;


MAPI_FORCE_DOWNLOAD

const mapi.MAPI_FORCE_DOWNLOAD;

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_FORMINFO

const mapi.MAPI_FORMINFO;


MAPI_INIT_VERSION

const mapi.MAPI_INIT_VERSION;


MAPI_LOGON_UI

const mapi.MAPI_LOGON_UI;

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_MAILUSER

const mapi.MAPI_MAILUSER;


MAPI_MESSAGE

const mapi.MAPI_MESSAGE;


MAPI_MODIFY

const mapi.MAPI_MODIFY;


MAPI_MOVE

const mapi.MAPI_MOVE;

Perform a move operation instead of a copy.


MAPI_MULTITHREAD_NOTIFICATIONS

const mapi.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_NATIVE_BODY

const mapi.MAPI_NATIVE_BODY;

Indicates whether the decompressed stream is also converted to its native body.


MAPI_NATIVE_BODY_TYPE_HTML

const mapi.MAPI_NATIVE_BODY_TYPE_HTML;

Native body is plain text.


MAPI_NATIVE_BODY_TYPE_PLAINTEXT

const mapi.MAPI_NATIVE_BODY_TYPE_PLAINTEXT;

Native body is HTML.


MAPI_NATIVE_BODY_TYPE_RTF

const mapi.MAPI_NATIVE_BODY_TYPE_RTF;

Native body is RTF.


MAPI_NEW_SESSION

const mapi.MAPI_NEW_SESSION;

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_NOREPLACE

const mapi.MAPI_NOREPLACE;

Existing objects in the destination object should not be overwritten.


MAPI_NO_IDS

const mapi.MAPI_NO_IDS;

Requests that only names stored as Unicode strings be returned.


MAPI_NO_MAIL

const mapi.MAPI_NO_MAIL;

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;

Requests that only names stored as numeric identifiers be returned.


MAPI_NT_SERVICE

const mapi.MAPI_NT_SERVICE;

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;

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;

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_PROFSECT

const mapi.MAPI_PROFSECT;


MAPI_SERVICE_UI_ALWAYS

const mapi.MAPI_SERVICE_UI_ALWAYS;

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_SESSION

const mapi.MAPI_SESSION;


MAPI_STATUS

const mapi.MAPI_STATUS;


MAPI_STORE

const mapi.MAPI_STORE;


MAPI_SUBMITTED

const mapi.MAPI_SUBMITTED;

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;

The logon should fail if blocked for more than a few seconds.


MAPI_TO

const mapi.MAPI_TO;

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;

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;

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;


MAPI_W_CANCEL_MESSAGE

const mapi.MAPI_W_CANCEL_MESSAGE;


MAPI_W_ERRORS_RETURNED

const mapi.MAPI_W_ERRORS_RETURNED;


MAPI_W_NO_SERVICE

const mapi.MAPI_W_NO_SERVICE;


MAPI_W_PARTIAL_COMPLETION

const mapi.MAPI_W_PARTIAL_COMPLETION;


MAPI_W_POSITION_CHANGED

const mapi.MAPI_W_POSITION_CHANGED;


MDB_NO_DIALOG

const mapi.MDB_NO_DIALOG;

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;

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;

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;

Requests read/write access to the message store.


MESSAGE_DIALOG

const mapi.MESSAGE_DIALOG;

Displays a progress indicator as the operation proceeds.


MODRECIP_ADD

const mapi.MODRECIP_ADD;

The recipients should be added to the recipient list.


MODRECIP_MODIFY

const mapi.MODRECIP_MODIFY;

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;

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;

The attachment has just been created.


OLECLOSE_NOSAVE

const axcontrol.OLECLOSE_NOSAVE;

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;

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;

The object should be saved if it is dirty.


OLECMDF_ENABLED

const axcontrol.OLECMDF_ENABLED;


OLECMDF_LATCHED

const axcontrol.OLECMDF_LATCHED;


OLECMDF_NINCHED

const axcontrol.OLECMDF_NINCHED;


OLECMDF_SUPPORTED

const axcontrol.OLECMDF_SUPPORTED;


OLECMDTEXTF_NAME

const axcontrol.OLECMDTEXTF_NAME;


OLECMDTEXTF_NONE

const axcontrol.OLECMDTEXTF_NONE;


OLECMDTEXTF_STATUS

const axcontrol.OLECMDTEXTF_STATUS;


OLECREATE_LEAVERUNNING

const axcontrol.OLECREATE_LEAVERUNNING;


OLEIVERB_DISCARDUNDOSTATE

const axcontrol.OLEIVERB_DISCARDUNDOSTATE;


OLEIVERB_HIDE

const axcontrol.OLEIVERB_HIDE;


OLEIVERB_INPLACEACTIVATE

const axcontrol.OLEIVERB_INPLACEACTIVATE;


OLEIVERB_OPEN

const axcontrol.OLEIVERB_OPEN;


OLEIVERB_PRIMARY

const axcontrol.OLEIVERB_PRIMARY;


OLEIVERB_SHOW

const axcontrol.OLEIVERB_SHOW;


OLEIVERB_UIACTIVATE

const axcontrol.OLEIVERB_UIACTIVATE;


OPENSTORE_HOME_LOGON

const exchange.OPENSTORE_HOME_LOGON;


OPENSTORE_OVERRIDE_HOME_MDB

const exchange.OPENSTORE_OVERRIDE_HOME_MDB;


OPENSTORE_PUBLIC

const exchange.OPENSTORE_PUBLIC;


OPENSTORE_TAKE_OWNERSHIP

const exchange.OPENSTORE_TAKE_OWNERSHIP;


OPENSTORE_USE_ADMIN_PRIVILEGE

const exchange.OPENSTORE_USE_ADMIN_PRIVILEGE;


OPEN_IF_EXISTS

const mapi.OPEN_IF_EXISTS;

Does not fail if the specified folder already exists.


PSTF_BEST_ENCRYPTION

const mapi.PSTF_BEST_ENCRYPTION;


PSTF_COMPRESSABLE_ENCRYPTION

const mapi.PSTF_COMPRESSABLE_ENCRYPTION;


PSTF_NO_ENCRYPTION

const mapi.PSTF_NO_ENCRYPTION;


RELOP_EQ

const mapi.RELOP_EQ;

The comparison is made based on equal values.


RELOP_GE

const mapi.RELOP_GE;

The comparison is made based on a greater or equal first value.


RELOP_GT

const mapi.RELOP_GT;

The comparison is made based on a greater first value.


RELOP_LE

const mapi.RELOP_LE;

The comparison is made based on a lesser or equal first value.


RELOP_LT

const mapi.RELOP_LT;

The comparison is made based on a lesser first value.


RELOP_NE

const mapi.RELOP_NE;

The comparison is made based on unequal values.


RELOP_RE

const mapi.RELOP_RE;

The comparison is made based on LIKE (regular expression) values.


RES_AND

const mapi.RES_AND;

SRestriction structure describes an AND restriction, which applies a bitwise AND operation to a restriction.


RES_BITMASK

const mapi.RES_BITMASK;

SRestriction structure describes a bitmask restriction, which applies a bitmask to a property value.


RES_COMMENT

const mapi.RES_COMMENT;

SRestriction structure describes a comment restriction, which associates a comment with a restriction.


RES_COMPAREPROPS

const mapi.RES_COMPAREPROPS;

SRestriction structure describes a compare properties restriction, which compares two property values.


RES_CONTENT

const mapi.RES_CONTENT;

SRestriction structure describes a content restriction, which searches a property value for specific content.


RES_EXIST

const mapi.RES_EXIST;

SRestriction structure describes an exist restriction, which determines if a property is supported.


RES_NOT

const mapi.RES_NOT;

SRestriction structure describes a NOT restriction, which applies a logical NOT operation to a restriction.


RES_OR

const mapi.RES_OR;

SRestriction structure describes an OR restriction, which applies a logical OR operation to a restriction.


RES_PROPERTY

const mapi.RES_PROPERTY;

SRestriction structure describes a property restriction, which determines if a property value matches a particular value.


RES_SIZE

const mapi.RES_SIZE;

SRestriction structure describes a size restriction, which determines if a property value is a particular size.


RES_SUBRESTRICTION

const mapi.RES_SUBRESTRICTION;

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;

The plain text version of the message has changed.


RTF_SYNC_RTF_CHANGED

const mapi.RTF_SYNC_RTF_CHANGED;

The RTF version of the message has changed.


SERVICE_UI_ALLOWED

const mapi.SERVICE_UI_ALLOWED;

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;

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.


SET_FEATURE_IN_REGISTRY

const internet.SET_FEATURE_IN_REGISTRY;


SET_FEATURE_ON_PROCESS

const internet.SET_FEATURE_ON_PROCESS;


SET_FEATURE_ON_THREAD

const internet.SET_FEATURE_ON_THREAD;


SET_FEATURE_ON_THREAD_INTERNET

const internet.SET_FEATURE_ON_THREAD_INTERNET;


SET_FEATURE_ON_THREAD_INTRANET

const internet.SET_FEATURE_ON_THREAD_INTRANET;


SET_FEATURE_ON_THREAD_LOCALMACHINE

const internet.SET_FEATURE_ON_THREAD_LOCALMACHINE;


SET_FEATURE_ON_THREAD_RESTRICTED

const internet.SET_FEATURE_ON_THREAD_RESTRICTED;


SET_FEATURE_ON_THREAD_TRUSTED

const internet.SET_FEATURE_ON_THREAD_TRUSTED;


SHOW_SOFT_DELETES

const mapi.SHOW_SOFT_DELETES;

Shows items that are currently marked as soft deleted.


SOF_UNIQUEFILENAME

const mapi.SOF_UNIQUEFILENAME;

A temporary file is to be created for the IStream object


SOURCETEXT_ATTR_COMMENT

const axdebug.SOURCETEXT_ATTR_COMMENT;


SOURCETEXT_ATTR_FUNCTION_START

const axdebug.SOURCETEXT_ATTR_FUNCTION_START;


SOURCETEXT_ATTR_KEYWORD

const axdebug.SOURCETEXT_ATTR_KEYWORD;


SOURCETEXT_ATTR_NONSOURCE

const axdebug.SOURCETEXT_ATTR_NONSOURCE;


SOURCETEXT_ATTR_NUMBER

const axdebug.SOURCETEXT_ATTR_NUMBER;


SOURCETEXT_ATTR_OPERATOR

const axdebug.SOURCETEXT_ATTR_OPERATOR;


SOURCETEXT_ATTR_STRING

const axdebug.SOURCETEXT_ATTR_STRING;


STATUS_DEFAULT_STORE

const mapi.STATUS_DEFAULT_STORE;


STATUS_FLUSH_QUEUES

const mapi.STATUS_FLUSH_QUEUES;


STATUS_INBOUND_FLUSH

const mapi.STATUS_INBOUND_FLUSH;


STATUS_OUTBOUND_FLUSH

const mapi.STATUS_OUTBOUND_FLUSH;


SUPPRESS_RECEIPT

const mapi.SUPPRESS_RECEIPT;

A pending read report should be cancelled if a read report had been requested and this call changes the state of the message from unread to read.


TABLE_CHANGED

const mapi.TABLE_CHANGED;


TABLE_ERROR

const mapi.TABLE_ERROR;


TABLE_RELOAD

const mapi.TABLE_RELOAD;


TABLE_RESTRICT_DONE

const mapi.TABLE_RESTRICT_DONE;


TABLE_ROW_ADDED

const mapi.TABLE_ROW_ADDED;


TABLE_ROW_DELETED

const mapi.TABLE_ROW_DELETED;


TABLE_ROW_MODIFIED

const mapi.TABLE_ROW_MODIFIED;


TABLE_SETCOL_DONE

const mapi.TABLE_SETCOL_DONE;


TABLE_SORT_ASCEND

const mapi.TABLE_SORT_ASCEND;

The table should be sorted in ascending order.


TABLE_SORT_COMBINE

const mapi.TABLE_SORT_COMBINE;

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;

The table should be sorted in descending order.


TABLE_SORT_DONE

const mapi.TABLE_SORT_DONE;


TBL_ALL_COLUMNS

const mapi.TBL_ALL_COLUMNS;

The table should return all available columns.


TBL_ASYNC

const mapi.TBL_ASYNC;

Starts the operation asynchronously and returns before the operation completes.


TBL_BATCH

const mapi.TBL_BATCH;

Defers evaluation of the filter until the data in the table is required.


TEXT_DOC_ATTR_READONLY

const axdebug.TEXT_DOC_ATTR_READONLY;

Indicates that the document is read-only.


fnevCriticalError

const mapi.fnevCriticalError;


fnevExtended

const mapi.fnevExtended;


fnevNewMail

const mapi.fnevNewMail;


fnevObjectCopied

const mapi.fnevObjectCopied;


fnevObjectCreated

const mapi.fnevObjectCreated;


fnevObjectDeleted

const mapi.fnevObjectDeleted;


fnevObjectModified

const mapi.fnevObjectModified;


fnevObjectMoved

const mapi.fnevObjectMoved;


fnevReservedForMapi

const mapi.fnevReservedForMapi;


fnevSearchComplete

const mapi.fnevSearchComplete;


fnevStatusObjectModified

const mapi.fnevStatusObjectModified;


fnevTableModified

const mapi.fnevTableModified;


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 you can use either a (back) slash or a dot - eg, to locate "win32com.client.dynamic", you can enter 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!

/new

(deprecated)/nodde

Creates a new instance of the application even if one is already running.

/edit filename

Edit the named file.

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

/rundlg 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

  • dde
  • win32ui
  • win32uiole


dde

Module dde

A module for Dynamic Data Exchange support


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

CreateToolBarCtrl
Creates a toolbar object.

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

DisplayTraceback
Displays a traceback in a dialog box.

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

PyCBitMap = CreateBitmap()

Creates a bitmap object.


win32ui.CreateBitmapFromHandle

PyCBitMap = 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 [PyDLGTEMPLATE, PyDLGITEMTEMPLATE, ...], 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:
height
width
escapement
orientation
weight
italic
underline
strike out
charset
out precision
clip precision
quality
pitch and family
name

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

Creates a form view object.

Parameters

doc : PyCDocument

The document to use with the view.

Template : int/str

Name or ID of the dialog template resource


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 name or 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 *ui_pen_object::create(PyObject *self, PyObject *args)

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 : PyResourceId

String template name or inteter 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 : PyDialogTemplate

Definition of 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 : PyResourceId

The caption for the property sheet, or id of the caption

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

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.

ctrlStype=0 : int

Additional styles for the creation of the embedded PyCStatusBarCtrl object.
Status bar styles supported are:
commctrl.SBARS_SIZEGRIP - The status bar control includes a sizing grip at the right end of the status bar. A sizing grip is similar to a sizing border; it is a rectangular area that the user can click and drag to resize the parent window.
commctrl.SBT_TOOLTIPS - The status bar supports tooltips.

Comments

You must ensure no 2 status bars share the same ID.

MFC References

CStatusBar::CreateEx


win32ui.CreateStatusBarCtrl

PyCStatusBarCtrl = CreateStatusBarCtrl()

Creates a progress control object. PyStatusBarCtrl::Create creates the actual control.


win32ui.CreateThread

PyCWinThread = 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.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.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.DisplayTraceback

DisplayTraceback()

Displays a traceback in a dialog box.


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

Search for GetCommandLine at msdn, google or google groups.


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

AfxOleInit

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.

SetMessagePendingDelay

EnableNotRespondingDialog

EnableNotRespondingDialog


win32uiole.AfxOleInit

AfxOleInit(enabled)

Parameters

enabled : bool


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

EnableNotRespondingDialog(enabled)

Parameters

enabled : bool


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.


win32uiole.SetMessagePendingDelay

SetMessagePendingDelay(delay)

Parameters

delay : int


Objects

  • CHARFORMAT
  • CREATESTRUCT
  • LV_COLUMN
  • LV_ITEM
  • PARAFORMAT
  • PyAssocCObject
  • PyAssocObject
  • PyCBitmap
  • 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
  • PyDDEConv
  • PyDDEServer
  • PyDDEStringItem
  • PyDDETopic
  • PyDLL
  • SCROLLINFO tuple
  • 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.

GetAttachedObject
Returned the attached Python object, or None.


PyAssocObject.AttachObject

AttachObject()

Attaches a Python object for lookup of "virtual" functions.


PyAssocObject.GetAttachedObject

object = GetAttachedObject()

Returned the attached Python object, or None.


PyCBitmap

PyCBitmap 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


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


PyCBitmap.GetBitmapBits

tuple/string = GetBitmapBits(asString)

Returns the bitmap bits.

Parameters

asString=0 : int

If False, the result is a tuple of integers, if True, the result is a Python string


PyCBitmap.GetHandle

int = GetHandle()

Returns the HBITMAP for a bitmap object


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


PyCBitmap.GetSize

(cx,cy) = GetSize()

Returns the size of the bitmap object.


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


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


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


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


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

PyCMenu m_pMenu

PyCMenu m_pSubMenu


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.

Based On

PyCCommonDialog


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

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


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

Based On

PyCView


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.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.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.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 : PyHANDLE

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

rc = Rectangle()

Draws a rectangle using the current pen. The interior of the rectangle is filled using the current brush.


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


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

Based On

PyCWnd


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

int = OnInitDialog()

Calls the default MFC OnInitDialog handler.

See Also

PyCDialog.OnInitDialog virtual method


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

OnOK()

Calls the default MFC OnOK handler.

See Also

PyCDialog.OnOK virtual method


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


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 : PyResourceId

Template name or integer resource id

style : int

The style for the window

id : int

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

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

PyCDocTemplate.OpenDocumentFile Virtual

OpenDocumentFile()

Called when a document file is to be opened.


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

Based On

PyCCmdTarget


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

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

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

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

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

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

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

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


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

Based On

PyCCtrlView


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.

Based On

PyCCommonDialog


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.

Methods

GetSafeHandle
Retrieves the HFONT for the font as an integer sentinel


PyCFont.GetSafeHandle

int = GetSafeHandle()

Retrieves the HFONT for the font as an integer


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.

Based On

PyCCommonDialog


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

Based On

PyCView


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.

Based On

PyCWnd


PyCFrameWnd.BeginModalState

BeginModalState()

Sets the frame window to modal.


PyCFrameWnd.CreateWindow

tuple = CreateWindow(wndClass, title , style , rect , PyCWnd , createContext , menuId , 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.

menuId : string or int

The string or integer 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(id)

Loads an accelerator table.

Parameters

id : PyResourceId

Name or id of the resource that contains the 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


PyCFrameWnd.ShowOwnedWindows

string = ShowOwnedWindows(bShow)

Shows all windows that are descendants of the PyCFrameWnd object.

Parameters

bShow=1 : int

Flag


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

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

LV_ITEM = 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 : LV_COLUMN

A tuple describing the new column.


PyCListCtrl.InsertItem

int = InsertItem(item)

Inserts an item into the list.

Parameters

item : LV_ITEM

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 : LV_COLUMN

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 : LV_ITEM

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

Based On

PyCCtrlView


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

Based On

PyCFrameWnd


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


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

Based On

PyCFrameWnd


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/PyCMenu

The ID for a new menu item, or handle to a submenu

value=None : string/None

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

PyCOleClientItem.OnActivate Virtual

OnActivate()


PyCOleClientItem.OnChange

OnChange()

Calls the underlying MFC method.


PyCOleClientItem.OnChange

PyCOleClientItem.OnChange Virtual

OnChange(wNotification, dwParam )

Parameters

wNotification : int

dwParam : int


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

PyCOleClientItem.OnChangeItemPosition Virtual

OnChangeItemPosition((left, top, right, bottom))

Parameters

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

The new position


PyCOleClientItem.OnDeactivateUI

int = OnDeactivateUI()

Calls the underlying MFC method.


PyCOleClientItem.OnDeactivateUI

PyCOleClientItem.OnDeactivateUI Virtual

OnDeactivateUI(bUndoable)

Parameters

bUndoable : int


PyCOleClientItem.OnGetItemPosition

PyCOleClientItem.OnGetItemPosition Virtual

OnGetItemPosition()


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.

Based On

PyCCommonDialog PyCCommonDialog


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

DocObject()

Return true if the document being printed is a DocObject.

MFC References

CPrintInfo::m_bDocObject


PyCPrintInfo.DoModal

DoModal()

Call DoModal on the dialog.

MFC References

CPrintDialog::DoModal


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

OnReset()

Calls the default MFC OnReset handler.

See Also

PyCPropertyPage.OnReset virtual method


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

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

OnWizardBack()

Calls the default MFC OnWizardBack handler.

See Also

PyCPropertyPage.OnWizardBack virtual method


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

OnWizardFinish()

Calls the default MFC OnWizardFinish handler.

See Also

PyCPropertyPage.OnWizardFinish virtual method


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

OnWizardNext()

Calls the default MFC OnWizardNext handler.

See Also

PyCPropertyPage.OnWizardNext virtual method


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.


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


PyCPropertySheet.WindowProc

PyCPropertySheet.WindowProc Virtual

WindowProc()

Default message handler.


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

(tuple) = GetSelectionCharFormat()

Returns the character formatting of the selection.

MFC References

CRichEditCtrl::GetSelectionCharFormat


PyCRichEditCtrl.GetSelText

string = GetSelText()

Returns the currently selected text


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


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

Saves the contents of the control as a test file

Parameters

FileName : str

Name of file to save

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.

Based On

PyCView


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


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


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

int = SetRange32()

Sets the 32 bit upper and lower limits (range) for a spin button control.


PyCSpinButtonCtrl.SetRange

int = SetRange()

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

GetPaneInfo
Returns indicator ID, style, and width for a given pane index.

GetStatusBarCtrl
Returns the status bar control object associated with the status bar.

SetIndicators
Sets each indicator's ID.

SetPaneInfo
Sets indicator ID, style, and width for a given pane index.


PyCStatusBar.GetPaneInfo

(id, style, width) = GetPaneInfo(index)

Returns the id, style, and width of the indicator pane at the location specified by index.

Parameters

index : int

Index of the pane whose information is to be retrieved.

MFC References

CStatusBar::GetPaneInfo


PyCStatusBar.GetStatusBarCtrl

PyCStatusBarCtrl = GetStatusBarCtrl()

Gets the statusbar control object for the statusbar.

MFC References

CStatusBar::GetStatusBarCtrl Note that below we take the address of rTBC because it's a reference and not a pointer and ui_assoc_object::make expects a pointer. We need to create a new class and not do a map lookup because in MFC CToolBarCtrl is simply a casted CToolBarCtrl (afxext.inl) so the lookup will return the PyCToolBar object which will fail the type tests.


PyCStatusBar.SetIndicators

SetIndicators(indicators)

Sets each indicator's ID.

Parameters

indicators : tuple

A tuple containing the ID's of the indicators.


PyCStatusBar.SetPaneInfo

SetPaneInfo(index, id, style, width)

Sets the specified indicator pane to a new ID, style, and width.

Parameters

index : int

Index of the indicator pane whose style is to be set.

id : int

New ID for the indicator pane.

style : int

New style for the indicator pane.
The following indicator styles are supported:
afxres.SBPS_NOBORDERS - No 3-D border around the pane.
afxres.SBPS_POPOUT - Reverse border so that text "pops out."
afxres.SBPS_DISABLED - Do not draw text.
afxres.SBPS_STRETCH - Stretch pane to fill unused space. Only one pane per status bar can have this style.
afxres.SBPS_NORMAL - No stretch, borders, or pop-out.

width : int

New width for the indicator pane.

MFC References

CStatusBar::SetPaneInfo


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.

SetTipText
Sets the tooltip text for a pane in a status bar.


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


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.


PyCStatusBarCtrl.SetTipText

SetTipText(nPane, text)

Sets the tooltip text for a pane in a status bar. The status bar must have been created with the afxres.SBT_TOOLTIPS control style to enable ToolTips.

Parameters

nPane : int

The zero-based index of status bar pane to receive the tooltip text.

text : string

The string containing the tooltip text.

Comments

Pay attention, this tooltip text is ONLY displayed in two situations:
1. When the corresponding pane in the status bar contains only an icon.
2. When the corresponding pane in the status bar contains text that is truncated due to the size of the pane.
To make the tooltip appear even if the text is not truncated, you could add additional spaces to the end of the pane text.

MFC References

CStatusBarCtrl::SetTipText


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

GetToolTips()

Returns the associated tooltips control


PyCToolBar.LoadBitmap

LoadBitmap(id)

Loads the bitmap containing bitmap-button images.

Parameters

id : PyResourceId

Name or id of the resource that contains the bitmap.

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 : PyResourceId

Name or resource id of the resource

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


PyCToolBar.SetToolTips

SetToolTips(obTTC)

Sets the tooltips control

Parameters

obTTC : PyCToolTipCtrl

The ToolTipCtrl ctrl to be set.


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.


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


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.


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

TV_ITEM = 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.GetPrevVisibleItem

HTREEITEM = GetPrevVisibleItem(item)

Retrieves the previous visible item 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 : TV_ITEM

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 : TV_ITEM

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

Based On

PyCCtrlView


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.

Based On

PyCWnd


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

OnBeginPrinting()

Calls the underlying MFC OnBeginPrinting method.

See Also

PyCView.OnBeginPrinting virtual method


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

OnEndPrinting()

Calls the underlying MFC OnEndPrinting method.

See Also

PyCView.OnEndPrinting virtual method


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

OnFilePrint()

Calls the underlying MFC OnFilePrint method.


PyCView.OnFilePrintPreview

OnFilePrintPreview()

Calls the underlying MFC OnFilePrintPreview method.


PyCView.OnInitialUpdate

OnInitialUpdate()

Calls the underlying MFC OnInitialUpdate method.

See Also

PyCView.OnInitialUpdate virtual 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.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.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


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 : PyResourceId

The resource id or name 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 : PyResourceId

The resource ID or name of the cursor to load.


PyCWinApp.LoadStandardIcon

int = LoadStandardIcon(resourceName)

Loads an icon resource.

Parameters

resourceName : PyResourceId

The resource name or id 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.

SetIcon
Sets the handle to a specific icon.

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.

Based On

PyCCmdTarget


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

int = GetSafeHwnd()

Returns the HWnd of this window.

MFC References

CWnd::GetSafeHwnd


PyCWnd.GetScrollInfo

SCROLLINFO tuple = 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.IsWindowEnabled

int = IsWindowEnabled()

Determines if the window is currently enabled.


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

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

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

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

int = OnNcHitTest(x, y)

Calls the base MFC OnNcHitTest function.

Parameters

x, y : int, int

The point

See Also

PyCWnd.OnNcHitTest virtual method


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

int = OnPaint()

Calls the default MFC OnPaint handler.

See Also

PyCWnd.OnPaint virtual method

MFC References

CWnd::OnEraseBkgnd


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

int = OnQueryDragIcon()

Calls the default MFC OnQueryDragIcon handler.

See Also

PyCWnd.OnQueryDragIcon virtual 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

int = OnQueryNewPalette()

Calls the underlying MFC OnQueryNewPalette method.

See Also

PyCWnd.OnQueryNewPalette virtual method


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

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

PyCWnd.OnTimer Virtual

OnTimer(nIDEvent)

Called for the WM_TIMER message.

Parameters

nIDEvent : int

Specifies the identifier of the timer.


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

HICON = SetIcon()

Calls the underlying MFC SetIcon method.


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, ScrollInfo , 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

ScrollInfo : SCROLLINFO tuple

The information to set

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.


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

Connected()

Determines if the conversation is connected.


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

Exec(Cmd)

Executes a command.

Parameters

Cmd : string

The Python statement to execute


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


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

Search for GetModuleFileName at msdn, google or google groups.


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!


SCROLLINFO tuple

SCROLLINFO tuple Object

Tuple representing a SCROLLINFO struct

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 returned from a method, will always be a tuple of size 6, and items may be None if not available.

When passed as an arg, it must have the addn mask attribute, but all other items may be None, or not exist.


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

Image list index of icon for non-seleted state.

[5] int : iSelectedImage

Offset of items selected image.

[6] int : cChildren

Number of child items.

[7] int : lParam

User defined integer param.


Constants

  • AFX_IDW_PANE_FIRST
  • AFX_IDW_PANE_LAST
  • AFX_WS_DEFAULT_VIEW
  • 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
  • COleClientItem_activeState
  • COleClientItem_activeUIState
  • COleClientItem_emptyState
  • COleClientItem_loadedState
  • COleClientItem_openState
  • CRichEditView_WrapNone
  • CRichEditView_WrapToTargetDevice
  • CRichEditView_WrapToWindow
  • FWS_ADDTOTITLE
  • FWS_PREFIXTITLE
  • FWS_SNAPTOBARS
  • IDB_BROWSER_HIER
  • IDB_DEBUGGER_HIER
  • IDB_HIERFOLDERS
  • IDC_ABOUT_VERSION
  • IDC_AUTOCOMPLETE
  • IDC_AUTO_RELOAD
  • 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_SPIN3
  • 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
  • IDR_CNTR_INPLACE
  • IDR_DEBUGGER
  • IDR_MAINFRAME
  • IDR_PYTHONCONTYPE
  • IDR_PYTHONTYPE
  • IDR_PYTHONTYPE_CNTR_IP
  • IDR_TEXTTYPE
  • 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
  • LM_COMMIT
  • LM_HORZ
  • LM_HORZDOCK
  • LM_LENGTHY
  • LM_MRUWIDTH
  • LM_STRETCH
  • LM_VERTDOCK
  • MFS_4THICKFRAME
  • MFS_BLOCKSYSMENU
  • MFS_MOVEFRAME
  • MFS_SYNCACTIVE
  • MFS_THICKFRAME
  • OLE_CHANGED
  • OLE_CHANGED_ASPECT
  • OLE_CHANGED_STATE
  • OLE_CLOSED
  • OLE_RENAMED
  • 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
  • PSWIZB_BACK
  • PSWIZB_DISABLEDFINISH
  • PSWIZB_FINISH
  • PSWIZB_NEXT
  • debug


AFX_IDW_PANE_FIRST

const win32ui.AFX_IDW_PANE_FIRST;

Id of the first splitter pane


AFX_IDW_PANE_LAST

const win32ui.AFX_IDW_PANE_LAST;

Id of the last splitter pane


AFX_WS_DEFAULT_VIEW

const win32ui.AFX_WS_DEFAULT_VIEW;


CDocTemplate_Confidence_maybeAttemptForeign

const win32ui.CDocTemplate_Confidence_maybeAttemptForeign;


CDocTemplate_Confidence_maybeAttemptNative

const win32ui.CDocTemplate_Confidence_maybeAttemptNative;


CDocTemplate_Confidence_noAttempt

const win32ui.CDocTemplate_Confidence_noAttempt;


CDocTemplate_Confidence_yesAlreadyOpen

const win32ui.CDocTemplate_Confidence_yesAlreadyOpen;


CDocTemplate_Confidence_yesAttemptForeign

const win32ui.CDocTemplate_Confidence_yesAttemptForeign;


CDocTemplate_Confidence_yesAttemptNative

const win32ui.CDocTemplate_Confidence_yesAttemptNative;


CDocTemplate_docName

const win32ui.CDocTemplate_docName;


CDocTemplate_fileNewName

const win32ui.CDocTemplate_fileNewName;


CDocTemplate_filterExt

const win32ui.CDocTemplate_filterExt;


CDocTemplate_filterName

const win32ui.CDocTemplate_filterName;


CDocTemplate_regFileTypeId

const win32ui.CDocTemplate_regFileTypeId;


CDocTemplate_regFileTypeName

const win32ui.CDocTemplate_regFileTypeName;


CDocTemplate_windowTitle

const win32ui.CDocTemplate_windowTitle;


COleClientItem_activeState

const win32uiole.COleClientItem_activeState;


COleClientItem_activeUIState

const win32uiole.COleClientItem_activeUIState;


COleClientItem_emptyState

const win32uiole.COleClientItem_emptyState;


COleClientItem_loadedState

const win32uiole.COleClientItem_loadedState;


COleClientItem_openState

const win32uiole.COleClientItem_openState;


CRichEditView_WrapNone

const win32ui.CRichEditView_WrapNone;


CRichEditView_WrapToTargetDevice

const win32ui.CRichEditView_WrapToTargetDevice;


CRichEditView_WrapToWindow

const win32ui.CRichEditView_WrapToWindow;


FWS_ADDTOTITLE

const win32ui.FWS_ADDTOTITLE;

MFC Frame Window style extension. Add document title to window title.


FWS_PREFIXTITLE

const win32ui.FWS_PREFIXTITLE;

MFC Frame Window style extension.


FWS_SNAPTOBARS

const win32ui.FWS_SNAPTOBARS;

MFC Frame Window style extension.


IDB_BROWSER_HIER

const win32ui.IDB_BROWSER_HIER;

Id of built in bitmap for the browser


IDB_DEBUGGER_HIER

const win32ui.IDB_DEBUGGER_HIER;


IDB_HIERFOLDERS

const win32ui.IDB_HIERFOLDERS;

Id of built in bitmap for default hierarchical list


IDC_ABOUT_VERSION

const win32ui.IDC_ABOUT_VERSION;

Id of 'Version' control


IDC_AUTOCOMPLETE

const win32ui.IDC_AUTOCOMPLETE;


IDC_AUTO_RELOAD

const win32ui.IDC_AUTO_RELOAD;


IDC_BUTTON1

const win32ui.IDC_BUTTON1;


IDC_BUTTON2

const win32ui.IDC_BUTTON2;


IDC_BUTTON3

const win32ui.IDC_BUTTON3;


IDC_BUTTON4

const win32ui.IDC_BUTTON4;


IDC_CALLTIPS

const win32ui.IDC_CALLTIPS;


IDC_CHECK1

const win32ui.IDC_CHECK1;


IDC_CHECK2

const win32ui.IDC_CHECK2;


IDC_CHECK3

const win32ui.IDC_CHECK3;


IDC_COMBO1

const win32ui.IDC_COMBO1;


IDC_COMBO2

const win32ui.IDC_COMBO2;


IDC_EDIT1

const win32ui.IDC_EDIT1;


IDC_EDIT2

const win32ui.IDC_EDIT2;


IDC_EDIT3

const win32ui.IDC_EDIT3;


IDC_EDIT4

const win32ui.IDC_EDIT4;


IDC_EDIT_COLOE

const win32ui.IDC_EDIT_COLOE;


IDC_EDIT_TABS

const win32ui.IDC_EDIT_TABS;


IDC_INDENT_SIZE

const win32ui.IDC_INDENT_SIZE;


IDC_KEYBOARD_CONFIG

const win32ui.IDC_KEYBOARD_CONFIG;


IDC_LIST1

const win32ui.IDC_LIST1;


IDC_PROMPT1

const win32ui.IDC_PROMPT1;


IDC_PROMPT2

const win32ui.IDC_PROMPT2;


IDC_PROMPT3

const win32ui.IDC_PROMPT3;


IDC_PROMPT4

const win32ui.IDC_PROMPT4;


IDC_PROMPT_TABS

const win32ui.IDC_PROMPT_TABS;


IDC_RADIO1

const win32ui.IDC_RADIO1;


IDC_RADIO2

const win32ui.IDC_RADIO2;


IDC_RIGHTEDGE_COLUMN

const win32ui.IDC_RIGHTEDGE_COLUMN;


IDC_RIGHTEDGE_DEFINE

const win32ui.IDC_RIGHTEDGE_DEFINE;


IDC_RIGHTEDGE_ENABLE

const win32ui.IDC_RIGHTEDGE_ENABLE;


IDC_RIGHTEDGE_SAMPLE

const win32ui.IDC_RIGHTEDGE_SAMPLE;


IDC_SPIN1

const win32ui.IDC_SPIN1;


IDC_SPIN2

const win32ui.IDC_SPIN2;


IDC_SPIN3

const win32ui.IDC_SPIN3;


IDC_TAB_SIZE

const win32ui.IDC_TAB_SIZE;


IDC_USE_SMART_TABS

const win32ui.IDC_USE_SMART_TABS;


IDC_USE_TABS

const win32ui.IDC_USE_TABS;


IDC_VIEW_WHITESPACE

const win32ui.IDC_VIEW_WHITESPACE;


IDC_VSS_INTEGRATE

const win32ui.IDC_VSS_INTEGRATE;


IDD_ABOUTBOX

const win32ui.IDD_ABOUTBOX;

Id of built in 'About Box' dialog


IDD_DUMMYPROPPAGE

const win32ui.IDD_DUMMYPROPPAGE;

Id of built in dummy property page


IDD_GENERAL_STATUS

const win32ui.IDD_GENERAL_STATUS;

Id of a general status dialog box (fairly small, 3 static controls, minimize box)


IDD_LARGE_EDIT

const win32ui.IDD_LARGE_EDIT;

Id of built in 'Large Edit' dialog (dialog box with a large edit control)


IDD_PP_DEBUGGER

const win32ui.IDD_PP_DEBUGGER;


IDD_PP_EDITOR

const win32ui.IDD_PP_EDITOR;

Id of built in 'Editor' property page


IDD_PP_FORMAT

const win32ui.IDD_PP_FORMAT;

Id of built in 'Format' property page


IDD_PP_IDE

const win32ui.IDD_PP_IDE;

Id of built in 'IDE' property page


IDD_PP_TABS

const win32ui.IDD_PP_TABS;

Id of built in 'Tabs and Whitespace' property page


IDD_PP_TOOLMENU

const win32ui.IDD_PP_TOOLMENU;

Id of built in 'ToolsMenu' property page


IDD_PROPDEMO1

const win32ui.IDD_PROPDEMO1;

Id of built in Property Page demo dialog 1


IDD_PROPDEMO2

const win32ui.IDD_PROPDEMO2;

Id of built in Property Page demo dialog 2


IDD_RUN_SCRIPT

const win32ui.IDD_RUN_SCRIPT;

Id of built in 'Run Script' dialog


IDD_SET_TABSTOPS

const win32ui.IDD_SET_TABSTOPS;

Id of built in 'Set Tab Stops' dialog


IDD_SIMPLE_INPUT

const win32ui.IDD_SIMPLE_INPUT;

Id of built in 'Simple Input' property page.


IDD_TREE

const win32ui.IDD_TREE;

Id of built in dialog with a tree control.


IDD_TREE_MB

const win32ui.IDD_TREE_MB;

Id of built in dialog with a tree control with multiple buttons.


IDR_CNTR_INPLACE

const win32ui.IDR_CNTR_INPLACE;


IDR_DEBUGGER

const win32ui.IDR_DEBUGGER;


IDR_MAINFRAME

const win32ui.IDR_MAINFRAME;


IDR_PYTHONCONTYPE

const win32ui.IDR_PYTHONCONTYPE;


IDR_PYTHONTYPE

const win32ui.IDR_PYTHONTYPE;


IDR_PYTHONTYPE_CNTR_IP

const win32ui.IDR_PYTHONTYPE_CNTR_IP;


IDR_TEXTTYPE

const win32ui.IDR_TEXTTYPE;


ID_APP_ABOUT

const win32ui.ID_APP_ABOUT;


ID_APP_EXIT

const win32ui.ID_APP_EXIT;


ID_EDIT_CLEAR

const win32ui.ID_EDIT_CLEAR;


ID_EDIT_CLEAR_ALL

const win32ui.ID_EDIT_CLEAR_ALL;


ID_EDIT_COPY

const win32ui.ID_EDIT_COPY;


ID_EDIT_CUT

const win32ui.ID_EDIT_CUT;


ID_EDIT_FIND

const win32ui.ID_EDIT_FIND;


ID_EDIT_GOTO_LINE

const win32ui.ID_EDIT_GOTO_LINE;


ID_EDIT_PASTE

const win32ui.ID_EDIT_PASTE;


ID_EDIT_REDO

const win32ui.ID_EDIT_REDO;


ID_EDIT_REPEAT

const win32ui.ID_EDIT_REPEAT;


ID_EDIT_REPLACE

const win32ui.ID_EDIT_REPLACE;


ID_EDIT_SELECT_ALL

const win32ui.ID_EDIT_SELECT_ALL;


ID_EDIT_SELECT_BLOCK

const win32ui.ID_EDIT_SELECT_BLOCK;


ID_EDIT_UNDO

const win32ui.ID_EDIT_UNDO;


ID_FILE_CHECK

const win32ui.ID_FILE_CHECK;


ID_FILE_CLOSE

const win32ui.ID_FILE_CLOSE;


ID_FILE_IMPORT

const win32ui.ID_FILE_IMPORT;


ID_FILE_LOCATE

const win32ui.ID_FILE_LOCATE;


ID_FILE_MRU_FILE1

const win32ui.ID_FILE_MRU_FILE1;


ID_FILE_MRU_FILE2

const win32ui.ID_FILE_MRU_FILE2;


ID_FILE_MRU_FILE3

const win32ui.ID_FILE_MRU_FILE3;


ID_FILE_MRU_FILE4

const win32ui.ID_FILE_MRU_FILE4;


ID_FILE_NEW

const win32ui.ID_FILE_NEW;


ID_FILE_OPEN

const win32ui.ID_FILE_OPEN;


ID_FILE_PAGE_SETUP

const win32ui.ID_FILE_PAGE_SETUP;


ID_FILE_PRINT

const win32ui.ID_FILE_PRINT;


ID_FILE_PRINT_PREVIEW

const win32ui.ID_FILE_PRINT_PREVIEW;


ID_FILE_PRINT_SETUP

const win32ui.ID_FILE_PRINT_SETUP;


ID_FILE_RUN

const win32ui.ID_FILE_RUN;


ID_FILE_SAVE

const win32ui.ID_FILE_SAVE;


ID_FILE_SAVE_ALL

const win32ui.ID_FILE_SAVE_ALL;


ID_FILE_SAVE_AS

const win32ui.ID_FILE_SAVE_AS;


ID_HELP_GUI_REF

const win32ui.ID_HELP_GUI_REF;


ID_HELP_OTHER

const win32ui.ID_HELP_OTHER;


ID_HELP_PYTHON

const win32ui.ID_HELP_PYTHON;


ID_INDICATOR_COLNUM

const win32ui.ID_INDICATOR_COLNUM;


ID_INDICATOR_LINENUM

const win32ui.ID_INDICATOR_LINENUM;


ID_NEXT_PANE

const win32ui.ID_NEXT_PANE;


ID_PREV_PANE

const win32ui.ID_PREV_PANE;


ID_SEPARATOR

const win32ui.ID_SEPARATOR;


ID_VIEW_BROWSE

const win32ui.ID_VIEW_BROWSE;


ID_VIEW_EOL

const win32ui.ID_VIEW_EOL;


ID_VIEW_FIXED_FONT

const win32ui.ID_VIEW_FIXED_FONT;


ID_VIEW_FOLD_COLLAPSE

const win32ui.ID_VIEW_FOLD_COLLAPSE;


ID_VIEW_FOLD_COLLAPSE_ALL

const win32ui.ID_VIEW_FOLD_COLLAPSE_ALL;


ID_VIEW_FOLD_EXPAND

const win32ui.ID_VIEW_FOLD_EXPAND;


ID_VIEW_FOLD_EXPAND_ALL

const win32ui.ID_VIEW_FOLD_EXPAND_ALL;


ID_VIEW_FOLD_TOGGLE

const win32ui.ID_VIEW_FOLD_TOGGLE;


ID_VIEW_INDENTATIONGUIDES

const win32ui.ID_VIEW_INDENTATIONGUIDES;


ID_VIEW_INTERACTIVE

const win32ui.ID_VIEW_INTERACTIVE;


ID_VIEW_OPTIONS

const win32ui.ID_VIEW_OPTIONS;


ID_VIEW_RIGHT_EDGE

const win32ui.ID_VIEW_RIGHT_EDGE;


ID_VIEW_STATUS_BAR

const win32ui.ID_VIEW_STATUS_BAR;


ID_VIEW_TOOLBAR

const win32ui.ID_VIEW_TOOLBAR;


ID_VIEW_TOOLBAR_DBG

const win32ui.ID_VIEW_TOOLBAR_DBG;


ID_VIEW_WHITESPACE

const win32ui.ID_VIEW_WHITESPACE;


ID_WINDOW_ARRANGE

const win32ui.ID_WINDOW_ARRANGE;


ID_WINDOW_CASCADE

const win32ui.ID_WINDOW_CASCADE;


ID_WINDOW_NEW

const win32ui.ID_WINDOW_NEW;


ID_WINDOW_SPLIT

const win32ui.ID_WINDOW_SPLIT;


ID_WINDOW_TILE_HORZ

const win32ui.ID_WINDOW_TILE_HORZ;


ID_WINDOW_TILE_VERT

const win32ui.ID_WINDOW_TILE_VERT;


LM_COMMIT

const win32ui.LM_COMMIT;

Remember MRUWidth


LM_HORZ

const win32ui.LM_HORZ;

same as bHorz in CalcFixedLayout


LM_HORZDOCK

const win32ui.LM_HORZDOCK;

Horizontal Docked Dimensions


LM_LENGTHY

const win32ui.LM_LENGTHY;

Set if nLength is a Height instead of a Width


LM_MRUWIDTH

const win32ui.LM_MRUWIDTH;

Most Recently Used Dynamic Width


LM_STRETCH

const win32ui.LM_STRETCH;

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;

Vertical Docked Dimensions


MFS_4THICKFRAME

const win32ui.MFS_4THICKFRAME;

thick frame all around (no tiles)


MFS_BLOCKSYSMENU

const win32ui.MFS_BLOCKSYSMENU;

block hit testing on system menu


MFS_MOVEFRAME

const win32ui.MFS_MOVEFRAME;

no sizing, just moving


MFS_SYNCACTIVE

const win32ui.MFS_SYNCACTIVE;

syncronize activation w/ parent


MFS_THICKFRAME

const win32ui.MFS_THICKFRAME;

use instead of WS_THICKFRAME


OLE_CHANGED

const win32uiole.OLE_CHANGED;

representation of a draw aspect has changed


OLE_CHANGED_ASPECT

const win32uiole.OLE_CHANGED_ASPECT;

the item draw aspect has changed


OLE_CHANGED_STATE

const win32uiole.OLE_CHANGED_STATE;

the item state (open, active, etc.) has changed


OLE_CLOSED

const win32uiole.OLE_CLOSED;

the item has closed


OLE_RENAMED

const win32uiole.OLE_RENAMED;

the item has changed its moniker


PD_ALLPAGES

const win32ui.PD_ALLPAGES;

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;

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;

Disables the Print to File check box.


PD_ENABLEPRINTHOOK

const win32ui.PD_ENABLEPRINTHOOK;

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;

PD_ENABLEPRINTTEMPLATE


PD_ENABLEPRINTTEMPLATEHANDLE

const win32ui.PD_ENABLEPRINTTEMPLATEHANDLE;

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;

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;

Indicates that the hInstance and lpSetupTemplateName members specify a replacement for the default Print Setup dialog box template.


PD_ENABLESETUPTEMPLATEHANDLE

const win32ui.PD_ENABLESETUPTEMPLATEHANDLE;

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;

Hides the Print to File check box.


PD_NONETWORKBUTTON

const win32ui.PD_NONETWORKBUTTON;

Hides and disables the Network button.


PD_NOPAGENUMS

const win32ui.PD_NOPAGENUMS;

Disables the Pages radio button and the associated edit controls.


PD_NOSELECTION

const win32ui.PD_NOSELECTION;

Disables the Selection radio button.


PD_NOWARNING

const win32ui.PD_NOWARNING;

Prevents the warning message from being displayed when there is no default printer.


PD_PAGENUMS

const win32ui.PD_PAGENUMS;

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;

Causes the system to display the Print Setup dialog box rather than the Print dialog box.


PD_PRINTTOFILE

const win32ui.PD_PRINTTOFILE;

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;

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;

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;

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;

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;

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;

Same as PD_USEDEVMODECOPIESANDCOLLATE


PD_USEDEVMODECOPIESANDCOLLATE

const win32ui.PD_USEDEVMODECOPIESANDCOLLATE;

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 the printer driver does not support collation, the Collate checkbox is disabled. The dmCopies and dmCollate members of theDEVMODE structure contain the copies and collate information used by the printer driver. If this flag is set and the printer driver supports multiple copies, the dmCopies member indicates the number of copies requested by the user. If this flag is set and the printer driver supports collation, the dmCollate member of the DEVMODE structure indicates whether the user wants collation. If this flag is not set, the dmCopies member always returns 1, and the dmCollate member is always zero.


PSWIZB_BACK

const win32ui.PSWIZB_BACK;

Enable/Disable the Property sheet Back button


PSWIZB_DISABLEDFINISH

const win32ui.PSWIZB_DISABLEDFINISH;

Enable/Disable the Property sheet disabled Finish button


PSWIZB_FINISH

const win32ui.PSWIZB_FINISH;

Enable/Disable the Property sheet Finish button


PSWIZB_NEXT

const win32ui.PSWIZB_NEXT;

Enable/Disable the Property sheet Next button


debug

const win32ui.debug;

1 if we are current using a _DEBUG build of win32ui, else 0.


ISAPI filters and extensions

  • Overviews
  • Modules
  • Objects


Overviews

  • Introduction to Python ISAPI support


 Introduction to Python ISAPI support

Introduction to Python ISAPI support

See also

  • The isapi related modules
  • The isapi related objects

Note: if you are viewing this documentation directly from disk, most links in this document will fail - you can also find this document in the CHM file that comes with pywin32, where the links will work

Introduction

This documents Python support for hosting ISAPI exensions and filters inside Microsoft Internet Information Server (IIS). It assumes a basic understanding of the ISAPI filter and extension mechanism.

In summary, to implement a filter or extension, you provide a Python module which defines a Filter and/or Extension class. Once your class has been loaded, IIS/ISAPI will, via an extension DLL, call methods on your class.

A filter and a class instance need only provide 3 methods - for filters they are called GetFilterVersion, HttpFilterProc and TerminateFilter. For extensions they are named GetExtensionVersion, HttpExtensionProc and TerminateExtension. If you are familiar with writing ISAPI extensions in C/C++, these names and their purpose will be familiar.

Most of the work is done in the HttpFilterProc and HttpExtensionProc methods. These both take a single parameter - an HTTP_FILTER_CONTEXT and EXTENSION_CONTROL_BLOCK object respectively.

In addition to these components, there is an 'isapi' package, containing support facilities (base-classes, exceptions, etc) which can be leveraged by the extension.

Base classes

There are a number of base classes provided to make writing extensions a little simpler. Of particular note is isapi.threaded_extension.ThreadPoolExtension. This implements a thread-pool and informs IIS that the request is progressing in the background. Your sub-class need only provide a Dispatch method, which is called on one of the worker threads rather than the thread that the request came in on.

There is base-class for a filter in isapi.simple, but there is no equivilent threaded filter - filters work under a different model, where background processing is not possible.

Samples

Please see the isapi/samples directory for some sample filters and extensions.

Implementation

A Python ISAPI filter extension consists of 2 main components:
  • A DLL used by ISAPI to interface with Python.
  • A Python script used by that DLL to implement the filter or extension functionality

Extension DLL

The DLL is usually managed automatically by the isapi.install module. As the Python script for the extension is installed, a generic DLL provided with the isapi package is installed next to the script, and IIS configured to use this DLL.

The name of the DLL always has the same base name as the Python script, but with a leading underscore (_), and an extension of .dll. For example, the sample "redirector.py" will, when installed, have "_redirector.dll" created in the same directory.

The Python script may provide 2 entry points - methods named __FilterFactory__ and __ExtensionFactory__, both taking no arguments and returning a filter or extension object.

Using py2exe and the isapi package

You can instruct py2exe to create a 'frozen' Python ISAPI filter/extension. In this case, py2exe will create a package with everything you need in one directory, and the Python source file embedded in the .zip file.

In general, you will want to build a seperate installation executable along with the ISAPI extension. This executable will be built from the same script. See the ISAPI sample in the py2exe distribution.


Modules

  • isapi
  • isapi.install
  • isapi.isapicon
  • isapi.simple
  • isapi.threaded_extension


isapi.install

Module isapi.install

Installation utilities for Python ISAPI filters and extensions.

Methods

RemoveScriptMaps
Remove script maps from the already installed virtual directory

UninstallModule
Remove the extension

get_unique_items
Return items in sequence that can't be found in reference.

InstallModule
Install the extension

AssignScriptMaps
Updates IIS with the supplied script map information.

LocateWebServerPath
Find an IIS web server whose name or comment matches the provided

split_path
Get the parent path and basename.

MergeStandardOptions
Take an options object generated by the command line and merge

FindWebServer
Legacy function to allow options to define a .server property

AddExtensionFiles
Register the modules used by the filters/extensions as a trusted

HandleCommandLine
Perform installation or removal of an ISAPI filter or extension.

GetWebServer
Load the web server instance (COM object) for a given instance


isapi.install.AddExtensionFiles

AddExtensionFiles(params, options)

Register the modules used by the filters/extensions as a trusted 'extension module' - required by the default IIS6 security settings.

Parameters

params :

params

options :

options


isapi.install.AssignScriptMaps

AssignScriptMaps(script_maps, target, update)

Updates IIS with the supplied script map information.

Parameters

script_maps :

script_maps

target :

target

update='replace' :

update

Comments

script_maps is a list of ScriptMapParameter objects

target is an IIS Virtual Directory to assign the script maps to

update is a string indicating how to update the maps, one of ('start', 'end', or 'replace')


isapi.install.FindWebServer

FindWebServer(options, server_desc)

Legacy function to allow options to define a .server property to override the other parameter. Use GetWebServer instead.

Parameters

options :

options

server_desc :

server_desc


isapi.install.GetWebServer

GetWebServer(description)

Load the web server instance (COM object) for a given instance or description. If None is specified, the default website is retrieved (indicated by the identifier 1.

Parameters

description=None :

description


isapi.install.HandleCommandLine

HandleCommandLine(params, argv, conf_module_name, default_arg, opt_parser, custom_arg_handlers)

Perform installation or removal of an ISAPI filter or extension.

Parameters

params :

params

argv=None :

argv

conf_module_name=None :

conf_module_name

default_arg='install' :

default_arg

opt_parser=None :

opt_parser

custom_arg_handlers={} :

custom_arg_handlers

Comments

This module handles standard command-line options and configuration information, and installs, removes or updates the configuration of an ISAPI filter or extension.

You must pass your configuration information in params - all other arguments are optional, and allow you to configure the installation process.


isapi.install.InstallModule

InstallModule(conf_module_name, params, options, log)

Install the extension

Parameters

conf_module_name :

conf_module_name

params :

params

options :

options

log=function lambda at 0x000000000221E668 :

log


isapi.install.LocateWebServerPath

LocateWebServerPath(description)

Find an IIS web server whose name or comment matches the provided description (case-insensitive).

Parameters

description :

description

Comments

or

>>> LocateWebServerPath('1') #doctest: +SKIP

>>> LocateWebServerPath('Default Web Site') # doctest: +SKIP


isapi.install.MergeStandardOptions

MergeStandardOptions(options, params)

Take an options object generated by the command line and merge the values into the IISParameters object.

Parameters

options :

options

params :

params


isapi.install.RemoveScriptMaps

RemoveScriptMaps(vd_params, options)

Remove script maps from the already installed virtual directory

Parameters

vd_params :

vd_params

options :

options


isapi.install.UninstallModule

UninstallModule(conf_module_name, params, options, log)

Remove the extension

Parameters

conf_module_name :

conf_module_name

params :

params

options :

options

log=function lambda at 0x000000000221E748 :

log


isapi.install.get_unique_items

get_unique_items(sequence, reference)

Return items in sequence that can't be found in reference.

Parameters

sequence :

sequence

reference :

reference


isapi.install.split_path

split_path(path)

Get the parent path and basename.

Parameters

path :

path

>>> split_path('/')

['', '']

>>> split_path('')

['', '']

>>> split_path('foo')

['', 'foo']

>>> split_path('/foo')

['', 'foo']

>>> split_path('/foo/bar')

['/foo', 'bar']

>>> split_path('foo/bar')

['/foo', 'bar']


isapi.isapicon

Module isapi.isapicon

Constants needed by ISAPI filters and extensions.


isapi.simple

Module isapi.simple

Simple base-classes for extensions and filters.

Comments

None of the filter and extension functions are considered 'optional' by the framework. These base-classes provide simple implementations for the Initialize and Terminate functions, allowing you to omit them,

It is not necessary to use these base-classes - but if you don't, you must ensure each of the required methods are implemented.

Classes

SimpleExtension
Base class for a simple ISAPI extension

SimpleFilter
Base class for a a simple ISAPI filter


isapi.threaded_extension

Module isapi.threaded_extension

An ISAPI extension base class implemented using a thread-pool.

Classes

ThreadPoolExtension
Base class for an ISAPI extension based around a thread-pool


Objects

  • EXTENSION_CONTROL_BLOCK
  • HSE_VERSION_INFO
  • HTTP_FILTER_AUTHENT
  • HTTP_FILTER_CONTEXT
  • HTTP_FILTER_LOG
  • HTTP_FILTER_PREPROC_HEADERS
  • HTTP_FILTER_RAW_DATA
  • HTTP_FILTER_URL_MAP
  • HTTP_FILTER_VERSION
  • isapi.simple.SimpleExtension
  • isapi.simple.SimpleFilter
  • isapi.threaded_extension.ThreadPoolExtension


EXTENSION_CONTROL_BLOCK

EXTENSION_CONTROL_BLOCK Object

A python representation of an ISAPI EXTENSION_CONTROL_BLOCK.

Methods

write
A synonym for WriteClient, this allows you to 'print >> ecb'

WriteClient

GetServerVariable

ReadClient

SendResponseHeaders

SetFlushFlag

TransmitFile

MapURLToPath

DoneWithSession

close
A synonym for DoneWithSession.

Redirect

IsKeepAlive

GetAnonymousToken
Calls ServerSupportFunction with HSE_REQ_GET_ANONYMOUS_TOKEN or HSE_REQ_GET_UNICODE_ANONYMOUS_TOKEN

GetImpersonationToken

IsKeepConn
Calls ServerSupportFunction with HSE_REQ_IS_KEEP_CONN

ExecURL
Calls ServerSupportFunction with HSE_REQ_EXEC_URL

GetExecURLStatus
Calls ServerSupportFunction with HSE_REQ_GET_EXEC_URL_STATUS

IOCompletion
Calls ServerSupportFunction with HSE_REQ_IO_COMPLETION

ReportUnhealthy
Calls ServerSupportFunction with HSE_REQ_REPORT_UNHEALTHY

IOCallback
A placeholder for a user-supplied callback function.

Properties

integer Version
Version info of this spec (read-only)

int TotalBytes
Total bytes indicated from client

int AvailableBytes
Available number of bytes

int HttpStatusCode
The status of the current transaction when the request is completed.

bytes Method
REQUEST_METHOD

long ConnID
Context number (read-only)

bytes QueryString
QUERY_STRING

bytes PathInfo
PATH_INFO

bytes PathTranslated
PATH_TRANSLATED

bytes AvailableData
Pointer to cbAvailable bytes

bytes ContentType
Content type of client data

bytes LogData
log data string


EXTENSION_CONTROL_BLOCK.DoneWithSession

DoneWithSession(status)

Calls ServerSupportFunction with HSE_REQ_DONE_WITH_SESSION

Parameters

status=HSE_STATUS_SUCCESS : int

An optional status. HSE_STATUS_SUCCESS_AND_KEEP_CONN is supported by IIS to keep the connection alive.


EXTENSION_CONTROL_BLOCK.ExecURL

int = ExecURL(url, method , clientHeaders , info , entity , flags )

Calls ServerSupportFunction with HSE_REQ_EXEC_URL

Parameters

url : string

method : string

clientHeaders : string

info : object

Must be None

entity : object

Must be None

flags : int

Comments

This function is only available in IIS6 and later.


EXTENSION_CONTROL_BLOCK.GetAnonymousToken

int = GetAnonymousToken(metabase_path)

Calls ServerSupportFunction with HSE_REQ_GET_ANONYMOUS_TOKEN or HSE_REQ_GET_UNICODE_ANONYMOUS_TOKEN

Parameters

metabase_path : string/unicode


EXTENSION_CONTROL_BLOCK.GetExecURLStatus

int = GetExecURLStatus()

Calls ServerSupportFunction with HSE_REQ_GET_EXEC_URL_STATUS

Win32 API References

Search for HSE_EXEC_URL_STATUS at msdn, google or google groups.

Return Value

The result of a tuple of 3 integers - (uHttpStatusCode, uHttpSubStatus, dwWin32Error)


EXTENSION_CONTROL_BLOCK.GetImpersonationToken

int = GetImpersonationToken()

Calls ServerSupportFunction with HSE_REQ_GET_IMPERSONATION_TOKEN


EXTENSION_CONTROL_BLOCK.GetServerVariable

string = GetServerVariable(variable, default )

Parameters

variable : string

default : object

If specified, the function will return this value instead of raising an error if the variable could not be fetched.

Return Value

The result is a string object, unless the server variable name begins with 'UNICODE_', in which case it is a unicode object - see the ISAPI docs for more details.


EXTENSION_CONTROL_BLOCK.IOCallback

None = IOCallback(ecb, arg , cbIO , dwError )

A placeholder for a user-supplied callback function.

Parameters

ecb : EXTENSION_CONTROL_BLOCK

The extension control block that is associated with the current, active request.

arg : object

The user-supplied argument supplied to the EXTENSION_CONTROL_BLOCK::IOCompletion function.

cbIO : int

An integer that contains the number of bytes of I/O in the last call.

dwError : int

The error code returned.

Comments

This is not a function you can call, it describes the signature of the callback function supplied to the EXTENSION_CONTROL_BLOCK::IOCompletion function.

Return Value

The result of this function is ignored.


EXTENSION_CONTROL_BLOCK.IOCompletion

int = IOCompletion(func, arg )

Set a callback that will be used for handling asynchronous I/O operations.

Parameters

func : callable

The function to call, as described by the EXTENSION_CONTROL_BLOCK::IOCallback method.

arg=None : object

Any object which will be supplied as an argument to the callback function.

Comments

If you call this multiple times, the previous callback will be discarded.

A reference to the callback and args are held until EXTENSION_CONTROL_BLOCK::DoneWithSession is called. If the callback function fails, DoneWithSession(HSE_STATUS_ERROR) will automatically be called and no further callbacks for the ECB will be made.


EXTENSION_CONTROL_BLOCK.IsKeepAlive

IsKeepAlive()

Comments

This method simply checks a HTTP_CONNECTION header for 'keep-alive', making it fairly useless. See EXTENSION_CONTROL_BLOCK::IsKeepCon


EXTENSION_CONTROL_BLOCK.IsKeepConn

int = IsKeepConn()

Calls ServerSupportFunction with HSE_REQ_IS_KEEP_CONN


EXTENSION_CONTROL_BLOCK.MapURLToPath

MapURLToPath()

Calls ServerSupportFunction with HSE_REQ_MAP_URL_TO_PATH


EXTENSION_CONTROL_BLOCK.ReadClient

string = ReadClient(nbytes)

Parameters

nbytes : int

Default is to read all available data.


EXTENSION_CONTROL_BLOCK.Redirect

Redirect(url)

Calls ServerSupportFunction with HSE_REQ_SEND_URL_REDIRECT_RESP

Parameters

url : string

The URL to redirect to


EXTENSION_CONTROL_BLOCK.ReportUnhealthy

int = ReportUnhealthy(reason)

Calls ServerSupportFunction with HSE_REQ_REPORT_UNHEALTHY

Parameters

reason=None : string

An optional reason to be written to the log.


EXTENSION_CONTROL_BLOCK.SendResponseHeaders

SendResponseHeaders(reply, headers, keepAlive)

Calls ServerSupportFunction with HSE_REQ_SEND_RESPONSE_HEADER_EX

Parameters

reply : string

headers : string

keepAlive=False : bool


EXTENSION_CONTROL_BLOCK.SetFlushFlag

SetFlushFlag(flag)

Calls ServerSupportFunction with HSE_REQ_SET_FLUSH_FLAG.

Parameters

flag : bool


EXTENSION_CONTROL_BLOCK.TransmitFile

int = TransmitFile(callback, param , hFile , statusCode , BytesToWrite , Offset , head , tail , flags )

Calls ServerSupportFunction with HSE_REQ_TRANSMIT_FILE

Parameters

callback : callable

param : object

Any object - passed as 2nd arg to callback.

hFile : int

statusCode : string

BytesToWrite : int

Offset : int

head : string

tail : string

flags : int

Comments

The callback is called with 4 args - (PyECB , param, cbIO, dwErrCode)


EXTENSION_CONTROL_BLOCK.WriteClient

int = WriteClient(data, reserved )

Parameters

data : string/buffer

The data to write

reserved=0 : int

Return Value

the result is the number of bytes written.


HSE_VERSION_INFO

HSE_VERSION_INFO Object

An object used by ISAPI GetExtensionVersion

Properties

string ExtensionDesc
The description of the extension.


HTTP_FILTER_AUTHENT

HTTP_FILTER_AUTHENT Object

A Python representation of an ISAPI HTTP_FILTER_AUTHENT structure.

Properties

string User

string Password


HTTP_FILTER_CONTEXT

HTTP_FILTER_CONTEXT Object

A Python representation of an ISAPI HTTP_FILTER_CONTEXT structure.

Methods

GetData

GetServerVariable

WriteClient

AddResponseHeaders
Specifies a response header for IIS to send to the client.

write
A synonym for WriteClient, this allows you to 'print >> fc'

SendResponseHeader

DisableNotifications

Properties

int Revision
(read-only)

bool fIsSecurePort
(read-only)

int NotificationType
(read-only)

object FilterContext
Any object you wish to associate with the request.


HTTP_FILTER_CONTEXT.AddResponseHeaders

AddResponseHeaders(data, reserverd)

Parameters

data : string

reserverd=0 : int


HTTP_FILTER_CONTEXT.DisableNotifications

DisableNotifications(flags)

Parameters

flags : int


HTTP_FILTER_CONTEXT.GetData

object = GetData()

Obtains the data passed to The HttpFilterProc function. This is not techinally part of the HTTP_FILTER_CONTEXT structure, but packaged here for convenience.

Return Value

The result depends on the value of HTTP_FILTER_CONTEXT::NotificationType

NotificationType | Result type
SF_NOTIFY_URL_MAP | HTTP_FILTER_URL_MAP
SF_NOTIFY_PREPROC_HEADERS | HTTP_FILTER_PREPROC_HEADERS
SF_NOTIFY_LOG | HTTP_FILTER_LOG
SF_NOTIFY_SEND_RAW_DATA | HTTP_FILTER_RAW_DATA
SF_NOTIFY_READ_RAW_DATA | HTTP_FILTER_RAW_DATA
SF_NOTIFY_AUTHENTICATION | HTTP_FILTER_AUTHENT


HTTP_FILTER_CONTEXT.GetServerVariable

string = GetServerVariable(variable, default )

Parameters

variable : string

default : object

If specified, the function will return this value instead of raising an error if the variable could not be fetched.

Return Value

The result is a string object, unless the server variable name begins with 'UNICODE_', in which case it is a unicode object - see the ISAPI docs for more details.


HTTP_FILTER_CONTEXT.SendResponseHeader

SendResponseHeader(status, header)

Parameters

status : string

header : string


HTTP_FILTER_CONTEXT.WriteClient

WriteClient(data, reserverd)

Parameters

data : string

reserverd=0 : int


HTTP_FILTER_LOG

HTTP_FILTER_LOG Object

A Python representation of an ISAPI HTTP_FILTER_LOG structure.

Properties

string ClientHostName

string ClientUserName

string ServerName

string Operation

string Target

string Parameters

int HttpStatus

int HttpStatus


HTTP_FILTER_PREPROC_HEADERS

HTTP_FILTER_PREPROC_HEADERS Object

A Python representation of an ISAPI HTTP_FILTER_PREPROC_HEADERS structure.

Methods

GetHeader

SetHeader

AddHeader


HTTP_FILTER_PREPROC_HEADERS.AddHeader

AddHeader()


HTTP_FILTER_PREPROC_HEADERS.GetHeader

string = GetHeader(header, default )

Parameters

header : string

default : object

If specified, this will be returned on error.


HTTP_FILTER_PREPROC_HEADERS.SetHeader

SetHeader(name, val)

Parameters

name : string

val : string


HTTP_FILTER_RAW_DATA

HTTP_FILTER_RAW_DATA Object

A Python representation of an ISAPI HTTP_FILTER_RAW_DATA structure.

Properties

string InData


HTTP_FILTER_URL_MAP

HTTP_FILTER_URL_MAP Object

A Python representation of an ISAPI HTTP_FILTER_URL_MAP structure.

Properties

string URL

string PhysicalPath


HTTP_FILTER_VERSION

HTTP_FILTER_VERSION Object

A Python interface to the ISAPI HTTP_FILTER_VERSION structure.

Properties

int ServerFilterVersion
(read-only)

int FilterVersion

int Flags

string FilterDesc


isapi.simple.SimpleExtension

isapi.simple.SimpleExtension Object

Base class for a simple ISAPI extension

Methods

TerminateExtension
Called by the ISAPI framework as the extension terminates.

HttpExtensionProc
Called by the ISAPI framework for each extension request.

GetExtensionVersion
Called by the ISAPI framework to get the extension version


isapi.simple.SimpleExtension.GetExtensionVersion

GetExtensionVersion()

Called by the ISAPI framework to get the extension version

Comments

The default implementation uses the classes docstring to set the extension description.


isapi.simple.SimpleExtension.GetExtensionVersion

GetExtensionVersion(self, vi)

Called by the ISAPI framework to get the extension version

Parameters

self :

self

vi :

vi

Comments

The default implementation uses the classes docstring to set the extension description.


isapi.simple.SimpleExtension.HttpExtensionProc

HttpExtensionProc()

Called by the ISAPI framework for each extension request.

Comments

sub-classes must provide an implementation for this method.


isapi.simple.SimpleExtension.HttpExtensionProc

HttpExtensionProc(self, control_block)

Called by the ISAPI framework for each extension request.

Parameters

self :

self

control_block :

control_block

Comments

sub-classes must provide an implementation for this method.


isapi.simple.SimpleExtension.TerminateExtension

TerminateExtension()

Called by the ISAPI framework as the extension terminates.


isapi.simple.SimpleExtension.TerminateExtension

TerminateExtension(self, status)

Called by the ISAPI framework as the extension terminates.

Parameters

self :

self

status :

status


isapi.simple.SimpleFilter

isapi.simple.SimpleFilter Object

Base class for a a simple ISAPI filter

Methods

HttpFilterProc
Called by the ISAPI framework for each filter request.

GetFilterVersion
Called by the ISAPI framework to get the extension version

TerminateFilter
Called by the ISAPI framework as the filter terminates.


isapi.simple.SimpleFilter.GetFilterVersion

GetFilterVersion()

Called by the ISAPI framework to get the extension version

Comments

The default implementation uses the classes docstring to set the extension description, and uses the classes filter_flags attribute to set the ISAPI filter flags - you must specify filter_flags in your class.


isapi.simple.SimpleFilter.GetFilterVersion

GetFilterVersion(self, fv)

Called by the ISAPI framework to get the extension version

Parameters

self :

self

fv :

fv

Comments

The default implementation uses the classes docstring to set the extension description, and uses the classes filter_flags attribute to set the ISAPI filter flags - you must specify filter_flags in your class.


isapi.simple.SimpleFilter.HttpFilterProc

HttpFilterProc()

Called by the ISAPI framework for each filter request.

Comments

sub-classes must provide an implementation for this method.


isapi.simple.SimpleFilter.HttpFilterProc

HttpFilterProc(self, fc)

Called by the ISAPI framework for each filter request.

Parameters

self :

self

fc :

fc

Comments

sub-classes must provide an implementation for this method.


isapi.simple.SimpleFilter.TerminateFilter

TerminateFilter()

Called by the ISAPI framework as the filter terminates.


isapi.simple.SimpleFilter.TerminateFilter

TerminateFilter(self, status)

Called by the ISAPI framework as the filter terminates.

Parameters

self :

self

status :

status


isapi.threaded_extension.ThreadPoolExtension

isapi.threaded_extension.ThreadPoolExtension Object

Base class for an ISAPI extension based around a thread-pool

Methods

HandleDispatchError
Handles errors in the Dispatch method.

Dispatch
Overridden by the sub-class to handle connection requests.


isapi.threaded_extension.ThreadPoolExtension.Dispatch

Dispatch()

Overridden by the sub-class to handle connection requests.

Comments

This class creates a thread-pool using a Windows completion port, and dispatches requests via this port. Sub-classes can generally implement each connection request using blocking reads and writes, and the thread-pool will still provide decent response to the end user.

The sub-class can set a max_workers attribute (default is 20). Note that this generally does *not* mean 20 threads will all be concurrently running, via the magic of Windows completion ports.

There is no default implementation - sub-classes must implement this.


isapi.threaded_extension.ThreadPoolExtension.Dispatch

Dispatch(self, ecb)

Overridden by the sub-class to handle connection requests.

Parameters

self :

self

ecb :

ecb

Comments

This class creates a thread-pool using a Windows completion port, and dispatches requests via this port. Sub-classes can generally implement each connection request using blocking reads and writes, and the thread-pool will still provide decent response to the end user.

The sub-class can set a max_workers attribute (default is 20). Note that this generally does *not* mean 20 threads will all be concurrently running, via the magic of Windows completion ports.

There is no default implementation - sub-classes must implement this.


isapi.threaded_extension.ThreadPoolExtension.HandleDispatchError

HandleDispatchError()

Handles errors in the Dispatch method.

Comments

When a Dispatch method call fails, this method is called to handle the exception. The default implementation formats the traceback in the browser.


isapi.threaded_extension.ThreadPoolExtension.HandleDispatchError

HandleDispatchError(self, ecb)

Handles errors in the Dispatch method.

Parameters

self :

self

ecb :

ecb

Comments

When a Dispatch method call fails, this method is called to handle the exception. The default implementation formats the traceback in the browser.


Constants

  • HSE_EXEC_URL_DISABLE_CUSTOM_ERROR
  • HSE_EXEC_URL_HTTP_CACHE_ELIGIBLE
  • HSE_EXEC_URL_IGNORE_CURRENT_INTERCEPTOR
  • HSE_EXEC_URL_IGNORE_VALIDATION_AND_RANGE
  • HSE_EXEC_URL_NO_HEADERS
  • HSE_EXEC_URL_SSI_CMD
  • HSE_IO_ASYNC
  • HSE_IO_CACHE_RESPONSE
  • HSE_IO_DISCONNECT_AFTER_SEND
  • HSE_IO_FINAL_SEND
  • HSE_IO_NODELAY
  • HSE_IO_SEND_HEADERS
  • HSE_IO_SYNC
  • HSE_STATUS_ERROR
  • HSE_STATUS_PENDING
  • HSE_STATUS_SUCCESS
  • HSE_STATUS_SUCCESS_AND_KEEP_CONN
  • HTTP_ACCEPTED
  • HTTP_BAD_GATEWAY
  • HTTP_BAD_REQUEST
  • HTTP_CONFLICT
  • HTTP_CONTINUE
  • HTTP_CREATED
  • HTTP_EXPECTATION_FAILED
  • HTTP_FORBIDDEN
  • HTTP_GATEWAY_TIME_OUT
  • HTTP_GONE
  • HTTP_INTERNAL_SERVER_ERROR
  • HTTP_LENGTH_REQUIRED
  • HTTP_METHOD_NOT_ALLOWED
  • HTTP_MOVED_PERMANENTLY
  • HTTP_MOVED_TEMPORARILY
  • HTTP_MULTIPLE_CHOICES
  • HTTP_MULTI_STATUS
  • HTTP_NON_AUTHORITATIVE
  • HTTP_NOT_ACCEPTABLE
  • HTTP_NOT_FOUND
  • HTTP_NOT_IMPLEMENTED
  • HTTP_NOT_MODIFIED
  • HTTP_NO_CONTENT
  • HTTP_OK
  • HTTP_PARTIAL_CONTENT
  • HTTP_PAYMENT_REQUIRED
  • HTTP_PRECONDITION_FAILED
  • HTTP_PROCESSING
  • HTTP_PROXY_AUTHENTICATION_REQUIRED
  • HTTP_RANGE_NOT_SATISFIABLE
  • HTTP_REQUEST_ENTITY_TOO_LARGE
  • HTTP_REQUEST_TIME_OUT
  • HTTP_REQUEST_URI_TOO_LARGE
  • HTTP_RESET_CONTENT
  • HTTP_SEE_OTHER
  • HTTP_SERVICE_UNAVAILABLE
  • HTTP_SWITCHING_PROTOCOLS
  • HTTP_TEMPORARY_REDIRECT
  • HTTP_UNAUTHORIZED
  • HTTP_UNPROCESSABLE_ENTITY
  • HTTP_UNSUPPORTED_MEDIA_TYPE
  • HTTP_USE_PROXY
  • HTTP_VARIANT_ALSO_VARIES
  • HTTP_VERSION_NOT_SUPPORTED
  • INFINITE
  • ISAPI_REQUEST
  • SF_NOTIFY_ACCESS_DENIED
  • SF_NOTIFY_AUTHENTICATION
  • SF_NOTIFY_END_OF_NET_SESSION
  • SF_NOTIFY_END_OF_REQUEST
  • SF_NOTIFY_LOG
  • SF_NOTIFY_NONSECURE_PORT
  • SF_NOTIFY_ORDER_DEFAULT
  • SF_NOTIFY_ORDER_HIGH
  • SF_NOTIFY_ORDER_LOW
  • SF_NOTIFY_ORDER_MASK
  • SF_NOTIFY_ORDER_MEDIUM
  • SF_NOTIFY_PREPROC_HEADERS
  • SF_NOTIFY_READ_RAW_DATA
  • SF_NOTIFY_SECURE_PORT
  • SF_NOTIFY_SEND_RAW_DATA
  • SF_NOTIFY_SEND_RESPONSE
  • SF_NOTIFY_URL_MAP
  • SF_STATUS_REQ_ERROR
  • SF_STATUS_REQ_FINISHED
  • SF_STATUS_REQ_FINISHED_KEEP_CONN
  • SF_STATUS_REQ_HANDLED_NOTIFICATION
  • SF_STATUS_REQ_NEXT_NOTIFICATION
  • SF_STATUS_REQ_READ_NEXT


HSE_EXEC_URL_DISABLE_CUSTOM_ERROR

const isapi.isapicon.HSE_EXEC_URL_DISABLE_CUSTOM_ERROR;

HSE_EXEC_URL_DISABLE_CUSTOM_ERROR = 32 (0x20)


HSE_EXEC_URL_HTTP_CACHE_ELIGIBLE

const isapi.isapicon.HSE_EXEC_URL_HTTP_CACHE_ELIGIBLE;

HSE_EXEC_URL_HTTP_CACHE_ELIGIBLE = 128 (0x80)


HSE_EXEC_URL_IGNORE_CURRENT_INTERCEPTOR

const isapi.isapicon.HSE_EXEC_URL_IGNORE_CURRENT_INTERCEPTOR;

HSE_EXEC_URL_IGNORE_CURRENT_INTERCEPTOR = 4 (0x4)


HSE_EXEC_URL_IGNORE_VALIDATION_AND_RANGE

const isapi.isapicon.HSE_EXEC_URL_IGNORE_VALIDATION_AND_RANGE;

HSE_EXEC_URL_IGNORE_VALIDATION_AND_RANGE = 16 (0x10)


HSE_EXEC_URL_NO_HEADERS

const isapi.isapicon.HSE_EXEC_URL_NO_HEADERS;

HSE_EXEC_URL_NO_HEADERS = 2 (0x2)


HSE_EXEC_URL_SSI_CMD

const isapi.isapicon.HSE_EXEC_URL_SSI_CMD;

HSE_EXEC_URL_SSI_CMD = 64 (0x40)


HSE_IO_ASYNC

const isapi.isapicon.HSE_IO_ASYNC;

HSE_IO_ASYNC = 2 (0x2)


HSE_IO_CACHE_RESPONSE

const isapi.isapicon.HSE_IO_CACHE_RESPONSE;

HSE_IO_CACHE_RESPONSE = 32 (0x20)


HSE_IO_DISCONNECT_AFTER_SEND

const isapi.isapicon.HSE_IO_DISCONNECT_AFTER_SEND;

HSE_IO_DISCONNECT_AFTER_SEND = 4 (0x4)


HSE_IO_FINAL_SEND

const isapi.isapicon.HSE_IO_FINAL_SEND;

HSE_IO_FINAL_SEND = 16 (0x10)


HSE_IO_NODELAY

const isapi.isapicon.HSE_IO_NODELAY;

HSE_IO_NODELAY = 4096 (0x1000)


HSE_IO_SEND_HEADERS

const isapi.isapicon.HSE_IO_SEND_HEADERS;

HSE_IO_SEND_HEADERS = 8 (0x8)


HSE_IO_SYNC

const isapi.isapicon.HSE_IO_SYNC;

HSE_IO_SYNC = 1 (0x1)


HSE_STATUS_ERROR

const isapi.isapicon.HSE_STATUS_ERROR;

HSE_STATUS_ERROR = 4 (0x4)


HSE_STATUS_PENDING

const isapi.isapicon.HSE_STATUS_PENDING;

HSE_STATUS_PENDING = 3 (0x3)


HSE_STATUS_SUCCESS

const isapi.isapicon.HSE_STATUS_SUCCESS;

HSE_STATUS_SUCCESS = 1 (0x1)


HSE_STATUS_SUCCESS_AND_KEEP_CONN

const isapi.isapicon.HSE_STATUS_SUCCESS_AND_KEEP_CONN;

HSE_STATUS_SUCCESS_AND_KEEP_CONN = 2 (0x2)


HTTP_ACCEPTED

const isapi.isapicon.HTTP_ACCEPTED;

HTTP_ACCEPTED = 202 (0xca)


HTTP_BAD_GATEWAY

const isapi.isapicon.HTTP_BAD_GATEWAY;

HTTP_BAD_GATEWAY = 502 (0x1f6)


HTTP_BAD_REQUEST

const isapi.isapicon.HTTP_BAD_REQUEST;

HTTP_BAD_REQUEST = 400 (0x190)


HTTP_CONFLICT

const isapi.isapicon.HTTP_CONFLICT;

HTTP_CONFLICT = 409 (0x199)


HTTP_CONTINUE

const isapi.isapicon.HTTP_CONTINUE;

HTTP_CONTINUE = 100 (0x64)


HTTP_CREATED

const isapi.isapicon.HTTP_CREATED;

HTTP_CREATED = 201 (0xc9)


HTTP_EXPECTATION_FAILED

const isapi.isapicon.HTTP_EXPECTATION_FAILED;

HTTP_EXPECTATION_FAILED = 417 (0x1a1)


HTTP_FORBIDDEN

const isapi.isapicon.HTTP_FORBIDDEN;

HTTP_FORBIDDEN = 403 (0x193)


HTTP_GATEWAY_TIME_OUT

const isapi.isapicon.HTTP_GATEWAY_TIME_OUT;

HTTP_GATEWAY_TIME_OUT = 504 (0x1f8)


HTTP_GONE

const isapi.isapicon.HTTP_GONE;

HTTP_GONE = 410 (0x19a)


HTTP_INTERNAL_SERVER_ERROR

const isapi.isapicon.HTTP_INTERNAL_SERVER_ERROR;

HTTP_INTERNAL_SERVER_ERROR = 500 (0x1f4)


HTTP_LENGTH_REQUIRED

const isapi.isapicon.HTTP_LENGTH_REQUIRED;

HTTP_LENGTH_REQUIRED = 411 (0x19b)


HTTP_METHOD_NOT_ALLOWED

const isapi.isapicon.HTTP_METHOD_NOT_ALLOWED;

HTTP_METHOD_NOT_ALLOWED = 405 (0x195)


HTTP_MOVED_PERMANENTLY

const isapi.isapicon.HTTP_MOVED_PERMANENTLY;

HTTP_MOVED_PERMANENTLY = 301 (0x12d)


HTTP_MOVED_TEMPORARILY

const isapi.isapicon.HTTP_MOVED_TEMPORARILY;

HTTP_MOVED_TEMPORARILY = 302 (0x12e)


HTTP_MULTIPLE_CHOICES

const isapi.isapicon.HTTP_MULTIPLE_CHOICES;

HTTP_MULTIPLE_CHOICES = 300 (0x12c)


HTTP_MULTI_STATUS

const isapi.isapicon.HTTP_MULTI_STATUS;

HTTP_MULTI_STATUS = 207 (0xcf)


HTTP_NON_AUTHORITATIVE

const isapi.isapicon.HTTP_NON_AUTHORITATIVE;

HTTP_NON_AUTHORITATIVE = 203 (0xcb)


HTTP_NOT_ACCEPTABLE

const isapi.isapicon.HTTP_NOT_ACCEPTABLE;

HTTP_NOT_ACCEPTABLE = 406 (0x196)


HTTP_NOT_FOUND

const isapi.isapicon.HTTP_NOT_FOUND;

HTTP_NOT_FOUND = 404 (0x194)


HTTP_NOT_IMPLEMENTED

const isapi.isapicon.HTTP_NOT_IMPLEMENTED;

HTTP_NOT_IMPLEMENTED = 501 (0x1f5)


HTTP_NOT_MODIFIED

const isapi.isapicon.HTTP_NOT_MODIFIED;

HTTP_NOT_MODIFIED = 304 (0x130)


HTTP_NO_CONTENT

const isapi.isapicon.HTTP_NO_CONTENT;

HTTP_NO_CONTENT = 204 (0xcc)


HTTP_OK

const isapi.isapicon.HTTP_OK;

HTTP_OK = 200 (0xc8)


HTTP_PARTIAL_CONTENT

const isapi.isapicon.HTTP_PARTIAL_CONTENT;

HTTP_PARTIAL_CONTENT = 206 (0xce)


HTTP_PAYMENT_REQUIRED

const isapi.isapicon.HTTP_PAYMENT_REQUIRED;

HTTP_PAYMENT_REQUIRED = 402 (0x192)


HTTP_PRECONDITION_FAILED

const isapi.isapicon.HTTP_PRECONDITION_FAILED;

HTTP_PRECONDITION_FAILED = 412 (0x19c)


HTTP_PROCESSING

const isapi.isapicon.HTTP_PROCESSING;

HTTP_PROCESSING = 102 (0x66)


HTTP_PROXY_AUTHENTICATION_REQUIRED

const isapi.isapicon.HTTP_PROXY_AUTHENTICATION_REQUIRED;

HTTP_PROXY_AUTHENTICATION_REQUIRED = 407 (0x197)


HTTP_RANGE_NOT_SATISFIABLE

const isapi.isapicon.HTTP_RANGE_NOT_SATISFIABLE;

HTTP_RANGE_NOT_SATISFIABLE = 416 (0x1a0)


HTTP_REQUEST_ENTITY_TOO_LARGE

const isapi.isapicon.HTTP_REQUEST_ENTITY_TOO_LARGE;

HTTP_REQUEST_ENTITY_TOO_LARGE = 413 (0x19d)


HTTP_REQUEST_TIME_OUT

const isapi.isapicon.HTTP_REQUEST_TIME_OUT;

HTTP_REQUEST_TIME_OUT = 408 (0x198)


HTTP_REQUEST_URI_TOO_LARGE

const isapi.isapicon.HTTP_REQUEST_URI_TOO_LARGE;

HTTP_REQUEST_URI_TOO_LARGE = 414 (0x19e)


HTTP_RESET_CONTENT

const isapi.isapicon.HTTP_RESET_CONTENT;

HTTP_RESET_CONTENT = 205 (0xcd)


HTTP_SEE_OTHER

const isapi.isapicon.HTTP_SEE_OTHER;

HTTP_SEE_OTHER = 303 (0x12f)


HTTP_SERVICE_UNAVAILABLE

const isapi.isapicon.HTTP_SERVICE_UNAVAILABLE;

HTTP_SERVICE_UNAVAILABLE = 503 (0x1f7)


HTTP_SWITCHING_PROTOCOLS

const isapi.isapicon.HTTP_SWITCHING_PROTOCOLS;

HTTP_SWITCHING_PROTOCOLS = 101 (0x65)


HTTP_TEMPORARY_REDIRECT

const isapi.isapicon.HTTP_TEMPORARY_REDIRECT;

HTTP_TEMPORARY_REDIRECT = 307 (0x133)


HTTP_UNAUTHORIZED

const isapi.isapicon.HTTP_UNAUTHORIZED;

HTTP_UNAUTHORIZED = 401 (0x191)


HTTP_UNPROCESSABLE_ENTITY

const isapi.isapicon.HTTP_UNPROCESSABLE_ENTITY;

HTTP_UNPROCESSABLE_ENTITY = 422 (0x1a6)


HTTP_UNSUPPORTED_MEDIA_TYPE

const isapi.isapicon.HTTP_UNSUPPORTED_MEDIA_TYPE;

HTTP_UNSUPPORTED_MEDIA_TYPE = 415 (0x19f)


HTTP_USE_PROXY

const isapi.isapicon.HTTP_USE_PROXY;

HTTP_USE_PROXY = 305 (0x131)


HTTP_VARIANT_ALSO_VARIES

const isapi.isapicon.HTTP_VARIANT_ALSO_VARIES;

HTTP_VARIANT_ALSO_VARIES = 506 (0x1fa)


HTTP_VERSION_NOT_SUPPORTED

const isapi.isapicon.HTTP_VERSION_NOT_SUPPORTED;

HTTP_VERSION_NOT_SUPPORTED = 505 (0x1f9)


INFINITE

const isapi.threaded_extension.INFINITE;

INFINITE = -1 (0x-1)


ISAPI_REQUEST

const isapi.threaded_extension.ISAPI_REQUEST;

ISAPI_REQUEST = 1 (0x1)


SF_NOTIFY_ACCESS_DENIED

const isapi.isapicon.SF_NOTIFY_ACCESS_DENIED;

SF_NOTIFY_ACCESS_DENIED = 2048 (0x800)


SF_NOTIFY_AUTHENTICATION

const isapi.isapicon.SF_NOTIFY_AUTHENTICATION;

SF_NOTIFY_AUTHENTICATION = 8192 (0x2000)


SF_NOTIFY_END_OF_NET_SESSION

const isapi.isapicon.SF_NOTIFY_END_OF_NET_SESSION;

SF_NOTIFY_END_OF_NET_SESSION = 256 (0x100)


SF_NOTIFY_END_OF_REQUEST

const isapi.isapicon.SF_NOTIFY_END_OF_REQUEST;

SF_NOTIFY_END_OF_REQUEST = 128 (0x80)


SF_NOTIFY_LOG

const isapi.isapicon.SF_NOTIFY_LOG;

SF_NOTIFY_LOG = 512 (0x200)


SF_NOTIFY_NONSECURE_PORT

const isapi.isapicon.SF_NOTIFY_NONSECURE_PORT;

SF_NOTIFY_NONSECURE_PORT = 2 (0x2)


SF_NOTIFY_ORDER_DEFAULT

const isapi.isapicon.SF_NOTIFY_ORDER_DEFAULT;

SF_NOTIFY_ORDER_DEFAULT = 131072 (0x20000)


SF_NOTIFY_ORDER_HIGH

const isapi.isapicon.SF_NOTIFY_ORDER_HIGH;

SF_NOTIFY_ORDER_HIGH = 524288 (0x80000)


SF_NOTIFY_ORDER_LOW

const isapi.isapicon.SF_NOTIFY_ORDER_LOW;

SF_NOTIFY_ORDER_LOW = 131072 (0x20000)


SF_NOTIFY_ORDER_MASK

const isapi.isapicon.SF_NOTIFY_ORDER_MASK;

SF_NOTIFY_ORDER_MASK = 917504 (0xe0000)


SF_NOTIFY_ORDER_MEDIUM

const isapi.isapicon.SF_NOTIFY_ORDER_MEDIUM;

SF_NOTIFY_ORDER_MEDIUM = 262144 (0x40000)


SF_NOTIFY_PREPROC_HEADERS

const isapi.isapicon.SF_NOTIFY_PREPROC_HEADERS;

SF_NOTIFY_PREPROC_HEADERS = 16384 (0x4000)


SF_NOTIFY_READ_RAW_DATA

const isapi.isapicon.SF_NOTIFY_READ_RAW_DATA;

SF_NOTIFY_READ_RAW_DATA = 32768 (0x8000)


SF_NOTIFY_SECURE_PORT

const isapi.isapicon.SF_NOTIFY_SECURE_PORT;

SF_NOTIFY_SECURE_PORT = 1 (0x1)


SF_NOTIFY_SEND_RAW_DATA

const isapi.isapicon.SF_NOTIFY_SEND_RAW_DATA;

SF_NOTIFY_SEND_RAW_DATA = 1024 (0x400)


SF_NOTIFY_SEND_RESPONSE

const isapi.isapicon.SF_NOTIFY_SEND_RESPONSE;

SF_NOTIFY_SEND_RESPONSE = 64 (0x40)


SF_NOTIFY_URL_MAP

const isapi.isapicon.SF_NOTIFY_URL_MAP;

SF_NOTIFY_URL_MAP = 4096 (0x1000)


SF_STATUS_REQ_ERROR

const isapi.isapicon.SF_STATUS_REQ_ERROR;

SF_STATUS_REQ_ERROR = 134217732 (0x8000004)


SF_STATUS_REQ_FINISHED

const isapi.isapicon.SF_STATUS_REQ_FINISHED;

SF_STATUS_REQ_FINISHED = 134217728 (0x8000000)


SF_STATUS_REQ_FINISHED_KEEP_CONN

const isapi.isapicon.SF_STATUS_REQ_FINISHED_KEEP_CONN;

SF_STATUS_REQ_FINISHED_KEEP_CONN = 134217729 (0x8000001)


SF_STATUS_REQ_HANDLED_NOTIFICATION

const isapi.isapicon.SF_STATUS_REQ_HANDLED_NOTIFICATION;

SF_STATUS_REQ_HANDLED_NOTIFICATION = 134217731 (0x8000003)


SF_STATUS_REQ_NEXT_NOTIFICATION

const isapi.isapicon.SF_STATUS_REQ_NEXT_NOTIFICATION;

SF_STATUS_REQ_NEXT_NOTIFICATION = 134217730 (0x8000002)


SF_STATUS_REQ_READ_NEXT

const isapi.isapicon.SF_STATUS_REQ_READ_NEXT;

SF_STATUS_REQ_READ_NEXT = 134217733 (0x8000005)


authorization.EditSecurity

EditSecurity(hwndOwner, psi)

Creates a security editor dialog

Parameters

hwndOwner : PyHANDLE

Handle to window that owns dialog, can be None

psi : PyGSecurityInformation

Class instance that implements the ISecurityInformation interface


Classes and class members


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
  • CALLBACK_CHUNK_FINISHED
  • CALLBACK_STREAM_SWITCH
  • 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
  • CCSF_8BITHEADERS
  • CCSF_EMBEDDED_MESSAGE
  • CCSF_INCLUDE_BCC
  • CCSF_NO_MSGID
  • CCSF_NOHEADERS
  • CCSF_PLAIN_TEXT_ONLY
  • CCSF_PRESERVE_SOURCE
  • CCSF_SMTP
  • CCSF_USE_RTF
  • CCSF_USE_TNEF
  • 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
  • CLEAR_NRN_PENDING
  • CLEAR_READ_FLAG
  • CLEAR_RN_PENDING
  • 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
  • COPY_FILE_ALLOW_DECRYPTED_DESTINATION
  • COPY_FILE_COPY_SYMLINK
  • COPY_FILE_FAIL_IF_EXISTS
  • COPY_FILE_OPEN_SOURCE_FOR_WRITE
  • COPY_FILE_RESTARTABLE
  • CREATE_ALWAYS
  • CREATE_BREAKAWAY_FROM_JOB
  • CREATE_DEFAULT_ERROR_MODE
  • CREATE_FOR_DIR
  • CREATE_FOR_IMPORT
  • CREATE_NEW
  • CREATE_NEW_CONSOLE
  • CREATE_NEW_PROCESS_GROUP
  • CREATE_NO_WINDOW
  • CREATE_PRESERVE_CODE_AUTHZ_LEVEL
  • 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
  • DBT_CONFIGCHANGECANCELED
  • DBT_CONFIGCHANGED
  • DBT_CUSTOMEVENT
  • DBT_DEVICEARRIVAL
  • DBT_DEVICEQUERYREMOVE
  • DBT_DEVICEQUERYREMOVEFAILED
  • DBT_DEVICEREMOVECOMPLETE
  • DBT_DEVICEREMOVEPENDING
  • DBT_DEVICETYPESPECIFIC
  • DBT_QUERYCHANGECONFIG
  • debug
  • debug
  • DEBUG_ONLY_THIS_PROCESS
  • DEBUG_PROCESS
  • DEBUG_TEXT_ALLOWBREAKPOINTS
  • DEBUG_TEXT_ISEXPRESSION
  • DEL_FOLDERS
  • DEL_MESSAGES
  • DELETE_HARD_DELETE
  • DENY_ACCESS
  • DETACHED_PROCESS
  • DF_ALLOWOTHERACCOUNTHOOK
  • DIR_BACKWARD
  • DISABLE_MAX_PRIVILEGE
  • 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
  • DS3DMODE_DISABLE
  • DS3DMODE_HEADRELATIVE
  • DS3DMODE_NORMAL
  • DS_SPN_ADD_SPN_OP
  • DS_SPN_DELETE_SPN_OP
  • DS_SPN_DN_HOST
  • DS_SPN_DNS_HOST
  • DS_SPN_DOMAIN
  • DS_SPN_NB_DOMAIN
  • DS_SPN_NB_HOST
  • DS_SPN_REPLACE_SPN_OP
  • DS_SPN_SERVICE
  • DSBCAPS_CTRL3D
  • DSBCAPS_CTRLFREQUENCY
  • DSBCAPS_CTRLPAN
  • DSBCAPS_CTRLPOSITIONNOTIFY
  • DSBCAPS_CTRLVOLUME
  • DSBCAPS_GETCURRENTPOSITION2
  • DSBCAPS_GLOBALFOCUS
  • DSBCAPS_LOCHARDWARE
  • DSBCAPS_LOCSOFTWARE
  • DSBCAPS_MUTE3DATMAXDISTANCE
  • DSBCAPS_PRIMARYBUFFER
  • DSBCAPS_STATIC
  • DSBCAPS_STICKYFOCUS
  • DSBLOCK_ENTIREBUFFER
  • DSBLOCK_FROMWRITECURSOR
  • DSBPLAY_LOOPING
  • DSBSTATUS_BUFFERLOST
  • DSBSTATUS_LOOPING
  • DSBSTATUS_PLAYING
  • DSCAPS_CERTIFIED
  • DSCAPS_CONTINUOUSRATE
  • DSCAPS_EMULDRIVER
  • DSCAPS_PRIMARY16BIT
  • DSCAPS_PRIMARY8BIT
  • DSCAPS_PRIMARYMONO
  • DSCAPS_PRIMARYSTEREO
  • DSCAPS_SECONDARY16BIT
  • DSCAPS_SECONDARY8BIT
  • DSCAPS_SECONDARYMONO
  • DSCAPS_SECONDARYSTEREO
  • DSCBCAPS_WAVEMAPPED
  • DSCCAPS_EMULDRIVER
  • DSSCL_EXCLUSIVE
  • DSSCL_NORMAL
  • DSSCL_PRIORITY
  • DSSCL_WRITEPRIMARY
  • DSSPEAKER_GEOMETRY_MAX
  • DSSPEAKER_GEOMETRY_MIN
  • DSSPEAKER_GEOMETRY_NARROW
  • DSSPEAKER_GEOMETRY_WIDE
  • DSSPEAKER_HEADPHONE
  • DSSPEAKER_MONO
  • DSSPEAKER_QUAD
  • DSSPEAKER_STEREO
  • DSSPEAKER_SURROUND
  • DTR_CONTROL_DISABLE
  • DTR_CONTROL_ENABLE
  • DTR_CONTROL_HANDSHAKE
  • EMBDHLP_CREATENOW
  • EMBDHLP_DELAYCREATE
  • EMBDHLP_INPROC_HANDLER
  • EMBDHLP_INPROC_SERVER
  • ERRORRESUMEACTION_AbortCallAndReturnErrorToCaller
  • ERRORRESUMEACTION_ReexecuteErrorStatement
  • ERRORRESUMEACTION_SkipErrorStatement
  • ETDT_DISABLE
  • ETDT_ENABLE
  • ETDT_ENABLETAB
  • ETDT_USETABTEXTURE
  • 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
  • EventMetadataEventChannel
  • EventMetadataEventID
  • EventMetadataEventKeyword
  • EventMetadataEventLevel
  • EventMetadataEventMessageID
  • EventMetadataEventOpcode
  • EventMetadataEventTask
  • EventMetadataEventTemplate
  • EventMetadataEventVersion
  • EvtChannelConfigAccess
  • EvtChannelConfigClassicEventlog
  • EvtChannelConfigEnabled
  • EvtChannelConfigIsolation
  • EvtChannelConfigOwningPublisher
  • EvtChannelConfigPropertyIdEND
  • EvtChannelConfigType
  • EvtChannelLoggingConfigAutoBackup
  • EvtChannelLoggingConfigLogFilePath
  • EvtChannelLoggingConfigMaxSize
  • EvtChannelLoggingConfigRetention
  • EvtChannelPublisherList
  • EvtChannelPublishingConfigBufferSize
  • EvtChannelPublishingConfigClockType
  • EvtChannelPublishingConfigControlGuid
  • EvtChannelPublishingConfigFileMax
  • EvtChannelPublishingConfigKeywords
  • EvtChannelPublishingConfigLatency
  • EvtChannelPublishingConfigLevel
  • EvtChannelPublishingConfigMaxBuffers
  • EvtChannelPublishingConfigMinBuffers
  • EvtChannelPublishingConfigSidType
  • EvtEventMetadataPropertyIdEND
  • EvtEventPath
  • EvtEventPropertyIdEND
  • EvtEventQueryIDs
  • EvtExportLogChannelPath
  • EvtExportLogFilePath
  • EvtExportLogTolerateQueryErrors
  • EvtLogAttributes
  • EvtLogCreationTime
  • EvtLogFileSize
  • EvtLogFull
  • EvtLogLastAccessTime
  • EvtLogLastWriteTime
  • EvtLogNumberOfLogRecords
  • EvtLogOldestRecordNumber
  • EvtOpenChannelPath
  • EvtOpenFilePath
  • EvtPublisherMetadataChannelReferenceFlags
  • EvtPublisherMetadataChannelReferenceID
  • EvtPublisherMetadataChannelReferenceIndex
  • EvtPublisherMetadataChannelReferenceMessageID
  • EvtPublisherMetadataChannelReferencePath
  • EvtPublisherMetadataChannelReferences
  • EvtPublisherMetadataHelpLink
  • EvtPublisherMetadataKeywordMessageID
  • EvtPublisherMetadataKeywordName
  • EvtPublisherMetadataKeywords
  • EvtPublisherMetadataKeywordValue
  • EvtPublisherMetadataLevelMessageID
  • EvtPublisherMetadataLevelName
  • EvtPublisherMetadataLevels
  • EvtPublisherMetadataLevelValue
  • EvtPublisherMetadataMessageFilePath
  • EvtPublisherMetadataOpcodeMessageID
  • EvtPublisherMetadataOpcodeName
  • EvtPublisherMetadataOpcodes
  • EvtPublisherMetadataOpcodeValue
  • EvtPublisherMetadataParameterFilePath
  • EvtPublisherMetadataPropertyIdEND
  • EvtPublisherMetadataPublisherGuid
  • EvtPublisherMetadataPublisherMessageID
  • EvtPublisherMetadataResourceFilePath
  • EvtPublisherMetadataTaskEventGuid
  • EvtPublisherMetadataTaskMessageID
  • EvtPublisherMetadataTaskName
  • EvtPublisherMetadataTasks
  • EvtPublisherMetadataTaskValue
  • EvtQueryChannelPath
  • EvtQueryFilePath
  • EvtQueryForwardDirection
  • EvtQueryReverseDirection
  • EvtQueryTolerateQueryErrors
  • EvtRenderBookmark
  • EvtRenderEventValues
  • EvtRenderEventXml
  • EvtRpcLogin
  • EvtRpcLoginAuthDefault
  • EvtRpcLoginAuthKerberos
  • EvtRpcLoginAuthNegotiate
  • EvtRpcLoginAuthNTLM
  • EvtSeekOriginMask
  • EvtSeekRelativeToBookmark
  • EvtSeekRelativeToCurrent
  • EvtSeekRelativeToFirst
  • EvtSeekRelativeToLast
  • EvtSeekStrict
  • EvtSubscribeActionDeliver
  • EvtSubscribeActionError
  • EvtSubscribeOriginMask
  • EvtSubscribeStartAfterBookmark
  • EvtSubscribeStartAtOldestRecord
  • EvtSubscribeStrict
  • EvtSubscribeToFutureEvents
  • EvtSubscribeTolerateQueryErrors
  • EvtVarTypeAnsiString
  • EvtVarTypeBinary
  • EvtVarTypeBoolean
  • EvtVarTypeByte
  • EvtVarTypeDouble
  • EvtVarTypeEvtHandle
  • EvtVarTypeEvtXml
  • EvtVarTypeFileTime
  • EvtVarTypeGuid
  • EvtVarTypeHexInt32
  • EvtVarTypeHexInt64
  • EvtVarTypeInt16
  • EvtVarTypeInt32
  • EvtVarTypeInt64
  • EvtVarTypeNull
  • EvtVarTypeSByte
  • EvtVarTypeSid
  • EvtVarTypeSingle
  • EvtVarTypeSizeT
  • EvtVarTypeString
  • EvtVarTypeSysTime
  • EvtVarTypeUInt16
  • EvtVarTypeUInt32
  • EvtVarTypeUInt64
  • 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
  • FEATURE_ADDON_MANAGEMENT
  • FEATURE_BEHAVIORS
  • FEATURE_DISABLE_MK_PROTOCOL
  • FEATURE_ENTRY_COUNT
  • FEATURE_GET_URL_DOM_FILEPATH_UNENCODED
  • FEATURE_HTTP_USERNAME_PASSWORD_DISABLE
  • FEATURE_LOCALMACHINE_LOCKDOWN
  • FEATURE_MIME_HANDLING
  • FEATURE_MIME_SNIFFING
  • FEATURE_OBJECT_CACHING
  • FEATURE_PROTOCOL_LOCKDOWN
  • FEATURE_RESTRICT_ACTIVEXINSTALL
  • FEATURE_RESTRICT_FILEDOWNLOAD
  • FEATURE_SAFE_BINDTOOBJECT
  • FEATURE_SECURITYBAND
  • FEATURE_UNC_SAVEDFILECHECK
  • FEATURE_VALIDATE_NAVIGATE_URL
  • FEATURE_WEBOC_POPUPMANAGEMENT
  • FEATURE_WINDOW_RESTRICTIONS
  • FEATURE_ZONE_ELEVATION
  • FILE_ALL_ACCESS
  • FILE_ATTRIBUTE_ARCHIVE
  • FILE_ATTRIBUTE_COMPRESSED
  • FILE_ATTRIBUTE_DIRECTORY
  • FILE_ATTRIBUTE_HIDDEN
  • FILE_ATTRIBUTE_NORMAL
  • FILE_ATTRIBUTE_OFFLINE
  • FILE_ATTRIBUTE_READONLY
  • FILE_ATTRIBUTE_SYSTEM
  • FILE_ATTRIBUTE_TEMPORARY
  • FILE_BEGIN
  • FILE_CURRENT
  • FILE_ENCRYPTABLE
  • FILE_END
  • FILE_FLAG_BACKUP_SEMANTICS
  • FILE_FLAG_DELETE_ON_CLOSE
  • FILE_FLAG_NO_BUFFERING
  • FILE_FLAG_OPEN_REPARSE_POINT
  • 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_IS_ENCRYPTED
  • FILE_READ_ONLY
  • FILE_ROOT_DIR
  • FILE_SHARE_DELETE
  • FILE_SHARE_READ
  • FILE_SHARE_WRITE
  • FILE_SYSTEM_ATTR
  • FILE_SYSTEM_DIR
  • FILE_SYSTEM_NOT_SUPPORT
  • FILE_TYPE_CHAR
  • FILE_TYPE_DISK
  • FILE_TYPE_PIPE
  • FILE_TYPE_UNKNOWN
  • FILE_UNKNOWN
  • FILE_USER_DISALLOWED
  • FileAllocationInfo
  • FileAttributeTagInfo
  • FileBasicInfo
  • FileCompressionInfo
  • FileDispositionInfo
  • FileEndOfFileInfo
  • FileIdBothDirectoryInfo
  • FileIdBothDirectoryRestartInfo
  • FileIdType
  • FileIoPriorityHintInfo
  • FileNameInfo
  • FileRenameInfo
  • FileStandardInfo
  • FileStreamInfo
  • FL_FULLSTRING
  • FL_IGNORECASE
  • FL_IGNORENONSPACE
  • FL_LOOSE
  • FL_PREFIX
  • FL_SUBSTRING
  • FLUSH_ASYNC_OK
  • FLUSH_DOWNLOAD
  • FLUSH_FORCE
  • FLUSH_NO_UI
  • FLUSH_UPLOAD
  • fnevCriticalError
  • fnevExtended
  • fnevNewMail
  • fnevObjectCopied
  • fnevObjectCreated
  • fnevObjectDeleted
  • fnevObjectModified
  • fnevObjectMoved
  • fnevReservedForMapi
  • fnevSearchComplete
  • fnevStatusObjectModified
  • fnevTableModified
  • FOLDER_DIALOG
  • FOLDER_GENERIC
  • FOLDER_SEARCH
  • FORCE_SAVE
  • FWS_ADDTOTITLE
  • FWS_PREFIXTITLE
  • FWS_SNAPTOBARS
  • GENERATE_RECEIPT_ONLY
  • GENERIC_EXECUTE
  • GENERIC_READ
  • GENERIC_WRITE
  • GET_FEATURE_FROM_PROCESS
  • GET_FEATURE_FROM_REGISTRY
  • GET_FEATURE_FROM_THREAD
  • GET_FEATURE_FROM_THREAD_INTERNET
  • GET_FEATURE_FROM_THREAD_INTRANET
  • GET_FEATURE_FROM_THREAD_LOCALMACHINE
  • GET_FEATURE_FROM_THREAD_RESTRICTED
  • GET_FEATURE_FROM_THREAD_TRUSTED
  • GetFileExInfoStandard
  • 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
  • HSE_EXEC_URL_DISABLE_CUSTOM_ERROR
  • HSE_EXEC_URL_HTTP_CACHE_ELIGIBLE
  • HSE_EXEC_URL_IGNORE_CURRENT_INTERCEPTOR
  • HSE_EXEC_URL_IGNORE_VALIDATION_AND_RANGE
  • HSE_EXEC_URL_NO_HEADERS
  • HSE_EXEC_URL_SSI_CMD
  • HSE_IO_ASYNC
  • HSE_IO_CACHE_RESPONSE
  • HSE_IO_DISCONNECT_AFTER_SEND
  • HSE_IO_FINAL_SEND
  • HSE_IO_NODELAY
  • HSE_IO_SEND_HEADERS
  • HSE_IO_SYNC
  • HSE_STATUS_ERROR
  • HSE_STATUS_PENDING
  • HSE_STATUS_SUCCESS
  • HSE_STATUS_SUCCESS_AND_KEEP_CONN
  • HTTP_ACCEPTED
  • HTTP_BAD_GATEWAY
  • HTTP_BAD_REQUEST
  • HTTP_CONFLICT
  • HTTP_CONTINUE
  • HTTP_CREATED
  • HTTP_EXPECTATION_FAILED
  • HTTP_FORBIDDEN
  • HTTP_GATEWAY_TIME_OUT
  • HTTP_GONE
  • HTTP_INTERNAL_SERVER_ERROR
  • HTTP_LENGTH_REQUIRED
  • HTTP_METHOD_NOT_ALLOWED
  • HTTP_MOVED_PERMANENTLY
  • HTTP_MOVED_TEMPORARILY
  • HTTP_MULTI_STATUS
  • HTTP_MULTIPLE_CHOICES
  • HTTP_NO_CONTENT
  • HTTP_NON_AUTHORITATIVE
  • HTTP_NOT_ACCEPTABLE
  • HTTP_NOT_FOUND
  • HTTP_NOT_IMPLEMENTED
  • HTTP_NOT_MODIFIED
  • HTTP_OK
  • HTTP_PARTIAL_CONTENT
  • HTTP_PAYMENT_REQUIRED
  • HTTP_PRECONDITION_FAILED
  • HTTP_PROCESSING
  • HTTP_PROXY_AUTHENTICATION_REQUIRED
  • HTTP_RANGE_NOT_SATISFIABLE
  • HTTP_REQUEST_ENTITY_TOO_LARGE
  • HTTP_REQUEST_TIME_OUT
  • HTTP_REQUEST_URI_TOO_LARGE
  • HTTP_RESET_CONTENT
  • HTTP_SEE_OTHER
  • HTTP_SERVICE_UNAVAILABLE
  • HTTP_SWITCHING_PROTOCOLS
  • HTTP_TEMPORARY_REDIRECT
  • HTTP_UNAUTHORIZED
  • HTTP_UNPROCESSABLE_ENTITY
  • HTTP_UNSUPPORTED_MEDIA_TYPE
  • HTTP_USE_PROXY
  • HTTP_VARIANT_ALSO_VARIES
  • HTTP_VERSION_NOT_SUPPORTED
  • 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_SPIN3
  • 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
  • INFINITE
  • INHERIT_ONLY_ACE
  • INHERITED_ACE
  • IoPriorityHintLow
  • IoPriorityHintNormal
  • IoPriorityHintVeryLow
  • ISAPI_REQUEST
  • ISAPI_SHUTDOWN
  • JOB_OBJECT_ALL_ACCESS
  • JOB_OBJECT_ASSIGN_PROCESS
  • JOB_OBJECT_BASIC_LIMIT_VALID_FLAGS
  • JOB_OBJECT_EXTENDED_LIMIT_VALID_FLAGS
  • JOB_OBJECT_LIMIT_ACTIVE_PROCESS
  • JOB_OBJECT_LIMIT_AFFINITY
  • JOB_OBJECT_LIMIT_BREAKAWAY_OK
  • JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION
  • JOB_OBJECT_LIMIT_JOB_MEMORY
  • JOB_OBJECT_LIMIT_JOB_TIME
  • JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE
  • JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME
  • JOB_OBJECT_LIMIT_PRIORITY_CLASS
  • JOB_OBJECT_LIMIT_PROCESS_MEMORY
  • JOB_OBJECT_LIMIT_PROCESS_TIME
  • JOB_OBJECT_LIMIT_SCHEDULING_CLASS
  • JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK
  • JOB_OBJECT_LIMIT_VALID_FLAGS
  • JOB_OBJECT_LIMIT_WORKINGSET
  • JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS
  • JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT
  • JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO
  • JOB_OBJECT_MSG_END_OF_JOB_TIME
  • JOB_OBJECT_MSG_END_OF_PROCESS_TIME
  • JOB_OBJECT_MSG_EXIT_PROCESS
  • JOB_OBJECT_MSG_JOB_MEMORY_LIMIT
  • JOB_OBJECT_MSG_NEW_PROCESS
  • JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT
  • JOB_OBJECT_POST_AT_END_OF_JOB
  • JOB_OBJECT_QUERY
  • JOB_OBJECT_RESERVED_LIMIT_VALID_FLAGS
  • JOB_OBJECT_SECURITY_FILTER_TOKENS
  • JOB_OBJECT_SECURITY_NO_ADMIN
  • JOB_OBJECT_SECURITY_ONLY_TOKEN
  • JOB_OBJECT_SECURITY_RESTRICTED_TOKEN
  • JOB_OBJECT_SECURITY_VALID_FLAGS
  • JOB_OBJECT_SET_ATTRIBUTES
  • JOB_OBJECT_SET_SECURITY_ATTRIBUTES
  • JOB_OBJECT_TERMINATE
  • JOB_OBJECT_TERMINATE_AT_END_OF_JOB
  • JOB_OBJECT_UI_VALID_FLAGS
  • JOB_OBJECT_UILIMIT_ALL
  • JOB_OBJECT_UILIMIT_DESKTOP
  • JOB_OBJECT_UILIMIT_DISPLAYSETTINGS
  • JOB_OBJECT_UILIMIT_EXITWINDOWS
  • JOB_OBJECT_UILIMIT_GLOBALATOMS
  • JOB_OBJECT_UILIMIT_HANDLES
  • JOB_OBJECT_UILIMIT_NONE
  • JOB_OBJECT_UILIMIT_READCLIPBOARD
  • JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS
  • JOB_OBJECT_UILIMIT_WRITECLIPBOARD
  • JobObjectAssociateCompletionPortInformation
  • JobObjectBasicAccountingInformation
  • JobObjectBasicAndIoAccountingInformation
  • JobObjectBasicLimitInformation
  • JobObjectBasicProcessIdList
  • JobObjectBasicUIRestrictions
  • JobObjectEndOfJobTimeInformation
  • JobObjectExtendedLimitInformation
  • JobObjectJobSetInformation
  • JobObjectSecurityLimitInformation
  • KEEP_OPEN_READONLY
  • KEEP_OPEN_READWRITE
  • LABEL_SECURITY_INFORMATION
  • LIST_MODULES_32BIT
  • LIST_MODULES_64BIT
  • LIST_MODULES_ALL
  • LIST_MODULES_DEFAULT
  • 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_NETWORK_CLEARTEXT
  • LOGON32_LOGON_NEW_CREDENTIALS
  • LOGON32_LOGON_SERVICE
  • LOGON32_LOGON_UNLOCK
  • LOGON32_PROVIDER_DEFAULT
  • LOGON32_PROVIDER_WINNT35
  • LOGON32_PROVIDER_WINNT40
  • LOGON32_PROVIDER_WINNT50
  • LR_CREATEDIBSECTION
  • LR_DEFAULTCOLOR
  • LR_DEFAULTSIZE
  • LR_LOADFROMFILE
  • LR_LOADMAP3DCOLORS
  • LR_LOADTRANSPARENT
  • LR_MONOCHROME
  • LR_SHARED
  • LR_VGACOLOR
  • MAIL_E_NAMENOTFOUND
  • MAPI_ABCONT
  • MAPI_ADDRBOOK
  • MAPI_ALLOW_OTHERS
  • MAPI_ASSOCIATED
  • MAPI_ATTACH
  • MAPI_BCC
  • MAPI_BEST_ACCESS
  • MAPI_CC
  • MAPI_CREATE
  • MAPI_DEFAULT_SERVICES
  • MAPI_DEFERRED_ERRORS
  • MAPI_DIALOG
  • MAPI_DISTLIST
  • 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_LOCKID_LIMIT
  • MAPI_E_LOGON_FAILED
  • MAPI_E_MISSING_REQUIRED_COLUMN
  • MAPI_E_NAMED_PROP_QUOTA_EXCEEDED
  • 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_OFFLINE
  • MAPI_E_PASSWORD_CHANGE_REQUIRED
  • MAPI_E_PASSWORD_EXPIRED
  • MAPI_E_PROFILE_DELETED
  • MAPI_E_RECONNECTED
  • MAPI_E_SESSION_LIMIT
  • MAPI_E_STORE_FULL
  • 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_FOLDER
  • MAPI_FORCE_ACCESS
  • MAPI_FORCE_DOWNLOAD
  • MAPI_FORMINFO
  • MAPI_INIT_VERSION
  • MAPI_LOGON_UI
  • MAPI_MAILUSER
  • MAPI_MESSAGE
  • MAPI_MODIFY
  • MAPI_MOVE
  • MAPI_MULTITHREAD_NOTIFICATIONS
  • MAPI_NATIVE_BODY
  • MAPI_NATIVE_BODY_TYPE_HTML
  • MAPI_NATIVE_BODY_TYPE_PLAINTEXT
  • MAPI_NATIVE_BODY_TYPE_RTF
  • MAPI_NEW_SESSION
  • MAPI_NO_IDS
  • MAPI_NO_MAIL
  • MAPI_NO_STRINGS
  • MAPI_NOREPLACE
  • MAPI_NT_SERVICE
  • MAPI_P1
  • MAPI_PASSWORD_UI
  • MAPI_PROFSECT
  • MAPI_SERVICE_UI_ALWAYS
  • MAPI_SESSION
  • MAPI_STATUS
  • MAPI_STORE
  • 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
  • MaxJobObjectInfoClass
  • MDB_NO_DIALOG
  • MDB_NO_MAIL
  • MDB_TEMPORARY
  • MDB_WRITE
  • MESSAGE_DIALOG
  • MFS_4THICKFRAME
  • MFS_BLOCKSYSMENU
  • MFS_MOVEFRAME
  • MFS_SYNCACTIVE
  • MFS_THICKFRAME
  • MODRECIP_ADD
  • MODRECIP_MODIFY
  • MODRECIP_REMOVE
  • MOVEFILE_COPY_ALLOWED
  • MOVEFILE_CREATE_HARDLINK
  • MOVEFILE_DELAY_UNTIL_REBOOT
  • MOVEFILE_FAIL_IF_NOT_TRACKABLE
  • MOVEFILE_REPLACE_EXISTING
  • MOVEFILE_WRITE_THROUGH
  • NIF_ICON
  • NIF_INFO
  • NIF_MESSAGE
  • NIF_STATE
  • NIF_TIP
  • NIIF_ERROR
  • NIIF_ICON_MASK
  • NIIF_INFO
  • NIIF_NONE
  • NIIF_NOSOUND
  • NIIF_WARNING
  • NIM_ADD
  • NIM_DELETE
  • NIM_MODIFY
  • NIM_SETFOCUS
  • NIM_SETVERSION
  • 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
  • ObjectIdType
  • ODDPARITY
  • OLE_CHANGED
  • OLE_CHANGED_ASPECT
  • OLE_CHANGED_STATE
  • OLE_CLOSED
  • OLE_RENAMED
  • OLE_SAVED
  • OLECLOSE_NOSAVE
  • OLECLOSE_PROMPTSAVE
  • OLECLOSE_SAVEIFDIRTY
  • OLECMDF_ENABLED
  • OLECMDF_LATCHED
  • OLECMDF_NINCHED
  • OLECMDF_SUPPORTED
  • OLECMDTEXTF_NAME
  • OLECMDTEXTF_NONE
  • OLECMDTEXTF_STATUS
  • OLECREATE_LEAVERUNNING
  • OLEIVERB_DISCARDUNDOSTATE
  • OLEIVERB_HIDE
  • OLEIVERB_INPLACEACTIVATE
  • OLEIVERB_OPEN
  • OLEIVERB_PRIMARY
  • OLEIVERB_SHOW
  • OLEIVERB_UIACTIVATE
  • ONE5STOPBITS
  • ONESTOPBIT
  • OPEN_ALWAYS
  • OPEN_EXISTING
  • OPEN_IF_EXISTS
  • OPENSTORE_HOME_LOGON
  • OPENSTORE_OVERRIDE_HOME_MDB
  • OPENSTORE_PUBLIC
  • OPENSTORE_TAKE_OWNERSHIP
  • OPENSTORE_USE_ADMIN_PRIVILEGE
  • OVERWRITE_HIDDEN
  • 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
  • PROGRESS_CANCEL
  • PROGRESS_CONTINUE
  • PROGRESS_QUIET
  • PROGRESS_STOP
  • PROTECTED_DACL_SECURITY_INFORMATION
  • PROTECTED_SACL_SECURITY_INFORMATION
  • PSTF_BEST_ENCRYPTION
  • PSTF_COMPRESSABLE_ENCRYPTION
  • PSTF_NO_ENCRYPTION
  • 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
  • REPLACEFILE_IGNORE_MERGE_ERRORS
  • REPLACEFILE_WRITE_THROUGH
  • 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
  • SANDBOX_INERT
  • SC_ACTION_NONE
  • SC_ACTION_REBOOT
  • SC_ACTION_RESTART
  • SC_ACTION_RUN_COMMAND
  • SC_ENUM_PROCESS_INFO
  • 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_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_REMOVED
  • SE_PRIVILEGE_USED_FOR_ACCESS
  • 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
  • SECPKG_CRED_BOTH
  • SECPKG_CRED_INBOUND
  • SECPKG_CRED_OUTBOUND
  • SECPKG_FLAG_ACCEPT_WIN32_NAME
  • SECPKG_FLAG_CLIENT_ONLY
  • SECPKG_FLAG_CONNECTION
  • SECPKG_FLAG_DATAGRAM
  • SECPKG_FLAG_EXTENDED_ERROR
  • SECPKG_FLAG_IMPERSONATION
  • SECPKG_FLAG_INTEGRITY
  • SECPKG_FLAG_MULTI_REQUIRED
  • SECPKG_FLAG_PRIVACY
  • SECPKG_FLAG_STREAM
  • SECPKG_FLAG_TOKEN_ONLY
  • 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_HARDWAREPROFILECHANGE
  • SERVICE_ACCEPT_NETBINDCHANGE
  • SERVICE_ACCEPT_PARAMCHANGE
  • SERVICE_ACCEPT_PAUSE_CONTINUE
  • SERVICE_ACCEPT_POWEREVENT
  • SERVICE_ACCEPT_PRESHUTDOWN
  • SERVICE_ACCEPT_SESSIONCHANGE
  • SERVICE_ACCEPT_SHUTDOWN
  • SERVICE_ACCEPT_STOP
  • SERVICE_ACTIVE
  • SERVICE_ALL_ACCESS
  • SERVICE_AUTO_START
  • SERVICE_BOOT_START
  • SERVICE_CHANGE_CONFIG
  • SERVICE_CONFIG_DELAYED_AUTO_START_INFO
  • SERVICE_CONFIG_DESCRIPTION
  • SERVICE_CONFIG_FAILURE_ACTIONS
  • SERVICE_CONFIG_FAILURE_ACTIONS_FLAG
  • SERVICE_CONFIG_PRESHUTDOWN_INFO
  • SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO
  • SERVICE_CONFIG_SERVICE_SID_INFO
  • SERVICE_CONTINUE_PENDING
  • SERVICE_CONTROL_CONTINUE
  • SERVICE_CONTROL_DEVICEEVENT
  • SERVICE_CONTROL_HARDWAREPROFILECHANGE
  • SERVICE_CONTROL_INTERROGATE
  • SERVICE_CONTROL_NETBINDADD
  • SERVICE_CONTROL_NETBINDDISABLE
  • SERVICE_CONTROL_NETBINDENABLE
  • SERVICE_CONTROL_NETBINDREMOVE
  • SERVICE_CONTROL_PARAMCHANGE
  • SERVICE_CONTROL_PAUSE
  • SERVICE_CONTROL_POWEREVENT
  • SERVICE_CONTROL_PRESHUTDOWN
  • SERVICE_CONTROL_SESSIONCHANGE
  • 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_SID_TYPE_NONE
  • SERVICE_SID_TYPE_RESTRICTED
  • SERVICE_SID_TYPE_UNRESTRICTED
  • 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
  • SET_FEATURE_IN_REGISTRY
  • SET_FEATURE_ON_PROCESS
  • SET_FEATURE_ON_THREAD
  • SET_FEATURE_ON_THREAD_INTERNET
  • SET_FEATURE_ON_THREAD_INTRANET
  • SET_FEATURE_ON_THREAD_LOCALMACHINE
  • SET_FEATURE_ON_THREAD_RESTRICTED
  • SET_FEATURE_ON_THREAD_TRUSTED
  • SETBREAK
  • SETDTR
  • SETRTS
  • SETXOFF
  • SETXON
  • SF_NOTIFY_ACCESS_DENIED
  • SF_NOTIFY_AUTHENTICATION
  • SF_NOTIFY_END_OF_NET_SESSION
  • SF_NOTIFY_END_OF_REQUEST
  • SF_NOTIFY_LOG
  • SF_NOTIFY_NONSECURE_PORT
  • SF_NOTIFY_ORDER_DEFAULT
  • SF_NOTIFY_ORDER_HIGH
  • SF_NOTIFY_ORDER_LOW
  • SF_NOTIFY_ORDER_MASK
  • SF_NOTIFY_ORDER_MEDIUM
  • SF_NOTIFY_PREPROC_HEADERS
  • SF_NOTIFY_READ_RAW_DATA
  • SF_NOTIFY_SECURE_PORT
  • SF_NOTIFY_SEND_RAW_DATA
  • SF_NOTIFY_SEND_RESPONSE
  • SF_NOTIFY_URL_MAP
  • SF_STATUS_REQ_ERROR
  • SF_STATUS_REQ_FINISHED
  • SF_STATUS_REQ_FINISHED_KEEP_CONN
  • SF_STATUS_REQ_HANDLED_NOTIFICATION
  • SF_STATUS_REQ_NEXT_NOTIFICATION
  • SF_STATUS_REQ_READ_NEXT
  • SHOW_SOFT_DELETES
  • SidTypeAlias
  • SidTypeComputer
  • SidTypeDeletedAccount
  • SidTypeDomain
  • SidTypeGroup
  • SidTypeInvalid
  • SidTypeUnknown
  • SidTypeUser
  • SidTypeWellKnownGroup
  • SO_CONNECT_TIME
  • SO_UPDATE_ACCEPT_CONTEXT
  • SO_UPDATE_CONNECT_CONTEXT
  • SOF_UNIQUEFILENAME
  • 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
  • STATUS_FLUSH_QUEUES
  • STATUS_INBOUND_FLUSH
  • STATUS_OUTBOUND_FLUSH
  • 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
  • SUPPRESS_RECEIPT
  • SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE
  • SYMBOLIC_LINK_FLAG_DIRECTORY
  • SYNCHRONIZE
  • SYSTEM_AUDIT_ACE_TYPE
  • SYSTEM_AUDIT_OBJECT_ACE_TYPE
  • TABLE_CHANGED
  • TABLE_ERROR
  • TABLE_RELOAD
  • TABLE_RESTRICT_DONE
  • TABLE_ROW_ADDED
  • TABLE_ROW_DELETED
  • TABLE_ROW_MODIFIED
  • TABLE_SETCOL_DONE
  • TABLE_SORT_ASCEND
  • TABLE_SORT_COMBINE
  • TABLE_SORT_DESCEND
  • TABLE_SORT_DONE
  • TBL_ALL_COLUMNS
  • TBL_ASYNC
  • TBL_BATCH
  • TEXT_DOC_ATTR_READONLY
  • TF_DISCONNECT
  • TF_REUSE_SOCKET
  • TF_USE_DEFAULT_WORKER
  • TF_USE_KERNEL_APC
  • TF_USE_SYSTEM_THREAD
  • TF_WRITE_BEHIND
  • THREAD_MODE_BACKGROUND_BEGIN
  • THREAD_MODE_BACKGROUND_BEGIN
  • THREAD_MODE_BACKGROUND_END
  • THREAD_MODE_BACKGROUND_END
  • 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
  • TokenImpersonation
  • TokenPrimary
  • 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
  • UOI_FLAGS
  • UOI_NAME
  • UOI_TYPE
  • UOI_USER_SID
  • 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
  • WSAENOBUFS
  • WSAENOTCONN
  • WSAENOTSOCK
  • WSAEOPNOTSUPP
  • WSAESHUTDOWN
  • WSAEWOULDBLOCK
  • WSF_VISIBLE


Functions


ISAPI_SHUTDOWN

const isapi.threaded_extension.ISAPI_SHUTDOWN;

ISAPI_SHUTDOWN = 2 (0x2)


Messages


Modules

  • _winxptheme
  • adsi
  • axcontrol
  • axdebug
  • axscript
  • dde
  • directsound
  • exchange
  • exchdapi
  • internet
  • isapi
  • isapi.install
  • isapi.isapicon
  • isapi.simple
  • isapi.threaded_extension
  • mapi
  • mmapfile
  • odbc
  • perfmon
  • propsys
  • pythoncom
  • pywintypes
  • servicemanager
  • shell
  • sspi
  • timer
  • win2kras
  • win32api
  • win32clipboard
  • win32com.authorization.authorization
  • win32console
  • win32cred
  • win32crypt
  • win32event
  • win32evtlog
  • win32file
  • win32gui
  • win32help
  • win32inet
  • win32job
  • win32lz
  • win32net
  • win32pdh
  • win32pipe
  • win32print
  • win32process
  • win32profile
  • win32ras
  • win32security
  • win32service
  • win32timezone
  • win32transaction
  • win32ts
  • win32ui
  • win32uiole
  • win32wnet
  • wincerapi
  • winxpgui


Objects and Module Methods

Object and Module Methods

  • _winxptheme.CloseThemeData
  • _winxptheme.DrawThemeBackground
  • _winxptheme.DrawThemeText
  • _winxptheme.EnableThemeDialogTexture
  • _winxptheme.EnableTheming
  • _winxptheme.GetCurrentThemeName
  • _winxptheme.GetThemeAppProperties
  • _winxptheme.GetThemeBackgroundContentRect
  • _winxptheme.GetThemeBackgroundExtent
  • _winxptheme.GetWindowTheme
  • _winxptheme.IsAppThemed
  • _winxptheme.IsThemeActive
  • _winxptheme.IsThemeDialogTextureEnabled
  • _winxptheme.OpenThemeData
  • _winxptheme.SetWindowTheme
  • adsi.ADsBuildEnumerator
  • adsi.ADsEnumerateNext
  • adsi.ADsGetLastError
  • adsi.ADsGetObject
  • adsi.ADsOpenObject
  • adsi.DSOP_SCOPE_INIT_INFOs
  • adsi.StringAsDS_SELECTION_LIST
  • authorization.EditSecurity
  • axcontrol.OleCreate
  • axcontrol.OleLoadPicture
  • axcontrol.OleLoadPicturePath
  • axcontrol.OleSetContainedObject
  • axcontrol.OleTranslateAccelerator
  • connection.close
  • connection.commit
  • connection.cursor
  • connection.rollback
  • connection.setautocommit
  • cursor.close
  • cursor.execute
  • cursor.fetchall
  • cursor.fetchmany
  • cursor.fetchone
  • cursor.setinputsizes
  • cursor.setoutputsize
  • directsound.DirectSoundCaptureCreate
  • directsound.DirectSoundCaptureEnumerate
  • directsound.DirectSoundCreate
  • directsound.DirectSoundEnumerate
  • directsound.DSBCAPS
  • directsound.DSBUFFERDESC
  • directsound.DSCAPS
  • directsound.DSCBCAPS
  • directsound.DSCBUFFERDESC
  • directsound.DSCCAPS
  • 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
  • EXTENSION_CONTROL_BLOCK.DoneWithSession
  • EXTENSION_CONTROL_BLOCK.ExecURL
  • EXTENSION_CONTROL_BLOCK.GetAnonymousToken
  • EXTENSION_CONTROL_BLOCK.GetExecURLStatus
  • EXTENSION_CONTROL_BLOCK.GetImpersonationToken
  • EXTENSION_CONTROL_BLOCK.GetServerVariable
  • EXTENSION_CONTROL_BLOCK.IOCallback
  • EXTENSION_CONTROL_BLOCK.IOCompletion
  • EXTENSION_CONTROL_BLOCK.IsKeepAlive
  • EXTENSION_CONTROL_BLOCK.IsKeepConn
  • EXTENSION_CONTROL_BLOCK.MapURLToPath
  • EXTENSION_CONTROL_BLOCK.ReadClient
  • EXTENSION_CONTROL_BLOCK.Redirect
  • EXTENSION_CONTROL_BLOCK.ReportUnhealthy
  • EXTENSION_CONTROL_BLOCK.SendResponseHeaders
  • EXTENSION_CONTROL_BLOCK.SetFlushFlag
  • EXTENSION_CONTROL_BLOCK.TransmitFile
  • EXTENSION_CONTROL_BLOCK.WriteClient
  • HTTP_FILTER_CONTEXT.AddResponseHeaders
  • HTTP_FILTER_CONTEXT.DisableNotifications
  • HTTP_FILTER_CONTEXT.GetData
  • HTTP_FILTER_CONTEXT.GetServerVariable
  • HTTP_FILTER_CONTEXT.SendResponseHeader
  • HTTP_FILTER_CONTEXT.WriteClient
  • HTTP_FILTER_PREPROC_HEADERS.AddHeader
  • HTTP_FILTER_PREPROC_HEADERS.GetHeader
  • HTTP_FILTER_PREPROC_HEADERS.SetHeader
  • internet.CoInternetCreateSecurityManager
  • internet.CoInternetIsFeatureEnabled
  • internet.CoInternetSetFeatureEnabled
  • isapi.install.AddExtensionFiles
  • isapi.install.AssignScriptMaps
  • isapi.install.FindWebServer
  • isapi.install.get_unique_items
  • isapi.install.GetWebServer
  • isapi.install.HandleCommandLine
  • isapi.install.InstallModule
  • isapi.install.LocateWebServerPath
  • isapi.install.MergeStandardOptions
  • isapi.install.RemoveScriptMaps
  • isapi.install.split_path
  • isapi.install.UninstallModule
  • isapi.simple.SimpleExtension.GetExtensionVersion
  • isapi.simple.SimpleExtension.GetExtensionVersion
  • isapi.simple.SimpleExtension.HttpExtensionProc
  • isapi.simple.SimpleExtension.HttpExtensionProc
  • isapi.simple.SimpleExtension.TerminateExtension
  • isapi.simple.SimpleExtension.TerminateExtension
  • isapi.simple.SimpleFilter.GetFilterVersion
  • isapi.simple.SimpleFilter.GetFilterVersion
  • isapi.simple.SimpleFilter.HttpFilterProc
  • isapi.simple.SimpleFilter.HttpFilterProc
  • isapi.simple.SimpleFilter.TerminateFilter
  • isapi.simple.SimpleFilter.TerminateFilter
  • isapi.threaded_extension.ThreadPoolExtension.Dispatch
  • isapi.threaded_extension.ThreadPoolExtension.Dispatch
  • isapi.threaded_extension.ThreadPoolExtension.HandleDispatchError
  • isapi.threaded_extension.ThreadPoolExtension.HandleDispatchError
  • mapi.BinFromHex
  • mapi.CloseIMsgSession
  • mapi.HexFromBin
  • mapi.HrAllocAdviseSink
  • mapi.HrGetOneProp
  • mapi.HrQueryAllRows
  • mapi.HrSetOneProp
  • mapi.HrThisThreadAdviseSink
  • mapi.MAPIAdminProfiles
  • mapi.MAPIInitialize
  • mapi.MAPILogonEx
  • mapi.MAPIUninitialize
  • mapi.OpenIMsgOnIStg
  • mapi.OpenIMsgSession
  • mapi.OpenStreamOnFile
  • mapi.OpenStreamOnFileW
  • mapi.RTFStreamToHTML
  • mapi.RTFSync
  • mapi.WrapCompressedRTFStream
  • mapi.WrapCompressedRTFStreamEx
  • mmapfile.mmapfile
  • odbc.odbc
  • odbc.SQLDataSources
  • perfmon.CounterDefinition
  • perfmon.LoadPerfCounterTextStrings
  • perfmon.ObjectType
  • perfmon.PerfMonManager
  • perfmon.UnloadPerfCounterTextStrings
  • propsys.PSCreateMemoryPropertyStore
  • propsys.PSCreatePropertyChangeArray
  • propsys.PSCreatePropertyStoreFromPropertySetStorage
  • propsys.PSCreateSimplePropertyChange
  • propsys.PSGetItemPropertyHandler
  • propsys.PSGetNamedPropertyFromPropertyStorage
  • propsys.PSGetNameFromPropertyKey
  • propsys.PSGetPropertyDescription
  • propsys.PSGetPropertyFromPropertyStorage
  • propsys.PSGetPropertyKeyFromName
  • propsys.PSGetPropertySystem
  • propsys.PSLookupPropertyHandlerCLSID
  • propsys.PSRegisterPropertySchema
  • propsys.PSUnregisterPropertySchema
  • propsys.SHGetPropertyStoreForWindow
  • propsys.SHGetPropertyStoreFromParsingName
  • propsys.SHSetDefaultProperties
  • propsys.StgDeserializePropVariant
  • propsys.StgSerializePropVariant
  • PyACL.AddAccessAllowedAce
  • PyACL.AddAccessAllowedAceEx
  • PyACL.AddAccessAllowedObjectAce
  • PyACL.AddAccessDeniedAce
  • PyACL.AddAccessDeniedAceEx
  • PyACL.AddAccessDeniedObjectAce
  • PyACL.AddAuditAccessAce
  • PyACL.AddAuditAccessAceEx
  • PyACL.AddAuditAccessObjectAce
  • PyACL.AddMandatoryAce
  • PyACL.DeleteAce
  • PyACL.GetAce
  • PyACL.GetAceCount
  • PyACL.GetAclRevision
  • PyACL.GetAclSize
  • PyACL.GetAuditedPermissionsFromAcl
  • PyACL.GetEffectiveRightsFromAcl
  • PyACL.Initialize
  • PyACL.IsValid
  • PyAssocObject.AttachObject
  • PyAssocObject.GetAttachedObject
  • PyCBitmap.CreateCompatibleBitmap
  • PyCBitmap.GetBitmapBits
  • PyCBitmap.GetHandle
  • PyCBitmap.GetInfo
  • PyCBitmap.GetSize
  • PyCBitmap.LoadBitmap
  • PyCBitmap.LoadBitmapFile
  • PyCBitmap.LoadPPMFile
  • PyCBitmap.Paint
  • PyCBitmap.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
  • PyCERT_CONTEXT.CertDeleteCertificateFromStore
  • PyCERT_CONTEXT.CertEnumCertificateContextProperties
  • PyCERT_CONTEXT.CertFreeCertificateContext
  • PyCERT_CONTEXT.CertGetCertificateContextProperty
  • PyCERT_CONTEXT.CertGetEnhancedKeyUsage
  • PyCERT_CONTEXT.CertGetIntendedKeyUsage
  • PyCERT_CONTEXT.CertSerializeCertificateStoreElement
  • PyCERT_CONTEXT.CertSetCertificateContextProperty
  • PyCERT_CONTEXT.CertVerifySubjectCertificateContext
  • PyCERT_CONTEXT.CryptAcquireCertificatePrivateKey
  • PyCERTSTORE.CertAddCertificateContextToStore
  • PyCERTSTORE.CertAddCertificateLinkToStore
  • PyCERTSTORE.CertAddCTLContextToStore
  • PyCERTSTORE.CertAddCTLLinkToStore
  • PyCERTSTORE.CertAddEncodedCertificateToStore
  • PyCERTSTORE.CertAddStoreToCollection
  • PyCERTSTORE.CertCloseStore
  • PyCERTSTORE.CertControlStore
  • PyCERTSTORE.CertEnumCertificatesInStore
  • PyCERTSTORE.CertEnumCTLsInStore
  • PyCERTSTORE.CertRemoveStoreFromCollection
  • PyCERTSTORE.CertSaveStore
  • PyCERTSTORE.PFXExportCertStoreEx
  • PyCFileDialog.GetFileExt
  • PyCFileDialog.GetFileName
  • PyCFileDialog.GetFileTitle
  • PyCFileDialog.GetPathName
  • PyCFileDialog.GetPathNames
  • PyCFileDialog.GetReadOnlyPref
  • PyCFileDialog.SetOFNInitialDir
  • PyCFileDialog.SetOFNTitle
  • PyCFont.GetSafeHandle
  • 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
  • PyConsoleScreenBuffer.FillConsoleOutputAttribute
  • PyConsoleScreenBuffer.FillConsoleOutputCharacter
  • PyConsoleScreenBuffer.FlushConsoleInputBuffer
  • PyConsoleScreenBuffer.GetConsoleCursorInfo
  • PyConsoleScreenBuffer.GetConsoleFontSize
  • PyConsoleScreenBuffer.GetConsoleMode
  • PyConsoleScreenBuffer.GetConsoleScreenBufferInfo
  • PyConsoleScreenBuffer.GetCurrentConsoleFont
  • PyConsoleScreenBuffer.GetLargestConsoleWindowSize
  • PyConsoleScreenBuffer.GetNumberOfConsoleInputEvents
  • PyConsoleScreenBuffer.PeekConsoleInput
  • PyConsoleScreenBuffer.ReadConsole
  • PyConsoleScreenBuffer.ReadConsoleInput
  • PyConsoleScreenBuffer.ReadConsoleOutputAttribute
  • PyConsoleScreenBuffer.ReadConsoleOutputCharacter
  • PyConsoleScreenBuffer.ScrollConsoleScreenBuffer
  • PyConsoleScreenBuffer.SetConsoleActiveScreenBuffer
  • PyConsoleScreenBuffer.SetConsoleCursorInfo
  • PyConsoleScreenBuffer.SetConsoleCursorPosition
  • PyConsoleScreenBuffer.SetConsoleDisplayMode
  • PyConsoleScreenBuffer.SetConsoleFont
  • PyConsoleScreenBuffer.SetConsoleMode
  • PyConsoleScreenBuffer.SetConsoleScreenBufferSize
  • PyConsoleScreenBuffer.SetConsoleTextAttribute
  • PyConsoleScreenBuffer.SetConsoleWindowInfo
  • PyConsoleScreenBuffer.SetStdHandle
  • PyConsoleScreenBuffer.WriteConsole
  • PyConsoleScreenBuffer.WriteConsoleInput
  • PyConsoleScreenBuffer.WriteConsoleOutputAttribute
  • PyConsoleScreenBuffer.WriteConsoleOutputCharacter
  • 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
  • PyCredHandle.Detach
  • PyCredHandle.FreeCredentialsHandle
  • PyCredHandle.QueryCredentialsAttributes
  • 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
  • PyCRYPTHASH.CryptDestroyHash
  • PyCRYPTHASH.CryptDuplicateHash
  • PyCRYPTHASH.CryptGetHashParam
  • PyCRYPTHASH.CryptHashData
  • PyCRYPTHASH.CryptHashSessionKey
  • PyCRYPTHASH.CryptSignHash
  • PyCRYPTHASH.CryptVerifySignature
  • PyCRYPTKEY.CryptDecrypt
  • PyCRYPTKEY.CryptDestroyKey
  • PyCRYPTKEY.CryptDuplicateKey
  • PyCRYPTKEY.CryptEncrypt
  • PyCRYPTKEY.CryptExportKey
  • PyCRYPTKEY.CryptGetKeyParam
  • PyCRYPTMSG.CryptMsgClose
  • PyCRYPTPROV.CryptCreateHash
  • PyCRYPTPROV.CryptExportPublicKeyInfo
  • PyCRYPTPROV.CryptGenKey
  • PyCRYPTPROV.CryptGenRandom
  • PyCRYPTPROV.CryptGetProvParam
  • PyCRYPTPROV.CryptGetUserKey
  • PyCRYPTPROV.CryptImportKey
  • PyCRYPTPROV.CryptImportPublicKeyInfo
  • PyCRYPTPROV.CryptReleaseContext
  • 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.GetPaneInfo
  • PyCStatusBar.GetStatusBarCtrl
  • PyCStatusBar.SetIndicators
  • PyCStatusBar.SetPaneInfo
  • PyCStatusBarCtrl.CreateWindow
  • PyCStatusBarCtrl.GetBorders
  • PyCStatusBarCtrl.GetParts
  • PyCStatusBarCtrl.GetRect
  • PyCStatusBarCtrl.GetText
  • PyCStatusBarCtrl.GetTextAttr
  • PyCStatusBarCtrl.GetTextLength
  • PyCStatusBarCtrl.SetMinHeight
  • PyCStatusBarCtrl.SetParts
  • PyCStatusBarCtrl.SetSimple
  • PyCStatusBarCtrl.SetText
  • PyCStatusBarCtrl.SetTipText
  • PyCTabCtrl.GetCurSel
  • PyCTabCtrl.GetItemCountl
  • PyCTabCtrl.SetCurSel
  • PyCTL_CONTEXT.CertDeleteCTLFromStore
  • PyCTL_CONTEXT.CertEnumCTLContextProperties
  • PyCTL_CONTEXT.CertEnumSubjectInSortedCTL
  • PyCTL_CONTEXT.CertFreeCTLContext
  • PyCTL_CONTEXT.CertSerializeCTLStoreElement
  • 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
  • PyCtxtHandle.CompleteAuthToken
  • PyCtxtHandle.DecryptMessage
  • PyCtxtHandle.DeleteSecurityContext
  • PyCtxtHandle.Detach
  • PyCtxtHandle.EncryptMessage
  • PyCtxtHandle.ImpersonateSecurityContext
  • PyCtxtHandle.MakeSignature
  • PyCtxtHandle.QueryContextAttributes
  • PyCtxtHandle.QuerySecurityContextToken
  • PyCtxtHandle.RevertSecurityContext
  • PyCtxtHandle.VerifySignature
  • 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.OnTimer
  • 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.SendMessage
  • PyCWnd.SendMessageToDescendants
  • PyCWnd.SetActiveWindow
  • PyCWnd.SetCapture
  • PyCWnd.SetDlgItemText
  • PyCWnd.SetFocus
  • PyCWnd.SetFont
  • PyCWnd.SetForegroundWindow
  • PyCWnd.SetIcon
  • 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
  • PyDateTime.Format
  • 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
  • PyDEVMODE.Clear
  • PyDEVMODE.Clear
  • PyDISPLAY_DEVICE.Clear
  • PyDLL.__repr__
  • PyDLL.AttachToMFC
  • PyDLL.GetFileName
  • PyGFileOperationProgressSink.FinishOperations
  • PyGFileOperationProgressSink.PauseTimer
  • PyGFileOperationProgressSink.PostCopyItem
  • PyGFileOperationProgressSink.PostDeleteItem
  • PyGFileOperationProgressSink.PostMoveItem
  • PyGFileOperationProgressSink.PostNewItem
  • PyGFileOperationProgressSink.PostRenameItem
  • PyGFileOperationProgressSink.PreCopyItem
  • PyGFileOperationProgressSink.PreDeleteItem
  • PyGFileOperationProgressSink.PreMoveItem
  • PyGFileOperationProgressSink.PreNewItem
  • PyGFileOperationProgressSink.PreRenameItem
  • PyGFileOperationProgressSink.ResetTimer
  • PyGFileOperationProgressSink.ResumeTimer
  • PyGFileOperationProgressSink.StartOperations
  • PyGFileOperationProgressSink.UpdateProgress
  • PyGSecurityInformation.GetAccessRights
  • PyGSecurityInformation.GetInheritTypes
  • PyGSecurityInformation.GetObjectInformation
  • PyGSecurityInformation.GetSecurity
  • PyGSecurityInformation.MapGeneric
  • PyGSecurityInformation.PropertySheetPageCallback
  • PyGSecurityInformation.SetSecurity
  • PyHANDLE.__hash__
  • PyHANDLE.__int__
  • PyHANDLE.__long__
  • PyHANDLE.__nonzero__
  • PyHANDLE.__print__
  • PyHANDLE.__str__
  • PyHANDLE.Close
  • PyHANDLE.Detach
  • PyHDESK.CloseDesktop
  • PyHDESK.EnumDesktopWindows
  • PyHDESK.SetThreadDesktop
  • PyHDESK.SwitchDesktop
  • PyHWINSTA.CloseWindowStation
  • PyHWINSTA.EnumDesktops
  • PyHWINSTA.SetProcessWindowStation
  • PyIActiveDesktop.AddDesktopItem
  • PyIActiveDesktop.AddDesktopItemWithUI
  • PyIActiveDesktop.AddUrl
  • PyIActiveDesktop.ApplyChanges
  • PyIActiveDesktop.GenerateDesktopItemHtml
  • PyIActiveDesktop.GetDesktopItem
  • PyIActiveDesktop.GetDesktopItemByID
  • PyIActiveDesktop.GetDesktopItemBySource
  • PyIActiveDesktop.GetDesktopItemCount
  • PyIActiveDesktop.GetDesktopItemOptions
  • PyIActiveDesktop.GetPattern
  • PyIActiveDesktop.GetWallpaper
  • PyIActiveDesktop.GetWallpaperOptions
  • PyIActiveDesktop.ModifyDesktopItem
  • PyIActiveDesktop.RemoveDesktopItem
  • PyIActiveDesktop.SetDesktopItemOptions
  • PyIActiveDesktop.SetPattern
  • PyIActiveDesktop.SetWallpaper
  • PyIActiveDesktop.SetWallpaperOptions
  • PyIActiveDesktopP.SetSafeMode
  • 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
  • PyIADesktopP2.UpdateAllDesktopSubscriptions
  • PyIADs.Get
  • PyIADs.GetInfo
  • PyIADs.Put
  • PyIADs.SetInfo
  • PyIADsContainer.get_Count
  • PyIADsContainer.get_Filter
  • PyIADsContainer.get_Hints
  • PyIADsContainer.GetObject
  • PyIADsContainer.put_Filter
  • PyIADsContainer.put_Hints
  • PyIADsUser.ChangePassword
  • PyIADsUser.get_AccountDisabled
  • PyIADsUser.get_AccountExpirationDate
  • PyIADsUser.get_BadLoginAddress
  • PyIADsUser.get_BadLoginCount
  • PyIADsUser.get_Department
  • PyIADsUser.get_Description
  • PyIADsUser.get_Division
  • PyIADsUser.get_EmailAddress
  • PyIADsUser.get_EmployeeID
  • PyIADsUser.get_FirstName
  • PyIADsUser.get_FullName
  • PyIADsUser.get_HomeDirectory
  • PyIADsUser.get_HomePage
  • PyIADsUser.get_LoginScript
  • PyIADsUser.put_AccountDisabled
  • PyIADsUser.put_AccountExpirationDate
  • PyIADsUser.put_Department
  • PyIADsUser.put_Description
  • PyIADsUser.put_Division
  • PyIADsUser.put_EmailAddress
  • PyIADsUser.put_EmployeeID
  • PyIADsUser.put_FirstName
  • PyIADsUser.put_FullName
  • PyIADsUser.put_HomeDirectory
  • PyIADsUser.put_HomePage
  • PyIADsUser.put_LoginScript
  • PyIADsUser.SetPassword
  • PyIApplicationDebugger.CreateInstanceAtDebugger
  • PyIApplicationDebugger.onClose
  • PyIApplicationDebugger.onDebuggerEvent
  • PyIApplicationDebugger.onDebugOutput
  • PyIApplicationDebugger.onHandleBreakPoint
  • PyIApplicationDebugger.QueryAlive
  • PyIApplicationDestinations.RemoveAllDestinations
  • PyIApplicationDestinations.RemoveDestination
  • PyIApplicationDestinations.SetAppID
  • PyIApplicationDocumentLists.GetList
  • PyIApplicationDocumentLists.SetAppID
  • PyIAsyncOperation.EndOperation
  • PyIAsyncOperation.GetAsyncMode
  • PyIAsyncOperation.InOperation
  • PyIAsyncOperation.SetAsyncMode
  • PyIAsyncOperation.StartOperation
  • PyIAttach.GetLastError
  • PyIBindCtx.EnumObjectParam
  • PyIBindCtx.GetBindOptions
  • PyIBindCtx.GetObjectParam
  • PyIBindCtx.GetRunningObjectTable
  • PyIBindCtx.RegisterObjectParam
  • PyIBindCtx.RevokeObjectParam
  • PyIBindCtx.SetBindOptions
  • PyIBrowserFrameOptions.GetFrameOptions
  • PyICancelMethodCalls.Cancel
  • PyICancelMethodCalls.TestCancel
  • PyICategoryProvider.CanCategorizeOnSCID
  • PyICategoryProvider.CreateCategory
  • PyICategoryProvider.EnumCategories
  • PyICategoryProvider.GetCategoryForSCID
  • PyICategoryProvider.GetCategoryName
  • PyICategoryProvider.GetDefaultCategory
  • PyICatInformation.EnumCategories
  • PyICatInformation.EnumClassesOfCategories
  • PyICatInformation.GetCategoryDesc
  • PyICatRegister.RegisterCategories
  • PyICatRegister.RegisterClassImplCategories
  • PyICatRegister.RegisterClassReqCategories
  • PyICatRegister.UnregisterCategories
  • PyICatRegister.UnRegisterClassImplCategories
  • PyICatRegister.UnRegisterClassReqCategories
  • PyIClassFactory.CreateInstance
  • PyIClassFactory.LockServer
  • PyIClientSecurity.CopyProxy
  • PyIClientSecurity.QueryBlanket
  • PyIClientSecurity.SetBlanket
  • PyIColumnProvider.GetColumnInfo
  • PyIColumnProvider.GetItemData
  • PyIColumnProvider.Initialize
  • PyIConnectionPoint.Advise
  • PyIConnectionPoint.EnumConnections
  • PyIConnectionPoint.GetConnectionInterface
  • PyIConnectionPoint.GetConnectionPointContainer
  • PyIConnectionPoint.Unadvise
  • PyIConnectionPointContainer.EnumConnectionPoints
  • PyIConnectionPointContainer.FindConnectionPoint
  • PyIContext.EnumContextProps
  • PyIContext.GetProperty
  • PyIContext.RemoveProperty
  • PyIContext.SetProperty
  • PyIContextMenu.GetCommandString
  • PyIContextMenu.InvokeCommand
  • PyIContextMenu.QueryContextMenu
  • PyICopyHookA.CopyCallback
  • PyICopyHookW.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
  • PyICreateTypeLib2.CreateTypeInfo
  • PyICreateTypeLib2.SaveAllChanges
  • PyICreateTypeLib2.SetDocString
  • PyICreateTypeLib2.SetGuid
  • PyICreateTypeLib2.SetHelpContext
  • PyICreateTypeLib2.SetHelpFileName
  • PyICreateTypeLib2.SetLcid
  • PyICreateTypeLib2.SetLibFlags
  • PyICreateTypeLib2.SetName
  • PyICreateTypeLib2.SetVersion
  • PyICustomDestinationList.AbortList
  • PyICustomDestinationList.AddUserTasks
  • PyICustomDestinationList.AppendCategory
  • PyICustomDestinationList.AppendKnownCategory
  • PyICustomDestinationList.BeginList
  • PyICustomDestinationList.CommitList
  • PyICustomDestinationList.DeleteList
  • PyICustomDestinationList.GetRemovedDestinations
  • PyICustomDestinationList.SetAppID
  • 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
  • PyIDefaultExtractIconInit.SetDefaultIcon
  • PyIDefaultExtractIconInit.SetFlags
  • PyIDefaultExtractIconInit.SetKey
  • PyIDefaultExtractIconInit.SetNormalIcon
  • PyIDefaultExtractIconInit.SetOpenIcon
  • PyIDefaultExtractIconInit.SetShortcutIcon
  • PyIDirectoryObject.CreateDSObject
  • PyIDirectoryObject.DeleteDSObject
  • PyIDirectoryObject.GetObjectAttributes
  • PyIDirectoryObject.GetObjectInformation
  • PyIDirectoryObject.SetObjectAttributes
  • PyIDirectorySearch.AdandonSearch
  • PyIDirectorySearch.CloseSearchHandle
  • PyIDirectorySearch.ExecuteSearch
  • PyIDirectorySearch.GetColumn
  • PyIDirectorySearch.GetFirstRow
  • PyIDirectorySearch.GetNextColumnName
  • PyIDirectorySearch.GetNextRow
  • PyIDirectorySearch.GetPreviousRow
  • PyIDirectorySearch.SetSearchPreference
  • PyIDirectSound.Compact
  • PyIDirectSound.CreateSoundBuffer
  • PyIDirectSound.GetCaps
  • PyIDirectSound.GetSpeakerConfig
  • PyIDirectSound.Initialize
  • PyIDirectSound.SetCooperativeLevel
  • PyIDirectSound.SetSpeakerConfig
  • PyIDirectSoundBuffer.GetCaps
  • PyIDirectSoundBuffer.GetCurrentPosition
  • PyIDirectSoundBuffer.GetFormat
  • PyIDirectSoundBuffer.GetFrequency
  • PyIDirectSoundBuffer.GetPan
  • PyIDirectSoundBuffer.GetStatus
  • PyIDirectSoundBuffer.GetVolume
  • PyIDirectSoundBuffer.Initialize
  • PyIDirectSoundBuffer.Play
  • PyIDirectSoundBuffer.Restore
  • PyIDirectSoundBuffer.SetCurrentPosition
  • PyIDirectSoundBuffer.SetFormat
  • PyIDirectSoundBuffer.SetFrequency
  • PyIDirectSoundBuffer.SetPan
  • PyIDirectSoundBuffer.SetVolume
  • PyIDirectSoundBuffer.Stop
  • PyIDirectSoundBuffer.Update
  • PyIDirectSoundCapture.CreateCaptureBuffer
  • PyIDirectSoundCapture.GetCaps
  • PyIDirectSoundCapture.Initialize
  • PyIDirectSoundCaptureBuffer.GetCaps
  • PyIDirectSoundCaptureBuffer.GetCurrentPosition
  • PyIDirectSoundCaptureBuffer.GetFormat
  • PyIDirectSoundCaptureBuffer.GetStatus
  • PyIDirectSoundCaptureBuffer.Initialize
  • PyIDirectSoundCaptureBuffer.Start
  • PyIDirectSoundCaptureBuffer.Stop
  • PyIDirectSoundCaptureBuffer.Update
  • PyIDirectSoundNotify.SetNotificationPositions
  • PyIDispatch.GetIDsOfNames
  • PyIDispatch.GetTypeInfo
  • PyIDispatch.GetTypeInfoCount
  • PyIDispatch.Invoke
  • PyIDispatch.InvokeTypes
  • PyIDispatchEx.DeleteMemberByDispID
  • PyIDispatchEx.DeleteMemberByName
  • PyIDispatchEx.GetDispID
  • PyIDispatchEx.GetMemberName
  • PyIDispatchEx.GetMemberProperties
  • PyIDispatchEx.GetNextDispID
  • PyIDispatchEx.InvokeEx
  • PyIDocHostUIHandler.EnableModeless
  • PyIDocHostUIHandler.FilterDataObject
  • PyIDocHostUIHandler.GetDropTarget
  • PyIDocHostUIHandler.GetExternal
  • PyIDocHostUIHandler.GetHostInfo
  • PyIDocHostUIHandler.GetOptionKeyPath
  • PyIDocHostUIHandler.HideUI
  • PyIDocHostUIHandler.OnDocWindowActivate
  • PyIDocHostUIHandler.OnFrameWindowActivate
  • PyIDocHostUIHandler.ResizeBorder
  • PyIDocHostUIHandler.ShowContextMenu
  • PyIDocHostUIHandler.ShowUI
  • PyIDocHostUIHandler.TranslateAccelerator
  • PyIDocHostUIHandler.TranslateUrl
  • PyIDocHostUIHandler.UpdateUI
  • PyIDropSource.GiveFeedback
  • PyIDropSource.QueryContinueDrag
  • PyIDropTarget.DragEnter
  • PyIDropTarget.DragLeave
  • PyIDropTarget.DragOver
  • PyIDropTarget.Drop
  • PyIDropTargetHelper.DragEnter
  • PyIDropTargetHelper.DragLeave
  • PyIDropTargetHelper.DragOver
  • PyIDropTargetHelper.Drop
  • PyIDsObjectPicker.Initialize
  • PyIDsObjectPicker.InvokeDialog
  • PyIEmptyVolumeCache.Deactivate
  • PyIEmptyVolumeCache.GetSpaceUsed
  • PyIEmptyVolumeCache.Initialize
  • PyIEmptyVolumeCache.Purge
  • PyIEmptyVolumeCache.ShowProperties
  • PyIEmptyVolumeCache2.InitializeEx
  • PyIEmptyVolumeCacheCallBack.PurgeProgress
  • PyIEmptyVolumeCacheCallBack.ScanProgress
  • PyIEnumCATEGORYINFO.Clone
  • PyIEnumCATEGORYINFO.Next
  • PyIEnumCATEGORYINFO.Reset
  • PyIEnumCATEGORYINFO.Skip
  • PyIEnumConnectionPoints.Clone
  • PyIEnumConnectionPoints.Next
  • PyIEnumConnectionPoints.Reset
  • PyIEnumConnectionPoints.Skip
  • PyIEnumConnections.Clone
  • PyIEnumConnections.Next
  • PyIEnumConnections.Reset
  • PyIEnumConnections.Skip
  • PyIEnumContextProps.Clone
  • PyIEnumContextProps.Next
  • PyIEnumContextProps.Reset
  • PyIEnumContextProps.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
  • PyIEnumExplorerCommand.Clone
  • PyIEnumExplorerCommand.Next
  • PyIEnumExplorerCommand.Reset
  • PyIEnumExplorerCommand.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
  • PyIEnumObjects.Clone
  • PyIEnumObjects.Next
  • PyIEnumObjects.Reset
  • PyIEnumObjects.Skip
  • PyIEnumRemoteDebugApplications.Clone
  • PyIEnumRemoteDebugApplications.Next
  • PyIEnumRemoteDebugApplications.Reset
  • PyIEnumRemoteDebugApplications.Skip
  • PyIEnumRemoteDebugApplicationThreads.Clone
  • PyIEnumRemoteDebugApplicationThreads.Next
  • PyIEnumRemoteDebugApplicationThreads.Reset
  • PyIEnumRemoteDebugApplicationThreads.Skip
  • PyIEnumResources.Clone
  • PyIEnumResources.Next
  • PyIEnumResources.Reset
  • PyIEnumResources.Skip
  • PyIEnumShellItems.Clone
  • PyIEnumShellItems.Next
  • PyIEnumShellItems.Reset
  • PyIEnumShellItems.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
  • PyIEnumString.Clone
  • PyIEnumString.Next
  • PyIEnumString.Reset
  • PyIEnumString.Skip
  • PyIErrorLog.AddError
  • PyIExplorerBrowser.Advise
  • PyIExplorerBrowser.BrowseToIDList
  • PyIExplorerBrowser.BrowseToObject
  • PyIExplorerBrowser.Destroy
  • PyIExplorerBrowser.FillFromObject
  • PyIExplorerBrowser.GetCurrentView
  • PyIExplorerBrowser.GetOptions
  • PyIExplorerBrowser.Initialize
  • PyIExplorerBrowser.RemoveAll
  • PyIExplorerBrowser.SetEmptyText
  • PyIExplorerBrowser.SetFolderSettings
  • PyIExplorerBrowser.SetOptions
  • PyIExplorerBrowser.SetPropertyBag
  • PyIExplorerBrowser.SetRect
  • PyIExplorerBrowser.Unadvise
  • PyIExplorerBrowserEvents.OnNavigationComplete
  • PyIExplorerBrowserEvents.OnNavigationFailed
  • PyIExplorerBrowserEvents.OnNavigationPending
  • PyIExplorerBrowserEvents.OnViewCreated
  • PyIExplorerCommand.EnumSubCommands
  • PyIExplorerCommand.GetCanonicalName
  • PyIExplorerCommand.GetFlags
  • PyIExplorerCommand.GetIcon
  • PyIExplorerCommand.GetState
  • PyIExplorerCommand.GetTitle
  • PyIExplorerCommand.GetToolTip
  • PyIExplorerCommand.Invoke
  • PyIExplorerPaneVisibility.GetPaneState
  • PyIExternalConnection.AddConnection
  • PyIExternalConnection.ReleaseConnection
  • PyIExtractIcon.Extract
  • PyIExtractIcon.GetIconLocation
  • PyIExtractIconW.Extract
  • PyIExtractIconW.GetIconLocation
  • PyIExtractImage.Extract
  • PyIExtractImage.GetLocation
  • PyIFileOperation.Advise
  • PyIFileOperation.ApplyPropertiesToItem
  • PyIFileOperation.ApplyPropertiesToItems
  • PyIFileOperation.CopyItem
  • PyIFileOperation.CopyItems
  • PyIFileOperation.DeleteItem
  • PyIFileOperation.DeleteItems
  • PyIFileOperation.GetAnyOperationsAborted
  • PyIFileOperation.MoveItem
  • PyIFileOperation.MoveItems
  • PyIFileOperation.NewItem
  • PyIFileOperation.PerformOperations
  • PyIFileOperation.RenameItem
  • PyIFileOperation.RenameItems
  • PyIFileOperation.SetOperationFlags
  • PyIFileOperation.SetOwnerWindow
  • PyIFileOperation.SetProgressDialog
  • PyIFileOperation.SetProgressMessage
  • PyIFileOperation.SetProperties
  • PyIFileOperation.Unadvise
  • PyIID.__hash__
  • PyIID.__repr__
  • PyIID.__str__
  • PyIInitializeWithFile.Initialize
  • PyIInitializeWithStream.Initialize
  • PyIInputObject.HasFocusIO
  • PyIInputObject.TranslateAccelerator
  • PyIInputObject.UIActivate
  • 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
  • PyIInternetSecurityManager.GetSecurityId
  • PyIInternetSecurityManager.GetSecuritySite
  • PyIInternetSecurityManager.GetZoneMappings
  • PyIInternetSecurityManager.MapUrlToZone
  • PyIInternetSecurityManager.ProcessUrlAction
  • PyIInternetSecurityManager.SetSecuritySite
  • PyIInternetSecurityManager.SetZoneMapping
  • PyIKnownFolder.GetCategory
  • PyIKnownFolder.GetFolderDefinition
  • PyIKnownFolder.GetFolderType
  • PyIKnownFolder.GetId
  • PyIKnownFolder.GetIDList
  • PyIKnownFolder.GetPath
  • PyIKnownFolder.GetRedirectionCapabilities
  • PyIKnownFolder.GetShellItem
  • PyIKnownFolder.SetPath
  • PyIKnownFolderManager.FindFolderFromIDList
  • PyIKnownFolderManager.FindFolderFromPath
  • PyIKnownFolderManager.FolderIdFromCsidl
  • PyIKnownFolderManager.FolderIdToCsidl
  • PyIKnownFolderManager.GetFolder
  • PyIKnownFolderManager.GetFolderByName
  • PyIKnownFolderManager.GetFolderIds
  • PyIKnownFolderManager.Redirect
  • PyIKnownFolderManager.RegisterFolder
  • PyIKnownFolderManager.UnregisterFolder
  • 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.DeleteFolder
  • PyIMAPIFolder.DeleteMessages
  • PyIMAPIFolder.EmptyFolder
  • PyIMAPIFolder.GetLastError
  • PyIMAPIFolder.SetReadFlags
  • PyIMAPIProp.CopyProps
  • PyIMAPIProp.CopyTo
  • PyIMAPIProp.DeleteProps
  • PyIMAPIProp.GetIDsFromNames
  • PyIMAPIProp.GetLastError
  • PyIMAPIProp.GetNamesFromIDs
  • PyIMAPIProp.GetPropList
  • PyIMAPIProp.GetProps
  • PyIMAPIProp.OpenProperty
  • PyIMAPIProp.SaveChanges
  • PyIMAPIProp.SetProps
  • PyIMAPISession.AdminServices
  • PyIMAPISession.Advise
  • PyIMAPISession.CompareEntryIDs
  • PyIMAPISession.GetLastError
  • PyIMAPISession.GetMsgStoresTable
  • PyIMAPISession.GetStatusTable
  • PyIMAPISession.Logoff
  • PyIMAPISession.OpenAddressBook
  • PyIMAPISession.OpenEntry
  • PyIMAPISession.OpenMsgStore
  • PyIMAPISession.OpenProfileSection
  • PyIMAPISession.QueryIdentity
  • PyIMAPISession.Unadvise
  • PyIMAPIStatus.ChangePassword
  • PyIMAPIStatus.FlushQueues
  • PyIMAPIStatus.FlushQueues
  • PyIMAPIStatus.SettingsDialog
  • PyIMAPIStatus.ValidateState
  • PyIMAPITable.Abort
  • PyIMAPITable.Advise
  • PyIMAPITable.CreateBookmark
  • PyIMAPITable.FindRow
  • PyIMAPITable.FreeBookmark
  • PyIMAPITable.GetLastError
  • PyIMAPITable.GetRowCount
  • PyIMAPITable.GetStatus
  • PyIMAPITable.QueryColumns
  • PyIMAPITable.QueryPosition
  • PyIMAPITable.QueryRows
  • PyIMAPITable.Restrict
  • PyIMAPITable.SeekRow
  • PyIMAPITable.SeekRowApprox
  • PyIMAPITable.SetColumns
  • PyIMAPITable.SortTable
  • PyIMAPITable.Unadvise
  • 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.AdminProviders
  • PyIMsgServiceAdmin.ConfigureMsgService
  • PyIMsgServiceAdmin.CreateMsgService
  • PyIMsgServiceAdmin.DeleteMsgService
  • PyIMsgServiceAdmin.GetLastError
  • PyIMsgServiceAdmin.GetMsgServiceTable
  • PyIMsgServiceAdmin.GetProviderTable
  • PyIMsgServiceAdmin.OpenProfileSection
  • PyIMsgServiceAdmin.RenameMsgService
  • PyIMsgStore.AbortSubmit
  • PyIMsgStore.Advise
  • PyIMsgStore.CompareEntryIDs
  • PyIMsgStore.GetLastError
  • PyIMsgStore.GetReceiveFolder
  • PyIMsgStore.GetReceiveFolderTable
  • PyIMsgStore.OpenEntry
  • PyIMsgStore.Unadvise
  • PyINamedPropertyStore.GetNameAt
  • PyINamedPropertyStore.GetNameCount
  • PyINamedPropertyStore.GetNamedValue
  • PyINamedPropertyStore.SetNamedValue
  • PyINameSpaceTreeControl.AppendRoot
  • PyINameSpaceTreeControl.CollapseAll
  • PyINameSpaceTreeControl.EnsureItemVisible
  • PyINameSpaceTreeControl.GetItemCustomState
  • PyINameSpaceTreeControl.GetItemRect
  • PyINameSpaceTreeControl.GetItemState
  • PyINameSpaceTreeControl.GetNextItem
  • PyINameSpaceTreeControl.GetRootItems
  • PyINameSpaceTreeControl.GetSelectedItems
  • PyINameSpaceTreeControl.HitTest
  • PyINameSpaceTreeControl.Initialize
  • PyINameSpaceTreeControl.InsertRoot
  • PyINameSpaceTreeControl.RemoveAllRoots
  • PyINameSpaceTreeControl.RemoveRoot
  • PyINameSpaceTreeControl.SetItemCustomState
  • PyINameSpaceTreeControl.SetItemState
  • PyINameSpaceTreeControl.SetTheme
  • PyINameSpaceTreeControl.TreeAdvise
  • PyINameSpaceTreeControl.TreeUnadvise
  • PyIObjectArray.GetAt
  • PyIObjectArray.GetCount
  • PyIObjectCollection.AddFromArray
  • PyIObjectCollection.AddObject
  • PyIObjectCollection.Clear
  • PyIObjectCollection.RemoveObjectAt
  • PyIObjectWithPropertyKey.GetPropertyKey
  • PyIObjectWithPropertyKey.SetPropertyKey
  • PyIObjectWithSite.GetSite
  • PyIObjectWithSite.SetSite
  • PyIOleClientSite.GetContainer
  • PyIOleClientSite.GetMoniker
  • PyIOleClientSite.OnShowWindow
  • PyIOleClientSite.RequestNewObjectLayout
  • PyIOleClientSite.SaveObject
  • PyIOleClientSite.ShowObject
  • PyIOleCommandTarget.Exec
  • PyIOleCommandTarget.QueryStatus
  • PyIOleControl.FreezeEvents
  • PyIOleControl.GetControlInfo
  • PyIOleControl.OnAmbientPropertyChange
  • PyIOleControl.OnMnemonic
  • PyIOleControlSite.GetExtendedControl
  • PyIOleControlSite.LockInPlaceActive
  • PyIOleControlSite.OnControlInfoChanged
  • PyIOleControlSite.OnFocus
  • PyIOleControlSite.ShowPropertyFrame
  • PyIOleControlSite.TransformCoords
  • PyIOleControlSite.TranslateAccelerator
  • PyIOleInPlaceActiveObject.EnableModeless
  • PyIOleInPlaceActiveObject.OnDocWindowActivate
  • PyIOleInPlaceActiveObject.OnFrameWindowActivate
  • PyIOleInPlaceActiveObject.ResizeBorder
  • PyIOleInPlaceActiveObject.TranslateAccelerator
  • PyIOleInPlaceFrame.EnableModeless
  • PyIOleInPlaceFrame.InsertMenus
  • PyIOleInPlaceFrame.RemoveMenus
  • PyIOleInPlaceFrame.SetMenu
  • PyIOleInPlaceFrame.SetStatusText
  • PyIOleInPlaceFrame.TranslateAccelerator
  • 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
  • PyIOleInPlaceUIWindow.GetBorder
  • PyIOleInPlaceUIWindow.RequestBorderSpace
  • PyIOleInPlaceUIWindow.SetActiveObject
  • PyIOleInPlaceUIWindow.SetBorderSpace
  • 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
  • PyIPersistFolder2.GetCurFolder
  • PyIPersistPropertyBag.InitNew
  • PyIPersistPropertyBag.Load
  • PyIPersistPropertyBag.Save
  • PyIPersistSerializedPropStorage.GetPropertyStorage
  • PyIPersistSerializedPropStorage.SetFlags
  • PyIPersistSerializedPropStorage.SetPropertyStorage
  • 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
  • PyIProfAdmin.AdminServices
  • PyIProfAdmin.CopyProfile
  • PyIProfAdmin.CreateProfile
  • PyIProfAdmin.DeleteProfile
  • PyIProfAdmin.GetLastError
  • PyIProfAdmin.RenameProfile
  • PyIProfAdmin.SetDefaultProfile
  • PyIPropertyBag.Read
  • PyIPropertyBag.Write
  • PyIPropertyChange.ApplyToPropVariant
  • PyIPropertyChangeArray.Append
  • PyIPropertyChangeArray.AppendOrReplace
  • PyIPropertyChangeArray.GetAt
  • PyIPropertyChangeArray.GetCount
  • PyIPropertyChangeArray.InsertAt
  • PyIPropertyChangeArray.IsKeyInArray
  • PyIPropertyChangeArray.RemoveAt
  • PyIPropertyDescription.CoerceToCanonicalValue
  • PyIPropertyDescription.FormatForDisplay
  • PyIPropertyDescription.GetAggregationType
  • PyIPropertyDescription.GetCanonicalName
  • PyIPropertyDescription.GetColumnState
  • PyIPropertyDescription.GetConditionType
  • PyIPropertyDescription.GetDefaultColumnWidth
  • PyIPropertyDescription.GetDisplayName
  • PyIPropertyDescription.GetDisplayType
  • PyIPropertyDescription.GetEditInvitation
  • PyIPropertyDescription.GetEnumTypeList
  • PyIPropertyDescription.GetGroupingRange
  • PyIPropertyDescription.GetPropertyKey
  • PyIPropertyDescription.GetPropertyType
  • PyIPropertyDescription.GetRelativeDescription
  • PyIPropertyDescription.GetRelativeDescriptionType
  • PyIPropertyDescription.GetSortDescription
  • PyIPropertyDescription.GetSortDescriptionLabel
  • PyIPropertyDescription.GetTypeFlags
  • PyIPropertyDescription.GetViewFlags
  • PyIPropertyDescription.IsValueCanonical
  • PyIPropertyDescriptionAliasInfo.GetAdditionalSortByAliases
  • PyIPropertyDescriptionAliasInfo.GetSortByAlias
  • PyIPropertyDescriptionList.GetAt
  • PyIPropertyDescriptionList.GetCount
  • PyIPropertyDescriptionSearchInfo.GetColumnIndexType
  • PyIPropertyDescriptionSearchInfo.GetMaxSize
  • PyIPropertyDescriptionSearchInfo.GetProjectionString
  • PyIPropertyDescriptionSearchInfo.GetSearchInfoFlags
  • PyIPropertyEnumType.GetDisplayText
  • PyIPropertyEnumType.GetEnumType
  • PyIPropertyEnumType.GetRangeMinValue
  • PyIPropertyEnumType.GetRangeSetValue
  • PyIPropertyEnumType.GetValue
  • PyIPropertyEnumTypeList.FindMatchingIndex
  • PyIPropertyEnumTypeList.GetAt
  • PyIPropertyEnumTypeList.GetCount
  • 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
  • PyIPropertyStore.Commit
  • PyIPropertyStore.GetAt
  • PyIPropertyStore.GetCount
  • PyIPropertyStore.GetValue
  • PyIPropertyStore.SetValue
  • PyIPropertyStoreCache.GetState
  • PyIPropertyStoreCache.GetValueAndState
  • PyIPropertyStoreCache.SetState
  • PyIPropertyStoreCache.SetValueAndState
  • PyIPropertyStoreCapabilities.IsPropertyWritable
  • PyIPropertySystem.EnumeratePropertyDescriptions
  • PyIPropertySystem.FormatForDisplay
  • PyIPropertySystem.GetPropertyDescription
  • PyIPropertySystem.GetPropertyDescriptionByName
  • PyIPropertySystem.GetPropertyDescriptionListFromString
  • PyIPropertySystem.RefreshPropertySchema
  • PyIPropertySystem.RegisterPropertySchema
  • PyIPropertySystem.UnregisterPropertySchema
  • PyIProvideClassInfo.GetClassInfo
  • PyIProvideClassInfo2.GetGUID
  • PyIProvideExpressionContexts.EnumExpressionContexts
  • PyIProvideTaskPage.GetPage
  • PyIQueryAssociations.GetKey
  • PyIQueryAssociations.GetString
  • PyIQueryAssociations.Init
  • PyIRelatedItem.GetItem
  • PyIRelatedItem.GetItemIDList
  • 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
  • PyIRunningObjectTable.Register
  • PyIRunningObjectTable.Revoke
  • PyIScheduledWorkItem.CreateTrigger
  • PyIScheduledWorkItem.DeleteTrigger
  • PyIScheduledWorkItem.EditWorkItem
  • PyIScheduledWorkItem.GetAccountInformation
  • PyIScheduledWorkItem.GetComment
  • PyIScheduledWorkItem.GetCreator
  • PyIScheduledWorkItem.GetErrorRetryCount
  • PyIScheduledWorkItem.GetErrorRetryInterval
  • PyIScheduledWorkItem.GetExitCode
  • PyIScheduledWorkItem.GetFlags
  • PyIScheduledWorkItem.GetIdleWait
  • PyIScheduledWorkItem.GetMostRecentRunTime
  • PyIScheduledWorkItem.GetNextRunTime
  • PyIScheduledWorkItem.GetRunTimes
  • PyIScheduledWorkItem.GetStatus
  • PyIScheduledWorkItem.GetTrigger
  • PyIScheduledWorkItem.GetTriggerCount
  • PyIScheduledWorkItem.GetTriggerString
  • PyIScheduledWorkItem.GetWorkItemData
  • PyIScheduledWorkItem.Run
  • PyIScheduledWorkItem.SetAccountInformation
  • PyIScheduledWorkItem.SetComment
  • PyIScheduledWorkItem.SetCreator
  • PyIScheduledWorkItem.SetErrorRetryCount
  • PyIScheduledWorkItem.SetErrorRetryInterval
  • PyIScheduledWorkItem.SetFlags
  • PyIScheduledWorkItem.SetIdleWait
  • PyIScheduledWorkItem.SetWorkItemData
  • PyIScheduledWorkItem.Terminate
  • PyIServerSecurity.ImpersonateClient
  • PyIServerSecurity.IsImpersonating
  • PyIServerSecurity.QueryBlanket
  • PyIServerSecurity.RevertToSelf
  • PyIServiceProvider.QueryService
  • PyIShellBrowser.BrowseObject
  • PyIShellBrowser.EnableModelessSB
  • PyIShellBrowser.GetControlWindow
  • PyIShellBrowser.GetViewStateStream
  • PyIShellBrowser.InsertMenusSB
  • PyIShellBrowser.OnViewWindowActive
  • PyIShellBrowser.QueryActiveShellView
  • PyIShellBrowser.RemoveMenusSB
  • PyIShellBrowser.SendControlMsg
  • PyIShellBrowser.SetMenuSB
  • PyIShellBrowser.SetStatusTextSB
  • PyIShellBrowser.SetToolbarItems
  • PyIShellBrowser.TranslateAcceleratorSB
  • PyIShellExtInit.Initialize
  • PyIShellFolder.BindToObject
  • PyIShellFolder.BindToStorage
  • PyIShellFolder.CompareIDs
  • PyIShellFolder.CreateViewObject
  • PyIShellFolder.EnumObjects
  • PyIShellFolder.GetAttributesOf
  • PyIShellFolder.GetDisplayNameOf
  • PyIShellFolder.GetUIObjectOf
  • PyIShellFolder.ParseDisplayName
  • PyIShellFolder.SetNameOf
  • PyIShellFolder2.EnumSearches
  • PyIShellFolder2.GetDefaultColumn
  • PyIShellFolder2.GetDefaultColumnState
  • PyIShellFolder2.GetDefaultSearchGUID
  • PyIShellFolder2.GetDetailsEx
  • PyIShellFolder2.GetDetailsOf
  • PyIShellFolder2.MapColumnToSCID
  • PyIShellIcon.GetIconOf
  • PyIShellIconOverlay.GetOverlayIconIndex
  • PyIShellIconOverlay.GetOverlayIndex
  • PyIShellIconOverlayIdentifier.GetOverlayInfo
  • PyIShellIconOverlayIdentifier.GetPriority
  • PyIShellIconOverlayIdentifier.IsMemberOf
  • PyIShellIconOverlayManager.GetFileOverlayInfo
  • PyIShellIconOverlayManager.GetReservedOverlayInfo
  • PyIShellIconOverlayManager.LoadNonloadedOverlayIdentifiers
  • PyIShellIconOverlayManager.OverlayIndexFromImageIndex
  • PyIShellIconOverlayManager.RefreshOverlayImages
  • PyIShellItem.BindToHandler
  • PyIShellItem.Compare
  • PyIShellItem.GetAttributes
  • PyIShellItem.GetDisplayName
  • PyIShellItem.GetParent
  • PyIShellItem2.GetBool
  • PyIShellItem2.GetCLSID
  • PyIShellItem2.GetFileTime
  • PyIShellItem2.GetInt32
  • PyIShellItem2.GetProperty
  • PyIShellItem2.GetPropertyDescriptionList
  • PyIShellItem2.GetPropertyStore
  • PyIShellItem2.GetPropertyStoreForKeys
  • PyIShellItem2.GetPropertyStoreWithCreateObject
  • PyIShellItem2.GetString
  • PyIShellItem2.GetUInt32
  • PyIShellItem2.GetUInt64
  • PyIShellItem2.Update
  • PyIShellItemArray.BindToHandler
  • PyIShellItemArray.EnumItems
  • PyIShellItemArray.GetAttributes
  • PyIShellItemArray.GetCount
  • PyIShellItemArray.GetItemAt
  • PyIShellItemArray.GetPropertyDescriptionList
  • PyIShellItemArray.GetPropertyStore
  • PyIShellItemResources.CreateResource
  • PyIShellItemResources.EnumResources
  • PyIShellItemResources.GetAttributes
  • PyIShellItemResources.GetResourceDescription
  • PyIShellItemResources.GetSize
  • PyIShellItemResources.GetTimes
  • PyIShellItemResources.MarkForDelete
  • PyIShellItemResources.OpenResource
  • PyIShellItemResources.SetTimes
  • PyIShellItemResources.SupportsResource
  • PyIShellLibrary.AddFolder
  • PyIShellLibrary.Commit
  • PyIShellLibrary.GetDefaultSaveFolder
  • PyIShellLibrary.GetFolders
  • PyIShellLibrary.GetFolderType
  • PyIShellLibrary.GetIcon
  • PyIShellLibrary.GetOptions
  • PyIShellLibrary.LoadLibraryFromItem
  • PyIShellLibrary.LoadLibraryFromKnownFolder
  • PyIShellLibrary.RemoveFolder
  • PyIShellLibrary.ResolveFolder
  • PyIShellLibrary.Save
  • PyIShellLibrary.SaveInKnownFolder
  • PyIShellLibrary.SetDefaultSaveFolder
  • PyIShellLibrary.SetFolderType
  • PyIShellLibrary.SetIcon
  • PyIShellLibrary.SetOptions
  • 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
  • PyIShellLinkDataList.AddDataBlock
  • PyIShellLinkDataList.CopyDataBlock
  • PyIShellLinkDataList.GetFlags
  • PyIShellLinkDataList.RemoveDataBlock
  • PyIShellLinkDataList.SetFlags
  • 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
  • PyITask.GetApplicationName
  • PyITask.GetMaxRunTime
  • PyITask.GetParameters
  • PyITask.GetPriority
  • PyITask.GetTaskFlags
  • PyITask.GetWorkingDirectory
  • PyITask.SetApplicationName
  • PyITask.SetMaxRunTime
  • PyITask.SetParameters
  • PyITask.SetPriority
  • PyITask.SetTaskFlags
  • PyITask.SetWorkingDirectory
  • PyITaskbarList.ActivateTab
  • PyITaskbarList.AddTab
  • PyITaskbarList.DeleteTab
  • PyITaskbarList.HrInit
  • PyITaskbarList.SetActiveAlt
  • PyITaskScheduler.Activate
  • PyITaskScheduler.AddWorkItem
  • PyITaskScheduler.Delete
  • PyITaskScheduler.Enum
  • PyITaskScheduler.GetTargetComputer
  • PyITaskScheduler.IsOfType
  • PyITaskScheduler.NewWorkItem
  • PyITaskScheduler.SetTargetComputer
  • PyITaskTrigger.GetTrigger
  • PyITaskTrigger.GetTriggerString
  • PyITaskTrigger.SetTrigger
  • PyITransferAdviseSink.ConfirmEncryptionLoss
  • PyITransferAdviseSink.ConfirmOverwrite
  • PyITransferAdviseSink.FileFailure
  • PyITransferAdviseSink.PropertyFailure
  • PyITransferAdviseSink.SubStreamFailure
  • PyITransferAdviseSink.UpdateProgress
  • PyITransferAdviseSink.UpdateTransferState
  • PyITransferDestination.Advise
  • PyITransferDestination.CreateItem
  • PyITransferDestination.Unadvise
  • PyITransferSource.Advise
  • PyITransferSource.ApplyPropertiesToItem
  • PyITransferSource.EnterFolder
  • PyITransferSource.GetDefaultDestinationName
  • PyITransferSource.LeaveFolder
  • PyITransferSource.LinkItem
  • PyITransferSource.MoveItem
  • PyITransferSource.OpenItem
  • PyITransferSource.RecycleItem
  • PyITransferSource.RemoveItem
  • PyITransferSource.RenameItem
  • PyITransferSource.SetProperties
  • PyITransferSource.Unadvise
  • 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
  • PyIUniformResourceLocator.GetURL
  • PyIUniformResourceLocator.InvokeCommand
  • PyIUniformResourceLocator.SetURL
  • PyIUnknown.__cmp__
  • PyIUnknown.QueryInterface
  • PyIViewObject.Draw
  • PyIViewObject.Freeze
  • PyIViewObject.GetAdvise
  • PyIViewObject.GetColorSet
  • PyIViewObject.SetAdvise
  • PyIViewObject.Unfreeze
  • PyIViewObject2.GetExtent
  • Pymmapfile.close
  • Pymmapfile.find
  • Pymmapfile.flush
  • Pymmapfile.move
  • Pymmapfile.read
  • Pymmapfile.read_byte
  • Pymmapfile.read_line
  • Pymmapfile.resize
  • Pymmapfile.seek
  • Pymmapfile.size
  • Pymmapfile.tell
  • Pymmapfile.write
  • Pymmapfile.write_byte
  • PyPERF_COUNTER_DEFINITION.Decrement
  • PyPERF_COUNTER_DEFINITION.Get
  • PyPERF_COUNTER_DEFINITION.Increment
  • PyPERF_COUNTER_DEFINITION.Set
  • PyPERF_OBJECT_TYPE.Close
  • PyPerfMonManager.Close
  • PyPROPVARIANT.ChangeType
  • PyPROPVARIANT.GetValue
  • PyPROPVARIANT.ToString
  • PySecBuffer.Clear
  • PySecBufferDesc.append
  • 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.SetSecurityDescriptorControl
  • PySECURITY_DESCRIPTOR.SetSecurityDescriptorDacl
  • PySECURITY_DESCRIPTOR.SetSecurityDescriptorGroup
  • PySECURITY_DESCRIPTOR.SetSecurityDescriptorOwner
  • PySECURITY_DESCRIPTOR.SetSecurityDescriptorSacl
  • 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.CoDisableCallCancellation
  • pythoncom.CoEnableCallCancellation
  • pythoncom.CoFreeUnusedLibraries
  • pythoncom.CoGetCallContext
  • pythoncom.CoGetCancelObject
  • pythoncom.CoGetInterfaceAndReleaseStream
  • pythoncom.CoGetObject
  • pythoncom.CoGetObjectContext
  • pythoncom.CoInitialize
  • pythoncom.CoInitializeEx
  • pythoncom.CoInitializeSecurity
  • pythoncom.CoMarshalInterface
  • pythoncom.CoMarshalInterThreadInterfaceInStream
  • pythoncom.Connect
  • pythoncom.CoRegisterClassObject
  • pythoncom.CoReleaseMarshalData
  • pythoncom.CoResumeClassObjects
  • pythoncom.CoRevokeClassObject
  • pythoncom.CoSetCancelObject
  • pythoncom.CoTreatAsClass
  • pythoncom.CoUninitialize
  • pythoncom.CoUnmarshalInterface
  • pythoncom.CoWaitForMultipleHandles
  • pythoncom.CreateBindCtx
  • pythoncom.CreateFileMoniker
  • pythoncom.CreateGuid
  • pythoncom.CreateILockBytesOnHGlobal
  • pythoncom.CreateItemMoniker
  • pythoncom.CreatePointerMoniker
  • pythoncom.CreateStreamOnHGlobal
  • pythoncom.CreateTypeLib
  • pythoncom.CreateTypeLib2
  • pythoncom.CreateURLMonikerEx
  • pythoncom.DoDragDrop
  • pythoncom.EnableQuitMessage
  • pythoncom.FmtIdToPropStgName
  • pythoncom.FUNCDESC
  • pythoncom.GetActiveObject
  • pythoncom.GetClassFile
  • pythoncom.GetFacilityString
  • pythoncom.GetRecordFromGuids
  • pythoncom.GetRecordFromTypeInfo
  • pythoncom.GetRunningObjectTable
  • pythoncom.GetScodeRangeString
  • pythoncom.GetScodeString
  • pythoncom.GetSeverityString
  • pythoncom.IsGatewayRegistered
  • pythoncom.LoadRegTypeLib
  • pythoncom.LoadTypeLib
  • pythoncom.MakePyFactory
  • pythoncom.MkParseDisplayName
  • pythoncom.new
  • pythoncom.ObjectFromAddress
  • pythoncom.ObjectFromLresult
  • pythoncom.OleFlushClipboard
  • pythoncom.OleGetClipboard
  • pythoncom.OleInitialize
  • pythoncom.OleIsCurrentClipboard
  • pythoncom.OleLoad
  • pythoncom.OleLoadFromStream
  • pythoncom.OleSaveToStream
  • pythoncom.OleSetClipboard
  • pythoncom.ProgIDFromCLSID
  • pythoncom.PropStgNameToFmtId
  • pythoncom.PumpMessages
  • pythoncom.PumpWaitingMessages
  • pythoncom.QueryPathOfRegTypeLib
  • pythoncom.ReadClassStg
  • pythoncom.ReadClassStm
  • pythoncom.RegisterActiveObject
  • pythoncom.RegisterDragDrop
  • pythoncom.RegisterTypeLib
  • pythoncom.RevokeActiveObject
  • pythoncom.RevokeDragDrop
  • pythoncom.StgCreateDocfile
  • pythoncom.StgCreateDocfileOnILockBytes
  • pythoncom.StgCreateStorageEx
  • pythoncom.StgIsStorageFile
  • pythoncom.STGMEDIUM
  • pythoncom.StgOpenStorage
  • pythoncom.StgOpenStorageEx
  • pythoncom.StgOpenStorageOnILockBytes
  • pythoncom.TYPEATTR
  • pythoncom.UnRegisterTypeLib
  • pythoncom.UnwrapObject
  • pythoncom.VARDESC
  • pythoncom.WrapObject
  • pythoncom.WriteClassStg
  • pythoncom.WriteClassStm
  • PyTime.__cmp__
  • PyTime.__float__
  • PyTime.__hash__
  • PyTime.__int__
  • PyTime.__nonzero__
  • PyTime.__repr__
  • PyTime.__str__
  • PyTime.Format
  • 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.TimeStamp
  • pywintypes.Unicode
  • pywintypes.UnicodeFromRaw
  • pywintypes.WAVEFORMATEX
  • PyWNDCLASS.SetDialogProc
  • 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
  • servicemanager.RunningAsService
  • servicemanager.SetEventSourceName
  • shell.AddressAsPIDL
  • shell.AssocCreate
  • shell.AssocCreateForClasses
  • shell.CIDAAsString
  • shell.DragQueryFile
  • shell.DragQueryFileW
  • shell.DragQueryPoint
  • shell.FILEGROUPDESCRIPTORAsString
  • shell.GetCurrentProcessExplicitAppUserModelID
  • shell.IsUserAnAdmin
  • shell.PIDLAsString
  • shell.SetCurrentProcessExplicitAppUserModelID
  • shell.SHAddToRecentDocs
  • shell.SHBrowseForFolder
  • shell.SHChangeNotify
  • shell.SHChangeNotifyDeregister
  • shell.SHChangeNotifyRegister
  • shell.SHCreateDataObject
  • shell.SHCreateDefaultContextMenu
  • shell.SHCreateDefaultExtractIcon
  • shell.SHCreateItemFromIDList
  • shell.SHCreateItemFromParsingName
  • shell.SHCreateItemFromRelativeName
  • shell.SHCreateItemInKnownFolder
  • shell.SHCreateItemWithParent
  • shell.SHCreateShellFolderView
  • shell.SHCreateShellItem
  • shell.SHCreateShellItemArray
  • shell.SHCreateShellItemArrayFromDataObject
  • shell.SHCreateShellItemArrayFromIDLists
  • shell.SHCreateShellItemArrayFromShellItem
  • shell.SHCreateStreamOnFileEx
  • shell.ShellExecuteEx
  • shell.SHEmptyRecycleBin
  • shell.SHFileOperation
  • shell.SHGetDesktopFolder
  • shell.SHGetFileInfo
  • shell.SHGetFolderLocation
  • shell.SHGetFolderPath
  • shell.SHGetIDListFromObject
  • shell.SHGetInstanceExplorer
  • shell.SHGetNameFromIDList
  • shell.SHGetPathFromIDList
  • shell.SHGetPathFromIDListW
  • shell.SHGetSettings
  • shell.SHGetSpecialFolderLocation
  • shell.SHGetSpecialFolderPath
  • shell.SHGetViewStatePropertyBag
  • shell.SHILCreateFromPath
  • shell.SHOpenFolderAndSelectItems
  • shell.SHParseDisplayName
  • shell.SHQueryRecycleBin
  • shell.SHSetFolderPath
  • shell.SHUpdateImage
  • shell.StringAsCIDA
  • shell.StringAsFILEGROUPDESCRIPTOR
  • shell.StringAsPIDL
  • timer.kill_timer
  • timer.set_timer
  • win2kras.PyRasGetEapUserIdentity
  • win32api.AbortSystemShutdown
  • win32api.Apply
  • win32api.Beep
  • win32api.BeginUpdateResource
  • win32api.ChangeDisplaySettings
  • win32api.ChangeDisplaySettingsEx
  • win32api.ClipCursor
  • win32api.CloseHandle
  • win32api.CopyFile
  • win32api.DebugBreak
  • win32api.DeleteFile
  • win32api.DragFinish
  • win32api.DragQueryFile
  • win32api.DuplicateHandle
  • win32api.EndUpdateResource
  • win32api.EnumDisplayDevices
  • win32api.EnumDisplayMonitors
  • win32api.EnumDisplaySettings
  • win32api.EnumDisplaySettingsEx
  • 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.GetComputerNameEx
  • win32api.GetComputerObjectName
  • win32api.GetConsoleTitle
  • win32api.GetCurrentProcess
  • win32api.GetCurrentProcessId
  • win32api.GetCurrentThread
  • win32api.GetCurrentThreadId
  • win32api.GetCursorPos
  • win32api.GetDateFormat
  • win32api.GetDiskFreeSpace
  • win32api.GetDiskFreeSpaceEx
  • win32api.GetDllDirectory
  • win32api.GetDomainName
  • win32api.GetEnvironmentVariable
  • win32api.GetEnvironmentVariableW
  • win32api.GetFileAttributes
  • win32api.GetFileVersionInfo
  • win32api.GetFocus
  • win32api.GetFullPathName
  • win32api.GetHandleInformation
  • win32api.GetKeyboardLayout
  • win32api.GetKeyboardLayoutList
  • win32api.GetKeyboardLayoutName
  • win32api.GetKeyboardState
  • win32api.GetKeyState
  • win32api.GetLastError
  • win32api.GetLastInputInfo
  • win32api.GetLocalTime
  • win32api.GetLogicalDrives
  • win32api.GetLogicalDriveStrings
  • win32api.GetLongPathName
  • win32api.GetLongPathNameW
  • win32api.GetModuleFileName
  • win32api.GetModuleFileNameW
  • win32api.GetModuleHandle
  • win32api.GetMonitorInfo
  • win32api.GetNativeSystemInfo
  • win32api.GetProcAddress
  • win32api.GetProfileSection
  • win32api.GetProfileVal
  • win32api.GetPwrCapabilities
  • win32api.GetShortPathName
  • win32api.GetStdHandle
  • win32api.GetSysColor
  • win32api.GetSystemDefaultLangID
  • win32api.GetSystemDefaultLCID
  • win32api.GetSystemDirectory
  • win32api.GetSystemFileCacheSize
  • win32api.GetSystemInfo
  • win32api.GetSystemMetrics
  • win32api.GetSystemTime
  • win32api.GetTempFileName
  • win32api.GetTempPath
  • win32api.GetThreadLocale
  • win32api.GetTickCount
  • win32api.GetTimeFormat
  • win32api.GetTimeZoneInformation
  • win32api.GetUserDefaultLangID
  • win32api.GetUserDefaultLCID
  • win32api.GetUserName
  • win32api.GetUserNameEx
  • win32api.GetVersion
  • win32api.GetVersionEx
  • win32api.GetVolumeInformation
  • win32api.GetWindowLong
  • win32api.GetWindowsDirectory
  • win32api.GlobalMemoryStatus
  • win32api.GlobalMemoryStatusEx
  • win32api.HIBYTE
  • win32api.HIWORD
  • win32api.InitiateSystemShutdown
  • win32api.keybd_event
  • win32api.LoadCursor
  • win32api.LoadKeyboardLayout
  • win32api.LoadLibrary
  • win32api.LoadLibraryEx
  • win32api.LoadResource
  • win32api.LoadString
  • win32api.LOBYTE
  • win32api.LOWORD
  • win32api.MAKELANGID
  • win32api.MAKELONG
  • win32api.MAKEWORD
  • win32api.MapVirtualKey
  • win32api.MessageBeep
  • win32api.MessageBox
  • win32api.MonitorFromPoint
  • win32api.MonitorFromRect
  • win32api.MonitorFromWindow
  • win32api.mouse_event
  • win32api.MoveFile
  • win32api.MoveFileEx
  • win32api.OpenProcess
  • win32api.OutputDebugString
  • win32api.PostMessage
  • win32api.PostQuitMessage
  • win32api.PostThreadMessage
  • win32api.RegCloseKey
  • win32api.RegConnectRegistry
  • win32api.RegCopyTree
  • win32api.RegCreateKey
  • win32api.RegCreateKeyEx
  • win32api.RegDeleteKey
  • win32api.RegDeleteKeyEx
  • win32api.RegDeleteTree
  • win32api.RegDeleteValue
  • win32api.RegEnumKey
  • win32api.RegEnumKeyEx
  • win32api.RegEnumKeyExW
  • win32api.RegEnumValue
  • win32api.RegFlushKey
  • win32api.RegGetKeySecurity
  • win32api.RegisterWindowMessage
  • win32api.RegLoadKey
  • win32api.RegNotifyChangeKeyValue
  • win32api.RegOpenCurrentUser
  • win32api.RegOpenKey
  • win32api.RegOpenKeyEx
  • win32api.RegOpenKeyTransacted
  • win32api.RegOverridePredefKey
  • win32api.RegQueryInfoKey
  • win32api.RegQueryInfoKeyW
  • win32api.RegQueryValue
  • win32api.RegQueryValueEx
  • win32api.RegRestoreKey
  • win32api.RegSaveKey
  • win32api.RegSaveKeyEx
  • win32api.RegSetKeySecurity
  • win32api.RegSetValue
  • win32api.RegSetValueEx
  • win32api.RegUnLoadKey
  • win32api.RGB
  • win32api.SearchPath
  • win32api.SendMessage
  • win32api.SetClassLong
  • win32api.SetClassWord
  • win32api.SetConsoleCtrlHandler
  • win32api.SetConsoleTitle
  • win32api.SetCursor
  • win32api.SetCursorPos
  • win32api.SetDllDirectory
  • win32api.SetEnvironmentVariable
  • win32api.SetEnvironmentVariableW
  • win32api.SetErrorMode
  • win32api.SetFileAttributes
  • win32api.SetHandleInformation
  • win32api.SetLastError
  • win32api.SetLocalTime
  • win32api.SetStdHandle
  • win32api.SetSysColors
  • win32api.SetSystemFileCacheSize
  • win32api.SetSystemPowerState
  • win32api.SetSystemTime
  • win32api.SetThreadLocale
  • win32api.SetTimeZoneInformation
  • win32api.SetWindowLong
  • win32api.SetWindowWord
  • win32api.ShellExecute
  • win32api.ShowCursor
  • win32api.Sleep
  • win32api.TerminateProcess
  • win32api.ToAsciiEx
  • win32api.Unicode
  • win32api.UpdateResource
  • win32api.VkKeyScan
  • win32api.VkKeyScanEx
  • win32api.WinExec
  • win32api.WinHelp
  • win32api.WriteProfileSection
  • win32api.WriteProfileVal
  • win32clipboard.ChangeClipboardChain
  • win32clipboard.CloseClipboard
  • win32clipboard.CountClipboardFormats
  • win32clipboard.EmptyClipboard
  • win32clipboard.EnumClipboardFormats
  • win32clipboard.GetClipboardData
  • win32clipboard.GetClipboardDataHandle
  • win32clipboard.GetClipboardFormatName
  • win32clipboard.GetClipboardOwner
  • win32clipboard.GetClipboardSequenceNumber
  • win32clipboard.GetClipboardViewer
  • win32clipboard.GetGlobalMemory
  • win32clipboard.GetOpenClipboardWindow
  • win32clipboard.GetPriorityClipboardFormat
  • win32clipboard.IsClipboardFormatAvailable
  • win32clipboard.OpenClipboard
  • win32clipboard.RegisterClipboardFormat
  • win32clipboard.SetClipboardData
  • win32clipboard.SetClipboardText
  • win32clipboard.SetClipboardViewer
  • win32console.AddConsoleAlias
  • win32console.AllocConsole
  • win32console.AttachConsole
  • win32console.CreateConsoleScreenBuffer
  • win32console.FreeConsole
  • win32console.GenerateConsoleCtrlEvent
  • win32console.GetConsoleAliases
  • win32console.GetConsoleAliasExes
  • win32console.GetConsoleCP
  • win32console.GetConsoleDisplayMode
  • win32console.GetConsoleOutputCP
  • win32console.GetConsoleProcessList
  • win32console.GetConsoleSelectionInfo
  • win32console.GetConsoleTitle
  • win32console.GetConsoleWindow
  • win32console.GetNumberOfConsoleFonts
  • win32console.GetStdHandle
  • win32console.SetConsoleCP
  • win32console.SetConsoleOutputCP
  • win32console.SetConsoleTitle
  • win32cred.CredDelete
  • win32cred.CredEnumerate
  • win32cred.CredGetTargetInfo
  • win32cred.CredIsMarshaledCredential
  • win32cred.CredMarshalCredential
  • win32cred.CredRead
  • win32cred.CredReadDomainCredentials
  • win32cred.CredRename
  • win32cred.CredUICmdLinePromptForCredentials
  • win32cred.CredUIConfirmCredentials
  • win32cred.CredUIParseUserName
  • win32cred.CredUIPromptForCredentials
  • win32cred.CredUIReadSSOCredW
  • win32cred.CredUIStoreSSOCredW
  • win32cred.CredUnmarshalCredential
  • win32cred.CredWrite
  • win32cred.CredWriteDomainCredentials
  • win32crypt.CertAddSerializedElementToStore
  • win32crypt.CertAlgIdToOID
  • win32crypt.CertEnumPhysicalStore
  • win32crypt.CertEnumSystemStore
  • win32crypt.CertEnumSystemStoreLocation
  • win32crypt.CertNameToStr
  • win32crypt.CertOIDToAlgId
  • win32crypt.CertOpenStore
  • win32crypt.CertOpenSystemStore
  • win32crypt.CertRegisterSystemStore
  • win32crypt.CertUnregisterSystemStore
  • win32crypt.CryptAcquireContext
  • win32crypt.CryptBinaryToString
  • win32crypt.CryptDecodeMessage
  • win32crypt.CryptDecodeObjectEx
  • win32crypt.CryptDecryptAndVerifyMessageSignature
  • win32crypt.CryptDecryptMessage
  • win32crypt.CryptEncodeObjectEx
  • win32crypt.CryptEncryptMessage
  • win32crypt.CryptEnumKeyIdentifierProperties
  • win32crypt.CryptEnumOIDInfo
  • win32crypt.CryptEnumProviders
  • win32crypt.CryptEnumProviderTypes
  • win32crypt.CryptFindLocalizedName
  • win32crypt.CryptFindOIDInfo
  • win32crypt.CryptFormatObject
  • win32crypt.CryptGetDefaultProvider
  • win32crypt.CryptGetKeyIdentifierProperty
  • win32crypt.CryptGetMessageCertificates
  • win32crypt.CryptGetMessageSignerCount
  • win32crypt.CryptProtectData
  • win32crypt.CryptQueryObject
  • win32crypt.CryptSetProviderEx
  • win32crypt.CryptSignAndEncryptMessage
  • win32crypt.CryptSignMessage
  • win32crypt.CryptStringToBinary
  • win32crypt.CryptUnprotectData
  • win32crypt.CryptVerifyDetachedMessageSignature
  • win32crypt.CryptVerifyMessageSignature
  • win32crypt.PFXImportCertStore
  • win32crypt.PFXIsPFXBlob
  • win32crypt.PFXVerifyPassword
  • win32event.CancelWaitableTimer
  • win32event.CreateEvent
  • win32event.CreateMutex
  • win32event.CreateSemaphore
  • win32event.CreateWaitableTimer
  • win32event.MsgWaitForMultipleObjects
  • win32event.MsgWaitForMultipleObjectsEx
  • win32event.OpenEvent
  • win32event.OpenMutex
  • win32event.OpenSemaphore
  • win32event.OpenWaitableTimer
  • win32event.PulseEvent
  • win32event.ReleaseMutex
  • win32event.ReleaseSemaphore
  • win32event.ResetEvent
  • win32event.SetEvent
  • win32event.SetWaitableTimer
  • win32event.WaitForInputIdle
  • win32event.WaitForMultipleObjects
  • win32event.WaitForMultipleObjectsEx
  • win32event.WaitForSingleObject
  • win32event.WaitForSingleObjectEx
  • win32evtlog.BackupEventLog
  • win32evtlog.ClearEventLog
  • win32evtlog.CloseEventLog
  • win32evtlog.DeregisterEventSource
  • win32evtlog.EvtArchiveExportedLog
  • win32evtlog.EvtClearLog
  • win32evtlog.EvtCreateBookmark
  • win32evtlog.EvtExportLog
  • win32evtlog.EvtGetChannelConfigProperty
  • win32evtlog.EvtGetEventInfo
  • win32evtlog.EvtGetEventMetadataProperty
  • win32evtlog.EvtGetExtendedStatus
  • win32evtlog.EvtGetLogInfo
  • win32evtlog.EvtGetObjectArrayProperty
  • win32evtlog.EvtGetObjectArraySize
  • win32evtlog.EvtGetPublisherMetadataProperty
  • win32evtlog.EvtNext
  • win32evtlog.EvtNextChannelPath
  • win32evtlog.EvtNextEventMetadata
  • win32evtlog.EvtNextPublisherId
  • win32evtlog.EvtOpenChannelConfig
  • win32evtlog.EvtOpenChannelEnum
  • win32evtlog.EvtOpenEventMetadataEnum
  • win32evtlog.EvtOpenLog
  • win32evtlog.EvtOpenPublisherEnum
  • win32evtlog.EvtOpenPublisherMetadata
  • win32evtlog.EvtOpenSession
  • win32evtlog.EvtQuery
  • win32evtlog.EvtRender
  • win32evtlog.EvtSeek
  • win32evtlog.EvtSubscribe
  • win32evtlog.EvtUpdateBookmark
  • win32evtlog.GetNumberOfEventLogRecords
  • win32evtlog.GetOldestEventLogRecord
  • win32evtlog.NotifyChangeEventLog
  • win32evtlog.OpenBackupEventLog
  • win32evtlog.OpenEventLog
  • win32evtlog.ReadEventLog
  • win32evtlog.RegisterEventSource
  • win32evtlog.ReportEvent
  • win32file._get_osfhandle
  • win32file._getmaxstdio
  • win32file._open_osfhandle
  • win32file._setmaxstdio
  • win32file.AcceptEx
  • win32file.AddUsersToEncryptedFile
  • win32file.AllocateReadBuffer
  • win32file.AreFileApisANSI
  • win32file.BackupRead
  • win32file.BackupSeek
  • win32file.BackupWrite
  • win32file.BuildCommDCB
  • win32file.CalculateSocketEndPointSize
  • win32file.CancelIo
  • win32file.ClearCommBreak
  • win32file.ClearCommError
  • win32file.CloseEncryptedFileRaw
  • win32file.CloseHandle
  • win32file.COMSTAT
  • win32file.ConnectEx
  • win32file.CopyFile
  • win32file.CopyFileEx
  • win32file.CopyFileW
  • win32file.CreateDirectory
  • win32file.CreateDirectoryEx
  • win32file.CreateDirectoryExW
  • win32file.CreateDirectoryW
  • win32file.CreateFile
  • win32file.CreateFileW
  • win32file.CreateHardLink
  • win32file.CreateIoCompletionPort
  • win32file.CreateMailslot
  • win32file.CreateSymbolicLink
  • win32file.DCB
  • win32file.DecryptFile
  • win32file.DefineDosDevice
  • win32file.DefineDosDeviceW
  • win32file.DeleteFile
  • win32file.DeleteFileW
  • win32file.DeleteVolumeMountPoint
  • win32file.DeviceIoControl
  • win32file.DuplicateEncryptionInfoFile
  • win32file.EncryptFile
  • win32file.EncryptionDisable
  • win32file.EscapeCommFunction
  • win32file.FILE_NOTIFY_INFORMATION
  • win32file.FileEncryptionStatus
  • win32file.FindClose
  • win32file.FindCloseChangeNotification
  • win32file.FindFileNames
  • win32file.FindFilesIterator
  • win32file.FindFilesW
  • win32file.FindFirstChangeNotification
  • win32file.FindNextChangeNotification
  • win32file.FindStreams
  • 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.GetFileAttributesW
  • win32file.GetFileInformationByHandle
  • win32file.GetFileInformationByHandleEx
  • win32file.GetFileSize
  • win32file.GetFileTime
  • win32file.GetFileType
  • win32file.GetFinalPathNameByHandle
  • win32file.GetFullPathName
  • win32file.GetLogicalDrives
  • win32file.GetLongPathName
  • win32file.GetMailslotInfo
  • win32file.GetOverlappedResult
  • win32file.GetQueuedCompletionStatus
  • win32file.GetVolumeNameForVolumeMountPoint
  • win32file.GetVolumePathName
  • win32file.GetVolumePathNamesForVolumeName
  • win32file.LockFile
  • win32file.LockFileEx
  • win32file.MoveFile
  • win32file.MoveFileEx
  • win32file.MoveFileExW
  • win32file.MoveFileW
  • win32file.MoveFileWithProgress
  • win32file.OpenEncryptedFileRaw
  • win32file.OpenFileById
  • win32file.PostQueuedCompletionStatus
  • win32file.PurgeComm
  • win32file.QueryDosDevice
  • win32file.QueryRecoveryAgentsOnEncryptedFile
  • win32file.QueryUsersOnEncryptedFile
  • win32file.ReadDirectoryChangesW
  • win32file.ReadEncryptedFileRaw
  • win32file.ReadFile
  • win32file.RemoveDirectory
  • win32file.RemoveUsersFromEncryptedFile
  • win32file.ReOpenFile
  • win32file.ReplaceFile
  • win32file.SetCommBreak
  • win32file.SetCommMask
  • win32file.SetCommState
  • win32file.SetCommTimeouts
  • win32file.SetCurrentDirectory
  • win32file.SetEndOfFile
  • win32file.SetFileApisToANSI
  • win32file.SetFileApisToOEM
  • win32file.SetFileAttributes
  • win32file.SetFileAttributesW
  • win32file.SetFileInformationByHandle
  • win32file.SetFilePointer
  • win32file.SetFileShortName
  • win32file.SetFileTime
  • win32file.SetMailslotInfo
  • win32file.SetupComm
  • win32file.SetVolumeLabel
  • win32file.SetVolumeMountPoint
  • win32file.SfcGetNextProtectedFile
  • win32file.SfcIsFileProtected
  • win32file.TransmitCommChar
  • win32file.TransmitFile
  • win32file.UnlockFile
  • win32file.UnlockFileEx
  • win32file.WaitCommEvent
  • win32file.Wow64DisableWow64FsRedirection
  • win32file.Wow64RevertWow64FsRedirection
  • win32file.WriteEncryptedFileRaw
  • win32file.WriteFile
  • win32file.WSAAsyncSelect
  • win32file.WSAEnumNetworkEvents
  • win32file.WSAEventSelect
  • win32file.WSARecv
  • win32file.WSASend
  • win32gui._TrackMouseEvent
  • win32gui.AbortPath
  • win32gui.AlphaBlend
  • win32gui.AngleArc
  • win32gui.AnimateWindow
  • win32gui.AppendMenu
  • win32gui.Arc
  • win32gui.ArcTo
  • win32gui.BeginPaint
  • win32gui.BeginPath
  • win32gui.BitBlt
  • win32gui.BringWindowToTop
  • win32gui.CallWindowProc
  • win32gui.CheckMenuItem
  • win32gui.CheckMenuRadioItem
  • win32gui.ChildWindowFromPoint
  • win32gui.ChildWindowFromPoint
  • win32gui.Chord
  • win32gui.ClientToScreen
  • win32gui.CloseFigure
  • win32gui.CloseWindow
  • win32gui.CombineRgn
  • win32gui.CombineTransform
  • win32gui.CommDlgExtendedError
  • win32gui.CopyIcon
  • win32gui.CreateAcceleratorTable
  • win32gui.CreateBitmap
  • win32gui.CreateBrushIndirect
  • win32gui.CreateCaret
  • win32gui.CreateCompatibleBitmap
  • win32gui.CreateCompatibleDC
  • win32gui.CreateDC
  • win32gui.CreateDialogIndirect
  • win32gui.CreateEllipticRgnIndirect
  • win32gui.CreateFontIndirect
  • win32gui.CreateHatchBrush
  • win32gui.CreateIconFromResource
  • win32gui.CreateIconIndirect
  • win32gui.CreateMenu
  • win32gui.CreatePatternBrush
  • win32gui.CreatePen
  • win32gui.CreatePolygonRgn
  • win32gui.CreatePopupMenu
  • win32gui.CreateRectRgnIndirect
  • win32gui.CreateRoundRectRgn
  • win32gui.CreateSolidBrush
  • win32gui.CreateWindow
  • win32gui.CreateWindowEx
  • win32gui.DefWindowProc
  • win32gui.DeleteDC
  • win32gui.DeleteMenu
  • win32gui.DeleteObject
  • win32gui.DestroyAccleratorTable
  • win32gui.DestroyCaret
  • win32gui.DestroyIcon
  • win32gui.DestroyMenu
  • win32gui.DestroyWindow
  • win32gui.DialogBox
  • win32gui.DialogBoxIndirect
  • win32gui.DialogBoxIndirectParam
  • win32gui.DialogBoxIndirectParam
  • win32gui.DialogBoxParam
  • win32gui.DispatchMessage
  • win32gui.DragAcceptFiles
  • win32gui.DragDetect
  • win32gui.DrawAnimatedRects
  • win32gui.DrawEdge
  • win32gui.DrawFocusRect
  • win32gui.DrawIcon
  • win32gui.DrawIconEx
  • win32gui.DrawMenuBar
  • win32gui.DrawText
  • win32gui.DrawTextW
  • win32gui.Ellipse
  • win32gui.EnableMenuItem
  • win32gui.EnableWindow
  • win32gui.EndDialog
  • win32gui.EndPaint
  • win32gui.EndPath
  • win32gui.EnumChildWindows
  • win32gui.EnumFontFamilies
  • win32gui.EnumPropsEx
  • win32gui.EnumThreadWindows
  • win32gui.EnumWindows
  • win32gui.EqualRgn
  • win32gui.ExtCreatePen
  • win32gui.ExtFloodFill
  • win32gui.ExtractIcon
  • win32gui.ExtractIconEx
  • win32gui.ExtTextOut
  • win32gui.FillPath
  • win32gui.FillRect
  • win32gui.FillRgn
  • win32gui.FindWindow
  • win32gui.FindWindowEx
  • win32gui.FlashWindow
  • win32gui.FlashWindowEx
  • win32gui.FlattenPath
  • win32gui.FrameRect
  • win32gui.FrameRgn
  • win32gui.GetActiveWindow
  • win32gui.GetArcDirection
  • win32gui.GetBkColor
  • win32gui.GetBkMode
  • win32gui.GetCapture
  • win32gui.GetCaretPos
  • win32gui.GetClassLong
  • win32gui.GetClassName
  • win32gui.GetClientRect
  • win32gui.GetCurrentObject
  • win32gui.GetCurrentPositionEx
  • win32gui.GetCursor
  • win32gui.GetCursorInfo
  • win32gui.GetCursorPos
  • win32gui.GetDC
  • win32gui.GetDesktopWindow
  • win32gui.GetDlgCtrlID
  • win32gui.GetDlgItem
  • win32gui.GetDlgItemInt
  • win32gui.GetDlgItemText
  • win32gui.GetDoubleClickTime
  • win32gui.GetFocus
  • win32gui.GetForegroundWindow
  • win32gui.GetGraphicsMode
  • win32gui.GetIconInfo
  • win32gui.GetLayeredWindowAttributes
  • win32gui.GetLayout
  • win32gui.GetMapMode
  • win32gui.GetMenu
  • win32gui.GetMenuDefaultItem
  • win32gui.GetMenuInfo
  • win32gui.GetMenuItemCount
  • win32gui.GetMenuItemID
  • win32gui.GetMenuItemInfo
  • win32gui.GetMenuItemRect
  • win32gui.GetMenuState
  • win32gui.GetMessage
  • win32gui.GetMiterLimit
  • win32gui.GetNextDlgGroupItem
  • win32gui.GetNextDlgTabItem
  • win32gui.GetObject
  • win32gui.GetObjectType
  • win32gui.GetOpenFileName
  • win32gui.GetOpenFileNameW
  • win32gui.GetParent
  • win32gui.GetPath
  • win32gui.GetPixel
  • win32gui.GetPolyFillMode
  • win32gui.GetRgnBox
  • win32gui.GetROP2
  • win32gui.GetSaveFileNameW
  • win32gui.GetScrollInfo
  • win32gui.GetStockObject
  • win32gui.GetStretchBltMode
  • win32gui.GetSubMenu
  • win32gui.GetSysColor
  • win32gui.GetSysColorBrush
  • win32gui.GetSystemMenu
  • win32gui.GetTextAlign
  • win32gui.GetTextCharacterExtra
  • win32gui.GetTextColor
  • win32gui.GetTextExtentPoint32
  • win32gui.GetTextFace
  • win32gui.GetTextMetrics
  • win32gui.GetUpdateRgn
  • win32gui.GetViewportExtEx
  • win32gui.GetViewportOrgEx
  • win32gui.GetWindow
  • win32gui.GetWindowDC
  • win32gui.GetWindowExtEx
  • win32gui.GetWindowLong
  • win32gui.GetWindowOrgEx
  • win32gui.GetWindowPlacement
  • win32gui.GetWindowRect
  • win32gui.GetWindowRgn
  • win32gui.GetWindowRgnBox
  • win32gui.GetWindowText
  • win32gui.GetWorldTransform
  • win32gui.GradientFill
  • win32gui.HideCaret
  • win32gui.ImageList_Add
  • win32gui.ImageList_Create
  • win32gui.ImageList_Destroy
  • win32gui.ImageList_Draw
  • win32gui.ImageList_DrawEx
  • 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.ImageList_SetOverlayImage
  • win32gui.InitCommonControls
  • win32gui.InitCommonControlsEx
  • win32gui.InsertMenu
  • win32gui.InsertMenuItem
  • win32gui.InvalidateRect
  • win32gui.InvalidateRgn
  • win32gui.InvertRect
  • win32gui.InvertRgn
  • win32gui.IsChild
  • win32gui.IsIconic
  • win32gui.IsWindow
  • win32gui.IsWindowEnabled
  • win32gui.IsWindowVisible
  • win32gui.LineTo
  • win32gui.ListView_SortItems
  • win32gui.ListView_SortItemsEx
  • win32gui.LoadCursor
  • win32gui.LoadIcon
  • win32gui.LoadImage
  • win32gui.LoadMenu
  • win32gui.LOGFONT
  • win32gui.MaskBlt
  • win32gui.MessageBeep
  • win32gui.MessageBox
  • win32gui.ModifyMenu
  • win32gui.ModifyWorldTransform
  • win32gui.MoveToEx
  • win32gui.MoveWindow
  • win32gui.OffsetRgn
  • win32gui.PaintDesktop
  • win32gui.PaintRgn
  • win32gui.PatBlt
  • win32gui.PathToRegion
  • win32gui.PeekMessage
  • win32gui.Pie
  • win32gui.PlgBlt
  • win32gui.PolyBezier
  • win32gui.PolyBezierTo
  • win32gui.Polygon
  • win32gui.Polyline
  • win32gui.PolylineTo
  • win32gui.PostMessage
  • win32gui.PostQuitMessage
  • win32gui.PostThreadMessage
  • win32gui.PtInRect
  • win32gui.PtInRegion
  • win32gui.PumpMessages
  • win32gui.PumpWaitingMessages
  • win32gui.PyGetArraySignedLong
  • win32gui.PyGetBufferAddressAndLen
  • win32gui.PyGetMemory
  • win32gui.PyGetString
  • win32gui.PySetMemory
  • win32gui.PySetString
  • win32gui.Rectangle
  • win32gui.RectInRegion
  • win32gui.RedrawWindow
  • win32gui.RegisterClass
  • win32gui.RegisterDeviceNotification
  • win32gui.RegisterHotKey
  • win32gui.RegisterWindowMessage
  • win32gui.ReleaseCapture
  • win32gui.ReleaseDC
  • win32gui.RemoveMenu
  • win32gui.ReplyMessage
  • win32gui.RestoreDC
  • win32gui.RoundRect
  • win32gui.SaveDC
  • win32gui.ScreenToClient
  • win32gui.ScrollWindowEx
  • win32gui.SelectObject
  • win32gui.SendMessage
  • win32gui.SendMessageTimeout
  • win32gui.set_logger
  • win32gui.SetActiveWindow
  • win32gui.SetArcDirection
  • win32gui.SetBkColor
  • win32gui.SetBkMode
  • win32gui.SetCapture
  • win32gui.SetCaretPos
  • win32gui.SetCursor
  • win32gui.SetDlgItemInt
  • win32gui.SetDlgItemText
  • win32gui.SetDoubleClickTime
  • win32gui.SetFocus
  • win32gui.SetForegroundWindow
  • win32gui.SetGraphicsMode
  • win32gui.SetLayeredWindowAttributes
  • win32gui.SetLayout
  • win32gui.SetMapMode
  • win32gui.SetMenu
  • win32gui.SetMenuDefaultItem
  • win32gui.SetMenuInfo
  • win32gui.SetMenuItemBitmaps
  • win32gui.SetMenuItemInfo
  • win32gui.SetMiterLimit
  • win32gui.SetParent
  • win32gui.SetPixel
  • win32gui.SetPixelV
  • win32gui.SetPolyFillMode
  • win32gui.SetRectRgn
  • win32gui.SetROP2
  • win32gui.SetScrollInfo
  • win32gui.SetStretchBltMode
  • win32gui.SetTextAlign
  • win32gui.SetTextCharacterExtra
  • win32gui.SetTextColor
  • win32gui.SetViewportExtEx
  • win32gui.SetViewportOrgEx
  • win32gui.SetWindowExtEx
  • win32gui.SetWindowLong
  • win32gui.SetWindowOrgEx
  • win32gui.SetWindowPlacement
  • win32gui.SetWindowPos
  • win32gui.SetWindowRgn
  • win32gui.SetWindowText
  • win32gui.SetWorldTransform
  • win32gui.Shell_NotifyIcon
  • win32gui.ShowCaret
  • win32gui.ShowWindow
  • win32gui.StretchBlt
  • win32gui.StrokeAndFillPath
  • win32gui.StrokePath
  • win32gui.SystemParametersInfo
  • win32gui.TrackPopupMenu
  • win32gui.TranslateAccelerator
  • win32gui.TranslateMessage
  • win32gui.TransparentBlt
  • win32gui.UnregisterClass
  • win32gui.UnregisterDeviceNotification
  • win32gui.UpdateLayeredWindow
  • win32gui.UpdateWindow
  • win32gui.ValidateRgn
  • win32gui.WaitMessage
  • win32gui.WidenPath
  • win32gui.WindowFromDC
  • win32gui.WindowFromPoint
  • win32help.HH_AKLINK
  • win32help.HH_FTS_QUERY
  • win32help.HH_POPUP
  • win32help.HH_WINTYPE
  • win32help.HHN_NOTIFY
  • win32help.HHNTRACK
  • win32help.HtmlHelp
  • win32help.NMHDR
  • win32help.WinHelp
  • win32inet.CommitUrlCacheEntry
  • win32inet.CreateUrlCacheEntry
  • win32inet.CreateUrlCacheGroup
  • win32inet.DeleteUrlCacheEntry
  • win32inet.DeleteUrlCacheGroup
  • win32inet.FindCloseUrlCache
  • win32inet.FindFirstUrlCacheEntry
  • win32inet.FindFirstUrlCacheEntryEx
  • win32inet.FindFirstUrlCacheGroup
  • win32inet.FindNextUrlCacheEntry
  • win32inet.FindNextUrlCacheEntryEx
  • win32inet.FindNextUrlCacheGroup
  • win32inet.FtpCommand
  • win32inet.FtpOpenFile
  • win32inet.GetUrlCacheEntryInfo
  • win32inet.GetUrlCacheGroupAttribute
  • win32inet.InternetAttemptConnect
  • win32inet.InternetCanonicalizeUrl
  • win32inet.InternetCheckConnection
  • win32inet.InternetCloseHandle
  • win32inet.InternetConnect
  • win32inet.InternetGetCookie
  • win32inet.InternetGetLastResponseInfo
  • win32inet.InternetGoOnline
  • win32inet.InternetOpen
  • win32inet.InternetOpenUrl
  • win32inet.InternetQueryOption
  • win32inet.InternetReadFile
  • win32inet.InternetSetCookie
  • win32inet.InternetSetOption
  • win32inet.InternetWriteFile
  • win32inet.SetUrlCacheEntryGroup
  • win32inet.SetUrlCacheGroupAttribute
  • win32inet.WinHttpGetDefaultProxyConfiguration
  • win32inet.WinHttpGetIEProxyConfigForCurrentUser
  • win32inet.WinHttpGetProxyForUrl
  • win32inet.WinHttpOpen
  • win32job.AssignProcessToJobObject
  • win32job.CreateJobObject
  • win32job.IsProcessInJob
  • win32job.OpenJobObject
  • win32job.QueryInformationJobObject
  • win32job.SetInformationJobObject
  • win32job.TerminateJobObject
  • win32job.UserHandleGrantAccess
  • win32lz.Close
  • win32lz.Copy
  • win32lz.GetExpandedName
  • win32lz.Init
  • win32lz.OpenFile
  • win32net.NetFileClose
  • win32net.NetFileEnum
  • win32net.NetFileGetInfo
  • win32net.NetGetAnyDCName
  • win32net.NetGetDCName
  • win32net.NetGetJoinInformation
  • 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.NetMessageNameAdd
  • win32net.NetMessageNameDel
  • win32net.NetMessageNameEnum
  • win32net.NetServerComputerNameAdd
  • win32net.NetServerComputerNameDel
  • win32net.NetServerDiskEnum
  • win32net.NetServerEnum
  • win32net.NetServerGetInfo
  • win32net.NetServerSetInfo
  • win32net.NetSessionDel
  • win32net.NetSessionEnum
  • win32net.NetSessionGetInfo
  • win32net.NetShareAdd
  • win32net.NetShareCheck
  • win32net.NetShareDel
  • win32net.NetShareEnum
  • win32net.NetShareGetInfo
  • win32net.NetShareSetInfo
  • win32net.NetStatisticsGet
  • 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.NetUserModalsSet
  • win32net.NetUserSetInfo
  • win32net.NetValidateName
  • win32net.NetValidatePasswordPolicy
  • win32net.NetWkstaGetInfo
  • win32net.NetWkstaSetInfo
  • win32net.NetWkstaTransportAdd
  • win32net.NetWkstaTransportDel
  • win32net.NetWkstaTransportEnum
  • win32net.NetWkstaUserEnum
  • win32pdh.AddCounter
  • win32pdh.AddEnglishCounter
  • win32pdh.BrowseCounters
  • win32pdh.CloseQuery
  • win32pdh.CollectQueryData
  • win32pdh.ConnectMachine
  • win32pdh.EnumObjectItems
  • win32pdh.EnumObjects
  • win32pdh.ExpandCounterPath
  • win32pdh.GetCounterInfo
  • win32pdh.GetFormattedCounterArray
  • 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.GetNamedPipeClientProcessId
  • win32pipe.GetNamedPipeClientSessionId
  • win32pipe.GetNamedPipeHandleState
  • win32pipe.GetNamedPipeInfo
  • win32pipe.GetNamedPipeServerProcessId
  • win32pipe.GetNamedPipeServerSessionId
  • win32pipe.GetOverlappedResult
  • win32pipe.PeekNamedPipe
  • win32pipe.popen
  • win32pipe.popen2
  • win32pipe.popen3
  • win32pipe.popen4
  • win32pipe.SetNamedPipeHandleState
  • win32pipe.TransactNamedPipe
  • win32pipe.WaitNamedPipe
  • win32print.AbortDoc
  • win32print.AbortPrinter
  • win32print.AddForm
  • win32print.AddJob
  • win32print.AddPrinter
  • win32print.AddPrinterConnection
  • win32print.ClosePrinter
  • win32print.DeleteForm
  • win32print.DeletePrinter
  • win32print.DeletePrinterConnection
  • win32print.DeletePrinterDriver
  • win32print.DeletePrinterDriverEx
  • win32print.DeviceCapabilities
  • win32print.DocumentProperties
  • win32print.EndDoc
  • win32print.EndDocPrinter
  • win32print.EndPage
  • win32print.EndPagePrinter
  • win32print.EnumForms
  • win32print.EnumJobs
  • win32print.EnumMonitors
  • win32print.EnumPorts
  • win32print.EnumPrinterDrivers
  • win32print.EnumPrinters
  • win32print.EnumPrintProcessorDatatypes
  • win32print.EnumPrintProcessors
  • win32print.FlushPrinter
  • win32print.GetDefaultPrinter
  • win32print.GetDefaultPrinterW
  • win32print.GetDeviceCaps
  • win32print.GetForm
  • win32print.GetJob
  • win32print.GetPrinter
  • win32print.GetPrinterDriverDirectory
  • win32print.GetPrintProcessorDirectory
  • win32print.OpenPrinter
  • win32print.ScheduleJob
  • win32print.SetDefaultPrinter
  • win32print.SetDefaultPrinterW
  • win32print.SetForm
  • win32print.SetJob
  • win32print.SetPrinter
  • win32print.StartDoc
  • win32print.StartDocPrinter
  • win32print.StartPage
  • win32print.StartPagePrinter
  • win32print.WritePrinter
  • win32process.AttachThreadInput
  • win32process.beginthreadex
  • win32process.CreateProcess
  • win32process.CreateProcessAsUser
  • win32process.CreateRemoteThread
  • win32process.EnumProcesses
  • win32process.EnumProcessModules
  • win32process.EnumProcessModulesEx
  • win32process.ExitProcess
  • win32process.GetCurrentProcess
  • win32process.GetCurrentProcessId
  • win32process.GetExitCodeProcess
  • win32process.GetExitCodeThread
  • win32process.GetGuiResources
  • win32process.GetModuleFileNameEx
  • win32process.GetPriorityClass
  • win32process.GetProcessAffinityMask
  • win32process.GetProcessId
  • win32process.GetProcessIoCounters
  • win32process.GetProcessMemoryInfo
  • win32process.GetProcessPriorityBoost
  • win32process.GetProcessShutdownParameters
  • win32process.GetProcessTimes
  • win32process.GetProcessVersion
  • win32process.GetProcessWindowStation
  • win32process.GetProcessWorkingSetSize
  • win32process.GetStartupInfo
  • win32process.GetThreadIOPendingFlag
  • win32process.GetThreadPriority
  • win32process.GetThreadPriorityBoost
  • win32process.GetThreadTimes
  • win32process.GetWindowThreadProcessId
  • win32process.IsWow64Process
  • win32process.ResumeThread
  • win32process.SetPriorityClass
  • win32process.SetProcessAffinityMask
  • win32process.SetProcessPriorityBoost
  • win32process.SetProcessShutdownParameters
  • win32process.SetProcessWorkingSetSize
  • win32process.SetThreadAffinityMask
  • win32process.SetThreadIdealProcessor
  • win32process.SetThreadPriority
  • win32process.SetThreadPriorityBoost
  • win32process.STARTUPINFO
  • win32process.SuspendThread
  • win32process.TerminateProcess
  • win32profile.CreateEnvironmentBlock
  • win32profile.DeleteProfile
  • win32profile.ExpandEnvironmentStringsForUser
  • win32profile.GetAllUsersProfileDirectory
  • win32profile.GetDefaultUserProfileDirectory
  • win32profile.GetEnvironmentStrings
  • win32profile.GetProfilesDirectory
  • win32profile.GetProfileType
  • win32profile.GetUserProfileDirectory
  • win32profile.LoadUserProfile
  • win32profile.UnloadUserProfile
  • win32ras.CreatePhonebookEntry
  • win32ras.Dial
  • win32ras.EditPhonebookEntry
  • win32ras.EnumConnections
  • win32ras.EnumEntries
  • win32ras.GetConnectStatus
  • win32ras.GetEntryDialParams
  • win32ras.GetErrorString
  • win32ras.HangUp
  • win32ras.IsHandleValid
  • win32ras.SetEntryDialParams
  • win32security.AcceptSecurityContext
  • win32security.ACL
  • win32security.AcquireCredentialsHandle
  • win32security.AdjustTokenGroups
  • win32security.AdjustTokenPrivileges
  • win32security.AllocateLocallyUniqueId
  • win32security.CheckTokenMembership
  • win32security.ConvertSecurityDescriptorToStringSecurityDescriptor
  • win32security.ConvertSidToStringSid
  • win32security.ConvertStringSecurityDescriptorToSecurityDescriptor
  • win32security.ConvertStringSidToSid
  • win32security.CreateRestrictedToken
  • win32security.CreateWellKnownSid
  • win32security.CryptEnumProviders
  • win32security.DsBind
  • win32security.DsCrackNames
  • win32security.DsGetDcName
  • win32security.DsGetSpn
  • win32security.DsListDomainsInSite
  • win32security.DsListInfoForServer
  • win32security.DsListRoles
  • win32security.DsListServersInSite
  • win32security.DsListServersInSite
  • win32security.DsListServersInSite
  • win32security.DsUnBind
  • win32security.DsWriteAccountSpn
  • win32security.DuplicateToken
  • win32security.DuplicateTokenEx
  • win32security.EnumerateSecurityPackages
  • win32security.GetBinarySid
  • win32security.GetFileSecurity
  • win32security.GetKernelObjectSecurity
  • win32security.GetNamedSecurityInfo
  • win32security.GetSecurityInfo
  • win32security.GetTokenInformation
  • win32security.GetUserObjectSecurity
  • win32security.ImpersonateAnonymousToken
  • win32security.ImpersonateLoggedOnUser
  • win32security.ImpersonateNamedPipeClient
  • win32security.ImpersonateSelf
  • win32security.InitializeSecurityContext
  • win32security.IsTokenRestricted
  • win32security.LogonUser
  • win32security.LogonUserEx
  • win32security.LookupAccountName
  • win32security.LookupAccountSid
  • win32security.LookupPrivilegeDisplayName
  • win32security.LookupPrivilegeName
  • win32security.LookupPrivilegeValue
  • win32security.LsaAddAccountRights
  • win32security.LsaCallAuthenticationPackage
  • win32security.LsaClose
  • win32security.LsaConnectUntrusted
  • win32security.LsaDeregisterLogonProcess
  • win32security.LsaEnumerateAccountRights
  • win32security.LsaEnumerateAccountsWithUserRight
  • win32security.LsaEnumerateLogonSessions
  • win32security.LsaGetLogonSessionData
  • win32security.LsaLookupAuthenticationPackage
  • win32security.LsaOpenPolicy
  • win32security.LsaQueryInformationPolicy
  • win32security.LsaRegisterLogonProcess
  • win32security.LsaRegisterPolicyChangeNotification
  • win32security.LsaRemoveAccountRights
  • win32security.LsaRetrievePrivateData
  • win32security.LsaSetInformationPolicy
  • win32security.LsaStorePrivateData
  • win32security.LsaUnregisterPolicyChangeNotification
  • win32security.MapGenericMask
  • win32security.OpenProcessToken
  • win32security.OpenThreadToken
  • win32security.QuerySecurityPackageInfo
  • win32security.RevertToSelf
  • win32security.SECURITY_ATTRIBUTES
  • win32security.SECURITY_DESCRIPTOR
  • win32security.SetFileSecurity
  • win32security.SetKernelObjectSecurity
  • win32security.SetNamedSecurityInfo
  • win32security.SetSecurityInfo
  • win32security.SetThreadToken
  • win32security.SetTokenInformation
  • win32security.SetUserObjectSecurity
  • win32security.SID
  • win32security.TranslateName
  • win32service.ChangeServiceConfig
  • win32service.ChangeServiceConfig2
  • win32service.CloseServiceHandle
  • win32service.ControlService
  • win32service.CreateDesktop
  • win32service.CreateService
  • win32service.CreateWindowStation
  • win32service.DeleteService
  • win32service.EnumDependentServices
  • win32service.EnumServicesStatus
  • win32service.EnumServicesStatusEx
  • win32service.EnumWindowStations
  • win32service.GetProcessWindowStation
  • win32service.GetServiceDisplayName
  • win32service.GetServiceKeyName
  • win32service.GetThreadDesktop
  • win32service.GetUserObjectInformation
  • win32service.LockServiceDatabase
  • win32service.OpenDesktop
  • win32service.OpenInputDesktop
  • win32service.OpenSCManager
  • win32service.OpenService
  • win32service.OpenWindowStation
  • win32service.QueryServiceConfig
  • win32service.QueryServiceConfig2
  • win32service.QueryServiceLockStatus
  • win32service.QueryServiceObjectSecurity
  • win32service.QueryServiceStatus
  • win32service.QueryServiceStatusEx
  • win32service.SetServiceObjectSecurity
  • win32service.SetServiceStatus
  • win32service.SetUserObjectInformation
  • win32service.StartService
  • win32service.UnlockServiceDatabase
  • win32timezone.GetTZCapabilities
  • win32timezone.now
  • win32timezone.RangeMap.get
  • win32timezone.RangeMap.get
  • win32timezone.resolveMUITimeZone
  • win32timezone.TimeZoneDefinition.current
  • win32timezone.TimeZoneDefinition.current
  • win32timezone.TimeZoneInfo.dst
  • win32timezone.TimeZoneInfo.dst
  • win32timezone.TimeZoneInfo.get_sorted_time_zone_names
  • win32timezone.TimeZoneInfo.get_sorted_time_zone_names
  • win32timezone.TimeZoneInfo.get_sorted_time_zones
  • win32timezone.TimeZoneInfo.get_sorted_time_zones
  • win32timezone.TimeZoneInfo.GetDSTEndTime
  • win32timezone.TimeZoneInfo.GetDSTEndTime
  • win32timezone.TimeZoneInfo.GetDSTStartTime
  • win32timezone.TimeZoneInfo.GetDSTStartTime
  • win32timezone.TimeZoneInfo.getWinInfo
  • win32timezone.TimeZoneInfo.getWinInfo
  • win32timezone.TimeZoneInfo.local
  • win32timezone.TimeZoneInfo.local
  • win32timezone.TimeZoneInfo.utc
  • win32timezone.TimeZoneInfo.utc
  • win32timezone.TimeZoneInfo.utcoffset
  • win32timezone.TimeZoneInfo.utcoffset
  • win32timezone.utcnow
  • win32transaction.CommitTransaction
  • win32transaction.CommitTransactionAsync
  • win32transaction.CreateTransaction
  • win32transaction.GetTransactionId
  • win32transaction.OpenTransaction
  • win32transaction.RollbackTransaction
  • win32transaction.RollbackTransactionAsync
  • win32ts.ProcessIdToSessionId
  • win32ts.WTSCloseServer
  • win32ts.WTSDisconnectSession
  • win32ts.WTSEnumerateProcesses
  • win32ts.WTSEnumerateServers
  • win32ts.WTSEnumerateSessions
  • win32ts.WTSGetActiveConsoleSessionId
  • win32ts.WTSLogoffSession
  • win32ts.WTSOpenServer
  • win32ts.WTSQuerySessionInformation
  • win32ts.WTSQueryUserConfig
  • win32ts.WTSQueryUserToken
  • win32ts.WTSRegisterSessionNotification
  • win32ts.WTSSendMessage
  • win32ts.WTSSetUserConfig
  • win32ts.WTSShutdownSystem
  • win32ts.WTSTerminateProcess
  • win32ts.WTSUnRegisterSessionNotification
  • win32ts.WTSWaitSystemEvent
  • 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.DisplayTraceback
  • 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.AfxOleInit
  • win32uiole.CreateInsertDialog
  • win32uiole.CreateOleClientItem
  • win32uiole.CreateOleDocument
  • win32uiole.DaoGetEngine
  • win32uiole.EnableBusyDialog
  • win32uiole.EnableNotRespondingDialog
  • win32uiole.GetIDispatchForWindow
  • win32uiole.OleGetUserCtrl
  • win32uiole.OleSetUserCtrl
  • win32uiole.SetMessagePendingDelay
  • win32wnet.NCBBuffer
  • win32wnet.Netbios
  • win32wnet.WNetAddConnection2
  • win32wnet.WNetAddConnection3
  • win32wnet.WNetCancelConnection2
  • win32wnet.WNetCloseEnum
  • win32wnet.WNetEnumResource
  • win32wnet.WNetGetConnection
  • win32wnet.WNetGetLastError
  • win32wnet.WNetGetResourceInformation
  • win32wnet.WNetGetResourceParent
  • 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
  • PyIUnknown::__repr__
  • win32ras::RasDialFunc1


Objects and Module Properties

Object and Module Properties

  • pythoncom.dcom
  • pythoncom.frozen


Objects

  • CHARFORMAT
  • com_error
  • COMMTIMEOUTS
  • COMPONENT
  • COMPONENTSOPT
  • COMPPOS
  • COMPSTATEINFO
  • connection
  • CopyProgressRoutine
  • CREATESTRUCT
  • cursor
  • DEFCONTENTMENU
  • DOCINFO
  • ELEMDESC
  • error
  • EXP_DARWIN_LINK
  • EXP_SPECIAL_FOLDER
  • EXP_SZ_LINK
  • ExportCallback
  • EXTENSION_CONTROL_BLOCK
  • FORM_INFO_1
  • FUNCDESC
  • HSE_VERSION_INFO
  • HTTP_FILTER_AUTHENT
  • HTTP_FILTER_CONTEXT
  • HTTP_FILTER_LOG
  • HTTP_FILTER_PREPROC_HEADERS
  • HTTP_FILTER_RAW_DATA
  • HTTP_FILTER_URL_MAP
  • HTTP_FILTER_VERSION
  • IDLDESC
  • ImportCallback
  • isapi.simple.SimpleExtension
  • isapi.simple.SimpleFilter
  • isapi.threaded_extension.ThreadPoolExtension
  • LARGE_INTEGER
  • LV_COLUMN
  • LV_ITEM
  • MAPIINIT_0
  • NCB
  • NT_CONSOLE_PROPS
  • NT_FE_CONSOLE_PROPS
  • PARAFORMAT
  • PRINTER_DEFAULTS
  • PROPSPEC
  • PyACL
  • PyADS_ATTR_INFO
  • PyADS_OBJECT_INFO
  • PyADS_SEARCHPREF_INFO
  • PyADSVALUE
  • PyAssocCObject
  • PyAssocObject
  • PyBIND_OPTS
  • PyBITMAP
  • PyBLENDFUNCTION
  • PyCBitmap
  • PyCBrush
  • PyCButton
  • PyCCmdTarget
  • PyCCmdUI
  • PyCColorDialog
  • PyCComboBox
  • PyCCommonDialog
  • PyCControl
  • PyCControlBar
  • PyCCtrlView
  • PyCDC
  • PyCDialog
  • PyCDialogBar
  • PyCDockContext
  • PyCDocTemplate
  • PyCDocument
  • PyCEdit
  • PyCEditView
  • PyCEHANDLE
  • PyCERT_ALT_NAME_ENTRY
  • PyCERT_ALT_NAME_INFO
  • PyCERT_AUTHORITY_KEY_ID_INFO
  • PyCERT_BASIC_CONSTRAINTS2_INFO
  • PyCERT_BASIC_CONSTRAINTS_INFO
  • PyCERT_CONTEXT
  • PyCERT_EXTENSION
  • PyCERT_KEY_ATTRIBUTES_INFO
  • PyCERT_NAME_INFO
  • PyCERT_NAME_VALUE
  • PyCERT_OTHER_NAME
  • PyCERT_POLICY_INFO
  • PyCERT_PUBLIC_KEY_INFO
  • PyCERTSTORE
  • PyCFileDialog
  • PyCFont
  • PyCFontDialog
  • PyCFormView
  • PyCFrameWnd
  • PyCGdiObject
  • PyCImageList
  • PyCListBox
  • PyCListCtrl
  • PyCListView
  • PyCMDIChildWnd
  • PyCMDIFrameWnd
  • PyCMenu
  • PyCMINVOKECOMMANDINFO
  • PyCOleClientItem
  • PyCOleDialog
  • PyCOleDocument
  • PyCOleInsertDialog
  • PyCOMSTAT
  • PyConsoleScreenBuffer
  • PyCOORD
  • PyCPrintDialog
  • PyCPrintInfo
  • PyCProgressCtrl
  • PyCPropertyPage
  • PyCPropertySheet
  • PyCRect
  • PyCREDENTIAL
  • PyCREDENTIAL_ATTRIBUTE
  • PyCREDENTIAL_TARGET_INFORMATION
  • PyCredHandle
  • PyCREDUI_INFO
  • PyCRgn
  • PyCRichEditCtrl
  • PyCRichEditDoc
  • PyCRichEditDocTemplate
  • PyCRichEditView
  • PyCRYPT_ALGORITHM_IDENTIFIER
  • PyCRYPT_ATTRIBUTE
  • PyCRYPT_BIT_BLOB
  • PyCRYPT_DECRYPT_MESSAGE_PARA
  • PyCRYPT_ENCRYPT_MESSAGE_PARA
  • PyCRYPT_SIGN_MESSAGE_PARA
  • PyCRYPT_VERIFY_MESSAGE_PARA
  • PyCRYPTHASH
  • PyCRYPTKEY
  • PyCRYPTMSG
  • PyCRYPTPROTECT_PROMPTSTRUCT
  • PyCRYPTPROV
  • PyCScrollView
  • PyCSliderCtrl
  • PyCSpinButtonCtrl
  • PyCSplitterWnd
  • PyCStatusBar
  • PyCStatusBarCtrl
  • PyCTabCtrl
  • PyCTL_CONTEXT
  • PyCTL_USAGE
  • PyCToolBar
  • PyCToolBarCtrl
  • PyCToolTipCtrl
  • PyCTreeCtrl
  • PyCTreeView
  • PyCtxtHandle
  • PyCView
  • PyCWinApp
  • PyCWinThread
  • PyCWnd
  • PyDateTime
  • PyDCB
  • PyDDEConv
  • PyDDEServer
  • PyDDEStringItem
  • PyDDETopic
  • PyDEVMODE
  • PyDEVMODEW
  • PyDialogTemplate
  • PyDISPLAY_DEVICE
  • PyDLGITEMTEMPLATE
  • PyDLGTEMPLATE
  • PyDLL
  • PyDS_HANDLE
  • PyDS_NAME_RESULT_ITEM
  • PyDSBCAPS
  • PyDSBUFFERDESC
  • PyDSCAPS
  • PyDSCBCAPS
  • PyDSCBUFFERDESC
  • PyDSCCAPS
  • PyDSOP_FILTER_FLAGS
  • PyDSOP_SCOPE_INIT_INFO
  • PyDSOP_SCOPE_INIT_INFOs
  • PyDSOP_UPLEVEL_FILTER_FLAGS
  • PyEventLogRecord
  • PyEVT_HANDLE
  • PyEVT_RPC_LOGIN
  • PyEVTLOG_HANDLE
  • PyFORMATETC
  • PyGdiHANDLE
  • PyGetSignerCertificate
  • PyGFileOperationProgressSink
  • 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
  • PyGSecurityInformation
  • PyHANDLE
  • PyHDESK
  • PyHDEVNOTIFY
  • PyHH_AKLINK
  • PyHH_FTS_QUERY
  • PyHH_POPUP
  • PyHH_WINTYPE
  • PyHHN_NOTIFY
  • PyHHNTRACK
  • PyHINTERNET
  • PyHKEY
  • PyHTHEME
  • PyHWINSTA
  • PyIActiveDesktop
  • PyIActiveDesktopP
  • PyIActiveScriptDebug
  • PyIActiveScriptError
  • PyIActiveScriptErrorDebug
  • PyIActiveScriptParseProcedure
  • PyIActiveScriptSite
  • PyIActiveScriptSiteDebug
  • PyIAddrBook
  • PyIADesktopP2
  • PyIADs
  • PyIADsContainer
  • PyIADsUser
  • PyIApplicationDebugger
  • PyIApplicationDestinations
  • PyIApplicationDocumentLists
  • PyIAsyncOperation
  • PyIAttach
  • PyIBindCtx
  • PyIBrowserFrameOptions
  • PyICancelMethodCalls
  • PyICategoryProvider
  • PyICatInformation
  • PyICatRegister
  • PyIClassFactory
  • PyIClientSecurity
  • PyIColumnProvider
  • PyICONINFO
  • PyIConnectionPoint
  • PyIConnectionPointContainer
  • PyIContext
  • PyIContextMenu
  • PyICopyHookA
  • PyICopyHookW
  • PyICreateTypeInfo
  • PyICreateTypeLib
  • PyICreateTypeLib2
  • PyICurrentItem
  • PyICustomDestinationList
  • 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
  • PyIDefaultExtractIconInit
  • PyIDirectoryObject
  • PyIDirectorySearch
  • PyIDirectSound
  • PyIDirectSoundBuffer
  • PyIDirectSoundCapture
  • PyIDirectSoundCaptureBuffer
  • PyIDirectSoundNotify
  • PyIDispatch
  • PyIDispatchEx
  • PyIDisplayItem
  • PyIDL
  • PyIDocHostUIHandler
  • PyIDropSource
  • PyIDropTarget
  • PyIDropTargetHelper
  • PyIDsObjectPicker
  • PyIEmptyVolumeCache
  • PyIEmptyVolumeCache2
  • PyIEmptyVolumeCacheCallBack
  • PyIEnumCATEGORYINFO
  • PyIEnumConnectionPoints
  • PyIEnumConnections
  • PyIEnumContextProps
  • PyIEnumDebugApplicationNodes
  • PyIEnumDebugCodeContexts
  • PyIEnumDebugExpressionContexts
  • PyIEnumDebugPropertyInfo
  • PyIEnumDebugStackFrames
  • PyIEnumExplorerCommand
  • PyIEnumFORMATETC
  • PyIEnumGUID
  • PyIEnumIDList
  • PyIEnumMoniker
  • PyIEnumObjects
  • PyIEnumRemoteDebugApplications
  • PyIEnumRemoteDebugApplicationThreads
  • PyIEnumResources
  • PyIEnumShellItems
  • PyIEnumSTATPROPSETSTG
  • PyIEnumSTATPROPSTG
  • PyIEnumSTATSTG
  • PyIEnumString
  • PyIErrorLog
  • PyIExplorerBrowser
  • PyIExplorerBrowserEvents
  • PyIExplorerCommand
  • PyIExplorerCommandProvider
  • PyIExplorerPaneVisibility
  • PyIExternalConnection
  • PyIExtractIcon
  • PyIExtractIconW
  • PyIExtractImage
  • PyIFileOperation
  • PyIID
  • PyIIdentityName
  • PyIInitializeWithFile
  • PyIInitializeWithStream
  • PyIInputObject
  • PyIInternetBindInfo
  • PyIInternetPriority
  • PyIInternetProtocol
  • PyIInternetProtocolInfo
  • PyIInternetProtocolRoot
  • PyIInternetProtocolSink
  • PyIInternetSecurityManager
  • PyIKnownFolder
  • PyIKnownFolderManager
  • PyILockBytes
  • PyIMachineDebugManager
  • PyIMachineDebugManagerEvents
  • PyIMAPIContainer
  • PyIMAPIFolder
  • PyIMAPIProp
  • PyIMAPISession
  • PyIMAPIStatus
  • PyIMAPITable
  • PyIMessage
  • PyIMoniker
  • PyIMsgServiceAdmin
  • PyIMsgStore
  • PyINamedPropertyStore
  • PyINameSpaceTreeControl
  • PyINPUT_RECORD
  • PyIObjectArray
  • PyIObjectCollection
  • PyIObjectWithPropertyKey
  • PyIObjectWithSite
  • PyIOleClientSite
  • PyIOleCommandTarget
  • PyIOleControl
  • PyIOleControlSite
  • PyIOleInPlaceActiveObject
  • PyIOleInPlaceFrame
  • PyIOleInPlaceObject
  • PyIOleInPlaceSite
  • PyIOleInPlaceSiteEx
  • PyIOleInPlaceSiteWindowless
  • PyIOleInPlaceUIWindow
  • PyIOleObject
  • PyIOleWindow
  • PyIPersist
  • PyIPersistFile
  • PyIPersistFolder
  • PyIPersistFolder2
  • PyIPersistPropertyBag
  • PyIPersistSerializedPropStorage
  • PyIPersistStorage
  • PyIPersistStream
  • PyIPersistStreamInit
  • PyIProcessDebugManager
  • PyIProfAdmin
  • PyIPropertyBag
  • PyIPropertyChange
  • PyIPropertyChangeArray
  • PyIPropertyDescription
  • PyIPropertyDescriptionAliasInfo
  • PyIPropertyDescriptionList
  • PyIPropertyDescriptionSearchInfo
  • PyIPropertyEnumType
  • PyIPropertyEnumTypeList
  • PyIPropertySetStorage
  • PyIPropertyStorage
  • PyIPropertyStore
  • PyIPropertyStoreCache
  • PyIPropertyStoreCapabilities
  • PyIPropertySystem
  • PyIProvideClassInfo
  • PyIProvideClassInfo2
  • PyIProvideExpressionContexts
  • PyIProvideTaskPage
  • PyIQueryAssociations
  • PyIRelatedItem
  • PyIRemoteDebugApplication
  • PyIRemoteDebugApplicationEvents
  • PyIRemoteDebugApplicationThread
  • PyIRunningObjectTable
  • PyIScheduledWorkItem
  • PyIServerSecurity
  • PyIServiceProvider
  • PyIShellBrowser
  • PyIShellExtInit
  • PyIShellFolder
  • PyIShellFolder2
  • PyIShellIcon
  • PyIShellIconOverlay
  • PyIShellIconOverlayIdentifier
  • PyIShellIconOverlayManager
  • PyIShellItem
  • PyIShellItem2
  • PyIShellItemArray
  • PyIShellItemResources
  • PyIShellLibrary
  • PyIShellLink
  • PyIShellLinkDataList
  • PyIShellView
  • PyISpecifyPropertyPages
  • PyIStorage
  • PyIStream
  • PyITask
  • PyITaskbarList
  • PyITaskScheduler
  • PyITaskTrigger
  • PyITransferAdviseSink
  • PyITransferDestination
  • PyITransferMediumItem
  • PyITransferSource
  • PyITypeComp
  • PyITypeInfo
  • PyITypeLib
  • PyIUniformResourceLocator
  • 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
  • PyLOGBRUSH
  • PyLOGFONT
  • PyLSA_HANDLE
  • PyLsaLogon_HANDLE
  • PyLUID_AND_ATTRIBUTES
  • PyMAPINAMEIDArray
  • Pymmapfile
  • PyMSG
  • PyNET_VALIDATE_AUTHENTICATION_INPUT_ARG
  • PyNET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG
  • PyNET_VALIDATE_PERSISTED_FIELDS
  • PyNETRESOURCE
  • PyNMHDR
  • PyNOTIFYICONDATA
  • PyOLEMENUGROUPWIDTHS
  • PyOVERLAPPED
  • PyOVERLAPPEDReadBuffer
  • PyPERF_COUNTER_DEFINITION
  • PyPERF_OBJECT_TYPE
  • PyPerfMonManager
  • PyPOINT
  • PyPrinterHANDLE
  • PyPROFILEINFO
  • PyPROPERTYKEY
  • PyPROPVARIANT
  • PyRECT
  • PyResourceId
  • PySAndRestriction
  • PySBinaryArray
  • PySBitMaskRestriction
  • PySC_HANDLE
  • PySContentRestriction
  • PySCROLLINFO
  • PySecBuffer
  • PySecBufferDesc
  • 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
  • PySHELL_ITEM_RESOURCE
  • PySID
  • PySID_AND_ATTRIBUTES
  • PySIZE
  • PySMALL_RECT
  • PySNotRestriction
  • PySOrRestriction
  • PySPropertyRestriction
  • PySPropTagArray
  • PySPropValue
  • PySPropValueArray
  • PySRestriction
  • PySRow
  • PySRowSet
  • PySSortOrderItem
  • PySSortOrderSet
  • PySTARTUPINFO
  • PySTGMEDIUM
  • PyTASK_TRIGGER
  • PyTime
  • PyTOKEN_GROUPS
  • PyTOKEN_PRIVILEGES
  • PyTRIVERTEX
  • PyTRUSTEE
  • PyTS_HANDLE
  • PyUnicode
  • PyUrlCacheHANDLE
  • 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_INFO_4
  • PyUSER_MODALS_INFO_*
  • PyUSER_MODALS_INFO_0
  • PyUSER_MODALS_INFO_1
  • PyUSER_MODALS_INFO_2
  • PyUSER_MODALS_INFO_3
  • PyWAVEFORMATEX
  • PyWINHTTP_AUTOPROXY_OPTIONS
  • PyWINHTTP_PROXY_INFO
  • 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
  • PyXFORM
  • RASDIALEXTENSIONS
  • RASDIALPARAMS
  • RTF_WCSINFO
  • SC_ACTION
  • SCROLLINFO tuple
  • SERVICE_FAILURE_ACTIONS
  • SERVICE_STATUS
  • SHFILEINFO
  • SHFILEOPSTRUCT
  • SI_ACCESS
  • SI_INHERIT_TYPE
  • SI_OBJECT_INFO
  • sspi.ClientAuth
  • sspi.ServerAuth
  • STATSTG
  • TLIBATTR
  • TRACKMOUSEEVENT
  • TV_ITEM
  • TYPEATTR
  • TYPEDESC
  • ULARGE_INTEGER
  • VARDESC
  • WIN32_FIND_DATA
  • win32timezone.RangeMap
  • win32timezone.TimeZoneDefinition
  • win32timezone.TimeZoneInfo


Overviews

  • ASP and Python
  • DirectSound examples
  • 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
  • Important notes about COM currency support changes
  • win32com documentation index
  • win32com readme

    Pythonwin and win32ui

  • Pythonwin Debugger documentation
  • Pythonwin readme
  • The Pythonwin environment

    ISAPI filters and extensions

  • Introduction to Python ISAPI support


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


PyIEmptyVolumeCache.Deactivate

Deactivate()


PyIEmptyVolumeCache.GetSpaceUsed

GetSpaceUsed()


PyIEmptyVolumeCache.Initialize

Initialize()


PyIEmptyVolumeCache.Purge

Purge()


PyIEmptyVolumeCache.ShowProperties

ShowProperties()


PyIPersistFolder.Initialize

Initialize(pidl)

Description of Initialize.

Parameters

pidl : PyIDL

Description for pidl


PyIProvideClassInfo.GetClassInfo

PyITypeInfo = GetClassInfo()

Gets information about the CO_CLASS.


PyIShellFolder.BindToObject

PyIShellFolder = BindToObject(pidl, pbc , riid )

Returns an IShellFolder interface for a subfolder

Parameters

pidl : PyIDL

Relative item id list that identifies the subfolder, can be multi-level

pbc : PyIBindCtx

Bind context to be used, can be None

riid : PyIID

IID of the desired interface, usually IID_IShellFolder


PyIShellFolder.BindToStorage

interface = BindToStorage(pidl, pbc , riid )

Returns an interface to a storage object in a shell folder

Parameters

pidl : PyIDL

Relative pidl for the folder item, must be a single item id

pbc : PyIBindCtx

Bind context that affects how binding is performed, can be None

riid : PyIID

IID of the desired interface, one of IID_IStream, IID_IStorage, IID_IPropertySetStorage

Return Value

Returns PyIStream, PyIStorage or PyIPropertySetStorage depending on the riid passed in


PyIShellFolder.CompareIDs

int = CompareIDs(lparam, pidl1 , pidl2 )

Determines the sorting order of 2 items in shell folder

Parameters

lparam : int

Lower 16 bits specify folder-dependent sorting rules, 0 means to sort by display name. System folder view uses these as a column number.
Upper sixteen bits is used for flags SHCIDS_ALLFIELDS or SHCIDS_CANONICALONLY

pidl1 : PyIDL

Item id list that idenfies an object relative to the folder

pidl2 : PyIDL

Item id list that idenfies an object relative to the folder

Return Value

Returns 0 if items compare equal, -1 if the pidl1 comes first, or 1 if pidl2 comes first


PyIShellFolder.CreateViewObject

PyIShellView = CreateViewObject(hwndOwner, riid )

Creates a view object for a shell folder.

Parameters

hwndOwner : HWND

Parent window for a custom folder view, or 0

riid : PyIID

IID of the desired interface, usually IID_IShellView


PyIShellFolder.EnumObjects

PyIEnumIDList = EnumObjects(hwndOwner, grfFlags )

Creates an enumerator to list the contents of the shell folder

Parameters

hwndOwner=None : PyHANDLE

Window to use if any user interaction is required

grfFlags=SHCONTF_FOLDERS|SHCONTF_NONFOLDERS|SHCONTF_INCLUDEHIDDEN : int

Combination of shellcon.SHCONTF_* constants


PyIShellFolder.GetAttributesOf

int = GetAttributesOf(pidl, rgfInOut )

Queries attributes of items within the shell folder

Parameters

pidl : (PyIDL,...)

A sequence of single-level pidls identifying items directly contained by the folder

rgfInOut : int

Combination of shellcon.SFGAO_* constants

Return Value

The requested attributes are only returned if they are common to all of the specified items


PyIShellFolder.GetDisplayNameOf

str = GetDisplayNameOf(pidl, uFlags )

Returns the display name of an item within this shell folder

Parameters

pidl : PyIDL

PIDL that identifies the item relative to the parent folder

uFlags : int

Combination of shellcon.SHGDN_* flags


PyIShellFolder.GetUIObjectOf

int, PyIUnknown = GetUIObjectOf(hwndOwner, pidl , riid , Reserved , iidout )

Creates an interface to one or more items in a shell folder

Parameters

hwndOwner : PyHANDLE

Specifies a window in which to display any required dialogs or errors, can be 0

pidl : (PyIDL,...)

A sequence of single-level pidls identifying items in the folder

riid : PyIID

The interface to create, one of IID_IContextMenu, IID_IContextMenu2, IID_IDataObject, IID_IDropTarget, IID_IExtractIcon, IID_IQueryInfo

Reserved=0 : int

Reserved, use 0 if passed in

iidout=riid : PyIID

The interface to return. Can be used in the case where there is not a python wrapper for the desired interface. You must make certain that the interface identified by riid actually supports the iidout interface, or Bad Things Will Happen. It should always be safe to return PyIUnknown, which is the base for all interfaces.

Return Value

Returns the Reserved parameter and the requested interface


PyIShellFolder.ParseDisplayName

tuple = ParseDisplayName(hwndOwner, pbc , DisplayName , Attributes )

Returns the PIDL of an item in a shell folder

Parameters

hwndOwner : PyHANDLE

Window in which to display any dialogs or message boxes, can be 0

pbc : PyIBindCtx

Bind context that affects how parsing is performed, can be None

DisplayName : str

Display name to parse, format is dependent on the shell folder. Desktop folder will accept a file path, as well as guids of the form ::{guid} Example: '::%s\\::%s' %(shell.CLSID_MyComputer,shell.CLSID_ControlPanel)

Attributes=0 : int

Combination of shellcon.SFGAO_* constants specifying which attributes should be returned

Return Value

The result is a tuple of cchEaten, pidl, attr

Items

[0] int : cchEaten

the number of characters of the input name that were parsed

[1] PyIDL : pidl

specifies the relative path from the parsing folder to the object

[2] int : Attributes

returns any requested attributes


PyIShellFolder.SetNameOf

PyIDL = SetNameOf(hwndOwner, pidl , Name , Flags )

Sets the display name of an item and changes its PIDL

Parameters

hwndOwner : HWND

Window in which to display any message boxes or dialogs, can be 0

pidl : PyIDL

PIDL that identifies the item relative to the parent folder

Name : str

New name for the item

Flags : int

Combination of shellcon.SHGDM_* values

Return Value

Returns the new PIDL for item


PyIShellItem.BindToHandler

interface = BindToHandler(pbc, bhid , riid )

Creates an instance of one of the item's handlers

Parameters

pbc : PyIBindCtx

Used to pass parameters that influence the binding operation, can be None

bhid : PyIID

GUID that identifies a handler (shell.BHID_*)

riid : PyIID

The interface to return


PyIShellItem.Compare

int = Compare(psi, hint )

Compares another shell item with this item

Parameters

psi : PyIShellItem

A shell item to be compared with this item

hint : int

shellcon.SICHINT_* value indicating how the comparison is to be performed

Return Value

Returns 0 if items compare as equal, nonzero otherwise


PyIShellItem.GetAttributes

int = GetAttributes(Mask)

Returns shell attributes of the item

Parameters

Mask : int

Combination of shellcon.SFGAO_* values indicating the flags to return

Return Value

Returns a combination of shellcon.SFGAO_* values


PyIShellItem.GetDisplayName

str = GetDisplayName(sigdnName)

Returns the display name of the item in the specified format

Parameters

sigdnName : int

Format of name to return, shellcon.SIGDN_*


PyIShellItem.GetParent

PyIShellItem = GetParent()

Retrieves the parent of this item


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


pythoncom.CreateURLMonikerEx

PyIMoniker = CreateURLMonikerEx(Context, URL , Flags )

Create a URL moniker from a full url or partial url and base moniker

Parameters

Context : PyIMoniker

An IMoniker interface to be used as a base with a partial URL, can be None

URL : PyUNICODE

Full or partial url for which to create a moniker

Flags=URL_MK_UNIFORM : int

URL_MK_UNIFORM or URL_MK_LEGACY

Win32 API References

Search for CreateURLMonikerEx at msdn, google or google groups.


pywintypes.TimeStamp

PyTime = TimeStamp(timestamp)

Creates a new time object.

Parameters

timestamp : int

An integer timestamp representation.


sspi

Module sspi

Helper classes for SSPI authentication via the win32security module.

Comments

SSPI authentication involves a token-exchange "dance", the exact details of which depends on the authentication provider used. There are also a number of complex flags and constants that need to be used - in most cases, there are reasonable defaults.

These classes attempt to hide these details from you until you really need to know. They are not designed to handle all cases, just the common ones. If you need finer control than offered here, just use the win32security functions directly.

Classes

ClientAuth
Manages the client side of an SSPI authentication handshake

ServerAuth
Manages the server side of an SSPI authentication handshake


sspi.ClientAuth

sspi.ClientAuth Object

Manages the client side of an SSPI authentication handshake


sspi.ServerAuth

sspi.ServerAuth Object

Manages the server side of an SSPI authentication handshake


Structures and Enums

Structures and enumerations


win32api.MapVirtualKey

int = MapVirtualKey(vk, type , hlayout )

Translates (maps) a virtual-key code into a scan code or character value, or translates a scan code into a virtual-key code.

Parameters

vk : int

The virtual key code.

type : int

The type of conversion to make - see the API

hlayout=None : handle

The keyboard layout to use. If not specified, the API function MapVirtualKey will be called. If it is specified MapVirtualKeyEx will be called.

Comments

implemented by calling the unicode versions of the API (MapVirtualKeyW/MapVirtualKeyExW)


win32api.VkKeyScanEx

int = VkKeyScanEx(char, hkl )

Translates a character to the corresponding virtual-key code and shift state.

Parameters

char : string or unicode

A byte or unicode string of length 1. If a byte string is passed VkKeyScanExA will be called, otherwise VkKeyScanExW will be called.

hkl : PyHANDLE

Handle to a keyboard layout at returned by win32api::LoadKeyboardLayout

Win32 API References

Search for VkKeyScanExA at msdn, google or google groups.

Search for VkKeyScanExW at msdn, google or google groups.


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 )


win32file.COMSTAT

PyCOMSTAT = COMSTAT()

Creates a new COMSTAT object


win32file.DCB

PyDCB = DCB()

Creates a new DCB object


win32inet.WinHttpGetDefaultProxyConfiguration

PyWINHTTP_PROXY_INFO = WinHttpGetDefaultProxyConfiguration()

Retrieves the default WinHTTP proxy configuration from the registry.


win32inet.WinHttpGetIEProxyConfigForCurrentUser

tuple = WinHttpGetIEProxyConfigForCurrentUser()

Obtains the Internet Explorer proxy configuration for the current user.

Win32 API References

Search for WinHttpGetIEProxyConfigForCurrentUser at msdn, google or google groups.

Search for WINHTTP_CURRENT_USER_IE_PROXY_CONFIG at msdn, google or google groups.

Return Value

The result is a windows WINHTTP_CURRENT_USER_IE_PROXY_CONFIG structure; a tuple of an int (bool) and 3 unicode strings (fAutoDetect, lpszAutoConfigUrl, lpszProxy, lpszProxyBypass).


win32inet.WinHttpGetProxyForUrl

PyWINHTTP_PROXY_INFO = WinHttpGetProxyForUrl(handle, url , options )

Obtains the Internet Explorer proxy configuration for the specified URL.

Parameters

handle : HANDLE /int

url : unicode/string

options : PyWINHTTP_AUTOPROXY_OPTIONS


win32inet.WinHttpOpen

PyHINTERNET = WinHttpOpen(lpszUserAgent, dwAccessType , lpszProxyName , lpszProxyBypass , dwFlags )

Opens a winhttp session.

Parameters

lpszUserAgent : string

dwAccessType : int

lpszProxyName : string

lpszProxyBypass : string

dwFlags : int

Win32 API References

Search for WinHttpOpen at msdn, google or google groups.


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

Search for NetLocalGroupAdd at msdn, google or google groups.


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

Search for NetLocalGroupDel at msdn, google or google groups.


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

Search for NetLocalGroupEnum at msdn, google or google groups.

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 new "resume handle". The first time you call this function, you should pass zero for the resume handle. If more data is available than what was returned, a new non-zero resume handle will be returned, which can be used to call the function again to fetch more data. This process may repeat, each time with a new resume handle, until zero is returned for the new handle, indicating all the data has been read.


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

Search for NetLocalGroupGetInfo at msdn, google or google groups.

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

Search for NetLocalGroupSetInfo at msdn, google or google groups.


win32pdh.GetFormattedCounterArray

dictionary = GetFormattedCounterArray(handle, format )

Retrieves an array of formatted counter values

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


win32ras::RasDialFunc1

win32ras::RasDialFunc1 method

RasDialFunc1()

A placeholder for a RAS callback.

Defined in: O:/SRC/PYWIN32/WIN32/SRC/WIN32RASMODULE.CPP

Comments

Certain RAS function require a callback function to be passed. This description describes the signature of the function you pass to these functions. handle to RAS connection type of event that has occurred connection state about to be entered error that may have occurred extended error information for some errors

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


win32timezone

Module win32timezone

win32timezone: Module for handling datetime.tzinfo time zones using the windows registry for time zone information. The time zone names are dependent on the registry entries defined by the operating system.

Comments

This module may be tested using the doctest module.

Written by Jason R. Coombs (jaraco@jaraco.com). Copyright Â© 2003-2012. All Rights Reserved.

This module is licenced for use in Mark Hammond's pywin32 library under the same terms as the pywin32 library.

To use this time zone module with the datetime module, simply pass the TimeZoneInfo object to the datetime constructor. For example,

>>> import win32timezone, datetime

>>> assert 'Mountain Standard Time' in win32timezone.TimeZoneInfo.get_sorted_time_zone_names()

>>> MST = win32timezone.TimeZoneInfo('Mountain Standard Time')

>>> now = datetime.datetime.now(MST)
The now object is now a time-zone aware object, and daylight savings- aware methods may be called on it.

>>> now.utcoffset() in (datetime.timedelta(-1, 61200), datetime.timedelta(-1, 64800))

True
(note that the result of utcoffset call will be different based on when now was generated, unless standard time is always used)

>>> now = datetime.datetime.now(TimeZoneInfo('Mountain Standard Time', True))

>>> now.utcoffset()

datetime.timedelta(-1, 61200)

>>> aug2 = datetime.datetime(2003, 8, 2, tzinfo = MST)

>>> tuple(aug2.utctimetuple())

(2003, 8, 2, 6, 0, 0, 5, 214, 0)

>>> nov2 = datetime.datetime(2003, 11, 25, tzinfo = MST)

>>> tuple(nov2.utctimetuple())

(2003, 11, 25, 7, 0, 0, 1, 329, 0)
To convert from one timezone to another, just use the astimezone method.

>>> aug2.isoformat()

'2003-08-02T00:00:00-06:00'

>>> aug2est = aug2.astimezone(win32timezone.TimeZoneInfo('Eastern Standard Time'))

>>> aug2est.isoformat()

'2003-08-02T02:00:00-04:00'
calling the displayName member will return the display name as set in the registry.

>>> est = win32timezone.TimeZoneInfo('Eastern Standard Time')

>>> str(est.displayName)

'(UTC-05:00) Eastern Time (US & Canada)'

>>> gmt = win32timezone.TimeZoneInfo('GMT Standard Time', True)

>>> str(gmt.displayName)

'(UTC) Dublin, Edinburgh, Lisbon, London'
To get the complete list of available time zone keys,

>>> zones = win32timezone.TimeZoneInfo.get_all_time_zones()
If you want to get them in an order that's sorted longitudinally

>>> zones = win32timezone.TimeZoneInfo.get_sorted_time_zones()
TimeZoneInfo now supports being pickled and comparison

>>> import pickle

>>> tz = win32timezone.TimeZoneInfo('China Standard Time')

>>> tz == pickle.loads(pickle.dumps(tz))

True
It's possible to construct a TimeZoneInfo from a TimeZoneDescription including the currently-defined zone.

>>> tz = win32timezone.TimeZoneInfo(TimeZoneDefinition.current())

>>> tz == pickle.loads(pickle.dumps(tz))

True

>>> aest = win32timezone.TimeZoneInfo('AUS Eastern Standard Time')

>>> est = win32timezone.TimeZoneInfo('E. Australia Standard Time')

>>> dt = datetime.datetime(2006, 11, 11, 1, 0, 0, tzinfo = aest)

>>> estdt = dt.astimezone(est)

>>> estdt.strftime('%Y-%m-%d %H:%M:%S')

'2006-11-11 00:00:00'

>>> dt = datetime.datetime(2007, 1, 12, 1, 0, 0, tzinfo = aest)

>>> estdt = dt.astimezone(est)

>>> estdt.strftime('%Y-%m-%d %H:%M:%S')

'2007-01-12 00:00:00'

>>> dt = datetime.datetime(2007, 6, 13, 1, 0, 0, tzinfo = aest)

>>> estdt = dt.astimezone(est)

>>> estdt.strftime('%Y-%m-%d %H:%M:%S')

'2007-06-13 01:00:00'
Microsoft now has a patch for handling time zones in 2007 (see http://support.microsoft.com/gp/cp_dst)

As a result, patched systems will give an incorrect result for dates prior to the designated year except for Vista and its successors, which have dynamic time zone support.

>>> nov2_pre_change = datetime.datetime(2003, 11, 2, tzinfo = MST)

>>> old_response = (2003, 11, 2, 7, 0, 0, 6, 306, 0)

>>> incorrect_patch_response = (2003, 11, 2, 6, 0, 0, 6, 306, 0)

>>> pre_response = nov2_pre_change.utctimetuple()

>>> pre_response in (old_response, incorrect_patch_response)

True
Furthermore, unpatched systems pre-Vista will give an incorrect result for dates after 2007.

>>> nov2_post_change = datetime.datetime(2007, 11, 2, tzinfo = MST)

>>> incorrect_unpatched_response = (2007, 11, 2, 7, 0, 0, 4, 306, 0)

>>> new_response = (2007, 11, 2, 6, 0, 0, 4, 306, 0)

>>> post_response = nov2_post_change.utctimetuple()

>>> post_response in (new_response, incorrect_unpatched_response)

True
There is a function you can call to get some capabilities of the time zone data.

>>> caps = GetTZCapabilities()

>>> isinstance(caps, dict)

True

>>> 'MissingTZPatch' in caps

True

>>> 'DynamicTZSupport' in caps

True

>>> both_dates_correct = (pre_response == old_response and post_response == new_response)

>>> old_dates_wrong = (pre_response == incorrect_patch_response)

>>> new_dates_wrong = (post_response == incorrect_unpatched_response)

>>> caps['DynamicTZSupport'] == both_dates_correct

True

>>> (not caps['DynamicTZSupport'] and caps['MissingTZPatch']) == new_dates_wrong

True

>>> (not caps['DynamicTZSupport'] and not caps['MissingTZPatch']) == old_dates_wrong

True
This test helps ensure language support for unicode characters

>>> x = TIME_ZONE_INFORMATION(0, u'franÃ§ais')
Test conversion from one time zone to another at a DST boundary

>>> tz_hi = TimeZoneInfo('Hawaiian Standard Time')

>>> tz_pac = TimeZoneInfo('Pacific Standard Time')

>>> time_before = datetime.datetime(2011, 11, 5, 15, 59, 59, tzinfo=tz_hi)

>>> tz_hi.utcoffset(time_before)

datetime.timedelta(-1, 50400)

>>> tz_hi.dst(time_before)

datetime.timedelta(0)
Hawaii doesn't need dynamic TZ info

>>> getattr(tz_hi, 'dynamicInfo', None)
Here's a time that gave some trouble as reported in #3523104 because one minute later, the equivalent UTC time changes from DST in the U.S.

>>> dt_hi = datetime.datetime(2011, 11, 5, 15, 59, 59, 0, tzinfo=tz_hi)

>>> dt_hi.timetuple()

time.struct_time(tm_year=2011, tm_mon=11, tm_mday=5, tm_hour=15, tm_min=59, tm_sec=59, tm_wday=5, tm_yday=309, tm_isdst=0)

>>> dt_hi.utctimetuple()

time.struct_time(tm_year=2011, tm_mon=11, tm_mday=6, tm_hour=1, tm_min=59, tm_sec=59, tm_wday=6, tm_yday=310, tm_isdst=0)
Convert the time to pacific time.

>>> dt_pac = dt_hi.astimezone(tz_pac)

>>> dt_pac.timetuple()

time.struct_time(tm_year=2011, tm_mon=11, tm_mday=5, tm_hour=18, tm_min=59, tm_sec=59, tm_wday=5, tm_yday=309, tm_isdst=1)
Notice that the UTC time is almost 2am.

>>> dt_pac.utctimetuple()

time.struct_time(tm_year=2011, tm_mon=11, tm_mday=6, tm_hour=1, tm_min=59, tm_sec=59, tm_wday=6, tm_yday=310, tm_isdst=0)
Now do the same tests one minute later in Hawaii.

>>> time_after = datetime.datetime(2011, 11, 5, 16, 0, 0, 0, tzinfo=tz_hi)

>>> tz_hi.utcoffset(time_after)

datetime.timedelta(-1, 50400)

>>> tz_hi.dst(time_before)

datetime.timedelta(0)

>>> dt_hi = datetime.datetime(2011, 11, 5, 16, 0, 0, 0, tzinfo=tz_hi)

>>> print dt_hi.timetuple()

time.struct_time(tm_year=2011, tm_mon=11, tm_mday=5, tm_hour=16, tm_min=0, tm_sec=0, tm_wday=5, tm_yday=309, tm_isdst=0)

>>> print dt_hi.utctimetuple()

time.struct_time(tm_year=2011, tm_mon=11, tm_mday=6, tm_hour=2, tm_min=0, tm_sec=0, tm_wday=6, tm_yday=310, tm_isdst=0)
According to the docs, this is what astimezone does.

>>> utc = (dt_hi - dt_hi.utcoffset()).replace(tzinfo=tz_pac)

>>> utc

datetime.datetime(2011, 11, 6, 2, 0, tzinfo=TimeZoneInfo('Pacific Standard Time'))

>>> tz_pac.fromutc(utc) == dt_hi.astimezone(tz_pac)

True

>>> tz_pac.fromutc(utc)

datetime.datetime(2011, 11, 5, 19, 0, tzinfo=TimeZoneInfo('Pacific Standard Time'))
Make sure the converted time is correct.

>>> dt_pac = dt_hi.astimezone(tz_pac)

>>> dt_pac.timetuple()

time.struct_time(tm_year=2011, tm_mon=11, tm_mday=5, tm_hour=19, tm_min=0, tm_sec=0, tm_wday=5, tm_yday=309, tm_isdst=1)

>>> dt_pac.utctimetuple()

time.struct_time(tm_year=2011, tm_mon=11, tm_mday=6, tm_hour=2, tm_min=0, tm_sec=0, tm_wday=6, tm_yday=310, tm_isdst=0)
Check some internal methods

>>> tz_pac._getStandardBias(datetime.datetime(2011, 1, 1))

datetime.timedelta(0, 28800)

>>> tz_pac._getDaylightBias(datetime.datetime(2011, 1, 1))

datetime.timedelta(0, 25200)
Test the offsets

>>> offset = tz_pac.utcoffset(datetime.datetime(2011, 11, 6, 2, 0))

>>> offset == datetime.timedelta(hours=-8)

True

>>> dst_offset = tz_pac.dst(datetime.datetime(2011, 11, 6, 2, 0) + offset)

>>> dst_offset == datetime.timedelta(hours=1)

True

>>> (offset + dst_offset) == datetime.timedelta(hours=-7)

True
Test offsets that occur right at the DST changeover

>>> datetime.datetime.utcfromtimestamp(1320570000).replace(

...     tzinfo=TimeZoneInfo.utc()).astimezone(tz_pac)

datetime.datetime(2011, 11, 6, 1, 0, tzinfo=TimeZoneInfo('Pacific Standard Time'))

Methods

GetTZCapabilities
Run a few known tests to determine the capabilities of the time zone database

now
Return the local time now with timezone awareness as enabled

resolveMUITimeZone
Resolve a multilingual user interface resource for the time zone name

utcnow
Return the UTC time now with timezone awareness as enabled

Classes

TimeZoneInfo
Main class for handling Windows time zones.

TimeZoneDefinition
A time zone definition class based on the win32

RangeMap
A dictionary-like object that uses the keys as bounds for a range.


win32timezone.RangeMap

win32timezone.RangeMap Object

A dictionary-like object that uses the keys as bounds for a range. Inclusion of the value for that range is determined by the key_match_comparator, which defaults to less-than-or-equal. A value is returned for a key if it is the first key that matches in the sorted list of keys.

Comments

One may supply keyword parameters to be passed to the sort function used to sort keys (i.e. cmp [python 2 only], keys, reverse) as sort_params.

Let's create a map that maps 1-3 -> 'a', 4-6 -> 'b'

>>> r = RangeMap({3: 'a', 6: 'b'})  # boy, that was easy

>>> r[1], r[2], r[3], r[4], r[5], r[6]

('a', 'a', 'a', 'b', 'b', 'b')
Even float values should work so long as the comparison operator supports it.

>>> r[4.5]

'b'
But you'll notice that the way rangemap is defined, it must be open-ended on one side.

>>> r[0]

'a'

>>> r[-1]

'a'
One can close the open-end of the RangeMap by using undefined_value

>>> r = RangeMap({0: RangeMap.undefined_value, 3: 'a', 6: 'b'})

>>> r[0]

Traceback (most recent call last):

...

KeyError: 0
One can get the first or last elements in the range by using RangeMap.Item

>>> last_item = RangeMap.Item(-1)

>>> r[last_item]

'b'
.last_item is a shortcut for Item(-1)

>>> r[RangeMap.last_item]

'b'
Sometimes it's useful to find the bounds for a RangeMap

>>> r.bounds()

(0, 6)
RangeMap supports .get(key, default)

>>> r.get(0, 'not found')

'not found'

>>> r.get(7, 'not found')

'not found'

Methods

get
Return the value for key if key is in the dictionary, else default.


win32timezone.RangeMap.get

get()

Return the value for key if key is in the dictionary, else default. If default is not given, it defaults to None, so that this method never raises a KeyError.


win32timezone.RangeMap.get

get(self, key, default)

Return the value for key if key is in the dictionary, else default. If default is not given, it defaults to None, so that this method never raises a KeyError.

Parameters

self :

self

key :

key

default=None :

default


win32timezone.TimeZoneDefinition

win32timezone.TimeZoneDefinition Object

A time zone definition class based on the win32 DYNAMIC_TIME_ZONE_INFORMATION structure.

Comments

Describes a bias against UTC (bias), and two dates at which a separate additional bias applies (standard_bias and daylight_bias).

Methods

current
Windows Platform SDK GetTimeZoneInformation


win32timezone.TimeZoneDefinition.current

current()

Windows Platform SDK GetTimeZoneInformation

Comments

This is a @classmethod.


win32timezone.TimeZoneDefinition.current

current(class_)

Windows Platform SDK GetTimeZoneInformation

Parameters

class_ :

class_


win32timezone.TimeZoneInfo

win32timezone.TimeZoneInfo Object

Main class for handling Windows time zones. Usage: TimeZoneInfo(<Time Zone Standard Name>, [<Fix Standard Time>])

Comments

If <Fix Standard Time> evaluates to True, daylight savings time is calculated in the same way as standard time.

>>> tzi = TimeZoneInfo('Pacific Standard Time')

>>> march31 = datetime.datetime(2000,3,31)
We know that time zone definitions haven't changed from 2007 to 2012, so regardless of whether dynamic info is available, there should be consistent results for these years.

>>> subsequent_years = [march31.replace(year=year)

...     for year in range(2007, 2013)]

>>> offsets = set(tzi.utcoffset(year) for year in subsequent_years)

>>> len(offsets)

1

Methods

GetDSTStartTime
Given a year, determines the time when daylight savings time starts

get_sorted_time_zones
Return the time zones sorted by some key.

utc
Returns a time-zone representing UTC.

GetDSTEndTime
Given a year, determines the time when daylight savings ends.

dst
Calculates the daylight savings offset according to the datetime.tzinfo spec

get_sorted_time_zone_names
Return a list of time zone names that can be used to initialize TimeZoneInfo instances

utcoffset
Calculates the utcoffset according to the datetime.tzinfo spec

getWinInfo
Return the most relevant "info" for this time zone

local
Returns the local time zone as defined by the operating system in the


win32timezone.TimeZoneInfo.dst

dst()

Calculates the daylight savings offset according to the datetime.tzinfo spec


win32timezone.TimeZoneInfo.dst

dst(self, dt)

Calculates the daylight savings offset according to the datetime.tzinfo spec

Parameters

self :

self

dt :

dt


win32timezone.TimeZoneInfo.get_sorted_time_zone_names

get_sorted_time_zone_names()

Return a list of time zone names that can be used to initialize TimeZoneInfo instances


win32timezone.TimeZoneInfo.get_sorted_time_zones

get_sorted_time_zones()

Return the time zones sorted by some key. key must be a function that takes a TimeZoneInfo object and returns a value suitable for sorting on. The key defaults to the bias (descending), as is done in Windows (see http://blogs.msdn.com/michkap/archive/2006/12/22/1350684.aspx)


win32timezone.TimeZoneInfo.get_sorted_time_zones

get_sorted_time_zones(key)

Return the time zones sorted by some key. key must be a function that takes a TimeZoneInfo object and returns a value suitable for sorting on. The key defaults to the bias (descending), as is done in Windows (see http://blogs.msdn.com/michkap/archive/2006/12/22/1350684.aspx)

Parameters

key=None :

key


win32timezone.TimeZoneInfo.GetDSTEndTime

GetDSTEndTime()

Given a year, determines the time when daylight savings ends.


win32timezone.TimeZoneInfo.GetDSTEndTime

GetDSTEndTime(self, year)

Given a year, determines the time when daylight savings ends.

Parameters

self :

self

year :

year


win32timezone.TimeZoneInfo.GetDSTStartTime

GetDSTStartTime()

Given a year, determines the time when daylight savings time starts


win32timezone.TimeZoneInfo.GetDSTStartTime

GetDSTStartTime(self, year)

Given a year, determines the time when daylight savings time starts

Parameters

self :

self

year :

year


win32timezone.TimeZoneInfo.getWinInfo

getWinInfo()

Return the most relevant "info" for this time zone in the target year.


win32timezone.TimeZoneInfo.getWinInfo

getWinInfo(self, targetYear)

Return the most relevant "info" for this time zone in the target year.

Parameters

self :

self

targetYear :

targetYear


win32timezone.TimeZoneInfo.local

local()

Returns the local time zone as defined by the operating system in the registry.

Comments

Now one can compare the results of the two offset aware values

>>> (now_UTC - now_local) < datetime.timedelta(seconds = 5)

True
This is a @classmethod.

>>> localTZ = TimeZoneInfo.local()

>>> now_local = datetime.datetime.now(localTZ)

>>> now_UTC = datetime.datetime.utcnow()

>>> (now_UTC - now_local) < datetime.timedelta(seconds = 5)

Traceback (most recent call last):

...

TypeError: can't subtract offset-naive and offset-aware datetimes

>>> now_UTC = now_UTC.replace(tzinfo = TimeZoneInfo('GMT Standard Time', True))


win32timezone.TimeZoneInfo.local

local(class_)

Returns the local time zone as defined by the operating system in the registry.

Parameters

class_ :

class_

Comments

Now one can compare the results of the two offset aware values

>>> (now_UTC - now_local) < datetime.timedelta(seconds = 5)

True

>>> localTZ = TimeZoneInfo.local()

>>> now_local = datetime.datetime.now(localTZ)

>>> now_UTC = datetime.datetime.utcnow()

>>> (now_UTC - now_local) < datetime.timedelta(seconds = 5)

Traceback (most recent call last):

...

TypeError: can't subtract offset-naive and offset-aware datetimes

>>> now_UTC = now_UTC.replace(tzinfo = TimeZoneInfo('GMT Standard Time', True))


win32timezone.TimeZoneInfo.utc

utc()

Returns a time-zone representing UTC.

Comments

Same as TimeZoneInfo('GMT Standard Time', True) but caches the result for performance.

>>> isinstance(TimeZoneInfo.utc(), TimeZoneInfo)

True
This is a @classmethod.


win32timezone.TimeZoneInfo.utc

utc(class_)

Returns a time-zone representing UTC.

Parameters

class_ :

class_

Comments

Same as TimeZoneInfo('GMT Standard Time', True) but caches the result for performance.

>>> isinstance(TimeZoneInfo.utc(), TimeZoneInfo)

True


win32timezone.TimeZoneInfo.utcoffset

utcoffset()

Calculates the utcoffset according to the datetime.tzinfo spec


win32timezone.TimeZoneInfo.utcoffset

utcoffset(self, dt)

Calculates the utcoffset according to the datetime.tzinfo spec

Parameters

self :

self

dt :

dt


win32timezone.GetTZCapabilities

GetTZCapabilities()

Run a few known tests to determine the capabilities of the time zone database on this machine. Note Dynamic Time Zone support is not available on any platform at this time; this is a limitation of this library, not the platform.


win32timezone.now

now()

Return the local time now with timezone awareness as enabled by this module

>>> now_local = now()


win32timezone.resolveMUITimeZone

resolveMUITimeZone(spec)

Resolve a multilingual user interface resource for the time zone name

Parameters

spec :

spec

Comments

spec should be of the format @path,-stringID[;comment] see http://msdn2.microsoft.com/en-us/library/ms725481.aspx for details

>>> #some pre-amble for the doc-tests to be py2k and py3k aware)

>>> try: unicode and None

... except NameError: unicode=str

...

>>> import sys

>>> result = resolveMUITimeZone('@tzres.dll,-110')

>>> expectedResultType = [type(None),unicode][sys.getwindowsversion() >= (6,)]

>>> type(result) is expectedResultType

True


win32timezone.utcnow

utcnow()

Return the UTC time now with timezone awareness as enabled by this module

>>> now = utcnow()


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)


win32uiole.EnableBusyDialog

EnableBusyDialog(enabled)

Parameters

enabled : bool


OLE_SAVED

const win32uiole.OLE_SAVED;

the item has committed its storage


wincerapi.CEHANDLE

PyCEHANDLE = CEHANDLE()

Creates a new CEHANDLE object


winxpgui

Module winxpgui

A version of win32gui built specifically for Windows XP. See the win32gui module for more details.


A changelog for recent builds as pasted into the sourceforge page.

Generally created by hand after running:
   hg log -rb2xx: > log.out
However contributors are encouraged to add their own entries for their work.

Since build 226:
----------------
* Improved the search for pywin32 system DLLs logic. Useful when installed
  in virtual environments (#1442, @CristiFati)

* Added MAPI IMsgServiceAdmin2 interface (Nick Czeczulin, #1411)

Since build 225:
----------------
* The directory with the pywin32 system DLLs is now added to the start of PATH
  for version 3.7 and earlier, and passed to os.add_dll_directory() on 3.8 and
  later. This will hopefully work around problems loading pywintypes.dll in
  various situations.

* Conversions to and from COM VT_DATE types should no longer lose milliseconds.

* Formatting eventlog messages should now handle larger messages and inserts
  (Ofek Lev via #1421)

* Fixed that win32help was very broken everywhere except 32bit 2.7 (#1434)

* A number of MAPI improvements from Nick Czeczulin.

Since build 224:
----------------
* Huge shout-out to @thopiekar for helping with github triage, getting CI
  working and sane, and other general help and patches!

* Significant work by @joankaradimov in porting pywin32 so that it works in a
  MingGW/msys2 environment.

* ntsecuritycon.FILE_ALL_ACCESS had an incorrect value (#1354)

* SetSecurityDescriptorGroup now accepts None as group value (#1382)

* Fix an issue where win32gui.EnumChildWindows may throw a spurious exception.
  (#1350)

* Better support for numpy objects in COM methods (#1388, @panikc and
  @SReicheltPTV)

* PythonWin is now able to start with non-English active keyboard layout.

* Corrected wMilliseconds truncation in PyTime::getattro (Dorian Bivolaru)

* Implement PdhGetFormattedCounterArray (#1306, konserw)

Since build 223:
----------------
* Built with a released version of Python 3.7, which fixes various date related
  issues with Python 3.7

* Fix a regression introduced in build 220 around how some COM properties are
  handled (#1211 and #1199)

* Everything is now build with the Windows 8.1 SDK. While this should typically
  be invisible, it is mentioned because it might explain obscure issues that
  creep in, so it should be explicitly called out as a change.
  On the plus side, this makes building the extensions far simpler.

* win32serviceutil - in GetServiceClassString, skip rewrite of file name (fname)
  when win32api.FindFiles returns an empty list, e.g., if the service has been
  packaged in a zip or exe. (fixes issue #642)

Since build 222:
----------------
* pywin32.pth now arranges for the pywin32_system32 directory to be on
  PATH to help with pypi installations (thanks to @xovian via #1153)

Since build 221:
----------------
* !! Moved to github for development !!. https://github.com/mhammond/pywin32
  is the new home of pywin32 and all builds will be released there.
  The build process now also builds "wheels", so "pip install pywin32" should
  also work (but see README.md for some limitiations of using pip)

  Particular thanks to @xoviat, who helped with prompting me to make the
  change, imported all the issues from sourceforge, and helped with the
  process for creating the wheels.

  As a part of this, I've changed every issue in this file from "#xxx" to
  "#sfxxx" to indicate they refer to the old sourceforge issue numbers.

* Older Python versions are no longer supported - builds are only made
  available for Python 2.7 and Python 3.5+.

* For Python 3.x, a win32 FILETIME or TimeStamp which is greater than the
  datetime module can handle will return datetime.datetime.max instead of
  throwing (fixes issue #748)

* win32file - fix ERROR_BAD_LENGTH in GetFileInformationByHandleEx
  in x86 builds(issue #752, rbschk)

* MakeModuleForTypelib no longer catches COM exceptions, so no longer can
  return None. This is what the docstring always claimed the behaviour was
  and makes things less error prone. If you explicitly call this function and
  handle None, you will need to wrap the call in an exception handler.

* Change PyIMAPIFolder CopyMessages, DeleteMessages, and EmptyFolder to return
  the HRESULT (Nick Czeczulin via patch #sf162)

* Fix a reference leak of Py_None in a couple of MAPI methods (Nick Czeczulin
  via patch #sf149)

Since build 220:
----------------
* Add PyIMapiSession::AdminServices method (Nick Czeczulin via patch #sf161)

* Allow win32com.client.CastTo() to have a typelib specified, which will be
  used to locate the object definition (Pieter Aarnoutse via patch #sf136)

* Add pythoncom.StgOpenStorageOnILockBytes (Nick Czeczulin via patch #sf135)

* IDispatch failures will try and get error information via IErrorInfo (Stefan
  Schukat via patch #sf130)

* A null SPropTagArray will now return None instead of crashing.

* New mapi/exchange interfaces PyIExchangeManageStoreEx, PyIMAPIAdviseSink,
 PyIMsgStore::Advise, PyIMsgStore::Unadvise, HrAllocAdviseSink,
 HrThisThreadAdviseSink, and HrDispatchNotifications (Nick Czeczulin)

Since build 219:
----------------
* win32com - sys.argv[0] may be set to a bytes object instead of a string on
  Python 3 when implementing an in-process COM object.

* Fix that allows a property to be fetched on COM objects to work in more cases
  (Fredrik Orderud via patch #sf155)

* Disabled exchange and exchdapi modules on Python 2.5 due to unresolved
  build issues.

* Fix potential crash in SHGetIDListFromObject and SHGetFileInfo issues (rupole)

* Allow GetShortPathName to handle long paths in unicode mode (ruple)

* Fix intermittent crash in win32cred.CredRead() (bug #sf670, rupole)

* Support PT_MV_BINARY MAPI properties, (patch #sf37) and many other MAPI
  improvements (Nick Czeczulin)

* Fix username used with EvtOpenSession (bug #sf688, rupole)

* Fix OutputDebugString encoding in wide builds (patch #sf142, rupole)

Since build 218:
----------------
 * win32com.mapi
   Addded outlook interface IConverterSession with methods MIMEToMAPI, MAPIToMIMEStm, and SetAdrBook
   Added method OpenStreamOnFile (Nick Czeczulin)
   Ignore PT_MV_TSTRING along with PT_TSTRING (Nick Czeczulin)
   Bugfix to support PT_MV_BINARY properties (Nick Czeczulin via patch #sf37)

 * Conversions from a Python object to a variant now does a better job at
   deciding what variant type to use, taking into account the size and sign of
   the value (Stefan Schukat via patch #sf127)

 * Add support for VT_I8 and VT_UI8 when converting a variant into a Python
   object (Stefan Schukat via patch #sf128)

 * win32com.mapi.exchange
   Added 64-bit support by excluding the 32-bit Ex2kSdk.lib functions from 64-bit builds.
   Unfortunately, this means that only IExchangeManageStore::CreateStoreEntryID
   is currently available in a 64-bit build. (Nick Czeczulin)

* adodbapi updated to version 2.6 -- new examples folder includes short programs for
    reading and writing .xls spreadsheets and reading ACCESS .mdb files using SQL.
  New functions .is64bit.Python() and .is64bit.os() to help pick the correct drivers.
  New function .schema_table.names() returns a list of all tables in a database.
  Ability for a Windows computer to be a database proxy for a remote (Linux or Windows) unit.
    see adodbapi/README.txt for more information.

* Fix issue implementing COM objects from within a virtualenv (Kevin Smyth
  via issue #3597965)

* Fix some issues using decimal objects with Python 3.3 and later (rupole)

* Add a counterpart to VB's Nothing, from patch 3609027 by Stefan Schukat

* win32api
    Handle REG_QWORD (64-bit ints) (rupole)
    Add GetEnvironmentVariableW and SetEnvironmentVariableW (rupole)
    Fix function pointer check for win32api.GetNativeSystemInfo (bug#sf665)

* win32com.shell
    Add interfaces IFileOperation and IFileOperationProgressSink
    Add SHParseDisplayName (feature req #3585998) (rupole)

* win32com.propsys
    Add interfaces IPropertyChange, IPropertyChangeArray, and IObjectWithPropertyKey
    Add functions PSCreateSimplePropertyChange, PSCreatePropertyChangeArray, and SHSetDefaultProperties

* win32crypt
    Add functions and objects for handling certificates and certificate stores

* win32gui
    Add RegisterHotKey (rupole)

* win32evtlog
    Add several more Evt* functions (Vista+ event log API)

* win32prociess
  Add EnumProcessModulesEx (feature request 3608155) (rupole)

* pythonwin
  Fix a hang using the tools menu

Since build 217:
----------------
* mapiutil.py GetPropTagName has been modified to return the fully qualified
  PT_UNICODE and PT_STRING8 type name. Added optional argument to override
  rawType default in GetMapiTypeName. (Nick Czeczulin)

* Fix the count of replaced terms in Pythonwin's search/replace (rupole).

* Fix obscure issues in the Pythonwin code browser and other uses of the
  "hierlist" widget (rupole).

* Fix a crash using a COM "record" that holds an array (rupole).

* Fix error return in win32gui.GetClassName (rupole).

* Some misc fixed to win32timezone (Jason R. Coombs).

* Some fixes to win32com gencache for Python 3.x (Tim Golden)

* Fix ActiveScript exception hresults.

* RegQueryValueEx now return an empty list for blank REG_MULTI_SZ
  (rupole via bug #3531456)

* Add win32pdh.AddEnglishCounter (rupole via feature request #3529527)

* Fix post_install script use of the registry (rupole via bug #3536122)

* Python 3.3 version is built with VS2010.

* win32com.shell - added function SHCreateStreamOnFileEx and
    interfaces IShellItem2, IEnumShellItems, IApplicationDocumentLists,
    IApplicationDestinations, ITaskbarList, IEnumObjects,
    IKnownFolder, IKnownFolderManager, IObjectArray, IObjectCollection,
    ICustomDestinationList, and IShellLibrary; enhance SHAddToRecentDocs.

* win32com.propsys - Many Property System interfaces and functions added

* pythoncom - added StgCreateStorageEx

* win32com.client -
    Fix iteration of objects that don't declare an enumerator in their typelib
    Validate syntax of constants written to makepy generated files

* win32file - Add GetFileInformationByHandleEx, ReOpenFile and OpenFileById,
  SetFileInformationByHandle.  SetFileTime() has an extra param to allow UTC
  time to be specified.

* win32api - Allow UpdateResource to remove a resource

Since build 216:
----------------
* ISAPI extension works with Python 3.x

* Python service module will now have their directory added to the start
  of sys.path rather than the end to avoid cryptic error messages if a
  module of the same name is already on the path (rvolpe via #3194663)

* Various Pythonwin autocomplete enhancements (kxroberto via #3468282 and
  Oliver Tengler via #3433953)

* The Pythonwin editor now remembers previous searches made in this session.
  (patch #3468280 from kxroberto).

* The LOGFONT struct implementation (win32util) was extended to support the
  full LOGFONT struct as published by Microsoft.  This includes changes to
  win32util.LogFontToDict and win32util.DictToLogFont.  (Feature request
  3433757 by Kris Hardy)

* Remove some duplicated menu code from pythonwin which should avoid
  having py2exe pulling in most of the pythonwin framework in some cases
  (patch 3433527 from kxroberto.)

* A new win32com.client.VARIANT object can be used for advanced control over
  the parameter types passed to some COM methods.  See the documentation in
  win32com/HTML/variant.html (also included in the help file)

* The win32com.adsi and win32com.mapi packages have been upgraded to work on
  Python 3.x and as a result, there is a slight risk that regressions to
  these packages have been introduced in the Python 2.x versions.  Please
  file a bug if any problems are found.

* Pythonwin now warns, but allows you to continue, when saving a file with
  an invalid encoding line (bug 3139486)

* Fix win32com.client.WithEvents on py3k (bug 3199843)

* When passing integers/unsigned integers to COM objects which did not fit
  into 32bits, OverflowErrors were silently discarded and -1 was silently
  passed.  This has been fixed for signed integers (an OverflowError is now
  raised) and unsigned integers now allow for values with the high-bit set to
  be passed correctly.

* Fix win32com.client.WithEvents() on py3k.

* makepy may have generated syntax errors if 'helpstring' elements in typelibs
  had strange quoting or slashes (bug 3199631)

* Fixed that in some cases win32file.GetOpenFileName and GetSaveFileName
  could have returned trailing garbage after an embedded NULL character.
  (bug 3277647)

* Some functions which accepted a DWORD did not accept long integers which
  fit in 32bits with the most signficant bit set (eg, 0x80000000).

* Source-code management moved from CVS to Mercurual.

* win32com.shell - Added SHCreateShellItem and fixed some 64bit issues.

* win32evtlog - Added some of the new event log functions introduced in
  Vista/Windows 7

* win32service - Added EnumServicesStatusEx, and support startup type
  "delayed" for Python services

* win32net - Fix a problem with NetFileEnum on 64-bit (bug #3376041)

Since build 215:
----------------
* New loader module for COM objects to avoid some CRT manifest issues.
  pythoncomloaderxx.dll will be copied to your System32 directory and used as
  the entry-point for COM objects instead of pythoncomxx.dll.  This DLL
  is very small - includes a manifest referencing the C runtime library and
  simply loads pythoncomxx.dll and deletes the COM object creation back to it.
  You will need to re-register any COM objects you have to take advantage of
  this.

* Performance Monitor and ISAPI DLLs now include a manifest to fix potential
  CRT related issues using those features.

* Fix potential crash in ISAPI GetServerVariable functions.

* Fix printing on pythonwin on 3.x

* Pythonwin gets an option to set the background color of the selected text.

Since build 214:
----------------
* Update adodbapi to version 2.4,2 -- in this version,
  1. The cursor has a new .query attribute.  It returns the (possibly converted) query sent to ADO. [Thanks to William Dode.]
     This may be useful for testing paramstyle 'format' and 'named' queries.  .query is an extension borrowed from psycopg2.
  2. Added .command and .parameters attributes, which are copies of the original command and parameters sent the the cursor.
  3. Added tests using a PostgreSQL server.  Tests are now run for ACCESS, MS SQL, MySQL and PostgreSQL.
  4. Column name data access is now case insignificant (since PostgreSQL returns lower case column names).
      so (if a row object 'r' contains a first column 'spam') r[0], r.Spam, r.spam and r['SPAM'] are all equivalent.
  5. The connection has new attributes .dbms_name and .dbms_version to display the underlying database engine. (like mxODBC)

* Update adodbapi to version 2.4.0 -- in this version,
   "fetchall()" and "fetchmany()" return an SQLrows object
   ...which emulates a sequence of SQLrow objects.
   "fetchone()" or the cursor's "next()" method return an SQLrow object.
   An SQLrow object emulates a tuple of data fields.
   An SQLrow object also appears to have an attribute for each column of data.
   therefore...
   >>> import adodbapi
   >>> myConnection = adodbapi.connection('someDSN')
   >>> cur = myConnection.cursor()
   >>> cur.execute("select name, rank, serialNumber from soldiers")
   >>> row = cur.fetchone()
   >>> assert row[0] == row['name']
   >>> assert row[1] == row.rank
   >>> rows = cur.fecthall()
   >>> assert rows[4,'serialNumber'] == rows[4][2]

* Update adodbapi to version 2.3.0 -- this is includes major refactoring and
   specifically adds features for django support, including the ability for the
   programmer to change ado's SQL "paramstyle" at run time to select between
   'qmark', 'format' and 'named' methods of passing SQL parameters.
** also, in response to user requests, adodbapi will now use client-side
   cursors by default.  This will make rowcount and stored procedure return
   parameter values more readily available.

* Remove manifest for Python 2.6 and later binaries which should make things
  work much better when the VS2008 redist components aren't installed.

* Fix problem causing ASP pages to fail when reloaded.

* mapiutil.py functions GetMapiTypeName and GetPropTagName have been modified
  to better distinguish between PT_UNICODE and PT_STRING8 type names
  during reverse lookups. (Nick Czeczulin)

* Fix encoding problem in makepy (Massa, Harald Armin)

* Pythonwin: trim leading and trailing whitespace in calltip text (kxroberto)

* Pythonwin: fix reload of package modules and support for 'pyw' and 'pyx'
  extensions (kxroberto)

* Pythonwin: PYTHONSTARTUP is honoured, just like when using python.exe
  (kxroberto)

* Pythonwin: Better support for international keyboards.  (Bug 896502 and
  help from kxroberto)

* New win32api functions GetKeyboardLayoutName, MapVirtualKey and ToAsciiEx

* Add win32file.WSAEnumNetworkEvents (Ziga Seilnacht via patch 3022832)

* Get vtable interfaces working on 64bit windows (Nikolay Igotti via patch
  3002383)

* Pythonwin: if the interactive window is cleared, avoid the blue color and
  large font on the new line (markt via patch 2813056)

* Fix Python reference leak when calling MAPI/Exchange functions which
  take an SRowSet param.

* Fix Pythonwin's Edit/Replace dialog in Python 2.3 (bug 2962078)

* Fix a few axscript issues with py3k.

* Pythonwin now offers to create the file when attempting to open a file
  that doesn't exist (ghazel via bug 1409321)

* Many functions in win32event would swallow exceptions due to things like
  invalid handles etc (Ziga Seilnacht via issue 3136751)

Since build 213:
----------------

* pythoncom gets better support for 64bit integers, including in arrays.

* pythoncom may fail to import on Windows 2000 installs with a default IE
  (Roger)

* Fix Pythonwin when backspacing over an extended character (from markt
 (metolone), via bug 2618277)

* Fixed a regression which would cause an error if you compared a PyTime
  object to any other type, including None

Since build 212:
----------------

* py3k work - see the notes in the main documentation index for details,
  but this entailed a huge overhaul of almost all the pywin32 sources.
  Many things have been modernized for the first time in over a decade,
  and may new tests have been added.  As a result, build 213 will not
  be recommended for production work and should be treated as beta quality.

  Huge thanks to:
  - Roger Upole: for starting the py3k work, and without whom the py3k work
    would literally not yet have started.
  - Jason R. Coombs: for help porting win32timezone to py3k and for helping
    with the new datetime object support.
  - Vernon Cole: for help with porting adodbapi to py3k.

* win32eventlog.OpenEventLog and OpenBackupEventLog now return a PyHANDLE
  object which auto-closes on destruction.

* pythoncom servers which implemented 'universal' vtable interfaces from a
  typelib could cause Data Execution Protection (DEP) to be triggered if
  enabled.  This has been resolved and such servers now work correctly with
  DEP enabled.

* Fixed memory leak in win32wnet.WNetEnumResource.

* Added win32wnet.WNetAddConnection3 allowing a HWND to be specified for
  authentication.

* isapi:
  * Refactored isapi.install primarily to support installing extensions into
    the root of a site (Jason R. Coombs)
  * New IIS6-only functionality HSE_REQ_EXEC_URL which avoids the need to use
    a filter in most cases, including new demos for this.
  * Other misc support functions (HSE_REQ_REPORT_UNHEALTHY,
    HSE_REQ_GET_ANONYMOUS_TOKEN, etc)

* "Modernization" changes, instigated by py3k:

  - Many older modules now accept unicode arguments where previously they
    only accepted strings - notably, win32ui, win32wnet ...

  - win32wnet: NCB and NETRESOURCE attributes are now types rather than
    methods.  NETRESOURCE string attributes may return None if the win32
    structure has a NULL pointer (previously an empty string was returned)

* Added win32inet.WinHttpGetDefaultProxyConfiguration()

* Pythonwin updates from R�mi Paucher; enter completes auto-complete in
  the editor and interactive windows, auto-complete should now work on French
  keyboards.  (XXX - some of this was reverted - update!)

* Lots of work to better support unicode, py3k and 64bits from Roger.
  Most of these changes will be invisible, and those that are not
  are detailed elsewhere.

* ODBC module - todo - add more about this.

* pythoncom.__future_currency__ is no longer supported - the decimal
  module is now used unconditionally when returning 'currency' variants.
  See the win32com readme for more.

* If you *implement* (not use) any of the following interfaces, take note:
  IErrorLog, IPropertyBag, ICatInformation and IStorage have been upgraded
  to have unicode passed instead of strings as args to the implementation
  methods.

* win32gui: RegisterDeviceNotification and EnumPropsExW didn't release the
  GIL, which could cause a deadlock in multi-threaded Python apps.

* Fix bug in win32timezone.GetSortedTimeZoneNames() on WinNT.

* win32com.internet gets support for IDocHostUIHandler, IHTMLOMWindowServices
  and IInternetSecurityManager interfaces, and CoInternetCreateSecurityManager
  function.

* win32com.axcontrol gets support for IOleControlSite,
  IOleInPlaceActiveObject, IOleInPlaceFrame and IOleInPlaceUIWindow
  interfaces, and OleTranslateAccelerator function.

* MsgWaitForMultipleObjectsEx() would crash in all cases.  Fix from
  Ziga Seilnacht via [2141368].

* pywintypes.error and com_error get support for attributes as
  well as indexing (ie, exc.winerror can now be used in place of exc[0].)
  See the help file for details on the attribute names.

* MAPI gets support for IMAPIAdviseSink

* win32com.shell gets support for IContextMenu2 and IContextMenu3

* add win32api.GetNativeSystemInfo(), win32api.GetKeyboardLayout(),
  win32api.GetPwrCapabilities.

* add win32file.ConnectEx() and win32file.TransmitFile() (ionel and Roger via
  [1962146])

Since build 211:
----------------
* adodbapi updated to version 2.2. Supports Iron Python. Better
  logic for .rowcount. New .cvtString convertion method. Multiple
  result sets work correctly. Code cleanup and eliminate classic
  classes and string exceptions. Fix CoInitialize bug.

* Remove warning about VARDESCs in obscure circumstances when using
  COM objects.

* Add winapi.SetSystemPowerState(), win32pipe.TransactNamedPipe(),
  win32net.NetValidatePasswordPolicy(),

* win32api.GetConsoleTitle() could raise win32api.error with an error
  code of 0 when the title was > 64 characters.  It now returns the
  full title.

* New IExplorerPaneVisibility interface, minor shell bugfixes.

* Fix a couple of makepy related unicode issues, and generate to
  a .temp file so an error doesn't leave a 1/2 generated module.

* Fix so makepy works in IDLE in non-English locales.

* Pythonwin changes from Roger:
  - Right-click menu gets "Copy code without prompts" and "Execute
    code from clipboard" options.
  - If text is selected when period key is pressed, replace text
    instead of doing autocomplete
  - Add a keyboard shortcut to fold up second level indents
  - Allow keypad keys to perform original function when folding
    is disabled (feature req 1798328)

* Add some extra service configuration parameters introduced with Vista

Since build 210:
----------------
* Support for RegisterDeviceNotification in win32gui and for packing and
  unpacking the various structures in win32gui_struct.  Demos in
  win32\Demos\win32gui_devicenotify.py and service\serviceEvents.py

* adodbapi added to pywin32 package CVS tree:
- this pure python package is a fully dbapi 2.0 compliant database access
  method. This is a copy of the code from the adodbapi sourceforge project,
  which will eventually become obsolete in favor of this site. Inclusion here
  and maintenance of the package are by Vernon Cole.

* Available for AMD64 versions of Windows for Python 2.6 and later (support
  for Python 2.5 is just too hard, sorry).  Lots of help from Roger,
  Steve Yin and Sidnei da Silva.

* com related changes:

- win32com.bits: Sidnei da Silva from Enfold Systems added support for
  BITS (Background Intelligent Transfer Service). Not fully complete
  (missing Ranges-related APIs and a couple others) but the basic
  functionality is in place. See the demos in
  win32comext/bits/test/*.py

- makepy accepts a program id to process its typelib and generates long
  integer literals for constants > sys.maxint.  The way typelibs are generated
  also changes slightly, fixing a bug with certain hex version numbers in
  the registry.  Fix a bug [1548903] that could cause incomplete generated
  files when a typelib was missing

- win32com.client: Fix a bug [1587023] that prevented Get and Set properties
  working for ITypeComp implementing objects.  Add automatic "cast" to an
  interface when using iterators [1707700]

- win32com.axcontrol: Module for using ActiveX controls independently of
  pythonwin/win32ui/MFC.  Includes a demo of embedding Internet Explorer
  inside a win32gui window.

- win32com.internet:
  * Add CoInternetIsFeatureEnabled and CoInternetSetFeatureEnabled

- pythoncom:
  * event handlers implemented in Python that were called with named params
    may have presented the arguments to Python in the incorrect order - this
    has been fixed.
  * Always return -1 (VARIANT_TRUE), rather than 1, when a VARIANT_BOOL is
    requested.
  * When passing a Python integer, always use VT_I4 when possible, VT_UI4
    otherwise (previous versions did VT_I4 only, 209 did VT_UI4 only)
  * New functions CoMarshalInterface, CoUnmarshalInterface,
    CoReleaseMarshalData, ReadClassStm, WriteClassStm, CreateStreamOnHGlobal,
    CreateILockBytesOnHGlobal.
  * Fix possible buffer overflow using IStream.

- win32com.shell:
  * PyIExtractImage by Steven James.
  * PyIEmptyVolumecache, IEmptyVolumeCache2, IEmptyVolumeCacheCallBack by
    Sidnei da Silva from Enfold Systems.
  * IsUserAnAdmin
  * More coverage of the shell interfaces and demos, including many Vista
    specific functions and interfaces (see win32comext\shell\demos)

* win32transaction: New module containing Kernel Transaction Manager (KTM)
  functions as used with transacted NTFS and transacted registry functions

* win32api:
  - Transacted registry functions and demos from Roger
  - New functions RegCopyTree, RegDeleteTree, RegSaveKeyEx,
    RegRestoreKey, RegCreateKeyEx, RegQueryInfoKeyW,
    RegEnumKeyExW, Get/SetSystemFileCacheSize, GlobalMemoryStatus,
    GlobalMemoryStatusEx, GetDllDirectory, SetDllDirectory,
    RegDeleteKeyEx, RegOpenCurrentUser, RegOverridePredefKey

  - Fix memory leak in GetShortPathName
  - Fix VkKeyScan arg handling

* win32file:
  - Fixed bug in ReadDirectoryChanges that ignored 1 char filenames.
    (from Niki Spahiev)
    Added Transactional NTFS functions, CreateSymbolicLink and other new
    Vista API functions, System file checker (Sfc) functions,
    DuplicateEncryptionInfoFile, GetVolumePathNamesForVolumeName,
    GetFinalPathNameByHandle,
    CreateMailslot, GetMailslotInfo, SetMailslotInfo

  - FindFiles and FindFilesIterator now accept an optional transaction handle
    to perform a transacted search
  - FindStreams function that calls FindFirstStream and FindNextStream to
    enumerate a file's data streams.
  - FindFileNames using FindFirstFileName, FindFirstFileNameTransacted, and FindNextFileName

* win32service:
  - Service and service control manager handles are now returned as
    self-closing PySC_HANDLEs instead of plain int handles
  - Service dependencies are returned as list of Unicode strings instead
    of a single string, which lost multiple dependencies (could break
    code, but old handling was insane)
  - Allow for services to handle additional events and the data that comes
    with them - see win32\demos\service\serviceEvents.py.

* win32gui:
  - GDI object handles (bitmaps, fonts, regions, pens, brushes) are returned
    as another PyHANDLE subclass (PyGdiHandle)
  - A large number of new text drawing, line and curve drawing, region, path,
    and coordinate space functions
  - Window class name can now be used interchangeably with class atom
    (fixes bug #1267366)
  - Add DrawTextW (feature request #1173716), PtInRect, EnumPropsEx,
    DrawTextW, SetMenuInfo, GetMenuInfo, ExtCreatePen, CreateBrushIndirect,
    lots of other GDI functions.

* win32pipe:
    Add GetNamedPipeClientSessionId, GetNamedPipeServerSessionId,
    GetNamedPipeInfo, GetNamedPipeClientProcessId, GetNamedPipeServerProcessId

* win32process:
    New functions Get/SetThreadPriorityBoost, Get/SetProcessPriorityBoost,
    GetGuiResources, GetProcessId, IsWow64Process

* win32print:
  - Printer handles are now returned as self-closing PyHANDLE subclass
  - FlushPrinter, GetDefaultPrinterW, and SetDefaultPrinterW

* win32security:
  - Added DuplicateTokenEx, AddMandatoryAce, IsTokenRestricted, LogonUserEx
  - GetTokenInformation and SetTokenInformation support new Vista
    information classes

* win32trace works better on Vista

* mmapfile:
  - Fix crash caused by reopening named mapping with excess size
  - Accept offset and view size parameters, enabling use of files larger
    than physical memory
  - Document use in help file, and a demo script

* win32timezone: support Vista and 2007 timezones.

* pythonwin:
  - Refcounting / GIL problems fixed by kxroberto.
  - Background pychecker plugin by kxroberto
  - Fix COM browser
  - Problems calling SetWindowPost on an ActiveX control.
  - Upgrade to scintilla 1.75
  - Fix problems locating the Python DLL at startup.

* isapi:
  - Handle server variables > 8k in length and also handle IIS6 'UNICODE_'
    variables.
  - TransmitFile, MapURLToPath, IsKeepConn, DisableNotifications
  - New FilterContext attribute can be used to store arbitrary Python
    objects in an ECB.
  - Filter and Extension errors that happen during initialization are
    written to the Windows Event Log to help diagnose them.  A couple
    of potential deadlocks during init errors also fixed.

* win32pipe:
    GetNamedPipeClientProcessId
    GetNamedPipeServerProcessId
    GetNamedPipeClientSessionId
    GetNamedPipeServerSessionId
    GetNamedPipeInfo

Build 210 - Sept. 23 2006
-------------------------
* Roger created win32profile module for working with user profiles
* Roger created win32cred module - interface to credentials management
* Roger added win32file functions for backing up and restoring encrypted files
* Add win32api.GetModuleFileNameW(), SetEnvironmentVariable()
* win32file.AcceptEx now indicates if the function was successful.
* OVERLAPPED objects are now hashable [ 1408485 ]
* Roger added win32file.ReplaceFile, CopyFileEx and MoveFileWithProgress
* Added win32uiole.AfxOleInit, SetMessagePendingDelay,
  EnableNotRespondingDialog and EnableBusyDialog.
* win32net gets support for USER_INFO_4 structures
* Roger changes win32file.MoveFileEx to accept NULL for destination, added
  SetFileShortName
* Missing typelibs could cause incomplete gen_py cache file [ 1548903 ]
* DISPIDs would sometime be incorrect when multiple typelibs used [ 1457673 ]
* ISAPI filters get support for HTTP_FILTER_AUTHENT and HTTP_FILTER_RAW_DATA
* Prevent ISAPI filters and extensions getting "\\?\c:\" style filenames.
* win32com.shell.shell fixes bug in FILEDESCRIPTORW packing, gets a few
  unicode related additions.
* Fix memory leak when passing datetime() objects to COM functions.

Build 209
---------
* Roger Upole added IEnumString, IShellLinkDataList, IUniformResourceLocator
  and IActiveDesktop interfaces, win32gui.GetDlgItemText/GetDlgItemInt,
  win32process.AttachThreadInput, win32api.Get/SetHandleInformation, amongst
  others
* Roger added a new win32ts module, wrapping Terminal Service functions
* Roger enhanced/fixed win32api.GetLongPathName, PyIBindCtx,
  win32gui.SystemParametersInfo/SetLayeredWindowAttributes/
  GetLayeredWindowAttributes, win32net.WNetGetResourceParent, various
  win32job methods, shell.SHFileOperation and added many monitor and display
  related functions.
* Stefan Rank and Roger enhanced DEVMODE support
* Add asynch (overlapped) support for ReadDirectoryChangesW
* Prevent warnings in later Python 2.5 releases.
* Makepy now generates working code when a method etc is named 'None'
* isapi package now handles site names with extended characters.
* Fix unwanted string value padding by using SQL_VARCHAR instead of SQL_CHAR
  in ODBC module.
* Allow extended chars in comments in IE/ASP and other AXScript applications.
* win32api.GetShortPathName now handled unicode (callingGetShortPathNameW)
* When passing large integers via win32com, we now attempt to pass as a 64
  bit integer before falling back to a float.
* Added win32process.CreateRemoteThread, win32gui.ExtTextOut/SetBkColor/
  DrawAnimatedRects, win32api.SetLastError
* Fix return code from ConnectNamedPipe when the function succeeds.
* win32gui_menu demo shows how to do owner-draw menus.
* set_file_audit demo shows ACL inheritance.
* win32gui is no longer 'split' in the help file.
* Fix errors if a timer callback or win32ui Window handler removed themselves.
* Fix memory leaks related to win32ui.CreateWnd

Build 208
---------
* pywintypes: fix reference leak in PyOVERLAPPED objects.
* isapi: fix memory leak; filter "load order" handling; error
  rendering.
* pythonwin: Disable some old DDE hacks to prevent Data Execution Prevention
  (DEP) errors in Pythonwin.
* odbc: gets support for Unicode, corrects support for BIT, and
  SQLDataSources() method.
* win32job: New win32job module for access to the win32 "job" functions
* win32inet: Add WinHttpGetIEProxyConfigForCurrentUser()
* pythoncom.Empty now does what it implies - passes a variant with VT_EMPTY.
  New pythoncom.ArgNotFound supports the old behaviour (of VT_ERROR with
  DISP_E_PARAMNOTFOUND); CoInitializeEx change described in Build 206 was
  not implemented - now it is!
* win32com: large unsigned ints may previously have been returned as negative
  Python integers; makepy no longer displays a GUI progress dialog by default.
* win32com.authorization: New package from Roger Upole.
* win32com.mapi: New IProviderAdmin support from John Nielsen; add
  IMAPIStatus support
* win32com.shell: Allow SHFileOperation to accept a string containing
  multiple file names, prevent Windows handle leak in IQueryAssociations.
* win32com.adsi: Always return extended error info when available, and expose
  ADsGetLastError explicitly.
* Leonard Ritter and Robert F�rtsch contributed some IE extension samples
  (see win32com\demos)
* .chm documentation now includes a link to search MSDN and google for many
  API functions
* Many other minor fixes and enhancements.

Build 207
--------
* Fix an error in win32gui.CreateDC() arg handling, introduced with the
  Windows CE changes in build 206.

Build 206
--------
* Prevent the "display name" of a COM object ever being Unicode and
  therefore a possible cause of unexpected Unicode decode errors.
* Correct and document behaviour of CoInitializeEx/CoInitialize exception
  throwing behaviour - previously a failure would leave a stale Python
  exception.
* Fix memory leak when doing str(PySID) (Roger Upole)
* New IE Toolbar demo contributed by Leonard Ritter, plus a few new
  AXControl related interfaces that were necessary.
* win32timezone now works in non-English Windows versions.  timezone
  objects can now be pickled (Jason Coombs)
* Prevent stale Windows errors causing win32api.GetConsoleTitle() to fail.
* Remove workaround for Python bug so we again write a file encoding to
  makepy generated files in all Python versions.
* New win32gui function CreateIconFromResource.
* Add win32file.QueryDosDevice (Roger Upole)
* Fix error when using win32pipe in a "bundled" py2exe app.
* Better support for py2exe based services, including debugging support.
* Add support for all VARIANT types in COM arrays (a few were missing)
* GetBitmapBits() can return a string or a list (a string being *much*
  faster)
* Fix win32gui taskbar demo to handle the fact explorer may not (yet) be
  running.
* win32 directory should again build on Windows CE (Luke Dunstan)
* Support for IGlobalInterfaceTable (Stefan Schukat)
* A number of pythonwin framework enhancements (Adal Chiriliuc)
* Better Auto-Complete list in pythonwin for COM objects (Jerry Gamache)
* win32api.GetVersionEx takes an optional param - if 1, we return a longer
  tuple representing the OSVERSIONINFOEX structure.

Build 205
---------
* Introduce support for Python's 'decimal' module when working with
  COM 'currency' objects - see the included .chm for more details.
* More reliable loading of pywintypes/pythoncom when these files are not in
  system32
* Allow datetime objects to be passed directly to COM functions without
  requiring explicit conversion.
* New win32crypt module for access to the windows crypto functions.
* New win32console module (Roger Upole)
* New win32com.shell.shell methods and leaks fixed, new win32gui methods
  (Roger Upole)
* pywin32.version.txt file installed, and all .dll, .pyd and .exe files
  are stamped with the pywin32 version number.
* Number of build related changes to work with the latest Platform SDK.
* Fix reference leaks when using OVERLAPPED objects with completion ports.
* win32api.GetConsoleTitle() now returns an empty string instead of
  (0, "No Error")
* makepy didn't catch all Dispatchable interfaces, and now doesn't die
  if a dependent typelib can not be loaded.
* win32com 'universal gateway' support did not handle byref args correctly.
* Fix [ 1208530 ] PyBitmap.GetBitmapBits Memory Leak
* [ 1208081 ] Fix: WaitForServiceStatus doesn't work for remote boxes
* Pythonwin patch from Matthias Haldimann: if there is a selection, use
  that as the default search string.
* Lots of win32com.adsi enhancements.
* Tweaks to the new isapi support.
* Many other minor fixes and enhancements - see the CVS log for more
  details

Build 204
---------
ChangeLog:
* New 'sspi' functions from Roger Upole which allow you to perform NTLM and
  Kerberos authentication.
* DirectSound interface contributed by Lars Immisch.
* New winxptheme module wrapping the Windows XP theme API.
* Fix bug in commctrl.py which caused many notification message values to have
  an incorrect value.  See the release notes for more information.
* Functions that returned HWND, HDC or other similar objects would raise an
  exception with "no error" whenever a handle of 0 was returned. We now only
  raise an exception when a real win32 error happens, and simply return the zero
  handle otherwise.
* More new win32gui functions (as usual!)
* ActiveDebugging enhancements from Kiriakos Vlahos.
* Python services will no longer have %System32% as the CWD when they start
  (the directory of the hosting exectutable will be used instead).  This should
  prevent ImportError due to DLLs in that System32 directory being found for
  Python imports.
* Services can specify a description that appears in win2k and later 'services'
  UI.
* All event log entries written by services report the "source" as the service
  name (previously it was always "Python Service")
* win32/scripts/verstamp.py is now useful stand-alone.
* Fix error that would cause Pythonwin to fill the registry with thousands
  of toolbar related entries.
* Correct error shutting down Pythonwin in Python 2.4
* DispatchWithEvents would always regenerate makepy module
* Fix memory leaks in the new ifilter module.
* ISAPI extension works correctly with IIS6
* win32print fixes and enhancements from Roger.
* Yet more corrections for Windows NT.

Release Notes:
This is a new build of the Python for Windows extensions.  Important notes:

* If you have implemented a GUI application which uses Common Controls, and you
  handle notification messages for these controls, a bug recently fixed in
  commctrl may impact you. Key constants in commctrl.py (eg, NM_DBLCLK) had
  incorrect values which are now correct. If your own code references these
  constants, you may be working around this bug and your code will need review.

  If your WM_NOTIFY handling code previously has something like:
     code += 0x4f0000
  You should change it to:
     code += commtrl.PY_OU
  Which will work in all pywin32 versions.  The adjustment can be removed
  if you want to work only with build 204 or later (as PY_OU is correctly
  zero in that version).  Alternatively, look at using
  win32gui_struct.UnpackWMNOTIFY()

  I apologize for this, but keeping incorrect constant values in commctrl.py
  would be the wrong thing to do.

* Files generated by makepy in Python 2.4 will not declare an encoding.  This
  is to work around Python bug http://www.python.org/sf/1163244.  If you use
  COM objects that use extended characters, a warning will be generated.

See the change log for minor changes.

Build 203
---------
* Phil Frantz contributed the start of an ISAPI framework - you can
  now implement ISAPI filters and extensions in Python! (only for
  Python 2.3 and later builds).  See the installed Help file, or
  see the site-packages\isapi\samples directory.
* Roger Upole fixed a number of security bugs, and allowed the security
  modules to again be used on NT.
* David Bolen restored service functionality for Windows NT.
* The win32gui, win32security, and win32service modules all again work
  on Windows NT.
* Roger Upole continued to enhance win32print.
* The command-line args for our service module now allow 'start' and 'stop'
  to specify a '--wait' option - this will prevent the program terminating
  until the service completely starts/stops.
* Support for CreateTypeLib2 contributed by Phil Rittenhouse.
* COM servers which specify a typelib to load now also provide this
  type-info to the caller via GetTypeInfo.
* win32api.GetLongPathName() support unicode filenames longer than MAXPATH
* win32gui gets lots of new functions.
* New 'winxpgui' module - almost identical to win32gui, but has a
  Windows XP manifest included, and a couple of extra functions not
  supported by Windows NT (AnimateWindow, FlashWindowEx, etc)
* win32gui and win32com allow a 'logger' object to be set, so unhandled
  exceptions are reported to it instead of to stderr.
* win32trace module and permon data modules now works in a terminal services
  environment.
* Thanks to Enzhou Wang, the pythoncom/pywintypes .h and .lib files
  are now installed.
* Add win32api.GetComputerNameEx() and win32api.GetComputerObjectName()
* ActiveDirectory interfaces get an upgrade and new samples.
* Fix a couple of potential buffer overflows for huge input strings.
* Fix a crash in the dbi/odbc modules.
* Pythonwin debugger should be less inclined to fill the registry with
  garbage.
* source distribution should now be complete.
* setup_win32all.py now should build correctly for most people.
* Fix more installation errors.

And lots of other bug fixes and enhancements too numerous to list here!

Build 202
---------
* Installation now works on "non-admin" installs of Python, and also
  on Windows 9x.
* Include taskscheduler and shell demos.
* New win32inet module, which provides an interface to the Microsoft
  Internet related "wininet" API.
* Many more security related functions by Roger Upole.
* New module that interfaces to Microsoft Index Server.
* Fix a bug that could cause large COM safe-arrays to crash
* Fix a number of memory leaks in COM
* shell.SHBrowseForFolder() now supports the callback param, ShellExecuteEx
  added, and a number of other shell module enhancements.
* win32trace should not lose as much data when huge amounts are being spewed.
* Add support for sorting listview controls with a sort callback.
* A number of new win32gui methods
* win32rc_parser handles icons and bitmaps etc, and also MSVC7 .rc files.
* objects from the standard 'datetime' module can be used whenever a win32
  time object is needed.
* Work better when frozen with py2exe.
* Add win32file.FindFilesIterator(), which creates an iterator based
  around FindFirstFile/FindNextFile.  Useful for huge directories.
* Fix a number of bugs relating to large integers.
* win32api.GetFullPathName() will use GetFullPathNameW, and return a Unicode
  object if passed a Unicode arg.


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


win32com.client.VARIANT

Introduction

win32com attempts to provide a seamless COM interface and hide many COM implementation details, including the use of COM VARIANT structures. This means that in most cases, you just call a COM object using normal Python objects as parameters and get back normal Python objects as results.

However, in some cases this doesn't work very well, particularly when using "dynamic" (aka late-bound) objects, or when using "makepy" (aka early-bound) objects which only declare a parameter is a VARIANT.

The win32com.client.VARIANT object is designed to overcome these problems.

Drawbacks

The primary issue with this approach is that the programmer must learn more about COM VARIANTs than otherwise - they need to know concepts such as variants being byref, holding arrays, or that some may hold 32bit unsigned integers while others hold 64bit signed ints, and they need to understand this in the context of a single method call. In short, this is a relatively advanced feature. The good news though is that use of these objects should never cause your program to hard-crash - the worst you should expect are Python or COM exceptions being thrown.

The VARIANT object

The VARIANT object lives in win32com.client. The constructor takes 2 parameters - the 'variant type' and the value. The 'variant type' is an integer and can be one or more of the pythoncom.VT_* values, possibly or'd together.

For example, to create a VARIANT object which defines a byref array of 32bit integers, you could use:

>>> from win32com.client import VARIANT
>>> import pythoncom
>>> v = VARIANT(pythoncom.VT_BYREF | pythoncom.VT_ARRAY | pythoncom.VT_I4,
...             [1,2,3,4])
>>> v
win32com.client.VARIANT(24579, [1, 2, 3, 4])
>>>
This variable can then be used whereever a COM VARIANT is expected.

Example usage with dynamic objects.

For this example we will use the COM object used for win32com testing, PyCOMTest.PyCOMTest. This object defines a method which is defined in IDL as:
HRESULT DoubleInOutString([in,out] BSTR *str);
As you can see, it takes a single string parameter which is also used as an "out" parameter - the single parameter will be updated after the call. The implementation of the method simply "doubles" the string.

If the object has a type-library, this method works fine with makepy generated support. For example:

>>> from win32com.client.gencache import EnsureDispatch
>>> ob = EnsureDispatch("PyCOMTest.PyCOMTest")
>>> ob.DoubleInOutString("Hello")
u'HelloHello'
>>>
However, if makepy support is not available the method does not work as expected. For the next example we will use DumbDispatch to simulate the object not having a type-library.
>>> import win32com.client.dynamic
>>> ob = win32com.client.dynamic.DumbDispatch("PyCOMTest.PyCOMTest")
>>> ob.DoubleInOutString("Hello")
>>>
As you can see, no result came back from the function. This is because win32com has no type information available to use, so doesn't know the parameter should be passed as a byref parameter. To work around this, we can use the VARIANT object.

The following example explicitly creates a VARIANT object with a variant type of a byref string and a value 'Hello'. After making the call with this VARIANT the value is updated.

>>> import win32com.client.dynamic
>>> from win32com.client import VARIANT
>>> import pythoncom
>>> ob = win32com.client.dynamic.DumbDispatch("PyCOMTest.PyCOMTest")
>>> variant = VARIANT(pythoncom.VT_BYREF | pythoncom.VT_BSTR, "Hello")
>>> variant.value # check the value before the call.
'Hello'
>>> ob.DoubleInOutString(variant)
>>> variant.value
u'HelloHello'
>>>

Usage with generated objects

In most cases, objects with makepy support (ie, 'generated' objects) don't need to use the VARIANT object - the type information means win32com can guess the right thing to pass. However, in some cases the VARIANT object can still be useful. Imagine a poorly specified object with IDL like:
HRESULT DoSomething([in] VARIANT value);
But also imagine that the object has a limitation that if the parameter is an integer, it must be a 32bit unsigned value - any other integer representation will fail.

If you just pass a regular Python integer to this function, it will generally be passed as a 32bit signed integer and given the limitation above, will fail. The VARIANT object allows you to work around the limitation - just create a variant object VARIANT(pythoncom.VT_UI4, int_value) and pass that - the function will then be called with the explicit type you specified and will succeed.

Note that you can not use a VARIANT object to override the types described in a type library. If a makepy generated class specifies that a VT_UI2 is expected, attempting to pass a VARIANT object will fail. In this case you would need to hack around the problem. For example, imagine ob was a COM object which a method called foo and you wanted to override the type declaration for foo by passing a VARIANT. You could do something like:

>>> import win32com.client.dynamic
>>> from win32com.client import VARIANT
>>> import pythoncom
>>> dumbob = win32com.client.dynamic.DumbDispatch(ob)
>>> variant = VARIANT(pythoncom.VT_BYREF | pythoncom.VT_BSTR, "Hello")
>>> dumbob.foo(variant)
The code above converts the makepy supported ob into a 'dumb' (ie, non-makepy supported) version of the object, which will then allow you to use VARIANT objects for the problematic methods.


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.


Python 3.x support

Introduction

pywin32 now supports Python 3.x. Note that the Python source code is maintained in Python 2.x syntax and automatically converted to Python 3.x syntax using the 2to3 tool. Please don't submit patches etc using Python 3.x syntax.

Unicode everywhere

In general, pywin32 on Python 2.x will accept both str and unicode objects and convert as appropriate. However, in py3k, bytes objects will generally not be accepted when a 'string' is required - the intent is to restrict usage of bytes objects in py3k to where bytes truly are meant.

Most pywin32 modules for py3k are built with UNICODE defined, and thus will call the Unicode versions of the Windows API.

Specific module notes

isapi

The isapi package supports py3k, but note that currently only the redirector.py sample has been converted to work in both environments - in particular, subtle urllib changes will probably require attention - see the redirector sample for details.

Note that ISAPI itself is a narrow-character based API. As a result, functions such as GetServerVariable() etc all return bytes objects - it is up to the application to interpret those bytes. pywin32 detects server variables starting with UNICODE_ and does return unicode objects in that case - see the IIS documentation for more details.

If you pass a unicode object to the ISAPI functions, it will be automatically encoded using the default encoding rather than the 'mbcs' encoding used by the rest of pywin32. In general this should be avoided as IIS doesn't define an encoding.

datetime objects

Python 3.x builds use a subclass of datetime.datetime objects as the "native" datetime object; a subclass is used to provive a backwards compatible PyDateTime.Format method, but otherwise the datetime object is identical to the base class. All time objects returned by pywin32 will have a UTC timezone (via the win32timezone.TimeZoneInfo.utc() method), and times with any timezone will be accepted when passed to pywin32 - but "time zone naive" objects are *not* supported.

Note that it is possible we will support "time zone naive" objects in the future, as supporting such objects in the future will be fully backwards compatible. However, it is not yet clear that supporting such objects is helpful due to the ambiguities that may arise, and attempting to remove such support in the future would cause more problems than enabling it.

The win32timezone.now and win32timezone.utcnow methods may be useful when working with datetime objects.