Skip to main content

Uniface 9: Problem using Call-out COM with WORD

  • November 19, 2018
  • 11 replies
  • 0 views

Jan Cees Boogaard

Problem using Call-out COM with WORD

Author: rmeaille@medinfo.fr (foster06)

Hello all,

I tried to change all my "oild-fashion" call to Winword to the new one using signatures.

It's a very huge work and more when you don't understand why a simple call does not work.

As the Uniface documentation said (see IntegrateComWord 2.0), I have already created my WORD application.

I can open a file using WORD_DOCUMENTS signature.

2 problems raised :

1) first, I would like to keep in a variable the DOCUMENT object returned by Open method. I alway have error. I think that it's impossible. Do you agree ?

2) second, I need the DOCUMENT object, so I created the Operation ACTIVE_DOCUMENT on WORD Object.

ACTIVE_DOCUMENT has ActiveDocument as literal Name ans return value in fist parameter in Detail of Operation.

ACTIVE_DOCUMENT has one OUT parameter that is a Handle on WORD_DOCUMENT.

The signature WORD_DOCUMENT is created in my application with Implementation COM.

When I do the following :

$H_WORD$->DOCUMENTS($DOCUMENTS$)

$DOCUMENTS$->OPEN(FILENAME)

$H_WORD$->ACTIVE_DOCUMENT($DOCUMENT$)

 

I have a procerror = -155

"ICCDRV-COM-ERR Error with ICC system occurred, UNIFACE error -155 occurred while processing parameter 1 in internal handler "Out::EXOB2UF""

 I don't understand why. Is anybody has a idea and could help me.

 

Thanks a lot.

 

11 replies

Jan Cees Boogaard

Problem using Call-out COM with WORD

Author: rmeaille@medinfo.fr (foster06)

Hello all,

I tried to change all my "oild-fashion" call to Winword to the new one using signatures.

It's a very huge work and more when you don't understand why a simple call does not work.

As the Uniface documentation said (see IntegrateComWord 2.0), I have already created my WORD application.

I can open a file using WORD_DOCUMENTS signature.

2 problems raised :

1) first, I would like to keep in a variable the DOCUMENT object returned by Open method. I alway have error. I think that it's impossible. Do you agree ?

2) second, I need the DOCUMENT object, so I created the Operation ACTIVE_DOCUMENT on WORD Object.

ACTIVE_DOCUMENT has ActiveDocument as literal Name ans return value in fist parameter in Detail of Operation.

ACTIVE_DOCUMENT has one OUT parameter that is a Handle on WORD_DOCUMENT.

The signature WORD_DOCUMENT is created in my application with Implementation COM.

When I do the following :

$H_WORD$->DOCUMENTS($DOCUMENTS$)

$DOCUMENTS$->OPEN(FILENAME)

$H_WORD$->ACTIVE_DOCUMENT($DOCUMENT$)

 

I have a procerror = -155

"ICCDRV-COM-ERR Error with ICC system occurred, UNIFACE error -155 occurred while processing parameter 1 in internal handler "Out::EXOB2UF""

 I don't understand why. Is anybody has a idea and could help me.

 

Thanks a lot.

 

hi

Did you define the OPEN operation on your own or by "generate signatue"?

We do have much more parameter then "FILENAME" :-)

Try to define an extra first parameter "DOCUMENT" ,

  • type = BASIC and  "handle"
  • classification = "DOCUMENT"   (The name of the "word-document" signature)
  • direction =OUT
  • On mask "Operation parameter" check  "Return value in first parameter"

Compile, create URR and try this one:

$DOCUMENTS$->OPEN($DOCUMENT$,FILENAME)

 

Ingo


Author: istiller (i2stiller@gmx.de)

Jan Cees Boogaard

Problem using Call-out COM with WORD

Author: rmeaille@medinfo.fr (foster06)

Hello all,

I tried to change all my "oild-fashion" call to Winword to the new one using signatures.

It's a very huge work and more when you don't understand why a simple call does not work.

As the Uniface documentation said (see IntegrateComWord 2.0), I have already created my WORD application.

I can open a file using WORD_DOCUMENTS signature.

2 problems raised :

