|
|
This is exactly what I needed. I absolutely should have remembered the good ol' dependency walker from yester-year. Just when COM was starting to be a vague memory, it came back and reminded me just how much trouble it can cause!
Thanks!
If you continue to do the same things you always did, don't be surprised if you get the same results you always got.
|
|
|
|
|
Is there an API available to enable/disable Windows SP2 firewall on a given connection?
I’ve read through the Windows SP2 Firewall API, but it seems there is no mean to do this, neither enabling nor disabling “pop3”, “FTP server”…etc on a given connection.
These properties are displayed in the Windows SP2 Firewall GUI under ‘Network connection settings’ of the ‘advanced’ tab! There were some methods to do this with ICS/ICF…
Thanks!
Carl
|
|
|
|
|
|
Although I have been using COM for some time now, I am trying to do something something different from my usual experience and I have run into a problem that I am unable to solve at the moment, and would be grateful for any assistance.
My intention is to have a singleton EXE COM server running on a LAN connected computer. This server will be started once, and then remote users can connected to it. I am running currently as the interactive user, but may change this to a service at a later date. If the remote and local computers are both logged in as the same user, then everything works fine as expected.
However, if a different user runs the client, and tries to access the running version on the server then there is no response, and instead another instance of the server program is started despite supposed to being a singleton.
Please could anyone account for the difference between in behaviour? I have tried many different security configurations including administrator, but have been unable to overcome this problem. The security initialization code reads
CoInitializeSecurity(NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_NONE,<br />
RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL);<br />
which usually overcomes every problem for me. Thanking anyone in advance who gives this some attention.
|
|
|
|
|
If anyone is interested, I have now been able to resolve all my problems.
Once I had denied launch permission to everyone, and also reste the security info the OleView, everything worked fine, and continues to work perfectly.
This one took me a long to find, despite being in and out of the dcomcnfg program checking the permissions. I hope that this response will be able to help without anyone else that has similar problems.
|
|
|
|
|
Hi, I have a little knowledge in COM technology, in fact I have develop some(very simple ones) COM objects. As usual the requirements are demanding advanced technical solutions, and seems(remember I'm a begineer) that COM is not enough to accomplish this. What i have read is that DCOM and COM+ follows COM. But know is Services Oriented Architecture (Web Services?. So could anyone explain me COM evolution.
Besides, Can i throw an exception in a COM object and a Delphi app consume my COM??
Tnx
|
|
|
|
|
hi
see this link [^]
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
-- modified at 23:21 Monday 13th February, 2006
|
|
|
|
|
|
Good day.
Could anybody help to implement flicker-free support in ATL ActiveX (without MFC)?
Thanks.
|
|
|
|
|
Now I am creating a new web control in VS 2003
After I created a web control,
I add this web control in a new asp.net project and drag the control to a web form then the control
will displaying in word format rather than a image like generic microsoft web control.
Anyone may help on this?
|
|
|
|
|
I have ATL COm dll, Now I want to convert it to ATL EXE, But when I removed the DLL main stuff to Winmain... It still assumes, its dll. When I try to execute it on cmd-shell, it gives me error messsage, " Not valid Win32 application"
Any Soultion.
cheers
Balkrishna Talele
|
|
|
|
|
Hello Balkrishna,
There is no direct way to convert a COM DLL to a COM EXE. While the implementation codes of your objects will most likely remain the same, the server codes (i.e. the supporting global functions that help to expose your COM objects) are entirely different between a COM DLL and a COM EXE.
A DLL will typically export a DllGetClassObject() global function plus others (e.g. DllCanUnloadNow()). A COM EXE cannot export any functions and must use the CoRegisterClassObject() to expose your COM Object's Class Factory Object.
I suggest you refer to a good book on COM, e.g. The Essence of COM by David S. Platt.
|
|
|
|
|
Hi,
as far as I know a C++ com client needs the interface definition and GUIDS of the server which are taking from xxx.c and xxx_i.c.
my question is: how can I generate xxx.c and xxx_i.c files from a tlb or dll ?
Thank you in advance
|
|
|
|
|
I obtained the idl from Ole/Com Object Viewer. Then I compiled it with midl.exe, thus getting the xxx.h and xxx_i.c
|
|
|
|
|
Hello Fisico,
What is typically done is that you would use the .NET tool regasm.exe to register COM information for your C# assembly. You can also instruct regasm.exe to produce a .TLB (type library) file for the assembly by using the /tlb option, for example :
regasm CSharpAssembly.dll /tlb
You would then use this .TLB in the C++ client source code via a #import statement :
#import "CSharpAssembly.tlb"
The full definitions of the COM object available to your C++ client will be available via an automatically generated .tlh (type library header) file.
Best Regards,
Bio.
|
|
|
|
|
I've been reading for days now and I'm sure the answer is simple, but I'm just missing it.
In application myClient I create an instance to application myServer. Now myClient needs to create a linked list of data that myServer will process. How do I declare the method in myServer to receive a pointer to the link list?
I'm assuming that because myServer is out of process I need to use the CoTaskAllocMem to allocate the memory for my linked list. But I'm not sure how to pass that pointer. Is it as simple as just casting it to a Variant?
Thanks for your patients.
|
|
|
|
|
mtwombley wrote: How do I declare the method in myServer to receive a pointer to the link list?
Simply: You cannot without writing the marshalling code for it by yourself. (Complex warning!)
This is due to the fact that the out-of-process server is just that, out of the process and hence executes in another address space.
If you are using an interface that uses the universal marshaler, i.e. it has the 'oleautomation' attribute in the .idl-file, you are limited to the data types that are supported by that marshaler.
If this is the case I suggest that you pack your linked list into a multi-dimensional SafeArray of VARIANTs where each VARIANT contains a SafeArray of VT_UI1 that represent the data of an element in your linked list.
This is similar to providing binary data to the server and you have to develop some kind of 'protocol' of how to interpret the binary data in the server so that it can rebuild the linked list.
Another way is to pass one element in your list for each call to the server in a SafeArray of VT_UI1 where you have to use the same 'protocol' as above for unpacking the list element data.
Since the server is out of process, this way could be a performance issue. If the list contains a lot of elements this could really slow things down, but if the list is rather small this way is easier to write the code for.
That's for you to decide.
Hope this helps
--
Roger
It's supposed to be hard, otherwise anybody could do it!
|
|
|
|
|
I want to subscribe to SENS network events (using ISensNetwork) from a COM DLL. Microsoft has a good example for subscribing to the events from a COM EXE, but i don't know what I need to do (what/where/when) in order to get it running from a DLL (I only want the code to run in response to an event).
Can any-one point me in the right direction?
|
|
|
|
|
hello
In my mfc vc6 program, I COM connect to msn messenger sink via advise and also can disconnect with unadvise. All is well and I can control MSN very well.
However, if in taskmgr you kill MSN IM, how does my program detect if its connection is "lost" with msn IM (since it was killed) and if so detected, doing an unadvise wont work for the msn sink is now gone.
Any adive?
Thank you
|
|
|
|
|
I'm trying to create a ActiveX DLL in VisualStudio C++ 6.0
I want to use this with an IIS-Server to make a SOAP-Communication. I use the SOAP Toolkit 3.0!
I have to create a DLL like the following example:
>>
The following procedure creates a Microsoft® Visual Basic® ActiveX® DLL that implements the various operations: EchoString, AddNumbers, and SubtractNumbers. If you were to create this DLL on a computer other than a server running IIS, you would need to copy it from that computer to a server running IIS and also register the DLL on that server.
To create the DocSample1Service DLL
Open Microsoft Visual Basic® and create an ActiveX DLL project.
Change the Project Name to DocSample1Service and the Class Name to Sample1.
On the Project menu, click DocSample1Service Properties. Then, on the General tab, select the Unattanded Execution and Retained In Memory options. For more information see, Developing SOAP Toolkit Applications.
To the Sample1 class, add the code from the Code Listing for the Sample1 Class.
Save the project in the Soap3DocSamples\DocSample1\Server folder.
On the File menu, click Make DocSample1Service.dll. Save the DLL in the Soap3DocSamples\DocSample1\Server folder.
<<
|
|
|
|
|
Hello,
I am developing Shared Add-In for MS office in VS .Net 2005.It works on my computer in debug mode and also after installing it using the setup of project.When I install the application on other computer (does not contain VS .NET 2005) it seems like it not installed at all,no effect.
.Net framework 2.0 installed
Updates for office installed
If someone has any suggestions,it will realy help me because now the project is stocked.
Prefferable to the mail: caesar_zav@hotmail.com
|
|
|
|
|
Iam using mshflxgd.ocx in my ASP project. it works fine on the machine where VB6 Activex Controls are installed completly, but when i try to register the mshflxgd.ocx and its dep files manualy using regsvr32.exe, it simply doesnt work. the grid appears as big box with a image at teh left top corner. plz give me a solution.
bala
|
|
|
|
|
hi all
my task is on connecting UPS to PC and iam trying to do it by means of WMI (windows Management Instrumentation).
Can anybody please help me in writing Eventconsumers(event notifications) for WIN32_UninterruptiblePowerSupply Class
Thank you
abhi
abhi
|
|
|
|
|
I have one Singleton COM Server which is launched by the windows service. In antother aplication i want the interface pointer of the Singleton COM Server.(Both are in single machine). In this case instead of getting the existing Singleton COM Server pointer its creating a new instace. Whenever we declare a COM Server with DECLARE_CLASSFACTORY_SINGLETON macro. It will create a one instance on the local machine. Any body plz suggest some possible ways to overcome this problem
Srinivas
|
|
|
|