🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
lesson 6-initialization failed
Hi i'm getting a runtime error. I'm using VC++ .Net05, create the project under Win32 and compile under debug mode. The file path is correct or else it won't hit that line of code.
problem:
-Initialization Failed when executing auxDIBImageLoad(Filename)
- i receiving a message saying that "there is no source code available for the current location", if i step through that line of code.
-when i click the show assembly button
--- d:\winmain\multimedia\opengl\toolkits\libaux\image.c -----------------------
00415CE4 mov edi,edi <------------pointing here
00415CE6 push ebp
00415CE7 mov ebp,esp
00415CE9 push 0
00415CEB push dword ptr [filename]
00415CEE call @ILT+40(_tkDIBImageLoadAW@8) (41102Dh)
00415CF3 pop ebp
00415CF4 ret 4
code:
//load image
AUX_RGBImageRec *LoadBMP(char *Filename)
{
//file handle
FILE *File= NULL;
//check for null filename
if(!Filename)
{
return NULL;
}
//try to open the file to check for file existent
File = fopen(Filename,"r");
//does the file exist?
if(File)
{
//close the file
fclose(File);
//return the image
return auxDIBImageLoad(Filename); <-----runtime error
}
//if failed to load
return NULL;
}
I'm new to OpenGL and VC++, so any help will be appreciated! Thank you.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement