![]() |
#1
|
|||
|
|||
![]()
Hi,
I want to execute CorelScript function from C#. but at the debug time this error is returned: // The Exception: Unable to cast COM object of type 'PHOTOPAINT.CorelScript' to interface type 'PHOTOPAINT.ICorelScript'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{3B5A0001-F896-49B4-B985-37191F200B7A}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). // and is my code (tested with X5): public void MainSub() { if (AppcorelInst == null) { AppcorelInst = new PHOTOPAINT.Application(); } PHOTOPAINT.CorelScript cs = (PHOTOPAINT.CorelScript)AppcorelInst.CorelScript(); MessageBox.Show(cs.GetDocumentName()); } and is the same problem with this code(Tested with X4): public static void voidtest( PHOTOPAINT.Application app ) { PHOTOPAINT.CorelScriptClass cs = new PHOTOPAINT.CorelScriptClass(); try { string testy= cs.GetDocumentName(); MessageBox.Show(testy); } catch (Exception e) { MessageBox.Show(e.Message); } } ( all this code use the Framework 3.5 ! ) What is the interface class for CorelScript and CorelScriptTool ? It is possible to run it from C# !? best regard |
#3
|
|||
|
|||
![]()
OK, shelbym!
Do you know the Photo paint Object Model function, equivalence for: SetDocumentInfo RectangleTool FillSolid Rectangle MaskRemove ToleranceSettings FileImport MaskRectangle MaskFloaterTranslate BitmapEffect ObjectSelectNone ? regards, |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
CorelScript.BitmapEffect Run-time error 61704 | ALEKSEY | CorelDRAW/Corel DESIGNER VBA | 5 | 29-08-2005 10:30 |
CorelScript.BitmapEffect Run-time error 61704 | ALEKSEY | General | 1 | 29-08-2005 01:26 |
error while calling CorelScript.EditRestoreCheckpoint | rsinnig | Corel Photo-Paint VBA | 1 | 01-11-2003 06:14 |
Type Mismatch error in Corel PhotoPaint V9 | NEHovis | Corel Photo-Paint VBA | 2 | 17-07-2003 05:19 |
CorelScript to VBA | dominiqueL | CorelDRAW/Corel DESIGNER VBA | 4 | 19-01-2003 01:29 |