|
Hi friends,
I am involved in project whose the development of base classes and architecture high level were under my team responsibility. After creating 80% of these
classes I am about to involve more developers in the process and I fall in problem that is me leaving a little preoccupied: These basic components won't be maintained
by production team and they will only have access to the binaries of these components.
The tools that I made some tests for assemblies obfuscation it doesn't allow me to protect such assemblies inside the team. I would like that the team have these assemblies
ALREADY protected, what would be the first level of safety against copy of intellectual property. My idea is that even if talented programmer gets to leave of company with the
sources that contain the business rules, the CORE it (basic classes, personalized controls, access rules for database and etc) of the thing he won't have access,
which, I belive, turns the sources "less attractive" because to create such components
of the zero it would take plenty time.
Does anybody already use some tool that allows something like that?
Does anybody have some idea on this?
Greetings,
Marcelo Palladino
Brazil
|
|
|
|
|
Palladino wrote:
I would like that the team have these assemblies ALREADY protected, what would be the first level of safety against copy of intellectual property. My idea is that even if talented programmer gets to leave of company with the sources that contain the business rules, the CORE it (basic classes, personalized controls, access rules for database and etc) of the thing he won't have access, which, I belive, turns the sources "less attractive" because to create such components of the zero it would take plenty time.
1. You need to trust your team.
2. You are making the assumption that someone will act unethically at best, and illegally at worst. Another company hiring such a person, at least here in the US, can get in real hot water. There are employee agreements to prevent this, including the jokingly unenforceable "you can't work in a related industry for 5 years after termination" type of BS.
3. Is this something you really feel is necesary to spend time and effort worrying about?
Palladino wrote:
Does anybody have some idea on this?
It wasn't clear as to why you can't give the production team the obfuscated assemblies. How is obfuscation failing you in this instance?
Marc
Latest AAL Article
My blog
Join my forum!
|
|
|
|
|
Hi Marc,
Before anything: Thank you for trying to understand me. I am aware that my English is badly, I am trying to get better.
Marc Clifton wrote:
3. Is this something you really feel is necesary to spend time and effort worrying about?
hum... To read your post made to think me of another point of view. Perhaps it is not, really... I will continue thinking about this.
Marc Clifton wrote:
It wasn't clear as to why you can't give the production team the obfuscated assemblies. How is obfuscation failing you in this instance?
I have like this a class (before obfuscation):
public class MyClass
{
}
After obfuscation:
public class 983276376jssdjh
{
}
Perhaps I am making something wrong, but this way, the assemblie becomes invalid for programming. The execution goes well, however.
Hugs,
Marcelo Palladino
Brazil
|
|
|
|
|
Palladino wrote:
Perhaps I am making something wrong, but this way, the assemblie becomes invalid for programming. The execution goes well, however.
Ah, you so you want the source code obfuscated?
It would be a little bit of work to add the automation, but what would happen if you took your obfuscated assembly, read it into Lutz Roeder's .NET Refelctor[^], and ran the "decompiler" function to emit the now obfuscated but still compileable assembly source?
But I'm confused about something--why supply the source and obfuscate things like the class name? Wouldn't that break other functions that reference that class? Or do you *want* people to use the obfuscated source?
No wait--you want to supply the internal source obfuscated, but there are certain "public" unobfuscated classes and methods that are the interface points? Is that it?
Marc
Latest AAL Article
My blog
Join my forum!
|
|
|
|
|
Hi again Marc,
Marc Clifton wrote:
No wait--you want to supply the internal source obfuscated, but there are certain "public" unobfuscated classes and methods that are the interface points? Is that it?
It is exactly this! What is happening, with the tool that I am using: It is changing the names of the types, instead of changing implementation only.
However, when beginning to talk with you I went to test other tools (Salamander, for instance) and I noticed that work in the expected way.
It seems that am in the road. Thank you, again!
Marcelo Palladino
Brazil
|
|
|
|
|
Hi again, Marc!
Now I have the clearest subject in my mind. I want assemblies obsfucation but it would like the names of the members not to be altered by this process. That is possible?
Sincerely,
Marcelo Palladino
Brazil
|
|
|
|
|
Hey
If you have a .NET remote server and a client seperated by an shared assembly, is it the possible to test the connection.
I want to test the connection to the server to see if it is running before executing any of my remote methods on it.
When I'm using RemotingServices.Connect I will never get null in return, when using a shared assembly. I have also tried using Activator.GetObject, no luck.
Is there any way to see if there is a running server in the other end before executing methods?
|
|
|
|
|
I just read yesterday something about that the proxy won't actually finish the process of connecting to the server and loading the shared assembly until you actually reference it in a method call.
For example, I can create the channel, register it, and use Activator.GetObject without a single problem. Only when I make the function call do I get the following exception:
"No connection could be made because the target machine actively refused it"
So, maybe you can have a dummy "Test" method that you call and catch an exception on?
Marc
Latest AAL Article
My blog
Join my forum!
|
|
|
|
|
Hi all,
I wrote a multi-thread application using sockets. But when i attempt to stop a thread, the thread is falling into "AbortRequested" state but never being aborted. Can anyone help me?
My code is below:
if ( this.m_ReceiveThread.IsAlive )
MessageBox.Show( "alive" );
MessageBox.Show( "State: " + this.m_ReceiveThread.ThreadState.ToString() );
if ( this.m_ReceiveThread != null )
{
for ( int i = 0; i <= 10; i++ )
{
try
{
this.m_ReceiveThread.Abort();
this.m_ReceiveThread.Join( 100 );
/*
!!!!!! it always says current state is AbortRequested !!!!!!
*/
MessageBox.Show( "m_ReceiveThread trying to abort. - " + i.ToString()
+ "\nCurrentState: " + this.m_ReceiveThead.ThreadState.ToString() );
}//End of try.
catch
{
}//End of catch.
if ( this.m_ReceiveThread.ThreadState == ThreadState.Aborted
|| this.m_ReceiveThread.ThreadState == ThreadState.Stopped )
{
MessageBox.Show( "m_ReceiveThread aborted." );
break;
}//End of if ( this.m_ReceiveThread.ThreadState == ThreadState.Aborted ).
}//End of for( int i = 0; i <= 10; i++ ).
}// End of if ( this.m_ReceiveThread != null ).
|
|
|
|
|
Thread.Abort:
Raises a ThreadAbortException in the thread on which it is invoked, to begin the process of terminating the thread. Calling this method usually terminates the thread.
I like the word "usually".
Look at the example in MSDN. Are you catching all exceptions in the thread and not properly handling ThreadAbortException?
Marc
Latest AAL Article
My blog
Join my forum!
|
|
|
|
|
To add to what Marc said, take a look at this.
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
Kentamanos wrote:
To add to what Marc said, take a look at this.
A thread will not terminate correctly if some process
are still running (consuming) a protected ressource.
Ah yes! Excellent! I'm in the middle of working with some serial I/O code in C# that uses protected resources, and it's the wierdest thing to exit the application and still see the application running in the process list even after doing an abort on the receiver thread. Needless to say, I wasn't cleaning things up.
Marc
Latest AAL Article
My blog
Join my forum!
|
|
|
|
|
Marc Clifton wrote:
some serial I/O code in C#
Marc...why aren't you just using the System.IO.Ports.SerialPort class?
When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?"
-Hockey on being a geek
|
|
|
|
|
Nice to know I'm on your "to read" list.
David Stone wrote:
Marc...why aren't you just using the System.IO.Ports.SerialPort class?
Because I'm not using Longhorn!
And, is there some reason they didn't inlude the parallel port in the Ports namespace? Oh yes, I forgot--Microsoft wishes the thing had never been invented!
Marc
Latest AAL Article
My blog
Join my forum!
|
|
|
|
|
Marc Clifton wrote:
Nice to know I'm on your "to read" list.
Heh...I was just browsing through the forums.
Marc Clifton wrote:
Because I'm not using Longhorn!
Well...you don't have to use Longhorn. You could just use Whidbey.
When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?"
-Hockey on being a geek
|
|
|
|
|
|
how to draw a X coordinate with a series of datetime data?
my question is mainly how to deal with the datetime and how to draw?
Please give me a sample about it! Thanks a lot!
|
|
|
|
|
Drawing is handled in the OnPaint of a control. Use DataTime to work with data time data. If you want to draw text you use DrawString() method. Doc's here: [^]
Docs for Graphics class : [^]
|
|
|
|
|
Hi All,
how do we interact 2 way BETWEEN A COM COMPONENT[say written in MFC COM] and a simple java class/EJB component.
say i wish to call a method in the java class from the COM component.
From COM component ,i pass it a number,the java class/component must multily it by say 10 and return the result back to COM component.
Is it possible.
Both reside on same machine.
Thanking you..
Regards
God Is Great
|
|
|
|
|
Yes you can. See the JNI reference at http://java.sun.com[^]. Please do not continue this thread, though. This is the C# forum, not the MFC, COM, or Java forum.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thanks for the link..ur right,i should have posted it in the java or COM forum
Cheers..
God Is Great
|
|
|
|
|
Hi!
May be yo can help me with this problem: I need to create a new instance of class (DLL or Windows Class file) that part of the project in a separate thread. Then I need to communicate with that class by passing some varibales or calling function/methods in this class. So question is: How I can do that (with multythreading) ?
I appreciate if you write me some code too - thanks
"I have not failed.
I've just found 10,000 ways that won't work."
- Thomas Alva Edison (1847-1931)
|
|
|
|
|
Jasper4C# wrote:
Then I need to communicate with that class by passing some varibales or calling function/methods in this class. So question is: How I can do that (with multythreading) ?
That's bit vague, so here goes:
1. look at the "lock" keyword in C# for preventing multiple threads from writing to a variable at the same time.
2. Look at the Mutex class for synchronizing between threads and blocking one thread while another thread is calling a method you want protected from simultaneous execution.
3. Look at AutoResetEvent and ManualResetEvent for signalling between threads.
Hope that helps!
Marc
Latest AAL Article
My blog
Join my forum!
|
|
|
|
|
10x for information but what I mean was - for example:
--------------------------------------------------------
using .... ; //doesn't matter
namespace DllClass
{
public class ClassA
{
private string m_message;
public ClassA()
{
//Empty constr (??)
}
public void ThreadEntrancePoint()
{
//This method will be called when creating
//a new thread
//TODO: Should I put here infinity loop ???
}
//This method will chande variable in this class
public string SetMessage
{
set
{ if (value != null) m_message = value; }
}
}
} // End of DLL file
---------------------------------------------------------
using ....; //All the other
using System.Threading;
using DllClass; //need to create class
namespace MyFormNameSpace
{
public class MyForm: Windows.Form
{
public int Main (...)
{
//Doesn't matter for now
}
//This function will be called when user want's
//to create a new thread
public void btn_CreateThread(...)
{
Thread t = new Thread (new ThreadStart DllClass.ClassA.ThreadEntrancePoint);
t.Start();
}
//This function will be called when user want
//to send a new messge to the class that inside
//thread
public void SendNewMessageToThread (string msg)
{
//TODO: What code should I put here to send
//message to ClassA.SetMessage ??
}
}//class close
}//namespace close
---------------------------------------------------------
You see - in this example I want to completly run ClassA in new thread and also pass some variables to this class and may be receive some inforamtion from it. How I can do that ?
"I have not failed.
I've just found 10,000 ways that won't work."
- Thomas Alva Edison (1847-1931)
|
|
|
|
|
Ok, first off, you can't call ThreadStart() the way you described because you need an instance of the class or the method you're calling has to be static.
If it's static, then anything it manipulates has to be static as well, and that means anything outside of the thread can access it as well, as long as it's static. If you made all the data and methods in ClassA static, then you could simply call ClassA.SetMessage from any thread--main application thread included.
If it's not static, then you need an instance of the object to pass along to the delegate. Since you have the instance, you can also call the SetMessage method from the application thread. For example:
ClassA myClassA=new ClassA();
ThreadStart threadDelegate=new ThreadStart(myClassA.ThreadEntrancePoint);
Thread newThread=new Thread(threadDelegate);
newThread.Start();
myClassA.SetMessage="foobar";
...
I hope that helps. Note that you probably would want a "lock" statement to bracket the setter.
Marc
Latest AAL Article
My blog
Join my forum!
|
|
|
|