1) first, I would like to keep in a variable the DOCUMENT object returned by Open method. I alway have error. I think that it's impossible. Do you agree ?

2) second, I need the DOCUMENT object, so I created the Operation ACTIVE_DOCUMENT on WORD Object.

ACTIVE_DOCUMENT has ActiveDocument as literal Name ans return value in fist parameter in Detail of Operation.

ACTIVE_DOCUMENT has one OUT parameter that is a Handle on WORD_DOCUMENT.

The signature WORD_DOCUMENT is created in my application with Implementation COM.

When I do the following :

$H_WORD$->DOCUMENTS($DOCUMENTS$)

$DOCUMENTS$->OPEN(FILENAME)

$H_WORD$->ACTIVE_DOCUMENT($DOCUMENT$)

 

I have a procerror = -155

"ICCDRV-COM-ERR Error with ICC system occurred, UNIFACE error -155 occurred while processing parameter 1 in internal handler "Out::EXOB2UF""

 I don't understand why. Is anybody has a idea and could help me.

 

Thanks a lot.

 

Thanks a lot Ingo,

I have defined the OPEN operation himself. Do you think that it's not correct ?

I will try your solution and I'll reply after.

 


Author: foster06 (rmeaille@medinfo.fr)

Jan Cees Boogaard

Problem using Call-out COM with WORD

Author: rmeaille@medinfo.fr (foster06)

Hello all,

I tried to change all my "oild-fashion" call to Winword to the new one using signatures.

It's a very huge work and more when you don't understand why a simple call does not work.

As the Uniface documentation said (see IntegrateComWord 2.0), I have already created my WORD application.

I can open a file using WORD_DOCUMENTS signature.

2 problems raised :

1) first, I would like to keep in a variable the DOCUMENT object returned by Open method. I alway have error. I think that it's impossible. Do you agree ?

2) second, I need the DOCUMENT object, so I created the Operation ACTIVE_DOCUMENT on WORD Object.

ACTIVE_DOCUMENT has ActiveDocument as literal Name ans return value in fist parameter in Detail of Operation.

ACTIVE_DOCUMENT has one OUT parameter that is a Handle on WORD_DOCUMENT.

The signature WORD_DOCUMENT is created in my application with Implementation COM.

When I do the following :

$H_WORD$->DOCUMENTS($DOCUMENTS$)

$DOCUMENTS$->OPEN(FILENAME)

$H_WORD$->ACTIVE_DOCUMENT($DOCUMENT$)

 

I have a procerror = -155

"ICCDRV-COM-ERR Error with ICC system occurred, UNIFACE error -155 occurred while processing parameter 1 in internal handler "Out::EXOB2UF""

 I don't understand why. Is anybody has a idea and could help me.

 

Thanks a lot.

 

I tried and OPEN returned the same $procerror = -155.

But the file is well opened !!!

How My signature WORD_DOCUMENT should be created ?

I have created it as the WORD_DOCUMENTS signature.

Thanks for your help.


Author: foster06 (rmeaille@medinfo.fr)

Jan Cees Boogaard

Problem using Call-out COM with WORD

Author: rmeaille@medinfo.fr (foster06)

Hello all,

I tried to change all my "oild-fashion" call to Winword to the new one using signatures.

It's a very huge work and more when you don't understand why a simple call does not work.

As the Uniface documentation said (see IntegrateComWord 2.0), I have already created my WORD application.

I can open a file using WORD_DOCUMENTS signature.

2 problems raised :

1) first, I would like to keep in a variable the DOCUMENT object returned by Open method. I alway have error. I think that it's impossible. Do you agree ?

2) second, I need the DOCUMENT object, so I created the Operation ACTIVE_DOCUMENT on WORD Object.

ACTIVE_DOCUMENT has ActiveDocument as literal Name ans return value in fist parameter in Detail of Operation.

ACTIVE_DOCUMENT has one OUT parameter that is a Handle on WORD_DOCUMENT.

The signature WORD_DOCUMENT is created in my application with Implementation COM.

When I do the following :

$H_WORD$->DOCUMENTS($DOCUMENTS$)

$DOCUMENTS$->OPEN(FILENAME)

$H_WORD$->ACTIVE_DOCUMENT($DOCUMENT$)

 

