fvlmasl2
Active Member
C BSFN With "Type Cast" errors when copying data for an Internal Function call
I have a snippet of code listed that is giving me nightmares.......the "jdeStrcpy" below is where the "type cast" error is generated. I have tried many different ways of getting the value passed to the Internal Function, but everything fails. Any insight as to what I'm doing incorrectly?
Thank you,
fvlmasl2
***** H SPEC ********
typedef struct tagDS590100F009
{
MATH_NUMERIC Tier1Qty;
MATH_NUMERIC Tier2Qty;
MATH_NUMERIC Tier3Qty;
MATH_NUMERIC Tier4Qty;
MATH_NUMERIC Tier5Qty;
MATH_NUMERIC Tier1Disc;
MATH_NUMERIC Tier2Disc;
MATH_NUMERIC Tier3Disc;
MATH_NUMERIC Tier4Disc;
MATH_NUMERIC Tier5Disc;
JCHAR TierYN;
} DS590100F009, *LPDS590100F009;
/*****************************************************************************
* Internal Function Prototypes
****************************************************************************/
static ID IB590100_GetDiscount(LPBHVRCOM lpBhvrCom,
LPVOID lpVoid,
LPDS590100F009 lpdsF009);
#endif /* __B590100_H */
***** C SPEC ********
/************************************************************************
* Declare structures
************************************************************************/
DS590100F009 dsF009;
/************************************************************************
* Main Processing
************************************************************************/
jdeStrcpy((JCHAR*)dsF009.TierYN,(const JCHAR*)dsColF5942009.piev01); ******** Keep Getting a "Type Cast" error here.
idReturnCode_A = IB590100_GetDiscount(lpBhvrCom, lpVoid, &dsF009);
/* Internal function comment block */
/**************************************************************************
* Function: Ixxxxxxx_a // Replace "xxxxxxx" with source file number
* // and "a" with the function name
* Notes: NOT BEING USED - FVL
*
* Returns:
*
* Parameters:
**************************************************************************/
static ID IB590100_GetDiscount(LPBHVRCOM lpBhvrCom,
LPVOID lpVoid,
LPDS590100F009 lpdsF009)
{
ID idReturnCode = ER_SUCCESS;
if (lpdsF009->TierYN != _J('Y')) ************************* Need this value passed from above ************************************
{
/* I will be doing something here */
}
return idReturnCode;
}
I have a snippet of code listed that is giving me nightmares.......the "jdeStrcpy" below is where the "type cast" error is generated. I have tried many different ways of getting the value passed to the Internal Function, but everything fails. Any insight as to what I'm doing incorrectly?
Thank you,
fvlmasl2
***** H SPEC ********
typedef struct tagDS590100F009
{
MATH_NUMERIC Tier1Qty;
MATH_NUMERIC Tier2Qty;
MATH_NUMERIC Tier3Qty;
MATH_NUMERIC Tier4Qty;
MATH_NUMERIC Tier5Qty;
MATH_NUMERIC Tier1Disc;
MATH_NUMERIC Tier2Disc;
MATH_NUMERIC Tier3Disc;
MATH_NUMERIC Tier4Disc;
MATH_NUMERIC Tier5Disc;
JCHAR TierYN;
} DS590100F009, *LPDS590100F009;
/*****************************************************************************
* Internal Function Prototypes
****************************************************************************/
static ID IB590100_GetDiscount(LPBHVRCOM lpBhvrCom,
LPVOID lpVoid,
LPDS590100F009 lpdsF009);
#endif /* __B590100_H */
***** C SPEC ********
/************************************************************************
* Declare structures
************************************************************************/
DS590100F009 dsF009;
/************************************************************************
* Main Processing
************************************************************************/
jdeStrcpy((JCHAR*)dsF009.TierYN,(const JCHAR*)dsColF5942009.piev01); ******** Keep Getting a "Type Cast" error here.
idReturnCode_A = IB590100_GetDiscount(lpBhvrCom, lpVoid, &dsF009);
/* Internal function comment block */
/**************************************************************************
* Function: Ixxxxxxx_a // Replace "xxxxxxx" with source file number
* // and "a" with the function name
* Notes: NOT BEING USED - FVL
*
* Returns:
*
* Parameters:
**************************************************************************/
static ID IB590100_GetDiscount(LPBHVRCOM lpBhvrCom,
LPVOID lpVoid,
LPDS590100F009 lpdsF009)
{
ID idReturnCode = ER_SUCCESS;
if (lpdsF009->TierYN != _J('Y')) ************************* Need this value passed from above ************************************
{
/* I will be doing something here */
}
return idReturnCode;
}