VB.net and the Everything SDK

Plug-in and third party software discussion.
void
Site Admin
Posts: 3294
Joined: Fri Oct 16, 2009 11:31 pm

VB.net and the Everything SDK

Postby void » Sat Jun 11, 2016 10:23 am

Starter VB.net project for the Everything SDK.

Code: Select all

Public Class Form1

    Public Declare Function Everything_SetSearchA Lib "d:\dev\everything\sdk\dll\Everything32.dll" (ByVal search As String) As UInt32
    Public Declare Function Everything_QueryA Lib "d:\dev\everything\sdk\dll\Everything32.dll" (ByVal bWait As Integer) As Integer
    Public Declare Function Everything_GetNumResults Lib "d:\dev\everything\sdk\dll\Everything32.dll" () As UInt32
    Public Declare Function Everything_GetResultFileNameA Lib "d:\dev\everything\sdk\dll\Everything32.dll" (ByVal index As UInt32) As String
    Public Declare Function Everything_GetLastError Lib "d:\dev\everything\sdk\dll\Everything32.dll" () As UInt32
    Public Declare Function Everything_GetResultFullPathNameA Lib "d:\dev\everything\sdk\dll\Everything32.dll" (ByVal index As UInt32, ByVal buf As String, ByVal size As UInt32) As UInt32


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Everything_SetSearchA(TextBox1.Text)
        Everything_QueryA(1)

        Dim NumResults As UInt32
        Dim i As UInt32

        NumResults = Everything_GetNumResults()

        ListBox1.Items.Clear()

        If NumResults > 0 Then
            For i = 0 To NumResults - 1

                Dim filename As New String("", 260)

                Everything_GetResultFullPathNameA(i, filename, 260)

                ListBox1.Items.Insert(i, filename)

            Next
        End If

    End Sub

End Class



Download the Everything SDK:
http://www.voidtools.com/Everything-SDK.zip

Download the VB.net project:
http://www.voidtools.com/Everything.SDK.Visual.Basic.Example.zip

Return to “Development, plugins and third party software”