def TestQueryInterface(long_lived_server=0, iterations=5):
    tester = win32com.client.Dispatch('PyCOMTest.PyCOMTest')
    if long_lived_server:
        t0 = win32com.client.Dispatch('Python.Test.PyCOMTest', clsctx=pythoncom.CLSCTX_LOCAL_SERVER)
    prompt = ['Testing QueryInterface without long-lived local-server #%d of %d...', 'Testing QueryInterface with long-lived local-server #%d of %d...']
    for i in range(iterations):
        progress((prompt[(long_lived_server != 0)] % ((i + 1), iterations)))
        tester.TestQueryInterface()
def TestQueryInterface(long_lived_server=0, iterations=5):
    tester = win32com.client.Dispatch('PyCOMTest.PyCOMTest')
    if long_lived_server:
        t0 = win32com.client.Dispatch('Python.Test.PyCOMTest', clsctx=pythoncom.CLSCTX_LOCAL_SERVER)
    prompt = ['Testing QueryInterface without long-lived local-server #%d of %d...', 'Testing QueryInterface with long-lived local-server #%d of %d...']
    for i in range(iterations):
        progress((prompt[(long_lived_server != 0)] % ((i + 1), iterations)))
        tester.TestQueryInterface()