Replies: 7 comments 7 replies
-
Another question:
|
Beta Was this translation helpful? Give feedback.
-
One more:
All the best, |
Beta Was this translation helpful? Give feedback.
-
Also generating constants defined in https://learn.microsoft.com/en-us/windows/win32/seccrypto/alg-id does not work, how can they be found? Do I have to manually create those? Best regards, PS: Sorry for the spam :-) |
Beta Was this translation helpful? Give feedback.
-
Yes, it would be nice in some cases. But it converts a struct into what the CLR calls a managed type, so you can no longer get a pointer to it, as is required by many APIs. So while we offer
Yes, you have to initialize those fields yourself. For a few uncommon variable length structs, you'd have to do even more.
The names come from the metadata. We propose to improve this as tracked by #408. |
Beta Was this translation helpful? Give feedback.
-
Ideally CsWin32 would autopopulate cbSize fields via #108. |
Beta Was this translation helpful? Give feedback.
-
The main annoyance isn't string for me, it's sub structs:
That doesn't work though, as the address
As you can see this is much more complex now. If you have a better workaround I'd be glad :-) Best regards, |
Beta Was this translation helpful? Give feedback.
-
@AArnott & @mikebattista : Many thanks for the quick replies - and this great gem of a library ❤️ |
Beta Was this translation helpful? Give feedback.
-
Really like the concept of the library and started to use it today.
I've used it to generate
SignerSignEx2
, this generates lots of additional structs, and I've problems filling them:strings in those structs are PCWSTR and not System.String typed. How to properly convert a System.String into a PCWSTR? Wouldn't it be nice if those structs would contain System.String properties? :-)
How to properly fill the cbSize of those structs? Is this something that is done automatically in the ctor? It doesn't look like it, so I have to use
(uint) Marshal.SizeOf<STRUCT_TYPE>()
am I right?Unions are strangely called "Anonymous", is this correct or a generation error?
Best regards,
D.R.
Beta Was this translation helpful? Give feedback.
All reactions