Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

VB RunTime Error '429' using AutoItX3.dll


  • Please log in to reply
24 replies to this topic

#21 Just_Plain_Cool

Just_Plain_Cool

    Wayfarer

  • Active Members
  • Pip
  • 58 posts

Posted 01 October 2004 - 07:16 PM

I don't think that will simplify things for you. That just stretches the problem to not only include your current issues within VB but then you will be running into debugging your autoit scripts on top of it. I mean it should work but it will make your application less portable. If you included the dll registration directly into the exe then all you would have to do is pass the scripts to be run by the sceduler... the scheduler itself... and the dll files required for VB. If you wanted to enclode that all into a single executable it would be possible if you used my EXE wrapper shared on the Scripts and Scraps forum.

Overall it comes down to that it is your application... you are the developer so you have to make these decisions. There are too many factors that I am unaware of that I don't know that I can even make a decent suggestion for this question.

This post probably isn't going to get you any closer to your goal... just make a decision.

*** Matt @ MPCS

<{POST_SNAPBACK}>

Okay, I was trying to weasel out, you caught me. :)

However, when I run put that module in and attempt to run, I am getting an error: 'Sub or Function Not Defined' in this line:

CallWindowProc lngProcAddress, lngHwnd, ByVal 0&, ByVal 0&, ByVal 0&

I called the func with:

RegisterServer frmMain.hWnd, App.Path & "\AutoItX3.dll", True

JPC :)







#22 Matt @ MPCS

Matt @ MPCS

    Just another AutoIt user trying to help out! :)

  • Active Members
  • PipPipPipPipPipPip
  • 700 posts

Posted 01 October 2004 - 07:20 PM

Okay, I was trying to weasel out, you caught me.   :)

However, when I run put that module in and attempt to run, I am getting an error:  'Sub or Function Not Defined' in this line:

CallWindowProc lngProcAddress, lngHwnd, ByVal 0&, ByVal 0&, ByVal 0&

I called the func with:

RegisterServer frmMain.hWnd, App.Path & "\AutoItX3.dll", True

JPC  :)

<{POST_SNAPBACK}>

Add this to the top of the module by all of the other declares:

Declare Function CallWindowProc Lib "user32.dll" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long


*** Matt @ MPCS

EDIT:

I recently found this on a forum on the net... give it a try and see if it works.

Public function DllRegisterServer Lib "AutoItX3.dll" Alias "DllRegisterServer"() as Long

Edited by Matt @ MPCS, 01 October 2004 - 07:40 PM.


#23 Just_Plain_Cool

Just_Plain_Cool

    Wayfarer

  • Active Members
  • Pip
  • 58 posts

Posted 01 October 2004 - 08:35 PM

Add this to the top of the module by all of the other declares:

Declare Function CallWindowProc Lib "user32.dll" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long


*** Matt @ MPCS

EDIT:

I recently found this on a forum on the net... give it a try and see if it works.

Public function DllRegisterServer Lib "AutoItX3.dll" Alias "DllRegisterServer"() as Long

<{POST_SNAPBACK}>

Hi Matt,

The first part fixed it. It is now registering the dll and therefore the rest of the code is working perfectly here. I am going to send it to the users and see if it works for them also. I can't imagine why it wouldn't now, but...

JPC :)

#24 Matt @ MPCS

Matt @ MPCS

    Just another AutoIt user trying to help out! :)

  • Active Members
  • PipPipPipPipPipPip
  • 700 posts

Posted 01 October 2004 - 08:37 PM

Hi Matt,

The first part fixed it.  It is now registering the dll and therefore the rest of the code is working perfectly here.  I am going to send it to the users and see if it works for them also.  I can't imagine why it wouldn't now, but...

JPC  :)

<{POST_SNAPBACK}>

That's Great! One more thing though, don't forget to unregister it when the program unloads otherwise it wont get cleaned out of the registery if they decide to delete it.

Good Job!

*** Matt @ MPCS

#25 Just_Plain_Cool

Just_Plain_Cool

    Wayfarer

  • Active Members
  • Pip
  • 58 posts

Posted 01 October 2004 - 08:53 PM

That's Great! One more thing though, don't forget to unregister it when the program unloads otherwise it wont get cleaned out of the registery if they decide to delete it.

Good Job!

*** Matt @ MPCS

<{POST_SNAPBACK}>

I'll add the code to unregister it in the next version. These couple of users aren't going anywhere and this way if it fails, I can determine if the dll was registered or not. :)

JPC :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users