Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-13-2005, 03:45 AM
sigh71 sigh71 is online now
Registered User
 
Join Date: 02-06-2003
Posts: 7
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>
Reply With Quote
  #2  
Old 06-13-2005, 08:55 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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.
Reply With Quote
  #3  
Old 06-13-2005, 07:44 PM
sigh71 sigh71 is online now
Registered User
 
Join Date: 02-06-2003
Posts: 7
thanks i'll give that a go...

was actually using VT_LPSTR...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 07:02 PM.


Copyright © 1999-2023 Kinook Software, Inc.