// JP opened flex table

Click to See Complete Forum and Search --> : cannot find resource


NoTime2Wait
February 21st, 2007, 09:37 PM
Hello guys,

I have a problem with findresource, i can't find a dll I have binded into my program

________resource.cpp_________
#include "res.h"
#pragma resource "res.RES"
#include <windows.h>
#include <stdio.h>
int main(){

HRSRC hRsrc = FindResource( NULL,MAKEINTRESOURCE(TOM), RT_RCDATA);

//I also tried this...
// HRSRC hRsrc = FindResource( NULL,MAKEINTRESOURCE(TOM), MAKEINTRESOURCE(RT_RCDATA));


if (hRsrc==NULL) {
printf("error: %i",GetLastError());
}
}


_______res.rc__________

#include "res.h"
TOM RT_RCDATA "odbc32.dll"


_______res.h_________
#define TOM 132

______MAKEFILE______

all:

brcc32 res.rc
bcc32 resources.cpp


can anyone tell me what I am doing wrong.
GetLastError() returns 1814 (resource not found)

//JP added flex table