本人用vc6.0的ATL开发了一个Maprojt.DLL,在Windows98下可以编译(使用debug,和release Minsize)通过,
用客户程序调用,并可以正常运行,但在WINDOWS2000下也可以编译(使用debug,和release Minsize)通过,
用客户程序调用,对于release Minsize模式编译的Maprojt.DLL,可以正常运行;对于debug模式编译的Maprojt.DLL,
却不能正常运行;由于在WIN2K下,使用release Minsize模式编译的Maprojt.DLL时,程序不能稳定运行,使用SmartCheck
调试程序时,告诉Maprojt.DLL中存在错误,因此本人需要编译的debug模式下的Maprojt.DLL,进行调试,但现在
发生了上述错误:在win98 和win2k下均可以正常注册(regsvr32 Maprojt.dll)
用vb写的客户程序,给出的错误信息为:Out of memory;
Dim PtTest As TITLib.Cptor Private Sub Command1_Click()
Dim bRetVal() As Byte
Set PtTest = New TITLib.Cptor '给出的错误信息为:Out of memory
.
.
.
end sub
用vc写的客户程序,给出的错误信息如下所示
void CPtTestDlg::OnOK()
{ // Declare and HRESULT and a pointer to the Simple_ATL interface
HRESULT hr;
ICryptor *Eptor;
char cStrtmp[256];
// Now we will intilize COM
hr = CoInitialize(0);
// Use the SUCCEDED macro and see if we can get a pointer to
// the interface
if (SUCCEEDED(hr))
{
hr = CoCreateInstance(CLSID_CPptor, NULL, CLSCTX_INPROC_SERVER,
IID_IPptor, (void**) &Eptor);
// If we succeeded then set some properties, then call
// the DoPTing method, if it failed then display an
// appropriate message to the user.
if (SUCCEEDED(hr)) //运行到此时,在WIN2K使用debug模式下编译的Maprojt.DLL,则执行else分支,
//在win98下,或Win2k下使用release minsize模式下编译的Maprojt.DLL,
//执行正确的分支
{
.
.
.
}
else
{
MessageBox("CoCreateInstance Failed.");
}
}
// Uninitialize COM
CoUninitialize();
} 请问在WIN98和WIN2K下,ATL COM的编程有何区别,并且对ATL的版本有何要求,或需要什么补丁.
用客户程序调用,并可以正常运行,但在WINDOWS2000下也可以编译(使用debug,和release Minsize)通过,
用客户程序调用,对于release Minsize模式编译的Maprojt.DLL,可以正常运行;对于debug模式编译的Maprojt.DLL,
却不能正常运行;由于在WIN2K下,使用release Minsize模式编译的Maprojt.DLL时,程序不能稳定运行,使用SmartCheck
调试程序时,告诉Maprojt.DLL中存在错误,因此本人需要编译的debug模式下的Maprojt.DLL,进行调试,但现在
发生了上述错误:在win98 和win2k下均可以正常注册(regsvr32 Maprojt.dll)
用vb写的客户程序,给出的错误信息为:Out of memory;
Dim PtTest As TITLib.Cptor Private Sub Command1_Click()
Dim bRetVal() As Byte
Set PtTest = New TITLib.Cptor '给出的错误信息为:Out of memory
.
.
.
end sub
用vc写的客户程序,给出的错误信息如下所示
void CPtTestDlg::OnOK()
{ // Declare and HRESULT and a pointer to the Simple_ATL interface
HRESULT hr;
ICryptor *Eptor;
char cStrtmp[256];
// Now we will intilize COM
hr = CoInitialize(0);
// Use the SUCCEDED macro and see if we can get a pointer to
// the interface
if (SUCCEEDED(hr))
{
hr = CoCreateInstance(CLSID_CPptor, NULL, CLSCTX_INPROC_SERVER,
IID_IPptor, (void**) &Eptor);
// If we succeeded then set some properties, then call
// the DoPTing method, if it failed then display an
// appropriate message to the user.
if (SUCCEEDED(hr)) //运行到此时,在WIN2K使用debug模式下编译的Maprojt.DLL,则执行else分支,
//在win98下,或Win2k下使用release minsize模式下编译的Maprojt.DLL,
//执行正确的分支
{
.
.
.
}
else
{
MessageBox("CoCreateInstance Failed.");
}
}
// Uninitialize COM
CoUninitialize();
} 请问在WIN98和WIN2K下,ATL COM的编程有何区别,并且对ATL的版本有何要求,或需要什么补丁.
解决方案 »
- 乱码查找 C++实现
- 不用web控件,vc如何调用js脚本
- 菜鸟问题:WTL,对话框中重载DefWindowPro()方法,不响应
- 随机生成16位字符对不对
- 手边没有vc6光盘,哪位大侠可以发一份mfc42ud.lib吗?我email: [email protected]
- 初始化CPoint时出错 (新手需要帮忙,望高手们伸出援手)
- 请教,怎么得到一文件是否存在,用FileExists不行啊
- 关于一个动态对象数组的问题?
- 免费试用
- 请问金山词霸2001共享板中的菜单,鼠标选中时那种颜色逐渐渐淡的颜色条是如何实现的?
- 在VC中如何将文本框和Ado Data control 控件关连
- 关于oracle和sqlserver的一个问题,盼解答!
然后在组件管理里将该组件安装起来,再重新打开PP文档,竟然说该控件无法激活??怪哉?请大虾解惑。
hr = CoCreateInstance返回的错误码是什么?
hr = -2147024882
GetLastError() return value is 0
你把内存都吃完了Win2K 的 Pack装了没有
VStudio SP3装了没有