News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

public/extern

Started by shankle, August 04, 2011, 09:06:13 PM

Previous topic - Next topic

shankle

Thanks guys for your suggestions.
I've already wasted a day playing with this. It's just not worth the hassle.
I'll try another way to skin the cat.
Create a file. Put the data I want to transfer in it.
Read it in the other program and I am done.
No hassle. No problems with the linker and less confusion.
That should end this thread.
The greatest crime in my country is our Congress

GregL

Quote from: Shankleinvoke exitprocess, nullĀ  ;This should take me to progb.
No, it should not. It should exit your program. You need to read up on modules. If you link two programs together they become two modules in one program. You can only have one entry point and one exit point.

The advantage of EXTERNDEF is that it can be put into an include file and it will act as either PUBLIC or EXTERN, as required, depending on which module it is included in. Otherwise PUBLIC and EXTERN work just as well.

Quote from: dedndaveyou could use EXTERNDEF, but then you have to decorate the PROC names with "_"
I have never had to decorate the PROC names with an underscrore, I don't think that's the case.

dedndave

sounds to me like CreateProcess would be usable, here
you want ProgramA to run ProgramB
another way to go is to create a thread - not sure that's what you want
creating a thread may sound scary, but it's even simpler than CreateProcess, in many ways