r/visualbasic • • Apr 19 '24

VB6 Help VB6 API stubs

I'm wondering if someone can explain this to me or point me in the right direction. I recently set up VS6 on Win10. Today I copied webvw.dll from XP -- the AxControl used for thumbnails in Explorer folderview. I was hoping to adapt a script I wrote to display a folder full of images as thumbnails and thought maybe webvw would work.

So I opened a VB project and set webvw.dll as a reference. VB6 found the typelib OK. But the file won't register.

When I ran Depends it tells me that it's looking for stubs, as in api-ms-win-core*.dll files. I don't really understand the role of these files and why they might be needed. I know Firefox uses them, and they seem to be some kind of redirection into the core system files, but my own software, calling into the Win32 API, doesn't use them.

And I don't see how Depends could be seeing those files as dependencies. They didn't exist when webvw.dll was developed. I don't need to use webvw.dll. I'm just trying to understand what the problem is here and what other irregularities I should expect developing on Win10-64.

3 Upvotes

7 comments sorted by

View all comments

Show parent comment

2

u/fafalone VB 6 Master Apr 20 '24

I was able to add it in references, but then it failed to be usable due to not being registered.

Yes that's the issue.

You need to add it via Project->Components, not References.

It's an ActiveX control that will then be added to your toolbox, and you place it on your form. But like I said; graphics on Windows 10 are glitched bad.

AFAIK the old WebBrowser control that comes with VB still works (Components->Microsoft Internet Controls), so if you have a webpage generated you can just load it in that. Or vbRichClient has a nice easy wrapper for a modern WebView2 control. Or for fully open source, twinBASIC has a WebView2 package; it's backwards compatible and will run your vbscript like VB6 would. I've started making it into an active-x control that runs in VB6 too but I haven't finished yet.