Hi,
I don't know if this is the appropriate forum for this question, but I don't know any other place to post it. I have a Windows service in which I have an embedded binary resource that I want to load at service startup. However, the API functions below fail with an exception or return NULL:
Both of these calls throw an exception when called by my service:
HINSTANCE hInstance = AfxGetInstanceHandle();
HINSTANCE hInstance = AfxGetResourceHandle();
This always returns a NULL when called by my service:
CWinApp* lpApp = AfxGetApp();
hInstance = lpApp->m_hInstance;
How can I access this resource?
Thanks,
Royce
I don't know if this is the appropriate forum for this question, but I don't know any other place to post it. I have a Windows service in which I have an embedded binary resource that I want to load at service startup. However, the API functions below fail with an exception or return NULL:
Both of these calls throw an exception when called by my service:
HINSTANCE hInstance = AfxGetInstanceHandle();
HINSTANCE hInstance = AfxGetResourceHandle();
This always returns a NULL when called by my service:
CWinApp* lpApp = AfxGetApp();
hInstance = lpApp->m_hInstance;
How can I access this resource?
Thanks,
Royce