|
I create C# console application that use outlook to open msg file.
The application work well on server when I use remote desktop.
But when I try to run the console application from ASP.NET page. GetActiveObject() cannot find outlook instance.
What should I adjust/setting something to make the application work ?
Is it possible to GetActiveObject() in this situation ?
|
|
|
|
|
Hi,
I have a vc++ application that has an interface IMyInterface and a class derived from this interface.I would like to pass a pointer to this interface, to an interface method declared in a component. I am trying to manually edit the header files and .idl file in order to declare the pointer to the interface declared in vc++ application.
What I did is, I have included the vc++ app interface header file in the .idl file. I don't whether I can do this or not. But I am trying...When I did so, I am getting error "error MIDL2025 : syntax error : expecting a type specification near "virtual".
Please let me know as how to pass my interface pointer to a method in the component and what are the changes that are to be made.
Thanks in advance.
Taruni
|
|
|
|
|
You can #include a .h file in MIDL to add structs etc, but in your case I think you need to #include the .idl file with the definition of the interface you want to pass e.g.
#include "IMyInterface.idl"
usually this is after the
#import oaidl.idl
#import ocidl.idl
Your interface should then have a method (or similar):
HRESULT PassMyInterface([in] IMyInterface* pIMyInterface);
|
|
|
|
|
Hi,
I'm using visualstudio6.0 and new to the COM. I want to create a mime filter such that i can able to retrieve the web page content and replace it with other data. Please, help me.
How I have to start creating a plug-in?
I have gone through this link (i.e., http://msdn.microsoft.com/en-us/library/aa767916(VS.85).aspx), but unable to understand it clearly.
Thanks in Advance...
|
|
|
|
|
Hi
Can anyone here tell me how can i implement these Interface in C#,I am creating an com component and i need to impliment these.
IPersistProperty
IPersistPropertyBag
Pleas help me u can also give any article regarding this.
thank you
Mahammadhusen
|
|
|
|
|
Hi,
Can anybody provide me links for how to create and deploy COM, DCOM in remote servers and accessing them using VB code located in remote server.
I would be very much thankfull to all of who tried to support me in anyway.
If links explain with sample codes, it will be very much helpfull.
Thanks a Lot,
Aleem Mohammad.
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
|
|
|
|
|
Hello everybody,
I have an issue while working with COM Out-Of-Proc Servers.
My situation is such that, the client need to pass a Function pointer
to the Server, so that the server can fire callbacks at regular intervals.
So I need to define one of opearions in the interface provided by the Server to
take one function pointer.
Now the problem is that while doing so in IDL file, MIDL doesn't allow me and throwing errors.
Please help me guys...
Thanks in Advance..
Shyam
|
|
|
|
|
I think you can use connection points to fire the reply back to the client. The event sink at the client side can hold the function pointer. When the fired reply reaches the event sink of connection points you can re-direct it to the corresponding function.
|
|
|
|
|
ConnectionPoints are one method. What MIDL will allow is to pass an interface pointer tather than a finction pointer. Then you can call a function of that passed interface from the server.
Have the client implement an interface with the callback function and the server an interface with a method that takes a pointer to the first interface as a parameter. Then in the client internally QueryInterface for the interface and pass it to the server.
|
|
|
|
|
Thanks Jonathan for your reply...
That really eased my problem..
|
|
|
|
|
Hi, I have searched around the web and all my reference books but have yet to see an example of how this is done, or even if it can be done.
Here is my dilemma:
I have some old legacy apps that were written in VB6. Yay. Despite the fact that the VB6 programmers never used Object Oriented Programming of any kind... for some reason in this case they decided to nest the Procedure I need inside a class. Because of some poor programming practices that our team insists on following, I am prohibited from creating a strong reference to this COM Dll, I have to use PInvoke. So How can I use PInvoke to reference a method when it is a member of a VB6 class? The entry point is not recognized since an instance of the class would need to first be instantiated in order to access the method. Here is a sample of what my DllImport looks like:
[DllImport("SomeCOMDll", EntryPoint="aVB6Function")]
public static extern Recordset AVb6Function([MarshalAs(UnmanagedType.BStr)]
string globalIdentifier,
[MarshalAs(UnmanagedType.BStr)]
string webUser_ID,
DateTime shipDate,
[MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)]
string[,] origDestArray,
[MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)]
string[,] wtClsArray,
[MarshalAs(UnmanagedType.BStr)]
string mode,
[MarshalAs(UnmanagedType.BStr)]
string svcLvl,
[MarshalAs(UnmanagedType.BStr)]
string IOT,
[MarshalAs(UnmanagedType.BStr)]
string custCode,
[MarshalAs(UnmanagedType.Currency)]
decimal fuel,
[MarshalAs(UnmanagedType.Currency)]
decimal addtMarkupPct,
[MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)]
string[,] webAccChgArray);
"We are men of action; lies do not become us."
|
|
|
|
|
I am using VisualStudio6 and fairly new to COM.
I am using connection points for recieving reply from a server. The issue is client is waiting for the reply. Since, event are like windows messages, the client will not recieve the events fired from server if
dwReturn = ::WaitForSingleObject( m_hSynEvent , INFINITE );
is called . Please provide a solution for recieving the events.
Thanking You in advance.
|
|
|
|
|
Hello merina2005,
You can use ATLWaitWithMessageLoop(). However, there is a design flaw with this function : there is no timeout parameter.
I have written a function that waits for an event that also times out when required. Email me if you want it. My email address is :
bio_lim_2004@yahoo.com
Best Regards,
Bio.
|
|
|
|
|
Hi;
ATLWaitWithMessageLoop() allows other window messages to be dispatched while waiting. I want my GUI to wait(ie, not to process any windows message)until the reply is obtained. Do Help.
Thanking You in advance.
|
|
|
|
|
>> I want my GUI to wait(ie, not to process any windows message)until the reply is obtained...
This is v strange. If your GUI does not receive any windows messages, then it will be totally fixed on the screen and immobile. It will not receive any WM_PAINT messages and so covering it and then uncovering it will not cause it to repaint its client area. It will not even respond to any mouse click and drag.
But if this is really what you want then you should go ahead and use WaitForSingleObject(). The effect will be as you desired.
But I must be missing out on something here. Maybe you have not explained yourself fully.
- Bio.
|
|
|
|
|
In the case od STA application, the event fired using connection point will not be recieved if we use WaitForSingleObject(). I have fixed this issue by using CoWaitForMultipleHandles(). In this case, pending events are processed after obtaining the reply from connection points.
Thank You for your updates.
|
|
|
|
|
Hi,
I have a server which is used for windows 2000 advanced server. This server i have created a asp.net application to read excel sheet and update the data into the database.
I want to add permission for ASPNET for MS Excel Application. But it does not listed on DCOM Config properties.
How can i add/migrate MS Excel Application to DCOM Config properties?
It is urgent to update for my project.
Thanks in advance
|
|
|
|
|
It's under there. Add ASPNET to local launch and activate permissions. With Excel 2007, I found it necessary to login as ASPNET user using a program called anup(gets ASP.NET encypted password), logging in as ASPNET user, and then clicking OK on dialogs which popped up in order for interop automation to work from ASPNET user account.
|
|
|
|
|
|
Hey,
i've written a ActiveX-control using MFC. The control creates a CWnd which hosts a CListCtrl. All works fine, in Ms Testcontainer but not e.g. in Ms Access/Excel. When I use a form in Access and place my control on the form, no key events reach my control (even if the control has focus). All mouse-events works well. How can I send the keystrockes to my control (eg. move cursor on my listctrl)?
Thank you for helping me...
|
|
|
|
|
Does anyone know how to get a reference to the IFolderViewOC interface from within an Explorer extension (sidebar)?
I am trying to get a reference from with IObjectWithSite::SetSite(), I have tried using the IServiceProvider which fails and I now think I need to query a service to get the reference but do not know which service to query.
Does anyone have any ideas?
|
|
|
|
|
Hi,
I am working with COM dll resources. I have created a menu in a com dll and provided an interface with a method to return the handle to the menu.
When I am trying to pass this handle(converting to int) to CSingleDocTemplate of InitInstance() and trying to run the application, I am getting "Failed to create empty document".
My intention is to use the menu(resource) which is present in the com dll in my application.
In order to achieve this, is this the correct way of proceeding or not? If yes, where am I doing wrong?
If not, please suggest an alternative mechanism.
Thanks in advance.
Taruni
|
|
|
|
|
Hi,
I have one ASP application which is using a DCOM component, I have to configure that DCOM component on a Server with Win 2003 operating system.
Can anybody please give me some hints or links to do this task.
Ultimately now I have registered it but it is giving the error and a warning as below in the Event Log, please help me in resolving this issue.
The description for Event ID ( 36512 ) in Source ( SEIPMAFILEDOWNLOAD ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: <ERRORCALLSTACK><ERROR><NUMBER>-2147184992</NUMBER><DESCRIPTION>0-</DESCRIPTION><COMPONENT>seipma_comFileDownload</COMPONENT><MODULE>pzFileDownload</MODULE><ROUTINE>FileDownload</ROUTINE><EIID>11/17/08-21:37-705</EIID><ADDINFO><EXECUTION_STEP>Getting download data: file name = Download11172008.exe</EXECUTION_STEP><PROCEDURE_PARAMETERS><APPSECDB><![CDATA[<ADO_APP_SEC_DB><DSN>SW_APPSECDB_0370a</DSN><USERID>SW0370</USERID><PASSWORD>zaq12wsx</PASSWORD><GUID>{6C067960-45E4-11D3-9F43-00A0D1063EC9}</GUID></ADO_APP_SEC_DB>]]></APPSECDB><USER_SID><![CDATA[{96FBC159-D12A-11D4-8E69-0008C72B623C}]]></USER_SID><FILENAME><![CDATA[Download11172008.exe]]></FILENAME></PROCEDURE_PARAMETERS></ADDINFO><ERRORLOGGED>
And a warning as below
The average call duration has exceeded 10 minutes. If this is not the expected behavior, please see article 910904 in the Microsoft Knowledge Base at http:
Server Application ID: {4C8DA47F-4AC2-4250-AFB3-0115E933175F}
Server Application Instance ID:
{65909717-9B34-44DA-8A88-127AB60FFE09}
Server Application Name: PMABLayer
For more information, see Help and Support Center at http:
Thanks a Lot,
Aleem Mohammad.
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
modified on Tuesday, November 18, 2008 11:15 AM
|
|
|
|
|
Did you take the time to read the Microsoft Knowledge Base article listed in your error message? It tells you exactly why it happens and how to get around it.
http://support.microsoft.com/kb/910904[^]
Best Wishes,
-David Delaune
|
|
|
|
|
Dear All,
Iam new to c# window application and also for COM.I have a COM component
which is developed in Visual Basic.Now i want to use this component into
my c# window application.How can i register and use.The COM is in the form
of EXE not in the form of DLL.Please help me out on this.
Thanks & Regards
Veeresh
i want to join this group
|
|
|
|