Пример #1
0
void setOLECMDTEXTFields(JNIEnv *env, jobject lpObject, OLECMDTEXT *lpStruct)
{
	if (!OLECMDTEXTFc.cached) cacheOLECMDTEXTFields(env, lpObject);
	(*env)->SetIntField(env, lpObject, OLECMDTEXTFc.cmdtextf, (jint)lpStruct->cmdtextf);
	(*env)->SetIntField(env, lpObject, OLECMDTEXTFc.cwActual, (jint)lpStruct->cwActual);
	(*env)->SetIntField(env, lpObject, OLECMDTEXTFc.cwBuf, (jint)lpStruct->cwBuf);
	{
	jshortArray lpObject1 = (jshortArray)(*env)->GetObjectField(env, lpObject, OLECMDTEXTFc.rgwz);
	(*env)->SetShortArrayRegion(env, lpObject1, 0, sizeof(lpStruct->rgwz) / sizeof(jshort), (jshort *)lpStruct->rgwz);
	}
}
Пример #2
0
OLECMDTEXT *getOLECMDTEXTFields(JNIEnv *env, jobject lpObject, OLECMDTEXT *lpStruct)
{
	if (!OLECMDTEXTFc.cached) cacheOLECMDTEXTFields(env, lpObject);
	lpStruct->cmdtextf = (*env)->GetIntField(env, lpObject, OLECMDTEXTFc.cmdtextf);
	lpStruct->cwActual = (*env)->GetIntField(env, lpObject, OLECMDTEXTFc.cwActual);
	lpStruct->cwBuf = (*env)->GetIntField(env, lpObject, OLECMDTEXTFc.cwBuf);
	{
	jshortArray lpObject1 = (jshortArray)(*env)->GetObjectField(env, lpObject, OLECMDTEXTFc.rgwz);
	(*env)->GetShortArrayRegion(env, lpObject1, 0, sizeof(lpStruct->rgwz[0]) / 2, (jshort *)lpStruct->rgwz[0]);
	}
	return lpStruct;
}