comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: OPI function wave_execute fails on VMS
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: OPI function wave_execute fails on VMS [message #31110] Thu, 13 June 2002 15:00
Dave Greenwood is currently offline  Dave Greenwood
Messages: 33
Registered: October 2000
Member
In a previous article, GuidoVent@web.de (Guido Vent) wrote:
> Hallo all,
>
> I use then PV-Wave OPI extension to execute Wave-commands from a
> C-DLL, which is called via LINKNLOAD from Wave. On WinNt this works
> fine, but on VMS I get an access violation:
>
> %SYSTEM-F-ACCVIO, access violation, reason mask=01, virtual
> address=FFFFFFFC, PC=0065FAD8, PSL=03C00004
> % LINKNLOAD: Error in called routine.
> % Execution halted at $MAIN$ (LINKNLOAD).
>
> Here is the C source:
>
> #include "opi_c_devel.h"
>
> long Wave_Test(int argc, char *argv[])
> {
> char **text = ((char ***)argv)[0];
> printf("%s\n",*text);
> wave_execute(*text);
> return 0;
> }
>
>
> Other OPI-functions like wave_get_WVH or wvh_dataptr work fine.

I'm not much of a C programmer, but I think you need to declare your
main routine to be "int main" rather than "long Wave_Test". I suspect
something like the following will work:

#include <stdio.h>
#include "opi_c_devel.h"

int main(int argc, char *argv[])
{
char *text = argv[0];
printf("%s\n",text);
wave_execute(text);
return 0;
}

Note (1) the inclusion of stdio.h to avoid complaints about printf being
implicitly declared a function
(2) the simpler use of text

Hth,
Dave
--------------
Dave Greenwood Email: Greenwoodde@ORNL.GOV
Oak Ridge National Lab %STD-W-DISCLAIMER, I only speak for myself
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Memory Mapped Files
Next Topic: IDLWAVE 4.14 Release - idlwave.org

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:28:54 PDT 2025

Total time taken to generate the page: 0.00553 seconds