|
-
Sep 17th, 2009, 07:49 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Pass variable to DLL
VS 2008, .NET 2, Win XP
I need help with passing a String variable from App to DLL?
Why: I have App that on UnhandledException needs to call ErrorReport dll, send to that dll some strings like: App name, stack, error... Dll will send through internet this gathered data to me.
I can open Dll, close it, code it, but I can not figure it how to send data to it like VB App name, VB App version, VB App error.message ...
For example I can in my form make a global variable like Public TestGlobal As String and that I can call from anywhere in my app, but how to do it with dll?
Code: I have app and one part of dll created:
VB.Net Code:
'===VB app code: 'call dll from my form on raising of UnhandledException error Dim mySERform As New ErrorReport.frmMain '=> i think i must here set the data that i wanna pass to dll? 'ErrorReport.FrmMain.<NoMethodsHere> mySERform.ShowDialog() '===DLL 'ErrorReport' code: Public Class frmMain Private DataString As String Public Property DataString1() As String Get Return DataString End Get Set(ByVal value As String) DataString = value End Set End Property Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load '=> here goes the string(s) from VB app transfered to this dll fields TextBox1.Text = DataString1 End Sub End Class
Last edited by Zeljko; Sep 17th, 2009 at 07:55 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|