用"Regsvr32.exe"和"TOleRegister"注册“winflic.ocx”不成功(100分)

壹平

Unregistered / Unconfirmed
GUEST, unregistred user!
我用用"Regsvr32.exe"和"OleRegister"注册“ocx”都不成功,都提示类没有注册不知为何请教各位大侠!谢谢了!

用Regsvr32.exe:
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, OleCtrls, WINFLICLib_TLB;

type
TForm1 = class(TForm)
flc: TWinflic;
Button1: TButton;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;


var
Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);
begin

WinExec('Regsvr32.exe /s winflic.ocx', sw_Normal);
form1.SetBounds (0,0,screen.width,screen.height);
button1.SetBounds ((screen.width-button1.width),(screen.height-button1.height),button1.width,button1.height);
end;


procedure TForm1.Button1Click(Sender: TObject);
begin

flc.SetBounds ((screen.width-640) div 2,(screen.height-480) div 2,640,480);
flc.FileName :=('pt.flc');
end;


end.


用TOleRegister:
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
OleCtrls, WINFLICLib_TLB, StdCtrls, ExtCtrls, MPlayer;

type
TForm1 = class(TForm)
flc: TWinflic;


procedure FormCreate(Sender: TObject);

private
{ Private declarations }
public
nextframe:integer;
{ Public declarations }
end;


var
Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);
type
TOleRegister = function : HResult;
var
hLib : THandle;
fnAdr: TFarProc;
Result:BOOLEAN
begin


hLib := LoadLibrary('winflic.ocx');
if (hLib > 0) then

begin

fnAdr := GetProcAddress(hLib, pchar('DllRegisterServer'));
if (fnAdr <> nil) then

begin

Result:=(TOleRegister(fnAdr)>=0);
if (Result) then

MessageBox (0,
'Register Success',
'Warning',
MB_ICONEXCLAMATION or MB_OK);
end;

end;

FreeLibrary(hLib);

form1.SetBounds (0,0,640,480);
flc.SetBounds(0,0,640,480);
flc.filename:='pt.flc';
end;

end.


 
据我个人所知,被注册的东东要放在
windows/system 目录下 (win98)
windows/system32 目录下 (winnt)
 
首先要确定此ocx运行时是否需要其它的动态连接库,
可以利用DLLVIEW或类似工具。
 
lhxu:
我知道用“VB”和“VC”注册“WINFLIC。OCX”都不用放在SYSTEM目录下.
 
lhxu, 不需要放在system下!

壹平: 出错信息是什么? LIUKEEN说的有道理。winflic.ocx是看FLI文件的
控件么?
 
cytown:
出错信息是:
Exception EOleSysError in module USEREGSVR32.exe at 0002c651.
类没注册.
WINFLIC.OCX是专门用来播放“FLC”和“FLI”的文件.
我找不到DELPHI的VCL控件只好用“OCX”,但是“OCX”要注册。太麻烦!
不知道是否有DELPHI的“VCL”??
 
long time..............
 
到那里去找"WINFLIC.OCX",它是如何使用的?急切需要获得相关信息。

因为这对我太重要了。
 

Similar threads

I
回复
0
查看
691
import
I
I
回复
0
查看
601
import
I
S
回复
0
查看
764
SUNSTONE的Delphi笔记
S
I
回复
0
查看
611
import
I
顶部