lpBhvrCom->lpObj->lpFormHdr = lpVoid->lpHdr; ERROR

ProjectRoom

Well Known Member
if ((rcode = JDB_InitEnvOvr(&hEnv,Environment,Username,Password)) != JDEDB_PASSED) {
return false;
}

if ((rcode = JDB_InitUser(hEnv, &hUser, NULL, JDEDB_COMMIT_AUTO)) != JDEDB_PASSED) {
return false;
}

jdeCreateBusinessFunctionParms(hUser, &lpBhvrCom,(LPVOID*) &lpVoid);
lpVoid->lpHdr = jdeErrorInitializeEx();
lpVoid->lpErrorEventKey = (LPERROR_EVENT_KEY) jdeAlloc(COMMON_POOL, sizeof(ERROR_EVENT_KEY), MEM_ZEROINIT | MEM_FIXED);
lpVoid->lpHdr->nCurDisplayed = -1;
lpBhvrCom->lpObj->lpFormHdr = lpVoid->lpHdr; //CAUSES ERROR ?! WHY?

Any Ideas? Works in another project of mine :/ this one is a dll !
 
Did anyone come up with a solution for this. I am getting the same thing. I am creating a dll. the jdeCreateBusinessFucntionParms seems to return a valid lpBhvrCom and lpVoid. But I notice that the lpObj in the lpBhvrCom address is 0x0000005 which can't be good. This is how it comes back from the CreateBFParms call.

Do I need to manually allocate memory? My code is identical to the code above
 
Back
Top