Solved

Call a DLL on Windows from AS400

Posted on 2003-11-06
6
821 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Programmer 26 575
AS/400 - Steps to finding what the problem is? 20 127
vmware on IBM X3960 with HA - Idiots Guide 8 129
iSeries - Library Change Date 2 120
A hard and fast method for reducing Active Directory Administrators members.
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

738 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