Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
Fedor  
#1 Posted : Monday, December 29, 2003 9:25:00 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,481

Thanks: 3 times
Was thanked: 40 time(s) in 39 post(s)
Graphics Mill can be used in .NET environment via COM-interoperability as well as any other COM component. The main disadvantage of using COM components in .NET is more difficult deployment of the applications which use them. You need to register COM servers (using regsvr32 utility) instead of simple copying necessary dlls to the bin folder of the application (so-called xcopy principle).

Hopefully Windows 2003 and Windows XP with .NET Framework 1.1 provide a possibility to run COM components using Side-by-Side technique which does not requires registering these COM servers. To be able to instantiate the objects from the COM component, the system must know such information as path to the COM dll, GUIDs, etc. When you register components with regsvr32, this information is stored in registry. Using Side-by-Side technique you can descripe all the necessary data at the special file called manifest. That's why registration becomes unnecessary.

Unfortunately Side-by-Side technique is not supported by older OS and .NET Frameworks. That's why if you plan to deploy the applications to other OS, you should provide an alternative way.

Let's create simple VB.NET application. Just add Graphics Mill controls to the toolbar and drag them to the form. You will get something like this:

UserPostedImage

You can download the source code of this project from attachments.

After you compile the project, Visual Studio will create folder bin. The executable file of the project ComRegFree.exe will be stored here. Put binaries of the Graphics Mill to this folder. After this create and put here manifest file ComRegFree.exe.manifest with this content:

Code:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
	<assemblyIdentity type="win32" 
		name="Aurigma.GraphicsMill.Interop" 
		version="2.0.307.0" 
		processorArchitecture="x86" 
	/>
	<file name="GraphicsMill20.dll">
		<comClass description="Bitmap Class"
			clsid="{97B2E4ED-4614-4750-A19B-4F0C43B2A13E}"
			threadingModel = "Both"
			tlbid = "{3CE48541-DE7A-4909-9314-9D0ED0D1CA5A}"
			progid="GraphicsMill.Bitmap"
		/>
		<comClass description="Color Class"
			clsid="{A7987B55-6430-46AD-AC92-6D4444DF377A}"
			threadingModel = "Both"
			tlbid = "{3CE48541-DE7A-4909-9314-9D0ED0D1CA5A}"
			progid="GraphicsMill.Color"
		/>		
		<comClass description="Graphics Class"
			clsid="{345B96A9-F6F0-47F2-B8E9-04E368A72A27}"
			threadingModel = "Both"
			tlbid = "{3CE48541-DE7A-4909-9314-9D0ED0D1CA5A}"
			progid="GraphicsMill.Graphics"
		/>			
		<comClass description="GraphicsMillAbout Class"
			clsid="{80D6AD5A-15AE-481F-90DC-E57D6DAF2BA7}"
			threadingModel = "Both"
			tlbid = "{3CE48541-DE7A-4909-9314-9D0ED0D1CA5A}"
			progid="GraphicsMill.GraphicsMillAbout"
		/>
		<comClass description="Licensing Class"
			clsid="{0E2B4567-86D3-4D77-8762-BBC1DF4DD8FD}"
			threadingModel = "Both"
			tlbid = "{3CE48541-DE7A-4909-9314-9D0ED0D1CA5A}"
			progid="GraphicsMill.Licensing"
		/>
		<comClass description="MetaData Class"
			clsid="{A2202A3E-B53E-45EB-B66D-C7AC306C6906}"
			threadingModel = "Both"
			tlbid = "{3CE48541-DE7A-4909-9314-9D0ED0D1CA5A}"
			progid="GraphicsMill.MetaData"
		/>
		<comClass description="Palette Class"
			clsid="{7E3F822A-6B95-4B1B-93B4-1F9C99689E28}"
			threadingModel = "Both"
			tlbid = "{3CE48541-DE7A-4909-9314-9D0ED0D1CA5A}"
			progid="GraphicsMill.Palette"
		/>
	</file>	
	<file name="GraphicsMill20MultiImage.dll">
		<comClass description="GifFrame Class"
			clsid="{E99CFA5F-ECF5-46CC-ADDB-A82321368B21}"
			threadingModel = "Both"
			tlbid = "{F2F51692-EC2B-469A-AB2B-D02F840C4A83}"
			progid="GraphicsMillMultiImage.GifFrame"
		/>		
		<comClass description="GifReader Class"
			clsid="{B9045F53-1C67-4D39-897D-40225B7E2B5D}"
			threadingModel = "Both"
			tlbid = "{F2F51692-EC2B-469A-AB2B-D02F840C4A83}"
			progid="GraphicsMillMultiImage.GifReader"
		/>
		<comClass description="GifWriter Class"
			clsid="{075E1EFC-2235-462B-BFC1-322D6793EDE4}"
			threadingModel = "Both"
			tlbid = "{F2F51692-EC2B-469A-AB2B-D02F840C4A83}"
			progid="GraphicsMillMultiImage.GifWriter"
		/>						
	</file>
	<file name="GraphicsMill20Controls.ocx">
		<comClass description="BitmapViewer Class"
			clsid="{C5B6FED0-DEA2-4A82-B585-9B952C959838}"
			threadingModel = "Both"
			tlbid = "{AA01D77C-3860-4CDC-9E4F-D11B1FF5172A}"
			progid="GraphicsMillControls.BitmapViewer"
		/>		
	</file>
	<file name="GraphicsMill20Dialogs.dll">
		<comClass description="ColorDialog Class"
			clsid="{AC261EDF-CD49-47DC-9A9B-1207B8AA68AD}"
			threadingModel = "Both"
			tlbid = "{1912E4D1-2417-4FA4-A1CA-B55F5C881A0C}"
			progid="GraphicsMillDialogs.ColorDialog"
		/>
		<comClass description="FileDialog Class"
			clsid="{057891B4-0512-457E-8061-93B2046003A1}"
			threadingModel = "Both"
			tlbid = "{1912E4D1-2417-4FA4-A1CA-B55F5C881A0C}"
			progid="GraphicsMillDialogs.FileDialog"
		/>				
	</file>
