Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

deploy htmllistener in exe

Status
Not open for further replies.

oakgrove

Programmer
Sep 22, 2002
51
0
0
US
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
 
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/
 
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
 
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/
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top