Re: [Pharo-users] UFFI asynchronous callbacks

2020-07-25 Thread ASAM
no code is needed as I mentioned ... But immediately with the load Metacello new baseline: 'ThreadedFFI'; repository: 'github://pharo-project/threadedFFI-Plugin'; onConflictUseLoaded; load. To rule out possible errors, I tested with a fresh Pharo8 64bit image, of course. -- Sent

Re: [Pharo-users] UFFI asynchronous callbacks

2020-07-25 Thread ASAM
t372350/ThreadedFFI.png> When I load it again it looks good. But then I get the error message with every Pharo start. To rule out possible errors, I tested with a fresh Pharo8 64bit image, of course. Could you tell me what i'm doing wrong? Thanks ASAM -- Sent from: http://forum.worl

Re: [Pharo-users] UFFI asynchronous callbacks

2020-07-19 Thread ASAM
Hello Ben, I quickly made a dummy DLL to limit the problem to the essentials. I think my problem comes more from how I use the semaphore. I wanted to do that: only "semaphore signal", But that somehow doesn't work. Now i'm doing that "[ Processor yield. semaphore signal ] fork" (it work's)

[Pharo-users] UFFI asynchronous callbacks

2020-07-18 Thread ASAM
I use Pharo 8(64bit) UFFI to call a dll(64bit). Over the dll I have access to 1 or more hardware devices. The dll has a function where I can register a call-back function. The callback is invoked whenever a hardware is connected or disconnected from PC. At the moment, Pharo always crashes when

Re: [Pharo-users] Output the method name as a string at runtime

2020-07-09 Thread ASAM
: [ DPDiagPduApError signal: thisContext selector asString withTag: result item asString] Although. I like your solution almost a bit better. What I like about your solution is, that throwing the exception (signal) is somehow easier to see while looking. Thanks ASAM -- Sent from: http

[Pharo-users] Output the method name as a string at runtime

2020-06-27 Thread ASAM
Hello, I would like to output the method name as a string in case of an error. what I've already done is this: (with thisContext selector asString) pduDestruct | result | result := call ffiPDUDestruct. result = T_PDU_ERROR PDU_STATUS_NOERROR ifFalse: [ Error

[Pharo-users] UFFI counterpart to "C iterate over a arry through a pointer"

2020-05-25 Thread ASAM
Hello, I'm looking for help with the following problem. I try to get closer from the C point of view to the problem. //These are the structures typedef struct { unsigned int NumEntries; /* number of entries written to the pModuleData array */ MODULE_DATA *pModuleData; /* pointer to

Re: [Pharo-users] FFI and absolute path to dll

2020-05-19 Thread ASAM
Of course there is a documentation for the API. It is even an ISO standard. And if I can do that, I would also like to make it available on GitHub. That's why it should be good. It is the ISO 22900-2 D-PDU-API. I can also attach the header file. However, the PDF is provided with a watermark. So

Re: [Pharo-users] FFI and absolute path to dll

2020-05-18 Thread ASAM
Oh. Thank you for your answers. Now that you say it, I remember it. I dealt with Pharo 2 years ago. And now I come back to load and execute a DLL with Pharo. Does anyone have a more detailed example of FFIOpaqueObjectis object than in the book

Re: [Pharo-users] FFI and absolute path to dll

2020-05-17 Thread ASAM
Thanks for the tips. It really helped me a lot. The dll is now loaded (I chose the 64-bit version of the dll). I am currently working on value mashalling and I want to create an ENUM class subclass from FFIEnumeration. Inside http://books.pharo.org/booklet-uffi/pdf/2020-02-12-uFFI-V1.0.1 i

[Pharo-users] FFI and absolute path to dll

2020-05-12 Thread ASAM
Hello, I'm using Pharo 8 64bit on Windows 10 64bit. I am trying to access a 32bit dll via a relative path. I'm desperate. I've been reading the document (http://books.pharo.org/booklet-uffi/pdf/2020-02-12-uFFI-V1.0.1) all the time up and down but I can't find an example of absolute path and