06-15-2019, 12:03 AM
The following powershell code can be run successfully in powershell_ISE, but it prompts to load dll error in QM, how to fix it, thanks in advance
Code reference: https://www.example-code.com/powershell/create_json.asp
Because the ChilkatDotNet component does not provide QM programming code, I very much hope to solve the above problem.
I have not tried the C# code example. As far as I know, C# code needs to deal with the quotes and other issues.
Macro PS run
Code reference: https://www.example-code.com/powershell/create_json.asp
Because the ChilkatDotNet component does not provide QM programming code, I very much hope to solve the above problem.
I have not tried the C# code example. As far as I know, C# code needs to deal with the quotes and other issues.
Macro PS run
str code=
;[Reflection.Assembly]::LoadFile("C:\Chilkat\ChilkatDotNet47.dll")
;
;$json = New-Object Chilkat.JsonObject
;
;# The only reason for failure in the following lines of code would be an out-of-memory condition..
;
;# An index value of -1 is used to append at the end.
;$index = -1
;
;$success = $json.AddStringAt(-1, "Title", "Pan's Labyrinth")
;$success = $json.AddStringAt(-1, "Director", "Guillermo del Toro")
;$success = $json.AddStringAt(-1, "Original_Title", "El laberinto del fauno")
;$success = $json.AddIntAt(-1, "Year_Released", 2006)
;
;$json.EmitCompact = $false
;$($json.Emit())
PsCmd code "" _s
out _s