Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Custom action DLL for Windows Installer

Custom action DLL for Windows Installer

Scheduled Pinned Locked Moved C / C++ / MFC
jsonhelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    act_x
    wrote on last edited by
    #1

    I am trying to invoke a Win32 DLL from the Windows Installer to perform certain custom actions. For this purpose I have exposed 1 API

    MY_DLL_API UINT MyCustomActionLaunch(MSIHANDLE hMsiModule)
    {

    MessageBoxW (NULL, L"MyCustomAction launch", L"MyCustomAction", MB\_OK);	
    WCHAR msg \[500\] = {0};
    WCHAR vbuff \[1024\] = {0};
    DWORD vlen = 1024;
    UINT gp = MsiGetPropertyW(hMsiModule, L"ProgramFilesFolder", vbuff, &vlen);
    
    **if(gp == ERROR\_SUCCESS )
    {
    	 if (wcslen(vbuff) <= 0)
    	 {
    		 MessageBoxW(NULL , L"Zero Bytes",L"MyCustomAction" , MB\_OK);		 }
    	
    	MessageBoxW(NULL, vbuff, L"MyCustomAction", MB\_OK);    		
    
    }**	else
    {
    	MessageBoxW (NULL, L"Failure", L"MyCustomAction", MB\_OK);
    
    }
    
    return -1;
    

    }

    I find that no bytes are being copied, where I am querying for a standard property . This DLL is being developed in VC6. Does anyone see anything wrong here ?

    Engineering is the effort !

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups