Get public enum value from my dll

pdabasic

Active Member
Licensed User
Hello!

I complited agraham's webbrowser dll with webbrowser.readystate property like a public enum.

How can I interpret this value on b4p?

Tahnk you!
 

pdabasic

Active Member
Licensed User
If I remember correctly you cannot directly pass enums. You can probably expose the enums as constants (fields).

Thank you Erel!

Can you send me little example, what represent the better way for this option?

My dll look's like:

public Enum BrowserState
{ get { return wb.ReadyState; } }

I think add an if condition to the method and return the curent value as string but I don't understand the c language well.

Here is the reference about the property:
ReadyState
 

Basic4Life

Member
Licensed User
You don't really need to change the dll to get the ReadyState. I'd suggest using the door library instead. Please have a look at my attached example.
 

Attachments

  • ReadyState.zip
    11.4 KB · Views: 205

pdabasic

Active Member
Licensed User
You don't really need to change the dll to get the ReadyState. I'd suggest using the door library instead. Please have a look at my attached example.

Thank you Basic4Life! :sign0188:

Its work perfect!
But It doesn't what solved my problem :(
I thought the readystate value will be false when the browser not connected or the page isn't available, but it isn't get this value....

I haven't got more idea...

I tried to find the "page cannot loading" in the document text but is only writable property...
Now the ready state...
Tried:
In the _navigating url and the _documentcompleted url same or not but on device is the same on fail too..

What is the solution???
:sign0163:
 

Basic4Life

Member
Licensed User
A simple solution is using the HTTP library and doing a quick "HEAD" request to check prior to navigating to the url with the browser.
Please see the attached example for implementations using ResponseCode and ErrorMessage
 

Attachments

  • ReadyState_2.zip
    15.8 KB · Views: 224
Top