473,378 Members | 1,422 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Using callback function

Hi,

I have a doubt in .net. Hope u could solve the problem. When u r free plz
consider this doubt.

I have created a component to run End of Day Tasks. Hope u know how much
time it takes to run a EOD. Say it takes about 20 min to complete its
execution. Now assume that u have more than 1000 tasks to be executed. Each
tasks can be of any type(component or stored procedure). I am executing the
tasks asynchronously. Now I give the input to the main component from a
screen from the client. Can i pass any message or value from the component to
the screen, before the component execution finishes.

For example:

I want to display "Task 1 started execution.." when the task1 gets started.
Then it should display completed message. Likewise For every tasks it should
return the message to the screen.

Regards,
Sivaraman.S
Nov 19 '05 #1
6 1219
Define an event in your component. Have the thread that creates the
component listen to that event. The component can then raise events that
contain a message, and the listening program can handle the event, and
respond accordingly.

"Sivaraman.S" <Si********@discussions.microsoft.com> wrote in message
news:5B**********************************@microsof t.com...
Hi,

I have a doubt in .net. Hope u could solve the problem. When u r free plz
consider this doubt.

I have created a component to run End of Day Tasks. Hope u know how much
time it takes to run a EOD. Say it takes about 20 min to complete its
execution. Now assume that u have more than 1000 tasks to be executed.
Each
tasks can be of any type(component or stored procedure). I am executing
the
tasks asynchronously. Now I give the input to the main component from a
screen from the client. Can i pass any message or value from the component
to
the screen, before the component execution finishes.

For example:

I want to display "Task 1 started execution.." when the task1 gets
started.
Then it should display completed message. Likewise For every tasks it
should
return the message to the screen.

Regards,
Sivaraman.S

Nov 19 '05 #2
But i am not able to display that message in the screen immediately after i
receive it. It get displayed only after the execution of component.

"Marina" wrote:
Define an event in your component. Have the thread that creates the
component listen to that event. The component can then raise events that
contain a message, and the listening program can handle the event, and
respond accordingly.

"Sivaraman.S" <Si********@discussions.microsoft.com> wrote in message
news:5B**********************************@microsof t.com...
Hi,

I have a doubt in .net. Hope u could solve the problem. When u r free plz
consider this doubt.

I have created a component to run End of Day Tasks. Hope u know how much
time it takes to run a EOD. Say it takes about 20 min to complete its
execution. Now assume that u have more than 1000 tasks to be executed.
Each
tasks can be of any type(component or stored procedure). I am executing
the
tasks asynchronously. Now I give the input to the main component from a
screen from the client. Can i pass any message or value from the component
to
the screen, before the component execution finishes.

For example:

I want to display "Task 1 started execution.." when the task1 gets
started.
Then it should display completed message. Likewise For every tasks it
should
return the message to the screen.

Regards,
Sivaraman.S


Nov 19 '05 #3
If you fire off an event, that event handler gets executed immediately. You
should be able to update the display. You may need to fire off the component
on a separate thread.

"Sivaraman.S" <Si********@discussions.microsoft.com> wrote in message
news:2A**********************************@microsof t.com...
But i am not able to display that message in the screen immediately after
i
receive it. It get displayed only after the execution of component.

"Marina" wrote:
Define an event in your component. Have the thread that creates the
component listen to that event. The component can then raise events that
contain a message, and the listening program can handle the event, and
respond accordingly.

"Sivaraman.S" <Si********@discussions.microsoft.com> wrote in message
news:5B**********************************@microsof t.com...
> Hi,
>
> I have a doubt in .net. Hope u could solve the problem. When u r free
> plz
> consider this doubt.
>
> I have created a component to run End of Day Tasks. Hope u know how
> much
> time it takes to run a EOD. Say it takes about 20 min to complete its
> execution. Now assume that u have more than 1000 tasks to be executed.
> Each
> tasks can be of any type(component or stored procedure). I am executing
> the
> tasks asynchronously. Now I give the input to the main component from a
> screen from the client. Can i pass any message or value from the
> component
> to
> the screen, before the component execution finishes.
>
> For example:
>
> I want to display "Task 1 started execution.." when the task1 gets
> started.
> Then it should display completed message. Likewise For every tasks it
> should
> return the message to the screen.
>
> Regards,
> Sivaraman.S


Nov 19 '05 #4
In Windows application it is possible, I want it to be displayed on the web
browser. I tried using frames to display it by storing it in the session. But
the problem is, It gets displayed only after the execution is finished.

