The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Origin controlled by another application
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

elquin

Republic of Korea
7 Posts

Posted - 02/04/2015 :  7:25:06 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2015 (64bit)
Operating System: Windows 7 64bit

My group use Origin as plotting tool of huge data analysis with main program A.
The program A is written in Visual C#(maybe) and Origin is called through DLL, as shown in
..\OriginLabs\Origin2015\Samples\Origin C Examples\Programming Guide\Calling C DLL.
However when we try to close Origin after being called from program A, the error message comes as;

Origin cannot be closed because it is being controlled by another application

And we cannot close Origin.
How do we solve this..??

Sophy

China
Posts

Posted - 02/04/2015 :  10:32:11 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
hi, Elquin:

I guess you are using Origin as COM server to be called within your program A, then you were referring to a wrong example, "Calling C DLL" means write extension module as a dll file, and to be invoked in Origin C.

From your description, I suggest you refer to the example at "\Samples\COM Server and Client\CSharp\Realtime Send Data To Wks\Realtime Send Data To Wks", which use Origin as COM server in a C# application.(When you connect to Origin, and leave the "Realtime Send Data To Wks.exe" running, try to close Origin will see the warning message "Origin...being controlled by another application", yet if you close that "Realtime Send Data To Wks.exe", then you can close Origin without any problem, can check the C# code to see how it release control of Origin COM Server, System.Runtime.InteropServices.Marshal.FinalReleaseComObject(m_originApp);)

Edited by - Sophy on 02/04/2015 10:34:10 PM
Go to Top of Page

elquin

Republic of Korea
7 Posts

Posted - 02/08/2015 :  7:46:38 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you for your help.
Also, it would be more helpful if there's guide or manual related origin c or c# for origin.

Edited by - elquin on 02/08/2015 7:47:02 PM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000