Comments (4)
I hit this as well. The nullable pActivationParams
isn't being handled correctly here, ends up trying to access pActivationParams.HasValue
.
Poking @AArnott for prioritization 😅
from cswin32.
This bug was surprisingly difficult to solve.
from cswin32.
I don't think there's anything wrong with calling pActivationParams.HasValue
in the friendly overload, as that is a nullable struct, so it can't throw NRE.
I suspect the issue is that the .NET interop layer cannot handle a null reference passed into an in struct
parameter on a COM interface. That seems unfortunate because the COM side should only need the address, and taking the address of a null reference is allowed in C# and produces a null pointer as intended.
But on the flip side, I don't know why CsWin32 is generating the COM interface with an in PROPVARIANT
rather than PROPVARIANT*
in the first place. Given it's an [Optional]
parameter, CsWin32 should be (I think) be preferring pointers. That's the first thing I'll look into.
from cswin32.
Yay, thanks @AArnott. Will try it out tonight.
from cswin32.
Related Issues (20)
- Code Quality: Use `WinMdRoot` instead of `winmdroot` to supress CS8981 (type name is ASCII lowercase only) HOT 5
- `PCWSTR` is not marked with `[GeneratedCode]`
- Many Win32 structs (HDC, HMONITOR, etc.) lack the IntPtr conversion operator.
- "Pointers cannot reference marshaled structures. Use ByRef instead" caused by VariableLengthInlineArray
- Latest WDK metadata fails to create DEVPKEY field
- Daily nuget feed not updating HOT 1
- MFTEnumEx signature incorrect
- `VirtualFreeEx` missing HOT 1
- Missing NtCreateThread and NtCreateThreadEx functions HOT 1
- Add an analyzer to catch inadvertent ephemeral delegates HOT 4
- Missing `CryptCATCDFEnumMembersByCDFTagEx` and `CryptCATCDFEnumAttributesWithCDFTag` HOT 1
- `ReadFileEx` incorrectly takes a `Span<byte>`
- WINMM `PlaySound` does not allow passing byte arrays. HOT 1
- CsWIn32 generates DllImports with legacy com marshalling even when BuiltInComInteropSupport is set to false (and it's not supported) HOT 1
- Properly terminate `<see href="">` tags in generated XML documentation. HOT 1
- VariableLengthInlineArray - VS2019 - CS8170 and CS8347
- AddVectoredExceptionHandler handler callback causes ExecutionEngineException
- Class modifiers would conflict when different two packages have different modifier HOT 1
- Add option to generate ExcludeFromCodeCoverage on source generated objects
- SystemParametersInfo cannot read the path of the desktop background image
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 cswin32.