From: Johan Stäck on 22 Feb 2010 04:41 Hello, I have this rather "hairy" VB6 program that depends on quite a few external components. I have now successfully used "Make My Manifest" to produce a manifest file, so that I no longer need to run a "proper" install. Just copy a folder with everything needed to the target machine. However, since the app uses a vwf codec, I still have to ensure that this codec is installed on the target machine. Is there a way to include the codec in the manifest file, and have a 100% xcopy deployment? I assume that the "real" problem here is that I the fourcc code of the codec needs to be in the registry. /tia Johan St�ck Stockholm Sweden
From: Dee Earley on 22 Feb 2010 06:23 On 22/02/2010 09:41, Johan St�ck wrote: > Hello, > > I have this rather "hairy" VB6 program that depends on quite a few > external components. > > I have now successfully used "Make My Manifest" to produce a manifest > file, so that I no longer need to run a "proper" install. > Just copy a folder with everything needed to the target machine. > However, since the app uses a vwf codec, I still have to ensure that > this codec is installed on the target machine. > > Is there a way to include the codec in the manifest file, and have a > 100% xcopy deployment? > > I assume that the "real" problem here is that I the fourcc code of the > codec needs to be in the registry. And the fact that you may not be able to distribute said DLL (and it's dependencies) -- Dee Earley (dee.earley(a)icode.co.uk) i-Catcher Development Team iCode Systems
From: Schmidt on 22 Feb 2010 06:43 "Johan St�ck" <johan(a)stack.se> schrieb im Newsbeitrag news:7uf1qjFn6hU1(a)mid.individual.net... > Hello, > > I have this rather "hairy" VB6 program that depends > on quite a few external components. > > I have now successfully used "Make My Manifest" to > produce a manifest file, so that I no longer need to run a > "proper" install. > Just copy a folder with everything needed to the target > machine. > However, since the app uses a vwf codec, I still have to > ensure that this codec is installed on the target machine. > > Is there a way to include the codec in the manifest file, and > have a 100% xcopy deployment? Not that I knew... But there's another solution for that, which requires some efforts though. > I assume that the "real" problem here is that I the fourcc > code of the codec needs to be in the registry. Normally yes. But you can workaround that, by decoding your Frames (I assume you want to decode them from within an *.avi-File) ... by using the OpenDriver- and the ICM (Installable Compression Manager-APIs). Please read about the ICM (online) per MSDN. The ICM-API is hosted within "msvfw.dll" - and a dynamic codec-install can be forced over the OpenDriver- and GetDriverModuleHandle-Calls, which are hosted within "winmm.dll". Here's the "basic-sequence", how to proceed... (not "out-of-the-box" working-code ... only the principle) Public FourCC As Long FourCC = Make4CC("abcd") '<- put your codec-FourCC here 'place "YourCodec.dll" in the App.Path, to make the call succeed hDrv = OpenDriver(StrPtr("YourCodec.dll"), 0, 0) If hDrv Then hMod = GetDriverModuleHandle(hDrv) If hMod Then Addr = GetProcAddress(hMod, "DriverProc") If Addr Then Call ICInstall(Make4CC("vidc"), FourCC, Addr, 0, ICINSTALL_FUNCTION) 'now the Decoder should be available within your Process-Space 'so, you can open the Decoder for decompression now... hDec = ICOpen(Make4CC("vidc"), FourCC, 2) '2=Decomp If hDec Then Public defined: BIComp as BitMapInfoHeader Public defined: BiDec as BitMapInfoHeader '...now populate all the BIComp- and BiDec-members accordingly '...and don't forget to Set the BIComp.biCompression-Member BIComp.biCompression = FourCC 'now prepare the ICM for continous Decompression If ICSendMessage(hDec, _ ICM_DECOMPRESS_Begin, BICom, BIDec) = 0 Then 'success, Decoder is opened... 'you can now subsequently use the ICSendMessage 'Calls, to decode compressed ByteBuffers into DIB-memory 'the compr. ByteBuffers can be retrieved over normal AVI-File- 'readout-Calls (without defining a FourCC in the AviFile- 'opening-sequences - just open your AVI for subsequent 'readout in "anonymous mode" (plain compressed ByteChunks) End If Here's the principle of the just mentioned (ICSendMessage- based) FrameDecoding-Routine: BiComp and BiDec are defined globally... SrcBuff and DstBuff are Pointers to the start of preallocated (large enough) ByteArrays (DstBuf gets the DIB-Content). SrcBuf and the CompressedLen (SrcBytes) was readout beforehand with the above mentioned "anonymous" Avi- Frame-Content-Readout... Sub DecompressBuffer32(ByVal SrcBuff As Long,ByVal SrcBytes As Long, _ ByVal DstBuff As Long) Dim ICD As ICDecompress If SrcBuff = 0 Or DstBuff = 0 Or SrcBytes = 0 Then Exit Sub On Error Resume Next BIComp.biSizeImage = SrcBytes BIComp.biWidth = 640 BIComp.biHeight = 480 BIDec.biBitCount = 32 BIDec.biCompression = 0 'RGB BIDec.biWidth = 640 BIDec.biHeight = 480 ICD.lpbiInput = VarPtr(BIComp) ICD.lpInput = SrcBuff ICD.lpbiOutput = VarPtr(BIDec) ICD.lpOutput = DstBuff + EvenOdd * dx * 4 ICSendMessage hDec, ICM_DECOMPRESS, ICD, ByVal Len(ICD) If Err.Number = 0 Then 'success End If End Sub I leave all the Cleanup-Functions (as e.g. CloseDriver or ICClose) up to you... ;-) The principle works for me (without registering) even on Vista and Win7 - at least for the MJPG-codecs which I'm dealing with here at work. Olaf
From: Schmidt on 22 Feb 2010 06:58 "Dee Earley" <dee.earley(a)icode.co.uk> schrieb im Newsbeitrag news:uSqtuF7sKHA.4860(a)TK2MSFTNGP05.phx.gbl... > > I assume that the "real" problem here is that I the fourcc > > code of the codec needs to be in the registry. > > And the fact that you may not be able to distribute > said DLL (and it's dependencies)... Many (simpler) codecs come in a single Dll. And the deploy-rights depend on the codec-vendor (but there are also some open-source-codecs for the simpler encoding-schemes). Sometimes the rights depend also on, if for example only the decompress-direction is needed. And then there are 3rd-party vendors who offer(ed) their codecs for purchase - I've bought some codecs some years ago from LeadTools and from MainConcept. Olaf
From: Johan Stäck on 22 Feb 2010 07:19 Schmidt wrote: > Normally yes. > But you can workaround that, by decoding your > Frames (I assume you want to decode them from <snip> > > > Olaf > > Olaf! That is a great idea, which I will follow up... The actual problem here is decomp only of DV frames. I have been working with all the easily available (and some not so easily availible....) DV codecs. My normal procedure is to call DrawDibDraw which (given the right parameters) will decode the frame into a CDibsection for further processing. Thanks for the tip! /Johan
|
Next
|
Last
Pages: 1 2 Prev: Use Registry ? Next: I am starting to prefer comboboxes than textboxes |