Question : Citrix Session info

Hi Experts,

i have to migrate users from existing XP FR3 farm to a new XenApp 4.5 farm. I would like to retrieve the total no. of users info(Username, domain and server) from the XP FR3 farm at production hour. Is it possible? if yes then how. I have retrieve the list of users from AD group, but all the users are not using citrix now. So the plan is to find only the connected users info from the XP FR3 farm at production hour. Need your valuable solution. Resource manager is not available for this farm

Answer : Citrix Session info

Working with .NET objects from CF is a little different than using them from w/in .NET.  Properties are a good example.  To access pubic "properties" you'll need to use the syntax:

   Get_propertyName()
   Set_propertyName(value)
   (See: http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=dotNet_04.html)

So to access the "RecordA" property use the following, which will return an array.

   <!--- assuming the DLL is in the current directory --->
   <cfset path = ExpandPath("SharedRecordDefinitions.dll")>
   <cfset obj = createObject("dotnet", "SharedRecordDefinitions.SharedRecordDefinitions", path)>
   <!--- recordA will now contain an array of objects --->
   <cfset recordA = obj.get_recordA()>

VB.NET arrays (like "recordA") should be converted transparently. So you'll be able to iterate through its elements using the "array" attribute of cfloop.  Note, this example doesn't do anything except dump the public methods of each element ...

   <cfloop array="#obj.get_recordA()#" index="elem">
      <cfdump var="#elem#">
  </cfloop>

Keep in mind VB.NET "structures" aren't the same as CF structures.  So they'll be converted into objects, meaning you'll need to use the same technique, ie Get_propertyName(), to access the contents of your structures:

    <cfloop array="#obj.get_recordA()#" index="elem">
        <!--- use the Get_ methods to display the values ...--->
      <cfoutput>
      FName = #elem.get_FName()#
      LName = #elem.get_LName()#<br>
      </cfoutput>
    </cfloop>

Since the "structures" are not interchangable w/CF structures, keep in mind you won't be able to use them everywhere you can use a CF structure. For example, you *can't* use the "collection" attribute of cfloop to iterate through the structure keys -OR- use associative array notation to access the values as you *can* with regular CF structures:

<!--- {} is a shortcut for structNew() --->
<cfset myStruct = {} >
<cfset myStruct.FName = "Bob">
<cfset myStruct.LName = "Smith">
<cfloop collection="#myStruct#" item="key">
    <cfoutput>
      key = #key# value=#myStruct[key]#<br>
    </cfoutput>
</cfloop>
Random Solutions  
 
programming4us programming4us