神
DDeno
Created by on 8/7/2023 in #help
What should I specify to pass a "char *" in Deno.dlopen?
I see, I learn a lot! Thank you so much😭
28 replies
DDeno
Created by on 8/7/2023 in #help
What should I specify to pass a "char *" in Deno.dlopen?
😢
28 replies
DDeno
Created by on 8/7/2023 in #help
What should I specify to pass a "char *" in Deno.dlopen?
Thank you
28 replies
DDeno
Created by on 8/7/2023 in #help
What should I specify to pass a "char *" in Deno.dlopen?
[Object: null prototype] {} I looked at it and decided it wasn't the right response, but when I correctly parsed the results, it worked. I mistakenly thought that an empty object was being returned.
28 replies
DDeno
Created by on 8/7/2023 in #help
What should I specify to pass a "char *" in Deno.dlopen?
Sorry
28 replies
DDeno
Created by on 8/7/2023 in #help
What should I specify to pass a "char *" in Deno.dlopen?
const library = Deno.dlopen('example.dll', {
check: {
parameters: ['buffer'],
result: 'buffer',
nonblocking: true,
},
});

const response = await library.symbols.check(new TextEncoder().encode('a'));
console.log(response);
const library = Deno.dlopen('example.dll', {
check: {
parameters: ['buffer'],
result: 'buffer',
nonblocking: true,
},
});

const response = await library.symbols.check(new TextEncoder().encode('a'));
console.log(response);
[Object: null prototype] {} The console displays the above results I thought there was a problem with the dll, but I suspect there is a problem with my code because I called it from Python and it successfully asked for a response
28 replies
DDeno
Created by on 8/7/2023 in #help
What should I specify to pass a "char *" in Deno.dlopen?
func check(ExampleArg *C.char) *C.char {
// do anything
return C.CString('a')
}
func check(ExampleArg *C.char) *C.char {
// do anything
return C.CString('a')
}
28 replies
DDeno
Created by on 8/7/2023 in #help
What should I specify to pass a "char *" in Deno.dlopen?
I send it to a Go program compiled from Deno to dll.
28 replies
DDeno
Created by on 8/7/2023 in #help
What should I specify to pass a "char *" in Deno.dlopen?
Using buffer gets a funny response. [Object: null prototype] {} So pointer is probably the correct answer. Learn about the pointer. Given pointer, it asks for Deno.PointerValue as its argument, so it tries to find a way to convert the string to Deno.PointerValue. Thank you!
28 replies
DDeno
Created by on 8/7/2023 in #help
What should I specify to pass a "char *" in Deno.dlopen?
https://deno.land/manual@v1.36.0/runtime/ffi_api#supported-types I looked here but couldn't find the appropriate type Not familiar with native code
28 replies
DDeno
Created by on 6/11/2023 in #help
npm:undici doesn't work
4 replies
DDeno
Created by on 6/11/2023 in #help
npm:undici doesn't work
I want discordjs compatibility We want to start with @discordjs/rest, a package that only operates on rest api.
4 replies