Great game!

Does not work, as object with that ID does not exist

zw ##class(OPNLib.Game.ConwayLifeGame).Test()
 
These are the settings for the test:
{"ID":1,"From":0,"To":200,"Iterations":200,"InitialConfig":5,"Rows":80,"Columns":150,"Vector0":"1,1","VectorN":"100,40"}
Press any key to continue... (Ctrl-C to stop)"0 "_$lb($lb(5002,"zCreateFromStatus+8^%Exception.StatusException.1 *tInfo(1,""code"")",,,,,,,,$lb(,"USER",$lb("^zCreateFromStatus+8^%Exception.StatusException.1^1","e^zThrowIfInterrupt+7^%Exception.StatusException.1^1","e^zTest+12^OPNLib.Game.ConwayLifeGame.1^2","e^^^0"))))/* ERROR #5002: Cache error: zCreateFromStatus+8^%Exception.StatusException.1 *tInfo(1,"code") [zTest+12^OPNLib.Game.ConwayLifeGame.1:USER] */

I added this code after read and it works:

If ..%ExistsId(pTest.ID) {
set g = ##class(OPNLib.Game.ConwayLifeGame).%OpenId(pTest.ID)
} else {
set g = ##class(OPNLib.Game.ConwayLifeGame).%New()
}

If you're using InterSystems IRIS try this connection string (replacing values with appropriate):

"Driver=InterSystems ODBC Driver;Host=127.0.0.1;Port=56772;Database=USER;UID=myUsername;PWD="

and for Caché/Ensemble try (driver name could be InterSystems ODBC):

"Driver=Cache ODBC Driver;Host=127.0.0.1;Port=1972;Database=USER;UID=myUsername;PWD="

If the problem persist, check Audit log.

when you get the error <DYNAMIC LIBRARY LOAD>, you should look at cconsole.log (or messages.log for IRIS), where you may find code of error.

Thank you. Got this error

Error loading dll (c:\users\eduard\eclipse-c-workspace\helloworld\debuglib\libhelloworld.dll) is 126

It is possible that you build it for 32bit, but uses in 64bit instance.  In this case, you will get the error with code 139. if you got other code, you can google it.

I can get it to work if I compile it without a few lines, so I'm sure it's 64bit.

%ObjectToJSON writes stream to current device. You need to write to stream:

set oMetadata = ... /// metadata is from ADT message which is dynamic object
set stream = ##class(%Stream.GlobalCharacter).%New()
set tSC = ##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(stream, oMetadata)
quit:$$$ISERR(tSC) tSC
set request = ##class(Ens.StreamContainer).%New(stream)
set tSC = ..SendRequestAsync(..JSONOperation,stream,0,,..MetadataContext)  /// send the stream to operation 

And your JSONOperation should be able to accept messages of Ens.StreamContainer class.

I just checked Ens.BusinessService:SendRequestAsync signature and it's:

Method SendRequestAsync(pTargetDispatchName As %String, pRequest As %Library.Persistent, pDescription As %String = "") As %Status
So maybe the last line should be just:

 set tSC = ..SendRequestAsync(..JSONOperation, stream)

Finally, use %ZEN.Auxiliary.altJSONProvider instad of %ZEN.Auxiliary.jsonProvider. It's faster.