Results 1 to 10 of 10

Thread: Automation error---[RESOLVED]

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Location
    UK
    Posts
    147

    Automation error---[RESOLVED]

    I am trying to call a procedure in a dll i have created, there are no errors i can see in the code but at runtime the error:

    Runtime error '-2147024770 (8007007e)'
    Automation error
    The specified module could not be found.

    is generated. WHY?

    APP Code:

    VB Code:
    1. Private WithEvents mobjThread As ThreadProxy.DataSearches
    2.  
    3. Private Sub cmdNew_Click()
    4.     Dim DBPath As String
    5.    
    6. 'On Error GoTo ErrHandler
    7.    
    8.     DBPath = "test"
    9.    
    10.     mobjThread.NewSearch DBPath, 1, True, 20, True
    11.  
    12.     Exit Sub
    13. 'ErrHandler:
    14. '    MsgBox "Error"
    15. End Sub

    Dll Code:
    VB Code:
    1. Public Sub NewSearch(ByVal sDBPath As String, ByVal sInt1 As Integer, ByVal sBool1 As Boolean, ByVal sInt2 As Integer, ByVal sBool2 As Boolean)
    2.  'do stuff
    3. End Sub
    Last edited by mik706; Jan 9th, 2004 at 11:09 AM.
    Mik706

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    mik706


    Did you register the dll?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Location
    UK
    Posts
    147
    Yes.
    Mik706

  4. #4
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    mik706


    How do you setup you code to call the dll mobjThread? Sets, include it in you project etc...

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Location
    UK
    Posts
    147
    i set the relationship on form load
    VB Code:
    1. Private Sub Form_Load()
    2.     Set mobjThread = New ThreadProxy.DataSearches
    3.     'rest of form load stuff
    4. End Sub
    Mik706

  6. #6
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    mik706

    You referenced the dll in your project?

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Location
    UK
    Posts
    147
    Yes
    Mik706

  8. #8
    Addicted Member
    Join Date
    Mar 2001
    Location
    Greece
    Posts
    164
    What operating system are you using to create the executable and setup package ?

    I was getting an automation error because one of my controls could not be registered correctly when creating the setup from WinXP.

    Try building from Win98SE (clean version). It might work.

    --hyperspaced

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Location
    UK
    Posts
    147
    I am using Win2000, no errors have been reported, ether when i built the dll or registered it.
    Mik706

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Location
    UK
    Posts
    147
    Sorry randem and hyperspaced, as hyperspaced suggested the dll hadn’t registered properly even though i could view the objects. I deleted the original and built the file again and all is now well. Thanks for the help.
    Mik706

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