flat assembler
Message board for the users of flat assembler.

Index > Windows > I want pass addr through CreateProcess to second exe file.

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1847
Roman 21 Oct 2018, 11:35
I have two window programs. Not console.

I run my first window exe. In first exe i have big binary data. Its 100 float values.
My first exe through CreateProcess launch another window exe.

I want pass big 100 float values or address this data to second exe.
And second exe using this 100 float values and change these values.
It's possible ?

And how to do it right ?

I know one way. Its use dll and send address to dll function.
Post 21 Oct 2018, 11:35
View user's profile Send private message Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 1228
Location: Belarus
DimonSoft 21 Oct 2018, 17:51
You can use shared memory for that with proper synchronization. CreateFileMapping and MapViewOfFile is the point to start. Using sockets or pipes is also a way to go, and may even be a simpler solution depending on the task and the usage pattern.

I guess you know that but I’ll write it, just in case. Note that addresses are only meaningful within a process. Copying address value to another process has no sense.
Post 21 Oct 2018, 17:51
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1847
Roman 22 Oct 2018, 06:47
DimonSoft thanks !

Windows its somthing ! Smile

Instead of one variable in CreateProcess, write two win api functions ! Hardcore !
Post 22 Oct 2018, 06:47
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.