[erlang-questions] Win32 API NIF(s)

Antoine Koener antoine.koener@REDACTED
Tue Mar 22 00:10:25 CET 2016


> Le 21 mars 2016 à 21:51, Sam Schneider <sds6065@REDACTED> a écrit :
> 
> Thanks for the link, I'll definitely check it out!  If I can't end up finding anything I may just create one myself since yeah I could see it being useful for others.
> 
> On Mar 21, 2016 4:44 PM, "Felix Gallo" <felixgallo@REDACTED <mailto:felixgallo@REDACTED>> wrote:
> Damn, that's an excellent candidate for a NIF.  Don't know of one off hand, but that's small enough, self-contained enough, and benefits the most from not having another entire process hanging around that it makes a good amount of sense.
> 
> The closest I could imagine would be to look at the Wings3D modeler, which is an erlang app that runs on Windows as a first class citizen.  I don't know if it sets the shell icon, but it might, and if it does, that's probably the closest you're going to get.
> 
> https://github.com/dgud/wings <https://github.com/dgud/wings>

I've implemented in the past a small .exe that was just doing that (but also inject a dll in all processes but that's another story) that I was managing using a port. Because the exe was supervised it could crash, erlang restart it, and I was able to make that small .exe a lot more powerful... 
That was really simple; the only thing I remember was something related to UTF-16 instead of C strings.

There might also be some way to use the rundll.exe to call what you need; but I don't know if that would work nowadays...



> 
> F.
> 
> On Mon, Mar 21, 2016 at 1:34 PM, Sam Schneider <sds6065@REDACTED <mailto:sds6065@REDACTED>> wrote:
> Specifically I'm looking to use the notification icon APIs (like Shell_NotifyIcon)
> 
> On Mar 21, 2016 4:23 PM, "Felix Gallo" <felixgallo@REDACTED <mailto:felixgallo@REDACTED>> wrote:
> the Win32 C API is pretty big; what in specific are you looking to try to do, and what sort of requirements envelope does it need to fit inside?
> 
> generically, I'd think F# or C# open in a port would be close enough for a lot of use cases.
> 
> F.
> 
> On Mon, Mar 21, 2016 at 11:09 AM, Sam Schneider <sds6065@REDACTED <mailto:sds6065@REDACTED>> wrote:
> Hi everyone,
> 
> Does anybody know of any nifs for working with the Win32 C API?  I've tried searching around without any luck so far.  In the meantime I've been playing with Roslyn open in a port, but a can't imagine that's very ideal.
> 
> Thanks,
> Sam
> 
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
> http://erlang.org/mailman/listinfo/erlang-questions <http://erlang.org/mailman/listinfo/erlang-questions>
> 
> 
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160322/b1b8efdb/attachment.htm>


More information about the erlang-questions mailing list