I have a procerror = -155

"ICCDRV-COM-ERR Error with ICC system occurred, UNIFACE error -155 occurred while processing parameter 1 in internal handler "Out::EXOB2UF""

 I don't understand why. Is anybody has a idea and could help me.

 

Thanks a lot.

 

It's working now.

I just added a OPERATION (CLOSE) in my signature DOCUMENT.

Very strange, it seems that a signature without at least one operation could not be used with COM.

Thanks. I continue.

Perhaps if the idea of Theo Neeskens to create a open source to put Uniface sample and utilities was done, I will find the solution in it. So vote Yes for the creation of this site.

 

 


Author: foster06 (rmeaille@medinfo.fr)

Jan Cees Boogaard

Problem using Call-out COM with WORD

Author: rmeaille@medinfo.fr (foster06)

Hello all,

I tried to change all my "oild-fashion" call to Winword to the new one using signatures.

It's a very huge work and more when you don't understand why a simple call does not work.

As the Uniface documentation said (see IntegrateComWord 2.0), I have already created my WORD application.

I can open a file using WORD_DOCUMENTS signature.

2 problems raised :

1) first, I would like to keep in a variable the DOCUMENT object returned by Open method. I alway have error. I think that it's impossible. Do you agree ?

2) second, I need the DOCUMENT object, so I created the Operation ACTIVE_DOCUMENT on WORD Object.

ACTIVE_DOCUMENT has ActiveDocument as literal Name ans return value in fist parameter in Detail of Operation.

ACTIVE_DOCUMENT has one OUT parameter that is a Handle on WORD_DOCUMENT.

The signature WORD_DOCUMENT is created in my application with Implementation COM.

When I do the following :

$H_WORD$->DOCUMENTS($DOCUMENTS$)

$DOCUMENTS$->OPEN(FILENAME)

$H_WORD$->ACTIVE_DOCUMENT($DOCUMENT$)

 

I have a procerror = -155

"ICCDRV-COM-ERR Error with ICC system occurred, UNIFACE error -155 occurred while processing parameter 1 in internal handler "Out::EXOB2UF""

 I don't understand why. Is anybody has a idea and could help me.

 

Thanks a lot.

 

Hi,   I am using excel and get the same -155 error. Did you ever get around to resolving your problem. I would like to know you did.


Author: Dennis Vorst (dennis.vorst@uniface.com)

Jan Cees Boogaard

Problem using Call-out COM with WORD

Author: rmeaille@medinfo.fr (foster06)

Hello all,

I tried to change all my "oild-fashion" call to Winword to the new one using signatures.

It's a very huge work and more when you don't understand why a simple call does not work.

As the Uniface documentation said (see IntegrateComWord 2.0), I have already created my WORD application.

I can open a file using WORD_DOCUMENTS signature.

2 problems raised :

1) first, I would like to keep in a variable the DOCUMENT object returned by Open method. I alway have error. I think that it's impossible. Do you agree ?

2) second, I need the DOCUMENT object, so I created the Operation ACTIVE_DOCUMENT on WORD Object.

ACTIVE_DOCUMENT has ActiveDocument as literal Name ans return value in fist parameter in Detail of Operation.

ACTIVE_DOCUMENT has one OUT parameter that is a Handle on WORD_DOCUMENT.

The signature WORD_DOCUMENT is created in my application with Implementation COM.

When I do the following :

$H_WORD$->DOCUMENTS($DOCUMENTS$)

$DOCUMENTS$->OPEN(FILENAME)

$H_WORD$->ACTIVE_DOCUMENT($DOCUMENT$)

 

I have a procerror = -155

"ICCDRV-COM-ERR Error with ICC system occurred, UNIFACE error -155 occurred while processing parameter 1 in internal handler "Out::EXOB2UF""

 I don't understand why. Is anybody has a idea and could help me.

 

Thanks a lot.

 

I have a procerror = -155 "ICCDRV-COM-ERR Error with ICC system occurred, UNIFACE error -155 occurred while processing parameter 1 in internal handler "Out::EXOB2UF"

  PUSH!


Author: Daniel_Kurz (kurzster@gmail.com)

Jan Cees Boogaard

