Skip to main content

[archive] Help with calling dll

  • April 27, 2009
  • 3 replies
  • 0 views

Dominique Sacre
Forum|alt.badge.img+2

[Migrated content. Thread originally posted on 24 April 2009]

This is my first time to try and call a dll from a cobol program. Thanks for any help. The documentation for the dll is attached. I have tried several different formats but can't get anything to work, would someone be willing to show me some code that I can start with.

Thanks,

3 replies

Dominique Sacre
Forum|alt.badge.img+2

[Migrated content. Thread originally posted on 24 April 2009]

This is my first time to try and call a dll from a cobol program. Thanks for any help. The documentation for the dll is attached. I have tried several different formats but can't get anything to work, would someone be willing to show me some code that I can start with.

Thanks,
I had a quick look at the documentation, and I think you can do this. However, we need to know what to populate the elements in the variant array. Would be good if you had a vb example of how to do this.

Having said this, are you sure this is a DLL function?

Dominique Sacre
Forum|alt.badge.img+2

[Migrated content. Thread originally posted on 24 April 2009]

This is my first time to try and call a dll from a cobol program. Thanks for any help. The documentation for the dll is attached. I have tried several different formats but can't get anything to work, would someone be willing to show me some code that I can start with.

Thanks,
Whatever other problems you may have, nothing will work if you do not have the correct value in: SET ENVIRONMENT "DLL-CONVENTION" TO "0" (or to "1")

Dominique Sacre
Forum|alt.badge.img+2

[Migrated content. Thread originally posted on 24 April 2009]

This is my first time to try and call a dll from a cobol program. Thanks for any help. The documentation for the dll is attached. I have tried several different formats but can't get anything to work, would someone be willing to show me some code that I can start with.

Thanks,
Another little tip, if you are certain everything is being called properly and you have all the data correct. You could try replacing trailing spaces with low-values ont he data being passed. Some api and dll calls seem to need the low values go figure.