Did you check all your I/Os are set properly for func ?
Do you mean this :
CALfunc func = 0;
calModuleGetEntry(&func,Context, module, "main");
for(int i = 0; i < Params.size(); i++)
CALname Name = 0;
calModuleGetName(&Name, Context, module, Params.second.c_str());
calCtxSetMem(Context, Name, Params.first.Memory);
module and func are good, I'd tested this project with IL from my previous project, all names, all context, module, func, memory, resourse hendlers had the same values as in this project, but the difference is that I'm using some C++ feautures like static var in template class and so on. The most part of code is the same, but It just can't work...
I don't have details of your code, a lot of things can cause the misbehaviour...
...but what rings a bell are the parameters Params.second.c_str() and Params.first.Memory.
How do they relate to variable i?
A priori you should have something like during the i loop :
Params.second.c_str() gives i0 i1 .... O1 ...
While Params.first.Memory gives Mem1 Mem2 .... Mem3 ...
There are missed brackets in previous post, forum's engine has deleted them. And they contained i between them/