Skip to main content

I am new at trying to call VB6 DLL's from NetExpress 5.1 Cobol. Can someone explain it to me in beginner speech please?

  • September 4, 2018
  • 8 replies
  • 0 views

 VB6 DLL is called CallMSMQ.DLL  if this helps

8 replies

  • Author
  • Rocketeer
  • 19312 replies
  • September 4, 2018

 VB6 DLL is called CallMSMQ.DLL  if this helps

I had problem calling VB6 with structured parameters, but with individual parameters it was fine. Sample program contained in community.microfocus.com/.../netexpress-calling-vb-dll-passint-group-structure if it is of help to you.

  • Author
  • Rocketeer
  • 19312 replies
  • September 4, 2018

 VB6 DLL is called CallMSMQ.DLL  if this helps

Thanks for the reply. I am looking at it right now. Still kind of confusing. I was looking more for an example of the flow used to call vb6 DLL's from Cobol. That's the confusing part....

  • Author
  • Rocketeer
  • 19312 replies
  • September 4, 2018

 VB6 DLL is called CallMSMQ.DLL  if this helps

Thanks for the reply. I am looking at it right now. Still kind of confusing. I was looking more for an example of the flow used to call vb6 DLL's from Cobol. That's the confusing part....

  • 0 replies
  • September 4, 2018

 VB6 DLL is called CallMSMQ.DLL  if this helps

Simply
CALL "MSMQ.DLL"

  • Author
  • Rocketeer
  • 19312 replies
  • September 4, 2018

 VB6 DLL is called CallMSMQ.DLL  if this helps

Thanks again, but I have to incorporate the VB6.DLL written by someone else into the MicroFocus Cobol program. For Purposes of a starting point i called it CallMSMQ.DLL. It is actually a DLL written in VB6 by someone else.

  • Author
  • Rocketeer
  • 19312 replies
  • September 4, 2018

 VB6 DLL is called CallMSMQ.DLL  if this helps

If simply calling it does not work as suggested above you may nee to use "Object Link Environment" OLE. As in example I referenced. The Dll will contain subroutines or functions which may or may not require parameters and you will need this detail to call.
class-control.
TheDll is class "$OLE$CallMSMQ.ClassNme". >>>>> Classname should be in spec but is normally the orginal name of the DLL
data division.
working-storage section.
01 DLL-Obj object reference.
....
procedure division.
main section.

invoke TheDll "new" returning DLL-Obj. '>>>>>> Load the DLL only done once

invoke DLL-Obj "Sub1" using Param1 Param2 .... '>>>>>> perform Subroutine Sub1 passing parameters this can be repeated

NOTE Parameters MUST map Integers are "s9(9) comp-5" , Strings must be terminated by x"00"

You may need to know more about the DLL you should have a specification.

If You call a function you need the returning call to get the value back.

Hope this helps.

  • Author
  • Rocketeer
  • 19312 replies
  • September 4, 2018

 VB6 DLL is called CallMSMQ.DLL  if this helps

Bingo, that helps quite bit. Thank you. If more clarification is needed, I know who to ask. again, thanks!

  • Author
  • Rocketeer
  • 19312 replies
  • September 4, 2018

 VB6 DLL is called CallMSMQ.DLL  if this helps

Bingo, that helps quite bit. Thank you. If more clarification is needed, I know who to ask. again, thanks!