|
Hi,
I have create a assembly (DLL) that contains important controls, contains Dataset of my database. Because .NET allow referencing, anyone can use the library to modify my database using their application. What I want is that the library only work with my application not other application. And the application that I develop not only one application, it can be two or more that use that library. Any suggestion? Because the library is critical and the application is pay type, so I not want disappointing customers.
Regards,
Ariston Darmayuda
Newbie on "Genetic Programming" or "Nets Programming"
|
|
|
|
|
You can obfuscate it.
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|
|
PaulC1972 wrote: You can obfuscate it.
So with obfuscate we can prevent someone use our component on our obfuscated assembly. As I know that obfuscate is used to protect our assembly for be disassembling (with MSIL Disassembler). But the case is like this, if someone try to add component on toolbox so he/she browse my assembly, then the component will be listed on toolbox. What I want to do is that only my IDE can use the components, no one except me. Like Janus or other third party component, they can create a trial component. Any reference to create a trial component?
Thanks.
|
|
|
|
|
as i see a sample not remember where they build an algorithm which checks every time for the genuine key
what they did was they take the any system specific id number and encrypt it highly they stored a reference number in the end of dll file using binary editor (the some part of dll /exe can be used for this purpose ) if the reference number does not match they simply gives out message box and just skip all process of dll for registering it they made special exe which write the code on the dll which will match and unlock the dll and for demo there are two ways 1> limited functionality (can be achieved by setting flags in your dll ) 2> limit the number of days you have to check each time what date of system is and store date (encrypted) in dll itself and changing the number stored in dll every time dll is used until it reach lock mode
rest Google may help
it is good to be important but it is more important to be good
|
|
|
|
|
|
Hi everybody!
I have an interface called Renderer , there are classes like 3DRenderer , 2DRender etc implementing it.
Everything is fine, but I'd like all classes to be singletons. They all should have a static method getInstance() which other classes need to call to get an instance of this singleton renderer object.
Is this possible with interfaces, abstract classes or somehow at all?
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I assume you'd want 3DRenderer , 2DRenderer etc. to be separate singletons i.e one instance of 3DRenderer , one instance of 2DRenderer . In that case, I'm afraid you need to have static references in each of the derived classes, as a single static reference in a base class would mean that all derived classes will share that single instance.
|
|
|
|
|
There's actually only one Renderer active at the same time, there will never be more than one renderers active.
S. Senthil Kumar wrote: as a single static reference in a base class would mean that all derived classes will share that single instance.
Can you give me an example how that would look like in (pseudo)code? Thanks
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I cooked up a real quick example
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
public interface IRenderer
{
void Render();
}
public abstract class Renderer : IRenderer
{
static IRenderer renderer;
protected Renderer(){}
public abstract void Render();
public static IRenderer Instance
{
get
{
if (renderer == null)
{
renderer = RendererFactory.CreateRenderer();
}
return renderer;
}
}
}
class RendererFactory
{
internal static IRenderer CreateRenderer()
{
return new ThreeDRenderer();
}
}
public class ThreeDRenderer : Renderer
{
protected ThreeDRenderer(){}
public override void Render() { Console.WriteLine("3DRenderer" + this.GetHashCode()); }
}
public class TwoDRenderer : Renderer
{
protected TwoDRenderer(){}
public override void Render() { Console.WriteLine("2DRenderer" + this.GetHashCode()); }
}
public class ConsoleMain
{
public static void Main(string[] args)
{
Renderer.Instance.Render();
Renderer.Instance.Render();
}
}
}
You could of course modify CreateRenderer to create different renderers based on parameters (like configuration information).
Does this help?
|
|
|
|
|
S. Senthil Kumar wrote:
Does this help?
Thanks a lot, this really helps.
The problem is that the abstract class Renderer still needs to implement all IRenderer functions. Should I just create empty methods in the abstract class?
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
You can declare them public abstract , so you don't even need an empty method implementation.
public abstract void Render();
|
|
|
|
|
hi all,
is there any way to convert a xml file to pdf file through c# without using any third party tool?
thanks
|
|
|
|
|
Hi folks, I have a problem with connectivity, I have created one setup file for my application , That application deals with the clipper database(.Dbf ) files and i have used for connectivity is DbaseIII provider and now i get one error when my application installed and trying to connect database.
The Error code is: DB_SEC_E_AUTH_FAILED(0x80040E4D)
Can u please tell me the solution and how to solve it.
Thanks,
Ranandbe
|
|
|
|
|
i'm Using .Net 2
i draw some line and circle to my form ( with graphic class ) but when i minimize the from they's disappear Why And how can i solve it ?
With Thanks
MHF
|
|
|
|
|
Ehy, it's event driven...
You have to override the OnPaint method of the for with your drawing code.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
hi
i want to insert my DataGridView1.columns (TableStyle or ColumnStyle) to another dataGridView..
How to do ??
thanks
|
|
|
|
|
I was going to help you out and,
I have tried a few different ways but I seem to keep getting the error "Column Belongs to another Table" no matter how I do it. Its not like there is an option to import datacolumns like you can with datarows. So Id like to see this done as well I am now curious.
|
|
|
|
|
Hello everyone,
I have some experience of C# development on Windows desktop. Now I am learning how to develop GUI application using C# on WinCE device, based on .NET Compact Framework.
Are there any samples/tutorials to make reference for a beginner?
thanks in advance,
George
|
|
|
|
|
Hi
im trying to Limit the number of results retrived by a Query so for Example i want to retrive the first 30 and then navigate throw the results 30 by 30.
the problem in my Query that i cant used the TOP 30 command because im Ordering my results with date then status plus alot of ordering.
and this ordering will cause the retrived results to be retrived in a random ID_no order as one of my friends suggested that i use the TOP 30 along with
Where Id no > X Order BY Id_no as in the example below.
but i think if there is no Command in MS Access or that i dont know it because of my lack of knowledge i will have to order by my Where Criteria along with the TOP 30 command.
Another Sol. just popped to my head is to save the results to a Dataset and then using a Table in the Dataset i can just retrived Index based.
i guess i will try the Dataset sollution also if there is any better one plz Help.
By the way im using ODBC COnnection, OdbcCommand and ODBCDatareader.
Thanks in Advance.
Example for Retriving by the TOP and Where command:
1)
Select TOP 30 A.ID_no , .......etc<br />
From A , ......etc<br />
Where A.ID_no > 1<br />
Order by ID_no ;
2)
Select TOP 30 A.ID_no , .......etc<br />
From A , ......etc<br />
Where A.ID_no > 30<br />
Order by ID_no ;
and i continue like that.
Have fun and Stay good
-- modified at 4:16 Saturday 25th November, 2006
|
|
|
|
|
What control are you using to display the data? I think you can 'throw' all data into the control and enable paging on the display control.
|
|
|
|
|
I am trying to write a function in C# (VS2005/Net 2) which will pack and upack bits into a byte, short, integer and so on. As an example I have an Int32 in a file which is packed such that bits 0 thru 10 are one value and bits 11 thru 31 another. In another I have a short where the first 3 bits represent a value and so on thru. I have been playing around using bit shifting but it is not working. I am guessing that it may be something to do with the way the types are stored - I am no expert o nthis stuff but I wonder if they are little endian so the bit sequence is turned around by pairs.
Any pointers would be much appreciated
Jon
|
|
|
|
|
ScruffyDuck wrote: I have been playing around using bit shifting but it is not working.
Standard question #1:
What do you mean by "not working"?
ScruffyDuck wrote: wonder if they are little endian so the bit sequence is turned around by pairs.
The value is first read from memory into the CPU, then it's shifted, so it doesn't matter how it's arranged in memory.
---
b { font-weight: normal; }
|
|
|
|
|
By not working I mean that the answer I get is not the correct one e.g. I am expecting 12345 as an answer and I am getting 21436 so I think I am ending up with extracting the wrong bits.
Jon
|
|
|
|
|
Maybe that with a sample of the code (and of the file) you will make our lives far easier... )
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Unless you actually show the code that you tried, the only thing that anyone can say about it is that it's wrong.
I assume that the example that you showed was not an actual value that you are using, as they have totally different bit patterns? It would be more helpful if you showed some real examples of what you are using. Any information that you withhold is directly affecting the assistance that you can get.
---
b { font-weight: normal; }
|
|
|
|