CVF and ActiveX

CVF and ActiveX

Hi !

I have a major problem. I want to display a plot in a modeless dialogbox, using CVF. To do this, I use the Compaq Array Visualizer, and inserts it as a ActiveX object. The Module Wizard then creates a file with wrappers and stuff.

This works fine, I can display my plot, but the problem appears when I try to change the scale on the x-axis. I found a function in the Wizard-generated file :
LOGICAL*2 FUNCTION $DAvis2D_SetAxisScale($OBJECT, dim, data, $STATUS)
So I simply call this function from my program :

retlog = DlgGet(dlg, IDC_AVIS2DCTRL,havis,DLG_IDISPATCH)
call faglStartWatch(x_scale,status)
call faglGetShareName(x_scale,x_scalename,status)
call $DAvis2D_SetAxisScale(havis, 0, x_scalename, $STATUS = retint)

But the compiler gives me a warning :
Warning: DEC$ ATTRIBUTES DLLIMPORT is ignored for non-external procedure. [$DAVIS2D_SETAXISSCALE]

How do I fix this? I am a very bad programmer, and I have looked all over for some example that I can use, but I can't find any. I really need som help on this one.
I guess the function with the $ should not be called directly. But I am not sure. I am really greatful for any kind of help.

8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Does the code work despite the warning? I think you can ignore the warning.


Retired 12/31/2016

Hi !

The error causes the program to crash sometimes. I have drawn the conclusion that it is because of the error since it never crashes when I don't use the setaxisscale-function.
When the program crashes I get the errormessage "Unhandled exception in myprogram.exe (AVIS2D.OCX): 0*0000005:Access Violation". (in debugmode.) If I just run the .exe-file the errormessage displayed is that the 'memory could not be read'.

The crash often appears when I call the function for the second time (if the dialogbox with the activexcontrol is closed and then started again).
The really strange part is that I tried the program on another computer, and there there was no warning, and no crashes.

Thank you very much for helping


The warning is unrelated to your run-time errors. There is apparently some problem in the operation of the call. I'm unfamiliar with AV programming so can't help with that.


Retired 12/31/2016


Did you ever discover what was causing the warning?

Warning: DEC$ ATTRIBUTES DLLIMPORT is ignored for non-external procedure. [$DAVIS2D_SETAXISSCALE]

I'm getting the same warning.


The runtime error is caused by a synchronization bug in the code for the control. Depending upon how the threads are executed it may crash or not.

There probably won't be any updates to the Compaq Array Visualier, but this problem shouldn't be an issue with the new version of Array Visualizer to be released with Intel Fortran v 7.0.

John Readey

It's good to hear that the Array Visualizer will persist in Intel Fortran v 7.0.

On the business of axis scaling, here's hoping that the next release of AV has support for logarithmetic scaling, a must for visualizing the disparate scales of data in scientific/engineering applications.

Gerry T.

Yes, the next version of AV will support log scales.

Leave a Comment

Please sign in to add a comment. Not a member? Join today