I had it all working even with VProtect, but had not as yet re-registered the dlll as it was already registered.
On a hunch, I thought I would see if the dll would un-register / re-register. It did not.
So I commented all the VProtect code out but forgot to comment out the the include #include "VMProtectSDK.h.
And it would still not register the dll with the system.
So I commented the #include "VMProtectSDK.h out and voila! we register.
Un-commented it and we fail to register it
I really need to solve this as I was so very close to ponying up for this Ultimate.
It is not simply having #include "VMProtectSDK.h there that causes the problem
It only appeared that way for a while. - this made little sense anyway.
It turns out that after commenting out all the API calls, a Rebuild Project.dll was required to be able to register the dll. This was with #include "VMProtectSDK.h in there. - Sorry for the confusion.
Now, if I un-comment say, the: int res = VMProtectSetSerialNumber(serial); The code compiles and links but will not register the COM dll with the system, Whether I rebuild the project or just build it.
It seems that VMPROTECTSDK32.DLL needs to be in the output folder not the source code folder for registration to take place. I found this out using dependency walker.
From the FAQ:
Is it necessary to include VMProtectSDK32.dll/VMProtectSDK64.dll to installer?
No. These libraries are necessary until you protect the application. After protection VMProtect replaces every call to the libraries with the calls of embedded module, so you don’t need those files anymore.