New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSVBVM60 DLL redirections #360
Comments
Will the 32 bit version exports also be redirected by tB? |
Yes, the more dependencies we remove the better. |
I think the most used functions are GetMem and PutMem.
Then the VarPtr is often used to wrap around an aliased ArrPtr declare Then the shadow object pointer stuff
Other memory functions similar to RtlMoveMemory/RtlZeroMemory
|
Here is a link to a code search for "lib msvbvm60" in all of PSC organization here. Overall Krool's list above covers 100% of msvbvm60 declares in my codebases. |
I believe it's a overkill to implement ALL exports from msvbvm60. Maybe if there are some more later on these could be also added, but not ALL. |
@Kr00l we'll just do the most widely used ones. Your list looks like a good start, and then we can add more later if they get reported. |
Is used quite often ;-) |
It's only an alias for a "better" name. |
@Kr00l |
These are now redirected to internal implementations as of v0.10.4755. If any more are wanted, just comment here and I'll re-open the issue. |
FYI I use:
Here is why I needed it. |
I need a clarification here. Those are set up for 32-bits but I imagine at least some of those expect a pointer data type and thus we need to update the declarations for 64-bits compatibility. I'll use those 2 as an example:
Based on my google search, the So maybe this....
How would we know how to translate those functions since they are not documented so that it'll work on 64-bit tB? It may not be safe to assume that we can just narrow the pointers into a |
AFAIK.. vbaCopyBytes is like RtlMoveMemory. |
Maybe it would be good to have a "information" compiler warning on msvbvm60 declares that it is redirected to allow for 64 bit. |
|
I would have suggested my answer now again. Forgot that I suggested it already when you would not have edited your comment. :D |
Btw, are equivalent API declares from VBA runtime redirected? For instance will this
. . . get redirected the way There are probably similar declares on old version |
Seems to be interesting to add. |
I believe these same functions should be redirected when they appear as calls to msvbvm50.dll as well; noticed the issue when I got a 'can't load DLL' on I know there's no concern for VB5 compatibility but this should be such a trivial add I don't see any reason not to have the bonus compatibility. |
The following API call does not work in tB x64:
It basically does an IUnknown.AddRef on an object pointer. This can be convenient in combination with |
Indeed, we've got |
|
Thanks.
Instead this will make an IUnknown::Release. But all works fine in tB x86 and x64. Just correcting a false information ;) |
Is your feature request related to a problem? Please describe.
There are some useful exported DLL functions from MSVBVM60 that VB6 developers are known to have used in their code via Declare statements. These pose a problem when switching on 64-bit support, since there is no 64-bit version of that DLL.
Describe the solution you'd like
I'd like the twinBASIC compiler to detect Declare statements into known MSVBVM60 endpoints, and redirect them to internal implementations that do the same thing.
Additional context
Let's start by making a list of the well known and most used exports from MSVBVM60 here so that we can consider them for automatic redirection by tB.
The text was updated successfully, but these errors were encountered: