[ mnesa @ 04.06.2004. 11:57 ] @
Radim u VS.NET 2003, WinXP SP1. Napravio sam ATL Server projekat (XML Web Service) sa Unicode podrškom. Postavljen je na lokalni IIS i probom iz c#-a sam ustanovio da funkcioniše. Međutim javlja se potreba da klijent bude napisan u ATL-u. Kreiram novi Atl Project, skinem Attributed i postavim Allow Merging proxy/stub code (sve ostalo ostavim po defaultu), i dodam Web Reference na pomenuti Web Service, i u ovom projektu je potrebno dodati podršku za Unicode. Prilikom prvog pozivanja metode iz Web Service-a, prođe build-ovanje, ali prijavi sledeću grešku - WebServiceClient error PRJ0019: A tool returned an error code from "Performing registration". Posle duze analize, i google-ovanja zaključak je da je problem u sledećem: "FreeAddrInfoW and GetAddrInfoW are not exported from ws2_32.dll", i to s obzirom da koristim atlsoap.h, koja include-uje atlsocket.h, a ona ws2tcpip.h gde bi i trebalo da se nalaze ove funkcije. Ovo je registrovan bug od strane Microsofta http://support.microsoft.com/default.aspx?scid=kb;en-us;822334 Moguća rešenja, koja nažalost kod mene nisu proradila su: Citat: http://www.codeproject.com/atl...0&select=651072#xx651072xx Hello, atlsoap.h specifies [ emitidl("restricted") ] which will prevent generation of idl and typelib. So when regsvr32 is called it returns "Error Loading TypeLib". You can do the following in stdafx.h: Code: #include <atlsoap.h> [ emitidl("true") ] Hope that helps Leon Citat: http://www.codeguru.com/forum/...ead.php?s=&threadid=269478 Assuming my ATL project name to be "TestATL" Add following lines to the TestATL.rc file: <1> Add following lines in the TEXTINCLUDE section just before the statement: "#endif // APSTUDIO_INVOKE" (they appear at around Line 33) 3 TEXTINCLUDE BEGIN "1 TYPELIB ""_TestATL.tlb""\r\n" "\0" END <2> Add following line in between "#ifndef APSTUDIO_INVOKED" and "#endif // not APSTUDIO_INVOKED" (they appear at the end of .rc file) 1 TYPELIB "_TestATL.tlb" If by chance you come to know of any other solution, do post it. Cheers, Arun. kao i Citat: http://www.codeproject.com/scr...1&select=745150#xx745150xx Make sure you have included: Ws2tcpip.h and have added Ws2_32.lib to the linker Pomoć potrebna naravno što pre ;) |