|
I created a simple ATL web service with VC++ 7.1 by following the sample in MSDN and put it in IIS 5.1 on my local PC. But the web service doesn't work. If I tried to access it through IE, it either displayed "not found" page, or asked me to save the DLL itself on my PC. The same error occurred when I created an ATL web service client and tried to access the web service.
Could any one help me with this issue? Thanks.
|
|
|
|
|
xizuo wrote:
or asked me to save the DLL itself on my PC
Sounds like you don't have the service configured correctly on IIS. But that is just a wild guess
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
folks,
i've got a composite activex component implemented with atl. in said component, i have a property fileName. i am hosting this control in IE. when the fileName property is being set using the <PARAM> tag, my put_fileName accessor is not getting invoked (i know for sure, i've got a messagebox in there =). however, when the same property is being set using javascript in an onClick of a button on the same page, the accessor gets invoked and all works fine.
i am stumped. any ideas?
paul
|
|
|
|
|
HAve you added a property map entry in this thing:
BEGIN_PROP_MAP(CYourControl)
PROP_DATA_ENTRY("_cx", m_sizeExtent.cx, VT_UI4)
PROP_DATA_ENTRY("_cy", m_sizeExtent.cy, VT_UI4)
PROP_ENTRY("HREF", 0, CLSID_NULL)
...
END_PROP_MAP()
Your control will not know what to do with that param tag unless you have specified your property in this map.
Good Luck
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
yep, have it there and still no dice.
-----
BEGIN_PROP_MAP(CMyClass)
PROP_DATA_ENTRY("_cx", m_sizeExtent.cx, VT_UI4)
PROP_DATA_ENTRY("_cy", m_sizeExtent.cy, VT_UI4)
PROP_DATA_ENTRY("fileName", m_fileName, VT_BSTR)
PROP_ENTRY("AutoSize", DISPID_AUTOSIZE, CLSID_NULL)
// Example entries
// PROP_ENTRY("Property Description", dispid, clsid)
// PROP_PAGE(CLSID_StockColorPage)
END_PROP_MAP()
-----
also, how would setting the property *through script* work and through <param> not work if this were missing?
thanks for your help though, any more ideas?
paul
|
|
|
|
|
|
thank you! i'll go implement that and report back with the (hopefully positive) result. now *why* have i not been able to find any mention of this while RTFMing? aargh =]
paul
|
|
|
|
|
ok, this worked (somewhat). the plan was to grab the properties i'm interested in from the propertybag and call the property setters (which in turn call the property setters for the controls i'm hosting).
the problem is that neither the hosted controls' nor even my window exist at this point. i got around this by setting a timer, calling the property setters in the timer callback and checking IsWindow() in the property setters. this works fine, albeit at the expense of messy code (some global variable nastiness).
is there a better way of doing this?
paul
|
|
|
|
|
Sample...
MixedWindow Compile Error... Help Me~
ImageList_Read, ImageList_Write.. =.=;;
--------------------Configuration: MixedWindow - Win32 Debug--------------------
Compiling...
StdAfx.cpp
c:\program files\wtl71\include\atlctrls.h(1832) : error C2065: 'ImageList_Read' : undeclared identifier
c:\program files\wtl71\include\atlctrls.h(1832) : error C2440: '=' : cannot convert from 'int' to 'struct _IMAGELIST *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
c:\program files\wtl71\include\atlctrls.h(1943) : error C2065: 'ImageList_Write' : undeclared identifier
Error executing cl.exe.
MixedWindow.exe - 3 error(s), 0 warning(s)
-----------------
StdAfx.h
omission.... "<", ">"
-----------------
/ Add support for ATL/WTL
#define _WTL_NO_AUTOMATIC_NAMESPACE
#include atlbase.h
#include atlapp.h
extern WTL::CAppModule _Module;
#include atlwin.h
#include atlscrl.h
#include atlmisc.h
#include atlctrls.h
#include atlctrlx.h
#include atlddx.h
...
|
|
|
|
|
ImageList_Read[^] and ImageList_Write[^] are both defined in commctrl.h
You will need to ensure that the file is included before atlctrls.h
#include <commctrl.h><br />
#include <atlctrls.h>
Michael
CP Blog [^]
|
|
|
|
|
Thank you...
But...
#include atlmisc.h
#include commctrl.h
#include atlctrls.h
#include atlctrlx.h
#include atlddx.h
Same Error... ㅠ.ㅜ..
--------------------Configuration: MixedWindow - Win32 Debug--------------------
Compiling...
StdAfx.cpp
c:\program files\wtl71\include\atlctrls.h(1832) : error C2065: 'ImageList_Read' : undeclared identifier
c:\program files\wtl71\include\atlctrls.h(1832) : error C2440: '=' : cannot convert from 'int' to 'struct _IMAGELIST *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
c:\program files\wtl71\include\atlctrls.h(1943) : error C2065: 'ImageList_Write' : undeclared identifier
Error executing cl.exe.
MixedWindow.exe - 3 error(s), 0 warning(s)
|
|
|
|
|
I've done a bit of a google for the problem and it seems to be a common issue.
try
#define VC_EXTRALEAN
#define WIN32_LEAN_AND_MEAN
#include <objidl.h>
#include <commctrl.h>
before the atl includes.
Michael
CP Blog [^]
|
|
|
|
|
Hmmm.. can't it be a too low value on #define WIN32_VERSION (or whatever that define is called)?
--
Ich bin Joachim von Hassel, und ich bin Pilot der Bundeswehr.
Welle: Erdball - F104-G Starfighter
|
|
|
|
|
Jörgen Sigvardsson wrote:
Hmmm.. can't it be a too low value on #define WIN32_VERSION (or whatever that define is called)?
Having look through the commctrl.h header, it doesn't appear to be a factor. But then Microsoft Headers aren't the best layed out in the world.
I may have a play when I'm on a machine with WTL installed, but I've not had this problem in the past.
Michael
CP Blog [^]
|
|
|
|
|
The problem is (obviously) that ImageList_Read and ImageList_Write are not defined. The reason they're not defined because __IStream_INTERFACE_DEFINED__ is not defined. This is not defined because ObjIdl.h is not included.
ObjIdl.h contains definitions for IStream, which is what the ImageLists are serialised to/from.
There may be some issues with the point at which you include the file, and you may have to a #undef _INC_WINDOWS at some point. There are foggy wisps of memory regarding this, but I'm not sure if it applies to this problem.
Hope this helps,
Phil
--
All things considered, you can't really consider all things ...
|
|
|
|
|
Hi,
1. I have to create a CStatic text and I need it to be without background. How can I do it? Can u write a sample code as simple as you can, please?
2. I have to create a CStatic icon (bitmap) and I need it to be without background. How can I do it? Can u write a sample code as simple as you can, please?
Answer this as fast as you can
Thank you veeeeeeeeeerrrrrrrrrrrryyyyyyyyyyy much
Greatfull,
Ajnstajn
|
|
|
|
|
Bad forum!
Best regards,
Alexandru Savescu
P.S. Interested in art? Visit this!
|
|
|
|
|
How can I make my app just multiple dialogs instead of just the one that is defined in enum { IDD = * } ?
I want to make it so that the window (the displayed dialog ) changes when you press a button in the toolbar....
Any help is very welcome
|
|
|
|
|
You'll need to create a seperate CDialogImpl derived class for each dialog and then call them using the DoModal function, or hide the current window and show the new dialog.
Michael
CP Blog [^]
|
|
|
|
|
Please help me.
Let's say we have an COM interface IAppInterface from another application named App.
What I want to do is to create my COM class and implements the IAppInterface.
So I created a new ATL project MyObject, added a simple ATL object, and chose "Implement interface" from the menu.
But after building this project, I cannot see IAppInterface from MyObject. What's wrong?
I know I should do some thing in the .idl file. What should I do?
By the way, I'm using Visual Studio .NET 2003.
Thanks.
|
|
|
|
|
Hi, I would need a small help.
I have developed a static C++ library, in which a class APDU is defined.
Now I am developing an in-process server ATL whose class of implementation will have to
contain as variable member an object APDU.
Accordingly I would like, that the interfaces (what I am creating with the
wizard) they accepted as parameter an object APDU.
EXAMPLE
(We suppose that my server ATL has to print the content of an APDU)
I create my server ATL
(step 1)File--> New--> Project--> ATL COM App Wizard--> project name=server
(step 2) Server Type=DLL
I insert a new object ATL
Insert--> New ATL Object--> Simple Object--> Short Name = example
To this point I want to add a type APDU property to the file idl
Right mouse button-->Add Property
How do I do to make APDU appear the type in the curtain menu that show the
possible types??
Thanks
Anthony
|
|
|
|
|
> How do I do to make APDU appear the type in the curtain menu that show the
possible types??
You don't. Just type your type. All you have to make sure is that the IDL compiler recognizes your type. May or may not be easy.
--
Ich bin Joachim von Hassel, und ich bin Pilot der Bundeswehr.
Welle: Erdball - F104-G Starfighter
|
|
|
|
|
Hi
I have a component implementing a proprietary protocol (say,
Protocol.dll)and does the communciation over serial port. I have defined ATL
objects for each type of packet, and nearly all has a property called
"description" which returns a BSTR.
One ATL object encapsulates the serial communication. So I can set the baud
rate, port number etc.
A connection point event is defined corresponding to each packet that may
arrive to the PC (from the device). Say ProtocolPkt1, ProtocolPkt2,
ProtocolPkt3 etc.
Now we typically use 2 serial ports. One that does proper protocol
communciation and another that dumps trace staements. To take care of the
trace statements I have one event defined (LogData) in the same event
interface described above.
I have an application (say Mainwindow.exe) that uses the above component,
connects to both the ports and has separate event sinks to handle the 2
ports separately. The protocol data and the log data coming from the 2 ports
are to be shown in separate windows. Whenever an event notifies that log
data is received it is simply dumped in a window. Whenever any event
notifying any of the protocol packets is received, the corresponding packet
is created from the bytes received in the event, interpreted and displayed.
Now onto the problem. When some protocol packets are received, the
description property has to be called. When both the ports are connected the
log data comes fine. But when the description property of say ProtocolPkt1
event is called, the BSTR returned is prefixed with some log string that
came in the LogData event. Further the application displays a crash when it
is closed.
Some more observations.
1. This does not happen when the BSTR returned is very short. Typically only
when the string returned is long and computed in some for loop, does this
corruption occur.
2. This does not happen when I use the debug version of Protocol.dll.
I hope I have made myself clear. If any information is required please let
me know. Any pointers that can help me proceed would be greatly appreaciated
Thanks
aby
|
|
|
|
|
>> 2. This does not happen when I use the debug version of Protocol.dll.
Have you tried looking at this article Surviving the Release Version?
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
Make sure that the code that fires the event manages the life time of the BSTR.
I suspect that the first client is releasing the BSTR and hence ur second client sees garbage.
For events and BSTR the caller allocates and frees the bstr. if u are using _bstr_t always pass a copy to the event( bstrVar.copy())
Hope this helps..
prashu
|
|
|
|