3,777 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
104
views
How do I send a string to this unmanaged C++ function?
I have a .dll written in C++ with a C style API. I have successfully implemented various interop methods but this one is causing exceptions.
BL_API BLResult BL_CDECL bl_image_write_to_file(const ...
1
vote
1
answer
120
views
How to pass a string as a pointer to byte array from a managed code to an unmanaged function
I need to use a Windows API function in my VB.NET application.
I need to pass an ASCII string of text to that function. This string is stored as a zero-terminated byte array.
What I currently do is I ...
0
votes
2
answers
144
views
Allow null for Flask restx's expect
I have setup a Flask project using the flask restx to help me validate the input JSON payload. Note: I am also using restx's Namespace for other things too, so I have ns instead of blueprint
I have ...
0
votes
0
answers
28
views
C# function call to C++ DLL method always receives value of "TRUE" [duplicate]
A method in a C++ DLL can return a function value of TRUE or FALSE.
When called from a C# application, the C# application always receives a value of "TRUE", even when the C++ method is ...
1
vote
0
answers
145
views
How to provide custom marshaller to have alternative behavior for tagged fields
Background
I have an application that uses gRPC to communicate with other services. Nothing fancy.
The data exchange includes fields representing SHA-1, SHA-256 and UUIDs, which are stored as bytes. ...
1
vote
1
answer
139
views
Marshaling an Array of Struct
I'm working with an unmanaged c++ dll in C# that controls a measuremnet device over USB. I got as far as getting single value measurement but I struggle trying to recover recorded data... I guess I ...
-4
votes
1
answer
219
views
How to pass raw JSON with spaces and tabs to a struct in Go without extra escaping or marshaling
I'm working with a Go application where I need to pass raw JSON data to a struct field, but I am encountering issues with extra escaping when marshaling the struct, especially when the raw JSON ...
-1
votes
1
answer
125
views
So i am trying to generate a csv file based on a list that i retrieve from my database. Everything seems to work fine except from the delimiter
@Override
public void configure(){
rest("/camel/loss-events")
.get("/csv-download")
.to("direct:generateCsv");
CsvDataFormat csv = new CsvDataFormat();
...
0
votes
0
answers
83
views
CXF XJC generation force List<String> to return null instead of empty list with JABX bindings
I'm using cxf xjc plugin version 4.0 to transform a schema to a java class, but this is generating a class that when a list is null, it returns an empty list, but I need the null, so I'm using JAXB ...
3
votes
1
answer
397
views
UnmanagedCallersOnly and struct as return value
I'm trying to export a function so that it can be used from the native unmanaged world. In my case this would be a Delphi application.
I'm using [UnmanagedCallersOnly] keyword to export the functions. ...
1
vote
1
answer
91
views
How to handle a string returned by a .NET exported function in Pascal Script (Inno Setup)? [duplicate]
I’ve created a .NET DLL with exported functions using DllExport, and I would like to call one of these exported functions from the Pascal Script in Inno Setup to retrieve their return value.
Please ...
2
votes
0
answers
144
views
How can I marshal this C# string to Fortran in a more convenient way?
I currently have a code base written in Fortran with interop code written in C#. In the Fortran code, there are many structures. All arrays and strings are fixed size. There are duplicate definitions ...
-1
votes
1
answer
65
views
Go customize json output on one single field
Would using encoder.Encode within Go's customized json marshal function be causing goroutine stack overflow?
Please take a look at (enclosed below)
https://go.dev/play/p/KXLH0B20b1u
Using encoder....
xpt's user avatar
- 23.7k
1
vote
1
answer
61
views
Do ref parameters need special handling in source generated native marshaling?
I was playing around with this new feature and decided to use dbghelp.dll's SymGetModuleInfo64 as an example. I wrote the custom marshaller and I am able to run it (below is the generated code), but ...
0
votes
1
answer
29
views
what is subclass tf.keras.layers.Layer instead of using a Lambda in this code?
An example of replacing a lambda with a subclass in code is as follows:
scale = tf.Variable(1.)
scale_layer = tf.keras.layers.Lambda(lambda x: x * scale)
Because scale_layer does not directly track ...