Hello
I'm with a problem
I'm wrinting a code on DevC++ that must delete some specific resource.
Code:
if(wParam==btn)
{
char res[1024];
HANDLE Begin;
BOOL Up,End;
Begin=BeginUpdateResource("test1.exe",FALSE);
if(!Begin)
{
MessageBox(hwnd,"Error","Error",MB_OK);
}
Up=UpdateResource(Begin,MAKEINTRESOURCE(5),MAKEINTRESOURCE(1000),MAKELANGID(LANG_NEUTRAL,SUBLANG_NEUTRAL),NULL,0);
if(!Up)
{
sprintf(res,"Error on Up \n %d",GetLastError());
MessageBox(hwnd,res,"Error",MB_OK);
}
End=EndUpdateResource(Begin,FALSE);
if(!End)
{
MessageBox(hwnd,"Error","Error",MB_OK);
}
}
Well the problem is that the program doesn't work.
GetLastError returns the value 87 "Parameter incorrect"
Where my parameter is incorrect?
Thanks