#include <../arch/arch.h>

vboolean V_CALL
vgl_load_proc(char *proc_name,void **ptr_ret, vboolean *terminate)
{
	/* NOTE: at this point LibV global lock must be hold */
	PROC proc = wglGetProcAddress((LPCSTR)proc_name);
	if(*ptr_ret && *ptr_ret != proc)
	{
		/*
		 * Different implementation (M$ generic after HW or vice versa).
		 */
		*terminate = true;
		return false;
	}
	if(proc)
	{
		*ptr_ret = (void*)proc;
		return true;
	}
	return false;
}
