CopyLocal Mystery in Man C++
-
Hi, I had posted this earlier here, but got no response. I am trying my luck again (by changing the Subject Line...;)) I have a User Control (created using Man C++) When I try to place this Control on a form, the Form Designer throws an Exception( 0x80131019). And I am not allowed to place the control on the form. This happens when the CopyLocal Property of the Reference is True. But if I change the CopyLocal property to False, the Designer wholeheartedly accepts the Conrtrol. The Form Designer doesnt behave this way with controls made using C# or VB.Net. Can someone please tell me what difference does CopyLocal property make to the Form Designer ? Why does this happen only with Controls created in Managed Cpp? My control does nothing extraordinary, but just some Drawings in the OnPaint(). Please, somebody Help me..... Thanks, Firoz
-
Hi, I had posted this earlier here, but got no response. I am trying my luck again (by changing the Subject Line...;)) I have a User Control (created using Man C++) When I try to place this Control on a form, the Form Designer throws an Exception( 0x80131019). And I am not allowed to place the control on the form. This happens when the CopyLocal Property of the Reference is True. But if I change the CopyLocal property to False, the Designer wholeheartedly accepts the Conrtrol. The Form Designer doesnt behave this way with controls made using C# or VB.Net. Can someone please tell me what difference does CopyLocal property make to the Form Designer ? Why does this happen only with Controls created in Managed Cpp? My control does nothing extraordinary, but just some Drawings in the OnPaint(). Please, somebody Help me..... Thanks, Firoz
This is a known problem and will hopefull be corrected in 7.1 Regards, Nish
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
-
Hi, I had posted this earlier here, but got no response. I am trying my luck again (by changing the Subject Line...;)) I have a User Control (created using Man C++) When I try to place this Control on a form, the Form Designer throws an Exception( 0x80131019). And I am not allowed to place the control on the form. This happens when the CopyLocal Property of the Reference is True. But if I change the CopyLocal property to False, the Designer wholeheartedly accepts the Conrtrol. The Form Designer doesnt behave this way with controls made using C# or VB.Net. Can someone please tell me what difference does CopyLocal property make to the Form Designer ? Why does this happen only with Controls created in Managed Cpp? My control does nothing extraordinary, but just some Drawings in the OnPaint(). Please, somebody Help me..... Thanks, Firoz
Your assembly needs to be registered in the GAC. To do this it first needs a "strong name", sort of like a GUID. Use SN.exe to generate a strong-name key file. In your AssemblyInfo.cpp file, specify the key file as a parameter to the AssemblyKeyFileAttribute() attribute. Rebuild your assembly. Now use Gacutil.exe to register the assembly in the GAC. This step can be done in a custom-build-step if desired. This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.