Sign in to follow this  
Followers 0
NextLevel

Using ImageSearchDLL in VB6

4 posts in this topic

I try to use the ImageSearchDLL.dll in VisualBasic 6, but only get garbage back instead of the coordinates.

Here is what I do:

Public Declare Function ImageSearch Lib "C:\Windows\system32\ImageSearchDLL.dll" _
(ByVal x1 As Integer, ByVal y1 As Integer, ByVal right As Integer, ByVal bottom As Integer, ByVal findImage As String) As String

Call test

Sub test()

Dim result As String

 result = ImageSearch(0, 0, 0, 0, "C:\test.bmp")

 Debug.Print result

End Sub

Result:

0   1|%d|%d|%d|%d         à?E´ ä³ ä³ e+000          À~PA   €ÿÿGAIsProcessorFeaturePresent   KERNEL32    1#QNAN  1#INF   1#IND   1#SNAN  H                                                             P   RSDS!›Î1äÉ÷D‡D4Š­/^   c:\imagesearchdll\release\ImageSearchDLL.pdb            `D  X}  ¥                      þÿÿÿ    Ôÿÿÿ    þÿÿÿ    Û%     þÿÿÿ    Ôÿÿÿ    ... etc.

If I use it with AutoIt, it works. is the DLL incompatible with VB6 or do I something wrong?

NextLevel

Share this post


Link to post
Share on other sites



Without knowing anything about the DLL, I would suggest checking whether or not the DLL is returning an ASCII string or Unicode string and setting the function explicitly.

Share this post


Link to post
Share on other sites

I have the same issue please help

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0