In almost 30 years of writing foxpro, I've never seen this.
I have a project compiled to an exe that is my main app.
I have a separate project compiled to a MTDLL. This "program" has no user interface. I call it a COM object.
I call the MTDLL from the main app. Works great. Been working for 30 years.
There is lots of code in my COM object. One thing there is NOT is it does not call any prg's simply because I never had any need to do so.
I have a prg that contains a lot of code to do one particular function. I call that prg from many places in my main app. This prg is named disbursedeposit.prg
Recently I modified my COM object to ALSO call disbursedeposit()
Here is the code from my COM object, where it makes a call to disbursedeposit:
lnhndl=FCREATE("c:\vfe2005\dev\itf\temp\testingcomleft1.txt")
FPUTS(lnhndl,"lycurrentbalance="+STR(lycurrentbalance,12,2))
FCLOSE(lnhndl)
lnretval=100
lnretval=disbursedeposit2(lycurrentbalance,"",lopurchrec.cinmates_id,this.loparent.oposdebitsbo,this.loparent.ooipymtspercdbobo,this.loparent.oposdebitpymtsbo,this.loparent.ooinewdepositsbo,.f.,"",0.00,lopurchrec.cbookings_id,lopurchrec.cshiftlog_id,lopurchrec.cuserid,.f.,0.00)
lnhndl=FCREATE("c:\vfe2005\dev\itf\temp\testingcomleft2.txt")
FPUTS(lnhndl,"lnretval="+STR(lnretval,12,0))
FCLOSE(lnhndl)
When I run my main app and access a screen that calls the COM object, the code above gets exectued. It creates the text file named c:\vfe2005\dev\itf\temp\testingcomleft1.txt as it should.
The line lnretval=disbursedeposit2(lycurrentbalan..... gets executed
For this question I have changed disbursedeposit to do nothing except after the parameters statement, return 0
My app has no errors and it generates c:\vfe2005\dev\itf\temp\testingcomleft2.txt which contains the value of lnretval. The value is 100.
That tells me disbursedeposit is not really getting called or executed. I do not get any errors. It is as if it is just ignored at runtime.
I can only assume calling disbursedeposit from my COM object is not the same as calling it from my main app but I have no clue what to do about it.
Thanks for any advice,
John
I have a project compiled to an exe that is my main app.
I have a separate project compiled to a MTDLL. This "program" has no user interface. I call it a COM object.
I call the MTDLL from the main app. Works great. Been working for 30 years.
There is lots of code in my COM object. One thing there is NOT is it does not call any prg's simply because I never had any need to do so.
I have a prg that contains a lot of code to do one particular function. I call that prg from many places in my main app. This prg is named disbursedeposit.prg
Recently I modified my COM object to ALSO call disbursedeposit()
Here is the code from my COM object, where it makes a call to disbursedeposit:
lnhndl=FCREATE("c:\vfe2005\dev\itf\temp\testingcomleft1.txt")
FPUTS(lnhndl,"lycurrentbalance="+STR(lycurrentbalance,12,2))
FCLOSE(lnhndl)
lnretval=100
lnretval=disbursedeposit2(lycurrentbalance,"",lopurchrec.cinmates_id,this.loparent.oposdebitsbo,this.loparent.ooipymtspercdbobo,this.loparent.oposdebitpymtsbo,this.loparent.ooinewdepositsbo,.f.,"",0.00,lopurchrec.cbookings_id,lopurchrec.cshiftlog_id,lopurchrec.cuserid,.f.,0.00)
lnhndl=FCREATE("c:\vfe2005\dev\itf\temp\testingcomleft2.txt")
FPUTS(lnhndl,"lnretval="+STR(lnretval,12,0))
FCLOSE(lnhndl)
When I run my main app and access a screen that calls the COM object, the code above gets exectued. It creates the text file named c:\vfe2005\dev\itf\temp\testingcomleft1.txt as it should.
The line lnretval=disbursedeposit2(lycurrentbalan..... gets executed
For this question I have changed disbursedeposit to do nothing except after the parameters statement, return 0
My app has no errors and it generates c:\vfe2005\dev\itf\temp\testingcomleft2.txt which contains the value of lnretval. The value is 100.
That tells me disbursedeposit is not really getting called or executed. I do not get any errors. It is as if it is just ignored at runtime.
I can only assume calling disbursedeposit from my COM object is not the same as calling it from my main app but I have no clue what to do about it.
Thanks for any advice,
John