this is the dll source with the Square function..

Code:
Option Explicit

Public Const DLL_PROCESS_DETACH = 0
Public Const DLL_PROCESS_ATTACH = 1
Public Const DLL_THREAD_ATTACH = 2
Public Const DLL_THREAD_DETACH = 3

Public Function DllMain(ByVal hInst As Long, ByVal fdwReason As Long, lpvReserved As Long) As Long
   Select Case fdwReason
      Case DLL_PROCESS_DETACH
         ' No per-process cleanup needed
      Case DLL_PROCESS_ATTACH
         DllMain = True
      Case DLL_THREAD_ATTACH
         ' No per-thread initialization needed
      Case DLL_THREAD_DETACH
         ' No per-thread cleanup needed
   End Select
End Function

Sub Main()
End Sub

Public Function Square(var As Long) As Long
   If Not IsNumeric(var) Then Err.Raise 5

   Square = var ^ 2
End Function


It works from test application in vb, but I really want to get this working with mIRC too

Last edited by pouncer; 02/10/05 10:08 PM.