Click here to Skip to main content
15,306,281 members

Comments by stephen.hazel (Top 8 by date)

stephen.hazel 30-Sep-10 0:39am View
   
shared memory = memory mapped file - an actual file (uses sys paging file).
I've got a test program and storing the threadids in a memory mapped file (minus file:) and PostThreadMessage()ing works great. and is about as fast as you can possibly get.

and i'm pretty sure than any equivalent solution will use these things underneath (like pipes, dll shared mem block, etc)
stephen.hazel 29-Sep-10 18:11pm View
   
How come I can't #Quote#accept#Quote# my own answer ??
Hmmmmmmm..........
stephen.hazel 29-Sep-10 18:08pm View
   
Wow Steve, that works pretty darn good!
I can't imagine a better way to share memory across processes than windows shared memory.
And I can't imagine any faster way to message than PostThreadMessage (it does work across processes, BTW).


So I think I'm set, Steve - thanks again for your help!

(ok, sorry for annoyin' everyone, but when things WORK, it's a good day!!)
stephen.hazel 29-Sep-10 12:57pm View
   
I think this uses mem mapped files per Jeff Richter's book.
But it does send a message and I need some way for this
to be message based. I wonder if there's some way to wait on a mem mapped file change.
I know there's a way to wait on regular os file changes..
well, time to go hit ole msdn again :/
stephen.hazel 29-Sep-10 12:54pm View
   
well, the sequencer and synth are guaranteed to be on the same box.
so i'd =think= there'd be a more direct way than sockets, eh?
hmmm...
stephen.hazel 13-Sep-10 16:17pm View
   
That at the very least looks like a good place to start.

THANKYOU so much :)
stephen.hazel 13-Sep-10 15:47pm View
   
"hello world" has no %s in it, so it doesn't NEED printf. There's also a wsprintf func built into win32 api - it doesn't do FULL sprintf formatting, but does ints and the easier stuff.

::MessageBox is a pure win32 api function - no c runtime support needed.
Although argc,v are just param names, there are some funcs that NEED to be linked in from c runtime that turn pure win32 api command line (a long string) into split up strings in argc,v...
stephen.hazel 13-Sep-10 14:23pm View
   
You're right, but printf and argc,argv use by "hello world" actually pull in a lot of code.
(c runtime lib)

My app is the equivalent, but doesn't use argc,argv and doesn't use printf.
Instead it uses ::MessageBox (NULL, "", "Hello WinWorld", MB_OK|MB_ICONINFORMATION);

I don't even use strcmp or memcpy, etc.
I don't use =any= c runtime lib funcs.
But something in my compile/link params is still causing it to be pulled in...:(