|
Hypothetically, is there a way to create a DLL that will only work at runtime? Any attempt to use the DLL from a development environment would fail?
I am investigating some ways to protect intellectual property.
Any input would be greatly appreciated.
|
|
|
|
|
And what is the problem when loading your dll if the project is executed from the IDE ?
Did you think about distributing the release version of your dll ?
|
|
|
|
|
Here is a hypothetical example...
Fred spends years developing a DLL to do intense mathematical computations. Bob buys a license to develop against and distribute Fred’s DLL with Bob’s application. Fred is worried other people will use his DLL in their own applications.
Just compiling the DLL in release mode will not stop people from using the DLL in Visual Studio, and releasing an application that uses it.
Is there any way to do this?
|
|
|
|
|
electronica808 wrote: Is there any way to do this?
how can anyone, even licensed customers, use your DLL if they can't use it inside an IDE ? do all your users have to develop via command line ? i, for one, would hate hate hate hate hate using a DLL that tried to enforce such a restriction - even though i think it's probably not possible to do.
what about just making the user 'initialize' the DLL with a license key that you issue?
|
|
|
|
|
Thanks for the reply.
Since Bob has paid, he should be able to use the DLL from the development environment and release his applications.
I am thinking this probably is a pretty common scenario. I was wanting to see what developers are doing currently to protect their intellectual property.
I had thought of the initialization key as a rudimentary way to pull this off. I wondered if there were any more solutions to this.
|
|
|
|
|
I think this is the biggest problem with "portability" of DLLs. Are very comfortable but, on the other side...
I guess the only thing you can do to protect the use of some functions and allow them only in an application... is to do it inside the application. As a new module/class, and asking for license or password before executing. But in a dll...
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
electronica808 wrote: Since Bob has paid, he should be able to use the DLL from the development environment and release his applications.
but there will be no way to evaluate the DLL in an IDE ? if not, that will certainly turn off potential customers.
we use init keys, it works fine.
we've also done separate trial and licensed builds. that's a bit more secure but it doubles the number of binaries you have to build, test and distribute, as well as requiring a scheme to restrict access to the licensed builds (ex. a password-protected web folder).
i've seen DLLs that require you to get a license key for the individual machine , and the DLL will then only run on that particular hardware. that's fine if your app is running on a web server (one machine, many users), but unworkable for distributed apps.
-c
|
|
|
|
|
If Bob doesn't pay, he uses this DLL in his product and he's making lots of $$$.
Sue him.
People who are going to make money from their products, often want their software to be legal. I know that we read the licensing documents with every bit of software we use.
That's protection enough for me.
If he's not making any (or much) money, don't worry about it.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</A>
|
|
|
|
|
Thanks for everyone's help.
This application is going to be distributed to the user's machine.
I am Bob giving suggestions to Fred. I will suggest using an init key.
|
|
|
|
|
electronica808 wrote: I will suggest using an init key.
Would you mind giving a little more information about an "init key". I don't know anything about this.
On your original subject, you could make your dll freely available, but make it callable only thru an API that you license and sell. One way to do this would be to have your API scramble the function calls in such a way that the functions within the dll understand the call, but the call interface is not meaningful to anyone trying to use the naked dll. You protect the API with copyright.
Another way would be to have an init function within the dll that had to be called (to set some static data) before any of the functions would work correctly. The only (legal) way to call that init function would be via the API you provide. The init function takes some monstrously complex string that your API passes into it. Unless the passed string is correct, the dll functions just won't work correctly. Actually, to prevent rumors that your dll doesn't work (because people are trying to hack it), the init function should raise an exception if the string is incorrect.
Neither of these will circumvent a criminal programmer from distributing your API, but it would at least make your intellectual property "copyrighted".
David
|
|
|
|
|
See this reply.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
If you define and modify a tls variable in the dll you will prevent it from working via a dynamic link - see __declspec(thread).
So, as a developer who has licensed your dll i would be given the dll and lib link files, and be able to statically link to your dll - everything would work fine.
As a 3rd party who just grabs your dll and tries to dynamically link to it my app would crash.
...cmk
The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack
|
|
|
|
|
Hello everyone,
I have learned public/private/protected inheritance, but what is virtual inheritance? Here is the sample,
class Usable : public virtual Usable_lock
http://www.research.att.com/~bs/bs_faq2.html#no-derivation
thanks in advance,
George
|
|
|
|
|
|
Very helpful, thanks Cedric!
regards,
George
|
|
|
|
|
hai,
with reference to my previous post, my problem, to catch the ctrl+down arrow key combination is solved.
now, a new problem has come up.
i.e.
1.iam creating 40 controls(buttons,editboxes and static controls) downwards the dialog, dynamically.
2.at the initiation of the dialog, first 20 will be displayed.
3.now, when i use ctrl and down arrow combination, the controls has to move upwards. i.e. controls 2 to 21 has to show up.
4.in my ctrl down key, code, i have used like this.
ScrollWindowEx(0,-10,NULL,NULL,NULL,NULL,SW_SCROLLCHILDREN);
5.the controls are moving upwards, but the hidden controls are not getting displayed.
can any body please analyse what the problem is.
thanks in advance.
|
|
|
|
|
If you scroll down and another time up... is the first control appearing when back to first position?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
hai nelek.
good question and thanks for your response.
Nelek wrote: is the first control appearing when back to first position?
no it is not.
any way, i got it solved by using Invalidate(); after scrollwindowex function.
but i have few more doubts.
like, for example, i want to display 40 students' data on the screen.
the headings will be
ID NAME AGE CLASS ADDRESS
and follows the 40 rows of 5 textboxes
now, if i scroll, up or down, the headings (which i use as static boxe(s)) should not scroll up or down ,and also the buttons save saveas cancel on the down of the page.
i mean, only the textboxes should move.
any clues?
NOTE: student is for an example.
|
|
|
|
|
The first problem was so because controls out the frame are invisible. For that reaason the invalidate is needed to repaint the actual visible portion of screen.
For the second... I had a similar problem in my project. I got a completely different solution.
You are whishing to fill the controls with "static" datas and scrolling the controls. I made it by fixing the controls and scrolling the datas.
If you are interested in my solution I can post you some snippets, but I don't now do it because it can be large :P
EDIT: I can imagine a way, but not sure if it'll be possible. Can you set the scroll to a concrete region? I mean divide your dialog in three parts, where the first and the third are fixed, and setting the scroll only in the central one.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Nelek wrote: The first problem was so because controls out the frame are invisible. For that reaason the invalidate is needed to repaint the actual visible portion of screen.
thanks for the explanation.
Nelek wrote: I made it by fixing the controls and scrolling the datas.
nice idea, but i can use it only, if there is no other go.
and i shall try that logic myself. if i fail, then i will ask your code snippet. thanks for your response.
Nelek wrote: I can imagine a way, but not sure if it'll be possible. Can you set the scroll to a concrete region? I mean divide your dialog in three parts, where the first and the third are fixed, and setting the scroll only in the central one.
this is what exactly now i was trying to do.
i shall update you, if it is successful.
i have one more idea.
for every scroll, weather up or down, i can move the header and footer to the same old positions.this will be my next try.
thanks a lot for your continuous support.
|
|
|
|
|
"for every scroll, weather up or down, i can move the header and footer to the same old positions.this will be my next try."
Consider difference between screen / workspace coordinates.
I have a CSCrollView as main view, and the bitmaps representing objects are placed according to scroll position. But there is a moment that I want to have a label always visible. I do it just so easy as:
CClientDC dc(this);
CRect rectWnd;
CString szOnline = "ONLINE";
CPoint cpPoint;
CFont fontLabels;
fontLabels.CreatePointFont (640, "MS Sans Serif");
GetWindowRect (&rectWnd);
cpPoint.x = ((rectWnd.Width () - 300) / 2);
cpPoint.y = ((rectWnd.Height () - 100) / 2);
dc.SelectObject (&fontLabels);
dc.SetBkColor (RGB (0, 255, 0));
dc.TextOut (cpPoint.x, cpPoint.y, szOnline, szOnline.GetLength ());
I have the label always visible and centered on the screen. You can do something similar for the "fixed" controls.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
thanks for the logic.
i shall implement it.
|
|
|
|
|
Hello Friends !!!!
Can anybody tell me how to know that the mouse has left the Tray Icon. I mean which message is sent when mouse leave the Tray Icon..
I am devloping the application in which I am showing context menu when someone do the Right mouse click on the Tray Icon and the showing dialog box when mouse is over the Tray Icon. I want to hide the dialog when mouse leaves the Tray Icon and also want. But dont know how to do it.
If anydody knows or have any Idea please tell me.
|
|
|
|
|
GauranG33 wrote: I want to hide the dialog when mouse leaves the Tray Icon...
How are you detecting that the mouse has entered the taskbar notification area?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Follwing is the Code I am using to know whether the mouse is on the Tray Icon or not. If its on the Tray Icon I am showing the Dialog Box. But I want to Hide it when It leave the Tray Icon.
void PutInTaskBar(HWND hWnd)
{
...
...
nfd.uCallbackMessage = WM_TASKMSG;
Shell_NotifyIcon(NIM_ADD,&nfd);
}
LRESULT CALLBACK MyDialogProc( ... )
{
switch(message)
{
case WM_TASKMSG:
if(lParam == WM_MOUSEMOVE)
{
ShowWindow(hWndDlg,TRUE);
}
}
}
|
|
|
|