Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. jfbeck

    VBScript and ActiveX

    JohnYingling: Thanks, I think you've solved the issue: you can pass non-variant data types to the COM object if the arguments are specified in the COM methods as ByVal. Since VB defaults to ByRef and I did not specify ByVal, I was getting a type mismatch error on string and long arguments...
  2. jfbeck

    VBScript and ActiveX

    jonscott: Okay, did some more testing after your last post. It now appears that return values can be other data types, but function arguments must be variants. My DLL works in VBS with return values other than variant (long, etc.). However, if the public methods of the DLL have any input...
  3. jfbeck

    VBScript and ActiveX

    jonscott, Yes the array was returned properly once I changed the argument type to variant. jfbeck
  4. jfbeck

    VBScript and ActiveX

    I'm not an expert on COM, but I think the issue may be that you can use strong typing in your component and use is successfully in VBScript *IF* the component includes a Type Library. However, I don't know how to create a type library with a VB component. Perhaps this is only a function of C...
  5. jfbeck

    VBScript and ActiveX

    Thanks for all comments. I made it work by changing all arguments and return values in DLL public functions to variants. jonscott8: Here are the function declarations in the DLL, both the original (which didn't work) and the new (which does): Original: Public Function...
  6. jfbeck

    VBScript and ActiveX

    Thanks for your response. Considered using RegRead, but wanted to store some of the data in the registry in encrypted form, and the DLL does that. Plus the VBScript is only part of a larger project that involves other languages, so wanted a consistent way to retrieve this data for all programs...
  7. jfbeck

    VBScript and ActiveX

    I have an ActiveX DLL to read database connection settings from the Windows registry. It works great in VB 6, but am trying to use it in VBScript. Whenever I call a method of the DLL class, I get a Type Mismatch error. My code looks like this: Dim sServer, sDB, sLogin, sPW Dim oConn Dim oReg...

Part and Inventory Search

Back
Top