Re: [Factor-talk] Factor C Interface

2017-06-01 Thread fede s
Hi Alexander: I took a look at making comdlg32.dll bindings some time ago, but I don't know much about calling conventions or how the Factor FFI stuff works, so it was a struggle. I just gave up shortly after. Is there somewhere to look at how you did it? If I can help with something please let

Re: [Factor-talk] Factor C Interface

2017-05-26 Thread Alexander Ilin
Thank you for the `calloc` tip. I have updated my code. There was a source of crashes that I've identified to be the calling convention. Apparently, comdlg32.dll works with the stdcall convention, not cdecl that I copy-pasted from somewhere. Answering my own question, the sizeof() for structs is

Re: [Factor-talk] Factor C Interface

2017-05-25 Thread cat
As for zeroing out the bytes, there is a word `calloc` which functions identically to C's calloc, allocating `n` bytes of size `size" and zeroing the entire region for you. Indeed, it is overkill and a small performance hit depending on the size of the region, but it's definitely simpler for