I was wondering if it was possible to export a variable from an application i am writing, and then use that exported variable in a dll as its initialisation value?!

i.e. I would like the dll's HWND to be set to the App's HWND.

I already use a initdll function to set it but it give me probs as it keeps reseting itself to null when the mouse cursor leaves the window, so i thought if i set the initialisation to the app's HWND in the first place then even if it resets itself it will be the apps HWND anyway.

Any suggestions?!

Cheers in advance

Andy