SPONSORS:






User Tag List

Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    May 2001
    Location
    New Delhi , India
    Posts
    28
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    DLLs in 4Test scripts.

    How is it possible for using Win32 API calls like :
    BOOL GetSystemPowerStatus(
    LPSYSTEM_POWER_STATUS lpSystemPowerStatus // status
    );
    in 4Test Scripts. Did anyone of u ever used them earlier????

    I am facing multiple problems in this DLL concept.

    ------------------

  2. #2
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: DLLs in 4Test scripts.

    Did you try to define a record to map the argument's type?

    my Attempt.



    [This message has been edited by GodKnows (edited 05-29-2001).]

  3. #3
    Junior Member
    Join Date
    May 2001
    Location
    New Delhi , India
    Posts
    28
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: DLLs in 4Test scripts.

    Hi GodKnows,

    Thanks for ur advice...what I was doing wrong was that I declared all the variables in the record to be of type INTEGER as I thought that 4Test does not support BYTE/DWORD data types.

    For all those who have been trying to use Win32 API functions in 4Test scripts , here is a sampple :

    use "mswtype.inc";

    type POWER_STATUS is record
    {
    BYTE ACLineStatus;
    BYTE BatteryFlag;
    BYTE BatteryLifePercent;
    BYTE Reserved1;
    DWORD BatteryLifeTime;
    DWORD BatteryFullLifeTime;

    }
    dll "kernel32.dll"
    {
    INT GetSystemPowerStatus (inout POWER_STATUS Status);

    }
    testcase GetSysPowerStatus () appstate none
    {
    POWER_STATUS PowerStatus;
    GetSystemPowerStatus (PowerStatus);
    print (PowerStatus.ACLineStatus);
    print (PowerStatus.BatteryFlag);
    print (PowerStatus.BatteryLifePercent);
    print (PowerStatus.Reserved1);
    print (PowerStatus.BatteryLifeTime);
    print (PowerStatus.BatteryFullLifeTime);

    }


    ------------------

  4. #4
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: DLLs in 4Test scripts.

    I started to use dll just recently and I find them very powerful and limitless

    I really like them. Especially silk is using them internally as well. Like these Init file functions, and probably the time functions too.

    ------------------

  5. #5
    Junior Member
    Join Date
    May 2001
    Location
    New Delhi , India
    Posts
    28
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: DLLs in 4Test scripts.

    Same here...I was facing many problems in the beginning, since no documentation in provided by Segue on this topic....

    Grover.

    ------------------

  6. #6
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: DLLs in 4Test scripts.

    There is one article in the segue newsletters about dll(don't know which one). It's a very good place to find technical articles. They always have some good articles from month to month.

    Other than that you are on your own. That's why this channel is so vital to the success of Segue and the ppl who use it.

    ------------------

  7. #7
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: DLLs in 4Test scripts.

    There is a small but detailed chapter in the Users Guide. Chapter 24, "Calling Windows DLLs from 4Test Scripts".

    ------------------

  8. #8
    Junior Member
    Join Date
    May 2001
    Location
    Portland, OR
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: DLLs in 4Test scripts.

    I find the hardest part is finding good information on the windows api's themselves. Here is a site I found recently which has been helpful:
    http://www.vbapi.com/ref/funca.html

    If you have access to MSDN that's also very useful.

    ------------------

  9. #9
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: DLLs in 4Test scripts.

    For windows DLLs you have to check in Visual Studio help files and also at www.microsoft.com.

    For different usage goto dejanews.com(which will redirect you to google owned dejanews site then search under 'comp' newsgroup.
    A lot of help there on how to use different WINAPIs.

    I think silk mapped most of the map-able functions from user32.dll. Just cross-reference mswfun32.inc with any of the above place.

    cheers




    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 05:38 PM.

Copyright BetaSoft Inc.