All Downloads are FREE. Search and download functionalities are using the official Maven repository.

plugins.windows.src.native.winutil.c Maven / Gradle / Ivy

There is a newer version: 2.0.10
Show newest version
/*
 * %W% %E%
 *
 * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

#include "winutil.h"

jbyteArray wrapGUID(JNIEnv *env, const GUID *guid) {
	jbyteArray guid_array = (*env)->NewByteArray(env, sizeof(GUID));
	if (guid_array == NULL)
		return NULL;
	(*env)->SetByteArrayRegion(env, guid_array, 0, sizeof(GUID), (jbyte *)guid);
	return guid_array;
}

void unwrapGUID(JNIEnv *env, const jobjectArray byte_array, GUID *guid) {
	(*env)->GetByteArrayRegion(env, byte_array, 0, sizeof(GUID), (jbyte *)guid);
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy