stp43
Member
Trying to create a console application to execute a business function call. Test executing GetAuditInfo and hitting Access violation reading location ... in jdekrnl.dll.
Here's what I have currently.
result = JDB_InitEnvOvrExtended(&hEnv, (JCHAR *)&e1Env, (JCHAR *)&e1User, (JCHAR *)&e1Pwd, (JCHAR *)&e1Role);
if (result != JDEDB_PASSED)
{
printf("JDB_InitEnv failed. Error code: %d\n", result);
return 0;
}
if (JDB_InitUser(hEnv, &hUser, NULL, JDEDB_COMMIT_AUTO) != JDEDB_PASSED)
{
printf("JDE_InitUser failed.\n");
JDB_FreeEnv(hEnv);
return 0;
}
if (jdeCreateBusinessFunctionParms(&hUser, &lpBhvrCom, (LPVOID *)&lpVoid) != JDEDB_PASSED) {
printf("jdeCreateBusinessFunctionParms failed.\n");
JDB_FreeEnv(hEnv);
return 0;
}
memset((void *)&dsUpdateInfo, (int)_J('\0'), sizeof(DSD9800100));
ID returnValue = jdeCallObject((JCHAR *)_J("GetAuditInfo"), NULL, lpBhvrCom, lpVoid, &dsUpdateInfo, (LPCALLMAP)NULL, (int)0, (JCHAR *)NULL, (JCHAR *)NULL, (int)0);
Error occurs on jdeCallObject... Not sure what the issue is. I'm able to execute a UBE using jdeLaunchUBEEx2. But fail when using jdeCallObject.
Any help is appreciated.
Here's what I have currently.
result = JDB_InitEnvOvrExtended(&hEnv, (JCHAR *)&e1Env, (JCHAR *)&e1User, (JCHAR *)&e1Pwd, (JCHAR *)&e1Role);
if (result != JDEDB_PASSED)
{
printf("JDB_InitEnv failed. Error code: %d\n", result);
return 0;
}
if (JDB_InitUser(hEnv, &hUser, NULL, JDEDB_COMMIT_AUTO) != JDEDB_PASSED)
{
printf("JDE_InitUser failed.\n");
JDB_FreeEnv(hEnv);
return 0;
}
if (jdeCreateBusinessFunctionParms(&hUser, &lpBhvrCom, (LPVOID *)&lpVoid) != JDEDB_PASSED) {
printf("jdeCreateBusinessFunctionParms failed.\n");
JDB_FreeEnv(hEnv);
return 0;
}
memset((void *)&dsUpdateInfo, (int)_J('\0'), sizeof(DSD9800100));
ID returnValue = jdeCallObject((JCHAR *)_J("GetAuditInfo"), NULL, lpBhvrCom, lpVoid, &dsUpdateInfo, (LPCALLMAP)NULL, (int)0, (JCHAR *)NULL, (JCHAR *)NULL, (int)0);
Error occurs on jdeCallObject... Not sure what the issue is. I'm able to execute a UBE using jdeLaunchUBEEx2. But fail when using jdeCallObject.
Any help is appreciated.