Click here to Skip to main content
15,946,074 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Some native or raw C++ compilers Pin
Luc Pattyn5-Mar-12 12:58
sitebuilderLuc Pattyn5-Mar-12 12:58 
GeneralRe: Some native or raw C++ compilers Pin
Brandon-X120007-Mar-12 2:54
Brandon-X120007-Mar-12 2:54 
AnswerRe: Some native or raw C++ compilers Pin
jschell5-Mar-12 8:25
jschell5-Mar-12 8:25 
GeneralRe: Some native or raw C++ compilers Pin
Maximilien5-Mar-12 8:46
Maximilien5-Mar-12 8:46 
GeneralRe: Some native or raw C++ compilers Pin
Brandon-X120007-Mar-12 2:58
Brandon-X120007-Mar-12 2:58 
GeneralRe: Some native or raw C++ compilers Pin
Brandon-X1200017-Mar-12 14:22
Brandon-X1200017-Mar-12 14:22 
Questionloading dll second time giving error "A required resource was unavailable" Pin
appollosputnik1-Mar-12 0:16
appollosputnik1-Mar-12 0:16 
AnswerRe: loading dll second time giving error "A required resource was unavailable" Pin
Jochen Arndt1-Mar-12 0:33
professionalJochen Arndt1-Mar-12 0:33 
Your code looks a little bit mixed up.

Try it this way. It should solve your problem:
C++
CTestRevApp::CTestRevApp()
{
    hinstLib = NULL;
}

CTestRevApp::~CTestRevApp()
{
    if (hinstLib != NULL)
        FreeLibrary(hinstLib);
}

void CTestRevApp::On3DView()
{
    typedef VOID (*MYPROC)(CString);

    MYPROC ProcAdd;
    if (hinstLib == NULL)
    {
        hinstLib = LoadLibrary(L"C:\\Documents and Settings\\sdh\\My Documents\\REVOLUTIONPROJ_DB\\DllDialog\\package\\DllTest\\Release\\dlltest.dll");

        if (hinstLib == NULL)
            AfxMessageBox(L"Unable to load library");
    }
    if (hinstLib != NULL)
    {
        ProcAdd = (MYPROC)GetProcAddress(hinstLib, "runAppli");
        if (ProcAdd == NULL)
            AfxMessageBox(L"Unable to get pointer to function runAppi()");
        else
            ProcAdd(NULL);
    }
}

GeneralRe: loading dll second time giving error "A required resource was unavailable" Pin
appollosputnik1-Mar-12 1:30
appollosputnik1-Mar-12 1:30 
GeneralRe: loading dll second time giving error "A required resource was unavailable" Pin
Jochen Arndt1-Mar-12 1:44
professionalJochen Arndt1-Mar-12 1:44 
GeneralRe: loading dll second time giving error "A required resource was unavailable" Pin
appollosputnik1-Mar-12 1:53
appollosputnik1-Mar-12 1:53 
GeneralRe: loading dll second time giving error "A required resource was unavailable" Pin
Jochen Arndt1-Mar-12 2:03
professionalJochen Arndt1-Mar-12 2:03 
GeneralRe: loading dll second time giving error "A required resource was unavailable" Pin
appollosputnik1-Mar-12 3:14
appollosputnik1-Mar-12 3:14 
GeneralRe: loading dll second time giving error "A required resource was unavailable" Pin
Jochen Arndt1-Mar-12 3:38
professionalJochen Arndt1-Mar-12 3:38 
GeneralRe: loading dll second time giving error "A required resource was unavailable" Pin
appollosputnik1-Mar-12 3:58
appollosputnik1-Mar-12 3:58 
GeneralRe: loading dll second time giving error "A required resource was unavailable" Pin
Jochen Arndt1-Mar-12 4:14
professionalJochen Arndt1-Mar-12 4:14 
GeneralRe: loading dll second time giving error "A required resource was unavailable" Pin
appollosputnik1-Mar-12 4:30
appollosputnik1-Mar-12 4:30 
GeneralRe: loading dll second time giving error "A required resource was unavailable" Pin
appollosputnik1-Mar-12 4:32
appollosputnik1-Mar-12 4:32 
GeneralRe: loading dll second time giving error "A required resource was unavailable" Pin
Jochen Arndt1-Mar-12 5:34
professionalJochen Arndt1-Mar-12 5:34 
GeneralRe: loading dll second time giving error "A required resource was unavailable" Pin
appollosputnik1-Mar-12 6:02
appollosputnik1-Mar-12 6:02 
GeneralRe: loading dll second time giving error "A required resource was unavailable" Pin
Wes Aday1-Mar-12 6:13
professionalWes Aday1-Mar-12 6:13 
GeneralRe: loading dll second time giving error "A required resource was unavailable" Pin
Jochen Arndt1-Mar-12 6:16
professionalJochen Arndt1-Mar-12 6:16 
GeneralRe: loading dll second time giving error "A required resource was unavailable" Pin
Wes Aday1-Mar-12 6:19
professionalWes Aday1-Mar-12 6:19 
GeneralRe: loading dll second time giving error "A required resource was unavailable" Pin
appollosputnik1-Mar-12 6:25
appollosputnik1-Mar-12 6:25 
GeneralRe: loading dll second time giving error "A required resource was unavailable" Pin
Jochen Arndt1-Mar-12 6:34
professionalJochen Arndt1-Mar-12 6:34 

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.