Click here to Skip to main content
15,895,538 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralPls Help Me. Pin
stilgar6-May-03 4:54
stilgar6-May-03 4:54 
GeneralCopy a pointer to an element of an array of pointers Pin
Majid Shahabfar6-May-03 4:13
Majid Shahabfar6-May-03 4:13 
GeneralRe: Copy a pointer to an element of an array of pointers Pin
David Crow6-May-03 4:28
David Crow6-May-03 4:28 
GeneralRe: Copy a pointer to an element of an array of pointers Pin
Hans Ruck6-May-03 4:28
Hans Ruck6-May-03 4:28 
GeneralRe: Copy a pointer to an element of an array of pointers Pin
jhaga6-May-03 4:36
professionaljhaga6-May-03 4:36 
GeneralRe: Copy a pointer to an element of an array of pointers Pin
Peter Mares6-May-03 4:48
Peter Mares6-May-03 4:48 
GeneralCoCreateInstance Tracing Pin
Daniel Turini6-May-03 4:01
Daniel Turini6-May-03 4:01 
GeneralFinding/Loading resources Pin
will13836-May-03 3:37
will13836-May-03 3:37 
Hi all,

I'm trying to find and load a resource from another application. Here's the code I'm using:

HINSTANCE hToDLL;
HRSRC hsrc;
hsrc = FindResource(GetModuleHandle(app),icon,RT_ICON);


where app = "someapp.exe" and
icon = "IDI_ICON3"

This ALWAYS returns a NULL pointer, so it's always failing and the GetLastError always gives me a:

1813 The specified resource type cannot be found in the image file. ERROR_RESOURCE_TYPE_NOT_FOUND

Now I know the resource exists in the application I'm trying to get at, so what am I doing wrong?? Do I need to call LoadLibrary first? I don't think I should have to.

Any insights, help, suggestions, comments are greatly appreciated. Thanks!
Dan
GeneralRe: Finding/Loading resources Pin
David Crow6-May-03 4:06
David Crow6-May-03 4:06 
GeneralRe: Finding/Loading resources Pin
will13836-May-03 4:34
will13836-May-03 4:34 
GeneralRe: Finding/Loading resources Pin
David Crow6-May-03 4:39
David Crow6-May-03 4:39 
GeneralRe: Finding/Loading resources Pin
will13836-May-03 4:44
will13836-May-03 4:44 
GeneralRe: Finding/Loading resources Pin
basementman6-May-03 4:50
basementman6-May-03 4:50 
GeneralRe: Finding/Loading resources Pin
will13836-May-03 5:16
will13836-May-03 5:16 
GeneralRe: Finding/Loading resources Pin
basementman6-May-03 5:24
basementman6-May-03 5:24 
GeneralRe: Finding/Loading resources Pin
will13836-May-03 5:36
will13836-May-03 5:36 
GeneralRe: Finding/Loading resources Pin
David Crow6-May-03 6:02
David Crow6-May-03 6:02 
GeneralRe: Finding/Loading resources Pin
will13836-May-03 6:47
will13836-May-03 6:47 
GeneralRe: Finding/Loading resources Pin
will13836-May-03 7:21
will13836-May-03 7:21 
GeneralProblem regerding LineTo(..) Pin
summo6-May-03 3:21
summo6-May-03 3:21 
GeneralRe: Problem regerding LineTo(..) Pin
JensB6-May-03 4:42
JensB6-May-03 4:42 
GeneralRe: Problem regerding LineTo(..) Pin
John R. Shaw6-May-03 7:07
John R. Shaw6-May-03 7:07 
GeneralCFile %&% Pin
macmac386-May-03 2:50
macmac386-May-03 2:50 
GeneralRe: CFile %&% Pin
Mike Zinni6-May-03 3:15
Mike Zinni6-May-03 3:15 
GeneralRe: CFile %&% Pin
macmac386-May-03 3:24
macmac386-May-03 3:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.