Skip to content
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

More A/W/DeclareWide Alias pattern anomalies #29

Closed
GCuser99 opened this issue May 16, 2024 · 3 comments
Closed

More A/W/DeclareWide Alias pattern anomalies #29

GCuser99 opened this issue May 16, 2024 · 3 comments

Comments

@GCuser99
Copy link

GCuser99 commented May 16, 2024

These don't follow the A/W/DeclareWide Alias pattern. Looks like the A's are aliased (as opposed to W's) and hence one of our filtering passes incorrectly replaced "DeclareWide" with "Declare" from the (unaliased) W's. Looks like the "standard" W entries were not originally included(?). When I get time I'll run a search for Aliased A's to check if there are any others like this.

Public Declare PtrSafe Function URLOpenStream Lib "urlmon" Alias "URLOpenStreamA" (ByVal pCaller As stdole.IUnknown, ByVal szURL As String, ByVal dw As Long, ByVal pCallback As IBindStatusCallback) As Long
Public Declare PtrSafe Function URLOpenStreamW Lib "urlmon" (ByVal pCaller As stdole.IUnknown, ByVal szURL As String, ByVal dw As Long, ByVal pCallback As IBindStatusCallback) As Long
Public Declare PtrSafe Function URLOpenPullStream Lib "urlmon" Alias "URLOpenPullStreamA" (ByVal pCaller As stdole.IUnknown, ByVal szURL As String, ByVal dwReserved As Long, ByVal pCallback As IBindStatusCallback) As Long
Public Declare PtrSafe Function URLOpenPullStreamW Lib "urlmon" (ByVal pCaller As stdole.IUnknown, ByVal szURL As String, ByVal dwReserved As Long, ByVal pCallback As IBindStatusCallback) As Long
Public Declare PtrSafe Function URLDownloadToCacheFile Lib "urlmon" Alias "URLDownloadToCacheFileA" (ByVal lpUnkcaller As stdole.IUnknown, ByVal szURL As String, ByVal szFileName As String, ByVal dwBufLength As Long, ByVal dwReserved As Long, ByVal pbsc As IBindStatusCallback) As Long
Public Declare PtrSafe Function URLDownloadToCacheFileW Lib "urlmon" (ByVal lpUnkcaller As stdole.IUnknown, ByVal szURL As String, ByVal szFileName As Long, ByVal dwBufLength As Long, ByVal dwReserved As Long, ByVal pbsc As IBindStatusCallback) As Long
Public Declare PtrSafe Function URLOpenBlockingStream Lib "urlmon" Alias "URLOpenBlockingStreamA" (ByVal pCaller As stdole.IUnknown, ByVal szURL As String, ByRef Strm As IStream, ByVal dwReserved As Long, ByVal lpfnCB As IBindStatusCallback) As Long
Public Declare PtrSafe Function URLOpenBlockingStreamW Lib "urlmon" (ByVal pCaller As stdole.IUnknown, ByVal szURL As String, ByRef Strm As IStream, ByVal dwReserved As Long, ByVal lpfnCB As IBindStatusCallback) As Long
Public Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As stdole.IUnknown, ByVal szURL As String, ByVal szFile As String, ByVal dwReserved As Long, ByVal lpfnCB As IBindStatusCallback) As Long
Public Declare PtrSafe Function URLDownloadToFileW Lib "urlmon" (ByVal pCaller As stdole.IUnknown, ByVal szURL As String, ByVal szFile As String, ByVal dwReserved As Long, ByVal lpfnCB As IBindStatusCallback) As Long
@fafalone
Copy link
Owner

Nice timing, right after I finally post a major update 🤣

Since URLDownloadToFile is a popular function I've gone ahead and posted a quick update again just fixing this issue. I looked for other instances of A" ( to find other aliases like that but the other 5 were correct. If you find any I've missed, please open a new issue, and of course keep the bug reports of all kinds coming 🙂

This issue fixed in 8.0.403, now available. Thanks!

@GCuser99
Copy link
Author

GCuser99 commented May 17, 2024

I just ran the search for Aliased A's and the only ones that I found look intentional, like:

Public Declare PtrSafe Function PostAppMessageA Lib "user32" Alias "PostThreadMessageA" (ByVal idThread As Long, ByVal Msg As Long, ByVal wParam As LongPtr, lParam As Any) As BOOL
Public Declare PtrSafe Function GetWindowLongA Lib "user32" Alias "GetWindowLongPtrA" (ByVal hWnd As LongPtr, ByVal nIndex As GWL_INDEX) As LongPtr
Public Declare PtrSafe Function SetWindowLongA Lib "user32" Alias "SetWindowLongPtrA" (ByVal hWnd As LongPtr, ByVal nIndex As GWL_INDEX, ByVal dwNewLong As LongPtr) As LongPtr
Public Declare PtrSafe Function GetClassLongA Lib "user32" Alias "GetClassLongPtrA" (ByVal hWnd As LongPtr, ByVal nIndex As GCL_Index) As LongPtr
Public Declare PtrSafe Function SetClassLongA Lib "user32" Alias "SetClassLongPtrA" (ByVal hWnd As LongPtr, ByVal nIndex As GCL_Index, ByVal dwNewLong As LongPtr) As LongPtr

So I think your latest version looks good!

@fafalone
Copy link
Owner

Yup those are all intentional and correct, thanks for double checking 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants