On 2016-11-30 17:52, Tracy Pearson wrote:
Mike,
An EXE suggests it will do something additionally to the functionality you are describing. Perhaps a UI or data validations.
If this is not the case, I would make it a Multi-threaded COM DLL. Though that would mean you need to distribute the VFP9T.DLL.
There is the Single-threaded COM DLL as another option. I believe it does not require the VFP9T.DLL.
Yeah I agree it shouldn't be an EXE since no UI. I had tried the DLL approach but for some reason it didn't work. It's not an OLEPUBLIC class (at least not yet); it's just a Separator class (to be lightweight, although in today's world, nobody would notice the difference between a Separator and Session or Custom class).
I was trying to invoke it this way:
IF tlEntering THEN loLicense = NEWOBJECT("MBSS_Licensor","MBSS_Licensor.prg","MBSS_Licensor.exe",.F., tlEntering, .F., pcPrintID, this.oUser.cUserID, this.oClient.cClientName, STRTRAN(_screen.cAppName,'','\')) this.iLicenseKey = loLicense.iLicenseKey IF this.iLicenseKey < 1 THEN && problem llOK = .F. loLicense.ShowMessage() ELSE llOK = .T. ENDIF ELSE && exiting software; release license loLicense = NEWOBJECT("MBSS_Licensor","MBSS_Licensor.prg","MBSS_Licensor.exe",.F., tlEntering, this.iLicenseKey, pcPrintID) IF loLicense.lProblem THEN llOK = .F. loLicense.ShowMessage() ELSE llOK = .T. ENDIF ENDIF
It doesn't instantiate.