Skip to main content

We have a VB .net GUI front end and a back end in NetExpress COBOL.

I am trying to call the NetExpress COBOL executables from the VB, which  worked in the past.  However, the setddldirectory is pointing to C:\\MPIUADEV\\MPIUA\\DEV\\visualcobol\\bin and it should be using the path where the NetExpress code is.  I don't know how it got changed and/or how to change it back to point to the correct directory,

 SetDllDirectory()
        If NativeMethods.SetDllDirectory(CobolDirectory) Then
            NativeMethods.RMVBEBTCH(batchLinkage)
        Else
            Throw New EbixException("Unable to set COBOL Directory.")
        End If
        Return batchLinkage
    End Function

 Public Shared Sub SetDllDirectory()
        If Not String.IsNullOrWhiteSpace(CobolDirectory) Then
            ChDrive(CobolDirectory)
            ChDir(CobolDirectory)
        End If
    End Sub

 


#vb.net
#setdlldirectory
#netexpress

We have a VB .net GUI front end and a back end in NetExpress COBOL.

I am trying to call the NetExpress COBOL executables from the VB, which  worked in the past.  However, the setddldirectory is pointing to C:\\MPIUADEV\\MPIUA\\DEV\\visualcobol\\bin and it should be using the path where the NetExpress code is.  I don't know how it got changed and/or how to change it back to point to the correct directory,

 SetDllDirectory()
        If NativeMethods.SetDllDirectory(CobolDirectory) Then
            NativeMethods.RMVBEBTCH(batchLinkage)
        Else
            Throw New EbixException("Unable to set COBOL Directory.")
        End If
        Return batchLinkage
    End Function

 Public Shared Sub SetDllDirectory()
        If Not String.IsNullOrWhiteSpace(CobolDirectory) Then
            ChDrive(CobolDirectory)
            ChDir(CobolDirectory)
        End If
    End Sub

 


#vb.net
#setdlldirectory
#netexpress

How are you setting the value of CobolDirectory prior to getting into the code that you have shown?

It sounds as if perhaps you have installed Visual COBOL on the same computer on which you are trying to run Net Express and that the value of COBDIR for Visual COBOL is overriding the setting of COBDIR for Net Express?

Where is this originally coming from in your VB code: "C:\\MPIUADEV\\MPIUA\\DEV\\visualcobol\\bin" ?

Thanks.


We have a VB .net GUI front end and a back end in NetExpress COBOL.

I am trying to call the NetExpress COBOL executables from the VB, which  worked in the past.  However, the setddldirectory is pointing to C:\\MPIUADEV\\MPIUA\\DEV\\visualcobol\\bin and it should be using the path where the NetExpress code is.  I don't know how it got changed and/or how to change it back to point to the correct directory,

 SetDllDirectory()
        If NativeMethods.SetDllDirectory(CobolDirectory) Then
            NativeMethods.RMVBEBTCH(batchLinkage)
        Else
            Throw New EbixException("Unable to set COBOL Directory.")
        End If
        Return batchLinkage
    End Function

 Public Shared Sub SetDllDirectory()
        If Not String.IsNullOrWhiteSpace(CobolDirectory) Then
            ChDrive(CobolDirectory)
            ChDir(CobolDirectory)
        End If
    End Sub

 


#vb.net
#setdlldirectory
#netexpress

The only place I know explicitly where the cobdir is set is as an env variable, and is \\\\oracle\\I-drive\\Micro Focus\\Server 5.1\\Bin - not the same as what the setdll is pointing to.

I've used visual cobol and netexpress with vb.net (in the case of netexpress, using the gui front end) before on the same pc and not had this trouble.  I guess the problem is I don't know where setdlldirectory is getting this path from and how to change it for Net Express.  The only diff I can think of is that we are using svn to get the latest vb .net front end from the cloud.