Re: [Harbour] OLE objects syntax...

2009-11-20 Thread Viktor Szakáts
Hi Mindaugas, > An easy (but I do not know if it is correct) way to solve this problem is to > use DISPATCH_PROPERTYPUT | DISPATCH_PROPERTYPUTREF instead of > DISPATCH_PROPERTYPUT in Invoke() call. Actually we use such technique on > access: DISPATCH_PROPERTYGET | DISPATCH_METHOD. But my sugges

Re: [Harbour] OLE objects syntax...

2009-11-16 Thread francesco perillo
> > I still have problems with 100% cpu load when I call ::cClose() but > I'm investigating on this It seems that I have this problem only in the demo program... I will investigate i f possible... Francesco ___ Harbour mailing list (attachment size

Re: [Harbour] OLE objects syntax...

2009-11-16 Thread francesco perillo
> This can be solved by using "_" in front of method to force > DISPATCH_PROPERTYPUT. So, >   oPdfApp:_cOption( "UseAutoSave" , 1 ) > do the job. Yes, it does. Thank you ! I still have problems with 100% cpu load when I call ::cClose() but I'm investigating on this Francesco

Re: [Harbour] OLE objects syntax...

2009-11-15 Thread Viktor Szakáts
> In this case I agree that final type for error codes should be existing > HB_ERRCODE and this type should be converted to 'unsigned int' but before > you will change it please check all places in the Harbour SVN which will > be effected by such modification. We have to well know them. I'm mostly

Re: [Harbour] OLE objects syntax...

2009-11-15 Thread Viktor Szakáts
Hi Przemek, > Viktor, > > The bad thing with abstracted types is the fact the it makes creating > interface between Harbour and other tools harder. > As long as Harbour uses well known types then it's quite easy. > When I have a function in some library which needs as parameter variable as > type

Re: [Harbour] OLE objects syntax...

2009-11-15 Thread Przemysław Czerpak
On Sun, 15 Nov 2009, Szak�ts Viktor wrote: > >> // Error BASE/3012 Argument error: COPTION > >> // Called from WIN_OLEAUTO:COPTION(0) > >> // Called from SAMPLE(42) > > The real error code is 0x8002000E DISP_E_BADPARAMCOUNT > > It would be nice to have real OLE error code instead of 3012, but the

Re: [Harbour] OLE objects syntax...

2009-11-15 Thread Viktor Szakáts
>> // Error BASE/3012 Argument error: COPTION >> // Called from WIN_OLEAUTO:COPTION(0) >> // Called from SAMPLE(42) > > The real error code is 0x8002000E DISP_E_BADPARAMCOUNT > > It would be nice to have real OLE error code instead of 3012, but the problem > is that error codes are USHORT and O

Re: [Harbour] OLE objects syntax...

2009-11-15 Thread Mindaugas Kavaliauskas
Hi, #ifdef FIRST1 oPdfApp:cOption( "UseAutoSave" ) := 1 // Compiler error #endif #ifdef FIRST2 oPdfApp:cOption( "UseAutoSave" , 1 ) // runtime error #endif // I've used OleView.exe to see PDFCreator methods. It shows: [id(0x68030009), propget] HRESULT cOption([in] BSTR PropertyName,

Re: [Harbour] OLE objects syntax...

2009-11-15 Thread francesco perillo
Here it is, save it as sample.prg, compiling is with these lines (the first one doesn't compile...) Comments and error messages in the code... hbmk2 sample.prg xhb.lib hbwin.lib -ofirst1 -dFIRST1 hbmk2 sample.prg xhb.lib hbwin.lib -ofirst2 -dFIRST2 hbmk2 sample.prg xhb.lib hbwin.lib -osecond -dSEC

Re: [Harbour] OLE objects syntax...

2009-11-14 Thread Mindaugas Kavaliauskas
Hi, In Harbour I can: ? object:cOption("property") and have the correct value but I don't know how to set that value ! Do you have any self contained sample? object:cOption("property") := .T. is not accepted by the compiler, Just like STR(7) := .T. object:cOption("property", .T.) is a r