Problem using Call-out COM with WORD

Author: rmeaille@medinfo.fr (foster06)

Hello all,

I tried to change all my "oild-fashion" call to Winword to the new one using signatures.

It's a very huge work and more when you don't understand why a simple call does not work.

As the Uniface documentation said (see IntegrateComWord 2.0), I have already created my WORD application.

I can open a file using WORD_DOCUMENTS signature.

2 problems raised :

1) first, I would like to keep in a variable the DOCUMENT object returned by Open method. I alway have error. I think that it's impossible. Do you agree ?

2) second, I need the DOCUMENT object, so I created the Operation ACTIVE_DOCUMENT on WORD Object.

ACTIVE_DOCUMENT has ActiveDocument as literal Name ans return value in fist parameter in Detail of Operation.

ACTIVE_DOCUMENT has one OUT parameter that is a Handle on WORD_DOCUMENT.

The signature WORD_DOCUMENT is created in my application with Implementation COM.

When I do the following :

$H_WORD$->DOCUMENTS($DOCUMENTS$)

$DOCUMENTS$->OPEN(FILENAME)

$H_WORD$->ACTIVE_DOCUMENT($DOCUMENT$)

 

I have a procerror = -155

"ICCDRV-COM-ERR Error with ICC system occurred, UNIFACE error -155 occurred while processing parameter 1 in internal handler "Out::EXOB2UF""

 I don't understand why. Is anybody has a idea and could help me.

 

Thanks a lot.

 

Does the below problem is solved? If yes, please let me know how. I have a procerror = -155 “ICCDRV-COM-ERR Error with ICC system occurred, UNIFACE error -155 occurred while processing parameter 1 in internal handler “Out::EXOB2UF” Thanks.


Author: Satheesh (satheesh.balu.m@gmail.com)

Jan Cees Boogaard

Problem using Call-out COM with WORD

Author: rmeaille@medinfo.fr (foster06)

Hello all,

I tried to change all my "oild-fashion" call to Winword to the new one using signatures.

It's a very huge work and more when you don't understand why a simple call does not work.

As the Uniface documentation said (see IntegrateComWord 2.0), I have already created my WORD application.

I can open a file using WORD_DOCUMENTS signature.

2 problems raised :

1) first, I would like to keep in a variable the DOCUMENT object returned by Open method. I alway have error. I think that it's impossible. Do you agree ?

2) second, I need the DOCUMENT object, so I created the Operation ACTIVE_DOCUMENT on WORD Object.

ACTIVE_DOCUMENT has ActiveDocument as literal Name ans return value in fist parameter in Detail of Operation.

ACTIVE_DOCUMENT has one OUT parameter that is a Handle on WORD_DOCUMENT.

The signature WORD_DOCUMENT is created in my application with Implementation COM.

When I do the following :

$H_WORD$->DOCUMENTS($DOCUMENTS$)

$DOCUMENTS$->OPEN(FILENAME)

$H_WORD$->ACTIVE_DOCUMENT($DOCUMENT$)

 

I have a procerror = -155

"ICCDRV-COM-ERR Error with ICC system occurred, UNIFACE error -155 occurred while processing parameter 1 in internal handler "Out::EXOB2UF""

 I don't understand why. Is anybody has a idea and could help me.

 

Thanks a lot.

 

Satheesh said Does the below problem is solved? If yes, please let me know how. I have a procerror = -155 “ICCDRV-COM-ERR Error with ICC system occurred, UNIFACE error -155 occurred while processing parameter 1 in internal handler “Out::EXOB2UF” Thanks.  

Can you please show the complete Sourcecode that you use. At which position does the error occur?


Author: Lauterbach (norbert.lauterbach@infraserv.com)

Jan Cees Boogaard

Problem using Call-out COM with WORD

Author: rmeaille@medinfo.fr (foster06)

Hello all,

I tried to change all my "oild-fashion" call to Winword to the new one using signatures.

It's a very huge work and more when you don't understand why a simple call does not work.

As the Uniface documentation said (see IntegrateComWord 2.0), I have already created my WORD application.

I can open a file using WORD_DOCUMENTS signature.

2 problems raised :

1) first, I would like to keep in a variable the DOCUMENT object returned by Open method. I alway have error. I think that it's impossible. Do you agree ?

