Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Failed to Create Control:Unspecified error

RbickRbick Member Posts: 17
I'm back! Thanks to thor, I have successfully compiled my program. One problem, I continue to get this error upon compiling my control in the activeX container. I do use a .dll, which is located in the same directory as the activeX, and I though perhaps the location of this .dll could be generating this problem.

I also thought it may have been a problem with OnDraw(), but further testing of that has shown that this is not the case. I still think it may have something to do with my .dll. Here is the implementation in my ActiveX.cpp file.

[code]BOOL CActiveXApp::InitInstance()
{
BOOL bInit = COleControlModule::InitInstance();
m_hButtonControl = NULL;
if (bInit)
//Loading the .dll 'cause its sucks!
m_hButtonControl= ::LoadLibrary( _T( "dapassthru.dll" ));
return bInit;
}[/code]

Excuse my language with my comments :), this project has given me so much trouble, I vent through my comments, as people actually using this won't see it... If you guys know anything about this problem, let me know. Thanks!

Comments

  • LundinLundin Member Posts: 3,711
    First thing to do and check is if the dll is even loaded. Next thing to do is to check if it contains all the resources.

    [code]BOOL CActiveXApp::InitInstance()
    {
    BOOL bInit = COleControlModule::InitInstance();

    if (bInit)
    m_hButtonControl= ::LoadLibrary( _T( "dapassthru.dll" ));

    if(hButtonControl == NULL)
    {
    /* error handling */
    }

    if(some of the resources needed from the dll don't exist)
    {
    /* error handling */
    }

    return bInit;
    }[/code]
Sign In or Register to comment.