Hey,

I have the following code

Code:
void main()
{
	printf("1st element: %d\n", Metas[0]);
	

	hexe = GetModuleHandle(NULL);
	reshandle = FindResource(hexe, MAKEINTRESOURCE(Metas[0]), "Metafile");
	if (reshandle == NULL)
		printf("Did not find resource.\n");
	else
		printf("reshandle: %d\n", reshandle);
	hglobal = LoadResource(hexe, reshandle);
	if (hglobal == NULL)
		printf("Did not load resource\n");
	else
		printf("hglobal: %d\n", hglobal);
	//istream* metastream = (istream*) LockResource(hglobal);
	char *metastream = (char*) LockResource(hglobal);
	if (metastream == NULL)
		printf("could not lock resource\n");
	
	system("PAUSE");
}
to my understanding, the LockResource function returns a pointer to the first byte of the resource.
I need to be able to convert the metastream file into istream format.
How would i go about doing that?

Thanks,