المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Gdi+



C++ Programming
10-31-2009, 07:13 AM
hi.
i want to write an image processing program and i don't need to preview the image so i decided to use win32 console application to avoid any unwanted delays. i want to use GDI+ classes but there is a runtime error.
my program :
#include "stdafx.h"
#include ;
#include ;
using namespace Gdiplus;
int main()
{
Bitmap *bmp;
bmp = new Bitmap(L"my image path");
unsigned int w = bmp->GetWidth(); // the error occurs in this line

// my process
//...
return 0;
}

the error :
Unhandled exception at 0x00411761 in GdiPlusTest.exe: 0xC0000005: Access violation reading ******** 0x00000004.

any help? thanks.