Comments (4)
Well thats annoying; I made those changes and somehow they didn't take... maybe forgot to save, or tB did that fakeout...
Fixed in v8.0.404, available now.
Hey is this something regex would be able to help with? If so, if you're up for it and whenever you have the time, could you check for other W functions that have String arguments but not DeclareWide?
from windevlib.
I ran the search for unAliased W's with String Args and included in list below. For each of those found, I also examined their corresponding A and Aliased siblings and included what looked to be incorrect in those too (for example, some A/W versions were misidentified as W/A respectively).
Public Declare PtrSafe Function CommandLineToArgvW Lib "shell32" (ByVal lpCmdLine As String, pNumArgs As Long) As LongPtr
'the DeclareWide Aliased version has LongPtr that should be String
Public DeclareWide PtrSafe Function PathIsSystemFolder Lib "shlwapi" Alias "PathIsSystemFolderW" (ByVal pszPath As LongPtr, ByVal dwAttrb As Long) As BOOL
Public Declare PtrSafe Function PathIsSystemFolderW Lib "shlwapi" (ByVal pszPath As String, ByVal dwAttrb As Long) As BOOL
Public Declare PtrSafe Function UrlCreateFromPathW Lib "shlwapi" (ByVal pszPath As String, ByVal pszUrl As String, ByRef pcchUrl As Long, ByVal dwFlags As Long) As Long
'the Aliased version should be DeclareWide and lpsz arg switched to String
Public Declare PtrSafe Function IsBadStringPtr Lib "kernel32" Alias "IsBadStringPtrW" (ByVal lpsz As LongPtr, ByVal ucchMax As LongPtr) As BOOL
Public Declare PtrSafe Function IsBadStringPtrW Lib "kernel32" (ByVal lpsz As String, ByVal ucchMax As LongPtr) As BOOL
Public Declare PtrSafe Function CreateWaitableTimerExW Lib "kernel32" (lpTimerAttributes As SECURITY_ATTRIBUTES, ByVal lpTimerName As String, ByVal dwFlags As CreateWaitableTimerExFlags, ByVal dwDesiredAccess As Long) As LongPtr
'switch the args between W and A versions?
Public Declare PtrSafe Function CreateServiceA Lib "advapi32" (ByVal hService As LongPtr, ByVal lpServiceName As LongPtr, ByVal lpDisplayName As LongPtr, ByVal dwDesiredAccess As Long, ByVal dwServiceType As ServiceType, ByVal dwStartType As ServiceStartType, ByVal dwErrorControl As ServiceErrorControlType, Optional ByVal lpBinaryPathName As LongPtr, Optional ByVal lpLoadOrderGroup As LongPtr, Optional ByRef lpdwTagId As Long, Optional ByVal lpDependencies As LongPtr, Optional ByVal lpServiceStartName As LongPtr, Optional ByVal lpPassword As LongPtr) As BOOL
Public Declare PtrSafe Function CreateServiceW Lib "advapi32" (ByVal hService As LongPtr, ByVal lpServiceName As LongPtr, ByVal lpDisplayName As LongPtr, ByVal dwDesiredAccess As Long, ByVal dwServiceType As ServiceType, ByVal dwStartType As ServiceStartType, ByVal dwErrorControl As ServiceErrorControlType, Optional ByVal lpBinaryPathName As String, Optional ByVal lpLoadOrderGroup As String, Optional ByRef lpdwTagId As Long, Optional ByVal lpDependencies As String, Optional ByVal lpServiceStartName As String, Optional ByVal lpPassword As String) As BOOL
Public Declare PtrSafe Function mmioRenameW Lib "winmm" (ByVal szFileName As LongPtr, ByVal SzNewFileName As String, lpmmioinfo As MMIOINFO, ByVal dwRenameFlags As Long) As MMIOERR
Public Declare PtrSafe Function GetPrintProcessorDirectoryW Lib "winspool.drv" (ByVal pName As LongPtr, ByVal pEnvironment As LongPtr, ByVal Level As Long, ByVal pPrintProcessorInfo As String, ByVal cbBuf As Long, pcbNeeded As Long) As BOOL
Public Declare PtrSafe Function SetFormW Lib "winspool.drv" (ByVal hPrinter As LongPtr, ByVal pFormName As String, ByVal Level As Long, pForm As Any) As BOOL
'switch the args between W and A versions?
Public Declare PtrSafe Function AddPortA Lib "winspool.drv" (ByVal pName As LongPtr, ByVal hwnd As LongPtr, ByVal pMonitorName As LongPtr) As BOOL
Public Declare PtrSafe Function AddPortW Lib "winspool.drv" (ByVal pName As String, ByVal hwnd As LongPtr, ByVal pMonitorName As String) As BOOL
'these two do not have corresponding A and Aliased W
Public Declare PtrSafe Function CredUIStoreSSOCredW Lib "credui.dll" (ByVal pszRealm As String, ByVal pszUsername As String, ByVal pszPassword As String, ByVal bPersist As BOOL) As Long
Public Declare PtrSafe Function CCredUIReadSSOCredW Lib "credui.dll" (ByVal pszRealm As String, ppszUsername As LongPtr) As Long
Public Declare PtrSafe Function GetUrlCacheEntryInfoExW Lib "wininet" (ByVal lpszUrl As LongPtr, lpCacheEntryInfo As INTERNET_CACHE_ENTRY_INFOW, lpcbCacheEntryInfo As Long, ByVal lpszRedirectUrl As String, lpcbRedirectUrl As Long, ByVal lpReserved As LongPtr, ByVal dwFlags As Long) As BOOL
'these two do not have corresponding A and Aliased W
Public Declare PtrSafe Function PrivacySetZonePreferenceW Lib "wininet" (ByVal dwZone As URLZONE, ByVal dwType As PrivacyType, ByVal dwTemplate As INET_PRIVACY_TEMPLATES, Optional ByVal pszPreference As String) As Long
Public Declare PtrSafe Function PrivacyGetZonePreferenceW Lib "wininet" (ByVal dwZone As URLZONE, ByVal dwType As PrivacyType, pdwTemplate As INET_PRIVACY_TEMPLATES, Optional ByVal pszBuffer As String, Optional pdwBufferLength As Long) As Long
from windevlib.
There's no CredUIStoreSSOCred[A} defined in the Windows API, same for the one below that, and PrivacyGet/SetZonePreferenceW, and the CmdLine...-- but there's only 1 C at the start of CredUIReadSSOCredW so glad that was caught. I'm going to use overloads so either String or LongPtr can be used with W.
Thanks again, really great working finding all these bugs 💯
from windevlib.
All identified issues fixed in v8.0.406, available now.
from windevlib.
Related Issues (20)
- Toolbox HOT 1
- LoadLibrary declare incorrect HOT 1
- CreateThread dwStackSize param and return type incorrect HOT 1
- OPENFILENAME[AW] UDTs incorrect HOT 1
- ShowWindow function triggering error HOT 1
- GdipFillClosedCurve2 and GdipFillClosedCurve2I declarations HOT 1
- GdipGetLineColors has different call signatures for 32-bit versus 64-bit HOT 4
- Incorrect argument for GdipDrawImagePointsRect and GdipDrawImagePointsRectI API functions HOT 1
- Non-aliased version of RtlMoveMemory? HOT 2
- CreateBitmap Function in "gdi32" Library HOT 3
- WIC Proxy Functions? HOT 5
- DeclareWide version of GetWindowTextW HOT 18
- WDL Conversion Question HOT 5
- 4 more WIC proxy functions HOT 2
- CryptBinaryToString should be DeclareWide? HOT 6
- A few more potential anomalies HOT 2
- Broken A/W/Alias pattern HOT 2
- More A/W/DeclareWide Alias pattern anomalies HOT 3
- GetAsyncKeyState and GetKeyState Argument Type HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from windevlib.