Link to home
Start Free TrialLog in
Avatar of P.J. Hughes
P.J. HughesFlag for United States of America

asked on

VB6 DLL in VB.NET for Mobile Devices

I would like to create a DLL file with VB6 to be used in a VB.NET application for mobile devices.  The DLL contains code that we would like to protect, and that is why we would like to use VB6 as it cannot be decompiled/disassembled (at least not as easily as a .NET DLL).

I have created the DLL, added it as a reference and added the function calls to the mobile application.  Upon running it, I receive an error that the DLL is not registered.  I have registered it on the computer using RegSrv32 with no error.  I have set the DLL reference in VB.NET to register the DLL when copying it to the mobile device, this does not work.  I have also used the mobile version of RegSrv32 (something like RegSrvCE) but received an error code C1 leading me to believe a VB6 DLL cannot be used on Mobile Devices.

Am I wrong to think this cannot be done?  Is there another alternative to using VB6 to write the DLL and have it safe from being decompiled/disassembled?  Thanks! :)
ASKER CERTIFIED SOLUTION
Avatar of alexey_gusev
alexey_gusev
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of P.J. Hughes

ASKER

I did look into eVB but the Windows Mobile Team says it is just as easy to decompile as .NET.  That and it seems Microsoft has renamed it to WIndows Embedded and makes it really difficult to know if I am downloading/installing what I really want.
yes, that's just a bytecode in both cases.
is the code you want to protect too difficult to implement as C++ (I assume you have COM objects there)
Even when compiling the code as a DLL it is bytecode?

Well, it's hard to say if the code is too difficult to implement as C++, I have never tried.  We are strictly VB here and the code I want to protect is already in use in all of our VB6 applications.  I would like to leave it unchanged for the handheld but fear C++ would keep us from altering it.
I have touched eVB few years ago the very last time, but my memories tell me you need special runtime to be able to use it, so I assume it is a bytecode
Avatar of Mikal613
Yes if you want to use evb you need the runtimes which is not supported post WM5
So it sounds like my best bet is to use C++ to write a DLL that cannot be disassembled for a handheld device?
evc is what u want
What about obfuscating the code?  I was told there is a built in obfuscator in Visual Studio.  Or would the built in version be a total joke?
built in version =  total joke
Yeah, I figured the built in version would be the first one to get figured out.
I will accept alexey_gusev's first response as the solution.  Thanks everyone!