Solved

Call a DLL on Windows from AS400

Posted on 2003-11-06
6
822 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
This article outlines some of the reasons why an email message gets flagged as spam on a recipient's end.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

724 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