I have a really odd issue. wwEncryption works fine in the Foxpro 9 development environment but does not work from the compiled .exe file. Is it possible there is something else that needs to be distributed? I know this is not a lot of information but I am not quite sure how to explain its not working, it just isn't. When I encrypt a string I am not getting back a string - not sure what I am getting back honestly. Messagebox will not display it.
Check the error message and log it. Make sure you're not eating errors and that wwDotnetBridge works in your application.
+++ Rick ---
Solved. It was 2 things:
- I was indeed eating errors. Fixing that helped a lot
- It appears you have to initialize wwDotNewBridge before using wwEncryption. I wasn't clear on that.
Seems to work fine now both in the IDE and the EXE.
You shouldn't need to initialize first as wwEncryption creates an instance of wwDotnetBridge internally for you. The only time this can be a problem is if you have a runtime being loaded with a different version from somewhere else (ie. perhaps old code that explicitly loaded .NET 2.0).
It's still a good idea to do just to ensure that the one and only version of .NET is loaded and used right on startup, but I would try and figure out why that particular failure occurred. You should be able to duplicate that scenario by starting your dev environment fresh and then running the app, which in theory should duplicate your application starting clean.
+++ Rick ---