SystemError: NULL result without error in call_object
Gaetan Corneau
corg at copernic.com
Tue May 9 18:35:50 EDT 2000
Hello,
I'm trying to implement a collection and an enumerator in a COM object using
Delphi 5. The following script works:
import com # Just a shortcut
try:
o = com.Dispatch("TestDLLDriver.TestLib")
o.LoadTestDLL("d:/Compiled/MyDll.dll", "d:/out.txt") # This loads a
"plugin" DLL containing test functions
print "DLL Name:", o.DLLName
print "Test Lib Name:", o.Name
print "Test Lib Description:", o.Description
print "Output File Name:", o.OutputFileName
print "Number of Test Cases:", o.TestCases.Count
#****** HERE *******
for i in range(0, o.TestCases.Count):
tc = o.TestCases.Item(i)
print "Test Case Name:", tc.Name
print "Running Test Case:", tc.Run()
o.UnloadTestDLL()
except Exception, x:
print "\n\nException:", x
This one doesn't:
import com
try:
o = com.Dispatch("TestDLLDriver.TestLib")
o.LoadTestDLL("d:/Compiled/MyDll.dll", "d:/out.txt")
print "DLL Name:", o.DLLName
print "Test Lib Name:", o.Name
print "Test Lib Description:", o.Description
print "Output File Name:", o.OutputFileName
print "Number of Test Cases:", o.TestCases.Count
# **** HERE ****
for tc in o.TestCases:
print "Test Case Name:", tc.Name
print "Running Test Case:", tc.Run()
o.UnloadTestDLL()
except Exception, x:
print "\n\nException:", x
I traced the Delphi code, everything is called fine, but I get this:
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "d:\Apps\Python\win32com\client\dynamic.py", line 174, in __getitem__
return self._get_good_object_(self._enum_.__getitem__(index))
File "d:\Apps\Python\win32com\client\util.py", line 37, in __getitem__
return self.__GetIndex(index)
File "d:\Apps\Python\win32com\client\util.py", line 53, in __GetIndex
result = self._oleobj_.Next(1)
SystemError: NULL result without error in call_object
There is obviously something wrong in my Delphi code (I'm learning Delphi
right now), but I really don't know what that error message means, and where
it comes from.
Anyone could help?
Thanks,
______________________________________________________
Gaetan Corneau
Software Developer
Copernic.com
http://www.copernic.com
E-mail: corg at copernic.com
______________________________________________________
"Les Télétubbies, c'est de la musique d'ascenseur pour les yeux"
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/B/MU d- s+:++ a C++
UL+ P--- W+ N- K- W++ t--
!5 X- R+ tv-- b++ DI++
G e++ h---- r+++ y++++
------END GEEK CODE BLOCK------
More information about the Python-list
mailing list