I would like to debug the custom action. But I don't know how to use debugger. 
So I use MessageBox to show the value I am interested. 

The value of hTable and hColumns is:

 MSIHANDLE hTable = NULL;
 MSIHANDLE hColumns = NULL; 

I don't know detailed information for WcaAddTempRecord() function. I have 
checked "wcautil.h". But there is no detailed description. In the sample in Wix 
Tutorial, there is 8 parameters for WcaAddTempRecord. But it doesn't pass the 
compile. So I added &error. I hope there is some details document for this 
function. So I can understand it better.

Regards,

Chunyan

-----Ursprüngliche Nachricht-----
Von: Blair [mailto:os...@live.com] 
Gesendet: Dienstag, 10. November 2009 18:28
An: 'General discussion for Windows Installer XML toolset.'
Betreff: Re: [WiX-users] Question on Listbox

This is where you probably want to attach a debugger on your custom action.

I would be interested to know the values of both hResult and error (which is an 
enumeration).
Also, before the first call to WcaAddTempRecord, what were the values of hTable 
and hColumns?

-----Original Message-----
From: Jiang, Chunyan (GE Healthcare) [mailto:chunyan.ji...@ge.com]
Sent: Tuesday, November 10, 2009 6:56 AM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Question on Listbox

Hi wix-users,
 
I want to use Listbox control to show some items on dialog. So I tried the 
sample in WiX Tutorial 10.1
 
I changed the sample a little bit for passing build:
 
Add 

<Property Id="LISTBOXVALUES" Value="1"/>

To sampleListbox.wxs. Otherwise there is always error in verbose log that 
control needs a property link to it.

And 

MSIDBERROR error;

hResult = WcaAddTempRecord (&hTable, &hColumns, L"ListBox", &error, 0, 3, 
L"LISTBOXVALUES", 1, L"Item 1");

hResult = WcaAddTempRecord (&hTable, &hColumns, L"ListBox", &error, 0, 3, 
L"LISTBOXVALUES", 2, L"Item 2");

hResult = WcaAddTempRecord (&hTable, &hColumns, L"ListBox", &error, 0, 3, 
L"LISTBOXVALUES", 3, L"Item 3");

In the sample,  there is no "&error" parameter.

However, when I run the sample.msi, the listbox is empty. 

The hResult has the type HRESULT. I want to show hResult value in a messagebox. 
So I add code:

wchar_t buffer[10];

swprintf_s( buffer, 10, L"%s", hResult );

ShowMessage.Append(buffer);

::MessageBoxW(NULL, ShowMessage, L"Fill Listbox", MB_OK);

And at last, the message shows (null).

What is wrong with WcaAddTempRecord ? How to add item to listbox control?

Best regards,

 

Chunyan

----------------------------------------------------------------------------
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with Crystal 
Reports now.  http://p.sf.net/sfu/bobj-july 
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with Crystal 
Reports now.  http://p.sf.net/sfu/bobj-july 
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to