Is this a major bug in VC 7 with /CLR

  • Thread starter Morten Overgaard
  • Start date
M

Morten Overgaard

Situation is as follows

1) Create Active Document Container WITHOUT support for CLR
2) Create Active Document Server WITH support for CLR (/clr)
3) Add Button to Active Document Server Dialog resource
4) Add OnClick event handler to button
5) In the event Handler add the following

void CMFCServerView::OnBnClickedButton1()

{

AfxMessageBox("Test Message", MB_OK,0);

}


6) Insert the Active Documenet Server in the Container ( Through Edit|
Insert Object ) and Press the button
7) This produces an System.NullReference Exception??????? Why??

My company are developing an MFC 7.1 Active Document Server which needs to
be hosted in an Container App ( Developed by another company ). Our app uses
/CLR and the container does not - can this be fixed????

Regards Morten.
 
G

Gary Chang [MSFT]

Hi Morten,

I think you have already at work ;=)

According to the steps in your post, I test the ActiveX Document
Server(with /clr) both in the ActiveX Document containers generated by
VC++7.1 and VC++6.0, it works fine. I add the button in the Server's About
DialogBox, is there correct?

So maybe the error stays anywhere else?


Best regards,
Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
M

Morten Overgaard

I just added the button on the main form.

I can send you a little project that shows the error?

regards Morten
 
M

Morten Overgaard

Hi Gary

Can you please send me the project that you have developed - I would like to
see it work with my own eyes :)

Regards Morten
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top