SPONSORS:






User Tag List

Results 1 to 4 of 4

Thread: use of DLL's

  1. #1
    Junior Member
    Join Date
    Mar 2001
    Location
    Pune,Maharashtra,India
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    use of DLL\'s

    User Kavita Taneja (kavita@prabodhan.com.nospam) posted:

    I don't know - how to use DLL's in silk test.. Is there any mapping
    required for the data types before using DLL's function ? If yes, please
    tell us how to execute the same.

    Basically, I require the steps/procedure for using any DLL function.

    For e.g. If I want to use the DLL functions of ' user32.dll ' present in
    mswfun32.inc. How should I proceed ?

    Any help is appreciated.

    Post message: silktest@yahoogroups.com
    Subscribe: silktest-subscribe@yahoogroups.com
    Unsubscribe: silktest-unsubscribe@yahoogroups.com
    List owner: silktest-owner@yahoogroups.com
    URL to this page: http://groups.yahoo.com/group/silktest


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



  2. #2
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: use of DLL\'s

    Here's an example of how a dll call i use:

    dll "advapi32.dll"
    {
    LONG RegDeleteKey (in LONG hKey, STRING lpSubKey) alias "RegDeleteKeyA";
    }

    BOOLEAN DeleteRegKey(
    eRegistryKey Root, //@PARM Root key
    STRING lpszSubKey //@PARM key path
    )
    {
    INTEGER dwRoot,Error;
    BOOLEAN bSuccess;

    switch (Root)
    {
    case HCR : dwRoot = 0x80000000;
    case HCU : dwRoot = 0x80000001;
    case HLM : dwRoot = 0x80000002;
    case HU : dwRoot = 0x80000003;
    case HPD : dwRoot = 0x80000004;
    case HCC : dwRoot = 0x80000005;
    case HDD : dwRoot = 0x80000006;
    }
    Error = RegDeleteKey (dwRoot, lpszSubKey);
    if (Error == 0)
    bSuccess = True;
    else
    bSuccess = False;
    return bSuccess;
    }


    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  3. #3
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: use of DLL\'s

    to use the functions defined in user32 all that you have to do is add:

    use "msw32.inc"

    at the top of your frame file and all of the dll functions that are defined in there will be able to be called as any other 4Test function. Note that not all the functions in user32.dll are defined in the include file. If you need another function you can define it as in the instructions form the previous post. You can use the existing function declarations as examples of how you deal with the datatypes.

    Also keep in mind that you can't can't use all functions, just the ones that that use datatypes that 4Test supports.



    ------------------
    James Soderborg
    http://www.ameliortech.com
    jamesso@ameliortech.com

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Location
    Hartford, CT, USA
    Posts
    163
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: use of DLL\'s

    User Jaimini Bhatt (jaiminita@yahoo.com.nospam) posted:

    1, Include the necessary .inc files
    For example: msw32.inc. This file contains information about other 32-bit windows .inc files that we may use for other dlls.
    I would have the following statement in my .inc file

    use "msw32.inc"

    (simple?)
    This file contains information about the following files:

    mswconst.inc - to declare constants you pass to DLL functions. They can be styple bits, message box flags, flags used by other functions that return some properties or values

    2. Declare the Dll's with their function prototypes the syntax is:

    dll dllname.dll

    prototype

    [prototype]...

    For example:

    dll "dllname.dll"

    BOOL MemManInfo (out MEMMANINFO MemManInfo)// this is the function prototype


    Also, like
    dll "user.dll"

    LRESULT SendMessage (HWND hWnd, UINT uiMsg, WPARAM

    wParam, LPARAM lParam)// This is the function prototype.

    SendMessage (Open.hWnd, WM_GETTEXT, 256, [out] sText)// function prototype

    3. Use them freely in your tests

    Declare the DLL's in your .inc file
    dll "toolhelp.dll"

    BOOL MemManInfo (out MEMMANINFO MemManInfo)
    The format for prototype is:

    return-type func-name ( [arg-list] )
    You may get the details of the dll files and their functions in the respective .inc files. Open and see the available functions in the file.

    ------------------------------------------------------------------------------
    hi

    ----- Original Message -----
    From: Kavita Taneja
    To: silktest@yahoogroups.com
    Sent: Tuesday, March 12, 2002 9:32 PM
    Subject: [silktest] use of DLL's


    I don't know - how to use DLL's in silk test.. Is there any mapping
    required for the data types before using DLL's function ? If yes, please
    tell us how to execute the same.

    Basically, I require the steps/procedure for using any DLL function.

    For e.g. If I want to use the DLL functions of ' user32.dll ' present in
    mswfun32.inc. How should I proceed ?

    Any help is appreciated.

    Post message: silktest@yahoogroups.com
    Subscribe: silktest-subscribe@yahoogroups.com
    Unsubscribe: silktest-unsubscribe@yahoogroups.com
    List owner: silktest-owner@yahoogroups.com
    URL to this page: http://groups.yahoo.com/group/silktest


    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
    [Non-text portions of this message have been removed]


    Jaimini Bhatt

 

 

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:44 PM.

Copyright BetaSoft Inc.