P
pauld
I want to be able to access some global variables (defined in a
winforms "ApplicationEvents.vb") from a DLL.
I assume I need to pass a reference to the application object to the
DLL. If so, how would I define it in the DLL and how would I set it
in the main app?
Is there some other way to get a reference to the DLL instantiator's
application object from inside the DLL?
Thanks.
I RECEIVED A PRIOR RESPONSE THAT I DIDN'T UNDERSTAND:
Declare the global variables as public and shared:
Namespace SomeNamespace
Public Class SomeClassName
Public Shared SomeVariableField As Integer = 3
End Class
End Namespace
Then, inside the DLL access the variables like this:
Dim i As Integer = SomeNamespace.SomeClassName.SomeVariableField
winforms "ApplicationEvents.vb") from a DLL.
I assume I need to pass a reference to the application object to the
DLL. If so, how would I define it in the DLL and how would I set it
in the main app?
Is there some other way to get a reference to the DLL instantiator's
application object from inside the DLL?
Thanks.
I RECEIVED A PRIOR RESPONSE THAT I DIDN'T UNDERSTAND:
Declare the global variables as public and shared:
Namespace SomeNamespace
Public Class SomeClassName
Public Shared SomeVariableField As Integer = 3
End Class
End Namespace
Then, inside the DLL access the variables like this:
Dim i As Integer = SomeNamespace.SomeClassName.SomeVariableField