OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > Corel Script > Corel Photo-Paint CS

Thread Tools Search this Thread Display Modes
Old 20-04-2011, 05:09
lebaron lebaron is offline
Junior Member
Join Date: Nov 2007
Posts: 20
Default PHOTOPAINT CorelScript cast error with C#


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();


and is the same problem with this code(Tested with X4):

public static void voidtest( PHOTOPAINT.Application app )
PHOTOPAINT.CorelScriptClass cs = new PHOTOPAINT.CorelScriptClass();
string testy= cs.GetDocumentName();
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
Reply With Quote
Old 20-04-2011, 20:24
shelbym's Avatar
shelbym shelbym is offline
Senior Member
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,788
Blog Entries: 12
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default CorelScript and C#

I don't think it is possible to use CorelScript from C#. At least I have never seen is successfully done.

Reply With Quote
Old 28-04-2011, 04:50
lebaron lebaron is offline
Junior Member
Join Date: Nov 2007
Posts: 20

OK, shelbym!

Do you know the Photo paint Object Model function, equivalence for:


Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CorelScript.BitmapEffect Run-time error 61704 ALEKSEY CorelDRAW/Corel DESIGNER VBA 5 29-08-2005 09:30
CorelScript.BitmapEffect Run-time error 61704 ALEKSEY General 1 29-08-2005 00:26
error while calling CorelScript.EditRestoreCheckpoint rsinnig Corel Photo-Paint VBA 1 01-11-2003 05:14
Type Mismatch error in Corel PhotoPaint V9 NEHovis Corel Photo-Paint VBA 2 17-07-2003 04:19
CorelScript to VBA dominiqueL CorelDRAW/Corel DESIGNER VBA 4 19-01-2003 00:29

All times are GMT -5. The time now is 22:13.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com