Solved

Dynamic function call on VMS

Posted on 2000-04-13
2
211 Views
Last Modified: 2010-04-15
Is it possible to develop something to work as a DLL on VMS operating system using C? In other words, how can make functions able to be dynamic called by other programs in that OS?
0
Comment
Question by:jvinicius
[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
2 Comments
 
LVL 1

Expert Comment

by:syscyk
ID: 2716297
One thing that I did in VMS was to write a process that blocked on an IP port, waiting for clients.  When a request came, I spawned a thread that serviced the request and sent the answer back to the caller, then terminated itself.  Of course, you have to figure an interface between client and server process, but it isn't too hard.  As you add functions to the server, the client just has to know how to ask for them. I simply numbered them.  So, a request message might look like this:
FUNCTION NUMBER:FUNCTION PARAM1:PARAM2:RETURN BUFFER
and so on.  Send this message to the server process via TCP/IP, however you want.
   This scheme actually works, and I had a server like this in production for years.  The good part is, the client can be a process on the VAX, or a PC client on the network who can do TCP/IP calls.
0
 
LVL 4

Accepted Solution

by:
stass earned 60 total points
ID: 2735861
Yes of course.
for more information go to http://www.openvms.compaq.com:8000/index.html and read documentation "Linker utility manual"

Example:
source for DLL module
[--cut--]
int dll_func01()
 {
   ...
 }
[--cut--]

compile source to object cc FILE.C will produce FILE.OBJ

command file to  make dll (shared library in VMS terms) on alpha:
[--cut--]
$link /share FILE.OBJ, - sys$input:/options
symbol_vector = (dll_func01 = procedure)
[--cut--]
this command file produce dll FILE.EXE
simple command file to link with this dll
[--cut--]
$link my_program, sys$input:/options
file.exe/share
[--cut--]
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

734 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