c++ - Windows loadimage function fails but gelasterror function also returns null -


how can loadimage return null getlasterror returns null - doesn't make sense. here simple program demonstrates problem:

#include <windows.h> #include <stdio.h> void main() { int e; hicon  icon;  icon = (hicon)loadimage(null, "\\temp\\icona.ico", image_icon,0,0,lr_loadfromfile); e = getlasterror(); printf("result: %x %d \n",icon, e ); return; } 

when compile, link , run get:

result: 0 0


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo