SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    using VBE-libraries

    is it possible to use vbe-files as library files (via ExecuteFile statement) in QTP?

    i got several problems while loading such files. there are any hints or workarounds?
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

  2. #2
    Senior Member
    Join Date
    Oct 2005
    Location
    London, U.K
    Posts
    1,804
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: using VBE-libraries

    What are VBE files? Are they created with visual studio?

  3. #3
    Senior Member
    Join Date
    Jan 2000
    Location
    USA, CA
    Posts
    1,998
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: using VBE-libraries

    No.
    ExecuteFile works with VBS only.


    Janna

  4. #4
    SQA Knight
    Join Date
    Jul 1999
    Location
    Grand Rapids, MI
    Posts
    3,727
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: using VBE-libraries

    I have not yet done this, but...

    The Extern.Declare() method allows you to define one or more functions located in an external DLL, in the form:

    Extern.Declare(RetType, MethodName, LibName, Alias [, ArgType(s)])

    Once declared, you then call MethodName in the LibName DLL using the Extern object, as in:

    Extern.MethodName(...)

    So, if you have VBE libs that can be compiled into DLLs, the Extern object and its declaration method should then give you access to the lib functions.

    Please reply to this thread if this works as advertised in QTP online Help.

    -Terry Horwath

  5. #5
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: using VBE-libraries

    [ QUOTE ]
    So, if you have VBE libs that can be compiled into DLLs, the Extern object and its declaration method should then give you access to the lib functions.

    [/ QUOTE ]
    Just an FYI to everyone VB6 DLLs cannot export functions. They can only export COM intefaces. Class stdCall DLLs can be created using tools like VC, VC.NET, VB.NET etc....

  6. #6
    Senior Member
    Join Date
    Oct 2005
    Location
    London, U.K
    Posts
    1,804
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: using VBE-libraries

    Well.... It looks like an assumption has been made what a VBE file is.

    This link suggests that a VBE file is an encoded VBScipt file :

    http://filext.com/detaillist.php?extdetail=VBE

    Perhaps the OP can clarify.

  7. #7
    SQA Knight
    Join Date
    Jul 1999
    Location
    Grand Rapids, MI
    Posts
    3,727
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: using VBE-libraries

    [ QUOTE ]
    This link suggests that a VBE file is an encoded VBScript file

    [/ QUOTE ]

    Turbo,

    First, the info in the reference link is confusing at best.

    Second, what is meant by an encoded vbScript file? Does this mean (and the article did not bother to answer) that some type of unencode processing is required to effectively use the file?

    But to get this thread discussing the original issue, I think the original poster should describe what was used to generate what he is calling a VBE file. It seems to me that if it is just another way to describe a vbScript file, that the he would not have had to ask how to include it in QTP.

    Original poster...?

    -Terry

  8. #8
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: using VBE-libraries

    thnx to all for hints and help.

    yes, VBE are encoded vb-scripts (created with the microsoft script encoder).
    the idea behind was executing such a file, because executing vbe with cscript/wscript are unproblematicly. sometimes it is needed to get some scripts out of the house and then it can be better to encode these files.

    the second way (but it makes much more time and ressources) would be to export the script-functions into an dll and provide it over external.declare
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

  9. #9
    Senior Member
    Join Date
    Oct 2005
    Location
    London, U.K
    Posts
    1,804
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: using VBE-libraries

    I guess the answer is no then, you can't use encoded VBS files.

    I don't think script files are very secure anyway, if someone really wants to look at them, they will find a way :

    http://www.virtualconspiracy.com/con...crdec/download

  10. #10
    SQA Knight
    Join Date
    Jul 1999
    Location
    Grand Rapids, MI
    Posts
    3,727
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: using VBE-libraries

    Well this turned out to be an interesting, time wasting thread again for me! [img]/images/graemlins/smirk.gif[/img]

    Here is a link to an MS document that describes the encoder, its purpose and limitations, as well as the need for the MS script engines that interpret these files to be enabled with a decoding component (this last issue is likely what keeps QTP from correctly using the encoded files):

    http://www.microsoft.com/mind/0899/s...riptengine.asp

    And an article that, like Turbo's comments, argues that using the encoder is a waste of time for the purpose of hiding your source code from all but the laziest hackers (perhaps only those from Albonia):

    http://www.asp101.com/tips/index.asp?id=116

    Actually the majority of Google hits on "microsoft script encoder" seem to make that argument. Most tell you to search Google using the pharse, "microsoft script decoder" to find many decoder offerings, but I only got a few hits, and they did not include Turbo's link.

    For those who want to see what these encoded files look like, view my attached zip. Both the files will execute using the WSH cscript.exe and wscript.exe commands (at least via the command line). I really wanted to use the decoder in Turbo's link to convert my t.vbe file back to a readable .vbs, but just did not have the guts to execute a unknown author's program on my PC (even though Symantic AntiVirus said it was virus-free...).

    And for those who just must get a copy of the MS script encoder, you souls can use the following link to download the tool and install it with its help file (note: I had to use the fully qualified pathname to invoke the tool):

    http://www.microsoft.com/downloads/detai...;displaylang=en

    [img]/images/graemlins/smirk.gif[/img] Hope this helps others waste time too! Terry
    Attached Files Attached Files

 

 
Page 1 of 2 12 LastLast

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 10.34%
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 07:50 PM.

Copyright BetaSoft Inc.