Results 1 to 6 of 6

Thread: calling a subroutine from a dll

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2006
    Posts
    8

    calling a subroutine from a dll

    Dear All,

    Hope you have a good time. I work on a VB .net plug in . When I call two subroutines from another class as below: I see the first msgbox result but after I click ok on the first msgbox, both, my plug in and main programme will be closed.



    VB Code:
    1. Call cls1DEngine.set_openmi_ief(m_1DProjectFilename,  m_1DProjectFilename.Length)
    2.           MsgBox("set_openmi passed")
    3.           Call cls1DEngine.initialise()
    4.            MsgBox("set_openmi passed")

    these subroutines call two subroutine from ILM_omi.dll and they appear in Cls1DEngine as below:

    VB Code:
    1. <DllImport("C:\bin\ILM_omi.dll")> _
    2.     Shared Sub set_openmi_ief(ByVal FileName As String, ByVal Length As Integer)
    3.      ' No code here
    4.     End Sub
    5.  
    6.     <DllImport("C:\bin\ILM_omi.dll")> _
    7.    Shared Sub initialise()
    8.         ' No code here
    9.     End Sub

    Does any body know what the problem is? And also why all related windows closing down when initialise sub is called.

    Many Thanks,
    Reza
    Last edited by immoral; Feb 6th, 2007 at 04:23 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width