Re: How to Passs NULL as a IDispatch Pointer to method?

2007-04-18 Thread Larry Bates
Yingpu Zhao wrote: > Thanks to Larry. > I want to pass the IDispatch pointer of other COM object to > AddShapeInfo or pass null to tell x do nothing. > for example. > > Rect= Dispatch("Rect.Document") > ShapeSet = Dispatch("xxx.Document") > ShapeSet.AddShapeInfo("Rect", 0, Shape) > > or > > Shap

Re: How to Passs NULL as a IDispatch Pointer to method?

2007-04-17 Thread Yingpu Zhao
Thanks to Larry. I want to pass the IDispatch pointer of other COM object to AddShapeInfo or pass null to tell x do nothing. for example. Rect= Dispatch("Rect.Document") ShapeSet = Dispatch("xxx.Document") ShapeSet.AddShapeInfo("Rect", 0, Shape) or ShapeSet.AddShapeInfo("EmptyShape", 0, None) -

Re: How to Passs NULL as a IDispatch Pointer to method?

2007-04-17 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Hello,all > I am using win32com to use com. and invoke a method as follows: > void AddShapeInfo(LPCTSTR name, LONG type, IDispatch* pDisp); > but i pass 0 or None to third parameter and get error info: > x.AddShapeInfo("who", 10, 0) > > Traceback (most recent cal

How to Passs NULL as a IDispatch Pointer to method?

2007-04-16 Thread ZhaoYingpu
Hello,all I am using win32com to use com. and invoke a method as follows: void AddShapeInfo(LPCTSTR name, LONG type, IDispatch* pDisp); but i pass 0 or None to third parameter and get error info: >>> x.AddShapeInfo("who", 10, 0) Traceback (most recent call last): File "", line 1, in x.Ad