I think in the first code I got me brains stuck between the structures and I made a huge mess there. The correctly initialized descriptor is made like in the second code.
I'm trying now to see if you can OpenFileMapping_() and use it. If not, everything is in vain.
Best way for inter-process communication
Oh my God!
It works!
Man I'm soooo happy I could kiss you all!
Tested with XP sp2 home edition. I ran the service from an admin account, logged off and ran the other user mode app on a limited acc. and it worked. The message was sent. I don't have Vista and I won't bother to get a pirated copy
. It doesn't deserve to run my code, so if anyone would please test it and tell me if it works i'd be very greatfull.
It works!
Man I'm soooo happy I could kiss you all!

Code: Select all
Structure StringIPC
s.s{#MAX_PATH}
EndStructure
;*m_MapHandle = CreateFileMapping_(#INVALID_HANDLE_VALUE, @sa, #PAGE_READWRITE, 0, SizeOf(StringIPC),"map")
;*ptr.StringIPC = MapViewOfFile_(*m_MapHandle,#FILE_MAP_ALL_ACCESS,0,0,0)
*m_MapHandle = OpenFileMapping_($FFFFFF, 0,"map")
*ptr.StringIPC = MapViewOfFile_(*m_MapHandle,#FILE_MAP_ALL_ACCESS,0,0,0)
Debug GetLastError_() ;will say '0' - ok
*ptr\s = "Alex"

None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)

I don't swing no way lately...
PB * is my girlfriend and I think it'll stay that way for a long time...
With jokes aside, I'm as straight as a man can be. But today it's been a great day for me. Every little thing went just fine and that's really odd

* Disambiguation: PB = PureBasic
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)