News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Any algorithm to only use pure win API to write async I/O like Node.js does?

Started by enzechen, July 30, 2015, 01:14:00 AM

Previous topic - Next topic

enzechen

Could anyone describe some basic idea, e.g. API function, or suggest some book on this?

I think callback function might be one main solution. How could I introduce this type callback function into MASM programming?

Thanks a lot.

BogdanOntanu

Quote from: enzechen on July 30, 2015, 01:14:00 AM
Could anyone describe some basic idea, e.g. API function, or suggest some book on this?

I think callback function might be one main solution. How could I introduce this type callback function into MASM programming?

Thanks a lot.

A callback is just a simple function (or PROC in MASM). It has to respect the signature described in MSDN and save registers as described in ABI.
Async I/O functions are also described in MSDN.

For example:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365683%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
Ambition is a lame excuse for the ones not brave enough to be lazy, www.oby.ro

Gunther

Quote from: Meibleke on August 05, 2015, 06:12:06 PM
I find this topic for a long time. I want to talk about this, really.

Seems to be another lousy spam bot.

Gunther
You have to know the facts before you can distort them.

dedndave

are you talking about WriteFile with an OVERLAPPED structure ?

https://msdn.microsoft.com/en-us/library/windows/desktop/aa365747%28v=vs.85%29.aspx

or maybe WriteFileEx ?

https://msdn.microsoft.com/en-us/library/windows/desktop/aa365748%28v=vs.85%29.aspx

you'll have to forgive that many of us don't know squat about java script   :lol:
that's because we can write in assembler   :biggrin: