Hello DOJO
I am trying to create an ad Hoc datasource with groups and users.
I encountered an error while implementing:
public GQIPage GetNextPage(GetNextPageInputArgs args)
This declaration :
var securityInfo = Engine.SLNet.SendSingleResponseMessage(new GetInfoMessage(InfoType.SecurityInfo)) as GetUserInfoResponseMessage;
raised this message

I played with nuget package without sucess (Assembly loading issue in GQI data source - DataMiner Dojo)
Is the error located in the declaration of secutityInfo var ?
I already use something similar with success to export groups and users in a csv file.
var securityInfo = engine.SendSLNetSingleResponseMessage(new GetInfoMessage(InfoType.SecurityInfo)) as GetUserInfoResponseMessage;
for the declaration of Variable
Hi Joel, SLManagedAutomation is 32bit whereas the process that executes the ad hoc datasource is 64 bit. (see also ad-hoc datasource assembly load issue).
To retrieve the SLNet connection, you can do the following in the OnInit (IGQIOnInit): var connection = args.DMS.GetConnection();
Thank for the clue Pedro.
I didn't know how to create the oninit and use the args.DMS.getconnection().
But I found this KATA : https://www.youtube.com/watch?v=Wi8pIeSA-uw
that helps me to finilize the code
I replaced :
var request = new GetInfoMessage(InfoType.ClientList);
var reponses = _dms.SendMessages(request).OfType<LoginInfoResponseMessage>();
by
var request = new GetInfoMessage(InfoType.SecurityInfo);
var securityInfos = _dms.SendMessages(request).OfType<GetUserInfoResponseMessage>();