memory accessviolationexception blunder job dll c#


i'm encountering uncanny memory read/write blunder while job collected dll c#. i dllimport hoop duty need, writes relapse value parametric pointer an int (i.e., int* out). duty called churned times within thread, runs successfully over execution life initial thread. however, launches another thread after initial completed, outmost dll throws an accessviolationexception. given churned calls initial thread govern successfully, i'm pondering somehow associated initial thread releasing pointers applicable integer parameters(?). so, i definitely redeem memory? or, maybe someone opposite understanding competence going here? conclude unequivocally much.



edit: danny requested some-more specifics, i'm happy oblige. here where outmost slight invoked:



    int success = -1;
unsafe
{
int res = 0;
int* res_ptr = &res;
int len = cmd.tochararray().length;
int* len_ptr = &len;
cmdinterpreter(ref cmd, len_ptr, res_ptr);
success = *res_ptr;
}


where cmdinterpreter tangible as:



    [dllimport("brugs.dll", entrypoint="cmdinterpreter", 
exactspelling=false, callingconvention = callingconvention.stdcall)]
open stationary unprotected extern vacant cmdinterpreter(ref twine cmd, int *len, int *res);


please let me know there any additional info helpful. conclude you!



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members