|
And I didn't want to create, maintain and distribute two EXEs, one for each purpose.
I wonder whether it would be practical to have a "universal console application" which creates a TCP socket and then launches the other real application, prepending to the command line arguments the identity of the newly-created socket? The other application would exchange its I/O with the socket, and the console ap would send it to the console.
If the two applications had a consistent naming convention, one would have to distribute both exe's but the console side application wouldn't have to be maintained.
|
|
|
|
|
Hi,
interesting idea.
I'm not inclined to use TCP/IP for local purposes as it may pose problems selecting channels, avoiding conflicts, configuring firewalls, etc; risks which aren't necessary as you can use named pipes equally well. And you need only one per singleton.
So the singleton-enforcer could be a console app with the following syntax:
enforce1 filename.exe command_line_arguments
This enforce1 would:
1. algorithmically derive a pipe name form the filename.exe
2. look for a process P currently executing filename.exe, and if none found, launch filename.exe as a process P without arguments;
3. send its process ID and the command_line_arguments to P
4. wait for a return status, which I would transmit using a Windows message (based on PID).
all of the above is independent of the exe's functionality. enforce1 is general-purpose.
the target exe should ignore its command line; it must open and listen to the named pipe (again derived from the EXE name), expect to receive a PID+command line, and when done send a Windows message to process P with given PID to return the 32-bit result status; and loop waiting for another piped command. It may or may not use multithreading to perform several jobs concurrently.
The piped message is a command line, that should be short enough to be atomic. So all enforcers can send to the same pipe without fearing collisions/confusion.
One might consider a non-console version of the enforcer too.
BTW: all of this does not solve my earlier quest for a single exe offering an app that acts as both console and non-console, since 1) it is two or three EXE (one universal), and 2) the console part is universal, hence ignorant of the actual application (it can't provide help for instance).
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
enforce1 filename.exe command_line_arguments
If the main application file name were derived from the command-line-app name, one could use absolutely identical command-line apps for any number of programs. The only time the console app would have to provide any "help" would be if the system couldn't find the main application, in which case a message to that effect should probably be sufficient.
BTW, I vaguely recall an article which discussed having one application named xxx.com and the other xxx.exe but I don't remember exactly what the author was doing.
|
|
|
|
|
Hi All,
I basically have a RichTextBox (WinForms) and I want to have spell check functionality.
I have been using NetSpell[^] which is very good for an open source solution but have found it does not work with rich text formatted data. Being open source I can probably modify to suite my needs but that may take time I do not currently have.
I have also found Rapid Spell[^] which seems perfect for what I want, but the price is $339 so I am looking for alternative, cheaper solutions if possible.
Basically, does anybody know of a good product they could recommend from experience that will achieve what I am looking for? I have been looking but as of yet not found anything to top Rapid Spell.
Thanks
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
How about using any spellchecker on the RichTextBox.Text content; and when something gets rejected try and locate it in the RTB to flag it somehow.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Too late, bought Keyoti Rapid Spell now
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
OK. That is bound to become an interesting article. I'm looking forward to it.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
hi everyone,
i m jst working on my final term project and i want to perform the follwoing action using asp.net, vb.net and javascript.
"how to pass values from pop- up window(child page) to a master page(parant page) datagrid? please help me out.
many thanks
staycool_khan
modified on Wednesday, July 15, 2009 10:20 AM
|
|
|
|
|
Look up window.opener. That should give you a place to start
only two letters away from being an asset
|
|
|
|
|
Hello,
I want to create a static library using .net 2008 Framework 3.5 and export a function.
In order to call this function from a vc6 enviroment what project type I should use on the .net Enviroment and how should I call this function from vc6 application?
I would appreciate if you could send me a short code of both sides(.net,vc6)
Thanks in advance...
|
|
|
|
|
See this[^] article.
/ravi
|
|
|
|
|
For programs that were created by VB or VC 6.0, there are many tools like HIEW, WINDASM, ... that can disassemble and patch codes (example: change some code lines)
For programs that were created by .NET, it's easy to disassemble but I don't know which tool can do like that.
Please advice me
Thanks
|
|
|
|
|
Hi,
Reflector can decompile an entire method.
And I was told there are plug-ins that decompile an entire class.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
There is a plugin for the Reflector called ReflexIl or something like that, that will let you actually edit the code.
Reflector also has an MSIL view, of course.
ILDASM can also disassemble .NET assemblies but be prepared for massive suckage.
|
|
|
|
|
Ok, I see Reflexil is great plug-in
Thank you
|
|
|
|
|
I've got a problem when I use Reflexil to add some codes in to file
I try to add via "Create new..", OpCode = call. But I can't find the Operand "System.String::op_Equality(System.String, System.String)"
Does any body know how to do?
Thanks
|
|
|
|
|
You may need a vcall, have you tried that?
|
|
|
|
|
I don't see "vcall" in OpCode and how to find "System.String::op_Equality" in "Operand" ?
Thanks
|
|
|
|
|
callvirt instance bool [mscorlib]System.String::op_Equality()
I think.. no guarantees today, I'm writing this at what is 5:56 in the morning for me.
edit: Ok that is completely wrong. Note to self: don't answer question when you're half asleep. Of course it's not "callvirt instance", op_Equality is always static!
So then, I really don't know why it's not showing up.. Last modified: 1hr 6mins after originally posted --
|
|
|
|
|
Hi All,
I am Working with a project,in which we need to use Autocomplete Including Results as we get in Google search box.I am using a code in which we are getting the matching letters or words as dropdown but not number of results.
Can any one please help me?
Reply me asap,if possible
Thanks In Advance,
Regards,
Yamuna
|
|
|
|
|
|
HI Karthik,
Thankyou For your reply,
I Need Autocomplete Including Number of results as we get in Google suggests right.Like "Gmail 11,2000000 results".
But All solutions which i got are without Results only.
please help me!!
Thanks & Regards,
YamunaRani
|
|
|
|
|
I'm fairly new to C#, have worked with the C# XNA gaming studio and VB.Net 2008 but have very basic knowledge. I work in the car & manufacturing industry as an electrical engineer and am looking to broaden my programming skills using C# and the Modbus TCP protocol.
Can you please recommend any books that explain the ModbusTCP protocol in C#.net 2008.
Do you have any links to any source code or classes that could get me started. Tried one off here but can't get it to compile, I get the following errors.
Error 1 The type or namespace name 'ModbusTCP' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Martin\Downloads\Modbus_TCP_class_demo\ModbusSampleCommon\frmStart.cs 8 7 ModbusTester
Error 2 The type or namespace name 'ModbusTCP' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Martin\Downloads\Modbus_TCP_class_demo\ModbusSampleCommon\frmStart.cs 14 11 ModbusTester
Thanks - Martin
|
|
|
|
|
Hi,
there are typically two steps required before you can use classes from some managed DLL:
1. add a reference to your project; in Visual Studio, right-click your project, choose Add Reference,
wait a while, locate the assembly file of interest, and go.
2. in each source file going to refer the classes of that assembly, add a "using someNamespace;" statement for your convenience. (The odd programmer will tell you you could skip that and always use fully qualified class names).
That's it.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Thanks for the info Luc
Martin
|
|
|
|