libglade win32 glade_xml_new_from_buffer problem



Hello,

I'm trying to embed my .glade xml file in a win32 app.

Here's a sample:
HRSRC hrc=FindResource(NULL,MAKEINTRESOURCE(IDR_GLADE1),"GLADE");
int size=SizeofResource(NULL,hrc);
HGLOBAL gladerc=LoadResource(NULL,hrc);
char *ptr=LockResource(gladerc);
glade_xml_new_from_buffer(ptr, size, NULL, NULL);

My code crashes deep inside of libglade when I do this. If I change this line to load my .glade from a file it works just fine. My resource pointer is good. To test it I wrote size bytes of ptr to a file and I loaded my .glade from a file. Is there a bug in glade_xml_new_from_buffer on win32???





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]