Is there any way I can prevent people using my DLLs in their programs? I
mean, I'm new to making DLLs and I'm guessing that if I can reference my
DLLs in my projects then there is nothing stopping anyone else from
referencing my DLLs in their projects.
Also, Just wondering whether there is a type of *thing* which is like a DLL
but includes a form as well. I want to include modules in my app, so say
for example purposes my app contains a main form and a calculator module.
The main form is the exe and the calculator gets called from a separate file
when needed? Any ideas?
Thanks for the help. 12 3064
On Fri, 28 May 2004 08:35:01 GMT, Visual Boodu .NET wrote: Is there any way I can prevent people using my DLLs in their programs? I mean, I'm new to making DLLs and I'm guessing that if I can reference my DLLs in my projects then there is nothing stopping anyone else from referencing my DLLs in their projects.
Nothing that can't be bypassed by a determined cracker. You could have
your DLL look in the registry for something, look for another
preexisting file, require a password (either fixed or determined by
something within the user's system), etc. - basically, do the same
things that commercial programs do - but again, crackers bypass this on
a daily basis. (Although they usually crack apps to use the app, not
just one specific file.)
Also, Just wondering whether there is a type of *thing* which is like a DLL but includes a form as well. I want to include modules in my app, so say for example purposes my app contains a main form and a calculator module. The main form is the exe and the calculator gets called from a separate file when needed? Any ideas?
I don't usually store forms in DLLs but I would assume that it can be
easily done; others here will have that answer.
--
auric underscore underscore at hotmail dot com
*****
Obviously our captor underestimated the wrath of a man and his hamster.
You can put forms in a DLL and call them. There's no
limitation.
For restriction: Somewhere on MSDN there's a page
about how to make a control licensed, the same way
that VB controls are licensed and can't be run otherwise.
I don't have a link to it, though. Another option might be
something like a dummy parameter. Your DLL parameters
can be seen in an object browser but that doesn't explain
them. So besides the natural difficulty in figuring out how
to call a function given object browser info., you could also
make it more confusing by adding a dummy parameter,
naming the parameters in a vague way, etc.
--
--
Visual Boodu .NET <sn@il.mail> wrote in message
news:VQ****************@news-server.bigpond.net.au... Is there any way I can prevent people using my DLLs in their programs? I mean, I'm new to making DLLs and I'm guessing that if I can reference my DLLs in my projects then there is nothing stopping anyone else from referencing my DLLs in their projects.
Also, Just wondering whether there is a type of *thing* which is like a
DLL but includes a form as well. I want to include modules in my app, so say for example purposes my app contains a main form and a calculator module. The main form is the exe and the calculator gets called from a separate
file when needed? Any ideas?
Thanks for the help.
Auric__ wrote: On Fri, 28 May 2004 08:35:01 GMT, Visual Boodu .NET wrote:
Is there any way I can prevent people using my DLLs in their programs? I mean, I'm new to making DLLs and I'm guessing that if I can reference my DLLs in my projects then there is nothing stopping anyone else from referencing my DLLs in their projects. Nothing that can't be bypassed by a determined cracker. You could have your DLL look in the registry for something, look for another preexisting file, require a password (either fixed or determined by something within the user's system), etc. - basically, do the same things that commercial programs do - but again, crackers bypass this on a daily basis. (Although they usually crack apps to use the app, not just one specific file.)
Thanks, yea I didn't think of that. Might be a good idea me thinks! Also, Just wondering whether there is a type of *thing* which is like a DLL but includes a form as well. I want to include modules in my app, so say for example purposes my app contains a main form and a calculator module. The main form is the exe and the calculator gets called from a separate file when needed? Any ideas?
I don't usually store forms in DLLs but I would assume that it can be easily done; others here will have that answer.
mayayana wrote: You can put forms in a DLL and call them. There's no limitation. For restriction: Somewhere on MSDN there's a page about how to make a control licensed, the same way that VB controls are licensed and can't be run otherwise. I don't have a link to it, though. Another option might be something like a dummy parameter. Your DLL parameters can be seen in an object browser but that doesn't explain them. So besides the natural difficulty in figuring out how to call a function given object browser info., you could also make it more confusing by adding a dummy parameter, naming the parameters in a vague way, etc.
How do I put a form in a DLL? Probably if I make vague functions & that
then I'll probably get confused! I'll check out MSDN for that licencing
thing. Thanks for your help.
-- Is there any way I can prevent people using my DLLs in their programs? I mean, I'm new to making DLLs and I'm guessing that if I can reference my DLLs in my projects then there is nothing stopping anyone else from referencing my DLLs in their projects.
Also, Just wondering whether there is a type of *thing* which is like a DLL but includes a form as well. I want to include modules in my app, so say for example purposes my app contains a main form and a calculator module. The main form is the exe and the calculator gets called from a separate file when needed? Any ideas?
Thanks for the help.
On Fri, 28 May 2004 20:50:07 GMT, Visual Boodu .NET wrote: Auric__ wrote: On Fri, 28 May 2004 08:35:01 GMT, Visual Boodu .NET wrote:
Is there any way I can prevent people using my DLLs in their programs? I mean, I'm new to making DLLs and I'm guessing that if I can reference my DLLs in my projects then there is nothing stopping anyone else from referencing my DLLs in their projects.
Nothing that can't be bypassed by a determined cracker. You could have your DLL look in the registry for something, look for another preexisting file, require a password (either fixed or determined by something within the user's system), etc. - basically, do the same things that commercial programs do - but again, crackers bypass this on a daily basis. (Although they usually crack apps to use the app, not just one specific file.)
Thanks, yea I didn't think of that. Might be a good idea me thinks!
Yes, well, just remember that crackers can bypass *any* protection
scheme if they have reason to.
--
auric underscore underscore at hotmail dot com
*****
Jennifer Lopez wears enough diamonds to blind a city block.
Yea, thats fine, I think I would feel honoured if I saw my app on some
cracker page :)
Auric__ wrote: On Fri, 28 May 2004 20:50:07 GMT, Visual Boodu .NET wrote:
Auric__ wrote: On Fri, 28 May 2004 08:35:01 GMT, Visual Boodu .NET wrote:
Is there any way I can prevent people using my DLLs in their programs? I mean, I'm new to making DLLs and I'm guessing that if I can reference my DLLs in my projects then there is nothing stopping anyone else from referencing my DLLs in their projects.
Nothing that can't be bypassed by a determined cracker. You could have your DLL look in the registry for something, look for another preexisting file, require a password (either fixed or determined by something within the user's system), etc. - basically, do the same things that commercial programs do - but again, crackers bypass this on a daily basis. (Although they usually crack apps to use the app, not just one specific file.)
Thanks, yea I didn't think of that. Might be a good idea me thinks!
Yes, well, just remember that crackers can bypass *any* protection scheme if they have reason to. How do I put a form in a DLL?
A DLL is like an EXE with a COM interface. You can do
anything you want to. Just add the form to the project and
control it through your exposed class(es).
You can also pass the events through if you need to.
In the exposed class, assuming you have a Form1, use:
Private WithEvents Frm as Form1
You can then write subs in your class for the form events, like:
Private Sub Frm_Clicked()
Msgbox "Form was clicked."
end sub
Excellent advice, thanks. I made a DLL with a form which had a button and
'referenced' the DLL in my project (project - references) then added this
code:
Dim frm As Projectdll.Class1
Set frm = New Projectdll.Class1
Call frm.LdForm
Is that the right way to work with DLLs? What does 'Private WithEvents Frm
as Form1' do? What is a COM interface?
Thanks!
mayayana wrote: How do I put a form in a DLL?
A DLL is like an EXE with a COM interface. You can do anything you want to. Just add the form to the project and control it through your exposed class(es). You can also pass the events through if you need to. In the exposed class, assuming you have a Form1, use: Private WithEvents Frm as Form1 You can then write subs in your class for the form events, like: Private Sub Frm_Clicked() Msgbox "Form was clicked." end sub
OK I figured out I can just do:
Dim frm As New Projectdll.Class1
And that works OK. Now I would like the DLL to be a MDI child form to be
called into my (obviously) MDI parent. When I try to do this it craps
itself (it can't find a MDI parent form). Is there any way around this?
Visual Boodu .NET wrote: Excellent advice, thanks. I made a DLL with a form which had a button and 'referenced' the DLL in my project (project - references) then added this code:
Dim frm As Projectdll.Class1
Set frm = New Projectdll.Class1
Call frm.LdForm
Is that the right way to work with DLLs? What does 'Private WithEvents Frm as Form1' do? What is a COM interface?
Thanks!
mayayana wrote: How do I put a form in a DLL?
A DLL is like an EXE with a COM interface. You can do anything you want to. Just add the form to the project and control it through your exposed class(es). You can also pass the events through if you need to. In the exposed class, assuming you have a Form1, use: Private WithEvents Frm as Form1 You can then write subs in your class for the form events, like: Private Sub Frm_Clicked() Msgbox "Form was clicked." end sub
What does 'Private WithEvents Frm as Form1' do?
That's to use in the class of your DLL if you want to trap
form events. The "Frm" variable was meant to be a variable
in your DLL class, not the variable for your object within
the main project.
What is a COM interface?
Component Object Model. A COM object is registered
in HKCR, along with its type library. A COM object also has a
specific structure, such that the type library can be accessed and
functions in the COM object can be discovered based on what's
in that type library. A VB DLL is an ActiveX DLL, which is
a COM DLL.
COM is basically ActiveX, though the definitions are murky
because they're as much marketing as they are technical terms.
A fun quote from "The Essence of COM", a book by a notably
cranky author by the name of David S. Platt:
" The term ActiveX is another winner....the term "ActiveX" has no
technical meaning whatsoever, although it did have several
different meanings at various times. It is today a branding prefix, the
same as the letters "Mc" in front of all the food at the restaurant
with the golden arches."
The Object Browser is actually a COM object browser. It reads
COM object type libraries and displays what it finds. That's as
opposed to non-COM DLLs like shell32.dll or kernel32.dll, for
which there's no "self-documenting" functionality. With those you
just have to know the function that you want. That's why there's
"intellisense" for components added to your project but not for
kernel32.dll, even though you may have declared a kernel32.dll
function. You can get the function parameters popup for that
because VB knows it from your declare, but you can't get an
intellisense listbox menu because kernel32.dll doesn't "expose"
a COM interface to know it's functions.
And that works OK. Now I would like the DLL to be a MDI child form to be called into my (obviously) MDI parent. When I try to do this it craps itself (it can't find a MDI parent form). Is there any way around this?
Why would you put a form inside a DLL if you want it to be
an MDI child? I don't understand what you're trying to achieve.
The point of the DLL is that you can package functionality and
make it easily accessible with a COM interface. The form inside
your DLL is only accessible to the extent that you've provided public
methods in the DLL class(es) that can act on it in some way.
That form has no relation to an MDI form in your project.
In case it's any help, I've got sample DLL code with a form
in it: http://www.jsware.net/jsware/zips/dllsamp.zip
With the MDI form I figured that if you can create a form in a DLL then you
could create a MDI form to be called into my MDI parent. It doesn't really
matter too much. Basically the reason I'm looking into DLLs is that my
application will need constant updating so it would be easier and a lot less
Kbs when downloading the updates... Update only the modules which need
updating rather than the whole exe every time. For my application think of
it like Outlook Express, the main screen is my exe, when you click on say
the accounts section, that will be called from a DLL.
As for your project, at this line:
Set SampOb = New SampleObject
And this line:
Set Ob = CreateObject("SampleDLL.SampleObject")
I get Run-time error '429': ActiveX component can't create object
mayayana wrote: What does 'Private WithEvents Frm as Form1' do?
That's to use in the class of your DLL if you want to trap form events. The "Frm" variable was meant to be a variable in your DLL class, not the variable for your object within the main project.
What is a COM interface?
Component Object Model. A COM object is registered in HKCR, along with its type library. A COM object also has a specific structure, such that the type library can be accessed and functions in the COM object can be discovered based on what's in that type library. A VB DLL is an ActiveX DLL, which is a COM DLL.
COM is basically ActiveX, though the definitions are murky because they're as much marketing as they are technical terms. A fun quote from "The Essence of COM", a book by a notably cranky author by the name of David S. Platt:
" The term ActiveX is another winner....the term "ActiveX" has no technical meaning whatsoever, although it did have several different meanings at various times. It is today a branding prefix, the same as the letters "Mc" in front of all the food at the restaurant with the golden arches."
The Object Browser is actually a COM object browser. It reads COM object type libraries and displays what it finds. That's as opposed to non-COM DLLs like shell32.dll or kernel32.dll, for which there's no "self-documenting" functionality. With those you just have to know the function that you want. That's why there's "intellisense" for components added to your project but not for kernel32.dll, even though you may have declared a kernel32.dll function. You can get the function parameters popup for that because VB knows it from your declare, but you can't get an intellisense listbox menu because kernel32.dll doesn't "expose" a COM interface to know it's functions.
And that works OK. Now I would like the DLL to be a MDI child form to be called into my (obviously) MDI parent. When I try to do this it craps itself (it can't find a MDI parent form). Is there any way around this?
Why would you put a form inside a DLL if you want it to be an MDI child? I don't understand what you're trying to achieve. The point of the DLL is that you can package functionality and make it easily accessible with a COM interface. The form inside your DLL is only accessible to the extent that you've provided public methods in the DLL class(es) that can act on it in some way. That form has no relation to an MDI form in your project.
In case it's any help, I've got sample DLL code with a form in it: http://www.jsware.net/jsware/zips/dllsamp.zip
> I get Run-time error '429': ActiveX component can't create object
You need to load the DLL and test projects as a group.
Then reference SampleDLL from the test project. (And
set the test project to start: Right-click ProjectTester; click
Set as Startup With the MDI form I figured that if you can create a form in a DLL then
you could create a MDI form to be called into my MDI parent. It doesn't
really matter too much. Basically the reason I'm looking into DLLs is that my application will need constant updating so it would be easier and a lot
less Kbs when downloading the updates... Update only the modules which need updating rather than the whole exe every time. For my application think
of it like Outlook Express, the main screen is my exe, when you click on say the accounts section, that will be called from a DLL.
The DLL is not part of your project, though. It's like
another program. You can use a DLL to do workhorse
functions but you can't call your DLL form to load inside
the MDI parent any more than you could if it were in
another EXE that you made.
I see what you mean about the Outlook Express example. OE
does seem to work that way, with a very small program EXE.
Maybe what you want is an OCX that you can put on a main form
in the EXE. You could then update your OCX. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Johann Blake |
last post by:
I can hardly believe I'm the first one to report this, but having gone
through the newsgroup, it appears that way.
I would like to open a solution in the VS.NET IDE that consists of
multiple...
|
by: Shiraz |
last post by:
Hi
I just made an installer for an application that uses two external COM dlls.
On the surface, everything seems to be running smoothly and the the
application runs without any errors. However,...
|
by: Devender Khari |
last post by:
Hi Friends,
I'm facing a situation as follows, need help on identifying possible issues.
There is an MFC application developed in VC6.0, say ABCVC6.exe and another
developed in VC.NET, say...
|
by: ZMan |
last post by:
Scenario:
This is about debugging server side scripts that make calls to
middle-tier business DLLs. The server side scripts are legacy ASP 3.0
pages, and the DLLs are managed DLLs...
|
by: Oenone |
last post by:
I'm sure there's an obvious way to do this, but I'm missing it so far.
I have an ASP.NET application that relies on several DLLs to work. Currently
in order to get my site working I have to put...
|
by: Brian Bischof |
last post by:
I'm having troubles getting the debugging process to work consistenly for
external classes. I got it to work once and then I turned it off. But now I
can't get re-enabled. Here is what I'm doing....
|
by: Dave |
last post by:
Hello
The application I'm building an installer for uses dlls which were
developed originally in C. Since the application itself is developed in
C#, these dlls were wrapped using SWIG....
|
by: Jeff Lynn |
last post by:
Help!
I recently upgraded my VS V6 to VS 2005 and was unable to build projects
that were perfectly ok under VS V6. Where VS 2005 fails was in the linker
resolving external DLLs, which are Open...
|
by: gopal |
last post by:
I am developing an application in CSharp - windows forms based, which
copies the DLLs both unmanaged and managed DLLs from a shared folder
and will overwrite the existing versions of managed &...
|
by: =?Utf-8?B?UmljaGFyZA==?= |
last post by:
Hi,
I usually deploy my ASP .NET application to the server by publishing, using
Visual Studio 2005 publish feature. This creates the Bin folder on the
server, with the compiled DLLs.
I've...
|
by: Rina0 |
last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
|
by: erikbower65 |
last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps:
1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal.
2. Connect to...
|
by: linyimin |
last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
|
by: kcodez |
last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
|
by: Taofi |
last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same
This are my field names
ID, Budgeted, Actual, Status and Differences
...
|
by: Rina0 |
last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
|
by: DJRhino |
last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer)
If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _
310030356 Or 310030359 Or 310030362 Or...
|
by: Mushico |
last post by:
How to calculate date of retirement from date of birth
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
| |