×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

deploy htmllistener in exe

deploy htmllistener in exe

deploy htmllistener in exe

(OP)
I have found that I can't deploy code in a com object that trys to use the _reportlistener.vcx. For example:

The following code produces the report using the vfp classes on my development machine but does not when deployed to a test machine. Instead lolistener = .f.

CODE

    define class getstream as custom OlePublic
    . . .
    lctheoutput=""
    loListener = .null.
    Set Classlib To _reportlistener.vcx Additive
    loListener = Createobject("htmllistener")
    IF TYPE("lolistener") <> "O" then
         CLOSE TABLES all
         RETURN "Createobject('htmllistener') does not create an Object"
    ELSE   
    Report Form regionbudget.frx Object loListener
    lctheoutput=Filetostr(loListener.targetfilename)
    return lctheoutput
    . . .
    enddefine
 

The project includes classes: _htmllistener.vcx and _fixcursor.vcx

I Shield redistributables include: Gdiplus.dll, msvcf71.dll, MSVFP 9 Report Apps,  MSVFP 9 Runtime Libs and MSXML4.0 twice.

Any help would be greatly appreciated. I am greatly stuck.
 

Oakgrove Computer Grouper
Lansing, MI

RE: deploy htmllistener in exe

oakgrove,

You could include something like

CODE

LOCAL lcError
lcError = "no error"
ON ERROR lcError = trans( Error()) + "-" + Message() + "-";
  + trans( lineno())
and return this string together with your other return string, might help you to narrow down. Also, there's quite a bit of conditional code in these classes, depending on _VFP.Startmode. And finally, the startup directory of your server is not the app dir, its Windows/System32. In case some class is looking for some files...
Hope that helps.

Volker/

RE: deploy htmllistener in exe

(OP)
Thanks for the reply.
1.Actually I do have the error check in the code. It tells me that "lolistener is not an object" when the "Repo Form ..." line trys to execute.
2.The location of files in directories may well be part of the problem. I would have thought that I Shield would put them in the correct place. Otherwise .
3.I am not familier with the effect of _VFP.Startmode and how it might effect execution. Can you expand on this?

Oakgrove Computer Grouper
Lansing, MI

RE: deploy htmllistener in exe

as for 1.:
This is the code in the htmllistener.init():

CODE

IF DODEFAULT()
   THIS.AppName = OUTPUTHTML_APPNAME_LOC
ELSE
   RETURN .F.   
ENDIF
Sorry, I haven't followed it up through the complete inheritance hierarchy. But since no object is beeing created the "return .F." part ran, in other words some init() in one of the parent classes of the htmllistener failed. I'm afraid you'll have to trace...

As for 2.:
That would only have an effect if any code refers to files in some AppDir-relative path, something like "use dbf\tablex".

And 3.:
_VFP.Startmode (or Application.Startmode) is a value between 0 and 5 telling you how your app was started, i.e. 0 = you're in the development environment, 2 = Out of process server etc. Have a look at the help file, the page is called "StartMode Property". In the classes you use this property is used to determine whether output (e.g. Messagebox()) is allowed - which it isn't when the app runs as a COM server.

Personally I would go with ( 1. ) first and find the class that refuses to instantiate. That will most likely tell you where/what the problem is. Good luck.

Volker/

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close