|
Hi,
1- If you make the variable global why passing it in the LPARAM of createThread ?
Normally , or you make a variable global or you pass the variable thru the LPARAM.
2- Normally, with multiple threads in a process a guy must protect the data with a critical section or with another sinchronization stuff ...
3-It's necessary to call CoCreateInstance and RegisterInterfaceInGlobal on the apartment where the object lives
4- It must be GetInterfaceFromGlobal(cookie, IID_ISpyder, (void**)&Spy)), you forgot the ampersand
5-You can call RevokeInterfaceFromGlobal from any apartment, but you must be certain that is the last apartment that makes use of the interface pointer
Hope this helps, best of luck
Joao Vaz
|
|
|
|
|
the only thing global is the cookie, i went ahead and made the GIT a member in my class, and passed it in through the LPARAM. but i didnt put my ampresand in there though. gonna try the stuff out now...
~Timothy T. Rymer
www.digipen.edu
tim.xpertz.com
|
|
|
|
|
now when i call RegisterInterfaceInGlobal() - what should i pass in the first parameter? What do i do & How do i do it?
Do i just call QueryInterface? all i'm wanting is ISpyder but i'm in a CSpyder function... how do i do all that?
right now to get some kind of pointer, i call query interface and then pass an IUnknown *unk = NULL ---> (void**)&unk <--- into the function.
Thanks again..
~Timothy T. Rymer
www.digipen.edu
tim.xpertz.com
|
|
|
|
|
now when i call RegisterInterfaceInGlobal() - what should i pass in the first parameter? What do i do & How do i do it?
Do i just call QueryInterface? all i'm wanting is ISpyder but i'm in a CSpyder function... how do i do all that?
right now to get some kind of pointer, i call query interface and then pass an IUnknown *unk = NULL ---> (void**)&unk <--- into the function.
Thanks again..
~Timothy T. Rymer
www.digipen.edu
tim.xpertz.com
|
|
|
|
|
i got it working. who knows how, but if anyone else has this problem i can work with anyone now about it. i know what to do now. thanks a bunch.
~Timothy T. Rymer
www.digipen.edu
tim.xpertz.com
|
|
|
|
|
Good for you Tim Rymer
COM it's a beast to learn ,I readed 8 books on COM/ATL to be proficient
Regards and happy COM coding
Joao Vaz
|
|
|
|
|
Hi,
How to set the identity user of a COM component using VC++?
Thanks,
- xico -
|
|
|
|
|
Hi,
I created a dialog box using the ATL Object Wizard choosing the category Miscellaneous and the object type Dialog. The result of this action was a dialog implemented by a class that specializes the template CAxDialogImpl<...>. This dialog is showed in a method of another COM object created as SimpleObject. The SimpleObject component is instantiated in an MS Word macro. When I install my program in a machine without Visual C++ installed the program breaks down. I am sure that the COM support is installed, because when I run another component in the same way, but not using this kind of Dialog, the program does not break down. Can anybody help me?
Thanks in advance,
Márcio Azevedo.
|
|
|
|
|
Make sure your components have been built in release mode not debug. Does your dialog use any controls that have been installed on the build machine but not on the target?
|
|
|
|
|
How was the object compiled. Release Min Dependancy or Release Min-Size? Min-Size requires ATL.DLL to be registered on the system. What about the run-time library version it was compiled with, was it Multi-threaded. I've had some problems with systems missing msvcp60.dll
Michael
|
|
|
|
|
I am try to pass a variant as a parameter on a connection point, but at the moment I am having little success.
Does any body have any idea if I can do this ?
|
|
|
|
|
We have implemented a com client in VC++ and it should communicate with server that developed in Delphi(.dll).
The Scenario is as folows
-------------------------------------
A button click on com client(vc) will invoke the com server (Delphi interface).
which will display a dialog were user can interact.Thus by the button click on VC client can invok multiple instances of delphi server.
Now we need to delete or close all the instances of com server with a single click in vc client (com client)
how it is possible ?.
Also there is problem of how the com client (VC) should identify any event occured, on which delphi interface.
Is there any way of identifying it ?.
|
|
|
|
|
If I use the ATL COM AppWizard to create an HTML Control and then embed it in a web page it shows up fine on the monitor, but never prints to the printer. Does anyone know what's going on with that? And while we are at it, the default HTML Control project generates a sample control with 3 buttons labeled Red, Green and Blue that when clicked generate the error "Object doesn't support this property or method". Has anyone else experienced this?
|
|
|
|
|
I have a VB application which uses COMponent written on VC++. COMponent implements IConnectionPoint and creates additional threads. Pointer to [source] interface _IOutBound is correctly marshalled between main thread and additional ones.
The problem arises when VB calls Release (and --m_Ref==0). COMponent waits for threads to end and VB cannot serve call to _IOutBound since it is waiting in COMponent. And if one of the threads calling for _IOutBound - I got deadlock.
How can I prevent that deadlock?
--
Alvin777
|
|
|
|
|
Hi,
I'm having some problems using connection points with DCOM. I have an ATL component that contains a connection point used to send events back to the client. When I instatiate it locally it works, but when I instantiate it remotely an error (E_ACCESSDENEID) occurs calling the method DispEventAdvise of the client event handler passing the container component. Can anybody help me?!?
Thanks in advance,
Marcio Azevedo.
|
|
|
|
|
Hi Marcio,
Do you configured access control on the remote computer using DCOMCFG ?
If not , it gives the infamous E_ACCESSDENEID
Hope this helps,
Joao Vaz
|
|
|
|
|
Hi,
I am using a Audio Player ActiveX in VB and VC++ 6.0.
In VB the control runs fine, but in VC++ the control freezes the window
when I play a song.
I'm using CreateInstance method in VC++ to instantiate the control
Can someone tell me what I should do?
Sansky
|
|
|
|
|
Some controls do not have the "windowless activation" feature (they need a window to function correctly). This may or may not be your problem.
Instead of CreateInstance, have you tried to insert the control onto a dialog template in your project? Assuming you are using the control in a CDialog derived class:
1. Click the project menu.
2. Select "Add to project" then "Component and controls".
3. Browse to select your ActiveX control.
4. The above steps will generate a C++ wrapper class derived from CWnd and also place the control on the resource toolbar, you can drag it from there onto your dialog template.
5. You can add a member for this control to your CDialog derived class.
|
|
|
|
|
Hi all,
I am suffering from a Read/Write stream operation with CComVariant.
Here is the problem. I create a stream like this:
CreateStreamOnHGlobal(NULL,TRUE,&m_pStream)
then I write to it a VARIANT through CComVariant (in doesn't matter which type it is) like this
m_comVariant = valToWrite;<br />
m_comVariant.WriteToStream(m_pStream);
and read it like this:
m_comVariant.ReadFromStream(m_pStream);<br />
*pvalToRead = m_comVariant;
As a result in the read what I get is a "Bad varibale type" error
I also tried this with CComBSTR and got the same results
Any ideas?
Thanks a million for any help
Alberto Gattegno
Software Engineer
http://www.itgil.com
|
|
|
|
|
Can Win98 clients use COM+ components on Win2000 and will the COM+ components still have the same benefits such as transactions, scalability, etc. managed automatically by COM+?
|
|
|
|
|
Hi ,
Is it possible to load other ActiveX controls from one ActiveX Control at
run time.
The ActiveX control I have to develop..whose responsibility is to load
the other activeX controls and PASS parameters they require at run time
The parameters I have to pass and the class ID of the control I will be
getting
from the html page in which my activeX control is present.
For Example:
<object classid="CLSID of My ActiveX control" width="300" height="250">
<param name="" "totalcontrolstoload"="" value="N" />
<param name="" "control="" id"="" value="ToLoad1" />
<param name="Control ID" value="ToLoad2" />
.......................
.......................
<param name="Control ID" value="ToLoad N" />
<object classid="CLSID of Some Active X control One" id="ToLoad1">
<object classid="CLSID of Some Active X control two" id="ToLoad2">
1. Is it possible to for my ActiveX control to get the information of other
activeX controls in the HTML page.
2. Is it possible to load the other active X controls using my control.
3. How do I communicate with other ActiveX controls...
i.e I know control communicates with container...But how do two controls
which are
contained in the same container communicate with each other.
Please send your Inputs/Suggestions /Improvements.
Thanks in Advance,
Raju
|
|
|
|
|
Hi,
I created an InProcServer(ToolBand.dll) on my Windows NT Wkts which works fine for NT Server4.0, Win98, 2K, and Me. This doesn't get installed on the setup of Win95 running IE5. I get error message "This function is only valid in Win32 mode". There were some "Ex" Registry API used in DllRegiserServer(). I've replaced it with normal API's i mean without "Ex", but the problem remains same. I get same error message with RegSetValue(..) API. Is there any compatibility issue?
It seems that Windows 95 is not pure win32. Hey Any comments? Why its so ironical behaviour? Should I need to build this application on VC++ running on Windows 95? I there any registry key or service to get some Win32 services on Win95.
I'm fed-up with this behaviour. Help me with any comments.
--Sumit
|
|
|
|
|
Is there any simple way of deleting an ATL interface in a VC++ ATL project?
I am a little loath to commenting out or deleting lines manually for the required interface.
|
|
|
|
|
Hi all,
This is a somewhat complex issue I guess and most probably the answer is no BUT i have to be sure.
Is the any way at all to declare an STL data type inside an interface declaration?
i.e
interface FOO
{
[helpstring("method FOOFunc")] HRESULT FOOFunc([in]std::vector < std::string > stringVec);
}
If so please tell me how to declare and how to inlude the header files without the MIDL giving me comilation errors
If not... well you can't balem me for trying.
Thanks in advance.
Alberto Gattegno
Software Engineer
http://www.itgil.com
|
|
|
|
|