When I compile, everything it’s OK, but I’ve this linker error:
[Linker Error] Unresolved external '__fastcall TForm7::KeyEvent(Messages::TWMKey&, bool&)' referenced from D:\DOCUMENTS AND SETTINGS\MATTEO\DESKTOP\PROVALADLL\MYDLL.OBJ
I’ve tried to change the position of the declaration of void __fastcall KeyEvent (I think this is the problem), but I still have errors of this kind.
Anyone can help me, please?
Bye,
Castoro
PS:I’ve forgot to say that the dll should simply return true if the key “Esc” has been pushed (without generating a OnKeyPress event – so using the OnShortCut event of TApplication), else return false in the other cases (generating a OnKeyPress event).
Bye
In unit7.cpp, change this line:
void __fastcall KeyEvent(Messages::TWMKey &Msg, bool &Handled)
to this:
void __fastcall TForm7::KeyEvent(Messages::TWMKey &Msg, bool &Handled)
Yes,this is the error. now my dll is well compiled and linked but still doesn't do what I need. If I use it in a simple program as:
if I push the "Esc" key my dll doesn't respond with the Form7->KeyEvent as should do.
It could be a problem due to the fictitious form (Form7) that I've decided to use??
Is there a way to use an event in a dll without using this fictitious form?
And in this case where I should declare this function in the dll?
Thanks for your help, hoping u will have still some time to dedicate to my problem (and to understand my English,too;-))!
Bye