• Welcome to Theos PowerBasic Museum 2017.

News:

Attachments are only available to registered users.
Please register using your full, real name.

Main Menu

Memory access violation, in PBCC, when initializing from an ActiveX

Started by Dan Campbell, July 07, 2013, 09:58:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dan Campbell

Hi,

I tried this on an older laptop, from Vb6, in order to confirm there's nothing wrong with the ActiveX.

In Powerbasic, I'm trying to reconstruct the 'Simple Example' of using the Gold Parser DLL.

In the attached example, no code generation is written yet, but it's getting an error when trying to load the grammar.  If Compile and Execute, then we get the standard SimpleInterpreter.exe has stopped working.  If Debug, then it reports a Memory Access violation, when attempting to execute

iGoldParser.LoadCompiledGrammar( "c:\Projects_Programming\PowerBasic\GoldParserSimpleInterpreter\Simple02.cgt" )


http://www.goldparser.org/engine/1/vb6/doc/index.htm

The documentation for LoadCompiledGrammar at
http://www.goldparser.org/engine/1/vb6/doc/object-goldparser.htm

says

LoadCompiledGrammar (FileName)   Boolean   If the Compiled Grammar Table file is successfully loaded the method returns True; otherwise False. This method must be called before any Parse calls are made.




José Roca

You can not initialize an object using the IID. You have to use the PROGID.

Dan Campbell

Quote from: José Roca on July 07, 2013, 10:14:20 PM
You can not initialize an object using the IID. You have to use the PROGID.

Perfect, thanks Jose.