Interesting and on the same page, one of our former developers always made it a habit to use the EXE parameter to call newobject even inside the program. So then, when I have two copies of the program, say one for testing (programtest.exe) and one stable (program.exe) and execute anything in programtest that calls to a classlib in program.exe I get the "file descriptor" error you describe.
Obviously the solution for me (with a different goal in mind) was to eliminate the third parameter from the NEWOBJECT() calls. J On 7/24/07, Tracy Pearson <[EMAIL PROTECTED]> wrote: > > I've had success with > Set procedure to "fullpath\executable" > Set classlib to classlib.vcx in executable > > Dependencies of the class I instantiate need to be available before > creating > the object. I've never added the alias. > > HTH, > > Tracy > > -----Original Message----- > From: Richard Kaye > Sent: Tuesday, July 24, 2007 3:40 PM > > This one has bugged me on and off for a while so I figured I'd raise it > here > and see what the peanut gallery has to say... > > Every now and then I will distribute a custom report in the form of a > stand-alone PRG so that I don't have to rebuild my EXE every time this PRG > changes. This works great as long as I don't need any application specific > classes that are built into the EXE. So in general, if I need some thing > other than VFP base class behavior, I make it part of the project. Then > NEWOBJECT came along with its supposed ability to do something like this: > > o=NEWOBJECT('myclass','mylibrary','<mypath to myprogram.exe>') > > However, when I try this approach, I get an invalid file descriptor error > right after the attempt to create the object. Basically it can't read > anything out of the in memory executable. I've also tried this: > > SET CLASSLIB TO mylibrary IN <mypath to myprogram.exe> ALIAS mylibrary2 > ADDITIVE > o=CREATEOBJ('myclass') > > This seems to work sometimes and yet other times fails. All in all, quite > frustrating when I need a bit of one of my libraries available outside the > context of my EXE. > > > > [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.