2) second, I need the DOCUMENT object, so I created the Operation ACTIVE_DOCUMENT on WORD Object.

ACTIVE_DOCUMENT has ActiveDocument as literal Name ans return value in fist parameter in Detail of Operation.

ACTIVE_DOCUMENT has one OUT parameter that is a Handle on WORD_DOCUMENT.

The signature WORD_DOCUMENT is created in my application with Implementation COM.

When I do the following :

$H_WORD$->DOCUMENTS($DOCUMENTS$)

$DOCUMENTS$->OPEN(FILENAME)

$H_WORD$->ACTIVE_DOCUMENT($DOCUMENT$)

 

I have a procerror = -155

"ICCDRV-COM-ERR Error with ICC system occurred, UNIFACE error -155 occurred while processing parameter 1 in internal handler "Out::EXOB2UF""

 I don't understand why. Is anybody has a idea and could help me.

 

Thanks a lot.

 

foster06 said Hello all, I tried to change all my "oild-fashion" call to Winword to the new one using signatures. It's a very huge work and more when you don't understand why a simple call does not work. As the Uniface documentation said (see IntegrateComWord 2.0), I have already created my WORD application. I can open a file using WORD_DOCUMENTS signature. 2 problems raised : 1) first, I would like to keep in a variable the DOCUMENT object returned by Open method. I alway have error. I think that it's impossible. Do you agree ? 2) second, I need the DOCUMENT object, so I created the Operation ACTIVE_DOCUMENT on WORD Object. ACTIVE_DOCUMENT has ActiveDocument as literal Name ans return value in fist parameter in Detail of Operation. ACTIVE_DOCUMENT has one OUT parameter that is a Handle on WORD_DOCUMENT. The signature WORD_DOCUMENT is created in my application with Implementation COM. When I do the following : $H_WORD$->DOCUMENTS($DOCUMENTS$) $DOCUMENTS$->OPEN(FILENAME) $H_WORD$->ACTIVE_DOCUMENT($DOCUMENT$)   I have a procerror = -155 "ICCDRV-COM-ERR Error with ICC system occurred, UNIFACE error -155 occurred while processing parameter 1 in internal handler "Out::EXOB2UF""  I don't understand why. Is anybody has a idea and could help me.   Thanks a lot.    

I used the generate signature process in Uniface to create the signatures necessary for Word COM. I also edited them because I figured out that you don't need all the parameters that Word has to offer. In the case of the what you have here: $DOCUMENTS$->OPEN(FILENAME) I would execute a similar, but different line: $DOCUMENTS$->OPEN(FILENAME,CONFIRMCONVERSIONS,READONLY) Those 2 extra parameters could be the difference and it is important to note that all 3 parameters are defined in the signature as "IN". These parameters aren't listed as required on MSDN website: https://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.documents.open.aspx Hope this helps!


Author: adkinsl (adkins.larry@gmail.com)

Jan Cees Boogaard

Problem using Call-out COM with WORD

Author: rmeaille@medinfo.fr (foster06)

Hello all,

I tried to change all my "oild-fashion" call to Winword to the new one using signatures.

It's a very huge work and more when you don't understand why a simple call does not work.

As the Uniface documentation said (see IntegrateComWord 2.0), I have already created my WORD application.

I can open a file using WORD_DOCUMENTS signature.

2 problems raised :

1) first, I would like to keep in a variable the DOCUMENT object returned by Open method. I alway have error. I think that it's impossible. Do you agree ?

2) second, I need the DOCUMENT object, so I created the Operation ACTIVE_DOCUMENT on WORD Object.

ACTIVE_DOCUMENT has ActiveDocument as literal Name ans return value in fist parameter in Detail of Operation.

ACTIVE_DOCUMENT has one OUT parameter that is a Handle on WORD_DOCUMENT.

The signature WORD_DOCUMENT is created in my application with Implementation COM.

When I do the following :

$H_WORD$->DOCUMENTS($DOCUMENTS$)

$DOCUMENTS$->OPEN(FILENAME)

$H_WORD$->ACTIVE_DOCUMENT($DOCUMENT$)

 

I have a procerror = -155

