|
ActiveX control (COleControl) as property in other ActiveX control?
|
|
|
|
|
Hi,
I have a problem in defining a structure inside a type library in COM.Compiler is not able to generate UUID for the structure.Could anyone please help me?
Thank You.
Yamuna.E.
|
|
|
|
|
Why I need the UDP ?
i want to create something (Like OCX or DLL) to let the server send a message to the client(s) inform them to refresh ,redirect ,there is new email, XXX is logged on.
how i'm thinking to solve this problem?
create client OCX (without using the WinSock.OCX) to wait and manage the server message. and create an DLL on the server that will send the message to the Client OCX. (i think this is a good solution ?! do you think that ????!! )
What i want ?
i do not know how to write a code deal with UDP ?!
if you have another idea ?? i'll be pleased to you if you send it to me
Note : I’m talking about intranet.
Can any one there help me ? or give and any article(s) that could help ?!
web programmer.
|
|
|
|
|
Distinguish btween COM And DCOM.
Can u explain me how to use DCOM
Wat is the difference btween registering a DLL in IIS Server as Component and make use it in ASP and Registering the same DLL in MTS and make use of it in ASP.
|
|
|
|
|
I have created a procedure in my ATL Component which returns IDispatch *
In VB Client Its also allocated to an object but at the end of function i got an error
Help me
|
|
|
|
|
Hi,
I am building OCX which uses other OCX files. I pack those in one CAB file, which should be distributed over intranet.
Each time I add a new functionality to my OCX file I change file version from 2.0.0.4 to 2.0.0.5 for example.
I include this version change in my INF file however, once i downloaded my control (2.0.0.4) on remote machine it is being loaded (the one with no 2.0.0.4 - even though i have 2.0.0.5 in a cab) every time i call this control but with HIGHER version number 2.0.0.5.
I tried to change my cab file name, and i place a new cab with newer control in deifferent directory. It does not work. I need to delete once installed control version say 2.0.0.4 from c:\winnt\downloaded program files in order to download and install newer version 2.0.0.5
Where is there a mistake ? I cannot expect client to clear registry in order to install newer version of control.
I would appreaciate any help.
thank you
Bartek
|
|
|
|
|
How can I pass an IDispatch pointer into C++? My C++ method is expecting a <vector> of smart pointers (std::vector<xxptr<object>> ) to C++ objects. Since I am using a VB front-end, I pass a set of IDispatch pointers to ATL via the variant type.
Now, I am stuck with a set of IDispatch pointers to the objects and I don't know how to pass them into C++.
Any ideas?
thanks,
-shamus
|
|
|
|
|
What do you mean pass them to C++?
What do you plan to acheive with your objects?
|
|
|
|
|
You can use IDispatch* ,LPDISPATCH or IDispatchPtr (smart pointer created from import)
to pass IDispatch pointers to your C++ methods.
Kindest regards
Holger Persch
|
|
|
|
|
I have created a procedure in my ATL Component which returns IDispatch *
In VB Client Its also allocated to an object but at the end of VB function i got an error in VB
Help me
|
|
|
|
|
How can i use existing COM components , for eg if i want a text component then how should
i go about doing it ? are there any components whose interfaces can be used directly ?
parag
|
|
|
|
|
How can I load Activex component from .ocx file? I don't want to use
insert new object dialog. Do I have to make some changes to component
itself? Thanks for help allready
|
|
|
|
|
Just #import the typelib and go about creating component the usual way with CoCreateInstance()
Hush..Hush.. thought I heard you calling my name now...
|
|
|
|
|
I built a COM object and installed it in MTS. I'm referencing to it in an ASP page and in that page I need to loop through its properties without hardcoding them. With ADO object I can do this
DIM prop
FOR EACH prop IN <object name="">.properties
...
NEXT
But when I tried this with the COM object that I've built, the ".properties" is not a option.
So is there a way to loop into the collection of properties with a custom COM object ? Do I have to toggle an option or to add a reference in the object ?
Pat
|
|
|
|
|
Is properties a property or method that you've added to the COM object! if not take a look on MSDN for TLBINF32.DLL it's a COm object that will let you iterate through an object properties/methods.
Joe.B.
|
|
|
|
|
Hi all !
Explain this question who is able to
16. You design a COM component for use by many user interface applications in your company. One of the interface methods for the component defines a parameter for an IP address as a string in the format nnn.nnn.nnn.nnn. The component's type library defines this parameter as both an input and an output parameter.
When the interface method is called, the component validates the IP address. If the current user is forbidden to access that address, then the component should change the parameter to the string 0.0.0.0 and display this string within the application.
Which type of COM component should you design?
A. data-aware class
B. distributed COM server component
C. out-of-process COM server component
D. ActiveX user interface Control
Thanks.
|
|
|
|
|
Hi ......
I have a composite control with some buttons on it, I want them
to react on me pressing enter. I tried to overload the pretranslatormethod and
catch it, but the funny thing is that it only works randomly, sometimes it works and
sometimes it doesnt. Have you come across anything like that before ? I cant solve it
/Pierre
|
|
|
|
|
Hi ......
I have a composite control with some buttons on it, I want them
to react on me pressing enter. I tried to overload the pretranslatormethod and
catch it, but the funny thing is that it only works randomly, sometimes it works and
sometimes it doesnt. Have you come across anything like that before ? I cant solve it
/Pierre
|
|
|
|
|
Hi,
VB stores some data about connections points it exports in the linked thread's TLS, thus when I try to callback an event, I get an Acces Violation. I found a code snippet by microsoft, but it doesn't seem to work in all cases, and event worse, didn't allow me to transfer interfaces ...
Thank you
|
|
|
|
|
I recently installed the Platform SDK, and suddenly started getting linker errors on GetObjectContext on codes that were previously running OK. When I looked through the Platform SDK sample codes, and the recent samples on .NET (FMStocks7 GAM - Business Logic Layer), I noticed that GetObjectContext is still being used. I noticed the documentation says you should use COM+. What is going on. I have a lot of code that uses GetObjectContext function, and that could break if I re-compile.
When I compile with VC++ 6.0 SP3 without the Platform SDK, I do not get the errors. The code was originally written using SP3, I have recently installed SP5.
Thanks
Gaul
gaulles@worldnet.att.net
|
|
|
|
|
I have a question about "Inside COM" by Dale Rogerson.
In aggregation part of Chapter 9
HRESULT __stdcall CA::Init()
{
IUnknown* pUnknownOuter = this ;
HRESULT hr =
::CoCreateInstance(CLSID_Component2,
pUnknownOuter,
CLSCTX_INPROC_SERVER,
IID_IUnknown, (void**)&m_pUnknownInner) ;
if (FAILED(hr))
{
return E_FAIL ;
}
hr = m_pUnknownInner->QueryInterface(IID_IY,
(void**)&m_pIY) ; if (FAILED(hr))
{
m_pUnknownInner->Release() ;
m_pUnknownInner = NULL ;
m_pIY = NULL ; // Just to be safe
return E_FAIL ;
}
pUnknownOuter->Release() ;
return S_OK ;
}
From above, I don't understand the following part.
hr = m_pUnknownInner->QueryInterface(IID_IY,
(void**)&m_pIY) ;
I guess delegating QI of Inner Component will call QI
of Outer Component and it should call Nondelegating QI
of Inner Component.
How come the following is calling Nondelegating QI?
HRESULT __stdcall CA::QueryInterface(const IID& iid,
void** ppv)
{
else if (iid == IID_IY)
{
// You can query for the interface.
return m_pUnknownInner->QueryInterface(iid,ppv) ;
}
....
Thanks,
|
|
|
|
|
Hey there,
I believe CA::QI -is- calling the non-delegating query: m_pUnknownInner is a pointer to the non-delegating version of IUnknown. When an aggregatable object is created, the new object will return the non-delegating IUnknown: this is the one and only time that an object will return the non-delegating interface, rather than the "usual" delegating interface, when IUnknown is requested. This is why the aggregating parent object -must- query for the IUnknown interface when it's calling CoCreateInstance() for the child object: if it didn't ask for IUnknown at create-time, then it would never be able to get the non-delegating interface....
Note there's certainly other ways of doing aggregation, too: take a look at Don Box's method in Essential COM, too....
-andrew
|
|
|
|
|
Hello...
I appreciate your reply.
I think I didn't get the Cast part when it
creats the inner component.
After I got that, your answer got crystal clear ^^
I will definately take a look at Essential COM.
Thanks
|
|
|
|
|
HELP! I followed instructions given in Microsoft on-line help Article ID Q173974 for adding MFC support to an ATL EXE Project but I get the following build errors in the CServiceModule:
error C2660: 'Init' : function does not take 2 parameters
error C2065: 'IDR_ServerS2B' : undeclared identifier
error C2660: 'UnregisterServer' : function does not take 1 parameters
error C2660: 'RegisterServer' : function does not take 1 parameters
error C2039: 'StartMonitor' : is not a member of 'CServiceModule'
error C2065: 'dwPause' : undeclared identifier
|
|
|
|
|
I *appear* to have run into a limitation (or perhaps a bug?) in the #Import statement used to import a type library in Visual C++. Since I can find no documentation on this, I was hopeing that one of you might be able to shed some light on my problem.
Imagine that I have two projects. One automation server, and one client.
1) The Automation server
The server is defined by an .idl file containing several (dual) interfaces (around 20). Among all those interfaces I have a total of 499 functions defined.
2) The Automation client
The client uses the #import statement to import the type library (.tlb) created by the server.
At this point, everthing works fine. The #import <.tlb> runs smoothly and the client can access and use the functionality of the server without a problem.
Now... If I add another function to the server (function 500) suddenly the client refuses to compile.
I've determined that the problem is not simply a syntax problem. It appears to me, that the #import directive has a fixed limit of 499 functions that it can handle before it chokes. Can anyone confirm this?
Looking at the client-generated implementation files (*.tlh and *.tli), I find that the output generated for the two different versions (499 functions vs. 500 functions) is quite different. The *.tlh file for the 499 function version (the one that works) contains an #include statement at the bottom to include the *.tli file. In the 500 function version, the #include is replaced by:
#pragma start_map_region(<*.tli file and path>)
__declspec(implementation_key(1)) short <function1> ( );
__declspec(implementation_key(1)) short <function2> ( );
... // functions 3 to 498 excluded for brevity
__declspec(implementation_key(1)) short <function499> ( );
__declspec(implementation_key(1)) short <function500> ( );
I'm willing to entertaint the argument that I simply should not ever create (much less import) a type library containing 500+ functions. However, I would still like to find out what the story is with this, if only to satisfy my curiosity.
Also, I can find no documentation on either the "#pragma start_map_region" or "__declspec(implementation_key())" statements. (I know what #pragma and __declspec are . Can anyone tell me what these are and what they do?
Thank you.
|
|
|
|