Solved

LOAD AVI FROM DLL IN TANIMATION

Posted on 2004-03-23
6
371 Views
Last Modified: 2010-04-05

I use this code to load avi from dll in Tanimation (A1)
but I recieve error 'can not open avi'.

//*********************************
DLLHANDLE := LoadLibrary('resdll.dll');

  with A1 do
  try
     try
        ResHandle := DLLHANDLE;
     finally

        ResName := 'myavi';
     end;
  finally
  StartFrame := 25;
  StopFrame :=61;

  end;
//****************************
0
Comment
Question by:sal1150
  • 3
  • 2
6 Comments
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 10656764
TAnimate can only open uncompressed AVI and/or those compressed using RLE. If your AVI in the DLL is compressed using some other codec, TAnimate won't work
0
 

Author Comment

by:sal1150
ID: 10657540
my AVI in the DLL is not compressed
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 10659003
erm... make sure the spelling is correct? It is case-sensitive.
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 15

Accepted Solution

by:
simonet earned 250 total points
ID: 10659461


I have written an example on how to do it:

http://www.bhnet.com.br/~simonet/howtoprojs.htm
(check the sample app "How to create and use resource-only DLLs". the techniques described are exactly what you want).

Yours,

Alex
0
 

Author Comment

by:sal1150
ID: 10662688
hi simonet
I test ur example but u do not solve the problem which happen when u tray to play avi.
this is ur mark and the code:-

  // Always check if the module is loaded before
  // Trying to access it.
  if ResDLLMod=0 then exit;
  // Ok, the routine below looks like a real mess.
  // The problem is that this TAnimate component is anything but a
  // friendly guy.
  // There are ways to improve the routine below, but I just don't have
  // the patience right now.
  try
  with Animate1 do
  try
     try
        ResHandle := ResDLLMod;
     finally
        ResName := 'BORLANDCOOL';
     end;
  finally
     Play(1, FrameCount, 0);
  end;
  except
//
  end;
end;

0
 

Author Comment

by:sal1150
ID: 10662792
spelling is correct.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question