[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Dynamic function call on VMS

Posted on 2000-04-13
2
Medium Priority
?
214 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 180 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

Technology Partners: 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

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

650 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