Hi guys,

I am using WiX 2.0. I have a custom action dll which is written in C. The 
custom action doesn't get executed. Even though I checked that its function 
ordinal 

number is really 4. My dll is 9KB in size but my MSI is only increased by 1 KB 
with the custom action added. I have checked the logs and none of it is showing 

my custom action dll is executing. My relevant WiX custom action code is as 
below.
  
  <CustomAction Id="IsOpenGLVersion_14" BinaryKey="IsOpenGL_14" 
DllEntry="IsOpenGL_14" Return="check" Error="OpenGL check error"/>
    
  <InstallExecuteSequence>
    <Custom Action="IsOpenGLVersion_14" After="InstallFinalize"/>
  </InstallExecuteSequence>

    <!--Specify what kind of WiX UI is needed-->
    <UIRef Id="WixUI_Minimal" />
    <UIRef Id="WixUI_ErrorProgressText" />

    <!--A copy of the dll is in Binary folder-->
   <Binary Id="IsOpenGL_14" SourceFile="Binary\IsOpenGL_14.dll" />

My C function is as below.

#pragma comment(linker, "/EXPORT:[EMAIL PROTECTED]")

extern "C" UINT __stdcall IsOpenGL_14 (MSIHANDLE hInstall) {
    Start(); // Initialize the OpenGL and get its version, code is not shown
    if(!g_szVersion.empty())
    {
        if( g_szVersion.at(0) > '1' ) // version 2 or above
        {
            MessageBox(NULL,L"Your OpenGL version is 2.0 or more.",L"Graphics 
driver is up to date",MB_OK);
            return ERROR_SUCCESS;
        }
        else if( g_szVersion.at(0) == '1' && g_szVersion.at(2) >= '4') // 
version 1.4 or above
        {
            MessageBox(NULL,L"Your OpenGL version is 1.4 or more.",L"Graphics 
driver is up to date",MB_OK);
            return ERROR_SUCCESS;
        }
    }
    MessageBox(NULL,L"Your OpenGL version is less than 1.4.\nPlease update your 
graphics driver and try again.",L"Graphics driver not up to 

date",MB_OK);
    return ERROR_INSTALL_FAILURE;
}

My C function has MessageBoxes, is that a problem?

Thanks!

Best regards,
Wong Shao Voon



      
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to