"ICCDRV-COM-ERR Error with ICC system occurred, UNIFACE error -155 occurred while processing parameter 1 in internal handler "Out::EXOB2UF""

 I don't understand why. Is anybody has a idea and could help me.

 

Thanks a lot.

 

Hi Larry, very nice suggestion. Happy New Year to you as well as all the other uniface customers, Uli


Author: ulrich-merkel (ulrichmerkel@web.de)

Jan Cees Boogaard

Problem using Call-out COM with WORD

Author: rmeaille@medinfo.fr (foster06)

Hello all,

I tried to change all my "oild-fashion" call to Winword to the new one using signatures.

It's a very huge work and more when you don't understand why a simple call does not work.

As the Uniface documentation said (see IntegrateComWord 2.0), I have already created my WORD application.

I can open a file using WORD_DOCUMENTS signature.

2 problems raised :

1) first, I would like to keep in a variable the DOCUMENT object returned by Open method. I alway have error. I think that it's impossible. Do you agree ?

2) second, I need the DOCUMENT object, so I created the Operation ACTIVE_DOCUMENT on WORD Object.

ACTIVE_DOCUMENT has ActiveDocument as literal Name ans return value in fist parameter in Detail of Operation.

ACTIVE_DOCUMENT has one OUT parameter that is a Handle on WORD_DOCUMENT.

The signature WORD_DOCUMENT is created in my application with Implementation COM.

When I do the following :

$H_WORD$->DOCUMENTS($DOCUMENTS$)

$DOCUMENTS$->OPEN(FILENAME)

$H_WORD$->ACTIVE_DOCUMENT($DOCUMENT$)

 

I have a procerror = -155

"ICCDRV-COM-ERR Error with ICC system occurred, UNIFACE error -155 occurred while processing parameter 1 in internal handler "Out::EXOB2UF""

 I don't understand why. Is anybody has a idea and could help me.

 

Thanks a lot.

 

foster06 said 2 problems raised : 1) first, I would like to keep in a variable the DOCUMENT object returned by Open method. I alway have error. I think that it's impossible. Do you agree ? 2) second, I need the DOCUMENT object, so I created the Operation ACTIVE_DOCUMENT on WORD Object. ACTIVE_DOCUMENT has ActiveDocument as literal Name ans return value in fist parameter in Detail of Operation. ACTIVE_DOCUMENT has one OUT parameter that is a Handle on WORD_DOCUMENT. The signature WORD_DOCUMENT is created in my application with Implementation COM. When I do the following : $H_WORD$->DOCUMENTS($DOCUMENTS$) $DOCUMENTS$->OPEN(FILENAME) $H_WORD$->ACTIVE_DOCUMENT($DOCUMENT$)   I have a procerror = -155 "ICCDRV-COM-ERR Error with ICC system occurred, UNIFACE error -155 occurred while processing parameter 1 in internal handler "Out::EXOB2UF""  I don't understand why. Is anybody has a idea and could help me.   Thanks a lot.    

In the given scenario, the error -155 is probably caused by the fact that the signature WORD_DOCUMENT has no operations defined. A COM signature (that is instantiated by a return parameter of another operation) needs at least one valid operation. Otherwise the mentioned error is thrown. Other possible scenarios where the -155 error could be thrown: > an Out parameter that should return a handle is defined as (e.g.) string, or > an Out parameter that is defined as handle is using an incorrect classification (e.g. pointing to an invalid or non-existing COM signature, e.g. "?UNKNOWN?") And it is possible to keep the object returned by Open in a variable. Just specify in the detail of the Open operation that the return value should be put in the first parameter (and that then points to the WORD_DOCUMENT signature). The FileName parameter now is defined as second parameter. Something like this:

$H_WORD$->DOCUMENTS($DOCUMENTS$) $DOCUMENTS$->OPEN($DOCUMENTS$, FILENAME) But in general, it's easier to import the COM signature of (e.g.) Word using the command line option /sti /mwr=com (e.g. /sti /mwr=com /pid Word.Application). Okay, the imported signatures need some tweaking in some cases, but it's much less work than creating the signatures from scratch. Hope this helps. Daniel


Author: diseli (daniel.iseli@uniface.com)