|
Thank you for your response. If we develop a windows service in VC++ we can add an "Interface" and can add "Method" to it. This method can be exported to outside applications. This Method can be used by external applications by calling CoCreateInstance() and can get the pointer to the interface and this pointer can call the function. I just like to have similar Implementation but both the Windows Service and Windows Application need to be implemented in c#.
Prasad
|
|
|
|
|
The easiest way is to control your service with user-defined service control commands.
See ServiceBase.OnCustomCommand and ServiceController.ExecuteCommand.
Greetings
Covean
|
|
|
|
|
Thankyou Covean,
With this approach i implemented and is working. The Link http://www.codeproject.com/KB/dotnet/WindowsServices.aspx is helpful.
Thanks,
Prasad
|
|
|
|
|
Probably not what you're looking for but perhaps you could simply use some external resource that both applications may access?
If the service uses a FileSystemWatcher it can receive an event when a file changes, and if it only opens the file for reading there should be no problems with the file being in use or anything like that. So the app needing to inform the service of something would simply update a file, or place a new file in a directory, or put the information in a database.
Or why not use a message queue? This would also let you queue messages regardless of whether or not the service is up and running of the time of creating the message.
I'm sure there are many other possibilities, but generally speaking it seems like an odd way of interfacing between applications to have one application directly modify the state of another - you could hardly get further away from the good OOP practice of encapsulation.
|
|
|
|
|
|
hi
how to open program through C# program and give this program focus - in Windows Mobile ?
thank's in advance
|
|
|
|
|
Hi to all,
I want to send image through other details.
For Example My xml is like this and I want to send like as string (Return type as string).
<xml>
<uid>xxxxx </uid>
<logoimg>Here My Byte code<logoimg>
......
......
<xml>
How can i do it, user after getting the xml how he can save it as image again..
Please give me all details..
|
|
|
|
|
Shaik Haneef wrote: Please give me all details..
Google. Or just do it, all you need to do is add a method that returns a bitmap.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Please Give me accurate link.. I can't found so that I am posted in forums.
|
|
|
|
|
Your profile says that you have 2 years of .NET experience. Is this true ?
I found examples in seconds. The ones I found, sent the image back as a byte array then put them in a memory stream, and built the bitmap using Bitmap.FromStream. I'm not sure you can't just return a bitmap, but if all else fails, that seems like the trivial way to do it, to me.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
What do you a link for, the google search[^]? The second result is an article here on code project addressing your precise question.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
Every thing we if we found in google why this forums available & why you need to ask again to search in google, Hmmmmmmmmm I found my solution by my Own
http://www.dailycoding.com/Posts/convert_image_to_base64_string_and_base64_string_to_image.aspx[^]
|
|
|
|
|
hi...
I have a question.
how to restore SQL database with SQLxpress?
suppose SQL not installed.
tanks
|
|
|
|
|
Member 4118635 wrote: how to restore SQL database
Member 4118635 wrote: suppose SQL not installed.
What are you smoking, and can I have some ?
If there's no database installed, what do you expect to restore your DB to ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi. i am reading SAP Table data using RFC_READ_TABLE. but problem is it is working on SAP SandBox but when i try to connect it with other SAP system, it will throw RunTime exception while trying to read data.
Please advice.
Thanks
|
|
|
|
|
Vishal Dave wrote: Please advice.
Well how about looking at the exception and trying to determine what exactly it is complaining about.
|
|
|
|
|
Hi,
I am using late binding when creating a word object to generate a MS Word document from my C# program. I have successfully created tables and paragraphs, but now I am trying to format the paragraphs (left, justified, etc.).I want to insert headings (center aligned) using late binding.so can you please help?
modified on Monday, November 16, 2009 12:00 AM
|
|
|
|
|
public Ts GetMany<t, ts="">(BasicBO BO) where T : BasicBO
{
List<basicbo> BOList = DataAccess.Get(tc, BO);
List<t> TList = new List<t>();
foreach (BasicBO bo in BOList)
TList.Add((T)bo);
// error occured in the following statement
object result = typeof(Ts).GetType()
.InvokeMember("ctor",BindingFlags.CreateInstance, null, null, null);
typeof(Ts).GetMethod("AddRangeFromDB", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(result, new object[] { TList });
return (Ts)result;
}
error message is : Constructor on type 'System.RuntimeType' not found
Ts is a generic list of basicBO.
please explain it.
|
|
|
|
|
I'm not at my dev machine so I can't test this, but try removing GetType() from the line so you just have
object result = typeof(Ts).InvokeMember("ctor", BindingFlags.CreateInstance, null, null, null); My bet is that the Type instance you want is from typeof(Ts) , not typeof(Ts).GetType() .
Dybs
The shout of progress is not "Eureka!" it's "Strange... that's not what i expected". - peterchen
|
|
|
|
|
Thank you very much.
You are right. I didnt care about recoding of the line Ts.GetType(). but it is already retrieved with typeof(Ts). Now it works fine.
thank you
|
|
|
|
|
If it's generic, you must have lost your generic parameters.
You may also want to specify New in the where clause so you can instantiate the class directly rather than use Reflection. But I think one of the main problems is that the constructor's name is ".ctor".
Also, when using Reflection, you may want to cache the MethodInfo rather than get it over and over again.
|
|
|
|
|
What is Application.Run();
What is its real use?
I have read the msdn but I couldn't understand. Please give me a different and easy answer
|
|
|
|
|
Application.Run(form) shows the form, runs a message pump, and waits until the form gets closed.
it exists in the Main() method of most WinForm applications.
I've never used Application.Run() without form.
Luc Pattyn [Forum Guidelines] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
I'm guessing it tells an Application to Run, but some context might be helpful.
|
|
|
|