Home

Forums

Web development

 

 

 

 
     
 
dna88 Web development and Technology Forum
 
Profile   Register   Memberlist   Usergroups   FAQ   Search  Log in
Address Of in Vb.net (pls. help)

 
Post new topic   Reply to topic    dna88 Forum Index -> Programming in Java, C, C#, VB, .NET Discussion Forum
Author Message
skydiver
Just In
Just In


Joined: 13 Sep 2004
Posts: 1

Post Post subject: Address Of in Vb.net (pls. help) Reply with quote

Hi! gentlepeople,

Probably you might help me regarding this.. I'm new to these Vb.net language. My question is Does AddressOf is accepted in Vb.net?

in this VbCode i have the following components:
- MyAPI.bas (this contains SetCallbacks)
- Callback.bas (this contains the STATE_CALLBACK function)

Code:

' API declaration in myAPI.bas
Public Declare Function SetCallbacks Lib "tfm.dll" ( _
    ByVal hConn As Long, ByVal pfnGuiCallback As Long, _
    ByVal pGuiCallbackCtx As Long, ByVal pfnGuiStateCallback As Long, _
    ByVal pGuiCallbackCtx As Long) As Long



Form with a button cmdCallback
Code:

Public Sub cmdCallback_click()
Result = SetCallbacks(Connection, 0&, 0&, AddressOf STATE_CALLBACK, 0&)
  '''' Any Code here
End Sub

- i have this module Callback.bas a procedure function called STATE_CALLBACK
Code:

Function STATE_CALLBACK(ByVal pGuiCallbackCtx As Long, ByVal dwState As Long, ByRef pRes As Byte, ByVal Msg As Long, ByVal byProg As Byte, ByVal pSample As Long, ByVal pData As Long) As Long


How will i convert this to vb.net???! I have a module for the Callback..

what i did was with the same format
Code:

Result = SetCallbacks(Connection, 0, 0, AddressOf Callback.STATE_CALLBACK, 0)

and the error appeared was "AddressOf expression cannot convertes to integer because integer is not delegate type" Im getting stucked in here...
I really need this badly

Thanks for your kind help.
Mon Sep 13, 04 4:01 am
Back to top
skydiver View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    dna88 Forum Index -> Programming in Java, C, C#, VB, .NET Discussion Forum All times are GMT - 7 Hours
Page 1 of 1

 

Partners and Resources

Bangladesh hosting company

Bangladesh web design

Driven by phpBB © phpBB Group