Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

vb.net Callbacks

Posted on 2014-09-01
9
Medium Priority
?
159 Views
Last Modified: 2014-09-18
I have this documentation for an Async method...
------------------------------------------------------------------------------------------------------
SearchAsync method

Parameter        Description

callback             The delegate to call once a response has been received.
searchTerm      Free-text search filter.
category            Optional category of item to get.
-------------------------------------------------------------------------------------------------------

How do I write a callback in vb.net ?

Thanks
0
Comment
Question by:Dodsworth
  • 5
  • 4
9 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 40296264
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 40296531
I'm a bit confused.
If callback is a parameter, shouldn't it show up in the intellisense box ?
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 40296604
>shouldn't it show up in the intellisense box ?
in what regards? the functions to pass? please clarify
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:Dodsworth
ID: 40296618
When I type "SearchAsync(" a box pops up showing "<Awaitable> Public Function SearchAsync([searchterm as String = Nothing], [category as Nokia.Music.Types.Category?=Nothing])

But there is no placeholder for the callback parameter.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 40296699
possibly then either the documentation is wrong...
note: I don't use VB.net regularly, so I don't know about any special cases for the intellisense there, as callback functions is something I use very rarely.

the important point is compiling: can you specify the 3 parameters (the first one using AddressOf some_function style) or not?
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 40296896
Won't compile :(  Does that suggest the documentation is incorrect or could there be some inconsistency between C# and VB.net ?
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 40297195
I would say so...
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 40297878
So how to tell when an awaited function completes if the API has no built in mechanism to do so ?
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 40297886
that is the most unwanted answer;
not possible

however, I presume it's rather a bug in the function declaration, I would check with the API provider about this issue.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Integration Management Part 2
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question