VFP and .NET Interop
wwJsonSerializer & SET PATH TO
Gravatar is a globally recognized avatar based on your email address. wwJsonSerializer & SET PATH TO
  Kathy
  All
  Mar 27, 2017 @ 07:59am

Hello,
I have the following code in VFP and it works fine until I keep the first line; "SET PATH TO ..." (where my .DLLs are) which conflicts with the other parts of the project but as soon as I remove it, I get the error below.
I've tried to find a way around it to keep all files organized but have not been successful.
I'm keeping Newtonsoft.Json.DLL & wwDotNetBridge.dll in the root for now and it's working but I would appreciate any help for finding the logical solution.
Thanks,
Kathy

* SET PATH TO ".\other\"  
DO wwHttp
DO wwJsonSerializer
LOCAL lcUrl
lcUrl = "http://.../FX_RATES_DAILY/json"

loSer = CREATEOBJECT("wwJsonSerializer")
loHttp = CREATEOBJECT("wwHttp")
lcJsonResult = loHttp.HttpGet(lcUrl)
loSer.FormattedOutput = .T.
loJsonObject = loSer.DeserializeJson(lcJsonResult)

Gravatar is a globally recognized avatar based on your email address. re: wwJsonSerializer & SET PATH TO
  Rick Strahl
  Kathy
  Mar 27, 2017 @ 12:51pm

Use SET PATH TO "<path>" ADDITIVE to add multiple paths? In order to use the DLLs they need to be accessible.

Personally I would recommend you put the DLLs in your application's startup path and never physically change your folder always relying on SET PATH settings to find dependencies in other folders.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: wwJsonSerializer & SET PATH TO
  Kathy
  Rick Strahl
  Mar 28, 2017 @ 06:58am

Thank you so much Rick.
Taking your advice,
Kathy

© 1996-2017