几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】compiling error in exhostappservices.cpp using unicode (http://www.dimcax.com/hust/showthread.php?t=15446)

yang686526 2009-05-04 06:02 PM

【转帖】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


所有的时间均为北京时间。 现在的时间是 12:01 AM.