Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: UserLoser on September 02, 2003, 07:03 PM

Title: ResetAwayIdle
Post by: UserLoser on September 02, 2003, 07:03 PM
C++ from EmptyPlugin:
typedef BOOL (WINAPI* ResetAwayIdleProc)(void);

VB:
Public Function NetResetAwayIdle&()
   rtbAdd vbRed, "NetResetAwayIdle" ' So I know if anything happens here...
   NetResetAwayIdle& = 1
End Function


How come this isn't working?  I havn't had any trouble at all with any other functions...I get an error in MessageHook
Title: Re:ResetAwayIdle
Post by: Spht on September 02, 2003, 08:21 PM
Are you referencing it correctly as a revision 3 function?
Title: Re:ResetAwayIdle
Post by: UserLoser on September 02, 2003, 08:24 PM
Public Type PluginInformation3
   Interface2 As PluginInformation2
   PRegGetRegistryPath As Long
   PNetResetAwayIdle As Long
   PUIGetWindow As Long
   PSysIsService As Long
End Type

...

With Interface.Interface3
   .PNetResetAwayIdle = AddressOfFunc(AddressOf NetResetAwayIdle)
End With

...

Public Function AddressOfFunc(ByVal aLongAddr As Long) As Long
   AddressOfFunc= aLongAddr
End Function


yes