高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】compiling error in exhostappservices.cpp using unicode
compiling error in exhostappservices.cpp using unicode?
compiling error in exhostappservices.cpp using unicode?
for application using dwgdirect 2.1 in vc6.0, when we set unicode for the project, there will be a compiling error in the .cpp file, "exhostappservices.cpp", which is included in the dwgdirect pack(see below):
compiling...
exhostappservices.cpp
d:\dwgdirect2.10_vc6\ddnonlibs\extensions\exservic es\exhostappservices.cpp(286) : error c2664: 'regenumvaluea' : cannot convert parameter 3 from 'unsigned short *' to 'char *'
types pointed to are unrelated; conversion requires reinterpret_cast, c-style cast or function-style cast
error executing cl.exe.
this error is due to the following code segment(to read a system register item) in the member function "ttffilenamebydescriptor(const odttfdescriptor& descr, odstring& filename)":
tchar* lpvalname = new tchar[nvalnamesize];
lpbyte lpdata = new byte[ndatasize];
nres = ::regenumvalue(hfonts, nindex, lpvalname, &nvalnamesize, null, null, lpdata, &ndatasize);
we note that windows versions of dwgdirect are unconditionally unicode, why does this happen?
then, how to resolve it?
last edited by ideeinfo; 2nd november 2006 at 06:54 pmfff">.
perhaps you did define only _unicode or unicode.
both these symbols should be defined.
vladimir
|