Marko Apfel - Afghanistan/Belgium/Germany

Management, Architecture, Programming, QA, Coach, GIS, EAI

  Home  |   Contact  |   Syndication    |   Login
  168 Posts | 2 Stories | 131 Comments | 4 Trackbacks

News



Twitter | LinkedIn | Xing

Article Categories

Archives

Post Categories

BizTalk

C#

Enterprise Library

SAP

SQL Server

Technologie

Interop

Problem this code does not work Type t = typeof(ESRI.ArcGIS.Framewor... System.Object obj = Activator.CreateInstance(t); but yet this code Type t = Type.GetTypeFromCLSID(typeo... System.Object obj = Activator.CreateInstance(t); Reason In the first variant the runtime tries to cast to AppRefClass . This is not possible. And in the second one, the runtime does not knows anything about AppRefClass. So it leave it as IUnknown. (originally communicated ......

Motivation During programming suddenly this error (“Failure has occurred while loading a type”) was thrown by accessing a artifact of a referenced library. In such cases I take the assembly fusion logger fuslogvw to search for problems of loading assemblies. Sometimes an old version from a not expected folder is binded. But all bindings were correct. Problem After several hour I got the right hint. Because the assembly is a COM+ one, there are some registration things in die background – and I don’t ......

During a refactoring i realized that renaming of components, which will be registered for COM-Interop, must be done carefully. In my case i changed the casing of XyzToolbar to XyzToolBar. At the developing machine everything works fine. But after installing the modified stuff at the production machine, the toolbar was not visible. Using regasm with the new assemblies helped. So this was the hint: we use WIX to build the setup. And during setup-development the heat-tool extracted the needed registry-keys. ......

Problemkontext So schön auch das automatische “cleanup code refactoring” von ReSharper ist, im Zusammenhang mit Strukturdefinitionen, die als Übergabe-Parameter für unmanaged Code Aufrufe benötigt werden, lauert eine große Gefahr. Standardmäßig ist im Profil “Full Cleanup” die Option “Reorder type members” auf “Yes” gestellt. Und dann wird aus der originalen Definition: public struct TreeViewItem { public int mask; public IntPtr hItem; public int state; public int stateMask; } ein mit alphebetisch ......

to catch the COM-Exception in own applications thrown from the underlaying ArcObjects-Library could be done with: catch (COMException ComEx) { Console.WriteLine(string.Fo... errored: {0}, Error Code: {1}", ComEx.Message, ComEx.ErrorCode)); } the special error constants could be found under: ArcObjects Library Reference (GeoDatabase) - fdoError Constants ......