tags:

views:

116

answers:

1

I want that global variables that sit in some DLL will be seen from other DLLs and EXE of that project.

I included in that VB file "Option Explicit On" as the first line .

But still no one can see my variables that were defined in that file . I made that all DLLs of that project depend to that one with the definition , but nothing helped me.

I am using module and all my variables are public .

Option Explicit On

Module LPSoft_Core

#Region "Public"
Public FormHdrText As String = "PC"
Public PCBLWebHomeAddr As String = "http://"
Public PCBMSupportAddr As String = "https://emea"
Public PgmDir As String
Public GridSp As Double = 5 'mm'
Public str_GAAlpha(20) As String

Public pLoc As Point
Public Convu2mm As Single = 0.001 'convert microns to mm'
Public Convmm2u As Integer = 1000 '1 / ConvFactor_u2mm 'convert mm to microns''
Public Convmm2Inch As Double = 1 / 25.4
Public Convmm2Mil As Double = 1 / 0.0254

Public LogFile As Integer
Public strLog As String 'holds log info when logfile can't be written
#End Region

#Region "Enums"
Public Enum eCompOrient
    IPC = 0
    IEC = 1
    VPL = 2
End Enum
Public Enum eHdrGrp
    None = 0
    Alpha = 1
    OneRowOneCol = 2
    OneRowMultiCol = 3
    OneColMultiRow = 4
    TwoRowTwoCol = 5
    TwoRowMultiCol = 6
    TwoColMultiRow = 7
    MultiRowMultiCol = 8
End Enum
Public Enum PinNumber
    RowAlpha
    ColAlpha
    Numeric = 0
    Alpha = 1
End Enum

Any idea?

+2  A: 

According to this MSDN page, Module is Friend by default. To be able to access it from a different project, you need to declare it as Public like this:

Public Module LPSoft_Core
    ...
End Module
Meta-Knight