Julian, It's not a perfect solution but why not include a sub which takes an encrypted key and which unlocks the others. You could make the key dependent on all sorts of obscure things such as date/time, app version, dll version etc etc which your app would know how to construct at runtime but others won't. If every other function in the dll checks that key has been provided before doing anything then you've gone someway towards securing it - at the very least it makes it much harder for someone to crack. Your problem then of course is having a way for the other functions to recognise that it was the current calling process which has supplied a correct key but there's many ways to overcome this, for example, pass the unlock routine a 2nd value (say a hwnd) and pass that same hwnd with each other call (that saves you having to recalculate the key every call). You could even have a double check if the unlock routine used that Hwnd to check something about the form (for example it's title) and rejected the key if it wasn't correct.
Ian ----- Original Message ----- From: Julian Holt To: [email protected] Sent: Thursday, January 27, 2005 5:55 AM Subject: [vbhelp] Protecting a dll? Guys I have written a dll (ActiveX) and want to protect it in some way. I will pass it on to our users but I don't want someone conversant with VB, C etc to be able to "use it" in their own apps without my documentation. In VB6 there is a tool called Object Browser. Basically using this you can figure out all the function calls within my DLL. Is there any way to stop this? I could use cryptic function names so its not obvious what they do, but there must be a better way? I use a tool to protect our exe files (encrypt) but it doesn't work with DLLs. Any idea of 3rd party apps that I could use to wrap around my dll? Thanks for any thoughts Julian Holt [Non-text portions of this message have been removed] '// ======================================================= Rules : http://ReliableAnswers.com/List/Rules.asp Home : http://groups.yahoo.com/group/vbHelp/ ======================================================= Post : [email protected] Join : [EMAIL PROTECTED] Leave : [EMAIL PROTECTED] '// ======================================================= ------------------------------------------------------------------------------ Yahoo! Groups Links a.. To visit your group on the web, go to: http://groups.yahoo.com/group/vbhelp/ b.. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. [Non-text portions of this message have been removed] '// ======================================================= Rules : http://ReliableAnswers.com/List/Rules.asp Home : http://groups.yahoo.com/group/vbHelp/ ======================================================= Post : [email protected] Join : [EMAIL PROTECTED] Leave : [EMAIL PROTECTED] '// ======================================================= Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/vbhelp/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
