SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    user defined data types

    User Ed (edmanet@yahoo.com) posted:

    Does WR have the ability to use user-defined data types? For
    instance, I want to use the shell32 API function for browsing to a
    folder (SHBrowseForFolder). The function takes a structure as it's
    sole inout parameter. I can define the type in VB like this:

    Private Type BrowseInfo
    hWndOwner As Long
    pidlRoot As Long
    sDisplayName As String
    sTitle As String
    ulFlags As Long
    lpfn As Long
    lParam As Long
    iImage As Long
    End Type

    How do I define the data structure in TSL and then how do I access
    it's properties after the function has returned?


    Thanks.

    Ed.



  2. #2
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: user defined data types

    User Richard Weber (rweber@houston.ds.adp.com) posted:

    ------_=_NextPart_001_01C0B878.F98FA1A0
    Content-Type: text/plain;
    charset="ISO-8859-1"

    Sort of, you can create multidimensional arrays to make structures and
    simulate user types. But all types in WR are numbers or strings.

    public BrowseInfo[]=
    {
    "hWndOwner" = "",
    "pidlRoot" = "",
    "sDisplayName"= "",
    "sTitle" = "",
    "ulFlags" = "",
    "lpfn" = "",
    "lParam" = "",
    "iImage" = ""
    }


    -----Original Message-----
    From: Ed [mailto:edmanet@yahoo.com]
    Sent: Thursday, March 29, 2001 11:32 AM
    To: winrunner@yahoogroups.com
    Subject: [winrunner] user defined data types


    Does WR have the ability to use user-defined data types? For
    instance, I want to use the shell32 API function for browsing to a
    folder (SHBrowseForFolder). The function takes a structure as it's
    sole inout parameter. I can define the type in VB like this:

    Private Type BrowseInfo
    hWndOwner As Long
    pidlRoot As Long
    sDisplayName As String
    sTitle As String
    ulFlags As Long
    lpfn As Long
    lParam As Long
    iImage As Long
    End Type

    How do I define the data structure in TSL and then how do I access
    it's properties after the function has returned?


    Thanks.

    Ed.
    Yahoo! Groups Sponsor

    <http://rd.yahoo.com/M=162801.1342103...mail/S=1700007
    181:N/A=599089/*http://www.knowledgestorm.com/jump_w...c=Yahoo&n=eLer
    Software Faster
    Click Here to Find Software Faster

    <http://us.adserver.yahoo.com/l?M=162...05/D=egroupmai


  3. #3
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: user defined data types

    User Ray McGlynn (raymond.j.mcglynn@btinternet.com) posted:

    Dear Ed,

    WinRunner does not support user-defined data types of the style you are
    looking for.
    If you want to call a Win32 API function that requires a structure, then you
    cannot do this directly from the TSL script.

    The only way to execute such a function from WinRunner is to create a DLL
    that has a user-defined (exported) function.
    This function must accept the parameters you require to pass, but only as
    strings and numbers.
    Your user-defined function will then (internally) declare a variable for the
    required structure and populate it with the passed parameters.
    Your function then makes the call to SHBrowseForFolder() with the populated
    structure.
    If the call is successful, then you can pass back any results via the
    user-defined function (again these can only be strings or numbers).

    It has to be this way until Mercury allow the creation and passing of
    user-defined types to external functions.

    Regards,

    Ray McGlynn

    ----- Original Message -----
    From: Ed <edmanet@yahoo.com>
    To: <winrunner@yahoogroups.com>
    Sent: Thursday, March 29, 2001 6:31 PM
    Subject: [winrunner] user defined data types


    to winrunner-unsubscribe@yahoogroups.com.
    the email message



 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 13.64%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:24 AM.

Copyright BetaSoft Inc.