新版本GCloudVoice 1.1.24
32位GCloudVoice.dll
在Win7下正常
但是在XP下导致程序无法启动(老版本1.1.12一切正常)
DllNotFoundException: GCloudVoice
at (wrapper managed-to-native) gcloud_voice.GCloudVoiceEngine:GCloudVoice_CreateInstance ()
at gcloud_voice.GCloudVoiceEngine..ctor () [0x00000] in <filename unknown>:0
at gcloud_voice.GCloudVoice.GetEngine () [0x00000] in <filename unknown>:0
at MainScene.Start () [0x00000] in <filename unknown>:0
C++接口弹框提示:无法定位程序输入点 inet_ntop 于动态链接库 ws2_32.dll 上
百度后结论,此版本GCloudVoice.dll调用了Vista才开始支持的inet_ntop导出函数,可能是为了方便支持IPv6
所以XP肯定创建失败,
解决方法:
try{
m_voiceengine = GCloudVoice.GetEngine ();
}catch(Exception ex){
m_voiceengine = new GCloudVoiceDummy ();//这是自己写的对IGCloudVoice接口做完全空的实现
}