Products A-Z All Services Can't find what you're looking for? Chat Live!
Products A-Z Can't find what you're looking for? Chat Live!
Can't find what you're looking for? Chat Live!
When i running the my sample application i get the following error.
Startup Error: Failed to load control 'WebHost' from RE7_WEBHOST72.OCX. Your version of RE7_WEBHOST72.OCX may be outdated. Make sure you are using the version of the control that was provided with your application.
oFunds.Init(RE7.SessionContext)
oFund.CloseDown()
oFunds.CloseDown()
Hi Virginia,
Interesting ....
I'm having the exact same problem, let me guess it trips up when you call RE7.Init("Serial")
I've been talking to one of the API support guys now for about a week, bouncing emails to and fro, I'm guessing that like me you can login normally to the db in question (through RE) and that you have activated the module using an API unlock code already?
Brian Mickle sent me a little app today which was apparently designed to test that the API was connectable and that passed perfectly fine.
...
I've tried :
Any other ideas or tests you know of ?
In case anyone else comes across this error this is what it looks like :
Ok so the problem is described above.
And the API says that it can't create this ActiveX control for some reason.
A little digging around will reveal that Active X controls need to be created within the context of a "Parent Window" which means you need a Windows Forms object which has been fully initialised before you can make this call.
Basically to replicate the problem create a new winforms app then in the constructor for "Form1" add this code (C# version):
REAPIClass
MethodInfo
// this call causes the error
mi.Invoke(api,
VB would look something like this :
REAPIClass api = new REAPIClass()
api.Init("Serial_number")
....
Now add a button to the form and move the above code in to the "OnClick" handler for the button.
Upon clicking the button the issue has seemingly gone away.
Personally I would suggest that this is a bug but how else would you otherwise get the login dialog to appear ... so its almost common sense that this API is used within the context of a parent windows form.
It just means you can't get stuck in to the API too soon !!!
DOH !!!
It might be worth noting that if you created your own login dialog you could make the call in to the API with all the params provided, this would mean that the control in question would not be needed and thus not be called.
It's a bit of a headache but it's another option that people can look in to.
Your easiest solution is to just call
OLEInitialize(Nothing)
This needs to be declared as follows:
Public Declare Function OLEInitialize Lib "ole32" Alias "OleInitialize" (ByVal intp As IntPtr) As Integer
David