#1
|
|||
|
|||
Custom Action Error
I'm trying to make a custom action, and when it runs i get this error
Unable to convert property ServerName (value: asgard) to Boolean Its a c# action, but i don't think its getting to my actual code in the dll. Here is my action file. i can provide the c# code if needed. I'm trying to make a custom action to start and stop vmware virtual servers. <action Name="VMWare Action"> <GUI Category="Server" Description="Manage VMWare virtual servers" Bitmap="NETAction.bmp"> <Tab Name="VMWare"> <Field Name="ServerName" Type="Edit" Description="VMWare GSX Server Name" Width="200"> </Field> <Field Name="UserName" Type="Edit" Description="GSX Login Name" Width="200"> </Field> <Field Name="UserPassword" Type="Edit" Description="GSX Password" Width="200"> </Field> <Field Name="MachineName" Type="Edit" Description="Virtual Machine Name" Width="200"> </Field> <Field Name="ServerAction" Type="Combo" Description="Virtual Machine Action" Width="200" DefaultValue="1"> <ListData> <ListItem Text="Start"/> <ListItem Text="Stop"/> </ListData> </Field> </Tab> </GUI> <Build> <ActionComponent>VMWareAction.Test</ActionComponent>--> </Build> </action> |
#2
|
|||
|
|||
It looks like the error is happening in your custom action when calling
step.get_ExpProperty(builder, "ServerName", (short)VarEnum.VT_BOOL) The ExpProperty method attempts to convert the property value to the type specified in the 3rd parameter, and that will fail for a value that isn't numeric or True/False. I suspect that you don't actually want to change the server name to boolean, so using VarEnum.VT_BSTR instead should work. |
#3
|
|||
|
|||
thanks i'll give that a go...
was actually using VT_LPSTR... |
Thread Tools | |
Display Modes | Rate This Thread |
|
|