COMatePlus and error running Demo_Excel code in program

Just starting out? Need help? Post your questions and find answers here.
User avatar
emerkel
New User
New User
Posts: 3
Joined: Tue Nov 02, 2004 12:40 am
Location: Edmond OK

COMatePlus and error running Demo_Excel code in program

Post by emerkel »

All,

I need to write some data to excel and wanted to use COMatePLUS to do it. I am running PB 5.50 Windows X64, COMatePLUS Version 1.2 released 09th July 2010, and Excel 2016. I can run the Demo_Excel.pb file stand alone without issue. Everything works.

When I try to run the same code from inside my program however I get an error:

[13:51:07][ERROR] COMatePLUS.pbi (Line: 1383)
[13:51:07][ERROR] Procedure stack has been corrupted.

I have tried calling this same method from a separate file I was going to use for COMatePLUS related code and on getting this error there, I tried moving the code into my main file, thinking there may be some issue with context or the like. Neither one works, and I get the same error both times.

The line in my code I am getting the error on is this one - straight from Demo_Excel.pb but running in my main.pb file:

Code: Select all

If ExcelObject\SetProperty("Visible = #True") = #S_OK
I would love it if someone could help me understand how to remedy this. I am ready, willing, and able to do whatever might be needed to help you help me.

Thanks,
Eddie
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: COMatePlus and error running Demo_Excel code in program

Post by srod »

Best bet may be to start stripping out bits of your main code until you get to the point where the COMatePLUS crash disappears. If you can identify something which may be at odds with COMate then that might shed some light on what is going on.

You are not using multiple threads by any chance are you?
I may look like a mule, but I'm not a complete ass.
zikitrake
Addict
Addict
Posts: 834
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Re: COMatePlus and error running Demo_Excel code in program

Post by zikitrake »

Yeah, I know it's a little old thread. But I had the same mistake and solved it by disabling the Purifier in Compiler Options.

(CoMatePlus v1.2)
Post Reply