Restored from previous forum. Originally posted by traumatic.
When i got this right, 'ProcedureDLL AttachProcess()' is used
as the DLL's entry point. AFAIK DLLEntryPoint procedures take
three parameters (handle of instance, notification code, reserved)
AttachProcess() is only called on a newly attached process, so
notification code is obsolete - but no matter how much parameters
I use (1,2,3), my app doesn't get over the entry-point.
It retrieves the hInstance however but doesn't work any further,
no matter if I'm returning #TRUE or nothing.
Using no parameters works fine but is kind of useless. (?)
Any hints on how to use AttachProcess() correctly?
TIA,
traumatic
how to use AttachProcess() ?
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by traumatic.
Thank you for your answer!
So, how do you retrieve the base address of the dll from within the dll without getting hInstance as a parameter?
If there's another solution to this I don't seem to see right now, there's of course no need for parameters, since you already split the 'calling reasons' into four dedicated procedures (and 'reserved' isn't needed/used anyway).
Other than that, I was asking because doing it your way was new to me and quite different to what I was used to.
I never saw code where someone wrote four procedures when one would've been enough...
Thank you for your answer!
So, how do you retrieve the base address of the dll from within the dll without getting hInstance as a parameter?
If there's another solution to this I don't seem to see right now, there's of course no need for parameters, since you already split the 'calling reasons' into four dedicated procedures (and 'reserved' isn't needed/used anyway).
Other than that, I was asking because doing it your way was new to me and quite different to what I was used to.
I never saw code where someone wrote four procedures when one would've been enough...