Skip to main content

[Migrated content. Thread originally posted on 05 September 2005]

Hi everybody.

I?m trying to use the AcuGT Automation server from both visual basic and Acucobol itself.

When used from VB there is no problem at all, but if I try to invoke the initialize method from Acucobol I get a "Memory Access Violation Message.

The DEF file was created with Acucobol v7.0.0.
Basically the code is as follows:


...

01 H-UACUGT    HANDLE OF @AcuGT.

...

01  W-PARAMS   PIC X(30) VALUE "-y u.lib -c config.ini".
01  H-PARAMS    HANDLE OF VARIANT.

...

CREATE @AcuGT HANDLE IN H-UACUGT.

CALL "C$SETVARIANT" USING W-PARAMS H-PARAMS.
[B]MODIFY H-UACUGT @Initialize(BY NAME @cmdLine H-PARAMS).[/B]
...



I get the error when executing the MODIFY verb.

[Migrated content. Thread originally posted on 05 September 2005]

Hi everybody.

I?m trying to use the AcuGT Automation server from both visual basic and Acucobol itself.

When used from VB there is no problem at all, but if I try to invoke the initialize method from Acucobol I get a "Memory Access Violation Message.

The DEF file was created with Acucobol v7.0.0.
Basically the code is as follows:


...

01 H-UACUGT    HANDLE OF @AcuGT.

...

01  W-PARAMS   PIC X(30) VALUE "-y u.lib -c config.ini".
01  H-PARAMS    HANDLE OF VARIANT.

...

CREATE @AcuGT HANDLE IN H-UACUGT.

CALL "C$SETVARIANT" USING W-PARAMS H-PARAMS.
[B]MODIFY H-UACUGT @Initialize(BY NAME @cmdLine H-PARAMS).[/B]
...



I get the error when executing the MODIFY verb.
You are not supposed to use C$SETVARIANT. Just pass the ordinary COBOL data. The runtime does the rest.


MODIFY H-UACUGT @Initialize(W-PARAMS).

[Migrated content. Thread originally posted on 05 September 2005]

Hi everybody.

I?m trying to use the AcuGT Automation server from both visual basic and Acucobol itself.

When used from VB there is no problem at all, but if I try to invoke the initialize method from Acucobol I get a "Memory Access Violation Message.

The DEF file was created with Acucobol v7.0.0.
Basically the code is as follows:


...

01 H-UACUGT    HANDLE OF @AcuGT.

...

01  W-PARAMS   PIC X(30) VALUE "-y u.lib -c config.ini".
01  H-PARAMS    HANDLE OF VARIANT.

...

CREATE @AcuGT HANDLE IN H-UACUGT.

CALL "C$SETVARIANT" USING W-PARAMS H-PARAMS.
[B]MODIFY H-UACUGT @Initialize(BY NAME @cmdLine H-PARAMS).[/B]
...



I get the error when executing the MODIFY verb.
Thanks Gisle, now works fine. I'd think I was tested that.

But I have another problem. I want to use the following logic:



@Initialize(params)

@Call(program)
@Cancel(program)

@Call(program)
@Cancel(program

....

@Shutdown()


That is, after initializing the runtime I want to call multiple cobol programs and, finally, shutdown the runtime.

The problem comes when the first cobol program ends because, it doesn't closes its INITIAL window. In fact, when the second process starts, it runs into that "remaining" window left by the first process (or looks like).

Why this window is not closed ?

Thanks in advance.

[Migrated content. Thread originally posted on 05 September 2005]

Hi everybody.

I?m trying to use the AcuGT Automation server from both visual basic and Acucobol itself.

When used from VB there is no problem at all, but if I try to invoke the initialize method from Acucobol I get a "Memory Access Violation Message.

The DEF file was created with Acucobol v7.0.0.
Basically the code is as follows:


...

01 H-UACUGT    HANDLE OF @AcuGT.

...

01  W-PARAMS   PIC X(30) VALUE "-y u.lib -c config.ini".
01  H-PARAMS    HANDLE OF VARIANT.

...

CREATE @AcuGT HANDLE IN H-UACUGT.

CALL "C$SETVARIANT" USING W-PARAMS H-PARAMS.
[B]MODIFY H-UACUGT @Initialize(BY NAME @cmdLine H-PARAMS).[/B]
...



I get the error when executing the MODIFY verb.
The automation server as well as the ordinary runtime always have the initial window. You may choose to hide it, but it remains. This is the sink in which all the Windows messages goes.

[Migrated content. Thread originally posted on 05 September 2005]

Hi everybody.

I?m trying to use the AcuGT Automation server from both visual basic and Acucobol itself.

When used from VB there is no problem at all, but if I try to invoke the initialize method from Acucobol I get a "Memory Access Violation Message.

The DEF file was created with Acucobol v7.0.0.
Basically the code is as follows:


...

01 H-UACUGT    HANDLE OF @AcuGT.

...

01  W-PARAMS   PIC X(30) VALUE "-y u.lib -c config.ini".
01  H-PARAMS    HANDLE OF VARIANT.

...

CREATE @AcuGT HANDLE IN H-UACUGT.

CALL "C$SETVARIANT" USING W-PARAMS H-PARAMS.
[B]MODIFY H-UACUGT @Initialize(BY NAME @cmdLine H-PARAMS).[/B]
...



I get the error when executing the MODIFY verb.
So (I'm persistent), are there any method to hidding a window other than using the windows API ?

Thank you.

[Migrated content. Thread originally posted on 05 September 2005]

Hi everybody.

I?m trying to use the AcuGT Automation server from both visual basic and Acucobol itself.

When used from VB there is no problem at all, but if I try to invoke the initialize method from Acucobol I get a "Memory Access Violation Message.

The DEF file was created with Acucobol v7.0.0.
Basically the code is as follows:


...

01 H-UACUGT    HANDLE OF @AcuGT.

...

01  W-PARAMS   PIC X(30) VALUE "-y u.lib -c config.ini".
01  H-PARAMS    HANDLE OF VARIANT.

...

CREATE @AcuGT HANDLE IN H-UACUGT.

CALL "C$SETVARIANT" USING W-PARAMS H-PARAMS.
[B]MODIFY H-UACUGT @Initialize(BY NAME @cmdLine H-PARAMS).[/B]
...



I get the error when executing the MODIFY verb.
Sorry, I'd posted too quickly.

From the Acucobol side:

MODIFY WINDOW MyInitialWindow VISIBLE FALSE.

before exiting the run unit

Thanks again.