</assembly>


As see, this file contains information what dll implements appropriate Graphics Mill class. This way, if you need to get Graphics Mill working without registration, file structure must be the following:

Code:
ComRegFree.exe
ComRegFree.exe.manifest
GraphicsMill20.dll
GraphicsMill20MultiImage.dll
GraphicsMill20Controls.ocx
GraphicsMill20Dialogs.dll
GraphicsMill20Codecs\GraphicsMill20BaseCodecs.dll


Of course, if you would like to put Graphics Mill binaries to another folder, modify all <file name=> entries of the manifest to point to appropriate path.

Note, the sample project (see link above) does not contain Graphics Mill binaries (to reduce file size). So you should put them by yourself (if you do not have them, download evaluation version).

Now let's check it. Unregister Graphics Mill dlls using regsvr32:

Code:
regsvr32 -u GraphicsMill20.dll
regsvr32 -u GraphicsMill20MultiImage.dll
regsvr32 -u GraphicsMill20Controls.ocx
regsvr32 -u GraphicsMill20Dialogs.dll


and run ComRegFree.exe. It should work as well as if it would be registered.

Unfortunately it is non-trivial to use this technique with ASP.NET applications. Nevertheless we are investigating how to avoid registering in ASP.NET and publish appropriate post here as soon as we will succeed.

If you have any questions/problems with using manifests, or have any improvements, please feel free to post a messages here.

Edited by user Monday, December 21, 2009 3:18:18 AM(UTC)  | Reason: Not specified

File Attachment(s):
GraphicsMill_ComRegFree.zip (172kb) downloaded 67 time(s).
Fedor attached the following image(s):
GraphicsMill_ComRegFree.jpg
Best regards,
Fedor Skvortsov
Fedor  
#2 Posted : Sunday, January 02, 2005 9:45:00 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,481

Thanks: 3 times
Was thanked: 40 time(s) in 39 post(s)
This information in obsolete. Now we have Aurigma Graphics Mill for .NET which is native .NET component.
Best regards,
Fedor Skvortsov
Fedor  
#3 Posted : Sunday, January 02, 2005 9:45:00 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,481

Thanks: 3 times
Was thanked: 40 time(s) in 39 post(s)
This information in obsolete. Now we have Aurigma Graphics Mill for .NET which is native .NET component.
Best regards,
Fedor Skvortsov
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.