"Marina" wrote:
If you fire off an event, that event handler gets executed immediately. You
should be able to update the display. You may need to fire off the component
on a separate thread.

"Sivaraman.S" <Si********@discussions.microsoft.com> wrote in message
news:2A**********************************@microsof t.com...
But i am not able to display that message in the screen immediately after
i
receive it. It get displayed only after the execution of component.

"Marina" wrote:
Define an event in your component. Have the thread that creates the
component listen to that event. The component can then raise events that
contain a message, and the listening program can handle the event, and
respond accordingly.

"Sivaraman.S" <Si********@discussions.microsoft.com> wrote in message
news:5B**********************************@microsof t.com...
> Hi,
>
> I have a doubt in .net. Hope u could solve the problem. When u r free
> plz
> consider this doubt.
>
> I have created a component to run End of Day Tasks. Hope u know how
> much
> time it takes to run a EOD. Say it takes about 20 min to complete its
> execution. Now assume that u have more than 1000 tasks to be executed.
> Each
> tasks can be of any type(component or stored procedure). I am executing
> the
> tasks asynchronously. Now I give the input to the main component from a
> screen from the client. Can i pass any message or value from the
> component
> to
> the screen, before the component execution finishes.
>
> For example:
>
> I want to display "Task 1 started execution.." when the task1 gets
> started.
> Then it should display completed message. Likewise For every tasks it
> should
> return the message to the screen.
>
> Regards,
> Sivaraman.S


Nov 19 '05 #5
Better Reinstall it.But before that please make uninstall all the component
of Visual Studio.

"Sivaraman.S" <Si********@discussions.microsoft.com> wrote in message
news:5B**********************************@microsof t.com...
Hi,

I have a doubt in .net. Hope u could solve the problem. When u r free plz
consider this doubt.

I have created a component to run End of Day Tasks. Hope u know how much
time it takes to run a EOD. Say it takes about 20 min to complete its
execution. Now assume that u have more than 1000 tasks to be executed. Each tasks can be of any type(component or stored procedure). I am executing the tasks asynchronously. Now I give the input to the main component from a
screen from the client. Can i pass any message or value from the component to the screen, before the component execution finishes.

For example:

I want to display "Task 1 started execution.." when the task1 gets started. Then it should display completed message. Likewise For every tasks it should return the message to the screen.

Regards,
Sivaraman.S

Nov 19 '05 #6
hB
lease events / strings to a proper place, or expose them from your this
EOD component.
create an aspx page which is able to access EOD components public
exposed strings/properties. and then display them in let say lablel.
just keep refreshing that aspx page at a proper interval.

---
hB

Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: pvdm | last post by:
Hi, I am writing an app which encapsulates a multimedia timer. I implemented a TimerProc as static member function and a static member variable pThis as pseudo this variable to access in the...
1
by: Mike | last post by:
When trying to compile (using Visual Web Developer 2005 Express Beta; frameworkv2.0.50215 ) the source code below I get errors (listed below due to the use of ICallBackEventHandler. Ultimately I...
4
by: ma740988 | last post by:
// file sltest.h #ifndef SLTEST_H #define SLTEST_H class CallbackBase // herb shutters gotW source .. { public: virtual void operator()() const { }; virtual ~CallbackBase() = 0; };
10
by: headware | last post by:
I know that you can call the method of one from from inside another form by doing something like this Forms("MyForm").MyFunction(12, 34) However, you have to know that MyForm has a function...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
3
by: Paul | last post by:
I have been trying to code a callback in vb.net using the delegate method. I have successfully compiled the program and run it but after it accessess the copyfileex winapi method and then calls the...
6
by: smmk25 | last post by:
Before I state the problem, I just want to let the readers know, I am knew to C++\CLI and interop so please forgive any newbie questions. I have a huge C library which I want to be able to use in...
6
by: =?Utf-8?B?U2hhd24gU2VzbmE=?= | last post by:
Greetings! I was researching AJAX to provide a solution to displaying status messages while a long process executed. I found several examples online and was able to use their code to get a quick...
2
by: Pradeep | last post by:
Hi all, Can any one explain me what is callback function.... I have written some code after reading some tutorials from internet... But I am not sure is it a right way to write a call back...
0
by: Michibeck | last post by:
Hi, I need some help regarding callback function written in c# and called from unmanaged c code. (c dll). The problem is that the callback function crashs after the first call with a memory...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.