|
You can't delete the .DLL while it's loaded into a process, period. There's no way around this. If your code was it's own .EXE, that's a different story, but a .DLL has no chance of deleting itself.
Since you already have the mechanism to determine if the user is authorized, it's simple. On each of your method calls, or just the very important ones, run your check or check a flag that your authorization code sets, and return nothing if that check fails.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
If you load the dll from another assembly into its own AppDomain, you can turn Shadow Copying on. Shadow copying copies the dll to a temp directory. This would obfuscate the location of the DLL once you've self-destructed, but you'd still have the DLL floating around in the temp dir.
|
|
|
|
|
Yep, that's true, and I think the point of his "security feature" is to remove all traces of the .DLL, so that wouldn't work for him.
Why on earth you would want to do something like this "feature" is beyond me...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Look at codesecurity, obfuscation and authenticating to a server. Probably the best way to keep your users from continuing to use your DLL is by generating a key that is generated from machine specific (BIOS) values, having them send it to you, and then you sending a 'public key' back. The other way is to authenticate every call to your server, but this would only work well for DLLs that already talk to networks outside its own.
Ultimately, unless you are writing code that unlocks the keys of the universe, you're best off obfuscating your code and using simple time countdown techniques.
Andrew
|
|
|
|
|
Don't tell me! Tell the OP! He's the one that wants to do this, not me!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
You need to get your OP to start reading this forum and get him to realize that you can't put together ghastly hacks like this. Your users will resent you (see Sony's fiasco with its copy protection trojan) and developers will not respect you. This is something that many technology managers fail to think about, the code that they represent. Many of them seem to think that all of their problems are outside of the code.
Andrew Peters
|
|
|
|
|
Yeah I know that. But from deep within my heart, I think why any unauthorised programmer can make the same program like mine with my dll. I want destroy the very basis of that illegal program by deleting my own dll.
I have no intention of selling or giving that dll, so the matter of "developers will not respect me" is over right here.
Iftikhar Ali
|
|
|
|
|
AndrewPeters wrote: Look at codesecurity, obfuscation and authenticating to a server. Probably the best way to keep your users from continuing to use your DLL is by generating a key that is generated from machine specific (BIOS) values, having them send it to you, and then you sending a 'public key' back.
Tell me about this in detail, PLEASE! with coding.
AndrewPeters wrote: Ultimately, unless you are writing code that unlocks the keys of the universe, you're best off obfuscating your code and using simple time countdown techniques.
Whats countdown techniques, please tell me in detail.
Iftikhar Ali
|
|
|
|
|
Just to make my dll more secure and destroying the software (its base) of that illegal user.
What you think? I think its a right of every programmer.
Iftikhar Ali
|
|
|
|
|
A right? Maybe.
Practical from a developers perspective? Definitly not...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I don't want anybody (Ofcourse except me) to use my dll.
Its clear now.
Now tell me what should I do? (With professional look)
Iftikhar Ali
|
|
|
|
|
Iftikhar Ali wrote: I don't want anybody (Ofcourse except me) to use my dll.
Just look at how Microsoft (or ANY developer for that matter) has had code pirated over the years. You can only do so much before it becomes too hard and impractical.
Iftikhar Ali wrote: Now tell me what should I do?
Rather demanding aren't you? Just do what we've been advising you to do and that's do a check when your DLL is loaded and then return nothing from any method/property call. There's nothing difficult about this. Follow the leads we have given you and do some research.
If you have a problem with a bit of code you have written, we will certainly have a look and advise what to do, but we will not write it for you.
Iftikhar Ali wrote: (With professional look)
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
Steve Pullan wrote: Just do what we've been advising you to do and that's do a check when your DLL is loaded and then return nothing from any method/property call.
OK, I'll stuck with this.
I'm only demanding this because I read on MSDN that you can update an exe from within it.
Thanx (EVERYBODY)
Goodbye
Iftikhar Ali
|
|
|
|
|
Please tell me this in detail (Since I'm not CHEETAH in VB.NET) with coding.
I think after going through your process, the best way is that delete (empty) temp files folder. Is this possible?
Iftikhar Ali
|
|
|
|
|
Dave Kreskowiak wrote: You can't delete the .DLL while it's loaded into a process, period. There's no way around this.
As far as I know somebody post an article of Update exe from within the code of same exe.
So I think it is possible.
Iftikhar Ali
|
|
|
|
|
Supply the link to article. I think you're mis-understanding what it says, because you cannot overwrit a file that is locked by another process, or your own process for that matter.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Sorry, but I didn't remember the link and I use two VB.NET forums & MSDN so it is difficult for me to remember.
I think it is on MSDN. But its possible. Maybe you don't know it.
Iftikhar Ali
|
|
|
|
|
here the problem
we have 3 indicator b1 b2 b3
i need to create a array
it will consist of
b1b2
b1b3
b2b3
b1b2b3
now lets say i have 5 indicators b1 b2 b3 b4 b5
I need the following
b1b2 b2b3 b3b4 b4b5
b1b3 b2b4 b3b5
b1b4 b2b5
b1b5
b1b2b3 b1b3b4 b1b4b5
b1b2b4 b1b3b5
b1b2b5
b2b3b4 b2b4b5
b2b3b5
b3b4b5
b1b2b3b4
b1b2b3b5
b1b2b4b5
b1b3b4b5
b1b2b3b4b5
i think i have all the combo criscross
i need to have the 5 indicator and i need vb to put the above combo in a array
26 combo in 1 array 26 length
i tried for weeks and i am going in circle
thanks for any help
nick
|
|
|
|
|
i always have trouble explaining thing
i hope this explains it better
I have 3 binary variables
b1 b2 b3
now i need a single array to cross them
in array 0
it has to be b1
in array 2 it b2
in 3 it b1b2 combine
so it look like this
myarray(0)=b1
myarray(1)=b2
myarray(2)=b3
myarray(3)=b1b2
myarray(4)=b1b3
myarray(5)=b2b3
myarray(6)=b1b2b3
now if it 5 i need it as
myarray(0)=b1
myarray(1)=b2
myarray(2)=b3
myarray(3)=b4
myarray(4)=b5
myarray(5)=b1b2
myarray(6)=b1b3
myarray(7)=b1b4
myarray(8)=b1b5
myarray(9)=b2b3
myarray(10)=b2b4
myarray(11)=b2b5
myarray(12)=b3b4
myarray(13)=b3b5
myarray(14)=b4b5
now it goes to location 5 get that info (b1,b2) now it adds the last 3 b3 to b5
it start at 5 because the i have a total of 5 variable
if i had 3 it would goto location 3
4 would go to 4 etc
myarray(15)=b1b2b3
myarray(16)=b1b2b4
myarray(17)=b1b2b5
go to locaton 6 then add b4 and b5
myarray(18)=b1b3b4
myarray(19)=b1b3b5
goto location 7 add variable 5
myarray(20)=b1b4b5
now location 8 has the b5 variable in it so cant use it
now it location 9 that b2b3 add 4 to 5
myarray(21)=b2b3b4
myarray(22)=b2b3b5
location 10
myarray(23)=b2b4b5
location 11 (b2b5) cant use because it has b5
location 12 can be use
myarray(24)=b3b4b5
location 13 +14 cant be used because b5 is in it already
that put it at location 15
myarray(25)=b1b2b3b4
myarray(25)=b1b2b3b5
now go to 16 use it
myarray(25)=b1b2b4b5
cant use 17 b5 in it
we can use 18
myarray(26)=b1b3b4b5
19 cant use
20 cant use
21 can use
myarray(27)=b2b3b4b5
now 22 23 24 cant use location 25 holds b1b2b3b4 so we add b5
myarray(28)=b1b2b3b4b5
and that would end it because it hold all 5 variable
b1 and b2 would be numbers added together in the array location
i use string b1 b2 just for testing too make sure the right value will go in the array
nick
|
|
|
|
|
Hello all,
Is it possible to copy a vb6 window (a ThunderRT6FormDC) and all its contents and display them in real-time inside of a different window. I currently have a third party app, and I want to display one of its sub-frames inside of my own program. The particular window I'm interested in doesn't accept any user input, it just displays information. Is there any way of copying the subframe, is it possible to simultaneously display 1 window in more than one location, would I have to make the third-party program's main window a child window in my program. I'm basically wondering 1) is this possible, 2) how would I do it. If you need me to explain it better, just let me know. Thanks in advance.
Brandon Caesar
|
|
|
|
|
What you want to do is POSSIBLE, but very difficult to pull off. What you have to do is create a new device context for the other application to draw on, then convince the other window to draw itself to the new context. There is nothing in the .NET Framework that will help you with this.
You might want to look into VNC libraries to help. They use approximately the same technique to do what PCAnywhere does, remotely view another machines desktop and control it. You'll have to adapt the technique to "remotely" trick the other app into drawing itself onto a device context that is your form.
This is by no means easy and information on the subject is very sparse. The question you should be asking is "Is the investment in effort worth it?"
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I know that this is probly how the control was made but is there a way to adjust the scroll bar to be wider.
1. Out of clutter, find simplicity.
2. From discord, find harmony.
3. In the middle of difficulty lies opportunity.
Albert Einstein
three rules of work
|
|
|
|
|
i have a problem regarding master.
hmm..
i am currently doing a project which requires me to design a template using master. and i have no idea on how to add my pictures,etc to the master page. i also dun know how to put the template (master) to my aspx.
can someone help me solve this problem..?
thanks a million.
-DarkangeL-
|
|
|
|
|
How about asking ASP.NET specific questions in the ASP.NET Forum[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|