You are invited to download the library (just 2 commands) and show me just how easy it is to beat it. As PureBasic v3.94 is considered a "foreign language" by the protector, perhaps you can try to break it with that. I hope you'll help me test this thing, if nothing else it should be a bit of fun.
PrepareAuthCode()
The PrepareAuthCode() command prepares a key that a calling program must supply
to a protected dll in order to call its functions. While the less said about the key the
better, suffice to say that many steps have been taken to protect the key from being
copied, examined, or created from a "cheater" dll. If a user attempts to create a dll in
PB 4 that calls the PrepareAuthCode() function and returns the code, unlicensed usage
will be detected. The command must be executed from a toplevel process that has a
window at least 640*480 in size, is foreground and visible.
Code: Select all
; Example of authorized usage
; The window must be foreground, visible and at least 640*480 in size
; A screen is ok too
;
OpenWindow(0,0,0,640,480,"DLLAuth Library Test",#PB_Window_ScreenCentered|#PB_Window_SystemMenu)
vcode=PrepareAuthCode()
OpenLibrary(0,"secured.dll")
CallFunction(0,"Init",vcode)
CallFunction(0,"ShowBox")
Repeat:Until WaitWindowEvent()=#WM_CLOSE
Code: Select all
; Example of a dll you might write that protects itself
; with the PB DLL Protector
;
Global auth_ok
ProcedureDLL Init(key)
If ExamineAuthCode(key)
auth_ok = #True
Else
auth_ok = #False
EndIf
EndProcedure
ProcedureDLL ShowBox()
If Not auth_ok
ProcedureReturn 0
EndIf
MessageRequester("Notice","I'm doing this because I'm called by a PureBasic program!")
EndProcedure