Questions tagged [dart-native-extension]

24 questions
1
vote
1 answer

Dart:io stdin raw character codes

I've created a Dart console app and need to process keycodes like Arrow keys and function keys from stdin? The samples I've seen are typically String based : Stream readLine() => stdin.transform(UTF8.decoder).transform(new…
George Aslanis
  • 517
  • 4
  • 11
1
vote
1 answer

How to invoke operator from C++ in DART_API?

I get error when invoke this function: Dart_Invoke(dh_value, Dart_NewStringFromCString("&="), 1, mask); Here is error message: Breaking on exception: Class 'int' has no instance method '&='. How Dart programmers invoke operators in C++? P.S. I use…
mezoni
  • 10,684
  • 4
  • 32
  • 54
1
vote
1 answer

How to throw a custom error from a dart extension dll?

I am trying to create an extension to wrap an existing DLL without extensive knowledge of C/++. I have used the sample extension as a base and everything seems to work fine, what I would like to do is have some error handling inside my dll. Is…
Tom C
  • 822
  • 7
  • 27
1
vote
0 answers

Dart native extension : asynchronous but blocking?

After some try, it's that I can see : The extension execution is asynchronous from dart but not C, which is blocking while the current method has not completed. Dart_NativeFunction ResolveName(Dart_Handle name, int argc); Dart_Handle…
1
vote
1 answer

How to get Dart native extension demo "sample_extension" to work?

I am trying to get the Dart native extension example from this page to work. http://www.dartlang.org/articles/native-extensions-for-standalone-dart-vm/ I am on Windows. I downloaded and extracted dart to C:\Program Files\dart I checked out dartsSVN…
H.R.
  • 496
  • 4
  • 14
0
votes
0 answers

How to Send Pointer from Native to Dart via Native Ports

I've been able to get simple strings passed from C to dart via FFI and Native Ports with on examples like: // Basic working example on the C side char * str = "some string"; Dart_CObject msg; msg.type = Dart_CObject_kString; msg.value.as_string =…
Kdigital
  • 3,795
  • 3
  • 28
  • 24
0
votes
1 answer

Get pointer to a struct from a Dart_NativeArguments struct in C

I'm trying to wrap a C library using Dart. I call into a C function from dart and pass in the arguments through a Dart_NativeArguments struct in C: void _sayHello(Dart_NativeArguments arguments) { string from; Dart_Handle seed_object =…
Birdman
  • 41
  • 1
  • 1
  • 8
0
votes
0 answers

Dart native extension demo “sample_extension” on VS2010 setup

I've been able to create/compile the simple_extension.dll (32bit) only on PC's with VS2010 C++ Express Edition. I'm following WHesse's article on native extensions section Building on Windows. My PC on the other hand has Windows 2008 Server R2…
George Aslanis
  • 517
  • 4
  • 11
0
votes
1 answer

Dart native extensions - what exactly does dart-ext do on library include

I include the following in my native extension :- #include "qpid/client/Connection.h" #include "qpid/client/Message.h" #include "qpid/client/Session.h" My Dart code using the native extension works, all fine and dandy, if however I include this…
user2685314
  • 1,059
  • 6
  • 9
1
2