Solved

Call a DLL on Windows from AS400

Posted on 2003-11-06
6
814 Views
Last Modified: 2012-06-27
Is it  possible to Invoke/Call a DLL on a windows Platform From an AS/400 passing it various Parameters and then wait until a return value is received.
Thanks for your help in Advance.
0
Comment
Question by:Philip_Lang
  • 3
6 Comments
 
LVL 14

Accepted Solution

by:
daveslater earned 125 total points
ID: 9694637
Hi
The only way I know of doing it  is write a VB/C++ etc program that reads a reques from a dataq calls the DLL and sents the result back via the dataq

dataq access is part of client  access and there are may examples provided by IBM.

Let me know if you need more details on dataq's

dave
0
 
LVL 14

Expert Comment

by:daveslater
ID: 9694673
Or if it is interactive
Your could write the parms to a file in QDLS or the IFS,
use
STRPCO
and
STRPCCMD
to run a PC program to read the parms, write the data back to a file and read it.

Dave
0
 
LVL 2

Expert Comment

by:xinger
ID: 9763864
Never tried it, but perhaps the following about rundll32.exe will give you another direction to look...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tools/tools/rundll32.asp
0
 
LVL 1

Expert Comment

by:SuperCCA
ID: 10494147
A little more infromation on the underlying requirement might help as you will not be able to access any DLL function directly. The interfaces described above only work for an executable file. The data queues suggestion is solid but it will mean that the iSeries session will need to wait for a reply but full consideration must be given to the possibility of the PC program not responding.

You can pass parameters to an exceutable PC file via the command line on the STRPCCMD but there is no capability to return a value.

If you wanted to get cute you could:
1. initiate a PC program passing parameters via STRPCCMD.
2. get that PC program to acquire the iSeries session using EHLLAPI
3. once the PC program has calcaulated the response this could be posted into a hidden field again using EHLLAPI
4. the PC program could then send an AID key to the iSeries session so that it reads the hidden firled
5. Release the EHLLAPI lock in the PC program and end the PC program

This will work but may over-engineer your problem.
0
 
LVL 14

Expert Comment

by:daveslater
ID: 10807868

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept DaveSlater comment as answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Dave Slater
Page Editor


0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Owning a franchise can be the dream of a lifetime. It provides a chance for economic growth. You can be as successful as you want.  To make your franchise successful, you need to market it successfully. Here are six of the best marketing strategies …
Is your company's data protection keeping pace with virtualization? Here are 7 dynamic ways to adapt to rapid breakthroughs in technology.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now