Вы находитесь на странице: 1из 4

jdeGTFreeMOData

Last Modified: B9 | October 2, 2020

This function will free the memory pointer of the allocated array of MODATA
structure. It will also free any memory pointer of pData member in MODATA.

Syntax
JDERTN(void) JDEWINAPI jdeGTFreeMOData(LPMODATA lpMOData,
long lNumOfRec);

Parameters
Parameter Notes Usage
lpMOData Input and Required Allocate memory of the array of pointer
to MODATA structure. These memory
will be freed and the any pData pointer.
lNumOfRec Input and Required Number of elements in the array
pointer

Return Value
Return Value Description
N/A

Example
Sample #1:

JDEDB_RESULT JDBReturn = JDEDB_PASSED;


LPMODATA pMOData = NULL;
long lTotalRec = 0;

JDBReturn = jdeGTGet_AllMOTypeKeyStr (_J(“ABGT”), _J(“1”), &pMOData, &lTotalRec);


if (JDBReturn == JDEDB_PASSED && pMOData && lTotalRec > 0)
{
jdeGTDelete_TextKeyStr(_J(“ABGT”) , _J(“1”), pMOData, lTotalRec)
jdeFreeMOData(pMOData, lTotalRec)
}

return;

Sample #2:

JDEDB_RESULT JDBReturn = JDEDB_PASSED;


LPMODATA pMOData = NULL;
long lTotalRec = 0;
DSABGT dsABGT = {0};

493193573.doc 1
jdeGTFreeMOData ()

ParseNumericString(&dsABGT.mnAddressNumber, _J(“1”));

JDBReturn = jdeGTGet_AllMOType(_J(“ABGT”), &dsABGT, &pMOData, &lTotalRec);


if (JDBReturn == JDEDB_PASSED && pMOData && lTotalRec > 0)
{
jdeGTDelete_Text(_J(“ABGT”) , &dsABGT, pMOData, lTotalRec)
jdeFreeMOData(pMOData, lTotalRec)
}

return;

Additional Notes
 MODATA (or LPMODATA) Data Structure definition:
MODATA, *LPMODATA

Data Type Data Description Note


int nSeq Sequence number from
MOSEQN
MOTYPE nMOType Media Object Type
JCHAR szUser[11] User name
JDEDATE jdDate Date updated
MATH_NUMERIC mnTime Time updated
BOOL bRTFData TRUE = RTF Text
FALSE = Plain Text or others
JCHAR szItemName[GT_ITNM Item name
SIZE]
JCHAR szQueueName[GT_Q
UESIZE]
JCHAR szFileName[GT_FILES
IZE]
PJSTR pData Allocate memory for text and
shortcut media object type.

 MOTYPE definition:

DEFINE TYPE NOTE


OBJ_JDEALL All Media Object Types
OBJ_RTFTEXT Text Media Object
OBJ_JDEIMAGE Image Media Object
OBJ_JDEOLE OLE Media Object
OBJ_MISCJDESHORTCUT Shortcut Media Object
OBJ_MISCIMAGEVENDOR Third party vendor
OBJ_MISCHTML HTML/URL/File Media Object

B9 January, 2002 2
jdeGTFreeMOData ()

See Also

Related API’s Description


jdeGTGet_GenericText/ Retrieve text record type and convert any
jdeGTGet_GenericTextKeyStr RTF text to plain text
jdeGTGet_RTFText/ Retrieve text record type and and leave
jdeGTGet_RTFTextKeyStr RTF text as is.
jdeGTGet_ImageKey/ Retrieve image record type
jdeGTGet_ImageKeyStr
jdeGTGet_OLE/ Retrieve OLE record type
jdeGTGet_OLEKeyStr
jdeGTGet_Shortcut/ Retrieve shortcut record type
jdeGTGet_ShortcutKeyStr
jdeGTGet_Vendor/ Retrieve vendor record type
jdeGTGet_VendorKeyStr
jdeGTGet_HTML/ Retrieve HTML record type
jdeGTGet_HTMLKeyStr
jdeGTGet_AllMOType/ Retrieve ALL Media Object type based on
jdeGTGet_AllMOTypeKeyStr OBNM and TXKY
jdeGTAddUpdate_Text/ Update/Add the Media object record(s) of
jdeGTAddUpdate_TextKeyStr Text type
jdeGTAddUpdate_Image/ Update/Add the Media object record(s) of
jdeGTAddUpdate_ImageKeyStr Image type
jdeGTAddUpdate_OLE/ Update/Add the Media object record(s) of
jdeGTAddUpdate_OLEKeyStr OLE type
jdeGTAddUpdate_Shortcut/ Update/Add the Media object record(s) of
jdeGTAddUpdate_ShortcutKeyStr Shortcut type
jdeGTAddUpdate_Vendor/ Update/Add the Media object record(s) of
jdeGTAddUpdate_VendorKeyStr Third party type
jdeGTAddUpdate_HTML/ Update/Add the Media object record(s) of
jdeGTAddUpdate_HTMLKeyStr HTML/URL type
jdeGTAddUpdate_AllMOType/ Update/Add the Media object record(s) of
jdeGTAddUpdate_AllMOTypeKeyStr ALL type
jdeGTAddUpdate_AllMOTypeWithLan Update/Add the Media object record(s) of

B9 January, 2002 3
jdeGTFreeMOData ()

g ALL type with language


jdeGTDelete_Text/ Delete specific text record type.
jdeGTDelete_TextKeyStr
jdeGTDelete_AllText/ Delete all text record types for OBNM and
jdeGTDelete_AllTextKeyStr TXKY
jdeGTDelete_Image/ Delete specific image record type.
jdeGTDelete_ImageKeyStr
jdeGTDelete_AllImage/ Delete all image record types for OBNM
jdeGTDelete_AllImageKeyStr and TXKY
jdeGTDelete_OLE/ Delete specific OLE record type.
jdeGTDelete_OLEKeyStr
jdeGTDelete_AllOLE/ Delete all OLE record types for OBNM and
jdeGTDelete_AllOLEKeyStr TXKY
jdeGTDelete_Shortcut/ Delete specific Shortcut record type.
jdeGTDelete_ShortcutKeyStr
jdeGTDelete_AllShortcut/ Delete all Shortcut record types for OBNM
jdeGTDelete_AllShortcutKeyStr and TXKY
jdeGTDelete_Vendor/ Delete specific Vendor (Third Party) record
jdeGTDelete_VendorKeyStr type.
jdeGTDelete_AllVendor/ Delete all Vendor (Third Party) record types
jdeGTDelete_AllVendortKeyStr for OBNM and TXKY
jdeGTDelete_HTML/ Delete specific HTML/URL record type.
jdeGTDelete_HTMLKeyStr
jdeGTDelete_AllHTML/ Delete all HTML/URL record types for
jdeGTDelete_AllHTMLKeyStr OBNM and TXKY
jdeGTDelete_AllMOType/ Delete all record types for OBNM and
jdeGTDelete_AllMOTypeKeyStr TXKY
jdeValidateGTExist/ Validate if Media Object exist in F00165
jdeValidateGTExistWithKeyStr table
jdeGTGetCount/ Get total number of the media object
jdeGTGetCountKeyStr
jdeGTFreeMOData Free the memory allocated for MODATA
structure

B9 January, 2002 4

Вам также может понравиться