Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Fortran Programming Language

Question about a F77 Win32 DLL that uses a Common Block...


Hello,

I'm just trying to verify some information I'm seeing with an app I'm
working on. I'm more of a C\C++ programmer, so I apologize if I'm
using incorrect terms.

I'm helping debug a VB.NET 2005 app (.NET 2.0) that's interfacing with
a F77 DLL. The DLL uses a common block and runs fine when there's only
one instance of the VB app running. When multiple instances of VB are
running it appears that variables in the common block are being mixed
up between the 2 apps.

So, from what I've read and what I'm seeing, would the common block be
the equivalent to shared memory that both apps are accessing? I'm
trying to wrap my head around the problem in terms I understand.

Thank you,

Jason

Jason wrote:
> I'm just trying to verify some information I'm seeing with an app I'm
> working on. I'm more of a C\C++ programmer, so I apologize if I'm
> using incorrect terms.

(snip)

> So, from what I've read and what I'm seeing, would the common block be
> the equivalent to shared memory that both apps are accessing? I'm
> trying to wrap my head around the problem in terms I understand.

COMMON should be equivalent to a C or C++ extern struct.
That is, one declared outside any function and without the
static (sic) attribute.

Given that the idea of DLL is sharing a single copy of a library
across multiple users, it doesn't seem to surprising that it
would also happen to COMMON.

COMMON was added to Fortran long before shared memory, or even
running more than one program at a time.

-- glen

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc