Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 215
  • Last Modified:

Dynamic function call on VMS

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
jvinicius
Asked:
jvinicius
1 Solution
 
syscykCommented:
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
 
stassCommented:
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now