|
|
Hi!!!
I wanted to know if i cud run file1.cs(without a Main) through a window service. Can i call its object it the service n make it run.
I'm trying but i'm unable to do it.
i added file watcher as a component and its working. but what about my other modules. cant i make them run
|
|
|
|
|
You can't "run" a .cs file. It is simply a formatted text file. The code needs to be compiled into either a dll (class library) or an executable. These can then be accessed by the service.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
see.. i made 3 different files, mailer.cs, kill_proc.cs and index.cs these files work independently. how can i integrate them with the service i have made. these are a important part of my project.
plz guide me thru this process..
|
|
|
|
|
Just add them to your service project and build it; what is the difficulty?
It's time for a new signature.
|
|
|
|
|
Tell me what i did wrong...
I clicked add class
then created a class, typed the complete code, with out the main which is working alone using main
and then i added the code new mailer();(instance of mailer module) in OnStart()
now tell me where shud i add it..
|
|
|
|
|
ayandelhi wrote: now tell me where shud i add it.
Add it at the point that you need it, i.e. at the point that you need to send a mail message.
It's time for a new signature.
|
|
|
|
|
|
ayandelhi wrote: now tell me where m i doin mistake..
Requesting help to create software with obvious malicious intent.
I are Troll
|
|
|
|
|
Please use <pre></pre> tags to surround your code so it is readable. Hint: use the "code block" button at the top of the edit window.
It's time for a new signature.
|
|
|
|
|
Don't get sucked into helping somebody write malware.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
An earlier post by this user asked:
"i m working on keyloggers... so need to write a console program for it...
thats y...
i'm using System.Windows.Forms.Keys... but cant use it...
as mentioned..."
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
|
I am using VS2005 (C#) and I gather the tree view has a limit of 64K nodes per level.
Is there a later version where the limit is higher?
I am working on an application which could have a very large nummer of root nodes and I would like to avoid embarassment at the wrong moment.
BTW, it is populated on demand, i.e. as a node is epxanded.
Thanks.
|
|
|
|
|
Isn't that rather a lot? How long is your user going to spend paging through that lot, looking for the node they want? Surely there must be a better way...
Did you know:
That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.
|
|
|
|
|
It's for analysing DVB (broadcast video) files, possibly 10GB so I was just checking on an easy way of bulletproofing. Video is the main part of it but I'm being careful.
Yes, occasionally we have to look for a certain sequence but we don't always know what it is until we find it.
|
|
|
|
|
I have found the performance of the treeview is terrible when trying to load large data sets. As in minutes to populate the TV. I was not aware of the 64k limit as I don't think that volume is viable.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
This why I will be loading on demand, i.e. only loading the children when an individual node is epxanded.
I will also be looking at other views but a tree view offers a lot of advantages in this case.
|
|
|
|
|
I got the impression there were a lot of root nodes. You would have to load on demand if some of your root nodes have 64k nodes.
Can you page the nodes by some grouping so the root node would have a group level then a sub node collection. I think this is going to come down to data mangement.
Some of the 3rd party tools mat not have the 64k limitations?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Yes, that is the approach I mentioned above, only populating the sub nodes when a node is expanded.
I doubt there would be more than 64K nodes per root but there could potentially be up to a million nodes in total.
Because of this there will be an inital decoding phase where an internal XMLDocument will be created with the usual progress bar to keep the user happy but I want to keep the treeview response as snappy as I can and it's not that difficult to do.
You know what users are like!
BTW, typical structure with DVB is:
Table
Sections (subtable)
Elements/descriptors
Descriptor lists
Descriptor structures
|
|
|
|
|
Trollslayer wrote: there could potentially be up to a million nodes in total
I don't even want to think about shoving that sort of volume into a TV.
I wonder if you can add nodes by block, insert 1000, release the UI and insert another 1000. Or can you prepare the tree sub nodes in memory and drop in the lot in 1 hit.
Trollslayer wrote: You know what users are like!
I made the mistake of putting a long fetch into another thread and not disabling the button. Then I had to sit there and watch my BA hammer away at the button all the while complaining that nothing had happened. She had spawned 20 or so threads in about 2 seconds.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello,
I have declared an interface in C++/CLI and made it assembly(DLL). Now I want that interface to be implement by C# app. I have added the reference but still my C# assembly does not detecting my C++/CLI interface and says "Could not found: Are you missing some assembly refernce......"
How to solve this issue?
Regards Usman
|
|
|
|
|
assuming you have declared a public interface in some namespace and built it into a DLL, you need to add a reference to that DLL and include a using statement for the namespace (or use fully qualified types).
|
|
|
|
|
Hello,
I have some native C++ code that interacts with my managed C# app through delegates and function pointers. Normally, I have the following setup for basic types in my native C++ DLL.
So, for example this function set interacts with the managed code and updates a variable of type short.
typedef int (__stdcall* GET_SHORT)(short &value, int ID);
GET_SHORT getAttShort = NULL;
extern "C" __declspec(dllexport) void SetShortHandler(GET_SHORT handler)
{
getDicomAttShort = handler;
}
int GetAttribute(short &value, int ID)
{
if (getDicomAttShort) return getAttShort(value, ID);
return -1;
}
Here, the managed app sets the delegate by calling SetShortHandler which sets the function pointer and then the method is called through GetAttribute()..
No, this works great for types like short, int, double, long... However, I am at a loss as to how I can get it to work with strings. I like to use STL strings and I want to do something similar as the code above but with strings instead of basic types.
Any ideas? Would appreciate any help.
Keith
|
|
|
|
|
Never mind. Figured it out.
/K
|
|
|
|