
Signature
Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren@hotmail.com
Remove only "_nos_pam"
Hi Bruno-
My library is a mixed mode, mulit-threaded dll. It was orginally a static
library but I could never get delegates to work using a static library.
Now, I have a new problem I am getting linker errors:
Generating Code...
Compiling managed resources...
Read in 68 resources from 'z:\Development\Project\DLL
Version\Gui\Form1.resX'
Writing resource file... Done.
Compiling resources...
Linking...
LINK : error LNK2020: unresolved token (0600003B) Host.Utils.Xml::Serialize
LINK : error LNK2020: unresolved token (0600003C)
Host.Utils.Xml::Deserialize
LINK : error LNK2020: unresolved token (0600003D) Host.Utils.Xml::Clone
LINK : fatal error LNK1120: 3 unresolved externals
These are my dot net methods (they are not exported) I was able to compile
and link as a static library with no problems - do you think this is a
namespace issue? Or do I need some "special" handling for mixed mode? Thanks
for your help!
I am trying to make my static lib a dll so I can (hopefully) use delegates,
but noted a number of articles showing sending messages to a wndproc and I
am concerned about delegates from worker threads (recall COM connection
points) so I considered using windows messages instead. Can a Form1 default
WndProc be overriddend - i.e.
protected:
void Form1::WndProc(Message* m)
{
switch(m->Msg)
{
default:
WndProc(m);
}
}
This crashes! So I suspect not.
> > Hi -
> > I have a vc++ WinForms app. Can I override the WndProc so I can send
[quoted text clipped - 9 lines]
>
> Or is your library not a .NET class library perhaps?
Bruno van Dooren - 05 Apr 2006 19:01 GMT
> Now, I have a new problem I am getting linker errors:
>
[quoted text clipped - 11 lines]
> LINK : error LNK2020: unresolved token (0600003D) Host.Utils.Xml::Clone
> LINK : fatal error LNK1120: 3 unresolved externals
What is the declaration for those methods?
> protected:
> void Form1::WndProc(Message* m)
[quoted text clipped - 6 lines]
> }
> This crashes! So I suspect not.
It should be possible to override WndProc:
http://www.codeproject.com/useritems/DisableNormalWindowState.asp
Comparing that to your example, I think you need to call base::WndProc
Your code goes into an infinite loop.

Signature
Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren@hotmail.com
Remove only "_nos_pam"