请问我怎样才能才另一台计算机上注册一个mstts.dll文件呢?(这个文件属于active x类型com组件,不知道这样表述对不对),我用c#.net(应该和mfc差不多吧.)开发了一个软件,用到了微软的tts语音库,需要正确注册这个文件,怎样才能做到呢?我曾经试过用regsvr32 C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mstts.dll,但是他提示说:"已加载C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mstts.dll,但是没有找到DllRegisterServer输入点.无法注册这个文件."谢谢.

解决方案 »

  1.   

    没有DllRegisterServer是无法注册的。你用Depends看看他有没有这个函数入口
      

  2.   

    如果有类似的函数,你就手动注册。
    HMODULE hModule = LoadLibrary("C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mstts.dll");
    if(hModule != NULL)
    {
    FARPROC pFarProc = GetProcAddress(hModule,"//那个疑似注册函数的函数名称");
    (*pFarProc)();
    }
      

  3.   

    能具体讲一下吗?
    我这里有一个ini文件。应该和注册有关吧,但是不知道怎么做。
    [Version]
    Signature="$Chicago$"
    AdvancedINF=2.5,"You need a new version of advpack.dll"[SourceDisksNames]
    1=%AppName%,,1[DefaultInstall]
    CustomDestination=MyCustomDestination
    Copyfiles=TTSFiles,InfSection
    AddReg=TTSReg
    DelFiles=DelOldTTSFiles[DefaultInstall.NT]
    CustomDestination=MyCustomDestination
    Copyfiles=TTSFiles,InfSection
    AddReg=TTSReg
    DelFiles=DelOldTTSFiles[MyCustomDestination]
    49010=ProgramFilesDestination,21
    49000,49001,49002,49003=PackageDestination49000,5[UninstallDestination]
    49010=ProgramFilesDestination,5
    49000=PackageDestination49000,5[ProgramFilesDestination]
    HKLM,software\microsoft\windows\currentversion,CommonFilesDir,"%InstallPrompt%","c:\program files\common files"[PackageDestination49000]
    HKLM,Software\Microsoft\MSTTS,InstallDir,"%InstallPrompt%","%49010%\%DefaultDir%"[Uninstall]
    BeginPrompt=BeginPromptSection
    EndPrompt=EndPromptSection
    CustomDestination=UninstallDestination
    DelFiles=TTSFiles,TTSFiles2
    Deldirs=RemoveFolder
    DelReg=DelRegSection
    SmartReboot=I
    Cleanup=1[Uninstall.Quiet]
    CustomDestination=UninstallDestination
    DelFiles=TTSFiles,TTSFiles2
    Deldirs=RemoveFolder
    DelReg=DelRegSection
    SmartReboot=I
    Cleanup=1[DestinationDirs]
    TTSFiles=49000
    TTSFiles2=49000
    InfSection=17
    DelOldTTSFiles=49000[TTSFiles]
    msttssyn.dll
    female.vce
    male.vce
    female8.vce
    male8.vce
    female.cfg
    male.cfg
    female8.cfg
    male8.cfg[TTSFiles2]
    freddy.vce
    brutus.vce
    malew.vce
    femalew.vce[DelOldTTSFiles]
    .vce
    melanie.vce
    8.vce
    melanie8.vce[InfSection]
    msTTS.inf[RemoveFolder]
    %49000%
    [TTSReg]
    HKLM,Software\Voice\TextToSpeech\Engine,MSTTSSyn,,{E0725551-286F-11d0-8E73-00A0C9083363}
    HKCR,CLSID\{E0725551-286F-11d0-8E73-00A0C9083363},,,"Microsoft TTS Engine"
    HKCR,CLSID\{E0725551-286F-11d0-8E73-00A0C9083363}\InprocServer32,,,"%49000%\MSTTSSYN.dll"
    HKCR,CLSID\{E0725551-286F-11d0-8E73-00A0C9083363}\InprocServer32,ThreadingModel,,Apartment
    ; use the following reg edit to see which version installed for ActiveX downloads
    HKCR,CLSID\{161FA781-A52C-11d0-8D7C-00A0C9034A7E},,,"Downloadable Whistler 3.0"
    HKCR,CLSID\{161FA781-A52C-11d0-8D7C-00A0C9034A7E}\Control,,,
    HKCR,CLSID\{161FA781-A52C-11d0-8D7C-00A0C9034A7E}\InprocServer32,,,"%49000%\wraptts.dll"
    HKCR,CLSID\{161FA781-A52C-11d0-8D7C-00A0C9034A7E}\InprocServer32,ThreadingModel,,Apartment
    HKCR,CLSID\{161FA781-A52C-11d0-8D7C-00A0C9034A7E}\MiscStatus,,,"0"
    HKCR,CLSID\{161FA781-A52C-11d0-8D7C-00A0C9034A7E}\MiscStatus\1,,,"0132497"
    ; for uninstall
    HKLM,Software\Microsoft\MSTTS,InstallDir,,"%49000%"
    HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\MSTTS,"DisplayName",,"%AppName%
    HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\MSTTS,"UninstallString",,"RunDll32 advpack.dll,LaunchINFSection %17%\msTTS.inf, Uninstall"[DelRegSection]
    HKCU,Software\Microsoft\Whisper
    HKLM,Software\Voice\TextToSpeech\Engine,MSTTSSyn
    HKCR,CLSID\{E0725551-286F-11d0-8E73-00A0C9083363}
    HKCR,CLSID\{161FA782-A52C-11d0-8D7C-00A0C9034A7E}; uninstall
    HKLM,Software\Microsoft\Windows\CurrentVersion\Uninstall\MSTTS
    HKLM,Software\Microsoft\MSTTS[BeginPromptSection]
    Prompt=%BeginPrompt%
    ButtonType=YESNO
    Title=%AppName%[EndPromptSection]
    Prompt=%EndPrompt%[Strings]
    AppName="Microsoft Text-to-Speech Engine"
    BeginPrompt="Are you sure you want to remove the Microsoft text-to-speech engine? It may prevent text-to-speech from working."
    EndPrompt="Uninstall complete."
    DefaultDir="microsoft shared\SpeechEngines\TTS"
      

  4.   

    是INF吧。鼠标右键然后选择安装
      

  5.   

    C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mstts.dll
    是 .NET 组件,不是active x类型com组件。所以不能用regsvr32注册。、我不知道 .NET 有没有提供注册 .NET 组件的程序。
    目前我知道的解决方法就是在你的目标机上安装一次微软tts语音库。