Comments (4)
Well as long as the new version works in both 32bit and 64bit, I'll leave why the superfluous parameter works in 64bit as a mystery for those more familiar with the calling conventions on a low level.
Fixed in v7.8.379, available now.
Sorry for the multiple GDIP bugs; thanks for helping make WinDevLib better by reporting them though 👍
from windevlib.
I see how the current definition is wrong, but not how that would be right? gdiplusflat.h:
GpStatus WINGDIPAPI
GdipGetLineColors(GpLineGradient *brush, ARGB* colors);
//gdipluspixelformats.h
typedef DWORD ARGB;
So the definition should be the same in both, Public Declare PtrSafe Function GdipGetLineColors Lib "gdiplus" (ByVal brush As LongPtr, colors As Long) As GpStatus
because a DWORD
is just a 4-byte Long
on both 32bit and 64bit.
from windevlib.
Oh, that's strange! You are right that:
Public Declare PtrSafe Function GdipGetLineColors Lib "gdiplus" (ByVal brush As LongPtr, colors As Long) As GpStatus
...works for both!
But the two-color argument version does "seem" to work for 64-bit and not 32-bit! Here is a snippet:
Dim Values(0 To 1) As Long
If GdipGetLineColors(BrushHandle, Values(0), Values(1)) = 0& Then
Maybe the second argument is superfluous and gets ignored?
Thanks!
from windevlib.
Yeah, that is what it is... here is a test in tB which fails in 32-bit but works in 64-bit. Not sure what the expected behavior is (don't have VB6 to test).
Private Declare PtrSafe Sub CopyMemory Lib "kernel32.dll" Alias "RtlMoveMemory" ( _
ByRef Destination As Any, _
ByRef Source As Any, ByVal Length As Long, _
ByVal superfluous As Long) '<-- added an unsupported argument
Sub test()
Dim a As Long, b As Long
a = 1: b = 2
CopyMemory a, b, 4, 99999 '<-- fails in 32-bit tB with "Bad DLL Definition"
Debug.Print a 'prints 2 in 64-bit tB
End Sub
from windevlib.
Related Issues (20)
- OPENFILENAME[AW] UDTs incorrect HOT 1
- ShowWindow function triggering error HOT 1
- GdipFillClosedCurve2 and GdipFillClosedCurve2I declarations HOT 1
- 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
- URLDownloadToCacheFileW and URLDownloadToFileW HOT 4
- GetAsyncKeyState and GetKeyState Argument Type HOT 3
- Duplicate definition: WOW64_LDT_ENTRY HOT 3
- SHUpdateImageA and aliased version of SHUpdateImage should have String argument? HOT 1
- SHCreateItemFromParsingName overload? HOT 2
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.