Jump to content
  • Advertisement
Sign in to follow this  
Anddos

FindResource fails..

This topic is 3205 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am not sure why this is failing with Error code 1813 is ERROR_RESOURCE_TYPE_NOT_FOUND , "test.dll is in the same directory as the source files and it compiles fine...
#include "stdafx.h"
#include "WinApp.h"
#include <windows.h>

in resource.h there is 
#define ID_DLL                   106
in WinApp.rc there is 
ID_DLL                RC_DATA    "test.dll"
"test.dll" is in the source file directory

#define MAX_LOADSTRING 100
char OutBuffer[64];

int APIENTRY _tWinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPTSTR    lpCmdLine,
                     int       nCmdShow)
{
	HRSRC hResInfo = FindResource(NULL,MAKEINTRESOURCE(ID_DLL),RT_RCDATA);
	if(hResInfo != NULL)
	{
		MessageBox(NULL,"FindResource Loaded","",0);
	}
	else
	{
		wsprintf(OutBuffer,"%s %d\n","FindResource Failed",GetLastError());
		MessageBox(NULL,OutBuffer,"",0);
	}
	return 0;
}

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!