请问各位:不使用DCOM的配置工具,如何编程实现DCOM的配置?(50分)

  • 主题发起人 主题发起人 shaoyy
  • 开始时间 开始时间
S

shaoyy

Unregistered / Unconfirmed
GUEST, unregistred user!
各位好!
我做了较长一段时间的三层系统,发现DCOM比Socket要可靠很多,但是DCOM的配置比较麻烦,影响系统的发布,为了使程序发布方便,我想自己写一个程序来自动配置我的中间层DCOM,请问题各位,应如何实现,谢谢!
 
难道大家都没有遇到过这个问题吗?或者是没有解决的方法?
 
看过商业软件,好象是在安装的时候配置的,具体没有试过,可能做安装程序的时候会有向导吧。
 
安装制作程序?是指Installshield吗?
 
自己推一下,不相信没有办法!不然作为三层的商业软件,如何发布?
 
呵,自己解决了,修改注册表。
 
楼主是怎么解决的?
能否介绍点经验?
我也正为这事烦呢,
谢谢了!
 
是啊,也让兄弟听听课!
 
强烈请求楼主公布!!!
 
var
AccPermis: array[0..$67] of byte =
($01,$00,$04,$80,$30,$00,$00,$00,
$4c,$00,$00,$00,$00,$00,$00,$00,
$14,$00,$00,$00,$02,$00,$1C,$00,
$01,$00,$00,$00,$00,$00,$14,$00,
$01,$00,$00,$00,$01,$01,$00,$00,
$00,$00,$00,$01,$00,$00,$00,$00,
$01,$05,$00,$00,$00,$00,$00,$05,
$15,$00,$00,$00,$ED,$36,$0D,$7D,
$87,$1C,$0C,$57,$5F,$52,$93,$7A,
$F4,$01,$00,$00,$01,$05,$00,$00,
$00,$00,$00,$05,$15,$00,$00,$00,
$ED,$36,$0D,$7D,$87,$1C,$0C,$57,
$5F,$52,$93,$7A,$F4,$01,$00,$00);
LaunchPermis: array[0..$67] of byte =
($01,$00,$04,$80,$30,$00,$00,$00,
$4C,$00,$00,$00,$00,$00,$00,$00,
$14,$00,$00,$00,$02,$00,$1C,$00,
$01,$00,$00,$00,$00,$00,$14,$00,
$01,$00,$00,$00,$01,$01,$00,$00,
$00,$00,$00,$01,$00,$00,$00,$00,
$01,$05,$00,$00,$00,$00,$00,$05,
$15,$00,$00,$00,$A0,$5F,$84,$1F,
$5E,$2E,$6B,$49,$CE,$12,$03,$03,
$F4,$01,$00,$00,$01,$05,$00,$00,
$00,$00,$00,$05,$15,$00,$00,$00,
$A0,$5F,$84,$1F,$5E,$2E,$6B,$49,
$CE,$12,$03,$03,$F4,$01,$00,$00);
procedure TForm1.BitBtn1Click(Sender: TObject);
var
r: TRegistry;
begin
r := TRegistry.Create;
r.RootKey := HKEY_CLASSES_ROOT;
r.OpenKey('AppID/{3F750B99-4A63-4CB7-BF47-8853B5C8C5BB}', true);
//这个要看你的中间层的GUID了
r.WriteString('', 'RMDMain Object');
r.WriteBinaryData('AccessPermission', AccPermis[0], $68);
r.WriteInteger('Authen
ticationLevel', 1);
r.WriteBinaryData('LaunchPermission', LaunchPermis[0], $68);
// r.WriteString('RemoteServerName', 'workgroup');
r.WriteString('RunAs', 'Interactive User');
r.CloseKey;
r.Free;
WinExec('net user txpos_user /add /passwordchg:no /passwordreq:no /expires:never /active:yes', sw_hide);
end;
 

Similar threads

后退
顶部